Procházet zdrojové kódy

评估功能调整

wangqiang před 2 roky
rodič
revize
50bdae7358
12 změnil soubory, kde provedl 154 přidání a 28 odebrání
  1. 5 3
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/materialManagement/wareHouse/mapper/xml/WareHouseBasicMapper.xml
  2. 5 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/materialManagement/wareHouse/service/dto/WareHouseDto.java
  3. 6 1
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/program/configuration/projectList/domain/ProgramArchive.java
  4. 7 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/program/configuration/projectList/domain/ProgramProjectListInfo.java
  5. 6 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/program/configuration/projectList/mapper/ProgramReportNoMapper.java
  6. 1 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/program/configuration/projectList/mapper/xml/ProgramArchiveMapper.xml
  7. 4 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/program/configuration/projectList/mapper/xml/ProgramReportNoMapper.xml
  8. 4 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/program/configuration/projectList/mapper/xml/ProjectListMapper.xml
  9. 67 2
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/program/configuration/projectList/service/ProjectListService.java
  10. 33 21
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/program/configuration/projectList/service/dto/ExportFileDto.java
  11. 6 1
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/program/configuration/projectList/service/dto/ProgramArchiveDto.java
  12. 10 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/program/configuration/projectList/service/dto/ProjectListDto.java

+ 5 - 3
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/materialManagement/wareHouse/mapper/xml/WareHouseBasicMapper.xml

@@ -30,19 +30,21 @@
 			a.create_by,
 			a.create_date,
 			c.ware_house_number,
-			b.ware_house_type,
-			b.trade_name,
+			a.ware_house_type,
+			a.trade_name,
 			a.trade_number,
 			b.company,
 			c.ware_house_date,
 			so.name as wareHouseManOfficeName,
-			sy.name as wareHouseManName
+			sy.name as wareHouseManName,
+			d.name as wareHouseTypeName
 		FROM
 			material_management_warehouse_summary a
 			left join material_management_warehouse_detailed b on a.detailed_id = b.id and b.del_flag = 0
 			left join sys_user sy on sy.id = b.ware_house_man
 			left join sys_office so on sy.office_id = so.id
 			left join material_management_warehouse_basics c on b.basic_id = c.id and c.del_flag = 0
+			left join cw_reimbursement_type_info d on a.ware_house_type = d.id
 			${ew.customSqlSegment}
 		ORDER BY a.update_date DESC
 	</select>

+ 5 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/materialManagement/wareHouse/service/dto/WareHouseDto.java

@@ -47,6 +47,11 @@ public class WareHouseDto {
     private String wareHouseType;
 
     /**
+     * 入库类型名称
+     */
+    private String wareHouseTypeName;
+
+    /**
      * 商品名称
      */
     private String tradeName;

+ 6 - 1
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/program/configuration/projectList/domain/ProgramArchive.java

@@ -76,6 +76,11 @@ public class ProgramArchive extends BaseEntity {
     private String reportCharges;
 
     /**
+     * 租金类型
+     */
+    private String rentType;
+
+    /**
      * 当前处理人
      */
     private String currentDisposePerson;
@@ -176,4 +181,4 @@ public class ProgramArchive extends BaseEntity {
     private String signatureEvaluatorSecond;
 
     private static final long serialVersionUID = 1L;
-}
+}

+ 7 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/program/configuration/projectList/domain/ProgramProjectListInfo.java

@@ -172,6 +172,13 @@ public class ProgramProjectListInfo {
 
     private String assessmentObject;
 
+    private String assessmentRange;
+
+    /**
+     * 是否生成报告号
+     */
+    private String generateReportNumber;
+
     @DateTimeFormat(pattern = "yyyy-MM-dd")
     @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
     private Date workBeginDate;

+ 6 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/program/configuration/projectList/mapper/ProgramReportNoMapper.java

@@ -10,6 +10,12 @@ import org.apache.ibatis.annotations.Mapper;
 @Mapper
 public interface ProgramReportNoMapper extends BaseMapper<ProgramReportNo> {
 
+    /**
+     * 根据项目id查报告号信息
+     * @param id
+     * @return
+     */
+    ProgramReportNo selectByProgramId(String id);
 }
 
 

+ 1 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/program/configuration/projectList/mapper/xml/ProgramArchiveMapper.xml

@@ -66,6 +66,7 @@
         pa.rent_evaluation,
         pa.forensics,
         pa.report_charges,
+        pa.rent_type,
         pa.current_dispose_person,
         pa.is_invoice,
         pa.invoice_date,

+ 4 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/program/configuration/projectList/mapper/xml/ProgramReportNoMapper.xml

@@ -27,4 +27,8 @@
         prn.program_id,
         prn.report_no
     </sql>
+    <select id="selectByProgramId"
+            resultType="com.jeeplus.test.program.configuration.projectList.domain.ProgramReportNo">
+        select * from program_report_no where program_id = #{id} and del_flag = 0
+    </select>
 </mapper>

+ 4 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/program/configuration/projectList/mapper/xml/ProjectListMapper.xml

@@ -199,6 +199,7 @@
            a.project_development,
            a.delegate_project_type,
            a.assessment_object,
+           a.assessment_range,
            a.work_begin_date,
            a.work_end_date,
            a.reporting_date,
@@ -297,6 +298,7 @@
            a.status,
            a.proc_ins_id,
            a.process_definition_id,
+           a.generate_report_number,
            prn.report_no,
            pa1.status as status1,
            pa1.id as auditId1,
@@ -336,6 +338,8 @@
                 d.`name` AS client_name,
                 a.`name`,
                 a.assessment_objective,
+                a.assessment_object,
+                a.assessment_range,
                 a.project_mould as program_type,
                 DATE_FORMAT(a.assessment_date,'%Y-%m-%d') AS assessment_date,
                 DATE_FORMAT(b.evaluation_report_date, '%Y-%m-%d') as "evaluation_report_date",

+ 67 - 2
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/program/configuration/projectList/service/ProjectListService.java

@@ -9,6 +9,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.jeeplus.core.query.QueryWrapperGenerator;
+import com.jeeplus.flowable.service.FlowTaskService;
 import com.jeeplus.sys.service.dto.DictValueDTO;
 import com.jeeplus.sys.service.dto.UserDTO;
 import com.jeeplus.sys.utils.DictUtils;
@@ -35,6 +36,7 @@ import com.jeeplus.test.workContract.service.WorkContractService;
 import com.jeeplus.test.workContract.service.dto.WorkAttachmentDto;
 import com.jeeplus.test.workContract.service.dto.WorkContractInfoDto;
 import org.apache.commons.compress.utils.Lists;
+import org.flowable.bpmn.model.FlowNode;
 import org.springframework.beans.BeanUtils;
 import org.springframework.stereotype.Service;
 
@@ -75,6 +77,9 @@ public class ProjectListService {
     @Resource
     private ProofreadIssuedService proofreadIssuedService;
 
+    @Resource
+    private FlowTaskService flowTaskService;
+
     public String save(ProjectListDto dto,String tabType) throws Exception{
         if (StringUtils.isNotEmpty(dto.getId())) {
             return update(dto);
@@ -88,7 +93,21 @@ public class ProjectListService {
         UserDTO userDTO = UserUtils.getCurrentUserDTO();
         // 保存项目管理列表主表信息
         BeanUtils.copyProperties(dto, info);
+        String reportNo = "";
         String id = UUID.randomUUID().toString().replace("-", "");
+        if (dto.getGenerateReportNumber().equals("true")) {
+            if(StringUtils.isNotBlank(info.getReportType())){
+                if (info.getReportType().equals("1")){
+                    reportNo = serialnumTplService.genSerialNum(userDTO.getCompanyDTO().getId(), ProgramReportNoDto.BIZ_CODE);
+                } else if (info.getReportType().equals("2")) {
+                    reportNo = serialnumTplService.genSerialNum(userDTO.getCompanyDTO().getId(), ProgramReportNoDto.BIZ_CODE_);
+                }
+                ProgramReportNo programReportNo = new ProgramReportNo();
+                programReportNo.setProgramId(id);
+                programReportNo.setReportNo(reportNo);
+                programReportNoMapper.insert(programReportNo);
+            }
+        }
         //合同编号生成
         String no = serialnumTplService.genSerialNum(userDTO.getCompanyDTO().getId(), ProjectListDto.BIZ_CODE);
         //项目立项号生成
@@ -187,7 +206,9 @@ public class ProjectListService {
     }
 
     public String saveFormArchive(ProgramArchiveDto programArchiveDto) {
-        ProgramArchive programArchive = ProgramArchiveWrapper.INSTANCE.toEntity(programArchiveDto);
+//        ProgramArchive programArchive = ProgramArchiveWrapper.INSTANCE.toEntity(programArchiveDto);
+        ProgramArchive programArchive = new ProgramArchive();
+        BeanUtils.copyProperties(programArchiveDto, programArchive);
         if (StringUtils.isNotBlank(programArchive.getId())){
             programArchiveMapper.updateById(programArchive);
         }else{
@@ -203,9 +224,35 @@ public class ProjectListService {
         return programArchive.getId();
     }
 
-    public String saveFormThree(ProgramAuditDto programAuditDto) {
+    public String saveFormThree(ProgramAuditDto programAuditDto) throws Exception {
         UserDTO userDTO = UserUtils.getCurrentUserDTO();
         ProgramAudit programAudit = ProgramAuditWrapper.INSTANCE.toEntity(programAuditDto);
+        //生成项目报告号
+        ProgramProjectListInfo projectListInfo = projectListMapper.getById(programAuditDto.getProgramId());
+        String reportNo = "";
+        if (StringUtils.isNotEmpty(programAuditDto.getProcInsId())) {
+            FlowNode currentTask = flowTaskService.getCurrentTask(programAuditDto.getProcInsId());
+            if(null != currentTask && StringUtils.isNotBlank(currentTask.getName())) {
+                if ("项目三级校审".equals(currentTask.getName())) {
+                    if (programAuditDto.getStatus().equals("5")) {
+                        if (projectListInfo.getGenerateReportNumber().equals("false")) {
+                            if(StringUtils.isNotBlank(projectListInfo.getReportType())){
+                                if (projectListInfo.getReportType().equals("1")){
+                                    reportNo = serialnumTplService.genSerialNum(userDTO.getCompanyDTO().getId(), ProgramReportNoDto.BIZ_CODE);
+                                } else if (projectListInfo.getReportType().equals("2")) {
+                                    reportNo = serialnumTplService.genSerialNum(userDTO.getCompanyDTO().getId(), ProgramReportNoDto.BIZ_CODE_);
+                                }
+                                ProgramReportNo programReportNo = new ProgramReportNo();
+                                programReportNo.setProgramId(projectListInfo.getId());
+                                programReportNo.setReportNo(reportNo);
+                                programReportNoMapper.insert(programReportNo);
+                            }
+                        }
+                    }
+                }
+            }
+        }
+
         if (StringUtils.isNotBlank(programAudit.getId())){
             programAuditMapper.updateById(programAudit);
         }else{
@@ -238,6 +285,24 @@ public class ProjectListService {
         info.setUpdateDate(new Date());
         info.setDelFlag(0);
         projectListMapper.updateById(info);
+        String reportNo = "";
+        if (dto.getGenerateReportNumber().equals("true")) {
+            ProgramReportNo programReportNo = programReportNoMapper.selectByProgramId(info.getId());
+            if (null == programReportNo) {
+                if(StringUtils.isNotBlank(info.getReportType())){
+                    if (info.getReportType().equals("1")){
+                        reportNo = serialnumTplService.genSerialNum(userDTO.getCompanyDTO().getId(), ProgramReportNoDto.BIZ_CODE);
+                    } else if (info.getReportType().equals("2")) {
+                        reportNo = serialnumTplService.genSerialNum(userDTO.getCompanyDTO().getId(), ProgramReportNoDto.BIZ_CODE_);
+                    }
+                    programReportNo = new ProgramReportNo();
+                    programReportNo.setProgramId(info.getId());
+                    programReportNo.setReportNo(reportNo);
+                    programReportNoMapper.insert(programReportNo);
+                }
+            }
+
+        }
         // 修改联系人信息(先删除原有数据,再保存)
         projectLinkMapper.deleteByInfoId(dto.getId());
         if (CollectionUtils.isNotEmpty(dto.getLinks())) {

+ 33 - 21
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/program/configuration/projectList/service/dto/ExportFileDto.java

@@ -37,21 +37,33 @@ public class ExportFileDto {
     private String assessmentObjective;
 
     /**
+     * 评估对象(项目表)
+     */
+    @Excel(name = "评估对象", width = 30, orderNum = "6")
+    private String assessmentObject;
+
+    /**
+     * 评估范围(项目表)
+     */
+    @Excel(name = "评估范围", width = 30, orderNum = "7")
+    private String assessmentRange;
+
+    /**
      * 项目类型(归档表)
      */
-    @Excel(name = "项目类型", width = 20, orderNum = "6")
+    @Excel(name = "项目类型", width = 20, orderNum = "8")
     private String programType;
 
     /**
      * 评估基准日(项目表)
      */
-    @Excel(name = "评估基准日", width = 20, orderNum = "7")
+    @Excel(name = "评估基准日", width = 20, orderNum = "9")
     private String assessmentDate;
 
     /**
      * 评估报告日(归档表)
      */
-    @Excel(name = "评估报告日", width = 20, orderNum = "8")
+    @Excel(name = "评估报告日", width = 20, orderNum = "10")
     private String evaluationReportDate;
 
     /**
@@ -63,103 +75,103 @@ public class ExportFileDto {
     /**
      * 合同编号(合同表)
      */
-    @Excel(name = "合同编号", width = 20, orderNum = "9")
+    @Excel(name = "合同编号", width = 20, orderNum = "11")
     private String contractNum;
 
     /**
      * 文号(报告号表)
      */
-    @Excel(name = "文号", width = 20, orderNum = "10")
+    @Excel(name = "文号", width = 20, orderNum = "12")
     private String reportNo;
 
     /**
      * 项目负责人(项目表)
      */
-    @Excel(name = "项目负责人", width = 20, orderNum = "11")
+    @Excel(name = "项目负责人", width = 20, orderNum = "13")
     private String projectManagerName;
 
     /**
      * 签字评估师1(归档表)
      */
-    @Excel(name = "签字评估师1", width = 20, orderNum = "12")
+    @Excel(name = "签字评估师1", width = 20, orderNum = "14")
     private String signatureEvaluatorFirst;
 
     /**
      * 签字评估师2(归档表)
      */
-    @Excel(name = "签字评估师2", width = 20, orderNum = "13")
+    @Excel(name = "签字评估师2", width = 20, orderNum = "15")
     private String signatureEvaluatorSecond;
 
     /**
      * 废旧物资评估(万元)(归档表)
      */
-    @Excel(name = "废旧物资评估(万元)", width = 20, orderNum = "14")
+    @Excel(name = "废旧物资评估(万元)", width = 20, orderNum = "16")
     private String waystEvaluation;
 
     /**
      * 固定资产评估(万元)(归档表)
      */
-    @Excel(name = "固定资产评估(万元)", width = 20, orderNum = "15")
+    @Excel(name = "固定资产评估(万元)", width = 20, orderNum = "17")
     private String fixedAssetsEvaluation;
 
     /**
      * 净资产评估(归档表)
      */
-    @Excel(name = "净资产评估", width = 20, orderNum = "16")
+    @Excel(name = "净资产评估", width = 20, orderNum = "18")
     private String netAssetsEvaluation;
 
     /**
      * 租金评估(万/年)(归档表)
      */
-    @Excel(name = "租金评估(万/年)", width = 20, orderNum = "17")
+    @Excel(name = "租金评估(万/年)", width = 20, orderNum = "19")
     private String rentEvaluation;
 
     /**
      * 其他(归档表)
      */
-    @Excel(name = "其他", width = 20, orderNum = "18")
+    @Excel(name = "其他", width = 20, orderNum = "20")
     private String forensics;
 
     /**
      * 报告收费(元)(归档表)
      */
-    @Excel(name = "报告收费(元)", width = 20, orderNum = "19")
+    @Excel(name = "报告收费(元)", width = 20, orderNum = "21")
     private String reportCharges;
 
     /**
      * 当前处理人(归档表)
      */
-    @Excel(name = "当前处理人", width = 20, orderNum = "20")
+    @Excel(name = "当前处理人", width = 20, orderNum = "22")
     private String currentDisposePerson;
 
     /**
      * 是否开票(归档表)
      */
-    @Excel(name = "是否开票", width = 20, orderNum = "21")
+    @Excel(name = "是否开票", width = 20, orderNum = "23")
     private String isInvoice;
 
     /**
      * 开票日期(归档表)
      */
-    @Excel(name = "开票日期", width = 20, orderNum = "22")
+    @Excel(name = "开票日期", width = 20, orderNum = "24")
     private String invoiceDate;
 
     /**
      * 合同是否存档(归档表)
      */
-    @Excel(name = "合同是否存档", width = 20, orderNum = "23")
+    @Excel(name = "合同是否存档", width = 20, orderNum = "25")
     private String isContractArchive;
 
     /**
      * 底稿是否完好(归档表)
      */
-    @Excel(name = "底稿是否完好", width = 20, orderNum = "24")
-    private String isPapersIntact;
+//    @Excel(name = "底稿是否完好", width = 20, orderNum = "24")
+//    private String isPapersIntact;
 
     /**
      * 底稿是否归档(归档表)
      */
-    @Excel(name = "底稿是否归档", width = 20, orderNum = "25")
+    @Excel(name = "底稿是否归档", width = 20, orderNum = "26")
     private String isPapersArchive;
 
 }

+ 6 - 1
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/program/configuration/projectList/service/dto/ProgramArchiveDto.java

@@ -83,6 +83,11 @@ public class ProgramArchiveDto extends BaseDTO {
     private String reportCharges;
 
     /**
+     * 租金类型
+     */
+    private String rentType;
+
+    /**
      * 当前处理人
      */
     private String currentDisposePerson;
@@ -226,4 +231,4 @@ public class ProgramArchiveDto extends BaseDTO {
     private String signatureEvaluatorSecond;
 
     private static final long serialVersionUID = 1L;
-}
+}

+ 10 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/program/configuration/projectList/service/dto/ProjectListDto.java

@@ -107,6 +107,16 @@ public class ProjectListDto extends BaseEntity {
 
     private String assessmentObject;
 
+    /**
+     * 评估范围
+     */
+    private String assessmentRange;
+
+    /**
+     * 是否生成报告号
+     */
+    private String generateReportNumber;
+
     @DateTimeFormat(pattern = "yyyy-MM-dd")
     @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
     private Date workBeginDate;