sangwenwei 1 год назад
Родитель
Сommit
13b41e1df9
70 измененных файлов с 1226 добавлено и 112 удалено
  1. 75 0
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/borrow/controller/BorrowController.java
  2. 3 0
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/borrow/domain/Refund.java
  3. 26 0
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/borrow/domain/RefundHis.java
  4. 4 0
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/borrow/mapper/BorrowMapper.java
  5. 10 0
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/borrow/mapper/RefundHisMapper.java
  6. 3 0
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/borrow/mapper/RefundMapper.java
  7. 19 4
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/borrow/mapper/xml/BorrowMapper.xml
  8. 107 10
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/borrow/service/BorrowService.java
  9. 16 0
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/borrow/service/dto/BorrowDTO.java
  10. 32 0
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/drive/controller/DriveController.java
  11. 31 0
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/drive/controller/DriveInfoController.java
  12. 31 0
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/drive/controller/DriveMaintainController.java
  13. 3 0
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/drive/domain/DriveInfo.java
  14. 2 0
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/drive/mapper/xml/DriveMaintainMapper.xml
  15. 1 0
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/drive/mapper/xml/JyDriveApplyMapper.xml
  16. 12 1
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/drive/service/dto/DriveApplyDTO.java
  17. 11 0
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/drive/service/dto/DriveMaintainDTO.java
  18. 31 0
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/evection/controller/EvectionController.java
  19. 1 0
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/evection/mapper/xml/EvectionMapper.xml
  20. 4 2
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/evection/service/EvectionService.java
  21. 12 1
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/evection/service/dto/EvectionDTO.java
  22. 32 0
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/goOut/controller/GoOutController.java
  23. 1 0
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/goOut/mapper/xml/GoOutMapper.xml
  24. 4 2
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/goOut/service/GoOutService.java
  25. 10 1
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/goOut/service/dto/GoOutDTO.java
  26. 32 0
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/holiday/controller/HolidayController.java
  27. 3 0
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/holiday/mapper/xml/HolidayMapper.xml
  28. 4 2
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/holiday/service/HolidayService.java
  29. 12 1
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/holiday/service/dto/HolidayDTO.java
  30. 30 0
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/inscription/controller/InscriptionController.java
  31. 1 0
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/inscription/mapper/xml/InscriptionMapper.xml
  32. 9 0
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/inscription/service/dto/InscriptionDTO.java
  33. 31 0
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/meetingRoom/controller/MeetingRoomController.java
  34. 13 0
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/meetingRoom/domain/MeetingRoom.java
  35. 4 0
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/meetingRoom/mapper/xml/MeetingRoomMapper.xml
  36. 33 0
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/notify/controller/JyNotifyController.java
  37. 2 0
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/notify/mapper/JyNotifyMapper.java
  38. 41 0
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/notify/mapper/xml/NotifyMapper.xml
  39. 10 0
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/notify/service/JyNotifyService.java
  40. 12 0
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/notify/service/dto/JyNotifyDTO.java
  41. 33 0
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/payment/controller/PaymentController.java
  42. 2 2
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/payment/mapper/xml/PaymentMapper.xml
  43. 1 0
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/payment/service/PaymentService.java
  44. 12 0
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/payment/service/dto/PaymentDTO.java
  45. 30 0
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/project/controller/JyProjectController.java
  46. 43 0
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/project/domain/JyProject.java
  47. 9 0
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/project/mapper/xml/ProjectListMapper.xml
  48. 65 0
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/project/service/JyProjectService.java
  49. 32 0
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/reimbursement/controller/JyReimbursementInfoController.java
  50. 1 0
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/reimbursement/mapper/xml/JyReimbursementInfoBorrowMapper.xml
  51. 5 4
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/reimbursement/mapper/xml/JyReimbursementInfoMapper.xml
  52. 10 7
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/reimbursement/service/dto/JyReimbursementInfoDTO.java
  53. 34 2
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/useSeal/controller/SignetController.java
  54. 5 0
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/useSeal/domain/Signet.java
  55. 3 0
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/useSeal/mapper/xml/SignetMapper.xml
  56. 24 28
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/useSeal/service/SignetService.java
  57. 11 0
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/useSeal/service/dto/SignetDTO.java
  58. 33 16
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/workClientInfo/controller/JyWorkClientController.java
  59. 17 0
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/workClientInfo/domain/JyWorkClientInfo.java
  60. 2 1
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/workClientInfo/mapper/JyWorkClientBankMapper.java
  61. 5 2
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/workClientInfo/mapper/xml/JyWorkClientInfoMapper.xml
  62. 24 6
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/workClientInfo/service/JyWorkClientService.java
  63. 33 14
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/workContractInfo/controller/JyWorkContractController.java
  64. 17 0
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/workContractInfo/domain/JyWorkContractInfo.java
  65. 3 0
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/workContractInfo/mapper/xml/JyWorkContractInfoMapper.xml
  66. 14 1
      jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/workContractInfo/service/JyWorkContractService.java
  67. 3 3
      jeeplus-modules/jeeplus-business/src/main/resources/freemarker/文印申请单.ftl
  68. 2 2
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/reimbursementApproval/approvalInfo/mapper/xml/CwReimbursementInfoMapper.xml
  69. 1 0
      jeeplus-modules/jeeplus-public-modules/src/main/java/com/jeeplus/pubmodules/wareHouse/mapper/xml/WareHouseBasicMapper.xml
  70. 34 0
      jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/controller/UserController.java

+ 75 - 0
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/borrow/controller/BorrowController.java

@@ -3,16 +3,30 @@ package com.jeeplus.business.borrow.controller;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.jeeplus.business.borrow.domain.BorrowMoney;
+import com.jeeplus.business.borrow.domain.Refund;
 import com.jeeplus.business.borrow.service.BorrowService;
 import com.jeeplus.business.borrow.service.dto.BorrowDTO;
 import com.jeeplus.business.borrow.service.dto.RefundDTO;
+import com.jeeplus.business.drive.service.dto.DriveApplyDTO;
+import com.jeeplus.business.finance.util.EasyPoiUtil;
+import com.jeeplus.common.excel.ExcelOptions;
+import com.jeeplus.common.excel.annotation.ExportMode;
 import com.jeeplus.common.utils.ResponseUtil;
+import com.jeeplus.logging.annotation.ApiLog;
+import com.jeeplus.logging.constant.enums.LogTypeEnum;
+import com.jeeplus.pubmodules.collect.service.dto.CollectDto;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.http.ResponseEntity;
 import org.springframework.web.bind.annotation.*;
 
 import javax.annotation.Resource;
+import javax.servlet.http.HttpServletResponse;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
 
 @Api("借款管理")
 @RestController
@@ -75,6 +89,29 @@ public class BorrowController {
     }
 
     /**
+     * 创建还款数据
+     */
+    @ApiOperation(value = "创建还款数据")
+    @PostMapping(value = "/createRefundData")
+    public ResponseEntity<Map<String,String>> createReturnData(@RequestBody BorrowDTO borrowDTO) throws Exception{
+        String refundId = borrowService.createReturnData(borrowDTO.getId());
+        Map<String,String> res = new HashMap<String,String>();
+        res.put("returnId", refundId);
+        return ResponseEntity.ok(res);
+    }
+
+    /**
+     * 根据还款id查询数据
+     */
+    @ApiOperation(value = "根据还款id查询数据")
+    @GetMapping(value = "findByRefundId")
+    public ResponseEntity<BorrowDTO> findByRefundId(@RequestParam String id){
+        BorrowDTO borrowDTO=borrowService.findByRefundId(id);
+        return ResponseEntity.ok(borrowDTO);
+    }
+
+
+    /**
      * 添加/修改借款归还
      */
     @ApiOperation(value = "新增或修改借款归还")
@@ -115,4 +152,42 @@ public class BorrowController {
         return ResponseEntity.ok(pageList);
     }
 
+
+    /**
+     * 根据借款id查询还款数据
+     */
+    @ApiOperation(value = "根据借款id查询还款数据")
+    @GetMapping(value = "findByBorId")
+    public ResponseEntity<List<Refund>> findByBorId(@RequestParam String id){
+        List<Refund> borrowDTO=borrowService.findByBorId(id);
+        return ResponseEntity.ok(borrowDTO);
+    }
+
+
+    @ApiLog(value = "导出借款申请数据", type = LogTypeEnum.EXPORT)
+    @GetMapping("export")
+    @ApiOperation(value = "导出借款申请数据")
+    public void exportFile(BorrowDTO borrowDTO, Page <BorrowDTO> page, ExcelOptions options, HttpServletResponse response) throws Exception {
+        String fileName = options.getFilename();
+        String sheetName = options.getSheetName();
+        List<BorrowDTO> result = new ArrayList<>();
+        if ( ExportMode.current.equals ( options.getMode() ) ) {
+            result = borrowService.findPageList(borrowDTO,page).getRecords();
+        } else if (ExportMode.selected.equals ( options.getMode() )) {
+            result = borrowService.findPageList(borrowDTO,page).getRecords().stream ( ).filter ( item ->
+                    options.getSelectIds ( ).contains ( item.getId ( ) )
+            ).collect ( Collectors.toList ( ) );
+        } else {
+            page.setSize (-1);
+            page.setCurrent (0);
+            result = borrowService.findPageList(borrowDTO,page).getRecords();
+        }
+        EasyPoiUtil.exportExcel ( result, sheetName,  sheetName, BorrowDTO.class, fileName, response );
+    }
+
+
+
+
+
+
 }

+ 3 - 0
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/borrow/domain/Refund.java

@@ -1,5 +1,6 @@
 package com.jeeplus.business.borrow.domain;
 
+import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableName;
 import com.jeeplus.core.domain.BaseEntity;
 import lombok.Data;
@@ -29,5 +30,7 @@ public class Refund extends BaseEntity {
      * 状态
      */
     private String status;
+    @TableField(exist = false)
+    private String createName;
 
 }

+ 26 - 0
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/borrow/domain/RefundHis.java

@@ -0,0 +1,26 @@
+package com.jeeplus.business.borrow.domain;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.jeeplus.core.domain.BaseEntity;
+import lombok.Data;
+
+@Data
+@TableName("jy_refund_history")
+public class RefundHis extends BaseEntity {
+
+
+    /**
+     * 还款金额
+     */
+    private String refundMoney;
+
+    /**
+     * 还款id
+     */
+    private String refundId;
+
+    @TableField(exist = false)
+    private String createName;
+
+}

+ 4 - 0
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/borrow/mapper/BorrowMapper.java

@@ -12,6 +12,8 @@ import com.jeeplus.business.borrow.service.dto.BorrowDTO;
 import org.apache.ibatis.annotations.Mapper;
 import org.apache.ibatis.annotations.Param;
 
+import java.util.List;
+
 @Mapper
 public interface BorrowMapper extends BaseMapper<BorrowMoney> {
 
@@ -28,4 +30,6 @@ public interface BorrowMapper extends BaseMapper<BorrowMoney> {
     void updateRefundInfoById(@Param("refundInfo") Refund refundInfo);
     @InterceptorIgnore(tenantLine = "true")
     IPage<BorrowMoney> listByUserId(@Param(Constants.WRAPPER)QueryWrapper<BorrowMoney> queryWrapper, Page<BorrowDTO> page);
+
+    List<Refund> findByBorId(@Param("id") String id);
 }

+ 10 - 0
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/borrow/mapper/RefundHisMapper.java

@@ -0,0 +1,10 @@
+package com.jeeplus.business.borrow.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.jeeplus.business.borrow.domain.RefundHis;
+import org.apache.ibatis.annotations.Mapper;
+
+
+@Mapper
+public interface RefundHisMapper extends BaseMapper<RefundHis> {
+}

+ 3 - 0
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/borrow/mapper/RefundMapper.java

@@ -4,6 +4,9 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.jeeplus.business.borrow.domain.Refund;
 import lombok.Data;
 import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
 
 @Mapper
 public interface RefundMapper extends BaseMapper<Refund> {

+ 19 - 4
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/borrow/mapper/xml/BorrowMapper.xml

@@ -5,7 +5,7 @@
 <mapper namespace="com.jeeplus.business.borrow.mapper.BorrowMapper">
 
     <select id="findPageList" resultType="com.jeeplus.business.borrow.service.dto.BorrowDTO">
-        select
+        select distinct
             a.id,
             a.create_by_id,
             a.create_time,
@@ -13,15 +13,17 @@
             a.reason,
             a.money_lower,
             a.money,
-            a.final_money,
+            (select (a.money_lower-(select sum(refund_money) from jy_refund_history where refund_id = re.id))) as finalMoney,
             a.proc_ins_id,
             a.process_definition_id,
             a.status,
-            re.refund_lower,
+            (select sum(refund_money) from jy_refund_history where refund_id = re.id) as refundLower,
             re.id as refundId,
             re.proc_ins_id as procInsIdRefund,
             re.process_definition_id as procDefIdRefund,
             re.status as refundStatus,
+            (select dv.label from sys_dict_value dv LEFT JOIN sys_dict_type dt on dt.id=dv.dict_type_id where dv.value=a.status and dt.type='program_project_list_info_status') as borrowStatus,
+            (select dv.label from sys_dict_value dv LEFT JOIN sys_dict_type dt on dt.id=dv.dict_type_id where dv.value=re.status and dt.type='program_project_list_info_status') as refStatus,
             so.name as officeName,
             su.name as createName,
             art1.ID_ as task_id,
@@ -29,6 +31,7 @@
 
         from jy_borrow_money a
         left join jy_refund re on a.id = re.borrow_id
+        left join jy_refund_history rh on re.id = rh.refund_id
         left join sys_user su on a.create_by_id = su.id and su.del_flag = '0'
         left join sys_office so on su.office_id = so.id and so.del_flag = '0'
         LEFT JOIN act_ru_task art1 ON a.proc_ins_id = art1.PROC_INST_ID_
@@ -111,8 +114,20 @@
         left join sys_user su on a.create_by_id = su.id and su.del_flag = '0'
         left join sys_office so on su.office_id = so.id and so.del_flag = '0'
         ${ew.customSqlSegment}
-        and a.status = '5'
     </select>
 
+    <select id="findByBorId" resultType="com.jeeplus.business.borrow.domain.RefundHis">
+        select
+            a.id,
+            a.create_by_id,
+            a.create_time,
+            a.refund_money,
+            su.name as createName
+        from jy_refund_history a
+        left join sys_user su on a.create_by_id = su.id and su.del_flag = '0'
+        where  a.del_flag = '0' and a.refund_id = #{id} order by a.create_time DESC
+    </select>
+
+
 
 </mapper>

+ 107 - 10
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/borrow/service/BorrowService.java

@@ -1,12 +1,17 @@
 package com.jeeplus.business.borrow.service;
 
 import cn.hutool.extra.spring.SpringUtil;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
+import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.jeeplus.business.borrow.domain.BorrowMoney;
 import com.jeeplus.business.borrow.domain.Refund;
+import com.jeeplus.business.borrow.domain.RefundHis;
 import com.jeeplus.business.borrow.mapper.BorrowMapper;
+import com.jeeplus.business.borrow.mapper.RefundHisMapper;
 import com.jeeplus.business.borrow.mapper.RefundMapper;
 import com.jeeplus.business.borrow.service.dto.BorrowDTO;
 import com.jeeplus.business.borrow.service.dto.RefundDTO;
@@ -37,6 +42,9 @@ public class BorrowService {
     @Resource
     private JyReimbursementInfoBorrowMapper jyReimbursementInfoBorrowMapper;
 
+    @Resource
+    private RefundHisMapper refundHisMapper;
+
     /**
      * 列表管理
      * @param borrowDTO
@@ -78,17 +86,50 @@ public class BorrowService {
         IPage<BorrowDTO> pageList=borrowMapper.findPageList(queryWrapper,page);
         //获取借款报销表中的信息
         List<JyReimbursementDetailInfoBorrow> borrowList=jyReimbursementInfoBorrowMapper.getList();
-        borrowList.stream().forEach(item->{
-            pageList.getRecords().stream().forEach(data->{
-                if (item.getProjectId().equals(data.getId())){
-                    Float moneyLower=Float.parseFloat(data.getMoneyLower());
-                    Float number=Float.parseFloat(item.getNumber());
-                    Float money=moneyLower-number;
-                    data.setFinalMoney(money.toString());
-                    data.setRefundLower(item.getNumber());
+
+        for (BorrowDTO item : pageList.getRecords()){
+            if (CollectionUtils.isNotEmpty(borrowList)){
+                for (JyReimbursementDetailInfoBorrow infoBorrow : borrowList) {
+                    if (item.getId().equals(infoBorrow.getProjectId())){
+                        if (StringUtils.isNotBlank(item.getFinalMoney())){
+                            Float moneyLower=Float.parseFloat(item.getFinalMoney());
+                            Float number=Float.parseFloat(infoBorrow.getNumber());
+                            Float money=moneyLower-number;
+                            item.setFinalMoney(money.toString());
+                            Float refund=Float.parseFloat(item.getRefundLower());
+                            Float lower=refund+number;
+                            item.setRefundLower(lower.toString());
+                        }else {
+                            Float moneyLower=Float.parseFloat(item.getMoneyLower());
+                            Float number=Float.parseFloat(infoBorrow.getNumber());
+                            Float money=moneyLower-number;
+                            item.setFinalMoney(money.toString());
+                            item.setRefundLower(infoBorrow.getNumber());
+                        }
+
+                    }
                 }
-            });
-        });
+            }
+        }
+
+//            if (CollectionUtils.isNotEmpty(borrowList)){
+//                for (JyReimbursementDetailInfoBorrow item : borrowList){
+//                    pageList.getRecords().stream().forEach(data->{
+//                        if (StringUtils.isNotBlank(item.getProjectId()) && StringUtils.isNotBlank(data.getId())){
+//                            if (item.getProjectId().equals(data.getId())){
+//                                Float moneyLower=Float.parseFloat(data.getFinalMoney());
+//                                Float number=Float.parseFloat(item.getNumber());
+//                                Float money=moneyLower-number;
+//                                data.setFinalMoney(money.toString());
+//                                data.setRefundLower(item.getNumber());
+//                            }
+//                        }
+//                    });
+//                    continue;
+//                };
+//            }
+
+
         return pageList;
     }
 
@@ -209,6 +250,17 @@ public class BorrowService {
      */
     public void updateRefundById(RefundDTO refundDTO) {
         borrowMapper.updateRefundById(refundDTO.getId(),refundDTO.getStatus());
+        //如果审核同意,则往历史表中添加一条数据
+        if (refundDTO.getStatus().equals("5")){
+            //根据id找到当前还款信息
+            Refund refund = refundMapper.selectById(refundDTO.getId());
+            RefundHis refundHis = new RefundHis();
+            refundHis.setRefundMoney(refund.getRefundLower());
+            refundHis.setCreateById(refund.getCreateById());
+            refundHis.setRefundId(refund.getId());
+            refundHis.setCreateTime(new Date());
+            refundHisMapper.insert(refundHis);
+        }
     }
 
     /**
@@ -242,8 +294,53 @@ public class BorrowService {
         UserDTO userDTO = SpringUtil.getBean ( IUserApi.class ).getByToken(TokenProvider.getCurrentToken());
         QueryWrapper<BorrowMoney> queryWrapper = QueryWrapperGenerator.buildQueryCondition(borrowMoney, BorrowMoney.class);
         queryWrapper.eq("a.create_by_id",userDTO.getId());
+        queryWrapper.eq("a.status","5");
         queryWrapper.orderByDesc("a.update_time");
         IPage<BorrowMoney> moneyList = borrowMapper.listByUserId(queryWrapper,page);
         return moneyList;
     }
+
+    /**
+     * 根据还款id查询还款历史数据
+     * @param id
+     * @return
+     */
+    public List<Refund> findByBorId(String id) {
+        List<Refund> refunds=borrowMapper.findByBorId(id);
+        return refunds;
+    }
+
+    /**
+     * 创建还款数据
+     * @param id
+     * @return
+     */
+    public String createReturnData(String id) {
+        Refund refund = refundMapper.selectOne(new LambdaQueryWrapper<Refund>().eq(Refund::getBorrowId, id));
+        if (ObjectUtils.isNotEmpty(refund)){
+            return refund.getId();
+        }else {
+            Refund refund1 = new Refund();
+            refund1.setBorrowId(id);
+            refund1.setStatus("0");
+            refundMapper.insert(refund1);
+            return refund1.getId();
+        }
+    }
+
+    /**
+     * 根据还款id查询还款数据
+     * @param id
+     * @return
+     */
+    public BorrowDTO findByRefundId(String id) {
+        Refund refund = refundMapper.selectOne(new LambdaQueryWrapper<Refund>().eq(Refund::getId, id));
+        if (ObjectUtils.isNotEmpty(refund) && StringUtils.isNotBlank(refund.getBorrowId())){
+            BorrowDTO byId = this.findById(refund.getBorrowId());
+            return byId;
+        }else {
+            return new BorrowDTO();
+        }
+
+    }
 }

+ 16 - 0
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/borrow/service/dto/BorrowDTO.java

@@ -1,8 +1,11 @@
 package com.jeeplus.business.borrow.service.dto;
 
+import cn.afterturn.easypoi.excel.annotation.Excel;
 import com.jeeplus.core.domain.BaseEntity;
 import lombok.Data;
 
+import java.util.Date;
+
 @Data
 public class BorrowDTO extends BaseEntity {
     //借款编号(字典值)
@@ -11,22 +14,26 @@ public class BorrowDTO extends BaseEntity {
     /**
      * 编号
      */
+    @Excel(name = "编号",width = 16)
     private String no;
 
     /**
      * 借款理由
      */
+    @Excel(name = "借款用途",width = 16)
     private String reason;
 
     /**
      * 借款金额大小写
      */
+    @Excel(name = "借款金额",width = 16)
     private String moneyLower;
     private String money;
 
     /**
      * 实际借款金额
      */
+    @Excel(name = "剩余借款金额",width = 16)
     private String finalMoney;
 
     /**
@@ -44,16 +51,25 @@ public class BorrowDTO extends BaseEntity {
     /**
      * 部门名称
      */
+    @Excel(name = "借款人部门",width = 16)
     private String officeName;
     private String officeId;
 
     //借款人
+    @Excel(name = "借款人",width = 16)
     private String createName;
+    @Excel(name = "借款时间",width = 16,exportFormat = "yyyy-MM-dd")
+    private Date createTime;
+    @Excel(name = "借款状态",width = 16)
+    private String borrowStatus;
+    @Excel(name = "还款状态",width = 16)
+    private String refStatus;
 
     //借款时间
     private String[] createDates;
 
     //对冲金额(还款金额)
+    @Excel(name = "对冲金额",width = 16)
     private String refundLower;
     private String refund;
 

+ 32 - 0
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/drive/controller/DriveController.java

@@ -8,9 +8,15 @@ import com.jeeplus.business.drive.service.DriveApplyService;
 import com.jeeplus.business.drive.service.dto.DriveAccountDTO;
 import com.jeeplus.business.drive.service.dto.DriveApplyDTO;
 import com.jeeplus.business.drive.service.dto.DriveDTO;
+import com.jeeplus.business.finance.util.EasyPoiUtil;
 import com.jeeplus.business.meetingRoom.service.dto.MeetingRoomDTO;
+import com.jeeplus.business.monthly.service.dto.MonthlyDTO;
 import com.jeeplus.common.TokenProvider;
+import com.jeeplus.common.excel.ExcelOptions;
+import com.jeeplus.common.excel.annotation.ExportMode;
 import com.jeeplus.common.utils.ResponseUtil;
+import com.jeeplus.logging.annotation.ApiLog;
+import com.jeeplus.logging.constant.enums.LogTypeEnum;
 import com.jeeplus.sys.feign.IUserApi;
 import com.jeeplus.sys.service.dto.UserDTO;
 import io.swagger.annotations.Api;
@@ -22,7 +28,10 @@ import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.web.bind.annotation.*;
 
 import javax.annotation.Resource;
+import javax.servlet.http.HttpServletResponse;
 import java.util.ArrayList;
+import java.util.List;
+import java.util.stream.Collectors;
 
 @Slf4j
 @Api(tags ="用车申请及结算管理")
@@ -149,6 +158,29 @@ public class DriveController {
     }
 
 
+    @ApiLog(value = "导出用车申请数据", type = LogTypeEnum.EXPORT)
+    @GetMapping("export")
+    @ApiOperation(value = "导出用车申请数据")
+    public void exportFile(DriveApplyDTO driveApplyDTO, Page <DriveApplyDTO> page, ExcelOptions options, HttpServletResponse response) throws Exception {
+        String fileName = options.getFilename();
+        String sheetName = options.getSheetName();
+        List<DriveApplyDTO> result = new ArrayList<>();
+        if ( ExportMode.current.equals ( options.getMode() ) ) {
+            result = driveApplyService.findPageList(driveApplyDTO,page).getRecords();
+        } else if (ExportMode.selected.equals ( options.getMode() )) {
+            result = driveApplyService.findPageList(driveApplyDTO,page).getRecords().stream ( ).filter ( item ->
+                    options.getSelectIds ( ).contains ( item.getId ( ) )
+            ).collect ( Collectors.toList ( ) );
+        } else {
+            page.setSize (-1);
+            page.setCurrent (0);
+            result = driveApplyService.findPageList(driveApplyDTO,page).getRecords();
+        }
+        EasyPoiUtil.exportExcel ( result, sheetName,  sheetName, DriveApplyDTO.class, fileName, response );
+
+    }
+
+
 
 
 

+ 31 - 0
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/drive/controller/DriveInfoController.java

@@ -4,6 +4,12 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.jeeplus.business.drive.domain.DriveInfo;
 import com.jeeplus.business.drive.service.DriveInfoService;
+import com.jeeplus.business.finance.util.EasyPoiUtil;
+import com.jeeplus.business.monthly.service.dto.MonthlyDTO;
+import com.jeeplus.common.excel.ExcelOptions;
+import com.jeeplus.common.excel.annotation.ExportMode;
+import com.jeeplus.logging.annotation.ApiLog;
+import com.jeeplus.logging.constant.enums.LogTypeEnum;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
@@ -11,7 +17,10 @@ import org.springframework.http.ResponseEntity;
 import org.springframework.web.bind.annotation.*;
 
 import javax.annotation.Resource;
+import javax.servlet.http.HttpServletResponse;
+import java.util.ArrayList;
 import java.util.List;
+import java.util.stream.Collectors;
 
 @Slf4j
 @Api(tags ="用车信息")
@@ -65,6 +74,28 @@ public class DriveInfoController {
         return ResponseEntity.ok(driveInfo);
     }
 
+    @ApiLog(value = "导出车辆信息数据", type = LogTypeEnum.EXPORT)
+    @GetMapping("export")
+    @ApiOperation(value = "导出车辆信息数据")
+    public void exportFile(DriveInfo driveInfo, Page <DriveInfo> page, ExcelOptions options, HttpServletResponse response) throws Exception {
+        String fileName = options.getFilename();
+        String sheetName = options.getSheetName();
+        List<DriveInfo> result = new ArrayList<>();
+        if ( ExportMode.current.equals ( options.getMode() ) ) {
+            result = driveInfoService.findPageList(driveInfo,page).getRecords();
+        } else if (ExportMode.selected.equals ( options.getMode() )) {
+            result = driveInfoService.findPageList(driveInfo,page).getRecords().stream ( ).filter ( item ->
+                    options.getSelectIds ( ).contains ( item.getId ( ) )
+            ).collect ( Collectors.toList ( ) );
+        } else {
+            page.setSize (-1);
+            page.setCurrent (0);
+            result = driveInfoService.findPageList(driveInfo,page).getRecords();
+        }
+        EasyPoiUtil.exportExcel ( result, sheetName,  sheetName, DriveInfo.class, fileName, response );
+
+    }
+
 
 
 }

+ 31 - 0
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/drive/controller/DriveMaintainController.java

@@ -5,7 +5,12 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.jeeplus.business.drive.service.DriveMaintainService;
 import com.jeeplus.business.drive.service.dto.DriveApplyDTO;
 import com.jeeplus.business.drive.service.dto.DriveMaintainDTO;
+import com.jeeplus.business.finance.util.EasyPoiUtil;
+import com.jeeplus.common.excel.ExcelOptions;
+import com.jeeplus.common.excel.annotation.ExportMode;
 import com.jeeplus.common.utils.ResponseUtil;
+import com.jeeplus.logging.annotation.ApiLog;
+import com.jeeplus.logging.constant.enums.LogTypeEnum;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
@@ -13,6 +18,10 @@ import org.springframework.http.ResponseEntity;
 import org.springframework.web.bind.annotation.*;
 
 import javax.annotation.Resource;
+import javax.servlet.http.HttpServletResponse;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.stream.Collectors;
 
 @Slf4j
 @Api(tags ="车辆保养维护")
@@ -86,6 +95,28 @@ public class DriveMaintainController {
     }
 
 
+    @ApiLog(value = "导出车辆维护保养数据", type = LogTypeEnum.EXPORT)
+    @GetMapping("export")
+    @ApiOperation(value = "导出车辆维护保养数据")
+    public void exportFile(DriveMaintainDTO driveMaintainDTO, Page <DriveMaintainDTO> page, ExcelOptions options, HttpServletResponse response) throws Exception {
+        String fileName = options.getFilename();
+        String sheetName = options.getSheetName();
+        List<DriveMaintainDTO> result = new ArrayList<>();
+        if ( ExportMode.current.equals ( options.getMode() ) ) {
+            result = driveMaintainService.findPageList(driveMaintainDTO,page).getRecords();
+        } else if (ExportMode.selected.equals ( options.getMode() )) {
+            result = driveMaintainService.findPageList(driveMaintainDTO,page).getRecords().stream ( ).filter ( item ->
+                    options.getSelectIds ( ).contains ( item.getId ( ) )
+            ).collect ( Collectors.toList ( ) );
+        } else {
+            page.setSize (-1);
+            page.setCurrent (0);
+            result = driveMaintainService.findPageList(driveMaintainDTO,page).getRecords();
+        }
+        EasyPoiUtil.exportExcel ( result, sheetName,  sheetName, DriveMaintainDTO.class, fileName, response );
+
+    }
+
 
 
 

+ 3 - 0
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/drive/domain/DriveInfo.java

@@ -1,5 +1,6 @@
 package com.jeeplus.business.drive.domain;
 
+import cn.afterturn.easypoi.excel.annotation.Excel;
 import com.baomidou.mybatisplus.annotation.TableName;
 import com.jeeplus.core.domain.BaseEntity;
 import lombok.Data;
@@ -11,10 +12,12 @@ public class DriveInfo extends BaseEntity {
     /*
     车牌号
      */
+    @Excel(name = "车牌号",width = 16)
     private String driveNumber;
 
     /**
      * 车辆识别号
      */
+    @Excel(name = "车辆识别号",width = 16)
     private String driveIdentifyNumber;
 }

+ 2 - 0
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/drive/mapper/xml/DriveMaintainMapper.xml

@@ -11,6 +11,8 @@
             a.create_time,
             a.drive_info_id,
             a.drive_maintain_type,
+            (select dv.label from sys_dict_value dv LEFT JOIN sys_dict_type dt on dt.id=dv.dict_type_id where dv.value=a.status and dt.type='program_project_list_info_status') as maintainStatus,
+            (select dv.label from sys_dict_value dv LEFT JOIN sys_dict_type dt on dt.id=dv.dict_type_id where dv.value=a.drive_maintain_type and dt.type='jy_drive_maintain_type') as maintainType,
             a.start_time,
             a.end_time,
             a.proc_ins_id,

+ 1 - 0
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/drive/mapper/xml/JyDriveApplyMapper.xml

@@ -16,6 +16,7 @@
             (select group_concat(name) from jy_project_record pr where FIND_IN_SET(pr.id,(select project_id from jy_drive_apply where id=a.id))) as projectName,
             a.use_men,
             (select group_concat(name) from sys_user su where FIND_IN_SET(su.id,(select use_men from jy_drive_apply where id=a.id))) as userName,
+            (select dv.label from sys_dict_value dv LEFT JOIN sys_dict_type dt on dt.id=dv.dict_type_id where dv.value=a.status and dt.type='program_project_list_info_status') as driveApplyStatus,
             a.use_start_time,
             a.use_end_time,
             a.remarks,

+ 12 - 1
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/drive/service/dto/DriveApplyDTO.java

@@ -1,5 +1,6 @@
 package com.jeeplus.business.drive.service.dto;
 
+import cn.afterturn.easypoi.excel.annotation.Excel;
 import com.baomidou.mybatisplus.annotation.TableField;
 import com.fasterxml.jackson.annotation.JsonFormat;
 import com.jeeplus.business.project.domain.JyProject;
@@ -20,12 +21,14 @@ public class DriveApplyDTO extends BaseDTO {
      * 关联项目id
      */
     private String projectId;
+    @Excel(name = "用车项目",width = 16)
     private String projectName;
 
     /**
      * 用车人员id
      */
     private String useMen;
+    @Excel(name = "用车人员",width = 16)
     private String userName;
 
     /**
@@ -33,6 +36,7 @@ public class DriveApplyDTO extends BaseDTO {
      */
     @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+    @Excel(name = "用车开始时间",width = 16,exportFormat = "yyyy-MM-dd")
     private Date useStartTime;
 
     /**
@@ -40,6 +44,7 @@ public class DriveApplyDTO extends BaseDTO {
      */
     @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+    @Excel(name = "用车结束时间",width = 16,exportFormat = "yyyy-MM-dd")
     private Date useEndTime;
 
     /**
@@ -72,10 +77,16 @@ public class DriveApplyDTO extends BaseDTO {
      * 申请人部门
      */
     private String officeId;
-
+    @Excel(name = "申请人",width = 16)
     private String createName;
+    @Excel(name = "申请人部门",width = 16)
     private String officeName;
 
+    @Excel(name = "申请时间",width = 16,exportFormat = "yyyy-MM-dd")
+    private Date createTime;
+    @Excel(name = "状态",width = 16)
+    private String driveApplyStatus;
+
     private String status;
 
     /**

+ 11 - 0
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/drive/service/dto/DriveMaintainDTO.java

@@ -1,5 +1,6 @@
 package com.jeeplus.business.drive.service.dto;
 
+import cn.afterturn.easypoi.excel.annotation.Excel;
 import com.baomidou.mybatisplus.annotation.TableField;
 import com.fasterxml.jackson.annotation.JsonFormat;
 import com.jeeplus.core.service.dto.BaseDTO;
@@ -28,6 +29,7 @@ public class DriveMaintainDTO extends BaseDTO {
      */
     @DateTimeFormat(pattern = "yyyy-MM-dd")
     @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
+    @Excel(name = "维护开始时间",width = 16,exportFormat = "yyyy-MM-dd")
     private Date startTime;
 
     /**
@@ -35,6 +37,7 @@ public class DriveMaintainDTO extends BaseDTO {
      */
     @DateTimeFormat(pattern = "yyyy-MM-dd")
     @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
+    @Excel(name = "维护结束时间",width = 16,exportFormat = "yyyy-MM-dd")
     private Date endTime;
 
     /**
@@ -61,7 +64,10 @@ public class DriveMaintainDTO extends BaseDTO {
     /**
      * 车牌号
      */
+    @Excel(name = "车牌号",width = 16)
     private String driveNumber;
+    @Excel(name = "申请时间",width = 16,exportFormat = "yyyy-MM-dd")
+    private Date createTime;
 
     /**
      * 维护时间
@@ -79,6 +85,11 @@ public class DriveMaintainDTO extends BaseDTO {
     //附件
     private List<WorkAttachmentInfo> files;
 
+    @Excel(name = "申请状态",width = 16)
+    private String maintainStatus;
+    @Excel(name = "维护类型",width = 16)
+    private String maintainType;
+
 
 
 }

+ 31 - 0
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/evection/controller/EvectionController.java

@@ -6,7 +6,12 @@ import com.jeeplus.business.drive.service.dto.DriveApplyDTO;
 import com.jeeplus.business.drive.service.dto.DriveDTO;
 import com.jeeplus.business.evection.service.EvectionService;
 import com.jeeplus.business.evection.service.dto.EvectionDTO;
+import com.jeeplus.business.finance.util.EasyPoiUtil;
+import com.jeeplus.common.excel.ExcelOptions;
+import com.jeeplus.common.excel.annotation.ExportMode;
 import com.jeeplus.common.utils.ResponseUtil;
+import com.jeeplus.logging.annotation.ApiLog;
+import com.jeeplus.logging.constant.enums.LogTypeEnum;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
@@ -14,6 +19,10 @@ import org.springframework.http.ResponseEntity;
 import org.springframework.web.bind.annotation.*;
 
 import javax.annotation.Resource;
+import javax.servlet.http.HttpServletResponse;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.stream.Collectors;
 
 @Slf4j
 @Api(tags ="出差申请")
@@ -89,6 +98,28 @@ public class EvectionController {
         return ResponseEntity.ok("操作成功");
     }
 
+    @ApiLog(value = "导出出差申请数据", type = LogTypeEnum.EXPORT)
+    @GetMapping("export")
+    @ApiOperation(value = "导出出差申请数据")
+    public void exportFile(EvectionDTO evectionDTO, Page <EvectionDTO> page, ExcelOptions options, HttpServletResponse response) throws Exception {
+        String fileName = options.getFilename();
+        String sheetName = options.getSheetName();
+        List<EvectionDTO> result = new ArrayList<>();
+        if ( ExportMode.current.equals ( options.getMode() ) ) {
+            result = evectionService.findPageList(evectionDTO,page).getRecords();
+        } else if (ExportMode.selected.equals ( options.getMode() )) {
+            result = evectionService.findPageList(evectionDTO,page).getRecords().stream ( ).filter ( item ->
+                    options.getSelectIds ( ).contains ( item.getId ( ) )
+            ).collect ( Collectors.toList ( ) );
+        } else {
+            page.setSize (-1);
+            page.setCurrent (0);
+            result = evectionService.findPageList(evectionDTO,page).getRecords();
+        }
+        EasyPoiUtil.exportExcel ( result, sheetName,  sheetName, EvectionDTO.class, fileName, response );
+
+    }
+
 
 
 }

+ 1 - 0
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/evection/mapper/xml/EvectionMapper.xml

@@ -16,6 +16,7 @@
             (select group_concat(name) from jy_project_record pr where FIND_IN_SET(pr.id,(select project_id from jy_evection where id=a.id))) as projectName,
             a.evection_men,
             (select group_concat(name) from sys_user su where FIND_IN_SET(su.id,(select evection_men from jy_evection where id=a.id))) as userName,
+            (select dv.label from sys_dict_value dv LEFT JOIN sys_dict_type dt on dt.id=dv.dict_type_id where dv.value=a.status and dt.type='program_project_list_info_status') as evectionStatus,
             a.start_time,
             a.end_time,
             a.remarks,

+ 4 - 2
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/evection/service/EvectionService.java

@@ -109,8 +109,10 @@ public class EvectionService {
         }
         evectionMapper.updateById(evection);
         //修改附件
-        List<WorkAttachmentInfo> files = evectionDTO.getFiles();
-        updateFiles(files, userDTO, evectionDTO.getId());
+        if (CollectionUtils.isNotEmpty(evectionDTO.getFiles())){
+            List<WorkAttachmentInfo> files = evectionDTO.getFiles();
+            updateFiles(files, userDTO, evectionDTO.getId());
+        }
         return evectionDTO.getId();
     }
 

+ 12 - 1
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/evection/service/dto/EvectionDTO.java

@@ -1,5 +1,6 @@
 package com.jeeplus.business.evection.service.dto;
 
+import cn.afterturn.easypoi.excel.annotation.Excel;
 import com.baomidou.mybatisplus.annotation.TableField;
 import com.fasterxml.jackson.annotation.JsonFormat;
 import com.jeeplus.business.project.domain.JyProject;
@@ -19,12 +20,14 @@ public class EvectionDTO extends BaseEntity {
      * 关联项目id
      */
     private String projectId;
+    @Excel(name = "项目",width = 16)
     private String projectName;
 
     /**
      * 出差人员id
      */
     private String evectionMen;
+    @Excel(name = "出差人员",width = 16)
     private String userName;
 
     /**
@@ -32,6 +35,7 @@ public class EvectionDTO extends BaseEntity {
      */
     @DateTimeFormat(pattern = "yyyy-MM-dd")
     @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
+    @Excel(name = "出差开始时间",width = 16,exportFormat = "yyyy-MM-dd")
     private Date startTime;
 
     /**
@@ -39,6 +43,7 @@ public class EvectionDTO extends BaseEntity {
      */
     @DateTimeFormat(pattern = "yyyy-MM-dd")
     @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
+    @Excel(name = "出差结束时间",width = 16,exportFormat = "yyyy-MM-dd")
     private Date endTime;
 
     /**
@@ -71,9 +76,12 @@ public class EvectionDTO extends BaseEntity {
      * 申请人部门
      */
     private String officeId;
-
+    @Excel(name = "申请人",width = 16)
     private String createName;
+    @Excel(name = "申请人部门",width = 16)
     private String officeName;
+    @Excel(name = "申请时间",width = 16,exportFormat = "yyyy-MM-dd")
+    private Date createTime;
 
     private String status;
 
@@ -91,6 +99,7 @@ public class EvectionDTO extends BaseEntity {
      * 目的地
      */
     private String targetCity;
+    @Excel(name = "目的地",width = 16)
     private String cityName;
 
     /*
@@ -99,4 +108,6 @@ public class EvectionDTO extends BaseEntity {
     private String[] createDates;
 
     private List<WorkAttachmentInfo> files;
+    @Excel(name = "状态",width = 16)
+    private String evectionStatus;
 }

+ 32 - 0
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/goOut/controller/GoOutController.java

@@ -2,9 +2,15 @@ package com.jeeplus.business.goOut.controller;
 
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.jeeplus.business.drive.service.dto.DriveApplyDTO;
+import com.jeeplus.business.finance.util.EasyPoiUtil;
 import com.jeeplus.business.goOut.service.GoOutService;
 import com.jeeplus.business.goOut.service.dto.GoOutDTO;
+import com.jeeplus.common.excel.ExcelOptions;
+import com.jeeplus.common.excel.annotation.ExportMode;
 import com.jeeplus.common.utils.ResponseUtil;
+import com.jeeplus.logging.annotation.ApiLog;
+import com.jeeplus.logging.constant.enums.LogTypeEnum;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
@@ -12,6 +18,10 @@ import org.springframework.http.ResponseEntity;
 import org.springframework.web.bind.annotation.*;
 
 import javax.annotation.Resource;
+import javax.servlet.http.HttpServletResponse;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.stream.Collectors;
 
 @Slf4j
 @Api(tags ="外出申请")
@@ -87,6 +97,28 @@ public class GoOutController {
         return ResponseEntity.ok("操作成功");
     }
 
+    @ApiLog(value = "导出出差申请数据", type = LogTypeEnum.EXPORT)
+    @GetMapping("export")
+    @ApiOperation(value = "导出出差申请数据")
+    public void exportFile(GoOutDTO goOutDTO, Page <GoOutDTO> page, ExcelOptions options, HttpServletResponse response) throws Exception {
+        String fileName = options.getFilename();
+        String sheetName = options.getSheetName();
+        List<GoOutDTO> result = new ArrayList<>();
+        if ( ExportMode.current.equals ( options.getMode() ) ) {
+            result = goOutService.findPageList(goOutDTO,page).getRecords();
+        } else if (ExportMode.selected.equals ( options.getMode() )) {
+            result = goOutService.findPageList(goOutDTO,page).getRecords().stream ( ).filter ( item ->
+                    options.getSelectIds ( ).contains ( item.getId ( ) )
+            ).collect ( Collectors.toList ( ) );
+        } else {
+            page.setSize (-1);
+            page.setCurrent (0);
+            result = goOutService.findPageList(goOutDTO,page).getRecords();
+        }
+        EasyPoiUtil.exportExcel ( result, sheetName,  sheetName, GoOutDTO.class, fileName, response );
+
+    }
+
 
 
 }

+ 1 - 0
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/goOut/mapper/xml/GoOutMapper.xml

@@ -16,6 +16,7 @@
             (select group_concat(name) from jy_project_record pr where FIND_IN_SET(pr.id,(select project_id from jy_go_out where id=a.id))) as projectName,
             a.out_men,
             (select group_concat(name) from sys_user su where FIND_IN_SET(su.id,(select out_men from jy_go_out where id=a.id))) as userName,
+            (select dv.label from sys_dict_value dv LEFT JOIN sys_dict_type dt on dt.id=dv.dict_type_id where dv.value=a.status and dt.type='program_project_list_info_status') as goOutStatus,
             a.start_time,
             a.end_time,
             a.remarks,

+ 4 - 2
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/goOut/service/GoOutService.java

@@ -107,8 +107,10 @@ public class GoOutService {
         }
         goOutMapper.updateById(goOut);
         //修改附件
-        List<WorkAttachmentInfo> files = goOutDTO.getFiles();
-        updateFiles(files, userDTO, goOutDTO.getId());
+        if (CollectionUtils.isNotEmpty(goOutDTO.getFiles())){
+            List<WorkAttachmentInfo> files = goOutDTO.getFiles();
+            updateFiles(files, userDTO, goOutDTO.getId());
+        }
         return goOutDTO.getId();
     }
 

+ 10 - 1
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/goOut/service/dto/GoOutDTO.java

@@ -1,5 +1,6 @@
 package com.jeeplus.business.goOut.service.dto;
 
+import cn.afterturn.easypoi.excel.annotation.Excel;
 import com.baomidou.mybatisplus.annotation.TableField;
 import com.fasterxml.jackson.annotation.JsonFormat;
 import com.jeeplus.business.project.domain.JyProject;
@@ -19,12 +20,14 @@ public class GoOutDTO extends BaseEntity {
      * 关联项目id
      */
     private String projectId;
+    @Excel(name = "项目",width = 16)
     private String projectName;
 
     /**
      * 出差人员id
      */
     private String outMen;
+    @Excel(name = "出差人员",width = 16)
     private String userName;
 
     /**
@@ -32,6 +35,7 @@ public class GoOutDTO extends BaseEntity {
      */
     @DateTimeFormat(pattern = "yyyy-MM-dd")
     @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
+    @Excel(name = "出差开始时间",width = 16,exportFormat = "yyyy-MM-dd")
     private Date startTime;
 
     /**
@@ -39,6 +43,7 @@ public class GoOutDTO extends BaseEntity {
      */
     @DateTimeFormat(pattern = "yyyy-MM-dd")
     @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
+    @Excel(name = "出差结束时间",width = 16,exportFormat = "yyyy-MM-dd")
     private Date endTime;
 
     /**
@@ -71,9 +76,12 @@ public class GoOutDTO extends BaseEntity {
      * 申请人部门
      */
     private String officeId;
-
+    @Excel(name = "申请人",width = 16)
     private String createName;
+    @Excel(name = "申请人部门",width = 16)
     private String officeName;
+    @Excel(name = "申请时间",width = 16,exportFormat = "yyyy-MM-dd HH:mm:ss")
+    private Date createTime;
 
     private String status;
 
@@ -91,6 +99,7 @@ public class GoOutDTO extends BaseEntity {
      * 目的地
      */
     private String targetCity;
+    @Excel(name = "目的地",width = 16)
     private String cityName;
 
     /*

+ 32 - 0
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/holiday/controller/HolidayController.java

@@ -5,13 +5,19 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.jeeplus.business.drive.service.dto.DriveApplyDTO;
+import com.jeeplus.business.finance.util.EasyPoiUtil;
 import com.jeeplus.business.goOut.service.dto.GoOutDTO;
 import com.jeeplus.business.holiday.domain.Holiday;
 import com.jeeplus.business.holiday.mapper.HolidayMapper;
 import com.jeeplus.business.holiday.service.HolidayService;
 import com.jeeplus.business.holiday.service.dto.HolidayDTO;
 import com.jeeplus.common.TokenProvider;
+import com.jeeplus.common.excel.ExcelOptions;
+import com.jeeplus.common.excel.annotation.ExportMode;
 import com.jeeplus.common.utils.ResponseUtil;
+import com.jeeplus.logging.annotation.ApiLog;
+import com.jeeplus.logging.constant.enums.LogTypeEnum;
 import com.jeeplus.sys.feign.IUserApi;
 import com.jeeplus.sys.service.dto.UserDTO;
 import io.swagger.annotations.Api;
@@ -21,7 +27,10 @@ import org.springframework.http.ResponseEntity;
 import org.springframework.web.bind.annotation.*;
 
 import javax.annotation.Resource;
+import javax.servlet.http.HttpServletResponse;
+import java.util.ArrayList;
 import java.util.List;
+import java.util.stream.Collectors;
 
 @Slf4j
 @Api(tags ="请假申请")
@@ -97,5 +106,28 @@ public class HolidayController {
         return ResponseEntity.ok(s);
     }
 
+    @ApiLog(value = "导出请假申请数据", type = LogTypeEnum.EXPORT)
+    @GetMapping("export")
+    @ApiOperation(value = "导出请假申请数据")
+    public void exportFile(HolidayDTO holidayDTO, Page <HolidayDTO> page, ExcelOptions options, HttpServletResponse response) throws Exception {
+        String fileName = options.getFilename();
+        String sheetName = options.getSheetName();
+        List<HolidayDTO> result = new ArrayList<>();
+        if ( ExportMode.current.equals ( options.getMode() ) ) {
+            result = holidayService.findPageList(holidayDTO,page).getRecords();
+        } else if (ExportMode.selected.equals ( options.getMode() )) {
+            result = holidayService.findPageList(holidayDTO,page).getRecords().stream ( ).filter ( item ->
+                    options.getSelectIds ( ).contains ( item.getId ( ) )
+            ).collect ( Collectors.toList ( ) );
+        } else {
+            page.setSize (-1);
+            page.setCurrent (0);
+            result = holidayService.findPageList(holidayDTO,page).getRecords();
+        }
+        EasyPoiUtil.exportExcel ( result, sheetName,  sheetName, HolidayDTO.class, fileName, response );
+
+    }
+
+
 
 }

+ 3 - 0
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/holiday/mapper/xml/HolidayMapper.xml

@@ -17,6 +17,9 @@
             a.type,
             a.proc_ins_id,
             a.process_definition_id,
+            (select dv.label from sys_dict_value dv LEFT JOIN sys_dict_type dt on dt.id=dv.dict_type_id where dv.value=a.status and dt.type='program_project_list_info_status') as driveApplyStatus,
+            (select dv.label from sys_dict_value dv LEFT JOIN sys_dict_type dt on dt.id=dv.dict_type_id where dv.value=a.type and dt.type='jy_holiday_type') as holidayType,
+            concat(a.days,'天') as holidayDays,
             a.status,
             art1.ID_ as task_id,
             su.name as createName,

+ 4 - 2
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/holiday/service/HolidayService.java

@@ -193,8 +193,10 @@ public class HolidayService {
         holiday.setStatus(holidayDTO.getStatus());
         holidayMapper.updateById(holiday);
         //修改附件
-        List<WorkAttachmentInfo> files = holidayDTO.getFiles();
-        updateFiles(files, userDTO, holidayDTO.getId());
+        if (CollectionUtils.isNotEmpty(holidayDTO.getFiles())){
+            List<WorkAttachmentInfo> files = holidayDTO.getFiles();
+            updateFiles(files, userDTO, holidayDTO.getId());
+        }
         return holiday;
     }
     /**

+ 12 - 1
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/holiday/service/dto/HolidayDTO.java

@@ -1,5 +1,6 @@
 package com.jeeplus.business.holiday.service.dto;
 
+import cn.afterturn.easypoi.excel.annotation.Excel;
 import com.alibaba.fastjson.annotation.JSONField;
 import com.baomidou.mybatisplus.annotation.TableField;
 import com.fasterxml.jackson.annotation.JsonFormat;
@@ -18,6 +19,7 @@ public class HolidayDTO extends BaseEntity {
      */
     @DateTimeFormat(pattern = "yyyy-MM-dd")
     @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
+    @Excel(name = "请假日期",width = 16,exportFormat = "yyyy-MM-dd")
     private Date startDay;
 
     private String beginTime;
@@ -62,9 +64,10 @@ public class HolidayDTO extends BaseEntity {
      * 用户id
      */
     private String userId;
-
+    @Excel(name = "请假人",width = 16)
     private String createName;
     private String officeId;
+    @Excel(name = "请假人部门",width = 16)
     private String officeName;
     private String[] dates;
 
@@ -82,4 +85,12 @@ public class HolidayDTO extends BaseEntity {
     private String status;
 
     private List<WorkAttachmentInfo> files;
+    @Excel(name = "请假状态",width = 16)
+    private String driveApplyStatus;
+    @Excel(name = "请假类型",width = 16)
+    private String holidayType;
+    @Excel(name = "请假天数",width = 16)
+    private String holidayDays;
+    @Excel(name = "请假发起时间",width = 16,exportFormat = "yyyy-MM-dd")
+    private Date createTime;
 }

+ 30 - 0
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/inscription/controller/InscriptionController.java

@@ -2,6 +2,8 @@ package com.jeeplus.business.inscription.controller;
 
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.jeeplus.business.drive.service.dto.DriveApplyDTO;
+import com.jeeplus.business.finance.util.EasyPoiUtil;
 import com.jeeplus.business.goOut.service.dto.GoOutDTO;
 import com.jeeplus.business.inscription.domain.Inscription;
 import com.jeeplus.business.inscription.service.InscriptionService;
@@ -9,7 +11,11 @@ import com.jeeplus.business.inscription.service.dto.InscriptionDTO;
 import com.jeeplus.business.project.domain.JyProject;
 import com.jeeplus.business.project.utils.FreemarkerUtil;
 import com.jeeplus.business.project.utils.JyResponseUtil;
+import com.jeeplus.common.excel.ExcelOptions;
+import com.jeeplus.common.excel.annotation.ExportMode;
 import com.jeeplus.common.utils.ResponseUtil;
+import com.jeeplus.logging.annotation.ApiLog;
+import com.jeeplus.logging.constant.enums.LogTypeEnum;
 import com.jeeplus.sys.domain.WorkAttachmentInfo;
 import freemarker.template.Configuration;
 import freemarker.template.Template;
@@ -25,8 +31,10 @@ import javax.servlet.http.HttpServletResponse;
 import java.io.File;
 import java.io.IOException;
 import java.text.ParseException;
+import java.util.ArrayList;
 import java.util.List;
 import java.util.Map;
+import java.util.stream.Collectors;
 
 @Slf4j
 @Api(tags ="文印申请")
@@ -157,5 +165,27 @@ public class InscriptionController {
         return ResponseEntity.ok("操作成功");
     }
 
+    @ApiLog(value = "导出文印申请数据", type = LogTypeEnum.EXPORT)
+    @GetMapping("export")
+    @ApiOperation(value = "导出文印申请数据")
+    public void exportFile(InscriptionDTO inscriptionDTO, Page <InscriptionDTO> page, ExcelOptions options, HttpServletResponse response) throws Exception {
+        String fileName = options.getFilename();
+        String sheetName = options.getSheetName();
+        List<InscriptionDTO> result = new ArrayList<>();
+        if ( ExportMode.current.equals ( options.getMode() ) ) {
+            result = inscriptionService.findPageList(inscriptionDTO,page).getRecords();
+        } else if (ExportMode.selected.equals ( options.getMode() )) {
+            result = inscriptionService.findPageList(inscriptionDTO,page).getRecords().stream ( ).filter ( item ->
+                    options.getSelectIds ( ).contains ( item.getId ( ) )
+            ).collect ( Collectors.toList ( ) );
+        } else {
+            page.setSize (-1);
+            page.setCurrent (0);
+            result = inscriptionService.findPageList(inscriptionDTO,page).getRecords();
+        }
+        EasyPoiUtil.exportExcel ( result, sheetName,  sheetName, InscriptionDTO.class, fileName, response );
+
+    }
+
 
 }

+ 1 - 0
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/inscription/mapper/xml/InscriptionMapper.xml

@@ -16,6 +16,7 @@
             art1.ID_ as task_id,
             a.process_definition_id,
             a.proc_ins_id,
+            (select dv.label from sys_dict_value dv LEFT JOIN sys_dict_type dt on dt.id=dv.dict_type_id where dv.value=a.status and dt.type='program_project_list_info_status') as inscriptionStatus,
             a.status
         from
             jy_inscription a

+ 9 - 0
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/inscription/service/dto/InscriptionDTO.java

@@ -1,10 +1,12 @@
 package com.jeeplus.business.inscription.service.dto;
 
+import cn.afterturn.easypoi.excel.annotation.Excel;
 import com.jeeplus.business.project.domain.JyProject;
 import com.jeeplus.core.domain.BaseEntity;
 import com.jeeplus.sys.domain.WorkAttachmentInfo;
 import lombok.Data;
 
+import java.util.Date;
 import java.util.List;
 
 @Data
@@ -14,6 +16,7 @@ public class InscriptionDTO extends BaseEntity {
      * 关联项目
      */
     private String projectId;
+    @Excel(name = "项目",width = 16)
     private String projectName;
     private List<JyProject> projectList;
 
@@ -65,8 +68,14 @@ public class InscriptionDTO extends BaseEntity {
 
     //申请人部门
     private String officeId;
+    @Excel(name = "申请人部门",width = 16)
     private String officeName;
+    @Excel(name = "申请人",width = 16)
     private String createName;
+    @Excel(name = "申请时间",width = 16,exportFormat = "yyyy-MM-dd HH:mm:ss")
+    private Date createTime;
+    @Excel(name = "状态",width = 16)
+    private String inscriptionStatus;
 
     //申请时间
     private String[] createDates;

+ 31 - 0
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/meetingRoom/controller/MeetingRoomController.java

@@ -2,10 +2,16 @@ package com.jeeplus.business.meetingRoom.controller;
 
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.jeeplus.business.finance.util.EasyPoiUtil;
 import com.jeeplus.business.meetingRoom.domain.MeetingRoom;
 import com.jeeplus.business.meetingRoom.service.MeetingRoomService;
 import com.jeeplus.business.meetingRoom.service.dto.MeetingRoomDTO;
+import com.jeeplus.business.monthly.service.dto.MonthlyDTO;
+import com.jeeplus.common.excel.ExcelOptions;
+import com.jeeplus.common.excel.annotation.ExportMode;
 import com.jeeplus.common.utils.ResponseUtil;
+import com.jeeplus.logging.annotation.ApiLog;
+import com.jeeplus.logging.constant.enums.LogTypeEnum;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
@@ -13,10 +19,13 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.http.ResponseEntity;
 import org.springframework.web.bind.annotation.*;
 
+import javax.servlet.http.HttpServletResponse;
 import java.text.ParseException;
+import java.util.ArrayList;
 import java.util.Date;
 import java.util.List;
 import java.util.Map;
+import java.util.stream.Collectors;
 
 @Slf4j
 @Api(tags ="嘉溢会议室预约")
@@ -91,6 +100,28 @@ public class MeetingRoomController {
         return ResponseEntity.ok(s);
     }
 
+    @ApiLog(value = "导出会议室预约数据", type = LogTypeEnum.EXPORT)
+    @GetMapping("export")
+    @ApiOperation(value = "导出会议室预约数据")
+    public void exportFile(MeetingRoom meetingRoom, Page <MeetingRoom> page, ExcelOptions options, HttpServletResponse response) throws Exception {
+        String fileName = options.getFilename();
+        String sheetName = options.getSheetName();
+        List<MeetingRoom> result = new ArrayList<>();
+        if ( ExportMode.current.equals ( options.getMode() ) ) {
+            result = meetingRoomService.findPageList(meetingRoom,page).getRecords();
+        } else if (ExportMode.selected.equals ( options.getMode() )) {
+            result = meetingRoomService.findPageList(meetingRoom,page).getRecords().stream ( ).filter ( item ->
+                    options.getSelectIds ( ).contains ( item.getId ( ) )
+            ).collect ( Collectors.toList ( ) );
+        } else {
+            page.setSize (-1);
+            page.setCurrent (0);
+            result = meetingRoomService.findPageList(meetingRoom,page).getRecords();
+        }
+        EasyPoiUtil.exportExcel ( result, sheetName,  sheetName, MeetingRoom.class, fileName, response );
+
+    }
+
 
 
 

+ 13 - 0
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/meetingRoom/domain/MeetingRoom.java

@@ -1,5 +1,6 @@
 package com.jeeplus.business.meetingRoom.domain;
 
+import cn.afterturn.easypoi.excel.annotation.Excel;
 import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableName;
 import com.fasterxml.jackson.annotation.JsonFormat;
@@ -19,7 +20,13 @@ public class MeetingRoom extends BaseEntity {
     /**
      * 标题
      */
+    @Excel(name = "标题",width = 16)
     private String title;
+    @Excel(name = "会议开始时间",width = 16,exportFormat = "yyyy-MM-dd HH:mm:ss")
+    @TableField(exist = false)
+    private Date roomDateTime;
+    @Excel(name = "会议时长",width = 16)
+    private String longTime;
 
     /**
      * 会议开始,结束时间,开始日期
@@ -72,9 +79,11 @@ public class MeetingRoom extends BaseEntity {
      * 创建人
      */
     @TableField(exist = false)
+    @Excel(name = "会议发起人",width = 16)
     private String createName;
     @TableField(exist = false)
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @Excel(name = "发起时间",width = 16,exportFormat = "yyyy-MM-dd")
     private Date createDate;
 
     /**
@@ -83,7 +92,11 @@ public class MeetingRoom extends BaseEntity {
     @TableField(exist = false)
     private String officeId;
     @TableField(exist = false)
+    @Excel(name = "发起人部门",width = 16)
     private String officeName;
+    @TableField(exist = false)
+    @Excel(name = "状态",width = 16)
+    private String roomTypeName;
 
     private static final long serialVersionUID = 1L;
 

+ 4 - 0
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/meetingRoom/mapper/xml/MeetingRoomMapper.xml

@@ -15,6 +15,10 @@
             a.duration,
             a.remarks,
             a.create_time as createDate,
+            concat(a.start_date,' ',a.start_time) as roomDateTime,
+            (case when a.duration = '30' then concat(a.duration,'分钟')
+            when a.duration in ('1','2','3') then concat(a.duration,'小时') else '' end) as longTime,
+            (select dv.label from sys_dict_value dv LEFT JOIN sys_dict_type dt on dt.id=dv.dict_type_id where dv.value=a.status and dt.type='program_project_list_info_status') as roomTypeName,
             a.status,
             so.id as officeId,
             so.name as officeName,

+ 33 - 0
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/notify/controller/JyNotifyController.java

@@ -10,14 +10,20 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.google.common.collect.Lists;
+import com.jeeplus.business.finance.util.EasyPoiUtil;
+import com.jeeplus.business.monthly.service.dto.MonthlyDTO;
 import com.jeeplus.business.notify.domain.JyNotifyLog;
 import com.jeeplus.business.notify.domain.PluginNotifyComments;
 import com.jeeplus.business.notify.service.JyNotifyService;
 import com.jeeplus.business.notify.service.dto.JyNotifyDTO;
 import com.jeeplus.business.notify.service.dto.PluginNotifyCommentsDTO;
 import com.jeeplus.common.TokenProvider;
+import com.jeeplus.common.excel.ExcelOptions;
+import com.jeeplus.common.excel.annotation.ExportMode;
 import com.jeeplus.common.utils.ResponseUtil;
 import com.jeeplus.core.query.QueryWrapperGenerator;
+import com.jeeplus.logging.annotation.ApiLog;
+import com.jeeplus.logging.constant.enums.LogTypeEnum;
 import com.jeeplus.sys.feign.IUserApi;
 import com.jeeplus.sys.service.dto.UserDTO;
 import com.jeeplus.utils.StringUtils;
@@ -27,8 +33,11 @@ import org.springframework.http.ResponseEntity;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.web.bind.annotation.*;
 
+import javax.servlet.http.HttpServletResponse;
 import javax.validation.Valid;
+import java.util.ArrayList;
 import java.util.List;
+import java.util.stream.Collectors;
 
 /**
  * 通知通告Controller
@@ -240,6 +249,30 @@ public class JyNotifyController {
     }
 
 
+    @ApiLog(value = "导出月报数据", type = LogTypeEnum.EXPORT)
+    @GetMapping("export")
+    @ApiOperation(value = "导出月报数据")
+    public void exportFile(JyNotifyDTO notifyDTO, Page <JyNotifyDTO> page, ExcelOptions options, HttpServletResponse response) throws Exception {
+        String fileName = options.getFilename();
+        String sheetName = options.getSheetName();
+        List<JyNotifyDTO> result = new ArrayList<>();
+        if ( ExportMode.current.equals ( options.getMode() ) ) {
+            result = notifyService.findPageList (page,notifyDTO).getRecords();
+        } else if (ExportMode.selected.equals ( options.getMode() )) {
+            result = notifyService.findPageList (page,notifyDTO).getRecords().stream ( ).filter ( item ->
+                    options.getSelectIds ( ).contains ( item.getId ( ) )
+            ).collect ( Collectors.toList ( ) );
+        } else {
+            page.setSize (-1);
+            page.setCurrent (0);
+            result = notifyService.findPageList (page,notifyDTO).getRecords();
+        }
+        EasyPoiUtil.exportExcel ( result, sheetName,  sheetName, JyNotifyDTO.class, fileName, response );
+
+    }
+
+
+
 
 
 }

+ 2 - 0
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/notify/mapper/JyNotifyMapper.java

@@ -53,6 +53,8 @@ public interface JyNotifyMapper extends BaseMapper<JyNotify> {
                                @Param("readFlag") String readFlag,
                                @Param(Constants.WRAPPER) QueryWrapper queryWrapper);
 
+    IPage <JyNotifyDTO> findList2(Page <JyNotifyDTO> page,JyNotifyDTO jyNotifyDTO);
+
     /**
      * 获取列表
      *

+ 41 - 0
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/notify/mapper/xml/NotifyMapper.xml

@@ -201,6 +201,47 @@
         order by a.create_time desc
     </select>
 
+
+    <select id="findList2" resultType="com.jeeplus.business.notify.service.dto.JyNotifyDTO">
+        select
+        a.id,
+        a.title,
+        a.content,
+        a.files,
+        a.status,
+        (select dv.label from sys_dict_value dv LEFT JOIN sys_dict_type dt on dt.id=dv.dict_type_id where dv.value=a.type and dt.type='oa_notify_type') as notifyType,
+        (case when ((b.read_num is not null ) and (b.un_read_num is not null)) then concat(b.read_num,'/',b.read_num+b.un_read_num)
+        when (b.read_num is null) and (b.un_read_num is null) then concat('通告未发起') ELSE '' END) as readStatus,
+        (case when a.is_close = '0' then concat('未关闭') when a.is_close = '1' then concat('已关闭') else '' end ) as ifClose,
+        (select dv.label from sys_dict_value dv LEFT JOIN sys_dict_type dt on dt.id=dv.dict_type_id where dv.value=a.status and dt.type='program_project_list_info_status') as notifyStatus,
+        a.create_by_id as createById,
+        a.create_time,
+        a.update_by_id,
+        a.update_time,
+        a.remarks,
+        a.del_flag,
+        a.no,
+        a.begin_date,
+        a.end_date,
+        a.office_id,
+        a.proc_ins_id,
+        a.process_definition_id,
+        u.name as createName,
+        u.photo,
+        b.read_num,
+        b.un_read_num,
+        a.is_close
+        FROM jy_plugin_notify a
+        LEFT JOIN sys_user u ON u.id = a.create_by_id AND u.del_flag = '0'
+        LEFT JOIN (
+        SELECT r.notify_id,
+        sum(case when r.del_flag = 0 and r.read_flag = '1' then 1 else 0 end) read_num,
+        sum(case when r.del_flag = 0 and r.read_flag != '1' then 1 else 0 end) un_read_num
+        FROM jy_plugin_notify_record r GROUP BY r.notify_id
+        ) b ON b.notify_id = a.id
+        where a.del_flag = '0' order by a.create_time desc
+    </select>
+
     <select id="myNotifyDataFindList" resultMap="BaseResultMap">
         SELECT
         <include refid="notifyColumns"/>

+ 10 - 0
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/notify/service/JyNotifyService.java

@@ -101,6 +101,16 @@ public class JyNotifyService extends ServiceImpl <JyNotifyMapper, JyNotify> {
     }
 
     /**
+     * 仅用于导出
+     * @param page
+     * @param jyNotifyDTO
+     * @return
+     */
+    public IPage <JyNotifyDTO> findPageList(Page <JyNotifyDTO> page, JyNotifyDTO jyNotifyDTO) {
+        return baseMapper.findList2 ( page, jyNotifyDTO);
+    }
+
+    /**
      * 自定义分页检索
      *
      * @param page

+ 12 - 0
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/notify/service/dto/JyNotifyDTO.java

@@ -3,6 +3,7 @@
  */
 package com.jeeplus.business.notify.service.dto;
 
+import cn.afterturn.easypoi.excel.annotation.Excel;
 import cn.hutool.core.util.StrUtil;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.fasterxml.jackson.annotation.JsonFormat;
@@ -49,6 +50,7 @@ public class JyNotifyDTO extends BaseDTO {
      */
     @Query
     @Size(min = 0, max = 200, message ="标题长度必须介于 0 和 200 之间")
+    @Excel(name = "标题",width = 16)
     private String title;
     /**
      * 内容
@@ -84,7 +86,14 @@ public class JyNotifyDTO extends BaseDTO {
     /**
      * 通告状态
      */
+    @Excel(name = "类型",width = 16)
     private String notifyType;
+    @Excel(name = "查阅状态",width = 16)
+    private String readStatus;
+    @Excel(name = "关闭状态",width = 16)
+    private String ifClose;
+    @Excel(name = "状态",width = 16)
+    private String notifyStatus;
     /**
      * 文号
      */
@@ -121,8 +130,11 @@ public class JyNotifyDTO extends BaseDTO {
     /**
      * 筛选条件:发布者
      */
+    @Excel(name = "发布者",width = 16)
     private String createName;
     private String createById;
+    @Excel(name = "创建时间",width = 16,exportFormat = "yyyy-MM-dd")
+    private Date createTime;
 
     /**
      * 筛选条件:创建时间

+ 33 - 0
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/payment/controller/PaymentController.java

@@ -4,16 +4,26 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.jeeplus.business.borrow.domain.BorrowMoney;
 import com.jeeplus.business.borrow.service.dto.BorrowDTO;
+import com.jeeplus.business.drive.service.dto.DriveApplyDTO;
+import com.jeeplus.business.finance.util.EasyPoiUtil;
 import com.jeeplus.business.payment.domain.Payment;
 import com.jeeplus.business.payment.service.PaymentService;
 import com.jeeplus.business.payment.service.dto.PaymentDTO;
+import com.jeeplus.common.excel.ExcelOptions;
+import com.jeeplus.common.excel.annotation.ExportMode;
 import com.jeeplus.common.utils.ResponseUtil;
+import com.jeeplus.logging.annotation.ApiLog;
+import com.jeeplus.logging.constant.enums.LogTypeEnum;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.http.ResponseEntity;
 import org.springframework.web.bind.annotation.*;
 
 import javax.annotation.Resource;
+import javax.servlet.http.HttpServletResponse;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.stream.Collectors;
 
 @Api("付款管理")
 @RestController
@@ -93,4 +103,27 @@ public class PaymentController {
         return ResponseEntity.ok(pageList);
     }
 
+    @ApiLog(value = "导出付款申请数据", type = LogTypeEnum.EXPORT)
+    @GetMapping("export")
+    @ApiOperation(value = "导出付款申请数据")
+    public void exportFile(PaymentDTO paymentDTO, Page <PaymentDTO> page, ExcelOptions options, HttpServletResponse response) throws Exception {
+        String fileName = options.getFilename();
+        String sheetName = options.getSheetName();
+        List<PaymentDTO> result = new ArrayList<>();
+        if ( ExportMode.current.equals ( options.getMode() ) ) {
+            result = paymentService.findPageList(paymentDTO,page).getRecords();
+        } else if (ExportMode.selected.equals ( options.getMode() )) {
+            result = paymentService.findPageList(paymentDTO,page).getRecords().stream ( ).filter ( item ->
+                    options.getSelectIds ( ).contains ( item.getId ( ) )
+            ).collect ( Collectors.toList ( ) );
+        } else {
+            page.setSize (-1);
+            page.setCurrent (0);
+            result = paymentService.findPageList(paymentDTO,page).getRecords();
+        }
+        EasyPoiUtil.exportExcel ( result, sheetName,  sheetName, PaymentDTO.class, fileName, response );
+
+    }
+
+
 }

+ 2 - 2
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/payment/mapper/xml/PaymentMapper.xml

@@ -5,7 +5,7 @@
 <mapper namespace="com.jeeplus.business.payment.mapper.PaymentMapper">
 
     <select id="findPageList" resultType="com.jeeplus.business.payment.service.dto.PaymentDTO">
-        select
+        select distinct
             a.id,
             a.create_by_id,
             a.no,
@@ -19,6 +19,7 @@
             a.payment_type,
             a.remarks,
             a.status,
+            (select dv.label from sys_dict_value dv LEFT JOIN sys_dict_type dt on dt.id=dv.dict_type_id where dv.value=a.status and dt.type='program_project_list_info_status') as paymentStatus,
             a.proc_ins_id,
             a.process_definition_id,
             a.refund,
@@ -107,7 +108,6 @@
         left join sys_user su on a.payment_user = su.id and su.del_flag = '0'
         left join sys_office so on su.office_id = so.id and so.del_flag = '0'
         ${ew.customSqlSegment}
-        and a.status = '5'
     </select>
 
 </mapper>

+ 1 - 0
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/payment/service/PaymentService.java

@@ -255,6 +255,7 @@ public class PaymentService {
         UserDTO userDTO = SpringUtil.getBean ( IUserApi.class ).getByToken(TokenProvider.getCurrentToken());
         QueryWrapper<Payment> queryWrapper = QueryWrapperGenerator.buildQueryCondition(payment, Payment.class);
         queryWrapper.eq("a.create_by_id",userDTO.getId());
+        queryWrapper.eq("a.status","5");
         queryWrapper.orderByDesc("a.update_time");
         IPage<Payment> moneyList = paymentMapper.listByUserId(queryWrapper,page);
         return moneyList;

+ 12 - 0
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/payment/service/dto/PaymentDTO.java

@@ -1,5 +1,6 @@
 package com.jeeplus.business.payment.service.dto;
 
+import cn.afterturn.easypoi.excel.annotation.Excel;
 import com.fasterxml.jackson.annotation.JsonFormat;
 import com.jeeplus.business.project.domain.JyProject;
 import com.jeeplus.core.domain.BaseEntity;
@@ -23,6 +24,7 @@ public class PaymentDTO extends BaseEntity {
     /**
      * 付款编号
      */
+    @Excel(name = "付款编号",width = 25)
     private String no;
 
     /**
@@ -40,6 +42,7 @@ public class PaymentDTO extends BaseEntity {
     private String reason;
 
     //付款金额(小写)
+    @Excel(name = "付款金额",width = 25)
     private String paymentLower;
 
     //付款金额(大写)
@@ -60,9 +63,11 @@ public class PaymentDTO extends BaseEntity {
     private String taskId;
 
     //对冲金额
+    @Excel(name = "对冲金额",width = 25)
     private String refund;
 
     //剩余付款额度
+    @Excel(name = "剩余付款额度",width = 25)
     private String finalMoney;
 
     //收款单位
@@ -71,10 +76,12 @@ public class PaymentDTO extends BaseEntity {
     /**
      * 部门名称
      */
+
     private String officeName;
     private String officeId;
 
     //付款人
+
     private String createName;
 
     //付款时间
@@ -87,14 +94,17 @@ public class PaymentDTO extends BaseEntity {
     private List<JyProject> projectDTOList;
 
     //付款人
+    @Excel(name = "付款人",width = 25)
     private String paymentUser;
 
     //付款时间
     @DateTimeFormat(pattern = "yyyy-MM-dd")
     @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "付款时间",width = 16,exportFormat = "yyyy-MM-dd")
     private Date paymentTime;
 
     //付款人部门
+    @Excel(name = "付款人部门",width = 25)
     private String paymentOffice;
 
     /**
@@ -102,6 +112,8 @@ public class PaymentDTO extends BaseEntity {
      */
     private String ourBank;
     private String bankNumber;
+    @Excel(name = "付款状态",width = 25)
+    private String paymentStatus;
 
 
 

+ 30 - 0
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/project/controller/JyProjectController.java

@@ -5,6 +5,8 @@ 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.demo.annotation.DemoMode;
+import com.jeeplus.business.finance.util.EasyPoiUtil;
+import com.jeeplus.business.monthly.service.dto.MonthlyDTO;
 import com.jeeplus.business.program.configuration.projectDict.domain.vo.FileDictVo;
 import com.jeeplus.business.program.configuration.projectDict.service.ProjectDictService;
 import com.jeeplus.business.program.configuration.projectDict.service.dto.ProjectDictDto;
@@ -21,6 +23,8 @@ import com.jeeplus.business.project.utils.JyResponseUtil;
 import com.jeeplus.business.workContractInfo.domain.JyWorkContractInfo;
 import com.jeeplus.business.workContractInfo.service.dto.JyWorkContractInfoDto;
 
+import com.jeeplus.common.excel.ExcelOptions;
+import com.jeeplus.common.excel.annotation.ExportMode;
 import com.jeeplus.common.utils.ResponseUtil;
 import com.jeeplus.logging.annotation.ApiLog;
 import com.jeeplus.logging.constant.enums.LogTypeEnum;
@@ -39,8 +43,10 @@ import javax.servlet.http.HttpServletResponse;
 import javax.validation.Valid;
 import java.io.File;
 import java.io.IOException;
+import java.util.ArrayList;
 import java.util.List;
 import java.util.Map;
+import java.util.stream.Collectors;
 
 @Slf4j
 @Api(tags ="嘉溢项目登记")
@@ -501,6 +507,30 @@ public class JyProjectController {
     }
 
 
+    @ApiLog(value = "导出项目数据", type = LogTypeEnum.EXPORT)
+    @GetMapping("export")
+    @ApiOperation(value = "导出项目数据")
+    public void exportFile(JyProject jyProject, Page <JyProject> page, ExcelOptions options, HttpServletResponse response) throws Exception {
+        String fileName = options.getFilename();
+        String sheetName = options.getSheetName();
+        List<JyProject> result = new ArrayList<>();
+        if ( ExportMode.current.equals ( options.getMode() ) ) {
+            result = jyProjectService.list(page, jyProject).getRecords();
+        } else if (ExportMode.selected.equals ( options.getMode() )) {
+            result = jyProjectService.list(page, jyProject).getRecords().stream ( ).filter ( item ->
+                    options.getSelectIds ( ).contains ( item.getId ( ) )
+            ).collect ( Collectors.toList ( ) );
+        } else {
+            page.setSize (-1);
+            page.setCurrent (0);
+            result = jyProjectService.list(page, jyProject).getRecords();
+        }
+        EasyPoiUtil.exportExcel ( result, sheetName,  sheetName, JyProject.class, fileName, response );
+
+    }
+
+
+
 
 
 

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

@@ -1,11 +1,13 @@
 package com.jeeplus.business.project.domain;
 
+import cn.afterturn.easypoi.excel.annotation.Excel;
 import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableName;
 import com.jeeplus.core.domain.BaseEntity;
 import lombok.Data;
 
 import java.io.Serializable;
+import java.util.Date;
 import java.util.List;
 
 @Data
@@ -19,11 +21,13 @@ JyProject extends BaseEntity implements Serializable {
     /**
      * 项目名称
      */
+    @Excel(name = "项目名称",width = 16)
     private String name;
 
     /**
      * 项目编号
      */
+    @Excel(name = "项目编号",width = 16)
     private String no;
 
     /**
@@ -111,6 +115,7 @@ JyProject extends BaseEntity implements Serializable {
     /**
      * 合同名称
      */
+    @Excel(name = "合同名称",width = 16)
     private String contractName;
 
     /**
@@ -126,6 +131,7 @@ JyProject extends BaseEntity implements Serializable {
     /**
      * 项目负责人
      */
+    @Excel(name = "负责人",width = 16)
     private String projectLeader;
 
     /**
@@ -161,8 +167,15 @@ JyProject extends BaseEntity implements Serializable {
      * 著委托方
      */
     @TableField(exist = false)
+    @Excel(name = "主委托方",width = 16)
     private String primaryLinkman;
 
+    @TableField(exist = false)
+    @Excel(name = "创建人",width = 16)
+    private String createById;
+    @Excel(name = "创建时间",width = 16,exportFormat = "yyyy-MM-dd")
+    private Date createTime;
+
     /**
      * 合同参数
      */
@@ -325,9 +338,39 @@ JyProject extends BaseEntity implements Serializable {
     private String contractNo;
 
     @TableField(exist = false)
+    @Excel(name = "成员数量(人)",width = 16)
     private String memberCount;
 
 
+    @TableField(exist = false)
+    @Excel(name = "登记状态",width = 16)
+    private String projectTypeName;
+    @TableField(exist = false)
+    @Excel(name = "一级校审",width = 16)
+    private String firstTypeName;
+    @TableField(exist = false)
+    @Excel(name = "二级校审",width = 16)
+    private String secondTypeName;
+    @TableField(exist = false)
+    @Excel(name = "三级校审",width = 16)
+    private String thirdTypeName;
+    @TableField(exist = false)
+    @Excel(name = "报告签发",width = 16)
+    private String issuanceTypeName;
+    @TableField(exist = false)
+    @Excel(name = "环评资质",width = 16)
+    private String eiaTypeName;
+    @TableField(exist = false)
+    @Excel(name = "外审",width = 16)
+    private String outTypeName;
+    @TableField(exist = false)
+    @Excel(name = "报批签发",width = 16)
+    private String submitTypeName;
+    @TableField(exist = false)
+    @Excel(name = "项目归档",width = 16)
+    private String archiveTypeName;
+
+
 
 
 }

+ 9 - 0
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/project/mapper/xml/ProjectListMapper.xml

@@ -93,6 +93,15 @@
            a.special,
            a.contract_project_no,
            (select name from sys_user where id=a.project_leader) as projectLeader,
+            (select dv.label from sys_dict_value dv LEFT JOIN sys_dict_type dt on dt.id=dv.dict_type_id where dv.value=a.status and dt.type='program_project_list_info_status') as projectTypeName,
+            (select dv.label from sys_dict_value dv LEFT JOIN sys_dict_type dt on dt.id=dv.dict_type_id where dv.value=pa1.status and dt.type='program_project_list_info_status') as firstTypeName,
+            (select dv.label from sys_dict_value dv LEFT JOIN sys_dict_type dt on dt.id=dv.dict_type_id where dv.value=pa2.status and dt.type='program_project_list_info_status') as secondTypeName,
+            (select dv.label from sys_dict_value dv LEFT JOIN sys_dict_type dt on dt.id=dv.dict_type_id where dv.value=pa3.status and dt.type='program_project_list_info_status') as thirdTypeName,
+            (select dv.label from sys_dict_value dv LEFT JOIN sys_dict_type dt on dt.id=dv.dict_type_id where dv.value=a.report_issuance and dt.type='program_project_list_info_status') as issuanceTypeName,
+            (select dv.label from sys_dict_value dv LEFT JOIN sys_dict_type dt on dt.id=dv.dict_type_id where dv.value=peq.status and dt.type='program_project_list_info_status') as eiaTypeName,
+            (select dv.label from sys_dict_value dv LEFT JOIN sys_dict_type dt on dt.id=dv.dict_type_id where dv.value=po.status and dt.type='program_project_list_info_status') as outTypeName,
+            (select dv.label from sys_dict_value dv LEFT JOIN sys_dict_type dt on dt.id=dv.dict_type_id where dv.value=a.reports_submit and dt.type='program_project_list_info_status') as submitTypeName,
+            (select dv.label from sys_dict_value dv LEFT JOIN sys_dict_type dt on dt.id=dv.dict_type_id where dv.value=par.status and dt.type='program_project_list_info_status') as archiveTypeName,
            a.proc_ins_id,
            a.process_definition_id,
            b.name AS create_by_id,

+ 65 - 0
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/project/service/JyProjectService.java

@@ -579,7 +579,33 @@ public class JyProjectService {
         JyProject info = jyProjectMapper.getById(id);
         //保存项目信息
         if (ObjectUtil.isNotEmpty(info)){
+            //获取用印id
+            QueryWrapper<Signet> queryWrapper = new QueryWrapper<>();
+            queryWrapper.orderByDesc("create_time");
+            List<Signet> signets = signetMapper.selectList(queryWrapper);
+            for (Signet signet : signets) {
+                if (StringUtils.isNotBlank(signet.getProjectId())){
+                    String[] split = signet.getProjectId().split(",");
+                    for (String s : split) {
+                        if (StringUtils.isNotBlank(s)){
+                            if (StringUtils.isNotBlank(signet.getTypeStatus())){
+                                //用印类型为报告,则获取报告签发
+                                if ( s.equals(info.getId()) && signet.getTypeStatus().equals("1") ){
+                                    info.setSealId(signet.getId());
+                                }
+                                if (s.equals(info.getId()) && signet.getTypeStatus().equals("2")){
+                                    //用印类型为报批,则设置报批签发所需信息
+                                    info.setReportsSubmitId(signet.getId());
+                                    info.setProcInsIdReports(signet.getProcInsId());
+                                    info.setReportsSubmit(signet.getStatus());
+                                }
+                            }
+                        }
+                    }
+                }
+            }
             BeanUtils.copyProperties(info, jyProjectDTO);
+
         }
         // 查询联系人列表
         ArrayList<JyWorkClientLinkman> jyWorkClientLinkmen = new ArrayList<>();
@@ -993,6 +1019,19 @@ public class JyProjectService {
                 data.put("firstAgreeName","");
                 data.put("firstAgreeDate","");
 
+                //审核意见和修改意见长度比较,然后将双方长度变为一致
+                if (strings.size()<strings1.size()){
+                    for (int i = strings.size()+1; i <strings1.size() ; i++) {
+                        strings.add("");
+                    }
+                    data.put("firstAuditList",strings);
+                }else if (strings.size()>strings1.size()){
+                    for (int i = strings1.size()+1; i <strings.size() ; i++) {
+                        strings1.add("");
+                    }
+                    data.put("firstEditList",strings1);
+                }
+
             }
             if (jyProjectAuditDTOS.size()>=2){
                 //审核意见
@@ -1056,6 +1095,19 @@ public class JyProjectService {
                 data.put("secondAgreeName","");
                 data.put("secondAgreeDate","");
 
+                //审核意见和修改意见长度比较,然后将双方长度变为一致
+                if (strings.size()<strings1.size()){
+                    for (int i = strings.size()+1; i <strings1.size() ; i++) {
+                        strings.add("");
+                    }
+                    data.put("secondAuditList",strings);
+                }else if (strings.size()>strings1.size()){
+                    for (int i = strings1.size()+1; i <strings.size() ; i++) {
+                        strings1.add("");
+                    }
+                    data.put("secondEditList",strings1);
+                }
+
 
             }
             if (jyProjectAuditDTOS.size()>=3){
@@ -1118,6 +1170,19 @@ public class JyProjectService {
                 data.put("thirdAgreeName","");
                 data.put("thirdAgreeDate","");
 
+                //审核意见和修改意见长度比较,然后将双方长度变为一致
+                if (strings.size()<strings1.size()){
+                    for (int i = strings.size()+1; i <strings1.size() ; i++) {
+                        strings.add("");
+                    }
+                    data.put("thirdAuditList",strings);
+                }else if (strings.size()>strings1.size()){
+                    for (int i = strings1.size()+1; i <strings.size() ; i++) {
+                        strings1.add("");
+                    }
+                    data.put("thirdEditList",strings1);
+                }
+
             }
             //签发人
             data.put("submitPeople","");

+ 32 - 0
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/reimbursement/controller/JyReimbursementInfoController.java

@@ -2,12 +2,18 @@ package com.jeeplus.business.reimbursement.controller;
 
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.jeeplus.business.drive.service.dto.DriveApplyDTO;
+import com.jeeplus.business.finance.util.EasyPoiUtil;
 import com.jeeplus.business.project.domain.JyProject;
 import com.jeeplus.business.project.service.dto.JyProjectDTO;
 import com.jeeplus.business.reimbursement.service.JyReimbursementInfoService;
 import com.jeeplus.business.reimbursement.service.dto.JyReimbursementInfoDTO;
+import com.jeeplus.common.excel.ExcelOptions;
+import com.jeeplus.common.excel.annotation.ExportMode;
 import com.jeeplus.common.utils.ResponseUtil;
 import com.jeeplus.flowable.feign.IFlowableApi;
+import com.jeeplus.logging.annotation.ApiLog;
+import com.jeeplus.logging.constant.enums.LogTypeEnum;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.apache.commons.lang3.StringUtils;
@@ -15,7 +21,10 @@ import org.springframework.http.ResponseEntity;
 import org.springframework.web.bind.annotation.*;
 
 import javax.annotation.Resource;
+import javax.servlet.http.HttpServletResponse;
+import java.util.ArrayList;
 import java.util.List;
+import java.util.stream.Collectors;
 
 @RestController
 @Api(tags ="报销管理")
@@ -107,6 +116,29 @@ public class JyReimbursementInfoController {
         return ResponseEntity.ok(jyProjects);
     }
 
+    @ApiLog(value = "导出报销数据", type = LogTypeEnum.EXPORT)
+    @GetMapping("export")
+    @ApiOperation(value = "导出报销数据")
+    public void exportFile(JyReimbursementInfoDTO dto, Page <JyReimbursementInfoDTO> page, ExcelOptions options, HttpServletResponse response) throws Exception {
+        String fileName = options.getFilename();
+        String sheetName = options.getSheetName();
+        List<JyReimbursementInfoDTO> result = new ArrayList<>();
+        if ( ExportMode.current.equals ( options.getMode() ) ) {
+            result = jyReimbursementInfoService.list(page, dto).getRecords();
+        } else if (ExportMode.selected.equals ( options.getMode() )) {
+            result = jyReimbursementInfoService.list(page, dto).getRecords().stream ( ).filter ( item ->
+                    options.getSelectIds ( ).contains ( item.getId ( ) )
+            ).collect ( Collectors.toList ( ) );
+        } else {
+            page.setSize (-1);
+            page.setCurrent (0);
+            result = jyReimbursementInfoService.list(page, dto).getRecords();
+        }
+        EasyPoiUtil.exportExcel ( result, sheetName,  sheetName, JyReimbursementInfoDTO.class, fileName, response );
+
+    }
+
+
 
 
 

+ 1 - 0
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/reimbursement/mapper/xml/JyReimbursementInfoBorrowMapper.xml

@@ -16,6 +16,7 @@
             a.number,
             a.money_lower
         from jy_reimbursement_detail_info_borrow a
+        where a.del_flag = '0'
     </select>
 
 

+ 5 - 4
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/reimbursement/mapper/xml/JyReimbursementInfoMapper.xml

@@ -13,10 +13,10 @@
 			WHEN a.apply_type = 3 THEN b3.type_id
 									ELSE b4.type_id END) AS type_id,
 			(CASE
-			WHEN a.apply_type = 1 THEN t.name
-			WHEN a.apply_type = 2 THEN t2.name
-			WHEN a.apply_type = 3 THEN t3.name
-									ELSE t4.name END) AS type_name,
+			WHEN a.apply_type = 1 THEN b.type_name
+			WHEN a.apply_type = 2 THEN b2.type_name
+			WHEN a.apply_type = 3 THEN b3.type_name
+									ELSE b4.type_name END) AS type_name,
 			(CASE
 			WHEN a.apply_type = 1 THEN b.project_id
 			WHEN a.apply_type = 2 THEN b2.project_id
@@ -51,6 +51,7 @@
 			o.name as officeName,
 			a.create_time,
 			a.status,
+			(select dv.label from sys_dict_value dv LEFT JOIN sys_dict_type dt on dt.id=dv.dict_type_id where dv.value=a.status and dt.type='program_project_list_info_status') as infoStatus,
 			a.proc_ins_id,
 			a.process_definition_id,
 			d.ID_ AS task_id,

+ 10 - 7
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/reimbursement/service/dto/JyReimbursementInfoDTO.java

@@ -1,6 +1,7 @@
 package com.jeeplus.business.reimbursement.service.dto;
 
 
+import cn.afterturn.easypoi.excel.annotation.Excel;
 import com.fasterxml.jackson.annotation.JsonFormat;
 import com.jeeplus.business.reimbursement.domain.*;
 import com.jeeplus.core.domain.BaseEntity;
@@ -25,7 +26,7 @@ public class JyReimbursementInfoDTO extends BaseEntity {
     /**
      * 报销编号
      */
-
+    @Excel(name = "报销编号", width = 30)
     private String no;
 
     /**
@@ -36,7 +37,7 @@ public class JyReimbursementInfoDTO extends BaseEntity {
     /**
      * 报销类别
      */
-
+    @Excel(name = "报销类别", width = 30)
     private String typeName;
 
     /**
@@ -47,7 +48,7 @@ public class JyReimbursementInfoDTO extends BaseEntity {
     /**
      * 报销项目
      */
-
+    @Excel(name = "报销项目", width = 30)
     private String projectName;
 
 
@@ -60,31 +61,32 @@ public class JyReimbursementInfoDTO extends BaseEntity {
     /**
      * 经办人
      */
-
+    @Excel(name = "经办人", width = 30)
     private String createName;
 
     /**
      * 报销人
      */
-
+    @Excel(name = "报销人", width = 30)
     private String name;
 
     /**
      * 报销部门
      */
-
+    @Excel(name = "报销部门", width = 30)
     private String deptName;
 
     /**
      * 报销日期
      */
     @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "报销日期",exportFormat="yyyy-MM-dd",width = 30)
     private Date createTime;
 
     /**
      * 报销金额
      */
-
+    @Excel(name = "报销金额", width = 30)
     private BigDecimal number;
 
     /**
@@ -106,6 +108,7 @@ public class JyReimbursementInfoDTO extends BaseEntity {
     private String taskId;
 
     //报销类型
+    @Excel(name = "报销类型", width = 30, orderNum = "2",dict = "jy_apply")
     private String applyType;
 
     /**

+ 34 - 2
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/useSeal/controller/SignetController.java

@@ -3,18 +3,27 @@ package com.jeeplus.business.useSeal.controller;
 import com.alibaba.fastjson.JSON;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.jeeplus.business.finance.util.EasyPoiUtil;
+import com.jeeplus.business.monthly.service.dto.MonthlyDTO;
 import com.jeeplus.business.project.service.dto.JyProjectDTO;
 import com.jeeplus.business.useSeal.domain.Signet;
+import com.jeeplus.common.excel.ExcelOptions;
+import com.jeeplus.common.excel.annotation.ExportMode;
 import com.jeeplus.common.utils.ResponseUtil;
 import com.jeeplus.business.useSeal.service.SignetService;
 import com.jeeplus.business.useSeal.service.dto.SignetDTO;
+import com.jeeplus.logging.annotation.ApiLog;
+import com.jeeplus.logging.constant.enums.LogTypeEnum;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.http.ResponseEntity;
 import org.springframework.web.bind.annotation.*;
 
 import javax.annotation.Resource;
+import javax.servlet.http.HttpServletResponse;
+import java.util.ArrayList;
 import java.util.List;
+import java.util.stream.Collectors;
 
 @RestController
 @Api(tags ="用印")
@@ -42,8 +51,8 @@ public class SignetController {
     @ApiOperation(value = "新增、修改")
     @PostMapping("/saveForm")
     public ResponseEntity save(@RequestBody SignetDTO dto) throws Exception{
-        String id = signetService.save(dto);
-        return ResponseUtil.newInstance().add("businessTable", "jy_user_signet").add("businessId", id).ok ("操作成功");
+        Signet signet = signetService.save(dto);
+        return ResponseUtil.newInstance().add("businessTable", "jy_user_signet").add("businessId", signet.getId()).add("no",signet.getNo()).ok ("操作成功");
     }
 
 
@@ -114,6 +123,29 @@ public class SignetController {
     }
 
 
+    @ApiLog(value = "导出用印数据", type = LogTypeEnum.EXPORT)
+    @GetMapping("export")
+    @ApiOperation(value = "导出用印数据")
+    public void exportFile(Page<SignetDTO> page, SignetDTO dto, ExcelOptions options, HttpServletResponse response) throws Exception {
+        String fileName = options.getFilename();
+        String sheetName = options.getSheetName();
+        List<SignetDTO> result = new ArrayList<>();
+        if ( ExportMode.current.equals ( options.getMode() ) ) {
+            result = signetService.findList(page,dto).getRecords();
+        } else if (ExportMode.selected.equals ( options.getMode() )) {
+            result = signetService.findList(page,dto).getRecords().stream ( ).filter ( item ->
+                    options.getSelectIds ( ).contains ( item.getId ( ) )
+            ).collect ( Collectors.toList ( ) );
+        } else {
+            page.setSize (-1);
+            page.setCurrent (0);
+            result = signetService.findList(page,dto).getRecords();
+        }
+        EasyPoiUtil.exportExcel ( result, sheetName,  sheetName, SignetDTO.class, fileName, response );
+
+    }
+
+
 
 
 

+ 5 - 0
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/useSeal/domain/Signet.java

@@ -5,6 +5,8 @@ import com.baomidou.mybatisplus.annotation.TableName;
 import com.jeeplus.core.domain.BaseEntity;
 import lombok.Data;
 
+import java.util.List;
+
 @Data
 @TableName("jy_user_signet")
 public class Signet extends BaseEntity {
@@ -76,6 +78,9 @@ public class Signet extends BaseEntity {
     @TableField(exist = false)
     private String outInstanceId;
 
+    @TableField(exist = false)
+    private List<String> types;
+
 
 
 

+ 3 - 0
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/useSeal/mapper/xml/SignetMapper.xml

@@ -13,6 +13,9 @@
             a.no,
             (select dv.label from sys_dict_value dv where a.type=dv.id) as type,
             (select dv.label from sys_dict_value dv LEFT JOIN sys_dict_type dt on dt.id=dv.dict_type_id where dv.value=a.first_type and dt.type='jy_signet_type') as firstType,
+            (case when (a.type is null) then (select dv.label from sys_dict_value dv LEFT JOIN sys_dict_type dt on dt.id=dv.dict_type_id where dv.value=a.first_type and dt.type='jy_signet_type')
+            when a.type is not null then CONCAT('项目','-',(select dv.label from sys_dict_value dv where a.type=dv.id))  ELSE '' END) as typeName,
+            (select dv.label from sys_dict_value dv LEFT JOIN sys_dict_type dt on dt.id=dv.dict_type_id where dv.value=a.status and dt.type='program_project_list_info_status') as sealTypeName,
             a.number,
             a.status,
             a.remarks,

+ 24 - 28
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/useSeal/service/SignetService.java

@@ -96,7 +96,7 @@ public class SignetService {
         }
         IPage<SignetDTO> signetList=signetMapper.findPageList(signetDTOPage,queryWrapper);
         //报批签发信息
-        List<JyProjectReportsSubmit> jyProjectReportsSubmits = jyProjectReportsSubmitMapper.selectList(new QueryWrapper<JyProjectReportsSubmit>());
+//        List<JyProjectReportsSubmit> jyProjectReportsSubmits = jyProjectReportsSubmitMapper.selectList(new QueryWrapper<JyProjectReportsSubmit>());
 
         signetList.getRecords().stream().forEach(item->{
             if (StringUtils.isNotBlank(item.getProjectName())){
@@ -115,19 +115,15 @@ public class SignetService {
                 ArrayList<JyProject> jyProjects = new ArrayList<>();
                 for (String s : split) {
                     JyProject byId = jyProjectMapper.getById(s);
-                    byId.setSealId(item.getId());
-                    //报批签发关联的项目
-                    for (JyProjectReportsSubmit jyProjectReportsSubmit : jyProjectReportsSubmits) {
-                        if (StringUtils.isNotBlank(jyProjectReportsSubmit.getProjectId())){
-                            String[] split1 = jyProjectReportsSubmit.getProjectId().split(",");
-                            //将用印关联的项目和报批签发关联的项目进行比较
-                            for (String s1 : split1) {
-                                if (s1.equals(s)){
-                                    byId.setReportsSubmitId(jyProjectReportsSubmit.getId());
-                                }
-                            }
+                    //如果类型是报告,则设置报告
+                    if (StringUtils.isNotBlank(item.getTypeStatus())){
+                        if (item.getTypeStatus().equals("1")){
+                            byId.setSealId(item.getId());
+                        }else {
+                            byId.setReportsSubmitId(item.getId());
                         }
                     }
+
                     jyProjects.add(byId);
                 }
                 item.setProjectList(jyProjects);
@@ -137,7 +133,7 @@ public class SignetService {
 
     }
 
-    public String save(SignetDTO dto) throws Exception{
+    public Signet save(SignetDTO dto) throws Exception{
         // 获取当前登录人信息
 //        UserDTO userDTO = UserUtils.getCurrentUserDTO();
         UserDTO userDTO = SpringUtil.getBean ( IUserApi.class ).getByToken (TokenProvider.getCurrentToken ( ));
@@ -148,7 +144,7 @@ public class SignetService {
         }
     }
 
-    public synchronized String add(SignetDTO dto, UserDTO userDTO) throws Exception{
+    public synchronized Signet add(SignetDTO dto, UserDTO userDTO) throws Exception{
         // 生成id
         String id = UUID.randomUUID().toString().replace("-", "");
         // 生成编号
@@ -215,10 +211,10 @@ public class SignetService {
             saveFiles(dto.getFiles(), userDTO, id);
         }
 
-        return id;
+        return signet;
     }
 
-    public String update(SignetDTO dto, UserDTO userDTO) {
+    public Signet update(SignetDTO dto, UserDTO userDTO) {
         Signet signet = new Signet();
         BeanUtils.copyProperties(dto, signet);
         signet.setUpdateTime(new Date());
@@ -283,18 +279,18 @@ public class SignetService {
             updateFiles(dto.getFiles(), userDTO, dto.getId());
         }
         //修改项目中的报告签发状态或报批签发状态
-        if (StringUtils.isNotBlank(signet.getProjectId())){
-            String[] split = signet.getProjectId().split(",");
-            for (String s : split) {
-                    if (StringUtils.isNotBlank(s) && signet.getTypeStatus().equals("1")){
-                        jyProjectMapper.updateReportIssuanceById(s,signet.getStatus());
-                    }
-                    if (StringUtils.isNotBlank(s) && signet.getTypeStatus().equals("2")){
-                        jyProjectMapper.updateReportsSubmit(s,signet.getStatus());
-                    }
-            }
-        }
-        return dto.getId();
+//        if (StringUtils.isNotBlank(signet.getProjectId())){
+//            String[] split = signet.getProjectId().split(",");
+//            for (String s : split) {
+//                    if (StringUtils.isNotBlank(s) && signet.getTypeStatus().equals("1")){
+//                        jyProjectMapper.updateReportIssuanceById(s,signet.getStatus());
+//                    }
+//                    if (StringUtils.isNotBlank(s) && signet.getTypeStatus().equals("2")){
+//                        jyProjectMapper.updateReportsSubmit(s,signet.getStatus());
+//                    }
+//            }
+//        }
+        return signet;
     }
 
     /**

+ 11 - 0
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/useSeal/service/dto/SignetDTO.java

@@ -1,5 +1,6 @@
 package com.jeeplus.business.useSeal.service.dto;
 
+import cn.afterturn.easypoi.excel.annotation.Excel;
 import com.baomidou.mybatisplus.annotation.TableField;
 import com.fasterxml.jackson.annotation.JsonFormat;
 import com.jeeplus.business.project.domain.JyProject;
@@ -33,8 +34,12 @@ public class SignetDTO  {
     /**
      * 用印编号
      */
+    @Excel(name = "用印编号",width = 16)
     private String no;
 
+    @Excel(name = "用印类型",width = 16)
+    private String typeName;
+
     /**
      * 用印类型(大类)
      */
@@ -48,6 +53,7 @@ public class SignetDTO  {
     /**
      * 用印份数
      */
+    @Excel(name = "用印份数",width = 16)
     private Integer number;
 
     /**
@@ -58,7 +64,10 @@ public class SignetDTO  {
     /**
      * 关联项目名称
      */
+    @Excel(name = "关联项目",width = 16)
     private String projectName;
+    @Excel(name = "状态",width = 16)
+    private String sealTypeName;
 
     /*
     说明
@@ -81,7 +90,9 @@ public class SignetDTO  {
      */
     private String createById;
     @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "申请时间",width = 16,exportFormat = "yyyy-MM-dd")
     private Date createDate;
+    @Excel(name = "申请人",width = 16)
     private String createByName;
 
     /**

+ 33 - 16
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/workClientInfo/controller/JyWorkClientController.java

@@ -6,11 +6,17 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 
+import com.jeeplus.business.finance.util.EasyPoiUtil;
+import com.jeeplus.business.monthly.service.dto.MonthlyDTO;
 import com.jeeplus.business.workClientInfo.domain.JyWorkClientInfo;
 import com.jeeplus.business.workClientInfo.domain.dto.JyWorkClientInfosDto;
 import com.jeeplus.business.workClientInfo.service.JyWorkClientService;
 import com.jeeplus.common.TokenProvider;
+import com.jeeplus.common.excel.ExcelOptions;
+import com.jeeplus.common.excel.annotation.ExportMode;
 import com.jeeplus.core.query.QueryWrapperGenerator;
+import com.jeeplus.logging.annotation.ApiLog;
+import com.jeeplus.logging.constant.enums.LogTypeEnum;
 import com.jeeplus.sys.feign.IUserApi;
 import com.jeeplus.sys.service.dto.UserDTO;
 //import com.jeeplus.sys.utils.TicketQueryUtils;
@@ -23,8 +29,11 @@ import org.springframework.http.ResponseEntity;
 import org.springframework.web.bind.annotation.*;
 
 import javax.annotation.Resource;
+import javax.servlet.http.HttpServletResponse;
+import java.util.ArrayList;
 import java.util.List;
 import java.util.Map;
+import java.util.stream.Collectors;
 
 @Slf4j
 @Api(tags ="jyWorkClientInfo")
@@ -41,22 +50,8 @@ public class JyWorkClientController {
     @ApiOperation(value = "客户信息列表")
     @GetMapping(value = "list")
     public ResponseEntity<IPage<JyWorkClientInfo>> list(JyWorkClientInfo workClientInfo, Page<JyWorkClientInfo> page) throws Exception {
-        QueryWrapper<JyWorkClientInfo> workClientInfoQueryWrapper = QueryWrapperGenerator.buildQueryCondition(workClientInfo, JyWorkClientInfo.class);
-        if (ObjectUtil.isNotEmpty(workClientInfo)) {
-            if (ObjectUtil.isNotEmpty(workClientInfo.getCreateDates())) {
-                workClientInfoQueryWrapper.between("a.create_time",workClientInfo.getCreateDates()[0], workClientInfo.getCreateDates()[1]);
-            }
-            if (StringUtils.isNotBlank(workClientInfo.getCreateById())) {
-                workClientInfoQueryWrapper.eq("a.create_by_id",workClientInfo.getCreateById());
-            }
-            if (StringUtils.isNotEmpty(workClientInfo.getClientType())){
-                workClientInfoQueryWrapper.eq("a.client_type",workClientInfo.getClientType());
-            }
-            if (StringUtils.isNotEmpty(workClientInfo.getCompanyIndustry())){
-                workClientInfoQueryWrapper.eq("a.company_industry",workClientInfo.getCompanyIndustry());
-            }
-        }
-        IPage<JyWorkClientInfo> list = jyWorkClientService.list(page, workClientInfoQueryWrapper);
+
+        IPage<JyWorkClientInfo> list = jyWorkClientService.list(page, workClientInfo);
         UserDTO userDTO = SpringUtil.getBean ( IUserApi.class ).getByToken(TokenProvider.getCurrentToken());
         for (JyWorkClientInfo info: list.getRecords()) {
             if(userDTO.getName().equals(info.getCreateById()) || userDTO.isAdmin()){
@@ -227,4 +222,26 @@ public class JyWorkClientController {
         List<JyWorkClientInfo> clientInfoList=jyWorkClientService.getBillingListByClientId(workClientInfo);
         return ResponseEntity.ok(clientInfoList);
     }
+
+    @ApiLog(value = "导出成员管理数据", type = LogTypeEnum.EXPORT)
+    @GetMapping("export")
+    @ApiOperation(value = "导出成员管理数据")
+    public void exportFile(JyWorkClientInfo workClientInfo, Page <JyWorkClientInfo> page, ExcelOptions options, HttpServletResponse response) throws Exception {
+        String fileName = options.getFilename();
+        String sheetName = options.getSheetName();
+        List<JyWorkClientInfo> result = new ArrayList<>();
+        if ( ExportMode.current.equals ( options.getMode() ) ) {
+            result = jyWorkClientService.list (page,workClientInfo).getRecords();
+        } else if (ExportMode.selected.equals ( options.getMode() )) {
+            result = jyWorkClientService.list (page,workClientInfo).getRecords().stream ( ).filter ( item ->
+                    options.getSelectIds ( ).contains ( item.getId ( ) )
+            ).collect ( Collectors.toList ( ) );
+        } else {
+            page.setSize (-1);
+            page.setCurrent (0);
+            result = jyWorkClientService.list (page,workClientInfo).getRecords();
+        }
+        EasyPoiUtil.exportExcel ( result, sheetName,  sheetName, JyWorkClientInfo.class, fileName, response );
+
+    }
 }

+ 17 - 0
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/workClientInfo/domain/JyWorkClientInfo.java

@@ -1,5 +1,6 @@
 package com.jeeplus.business.workClientInfo.domain;
 
+import cn.afterturn.easypoi.excel.annotation.Excel;
 import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableName;
 
@@ -8,6 +9,7 @@ import com.jeeplus.core.query.Query;
 import com.jeeplus.core.query.QueryType;
 import lombok.Data;
 
+import java.util.Date;
 import java.util.List;
 
 /**
@@ -21,6 +23,7 @@ public class JyWorkClientInfo extends BaseEntity {
      * 客户名称
      */
     @Query(tableColumn = "a.name")
+    @Excel(name = "客户名称",width = 25)
     private String name;
 
     /**
@@ -37,33 +40,40 @@ public class JyWorkClientInfo extends BaseEntity {
      * 客户性质
      */
     @Query
+
     private String companyType;
+
     /**
      * 客户性质名称
      */
     @TableField(exist = false)
+    @Excel(name = "客户性质",width = 25)
     private String companyTypeName;
 
     /**
      * 客户行业
      */
     @Query
+
     private String companyIndustry;
     /**
      * 客户行业名称
      */
     @TableField(exist = false)
+    @Excel(name = "客户行业",width = 25)
     private String companyIndustryName;
 
     /**
      * 客户类型
      */
     @Query
+
     private String clientType;
     /**
      * 客户类型名称
      */
     @TableField(exist = false)
+    @Excel(name = "客户类型",width = 25)
     private String clientTypeName;
 
     /**
@@ -75,6 +85,7 @@ public class JyWorkClientInfo extends BaseEntity {
      * 地区Id
      */
     @Query(type = QueryType.EQ)
+    @Excel(name = "所在地区",width = 25)
     private String areaId;
 
     /**
@@ -152,12 +163,18 @@ public class JyWorkClientInfo extends BaseEntity {
      * 统一社会信用代码
      */
     @Query
+    @Excel(name = "统一社会信用代码",width = 25)
     private String uscCode;
 
     /**
      * 客户编号
      */
+    @Excel(name = "客户编号",width = 25)
     private String number;
+    @Excel(name = "创建人",width = 25)
+    private String createById;
+    @Excel(name = "创建时间",width = 25,exportFormat = "yyyy-MM-dd")
+    private Date createTime;
 
     /**
      * 代表方(以逗号分割)

+ 2 - 1
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/workClientInfo/mapper/JyWorkClientBankMapper.java

@@ -2,6 +2,7 @@ package com.jeeplus.business.workClientInfo.mapper;
 
 import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 
 import com.baomidou.mybatisplus.core.toolkit.Constants;
@@ -14,5 +15,5 @@ import java.util.List;
 @Mapper
 public interface JyWorkClientBankMapper extends BaseMapper<JyWorkClientBank> {
     @InterceptorIgnore(tenantLine = "true")
-    List<JyWorkClientBank> selectByClientId(@Param(Constants.WRAPPER) LambdaQueryWrapper<JyWorkClientBank> wrapper);
+    List<JyWorkClientBank> selectByClientId(@Param(Constants.WRAPPER) QueryWrapper<JyWorkClientBank> wrapper);
 }

+ 5 - 2
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/workClientInfo/mapper/xml/JyWorkClientInfoMapper.xml

@@ -92,6 +92,9 @@
 			a.credit_rank,
 			b.`name` AS area_id,
 			b.`name` AS areaName,
+			(select dv.label from sys_dict_value dv LEFT JOIN sys_dict_type dt on dt.id=dv.dict_type_id where dv.value=a.company_type and dt.type='customer_nature') as companyTypeName,
+			(select dv.label from sys_dict_value dv LEFT JOIN sys_dict_type dt on dt.id=dv.dict_type_id where dv.value=a.company_industry and dt.type='industry') as companyIndustryName,
+			(select dv.label from sys_dict_value dv LEFT JOIN sys_dict_type dt on dt.id=dv.dict_type_id where dv.value=a.client_type and dt.type='customer_type') as clientTypeName,
 			a.zip_code,
 			a.fax,
 			a.tax_id,
@@ -162,7 +165,7 @@
 	<select id="findById" resultType="com.jeeplus.business.workClientInfo.domain.JyWorkClientInfo">
 		SELECT
 			a.id,
-			su.name create_by_id,
+			a.create_by_id,
 			a.create_time,
 			a.update_by_id,
 			a.update_time,
@@ -174,7 +177,7 @@
 			a.company_industry,
 			a.client_type,
 			a.credit_rank,
-			b.`name` AS area_id,
+			a.area_id,
 			b.`name` AS areaName,
 			a.zip_code,
 			a.fax,

+ 24 - 6
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/workClientInfo/service/JyWorkClientService.java

@@ -25,6 +25,7 @@ import com.jeeplus.business.workClientInfo.mapper.JyWorkClientInfoMapper;
 import com.jeeplus.business.workClientInfo.mapper.JyWorkClientJobTypeInfoMapper;
 import com.jeeplus.business.workClientInfo.mapper.JyWorkClientLinkmanMapper;
 import com.jeeplus.common.TokenProvider;
+import com.jeeplus.core.query.QueryWrapperGenerator;
 import com.jeeplus.sys.domain.WorkAttachmentInfo;
 import com.jeeplus.sys.feign.IDictApi;
 import com.jeeplus.sys.feign.IUserApi;
@@ -70,9 +71,24 @@ public class JyWorkClientService {
      * @param
      * @return
      */
-    public IPage<JyWorkClientInfo> list(Page<JyWorkClientInfo> page, QueryWrapper<JyWorkClientInfo> queryWrapper) {
-        queryWrapper.eq("a.del_flag","0");
-        IPage<JyWorkClientInfo> pageList = jyWorkClientInfoMapper.findPageList(page, queryWrapper);
+    public IPage<JyWorkClientInfo> list(Page<JyWorkClientInfo> page, JyWorkClientInfo workClientInfo) throws Exception {
+        QueryWrapper<JyWorkClientInfo> workClientInfoQueryWrapper = QueryWrapperGenerator.buildQueryCondition(workClientInfo, JyWorkClientInfo.class);
+        if (ObjectUtil.isNotEmpty(workClientInfo)) {
+            if (ObjectUtil.isNotEmpty(workClientInfo.getCreateDates())) {
+                workClientInfoQueryWrapper.between("a.create_time",workClientInfo.getCreateDates()[0], workClientInfo.getCreateDates()[1]);
+            }
+            if (StringUtils.isNotBlank(workClientInfo.getCreateById())) {
+                workClientInfoQueryWrapper.eq("a.create_by_id",workClientInfo.getCreateById());
+            }
+            if (StringUtils.isNotEmpty(workClientInfo.getClientType())){
+                workClientInfoQueryWrapper.eq("a.client_type",workClientInfo.getClientType());
+            }
+            if (StringUtils.isNotEmpty(workClientInfo.getCompanyIndustry())){
+                workClientInfoQueryWrapper.eq("a.company_industry",workClientInfo.getCompanyIndustry());
+            }
+        }
+        workClientInfoQueryWrapper.eq("a.del_flag","0");
+        IPage<JyWorkClientInfo> pageList = jyWorkClientInfoMapper.findPageList(page, workClientInfoQueryWrapper);
         List<JyWorkClientInfo> list = pageList.getRecords();
         if (CollectionUtil.isNotEmpty(list)) {
             for (JyWorkClientInfo info : list) {
@@ -100,6 +116,7 @@ public class JyWorkClientService {
         return pageList;
     }
 
+
     /**
      * 客户信息保存
      * @param workClientInfosDto
@@ -255,9 +272,10 @@ public class JyWorkClientService {
         //客户信息查询
         dto.setWorkClientInfo(workClientInfo);
         //客户关联开户行信息查询
-        LambdaQueryWrapper<JyWorkClientBank> wrapper = new LambdaQueryWrapper<>();
-        wrapper.eq(JyWorkClientBank::getClientId, id);
-        wrapper.orderByDesc(JyWorkClientBank::getUpdateTime);
+        QueryWrapper<JyWorkClientBank> wrapper = new QueryWrapper<>();
+        wrapper.eq("a.client_id", id);
+        wrapper.eq("a.del_flag","0");
+        wrapper.orderByDesc("a.update_time");
         dto.setWorkClientBank(jyWorkClientBankMapper.selectByClientId(wrapper));
         //客户关联紧急联系人信息查询
         LambdaQueryWrapper<JyWorkClientLinkman> wrapper1 = new LambdaQueryWrapper<>();

+ 33 - 14
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/workContractInfo/controller/JyWorkContractController.java

@@ -5,11 +5,17 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 
+import com.jeeplus.business.finance.util.EasyPoiUtil;
+import com.jeeplus.business.monthly.service.dto.MonthlyDTO;
 import com.jeeplus.business.workContractInfo.domain.JyWorkContractInfo;
 import com.jeeplus.business.workContractInfo.service.JyWorkContractService;
 import com.jeeplus.business.workContractInfo.service.dto.JyWorkContractInfoDto;
+import com.jeeplus.common.excel.ExcelOptions;
+import com.jeeplus.common.excel.annotation.ExportMode;
 import com.jeeplus.common.utils.ResponseUtil;
 import com.jeeplus.core.query.QueryWrapperGenerator;
+import com.jeeplus.logging.annotation.ApiLog;
+import com.jeeplus.logging.constant.enums.LogTypeEnum;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
@@ -18,7 +24,10 @@ import org.springframework.http.ResponseEntity;
 import org.springframework.web.bind.annotation.*;
 
 import javax.annotation.Resource;
+import javax.servlet.http.HttpServletResponse;
+import java.util.ArrayList;
 import java.util.List;
+import java.util.stream.Collectors;
 
 //import com.jeeplus.sys.utils.TicketQueryUtils;
 
@@ -37,20 +46,8 @@ public class JyWorkContractController {
     @ApiOperation(value = "合同登记列表")
     @GetMapping(value = "list")
     public ResponseEntity<IPage<JyWorkContractInfo>> list(JyWorkContractInfo jyWorkContractInfo, Page<JyWorkContractInfo> page) throws Exception {
-        String primaryLinkman = jyWorkContractInfo.getClientName();
-        String[] contractDates = jyWorkContractInfo.getContractDates();
-        String[] contractAmounts = jyWorkContractInfo.getContractAmounts();
-        String[] createDates= jyWorkContractInfo.getCreateDates();
-        String filedType = jyWorkContractInfo.getFiledType();
-        String name=jyWorkContractInfo.getName();
-        String createById=jyWorkContractInfo.getCreateById();
-        String no=jyWorkContractInfo.getNo();
-        List contractTypeList = jyWorkContractInfo.getContractTypes();
-        QueryWrapper<JyWorkContractInfo> workContractInfoQueryWrapper = QueryWrapperGenerator.buildQueryCondition(jyWorkContractInfo, JyWorkContractInfo.class);
-        if (ObjectUtil.isNotEmpty(jyWorkContractInfo) && StringUtils.isNotBlank(jyWorkContractInfo.getCreateById())) {
-            workContractInfoQueryWrapper.eq("a.create_by_id", jyWorkContractInfo.getCreateById());
-        }
-        IPage<JyWorkContractInfo> list = jyWorkContractService.list(page, workContractInfoQueryWrapper, primaryLinkman, contractDates,createDates, contractAmounts,name,createById, filedType,no,contractTypeList);
+
+        IPage<JyWorkContractInfo> list = jyWorkContractService.list(page, jyWorkContractInfo);
         return ResponseEntity.ok (list);
     }
 
@@ -114,4 +111,26 @@ public class JyWorkContractController {
         return ResponseEntity.ok(s);
     }
 
+    @ApiLog(value = "导出合同数据", type = LogTypeEnum.EXPORT)
+    @GetMapping("export")
+    @ApiOperation(value = "导出合同数据")
+    public void exportFile(JyWorkContractInfo jyWorkContractInfo, Page <JyWorkContractInfo> page, ExcelOptions options, HttpServletResponse response) throws Exception {
+        String fileName = options.getFilename();
+        String sheetName = options.getSheetName();
+        List<JyWorkContractInfo> result = new ArrayList<>();
+        if ( ExportMode.current.equals ( options.getMode() ) ) {
+            result = jyWorkContractService.list(page, jyWorkContractInfo).getRecords();
+        } else if (ExportMode.selected.equals ( options.getMode() )) {
+            result = jyWorkContractService.list(page, jyWorkContractInfo).getRecords().stream ( ).filter ( item ->
+                    options.getSelectIds ( ).contains ( item.getId ( ) )
+            ).collect ( Collectors.toList ( ) );
+        } else {
+            page.setSize (-1);
+            page.setCurrent (0);
+            result = jyWorkContractService.list(page, jyWorkContractInfo).getRecords();
+        }
+        EasyPoiUtil.exportExcel ( result, sheetName,  sheetName, JyWorkContractInfo.class, fileName, response );
+
+    }
+
 }

+ 17 - 0
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/workContractInfo/domain/JyWorkContractInfo.java

@@ -1,5 +1,6 @@
 package com.jeeplus.business.workContractInfo.domain;
 
+import cn.afterturn.easypoi.excel.annotation.Excel;
 import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableName;
 import com.fasterxml.jackson.annotation.JsonFormat;
@@ -7,6 +8,7 @@ import com.jeeplus.business.workClientInfo.domain.JyWorkClientLinkman;
 import com.jeeplus.core.domain.BaseEntity;
 import com.jeeplus.core.query.Query;
 import lombok.Data;
+import org.springframework.format.annotation.DateTimeFormat;
 
 import java.util.Date;
 import java.util.List;
@@ -32,12 +34,14 @@ public class JyWorkContractInfo extends BaseEntity {
     /**
      * 合同编号
      */
+    @Excel(name = "合同编号",width = 16)
     private String no;
 
     /**
      * 合同名称
      */
     @Query(tableColumn = "a.name")
+    @Excel(name = "合同名称",width = 16)
     private String name;
 
     /**
@@ -70,6 +74,11 @@ public class JyWorkContractInfo extends BaseEntity {
     @TableField(exist = false)
     private List<String> contractTypes;
 
+    //小类类型名称
+    @TableField(exist = false)
+    @Excel(name = "合同类型",width = 16)
+    private String typeName;
+
     /**
      * 合同金额类别
      */
@@ -79,6 +88,7 @@ public class JyWorkContractInfo extends BaseEntity {
      * 合同金额
      */
     @Query(tableColumn = "a.contract_amount")
+    @Excel(name = "合同金额(元)",width = 16)
     private String contractAmount;
 
     /**
@@ -151,6 +161,7 @@ public class JyWorkContractInfo extends BaseEntity {
      * 主委托方
      */
     @Query(tableColumn = "a.primary_linkman")
+    @Excel(name = "客户名称",width = 16)
     private String primaryLinkman;
 
     /**
@@ -183,8 +194,14 @@ public class JyWorkContractInfo extends BaseEntity {
     private String createId;
 
     @TableField(exist = false)
+    @Excel(name = "创建人",width = 16)
     private String createName;
 
+    @Excel(name = "创建时间",width = 16,exportFormat = "yyyy-MM-dd")
+    @DateTimeFormat(pattern = "yyyy-MM-dd")
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
+    private Date createTime;
+
     @TableField(exist = false)
     private String contractFileId;
 

+ 3 - 0
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/workContractInfo/mapper/xml/JyWorkContractInfoMapper.xml

@@ -19,6 +19,9 @@
 			a.closing_date,
 			a.contract_type as contractType,
 			a.contract_type_first,
+			(case
+			when (a.contract_type is null or a.contract_type = '') then (select label from sys_dict_value dv LEFT JOIN sys_dict_type dt on dt.id=dv.dict_type_id where dv.`value`= a.contract_type_first and dt.type='jy_contract_type_up')
+			when a.contract_type is not null then (select group_concat(label) from sys_dict_value dv where FIND_IN_SET(dv.id,(select contract_type from jy_work_contract_info where id=a.id))) ELSE '' END) as typeName,
 			a.contract_amount_type,
 			a.contract_amount,
 			a.contract_opposite,

+ 14 - 1
jeeplus-modules/jeeplus-business/src/main/java/com/jeeplus/business/workContractInfo/service/JyWorkContractService.java

@@ -14,6 +14,7 @@ import com.jeeplus.business.workContractInfo.mapper.JyContractParticipantMapper;
 import com.jeeplus.business.workContractInfo.mapper.JyWorkContractInfoMapper;
 import com.jeeplus.business.workContractInfo.service.dto.JyWorkContractInfoDto;
 import com.jeeplus.common.TokenProvider;
+import com.jeeplus.core.query.QueryWrapperGenerator;
 import com.jeeplus.flowable.feign.IFlowableApi;
 import com.jeeplus.sys.domain.WorkAttachmentInfo;
 import com.jeeplus.sys.feign.IDictApi;
@@ -43,6 +44,8 @@ public class JyWorkContractService {
     private IFlowableApi flowTaskService;
 
     public String saveInfo(JyWorkContractInfoDto workContractInfoDto) throws Exception {
+
+
         if (StringUtils.isNotEmpty(workContractInfoDto.getId())) {
             JyWorkContractInfo info = jyWorkContractInfoMapper.selectById(workContractInfoDto.getId());
             if (info != null) {
@@ -58,7 +61,17 @@ public class JyWorkContractService {
      * @param
      * @return
      */
-    public IPage<JyWorkContractInfo> list(Page<JyWorkContractInfo> page, QueryWrapper<JyWorkContractInfo> queryWrapper, String primaryLinkman, String[] contractDates, String[] createDates, String[] contractAmounts,String name,String createById,String filedType,String no,List contractTypeList) {
+    public IPage<JyWorkContractInfo> list(Page<JyWorkContractInfo> page, JyWorkContractInfo jyWorkContractInfo) throws Exception {
+        String primaryLinkman = jyWorkContractInfo.getClientName();
+        String[] contractDates = jyWorkContractInfo.getContractDates();
+        String[] contractAmounts = jyWorkContractInfo.getContractAmounts();
+        String[] createDates= jyWorkContractInfo.getCreateDates();
+        String filedType = jyWorkContractInfo.getFiledType();
+        String name=jyWorkContractInfo.getName();
+        String createById=jyWorkContractInfo.getCreateById();
+        String no=jyWorkContractInfo.getNo();
+        List contractTypeList = jyWorkContractInfo.getContractTypes();
+        QueryWrapper<JyWorkContractInfo> queryWrapper = QueryWrapperGenerator.buildQueryCondition(jyWorkContractInfo, JyWorkContractInfo.class);
         queryWrapper.eq("a.del_flag","0");
         if (contractDates != null && contractDates.length>0) {
             queryWrapper.between("a.contract_date", contractDates[0], contractDates[1]);

+ 3 - 3
jeeplus-modules/jeeplus-business/src/main/resources/freemarker/文印申请单.ftl

@@ -397,7 +397,7 @@
                         <w:sz w:val="28"/>
                         <w:sz-cs w:val="28"/>
                     </w:rPr>
-                    <w:t>         </w:t>
+                    <w:t>      </w:t>
                 </w:r>
                 <w:r wsp:rsidRPr="00491C20">
                     <w:rPr>
@@ -433,7 +433,7 @@
                         <w:sz w:val="28"/>
                         <w:sz-cs w:val="28"/>
                     </w:rPr>
-                    <w:t>  </w:t>
+                    <w:t>     </w:t>
                 </w:r>
                 <w:r wsp:rsidRPr="00491C20">
                     <w:rPr>
@@ -443,7 +443,7 @@
                         <w:sz-cs w:val="28"/>
                     </w:rPr>
                     <w:tab/>
-                    <w:t>${year}</w:t>
+                    <w:t> ${year}</w:t>
                 </w:r>
                 <w:r wsp:rsidRPr="00491C20">
                     <w:rPr>

+ 2 - 2
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/reimbursementApproval/approvalInfo/mapper/xml/CwReimbursementInfoMapper.xml

@@ -154,13 +154,13 @@
 			WHEN a.source_type = 3 THEN b3.type_id
 			WHEN a.source_type = 4 THEN b4.type_id
 									ELSE b5.type_id END) AS type_id,
-			(CASE
+			(
 			WHEN a.source_type = 1 THEN t.name
 			WHEN a.source_type = 2 THEN t2.name
 			WHEN a.source_type = 3 THEN t3.name
 			WHEN a.source_type = 4 THEN t4.name
 									ELSE t5.name END) AS type_name,
-			(CASE
+			(
 			WHEN a.source_type = 1 THEN b.project_id
 			WHEN a.source_type = 2 THEN b2.contract_id
 			WHEN a.source_type = 3 THEN b3.project_id

+ 1 - 0
jeeplus-modules/jeeplus-public-modules/src/main/java/com/jeeplus/pubmodules/wareHouse/mapper/xml/WareHouseBasicMapper.xml

@@ -99,6 +99,7 @@
 
 			LEFT JOIN material_management_warehouse_basics bas on a.basic_id = bas.id
 			left join material_management_type c on a.ware_house_type = c.id
+			left join sys_user su on su.id = a.ware_house_man
 			${ew.customSqlSegment}
 			GROUP BY a.trade_name,a.ware_house_type
 			ORDER BY a.ware_house_type DESC,a.trade_name

+ 34 - 0
jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/controller/UserController.java

@@ -439,6 +439,40 @@ public class UserController {
         return ResponseEntity.ok ( result );
     }
 
+    //    /**
+//     * 查询列表(排除admin)
+//     *
+//     * @param userDTO
+//     * @param page
+//     * @return
+//     */
+    @ApiLog("用户数据列表")
+    @ApiOperation(value = "用户数据列表")
+    @GetMapping("list4")
+    public ResponseEntity list4(UserDTO userDTO, Page <UserDTO> page) throws Exception {
+        //获取当前登录人信息
+        UserDTO token = UserUtils.getCurrentUserDTO();
+        QueryWrapper <UserDTO> queryWrapper = QueryWrapperGenerator.buildQueryCondition ( userDTO, UserDTO.class );
+        if (!UserUtils.getCurrentUserDTO().isAdmin()) {
+            queryWrapper.isNull("a.is_admin");
+            String id = UserUtils.getCurrentUserDTO().getCompanyDTO().getId();
+            queryWrapper.eq("a.company_id",id);
+            if (token.getOfficeDTO().getId().equals(userDTO.getOfficeDTO().getId())){
+                if (StringUtils.isNotBlank(userDTO.getOfficeDTO().getId())){
+                    queryWrapper.eq("a.office_id",userDTO.getOfficeDTO().getId());
+                }
+                if ( userDTO.getTenantDTO ( ) != null && StrUtil.isNotBlank ( userDTO.getTenantDTO ( ).getId ( ) ) ) {
+                    queryWrapper.eq ( "a.tenant_id", userDTO.getTenantDTO ( ).getId ( ) );
+                }
+            }else {
+                queryWrapper.eq("a.office_id",token.getOfficeDTO().getId());
+            }
+        }
+
+        IPage <UserDTO> result = userService.findPage2 ( page, queryWrapper );
+        return ResponseEntity.ok ( result );
+    }
+
     /**
      * 保存人员执业资质
      *