فهرست منبع

评估报销详情排序规则修改

lizhenhao 2 سال پیش
والد
کامیت
84286b18f1

+ 5 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/reimbursement/reimbursementInfo/domain/ReimbursementDetailInfo.java

@@ -80,4 +80,9 @@ public class ReimbursementDetailInfo extends BaseEntity {
      * 内容
      * 内容
      */
      */
     private String content;
     private String content;
+
+    /**
+     * 排序
+     */
+    private String sort;
 }
 }

+ 5 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/reimbursement/reimbursementInfo/domain/ReimbursementDetailInfoOther.java

@@ -90,6 +90,11 @@ public class ReimbursementDetailInfoOther extends BaseEntity implements Serializ
      */
      */
     private String content;
     private String content;
 
 
+    /**
+     * 排序
+     */
+    private String sort;
+
     @TableField(exist = false)
     @TableField(exist = false)
     private static final long serialVersionUID = 1L;
     private static final long serialVersionUID = 1L;
 }
 }

+ 2 - 2
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/reimbursement/reimbursementInfo/mapper/xml/ReimbursementInfoMapper.xml

@@ -251,7 +251,7 @@
 		left join cw_reimbursement_type_info pg_type on pg_type.id = a.type_id and pg_type.del_flag = '0'
 		left join cw_reimbursement_type_info pg_type on pg_type.id = a.type_id and pg_type.del_flag = '0'
 		left join program_project_list_info pg_project on pg_project.id = a.project_id and pg_project.del_flag = '0'
 		left join program_project_list_info pg_project on pg_project.id = a.project_id and pg_project.del_flag = '0'
 		where a.del_flag = '0' and a.info_id = #{id}
 		where a.del_flag = '0' and a.info_id = #{id}
-		order by pg_project.name asc
+		order by a.sort+0 asc
 	</select>
 	</select>
 
 
 	<select id="getOtherDetailList" resultType="com.jeeplus.test.reimbursement.reimbursementInfo.domain.ReimbursementDetailInfoOther">
 	<select id="getOtherDetailList" resultType="com.jeeplus.test.reimbursement.reimbursementInfo.domain.ReimbursementDetailInfoOther">
@@ -280,7 +280,7 @@
 		left join cw_reimbursement_type_info pg_type on pg_type.id = a.type_id and pg_type.del_flag = '0'
 		left join cw_reimbursement_type_info pg_type on pg_type.id = a.type_id and pg_type.del_flag = '0'
 		left join program_project_list_info pg_project on pg_project.id = a.project_id and pg_project.del_flag = '0'
 		left join program_project_list_info pg_project on pg_project.id = a.project_id and pg_project.del_flag = '0'
 		where a.del_flag = '0' and a.info_id = #{id}
 		where a.del_flag = '0' and a.info_id = #{id}
-		order by pg_project.name asc
+		order by a.sort+0 asc
 	</select>
 	</select>
 
 
 	<select id="getProcuredDetailList" resultType="com.jeeplus.test.reimbursement.reimbursementInfo.domain.ReimbursementDetailInfoProcured">
 	<select id="getProcuredDetailList" resultType="com.jeeplus.test.reimbursement.reimbursementInfo.domain.ReimbursementDetailInfoProcured">

+ 12 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/reimbursement/reimbursementInfo/service/ReimbursementInfoService.java

@@ -197,10 +197,13 @@ public class ReimbursementInfoService {
         infoMapper.insert(info);
         infoMapper.insert(info);
         // 保存项目详情列表信息
         // 保存项目详情列表信息
         if (CollectionUtils.isNotEmpty(dto.getDetailInfos())) {
         if (CollectionUtils.isNotEmpty(dto.getDetailInfos())) {
+            int i = 0;
             for (ReimbursementDetailInfo detailInfo : dto.getDetailInfos()) {
             for (ReimbursementDetailInfo detailInfo : dto.getDetailInfos()) {
                 // 保存基础表信息主键值
                 // 保存基础表信息主键值
                 detailInfo.setInfoId(id);
                 detailInfo.setInfoId(id);
+                detailInfo.setSort(String.valueOf(i));
                 detailInfoMapper.insert(detailInfo);
                 detailInfoMapper.insert(detailInfo);
+                i++;
             }
             }
         }
         }
         // 保存合同详情列表信息
         // 保存合同详情列表信息
@@ -213,10 +216,13 @@ public class ReimbursementInfoService {
         }
         }
         // 保存其他报销详情列表信息
         // 保存其他报销详情列表信息
         if (CollectionUtils.isNotEmpty(dto.getDetailInfoOthers())) {
         if (CollectionUtils.isNotEmpty(dto.getDetailInfoOthers())) {
+            int i = 0;
             for (ReimbursementDetailInfoOther detailInfo : dto.getDetailInfoOthers()) {
             for (ReimbursementDetailInfoOther detailInfo : dto.getDetailInfoOthers()) {
                 // 保存基础表信息主键值
                 // 保存基础表信息主键值
                 detailInfo.setInfoId(id);
                 detailInfo.setInfoId(id);
+                detailInfo.setSort(String.valueOf(i));
                 reimbursementDetailInfoOtherMapper.insert(detailInfo);
                 reimbursementDetailInfoOtherMapper.insert(detailInfo);
+                i++;
             }
             }
         }
         }
         // 保存采购报销详情列表信息
         // 保存采购报销详情列表信息
@@ -277,11 +283,14 @@ public class ReimbursementInfoService {
 
 
         // 保存项目详情列表信息
         // 保存项目详情列表信息
         if (CollectionUtils.isNotEmpty(dto.getDetailInfos())) {
         if (CollectionUtils.isNotEmpty(dto.getDetailInfos())) {
+            int i = 0;
             for (ReimbursementDetailInfo detailInfo : dto.getDetailInfos()) {
             for (ReimbursementDetailInfo detailInfo : dto.getDetailInfos()) {
                 // 保存基础表信息主键值
                 // 保存基础表信息主键值
                 detailInfo.setInfoId(dto.getId());
                 detailInfo.setInfoId(dto.getId());
                 detailInfo.setId("");
                 detailInfo.setId("");
+                detailInfo.setSort(String.valueOf(i));
                 detailInfoMapper.insert(detailInfo);
                 detailInfoMapper.insert(detailInfo);
+                i++;
             }
             }
         }
         }
         // 保存合同详情列表信息
         // 保存合同详情列表信息
@@ -295,11 +304,14 @@ public class ReimbursementInfoService {
         }
         }
         // 保存其他报销详情列表信息
         // 保存其他报销详情列表信息
         if (CollectionUtils.isNotEmpty(dto.getDetailInfoOthers())) {
         if (CollectionUtils.isNotEmpty(dto.getDetailInfoOthers())) {
+            int i = 0;
             for (ReimbursementDetailInfoOther detailInfo : dto.getDetailInfoOthers()) {
             for (ReimbursementDetailInfoOther detailInfo : dto.getDetailInfoOthers()) {
                 // 保存基础表信息主键值
                 // 保存基础表信息主键值
                 detailInfo.setInfoId(dto.getId());
                 detailInfo.setInfoId(dto.getId());
                 detailInfo.setId("");
                 detailInfo.setId("");
+                detailInfo.setSort(String.valueOf(i));
                 reimbursementDetailInfoOtherMapper.insert(detailInfo);
                 reimbursementDetailInfoOtherMapper.insert(detailInfo);
+                i++;
             }
             }
         }
         }
         // 保存采购报销详情列表信息
         // 保存采购报销详情列表信息