Sfoglia il codice sorgente

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

tanzhongran 3 anni fa
parent
commit
0d91c435a2

+ 2 - 1
abi-cloud-qr-platform-common/src/main/java/com/abi/task/common/excel/ExcelInputFactory.java

@@ -179,7 +179,8 @@ public class ExcelInputFactory {
                     }
                     //调用method
                     Method method = methodCache.get(fieldName);
-                    method.invoke(t,StrUtils.filterHtml(value.toString().replaceAll("rm", " ")));
+                    String str = value.toString().replaceAll(" ", " ");
+                    method.invoke(t,StrUtils.filterHtml(str));
                 }
                 excelPojoList.add(t);
             }

+ 2 - 2
abi-cloud-qr-platform-server/src/main/java/com/abi/qms/platform/controller/console/FactoryController.java

@@ -121,9 +121,9 @@ public class FactoryController {
 
     @ApiOperation("供应商包材厂是否加密")
     @PostMapping("isEncryption")
-    public BaseResponse<OutIsEncryptionRes>  isEncryption(@Validated GetIsEncryptionReq getIsEncryptionReq){
+    public BaseResponse<OutIsEncryptionRes>  updateIsEncryption(@Validated GetIsEncryptionReq getIsEncryptionReq){
         //修改是否加密状态
-        OutIsEncryptionRes res=factoryService.getIsEncryption(getIsEncryptionReq);
+        OutIsEncryptionRes res=factoryService.updateIsEncryption(getIsEncryptionReq);
         //包装出参
         return BaseResponse.create(res);
     }

+ 3 - 0
abi-cloud-qr-platform-server/src/main/java/com/abi/qms/platform/dto/res/GetFactoryDetailRes.java

@@ -72,4 +72,7 @@ public class GetFactoryDetailRes implements Serializable {
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     private LocalDateTime updateTime;
 
+    @ApiModelProperty(value = "是否加密")
+    private Integer isQrCodeEncode;
+
 }

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

@@ -62,6 +62,6 @@ public interface FactoryService {
      * 是否加密
      * @param getIsEncryptionReq
      */
-    OutIsEncryptionRes getIsEncryption(GetIsEncryptionReq getIsEncryptionReq);
+    OutIsEncryptionRes updateIsEncryption(GetIsEncryptionReq getIsEncryptionReq);
 
 }

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

@@ -502,7 +502,7 @@ public class FactoryServiceImpl implements FactoryService {
      * @param getIsEncryptionReq
      */
     @Override
-    public OutIsEncryptionRes getIsEncryption(GetIsEncryptionReq getIsEncryptionReq){
+    public OutIsEncryptionRes updateIsEncryption(GetIsEncryptionReq getIsEncryptionReq){
         //1.查询是否存在
         BaseFactory factory = baseFactoryMapper.selectById(getIsEncryptionReq.getId());
         AssertUtil.isNull(factory, "供应商不存在");

+ 3 - 7
abi-cloud-qr-platform-server/src/main/java/com/abi/qms/platform/service/impl/MaterialServiceImpl.java

@@ -144,11 +144,9 @@ public class MaterialServiceImpl implements MaterialService {
         //1-查询物料对象
         BaseMaterial material = baseMaterialMapper.selectById(req.getId());
         AssertUtil.isNull(material, "物料不存在");
-
         //转化出参
-        GetMaterialRes res = PojoConverterUtils.copy(material, GetMaterialRes.class);
+        return PojoConverterUtils.copy(material, GetMaterialRes.class);
 
-        return res;
     }
 
     /**
@@ -158,17 +156,15 @@ public class MaterialServiceImpl implements MaterialService {
     @Transactional(rollbackFor = Exception.class)
     public void enableMaterial(EnableMaterialReq req) {
         List<Long> ids = req.getIds();
-
         //循环启用
+        // fixme 这里使用批量操作
         for (Long id : ids) {
             //1-查询活动对象
             BaseMaterial material = baseMaterialMapper.selectById(id);
             AssertUtil.isNull(material, "物料不存在");
-
             if (!ValidEnum.NOT_VALID.is(material.getValid())) {
                 continue;
             }
-
             //2-修改状态
             material.setValid(ValidEnum.VALID.getCode());
             baseMaterialMapper.updateById(material);
@@ -182,7 +178,7 @@ public class MaterialServiceImpl implements MaterialService {
     @Transactional(rollbackFor = Exception.class)
     public void disableMaterial(DisableMaterialReq req) {
         List<Long> ids = req.getIds();
-
+        // fixme 这里使用批量操作
         //循环禁用
         for (Long id : ids) {
             //1-查询活动对象

+ 1 - 1
abi-cloud-qr-platform-server/src/main/resources/dao/mapper/BaseFactoryMapper.xml

@@ -28,7 +28,7 @@
 
     <!-- 通用查询结果列 -->
     <sql id="Base_Column_List">
-        id, factory_code, factory_name, factory_type, is_first_factory, province, city, district, address, keyman_name, keyman_mobile, email, max_file_count, description, is_qr_code_encode, create_time, create_by, update_time, is_delete,update_by
+        id, factory_code, factory_name, factory_type, is_first_factory, province, city, district, address, keyman_name, keyman_mobile, email, max_file_count, description, is_qr_code_encode, create_time, create_by, update_time, is_delete,update_by,is_qr_code_encode
     </sql>
 
 </mapper>