Browse Source

评估校审查看信息不全修改,报销类型管理代码提交

wangqiang 2 years ago
parent
commit
730fa68f9f

+ 9 - 0
jeeplus-modules/jeeplus-assess/src/main/java/com/jeeplus/assess/program/configuration/projectList/mapper/ProgramAuditMapper.java

@@ -7,6 +7,8 @@ import com.jeeplus.assess.program.configuration.projectList.service.dto.ProgramA
 import org.apache.ibatis.annotations.Mapper;
 import org.apache.ibatis.annotations.Param;
 
+import java.util.List;
+
 /**
  * @Entity com.jeeplus.test.program.configuration.projectList.domain.ProgramAudit
  */
@@ -17,6 +19,13 @@ public interface ProgramAuditMapper extends BaseMapper<ProgramAudit> {
     ProgramAuditDto findByIdAudit(String id);
 
     String findIdByProIdAndLevel(@Param("programId") String programId, @Param("auditLevel") String auditLevel);
+
+    /**
+     * 根据项目id去查询校审的id(一、二、三)
+     * @param programId
+     * @return
+     */
+    List<String> getIDsByProId(@Param("programId")String programId);
 }
 
 

+ 8 - 0
jeeplus-modules/jeeplus-assess/src/main/java/com/jeeplus/assess/program/configuration/projectList/mapper/xml/ProgramAuditMapper.xml

@@ -104,4 +104,12 @@
     <select id="findIdByProIdAndLevel" resultType="string">
         select id from program_audit where del_flag = '0' and program_id = #{programId} and audit_level = #{auditLevel}
     </select>
+    <select id="getIDsByProId" resultType="string">
+        SELECT id
+        FROM program_audit
+        WHERE program_id = #{programId} and del_flag = '0'
+        ORDER BY
+        CASE WHEN audit_date IS NULL THEN 1 ELSE 0 END,
+        audit_date ASC
+    </select>
 </mapper>

+ 11 - 0
jeeplus-modules/jeeplus-assess/src/main/java/com/jeeplus/assess/program/configuration/projectList/service/ProjectListService.java

@@ -613,6 +613,17 @@ public class ProjectListService {
             }
             byIdAudit.setWorkAttachmentDtoList(files);
         }
+        //根据项目的id去查校审的id
+        List<String> ids = programAuditMapper.getIDsByProId(byIdAudit.getProgramId());
+        if (ids.size() >= 1) {
+            byIdAudit.setId1(ids.get(0));
+        }
+        if (ids.size() >= 2) {
+            byIdAudit.setId2(ids.get(1));
+        }
+        if (ids.size() >= 3) {
+            byIdAudit.setId3(ids.get(2));
+        }
         return byIdAudit;
     }
 

+ 7 - 0
jeeplus-modules/jeeplus-assess/src/main/java/com/jeeplus/assess/program/configuration/projectList/service/dto/ProgramAuditDto.java

@@ -16,6 +16,13 @@ import java.util.List;
 @Data
 public class ProgramAuditDto extends BaseDTO {
 
+    //校审id1
+    private String id1;
+    //校审id2
+    private String id2;
+    //校审id3
+    private String id3;
+
     /**
      * 备注信息
      */

+ 8 - 0
jeeplus-modules/jeeplus-public-modules/src/main/java/com/jeeplus/pubmodules/reimApprovalType/service/CwReimbursementTypeService.java

@@ -273,6 +273,14 @@ public class CwReimbursementTypeService {
         info.setDelFlag(0);
         // 生成序号/层级
         getNo(info);
+        //对关联的公司id进行处理
+        if (null != info.getOfficeIdList() && info.getOfficeIdList().size()>0) {
+            //首先删除原有关联信息
+            mapper.deleteReimbursementTypeOfficeInfo(info.getId());
+            //将新的关联信息进行保存
+            mapper.saveReimbursementTypeOfficeInfo(info.getId(),info.getOfficeIdList());
+        }
+        info.setOfficeIdList(null);
         mapper.insert(info);
         return "操作完成";
     }

+ 6 - 0
jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/controller/OfficeController.java

@@ -37,6 +37,12 @@ public class OfficeController {
     @Autowired
     private OfficeWrapper officeWrapper;
 
+    @ApiLog("获取二级节点数据信息")
+    @GetMapping("getSecondLevelData")
+    public ResponseEntity getSecondLevelData() {
+        List<OfficeDTO> list = officeService.getSecondLevelData ();
+        return ResponseEntity.ok (list);
+    }
 
     /**
      * 根据id查询部门

+ 7 - 0
jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/mapper/OfficeMapper.java

@@ -23,6 +23,13 @@ import java.util.List;
 public interface OfficeMapper extends TreeMapper <Office> {
 
     /**
+     * 获取二级节点数据信息
+     * @return
+     */
+    @InterceptorIgnore(tenantLine = "true")
+    List<OfficeDTO> getSecondLevelData();
+
+    /**
      * 根据id查询office信息
      * @param id
      * @return

+ 10 - 0
jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/mapper/xml/OfficeMapper.xml

@@ -31,6 +31,16 @@
         a.administrator as "administrator"
     </sql>
 
+    <select id="getSecondLevelData" resultType="com.jeeplus.sys.service.dto.OfficeDTO">
+        select
+        <include refid="officeColumns"/>
+        from sys_office a
+        <where>
+            a.parent_id in (select id from sys_office where parent_id = 0)
+            and a.del_flag = 0
+        </where>
+    </select>
+
     <!-- 分页查询用户信息 -->
     <select id="findList" resultType="com.jeeplus.sys.service.dto.OfficeDTO">
         SELECT a.id,

+ 8 - 0
jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/service/OfficeService.java

@@ -43,6 +43,14 @@ public class OfficeService extends TreeService <OfficeMapper, Office> {
     private OfficeWrapper officeWrapper;
 
     /**
+     * 获取二级节点数据信息
+     * @return
+     */
+    public List<OfficeDTO> getSecondLevelData(){
+        return officeMapper.getSecondLevelData();
+    }
+
+    /**
      * 获取列表
      *
      * @return