Selaa lähdekoodia

Merge branch 'feature/1.0.0' of github.com:ab-inbev-apac/abi-cloud-qr-platform into feature/1.0.0

tanzhongran 4 vuotta sitten
vanhempi
commit
49f4309b74

+ 8 - 4
abi-cloud-qr-platform-server/src/main/java/com/abi/qms/platform/dao/mapper/QrPackageMapper.java

@@ -1,10 +1,7 @@
 package com.abi.qms.platform.dao.mapper;
 
 import com.abi.qms.platform.dao.entity.QrPackage;
-import com.abi.qms.platform.dao.vo.result.ActivePackageVO;
-import com.abi.qms.platform.dao.vo.result.PackageActiveSearchVO;
-import com.abi.qms.platform.dao.vo.result.QrPackageVO;
-import com.abi.qms.platform.dao.vo.result.QrSingleCheckVO;
+import com.abi.qms.platform.dao.vo.result.*;
 import com.abi.qms.platform.dto.req.ListActivePackageAddReq;
 import com.abi.qms.platform.dto.req.ListQrPackageReq;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
@@ -49,4 +46,11 @@ public interface QrPackageMapper extends BaseMapper<QrPackage> {
 	 * 单码查询详细信息
 	 */
 	QrSingleCheckVO getQrSingleCheckDetailById(Long id);
+
+	/**
+	 * 通过码活动申请id查询关联码包列表
+	 * @param page
+	 * @return
+	 */
+	IPage<ActiveModifyApplyPackageVO> listPackageByActiveApplyId(IPage page, @Param("applyId") Long applyId);
 }

+ 4 - 1
abi-cloud-qr-platform-server/src/main/java/com/abi/qms/platform/service/impl/QrBoxCodeFormatImpl.java

@@ -28,6 +28,7 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
+import java.time.LocalDateTime;
 import java.util.List;
 
 /**
@@ -72,6 +73,8 @@ public class QrBoxCodeFormatImpl implements QrBoxCodeFormatService {
 
         //3-新增or修改
         if (req.getId() != null) {
+            qrBoxCodeFormat.setUpdateTime(LocalDateTime.now());
+            qrBoxCodeFormat.setUpdateBy(userUtil.getUser().getUserName());
             qrBoxCodeFormatMapper.updateById(qrBoxCodeFormat);
         } else {
             qrBoxCodeFormatMapper.insert(qrBoxCodeFormat);
@@ -115,7 +118,7 @@ public class QrBoxCodeFormatImpl implements QrBoxCodeFormatService {
     @Override
     public ListBoxCodeFormatRes listBoxCodeFormat(ListBoxCodeFormatReq req) {
         //数据权限隔离,如果登录账号是包材厂,只能看账号包材厂的数据。否则看全部
-        if (userUtil.getWholeUser().getFactoryId() != null && userUtil.getWholeUser().getFactoryType() != null && FactoryTypeEnum.COVER.is(userUtil.getWholeUser().getFactoryType()) ) {
+        if (userUtil.getWholeUser().getFactoryId() != null && userUtil.getWholeUser().getFactoryType() != null && FactoryTypeEnum.COVER.is(userUtil.getWholeUser().getFactoryType())) {
             req.setFactoryId(userUtil.getWholeUser().getFactoryId());
         }
         //分页查询