瀏覽代碼

报告签发

sangwenwei 1 年之前
父節點
當前提交
20dbfff033

+ 5 - 0
jeeplus-api/jeeplus-public-modules-api/src/main/java/com/jeeplus/sys/domain/WorkAttachmentInfo.java

@@ -82,6 +82,11 @@ public class WorkAttachmentInfo extends BaseEntity {
     private String description;
 
     /**
+     * 嘉溢项目外审附件类型
+     */
+    private String jyFileType;
+
+    /**
      * 附件临时地址
      *该属性不是实体字段
      */

+ 4 - 0
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/project/domain/JyProject.java

@@ -264,6 +264,10 @@ public class JyProject extends BaseEntity implements Serializable {
     @TableField(exist = false)
     private String auditOffice;
 
+    /**
+     * 用印id
+     */
+    private String sealId;
 
 
 

+ 2 - 0
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/project/mapper/JyProjectMapper.java

@@ -40,4 +40,6 @@ public interface JyProjectMapper extends BaseMapper<JyProject> {
     IPage<JyProject> getByCreate(@Param("id")String id, Page<JyProject> page, @Param(Constants.WRAPPER)QueryWrapper<JyProject> wrapper);
 
     JyProject getByName(@Param("s")String s);
+
+    void updateReportIssuanceById(@Param("id") String s, @Param("projectIssuance") String status);
 }

+ 7 - 2
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/project/mapper/xml/ProjectListMapper.xml

@@ -663,7 +663,7 @@
            a.project_overview,
            a.special,
            a.contract_project_no,
-           c.name as projectLeader,
+           (SELECT su.name from sys_user su where a.project_leader = su.id) as projectLeader,
            a.proc_ins_id,
            a.process_definition_id,
            b.name AS create_by_id
@@ -671,8 +671,9 @@
             jy_project_record a
             LEFT JOIN sys_user b ON a.create_by_id = b.id
             LEFT JOIN sys_user c ON a.project_leader = c.id
+            left join jy_project_audit pa on a.id=pa.project_id and pa.audit_level = '3'
              ${ew.customSqlSegment}
-        and a.create_by_id = #{id}
+            ORDER BY a.update_time DESC
     </select>
     <select id="getByName" resultType="com.jeeplus.business.project.domain.JyProject">
         SELECT
@@ -713,6 +714,10 @@
         where a.name = #{s} ORDER BY a.update_time DESC
     </select>
 
+    <update id="updateReportIssuanceById">
+        UPDATE jy_project_record SET `report_issuance` = #{projectIssuance} WHERE id = #{id}
+    </update>
+
 
 
 

+ 79 - 37
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/project/service/JyProjectService.java

@@ -23,6 +23,9 @@ import com.jeeplus.business.project.mapper.JyProjectMemberMapper;
 import com.jeeplus.business.project.service.dto.JyProjectAuditDTO;
 import com.jeeplus.business.project.service.dto.JyProjectDTO;
 import com.jeeplus.business.project.service.mapstruct.JyProjectAuditWrapper;
+import com.jeeplus.business.useSeal.domain.Signet;
+import com.jeeplus.business.useSeal.mapper.SignetMapper;
+import com.jeeplus.business.useSeal.service.SignetService;
 import com.jeeplus.business.workClientInfo.domain.JyWorkClientLinkman;
 import com.jeeplus.business.workClientInfo.mapper.JyWorkClientInfoMapper;
 import com.jeeplus.business.workClientInfo.mapper.JyWorkClientLinkmanMapper;
@@ -87,6 +90,9 @@ public class JyProjectService {
     @Resource
     private WorkContractInfoMapper workContractInfoMapper;
 
+    @Autowired
+    private SignetMapper signetMapper;
+
 
     /**
      * 项目登记列表
@@ -169,6 +175,20 @@ public class JyProjectService {
                 item.setContractName("暂无合同");
                 item.setPrimaryLinkman(item.getClientName());
             }
+            //获取用印id
+            List<Signet> signets = signetMapper.selectList(new QueryWrapper<Signet>());
+            for (Signet signet : signets) {
+                if (StringUtils.isNotBlank(signet.getProjectId())){
+                    String[] split = signet.getProjectId().split(",");
+                    for (String s : split) {
+                        if (StringUtils.isNotBlank(s)){
+                            if (s.equals(item.getId())){
+                                item.setSealId(signet.getId());
+                            }
+                        }
+                    }
+                }
+            }
         });
         return pageList;
     }
@@ -530,6 +550,8 @@ public class JyProjectService {
         //获取当前登录人信息
         UserDTO userDTO = SpringUtil.getBean ( IUserApi.class ).getByToken(TokenProvider.getCurrentToken());
         QueryWrapper<JyProject> wrapper = QueryWrapperGenerator.buildQueryCondition(info, JyProject.class);
+        wrapper.eq("a.create_by_id",userDTO.getId());
+        wrapper.eq("pa.status","5");
         //创建时间
         if (info.getCreateDates() != null && info.getCreateDates().length > 0) {
             wrapper.between("a.create_time", info.getCreateDates()[0], info.getCreateDates()[1]);
@@ -711,7 +733,7 @@ public class JyProjectService {
     public Map<String,Object> getAuditInfoMap(JyProject info){
         Map data = new HashMap();
 
-        SimpleDateFormat sdf = new SimpleDateFormat("yyyy年 MM月 dd日");
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyy年MM月dd日");
 
         //查询项目信息
         JyProjectDTO projectDTO = findById(info.getProjectId());
@@ -742,20 +764,12 @@ public class JyProjectService {
         }
         //项目负责人
         if(StringUtils.isBlank(projectDTO.getLeader())){
-            data.put("projectMaster","");
+            data.put("projectLeader","");
         }else{
-            data.put("projectMaster",projectDTO.getLeader());
+            data.put("projectLeader",projectDTO.getLeader());
         }
         //其他参与人员
-        if (ObjectUtil.isNotEmpty(projectDTO.getProjectMembers())){
-            ArrayList<String> strings = new ArrayList<>();
-            for (JyProjectMembers projectMember : projectDTO.getProjectMembers()) {
-                strings.add(projectMember.getName());
-            }
-            data.put("otherPeople",strings);
-        }else {
-            data.put("otherPeople","");
-        }
+            data.put("otherPeople","/");
         //根据项目id获取到所有的校审信息
         List<JyProjectAuditDTO> jyProjectAuditDTOS=jyProjectAuditMapper.getByProjectId(info.getProjectId());
         //如果存在审核意见则进行处理
@@ -763,11 +777,15 @@ public class JyProjectService {
             if (jyProjectAuditDTOS.size()>=1){
                 //审核意见
                 if (StringUtils.isNotBlank(jyProjectAuditDTOS.get(0).getInitialAuditOpinion())){
-                    String[] split = jyProjectAuditDTOS.get(0).getInitialAuditOpinion().split("<br/>");
-                    //将审核意见放入集合中
                     ArrayList<String> strings = new ArrayList<>();
-                    for (String s : split) {
-                        strings.add(s);
+                    if (jyProjectAuditDTOS.get(0).getInitialAuditOpinion().contains("<br/>")){
+                        String[] split = jyProjectAuditDTOS.get(0).getInitialAuditOpinion().split("<br/>");
+                        //将审核意见放入集合中
+                        for (String s : split) {
+                            strings.add(s);
+                        }
+                    }else {
+                        strings.add(jyProjectAuditDTOS.get(0).getInitialAuditOpinion());
                     }
                     data.put("firstAuditList",strings);
                 }else {
@@ -791,10 +809,14 @@ public class JyProjectService {
                 }
                 //修改意见
                 if (StringUtils.isNotBlank(jyProjectAuditDTOS.get(0).getInitialEditOpinion())){
-                    String[] split = jyProjectAuditDTOS.get(0).getInitialEditOpinion().split("<br/>");
                     ArrayList<String> strings = new ArrayList<>();
-                    for (String s : split) {
-                        strings.add(s);
+                    if (jyProjectAuditDTOS.get(0).getInitialEditOpinion().contains("<br/>")){
+                        String[] split = jyProjectAuditDTOS.get(0).getInitialEditOpinion().split("<br/>");
+                        for (String s : split) {
+                            strings.add(s);
+                        }
+                    }else {
+                        strings.add(jyProjectAuditDTOS.get(0).getInitialEditOpinion());
                     }
                     data.put("firstEditList",strings);
                 }else {
@@ -811,14 +833,19 @@ public class JyProjectService {
                 data.put("firstAgreeName","");
                 data.put("firstAgreeDate","");
 
-            } else if (jyProjectAuditDTOS.size()>=2){
+            }
+            if (jyProjectAuditDTOS.size()>=2){
                 //审核意见
                 if (StringUtils.isNotBlank(jyProjectAuditDTOS.get(1).getInitialAuditOpinion())){
-                    String[] split = jyProjectAuditDTOS.get(1).getInitialAuditOpinion().split("<br/>");
-                    //将审核意见放入集合中
                     ArrayList<String> strings = new ArrayList<>();
-                    for (String s : split) {
-                        strings.add(s);
+                    if (jyProjectAuditDTOS.get(1).getInitialAuditOpinion().contains("<br/>")){
+                        String[] split = jyProjectAuditDTOS.get(1).getInitialAuditOpinion().split("<br/>");
+                        //将审核意见放入集合中
+                        for (String s : split) {
+                            strings.add(s);
+                        }
+                    }else {
+                        strings.add(jyProjectAuditDTOS.get(1).getInitialAuditOpinion());
                     }
                     data.put("secondAuditList",strings);
                 }else {
@@ -842,10 +869,14 @@ public class JyProjectService {
                 }
                 //修改意见
                 if (StringUtils.isNotBlank(jyProjectAuditDTOS.get(1).getInitialEditOpinion())){
-                    String[] split = jyProjectAuditDTOS.get(1).getInitialEditOpinion().split("<br/>");
                     ArrayList<String> strings = new ArrayList<>();
-                    for (String s : split) {
-                        strings.add(s);
+                    if (jyProjectAuditDTOS.get(1).getInitialEditOpinion().contains("<br/>")){
+                        String[] split = jyProjectAuditDTOS.get(1).getInitialEditOpinion().split("<br/>");
+                        for (String s : split) {
+                            strings.add(s);
+                        }
+                    }else {
+                        strings.add(jyProjectAuditDTOS.get(1).getInitialEditOpinion());
                     }
                     data.put("secondEditList",strings);
                 }else {
@@ -863,14 +894,19 @@ public class JyProjectService {
                 data.put("secondAgreeDate","");
 
 
-            }else if (jyProjectAuditDTOS.size()>=3){
+            }
+            if (jyProjectAuditDTOS.size()>=3){
                 //审核意见
                 if (StringUtils.isNotBlank(jyProjectAuditDTOS.get(2).getInitialAuditOpinion())){
-                    String[] split = jyProjectAuditDTOS.get(2).getInitialAuditOpinion().split("<br/>");
-                    //将审核意见放入集合中
                     ArrayList<String> strings = new ArrayList<>();
-                    for (String s : split) {
-                        strings.add(s);
+                    if (jyProjectAuditDTOS.get(2).getInitialAuditOpinion().contains("<br/>")){
+                        String[] split = jyProjectAuditDTOS.get(2).getInitialAuditOpinion().split("<br/>");
+                        //将审核意见放入集合中
+                        for (String s : split) {
+                            strings.add(s);
+                        }
+                    }else {
+                        strings.add(jyProjectAuditDTOS.get(2).getInitialAuditOpinion());
                     }
                     data.put("thirdAuditList",strings);
                 }else {
@@ -891,15 +927,21 @@ public class JyProjectService {
                 data.put("thirdAuditDate",format);
                 data.put("thirdDate",format);
                 //修改意见
+                ArrayList<String> strings = Lists.newArrayList();
                 if (StringUtils.isNotBlank(jyProjectAuditDTOS.get(2).getInitialEditOpinion())){
-                    String[] split = jyProjectAuditDTOS.get(2).getInitialEditOpinion().split("<br/>");
-                    ArrayList<String> strings = new ArrayList<>();
-                    for (String s : split) {
-                        strings.add(s);
+//                    ArrayList<String> strings = new ArrayList<>();
+                    if (jyProjectAuditDTOS.get(2).getInitialEditOpinion().contains("<br/>")){
+                        String[] split = jyProjectAuditDTOS.get(2).getInitialEditOpinion().split("<br/>");
+                        for (String s : split) {
+                            strings.add(s);
+                        }
+                    }else {
+                        strings.add(jyProjectAuditDTOS.get(2).getInitialEditOpinion());
                     }
                     data.put("thirdEditList",strings);
                 }else {
-                    data.put("thirdEditList","");
+                    strings.add("");
+                    data.put("thirdEditList",strings);
                 }
                 //签名
                 if (StringUtils.isNotBlank(jyProjectAuditDTOS.get(2).getCreateById())){

+ 34 - 0
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/useSeal/service/SignetService.java

@@ -9,6 +9,7 @@ import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.jeeplus.business.project.domain.JyProject;
 import com.jeeplus.business.project.mapper.JyProjectMapper;
+import com.jeeplus.business.project.service.JyProjectService;
 import com.jeeplus.business.project.service.dto.JyProjectDTO;
 import com.jeeplus.business.workContractInfo.mapper.JyWorkContractInfoMapper;
 import com.jeeplus.common.TokenProvider;
@@ -102,6 +103,7 @@ public class SignetService {
                 ArrayList<JyProject> jyProjects = new ArrayList<>();
                 for (String s : split) {
                     JyProject byId = jyProjectMapper.getById(s);
+                    byId.setSealId(item.getId());
                     jyProjects.add(byId);
                 }
                 item.setProjectList(jyProjects);
@@ -166,6 +168,17 @@ public class SignetService {
         if (CollectionUtils.isNotEmpty(dto.getFiles())) {
             saveFiles(dto.getFiles(), userDTO, id);
         }
+        //修改项目中的报告签发状态
+        if (StringUtils.isNotBlank(projectId)){
+            String[] split = projectId.split(",");
+            for (String s : split) {
+                if (StringUtils.isNotBlank(s)){
+                    jyProjectMapper.updateReportIssuanceById(s,signet.getStatus());
+                }
+
+            }
+        }
+
         return id;
     }
 
@@ -201,6 +214,16 @@ public class SignetService {
         if (CollectionUtils.isNotEmpty(dto.getFiles())) {
             updateFiles(dto.getFiles(), userDTO, dto.getId());
         }
+        //修改项目中的报告签发状态
+        if (StringUtils.isNotBlank(projectId)){
+            String[] split = projectId.split(",");
+            for (String s : split) {
+                if (StringUtils.isNotBlank(s)){
+                    jyProjectMapper.updateReportIssuanceById(s,signet.getStatus());
+                }
+
+            }
+        }
         return dto.getId();
     }
 
@@ -350,5 +373,16 @@ public class SignetService {
      */
     public void updateStatusById(String id,String status) {
         signetMapper.updateStatusById(id,status);
+        SignetDTO signetDTO = signetMapper.findById(id);
+        //修改项目中的报告签发状态
+        if (StringUtils.isNotBlank(signetDTO.getProjectId())){
+            String[] split = signetDTO.getProjectId().split(",");
+            for (String s : split) {
+                if (StringUtils.isNotBlank(s)){
+                    jyProjectMapper.updateReportIssuanceById(s,signetDTO.getStatus());
+                }
+
+            }
+        }
     }
 }

File diff suppressed because it is too large
+ 461 - 488
jeeplus-modules/jeeplus-business/src/main/resources/freemarker/firstAudit.ftl


File diff suppressed because it is too large
+ 2276 - 2303
jeeplus-modules/jeeplus-business/src/main/resources/freemarker/secondAudit.ftl


File diff suppressed because it is too large
+ 462 - 489
jeeplus-modules/jeeplus-business/src/main/resources/freemarker/thirdAudit.ftl