Explorar o código

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

yangyj hai 1 ano
pai
achega
413185dc1e
Modificáronse 20 ficheiros con 79 adicións e 8 borrados
  1. 5 0
      blade-service-api/blade-business-api/src/main/java/org/springblade/business/entity/OperationLog.java
  2. 4 0
      blade-service-api/blade-control-api/src/main/java/org/springblade/control/dto/ControlContractInfoDTO.java
  3. 4 0
      blade-service-api/blade-control-api/src/main/java/org/springblade/control/entity/ContractReturnedInfo.java
  4. 2 0
      blade-service-api/blade-meter-api/src/main/java/org/springblade/meter/entity/InventoryFormMeter.java
  5. 3 0
      blade-service-api/blade-meter-api/src/main/java/org/springblade/meter/entity/MeterTreeContract.java
  6. 3 0
      blade-service-api/blade-meter-api/src/main/java/org/springblade/meter/vo/ContractFromVO.java
  7. 8 0
      blade-service/blade-business/src/main/java/org/springblade/business/controller/ArchiveFileController.java
  8. 4 0
      blade-service/blade-business/src/main/java/org/springblade/business/controller/ContractLogController.java
  9. 2 0
      blade-service/blade-business/src/main/java/org/springblade/business/controller/ImageClassificationFileController.java
  10. 13 1
      blade-service/blade-business/src/main/java/org/springblade/business/controller/InformationWriteQueryController.java
  11. 2 0
      blade-service/blade-business/src/main/java/org/springblade/business/feignClient/OperationLogClientImpl.java
  12. 1 1
      blade-service/blade-business/src/main/java/org/springblade/business/mapper/OperationLogMapper.xml
  13. 3 3
      blade-service/blade-control/src/main/java/org/springblade/control/controller/ContractReturnedInfoController.java
  14. 3 0
      blade-service/blade-control/src/main/java/org/springblade/control/service/IContractReturnedInfoService.java
  15. 1 1
      blade-service/blade-control/src/main/java/org/springblade/control/service/impl/ContractInfoServiceImpl.java
  16. 10 1
      blade-service/blade-control/src/main/java/org/springblade/control/service/impl/ContractReturnedInfoServiceImpl.java
  17. 1 0
      blade-service/blade-manager/src/main/java/org/springblade/manager/mapper/WbsTreeContractMapper.xml
  18. 2 0
      blade-service/blade-manager/src/main/java/org/springblade/manager/service/impl/ExcelTabServiceImpl.java
  19. 1 1
      blade-service/blade-meter/src/main/java/org/springblade/meter/mapper/ContractInventoryFormMapper.xml
  20. 7 0
      blade-service/blade-meter/src/main/java/org/springblade/meter/service/impl/InventoryFormMeterServiceImpl.java

+ 5 - 0
blade-service-api/blade-business-api/src/main/java/org/springblade/business/entity/OperationLog.java

@@ -37,6 +37,11 @@ import lombok.EqualsAndHashCode;
 public class OperationLog extends BaseEntity {
 
     private static final long serialVersionUID = 1L;
+    @ApiModelProperty("项目id")
+    private Long projectId;
+    @ApiModelProperty("合同id")
+    private Long contractId;
+    /**
 
     /**
      * 操作类型

+ 4 - 0
blade-service-api/blade-control-api/src/main/java/org/springblade/control/dto/ControlContractInfoDTO.java

@@ -16,6 +16,10 @@ import java.util.List;
 @Data
 @EqualsAndHashCode(callSuper = true)
 public class ControlContractInfoDTO extends ControlContractInfo {
+
+    @ApiModelProperty(value = "合同id")
+    private String contractId;
+
     @ApiModelProperty(value = "搜索值")
     private String queryValue;
 

+ 4 - 0
blade-service-api/blade-control-api/src/main/java/org/springblade/control/entity/ContractReturnedInfo.java

@@ -1,5 +1,7 @@
 package org.springblade.control.entity;
 
+import com.baomidou.mybatisplus.annotation.FieldStrategy;
+import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableName;
 import com.fasterxml.jackson.annotation.JsonFormat;
 import io.swagger.annotations.ApiModel;
@@ -50,9 +52,11 @@ public class ContractReturnedInfo extends BaseEntity {
     @JsonFormat(
             pattern = "yyyy-MM-dd"
     )
+    @TableField(updateStrategy = FieldStrategy.IGNORED)
     @ApiModelProperty(value = "实际回款时间")
     private LocalDate practicalReturnedTime;
 
+    @TableField(updateStrategy = FieldStrategy.IGNORED)
     @ApiModelProperty(value = "实际回款金额")
     private BigDecimal practicalReturnedMoney;
 

+ 2 - 0
blade-service-api/blade-meter-api/src/main/java/org/springblade/meter/entity/InventoryFormMeter.java

@@ -78,5 +78,7 @@ public class InventoryFormMeter extends BaseEntity {
     @ApiModelProperty(value = "变更后施工图金额")
     private BigDecimal changeBuildPictureMoney;
 
+    @ApiModelProperty(value = "最高支付比例")
+    private Integer upPayRatio;
 
 }

+ 3 - 0
blade-service-api/blade-meter-api/src/main/java/org/springblade/meter/entity/MeterTreeContract.java

@@ -92,4 +92,7 @@ public class MeterTreeContract extends BaseEntity {
     @ApiModelProperty(value = "是否锁定节点 0=否 1=是")
     private Integer isLock;
 
+    @ApiModelProperty(value = "最高支付比例")
+    private Integer upPayRatio;
+
 }

+ 3 - 0
blade-service-api/blade-meter-api/src/main/java/org/springblade/meter/vo/ContractFromVO.java

@@ -107,4 +107,7 @@ public class ContractFromVO {
 
     @ApiModelProperty(value = "引用状态,0未引用,1引用,被引用的施工图不允许修改删除")
     private Integer citeStatus;
+
+    @ApiModelProperty(value = "最高支付比例")
+    private Integer upPayRatio;
 }

+ 8 - 0
blade-service/blade-business/src/main/java/org/springblade/business/controller/ArchiveFileController.java

@@ -212,6 +212,8 @@ public class ArchiveFileController extends BladeController {
                         JSONObject json = new JSONObject();
                         json.put("operationObjIds", Func.toStrList(archiveFile.getId().toString()));
                         json.put("operationObjName", archiveFile.getFileName());
+                        json.put("projectId", archiveFile.getProjectId());
+                        json.put("contractId", archiveFile.getContractId());
                         this.operationLogClient.saveUserOperationLog(26, "其它文件", "工程文件", json);
 
                         if (linkList != null && linkList.size() > 0) {
@@ -288,6 +290,8 @@ public class ArchiveFileController extends BladeController {
             JSONObject json = new JSONObject();
             json.put("operationObjIds", Func.toStrList(archiveTaskIds));
             json.put("operationObjName", title);
+            json.put("projectId", startTaskVO.getProjectId());
+            json.put("contractId", startTaskVO.getContractId());
             this.operationLogClient.saveUserOperationLog(25, "其它文件", "工程文件", json);
 
             taskVO.setReportUserId(SecureUtil.getUserId().toString());
@@ -368,6 +372,8 @@ public class ArchiveFileController extends BladeController {
             JSONObject json = new JSONObject();
             json.put("operationObjIds", Func.toStrList(archiveTaskIds));
             json.put("operationObjName", title.substring(0, title.length() - 1));
+            json.put("projectId", startTaskVO.getProjectId());
+            json.put("contractId", startTaskVO.getContractId());
             this.operationLogClient.saveUserOperationLog(25, "其它文件", "工程文件", json);
 
             return R.data(200, aopParamsSet, "操作成功");
@@ -504,6 +510,8 @@ public class ArchiveFileController extends BladeController {
                 JSONObject json = new JSONObject();
                 json.put("operationObjIds", Func.toStrList(ids));
                 json.put("operationObjName", title);
+                json.put("projectId", fileList.get(0).getProjectId());
+                json.put("contractId", fileList.get(0).getContractId());
 
                 this.operationLogClient.saveUserOperationLog(27, "其它文件", "工程文件", json);
 

+ 4 - 0
blade-service/blade-business/src/main/java/org/springblade/business/controller/ContractLogController.java

@@ -450,6 +450,8 @@ public class ContractLogController extends BladeController {
                         JSONObject json = new JSONObject();
                         json.put("operationObjIds", Func.toStrList(task.getFormDataId()));
                         json.put("operationObjName", contractLog.getFileName());
+                        json.put("projectId", task.getProjectId());
+                        json.put("contractId", task.getContractId());
 
                         this.operationLogClient.saveUserOperationLog(9, "台账日志", "日志填报", json);
 
@@ -576,6 +578,8 @@ public class ContractLogController extends BladeController {
                     JSONObject json = new JSONObject();
                     json.put("operationObjIds", Func.toStrList(startTaskVO.getIds()));
                     json.put("operationObjName", title);
+                    json.put("projectId", startTaskVO.getProjectId());
+                    json.put("contractId", startTaskVO.getContractId());
 
                     this.operationLogClient.saveUserOperationLog(8, "台账日志", "日志填报", json);
                 } catch (Exception e) {

+ 2 - 0
blade-service/blade-business/src/main/java/org/springblade/business/controller/ImageClassificationFileController.java

@@ -708,6 +708,8 @@ public class ImageClassificationFileController extends BladeController {
             JSONObject json = new JSONObject();
             json.put("operationObjIds", Func.toStrList(ids));
             json.put("operationObjName", title);
+            json.put("projectId", fileList.get(0).getProjectId());
+            json.put("contractId", fileList.get(0).getContractId());
 
             this.operationLogClient.saveUserOperationLog(31, "其它文件", "影像资料", json);
 

+ 13 - 1
blade-service/blade-business/src/main/java/org/springblade/business/controller/InformationWriteQueryController.java

@@ -1189,9 +1189,11 @@ public class InformationWriteQueryController extends BladeController {
                         JSONObject json = new JSONObject();
                         json.put("operationObjIds", Func.toStrList(task.getFormDataId()));
                         json.put("operationObjName", title);
+                        json.put("projectId", projectId);
+                        json.put("contractId", contractId);
 
                         //保存操作记录
-                        this.operationLogClient.saveUserOperationLog(6, "资料管理", "工序资料", json);
+                        this.operationLogClient.saveUserOperationLog(6, "资料填报", "工序资料", json);
                     } catch (Exception e) {
                         e.printStackTrace();
                     }
@@ -1343,6 +1345,8 @@ public class InformationWriteQueryController extends BladeController {
                     JSONObject json = new JSONObject();
                     json.put("operationObjIds", Func.toStrList(startTaskVO.getIds()));
                     json.put("operationObjName", title);
+                    json.put("projectId", startTaskVO.getProjectId());
+                    json.put("contractId", startTaskVO.getContractId());
 
                     this.operationLogClient.saveUserOperationLog(5, "资料管理", "工序资料", json);
                 } catch (Exception e) {
@@ -2621,6 +2625,8 @@ public class InformationWriteQueryController extends BladeController {
             JSONObject json = new JSONObject();
             json.put("operationObjIds", Func.toStrList(pKeyId.toString()));
             json.put("operationObjName", StringUtils.isNotEmpty(queries.getFullName()) ? queries.getFullName() : queries.getNodeName());
+            json.put("projectId", queries.getProjectId());
+            json.put("contractId", queries.getContractId());
 
             this.operationLogClient.saveUserOperationLog(3, "资料管理", "工序资料", json);
         } catch (Exception e) {
@@ -2758,6 +2764,8 @@ public class InformationWriteQueryController extends BladeController {
         JSONObject json = new JSONObject();
         json.put("operationObjIds", idArray);
         json.put("operationObjName", pathName.substring(1));
+        json.put("projectId", removeNode.getProjectId());
+        json.put("contractId", removeNode.getContractId());
         this.operationLogClient.saveUserOperationLog(4, "资料管理", "工序资料", json);
 
         //保存进回收站
@@ -3194,6 +3202,8 @@ public class InformationWriteQueryController extends BladeController {
                 JSONObject json = new JSONObject();
                 json.put("operationObjIds", JSONArray.parseArray(JSONObject.toJSONString(saveList.stream().map(WbsTreeContract::getPKeyId).distinct().collect(Collectors.toList())), String.class));
                 json.put("operationObjName", pathName.substring(1));
+                json.put("projectId", currentNode.getProjectId());
+                json.put("contractId", currentNode.getContractId());
                 //保存操作记录
                 this.operationLogClient.saveUserOperationLog(operationType, "资料管理", "工序资料", json);
 
@@ -3240,6 +3250,8 @@ public class InformationWriteQueryController extends BladeController {
                 JSONObject json = new JSONObject();
                 json.put("operationObjIds", JSONArray.parseArray(JSONObject.toJSONString(saveList.stream().map(WbsTreeContract::getPKeyId).distinct().collect(Collectors.toList())), String.class));
                 json.put("operationObjName", pathName.substring(1));
+                json.put("projectId", currentNode.getProjectId());
+                json.put("contractId", currentNode.getContractId());
                 //保存操作记录
                 this.operationLogClient.saveUserOperationLog(operationType, "资料管理", "工序资料", json);
 

+ 2 - 0
blade-service/blade-business/src/main/java/org/springblade/business/feignClient/OperationLogClientImpl.java

@@ -39,6 +39,8 @@ public class OperationLogClientImpl implements OperationLogClient {
 
             //新增数据
             OperationLog newData = new OperationLog();
+            newData.setProjectId( json.getLong("projectId"));
+            newData.setContractId( json.getLong("contractId"));
             //操作模块
             newData.setOperationModule(operationModule);
             //操作内容

+ 1 - 1
blade-service/blade-business/src/main/java/org/springblade/business/mapper/OperationLogMapper.xml

@@ -55,7 +55,7 @@
     <select id="getPage" resultType="org.springblade.business.entity.OperationLog">
         select *
         from u_operation_log uol where is_deleted = 0
-        and (SELECT contract_id from m_wbs_tree_contract WHERE p_key_id = SUBSTRING_INDEX(uol.business_id,",",1)) = #{vo.contractId}
+        and uol.project_id = #{vo.projectId} and uol.contract_id = #{vo.contractId}
         <if test="vo.operationModule != null and vo.operationModule != '' ">
              and operation_module = #{vo.operationModule}
         </if>

+ 3 - 3
blade-service/blade-control/src/main/java/org/springblade/control/controller/ContractReturnedInfoController.java

@@ -32,11 +32,11 @@ public class ContractReturnedInfoController {
     private final IContractReturnedInfoService contractReturnedInfoService;
 
     /**
-     * 批量新增或修改回款信息
+     * 合同回款更新,修改时间和金额
      */
     @PostMapping("/saveOrUpdateBatchReturned")
     @ApiOperationSupport(order = 1)
-    @ApiOperation(value = "批量新增或修改回款信息")
+    @ApiOperation(value = "合同回款更新,修改时间和金额")
     @ApiImplicitParams({
             @ApiImplicitParam(name = "id", value = "合同id", required = true),
             @ApiImplicitParam(name = "projectId", value = "项目id", required = true),
@@ -44,7 +44,7 @@ public class ContractReturnedInfoController {
     })
     public R saveOrUpdateBatchReturned(@RequestBody ControlContractInfoDTO dto) {
         contractReturnedInfoService.saveOrUpdateBatchReturned(dto);
-        return R.success("保存成功");
+        return R.success("修改成功");
     }
 
     /**

+ 3 - 0
blade-service/blade-control/src/main/java/org/springblade/control/service/IContractReturnedInfoService.java

@@ -20,8 +20,11 @@ import java.util.List;
  **/
 public interface IContractReturnedInfoService extends BaseService<ContractReturnedInfo> {
 
+    //合同回款更新,修改时间和金额
     void saveOrUpdateBatchReturned(ControlContractInfoDTO dto);
 
+    void saveOrUpdateBatchReturned2(ControlContractInfoDTO dto);
+
     /**
      * 根据合同id获取合同已回款金额
      */

+ 1 - 1
blade-service/blade-control/src/main/java/org/springblade/control/service/impl/ContractInfoServiceImpl.java

@@ -141,7 +141,7 @@ public class ContractInfoServiceImpl extends BaseServiceImpl<ContractInfoMapper,
             jdbcTemplate.execute("update c_control_project_info set start_time = '"+dto.getStartTime() + "', end_time = '"+ dto.getEndTime() +"' where id = "+ dto.getProjectId());
         }
         this.updateById(contractInfo);
-        returnedInfoService.saveOrUpdateBatchReturned(dto);
+        returnedInfoService.saveOrUpdateBatchReturned2(dto);
     }
 
     /**

+ 10 - 1
blade-service/blade-control/src/main/java/org/springblade/control/service/impl/ContractReturnedInfoServiceImpl.java

@@ -34,12 +34,21 @@ public class ContractReturnedInfoServiceImpl extends BaseServiceImpl<ContractRet
 
 
     /**
-     * 批量新增或保存合同回款信息
+     * 合同回款更新,修改时间和金额
      * @param dto
      */
     @Override
     @Transactional
     public void saveOrUpdateBatchReturned(ControlContractInfoDTO dto) {
+        //获取所有回款信息
+        List<ContractReturnedInfo> list = dto.getList();
+        this.updateBatchById(list);
+
+    }
+
+    @Override
+    @Transactional
+    public void saveOrUpdateBatchReturned2(ControlContractInfoDTO dto) {
         //删除所有回款信息
         baseMapper.deleteOldInfo(dto.getId());
         List<ContractReturnedInfo> list = dto.getList();

+ 1 - 0
blade-service/blade-manager/src/main/java/org/springblade/manager/mapper/WbsTreeContractMapper.xml

@@ -750,6 +750,7 @@
         from u_operation_log a,
              blade_user b
         where b.tenant_id = '000000' /*只查询后管系统的用户*/
+          and a.contract_id = 1
           and a.operation_account = b.account
           and a.operation_type = 1
           and a.business_id like concat('%', #{sonId}, '%')

+ 2 - 0
blade-service/blade-manager/src/main/java/org/springblade/manager/service/impl/ExcelTabServiceImpl.java

@@ -1164,6 +1164,8 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
                 json.put("operationObjIds", Func.toStrList(pkids));
                 json.put("operationObjName", wbsTreeContractByP.getNodeName() + "节点数据操作");
                 json.put("saveData", saveData.toString());
+                json.put("projectId", wbsTreeContract.getProjectId());
+                json.put("contractId", wbsTreeContract.getContractId());
 
                 //保存操作记录
                 this.operationLogClient.saveUserOperationLog(1, "资料填报", "工序填报页面", json);

+ 1 - 1
blade-service/blade-meter/src/main/java/org/springblade/meter/mapper/ContractInventoryFormMapper.xml

@@ -143,7 +143,7 @@
           and cif.id not in (SELECT contract_form_id from s_inventory_form_meter WHERE contract_id = #{contractId} and contract_meter_id = #{meterId} and is_deleted = 0)
     </select>
     <select id="getNodeResolveForm" resultType="org.springblade.meter.vo.ContractFromVO">
-        select ifm.id, ifm.contract_form_id ,cif.form_number,cif.form_name,cif.current_price,cif.contract_total,cif.change_total,cif.is_supplement,
+        select ifm.id, ifm.contract_form_id ,cif.form_number,cif.form_name,cif.current_price,cif.contract_total,cif.change_total,cif.is_supplement,ifm.up_pay_ratio as upPayRatio,
                ifm.build_picture_total,ifm.change_build_picture_total,ifm.build_picture_money,ifm.change_build_picture_money,
 
                if(ifm.build_picture_total=ifm.change_build_picture_total,if((select count(1) from s_inventory_form_apply

+ 7 - 0
blade-service/blade-meter/src/main/java/org/springblade/meter/service/impl/InventoryFormMeterServiceImpl.java

@@ -65,6 +65,11 @@ public class InventoryFormMeterServiceImpl extends BaseServiceImpl<InventoryForm
     @Override
     public R inventoryFormMeterService(String meterId, String formIds) {
         List<Long> longList = Func.toLongList(formIds);
+        //查询节点最大支付比例
+        MeterTreeContract meter = meterTreeContractService.getById(meterId);
+        if (meter == null){
+            throw new ServiceException("未找到当前合同计量节点");
+        }
         for(Long forid:longList){
             InventoryFormMeter inventoryFormMeter = baseMapper.selectOne(Wrappers.<InventoryFormMeter>query().lambda()
                     .eq(InventoryFormMeter::getContractMeterId, meterId)
@@ -80,6 +85,7 @@ public class InventoryFormMeterServiceImpl extends BaseServiceImpl<InventoryForm
                 data.setChangeBuildPictureTotal(BigDecimal.ZERO);
                 data.setBuildPictureMoney(BigDecimal.ZERO);
                 data.setChangeBuildPictureMoney(BigDecimal.ZERO);
+                data.setUpPayRatio(meter.getUpPayRatio());
                 baseMapper.insert(data);
             }
         }
@@ -112,6 +118,7 @@ public class InventoryFormMeterServiceImpl extends BaseServiceImpl<InventoryForm
                        .set(InventoryFormMeter::getChangeBuildPictureTotal,vo.getChangeBuildPictureTotal())
                        .set(InventoryFormMeter::getBuildPictureMoney,vo.getBuildPictureMoney())
                        .set(InventoryFormMeter::getChangeBuildPictureMoney,vo.getChangeBuildPictureMoney())
+                       .set(InventoryFormMeter::getUpPayRatio,vo.getUpPayRatio())
                );
             }
         }