Explorar el Código

无票报销数据导出处理,页面展示处理,绑定处理等

user5 hace 2 años
padre
commit
3815861672
Se han modificado 34 ficheros con 709 adiciones y 13 borrados
  1. 1 1
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/reimbursementAccountant/controller/AccountantReimbursementBusinessTwoController.java
  2. 1 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/reimbursementAccountant/domain/dto/AccountantReimbursementBusinessDTO.java
  3. 1 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/reimbursementAccountant/domain/dto/AccountantReimbursementBusinessReturnDTO.java
  4. 4 1
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/reimbursementAccountant/domain/dto/AccountantReimbursementBusinessTwoDTO.java
  5. 4 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/reimbursementAccountant/mapper/xml/AccountantReimbursementBusinessMapper.xml
  6. 3 1
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/reimbursementAccountant/mapper/xml/AccountantReimbursementBusinessTwoMapper.xml
  7. 4 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/reimbursementAccountant/service/impl/AccountantReimbursementUserServiceImpl.java
  8. 1 1
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/reimbursementAssess/controller/AssessReimbursementBusinessTwoController.java
  9. 1 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/reimbursementAssess/domain/dto/AssessReimbursementBusinessDTO.java
  10. 1 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/reimbursementAssess/domain/dto/AssessReimbursementBusinessReturnDTO.java
  11. 4 1
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/reimbursementAssess/domain/dto/AssessReimbursementBusinessTwoDTO.java
  12. 4 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/reimbursementAssess/mapper/xml/AssessReimbursementBusinessMapper.xml
  13. 3 1
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/reimbursementAssess/mapper/xml/AssessReimbursementBusinessTwoMapper.xml
  14. 4 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/reimbursementAssess/service/impl/AssessReimbursementUserServiceImpl.java
  15. 1 1
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/reimbursementProject/controller/ProjectReimbursementBusinessTwoController.java
  16. 1 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/reimbursementProject/domain/dto/ProjectReimbursementBusinessDTO.java
  17. 1 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/reimbursementProject/domain/dto/ProjectReimbursementBusinessReturnDTO.java
  18. 4 1
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/reimbursementProject/domain/dto/ProjectReimbursementBusinessTwoDTO.java
  19. 4 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/reimbursementProject/mapper/xml/ProjectReimbursementBusinessMapper.xml
  20. 3 1
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/reimbursementProject/mapper/xml/ProjectReimbursementBusinessTwoMapper.xml
  21. 4 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/reimbursementProject/service/impl/ProjectReimbursementUserServiceImpl.java
  22. 134 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/reimbursementsys/controller/ReimbursementBusinessTwoController.java
  23. 44 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/reimbursementsys/domain/dto/ReimbursementBusinessTwoDTO.java
  24. 67 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/reimbursementsys/mapper/ReimbursementBusinessTwoMapper.java
  25. 15 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/reimbursementsys/mapper/ReimbursementSysMapper.java
  26. 1 1
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/reimbursementsys/mapper/xml/ReimbursementBusinessMapper.xml
  27. 170 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/reimbursementsys/mapper/xml/ReimbursementBusinessTwoMapper.xml
  28. 39 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/reimbursementsys/mapper/xml/ReimbursementSysMapper.xml
  29. 3 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/reimbursementsys/mapper/xml/WuHanReimbursementBusinessMapper.xml
  30. 7 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/reimbursementsys/service/ReimbursementBusinessService.java
  31. 34 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/reimbursementsys/service/ReimbursementBusinessTwoService.java
  32. 29 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/reimbursementsys/service/impl/ReimbursementBusinessServiceImpl.java
  33. 109 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/reimbursementsys/service/impl/ReimbursementBusinessTwoServiceImpl.java
  34. 3 3
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/reimbursementsys/service/impl/ReimbursementUserServiceImpl.java

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

@@ -68,7 +68,7 @@ public class AccountantReimbursementBusinessTwoController {
     @ApiLog("绑定")
     @RequestMapping("modifyBindCode")
     @PreAuthorize("hasAuthority('accountant:reimbursementBusinessTwo:binding')")
-    public ResponseEntity modifyBindCode(@RequestParam("ids")String ids,@RequestParam("businessCode")String businessCode,@RequestParam("money")String money){
+    public ResponseEntity modifyBindCode(@RequestParam("ids")String ids,@RequestParam("businessCode")String businessCode){
         String[] split = ids.split(",");
         BigDecimal sum = new BigDecimal(0);
         if(split.length!=0){

+ 1 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/reimbursementAccountant/domain/dto/AccountantReimbursementBusinessDTO.java

@@ -36,6 +36,7 @@ public class AccountantReimbursementBusinessDTO extends BaseEntity {
     private String remarks; //备注
     private String officeType; //部门类型(1:中审众环;2:兴光会计;3:兴光项目;4:兴光评估)
     private String userOfficeName; //报销人员所属部门
+    private String reimbursementAddress;  //地区类型(0:正常报销;1:武汉)
     /**
      * 报销开始日期
      */

+ 1 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/reimbursementAccountant/domain/dto/AccountantReimbursementBusinessReturnDTO.java

@@ -28,6 +28,7 @@ public class AccountantReimbursementBusinessReturnDTO {
     private List<AccountantReimbursementBusinessDTO> list;
     private List<ReimbursementAddressDTO> reimbursementFsalaryList; //实发类型列表
     private String reimbursementFsalary; //实发类型
+    private String reimbursementAddress;  //地区类型(0:正常报销;1:武汉)
 
     private String userId;  //报销人员id
     private String year; //报销年份

+ 4 - 1
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/reimbursementAccountant/domain/dto/AccountantReimbursementBusinessTwoDTO.java

@@ -21,6 +21,8 @@ public class AccountantReimbursementBusinessTwoDTO extends BaseEntity {
     private String userId;  //报销人id
     @Excel(name = "报销人",width = 10)
     private String userName;  //报销人
+    @Excel(name = "报销人部门",width = 12)
+    private String userOfficeName; //报销人员所属部门
     @Excel(name = "报销年份",width = 10)
     private String year;    //报销年份
     private String reimbursementQuota;  //年报销额度
@@ -30,6 +32,8 @@ public class AccountantReimbursementBusinessTwoDTO extends BaseEntity {
     private String reimbursementFsalary;  //实发类型(1:登记不实发;2:登记并实发)
     @Excel(name = "报销类型",width = 12)
     private String reimbursementTypeStr;  //报销类型(导出Str)
+    @Excel(name = "实发类型",width = 14)
+    private String reimbursementFsalaryStr;  //实发类型(1:登记不实发;2:登记并实发)(导出Str)
     @Excel(name = "报销天数",type = 10,width = 12)
     private String reimbursementDay;  //报销天数
     @Excel(name = "报销额度",type = 10,width = 12)
@@ -37,5 +41,4 @@ public class AccountantReimbursementBusinessTwoDTO extends BaseEntity {
     private String remainReimbursementAmount;  //剩余报销额度
     private String remarks; //备注
     private String officeType; //部门类型(1:中审众环;2:兴光会计;3:兴光项目;4:兴光评估)
-    private String userOfficeName; //报销人员所属部门
 }

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

@@ -66,6 +66,7 @@
         a.year AS "year",
         a.reimbursement_day as "reimbursementDay",
         a.reimbursement_type AS "reimbursementType",
+        a.reimbursement_address AS "reimbursementAddress",
         a.reimbursement_fsalary AS "reimbursementFsalary",
         a.reimbursement_amount as "reimbursementAmount",
         a.office_type as "officeType"
@@ -292,6 +293,9 @@
             and a.user_id = #{userId}
             and a.year = #{year}
 
+            <if test="reimbursementAddress != null and reimbursementAddress != ''">
+                and a.reimbursement_address = #{reimbursementAddress}
+            </if>
             <if test="beginReimbursementQuota != null and beginReimbursementQuota != ''">
                 and a.reimbursement_amount >= #{beginReimbursementQuota}
             </if>

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

@@ -32,6 +32,7 @@
         a.reimbursement_type as 'reimbursementType',
         a.reimbursement_fsalary as 'reimbursementFsalary',
         (case when a.reimbursement_type = '1' then '正常报销' when a.reimbursement_type = '2' then '补差' else '' end) as reimbursementTypeStr,
+        (case when a.reimbursement_fsalary = '1' then '报销不实发' when a.reimbursement_fsalary = '2' then '报销并实发' else '' end) as reimbursementFsalaryStr,
         su.name as 'userName'
     </sql>
     <sql id="reimbursementUserJoinColumns">
@@ -112,7 +113,8 @@
             resultType="com.jeeplus.test.reimbursementAccountant.domain.dto.AccountantReimbursementDTO">
         select id,business_code as businessCode
         from zs_reimbursement_accountant_info
-        where year = #{year} and business_code is not null and business_code != '' and reimbursement_ratio is not null and reimbursement_ratio !=''
+        where year = #{year} and del_flag = 0
+        and business_code is not null and business_code != '' and reimbursement_ratio is not null and reimbursement_ratio !=''
         group by business_code
     </select>
     <select id="findDataById"

+ 4 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/reimbursementAccountant/service/impl/AccountantReimbursementUserServiceImpl.java

@@ -187,6 +187,7 @@ public class AccountantReimbursementUserServiceImpl implements AccountantReimbur
         reimbursementBusiness.setEndDate(reimbursementBusinessReturn.getEndDate());
         reimbursementBusiness.setBeginReimbursementQuota(reimbursementBusinessReturn.getBeginReimbursementQuota());
         reimbursementBusiness.setEndReimbursementQuota(reimbursementBusinessReturn.getEndReimbursementQuota());
+        reimbursementBusiness.setReimbursementAddress(reimbursementBusinessReturn.getReimbursementAddress());
         reimbursementBusiness.setReimbursementFsalary(reimbursementBusinessReturn.getReimbursementFsalary());
         reimbursementBusiness.setOfficeType(reimbursementBusinessReturn.getOfficeType());
 
@@ -197,6 +198,9 @@ public class AccountantReimbursementUserServiceImpl implements AccountantReimbur
         for (AccountantReimbursementBusinessDTO info : showList) {
             info.setReimbursementFsalary(DictUtils.getDictLabel(info.getReimbursementFsalary(), "reimbursement_fsalary", null));
             info.setOfficeType(DictUtils.getDictLabel(info.getOfficeType(), "reimbursement_office_type", null));
+            if(StringUtils.isBlank(info.getReimbursementAddress())){
+                info.setReimbursementAddress("—");
+            }
         }
         //获取人员年度报销详情
         AccountantReimbursementUserDTO reimbursementUserInfo = mapper.queryByUserIdAndYear(reimbursementUserDTO);

+ 1 - 1
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/reimbursementAssess/controller/AssessReimbursementBusinessTwoController.java

@@ -65,7 +65,7 @@ public class AssessReimbursementBusinessTwoController {
     @ApiLog("绑定")
     @RequestMapping("modifyBindCode")
     @PreAuthorize("hasAuthority('assess:reimbursementBusinessTwo:binding')")
-    public ResponseEntity modifyBindCode(@RequestParam("ids")String ids,@RequestParam("businessCode")String businessCode,@RequestParam("money")String money){
+    public ResponseEntity modifyBindCode(@RequestParam("ids")String ids,@RequestParam("businessCode")String businessCode){
         String[] split = ids.split(",");
         BigDecimal sum = new BigDecimal(0);
         if(split.length!=0){

+ 1 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/reimbursementAssess/domain/dto/AssessReimbursementBusinessDTO.java

@@ -35,6 +35,7 @@ public class AssessReimbursementBusinessDTO extends BaseEntity {
     private String remarks; //备注
     private String officeType; //部门类型(1:中审众环;2:兴光会计;3:兴光项目;4:兴光评估)
     private String userOfficeName; //报销人员所属部门
+    private String reimbursementAddress;  //地区类型(0:正常报销;1:武汉)
     /**
      * 报销开始日期
      */

+ 1 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/reimbursementAssess/domain/dto/AssessReimbursementBusinessReturnDTO.java

@@ -30,6 +30,7 @@ public class AssessReimbursementBusinessReturnDTO {
     private List<AssessReimbursementBusinessDTO> list;
     private List<ReimbursementAddressDTO> reimbursementFsalaryList; //实发类型列表
     private String reimbursementFsalary; //实发类型
+    private String reimbursementAddress;  //地区类型(0:正常报销;1:武汉)
 
     private String userId;  //报销人员id
     private String year; //报销年份

+ 4 - 1
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/reimbursementAssess/domain/dto/AssessReimbursementBusinessTwoDTO.java

@@ -21,6 +21,8 @@ public class AssessReimbursementBusinessTwoDTO extends BaseEntity {
     private String userId;  //报销人id
     @Excel(name = "报销人",width = 10)
     private String userName;  //报销人
+    @Excel(name = "报销人部门",width = 12)
+    private String userOfficeName; //报销人员所属部门
     @Excel(name = "报销年份",width = 10)
     private String year;    //报销年份
     private String reimbursementQuota;  //年报销额度
@@ -30,6 +32,8 @@ public class AssessReimbursementBusinessTwoDTO extends BaseEntity {
     private String reimbursementFsalary;  //实发类型(1:登记不实发;2:登记并实发)
     @Excel(name = "报销类型",width = 12)
     private String reimbursementTypeStr;  //报销类型(导出Str)
+    @Excel(name = "实发类型",width = 14)
+    private String reimbursementFsalaryStr;  //实发类型(1:登记不实发;2:登记并实发)(导出Str)
     @Excel(name = "报销天数",type = 10,width = 12)
     private String reimbursementDay;  //报销天数
     @Excel(name = "报销额度",type = 10,width = 12)
@@ -37,5 +41,4 @@ public class AssessReimbursementBusinessTwoDTO extends BaseEntity {
     private String remainReimbursementAmount;  //剩余报销额度
     private String remarks; //备注
     private String officeType; //部门类型(1:中审众环;2:兴光会计;3:兴光项目;4:兴光评估)
-    private String userOfficeName; //报销人员所属部门
 }

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

@@ -66,6 +66,7 @@
         a.year AS "year",
         a.reimbursement_day as "reimbursementDay",
         a.reimbursement_type AS "reimbursementType",
+        a.reimbursement_address AS "reimbursementAddress",
         a.reimbursement_fsalary AS "reimbursementFsalary",
         a.reimbursement_amount as "reimbursementAmount",
         a.office_type as "officeType"
@@ -291,6 +292,9 @@
             and a.user_id = #{userId}
             and a.year = #{year}
 
+            <if test="reimbursementAddress != null and reimbursementAddress != ''">
+                and a.reimbursement_address = #{reimbursementAddress}
+            </if>
             <if test="beginReimbursementQuota != null and beginReimbursementQuota != ''">
                 and a.reimbursement_amount >= #{beginReimbursementQuota}
             </if>

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

@@ -32,6 +32,7 @@
         a.reimbursement_type as 'reimbursementType',
         a.reimbursement_fsalary as 'reimbursementFsalary',
         (case when a.reimbursement_type = '1' then '正常报销' when a.reimbursement_type = '2' then '补差' else '' end) as reimbursementTypeStr,
+        (case when a.reimbursement_fsalary = '1' then '报销不实发' when a.reimbursement_fsalary = '2' then '报销并实发' else '' end) as reimbursementFsalaryStr,
         su.name as 'userName'
     </sql>
     <sql id="reimbursementUserJoinColumns">
@@ -112,7 +113,8 @@
             resultType="com.jeeplus.test.reimbursementAssess.domain.dto.AssessReimbursementDTO">
         select id,business_code as businessCode
         from zs_reimbursement_assess_info
-        where year = #{year} and business_code is not null and business_code != '' and reimbursement_ratio is not null and reimbursement_ratio !=''
+        where year = #{year} and del_flag = 0
+        and business_code is not null and business_code != '' and reimbursement_ratio is not null and reimbursement_ratio !=''
         group by business_code
     </select>
     <select id="findDataById"

+ 4 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/reimbursementAssess/service/impl/AssessReimbursementUserServiceImpl.java

@@ -185,6 +185,7 @@ public class AssessReimbursementUserServiceImpl implements AssessReimbursementUs
         reimbursementBusiness.setEndDate(reimbursementBusinessReturn.getEndDate());
         reimbursementBusiness.setBeginReimbursementQuota(reimbursementBusinessReturn.getBeginReimbursementQuota());
         reimbursementBusiness.setEndReimbursementQuota(reimbursementBusinessReturn.getEndReimbursementQuota());
+        reimbursementBusiness.setReimbursementAddress(reimbursementBusinessReturn.getReimbursementAddress());
         reimbursementBusiness.setReimbursementFsalary(reimbursementBusinessReturn.getReimbursementFsalary());
         reimbursementBusiness.setOfficeType(reimbursementBusinessReturn.getOfficeType());
 
@@ -195,6 +196,9 @@ public class AssessReimbursementUserServiceImpl implements AssessReimbursementUs
         for (AssessReimbursementBusinessDTO info : showList) {
             info.setReimbursementFsalary(DictUtils.getDictLabel(info.getReimbursementFsalary(), "reimbursement_fsalary", null));
             info.setOfficeType(DictUtils.getDictLabel(info.getOfficeType(), "reimbursement_office_type", null));
+            if(StringUtils.isBlank(info.getReimbursementAddress())){
+                info.setReimbursementAddress("—");
+            }
         }
 
         //获取人员年度报销详情

+ 1 - 1
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/reimbursementProject/controller/ProjectReimbursementBusinessTwoController.java

@@ -65,7 +65,7 @@ public class ProjectReimbursementBusinessTwoController {
     @ApiLog("绑定")
     @RequestMapping("modifyBindCode")
     @PreAuthorize("hasAuthority('project:reimbursementBusinessTwo:binding')")
-    public ResponseEntity modifyBindCode(@RequestParam("ids")String ids,@RequestParam("businessCode")String businessCode,@RequestParam("money")String money){
+    public ResponseEntity modifyBindCode(@RequestParam("ids")String ids,@RequestParam("businessCode")String businessCode){
         String[] split = ids.split(",");
         BigDecimal sum = new BigDecimal(0);
         if(split.length!=0){

+ 1 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/reimbursementProject/domain/dto/ProjectReimbursementBusinessDTO.java

@@ -35,6 +35,7 @@ public class ProjectReimbursementBusinessDTO extends BaseEntity {
     private String remarks; //备注
     private String officeType; //部门类型(1:中审众环;2:兴光会计;3:兴光项目;4:兴光评估)
     private String userOfficeName; //报销人员所属部门
+    private String reimbursementAddress;  //地区类型(0:正常报销;1:武汉)
     /**
      * 报销开始日期
      */

+ 1 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/reimbursementProject/domain/dto/ProjectReimbursementBusinessReturnDTO.java

@@ -29,6 +29,7 @@ public class ProjectReimbursementBusinessReturnDTO {
     private List<ProjectReimbursementBusinessDTO> list;
     private List<ReimbursementAddressDTO> reimbursementFsalaryList; //实发类型列表
     private String reimbursementFsalary; //实发类型
+    private String reimbursementAddress;  //地区类型(0:正常报销;1:武汉)
 
     private String userId;  //报销人员id
     private String year; //报销年份

+ 4 - 1
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/reimbursementProject/domain/dto/ProjectReimbursementBusinessTwoDTO.java

@@ -21,6 +21,8 @@ public class ProjectReimbursementBusinessTwoDTO extends BaseEntity {
     private String userId;  //报销人id
     @Excel(name = "报销人",width = 10)
     private String userName;  //报销人
+    @Excel(name = "报销人部门",width = 12)
+    private String userOfficeName; //报销人员所属部门
     @Excel(name = "报销年份",width = 10)
     private String year;    //报销年份
     private String reimbursementQuota;  //年报销额度
@@ -30,6 +32,8 @@ public class ProjectReimbursementBusinessTwoDTO extends BaseEntity {
     private String reimbursementFsalary;  //实发类型(1:登记不实发;2:登记并实发)
     @Excel(name = "报销类型",width = 12)
     private String reimbursementTypeStr;  //报销类型(导出Str)
+    @Excel(name = "实发类型",width = 14)
+    private String reimbursementFsalaryStr;  //实发类型(1:登记不实发;2:登记并实发)(导出Str)
     @Excel(name = "报销天数",type = 10,width = 12)
     private String reimbursementDay;  //报销天数
     @Excel(name = "报销额度",type = 10,width = 12)
@@ -37,5 +41,4 @@ public class ProjectReimbursementBusinessTwoDTO extends BaseEntity {
     private String remainReimbursementAmount;  //剩余报销额度
     private String remarks; //备注
     private String officeType; //部门类型(1:中审众环;2:兴光会计;3:兴光项目;4:兴光评估)
-    private String userOfficeName; //报销人员所属部门
 }

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

@@ -66,6 +66,7 @@
         a.year AS "year",
         a.reimbursement_day as "reimbursementDay",
         a.reimbursement_type AS "reimbursementType",
+        a.reimbursement_address AS "reimbursementAddress",
         a.reimbursement_fsalary AS "reimbursementFsalary",
         a.reimbursement_amount as "reimbursementAmount",
         a.office_type as "officeType"
@@ -291,6 +292,9 @@
             and a.user_id = #{userId}
             and a.year = #{year}
 
+            <if test="reimbursementAddress != null and reimbursementAddress != ''">
+                and a.reimbursement_address = #{reimbursementAddress}
+            </if>
             <if test="beginReimbursementQuota != null and beginReimbursementQuota != ''">
                 and a.reimbursement_amount >= #{beginReimbursementQuota}
             </if>

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

@@ -32,6 +32,7 @@
         a.reimbursement_type as 'reimbursementType',
         a.reimbursement_fsalary as 'reimbursementFsalary',
         (case when a.reimbursement_type = '1' then '正常报销' when a.reimbursement_type = '2' then '补差' else '' end) as reimbursementTypeStr,
+        (case when a.reimbursement_fsalary = '1' then '报销不实发' when a.reimbursement_fsalary = '2' then '报销并实发' else '' end) as reimbursementFsalaryStr,
         su.name as 'userName'
     </sql>
     <sql id="reimbursementUserJoinColumns">
@@ -112,7 +113,8 @@
             resultType="com.jeeplus.test.reimbursementProject.domain.dto.ProjectReimbursementDTO">
         select id,business_code as businessCode
         from zs_reimbursement_project_info
-        where year = #{year} and business_code is not null and business_code != '' and reimbursement_ratio is not null and reimbursement_ratio !=''
+        where year = #{year} and del_flag = 0
+        and business_code is not null and business_code != '' and reimbursement_ratio is not null and reimbursement_ratio !=''
         group by business_code
     </select>
     <select id="findDataById"

+ 4 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/reimbursementProject/service/impl/ProjectReimbursementUserServiceImpl.java

@@ -184,6 +184,7 @@ public class ProjectReimbursementUserServiceImpl implements ProjectReimbursement
         reimbursementBusiness.setEndDate(reimbursementBusinessReturn.getEndDate());
         reimbursementBusiness.setBeginReimbursementQuota(reimbursementBusinessReturn.getBeginReimbursementQuota());
         reimbursementBusiness.setEndReimbursementQuota(reimbursementBusinessReturn.getEndReimbursementQuota());
+        reimbursementBusiness.setReimbursementAddress(reimbursementBusinessReturn.getReimbursementAddress());
         reimbursementBusiness.setReimbursementFsalary(reimbursementBusinessReturn.getReimbursementFsalary());
         reimbursementBusiness.setOfficeType(reimbursementBusinessReturn.getOfficeType());
 
@@ -194,6 +195,9 @@ public class ProjectReimbursementUserServiceImpl implements ProjectReimbursement
         for (ProjectReimbursementBusinessDTO info : showList) {
             info.setReimbursementFsalary(DictUtils.getDictLabel(info.getReimbursementFsalary(), "reimbursement_fsalary", null));
             info.setOfficeType(DictUtils.getDictLabel(info.getOfficeType(), "reimbursement_office_type", null));
+            if(StringUtils.isBlank(info.getReimbursementAddress())){
+                info.setReimbursementAddress("—");
+            }
         }
 
         //获取人员年度报销详情

+ 134 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/reimbursementsys/controller/ReimbursementBusinessTwoController.java

@@ -0,0 +1,134 @@
+package com.jeeplus.test.reimbursementsys.controller;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.google.common.collect.Lists;
+import com.jeeplus.aop.logging.annotation.ApiLog;
+import com.jeeplus.core.excel.ExcelOptions;
+import com.jeeplus.core.excel.ExportMode;
+import com.jeeplus.core.excel.utils.EasyPoiUtil;
+import com.jeeplus.test.reimbursementsys.domain.dto.ReimbursementBusinessTwoDTO;
+import com.jeeplus.test.reimbursementsys.domain.dto.ReimbursementDTO;
+import com.jeeplus.test.reimbursementsys.service.ReimbursementBusinessService;
+import com.jeeplus.test.reimbursementsys.service.ReimbursementBusinessTwoService;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.ResponseEntity;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletResponse;
+import java.math.BigDecimal;
+import java.util.List;
+import java.util.stream.Collectors;
+
+@RestController
+@RequestMapping("/reimbursementBusinessTwo")
+public class ReimbursementBusinessTwoController {
+
+    @Autowired
+    private ReimbursementBusinessTwoService reimbursementBusinessTwoService;
+    @Autowired
+    private ReimbursementBusinessService reimbursementBusinessService;
+
+    @ApiLog("查询无票报销列表")
+    @RequestMapping("findListPage")
+    public ResponseEntity findListPage(ReimbursementBusinessTwoDTO reimbursementBusinessTwoDTO,Page<ReimbursementBusinessTwoDTO> page){
+        IPage<ReimbursementBusinessTwoDTO> listPage = reimbursementBusinessTwoService.findListPage(page, reimbursementBusinessTwoDTO);
+        return ResponseEntity.ok(listPage);
+    }
+
+    @ApiLog("根据id物理删除")
+    @RequestMapping("delById/{id}")
+    @PreAuthorize("hasAuthority('reimbursementBusinessTwo:del')")
+    public ResponseEntity delById(@PathVariable("id")String ids){
+        String idArray[] =ids.split(",");
+        reimbursementBusinessTwoService.deleteByList ( Lists.newArrayList (idArray) );
+        return ResponseEntity.ok("删除成功!");
+    }
+
+    @ApiLog("新增")
+    @RequestMapping("addData")
+    @PreAuthorize("hasAuthority('reimbursementBusinessTwo:add')")
+    public ResponseEntity addData(@RequestBody ReimbursementBusinessTwoDTO reimbursementBusinessTwoDTO){
+        reimbursementBusinessTwoService.addData(reimbursementBusinessTwoDTO);
+        return ResponseEntity.ok("添加成功");
+    }
+
+    @ApiLog("下拉列表")
+    @RequestMapping("findSelectList")
+    public ResponseEntity findSelectList(){
+        return ResponseEntity.ok(reimbursementBusinessTwoService.findSelectList());
+    }
+
+    @ApiLog("绑定")
+    @RequestMapping("modifyBindCode")
+    @PreAuthorize("hasAuthority('reimbursementBusinessTwo:binding')")
+    public ResponseEntity modifyBindCode(@RequestParam("ids")String ids,@RequestParam("businessCode")String businessCode,@RequestParam("reimbursementAddress")String reimbursementAddress){
+        String[] split = ids.split(",");
+        BigDecimal sum = new BigDecimal(0);
+        if(split.length!=0){
+            for (int i = 0; i < split.length; i++) {
+                ReimbursementBusinessTwoDTO dataById = reimbursementBusinessTwoService.findDataById(split[i]);
+                sum = sum.add(new BigDecimal(dataById.getReimbursementAmount()));
+            }
+        }else{
+            ReimbursementBusinessTwoDTO dataById = reimbursementBusinessTwoService.findDataById(ids);
+            sum = new BigDecimal(dataById.getReimbursementAmount());
+        }
+        ReimbursementDTO businessById = reimbursementBusinessService.getBindingBusinessById(businessCode,reimbursementAddress);
+        if(new BigDecimal(businessById.getSurplusReimbursementAmount()).compareTo(sum)<0){
+            return ResponseEntity.ok(false);
+        }
+        if(split.length!=0){
+            for (int i = 0; i < split.length; i++) {
+                reimbursementBusinessTwoService.modifyBindCode(split[i],businessCode,reimbursementAddress);
+            }
+        }else{
+            reimbursementBusinessTwoService.modifyBindCode(ids,businessCode,reimbursementAddress);
+        }
+
+        return ResponseEntity.ok("成功");
+    }
+
+    @ApiLog("展示下拉列表所有年份")
+    @RequestMapping("findSelectYearList")
+    public ResponseEntity findSelectYearList(){
+        return ResponseEntity.ok(reimbursementBusinessTwoService.findSelectYearList());
+    }
+
+    @ApiLog("根据年份展示所有编号")
+    @RequestMapping("findSelectCodeListByYear")
+    public ResponseEntity findSelectCodeListByYear(String selectedYear, String reimbursementAddress){
+        return ResponseEntity.ok(reimbursementBusinessTwoService.findSelectCodeListByYear(selectedYear, reimbursementAddress));
+    }
+
+
+    /**
+     * 导出兴光项目无票报销信息数据
+     * @param reimbursementUserDTO
+     * @param page
+     * @param response
+     * @throws Exception
+     */
+    @ApiLog("导出兴光项目无票报销信息数据")
+    @GetMapping("export")
+    @ApiOperation(value = "导出兴光项目无票报销信息数据excel")
+    public void exportFile(ReimbursementBusinessTwoDTO reimbursementUserDTO, Page <ReimbursementBusinessTwoDTO> page, ExcelOptions options, HttpServletResponse response) {
+        String fileName = options.getFilename ( );
+
+        List<ReimbursementBusinessTwoDTO> result;
+        if ( ExportMode.current.equals ( options.getMode ( ) ) ) {
+            result = reimbursementBusinessTwoService.findListPage ( page, reimbursementUserDTO ).getRecords();
+        } else if ( ExportMode.selected.equals ( options.getMode ( ) ) ) {
+            result = reimbursementBusinessTwoService.findListPage ( page, reimbursementUserDTO ).getRecords().stream ( ).filter ( reimbursement ->
+                    options.getSelectIds ( ).contains ( reimbursement.getId ( ) )
+            ).collect ( Collectors.toList ( ) );
+        } else {
+            page.setSize ( -1 );
+            page.setCurrent ( 0 );
+            result = reimbursementBusinessTwoService.findListPage ( page, reimbursementUserDTO ).getRecords();
+        }
+        EasyPoiUtil.exportExcel ( result, "兴光项目无票报销信息数据",  options.getSheetName ( ), ReimbursementBusinessTwoDTO.class, fileName, response );
+    }
+}

+ 44 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/reimbursementsys/domain/dto/ReimbursementBusinessTwoDTO.java

@@ -0,0 +1,44 @@
+package com.jeeplus.test.reimbursementsys.domain.dto;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.jeeplus.core.domain.BaseEntity;
+import lombok.*;
+import lombok.experimental.Accessors;
+
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@Getter
+@Setter
+@Accessors(chain = true)
+@EqualsAndHashCode(callSuper = false)
+@TableName("zs_reimbursement_business_info")
+public class ReimbursementBusinessTwoDTO extends BaseEntity {
+
+    private String businessCode;  //业务编号
+    private String businessCodeId;  //业务编号Id
+    private String userId;  //报销人id
+    @Excel(name = "报销人",width = 10)
+    private String userName;  //报销人
+    @Excel(name = "报销人部门",width = 12)
+    private String userOfficeName; //报销人员所属部门
+    @Excel(name = "报销年份",width = 10)
+    private String year;    //报销年份
+    private String reimbursementQuota;  //年报销额度
+    private String reimbursementQuotaDay;  //日报销额度
+    private String surplusReimbursementDay;  //剩余报销天数
+    private String reimbursementType;  //报销类型(1:正常报销;2:补差)
+    private String reimbursementFsalary;  //实发类型(1:登记不实发;2:登记并实发)
+    @Excel(name = "报销类型",width = 12)
+    private String reimbursementTypeStr;  //报销类型(导出Str)
+    @Excel(name = "实发类型",width = 14)
+    private String reimbursementFsalaryStr;  //实发类型(1:登记不实发;2:登记并实发)(导出Str)
+    @Excel(name = "报销天数",type = 10,width = 12)
+    private String reimbursementDay;  //报销天数
+    @Excel(name = "报销额度",type = 10,width = 12)
+    private String reimbursementAmount;  //报销额度
+    private String remainReimbursementAmount;  //剩余报销额度
+    private String remarks; //备注
+    private String officeType; //部门类型(1:中审众环;2:兴光会计;3:兴光项目;4:兴光评估)
+}

+ 67 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/reimbursementsys/mapper/ReimbursementBusinessTwoMapper.java

@@ -0,0 +1,67 @@
+package com.jeeplus.test.reimbursementsys.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.jeeplus.test.reimbursementsys.domain.dto.ReimbursementBusinessTwoDTO;
+import com.jeeplus.test.reimbursementsys.domain.dto.ReimbursementDTO;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+
+@Mapper
+public interface ReimbursementBusinessTwoMapper extends BaseMapper<ReimbursementBusinessTwoDTO> {
+
+    /**
+     * 分页查询
+     */
+    IPage<ReimbursementBusinessTwoDTO> findListPage(Page<ReimbursementBusinessTwoDTO> page,
+                                                              @Param("reimbursementBusiness")ReimbursementBusinessTwoDTO reimbursementBusiness);
+
+    /**
+     * 物理删除
+     * @param id
+     */
+    void delPhysicsById(@Param("id")String id);
+    /**
+     * 物理删除
+     * @param idList
+     */
+    void deleteByList(@Param("idList")List <String> idList);
+
+    /**
+     * 新增
+     */
+    void insertReimbursementBusiness(ReimbursementBusinessTwoDTO reimbursementBusiness);
+
+    /**
+     * 修改
+     */
+    void modifyBindCode(@Param("ids")String ids,@Param("businessCode")String businessCode, @Param("reimbursementAddress")String reimbursementAddress);
+
+    /**
+     * 下拉菜单
+     */
+    List<ReimbursementDTO> findSelectList();
+
+
+    List<String> findSelectYearList();
+
+    /**
+     * 根据年份获取分所报销批次信息
+     * @param year
+     * @return
+     */
+    List<ReimbursementDTO> findSelectCodeListByYear(String year);
+
+    /**
+     * 根据年份获取总所报销批次信息
+     * @param year
+     * @return
+     */
+    List<ReimbursementDTO> findSelectCodeListByYearOnWuHan(String year);
+
+    ReimbursementBusinessTwoDTO findDataById(@Param("id")String id);
+}

+ 15 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/reimbursementsys/mapper/ReimbursementSysMapper.java

@@ -239,4 +239,19 @@ public interface ReimbursementSysMapper  extends BaseMapper<ReimbursementDTO> {
      * @param reimbursement
      */
     int updateById(ReimbursementDTO reimbursement);
+
+
+    /**
+     * 根据父id查询已收款的发票信息的首款额度总和
+     * @param parentId
+     * @return
+     */
+    String getReceiptInvoiceIncomeByBindingReimbursementId(@Param("parentId")String parentId,@Param("reimbursementAddress")String reimbursementAddress);
+
+    /**
+     * 根据业务id查询报销比例
+     * @param id
+     * @return
+     */
+    String getReimbursementRatioByBindingReimbursementId(@Param("id")String id,@Param("reimbursementAddress")String reimbursementAddress);
 }

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

@@ -333,7 +333,7 @@
     <select id="getReimbursementAddressByUserIdAndYear" resultType="com.jeeplus.test.reimbursementsys.domain.dto.ReimbursementAddressDTO">
         SELECT
         a.reimbursement_address AS "value",
-        (case when a.reimbursement_address = '0' then '分所报销' when a.reimbursement_address = '1' then '总所报销' else 0 end) as "label"
+        (case when a.reimbursement_address = '0' then '分所报销' when a.reimbursement_address = '1' then '总所报销' end) as "label"
         FROM zs_reimbursement_business_info a
         <include refid="reimbursementUserJoinColumns"/>
         left join zs_reimbursement_info zri on zri.id = a.business_code_id

+ 170 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/reimbursementsys/mapper/xml/ReimbursementBusinessTwoMapper.xml

@@ -0,0 +1,170 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.jeeplus.test.reimbursementsys.mapper.ReimbursementBusinessTwoMapper">
+    <sql id="zsReimbursementBusinessInfoColumns">
+        a.id as 'id',
+        a.create_by as 'createBy',
+        a.create_date as 'createDate',
+        a.update_by as 'updateBy',
+        a.update_date as 'updateDate',
+        a.remarks as 'remarks',
+        a.del_flag as 'delFlag',
+        a.business_code_id as 'businessCodeId',
+        a.user_id as 'userId',
+        a.year as 'year',
+        a.reimbursement_day as 'reimbursementDay',
+        a.reimbursement_amount as 'reimbursementAmount',
+        a.reimbursement_type as 'reimbursementType'
+    </sql>
+    <sql id="joinZsReimbursementBusinessInfoColumns">
+        a.id as 'id',
+        a.create_by as 'createBy',
+        a.create_date as 'createDate',
+        a.update_by as 'updateBy',
+        a.update_date as 'updateDate',
+        a.remarks as 'remarks',
+        a.del_flag as 'delFlag',
+        a.business_code_id as 'businessCodeId',
+        a.user_id as 'userId',
+        a.year as 'year',
+        a.reimbursement_day as 'reimbursementDay',
+        a.reimbursement_amount as 'reimbursementAmount',
+        a.reimbursement_type as 'reimbursementType',
+        a.reimbursement_fsalary as 'reimbursementFsalary',
+        (case when a.reimbursement_type = '1' then '正常报销' when a.reimbursement_type = '2' then '补差' else '' end) as reimbursementTypeStr,
+        (case when a.reimbursement_fsalary = '1' then '报销不实发' when a.reimbursement_fsalary = '2' then '报销并实发' else '' end) as reimbursementFsalaryStr,
+        su.name as 'userName'
+    </sql>
+    <sql id="reimbursementUserJoinColumns">
+        left join sys_user su on su.id = a.user_id
+    </sql>
+    <insert id="insertReimbursementBusiness">
+        insert into zs_reimbursement_business_info
+        (
+                    id,
+            create_by,
+            create_date,
+            update_by,
+            update_date,
+            remarks,
+            del_flag,
+            business_code_id,
+            user_id,
+            year,
+            <if test="reimbursementDay != null and reimbursementDay != ''">
+                reimbursement_day,
+            </if>
+            reimbursement_amount,
+            reimbursement_type,
+            reimbursement_fsalary,
+            office_type
+        )
+        values
+        (
+                    #{id},
+            #{createBy},
+            #{createDate},
+            #{updateBy},
+            #{updateDate},
+            #{remarks},
+            #{delFlag},
+            #{businessCodeId},
+            #{userId},
+            #{year},
+            <if test="reimbursementDay != null and reimbursementDay != ''">
+                #{reimbursementDay},
+            </if>
+            #{reimbursementAmount},
+            #{reimbursementType},
+            #{reimbursementFsalary},
+            #{officeType}
+        )
+    </insert>
+
+    <select id="findListPage"
+            resultType="com.jeeplus.test.reimbursementsys.domain.dto.ReimbursementBusinessTwoDTO">
+        select
+        <include refid="joinZsReimbursementBusinessInfoColumns"/>
+        ,(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
+        <where>
+            a.del_flag = 0 and (a.business_code_id='' or a.business_code_id=null)
+            <if test="reimbursementBusiness.year != null and reimbursementBusiness.year != ''">
+                and a.year like concat('%',#{reimbursementBusiness.year},'%')
+            </if>
+            <if test="reimbursementBusiness.userId != null and reimbursementBusiness.userId != ''">
+                and a.user_id = #{reimbursementBusiness.userId}
+            </if>
+            and a.office_type = #{reimbursementBusiness.officeType}
+        </where>
+        order by a.update_date desc,a.year desc, a.user_id asc
+    </select>
+    <select id="findSelectList"
+            resultType="com.jeeplus.test.reimbursementsys.domain.dto.ReimbursementDTO">
+
+        select id,business_code as businessCode from zs_reimbursement_info where business_code is not null and business_code != '' group by business_code
+    </select>
+    <select id="findSelectYearList" resultType="java.lang.String">
+        select year from (
+            SELECT year FROM `zs_reimbursement_info`
+            UNION all
+            SELECT year FROM `zs_wuhan_reimbursement_info`
+            ) a
+        GROUP BY a.year order by a.year desc
+    </select>
+    <select id="findSelectCodeListByYear"
+            resultType="com.jeeplus.test.reimbursementsys.domain.dto.ReimbursementDTO">
+        select id,business_code as businessCode
+        from zs_reimbursement_info
+        where year = #{year} and del_flag = 0
+        and business_code is not null and business_code != '' and reimbursement_ratio is not null and reimbursement_ratio !=''
+        group by business_code
+    </select>
+
+    <select id="findSelectCodeListByYearOnWuHan"
+            resultType="com.jeeplus.test.reimbursementsys.domain.dto.ReimbursementDTO">
+        select id,business_code as businessCode
+        from zs_wuhan_reimbursement_info
+        where year = #{year} and del_flag = 0
+        and business_code is not null and business_code != '' and reimbursement_ratio is not null and reimbursement_ratio !=''
+        group by business_code
+    </select>
+
+    <select id="findDataById"
+            resultType="com.jeeplus.test.reimbursementsys.domain.dto.ReimbursementBusinessTwoDTO">
+        select
+        <include refid="zsReimbursementBusinessInfoColumns"/>
+        from zs_reimbursement_business_info a
+        where id=#{id}
+    </select>
+
+
+    <delete id="delPhysicsById">
+        delete from zs_reimbursement_business_info
+        where id = #{id}
+    </delete>
+
+    <delete id="deleteByList">
+        delete from zs_reimbursement_business_info
+        <where>
+            <if test="idList != null and idList.size>0">
+                and id in
+                <foreach collection="idList" item="id" separator="," open="(" close=")">
+                    #{id}
+                </foreach>
+            </if>
+        </where>
+    </delete>
+
+    <update id="modifyBindCode">
+        update zs_reimbursement_business_info
+        set
+                business_code_id=#{businessCode},
+                reimbursement_address = #{reimbursementAddress}
+        where id=#{ids}
+    </update>
+
+
+</mapper>

+ 39 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/reimbursementsys/mapper/xml/ReimbursementSysMapper.xml

@@ -572,4 +572,43 @@
         id = #{id} and del_flag = 0
     </update>
 
+
+
+    <select id="getReceiptInvoiceIncomeByBindingReimbursementId" resultType="java.lang.String">
+        SELECT
+        ifnull(sum(a.income),0) as "income"
+        <choose>
+            <when test="reimbursementAddress == 0">
+                FROM zs_reimbursement_invoice_info a
+            </when>
+            <otherwise>
+                FROM zs_wuhan_reimbursement_invoice_info a
+            </otherwise>
+        </choose>
+        <where>
+            a.del_flag = 0
+            and a.parent_id =#{parentId}
+            and a.gathering_time is not null
+        </where>
+        order by a.invoice_number asc ,a.sort asc
+    </select>
+
+    <select id="getReimbursementRatioByBindingReimbursementId" resultType="java.lang.String">
+        SELECT
+        a.reimbursement_ratio as "reimbursementRatio"
+        <choose>
+            <when test="reimbursementAddress == 0">
+                FROM zs_reimbursement_info a
+            </when>
+            <otherwise>
+                FROM zs_wuhan_reimbursement_info a
+            </otherwise>
+        </choose>
+        <where>
+            a.del_flag = 0
+            and a.id =#{id}
+        </where>
+        order by a.business_code asc ,a.sort asc
+    </select>
+
 </mapper>

+ 3 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/reimbursementsys/mapper/xml/WuHanReimbursementBusinessMapper.xml

@@ -305,6 +305,9 @@
             <if test="reimbursementAddress != null and reimbursementAddress != ''">
                 and a.reimbursement_address = #{reimbursementAddress}
             </if>
+            <if test="reimbursementAddress != null and reimbursementAddress != ''">
+                and a.reimbursement_address = #{reimbursementAddress}
+            </if>
             <if test="reimbursementFsalary != null and reimbursementFsalary != ''">
                 and a.reimbursement_fsalary = #{reimbursementFsalary}
             </if>

+ 7 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/reimbursementsys/service/ReimbursementBusinessService.java

@@ -30,6 +30,13 @@ public interface ReimbursementBusinessService {
     ReimbursementDTO getBusinessById(String id);
 
     /**
+     * 查询业务报销额度相关信息
+     * @param id
+     * @return
+     */
+    ReimbursementDTO getBindingBusinessById(String id,String reimbursementAddress);
+
+    /**
      * 查询武汉业务报销额度相关信息
      * @param id
      * @return

+ 34 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/reimbursementsys/service/ReimbursementBusinessTwoService.java

@@ -0,0 +1,34 @@
+package com.jeeplus.test.reimbursementsys.service;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.jeeplus.test.reimbursementsys.domain.dto.ReimbursementBusinessTwoDTO;
+import com.jeeplus.test.reimbursementsys.domain.dto.ReimbursementDTO;
+
+import java.util.List;
+
+public interface ReimbursementBusinessTwoService {
+
+    IPage<ReimbursementBusinessTwoDTO> findListPage(Page<ReimbursementBusinessTwoDTO> page,
+                                                    ReimbursementBusinessTwoDTO reimbursementBusiness);
+
+    void delPhysicsById(String id);
+
+    /**
+     * 根据发票id删除发票信息(逻辑删除)
+     * @param idList
+     */
+    void deleteByList(List <String> idList);
+
+    void addData(ReimbursementBusinessTwoDTO reimbursementBusinessTwoDTO);
+
+    List<ReimbursementDTO> findSelectList();
+
+    void modifyBindCode(String ids,String businessCode,String reimbursementAddress);
+
+    List<String> findSelectYearList();
+
+    List<ReimbursementDTO> findSelectCodeListByYear(String year, String reimbursementAddress);
+
+    ReimbursementBusinessTwoDTO findDataById(String id);
+}

+ 29 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/reimbursementsys/service/impl/ReimbursementBusinessServiceImpl.java

@@ -72,6 +72,35 @@ public class ReimbursementBusinessServiceImpl implements ReimbursementBusinessSe
         reimbursement.setSurplusReimbursementAmount(canReimbursementAmount.subtract(allAlreadyReimbursementQuota).toString());
         return reimbursement;
     }
+
+
+    @Override
+    public ReimbursementDTO getBindingBusinessById(String id,String reimbursementAddress) {
+        ReimbursementDTO reimbursement = new ReimbursementDTO();
+        reimbursement.setBusinessCodeId(id);
+        ReimbursementBusinessDTO reimbursementBusiness = new ReimbursementBusinessDTO();
+        reimbursementBusiness.setBusinessCodeId(id);
+        reimbursementBusiness.setReimbursementAddress(reimbursementAddress);
+        //根据业务id查询已收款的发票信息收款总额
+        String getReceiptInvoiceByReimbursementId = reimbursementSysMapper.getReceiptInvoiceIncomeByBindingReimbursementId(id,reimbursementAddress);
+        BigDecimal income = new BigDecimal(getReceiptInvoiceByReimbursementId);    //发票收入
+        //根据业务id查询报销比例
+        String getReimbursementRatioByReimbursementId = reimbursementSysMapper.getReimbursementRatioByBindingReimbursementId(id,reimbursementAddress);
+        if(StringUtils.isBlank(getReimbursementRatioByReimbursementId)){
+            getReimbursementRatioByReimbursementId = "0";
+            reimbursement.setReimbursementRatio("0");
+        }
+        BigDecimal reimbursementRatio = new BigDecimal(getReimbursementRatioByReimbursementId);    //报销比例
+        BigDecimal canReimbursementAmount = income.multiply(reimbursementRatio).divide(new BigDecimal("100")).setScale(2, BigDecimal.ROUND_HALF_UP);    //该项目可报销额度计算
+        //查询该业务总报销额度
+        String alreadyReimbursementQuotaByBusinessCodeId = mapper.getAlreadyReimbursementQuotaByBusinessCodeId(reimbursementBusiness);
+        BigDecimal allAlreadyReimbursementQuota = new BigDecimal(alreadyReimbursementQuotaByBusinessCodeId);    //总报销额度
+        reimbursement.setAllAlreadyReimbursementQuota(allAlreadyReimbursementQuota.toString());
+        reimbursement.setCanReimbursementAmount(canReimbursementAmount.toString());
+        reimbursement.setSurplusReimbursementAmount(canReimbursementAmount.subtract(allAlreadyReimbursementQuota).toString());
+        return reimbursement;
+    }
+
     //武汉
     @Override
     public WuHanReimbursementDTO getWuHanBusinessById(String id) {

+ 109 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/reimbursementsys/service/impl/ReimbursementBusinessTwoServiceImpl.java

@@ -0,0 +1,109 @@
+package com.jeeplus.test.reimbursementsys.service.impl;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.jeeplus.sys.utils.StringUtils;
+import com.jeeplus.test.reimbursementsys.domain.dto.ReimbursementBusinessTwoDTO;
+import com.jeeplus.test.reimbursementsys.domain.dto.ReimbursementDTO;
+import com.jeeplus.test.reimbursementsys.mapper.ReimbursementBusinessTwoMapper;
+import com.jeeplus.test.reimbursementsys.service.ReimbursementBusinessService;
+import com.jeeplus.test.reimbursementsys.service.ReimbursementBusinessTwoService;
+import org.apache.commons.compress.utils.Lists;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.List;
+
+@Service
+@Transactional(readOnly = true)
+public class ReimbursementBusinessTwoServiceImpl implements ReimbursementBusinessTwoService {
+
+    @Autowired
+    private ReimbursementBusinessTwoMapper reimbursementBusinessTwoMapper;
+    @Autowired
+    private ReimbursementBusinessService reimbursementBusinessService;
+    @Autowired
+    private WuHanReimbursementBusinessServiceImpl wuHanReimbursementBusinessService;
+
+
+    @Override
+    public IPage<ReimbursementBusinessTwoDTO> findListPage(Page<ReimbursementBusinessTwoDTO> page, ReimbursementBusinessTwoDTO reimbursementBusiness) {
+        return reimbursementBusinessTwoMapper.findListPage(page,reimbursementBusiness);
+    }
+
+    @Transactional(readOnly = false)
+    @Override
+    public void delPhysicsById(String id) {
+        reimbursementBusinessTwoMapper.delPhysicsById(id);
+    }
+
+    @Transactional(readOnly = false)
+    @Override
+    public void deleteByList(List <String> idList) {//删除发票信息
+        if(idList.size()>0){
+            reimbursementBusinessTwoMapper.deleteByList(idList);
+        }
+    }
+
+    @Transactional(readOnly = false)
+    @Override
+    public void addData(ReimbursementBusinessTwoDTO reimbursementBusinessTwoDTO) {
+        reimbursementBusinessTwoDTO.preInsert();
+        reimbursementBusinessTwoMapper.insertReimbursementBusiness(reimbursementBusinessTwoDTO);
+    }
+
+    @Override
+    public List<ReimbursementDTO> findSelectList() {
+        return reimbursementBusinessTwoMapper.findSelectList();
+    }
+
+    @Transactional(readOnly = false)
+    @Override
+    public void modifyBindCode(String ids,String businessCode,String reimbursementAddress) {
+        reimbursementBusinessTwoMapper.modifyBindCode(ids,businessCode,reimbursementAddress);
+    }
+
+    @Override
+    public List<String> findSelectYearList() {
+        return reimbursementBusinessTwoMapper.findSelectYearList();
+    }
+
+    @Override
+    public List<ReimbursementDTO> findSelectCodeListByYear(String year, String reimbursementAddress) {
+        List<ReimbursementDTO> selectCodeListByYear = Lists.newArrayList();
+        if(StringUtils.isBlank(year) || StringUtils.isBlank(reimbursementAddress)){
+            return selectCodeListByYear;
+        }
+        switch (reimbursementAddress){
+            case "0":
+                selectCodeListByYear = reimbursementBusinessTwoMapper.findSelectCodeListByYear(year);
+                selectCodeListByYear.forEach(s->{
+                    ReimbursementDTO businessById = reimbursementBusinessService.getBusinessById(s.getId());
+                    if(null != businessById){
+                        s.setAllAlreadyReimbursementQuota(businessById.getAllAlreadyReimbursementQuota());
+                        s.setCanReimbursementAmount(businessById.getCanReimbursementAmount());
+                        s.setSurplusReimbursementAmount(businessById.getSurplusReimbursementAmount());
+                    }
+                });
+                break;
+            case "1":
+                selectCodeListByYear = reimbursementBusinessTwoMapper.findSelectCodeListByYearOnWuHan(year);
+                selectCodeListByYear.forEach(s->{
+                    ReimbursementDTO businessById = wuHanReimbursementBusinessService.getBusinessById(s.getId());
+                    if(null != businessById){
+                        s.setAllAlreadyReimbursementQuota(businessById.getAllAlreadyReimbursementQuota());
+                        s.setCanReimbursementAmount(businessById.getCanReimbursementAmount());
+                        s.setSurplusReimbursementAmount(businessById.getSurplusReimbursementAmount());
+                    }
+                });
+                break;
+        }
+        return selectCodeListByYear;
+    }
+
+    @Override
+    public ReimbursementBusinessTwoDTO findDataById(String id) {
+        return reimbursementBusinessTwoMapper.findDataById(id);
+    }
+}

+ 3 - 3
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/reimbursementsys/service/impl/ReimbursementUserServiceImpl.java

@@ -218,13 +218,13 @@ public class ReimbursementUserServiceImpl implements ReimbursementUserService {
 
         ReimbursementBusinessReturnDTO reimbursementBusinessReturnDTO = new ReimbursementBusinessReturnDTO();
         List<ReimbursementBusinessDTO> showList = businessMapper.findListByUserIdAndYear(reimbursementBusiness);
-        //获取报销来源集合
-        List<ReimbursementAddressDTO> reimbursementAddressList = businessMapper.getReimbursementAddressByUserIdAndYear(reimbursementBusiness);
-        reimbursementBusinessReturnDTO.setReimbursementAddressList(reimbursementAddressList);
 
         for (ReimbursementBusinessDTO info : showList) {
             info.setReimbursementFsalary(DictUtils.getDictLabel(info.getReimbursementFsalary(), "reimbursement_fsalary", null));
             info.setOfficeType(DictUtils.getDictLabel(info.getOfficeType(), "reimbursement_office_type", null));
+            if(StringUtils.isBlank(info.getReimbursementAddress())){
+                info.setReimbursementAddress("—");
+            }
         }
         //获取人员年度报销详情
         ReimbursementUserDTO reimbursementUserInfo = mapper.queryByUserIdAndYear(reimbursementUserDTO);