Bläddra i källkod

总审详情页展示功能修改

user5 2 år sedan
förälder
incheckning
d7145b41c1

+ 1 - 1
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/reimbursementAccountant/controller/AccountantReimbursementUserController.java

@@ -191,7 +191,7 @@ public class AccountantReimbursementUserController {
     @PreAuthorize("hasAnyAuthority('accountant:reimbursementUser:import')")
     @PostMapping("import")
     @ApiOperation(value = "导入员工报销信息excel")
-    public ResponseEntity importFile(MultipartFile file) {
+    public ResponseEntity importFile(MultipartFile file,String officeType) {
         try {
             int successNum = 0;
             int failureNum = 0;

+ 6 - 6
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/reimbursementAccountant/mapper/xml/AccountantReimbursementBusinessMapper.xml

@@ -43,7 +43,7 @@
     <select id="findList" resultType="com.jeeplus.test.reimbursementAccountant.domain.dto.AccountantReimbursementUserDTO">
         SELECT
             <include refid="reimbursementUserColumns"/>
-        FROM zs_reimbursement_user_accountant_info a
+        FROM zs_reimbursement_user_info a
         <include refid="reimbursementUserJoinColumns"/>
         <where>
             a.del_flag = 0
@@ -142,7 +142,7 @@
     </insert>
 
     <update id="update">
-        update zs_reimbursement_user_accountant_info
+        update zs_reimbursement_user_info
         set
             update_by = #{updateBy}
             ,update_date = #{updateDate}
@@ -163,7 +163,7 @@
     <select id="queryById" resultType="com.jeeplus.test.reimbursementAccountant.domain.dto.AccountantReimbursementBusinessDTO">
         SELECT
         <include refid="reimbursementUserColumns"/>
-            FROM zs_reimbursement_user_accountant_info a
+            FROM zs_reimbursement_user_info a
         <include refid="reimbursementUserJoinColumns"/>
         <where>
             a.del_flag = 0
@@ -174,7 +174,7 @@
     <select id="queryByUserIdAndYear" resultType="com.jeeplus.test.reimbursementAccountant.domain.dto.AccountantReimbursementUserDTO">
         SELECT
         <include refid="reimbursementUserColumns"/>
-            FROM zs_reimbursement_user_accountant_info a
+            FROM zs_reimbursement_user_info a
         <include refid="reimbursementUserJoinColumns"/>
         <where>
             a.del_flag = 0
@@ -184,7 +184,7 @@
     </select>
 
     <delete id="delete">
-        delete from zs_reimbursement_user_accountant_info
+        delete from zs_reimbursement_user_info
         <where>
             <if test="idList != null and idList.size>0">
                 and id in
@@ -223,7 +223,7 @@
     <select id="findListByBusinessCodeId" resultType="com.jeeplus.test.reimbursementAccountant.domain.dto.AccountantReimbursementBusinessDTO">
         SELECT
         <include refid="reimbursementBusinessColumns"/>
-        ,(select name from sys_office where id = (select substring_index(substring_index(parent_ids,',',3 ),',',-1 ) from sys_office where id = su.office_id)) as 'userOfficeName'
+        ,(SELECT NAME FROM sys_office WHERE id = ( (case when (SELECT substring_index( substring_index( parent_ids, ',', 3 ), ',', - 1 ) FROM sys_office WHERE id = su.office_id ) = '' then (select id FROM sys_office WHERE id = su.office_id )  else (SELECT substring_index( substring_index( parent_ids, ',', 3 ), ',', - 1 ) FROM sys_office WHERE id = su.office_id ) end) )) AS 'userOfficeName'
         FROM zs_reimbursement_business_info a
         <include refid="reimbursementUserJoinColumns"/>
         left join sys_office so on so.id = su.office_id

+ 1 - 1
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/reimbursementAccountant/mapper/xml/AccountantReimbursementBusinessTwoMapper.xml

@@ -84,7 +84,7 @@
             resultType="com.jeeplus.test.reimbursementAccountant.domain.dto.AccountantReimbursementBusinessTwoDTO">
         select
         <include refid="joinZsReimbursementBusinessAccountantInfoColumns"/>
-        ,(select name from sys_office where id = (select substring_index(substring_index(parent_ids,',',3 ),',',-1 ) from sys_office where id = su.office_id)) as 'userOfficeName'
+        ,(SELECT NAME FROM sys_office WHERE id = ( (case when (SELECT substring_index( substring_index( parent_ids, ',', 3 ), ',', - 1 ) FROM sys_office WHERE id = su.office_id ) = '' then (select id FROM sys_office WHERE id = su.office_id )  else (SELECT substring_index( substring_index( parent_ids, ',', 3 ), ',', - 1 ) FROM sys_office WHERE id = su.office_id ) end) )) AS 'userOfficeName'
         from zs_reimbursement_business_info a
         <include refid="reimbursementUserJoinColumns"/>
         left join sys_office so on so.id = su.office_id

+ 6 - 6
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/reimbursementAssess/mapper/xml/AssessReimbursementBusinessMapper.xml

@@ -43,7 +43,7 @@
     <select id="findList" resultType="com.jeeplus.test.reimbursementAssess.domain.dto.AssessReimbursementUserDTO">
         SELECT
             <include refid="reimbursementUserColumns"/>
-        FROM zs_reimbursement_user_assess_info a
+        FROM zs_reimbursement_user_info a
         <include refid="reimbursementUserJoinColumns"/>
         <where>
             a.del_flag = 0
@@ -142,7 +142,7 @@
     </insert>
 
     <update id="update">
-        update zs_reimbursement_user_assess_info
+        update zs_reimbursement_user_info
         set
             update_by = #{updateBy}
             ,update_date = #{updateDate}
@@ -163,7 +163,7 @@
     <select id="queryById" resultType="com.jeeplus.test.reimbursementAssess.domain.dto.AssessReimbursementBusinessDTO">
         SELECT
         <include refid="reimbursementUserColumns"/>
-            FROM zs_reimbursement_user_assess_info a
+            FROM zs_reimbursement_user_info a
         <include refid="reimbursementUserJoinColumns"/>
         <where>
             a.del_flag = 0
@@ -174,7 +174,7 @@
     <select id="queryByUserIdAndYear" resultType="com.jeeplus.test.reimbursementAssess.domain.dto.AssessReimbursementUserDTO">
         SELECT
         <include refid="reimbursementUserColumns"/>
-            FROM zs_reimbursement_user_assess_info a
+            FROM zs_reimbursement_user_info a
         <include refid="reimbursementUserJoinColumns"/>
         <where>
             a.del_flag = 0
@@ -184,7 +184,7 @@
     </select>
 
     <delete id="delete">
-        delete from zs_reimbursement_user_assess_info
+        delete from zs_reimbursement_user_info
         <where>
             <if test="idList != null and idList.size>0">
                 and id in
@@ -223,7 +223,7 @@
     <select id="findListByBusinessCodeId" resultType="com.jeeplus.test.reimbursementAssess.domain.dto.AssessReimbursementBusinessDTO">
         SELECT
         <include refid="reimbursementBusinessColumns"/>
-        ,(select name from sys_office where id = (select substring_index(substring_index(parent_ids,',',3 ),',',-1 ) from sys_office where id = su.office_id)) as 'userOfficeName'
+        ,(SELECT NAME FROM sys_office WHERE id = ( (case when (SELECT substring_index( substring_index( parent_ids, ',', 3 ), ',', - 1 ) FROM sys_office WHERE id = su.office_id ) = '' then (select id FROM sys_office WHERE id = su.office_id )  else (SELECT substring_index( substring_index( parent_ids, ',', 3 ), ',', - 1 ) FROM sys_office WHERE id = su.office_id ) end) )) AS 'userOfficeName'
         FROM zs_reimbursement_business_info a
         <include refid="reimbursementUserJoinColumns"/>
         left join sys_office so on so.id = su.office_id

+ 1 - 1
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/reimbursementAssess/mapper/xml/AssessReimbursementBusinessTwoMapper.xml

@@ -84,7 +84,7 @@
             resultType="com.jeeplus.test.reimbursementAssess.domain.dto.AssessReimbursementBusinessTwoDTO">
         select
         <include refid="joinZsReimbursementBusinessAssessInfoColumns"/>
-        ,(select name from sys_office where id = (select substring_index(substring_index(parent_ids,',',3 ),',',-1 ) from sys_office where id = su.office_id)) as 'userOfficeName'
+        ,(SELECT NAME FROM sys_office WHERE id = ( (case when (SELECT substring_index( substring_index( parent_ids, ',', 3 ), ',', - 1 ) FROM sys_office WHERE id = su.office_id ) = '' then (select id FROM sys_office WHERE id = su.office_id )  else (SELECT substring_index( substring_index( parent_ids, ',', 3 ), ',', - 1 ) FROM sys_office WHERE id = su.office_id ) end) )) AS 'userOfficeName'
         from zs_reimbursement_business_info a
         <include refid="reimbursementUserJoinColumns"/>
         left join sys_office so on so.id = su.office_id

+ 6 - 6
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/reimbursementProject/mapper/xml/ProjectReimbursementBusinessMapper.xml

@@ -43,7 +43,7 @@
     <select id="findList" resultType="com.jeeplus.test.reimbursementProject.domain.dto.ProjectReimbursementUserDTO">
         SELECT
             <include refid="reimbursementUserColumns"/>
-        FROM zs_reimbursement_user_project_info a
+        FROM zs_reimbursement_user_info a
         <include refid="reimbursementUserJoinColumns"/>
         <where>
             a.del_flag = 0
@@ -142,7 +142,7 @@
     </insert>
 
     <update id="update">
-        update zs_reimbursement_user_project_info
+        update zs_reimbursement_user_info
         set
             update_by = #{updateBy}
             ,update_date = #{updateDate}
@@ -163,7 +163,7 @@
     <select id="queryById" resultType="com.jeeplus.test.reimbursementProject.domain.dto.ProjectReimbursementBusinessDTO">
         SELECT
         <include refid="reimbursementUserColumns"/>
-            FROM zs_reimbursement_user_project_info a
+            FROM zs_reimbursement_user_info a
         <include refid="reimbursementUserJoinColumns"/>
         <where>
             a.del_flag = 0
@@ -174,7 +174,7 @@
     <select id="queryByUserIdAndYear" resultType="com.jeeplus.test.reimbursementProject.domain.dto.ProjectReimbursementUserDTO">
         SELECT
         <include refid="reimbursementUserColumns"/>
-            FROM zs_reimbursement_user_project_info a
+            FROM zs_reimbursement_user_info a
         <include refid="reimbursementUserJoinColumns"/>
         <where>
             a.del_flag = 0
@@ -184,7 +184,7 @@
     </select>
 
     <delete id="delete">
-        delete from zs_reimbursement_user_project_info
+        delete from zs_reimbursement_user_info
         <where>
             <if test="idList != null and idList.size>0">
                 and id in
@@ -223,7 +223,7 @@
     <select id="findListByBusinessCodeId" resultType="com.jeeplus.test.reimbursementProject.domain.dto.ProjectReimbursementBusinessDTO">
         SELECT
         <include refid="reimbursementBusinessColumns"/>
-        ,(select name from sys_office where id = (select substring_index(substring_index(parent_ids,',',3 ),',',-1 ) from sys_office where id = su.office_id)) as 'userOfficeName'
+        ,(SELECT NAME FROM sys_office WHERE id = ( (case when (SELECT substring_index( substring_index( parent_ids, ',', 3 ), ',', - 1 ) FROM sys_office WHERE id = su.office_id ) = '' then (select id FROM sys_office WHERE id = su.office_id )  else (SELECT substring_index( substring_index( parent_ids, ',', 3 ), ',', - 1 ) FROM sys_office WHERE id = su.office_id ) end) )) AS 'userOfficeName'
         FROM zs_reimbursement_business_info a
         <include refid="reimbursementUserJoinColumns"/>
         left join sys_office so on so.id = su.office_id

+ 1 - 1
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/reimbursementProject/mapper/xml/ProjectReimbursementBusinessTwoMapper.xml

@@ -84,7 +84,7 @@
             resultType="com.jeeplus.test.reimbursementProject.domain.dto.ProjectReimbursementBusinessTwoDTO">
         select
         <include refid="joinZsReimbursementBusinessProjectInfoColumns"/>
-        ,(select name from sys_office where id = (select substring_index(substring_index(parent_ids,',',3 ),',',-1 ) from sys_office where id = su.office_id)) as 'userOfficeName'
+        ,(SELECT NAME FROM sys_office WHERE id = ( (case when (SELECT substring_index( substring_index( parent_ids, ',', 3 ), ',', - 1 ) FROM sys_office WHERE id = su.office_id ) = '' then (select id FROM sys_office WHERE id = su.office_id )  else (SELECT substring_index( substring_index( parent_ids, ',', 3 ), ',', - 1 ) FROM sys_office WHERE id = su.office_id ) end) )) AS 'userOfficeName'
         from zs_reimbursement_business_info a
         <include refid="reimbursementUserJoinColumns"/>
         left join sys_office so on so.id = su.office_id

+ 1 - 1
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/reimbursementsys/mapper/xml/ReimbursementBusinessMapper.xml

@@ -235,7 +235,7 @@
     <select id="findListByBusinessCodeId" resultType="com.jeeplus.test.reimbursementsys.domain.dto.ReimbursementBusinessDTO">
         SELECT
         <include refid="reimbursementBusinessColumns"/>
-        ,(select name from sys_office where id = (select substring_index(substring_index(parent_ids,',',3 ),',',-1 ) from sys_office where id = su.office_id)) as 'userOfficeName'
+        ,(SELECT NAME FROM sys_office WHERE id = ( (case when (SELECT substring_index( substring_index( parent_ids, ',', 3 ), ',', - 1 ) FROM sys_office WHERE id = su.office_id ) = '' then (select id FROM sys_office WHERE id = su.office_id )  else (SELECT substring_index( substring_index( parent_ids, ',', 3 ), ',', - 1 ) FROM sys_office WHERE id = su.office_id ) end) )) AS 'userOfficeName'
         FROM zs_reimbursement_business_info a
         <include refid="reimbursementUserJoinColumns"/>
         left join sys_office so on so.id = su.office_id

+ 10 - 5
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/reimbursementsys/mapper/xml/WuHanReimbursementBusinessMapper.xml

@@ -32,8 +32,9 @@
         a.year AS "year",
         a.reimbursement_day as "reimbursementDay",
         a.reimbursement_type AS "reimbursementType",
-        a.reimbursement_amount as "reimbursementAmount",
-        a.reimbursement_address as "reimbursementAddress"
+        a.reimbursement_fsalary AS "reimbursementFsalary",
+        a.reimbursement_address AS "reimbursementAddress",
+        a.reimbursement_amount as "reimbursementAmount"
     </sql>
 
     <sql id="reimbursementUserJoinColumns">
@@ -116,8 +117,10 @@
                 reimbursement_day,
             </if>
             reimbursement_type,
+            reimbursement_fsalary,
             reimbursement_address,
-            reimbursement_amount
+            reimbursement_amount,
+            office_type
         )
         values
         (
@@ -135,8 +138,10 @@
                 #{reimbursementDay},
             </if>
             #{reimbursementType},
+            #{reimbursementFsalary},
             1,
-            #{reimbursementAmount}
+            #{reimbursementAmount},
+            #{officeType}
         )
     </insert>
 
@@ -229,7 +234,7 @@
     <select id="findListByBusinessCodeId" resultType="com.jeeplus.test.reimbursementsys.domain.dto.ReimbursementBusinessDTO">
         SELECT
         <include refid="reimbursementBusinessColumns"/>
-        ,(select name from sys_office where id = (select substring_index(substring_index(parent_ids,',',3 ),',',-1 ) from sys_office where id = su.office_id)) as 'userOfficeName'
+        ,(SELECT NAME FROM sys_office WHERE id = ( (case when (SELECT substring_index( substring_index( parent_ids, ',', 3 ), ',', - 1 ) FROM sys_office WHERE id = su.office_id ) = '' then (select id FROM sys_office WHERE id = su.office_id )  else (SELECT substring_index( substring_index( parent_ids, ',', 3 ), ',', - 1 ) FROM sys_office WHERE id = su.office_id ) end) )) AS 'userOfficeName'
         FROM zs_reimbursement_business_info a
         <include refid="reimbursementUserJoinColumns"/>
         left join sys_office so on so.id = su.office_id

+ 1 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/reimbursementsys/service/impl/WuHanReimbursementBusinessServiceImpl.java

@@ -426,6 +426,7 @@ public class WuHanReimbursementBusinessServiceImpl implements WuHanReimbursement
         List<ReimbursementBusinessDTO> list = mapper.findListByBusinessCodeId(reimbursementBusiness);
         for (ReimbursementBusinessDTO info : list) {
             info.setReimbursementType(DictUtils.getDictLabel(info.getReimbursementType(), "reimbursement_type", null));
+            info.setReimbursementFsalary(DictUtils.getDictLabel(info.getReimbursementFsalary(), "reimbursement_fsalary", null));
         }
         ReimbursementBusinessReturnDTO reimbursementBusinessReturnDTO = new ReimbursementBusinessReturnDTO();
         //获取业务报销信息