ezhizao_zx 1 year ago
parent
commit
437764bbd9
38 changed files with 2272 additions and 123 deletions
  1. 129 8
      src/main/java/cn/ezhizao/project/business/archiveTicket/controller/ArchiveTicketController.java
  2. 5 0
      src/main/java/cn/ezhizao/project/business/entrust/domain/BizEntrust.java
  3. 125 0
      src/main/java/cn/ezhizao/project/business/receiveTicket/domain/BizFinancialReceiveTicket.java
  4. 221 0
      src/main/java/cn/ezhizao/project/business/receiveTicket/domain/BizFinancialReceiveTicketDetail.java
  5. 86 0
      src/main/java/cn/ezhizao/project/business/receiveTicket/domain/BizFinancialReceiveTicketFeedback.java
  6. 30 0
      src/main/java/cn/ezhizao/project/business/receiveTicket/mapper/BizFinancialReceiveTicketDetailMapper.java
  7. 30 0
      src/main/java/cn/ezhizao/project/business/receiveTicket/mapper/BizFinancialReceiveTicketFeedbackMapper.java
  8. 30 0
      src/main/java/cn/ezhizao/project/business/receiveTicket/mapper/BizFinancialReceiveTicketMapper.java
  9. 31 0
      src/main/java/cn/ezhizao/project/business/receiveTicket/service/IBizFinancialReceiveTicketDetailService.java
  10. 31 0
      src/main/java/cn/ezhizao/project/business/receiveTicket/service/IBizFinancialReceiveTicketFeedbackService.java
  11. 31 0
      src/main/java/cn/ezhizao/project/business/receiveTicket/service/IBizFinancialReceiveTicketService.java
  12. 44 0
      src/main/java/cn/ezhizao/project/business/receiveTicket/service/impl/BizFinancialReceiveTicketDetailServiceImpl.java
  13. 44 0
      src/main/java/cn/ezhizao/project/business/receiveTicket/service/impl/BizFinancialReceiveTicketFeedbackServiceImpl.java
  14. 44 0
      src/main/java/cn/ezhizao/project/business/receiveTicket/service/impl/BizFinancialReceiveTicketServiceImpl.java
  15. 87 0
      src/main/java/cn/ezhizao/project/business/salary/domain/BizFinancialSalary.java
  16. 90 0
      src/main/java/cn/ezhizao/project/business/salary/domain/BizFinancialSalaryDetail.java
  17. 198 0
      src/main/java/cn/ezhizao/project/business/salary/domain/BizFinancialSalaryDetailEmployee.java
  18. 30 0
      src/main/java/cn/ezhizao/project/business/salary/mapper/BizFinancialSalaryDetailEmployeeMapper.java
  19. 30 0
      src/main/java/cn/ezhizao/project/business/salary/mapper/BizFinancialSalaryDetailMapper.java
  20. 30 0
      src/main/java/cn/ezhizao/project/business/salary/mapper/BizFinancialSalaryMapper.java
  21. 31 0
      src/main/java/cn/ezhizao/project/business/salary/service/IBizFinancialSalaryDetailEmployeeService.java
  22. 31 0
      src/main/java/cn/ezhizao/project/business/salary/service/IBizFinancialSalaryDetailService.java
  23. 31 0
      src/main/java/cn/ezhizao/project/business/salary/service/IBizFinancialSalaryService.java
  24. 44 0
      src/main/java/cn/ezhizao/project/business/salary/service/impl/BizFinancialSalaryDetailEmployeeServiceImpl.java
  25. 77 0
      src/main/java/cn/ezhizao/project/business/salary/service/impl/BizFinancialSalaryDetailServiceImpl.java
  26. 44 0
      src/main/java/cn/ezhizao/project/business/salary/service/impl/BizFinancialSalaryServiceImpl.java
  27. 3 1
      src/main/java/cn/ezhizao/project/system/controller/SysLoginController.java
  28. 4 4
      src/main/java/cn/ezhizao/project/system/service/impl/SysDictDataServiceImpl.java
  29. 10 1
      src/main/java/cn/ezhizao/project/tenant/controller/TenantController.java
  30. 1 0
      src/main/resources/mybatis/business/BizCompanyMapper.xml
  31. 13 8
      src/main/resources/mybatis/business/BizEntrustMapper.xml
  32. 88 0
      src/main/resources/mybatis/business/BizFinancialReceiveTicketDetailMapper.xml
  33. 117 0
      src/main/resources/mybatis/business/BizFinancialReceiveTicketFeedbackMapper.xml
  34. 135 0
      src/main/resources/mybatis/business/BizFinancialReceiveTicketMapper.xml
  35. 70 0
      src/main/resources/mybatis/business/BizFinancialSalaryDetailEmployeeMapper.xml
  36. 51 0
      src/main/resources/mybatis/business/BizFinancialSalaryDetailMapper.xml
  37. 74 0
      src/main/resources/mybatis/business/BizFinancialSalaryMapper.xml
  38. 102 101
      src/main/resources/mybatis/system/SysDictTypeMapper.xml

+ 129 - 8
src/main/java/cn/ezhizao/project/business/archiveTicket/controller/ArchiveTicketController.java

@@ -1,5 +1,9 @@
 package cn.ezhizao.project.business.archiveTicket.controller;
 
+import cn.ezhizao.common.utils.file.FileUploadUtils;
+import cn.ezhizao.common.utils.file.FileUtils;
+import cn.ezhizao.framework.config.RuoYiConfig;
+import cn.ezhizao.framework.config.ServerConfig;
 import cn.ezhizao.framework.web.controller.BaseController;
 import cn.ezhizao.framework.web.domain.AjaxResult;
 import cn.ezhizao.framework.web.page.TableDataInfo;
@@ -13,25 +17,32 @@ import cn.ezhizao.project.business.financialBase.domain.BizArchiveReceiveTicketF
 import cn.ezhizao.project.business.financialBase.service.IBizArchiveReceiveTicketFinishedService;
 import cn.ezhizao.project.business.keepAccounts.domain.BizFinancialKeepAccount;
 import cn.ezhizao.project.business.keepAccounts.service.IBizFinancialKeepAccountService;
+import cn.ezhizao.project.business.receiveTicket.service.IBizFinancialReceiveTicketDetailService;
+import cn.ezhizao.project.business.receiveTicket.service.IBizFinancialReceiveTicketService;
+import cn.ezhizao.project.business.salary.service.IBizFinancialSalaryDetailService;
 import cn.hutool.core.date.DateTime;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiModelProperty;
 import io.swagger.annotations.ApiOperation;
+import org.aspectj.weaver.loadtime.Aj;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
 
 import javax.annotation.Resource;
-import java.util.Comparator;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
+import java.sql.Timestamp;
+import java.text.SimpleDateFormat;
+import java.util.*;
 import java.util.stream.Collectors;
 
 @RestController
 @Api(tags = "收票 数据接口")
 @RequestMapping(value = "/business/archiveTicket")
 public class ArchiveTicketController extends BaseController {
+
+    @Resource
+    private ServerConfig serverConfig;
     @Resource
     IBizFinancialKeepAccountService financialKeepAccountService;
     @Resource
@@ -40,9 +51,13 @@ public class ArchiveTicketController extends BaseController {
     IBizEntrustService entrustService;
     @Resource
     IBizCompanyService companyService;
-
     @Resource
     IBizArchiveReceiveTicketFinishedService archiveReceiveTicketFinishedService;
+    @Resource
+    IBizFinancialReceiveTicketDetailService financialReceiveTicketDetailService;
+    @Resource
+    IBizFinancialSalaryDetailService financialSalaryDetailServicel;
+
 
     @ApiOperation(value = "带条件List 分页查询", notes = "带条件List 分页查询")
     @GetMapping("/list")
@@ -54,6 +69,7 @@ public class ArchiveTicketController extends BaseController {
         List<BizCompany> list = companyService.getList(conditions);
         return getDataTable(list);
     }
+
     @PostMapping("/save")
     @ApiOperation(value = "保存", notes = "保存")
     @Transactional(rollbackFor = Exception.class)
@@ -83,7 +99,7 @@ public class ArchiveTicketController extends BaseController {
             uploadTicketFinished.setIsFinished(archiveReceiveTicket.getIsFinished());
             archiveReceiveTicketFinishedService.saveOrUpdate(uploadTicketFinished);
         }
-        return archiveReceiveTicket.getFiles().isEmpty() ||  bizArchiveReceiveTicketService.saveOrUpdateBatch(archiveReceiveTicket.getFiles()) ? success(archiveReceiveTicket) : error();
+        return archiveReceiveTicket.getFiles().isEmpty() || bizArchiveReceiveTicketService.saveOrUpdateBatch(archiveReceiveTicket.getFiles()) ? success(archiveReceiveTicket) : error();
     }
 
     @ApiOperation(value = "带条件List 分页查询", notes = "带条件List 分页查询")
@@ -99,7 +115,7 @@ public class ArchiveTicketController extends BaseController {
         BizEntrust entrustConditions = new BizEntrust();
         entrustConditions.setCompanyId(conditions.getCompanyId());
         entrustConditions.setTaskTypeId(1L);
-        List<BizEntrust>entrusts = entrustService.getList(entrustConditions);
+        List<BizEntrust> entrusts = entrustService.getList(entrustConditions);
         entrusts.sort(Comparator.comparing(BizEntrust::getWorkMonth).reversed());
         List<Map<String, Object>> workMonths = entrusts.stream().map(v -> {
             Map<String, Object> month = new HashMap<>();
@@ -134,7 +150,9 @@ public class ArchiveTicketController extends BaseController {
         BizEntrust entrustConditions = new BizEntrust();
         entrustConditions.setCompanyId(conditions.getCompanyId());
         entrustConditions.setTaskTypeId(1L);
-        List<BizEntrust>entrusts = entrustService.getList(entrustConditions);
+        entrustConditions.setTicketFinished(0);
+        entrustConditions.setIsZero(0);
+        List<BizEntrust> entrusts = entrustService.getList(entrustConditions);
         entrusts.sort(Comparator.comparing(BizEntrust::getWorkMonth).reversed());
         List<Map<String, Object>> workMonths = entrusts.stream().map(v -> {
             Map<String, Object> month = new HashMap<>();
@@ -160,4 +178,107 @@ public class ArchiveTicketController extends BaseController {
 
         return success(archiveReceiveTicketFinishedService.getOne(wrapper));
     }
+
+    @ApiModelProperty("上传票据")
+    @PostMapping("/uploadFiles")
+    public AjaxResult uploadFiles(@RequestParam("file") MultipartFile file, @RequestParam Long companyId, @RequestParam String currentMonth, @RequestParam Long ticketTypeId) throws Exception {
+        if (companyId.equals(0L)) {
+            return AjaxResult.error("没有提供客户id");
+        }
+
+        if (ticketTypeId.equals(0L)) {
+            return AjaxResult.error("没有提供票据类型");
+        }
+
+        if (currentMonth.equals("")) {
+            return AjaxResult.error("没有提供账期年月");
+        }
+
+        String month = DateTime.of(currentMonth, "yyyy-MM-dd").toString("MM");
+        String year = DateTime.of(currentMonth, "yyyy-MM-dd").toString("yyyy");
+// 上传文件路径
+        String filePath = RuoYiConfig.getUploadPath();
+        // 上传并返回新文件名称
+        String fileName = FileUploadUtils.upload(filePath, file);
+        String extractName = FileUploadUtils.extractFilename(file);
+        String url = serverConfig.getUrl() + fileName;
+        BizArchiveReceiveTicket archiveReceiveTicket = new BizArchiveReceiveTicket();
+        archiveReceiveTicket.setTypeId(ticketTypeId);
+        archiveReceiveTicket.setCompanyId(companyId);
+        archiveReceiveTicket.setAccountSetsId(0L);
+        archiveReceiveTicket.setMonth(month);
+//            archiveReceiveTicket.setMonth(String.format("%02s", month));
+        archiveReceiveTicket.setYear(year);
+        // 2023-07-17 补上
+        archiveReceiveTicket.setFileUrl(fileName);
+        archiveReceiveTicket.setFileName(FileUtils.getName(fileName));
+
+        SimpleDateFormat fmtTime = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
+        String currentTime = fmtTime.format(new Date());
+        archiveReceiveTicket.setCreateTime(Timestamp.valueOf(currentTime));
+        return bizArchiveReceiveTicketService.save(archiveReceiveTicket) ? AjaxResult.success("上传成功") : AjaxResult.error("保存失败");
+
+    }
+
+    @PostMapping("/finishedReceiveTicket")
+    public AjaxResult finishedReceiveTicket(@RequestParam String currentMonth, @RequestParam Long companyId, @RequestParam Integer isFinished) {
+        // 判断是否可以关闭账期 该月是否已有工资和收票
+        if (currentMonth == null || currentMonth.equals("")) {
+            return AjaxResult.error("没有提供账期年月");
+        }
+
+        if (companyId == null || companyId.equals(0L)) {
+            return AjaxResult.error("没有选择客户");
+        }
+
+        if (isFinished == null) {
+            return AjaxResult.error("没有提供是否关闭账期的状态");
+        }
+
+        String month = DateTime.of(currentMonth, "yyyy-MM-dd").toString("MM");
+        String year = DateTime.of(currentMonth, "yyyy-MM-dd").toString("yyyy");
+
+        if (isFinished.equals(1)) {
+            if (financialReceiveTicketDetailService.query().eq("company_id", companyId).eq("year", year).eq("month", month).count() <= 0) {
+                return AjaxResult.error("该账期未收票");
+            }
+
+            if (financialSalaryDetailServicel.query().eq("company_id", companyId).eq("year", year).eq("month", month).count() <= 0) {
+                return AjaxResult.error("该账期未录工资");
+            }
+        }
+
+        QueryWrapper<BizArchiveReceiveTicketFinished> queryWrapper = new QueryWrapper<>();
+        queryWrapper.eq("deleted", 0);
+        queryWrapper.eq("year", year);
+        queryWrapper.eq("month", month);
+        queryWrapper.eq("company_id", companyId);
+        List<BizArchiveReceiveTicketFinished> uploadTicketFinished = archiveReceiveTicketFinishedService.list(queryWrapper);
+        if (uploadTicketFinished == null || uploadTicketFinished.size() == 0) {
+            // 此时没有,那么就闯进啊
+            BizArchiveReceiveTicketFinished insert = new BizArchiveReceiveTicketFinished();
+            insert.setYear(year);
+            insert.setMonth(month);
+            insert.setCompanyId(companyId);
+            insert.setIsFinished(isFinished);
+            if (!archiveReceiveTicketFinishedService.save(insert)) {
+                return AjaxResult.error("创建账期失败");
+            } else {
+                return AjaxResult.success();
+            }
+
+        } else if (uploadTicketFinished.size() == 1) {
+            //
+
+            BizArchiveReceiveTicketFinished current = uploadTicketFinished.get(0);
+            current.setIsFinished(isFinished);
+            if (!archiveReceiveTicketFinishedService.saveOrUpdate(current)) {
+                return AjaxResult.error("更新账期失败!");
+            } else {
+                return AjaxResult.success();
+            }
+        } else {
+            return AjaxResult.error("找到了多条账期信息!");
+        }
+    }
 }

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

@@ -69,4 +69,9 @@ public class BizEntrust extends BaseEntity
     @ApiModelProperty(value = "停止委托")
     private Integer isStop;
 
+    @TableField(exist = false)
+    private Integer ticketFinished;
+    @TableField(exist = false)
+    private Integer isZero;
+
 }

+ 125 - 0
src/main/java/cn/ezhizao/project/business/receiveTicket/domain/BizFinancialReceiveTicket.java

@@ -0,0 +1,125 @@
+package cn.ezhizao.project.business.receiveTicket.domain;
+
+import cn.ezhizao.framework.aspectj.lang.annotation.Excel;
+import cn.ezhizao.framework.web.domain.BaseEntity;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableName;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * 收票任务对象 biz_financial_receive_ticket
+ *
+ * @author ruoyi
+ * @date 2023-11-17
+ */
+@Data
+@TableName(value = "biz_financial_receive_ticket")
+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 */
+    @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;
+
+    @TableField(exist = false)
+    private String keyword;
+
+    /** 列表显示新增 */
+    @TableField(exist = false)
+    private String companyName;
+    @TableField(exist = false)
+    private String fromCompanyName;
+    @TableField(exist = false)
+    private String taxType;
+
+    /** 查询条件新增 */
+    @TableField(exist = false)
+    private String year;
+    @TableField(exist = false)
+    private String month;
+    @TableField(exist = false)
+    private Integer status;
+
+    @TableField(exist = false)
+    private List<BizFinancialReceiveTicketDetail> details;
+    @TableField(exist = false)
+    private Integer isZero;
+
+    //收入票
+    @TableField(exist = false)
+    private Integer hasIncomeTicket;
+
+    //成本票
+    @TableField(exist = false)
+    private Integer hasCostTicket;
+
+    //费用票
+    @TableField(exist = false)
+    private Integer feeTicket;
+
+    //社保公积金
+    @TableField(exist = false)
+    private Integer hasSsafTicket;
+
+    //工资表
+    @TableField(exist = false)
+    private Integer payroll;
+
+    //银行回单
+    @TableField(exist = false)
+    private Integer bankSlips;
+
+    //银行对账单
+    @TableField(exist = false)
+    private Integer bankCopy;
+
+    //其他
+    @TableField(exist = false)
+    private Integer others;
+
+    //总数
+    @TableField(exist = false)
+    private Integer sumNumber;
+
+    //送达方式
+    @TableField(exist = false)
+    private Integer saveStatus;
+
+    //是否为自己负责(当前登陆人Id)
+    @TableField(exist = false)
+    private Long principal;
+
+    //执行人
+    @TableField(exist = false)
+    private String serviceName;
+
+}

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

@@ -0,0 +1,221 @@
+package cn.ezhizao.project.business.receiveTicket.domain;
+
+import cn.ezhizao.framework.aspectj.lang.annotation.Excel;
+import cn.ezhizao.framework.web.domain.BaseEntity;
+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 lombok.EqualsAndHashCode;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+ * 收票详情对象 biz_financial_receive_ticket_detail
+ *
+ * @author ruoyi
+ * @date 2023-11-17
+ */
+@Data
+@TableName(value = "biz_financial_receive_ticket_detail")
+@EqualsAndHashCode(callSuper = true)
+public class BizFinancialReceiveTicketDetail extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 外键 */
+    @ApiModelProperty(value = "${comment}")
+    private Long financialReceiveTicketId;
+
+    /** 收票客户外键 */
+    @ApiModelProperty(value = "${comment}")
+    private Long companyId;
+
+    /** 年 */
+    @Excel(name = "年")
+    @ApiModelProperty(value = "年")
+    private String year;
+
+    /** 月 */
+    @Excel(name = "月")
+    @ApiModelProperty(value = "月")
+    private String month;
+
+    /** 进项发票联 */
+    @Excel(name = "进项发票联")
+    @ApiModelProperty(value = "进项发票联")
+    private Integer inputInvoice;
+
+    /** 进项抵扣联 */
+    @Excel(name = "进项抵扣联")
+    @ApiModelProperty(value = "进项抵扣联")
+    private Integer inputDeduction;
+
+    /** 收入记账联 */
+    @Excel(name = "收入记账联")
+    @ApiModelProperty(value = "收入记账联")
+    private Integer revenueBookkeeping;
+
+    /** 有无收入票 */
+    @Excel(name = "有无收入票")
+    @ApiModelProperty(value = "有无收入票")
+    private Integer hasIncomeTicket;
+
+    /** 有无成本票 */
+    @Excel(name = "有无成本票")
+    @ApiModelProperty(value = "有无成本票")
+    private Integer hasCostTicket;
+
+    /** 银行对账单 0无1有 */
+    @Excel(name = "银行对账单 0无1有")
+    @ApiModelProperty(value = "银行对账单 0无1有")
+    private Integer bankCopy;
+
+    /** 其他 0无1有 */
+    @Excel(name = "其他 0无1有")
+    @ApiModelProperty(value = "其他 0无1有")
+    private Integer others;
+
+    /** 有无社保公积金票 */
+    @Excel(name = "有无社保公积金票")
+    @ApiModelProperty(value = "有无社保公积金票")
+    private Integer hasSsafTicket;
+
+    /** 银行回单 0无1有 */
+    @Excel(name = "银行回单 0无1有")
+    @ApiModelProperty(value = "银行回单 0无1有")
+    private Integer bankSlips;
+
+    /** 工资表 0无1有 */
+    @Excel(name = "工资表 0无1有")
+    @ApiModelProperty(value = "工资表 0无1有")
+    private Integer payroll;
+
+    /** 费用票 0无1有 */
+    @Excel(name = "费用票 0无1有")
+    @ApiModelProperty(value = "费用票 0无1有")
+    private Integer feeTicket;
+
+    /** 收票时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "收票时间", width = 30, dateFormat = "yyyy-MM-dd")
+    @ApiModelProperty(value = "收票时间")
+    private Date receiveDate;
+
+    /** 保存状态 1待确认 2无票据 3交接送达 4 交接邮寄 */
+    @Excel(name = "保存状态 1待确认 2无票据 3交接送达 4 交接邮寄")
+    @ApiModelProperty(value = "保存状态 1待确认 2无票据 3交接送达 4 交接邮寄")
+    private Integer saveStatus;
+
+    /** 邮寄日期 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "邮寄日期", width = 30, dateFormat = "yyyy-MM-dd")
+    @ApiModelProperty(value = "邮寄日期")
+    private Date postDate;
+
+    /** 快递单号 */
+    @Excel(name = "快递单号")
+    @ApiModelProperty(value = "快递单号")
+    private String postNo;
+
+    /** 状态 */
+    @Excel(name = "状态")
+    @ApiModelProperty(value = "状态")
+    private Integer status;
+
+    /** 详情 */
+    @Excel(name = "详情")
+    @ApiModelProperty(value = "详情")
+    private String content;
+
+    /** 审核详情 */
+    @Excel(name = "审核详情")
+    @ApiModelProperty(value = "审核详情")
+    private String verifyContent;
+
+    /** 收入票数量 */
+    @Excel(name = "收入票数量")
+    @ApiModelProperty(value = "收入票数量")
+    private Integer incomeTicket;
+
+    /** 成本票数量 */
+    @Excel(name = "成本票数量")
+    @ApiModelProperty(value = "成本票数量")
+    private Integer costTicket;
+
+    /** 费用票数量 */
+    @Excel(name = "费用票数量")
+    @ApiModelProperty(value = "费用票数量")
+    private Integer feeTicketNumber;
+
+    /** 社保公积金(social security accumulation fund)票数量 */
+    @Excel(name = "社保公积金(social security accumulation fund)票数量")
+    @ApiModelProperty(value = "社保公积金(social security accumulation fund)票数量")
+    private Integer ssafTicket;
+
+    /** 工资单数量 */
+    @Excel(name = "工资单数量")
+    @ApiModelProperty(value = "工资单数量")
+    private Integer salaryTicket;
+
+    /** 银行回单数量 */
+    @Excel(name = "银行回单数量")
+    @ApiModelProperty(value = "银行回单数量")
+    private Integer bankSlipsNumber;
+
+    /** 银行对账单数量 */
+    @Excel(name = "银行对账单数量")
+    @ApiModelProperty(value = "银行对账单数量")
+    private Integer bankCopyNumber;
+
+    /** 其他票数量 */
+    @Excel(name = "其他票数量")
+    @ApiModelProperty(value = "其他票数量")
+    private Integer otherTicket;
+
+    /** 总数 */
+    @Excel(name = "总数")
+    @ApiModelProperty(value = "总数")
+    private Integer sumNumber;
+
+    /** 缺票状态 */
+    @Excel(name = "缺票状态")
+    @ApiModelProperty(value = "缺票状态")
+    private Integer lackTicket;
+
+    /** 审核人 */
+    @ApiModelProperty(value = "审核人")
+    private Long verifierId;
+
+    @TableField(exist = false)
+    private String companyName;
+
+    @TableField(exist = false)
+    private String currentMonth;
+
+    @TableField(exist = false)
+    private List<Long> mainIds;
+
+    public Integer getFeedbackStatus() {
+        return feedbackStatus;
+    }
+
+    public void setFeedbackStatus(Integer feedbackStatus) {
+        this.feedbackStatus = feedbackStatus;
+    }
+
+    public String getFeedbackContent() {
+        return feedbackContent;
+    }
+
+    public void setFeedbackContent(String feedbackContent) {
+        this.feedbackContent = feedbackContent;
+    }
+
+    @ApiModelProperty("反馈结果")
+    private Integer feedbackStatus;
+    @ApiModelProperty("反馈内容")
+    private String feedbackContent;
+}

+ 86 - 0
src/main/java/cn/ezhizao/project/business/receiveTicket/domain/BizFinancialReceiveTicketFeedback.java

@@ -0,0 +1,86 @@
+package cn.ezhizao.project.business.receiveTicket.domain;
+
+import cn.ezhizao.framework.aspectj.lang.annotation.Excel;
+import cn.ezhizao.framework.web.domain.BaseEntity;
+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 lombok.experimental.Accessors;
+
+import java.util.Date;
+
+/**
+ * 收票反馈对象 biz_financial_receive_ticket_feedback
+ *
+ * @author ruoyi
+ * @date 2023-11-17
+ */
+@Data
+@TableName(value = "biz_financial_receive_ticket_feedback")
+@Accessors(chain = true)
+public class BizFinancialReceiveTicketFeedback extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 收票外键 */
+    @ApiModelProperty(value = "${comment}")
+    private Long financialReceiveTicketId;
+
+    /** 公司外键 */
+    @ApiModelProperty(value = "${comment}")
+    private Long companyId;
+
+    /** 收票详情外键 */
+    @ApiModelProperty(value = "${comment}")
+    private Long financialReceiveTicketDetailId;
+
+    /** 回复时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "回复时间", width = 30, dateFormat = "yyyy-MM-dd")
+    @ApiModelProperty(value = "回复时间")
+    private Date feedbackTime;
+
+    /** $column.columnComment */
+    @ApiModelProperty(value = "回复时间")
+    private Long tenantId;
+
+    /** 回复详情 */
+    @Excel(name = "回复详情")
+    @ApiModelProperty(value = "回复详情")
+    private String feedbackContent;
+
+    /** 是否同步信息 */
+    @Excel(name = "是否同步信息")
+    @ApiModelProperty(value = "是否同步信息")
+    private Integer needSync;
+
+    /** 状态 */
+    @Excel(name = "状态")
+    @ApiModelProperty(value = "状态")
+    private Integer status;
+
+    @TableField(exist = false)
+    private String currentMonth;
+
+    @TableField(exist = false)
+    private String taxType;
+    @TableField(exist = false)
+    private String companyName;
+    @TableField(exist = false)
+    private String fromCompanyName;
+
+    @TableField(exist = false)
+    private String year;
+    @TableField(exist = false)
+    private String month;
+
+    //是否为自己负责(当前登陆人Id)
+    @TableField(exist = false)
+    private Long principal;
+
+    //执行人
+    @TableField(exist = false)
+    private String serviceName;
+}

+ 30 - 0
src/main/java/cn/ezhizao/project/business/receiveTicket/mapper/BizFinancialReceiveTicketDetailMapper.java

@@ -0,0 +1,30 @@
+package cn.ezhizao.project.business.receiveTicket.mapper;
+
+import cn.ezhizao.project.business.receiveTicket.domain.BizFinancialReceiveTicketDetail;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+import java.util.List;
+
+/**
+ * 收票详情Mapper接口
+ *
+ * @author ruoyi
+ * @date 2023-11-17
+ */
+public interface BizFinancialReceiveTicketDetailMapper extends BaseMapper<BizFinancialReceiveTicketDetail>
+{
+    /**
+     * 查询收票详情列表
+     *
+     * @param bizFinancialReceiveTicketDetail 收票详情
+     * @return 收票详情集合
+     */
+    public List<BizFinancialReceiveTicketDetail> getList(BizFinancialReceiveTicketDetail bizFinancialReceiveTicketDetail);
+
+    /**
+     * 物理删除
+     * @param bizFinancialReceiveTicketDetail
+     * @return 删除结果
+    */
+    public int physicalDelete(BizFinancialReceiveTicketDetail bizFinancialReceiveTicketDetail);
+}

+ 30 - 0
src/main/java/cn/ezhizao/project/business/receiveTicket/mapper/BizFinancialReceiveTicketFeedbackMapper.java

@@ -0,0 +1,30 @@
+package cn.ezhizao.project.business.receiveTicket.mapper;
+
+import cn.ezhizao.project.business.receiveTicket.domain.BizFinancialReceiveTicketFeedback;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+import java.util.List;
+
+/**
+ * 收票反馈Mapper接口
+ *
+ * @author ruoyi
+ * @date 2023-11-17
+ */
+public interface BizFinancialReceiveTicketFeedbackMapper extends BaseMapper<BizFinancialReceiveTicketFeedback>
+{
+    /**
+     * 查询收票反馈列表
+     *
+     * @param bizFinancialReceiveTicketFeedback 收票反馈
+     * @return 收票反馈集合
+     */
+    public List<BizFinancialReceiveTicketFeedback> getList(BizFinancialReceiveTicketFeedback bizFinancialReceiveTicketFeedback);
+
+    /**
+     * 物理删除
+     * @param bizFinancialReceiveTicketFeedback
+     * @return 删除结果
+    */
+    public int physicalDelete(BizFinancialReceiveTicketFeedback bizFinancialReceiveTicketFeedback);
+}

+ 30 - 0
src/main/java/cn/ezhizao/project/business/receiveTicket/mapper/BizFinancialReceiveTicketMapper.java

@@ -0,0 +1,30 @@
+package cn.ezhizao.project.business.receiveTicket.mapper;
+
+import cn.ezhizao.project.business.receiveTicket.domain.BizFinancialReceiveTicket;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+import java.util.List;
+
+/**
+ * 收票任务Mapper接口
+ *
+ * @author ruoyi
+ * @date 2023-11-17
+ */
+public interface BizFinancialReceiveTicketMapper extends BaseMapper<BizFinancialReceiveTicket>
+{
+    /**
+     * 查询收票任务列表
+     *
+     * @param bizFinancialReceiveTicket 收票任务
+     * @return 收票任务集合
+     */
+    public List<BizFinancialReceiveTicket> getList(BizFinancialReceiveTicket bizFinancialReceiveTicket);
+
+    /**
+     * 物理删除
+     * @param bizFinancialReceiveTicket
+     * @return 删除结果
+    */
+    public int physicalDelete(BizFinancialReceiveTicket bizFinancialReceiveTicket);
+}

+ 31 - 0
src/main/java/cn/ezhizao/project/business/receiveTicket/service/IBizFinancialReceiveTicketDetailService.java

@@ -0,0 +1,31 @@
+package cn.ezhizao.project.business.receiveTicket.service;
+
+import cn.ezhizao.project.business.receiveTicket.domain.BizFinancialReceiveTicketDetail;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+import java.util.List;
+
+/**
+ * 收票详情Service接口
+ *
+ * @author ruoyi
+ * @date 2023-11-17
+ */
+public interface IBizFinancialReceiveTicketDetailService extends IService<BizFinancialReceiveTicketDetail>
+{
+    /**
+     * 查询收票详情列表
+     *
+     * @param bizFinancialReceiveTicketDetail 收票详情
+     * @return 收票详情集合
+     */
+    public List<BizFinancialReceiveTicketDetail> getList(BizFinancialReceiveTicketDetail bizFinancialReceiveTicketDetail);
+
+    /**
+     * 物理删除
+     * @param bizFinancialReceiveTicketDetail
+     * @return 删除结果
+     */
+    public int physicalDelete(BizFinancialReceiveTicketDetail bizFinancialReceiveTicketDetail);
+
+}

+ 31 - 0
src/main/java/cn/ezhizao/project/business/receiveTicket/service/IBizFinancialReceiveTicketFeedbackService.java

@@ -0,0 +1,31 @@
+package cn.ezhizao.project.business.receiveTicket.service;
+
+import cn.ezhizao.project.business.receiveTicket.domain.BizFinancialReceiveTicketFeedback;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+import java.util.List;
+
+/**
+ * 收票反馈Service接口
+ *
+ * @author ruoyi
+ * @date 2023-11-17
+ */
+public interface IBizFinancialReceiveTicketFeedbackService extends IService<BizFinancialReceiveTicketFeedback>
+{
+    /**
+     * 查询收票反馈列表
+     *
+     * @param bizFinancialReceiveTicketFeedback 收票反馈
+     * @return 收票反馈集合
+     */
+    public List<BizFinancialReceiveTicketFeedback> getList(BizFinancialReceiveTicketFeedback bizFinancialReceiveTicketFeedback);
+
+    /**
+     * 物理删除
+     * @param bizFinancialReceiveTicketFeedback
+     * @return 删除结果
+     */
+    public int physicalDelete(BizFinancialReceiveTicketFeedback bizFinancialReceiveTicketFeedback);
+
+}

+ 31 - 0
src/main/java/cn/ezhizao/project/business/receiveTicket/service/IBizFinancialReceiveTicketService.java

@@ -0,0 +1,31 @@
+package cn.ezhizao.project.business.receiveTicket.service;
+
+import cn.ezhizao.project.business.receiveTicket.domain.BizFinancialReceiveTicket;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+import java.util.List;
+
+/**
+ * 收票任务Service接口
+ *
+ * @author ruoyi
+ * @date 2023-11-17
+ */
+public interface IBizFinancialReceiveTicketService extends IService<BizFinancialReceiveTicket>
+{
+    /**
+     * 查询收票任务列表
+     *
+     * @param bizFinancialReceiveTicket 收票任务
+     * @return 收票任务集合
+     */
+    public List<BizFinancialReceiveTicket> getList(BizFinancialReceiveTicket bizFinancialReceiveTicket);
+
+    /**
+     * 物理删除
+     * @param bizFinancialReceiveTicket
+     * @return 删除结果
+     */
+    public int physicalDelete(BizFinancialReceiveTicket bizFinancialReceiveTicket);
+
+}

+ 44 - 0
src/main/java/cn/ezhizao/project/business/receiveTicket/service/impl/BizFinancialReceiveTicketDetailServiceImpl.java

@@ -0,0 +1,44 @@
+package cn.ezhizao.project.business.receiveTicket.service.impl;
+
+import cn.ezhizao.project.business.receiveTicket.domain.BizFinancialReceiveTicketDetail;
+import cn.ezhizao.project.business.receiveTicket.mapper.BizFinancialReceiveTicketDetailMapper;
+import cn.ezhizao.project.business.receiveTicket.service.IBizFinancialReceiveTicketDetailService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.List;
+
+/**
+ * 收票详情Service业务层处理
+ *
+ * @author ruoyi
+ * @date 2023-11-17
+ */
+@Service
+public class BizFinancialReceiveTicketDetailServiceImpl  extends ServiceImpl<BizFinancialReceiveTicketDetailMapper, BizFinancialReceiveTicketDetail> implements IBizFinancialReceiveTicketDetailService
+{
+    @Resource
+    private BizFinancialReceiveTicketDetailMapper bizFinancialReceiveTicketDetailMapper;
+
+    /**
+     * 查询收票详情列表
+     *
+     * @param bizFinancialReceiveTicketDetail 收票详情
+     * @return 收票详情
+     */
+    @Override
+    public List<BizFinancialReceiveTicketDetail> getList(BizFinancialReceiveTicketDetail bizFinancialReceiveTicketDetail)
+    {
+        return bizFinancialReceiveTicketDetailMapper.getList(bizFinancialReceiveTicketDetail);
+    }
+
+    /**
+     * 物理删除
+     * @param bizFinancialReceiveTicketDetail
+     * @return 删除结果
+     */
+    @Override
+    public int physicalDelete(BizFinancialReceiveTicketDetail bizFinancialReceiveTicketDetail){ return bizFinancialReceiveTicketDetailMapper.physicalDelete(bizFinancialReceiveTicketDetail); };
+
+}

+ 44 - 0
src/main/java/cn/ezhizao/project/business/receiveTicket/service/impl/BizFinancialReceiveTicketFeedbackServiceImpl.java

@@ -0,0 +1,44 @@
+package cn.ezhizao.project.business.receiveTicket.service.impl;
+
+import cn.ezhizao.project.business.receiveTicket.domain.BizFinancialReceiveTicketFeedback;
+import cn.ezhizao.project.business.receiveTicket.mapper.BizFinancialReceiveTicketFeedbackMapper;
+import cn.ezhizao.project.business.receiveTicket.service.IBizFinancialReceiveTicketFeedbackService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.List;
+
+/**
+ * 收票反馈Service业务层处理
+ *
+ * @author ruoyi
+ * @date 2023-11-17
+ */
+@Service
+public class BizFinancialReceiveTicketFeedbackServiceImpl  extends ServiceImpl<BizFinancialReceiveTicketFeedbackMapper, BizFinancialReceiveTicketFeedback> implements IBizFinancialReceiveTicketFeedbackService
+{
+    @Resource
+    private BizFinancialReceiveTicketFeedbackMapper bizFinancialReceiveTicketFeedbackMapper;
+
+    /**
+     * 查询收票反馈列表
+     *
+     * @param bizFinancialReceiveTicketFeedback 收票反馈
+     * @return 收票反馈
+     */
+    @Override
+    public List<BizFinancialReceiveTicketFeedback> getList(BizFinancialReceiveTicketFeedback bizFinancialReceiveTicketFeedback)
+    {
+        return bizFinancialReceiveTicketFeedbackMapper.getList(bizFinancialReceiveTicketFeedback);
+    }
+
+    /**
+     * 物理删除
+     * @param bizFinancialReceiveTicketFeedback
+     * @return 删除结果
+     */
+    @Override
+    public int physicalDelete(BizFinancialReceiveTicketFeedback bizFinancialReceiveTicketFeedback){ return bizFinancialReceiveTicketFeedbackMapper.physicalDelete(bizFinancialReceiveTicketFeedback); };
+
+}

+ 44 - 0
src/main/java/cn/ezhizao/project/business/receiveTicket/service/impl/BizFinancialReceiveTicketServiceImpl.java

@@ -0,0 +1,44 @@
+package cn.ezhizao.project.business.receiveTicket.service.impl;
+
+import cn.ezhizao.project.business.receiveTicket.domain.BizFinancialReceiveTicket;
+import cn.ezhizao.project.business.receiveTicket.mapper.BizFinancialReceiveTicketMapper;
+import cn.ezhizao.project.business.receiveTicket.service.IBizFinancialReceiveTicketService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.List;
+
+/**
+ * 收票任务Service业务层处理
+ *
+ * @author ruoyi
+ * @date 2023-11-17
+ */
+@Service
+public class BizFinancialReceiveTicketServiceImpl  extends ServiceImpl<BizFinancialReceiveTicketMapper, BizFinancialReceiveTicket> implements IBizFinancialReceiveTicketService
+{
+    @Resource
+    private BizFinancialReceiveTicketMapper bizFinancialReceiveTicketMapper;
+
+    /**
+     * 查询收票任务列表
+     *
+     * @param bizFinancialReceiveTicket 收票任务
+     * @return 收票任务
+     */
+    @Override
+    public List<BizFinancialReceiveTicket> getList(BizFinancialReceiveTicket bizFinancialReceiveTicket)
+    {
+        return bizFinancialReceiveTicketMapper.getList(bizFinancialReceiveTicket);
+    }
+
+    /**
+     * 物理删除
+     * @param bizFinancialReceiveTicket
+     * @return 删除结果
+     */
+    @Override
+    public int physicalDelete(BizFinancialReceiveTicket bizFinancialReceiveTicket){ return bizFinancialReceiveTicketMapper.physicalDelete(bizFinancialReceiveTicket); };
+
+}

+ 87 - 0
src/main/java/cn/ezhizao/project/business/salary/domain/BizFinancialSalary.java

@@ -0,0 +1,87 @@
+package cn.ezhizao.project.business.salary.domain;
+
+import cn.ezhizao.framework.aspectj.lang.annotation.Excel;
+import cn.ezhizao.framework.web.domain.BaseEntity;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableName;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * 工资对象 biz_financial_salary
+ *
+ * @author ruoyi
+ * @date 2023-11-16
+ */
+@Data
+@TableName(value = "biz_financial_salary")
+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 */
+    @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;
+
+    /** 列表显示新增 */
+    @TableField(exist = false)
+    private String companyName;
+    @TableField(exist = false)
+    private String fromCompanyName;
+    @TableField(exist = false)
+    private String taxType;
+
+    @TableField(exist = false)
+    private List<BizFinancialSalaryDetail> details;
+
+    /** 查询条件新增 */
+    @TableField(exist = false)
+    private String year;
+
+    @TableField(exist = false)
+    private String month;
+
+    @TableField(exist = false)
+    private Integer status;
+
+    @TableField(exist = false)
+    private Integer hasIndividualIncomeTax;
+
+    @TableField(exist = false)
+    private Integer isZero;
+
+    //是否为自己负责(当前登陆人Id)
+    @TableField(exist = false)
+    private Long principal;
+
+    //执行人
+    @TableField(exist = false)
+    private String serviceName;
+}

+ 90 - 0
src/main/java/cn/ezhizao/project/business/salary/domain/BizFinancialSalaryDetail.java

@@ -0,0 +1,90 @@
+package cn.ezhizao.project.business.salary.domain;
+
+import cn.ezhizao.framework.aspectj.lang.annotation.Excel;
+import cn.ezhizao.framework.web.domain.BaseEntity;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableName;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.util.List;
+
+/**
+ * 工资报工信息对象 biz_financial_salary_detail
+ *
+ * @author ruoyi
+ * @date 2023-11-16
+ */
+@Data
+@TableName(value = "biz_financial_salary_detail")
+public class BizFinancialSalaryDetail extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 工资外键 */
+    @ApiModelProperty(value = "${comment}")
+    private Long financialSalaryId;
+
+    /** 客户外键 */
+    @ApiModelProperty(value = "${comment}")
+    private Long companyId;
+
+    @TableField(exist = false)
+    private String companyName;
+    @TableField(exist = false)
+    private String taxType;
+
+    /** 年 */
+    @Excel(name = "年")
+    @ApiModelProperty(value = "年")
+    private String year;
+
+    /** 月 */
+    @Excel(name = "月")
+    @ApiModelProperty(value = "月")
+    private String month;
+
+    /** 状态 */
+    @Excel(name = "状态")
+    @ApiModelProperty(value = "状态")
+    private Integer status;
+
+    /** 详情 */
+    @Excel(name = "详情")
+    @ApiModelProperty(value = "详情")
+    private String content;
+
+    /** 审核详情 */
+    @Excel(name = "审核详情")
+    @ApiModelProperty(value = "审核详情")
+    private String verifyContent;
+
+    /** 反馈信息 */
+    @Excel(name = "反馈信息")
+    @ApiModelProperty(value = "反馈信息")
+    private String feedbackContent;
+
+    /** 是否有税款 */
+    @Excel(name = "是否有税款")
+    @ApiModelProperty(value = "是否有税款")
+    private Integer hasIndividualIncomeTax;
+
+    /** 审核人 */
+    @ApiModelProperty(value = "是否有税款")
+    private Long verifierId;
+
+    /** 人员数量 */
+    @Excel(name = "人员数量")
+    @ApiModelProperty(value = "人员数量")
+    private Long number;
+
+    /** 总工资 */
+    @Excel(name = "总工资")
+    @ApiModelProperty(value = "总工资")
+    private BigDecimal amount;
+
+    @TableField(exist = false)
+    private List<BizFinancialSalaryDetailEmployee> details;
+
+}

+ 198 - 0
src/main/java/cn/ezhizao/project/business/salary/domain/BizFinancialSalaryDetailEmployee.java

@@ -0,0 +1,198 @@
+package cn.ezhizao.project.business.salary.domain;
+
+import cn.ezhizao.framework.aspectj.lang.annotation.Excel;
+import cn.ezhizao.framework.web.domain.BaseEntity;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableName;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.util.List;
+
+/**
+ * 工资人员信息对象 biz_financial_salary_detail_employee
+ *
+ * @author ruoyi
+ * @date 2023-11-16
+ */
+@Data
+@TableName(value = "biz_financial_salary_detail_employee")
+public class BizFinancialSalaryDetailEmployee extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 工资任务外键 */
+    @ApiModelProperty(value = "${comment}")
+    private Long financialSalaryId;
+
+    /** 月工资单外键 */
+    @ApiModelProperty(value = "${comment}")
+    private Long financialSalaryDetailId;
+
+
+    /** 月工资单外键 */
+    @ApiModelProperty(value = "${comment}")
+    @TableField(exist = false)
+    private List<Long> financialSalaryDetailIds;
+
+    /** 员工姓名 */
+    @Excel(name = "员工姓名")
+    @ApiModelProperty(value = "员工姓名")
+    private String employeeName;
+
+    /** 部门名称 */
+    @Excel(name = "部门名称")
+    @ApiModelProperty(value = "部门名称")
+    private String departmentName;
+
+    /** 身份证号 */
+    @Excel(name = "身份证号")
+    @ApiModelProperty(value = "身份证号")
+    private String idCode;
+
+    /** 工资 */
+    @Excel(name = "工资")
+    @ApiModelProperty(value = "工资")
+    private BigDecimal salaryAmount;
+
+    /** 奖金 */
+    @Excel(name = "奖金")
+    @ApiModelProperty(value = "奖金")
+    private BigDecimal bonusAmount;
+
+    /** 津贴 */
+    @Excel(name = "津贴")
+    @ApiModelProperty(value = "津贴")
+    private BigDecimal allowanceAmount;
+
+    /** 补贴 */
+    @Excel(name = "补贴")
+    @ApiModelProperty(value = "补贴")
+    private BigDecimal subsidyAmount;
+
+    /** 缺勤扣款 */
+    @Excel(name = "缺勤扣款")
+    @ApiModelProperty(value = "缺勤扣款")
+    private BigDecimal absenceCut;
+
+    /** 应发工资 */
+    @Excel(name = "应发工资")
+    @ApiModelProperty(value = "应发工资")
+    private BigDecimal planSalary;
+
+    /** 实发工资 */
+    @Excel(name = "实发工资")
+    @ApiModelProperty(value = "实发工资")
+    private BigDecimal actuallySalary;
+
+    /** 养老保险 */
+    @Excel(name = "养老保险")
+    @ApiModelProperty(value = "养老保险")
+    private BigDecimal endowmentInsurance;
+
+    /** 医疗保险 */
+    @Excel(name = "医疗保险")
+    @ApiModelProperty(value = "医疗保险")
+    private BigDecimal medicalInsurance;
+
+    /** 失业险 */
+    @Excel(name = "失业险")
+    @ApiModelProperty(value = "失业险")
+    private BigDecimal unemploymentBenefit;
+
+    /** 大病险 */
+    @Excel(name = "大病险")
+    @ApiModelProperty(value = "大病险")
+    private BigDecimal seriousIllnessInsurance;
+
+    /** 住房公积金 */
+    @Excel(name = "住房公积金")
+    @ApiModelProperty(value = "住房公积金")
+    private BigDecimal housingFund;
+
+    /** 其他扣款 */
+    @Excel(name = "其他扣款")
+    @ApiModelProperty(value = "其他扣款")
+    private BigDecimal otherCut;
+
+    /** 累计收入 */
+    @Excel(name = "累计收入")
+    @ApiModelProperty(value = "累计收入")
+    private BigDecimal cumulativeIncome;
+
+    /** 累计专项扣除 */
+    @Excel(name = "累计专项扣除")
+    @ApiModelProperty(value = "累计专项扣除")
+    private BigDecimal cumulativeSpecialCut;
+
+    /** 累计子女教育扣除 */
+    @Excel(name = "累计子女教育扣除")
+    @ApiModelProperty(value = "累计子女教育扣除")
+    private BigDecimal cumulativeChildEduCut;
+
+    /** 累计住房贷款利息扣除 */
+    @Excel(name = "累计住房贷款利息扣除")
+    @ApiModelProperty(value = "累计住房贷款利息扣除")
+    private BigDecimal cumulativeHouseLoanInterestCut;
+
+    /** 累计住房租金扣除 */
+    @Excel(name = "累计住房租金扣除")
+    @ApiModelProperty(value = "累计住房租金扣除")
+    private BigDecimal cumulativeHouseRentCut;
+
+    /** 累计赡养老人扣除 */
+    @Excel(name = "累计赡养老人扣除")
+    @ApiModelProperty(value = "累计赡养老人扣除")
+    private BigDecimal cumulativeSupportElderCut;
+
+    /** 累计继续教育扣除 */
+    @Excel(name = "累计继续教育扣除")
+    @ApiModelProperty(value = "累计继续教育扣除")
+    private BigDecimal cumulativeContinuingEduCut;
+
+    /** 累计婴幼儿照料扣除 */
+    @Excel(name = "累计婴幼儿照料扣除")
+    @ApiModelProperty(value = "累计婴幼儿照料扣除")
+    private BigDecimal cumulativeBabyCareCut;
+
+    /** 累计专项扣除合计 */
+    @Excel(name = "累计专项扣除合计")
+    @ApiModelProperty(value = "累计专项扣除合计")
+    private BigDecimal sumSpecialCumulativeCut;
+
+    /** 累计其他扣除 */
+    @Excel(name = "累计其他扣除")
+    @ApiModelProperty(value = "累计其他扣除")
+    private BigDecimal cumulativeOtherCut;
+
+    /** 累计应缴个税 */
+    @Excel(name = "累计应缴个税")
+    @ApiModelProperty(value = "累计应缴个税")
+    private BigDecimal cumulativeIndividualIncomeTax;
+
+    /** 累计已缴纳个税 */
+    @Excel(name = "累计已缴纳个税")
+    @ApiModelProperty(value = "累计已缴纳个税")
+    private BigDecimal cumulativeHasPaidIit;
+
+    /** 本月应缴个税 */
+    @Excel(name = "本月应缴个税")
+    @ApiModelProperty(value = "本月应缴个税")
+    private BigDecimal currentIndividualIncomeTax;
+
+    /** 签名 */
+    @Excel(name = "签名")
+    @ApiModelProperty(value = "签名")
+    private String idiograph;
+
+    /** 确认税款 */
+    @Excel(name = "确认税款")
+    @ApiModelProperty(value = "确认税款")
+    private BigDecimal individualIncomeTaxConfirm;
+
+    /** 客户外键 */
+    @ApiModelProperty(value = "确认税款")
+    private Long companyId;
+
+}

+ 30 - 0
src/main/java/cn/ezhizao/project/business/salary/mapper/BizFinancialSalaryDetailEmployeeMapper.java

@@ -0,0 +1,30 @@
+package cn.ezhizao.project.business.salary.mapper;
+
+import cn.ezhizao.project.business.salary.domain.BizFinancialSalaryDetailEmployee;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+import java.util.List;
+
+/**
+ * 工资人员信息Mapper接口
+ *
+ * @author ruoyi
+ * @date 2023-11-16
+ */
+public interface BizFinancialSalaryDetailEmployeeMapper extends BaseMapper<BizFinancialSalaryDetailEmployee>
+{
+    /**
+     * 查询工资人员信息列表
+     *
+     * @param bizFinancialSalaryDetailEmployee 工资人员信息
+     * @return 工资人员信息集合
+     */
+    public List<BizFinancialSalaryDetailEmployee> getList(BizFinancialSalaryDetailEmployee bizFinancialSalaryDetailEmployee);
+
+    /**
+     * 物理删除
+     * @param bizFinancialSalaryDetailEmployee
+     * @return 删除结果
+    */
+    public int physicalDelete(BizFinancialSalaryDetailEmployee bizFinancialSalaryDetailEmployee);
+}

+ 30 - 0
src/main/java/cn/ezhizao/project/business/salary/mapper/BizFinancialSalaryDetailMapper.java

@@ -0,0 +1,30 @@
+package cn.ezhizao.project.business.salary.mapper;
+
+import cn.ezhizao.project.business.salary.domain.BizFinancialSalaryDetail;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+import java.util.List;
+
+/**
+ * 工资报工信息Mapper接口
+ *
+ * @author ruoyi
+ * @date 2023-11-16
+ */
+public interface BizFinancialSalaryDetailMapper extends BaseMapper<BizFinancialSalaryDetail>
+{
+    /**
+     * 查询工资报工信息列表
+     *
+     * @param bizFinancialSalaryDetail 工资报工信息
+     * @return 工资报工信息集合
+     */
+    public List<BizFinancialSalaryDetail> getList(BizFinancialSalaryDetail bizFinancialSalaryDetail);
+
+    /**
+     * 物理删除
+     * @param bizFinancialSalaryDetail
+     * @return 删除结果
+    */
+    public int physicalDelete(BizFinancialSalaryDetail bizFinancialSalaryDetail);
+}

+ 30 - 0
src/main/java/cn/ezhizao/project/business/salary/mapper/BizFinancialSalaryMapper.java

@@ -0,0 +1,30 @@
+package cn.ezhizao.project.business.salary.mapper;
+
+import cn.ezhizao.project.business.salary.domain.BizFinancialSalary;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+import java.util.List;
+
+/**
+ * 工资Mapper接口
+ *
+ * @author ruoyi
+ * @date 2023-11-16
+ */
+public interface BizFinancialSalaryMapper extends BaseMapper<BizFinancialSalary>
+{
+    /**
+     * 查询工资列表
+     *
+     * @param bizFinancialSalary 工资
+     * @return 工资集合
+     */
+    public List<BizFinancialSalary> getList(BizFinancialSalary bizFinancialSalary);
+
+    /**
+     * 物理删除
+     * @param bizFinancialSalary
+     * @return 删除结果
+    */
+    public int physicalDelete(BizFinancialSalary bizFinancialSalary);
+}

+ 31 - 0
src/main/java/cn/ezhizao/project/business/salary/service/IBizFinancialSalaryDetailEmployeeService.java

@@ -0,0 +1,31 @@
+package cn.ezhizao.project.business.salary.service;
+
+import cn.ezhizao.project.business.salary.domain.BizFinancialSalaryDetailEmployee;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+import java.util.List;
+
+/**
+ * 工资人员信息Service接口
+ *
+ * @author ruoyi
+ * @date 2023-11-16
+ */
+public interface IBizFinancialSalaryDetailEmployeeService extends IService<BizFinancialSalaryDetailEmployee>
+{
+    /**
+     * 查询工资人员信息列表
+     *
+     * @param bizFinancialSalaryDetailEmployee 工资人员信息
+     * @return 工资人员信息集合
+     */
+    public List<BizFinancialSalaryDetailEmployee> getList(BizFinancialSalaryDetailEmployee bizFinancialSalaryDetailEmployee);
+
+    /**
+     * 物理删除
+     * @param bizFinancialSalaryDetailEmployee
+     * @return 删除结果
+     */
+    public int physicalDelete(BizFinancialSalaryDetailEmployee bizFinancialSalaryDetailEmployee);
+
+}

+ 31 - 0
src/main/java/cn/ezhizao/project/business/salary/service/IBizFinancialSalaryDetailService.java

@@ -0,0 +1,31 @@
+package cn.ezhizao.project.business.salary.service;
+
+import cn.ezhizao.project.business.salary.domain.BizFinancialSalaryDetail;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+import java.util.List;
+
+/**
+ * 工资报工信息Service接口
+ *
+ * @author ruoyi
+ * @date 2023-11-16
+ */
+public interface IBizFinancialSalaryDetailService extends IService<BizFinancialSalaryDetail>
+{
+    /**
+     * 查询工资报工信息列表
+     *
+     * @param bizFinancialSalaryDetail 工资报工信息
+     * @return 工资报工信息集合
+     */
+    public List<BizFinancialSalaryDetail> getList(BizFinancialSalaryDetail bizFinancialSalaryDetail);
+
+    /**
+     * 物理删除
+     * @param bizFinancialSalaryDetail
+     * @return 删除结果
+     */
+    public int physicalDelete(BizFinancialSalaryDetail bizFinancialSalaryDetail);
+
+}

+ 31 - 0
src/main/java/cn/ezhizao/project/business/salary/service/IBizFinancialSalaryService.java

@@ -0,0 +1,31 @@
+package cn.ezhizao.project.business.salary.service;
+
+import cn.ezhizao.project.business.salary.domain.BizFinancialSalary;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+import java.util.List;
+
+/**
+ * 工资Service接口
+ *
+ * @author ruoyi
+ * @date 2023-11-16
+ */
+public interface IBizFinancialSalaryService extends IService<BizFinancialSalary>
+{
+    /**
+     * 查询工资列表
+     *
+     * @param bizFinancialSalary 工资
+     * @return 工资集合
+     */
+    public List<BizFinancialSalary> getList(BizFinancialSalary bizFinancialSalary);
+
+    /**
+     * 物理删除
+     * @param bizFinancialSalary
+     * @return 删除结果
+     */
+    public int physicalDelete(BizFinancialSalary bizFinancialSalary);
+
+}

+ 44 - 0
src/main/java/cn/ezhizao/project/business/salary/service/impl/BizFinancialSalaryDetailEmployeeServiceImpl.java

@@ -0,0 +1,44 @@
+package cn.ezhizao.project.business.salary.service.impl;
+
+import cn.ezhizao.project.business.salary.domain.BizFinancialSalaryDetailEmployee;
+import cn.ezhizao.project.business.salary.mapper.BizFinancialSalaryDetailEmployeeMapper;
+import cn.ezhizao.project.business.salary.service.IBizFinancialSalaryDetailEmployeeService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.List;
+
+/**
+ * 工资人员信息Service业务层处理
+ *
+ * @author ruoyi
+ * @date 2023-11-16
+ */
+@Service
+public class BizFinancialSalaryDetailEmployeeServiceImpl  extends ServiceImpl<BizFinancialSalaryDetailEmployeeMapper, BizFinancialSalaryDetailEmployee> implements IBizFinancialSalaryDetailEmployeeService
+{
+    @Resource
+    private BizFinancialSalaryDetailEmployeeMapper bizFinancialSalaryDetailEmployeeMapper;
+
+    /**
+     * 查询工资人员信息列表
+     *
+     * @param bizFinancialSalaryDetailEmployee 工资人员信息
+     * @return 工资人员信息
+     */
+    @Override
+    public List<BizFinancialSalaryDetailEmployee> getList(BizFinancialSalaryDetailEmployee bizFinancialSalaryDetailEmployee)
+    {
+        return bizFinancialSalaryDetailEmployeeMapper.getList(bizFinancialSalaryDetailEmployee);
+    }
+
+    /**
+     * 物理删除
+     * @param bizFinancialSalaryDetailEmployee
+     * @return 删除结果
+     */
+    @Override
+    public int physicalDelete(BizFinancialSalaryDetailEmployee bizFinancialSalaryDetailEmployee){ return bizFinancialSalaryDetailEmployeeMapper.physicalDelete(bizFinancialSalaryDetailEmployee); };
+
+}

+ 77 - 0
src/main/java/cn/ezhizao/project/business/salary/service/impl/BizFinancialSalaryDetailServiceImpl.java

@@ -0,0 +1,77 @@
+package cn.ezhizao.project.business.salary.service.impl;
+
+import cn.ezhizao.project.business.salary.domain.BizFinancialSalaryDetail;
+import cn.ezhizao.project.business.salary.domain.BizFinancialSalaryDetailEmployee;
+import cn.ezhizao.project.business.salary.mapper.BizFinancialSalaryDetailMapper;
+import cn.ezhizao.project.business.salary.service.IBizFinancialSalaryDetailEmployeeService;
+import cn.ezhizao.project.business.salary.service.IBizFinancialSalaryDetailService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.List;
+
+/**
+ * 工资报工信息Service业务层处理
+ *
+ * @author ruoyi
+ * @date 2023-11-16
+ */
+@Service
+public class BizFinancialSalaryDetailServiceImpl  extends ServiceImpl<BizFinancialSalaryDetailMapper, BizFinancialSalaryDetail> implements IBizFinancialSalaryDetailService
+{
+    @Resource
+    private BizFinancialSalaryDetailMapper bizFinancialSalaryDetailMapper;
+    @Resource
+    private IBizFinancialSalaryDetailEmployeeService bizFinancialSalaryDetailEmployeeService;
+
+    /**
+     * 查询工资报工信息列表
+     *
+     * @param bizFinancialSalaryDetail 工资报工信息
+     * @return 工资报工信息
+     */
+    @Override
+    public List<BizFinancialSalaryDetail> getList(BizFinancialSalaryDetail bizFinancialSalaryDetail)
+    {
+        return bizFinancialSalaryDetailMapper.getList(bizFinancialSalaryDetail);
+    }
+
+    /**
+     * 物理删除
+     * @param bizFinancialSalaryDetail
+     * @return 删除结果
+     */
+    @Override
+    public int physicalDelete(BizFinancialSalaryDetail bizFinancialSalaryDetail){ return bizFinancialSalaryDetailMapper.physicalDelete(bizFinancialSalaryDetail); };
+
+    @Override
+    public boolean save(BizFinancialSalaryDetail bizFinancialSalaryDetail) {
+        boolean status = super.save(bizFinancialSalaryDetail);
+        List<BizFinancialSalaryDetailEmployee> employees = bizFinancialSalaryDetail.getDetails();
+        employees.forEach(l -> {
+            l.setFinancialSalaryDetailId(bizFinancialSalaryDetail.getId());
+            l.setCompanyId(bizFinancialSalaryDetail.getCompanyId());
+            l.setFinancialSalaryId(bizFinancialSalaryDetail.getFinancialSalaryId());
+        });
+        status = status && (employees.isEmpty() || bizFinancialSalaryDetailEmployeeService.saveBatch(employees));
+        return status;
+    }
+
+    @Override
+    public boolean updateById(BizFinancialSalaryDetail bizFinancialSalaryDetail) {
+        boolean status = super.updateById(bizFinancialSalaryDetail);
+        BizFinancialSalaryDetailEmployee delCondition = new BizFinancialSalaryDetailEmployee();
+        delCondition.setFinancialSalaryDetailId(bizFinancialSalaryDetail.getId());
+        bizFinancialSalaryDetailEmployeeService.physicalDelete(delCondition);
+        List<BizFinancialSalaryDetailEmployee> employees = bizFinancialSalaryDetail.getDetails();
+        employees.forEach(l -> {
+            l.setFinancialSalaryDetailId(bizFinancialSalaryDetail.getId());
+            l.setCompanyId(bizFinancialSalaryDetail.getCompanyId());
+            l.setFinancialSalaryId(bizFinancialSalaryDetail.getFinancialSalaryId());
+        });
+        status = status && (employees.isEmpty() || bizFinancialSalaryDetailEmployeeService.saveBatch(employees));
+        return status;
+    }
+
+}

+ 44 - 0
src/main/java/cn/ezhizao/project/business/salary/service/impl/BizFinancialSalaryServiceImpl.java

@@ -0,0 +1,44 @@
+package cn.ezhizao.project.business.salary.service.impl;
+
+import cn.ezhizao.project.business.salary.domain.BizFinancialSalary;
+import cn.ezhizao.project.business.salary.mapper.BizFinancialSalaryMapper;
+import cn.ezhizao.project.business.salary.service.IBizFinancialSalaryService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.List;
+
+/**
+ * 工资Service业务层处理
+ *
+ * @author ruoyi
+ * @date 2023-11-16
+ */
+@Service
+public class BizFinancialSalaryServiceImpl  extends ServiceImpl<BizFinancialSalaryMapper, BizFinancialSalary> implements IBizFinancialSalaryService
+{
+    @Resource
+    private BizFinancialSalaryMapper bizFinancialSalaryMapper;
+
+    /**
+     * 查询工资列表
+     *
+     * @param bizFinancialSalary 工资
+     * @return 工资
+     */
+    @Override
+    public List<BizFinancialSalary> getList(BizFinancialSalary bizFinancialSalary)
+    {
+        return bizFinancialSalaryMapper.getList(bizFinancialSalary);
+    }
+
+    /**
+     * 物理删除
+     * @param bizFinancialSalary
+     * @return 删除结果
+     */
+    @Override
+    public int physicalDelete(BizFinancialSalary bizFinancialSalary){ return bizFinancialSalaryMapper.physicalDelete(bizFinancialSalary); };
+
+}

+ 3 - 1
src/main/java/cn/ezhizao/project/system/controller/SysLoginController.java

@@ -95,11 +95,13 @@ public class SysLoginController extends BaseController
 //        sysModule.setIds(menus.stream().map(SysVersionMenu::getModuleId).distinct().collect(Collectors.toList()));
 //        List<SysModule> modules = moduleService.getList(sysModule);
 //        permissions = permissions.stream().anyMatch(v -> v.equals("*:*:*")) ? menus.stream().map(SysVersionMenu::getPerms).collect(Collectors.toSet()) : permissions.stream().filter(v -> menus.stream().anyMatch(e -> e.getPerms().equals(v))).collect(Collectors.toSet());
-
+        Long tenantId =  getTenantId();
+        Tenant tenant = tenantService.getById(tenantId);
         AjaxResult ajax = AjaxResult.success();
         ajax.put("user", user);
         ajax.put("roles", roles);
         ajax.put("permissions", permissions);
+        ajax.put("tenant", tenant);
 //        ajax.put("modules", modules);
         return ajax;
     }

+ 4 - 4
src/main/java/cn/ezhizao/project/system/service/impl/SysDictDataServiceImpl.java

@@ -69,8 +69,8 @@ public class SysDictDataServiceImpl implements ISysDictDataService
         {
             SysDictData data = selectDictDataById(dictCode);
             dictDataMapper.deleteDictDataById(dictCode);
-            List<SysDictData> dictDatas = dictDataMapper.selectDictDataByType(data.getDictType());
-            DictUtils.setDictCache(data.getDictType(), dictDatas);
+            List<SysDictData> dictDatas = dictDataMapper.selectDictDataByType(data.getDictType(), data.getTenantId());
+            DictUtils.setDictCache(data.getDictType(), data.getTenantId(), dictDatas);
         }
     }
 
@@ -86,8 +86,8 @@ public class SysDictDataServiceImpl implements ISysDictDataService
         int row = dictDataMapper.insertDictData(data);
         if (row > 0)
         {
-            List<SysDictData> dictDatas = dictDataMapper.selectDictDataByType(data.getDictType());
-            DictUtils.setDictCache(data.getDictType(), dictDatas);
+            List<SysDictData> dictDatas = dictDataMapper.selectDictDataByType(data.getDictType(), data.getTenantId());
+            DictUtils.setDictCache(data.getDictType(), data.getTenantId(), dictDatas);
         }
         return row;
     }

+ 10 - 1
src/main/java/cn/ezhizao/project/tenant/controller/TenantController.java

@@ -219,6 +219,7 @@ public class TenantController extends BaseController {
         // 判断是否已有初始化角色
         // 获取初始化角色信息
         List<SysRole> roles = tenantService.getInitRoles(tenantId);
+        boolean checkRole=!roles.isEmpty();
         SysRole adminRole = roles.stream().filter(v -> v.getEditDisable().equals("1")).findFirst().orElse(null);
         // 判断管理员权限是否与版本一致
         boolean checkAdminMenu = adminRole != null && tenantService.checkAdminMenu(tenantId, adminRole.getId());
@@ -240,6 +241,7 @@ public class TenantController extends BaseController {
         map.put("checkSource", checkSource);
         map.put("initRoleData", tenantService.initRolesData());
         map.put("tenant", tenant);
+        map.put("checkRole", checkRole);
         map.put("initDept", dept);
         return success(map);
     }
@@ -325,13 +327,20 @@ public class TenantController extends BaseController {
         List<SysRole> existsRoles = roleService.selectRolesByTenantId(initFlow.getTenantId());
 
         // 判断角色是否存在
-        List<SysRole> insertRoles = sysRoles.stream().filter(v -> existsRoles.stream().noneMatch(t -> v.getInitId().equals(t.getInitId()))).collect(Collectors.toList());
+        List<SysRole> insertRoles = new ArrayList<>();
+        for (SysRole role : sysRoles) {
+            if (existsRoles.stream().noneMatch(t -> role.getInitId().equals(t.getInitId()))) {
+                role.setIsInit("1");
+                insertRoles.add(role);
+            }
+        }
         List<SysRole> updateRoles = new ArrayList<>();
         for (SysRole sysRole : sysRoles) {
             boolean b = false;
             for (SysRole t : existsRoles) {
                 if (t.getInitId().equals(sysRole.getInitId())) {
                     b = true;
+                    sysRole.setIsInit("1");
                     sysRole.setRoleId(t.getRoleId());
                     break;
                 }

+ 1 - 0
src/main/resources/mybatis/business/BizCompanyMapper.xml

@@ -30,6 +30,7 @@
             <if test="category != null  and category != ''">AND c.category = #{category}</if>
             <if test="code != null  and code != ''">AND c.code = #{code}</if>
             <if test="name != null  and name != ''">AND c.name like concat('%', #{name}, '%')</if>
+            <if test="isZero != null ">AND c.is_zero = #{isZero}</if>
             <if test="keyword != null  and keyword != ''">AND (c.name like concat('%', #{keyword}, '%') or c.code like concat('%', #{keyword}, '%'))</if>
             <if test="tenantId != null"> AND (c.tenant_id = #{tenantId}
                 or exists (select 1 from biz_entrust entrust where entrust.deleted = 0 and entrust.company_id =

+ 13 - 8
src/main/resources/mybatis/business/BizEntrustMapper.xml

@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <!DOCTYPE mapper
-PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
-"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="cn.ezhizao.project.business.entrust.mapper.BizEntrustMapper">
 
     <resultMap type="cn.ezhizao.project.business.entrust.domain.BizEntrust" id="BizEntrustResult">
@@ -10,12 +10,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 
 
     <select id="getList" parameterType="BizEntrust" resultMap="BizEntrustResult">
-        SELECT * FROM biz_entrust
+        SELECT t1.* FROM biz_entrust t1 left join biz_company t2 on t2.id = t1.company_id
         <trim prefix=" WHERE" suffix="" suffixOverrides="AND">
-            deleted = 0
-            <if test="companyId != null "> AND company_id = #{companyId}</if>
-            <if test="taskTypeId != null "> AND task_type_id = #{taskTypeId}</if>
-            <if test="isStop != null "> AND is_stop = #{isStop}</if>
+            t1.deleted = 0
+            <if test="companyId != null ">AND t1.company_id = #{companyId}</if>
+            <if test="taskTypeId != null ">AND t1.task_type_id = #{taskTypeId}</if>
+            <if test="isStop != null ">AND t1.is_stop = #{isStop}</if>
+            <if test="isZero != null ">AND t2.is_zero = #{isZero}</if>
+            <if test="ticketFinished == 0">
+                <!-- 判断是否已经收票完成 -->
+                AND not exists (select 1 from biz_archive_receive_ticket_finished t2 where t2.company_id = t1.company_id and t2.is_finished = 1 and date_format(t1.current_month, '%Y%m') = concat(t2.year, t2.month))
+            </if>
         </trim>
     </select>
 
@@ -25,7 +30,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="id != null">
                 id = #{id} AND
             </if>
-       <!-- 删除条件为其他外键可以在这里加 -->
+            <!-- 删除条件为其他外键可以在这里加 -->
         </trim>
     </delete>
 </mapper>

+ 88 - 0
src/main/resources/mybatis/business/BizFinancialReceiveTicketDetailMapper.xml

@@ -0,0 +1,88 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="cn.ezhizao.project.business.receiveTicket.mapper.BizFinancialReceiveTicketDetailMapper">
+
+    <resultMap type="cn.ezhizao.project.business.receiveTicket.domain.BizFinancialReceiveTicketDetail"
+               id="BizFinancialReceiveTicketDetailResult">
+        <id column="id" property="id"/>
+    </resultMap>
+
+
+    <select id="getList" parameterType="BizFinancialReceiveTicketDetail"
+            resultMap="BizFinancialReceiveTicketDetailResult">
+        SELECT
+        t1.*, t2.name as company_name, t2.social_credit_code
+        from
+        biz_financial_receive_ticket_detail t1
+        left join biz_company t2 on t2.id = t1.company_id
+        WHERE
+        t1.deleted = 0
+        <if test="id != null">
+            AND t1.id = #{id}
+        </if>
+        <if test="financialReceiveTicketId != null">
+            AND t1.financial_receive_ticket_id = ${financialReceiveTicketId}
+        </if>
+        <if test="year != null and year != ''">
+            AND t1.year = #{year}
+        </if>
+        <if test="month != null and month != ''">
+            AND t1.month = #{month}
+        </if>
+        <if test="companyName != null and companyName != '' ">
+            AND t2.name like concat('%', #{companyName}, '%')
+        </if>
+        <if test="currentMonth != null and currentMonth != '' ">
+            AND concat(t1.year, '-', t1.month) = #{currentMonth}
+        </if>
+        <if test="mainIds != null and mainIds.size > 0">
+            AND t1.financial_receive_ticket_id in
+            <foreach collection="mainIds" index="index" item="item" separator="," open="(" close=")">
+                #{item,jdbcType=BIGINT}
+            </foreach>
+        </if>
+        <if test="inputInvoice != null ">AND input_invoice = #{inputInvoice}</if>
+        <if test="inputDeduction != null ">AND input_deduction = #{inputDeduction}</if>
+        <if test="revenueBookkeeping != null ">AND revenue_bookkeeping = #{revenueBookkeeping}</if>
+        <if test="hasIncomeTicket != null ">AND has_income_ticket = #{hasIncomeTicket}</if>
+        <if test="hasCostTicket != null ">AND has_cost_ticket = #{hasCostTicket}</if>
+        <if test="bankCopy != null ">AND bank_copy = #{bankCopy}</if>
+        <if test="others != null ">AND others = #{others}</if>
+        <if test="hasSsafTicket != null ">AND has_ssaf_ticket = #{hasSsafTicket}</if>
+        <if test="bankSlips != null ">AND bank_slips = #{bankSlips}</if>
+        <if test="payroll != null ">AND payroll = #{payroll}</if>
+        <if test="feeTicket != null ">AND fee_ticket = #{feeTicket}</if>
+        <if test="receiveDate != null ">AND receive_date = #{receiveDate}</if>
+        <if test="saveStatus != null ">AND save_status = #{saveStatus}</if>
+        <if test="postDate != null ">AND post_date = #{postDate}</if>
+        <if test="postNo != null  and postNo != ''">AND post_no = #{postNo}</if>
+        <if test="status != null ">AND status = #{status}</if>
+        <if test="content != null  and content != ''">AND content = #{content}</if>
+        <if test="verifyContent != null  and verifyContent != ''">AND verify_content = #{verifyContent}</if>
+        <if test="incomeTicket != null ">AND income_ticket = #{incomeTicket}</if>
+        <if test="costTicket != null ">AND cost_ticket = #{costTicket}</if>
+        <if test="feeTicketNumber != null ">AND fee_ticket_number = #{feeTicketNumber}</if>
+        <if test="ssafTicket != null ">AND ssaf_ticket = #{ssafTicket}</if>
+        <if test="salaryTicket != null ">AND salary_ticket = #{salaryTicket}</if>
+        <if test="bankSlipsNumber != null ">AND bank_slips_number = #{bankSlipsNumber}</if>
+        <if test="bankCopyNumber != null ">AND bank_copy_number = #{bankCopyNumber}</if>
+        <if test="otherTicket != null ">AND other_ticket = #{otherTicket}</if>
+        <if test="sumNumber != null ">AND sum_number = #{sumNumber}</if>
+        <if test="lackTicket != null ">AND lack_ticket = #{lackTicket}</if>
+        <if test="feedbackContent != null  and feedbackContent != ''">AND feedback_content = #{feedbackContent}</if>
+        <if test="feedbackStatus != null ">AND feedback_status = #{feedbackStatus}</if>
+
+    </select>
+
+    <delete id="physicalDelete">
+        DELETE FROM biz_financial_receive_ticket_detail
+        <trim prefix=" WHERE" suffix="" suffixOverrides="AND">
+            <if test="id != null">
+                id = #{id} AND
+            </if>
+            <!-- 删除条件为其他外键可以在这里加 -->
+        </trim>
+    </delete>
+</mapper>

+ 117 - 0
src/main/resources/mybatis/business/BizFinancialReceiveTicketFeedbackMapper.xml

@@ -0,0 +1,117 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="cn.ezhizao.project.business.receiveTicket.mapper.BizFinancialReceiveTicketFeedbackMapper">
+
+    <resultMap type="cn.ezhizao.project.business.receiveTicket.domain.BizFinancialReceiveTicketFeedback" id="BizFinancialReceiveTicketFeedbackResult">
+        <id column="id" property="id"/>
+        <result column="company_id" jdbcType="BIGINT" property="companyId"/>
+        <association property="serviceName" select="getServiceName" column="company_id"></association>
+    </resultMap>
+
+
+    <select id="getList" parameterType="BizFinancialReceiveTicketFeedback" resultMap="BizFinancialReceiveTicketFeedbackResult">
+        SELECT t1.*, t2.name as company_name, t2.tax_type, t3.year, t3.month,
+        t4.account_name as from_company_name FROM biz_financial_receive_ticket_feedback t1 left join
+        biz_company t2 on t2.id = t1.company_id
+        left join biz_financial_receive_ticket_detail t3 on t3.id = t1.financial_receive_ticket_detail_id
+        left join biz_tenant t4 on t4.id = t2.tenant_id
+        <trim prefix=" WHERE" suffix="" suffixOverrides="AND">
+            t1.deleted = 0 AND
+            <if test="id != null  ">
+                t1.id = #{id} AND
+            </if>
+            <if test="principal != null and principal != ''">
+                 (t2.leader_id=#{principal} OR t2.adviser_id=#{principal}) AND
+            </if>
+            <if test="year != null  ">
+                t3.year = #{year} AND
+            </if>
+            <if test="month != null  ">
+                t3.month = #{month} AND
+            </if>
+            <if test="financialReceiveTicketId != null  ">
+                t1.financial_receive_ticket_id = #{financialReceiveTicketId} AND
+            </if>
+            <if test="currentMonth != null">
+                concat(t3.year, '-', t3.month, '-01') = #{currentMonth} AND
+            </if>
+            <if test="taxType != null and taxType != ''">
+                t2.tax_type = #{taxType} AND
+            </if>
+            <if test="fromCompanyName != null and fromCompanyName != ''">
+                (t4.account_name like concat('%', #{fromCompanyName}, '%')) AND
+            </if>
+            <if test="companyId != null  ">
+                t1.company_id = #{companyId} AND
+            </if>
+            <if test="tenantId != null">
+                exists (select 1 from biz_entrust eb
+                where eb.deleted = 0
+                and (eb.to_tenant_id = #{tenantId} or eb.from_tenant_id = #{tenantId})
+                and date_format(eb.current_month, '%Y%m') = concat(t3.year, t3.month)
+                and eb.company_id = t3.company_id and eb.task_type_id = 1
+                ) AND
+            </if>
+<!--            <if test="tenantId != null  ">-->
+<!--                (t1.tenant_id = #{tenantId}-->
+<!--                or exists (select 1 from entrust where entrust.deleted = 0 and entrust.is_stop = 0 and entrust.company_id = t1.company_id and entrust.task_type_id = 1 and entrust.from_tenant_id = #{tenantId})-->
+<!--                ) AND-->
+<!--            </if>-->
+<!--            exists (select 1 from entrust where entrust.deleted = 0 and entrust.is_stop = 0 and entrust.company_id = t1.company_id and entrust.task_type_id = 1) AND-->
+
+            <if test="companyName != null and companyName != ''">
+                t2.name like concat('%', #{companyName}, '%') AND
+            </if>
+            <if test="financialReceiveTicketDetailId != null  ">
+                t1.financial_receive_ticket_detail_id = #{financialReceiveTicketDetailId} AND
+            </if>
+            <if test="feedbackTime != null  ">
+                t1.feedback_time = #{feedbackTime} AND
+            </if>
+            <if test="needSync != null  ">
+                t1.need_sync = #{needSync} AND
+            </if>
+            <if test="status != null  ">
+                t1.status = #{status} AND
+            </if>
+            <if test="remark != null  and remark != '' ">
+                t1.remark = #{remark} AND
+            </if>
+            <if test="createTime != null  ">
+                t1.create_time = #{createTime} AND
+            </if>
+            <if test="creatorId != null  ">
+                t1.creator_id = #{creatorId} AND
+            </if>
+            <if test="updateTime != null  ">
+                t1.update_time = #{updateTime} AND
+            </if>
+            <if test="updaterId != null  ">
+                t1.updater_id = #{updaterId} AND
+            </if>
+            <if test="deleted != null  ">
+                t1.deleted = #{deleted} AND
+            </if>
+            <if test="version != null  ">
+                t1.version = #{version} AND
+            </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>
+
+    <delete id="physicalDelete">
+        DELETE FROM biz_financial_receive_ticket_feedback
+        <trim prefix=" WHERE" suffix="" suffixOverrides="AND">
+            <if test="id != null">
+                id = #{id} AND
+            </if>
+       <!-- 删除条件为其他外键可以在这里加 -->
+        </trim>
+    </delete>
+</mapper>

+ 135 - 0
src/main/resources/mybatis/business/BizFinancialReceiveTicketMapper.xml

@@ -0,0 +1,135 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="cn.ezhizao.project.business.receiveTicket.mapper.BizFinancialReceiveTicketMapper">
+
+    <resultMap type="cn.ezhizao.project.business.receiveTicket.domain.BizFinancialReceiveTicket" id="BizFinancialReceiveTicketResult">
+        <id column="id" property="id"/>
+        <result column="company_id" jdbcType="BIGINT" property="companyId" />
+        <association property="serviceName" select="getServiceName" column="company_id"></association>
+    </resultMap>
+
+    <select id="getList" parameterType="BizFinancialReceiveTicket" resultMap="BizFinancialReceiveTicketResult">
+        SELECT
+        t1.*, t2.name as company_name,
+        (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,
+        t3.account_name as from_company_name, t2.tax_type
+        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
+        WHERE
+        t1.deleted = 0
+        <if test="id != null">
+            AND t1.id = #{id}
+        </if>
+        <if test="principal != null and principal != ''">
+            AND (t2.leader_id=#{principal} OR t2.adviser_id=#{principal})
+        </if>
+        <if test="isZero != null">
+            AND t2.is_zero = #{isZero}
+        </if>
+        <if test="keyword != null and keyword != ''">
+            AND (t2.name like concat('%', #{keyword}, '%') or t2.code like concat('%', #{keyword}, '%'))
+        </if>
+        <if test="taxType != null and taxType != ''">
+            AND t2.tax_type = #{taxType}
+        </if>
+        <if test="fromCompanyName != null and fromCompanyName != ''">
+            AND (t3.account_name like concat('%', #{fromCompanyName}, '%'))
+        </if>
+        <if test="month != null and year != null">
+            <if test="tenantId != null">
+                AND exists (select 1 from biz_entrust eb
+                where eb.deleted = 0
+                and (eb.to_tenant_id = #{tenantId} or eb.from_tenant_id = #{tenantId})
+                and date_format(eb.current_month, '%Y%m') = concat(#{year}, #{month})
+                and eb.work_order_id = t1.work_order_id
+                )
+            </if>
+            <if test="status != null and status != 0">
+                AND exists (select 1 from biz_financial_receive_ticket_detail fsd where fsd.financial_receive_ticket_id = t1.id and
+                fsd.month = #{month} and fsd.year = #{year} and fsd.status = #{status} <include refid="detailConditionSql" />)
+            </if>
+            <if test="status != null and status == 0">
+                AND not exists (select 1 from biz_financial_receive_ticket_detail fsd where fsd.financial_receive_ticket_id = t1.id and
+                fsd.month = #{month} and fsd.year = #{year})
+            </if>
+        </if>
+    </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>
+
+    <delete id="physicalDelete">
+        DELETE FROM biz_financial_receive_ticket
+        <trim prefix=" WHERE" suffix="" suffixOverrides="AND">
+            <if test="id != null">
+                id = #{id} AND
+            </if>
+       <!-- 删除条件为其他外键可以在这里加 -->
+        </trim>
+    </delete>
+
+    <sql id="detailConditionSql">
+        <if test="hasIncomeTicket != null and hasIncomeTicket == 1">
+            AND fsd.income_ticket > 0
+        </if>
+        <if test="hasIncomeTicket != null and hasIncomeTicket == 0">
+            AND fsd.income_ticket = 0
+        </if>
+        <if test="hasCostTicket != null and hasIncomeTicket == 1">
+            AND fsd.cost_ticket > 0
+        </if>
+        <if test="hasCostTicket != null and hasIncomeTicket == 0">
+            AND fsd.cost_ticket = 0
+        </if>
+        <if test="feeTicket != null and feeTicket == 1">
+            AND fsd.fee_ticket_number > 0
+        </if>
+        <if test="feeTicket != null and feeTicket == 0">
+            AND fsd.fee_ticket_number = 0
+        </if>
+        <if test="bankCopy != null and bankCopy == 1">
+            AND fsd.bank_copy_number > 0
+        </if>
+        <if test="bankCopy != null and bankCopy == 0">
+            AND fsd.bank_copy_number = 0
+        </if>
+        <if test="bankSlips != null and bankSlips == 1">
+            AND fsd.bank_slips_number > 0
+        </if>
+        <if test="bankSlips != null and bankSlips == 0">
+            AND fsd.bank_slips_number = 0
+        </if>
+        <if test="payroll != null and payroll == 1">
+            AND fsd.salary_ticket > 0
+        </if>
+        <if test="payroll != null and payroll == 0">
+            AND fsd.salary_ticket = 0
+        </if>
+        <if test="hasSsafTicket != null and hasSsafTicket == 1">
+            AND fsd.ssaf_ticket > 0
+        </if>
+        <if test="hasSsafTicket != null and hasSsafTicket == 0">
+            AND fsd.ssaf_ticket = 0
+        </if>
+        <if test="others != null and others == 1">
+            AND fsd.other_ticket > 0
+        </if>
+        <if test="others != null and others == 0">
+            AND fsd.other_ticket = 0
+        </if>
+        <if test="sumNumber != null and sumNumber == 1">
+            AND fsd.sum_number > 0
+        </if>
+        <if test="sumNumber != null and sumNumber == 0">
+            AND fsd.sum_number = 0
+        </if>
+        <if test="saveStatus != null and saveStatus > 0">
+            AND fsd.save_status = #{saveStatus}
+        </if>
+    </sql>
+</mapper>

+ 70 - 0
src/main/resources/mybatis/business/BizFinancialSalaryDetailEmployeeMapper.xml

@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="cn.ezhizao.project.business.salary.mapper.BizFinancialSalaryDetailEmployeeMapper">
+
+    <resultMap type="cn.ezhizao.project.business.salary.domain.BizFinancialSalaryDetailEmployee" id="BizFinancialSalaryDetailEmployeeResult">
+        <id column="id" property="id"/>
+    </resultMap>
+
+
+    <select id="getList" parameterType="BizFinancialSalaryDetailEmployee" resultMap="BizFinancialSalaryDetailEmployeeResult">
+        SELECT * FROM biz_financial_salary_detail_employee
+        <trim prefix=" WHERE" suffix="" suffixOverrides="AND">
+            deleted = 0
+            <if test="id != null "> AND id = #{id}</if>
+            <if test="financialSalaryId != null "> AND financial_salary_id = #{financialSalaryId}</if>
+            <if test="financialSalaryDetailId != null "> AND financial_salary_detail_id = #{financialSalaryDetailId}</if>
+            <if test="employeeName != null  and employeeName != ''"> AND employee_name like concat('%', #{employeeName}, '%')</if>
+            <if test="departmentName != null  and departmentName != ''"> AND department_name like concat('%', #{departmentName}, '%')</if>
+            <if test="idCode != null  and idCode != ''"> AND id_code = #{idCode}</if>
+            <if test="salaryAmount != null "> AND salary_amount = #{salaryAmount}</if>
+            <if test="bonusAmount != null "> AND bonus_amount = #{bonusAmount}</if>
+            <if test="allowanceAmount != null "> AND allowance_amount = #{allowanceAmount}</if>
+            <if test="subsidyAmount != null "> AND subsidy_amount = #{subsidyAmount}</if>
+            <if test="absenceCut != null "> AND absence_cut = #{absenceCut}</if>
+            <if test="planSalary != null "> AND plan_salary = #{planSalary}</if>
+            <if test="actuallySalary != null "> AND actually_salary = #{actuallySalary}</if>
+            <if test="endowmentInsurance != null "> AND endowment_insurance = #{endowmentInsurance}</if>
+            <if test="medicalInsurance != null "> AND medical_insurance = #{medicalInsurance}</if>
+            <if test="unemploymentBenefit != null "> AND unemployment_benefit = #{unemploymentBenefit}</if>
+            <if test="seriousIllnessInsurance != null "> AND serious_illness_insurance = #{seriousIllnessInsurance}</if>
+            <if test="housingFund != null "> AND housing_fund = #{housingFund}</if>
+            <if test="otherCut != null "> AND other_cut = #{otherCut}</if>
+            <if test="cumulativeIncome != null "> AND cumulative_income = #{cumulativeIncome}</if>
+            <if test="cumulativeSpecialCut != null "> AND cumulative_special_cut = #{cumulativeSpecialCut}</if>
+            <if test="cumulativeChildEduCut != null "> AND cumulative_child_edu_cut = #{cumulativeChildEduCut}</if>
+            <if test="cumulativeHouseLoanInterestCut != null "> AND cumulative_house_loan_interest_cut = #{cumulativeHouseLoanInterestCut}</if>
+            <if test="cumulativeHouseRentCut != null "> AND cumulative_house_rent_cut = #{cumulativeHouseRentCut}</if>
+            <if test="cumulativeSupportElderCut != null "> AND cumulative_support_elder_cut = #{cumulativeSupportElderCut}</if>
+            <if test="cumulativeContinuingEduCut != null "> AND cumulative_continuing_edu_cut = #{cumulativeContinuingEduCut}</if>
+            <if test="cumulativeBabyCareCut != null "> AND cumulative_baby_care_cut = #{cumulativeBabyCareCut}</if>
+            <if test="sumSpecialCumulativeCut != null "> AND sum_special_cumulative_cut = #{sumSpecialCumulativeCut}</if>
+            <if test="cumulativeOtherCut != null "> AND cumulative_other_cut = #{cumulativeOtherCut}</if>
+            <if test="cumulativeIndividualIncomeTax != null "> AND cumulative_individual_income_tax = #{cumulativeIndividualIncomeTax}</if>
+            <if test="cumulativeHasPaidIit != null "> AND cumulative_has_paid_iit = #{cumulativeHasPaidIit}</if>
+            <if test="currentIndividualIncomeTax != null "> AND current_individual_income_tax = #{currentIndividualIncomeTax}</if>
+            <if test="idiograph != null  and idiograph != ''"> AND idiograph = #{idiograph}</if>
+            <if test="individualIncomeTaxConfirm != null "> AND individual_income_tax_confirm = #{individualIncomeTaxConfirm}</if>
+            <if test="companyId != null "> AND company_id = #{companyId}</if>
+            <if test="financialSalaryDetailIds != null and financialSalaryDetailIds.size() > 0">
+                AND financial_salary_detail_id IN
+                <foreach collection="financialSalaryDetailIds" index="index" item="item" separator="," open="(" close=")">
+                    #{item,jdbcType=BIGINT}
+                </foreach>
+            </if>
+        </trim>
+    </select>
+
+    <delete id="physicalDelete">
+        DELETE FROM biz_financial_salary_detail_employee
+        <trim prefix=" WHERE" suffix="" suffixOverrides="AND">
+            <if test="id != null">
+                id = #{id} AND
+            </if>
+            <if test="financialSalaryDetailId != null "> financial_salary_detail_id = #{financialSalaryDetailId} AND</if>
+       <!-- 删除条件为其他外键可以在这里加 -->
+        </trim>
+    </delete>
+</mapper>

+ 51 - 0
src/main/resources/mybatis/business/BizFinancialSalaryDetailMapper.xml

@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="cn.ezhizao.project.business.salary.mapper.BizFinancialSalaryDetailMapper">
+
+    <resultMap type="cn.ezhizao.project.business.salary.domain.BizFinancialSalaryDetail" id="BizFinancialSalaryDetailResult">
+        <id column="id" property="id"/>
+        <collection property="details" select="getEmployees" column="id" />
+    </resultMap>
+
+
+    <resultMap id="EmployeeResult" type="cn.ezhizao.project.business.salary.domain.BizFinancialSalaryDetailEmployee">
+        <id column="id" jdbcType="INTEGER" property="id"/>
+    </resultMap>
+
+    <select id="getEmployees" resultMap="EmployeeResult">
+        select *
+        from biz_financial_salary_detail_employee
+        where financial_salary_detail_id = #{id}
+    </select>
+
+    <select id="getList" parameterType="BizFinancialSalaryDetail" resultMap="BizFinancialSalaryDetailResult">
+        SELECT t1.*, t2.name as company_name, t2.tax_type FROM biz_financial_salary_detail t1 left join biz_company t2 on t2.id = t1.company_id
+        <trim prefix=" WHERE" suffix="" suffixOverrides="AND">
+            t1.deleted = 0
+            <if test="id != null  and id != ''"> AND t1.id = #{id}</if>
+            <if test="financialSalaryId != null  and financialSalaryId != ''"> AND t1.financial_salary_id = #{financialSalaryId}</if>
+            <if test="companyId != null  and companyId != ''"> AND t1.company_id = #{companyId}</if>
+            <if test="year != null  and year != ''"> AND t1.year = #{year}</if>
+            <if test="month != null  and month != ''"> AND t1.month = #{month}</if>
+            <if test="status != null "> AND t1.status = #{status}</if>
+            <if test="content != null  and content != ''"> AND t1.content = #{content}</if>
+            <if test="verifyContent != null  and verifyContent != ''"> AND t1.verify_content = #{verifyContent}</if>
+            <if test="feedbackContent != null  and feedbackContent != ''"> AND t1.feedback_content = #{feedbackContent}</if>
+            <if test="hasIndividualIncomeTax != null "> AND t1.has_individual_income_tax = #{hasIndividualIncomeTax}</if>
+            <if test="number != null "> AND t1.number = #{number}</if>
+            <if test="amount != null "> AND t1.amount = #{amount}</if>
+        </trim>
+    </select>
+
+    <delete id="physicalDelete">
+        DELETE FROM biz_financial_salary_detail
+        <trim prefix=" WHERE" suffix="" suffixOverrides="AND">
+            <if test="id != null">
+                id = #{id} AND
+            </if>
+       <!-- 删除条件为其他外键可以在这里加 -->
+        </trim>
+    </delete>
+</mapper>

+ 74 - 0
src/main/resources/mybatis/business/BizFinancialSalaryMapper.xml

@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="cn.ezhizao.project.business.salary.mapper.BizFinancialSalaryMapper">
+
+    <resultMap type="cn.ezhizao.project.business.salary.domain.BizFinancialSalary" id="BizFinancialSalaryResult">
+        <id column="id" property="id"/>
+        <result column="company_id" jdbcType="BIGINT" property="companyId"/>
+        <association property="serviceName" select="getServiceName" column="company_id"></association>
+    </resultMap>
+
+
+    <select id="getList" parameterType="BizFinancialSalary" resultMap="BizFinancialSalaryResult">
+        SELECT t1.*, t2.name as company_name,t2.tax_type, t3.account_name as from_company_name
+        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
+        <trim prefix=" WHERE" suffix="" suffixOverrides="AND">
+            t1.deleted = 0
+            <if test="isStop != null ">AND is_stop = #{isStop}</if>
+            <if test="companyName != null ">AND t2.name like concat('%', #{companyName}, '%')</if>
+            <if test="taxType != null and taxType != ''">
+                AND t2.tax_type = #{taxType}
+            </if>
+            <if test="isZero != null">
+                AND t2.is_zero = #{isZero}
+            </if>
+            <if test="fromCompanyName != null and fromCompanyName != ''">
+                AND (t3.account_name like concat('%', #{fromCompanyName}, '%'))
+            </if>
+            <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
+                    where eb.deleted = 0
+                    and (eb.to_tenant_id = #{tenantId} or eb.from_tenant_id = #{tenantId})
+                    and date_format(eb.current_month, '%Y%m') = concat(#{year}, #{month})
+                    and eb.work_order_id = t1.work_order_id
+                    )
+                </if>
+                <if test="status != null and status != 0">
+                    AND exists (select 1 from biz_financial_salary_detail fsd where 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.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.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>
+
+    <delete id="physicalDelete">
+        DELETE FROM biz_financial_salary
+        <trim prefix=" WHERE" suffix="" suffixOverrides="AND">
+            <if test="id != null">
+                id = #{id} AND
+            </if>
+            <!-- 删除条件为其他外键可以在这里加 -->
+        </trim>
+    </delete>
+</mapper>

+ 102 - 101
src/main/resources/mybatis/system/SysDictTypeMapper.xml

@@ -1,120 +1,121 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <!DOCTYPE mapper
-PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
-"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="cn.ezhizao.project.system.mapper.SysDictTypeMapper">
 
-	<resultMap type="SysDictType" id="SysDictTypeResult">
-		<id     property="dictId"     column="dict_id"     />
-		<result property="dictName"   column="dict_name"   />
-		<result property="dictType"   column="dict_type"   />
-		<result property="status"     column="status"      />
-		<result property="createBy"   column="create_by"   />
-		<result property="createTime" column="create_time" />
-		<result property="updateBy"   column="update_by"   />
-		<result property="updateTime" column="update_time" />
-	</resultMap>
+    <resultMap type="SysDictType" id="SysDictTypeResult">
+        <id property="dictId" column="dict_id"/>
+        <result property="dictName" column="dict_name"/>
+        <result property="dictType" column="dict_type"/>
+        <result property="status" column="status"/>
+        <result property="createBy" column="create_by"/>
+        <result property="createTime" column="create_time"/>
+        <result property="updateBy" column="update_by"/>
+        <result property="updateTime" column="update_time"/>
+    </resultMap>
 
-	<sql id="selectDictTypeVo">
+    <sql id="selectDictTypeVo">
         select dict_id, dict_name, dict_type, status, create_by, create_time, remark
-		from sys_dict_type
+        from sys_dict_type
     </sql>
 
-	<select id="selectDictTypeList" parameterType="SysDictType" resultMap="SysDictTypeResult">
-	    <include refid="selectDictTypeVo"/>
-		<where>
-		    <if test="dictName != null and dictName != ''">
-				AND dict_name like concat('%', #{dictName}, '%')
-			</if>
-			<if test="module != null and module != ''">
-				AND module = #{module}
-			</if>
-			<if test="status != null and status != ''">
-				AND status = #{status}
-			</if>
-			<if test="dictType != null and dictType != ''">
-				AND dict_type like concat('%', #{dictType}, '%')
-			</if>
-			<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
-				and date_format(create_time,'%y%m%d') &gt;= date_format(#{params.beginTime},'%y%m%d')
-			</if>
-			<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
-				and date_format(create_time,'%y%m%d') &lt;= date_format(#{params.endTime},'%y%m%d')
-			</if>
-			<if test="tenantId != null">
-				<!-- 租户检索 -->
-				and (default_dict = 1 or tenant_id = #{tenantId})
-			</if>
-	    </where>
-	</select>
+    <select id="selectDictTypeList" parameterType="SysDictType" resultMap="SysDictTypeResult">
+        <include refid="selectDictTypeVo"/>
+        <where>
+            <if test="dictName != null and dictName != ''">
+                AND dict_name like concat('%', #{dictName}, '%')
+            </if>
+            <if test="module != null and module != ''">
+                AND module = #{module}
+            </if>
+            <if test="status != null and status != ''">
+                AND status = #{status}
+            </if>
+            <if test="dictType != null and dictType != ''">
+                AND dict_type like concat('%', #{dictType}, '%')
+            </if>
+            <if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
+                and date_format(create_time,'%y%m%d') &gt;= date_format(#{params.beginTime},'%y%m%d')
+            </if>
+            <if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
+                and date_format(create_time,'%y%m%d') &lt;= date_format(#{params.endTime},'%y%m%d')
+            </if>
+            <if test="tenantId != null">
+                <!-- 租户检索 -->
+                and (default_dict = 1 or tenant_id = #{tenantId})
+            </if>
+        </where>
+    </select>
 
-	<select id="selectDictTypeListByIds" parameterType="Long" resultMap="SysDictTypeResult">
-		<include refid="selectDictTypeVo"/>
-		where dict_id in
-		<foreach collection="list" item="userId" open="(" separator="," close=")">
-			#{userId}
-		</foreach>
-	</select>
+    <select id="selectDictTypeListByIds" parameterType="Long" resultMap="SysDictTypeResult">
+        <include refid="selectDictTypeVo"/>
+        where dict_id in
+        <foreach collection="list" item="userId" open="(" separator="," close=")">
+            #{userId}
+        </foreach>
+    </select>
 
-	<select id="selectDictTypeAll" resultMap="SysDictTypeResult">
-		<include refid="selectDictTypeVo"/>
-	</select>
+    <select id="selectDictTypeAll" resultMap="SysDictTypeResult">
+        <include refid="selectDictTypeVo"/>
+    </select>
 
-	<select id="selectDictTypeById" parameterType="Long" resultMap="SysDictTypeResult">
-		<include refid="selectDictTypeVo"/>
-		where dict_id = #{dictId}
-	</select>
+    <select id="selectDictTypeById" parameterType="Long" resultMap="SysDictTypeResult">
+        <include refid="selectDictTypeVo"/>
+        where dict_id = #{dictId}
+    </select>
 
-	<select id="selectDictTypeByType" parameterType="String" resultMap="SysDictTypeResult">
-		<include refid="selectDictTypeVo"/>
-		where dict_type = #{dictType}
-	</select>
+    <select id="selectDictTypeByType" parameterType="String" resultMap="SysDictTypeResult">
+        <include refid="selectDictTypeVo"/>
+        where dict_type = #{dictType}
+    </select>
 
-	<select id="checkDictTypeUnique" parameterType="String" resultMap="SysDictTypeResult">
-		<include refid="selectDictTypeVo"/>
-		where dict_type = #{dictType} limit 1
-	</select>
+    <select id="checkDictTypeUnique" parameterType="String" resultMap="SysDictTypeResult">
+        <include refid="selectDictTypeVo"/>
+        where dict_type = #{dictType} limit 1
+    </select>
 
-	<delete id="deleteDictTypeById" parameterType="Long">
- 		delete from sys_dict_type where dict_id = #{dictId}
- 	</delete>
+    <delete id="deleteDictTypeById" parameterType="Long">
+        delete from sys_dict_type where dict_id = #{dictId}
+    </delete>
 
- 	<delete id="deleteDictTypeByIds" parameterType="Long">
- 		delete from sys_dict_type where dict_id in
- 		<foreach collection="array" item="dictId" open="(" separator="," close=")">
- 			#{dictId}
+    <delete id="deleteDictTypeByIds" parameterType="Long">
+        delete from sys_dict_type where dict_id in
+        <foreach collection="array" item="dictId" open="(" separator="," close=")">
+            #{dictId}
         </foreach>
- 	</delete>
-
- 	<update id="updateDictType" parameterType="SysDictType">
- 		update sys_dict_type
- 		<set>
- 			<if test="dictName != null and dictName != ''">dict_name = #{dictName},</if>
- 			<if test="dictType != null and dictType != ''">dict_type = #{dictType},</if>
- 			<if test="status != null">status = #{status},</if>
- 			<if test="remark != null">remark = #{remark},</if>
- 			<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
- 			update_time = sysdate()
- 		</set>
- 		where dict_id = #{dictId}
-	</update>
+    </delete>
 
- 	<insert id="insertDictType" parameterType="SysDictType">
- 		insert into sys_dict_type(
- 			<if test="dictName != null and dictName != ''">dict_name,</if>
- 			<if test="dictType != null and dictType != ''">dict_type,</if>
- 			<if test="status != null">status,</if>
- 			<if test="remark != null and remark != ''">remark,</if>
- 			<if test="createBy != null and createBy != ''">create_by,</if>
- 			create_time
- 		)values(
- 			<if test="dictName != null and dictName != ''">#{dictName},</if>
- 			<if test="dictType != null and dictType != ''">#{dictType},</if>
- 			<if test="status != null">#{status},</if>
- 			<if test="remark != null and remark != ''">#{remark},</if>
- 			<if test="createBy != null and createBy != ''">#{createBy},</if>
- 			sysdate()
- 		)
-	</insert>
+    <update id="updateDictType" parameterType="SysDictType">
+        update sys_dict_type
+        <set>
+            <if test="dictName != null and dictName != ''">dict_name = #{dictName},</if>
+            <if test="dictType != null and dictType != ''">dict_type = #{dictType},</if>
+            <if test="status != null">status = #{status},</if>
+            <if test="remark != null">remark = #{remark},</if>
+            <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
+            update_time = sysdate()
+        </set>
+        where dict_id = #{dictId}
+    </update>
 
+    <insert id="insertDictType" parameterType="SysDictType">
+        insert into sys_dict_type(
+        <if test="dictName != null and dictName != ''">dict_name,</if>
+        <if test="dictType != null and dictType != ''">dict_type,</if>
+        <if test="status != null">status,</if>
+        <if test="module != null and module != ''">module,</if>
+        <if test="remark != null and remark != ''">remark,</if>
+        <if test="createBy != null and createBy != ''">create_by,</if>
+        create_time
+        )values(
+        <if test="dictName != null and dictName != ''">#{dictName},</if>
+        <if test="dictType != null and dictType != ''">#{dictType},</if>
+        <if test="status != null">#{status},</if>
+        <if test="module != null and remark != ''">#{module},</if>
+        <if test="remark != null and remark != ''">#{remark},</if>
+        <if test="createBy != null and createBy != ''">#{createBy},</if>
+        sysdate()
+        )
+    </insert>
 </mapper>