Bladeren bron

审批意见

qianxb 1 jaar geleden
bovenliggende
commit
28f20be5d9

+ 3 - 1
blade-service-api/blade-meter-api/src/main/java/org/springblade/meter/dto/TaskApproveDTO.java

@@ -2,6 +2,7 @@ package org.springblade.meter.dto;
 
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
+import org.springblade.meter.entity.MeterApproveOpinion;
 
 import java.io.Serializable;
 import java.util.Map;
@@ -21,5 +22,6 @@ public class TaskApproveDTO implements Serializable {
     @ApiModelProperty(value = "表单数据")
     private Map<String,Object> tableData;
 
-
+    @ApiModelProperty(value = "意见信息")
+    private MeterApproveOpinion meterApproveOpinion;
 }

+ 0 - 1
blade-service-api/blade-meter-api/src/main/java/org/springblade/meter/entity/ContractMaterialAdjust.java

@@ -99,7 +99,6 @@ public class ContractMaterialAdjust extends BaseEntity {
     private BigDecimal rangePriceRatio;
 
     @ApiModelProperty(value = "材料数量")
-    @NotNull(message = "请填写材料数量!")
     private BigDecimal materialTotal;
 
     @ApiModelProperty(value = "调差数量")

+ 81 - 0
blade-service-api/blade-meter-api/src/main/java/org/springblade/meter/entity/MeterApproveOpinion.java

@@ -0,0 +1,81 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.meter.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.springblade.core.mp.base.BaseEntity;
+
+import java.math.BigDecimal;
+import java.time.LocalDate;
+
+/**
+ * 开工预付款计量单实体类
+ *
+ * @author BladeX
+ * @since 2023-11-29
+ */
+@Data
+@TableName("s_meter_approve_opinion")
+@EqualsAndHashCode(callSuper = true)
+public class MeterApproveOpinion extends BaseEntity {
+
+    private static final long serialVersionUID = 1L;
+
+
+    @ApiModelProperty(value = "项目id")
+    private Long projectId;
+
+    @ApiModelProperty(value = "合同段id")
+    private Long contractId;
+
+    @ApiModelProperty(value = "任务id")
+    private Long taskId;
+
+    @ApiModelProperty(value = "总监理工程师意见")
+    private String chiefSupervisor;
+
+    @ApiModelProperty(value = "监理审核意见")
+    private String supervisorAudit;
+
+    @ApiModelProperty(value = "工程建设部意见")
+    private String projectBuild;
+
+    @ApiModelProperty(value = "工程建设部分管领导意见")
+    private String projectBuildLeader;
+
+    @ApiModelProperty(value = "安全管理部意见")
+    private String safetyManager;
+
+    @ApiModelProperty(value = "安全管理部分管领导意见")
+    private String safetyManagerLeader;
+
+    @ApiModelProperty(value = "合同部意见")
+    private String contractDept;
+
+    @ApiModelProperty(value = "合同部分管领导意见")
+    private String contractDeptLeader;
+
+    @ApiModelProperty(value = "总经理意见")
+    private String generalManager;
+
+    @ApiModelProperty(value = "董事长意见")
+    private String chiefExecutive;
+
+}

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

@@ -96,4 +96,7 @@ public class StartPayMeterForm extends BaseEntity {
 
     @ApiModelProperty(value = "附件名称")
     private String fileNames;
+
+    @ApiModelProperty(value = "计算式")
+    private String calculateFormula;
 }

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

@@ -84,4 +84,7 @@ public class StartPayMeterFormTask extends BaseEntity {
     @ApiModelProperty(value = "附件名称")
     private String fileNames;
 
+    @ApiModelProperty(value = "计算式")
+    private String calculateFormula;
+
 }

+ 4 - 0
blade-service-api/blade-meter-api/src/main/java/org/springblade/meter/vo/TaskDetailVO.java

@@ -3,6 +3,7 @@ package org.springblade.meter.vo;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 import org.springblade.meter.entity.AttachmentFormTask;
+import org.springblade.meter.entity.MeterApproveOpinion;
 
 import java.io.Serializable;
 import java.math.BigDecimal;
@@ -45,4 +46,7 @@ public class TaskDetailVO implements Serializable {
 
     @ApiModelProperty(value = "类型0中间计量1材料开工")
     private Integer type;
+
+    @ApiModelProperty(value = "意见信息")
+    private MeterApproveOpinion meterApproveOpinion;
 }

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

@@ -101,7 +101,7 @@ public class ContractMaterialAdjustController extends BladeController {
     @PostMapping("/material-adjust-calculate")
     @ApiOperationSupport(order = 8)
     @ApiOperation(value = "材料明细-计算调差数量与金额", notes = "传入传入市场价,基准价,价差幅度,材料明细集合,返回调差数量,调差金额,调差计算式")
-    public R<ContractMaterialAdjust> materialAdjustCalculate(@Valid @RequestBody ContractMaterialAdjustAddDTO dto) {
+    public R<ContractMaterialAdjust> materialAdjustCalculate(@RequestBody ContractMaterialAdjustAddDTO dto) {
         ContractMaterialAdjust adjust = adjustService.MaterialAdjustCalculateDTO(dto);
         return R.data(adjust);
     }

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

@@ -136,6 +136,7 @@ public class TaskController extends BladeController {
     private final StartPayMeterFormTaskMapper startPayMeterFormTaskMapper;
     private final MeterPeriodMapper meterPeriodMapper;
     private final ITaskRepealMessageService repealMessageService;
+    private final MeterApproveOpinionMapper opinionMapper;
 
     private final WbsTreePrivateClient wbsTreePrivateClient;
     private final ExcelTabClient excelTabClient;
@@ -1353,9 +1354,21 @@ public class TaskController extends BladeController {
                 }
                 vo.setTaskProcessInfo(taskProcessInfo);
             }
-            /*中间计量申请,开工预付款,材料,返回值增加:上报总金额,本期进度款,审计意见*/
+            /*中间计量申请,开工预付款,材料,返回值增加:上报总金额,本期进度款,审计意见,意见信息*/
             /* 再增加报表id,报表类型*/
             if (task.getMeterTaskType() != null && Arrays.asList(1,2,3).contains(task.getMeterTaskType())){
+                //查看意见信息
+                MeterApproveOpinion opinion = opinionMapper.selectOne(new LambdaQueryWrapper<MeterApproveOpinion>()
+                        .eq(MeterApproveOpinion::getTaskId, task.getId()));
+                if (opinion == null){
+                    opinion = new MeterApproveOpinion();
+                    opinion.setId(SnowFlakeUtil.getId());
+                    opinion.setTaskId(task.getId());
+                    opinion.setProjectId(Long.valueOf(task.getProjectId()));
+                    opinion.setContractId(Long.valueOf(task.getContractId()));
+                    opinionMapper.insert(opinion);
+                }
+                vo.setMeterApproveOpinion(opinion);
                 BigDecimal reportAllMoney = null;
                 //实时查询上报总金额
                 if (task.getMeterTaskType() == 1) {
@@ -2523,6 +2536,24 @@ public class TaskController extends BladeController {
             String sql_2 = "SELECT * FROM u_task_parallel WHERE process_instance_id = ? ORDER BY sort";
             List<TaskParallel> taskParallels = jdbcTemplate.query(sql_2, new Object[]{task.getProcessInstanceId()}, new BeanPropertyRowMapper<>(TaskParallel.class));
 
+            //单独保存意见单
+            if (task.getMeterTaskType() != null &&  Arrays.asList(1,2,3).contains(task.getMeterTaskType())) {
+                MeterApproveOpinion opinion = dto.getMeterApproveOpinion();
+                if (opinion != null) {
+                    if (StringUtils.isBlank(opinion.getChiefExecutive()))opinion.setChiefExecutive(null);
+                    if (StringUtils.isBlank(opinion.getContractDept()))opinion.setContractDept(null);
+                    if (StringUtils.isBlank(opinion.getProjectBuild()))opinion.setProjectBuild(null);
+                    if (StringUtils.isBlank(opinion.getGeneralManager()))opinion.setGeneralManager(null);
+                    if (StringUtils.isBlank(opinion.getChiefSupervisor()))opinion.setChiefSupervisor(null);
+                    if (StringUtils.isBlank(opinion.getSafetyManager()))opinion.setSafetyManager(null);
+                    if (StringUtils.isBlank(opinion.getContractDeptLeader()))opinion.setContractDeptLeader(null);
+                    if (StringUtils.isBlank(opinion.getProjectBuildLeader()))opinion.setProjectBuildLeader(null);
+                    if (StringUtils.isBlank(opinion.getSafetyManagerLeader()))opinion.setSafetyManagerLeader(null);
+                    if (StringUtils.isBlank(opinion.getSupervisorAudit()))opinion.setSupervisorAudit(null);
+                    opinionMapper.updateById(opinion);
+                }
+            }
+
             //如果要生成审计意见单
             //如果当前是中间计量,材料计量,开工计量,并且是审计流程,则保存表单数据,若所有审计流程-所有人都已审批则生成PDF,并且设置task对应值
             if (task.getIsBuildAudit() == 1) {

+ 36 - 0
blade-service/blade-meter/src/main/java/org/springblade/meter/mapper/MeterApproveOpinionMapper.java

@@ -0,0 +1,36 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.meter.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Param;
+import org.springblade.meter.entity.AttachmentForm;
+import org.springblade.meter.entity.MeterApproveOpinion;
+
+import java.util.List;
+import java.util.Set;
+
+/**
+ * 附件表 Mapper 接口
+ *
+ * @author BladeX
+ * @since 2023-11-29
+ */
+public interface MeterApproveOpinionMapper extends BaseMapper<MeterApproveOpinion> {
+
+
+}

+ 5 - 0
blade-service/blade-meter/src/main/java/org/springblade/meter/mapper/MeterApproveOpinionMapper.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.springblade.meter.mapper.MeterApproveOpinionMapper">
+
+</mapper>