ly 1 vuosi sitten
vanhempi
säilyke
e0262fa1db
26 muutettua tiedostoa jossa 569 lisäystä ja 159 poistoa
  1. 3 1
      src/main/java/cn/ezhizao/common/utils/poi/ExcelUtil.java
  2. 1 0
      src/main/java/cn/ezhizao/project/business/entrust/domain/BizEntrust.java
  3. 1 0
      src/main/java/cn/ezhizao/project/business/housingFund/controller/BizHousingFundConfirmController.java
  4. 4 0
      src/main/java/cn/ezhizao/project/business/keepAccounts/controller/BizFinancialKeepAccountController.java
  5. 48 8
      src/main/java/cn/ezhizao/project/business/keepAccounts/domain/BizFinancialKeepAccount.java
  6. 5 1
      src/main/java/cn/ezhizao/project/business/keepAccounts/domain/BizFinancialKeepAccountDetail.java
  7. 1 0
      src/main/java/cn/ezhizao/project/business/receiveTicket/controller/BizFinancialReceiveTicketController.java
  8. 55 20
      src/main/java/cn/ezhizao/project/business/receiveTicket/domain/BizFinancialReceiveTicket.java
  9. 2 0
      src/main/java/cn/ezhizao/project/business/receiveTicket/domain/BizFinancialReceiveTicketDetail.java
  10. 2 1
      src/main/java/cn/ezhizao/project/business/salary/controller/BizFinancialSalaryController.java
  11. 28 20
      src/main/java/cn/ezhizao/project/business/salary/controller/BizFinancialSalaryZeroController.java
  12. 58 19
      src/main/java/cn/ezhizao/project/business/salary/domain/BizFinancialSalary.java
  13. 4 1
      src/main/java/cn/ezhizao/project/business/salary/domain/BizFinancialSalaryDetail.java
  14. 2 0
      src/main/java/cn/ezhizao/project/business/socialSecurity/controller/SocialSecurityConfirmController.java
  15. 1 1
      src/main/java/cn/ezhizao/project/business/socialSecurity/controller/SocialSecurityDeclareController.java
  16. 12 0
      src/main/java/cn/ezhizao/project/business/socialSecurity/domain/BizSocialSecurityConfirm.java
  17. 3 0
      src/main/java/cn/ezhizao/project/business/socialSecurity/domain/BizSocialSecurityConfirmDetail.java
  18. 64 22
      src/main/java/cn/ezhizao/project/business/workOrder/controller/OnceWorkOrderProductionController.java
  19. 99 29
      src/main/java/cn/ezhizao/project/business/workOrder/domain/BizWorkOrder.java
  20. 24 2
      src/main/java/cn/ezhizao/project/business/workOrder/domain/BizWorkOrderRecord.java
  21. 1 1
      src/main/resources/mybatis/business/BizDeductionMapper.xml
  22. 40 1
      src/main/resources/mybatis/business/BizFinancialKeepAccountMapper.xml
  23. 18 1
      src/main/resources/mybatis/business/BizFinancialReceiveTicketMapper.xml
  24. 32 8
      src/main/resources/mybatis/business/BizFinancialSalaryMapper.xml
  25. 17 1
      src/main/resources/mybatis/business/BizSocialSecurityConfirmMapper.xml
  26. 44 22
      src/main/resources/mybatis/business/BizWorkOrderMapper.xml

+ 3 - 1
src/main/java/cn/ezhizao/common/utils/poi/ExcelUtil.java

@@ -581,6 +581,7 @@ public class ExcelUtil<T>
         }
         catch (Exception e)
         {
+            e.printStackTrace();
             log.error("导出Excel异常{}", e.getMessage());
         }
         finally
@@ -675,6 +676,7 @@ public class ExcelUtil<T>
             row = sheet.createRow(rowNo);
             // 得到导出对象.
             T vo = (T) list.get(i);
+            System.out.println("i: " + i + ", vo: " + vo.toString());
             Collection<?> subList = null;
             if (isSubList())
             {
@@ -1494,7 +1496,7 @@ public class ExcelUtil<T>
      */
     public void createWorkbook()
     {
-        this.wb = new SXSSFWorkbook(500);
+        this.wb = new SXSSFWorkbook(-1);
         this.sheet = wb.createSheet();
         wb.setSheetName(0, sheetName);
         this.styles = createStyles(wb);

+ 1 - 0
src/main/java/cn/ezhizao/project/business/entrust/domain/BizEntrust.java

@@ -67,6 +67,7 @@ public class BizEntrust extends BaseEntity
 
 //    /** 停止委托 */
     @ApiModelProperty(value = "停止委托")
+    @TableField(exist = false)
     private Integer isStop;
 
 }

+ 1 - 0
src/main/java/cn/ezhizao/project/business/housingFund/controller/BizHousingFundConfirmController.java

@@ -223,6 +223,7 @@ public class BizHousingFundConfirmController extends BaseController {
     @PreAuthorize("@ss.hasPermi('business:housingFundConfirm:edit')")
     @PostMapping("/updateDetail")
     @Transactional(rollbackFor = Exception.class)
+    @Log(title = "修改社保人员信息", businessType = BusinessType.UPDATE)
     public AjaxResult updateDetail(@RequestBody BizHousingFundConfirmDetail detail) {
         BizCompany company = companyService.getById(detail.getCompanyId());
         company.setHousingFundPassword(detail.getHousingFundPassword());

+ 4 - 0
src/main/java/cn/ezhizao/project/business/keepAccounts/controller/BizFinancialKeepAccountController.java

@@ -37,6 +37,7 @@ import javax.servlet.http.HttpServletResponse;
 import javax.sql.rowset.serial.SerialException;
 import java.math.BigDecimal;
 import java.time.LocalDate;
+import java.util.Date;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
@@ -298,6 +299,9 @@ public class BizFinancialKeepAccountController extends BaseController {
         if (!financialKeepAccountDetailService.getList(conditions).isEmpty()) {
             return error("该月已添加收票信息,请刷新列表。");
         }
+
+        receiveTicketDetail.setVerifierTime(new Date());
+        receiveTicketDetail.setVerifierId(SecurityUtils.getUserId());
         return toAjax(financialKeepAccountDetailService.save(receiveTicketDetail) && addRecord(receiveTicketDetail.getFinancialKeepAccountId(), receiveTicketDetail.getYear(), receiveTicketDetail.getMonth(), SecurityUtils.getUserId(), "填写记账信息"));
     }
 

+ 48 - 8
src/main/java/cn/ezhizao/project/business/keepAccounts/domain/BizFinancialKeepAccount.java

@@ -4,12 +4,14 @@ import cn.ezhizao.framework.aspectj.lang.annotation.Excel;
 import cn.ezhizao.framework.web.domain.BaseEntity;
 import cn.ezhizao.project.business.ticketReport.domain.BizFinancialTicketReportDetail;
 import com.baomidou.mybatisplus.annotation.TableField;
+import com.fasterxml.jackson.annotation.JsonFormat;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 import lombok.experimental.Accessors;
 
+import java.math.BigDecimal;
 import java.sql.Date;
 import java.util.List;
 
@@ -30,7 +32,7 @@ public class BizFinancialKeepAccount extends BaseEntity {
     @ApiModelProperty("全部维护人员")
     private String employeeIds;
 
-    @Excel(name = "客户名称",sort=1)
+    @Excel(name = "客户名称", sort = 1)
     @TableField(exist = false)
     private String companyName;
 
@@ -51,27 +53,29 @@ public class BizFinancialKeepAccount extends BaseEntity {
 //    @TableField(exist = false)
 //    private List<BizFinancialTicketReportDetail> salaryTickets;
 
-    @Excel(name = "来源",sort=2)
+    @Excel(name = "来源", sort = 2)
     @TableField(exist = false)
     private String fromCompanyName;
 
-    @Excel(name = "纳税性质",sort=3)
+    @Excel(name = "纳税性质", sort = 3)
     @TableField(exist = false)
     private String taxType;
 
-    @Excel(name = "税号",sort=4)
+    @Excel(name = "税号", sort = 4)
     @TableField(exist = false)
     private String socialCreditCode;
 
     @TableField(exist = false)
-    @Excel(name = "查询期间",sort = 5)
+    @Excel(name = "查询期间", sort = 5)
     private String currentPeriod;
 
-    @Excel(name = "当前状态",sort = 6)
+    @Excel(name = "当前状态", sort = 6)
     @TableField(exist = false)
     private String currentStatus;
 
-    /** 查询条件新增 */
+    /**
+     * 查询条件新增
+     */
     @TableField(exist = false)
     private String year;
     @TableField(exist = false)
@@ -103,12 +107,48 @@ public class BizFinancialKeepAccount extends BaseEntity {
     private Long principal;
 
     //执行人
-    @Excel(name = "执行人",sort = 7)
+    @Excel(name = "执行人", sort = 7)
     @TableField(exist = false)
     private String serviceName;
     @TableField(exist = false)
     private Long customerLabelId;
     @TableField(exist = false)
     private String customerLabelName;
+    /**
+     * 审核人
+     */
+    @ApiModelProperty(value = "审核人")
+    @TableField(exist = false)
+    private Long verifierId;
+    @TableField(exist = false)
+    @Excel(name = "审核人", sort = 8)
+    private String verifierName;
+    @TableField(exist = false)
+    @Excel(name = "审核时间", dateFormat = "yyyy-MM-dd", sort = 9)
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private java.util.Date verifierTime;
+    @TableField(exist = false)
+    private List<String> dateFilter;
+    @Excel(name = "暂估金额", sort = 9)
+    @TableField(exist = false)
+    @ApiModelProperty("暂估金额")
+    private BigDecimal provisionalEstimateAmount;
+    @Excel(name = "本年利润", sort = 10)
+    @TableField(exist = false)
+    @ApiModelProperty("本年利润总额")
+    private BigDecimal currentYearProfit;
+    @Excel(name = "本年收入", sort = 11)
+    @TableField(exist = false)
+    @ApiModelProperty("本年收入")
+    private BigDecimal currentYearIncome;
+
+
+    @TableField(exist = false)
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private java.util.Date finishTime;
+    @TableField(exist = false)
+    private Long finishUserId;
+    @TableField(exist = false)
+    private String finishUserName;
 
 }

+ 5 - 1
src/main/java/cn/ezhizao/project/business/keepAccounts/domain/BizFinancialKeepAccountDetail.java

@@ -10,6 +10,7 @@ import lombok.experimental.Accessors;
 
 import java.math.BigDecimal;
 import java.sql.Timestamp;
+import java.util.Date;
 import java.util.List;
 
 @EqualsAndHashCode(callSuper = true)
@@ -47,7 +48,7 @@ public class BizFinancialKeepAccountDetail extends BaseEntity {
     private BigDecimal provisionalEstimateAmount;
     @ApiModelProperty("本年利润")
     private BigDecimal currentYearProfit;
-
+    private Date verifierTime;
     /** 查询条件新增 */
     @ApiModelProperty("记账表外键")
     @TableField(exist = false)
@@ -55,4 +56,7 @@ public class BizFinancialKeepAccountDetail extends BaseEntity {
 
     @TableField(exist = false)
     private BigDecimal previousAnnualLosses;
+
+    private Long verifierId;
+
 }

+ 1 - 0
src/main/java/cn/ezhizao/project/business/receiveTicket/controller/BizFinancialReceiveTicketController.java

@@ -268,6 +268,7 @@ public class BizFinancialReceiveTicketController extends BaseController {
         if (detail.getStatus().equals(3)) {
             bool = bool && checkKeepAccount(detail);
         }
+        detail.setVerifierTime(new Date());
 //        return bool && financialReceiveTicketDetailService.updateById(detail) ? Rutils.success() : Rutils.error();
         return toAjax(bool && financialReceiveTicketDetailService.updateById(detail));
     }

+ 55 - 20
src/main/java/cn/ezhizao/project/business/receiveTicket/domain/BizFinancialReceiveTicket.java

@@ -3,10 +3,12 @@ package cn.ezhizao.project.business.receiveTicket.domain;
 import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableName;
 import cn.ezhizao.framework.web.domain.BaseEntity;
+import com.fasterxml.jackson.annotation.JsonFormat;
 import lombok.Data;
 import io.swagger.annotations.ApiModelProperty;
 import cn.ezhizao.framework.aspectj.lang.annotation.Excel;
 
+import java.util.Date;
 import java.util.List;
 
 /**
@@ -17,35 +19,48 @@ import java.util.List;
  */
 @Data
 @TableName(value = "biz_financial_receive_ticket")
-public class BizFinancialReceiveTicket extends BaseEntity
-{
+public class BizFinancialReceiveTicket extends BaseEntity {
     private static final long serialVersionUID = 1L;
 
-    /** 客户主键 */
+    /**
+     * 客户主键
+     */
     @ApiModelProperty(value = "${comment}")
     private Long companyId;
 
-    /** 账套外键 */
+    /**
+     * 账套外键
+     */
     @ApiModelProperty(value = "${comment}")
     private Long accountSetsId;
 
-    /** $column.columnComment */
+    /**
+     * $column.columnComment
+     */
     @ApiModelProperty(value = "${comment}")
     private Long tenantId;
 
-    /** 当前维护人员 */
+    /**
+     * 当前维护人员
+     */
     @ApiModelProperty(value = "${comment}")
     private Long currentEmployeeId;
 
-    /** 全部维护人员 */
+    /**
+     * 全部维护人员
+     */
     @ApiModelProperty(value = "${comment}")
     private String employeeIds;
 
-    /** 工单外键 */
+    /**
+     * 工单外键
+     */
     @ApiModelProperty(value = "${comment}")
     private Long workOrderId;
 
-    /** 任务停止 */
+    /**
+     * 任务停止
+     */
 //    @Excel(name = "任务停止")
     @ApiModelProperty(value = "任务停止")
     private Integer isStop;
@@ -53,20 +68,24 @@ public class BizFinancialReceiveTicket extends BaseEntity
     @TableField(exist = false)
     private String keyword;
 
-    /** 列表显示新增 */
-    @Excel(name = "客户名称",sort=1)
+    /**
+     * 列表显示新增
+     */
+    @Excel(name = "客户名称", sort = 1)
     @TableField(exist = false)
     private String companyName;
 
     @TableField(exist = false)
-    @Excel(name = "来源",sort=2)
+    @Excel(name = "来源", sort = 2)
     private String fromCompanyName;
 
-    @Excel(name = "纳税性质",sort=3)
+    @Excel(name = "纳税性质", sort = 3)
     @TableField(exist = false)
     private String taxType;
 
-    /** 查询条件新增 */
+    /**
+     * 查询条件新增
+     */
     @TableField(exist = false)
     private String year;
     @TableField(exist = false)
@@ -75,7 +94,7 @@ public class BizFinancialReceiveTicket extends BaseEntity
     @TableField(exist = false)
     private Integer status;
 
-    @Excel(name = "当前状态",sort = 6)
+    @Excel(name = "当前状态", sort = 6)
     @TableField(exist = false)
     private String currentStatus;
 
@@ -84,13 +103,15 @@ public class BizFinancialReceiveTicket extends BaseEntity
     @TableField(exist = false)
     private Integer isZero;
 
-    /** 社会信用代码 */
-    @Excel(name = "税号",width = 30,sort = 4)
+    /**
+     * 社会信用代码
+     */
+    @Excel(name = "税号", width = 30, sort = 4)
     @TableField(exist = false)
     private String socialCreditCode;
 
     @TableField(exist = false)
-    @Excel(name = "查询期间",sort = 5)
+    @Excel(name = "查询期间", sort = 5)
     private String currentPeriod;
 
     //收入票
@@ -127,6 +148,7 @@ public class BizFinancialReceiveTicket extends BaseEntity
 
     //总数
     @TableField(exist = false)
+    @Excel(name = "票据总数", sort = 10)
     private Integer sumNumber;
 
     //送达方式
@@ -138,7 +160,7 @@ public class BizFinancialReceiveTicket extends BaseEntity
     private Long principal;
 
     //执行人
-    @Excel(name = "执行人",sort=7)
+    @Excel(name = "执行人", sort = 7)
     @TableField(exist = false)
     private String serviceName;
 
@@ -149,5 +171,18 @@ public class BizFinancialReceiveTicket extends BaseEntity
     private Long customerLabelId;
     @TableField(exist = false)
     private String customerLabelName;
-
+    @Excel(name = "审核人", sort = 8)
+    @TableField(exist = false)
+    private String verifierName;
+    @TableField(exist = false)
+    @Excel(name = "审核时间", dateFormat = "yyyy-MM-dd",sort = 9)
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private java.util.Date verifierTime;
+    @TableField(exist = false)
+    private Long finishUserId;
+    @TableField(exist = false)
+    @Excel(name = "上传人", sort = 8)
+    private String finishUserName;
+    @TableField(exist = false)
+    private List<String> dateFilter;
 }

+ 2 - 0
src/main/java/cn/ezhizao/project/business/receiveTicket/domain/BizFinancialReceiveTicketDetail.java

@@ -218,4 +218,6 @@ public class BizFinancialReceiveTicketDetail extends BaseEntity
     private Integer feedbackStatus;
     @ApiModelProperty("反馈内容")
     private String feedbackContent;
+
+    private java.util.Date verifierTime;
 }

+ 2 - 1
src/main/java/cn/ezhizao/project/business/salary/controller/BizFinancialSalaryController.java

@@ -367,7 +367,7 @@ public class BizFinancialSalaryController extends BaseController {
         return toAjax(bizFinancialSalaryDetailService.updateById(bizFinancialSalaryDetail) && addRecord(bizFinancialSalaryDetail.getFinancialSalaryId(), bizFinancialSalaryDetail.getYear(), bizFinancialSalaryDetail.getMonth(), SecurityUtils.getUserId(), "修改工资信息"));
     }
 
-    @Log(title = "生产管理-公司非零申报-审核通过", businessType = BusinessType.UPDATE)
+    @Log(title = "生产管理-工资非零申报-审核通过", businessType = BusinessType.UPDATE)
     @PreAuthorize("@ss.hasPermi('business:salary:verify')")
     @PostMapping("/verifyDetail")
     @Transactional(rollbackFor = Exception.class)
@@ -407,6 +407,7 @@ public class BizFinancialSalaryController extends BaseController {
         } else {
             bool = bool && addRecord(bizFinancialSalaryDetail.getFinancialSalaryId(), bizFinancialSalaryDetail.getYear(), bizFinancialSalaryDetail.getMonth(), SecurityUtils.getUserId(), "工资审核不通过");
         }
+        bizFinancialSalaryDetail.setVerifierTime(new Date());
         bool = bool && bizFinancialSalaryDetailService.updateById(bizFinancialSalaryDetail,true);
         return toAjax(bool);
     }

+ 28 - 20
src/main/java/cn/ezhizao/project/business/salary/controller/BizFinancialSalaryZeroController.java

@@ -51,6 +51,7 @@ import java.sql.Timestamp;
 import java.time.LocalDate;
 import java.util.ArrayList;
 import java.util.Arrays;
+import java.util.Date;
 import java.util.List;
 import java.util.stream.Collectors;
 
@@ -104,13 +105,19 @@ public class BizFinancialSalaryZeroController extends BaseController {
         bizFinancialSalary.setYear(String.valueOf(nwoYear));
         List<BizFinancialSalary> list = bizFinancialSalaryService.getList(bizFinancialSalary);
         if (!list.isEmpty()) {
-            if (!chooseYear.equals(nwoYear)){
-                List<BizFinancialSalaryDetail> details = bizFinancialSalaryDetailService.query().in("financial_salary_id", list.stream().map(BizFinancialSalary::getId).collect(Collectors.toList())).eq("year",chooseYear).list();
+            if (!chooseYear.equals(nwoYear)) {
+                List<BizFinancialSalaryDetail> details = bizFinancialSalaryDetailService.query()
+                        .in("financial_salary_id", list.stream().map(BizFinancialSalary::getId).collect(Collectors.toList()))
+                        .eq("year", chooseYear)
+                        .eq("deleted", 0).list();
                 list.forEach(l -> {
                     l.setDetails(details.stream().filter(v -> v.getFinancialSalaryId().equals(l.getId())).collect(Collectors.toList()));
                 });
-            }else{
-                List<BizFinancialSalaryDetail> details = bizFinancialSalaryDetailService.query().in("financial_salary_id", list.stream().map(BizFinancialSalary::getId).collect(Collectors.toList())).eq("year",bizFinancialSalary.getYear()).list();
+            } else {
+                List<BizFinancialSalaryDetail> details = bizFinancialSalaryDetailService.query()
+                        .in("financial_salary_id", list.stream().map(BizFinancialSalary::getId).collect(Collectors.toList()))
+                        .eq("year", bizFinancialSalary.getYear())
+                        .eq("deleted", 0).list();
                 list.forEach(l -> {
                     l.setDetails(details.stream().filter(v -> v.getFinancialSalaryId().equals(l.getId())).collect(Collectors.toList()));
                 });
@@ -123,18 +130,18 @@ public class BizFinancialSalaryZeroController extends BaseController {
     @Log(title = "工资", businessType = BusinessType.DELETE)
     @DeleteMapping("/physical/{ids}")
     public AjaxResult remove(@PathVariable List<Long> ids) {
-        if (ids.isEmpty()){
+        if (ids.isEmpty()) {
             return null;
         }
         return toAjax(bizFinancialSalaryService.physicalDeleteIds(ids));
     }
+
     @Log(title = "工资零申报导入", businessType = BusinessType.IMPORT)
     @PreAuthorize("@ss.hasPermi('business:salaryZero:import')")
     @PostMapping("/importData")
-    public AjaxResult importData(MultipartFile file, @RequestParam String year, @RequestParam String month , @RequestParam(required = false) String companyId) throws Exception
-    {
+    public AjaxResult importData(MultipartFile file, @RequestParam String year, @RequestParam String month, @RequestParam(required = false) String companyId) throws Exception {
         List<BizFinancialSalaryDetailEmployee> detailList = new ArrayList<>();
-        List<BizFinancialSalaryDetailEmployeeNotCompany> detailListNotCompany=new ArrayList<>();
+        List<BizFinancialSalaryDetailEmployeeNotCompany> detailListNotCompany = new ArrayList<>();
         List<String> excelHeaders = null;
         List<String> names = null;
         if (StringUtils.isNotEmpty(companyId)) {
@@ -163,11 +170,11 @@ public class BizFinancialSalaryZeroController extends BaseController {
         if (!excelHeaders.containsAll(names)) {
             return error("导入数据与模板不匹配!");
         }
-        String message=bizFinancialSalaryService.importSalary(detailList,year,month,getTenantId()==null?0:getTenantId(),1);
+        String message = bizFinancialSalaryService.importSalary(detailList, year, month, getTenantId() == null ? 0 : getTenantId(), 1);
         return success(message);
     }
 
-    public  List<String> getExcelAnnotatedFields(Class<?> clazz) {
+    public List<String> getExcelAnnotatedFields(Class<?> clazz) {
         Field[] fields = clazz.getDeclaredFields();
         List<String> result = new ArrayList<>();
         for (Field field : fields) {
@@ -261,7 +268,7 @@ public class BizFinancialSalaryZeroController extends BaseController {
                 return error("该月已添加工资信息,请刷新列表。");
             }
             return toAjax(bizFinancialSalaryDetailService.save(bizFinancialSalaryDetail) && addRecord(bizFinancialSalaryDetail.getFinancialSalaryId(), bizFinancialSalaryDetail.getYear(), bizFinancialSalaryDetail.getMonth(), SecurityUtils.getUserId(), "填写工资信息"));
-        }finally {
+        } finally {
             lock.unlock();
         }
 
@@ -314,7 +321,8 @@ public class BizFinancialSalaryZeroController extends BaseController {
         } else {
             bool = bool && addRecord(bizFinancialSalaryDetail.getFinancialSalaryId(), bizFinancialSalaryDetail.getYear(), bizFinancialSalaryDetail.getMonth(), SecurityUtils.getUserId(), "工资审核不通过");
         }
-        bool = bool && bizFinancialSalaryDetailService.updateById(bizFinancialSalaryDetail,true);
+        bizFinancialSalaryDetail.setVerifierTime(new Date());
+        bool = bool && bizFinancialSalaryDetailService.updateById(bizFinancialSalaryDetail, true);
         return toAjax(bool);
     }
 
@@ -418,7 +426,7 @@ public class BizFinancialSalaryZeroController extends BaseController {
     @PreAuthorize("@ss.hasPermi('business:salary:export')")
     @Log(title = "工资", businessType = BusinessType.EXPORT)
     @PostMapping("/export")
-    public void export(BizFinancialSalary bizFinancialSalary,HttpServletResponse response ) throws NoSuchFieldException, IllegalAccessException {
+    public void export(BizFinancialSalary bizFinancialSalary, HttpServletResponse response) throws NoSuchFieldException, IllegalAccessException {
         //设置当前账套
         setTenantId(bizFinancialSalary);
         startOrderBy();
@@ -427,22 +435,22 @@ public class BizFinancialSalaryZeroController extends BaseController {
         //查询数据
         List<BizFinancialSalary> list = bizFinancialSalaryService.getList(bizFinancialSalary);
         //设置状态和当前期间
-        for(BizFinancialSalary salary:list){
+        for (BizFinancialSalary salary : list) {
             //设置当前期间
-            salary.setCurrentPeriod(bizFinancialSalary.getYear()+"-"+bizFinancialSalary.getMonth());
+            salary.setCurrentPeriod(bizFinancialSalary.getYear() + "-" + bizFinancialSalary.getMonth());
             BizFinancialSalaryDetail salaryDetail = new BizFinancialSalaryDetail();
             salaryDetail.setFinancialSalaryId(salary.getId());
             salaryDetail.setYear(bizFinancialSalary.getYear());
             salaryDetail.setMonth(bizFinancialSalary.getMonth());
             //查询当前期间明细
-            List <BizFinancialSalaryDetail> bizFinancialSalaryDetails = bizFinancialSalaryDetailService.getList(salaryDetail);
-            if(bizFinancialSalaryDetails.size()==0){
+            List<BizFinancialSalaryDetail> bizFinancialSalaryDetails = bizFinancialSalaryDetailService.getList(salaryDetail);
+            if (bizFinancialSalaryDetails.size() == 0) {
                 salaryDetail.setStatus(0);
                 salary.setServiceName("");
-            }else{
-                salaryDetail=bizFinancialSalaryDetails.get(0);
+            } else {
+                salaryDetail = bizFinancialSalaryDetails.get(0);
                 SysUser sysUser = sysUserMapper.selectUserById(salaryDetail.getVerifierId());
-                salary.setServiceName(sysUser==null?"":sysUser.getNickName());
+                salary.setServiceName(sysUser == null ? "" : sysUser.getNickName());
             }
             //设置状态
             switch (salaryDetail.getStatus()) {

+ 58 - 19
src/main/java/cn/ezhizao/project/business/salary/domain/BizFinancialSalary.java

@@ -3,12 +3,15 @@ package cn.ezhizao.project.business.salary.domain;
 import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableName;
 import cn.ezhizao.framework.web.domain.BaseEntity;
+import com.fasterxml.jackson.annotation.JsonFormat;
 import lombok.Data;
 import io.swagger.annotations.ApiModelProperty;
 import cn.ezhizao.framework.aspectj.lang.annotation.Excel;
+import lombok.ToString;
 
 import javax.validation.constraints.Pattern;
 import java.security.Timestamp;
+import java.util.Date;
 import java.util.List;
 
 /**
@@ -18,69 +21,89 @@ import java.util.List;
  * @date 2023-11-16
  */
 @Data
+@ToString
 @TableName(value = "biz_financial_salary")
-public class BizFinancialSalary extends BaseEntity
-{
+public class BizFinancialSalary extends BaseEntity {
     private static final long serialVersionUID = 1L;
 
-    /** 客户主键 */
+    /**
+     * 客户主键
+     */
     @ApiModelProperty(value = "${comment}")
     private Long companyId;
 
-    /** 账套外键 */
+    /**
+     * 账套外键
+     */
     @ApiModelProperty(value = "${comment}")
     private Long accountSetsId;
 
-    /** $column.columnComment */
+    /**
+     * $column.columnComment
+     */
     @ApiModelProperty(value = "${comment}")
     private Long tenantId;
 
-    /** 当前维护人员 */
+    /**
+     * 当前维护人员
+     */
     @ApiModelProperty(value = "${comment}")
     private Long currentEmployeeId;
 
-    /** 全部维护人员 */
+    /**
+     * 全部维护人员
+     */
     @ApiModelProperty(value = "${comment}")
     private String employeeIds;
 
-    /** 工单外键 */
+    /**
+     * 工单外键
+     */
     @ApiModelProperty(value = "${comment}")
     private Long workOrderId;
 
     @TableField(exist = false)
     private Timestamp currentTime;
 
-    /** 任务停止 */
+    /**
+     * 任务停止
+     */
 //    @Excel(name = "任务停止")
     @ApiModelProperty(value = "任务停止")
     private Integer isStop;
 
-    /** 列表显示新增 */
+    /**
+     * 列表显示新增
+     */
     @TableField(exist = false)
-    @Excel(name = "客户名称",sort = 1)
+    @Excel(name = "客户名称", sort = 1)
     private String companyName;
 
     @TableField(exist = false)
-    @Excel(name = "来源",sort = 2)
+    @Excel(name = "来源", sort = 2)
     private String fromCompanyName;
 
     @TableField(exist = false)
-    @Excel(name = "查询期间",sort = 4)
+    @Excel(name = "查询期间", sort = 4)
     private String currentPeriod;
 
     @TableField(exist = false)
-    @Excel(name = "纳税性质",sort = 6)
+    @Excel(name = "纳税性质", sort = 6)
     private String taxType;
 
-    /** 社会信用代码 */
-    @Excel(name = "税号",sort = 3)
+    /**
+     * 社会信用代码
+     */
+    @Excel(name = "税号", sort = 3)
     @TableField(exist = false)
     private String socialCreditCode;
 
     @TableField(exist = false)
     private List<BizFinancialSalaryDetail> details;
 
-    /** 查询条件新增 */
+    /**
+     * 查询条件新增
+     */
     @TableField(exist = false)
     private String year;
 
@@ -90,7 +113,7 @@ public class BizFinancialSalary extends BaseEntity
     @TableField(exist = false)
     private Integer status;
 
-    @Excel(name = "当前状态",sort = 5)
+    @Excel(name = "当前状态", sort = 5)
     @TableField(exist = false)
     private String currentStatus;
 
@@ -106,7 +129,7 @@ public class BizFinancialSalary extends BaseEntity
 
     //执行人
     @TableField(exist = false)
-    @Excel(name = "执行人",sort = 7)
+    @Excel(name = "执行人", sort = 7)
     private String serviceName;
     @TableField(exist = false)
     private String currentDate;
@@ -114,4 +137,20 @@ public class BizFinancialSalary extends BaseEntity
     private Long customerLabelId;
     @TableField(exist = false)
     private String customerLabelName;
+
+    /**
+     * 审核人
+     */
+    @ApiModelProperty(value = "审核人")
+    @TableField(exist = false)
+    private Long verifierId;
+    @TableField(exist = false)
+    @Excel(name = "审核人", sort = 8)
+    private String verifierName;
+    @Excel(name = "审核时间", dateFormat = "yyyy-MM-dd",sort = 9)
+    @TableField(exist = false)
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private Date verifierTime;
+    @TableField(exist = false)
+    private List<String> dateFilter;
 }

+ 4 - 1
src/main/java/cn/ezhizao/project/business/salary/domain/BizFinancialSalaryDetail.java

@@ -1,11 +1,13 @@
 package cn.ezhizao.project.business.salary.domain;
 
 import java.math.BigDecimal;
+import java.util.Date;
 import java.util.List;
 
 import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableName;
 import cn.ezhizao.framework.web.domain.BaseEntity;
+import com.fasterxml.jackson.annotation.JsonFormat;
 import lombok.Data;
 import io.swagger.annotations.ApiModelProperty;
 import cn.ezhizao.framework.aspectj.lang.annotation.Excel;
@@ -133,7 +135,8 @@ public class BizFinancialSalaryDetail extends BaseEntity
     @TableField(exist = false)
     private BigDecimal  otherCut;
 
-
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private Date verifierTime;
 
 
 }

+ 2 - 0
src/main/java/cn/ezhizao/project/business/socialSecurity/controller/SocialSecurityConfirmController.java

@@ -241,6 +241,7 @@ public class SocialSecurityConfirmController extends BaseController {
     @PreAuthorize("@ss.hasPermi('business:socialSecurityConfirm:edit')")
     @PostMapping("/saveDetail")
     @Transactional(rollbackFor = Exception.class)
+    @Log(title = "社保人员信息-新增", businessType = BusinessType.INSERT)
     public AjaxResult saveDetail(@RequestBody BizSocialSecurityConfirmDetail detail) {
         // 判断之前是否有保存一个明细
         BizSocialSecurityConfirmDetail conditions = new BizSocialSecurityConfirmDetail();
@@ -418,6 +419,7 @@ public class SocialSecurityConfirmController extends BaseController {
         } else {
             bool = bool && addRecord(detail.getSocialSecurityConfirmId(), detail.getYear(), detail.getMonth(), SecurityUtils.getUserId(), "社保人员信息审核不通过");
         }
+        detail.setVerifierTime(new Date());
         bool = bool && socialSecurityConfirmDetailService.updateById(detail);
         return toAjax(bool);
     }

+ 1 - 1
src/main/java/cn/ezhizao/project/business/socialSecurity/controller/SocialSecurityDeclareController.java

@@ -102,7 +102,7 @@ public class SocialSecurityDeclareController extends BaseController {
 
     @ApiOperation(value = "带条件List 分页查询", notes = "带条件List 分页查询")
     @PreAuthorize("@ss.hasPermi('business:socialSecurityDeclare:list')")
-    @GetMapping("/list")
+    @GetMapping("ist")
     @ResponseBody
     public TableDataInfo getList(BizSocialSecurityDeclare conditions) throws NoSuchFieldException, IllegalAccessException {
         setTenantId(conditions);

+ 12 - 0
src/main/java/cn/ezhizao/project/business/socialSecurity/domain/BizSocialSecurityConfirm.java

@@ -4,6 +4,7 @@ import cn.ezhizao.framework.aspectj.lang.annotation.Excel;
 import cn.ezhizao.framework.web.domain.BaseEntity;
 import com.baomidou.mybatisplus.annotation.FieldFill;
 import com.baomidou.mybatisplus.annotation.TableField;
+import com.fasterxml.jackson.annotation.JsonFormat;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
@@ -92,4 +93,15 @@ public class BizSocialSecurityConfirm extends BaseEntity implements Serializable
     @Excel(name = "执行人",sort = 7)
     @TableField(exist = false)
     private String serviceName;
+
+    @Excel(name = "审核人", sort = 8)
+    @TableField(exist = false)
+    private String verifierName;
+
+    @TableField(exist = false)
+    @Excel(name = "审核时间", dateFormat = "yyyy-MM-dd",sort = 9)
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private java.util.Date verifierTime;
+    @TableField(exist = false)
+    private List<String> dateFilter;
 }

+ 3 - 0
src/main/java/cn/ezhizao/project/business/socialSecurity/domain/BizSocialSecurityConfirmDetail.java

@@ -8,6 +8,7 @@ import lombok.EqualsAndHashCode;
 import lombok.experimental.Accessors;
 
 import java.io.Serializable;
+import java.util.Date;
 import java.util.List;
 
 /**
@@ -76,4 +77,6 @@ public class BizSocialSecurityConfirmDetail extends BaseEntity implements Serial
 
     @ApiModelProperty("是否变更")
     private Integer isChanged;
+    @ApiModelProperty("审核人")
+    private Date verifierTime;
 }

+ 64 - 22
src/main/java/cn/ezhizao/project/business/workOrder/controller/OnceWorkOrderProductionController.java

@@ -9,6 +9,8 @@ import cn.ezhizao.framework.web.controller.BaseController;
 import cn.ezhizao.framework.web.domain.AjaxResult;
 import cn.ezhizao.framework.web.page.TableDataInfo;
 import cn.ezhizao.project.business.deduction.domain.BizDeduction;
+import cn.ezhizao.project.business.entrust.domain.BizEntrust;
+import cn.ezhizao.project.business.entrust.service.IBizEntrustService;
 import cn.ezhizao.project.business.keepAccounts.domain.BizFinancialKeepAccountDetail;
 import cn.ezhizao.project.business.reportTaxIsZero.domain.BizFinancialReportTaxDetail;
 import cn.ezhizao.project.business.urgent.domain.BizFinancialUrgent;
@@ -21,6 +23,7 @@ import cn.ezhizao.project.system.domain.SysDictData;
 import cn.ezhizao.project.system.domain.SysUser;
 import cn.ezhizao.project.system.mapper.SysUserMapper;
 import cn.ezhizao.project.system.service.ISysDictDataService;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.security.access.prepost.PreAuthorize;
@@ -29,6 +32,7 @@ import org.springframework.web.bind.annotation.*;
 import javax.annotation.Resource;
 import javax.servlet.http.HttpServletResponse;
 import java.math.BigDecimal;
+import java.util.Date;
 import java.util.List;
 
 /**
@@ -47,7 +51,11 @@ public class OnceWorkOrderProductionController extends BaseController {
 
     @Resource
     private ISysDictDataService sysDictDataService;
-    @ApiOperation(value = "带条件List 分页查询",notes= "带条件List 分页查询")
+
+    @Resource
+    private IBizEntrustService entrustService;
+
+    @ApiOperation(value = "带条件List 分页查询", notes = "带条件List 分页查询")
     @GetMapping("/list")
     @PreAuthorize("@ss.hasPermi('business:production:onceWork:list')")
     @ResponseBody
@@ -56,26 +64,26 @@ public class OnceWorkOrderProductionController extends BaseController {
         startPage();
         startOrderBy();
         List<BizWorkOrder> list = workOrderService.getList(conditions);
-        list.forEach(v ->{
+        list.forEach(v -> {
             Integer style = v.getAddressStyle();
-            if(style ==null){
+            if (style == null) {
                 return;
             }
-            if (v.getTaskTypeId() == 5L && style == 1 && StringUtils.isNotEmpty(v.getInputProvince()) ){
+            if (v.getTaskTypeId() == 5L && style == 1 && StringUtils.isNotEmpty(v.getInputProvince())) {
                 //自有地址
-                v.setExplain("自有地址:"+v.getInputProvince()+v.getInputCity()+v.getInputDistrict());
-            }else if (v.getTaskTypeId() == 5L && style == 2 && v.getFictionAddressId() != null){
+                v.setExplain("自有地址:" + v.getInputProvince() + v.getInputCity() + v.getInputDistrict());
+            } else if (v.getTaskTypeId() == 5L && style == 2 && v.getFictionAddressId() != null) {
                 //虚拟地址
                 SysDictData sysDictData = sysDictDataService.selectDictDataById(v.getFictionAddressId());
-                if(sysDictData == null){
+                if (sysDictData == null) {
                     return;
                 }
-                v.setExplain("虚拟地址:"+sysDictData.getDictLabel());
-            }else {
-                if (StringUtils.isEmpty(v.getInputProvince())){
+                v.setExplain("虚拟地址:" + sysDictData.getDictLabel());
+            } else {
+                if (StringUtils.isEmpty(v.getInputProvince())) {
                     return;
                 }
-                v.setExplain("办理地区:"+v.getInputProvince()+v.getInputCity()+v.getInputDistrict());
+                v.setExplain("办理地区:" + v.getInputProvince() + v.getInputCity() + v.getInputDistrict());
             }
 
         });
@@ -89,23 +97,37 @@ public class OnceWorkOrderProductionController extends BaseController {
     @PreAuthorize("@ss.hasPermi('business:deduction:export')")
     @Log(title = "单次任务", businessType = BusinessType.EXPORT)
     @PostMapping("/export")
-    public void export(HttpServletResponse response, BizWorkOrder conditions) throws NoSuchFieldException, IllegalAccessException
-    {
+    public void export(HttpServletResponse response, BizWorkOrder conditions) throws NoSuchFieldException, IllegalAccessException {
         setTenantId(conditions);
         startOrderBy();
         List<BizWorkOrder> list = workOrderService.getList(conditions);
-        for(BizWorkOrder l : list){
-            l.setProjectType((l.getNoContract()==1?l.getRemark():"")+l.getTaskTypeName()+(l.getTaskTypeDetailName()!=null?"-"+l.getTaskTypeDetailName():""));
-            l.setOrderType(l.getType() ==1? "循环工单":"代办工单");
-            List<BizWorkOrderRecord> records = workOrderRecordService.query().eq("work_order_id", l.getId()).eq("from_id", 0).list();
-            if(records.size()>0){
-                SysUser sysUser = sysUserMapper.selectUserById(records.get(0).getRecorderId());
-                l.setServiceName(sysUser==null?"":sysUser.getNickName());
-            }else{
+        for (BizWorkOrder l : list) {
+            l.setProjectType((l.getNoContract() == 1 ? l.getRemark() : "") + l.getTaskTypeName() + (l.getTaskTypeDetailName() != null ? "-" + l.getTaskTypeDetailName() : ""));
+            l.setOrderType(l.getType() == 1 ? "循环工单" : "代办工单");
+            List<BizWorkOrderRecord> records = workOrderRecordService.query()
+                    .eq("work_order_id", l.getId()).eq("from_id", 0).list();
+            if (records.size() > 0) {
+                Long workOrderId = records.get(0).getWorkOrderId();
+                BizEntrust one = entrustService.getOne(new LambdaQueryWrapper<BizEntrust>().eq(BizEntrust::getWorkOrderId, workOrderId));
+                if (records.get(0).getRecorderId()!= null){
+//                    SysUser sysUser = sysUserMapper.selectUserById(records.get(0).getRecorderId());
+                    SysUser sysUser = sysUserMapper.selectUserById(l.getServiceId());
+                    l.setServiceName(sysUser == null ? "" : sysUser.getNickName());
+                    l.setRecorderName(sysUser == null ? "" : sysUser.getNickName());
+                }
+                if (records.get(0).getHandlerId()!= null){
+                    SysUser sysUser2 = sysUserMapper.selectUserById(records.get(0).getHandlerId());
+                    l.setHandlerName(sysUser2 == null ? "" : sysUser2.getNickName());
+                }
+                l.setHandlerTime(records.get(0).getHandlerTime());
+                l.setEntrustTime(one.getCreateTime());
+                l.setFinishTime(records.get(0).getUpdateTime());
+            } else {
                 l.setServiceName("");
+                l.setHandlerName("");
             }
             //设置状态
-            switch (l.getRecord()==null?0:l.getRecord().getStatus()) {
+            switch (l.getRecord() == null ? 0 : l.getRecord().getStatus()) {
                 case 0:
                     l.setStatusType("未开始");
                     break;
@@ -153,4 +175,24 @@ public class OnceWorkOrderProductionController extends BaseController {
             return toAjax(workOrderRecordService.updateById(detail));
         }
     }
+
+
+    @PostMapping("/receive")
+    @Log(title = "办理", businessType = BusinessType.UPDATE)
+    public AjaxResult receive(@RequestBody BizWorkOrderRecord record) {
+        // 获取是否已完成 已完成不能再次完成
+        if (record.getId() != null) {
+            record.setStatus( workOrderRecordService.getById(record.getId()).getStatus() == 0 ? 1: 0);
+        } else {
+            record.setStatus(1);
+        }
+        if (record.getStatus() ==1){
+            record.setHandlerId(SecurityUtils.getUserId());
+            record.setHandlerTime(new Date());
+        }else {
+            record.setHandlerId(null);
+            record.setHandlerTime(null);
+        }
+        return toAjax(workOrderRecordService.saveOrUpdate(record));
+    }
 }

+ 99 - 29
src/main/java/cn/ezhizao/project/business/workOrder/domain/BizWorkOrder.java

@@ -20,24 +20,27 @@ import java.util.List;
  */
 @Data
 @TableName(value = "biz_work_order")
-public class BizWorkOrder extends BaseEntity
-{
+public class BizWorkOrder extends BaseEntity {
     private static final long serialVersionUID = 1L;
 
-    /** 合同外键 */
+    /**
+     * 合同外键
+     */
     @ApiModelProperty(value = "${comment}")
     private Long contractId;
 
-    /** 客户外键 */
+    /**
+     * 客户外键
+     */
     @ApiModelProperty(value = "${comment}")
     private Long companyId;
 
     @ApiModelProperty("客户名称")
-    @Excel(name = "客户名称",sort = 1)
+    @Excel(name = "客户名称", sort = 1)
     @TableField(exist = false)
     private String companyName;
 
-    @Excel(name = "税号",width = 30 ,sort = 2)
+    @Excel(name = "税号", width = 30, sort = 2)
     @ApiModelProperty("税号")
     @TableField(exist = false)
     private String socialCreditCode;
@@ -48,98 +51,132 @@ public class BizWorkOrder extends BaseEntity
     @ApiModelProperty("合同流程外键")
     private Long contractDetailProcessId;
 
-    /** 工单类型 1循环 2代办 */
+    /**
+     * 工单类型 1循环 2代办
+     */
 //    @Excel(name = "工单类型 1循环 2代办")
     @ApiModelProperty(value = "工单类型 1循环 2代办")
     private Integer type;
 
-    /** 工单类型 1循环 2代办 */
-    @Excel(name = "工单类型",sort = 3)
+    /**
+     * 工单类型 1循环 2代办
+     */
+    @Excel(name = "工单类型", sort = 3)
     @ApiModelProperty(value = "工单类型 1循环 2代办")
     private String orderType;
 
-    /** 无合同 */
+    /**
+     * 无合同
+     */
     @ApiModelProperty(value = "无合同")
     private Integer noContract;
 
-    /** 编号 */
+    /**
+     * 编号
+     */
     @ApiModelProperty(value = "编号")
     private String workOrderNo;
 
-    /** 任务类型 任务表外键 任务明细表 */
+    /**
+     * 任务类型 任务表外键 任务明细表
+     */
     @ApiModelProperty(value = "任务外键")
     private Long taskTypeId;
 
     @TableField(exist = false)
     private String taskTypeName;
 
-    @Excel(name = "项目",sort = 4)
+    @Excel(name = "项目", sort = 4)
     @TableField(exist = false)
     private String projectType;
 
-    /** 任务类型 任务表外键 任务明细表 */
+    /**
+     * 任务类型 任务表外键 任务明细表
+     */
     @ApiModelProperty(value = "任务明细外键")
     private Long taskTypeDetailId;
 
     @TableField(exist = false)
     private String taskTypeDetailName;
 
-    /** 开始月 */
+    /**
+     * 开始月
+     */
     @JsonFormat(pattern = "yyyy-MM-dd")
 //    @Excel(name = "开始月", width = 30, dateFormat = "yyyy-MM-dd")
     @ApiModelProperty(value = "开始月")
     private Date startMonth;
 
-    /** 结束月 */
+    /**
+     * 结束月
+     */
     @JsonFormat(pattern = "yyyy-MM-dd")
 //    @Excel(name = "结束月", width = 30, dateFormat = "yyyy-MM-dd")
     @ApiModelProperty(value = "结束月")
     private Date endMonth;
 
-    /** 月数 */
+    /**
+     * 月数
+     */
 //    @Excel(name = "月数")
     @ApiModelProperty(value = "月数")
     private Integer monthNum;
 
-    /** 负责人 */
+    /**
+     * 负责人
+     */
     @ApiModelProperty(value = "月数")
     private Long managerId;
 
-    /** 主程序账套外键 */
+    /**
+     * 主程序账套外键
+     */
     @ApiModelProperty(value = "月数")
     private Long tenantId;
 
-    /** 停止任务 */
+    /**
+     * 停止任务
+     */
 //    @Excel(name = "停止任务")
     @ApiModelProperty(value = "停止任务")
     private Integer isStop;
 
 
-//    @Excel(name = "注册省份编码")
+    //    @Excel(name = "注册省份编码")
     @ApiModelProperty(value = "注册省份编码")
     private String provinceCode;
 
-    /** 省 */
+    /**
+     * 省
+     */
 //    @Excel(name = "省")
     @ApiModelProperty(value = "省")
     private String province;
 
-    /** 注册城市编码 */
+    /**
+     * 注册城市编码
+     */
 //    @Excel(name = "注册城市编码")
     @ApiModelProperty(value = "注册城市编码")
     private String cityCode;
 
-    /** 市 */
+    /**
+     * 市
+     */
 //    @Excel(name = "市")
     @ApiModelProperty(value = "市")
     private String city;
 
-    /** 注册行政区编码 */
+    /**
+     * 注册行政区编码
+     */
 //    @Excel(name = "注册行政区编码")
     @ApiModelProperty(value = "注册行政区编码")
     private String districtCode;
 
-    /** 区 */
+    /**
+     * 区
+     */
 //    @Excel(name = "区")
     @ApiModelProperty(value = "区")
     private String district;
@@ -149,11 +186,13 @@ public class BizWorkOrder extends BaseEntity
     @TableField(exist = false)
     private List<BizWorkOrderDetail> details;
 
-    /** 服务管理查询条件 */
+    /**
+     * 服务管理查询条件
+     */
     @TableField(exist = false)
     private Integer status;
 
-    @Excel(name = "状态",sort = 6)
+    @Excel(name = "状态", sort = 20)
     @TableField(exist = false)
     private String statusType;
 
@@ -165,7 +204,7 @@ public class BizWorkOrder extends BaseEntity
     @ApiModelProperty("服务人员")
     private Long serviceId;
 
-    @Excel(name = "执行人",sort = 5)
+    @Excel(name = "执行人", sort = 6)
     @TableField(exist = false)
     private String serviceName;
 
@@ -194,4 +233,35 @@ public class BizWorkOrder extends BaseEntity
     private String inputDistrict;
     @TableField(exist = false)
     private String explain;
+
+    /**
+     * 办理人时间
+     */
+    @Excel(name = "领取时间", sort = 8, dateFormat = "yyyy-MM-dd HH:mm")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm")
+
+    private Date handlerTime;
+
+    @TableField(exist = false)
+
+    @Excel(name = "领取人", sort = 7)
+    private String handlerName;
+    @TableField(exist = false)
+    @Excel(name = "完成人", sort = 9)
+    private String recorderName;
+    /**
+     * 委托时间
+     */
+    @TableField(exist = false)
+    @Excel(name = "委托时间", sort = 5, dateFormat = "yyyy-MM-dd")
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private Date entrustTime;
+
+    @TableField(exist = false)
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm")
+    @Excel(name = "完成时间", sort = 10, dateFormat = "yyyy-MM-dd HH:mm")
+    private Date finishTime;
+
+    @TableField(exist = false)
+    private Integer recordStatus;
 }

+ 24 - 2
src/main/java/cn/ezhizao/project/business/workOrder/domain/BizWorkOrderRecord.java

@@ -2,12 +2,15 @@ package cn.ezhizao.project.business.workOrder.domain;
 
 import cn.ezhizao.framework.aspectj.lang.annotation.Excel;
 import cn.ezhizao.framework.web.domain.BaseEntity;
+import com.baomidou.mybatisplus.annotation.FieldFill;
 import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.annotation.JsonFormat;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
 import java.math.BigDecimal;
+import java.util.Date;
 import java.util.List;
 
 /**
@@ -54,9 +57,10 @@ public class BizWorkOrderRecord extends BaseEntity
     @ApiModelProperty(value = "客户外键")
     private Long companyId;
 
-    @ApiModelProperty(value = "记录人")
+    @ApiModelProperty(value = "记录人/完成人")
     private Long recorderId;
-
+    @ApiModelProperty(value = "办理人")
+    private Long  handlerId;
     @ApiModelProperty(value = "根节点外键")
     private Long fromId;
 
@@ -65,4 +69,22 @@ public class BizWorkOrderRecord extends BaseEntity
 
     @TableField(exist = false)
     private List<Long> workOrderIds;
+
+    /** 办理人时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm")
+    private Date handlerTime;
+
+    @TableField(exist = false)
+    private String handlerName;
+    @TableField(exist = false)
+    private String recorderName;
+    /** 委托时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @TableField(exist = false)
+    private Date entrustTime;
+
+    /** 更新时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm")
+    @TableField(value="update_time",fill= FieldFill.UPDATE)
+    private Date updateTime;
 }

+ 1 - 1
src/main/resources/mybatis/business/BizDeductionMapper.xml

@@ -42,7 +42,7 @@
         WHERE del_flag = 0 AND user_id = #{operation_id};
     </select>
 
-    <!--带条件的List查询-->
+    <!--带条件的查询-->
     <select id="getList" resultMap="BaseResultMap">
         <include refid="getListSql"/>
     </select>

+ 40 - 1
src/main/resources/mybatis/business/BizFinancialKeepAccountMapper.xml

@@ -28,11 +28,29 @@
         SELECT
         t1.*, t2.name as company_name,t2.customer_label_id, t4.lable as customerLabelName,
         (select concat(bwor.year, '年', bwor.month, '月') from biz_work_order_record bwor where bwor.work_order_id = t1.work_order_id order by year desc, month desc limit 1) currentDate,
-        t3.account_name as from_company_name, t2.tax_type
+        t3.account_name as from_company_name, t2.tax_type,
+        t5.current_year_profit,
+        t5.provisional_estimate_amount,
+        t5.current_year_income,
+        t6.nick_name as verifierName,
+        t5.verifier_time,
+        temp.create_time as finishTime,
+        temp.creator_id as finishUserId,
+        t7.nick_name as finishUserName
         from biz_financial_keep_account t1
         left join biz_company t2 on t2.id = t1.company_id
         left join biz_tenant t3 on t3.id = t1.tenant_id
         left join biz_lable t4 on t4.id = t2.customer_label_id
+        left join biz_financial_keep_account_detail t5 on t5.financial_keep_account_id = t1.id
+        and t5.deleted = 0 and t5.month = #{month} and t5.year = #{year} and t5.financial_keep_account_id = t1.id
+        left join sys_user t6 on t6.user_id = t5.verifier_id
+        left join (select tt1.company_id,tt1.create_time,tt2.creator_id from  (
+        select  company_id,year, `month`, max(create_time) as  create_time from biz_archive_receive_ticket_finished
+        where  deleted = 0 and year = #{year} and month = #{month}
+        GROUP BY company_id,year, month
+        ) tt1 left JOIN biz_archive_receive_ticket_finished
+        tt2 on tt1.company_id=tt2.company_id and tt1.year =tt2.year and tt1.create_time = tt2.create_time) temp on t1.company_id = temp.company_id
+        left join sys_user t7 on t7.user_id = temp.creator_id
         WHERE
         t1.deleted = 0
         <if test="id != null">
@@ -44,6 +62,27 @@
         <if test="isZero != null">
             AND t2.is_zero = #{isZero}
         </if>
+        <if test="verifierName != null">
+            AND t6.nick_name like concat('%', #{verifierName}, '%')
+        </if>
+        <if test="dateFilter != null and dateFilter.size()>0 ">
+            AND (
+            DATE_FORMAT(t5.verifier_time,'%Y-%m-%d') &gt;= #{dateFilter[0]}
+            AND
+            DATE_FORMAT(t5.verifier_time,'%Y-%m-%d') &lt;= #{dateFilter[1]}
+            )
+        </if>
+
+        <if test="verifierName != null">
+            AND t7.nick_name like concat('%', #{finishUserName}, '%')
+        </if>
+        <if test="dateFilter != null and dateFilter.size()>0 ">
+            AND (
+            DATE_FORMAT(temp.create_time,'%Y-%m-%d') &gt;= #{dateFilter[0]}
+            AND
+            DATE_FORMAT(temp.create_time,'%Y-%m-%d') &lt;= #{dateFilter[1]}
+            )
+        </if>
         <if test="customerLabelId != null">
             AND t2.customer_label_id = #{customerLabelId}
         </if>

+ 18 - 1
src/main/resources/mybatis/business/BizFinancialReceiveTicketMapper.xml

@@ -16,11 +16,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         t1.*, t2.name as company_name,t2.customer_label_id, t4.lable as customerLabelName,
 <!--        (select concat(frtd.year, '-', frtd.month) from biz_financial_receive_ticket_detail frtd where frtd.financial_receive_ticket_id = t1.id order by year desc, month desc limit 1) currentDate,-->
         (select concat(bwor.year, '年', bwor.month, '月') from biz_work_order_record bwor where bwor.work_order_id = t1.work_order_id order by year desc, month desc limit 1) currentDate,
-        t3.account_name as from_company_name, t2.tax_type
+        t3.account_name as from_company_name, t2.tax_type,
+        t5.verifier_id,
+        t6.nick_name as verifierName,
+        t5.verifier_time,
+        (t5.income_ticket+t5.cost_ticket+t5.fee_ticket_number+t5.ssaf_ticket+t5.salary_ticket+t5.bank_copy_number+t5.bank_slips_number+t5.other_ticket) as sumNumber
         from biz_financial_receive_ticket t1
         left join biz_company t2 on t2.id = t1.company_id
         left join biz_tenant t3 on t3.id = t1.tenant_id
         left join biz_lable t4 on t4.id = t2.customer_label_id
+        left join biz_financial_receive_ticket_detail t5 on t5.financial_receive_ticket_id = t1.id
+        and t5.deleted = 0 and t5.month = #{month} and t5.year = #{year} and t5.financial_receive_ticket_id = t1.id
+        left join sys_user t6 on t6.user_id = t5.verifier_id
         WHERE
         t1.deleted = 0
         <if test="id != null">
@@ -32,6 +39,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <if test="isZero != null">
             AND t2.is_zero = #{isZero}
         </if>
+        <if test="verifierName != null">
+            AND  t6.nick_name like concat('%', #{verifierName}, '%')
+        </if>
+        <if test="dateFilter != null and dateFilter.size()>0 ">
+            AND  (
+            DATE_FORMAT(t5.verifier_time,'%Y-%m-%d') &gt;= #{dateFilter[0]}
+            AND
+            DATE_FORMAT(t5.verifier_time,'%Y-%m-%d') &lt;= #{dateFilter[1]}
+            )
+        </if>
         <if test="customerLabelId != null">
             AND t2.customer_label_id = #{customerLabelId}
         </if>

+ 32 - 8
src/main/resources/mybatis/business/BizFinancialSalaryMapper.xml

@@ -15,11 +15,18 @@
     <select id="getList" parameterType="BizFinancialSalary" resultMap="BizFinancialSalaryResult">
         SELECT t1.*, t2.name as company_name,t2.tax_type, t3.account_name as from_company_name,
         t2.customer_label_id, t4.lable as customerLabelName,
-        (select concat(bwor.year, '年', bwor.month, '月') from biz_work_order_record bwor where bwor.work_order_id = t1.work_order_id order by year desc, month desc limit 1) currentDate
+        (select concat(bwor.year, '年', bwor.month, '月') from biz_work_order_record bwor where bwor.work_order_id =
+        t1.work_order_id order by year desc, month desc limit 1) currentDate,
+        t5.verifier_id,
+        t6.nick_name as verifierName,
+        t5.verifier_time
         FROM biz_financial_salary t1
         left join biz_company t2 on t2.id = t1.company_id
         left join biz_tenant t3 on t3.id = t1.tenant_id
         left join biz_lable t4 on t4.id = t2.customer_label_id
+        left join biz_financial_salary_detail t5 on t5.financial_salary_id = t1.id
+                                 and t5.deleted = 0 and t5.month = #{month} and t5.year = #{year} and t5.financial_salary_id = t1.id
+        left join sys_user t6 on t6.user_id = t5.verifier_id
         <trim prefix=" WHERE" suffix="" suffixOverrides="AND">
             t1.deleted = 0
             and t1.is_stop = 0
@@ -28,6 +35,16 @@
             <if test="taxType != null and taxType != ''">
                 AND t2.tax_type = #{taxType}
             </if>
+            <if test="verifierName != null">
+                AND t6.nick_name like concat('%', #{verifierName}, '%')
+            </if>
+            <if test="dateFilter != null and dateFilter.size()>0 ">
+                AND (
+                DATE_FORMAT(t5.update_time,'%Y-%m-%d') &gt;= #{dateFilter[0]}
+                AND
+                DATE_FORMAT(t5.update_time,'%Y-%m-%d') &lt;= #{dateFilter[1]}
+                )
+            </if>
             <if test="customerLabelId != null">
                 AND t2.customer_label_id = #{customerLabelId}
             </if>
@@ -40,6 +57,7 @@
             <if test="principal != null and principal != ''">
                 AND (t2.leader_id=#{principal} OR t2.adviser_id=#{principal})
             </if>
+
             <if test="month != null and year != null">
                 <if test="tenantId != null">
                     AND exists (select 1 from biz_entrust eb
@@ -50,29 +68,35 @@
                     )
                 </if>
                 <if test="status != null and status != 0">
-                    AND exists (select 1 from biz_financial_salary_detail fsd where fsd.deleted = 0 and fsd.financial_salary_id = t1.id and
+                    AND exists (select 1 from biz_financial_salary_detail fsd where fsd.deleted = 0 and
+                    fsd.financial_salary_id = t1.id and
                     fsd.month = #{month} and fsd.year = #{year} and fsd.status = #{status})
                 </if>
                 <if test="status != null and status == 0">
-                    AND not exists (select 1 from biz_financial_salary_detail fsd where fsd.deleted = 0 and fsd.financial_salary_id = t1.id and
+                    AND not exists (select 1 from biz_financial_salary_detail fsd where fsd.financial_salary_id = t1.id and
                     fsd.month = #{month} and fsd.year = #{year})
                 </if>
                 <if test="hasIndividualIncomeTax != null">
-                    AND exists (select 1 from biz_financial_salary_detail fsd where fsd.deleted = 0 and fsd.financial_salary_id = t1.id and
+                    AND exists (select 1 from biz_financial_salary_detail fsd where fsd.deleted = 0 and
+                    fsd.financial_salary_id = t1.id and
                     has_individual_income_tax=#{hasIndividualIncomeTax} and fsd.month = #{month} and fsd.year = #{year})
                 </if>
             </if>
+
+
         </trim>
     </select>
 
     <select id="getServiceName" resultType="String">
-        SELECT s.nick_name FROM sys_user s
-        WHERE s.user_id =(SELECT leader_id  FROM biz_company WHERE id=#{company_id})
+        SELECT s.nick_name
+        FROM sys_user s
+        WHERE s.user_id = (SELECT leader_id FROM biz_company WHERE id = #{company_id})
     </select>
 
     <select id="getSocialCreditCode" resultType="String">
-        SELECT c.social_credit_code FROM biz_company c
-        WHERE c.id =#{company_id}
+        SELECT c.social_credit_code
+        FROM biz_company c
+        WHERE c.id = #{company_id}
     </select>
 
     <delete id="physicalDelete">

+ 17 - 1
src/main/resources/mybatis/business/BizSocialSecurityConfirmMapper.xml

@@ -24,10 +24,16 @@
         SELECT t1.*, t2.name as company_name,
         (select concat(bwor.year, '年', bwor.month, '月') from biz_work_order_record bwor where bwor.work_order_id = t1.work_order_id order by year desc, month desc limit 1) currentDate,
 <!--        (select concat(frtd.year, '-', frtd.month) from biz_social_security_confirm_detail frtd where frtd.social_security_confirm_id = t1.id order by year desc, month desc limit 1) currentDate,-->
-        t3.account_name as from_company_name, t2.tax_type
+        t3.account_name as from_company_name, t2.tax_type,
+        t5.verifier_id,
+        t6.nick_name as verifierName,
+        t5.verifier_time
         FROM biz_social_security_confirm t1
         left join biz_company t2 on t2.id = t1.company_id
         left join biz_tenant t3 on t3.id = t1.tenant_id
+        left join biz_social_security_confirm_detail t5 on t5.social_security_confirm_id = t1.id
+        and t5.deleted = 0 and t5.month = #{month} and t5.year = #{year} and t5.social_security_confirm_id = t1.id
+        left join sys_user t6 on t6.user_id = t5.verifier_id
         <trim prefix=" WHERE" suffix="" suffixOverrides="AND">
             t1.deleted = 0 AND
             <if test="id != null  ">
@@ -48,6 +54,16 @@
             <if test="fromCompanyName != null and fromCompanyName != ''">
                 (t3.account_name like concat('%', #{fromCompanyName}, '%')) AND
             </if>
+            <if test="verifierName != null">
+                 t6.nick_name like concat('%', #{verifierName}, '%')AND
+            </if>
+            <if test="dateFilter != null and dateFilter.size()>0 ">
+                 (
+                DATE_FORMAT(t5.verifier_time,'%Y-%m-%d') &gt;= #{dateFilter[0]}AND
+
+                DATE_FORMAT(t5.verifier_time,'%Y-%m-%d') &lt;= #{dateFilter[1]}
+                )AND
+            </if>
             <if test="companyName != null and companyName != ''">
                 (t2.name like concat('%', #{companyName}, '%')) AND
             </if>

+ 44 - 22
src/main/resources/mybatis/business/BizWorkOrderMapper.xml

@@ -6,30 +6,42 @@
 
     <resultMap type="cn.ezhizao.project.business.workOrder.domain.BizWorkOrder" id="BizWorkOrderResult">
         <id column="id" property="id"/>
-        <association property="record" column="id" select="getRecord" javaType="cn.ezhizao.project.business.workOrder.domain.BizWorkOrderRecord" />
+        <association property="record" column="id" select="getRecord"
+                     javaType="cn.ezhizao.project.business.workOrder.domain.BizWorkOrderRecord"/>
     </resultMap>
 
     <resultMap id="RecordResult" type="cn.ezhizao.project.business.workOrder.domain.BizWorkOrderRecord">
-        <id  property="id"    column="id"  />
+        <id property="id" column="id"/>
     </resultMap>
 
     <select id="getRecord" resultMap="RecordResult">
-        select * from biz_work_order_record where deleted = 0 and from_id = 0 and work_order_id = #{id}
+        select t1.*, t2.nick_name as handlerName, t3.nick_name as recorderName,t4.create_time as entrustTime
+        from biz_work_order_record t1
+                 left join sys_user t2 on t1.handler_id = t2.user_id
+                 left join sys_user t3 on t1.recorder_id = t3.user_id
+                 left join biz_entrust t4 on t1.work_order_id = t4.work_order_id
+        where t1.deleted = 0
+          and t1.from_id = 0
+          and t1.work_order_id = #{id}
     </select>
 
 
     <select id="getList" parameterType="BizWorkOrder" resultMap="BizWorkOrderResult">
-        SELECT t1.*, t2.name as company_name, t2.social_credit_code, t3.name as task_type_name, t4.name as
-        task_type_detail_name, t5.nick_name as service_name,t6.alter_type,t6.address_style,t6.fiction_address_id,t6.province as inputProvince,t6.city as inputCity,t6.district as  inputDistrict
+        SELECT  CONCAT(t1.remark, t3.name, t4.name) AS contact_info,if(t7.status is null,0,t7.`status`),t1.*, t2.name as company_name, t2.social_credit_code, t3.name as task_type_name, t4.name as
+        task_type_detail_name, t5.nick_name as
+        service_name,t6.alter_type,t6.address_style,t6.fiction_address_id,t6.province as inputProvince,t6.city as
+        inputCity,t6.district as inputDistrict
         FROM biz_work_order t1
         left join biz_company t2 on t2.id = t1.company_id
         left join biz_task_type t3 on t3.id = t1.task_type_id
         left join biz_task_type_detail t4 on t4.id = t1.task_type_detail_id
         left join sys_user t5 on t5.user_id = t1.service_id
         LEFT JOIN biz_archive_input_detail t6 ON t6.id = t1.contract_detail_id
+        left join biz_work_order_record t7 on t7.work_order_id = t1.id
+        left join sys_user t8 on t7.handler_id = t8.user_id
         <trim prefix=" WHERE" suffix="" suffixOverrides="AND">
             t1.deleted = 0
-            <if test="id != null "> AND t1.id = #{id}</if>
+            <if test="id != null ">AND t1.id = #{id}</if>
             <if test="tenantId != null ">
                 AND exists (select 1 from biz_entrust eb
                 where eb.deleted = 0
@@ -37,8 +49,17 @@
                 and eb.work_order_id = t1.id
                 )
             </if>
-            <if test="taskTypeId != null "> AND t1.task_type_id = #{taskTypeId}</if>
-            <if test="companyId != null "> AND t1.company_id = #{companyId}</if>
+            <if test="taskTypeName != null">
+                AND CONCAT( t3.name, t4.name) LIKE concat('%', #{taskTypeName}, '%') OR t1.remark LIKE concat('%', #{taskTypeName}, '%')
+            </if>
+            <if test="handlerName != null ">
+                AND t8.nick_name like concat('%', #{handlerName}, '%')
+            </if>
+            <if test="recordStatus != null ">
+                AND (IF(t7.STATUS IS NULL, 0, t7.`status`) = #{recordStatus} )
+            </if>
+            <if test="taskTypeId != null ">AND t1.task_type_id = #{taskTypeId}</if>
+            <if test="companyId != null ">AND t1.company_id = #{companyId}</if>
             <if test="type != null ">AND t1.type = #{type}</if>
             <if test="principal != null and principal != ''">
                 AND (t2.leader_id=#{principal} OR t2.adviser_id=#{principal})
@@ -49,7 +70,7 @@
             <if test="endMonth != null ">AND t1.end_month = #{endMonth}</if>
             <if test="monthNum != null ">AND t1.month_num = #{monthNum}</if>
             <if test="isStop != null ">AND t1.is_stop = #{isStop}</if>
-            <if test="companyName != null"> AND t2.name like concat('%', #{companyName}, '%')</if>
+            <if test="companyName != null">AND t2.name like concat('%', #{companyName}, '%')</if>
         </trim>
     </select>
 
@@ -65,21 +86,22 @@
     <insert id="insertTasks">
         <foreach collection="tableValues" item="item" index="index" separator=";">
             insert into ${item.tableName} (
-                id,
-                company_id,
-                work_order_id,
-                tenant_id,
-                create_time,
-                creator_id
+            id,
+            company_id,
+            work_order_id,
+            tenant_id,
+            create_time,
+            creator_id
             ) select
-                #{item.id},
-                #{item.workOrderId},
-                company_id,
-                tenant_id,
-                sysdate(),
-                #{item.creatorId}
+            #{item.id},
+            #{item.workOrderId},
+            company_id,
+            tenant_id,
+            sysdate(),
+            #{item.creatorId}
             from biz_work_order where id = #{item.workOrderId}
-            and not exists (select 1 from ${item.tableName} where ${item.tableName}.company_id = biz_work_order.company_id and is_stop = 0)
+            and not exists (select 1 from ${item.tableName} where ${item.tableName}.company_id =
+            biz_work_order.company_id and is_stop = 0)
         </foreach>
     </insert>