Преглед изворни кода

Merge remote-tracking branch 'origin/master' into master

yangyj пре 1 година
родитељ
комит
c018803931

+ 1 - 1
blade-service/blade-archive/src/main/java/org/springblade/archive/controller/ArchivesAutoController.java

@@ -454,7 +454,7 @@ public class ArchivesAutoController extends BladeController {
 			ContractInfo contract = contractClient.getContractById(contractId);
 
 			Integer isArchivesAuto = contract.getIsArchivesAuto();
-			if(isArchivesAuto!=-1 && isArchivesAuto!=null && isArchivesAuto!=0){
+			if(isArchivesAuto!=null && isArchivesAuto!=-1  && isArchivesAuto!=0){
 				return R.fail("当前合同段已经在自动组卷中,请耐心等待");
 			}
 			log.info("开始自动组卷....");

+ 13 - 0
blade-service/blade-archive/src/main/java/org/springblade/archive/service/impl/ArchiveAutoPdfServiceImpl.java

@@ -534,6 +534,19 @@ public class ArchiveAutoPdfServiceImpl implements IArchiveAutoPdfService {
             }
 
         }
+
+        if ("Archive['storageTime']".equals(formula)){
+            if (object!= null ) {
+                String strObject = object.toString();
+                if (strObject.contains("null")) {
+                    strObject = strObject.replace("null", "");
+                    object =  strObject;
+                }
+            }else {
+                object = "";
+            }
+        }
+
         dataInfo.put(key, object);
     }
 

+ 3 - 3
blade-service/blade-archive/src/main/java/org/springblade/archive/service/impl/ArchivesAutoServiceImpl.java

@@ -1022,8 +1022,8 @@ public class ArchivesAutoServiceImpl extends BaseServiceImpl<ArchivesAutoMapper,
 				for (ContractInfo c : contracts) {
 					if (c.getContractType() == 3) {
 						Integer storagePeriod = c.getStoragePeriod();
-						if (storagePeriod == null) {
-							storageTime = "30";
+						if (storagePeriod == null || storagePeriod == -1) {
+							storageTime = "2";
 						} else {
 							storageTime = storagePeriod.toString();
 						}
@@ -1053,7 +1053,7 @@ public class ArchivesAutoServiceImpl extends BaseServiceImpl<ArchivesAutoMapper,
 				}
 				for (ContractInfo c : contracts) {
 					if (c.getContractType() == 3) {
-						if (c.getSecurityLevel() == null) {
+						if (c.getSecurityLevel() == null || c.getSecurityLevel() == -1) {
 							secretLevel = "4";
 						} else {
 							secretLevel = c.getSecurityLevel().toString();

+ 1 - 1
blade-service/blade-meter/src/main/java/org/springblade/meter/controller/ContractInventoryFormController.java

@@ -175,7 +175,7 @@ public class ContractInventoryFormController extends BladeController {
 	@ApiOperationSupport(order = 8)
 	@ApiOperation(value = "获取导入模板", notes = "返回导入模板URL")
 	public R<String> getImportTemplate() {
-		return R.data("https://bladex-chongqing-info.oss-cn-hangzhou.aliyuncs.com//upload/20231201/853cebb7e9c89c982dd15f842fed42a3.xls");
+		return R.data("https://blade-oss-chongqing.oss-cn-shenzhen.aliyuncs.com//upload/20240401/b5d3d7780a343641c0cc414dee7991f8.xls");
 	}
 
 

+ 2 - 2
blade-service/blade-meter/src/main/java/org/springblade/meter/mapper/MiddleMeterApplyMapper.xml

@@ -87,7 +87,7 @@
                CASE when approve_status = 0 then '未上报' when approve_status = 1 then '待审批' when approve_status = 2 then '已审批'
                     else '已废除' end as approveStatusName,
                (select period_number from s_contract_meter_period cmp where cmp.id = mma.contract_period_id) as periodNumber,
-               (SELECT raw_url from s_interim_pay_certificate where contract_id=#{apply.contractId} and contract_period_id=#{apply.contractPeriodId} ) as periodPdfUrl
+               (SELECT raw_url from s_interim_pay_certificate where contract_id=#{apply.contractId} and contract_period_id=#{apply.contractPeriodId} and is_deleted=0) as periodPdfUrl
         FROM s_middle_meter_apply mma
         WHERE contract_id = #{apply.contractId} and is_deleted = 0
         <if test="apply.contractPeriodId != -1">
@@ -104,7 +104,7 @@
                CASE when approve_status = 0 then '未上报' when approve_status = 1 then '待审批' when approve_status = 2 then '已审批'
                     else '已废除' end as approveStatusName,
                (select period_number from s_contract_meter_period cmp where cmp.id = mma.contract_period_id) as periodNumber,
-               (SELECT raw_url from s_interim_pay_certificate where contract_id=#{apply.contractId} and contract_period_id=mma.contract_period_id ) as periodPdfUrl
+               (SELECT raw_url from s_interim_pay_certificate where contract_id=#{apply.contractId} and contract_period_id=mma.contract_period_id and is_deleted=0) as periodPdfUrl
         FROM s_middle_meter_apply mma
         WHERE contract_id = #{apply.contractId} and is_deleted = 0
         <if test="apply.contractPeriodId != -1">

+ 2 - 2
blade-service/blade-meter/src/main/java/org/springblade/meter/service/impl/ContractInventoryFormServiceImpl.java

@@ -74,8 +74,8 @@ public class ContractInventoryFormServiceImpl extends BaseServiceImpl<ContractIn
         Integer nodes = 0;
         Integer endTotal = 0;
         try {
-            if (!"xls,xlsx".contains(fileSuffix)){
-                throw new ServiceException("请传入excel文件");
+            if (!"xlsx".contains(fileSuffix)){
+                throw new ServiceException("请传入excel文件,或者先转换为xlsx");
             }
             List<ContractInventoryForm> excels = ExcelUtil.read(file, ContractInventoryForm.class);
             excels = excels.stream()

+ 18 - 18
blade-service/blade-meter/src/main/java/org/springblade/meter/service/impl/MeterTreeContractServiceImpl.java

@@ -1560,12 +1560,12 @@ public class MeterTreeContractServiceImpl extends BaseServiceImpl<MeterTreeContr
             }
         }
         //修改合同工程清单的变更后数量
-        if (InventoryFormListUpdate.size() > 0) {
-            Map<String, BigDecimal> map = InventoryFormListUpdate.stream()
-                    .collect(Collectors.groupingBy(l -> l.getFormNumber(),
-                            Collectors.mapping(ContractInventoryForm::getChangeTotal, Collectors.reducing(BigDecimal.ZERO, BigDecimal::add))));
-            baseMapper.batchUpdateFormByNumber(meterTreeContract.getContractId(), map);
-        }
+//        if (InventoryFormListUpdate.size() > 0) {
+//            Map<String, BigDecimal> map = InventoryFormListUpdate.stream()
+//                    .collect(Collectors.groupingBy(l -> l.getFormNumber(),
+//                            Collectors.mapping(ContractInventoryForm::getChangeTotal, Collectors.reducing(BigDecimal.ZERO, BigDecimal::add))));
+//            baseMapper.batchUpdateFormByNumber(meterTreeContract.getContractId(), map);
+//        }
         return R.success("成功导入:节点("+addNode+")个,"+"新增清单("+addForm+")条,"+"修改清单("+updateForm+")条.");
     }
 
@@ -1785,12 +1785,12 @@ public class MeterTreeContractServiceImpl extends BaseServiceImpl<MeterTreeContr
             this.asyncCalculateNodeMoney2(updateNodeSet);
         }
         //修改合同工程清单的变更后数量
-        if (InventoryFormListUpdate.size() > 0) {
-            Map<String, BigDecimal> map = InventoryFormListUpdate.stream()
-                    .collect(Collectors.groupingBy(l -> l.getFormNumber(),
-                            Collectors.mapping(ContractInventoryForm::getChangeTotal, Collectors.reducing(BigDecimal.ZERO, BigDecimal::add))));
-            baseMapper.batchUpdateFormByNumber(meterTreeContract.getContractId(), map);
-        }
+//        if (InventoryFormListUpdate.size() > 0) {
+//            Map<String, BigDecimal> map = InventoryFormListUpdate.stream()
+//                    .collect(Collectors.groupingBy(l -> l.getFormNumber(),
+//                            Collectors.mapping(ContractInventoryForm::getChangeTotal, Collectors.reducing(BigDecimal.ZERO, BigDecimal::add))));
+//            baseMapper.batchUpdateFormByNumber(meterTreeContract.getContractId(), map);
+//        }
         //修改图号或者备注
         if (resultNodeListUpdate.size() > 0){
             List<List<MeterTreeContract>> lists = CommonUtil.splitList(resultNodeListUpdate, 1000);
@@ -2144,12 +2144,12 @@ public class MeterTreeContractServiceImpl extends BaseServiceImpl<MeterTreeContr
             }
 
             //修改合同工程清单的变更后数量
-            if (InventoryFormListUpdate.size() > 0) {
-                Map<String, BigDecimal> map = InventoryFormListUpdate.stream()
-                        .collect(Collectors.groupingBy(l -> l.getFormNumber(),
-                                Collectors.mapping(ContractInventoryForm::getChangeTotal, Collectors.reducing(BigDecimal.ZERO, BigDecimal::add))));
-                baseMapper.batchUpdateFormByNumber(meterTreeContract.getContractId(), map);
-            }
+//            if (InventoryFormListUpdate.size() > 0) {
+//                Map<String, BigDecimal> map = InventoryFormListUpdate.stream()
+//                        .collect(Collectors.groupingBy(l -> l.getFormNumber(),
+//                                Collectors.mapping(ContractInventoryForm::getChangeTotal, Collectors.reducing(BigDecimal.ZERO, BigDecimal::add))));
+//                baseMapper.batchUpdateFormByNumber(meterTreeContract.getContractId(), map);
+//            }
 
             //修改节点金额放最后,等中间表数据保存完成之后,再去统计
             if (updateNodeSet.size() > 0){