ezhizao_zx 1 年之前
父節點
當前提交
853374d7a3
共有 63 個文件被更改,包括 1633 次插入94 次删除
  1. 39 0
      src/main/java/cn/ezhizao/common/utils/poi/ExcelUtil.java
  2. 2 2
      src/main/java/cn/ezhizao/framework/web/domain/BaseEntity.java
  3. 46 1
      src/main/java/cn/ezhizao/project/business/deduction/controller/DeductionController.java
  4. 19 1
      src/main/java/cn/ezhizao/project/business/deduction/domain/BizDeduction.java
  5. 28 1
      src/main/java/cn/ezhizao/project/business/finance/IndividualIncomeTax/controller/BizFinancialIndividualIncomeTaxController.java
  6. 1 0
      src/main/java/cn/ezhizao/project/business/finance/IndividualIncomeTax/controller/BizFinancialIndividualIncomeTaxDetailController.java
  7. 18 0
      src/main/java/cn/ezhizao/project/business/finance/IndividualIncomeTax/domain/BizFinancialIndividualIncomeTax.java
  8. 1 0
      src/main/java/cn/ezhizao/project/business/finance/IndividualIncomeTaxIsZero/controller/BizFinancialIndividualIncomeTaxDetailIsZeroController.java
  9. 26 1
      src/main/java/cn/ezhizao/project/business/finance/IndividualIncomeTaxIsZero/controller/BizFinancialIndividualIncomeTaxIsZeroController.java
  10. 20 1
      src/main/java/cn/ezhizao/project/business/finance/IndividualIncomeTaxIsZero/domain/BizFinancialIndividualIncomeTaxIsZero.java
  11. 78 0
      src/main/java/cn/ezhizao/project/business/housingFund/controller/BizHousingFundConfirmController.java
  12. 60 0
      src/main/java/cn/ezhizao/project/business/housingFund/controller/BizHousingFundDeclareController.java
  13. 23 0
      src/main/java/cn/ezhizao/project/business/housingFund/domain/BizHousingFundConfirm.java
  14. 19 0
      src/main/java/cn/ezhizao/project/business/housingFund/domain/BizHousingFundConfirmDetailEmployee.java
  15. 21 0
      src/main/java/cn/ezhizao/project/business/housingFund/domain/BizHousingFundDeclare.java
  16. 2 0
      src/main/java/cn/ezhizao/project/business/housingFund/service/IBizHousingFundConfirmService.java
  17. 77 0
      src/main/java/cn/ezhizao/project/business/housingFund/service/impl/BizHousingFundConfirmServiceImpl.java
  18. 61 2
      src/main/java/cn/ezhizao/project/business/keepAccounts/controller/BizFinancialKeepAccountController.java
  19. 18 0
      src/main/java/cn/ezhizao/project/business/keepAccounts/domain/BizFinancialKeepAccount.java
  20. 43 0
      src/main/java/cn/ezhizao/project/business/receiveTicket/controller/BizFinancialReceiveTicketController.java
  21. 14 0
      src/main/java/cn/ezhizao/project/business/receiveTicket/controller/BizFinancialReceiveTicketFeedbackController.java
  22. 21 1
      src/main/java/cn/ezhizao/project/business/receiveTicket/domain/BizFinancialReceiveTicket.java
  23. 25 4
      src/main/java/cn/ezhizao/project/business/receiveTicket/domain/BizFinancialReceiveTicketFeedback.java
  24. 56 0
      src/main/java/cn/ezhizao/project/business/reportTax/controller/BizFinancialReportTaxNonZeroController.java
  25. 24 0
      src/main/java/cn/ezhizao/project/business/reportTax/domain/BizFinancialReportTaxNonZero.java
  26. 55 0
      src/main/java/cn/ezhizao/project/business/reportTaxIsZero/controller/BizFinancialReportTaxController.java
  27. 28 0
      src/main/java/cn/ezhizao/project/business/reportTaxIsZero/domain/BizFinancialReportTax.java
  28. 81 1
      src/main/java/cn/ezhizao/project/business/salary/controller/BizFinancialSalaryController.java
  29. 73 11
      src/main/java/cn/ezhizao/project/business/salary/controller/BizFinancialSalaryZeroController.java
  30. 25 1
      src/main/java/cn/ezhizao/project/business/salary/domain/BizFinancialSalary.java
  31. 4 1
      src/main/java/cn/ezhizao/project/business/salary/domain/BizFinancialSalaryDetail.java
  32. 33 25
      src/main/java/cn/ezhizao/project/business/salary/domain/BizFinancialSalaryDetailEmployee.java
  33. 1 0
      src/main/java/cn/ezhizao/project/business/salary/service/IBizFinancialSalaryDetailEmployeeService.java
  34. 4 0
      src/main/java/cn/ezhizao/project/business/salary/service/IBizFinancialSalaryDetailService.java
  35. 3 0
      src/main/java/cn/ezhizao/project/business/salary/service/IBizFinancialSalaryService.java
  36. 12 1
      src/main/java/cn/ezhizao/project/business/salary/service/impl/BizFinancialSalaryDetailEmployeeServiceImpl.java
  37. 8 0
      src/main/java/cn/ezhizao/project/business/salary/service/impl/BizFinancialSalaryDetailServiceImpl.java
  38. 87 0
      src/main/java/cn/ezhizao/project/business/salary/service/impl/BizFinancialSalaryServiceImpl.java
  39. 91 10
      src/main/java/cn/ezhizao/project/business/socialSecurity/controller/SocialSecurityConfirmController.java
  40. 77 2
      src/main/java/cn/ezhizao/project/business/socialSecurity/controller/SocialSecurityDeclareController.java
  41. 18 0
      src/main/java/cn/ezhizao/project/business/socialSecurity/domain/BizSocialSecurityConfirm.java
  42. 22 1
      src/main/java/cn/ezhizao/project/business/socialSecurity/domain/BizSocialSecurityConfirmDetailEmployee.java
  43. 17 0
      src/main/java/cn/ezhizao/project/business/socialSecurity/domain/BizSocialSecurityDeclare.java
  44. 3 0
      src/main/java/cn/ezhizao/project/business/socialSecurity/domain/BizSocialSecurityDeclareDetail.java
  45. 1 0
      src/main/java/cn/ezhizao/project/business/socialSecurity/service/IBizSocialSecurityConfirmDetailService.java
  46. 2 0
      src/main/java/cn/ezhizao/project/business/socialSecurity/service/IBizSocialSecurityConfirmService.java
  47. 77 0
      src/main/java/cn/ezhizao/project/business/socialSecurity/service/impl/BizSocialSecurityConfirmServiceImpl.java
  48. 48 0
      src/main/java/cn/ezhizao/project/business/workOrder/controller/OnceWorkOrderProductionController.java
  49. 28 13
      src/main/java/cn/ezhizao/project/business/workOrder/domain/BizWorkOrder.java
  50. 3 0
      src/main/java/cn/ezhizao/project/system/domain/SysFileStorage.java
  51. 0 1
      src/main/resources/application-dev.yml
  52. 3 0
      src/main/resources/mybatis/business/BizFinancialIndividualIncomeTaxMapper.xml
  53. 6 0
      src/main/resources/mybatis/business/BizFinancialKeepAccountMapper.xml
  54. 6 0
      src/main/resources/mybatis/business/BizFinancialReceiveTicketMapper.xml
  55. 3 0
      src/main/resources/mybatis/business/BizFinancialReportTaxDetailMapper.xml
  56. 3 0
      src/main/resources/mybatis/business/BizFinancialReportTaxDetailNonZeroMapper.xml
  57. 6 0
      src/main/resources/mybatis/business/BizFinancialSalaryMapper.xml
  58. 13 0
      src/main/resources/mybatis/business/BizHousingFundConfirmMapper.xml
  59. 9 4
      src/main/resources/mybatis/business/BizHousingFundDeclareDetailMapper.xml
  60. 8 0
      src/main/resources/mybatis/business/BizHousingFundDeclareMapper.xml
  61. 7 0
      src/main/resources/mybatis/business/BizSocialSecurityConfirmMapper.xml
  62. 20 5
      src/main/resources/mybatis/business/BizSocialSecurityDeclareDetailMapper.xml
  63. 6 4
      src/main/resources/templates/socialSecurityTemplate.html

+ 39 - 0
src/main/java/cn/ezhizao/common/utils/poi/ExcelUtil.java

@@ -690,8 +690,10 @@ public class ExcelUtil<T>
                 }
             }
             int column = 0;
+            int columnNum = 0;
             for (Object[] os : fields)
             {
+                columnNum++;
                 Field field = (Field) os[0];
                 Excel excel = (Excel) os[1];
                 if (Collection.class.isAssignableFrom(field.getType()) && StringUtils.isNotNull(subList))
@@ -713,6 +715,7 @@ public class ExcelUtil<T>
                                 subField.setAccessible(true);
                                 Excel attr = subField.getAnnotation(Excel.class);
                                 this.addCell(attr, row, (T) obj, subField, column + subIndex);
+
                             }
                             subIndex++;
                         }
@@ -723,7 +726,9 @@ public class ExcelUtil<T>
                 else
                 {
                     this.addCell(excel, row, vo, field, column++);
+
                 }
+                setSizeColumn(sheet,columnNum-1);
             }
         }
     }
@@ -868,14 +873,48 @@ public class ExcelUtil<T>
         {
             // 填充默认样式,防止合并单元格样式失效
             sheet.setDefaultColumnStyle(column, styles.get(StringUtils.format("data_{}_{}_{}", attr.align(), attr.color(), attr.backgroundColor())));
+
             if (attr.needMerge())
             {
                 sheet.addMergedRegion(new CellRangeAddress(rownum - 1, rownum, column, column));
+
             }
         }
         return cell;
     }
 
+    /**
+     * 自适应宽度(中文支持)
+     *
+     * @param sheet sheet
+     * @param size  因为for循环从0开始,size值为 列数-1
+     */
+    public  void setSizeColumn(Sheet sheet, int size) {
+        for (int columnNum = 0; columnNum <= size; columnNum++) {
+            int columnWidth = sheet.getColumnWidth(columnNum) / 256;
+            for (int rowNum = 0; rowNum <= sheet.getLastRowNum(); rowNum++) {
+                Row currentRow;
+                //当前行未被使用过
+                if (sheet.getRow(rowNum) == null) {
+                    currentRow = sheet.createRow(rowNum);
+                } else {
+                    currentRow = sheet.getRow(rowNum);
+                }
+
+                if (currentRow.getCell(columnNum) != null) {
+                    Cell currentCell = currentRow.getCell(columnNum);
+                    if (currentCell.getCellType() == CellType.STRING) {
+                        int length = currentCell.getStringCellValue().getBytes().length;
+                        if (columnWidth < length) {
+                            columnWidth = length;
+                        }
+                    }
+                }
+            }
+            sheet.setColumnWidth(columnNum, columnWidth * 256);
+        }
+    }
+
     /**
      * 设置单元格信息
      *

+ 2 - 2
src/main/java/cn/ezhizao/framework/web/domain/BaseEntity.java

@@ -40,7 +40,7 @@ public class BaseEntity implements Serializable
     /** 创建时间 */
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     @TableField(value="create_time",fill= FieldFill.INSERT)
-    @Excel(name = "发单日期", width = 30, dateFormat = "yyyy-MM-dd",sort = 6)
+//    @Excel(name = "发单日期", width = 30, dateFormat = "yyyy-MM-dd",sort = 6)
     private Date createTime;
 
     /** 更新者 */
@@ -71,7 +71,7 @@ public class BaseEntity implements Serializable
     private Date updateTime;
 
     /** 备注 */
-    @Excel(name = "备注")
+//    @Excel(name = "备注",sort = 99)
     private String remark;
 
     /** 请求参数 */

+ 46 - 1
src/main/java/cn/ezhizao/project/business/deduction/controller/DeductionController.java

@@ -1,6 +1,9 @@
 package cn.ezhizao.project.business.deduction.controller;
 
 import cn.ezhizao.common.utils.SecurityUtils;
+import cn.ezhizao.common.utils.poi.ExcelUtil;
+import cn.ezhizao.framework.aspectj.lang.annotation.Log;
+import cn.ezhizao.framework.aspectj.lang.enums.BusinessType;
 import cn.ezhizao.framework.web.controller.BaseController;
 import cn.ezhizao.framework.web.domain.AjaxResult;
 import cn.ezhizao.framework.web.page.TableDataInfo;
@@ -14,6 +17,8 @@ import cn.ezhizao.project.business.financialBase.domain.BizFinancialMerge;
 import cn.ezhizao.project.business.financialBase.service.IBizFinancialMergeService;
 import cn.ezhizao.project.business.housingFund.domain.BizHousingFundDeclareDetail;
 import cn.ezhizao.project.business.housingFund.service.IBizHousingFundDeclareDetailService;
+import cn.ezhizao.project.business.receiveTicket.domain.BizFinancialReceiveTicket;
+import cn.ezhizao.project.business.receiveTicket.domain.BizFinancialReceiveTicketDetail;
 import cn.ezhizao.project.business.reportTaxIsZero.domain.BizFinancialReportTaxDetail;
 import cn.ezhizao.project.business.reportTaxIsZero.service.IBizFinancialReportTaxDetailService;
 import cn.ezhizao.project.business.socialSecurity.domain.BizSocialSecurityDeclareDetail;
@@ -29,6 +34,7 @@ import org.springframework.transaction.annotation.Transactional;
 import org.springframework.web.bind.annotation.*;
 
 import javax.annotation.Resource;
+import javax.servlet.http.HttpServletResponse;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
@@ -85,7 +91,7 @@ public class DeductionController extends BaseController {
                 result = result && addRecord(deduction.getWorkOrderId(), deduction.getYear(), deduction.getMonth(), SecurityUtils.getUserId(), "确认扣款", 1);
                 break;
             case 2:
-                result = result && addRecord(deduction.getWorkOrderId(), deduction.getYear(), deduction.getMonth(), SecurityUtils.getUserId(), "已扣款", 2);
+                result = result && addRecord(deduction.getWorkOrderId(), deduction.getYear(), deduction.getMonth(), SecurityUtils.getUserId(), "已扣款", 3);
                 break;
             case 4:
                 result = result && addRecord(deduction.getWorkOrderId(), deduction.getYear(), deduction.getMonth(), SecurityUtils.getUserId(), "扣款失败", 1);
@@ -189,6 +195,45 @@ public class DeductionController extends BaseController {
         }
     }
 
+    /**
+     * 导出划款列表
+     */
+    @PreAuthorize("@ss.hasPermi('business:deduction:export')")
+    @Log(title = "划款任务", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, BizDeduction bizDeduction) throws NoSuchFieldException, IllegalAccessException
+    {
+        setTenantId(bizDeduction);
+        startOrderBy();
+        List<BizDeduction> list = deductionService.getListByBean(bizDeduction);
+        for(BizDeduction l : list){
+            l.setCurrentMonth(l.getYear()+"-"+l.getMonth());
+            //设置状态
+            switch (l.getStatus()) {
+                case 0:
+                    l.setStatusType("待确认扣款");
+                    break;
+                case 1:
+                    l.setStatusType("可扣款");
+                    break;
+                case 3:
+                    l.setStatusType("已扣款");
+                    break;
+                case 5:
+                    l.setStatusType("已申报");
+                    break;
+                case 4:
+                    l.setStatusType("扣款失败");
+                    break;
+                default:
+                    break;
+            }
+
+        }
+        ExcelUtil<BizDeduction> util = new ExcelUtil<BizDeduction>(BizDeduction.class);
+        util.exportExcel(response, list, "划款数据");
+    }
+
     @ApiOperation(value = "带条件List 分页查询", notes = "带条件List 分页查询")
     @PostMapping("/getAmountView")
     @ResponseBody

+ 19 - 1
src/main/java/cn/ezhizao/project/business/deduction/domain/BizDeduction.java

@@ -1,5 +1,6 @@
 package cn.ezhizao.project.business.deduction.domain;
 
+import cn.ezhizao.framework.aspectj.lang.annotation.Excel;
 import cn.ezhizao.framework.web.domain.BaseEntity;
 import cn.ezhizao.project.system.domain.SysFileStorage;
 import com.baomidou.mybatisplus.annotation.TableField;
@@ -22,18 +23,25 @@ import java.util.List;
 @EqualsAndHashCode(callSuper = true)
 public class BizDeduction extends BaseEntity implements Serializable {
     private static final long serialVersionUID = 1L;
+    @Excel(name = "金额",sort = 5)
     @ApiModelProperty(value = "金额")
     private BigDecimal amount;
 
-    @ApiModelProperty(value = "状态 0-待确认扣款,1可扣款 2已扣款 4-驳回待处理")
+    @ApiModelProperty(value = "状态 0-待确认扣款,1可扣款 3已扣款 4-驳回待处理")
     private Integer status;
 
+
+    @Excel(name = "状态",sort = 9)
+    @TableField(exist = false)
+    private String statusType;
+
     @ApiModelProperty(value = "来源id")
     private Long sourceId;
 
     @ApiModelProperty(value = "客户id")
     private Long companyId;
 
+    @Excel(name = "客户名称",sort = 1)
     @ApiModelProperty(value = "客户名")
     @TableField(exist = false)
     private String companyName;
@@ -47,16 +55,19 @@ public class BizDeduction extends BaseEntity implements Serializable {
     @ApiModelProperty(value = "来源表名")
     private String sourceTableName;
 
+    @Excel(name = "来源名",sort = 5)
     @ApiModelProperty(value = "来源名 报税/社保/公积金")
     private String sourceName;
 
     @ApiModelProperty(value = "确认人id")
     private Long confirmId;
 
+    @Excel(name = "确认人" ,sort = 5)
     @ApiModelProperty(value = "确认人")
     @TableField(exist = false)
     private String confirmName;
 
+    @Excel(name = "确认时间", width = 30, dateFormat = "yyyy-MM-dd hh:mm:ss",sort = 6)
     @ApiModelProperty(value = "确认时间")
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     private Timestamp confirmDate;
@@ -64,10 +75,12 @@ public class BizDeduction extends BaseEntity implements Serializable {
     @ApiModelProperty(value = "操作人id")
     private Long operationId;
 
+    @Excel(name = "操作人",sort = 7)
     @ApiModelProperty(value = "操作人")
     @TableField(exist = false)
     private String operationName;
 
+    @Excel(name = "操作时间", width = 30, dateFormat = "yyyy-MM-dd hh:mm:ss",sort = 8)
     @ApiModelProperty(value = "操作时间")
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     private Timestamp operationDate;
@@ -83,13 +96,18 @@ public class BizDeduction extends BaseEntity implements Serializable {
     @ApiModelProperty("可扣款")
     private Integer deductible;
 
+    @Excel(name = "来源",sort = 2)
     @TableField(exist = false)
     private String fromCompanyName;
     @TableField(exist = false)
     private String fromTenantId;
+
+    @Excel(name = "纳税性质",sort = 3)
     @TableField(exist = false)
     private String taxType;
 
+
+    @Excel(name = "扣款期",sort = 4)
     @TableField(exist = false)
     private String currentMonth;
 

+ 28 - 1
src/main/java/cn/ezhizao/project/business/finance/IndividualIncomeTax/controller/BizFinancialIndividualIncomeTaxController.java

@@ -9,6 +9,8 @@ import cn.ezhizao.framework.web.page.TableDataInfo;
 import cn.ezhizao.project.business.finance.IndividualIncomeTax.domain.BizFinancialIndividualIncomeTax;
 import cn.ezhizao.project.business.finance.IndividualIncomeTax.domain.BizFinancialIndividualIncomeTaxDetail;
 import cn.ezhizao.project.business.finance.IndividualIncomeTax.service.IBizFinancialIndividualIncomeTaxService;
+import cn.ezhizao.project.business.finance.IndividualIncomeTaxIsZero.domain.BizFinancialIndividualIncomeTaxDetailIsZero;
+import cn.ezhizao.project.business.finance.IndividualIncomeTaxIsZero.domain.BizFinancialIndividualIncomeTaxIsZero;
 import cn.ezhizao.project.business.salary.domain.BizFinancialSalary;
 import cn.ezhizao.project.business.salary.domain.BizFinancialSalaryDetail;
 import cn.ezhizao.project.business.salary.domain.BizFinancialSalaryDetailEmployee;
@@ -99,8 +101,33 @@ public class BizFinancialIndividualIncomeTaxController extends BaseController
     {
         setTenantId(bizFinancialIndividualIncomeTax);
         List<BizFinancialIndividualIncomeTax> list = bizFinancialIndividualIncomeTaxService.getList(bizFinancialIndividualIncomeTax);
+        for(BizFinancialIndividualIncomeTax l:list){
+            l.setCurrentPeriod(bizFinancialIndividualIncomeTax.getYear()+"-"+bizFinancialIndividualIncomeTax.getMonth());
+            BizFinancialIndividualIncomeTaxDetail detail=bizFinancialIndividualIncomeTaxService.getTaxDetail(bizFinancialIndividualIncomeTax.getYear(),bizFinancialIndividualIncomeTax.getMonth(),l.getId());
+            if(detail!=null){
+                switch (detail.getStatus()){
+                    case 0:
+                        l.setStatusText("未开始");
+                        l.setMakeOut("未填写");
+                        break;
+                    case 1:
+                        l.setStatusText("进行中");
+                        l.setMakeOut("进行中");
+                        break;
+                    case 3:
+                        l.setStatusText("已完成");
+                        l.setMakeOut("已填写");
+                        break;
+                    default:
+                        break;
+                }
+            }else{
+                l.setStatusText("未开始");
+                l.setMakeOut("未填写");
+            }
+        }
         ExcelUtil<BizFinancialIndividualIncomeTax> util = new ExcelUtil<BizFinancialIndividualIncomeTax>(BizFinancialIndividualIncomeTax.class);
-        util.exportExcel(response, list, "个税任务数据");
+        util.exportExcel(response, list, "个税非零申报数据");
     }
 
     /**

+ 1 - 0
src/main/java/cn/ezhizao/project/business/finance/IndividualIncomeTax/controller/BizFinancialIndividualIncomeTaxDetailController.java

@@ -147,6 +147,7 @@ public class BizFinancialIndividualIncomeTaxDetailController extends BaseControl
                 status = "个税已完成";
                 break;
         }
+        bizFinancialIndividualIncomeTaxDetail.setVerifierId(getUserId());
         List<SysFileStorage> fileStorages = bizFinancialIndividualIncomeTaxDetail.getReportFiles();
         bool = bool && checkDeduction(bizFinancialIndividualIncomeTaxDetail);
         fileStorages.forEach(l -> {

+ 18 - 0
src/main/java/cn/ezhizao/project/business/finance/IndividualIncomeTax/domain/BizFinancialIndividualIncomeTax.java

@@ -1,5 +1,6 @@
 package cn.ezhizao.project.business.finance.IndividualIncomeTax.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;
@@ -23,6 +24,7 @@ public class BizFinancialIndividualIncomeTax extends BaseEntity implements Seria
     private Long companyId;
 
     @ApiModelProperty(value = "客户")
+    @Excel(name = "客户名称",sort = 1)
     @TableField(exist = false)
     private String companyName;
 
@@ -31,12 +33,17 @@ public class BizFinancialIndividualIncomeTax extends BaseEntity implements Seria
     private String companyLevel;
 
     @ApiModelProperty(value = "纳税性质")
+    @Excel(name = "纳税性质",sort = 4)
     @TableField(exist = false)
     private String taxType;
 
     @ApiModelProperty(value = "账套外键")
     private Integer accountSetsId;
 
+    @Excel(name = "个税所属期",sort = 5)
+    @TableField(exist = false)
+    private String currentPeriod;
+
     /** 主程序账套外键 */
     @ApiModelProperty(value = "系统外键")
     private Long tenantId;
@@ -64,10 +71,12 @@ public class BizFinancialIndividualIncomeTax extends BaseEntity implements Seria
 
     //税号
     @TableField(exist = false)
+    @Excel(name = "税号",sort = 3)
     private String socialCreditCode;
 
     //来源
     @TableField(exist = false)
+    @Excel(name = "来源",sort = 2)
     private String fromCompanyName;
 
     @TableField(exist = false)
@@ -84,8 +93,17 @@ public class BizFinancialIndividualIncomeTax extends BaseEntity implements Seria
     private Long principal;
 
     //执行人
+    @Excel(name = "执行人",sort = 8)
     @TableField(exist = false)
     private String serviceName;
 
+    @Excel(name = "状态",sort = 7)
+    @TableField(exist = false)
+    private String statusText;
+
+    @Excel(name = "个税填写",sort = 6)
+    @TableField(exist = false)
+    private String makeOut;
+
 
 }

+ 1 - 0
src/main/java/cn/ezhizao/project/business/finance/IndividualIncomeTaxIsZero/controller/BizFinancialIndividualIncomeTaxDetailIsZeroController.java

@@ -134,6 +134,7 @@ public class BizFinancialIndividualIncomeTaxDetailIsZeroController extends BaseC
                 break;
 
         }
+        bizFinancialIndividualIncomeTaxDetail.setVerifierId(getUserId());
         return toAjax(bizFinancialIndividualIncomeTaxDetailService.updateById(bizFinancialIndividualIncomeTaxDetail)&&addRecord(bizFinancialIndividualIncomeTaxDetail.getCompanyId(),bizFinancialIndividualIncomeTaxDetail.getFinancialIndividualIncomeTaxId(),
 
                 bizFinancialIndividualIncomeTaxDetail.getYear(),bizFinancialIndividualIncomeTaxDetail.getMonth(), SecurityUtils.getUserId(),status));

+ 26 - 1
src/main/java/cn/ezhizao/project/business/finance/IndividualIncomeTaxIsZero/controller/BizFinancialIndividualIncomeTaxIsZeroController.java

@@ -108,8 +108,33 @@ public class BizFinancialIndividualIncomeTaxIsZeroController extends BaseControl
     {
         setTenantId(bizFinancialIndividualIncomeTax);
         List<BizFinancialIndividualIncomeTaxIsZero> list = bizFinancialIndividualIncomeTaxService.getList(bizFinancialIndividualIncomeTax);
+        for(BizFinancialIndividualIncomeTaxIsZero l:list){
+            l.setCurrentPeriod(bizFinancialIndividualIncomeTax.getYear()+"-"+bizFinancialIndividualIncomeTax.getMonth());
+            BizFinancialIndividualIncomeTaxDetailIsZero detail=bizFinancialIndividualIncomeTaxService.getTaxDetail(bizFinancialIndividualIncomeTax.getYear(),bizFinancialIndividualIncomeTax.getMonth(),l.getId());
+            if(detail!=null){
+                switch (detail.getStatus()){
+                    case 0:
+                        l.setStatusText("未开始");
+                        l.setMakeOut("未填写");
+                        break;
+                    case 1:
+                        l.setStatusText("进行中");
+                        l.setMakeOut("进行中");
+                        break;
+                    case 3:
+                        l.setStatusText("已完成");
+                        l.setMakeOut("已填写");
+                        break;
+                    default:
+                        break;
+                }
+            }else{
+                l.setStatusText("未开始");
+                l.setMakeOut("未填写");
+            }
+        }
         ExcelUtil<BizFinancialIndividualIncomeTaxIsZero> util = new ExcelUtil<BizFinancialIndividualIncomeTaxIsZero>(BizFinancialIndividualIncomeTaxIsZero.class);
-        util.exportExcel(response, list, "个税任务数据");
+        util.exportExcel(response, list, "个税零申报数据");
     }
 
     /**

+ 20 - 1
src/main/java/cn/ezhizao/project/business/finance/IndividualIncomeTaxIsZero/domain/BizFinancialIndividualIncomeTaxIsZero.java

@@ -24,7 +24,7 @@ public class BizFinancialIndividualIncomeTaxIsZero extends BaseEntity implements
     private Long companyId;
 
     @ApiModelProperty(value = "客户")
-    @Excel(name = "客户")
+    @Excel(name = "客户名称",sort = 1)
     @TableField(exist = false)
     private String companyName;
 
@@ -33,9 +33,23 @@ public class BizFinancialIndividualIncomeTaxIsZero extends BaseEntity implements
     private String companyLevel;
 
     @ApiModelProperty(value = "纳税性质")
+    @Excel(name = "纳税性质",sort = 4)
     @TableField(exist = false)
     private String taxType;
 
+    @ApiModelProperty(value = "个税所属期")
+    @Excel(name = "个税所属期",sort = 5)
+    @TableField(exist = false)
+    private String currentPeriod;
+
+    @Excel(name = "个税填写",sort = 6)
+    @TableField(exist = false)
+    private String makeOut;
+
+    @Excel(name = "状态",sort = 7)
+    @TableField(exist = false)
+    private String statusText;
+
     @ApiModelProperty(value = "账套外键")
     private Integer accountSetsId;
 
@@ -49,6 +63,8 @@ public class BizFinancialIndividualIncomeTaxIsZero extends BaseEntity implements
     @ApiModelProperty(value = "全部维护人员")
     private String employeeIds;
 
+
+
     @ApiModelProperty(value = "工单外键")
     private Long workOrderId;
 
@@ -66,10 +82,12 @@ public class BizFinancialIndividualIncomeTaxIsZero extends BaseEntity implements
 
     //税号
     @TableField(exist = false)
+    @Excel(name = "税号",sort = 3)
     private String socialCreditCode;
 
     //来源
     @TableField(exist = false)
+    @Excel(name = "来源",sort = 2)
     private String fromCompanyName;
 
     @TableField(exist = false)
@@ -87,6 +105,7 @@ public class BizFinancialIndividualIncomeTaxIsZero extends BaseEntity implements
 
     //执行人
     @TableField(exist = false)
+    @Excel(name = "执行人",sort = 8)
     private String serviceName;
 
 

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

@@ -2,6 +2,9 @@ package cn.ezhizao.project.business.housingFund.controller;
 
 import cn.ezhizao.common.utils.PdfUtil;
 import cn.ezhizao.common.utils.SecurityUtils;
+import cn.ezhizao.common.utils.poi.ExcelUtil;
+import cn.ezhizao.framework.aspectj.lang.annotation.Log;
+import cn.ezhizao.framework.aspectj.lang.enums.BusinessType;
 import cn.ezhizao.framework.web.controller.BaseController;
 import cn.ezhizao.framework.web.domain.AjaxResult;
 import cn.ezhizao.framework.web.page.TableDataInfo;
@@ -11,10 +14,13 @@ import cn.ezhizao.project.business.housingFund.domain.*;
 import cn.ezhizao.project.business.housingFund.service.*;
 import cn.ezhizao.project.business.salary.domain.BizFinancialSalaryDetail;
 import cn.ezhizao.project.business.salary.domain.BizFinancialSalaryDetailEmployee;
+import cn.ezhizao.project.business.socialSecurity.domain.BizSocialSecurityConfirm;
 import cn.ezhizao.project.business.socialSecurity.domain.BizSocialSecurityConfirmDetail;
 import cn.ezhizao.project.business.socialSecurity.domain.BizSocialSecurityConfirmDetailEmployee;
 import cn.ezhizao.project.business.workOrder.domain.BizWorkOrderRecord;
 import cn.ezhizao.project.business.workOrder.service.IBizWorkOrderRecordService;
+import cn.ezhizao.project.system.domain.SysUser;
+import cn.ezhizao.project.system.mapper.SysUserMapper;
 import cn.hutool.core.io.IoUtil;
 import cn.hutool.poi.excel.ExcelWriter;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
@@ -30,6 +36,7 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
 import org.springframework.web.servlet.view.freemarker.FreeMarkerConfigurer;
 
 import javax.annotation.Resource;
@@ -68,6 +75,9 @@ public class BizHousingFundConfirmController extends BaseController {
     @Resource
     IBizWorkOrderRecordService bizWorkOrderRecordService;
 
+    @Resource
+    private SysUserMapper sysUserMapper;
+
     /**
      * 生成pdf
      */
@@ -115,6 +125,16 @@ public class BizHousingFundConfirmController extends BaseController {
         return (financialHousingFundConfirm.getId() == null ? housingFundConfirmService.save(financialHousingFundConfirm) : housingFundConfirmService.updateById(financialHousingFundConfirm)) ? success() : error();
     }
 
+    /**
+     * 导出公积金模板
+     */
+    @Log(title = "导出社保模板", businessType = BusinessType.EXPORT)
+    @PostMapping("/exportHousingFundTemplate")
+    public void exportSalaryTemplate(HttpServletResponse response) throws NoSuchFieldException, IllegalAccessException {
+        ExcelUtil<BizHousingFundConfirmDetailEmployee> util = new ExcelUtil<BizHousingFundConfirmDetailEmployee>(BizHousingFundConfirmDetailEmployee.class);
+        util.importTemplateExcel(response, "公积金模板");
+    }
+
     @PostMapping("/saveBatch")
     @ApiOperation(value = "批量保存", notes = "批量保存")
     @ResponseBody
@@ -365,6 +385,64 @@ public class BizHousingFundConfirmController extends BaseController {
         }
     }
 
+    @Log(title = "公积金导入", businessType = BusinessType.IMPORT)
+    @PreAuthorize("@ss.hasPermi('business:housingFundConfirm:import')")
+    @PostMapping("/importData")
+    public AjaxResult importData(MultipartFile file, @RequestParam String year, @RequestParam String month) throws Exception
+    {
+        ExcelUtil<BizHousingFundConfirmDetailEmployee> util = new ExcelUtil<>(BizHousingFundConfirmDetailEmployee.class);
+        List<BizHousingFundConfirmDetailEmployee> detailList = util.importExcel(file.getInputStream());
+        String message=housingFundConfirmService.importSalary(detailList,year,month,getTenantId()==null?0:getTenantId());
+        return success(message);
+    }
+
+    /**
+     * 导出列表
+     */
+    @PreAuthorize("@ss.hasPermi('business:housingFundConfirm:export')")
+    @Log(title = "个税详情", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, BizHousingFundConfirm housingFundConfirm) throws NoSuchFieldException, IllegalAccessException
+    {
+        setTenantId(housingFundConfirm);
+        startOrderBy();
+        List<BizHousingFundConfirm> list = housingFundConfirmService.getListByBean(housingFundConfirm);
+        for (BizHousingFundConfirm l: list){
+            l.setCurrentPeriod(housingFundConfirm.getYear()+"-"+housingFundConfirm.getMonth());
+            BizHousingFundConfirmDetail detail = new BizHousingFundConfirmDetail();
+            detail.setHousingFundConfirmId(l.getId());
+            detail.setYear(housingFundConfirm.getYear());
+            detail.setMonth(housingFundConfirm.getMonth());
+            List<BizHousingFundConfirmDetail> details = housingFundConfirmDetailService.getListByBean(detail);
+            if(details.size() == 0){
+                l.setStatusText("未开始");
+                l.setServiceName("");
+            }else{
+                detail=details.get(0);
+                SysUser sysUser = sysUserMapper.selectUserById(detail.getVerifierId());
+                l.setServiceName(sysUser==null?"":sysUser.getNickName());
+                switch (detail.getStatus()){
+                    case 0:
+                        l.setStatusText("未开始");
+                        break;
+                    case 2:
+                        l.setStatusText("待审核");
+                        break;
+                    case 3:
+                        l.setStatusText("已完成");
+                        break;
+                    case 4:
+                        l.setStatusText("驳回待处理");
+                        break;
+                    default:
+                        break;
+                }
+            }
+        }
+        ExcelUtil<BizHousingFundConfirm> util = new ExcelUtil<BizHousingFundConfirm>(BizHousingFundConfirm.class);
+        util.exportExcel(response, list, "社保人员确认数据");
+    }
+
     @ApiOperation("导出公积金人员信息")
     @PostMapping("/exportHousingFundConfirmExcel")
     public void exportDetailExcel(@RequestParam Long id, HttpServletResponse response) {

+ 60 - 0
src/main/java/cn/ezhizao/project/business/housingFund/controller/BizHousingFundDeclareController.java

@@ -1,6 +1,9 @@
 package cn.ezhizao.project.business.housingFund.controller;
 
 import cn.ezhizao.common.utils.SecurityUtils;
+import cn.ezhizao.common.utils.poi.ExcelUtil;
+import cn.ezhizao.framework.aspectj.lang.annotation.Log;
+import cn.ezhizao.framework.aspectj.lang.enums.BusinessType;
 import cn.ezhizao.framework.web.controller.BaseController;
 import cn.ezhizao.framework.web.domain.AjaxResult;
 import cn.ezhizao.framework.web.page.TableDataInfo;
@@ -21,6 +24,8 @@ import cn.ezhizao.project.business.socialSecurity.domain.BizSocialSecurityDeclar
 import cn.ezhizao.project.business.workOrder.domain.BizWorkOrderRecord;
 import cn.ezhizao.project.business.workOrder.service.IBizWorkOrderRecordService;
 import cn.ezhizao.project.system.domain.SysFileStorage;
+import cn.ezhizao.project.system.domain.SysUser;
+import cn.ezhizao.project.system.mapper.SysUserMapper;
 import cn.ezhizao.project.system.service.ISysFileStorageService;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
@@ -29,6 +34,7 @@ import org.springframework.transaction.annotation.Transactional;
 import org.springframework.web.bind.annotation.*;
 
 import javax.annotation.Resource;
+import javax.servlet.http.HttpServletResponse;
 import java.math.BigDecimal;
 import java.util.*;
 import java.util.stream.Collectors;
@@ -53,6 +59,8 @@ public class BizHousingFundDeclareController extends BaseController {
     @Resource
     IBizCompanyService companyService;
     @Resource
+    SysUserMapper sysUserMapper;
+    @Resource
     ISysFileStorageService fileStorageService;
     @Resource
     IBizDeductionService deductionService;
@@ -177,6 +185,58 @@ public class BizHousingFundDeclareController extends BaseController {
         return success(housingFundDeclareDetails.get(0));
     }
 
+    /**
+     * 导出列表
+     */
+    @PreAuthorize("@ss.hasPermi('business:socialSecurityConfirm:export')")
+    @Log(title = "社保申报任务", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, BizHousingFundDeclare conditions) throws NoSuchFieldException, IllegalAccessException
+    {
+        setTenantId(conditions);
+        startOrderBy();
+        List<BizHousingFundDeclare> list = housingFundDeclareService.getListByBean(conditions);
+        for (BizHousingFundDeclare l: list){
+            l.setCurrentPeriod(conditions.getYear()+"-"+conditions.getMonth());
+            BizHousingFundDeclareDetail detail = new BizHousingFundDeclareDetail();
+            detail.setHousingFundDeclareId(l.getId());
+            detail.setYear(conditions.getYear());
+            detail.setMonth(conditions.getMonth());
+            List<BizHousingFundDeclareDetail> details = housingFundDeclareDetailService.getListByBean(detail);
+            if(details.size() == 0){
+                l.setStatusText("未开始");
+                l.setMakeOut("未填写");
+            }else{
+                detail=details.get(0);
+                List<BizWorkOrderRecord> records = bizWorkOrderRecordService.query().eq("work_order_id", l.getWorkOrderId()).eq("year", conditions.getYear()).eq("month", conditions.getMonth()).eq("from_id", 0).list();
+                if(records.size()>0){
+                    SysUser sysUser = sysUserMapper.selectUserById(records.get(0).getRecorderId());
+                    l.setServiceName(sysUser==null?"":sysUser.getNickName());
+                }else{
+                    l.setServiceName("");
+                }
+                switch (detail.getStatus()){
+                    case 0:
+                        l.setStatusText("未开始");
+                        l.setMakeOut("未填写");
+                        break;
+                    case 1:
+                        l.setStatusText("进行中");
+                        l.setMakeOut("进行中");
+                        break;
+                    case 3:
+                        l.setStatusText("已完成");
+                        l.setMakeOut("已填写");
+                        break;
+                    default:
+                        break;
+                }
+            }
+        }
+        ExcelUtil<BizHousingFundDeclare> util = new ExcelUtil<BizHousingFundDeclare>(BizHousingFundDeclare.class);
+        util.exportExcel(response, list, "公积金申报任务数据");
+    }
+
     @ApiOperation("保存detail")
     @PostMapping("/saveDetail")
     @PreAuthorize("@ss.hasPermi('business:housingFundDeclare:edit')")

+ 23 - 0
src/main/java/cn/ezhizao/project/business/housingFund/domain/BizHousingFundConfirm.java

@@ -1,5 +1,6 @@
 package cn.ezhizao.project.business.housingFund.domain;
 
+import cn.ezhizao.framework.aspectj.lang.annotation.Excel;
 import cn.ezhizao.framework.web.domain.BaseEntity;
 import com.baomidou.mybatisplus.annotation.FieldFill;
 import com.baomidou.mybatisplus.annotation.TableField;
@@ -35,6 +36,16 @@ public class BizHousingFundConfirm extends BaseEntity implements Serializable {
     @ApiModelProperty(value = "全部维护人员")
     private String employeeIds;
 
+    @Excel(name = "查询期间",sort = 5)
+    @TableField(exist = false)
+    private String currentPeriod;
+
+    //税号
+    @TableField(exist = false)
+    @Excel(name = "税号",sort = 4)
+    private String socialCreditCode;
+
+    @Excel(name = "客户名称",sort = 1)
     @TableField(exist = false)
     private String companyName;
     @TableField(exist = false)
@@ -47,9 +58,11 @@ public class BizHousingFundConfirm extends BaseEntity implements Serializable {
     @TableField(exist = false)
     private List<BizHousingFundConfirmDetail> details;
 
+    @Excel(name = "来源",sort = 2)
     @TableField(exist = false)
     private String fromCompanyName;
 
+    @Excel(name = "纳税性质",sort = 3)
     @TableField(exist = false)
     private String taxType;
 
@@ -67,8 +80,18 @@ public class BizHousingFundConfirm extends BaseEntity implements Serializable {
 
     private Long workOrderId;
 
+
+    @Excel(name = "状态",sort = 6)
+    @TableField(exist = false)
+    private String statusText;
+
     //是否为自己负责(当前登陆人Id)
     @TableField(exist = false)
     private Long principal;
 
+    //执行人
+    @Excel(name = "执行人",sort = 7)
+    @TableField(exist = false)
+    private String serviceName;
+
 }

+ 19 - 0
src/main/java/cn/ezhizao/project/business/housingFund/domain/BizHousingFundConfirmDetailEmployee.java

@@ -1,6 +1,8 @@
 package cn.ezhizao.project.business.housingFund.domain;
 
+import cn.ezhizao.framework.aspectj.lang.annotation.Excel;
 import cn.ezhizao.framework.web.domain.BaseEntity;
+import com.baomidou.mybatisplus.annotation.TableField;
 import lombok.Data;
 import java.math.BigDecimal;
 import java.io.Serializable;
@@ -23,9 +25,15 @@ public class BizHousingFundConfirmDetailEmployee extends BaseEntity implements S
     @ApiModelProperty(value = "月公积金单外键")
     private Long housingFundConfirmDetailId;
 
+    @Excel(name = "客户名称")
+    @TableField(exist = false)
+    private String companyName;
+
+    @Excel(name = "员工姓名")
     @ApiModelProperty(value = "员工姓名")
     private String employeeName;
 
+    @Excel(name = "电话号码")
     @ApiModelProperty(value = "电话号码")
     private String phone;
 
@@ -35,9 +43,11 @@ public class BizHousingFundConfirmDetailEmployee extends BaseEntity implements S
     @ApiModelProperty(value = "身份证反面照片")
     private String idCardImageBack;
 
+    @Excel(name = "基数")
     @ApiModelProperty(value = "基数")
     private BigDecimal cardinalNumber;
 
+    @Excel(name = "比例")
     @ApiModelProperty(value = "比例")
     private BigDecimal ratio;
 
@@ -46,4 +56,13 @@ public class BizHousingFundConfirmDetailEmployee extends BaseEntity implements S
 
     @ApiModelProperty(value = "客户外键")
     private Long companyId;
+
+    @Excel(name = "备注")
+    @ApiModelProperty(value = "备注")
+    private String remark;
+
+    public void setRemark(String remark)
+    {
+        this.remark = remark;
+    }
 }

+ 21 - 0
src/main/java/cn/ezhizao/project/business/housingFund/domain/BizHousingFundDeclare.java

@@ -1,5 +1,6 @@
 package cn.ezhizao.project.business.housingFund.domain;
 
+import cn.ezhizao.framework.aspectj.lang.annotation.Excel;
 import cn.ezhizao.framework.web.domain.BaseEntity;
 import com.baomidou.mybatisplus.annotation.FieldFill;
 import com.baomidou.mybatisplus.annotation.TableField;
@@ -35,6 +36,19 @@ public class BizHousingFundDeclare extends BaseEntity implements Serializable {
     @ApiModelProperty(value = "全部维护人员")
     private String employeeIds;
 
+    @Excel(name = "所属月",sort = 6)
+    @TableField(exist = false)
+    private String currentPeriod;
+
+    @Excel(name = "申报填写",sort = 4)
+    @TableField(exist = false)
+    private String makeOut;
+
+    @Excel(name = "状态",sort = 5)
+    @TableField(exist = false)
+    private String statusText;
+
+    @Excel(name = "客户名称",sort = 1)
     @TableField(exist = false)
     private String companyName;
     @TableField(exist = false)
@@ -50,9 +64,11 @@ public class BizHousingFundDeclare extends BaseEntity implements Serializable {
     @TableField(exist = false)
     private List<BizHousingFundDeclareDetail> details;
 
+    @Excel(name = "来源",sort = 2)
     @TableField(exist = false)
     private String fromCompanyName;
 
+    @Excel(name = "纳税性质",sort = 3)
     @TableField(exist = false)
     private String taxType;
 
@@ -73,4 +89,9 @@ public class BizHousingFundDeclare extends BaseEntity implements Serializable {
     //是否为自己负责(当前登陆人Id)
     @TableField(exist = false)
     private Long principal;
+
+    //执行人
+    @Excel(name = "执行人",sort = 7)
+    @TableField(exist = false)
+    private String serviceName;
 }

+ 2 - 0
src/main/java/cn/ezhizao/project/business/housingFund/service/IBizHousingFundConfirmService.java

@@ -1,6 +1,7 @@
 package cn.ezhizao.project.business.housingFund.service;
 
 import cn.ezhizao.project.business.housingFund.domain.BizHousingFundConfirm;
+import cn.ezhizao.project.business.housingFund.domain.BizHousingFundConfirmDetailEmployee;
 import com.baomidou.mybatisplus.extension.service.IService;
 
 import java.util.List;
@@ -36,4 +37,5 @@ public interface IBizHousingFundConfirmService extends IService<BizHousingFundCo
      */
     int getTotal(Map<String, Object> conditions);
 
+    String importSalary(List<BizHousingFundConfirmDetailEmployee> detailList, String year, String month, Long tenantId);
 }

+ 77 - 0
src/main/java/cn/ezhizao/project/business/housingFund/service/impl/BizHousingFundConfirmServiceImpl.java

@@ -1,12 +1,22 @@
 package cn.ezhizao.project.business.housingFund.service.impl;
 
+import cn.ezhizao.common.exception.ServiceException;
+import cn.ezhizao.common.utils.StringUtils;
 import cn.ezhizao.project.business.housingFund.domain.BizHousingFundConfirm;
+import cn.ezhizao.project.business.housingFund.domain.BizHousingFundConfirmDetail;
+import cn.ezhizao.project.business.housingFund.domain.BizHousingFundConfirmDetailEmployee;
+import cn.ezhizao.project.business.housingFund.mapper.BizHousingFundConfirmDetailEmployeeMapper;
+import cn.ezhizao.project.business.housingFund.mapper.BizHousingFundConfirmDetailMapper;
 import cn.ezhizao.project.business.housingFund.mapper.BizHousingFundConfirmMapper;
 import cn.ezhizao.project.business.housingFund.service.IBizHousingFundConfirmService;
+import cn.ezhizao.project.business.salary.domain.BizFinancialSalary;
+import cn.ezhizao.project.business.salary.domain.BizFinancialSalaryDetail;
+import cn.ezhizao.project.business.salary.domain.BizFinancialSalaryDetailEmployee;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
+import java.math.BigDecimal;
 import java.util.List;
 import java.util.Map;
 
@@ -20,6 +30,12 @@ public class BizHousingFundConfirmServiceImpl extends ServiceImpl<BizHousingFund
     @Resource
     BizHousingFundConfirmMapper financialHousingFundConfirmDao;
 
+    @Resource
+    BizHousingFundConfirmDetailMapper housingFundConfirmDetailDao;
+
+    @Resource
+    BizHousingFundConfirmDetailEmployeeMapper housingFundConfirmDetailEmployeeDao;
+
     @Override
     public List<BizHousingFundConfirm> getList(Map<String,Object> conditions) {
         return financialHousingFundConfirmDao.getList(conditions);
@@ -35,4 +51,65 @@ public class BizHousingFundConfirmServiceImpl extends ServiceImpl<BizHousingFund
         return financialHousingFundConfirmDao.getTotal(conditions);
     }
 
+    @Override
+    public String importSalary(List<BizHousingFundConfirmDetailEmployee> detailList, String year, String month, Long tenantId) {
+        if (StringUtils.isNull(detailList) || detailList.size() == 0) {
+            throw new ServiceException("导入数据不能为空!");
+        }
+        int successNum = 0;
+        int failureNum = 0;
+        StringBuilder successMsg = new StringBuilder();
+        StringBuilder failureMsg = new StringBuilder();
+        //获取工资信息
+        for(BizHousingFundConfirmDetailEmployee l : detailList){
+            BizHousingFundConfirm housingFundConfirm=new BizHousingFundConfirm();
+            housingFundConfirm.setCompanyName(l.getCompanyName());
+            housingFundConfirm.setTenantId(tenantId);
+            List <BizHousingFundConfirm> list= getListByBean(housingFundConfirm);
+            //是否存在该客户
+            if(list.size() == 0){
+                failureNum++;
+                failureMsg.append("<br/>").append(failureNum).append("、客户 ").append(l.getCompanyName()).append(" 不存在");
+                continue;
+            }
+            if(list.size() > 1){
+                failureNum++;
+                failureMsg.append("<br/>").append(failureNum).append("、客户 ").append(l.getCompanyName()).append("请输入详细客户名称");
+                continue;
+            }
+            housingFundConfirm=list.get(0);
+            //获取工资明细
+            BizHousingFundConfirmDetail detail=new BizHousingFundConfirmDetail();
+            detail.setHousingFundConfirmId(housingFundConfirm.getId());
+            detail.setMonth(month);
+            detail.setYear(year);
+            List<BizHousingFundConfirmDetail> confirmDetailList=housingFundConfirmDetailDao.getList(detail);
+            if(confirmDetailList.size()>0){
+                failureNum++;
+                failureMsg.append("<br/>").append(failureNum).append("、客户 ").append(l.getCompanyName()).append(year+"年"+month+"月").append("公积金已有数据");
+                continue;
+            }
+
+            //设置状态为待确认
+            detail.setStatus(1);
+            detail.setCompanyId(housingFundConfirm.getCompanyId());
+            //新增工资明细
+            housingFundConfirmDetailDao.insert(detail);
+
+            l.setHousingFundConfirmId(housingFundConfirm.getId());
+            l.setHousingFundConfirmDetailId(detail.getId());
+            //新增人员明细
+            housingFundConfirmDetailEmployeeDao.insert(l);
+            successNum++;
+            successMsg.append("<br/>").append(successNum).append("、公积金 ").append(l.getCompanyName()).append(" 导入成功");
+        }
+        if (failureNum > 0) {
+            failureMsg.insert(0, "很抱歉,导入失败!共 " + failureNum + " 条数据格式不正确,错误如下:");
+            throw new ServiceException(failureMsg.toString());
+        } else {
+            successMsg.insert(0, "恭喜您,数据已全部导入成功!共 " + successNum + " 条,数据如下:");
+        }
+        return successMsg.toString();
+    }
+
 }

+ 61 - 2
src/main/java/cn/ezhizao/project/business/keepAccounts/controller/BizFinancialKeepAccountController.java

@@ -2,6 +2,8 @@ package cn.ezhizao.project.business.keepAccounts.controller;
 
 import cn.ezhizao.common.exception.ServiceException;
 import cn.ezhizao.common.utils.SecurityUtils;
+import cn.ezhizao.common.utils.poi.ExcelUtil;
+import cn.ezhizao.framework.aspectj.lang.annotation.Log;
 import cn.ezhizao.framework.aspectj.lang.enums.BusinessType;
 import cn.ezhizao.framework.web.controller.BaseController;
 import cn.ezhizao.framework.web.domain.AjaxResult;
@@ -12,16 +14,18 @@ import cn.ezhizao.project.business.keepAccounts.domain.BizFinancialKeepAccount;
 import cn.ezhizao.project.business.keepAccounts.domain.BizFinancialKeepAccountDetail;
 import cn.ezhizao.project.business.keepAccounts.service.IBizFinancialKeepAccountDetailService;
 import cn.ezhizao.project.business.keepAccounts.service.IBizFinancialKeepAccountService;
+import cn.ezhizao.project.business.receiveTicket.domain.BizFinancialReceiveTicketFeedback;
 import cn.ezhizao.project.business.reportTaxIsZero.domain.BizFinancialReportTaxDetail;
 import cn.ezhizao.project.business.reportTaxIsZero.domain.BizFinancialReportTax;
 import cn.ezhizao.project.business.reportTaxIsZero.service.IBizFinancialReportTaxDetailService;
 import cn.ezhizao.project.business.reportTaxIsZero.service.IBizFinancialReportTaxService;
 import cn.ezhizao.project.business.workOrder.domain.BizWorkOrderRecord;
 import cn.ezhizao.project.business.workOrder.service.IBizWorkOrderRecordService;
+import cn.ezhizao.project.system.domain.SysUser;
+import cn.ezhizao.project.system.mapper.SysUserMapper;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
-import lombok.extern.java.Log;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.web.bind.annotation.*;
@@ -29,6 +33,7 @@ import reactor.util.annotation.Nullable;
 import cn.ezhizao.framework.aspectj.lang.enums.BusinessType;
 
 import javax.annotation.Resource;
+import javax.servlet.http.HttpServletResponse;
 import javax.sql.rowset.serial.SerialException;
 import java.math.BigDecimal;
 import java.util.HashMap;
@@ -48,6 +53,8 @@ public class BizFinancialKeepAccountController extends BaseController {
     @Resource
     IBizFinancialReportTaxService financialReportTaxService;
     @Resource
+    private SysUserMapper sysUserMapper;
+    @Resource
     IBizFinancialReportTaxDetailService financialReportTaxDetailService;
     @Resource
     IBizCompanyService companyService;
@@ -135,6 +142,59 @@ public class BizFinancialKeepAccountController extends BaseController {
         return getDataTable(list);
     }
 
+    /**
+     * 导出记账任务列表
+     */
+    @PreAuthorize("@ss.hasPermi('business:keepAccount:export')")
+    @Log(title = "记账任务", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, BizFinancialKeepAccount conditions) throws NoSuchFieldException, IllegalAccessException
+    {
+        setTenantId(conditions);
+        startOrderBy();
+        conditions.setIsZero(0);
+        List<BizFinancialKeepAccount> list = financialKeepAccountService.getList(conditions);
+        for(BizFinancialKeepAccount l : list){
+            BizFinancialKeepAccountDetail detail = new BizFinancialKeepAccountDetail();
+            detail.setFinancialKeepAccountId(l.getId());
+            detail.setYear(conditions.getYear());
+            detail.setMonth(conditions.getMonth());
+            List<BizFinancialKeepAccountDetail> details = financialKeepAccountDetailService.getList(detail);
+            if(details.size() ==0){
+                detail.setStatus(0);
+                l.setServiceName("");
+            }else {
+                detail=details.get(0);
+                List<BizWorkOrderRecord> records = bizWorkOrderRecordService.query().eq("work_order_id", l.getWorkOrderId()).eq("year", conditions.getYear()).eq("month", conditions.getMonth()).eq("from_id", 0).list();
+                if(records.size()>0){
+                    SysUser sysUser = sysUserMapper.selectUserById(records.get(0).getRecorderId());
+                    l.setServiceName(sysUser==null?"":sysUser.getNickName());
+                }else{
+                    l.setServiceName("");
+                }
+            }
+            l.setCurrentPeriod(conditions.getYear()+"-"+conditions.getMonth());
+            switch (detail.getStatus()){
+                case 0:
+                    l.setCurrentStatus("未开始");
+                    break;
+                case 1:
+                    l.setCurrentStatus("进行中");
+                    break;
+                case 2:
+                    l.setCurrentStatus("无票据");
+                    break;
+                case 3:
+                    l.setCurrentStatus("已完成");
+                    break;
+                default:
+                    break;
+            }
+        }
+        ExcelUtil<BizFinancialKeepAccount> util = new ExcelUtil<BizFinancialKeepAccount>(BizFinancialKeepAccount.class);
+        util.exportExcel(response, list, "记账任务数据");
+    }
+
     @ApiOperation(value = "带条件List 分页查询", notes = "带条件List 分页查询")
     @PostMapping("/getDetailList")
     @ResponseBody
@@ -142,7 +202,6 @@ public class BizFinancialKeepAccountController extends BaseController {
         setTenantId(conditions);
         Map<String, Object> map = new HashMap<>(16);
         List<BizFinancialKeepAccountDetail> list = financialKeepAccountDetailService.getList(conditions);
-
         return getDataTable(list);
     }
 

+ 18 - 0
src/main/java/cn/ezhizao/project/business/keepAccounts/domain/BizFinancialKeepAccount.java

@@ -1,5 +1,6 @@
 package cn.ezhizao.project.business.keepAccounts.domain;
 
+import cn.ezhizao.framework.aspectj.lang.annotation.Excel;
 import cn.ezhizao.framework.web.domain.BaseEntity;
 import cn.ezhizao.project.business.ticketReport.domain.BizFinancialTicketReportDetail;
 import com.baomidou.mybatisplus.annotation.TableField;
@@ -29,8 +30,10 @@ public class BizFinancialKeepAccount extends BaseEntity {
     @ApiModelProperty("全部维护人员")
     private String employeeIds;
 
+    @Excel(name = "客户名称",sort=1)
     @TableField(exist = false)
     private String companyName;
+
     @TableField(exist = false)
     private String companyLevel;
     @TableField(exist = false)
@@ -48,12 +51,26 @@ public class BizFinancialKeepAccount extends BaseEntity {
 //    @TableField(exist = false)
 //    private List<BizFinancialTicketReportDetail> salaryTickets;
 
+    @Excel(name = "来源",sort=2)
     @TableField(exist = false)
     private String fromCompanyName;
 
+    @Excel(name = "纳税性质",sort=3)
     @TableField(exist = false)
     private String taxType;
 
+    @Excel(name = "税号",sort=4)
+    @TableField(exist = false)
+    private String socialCreditCode;
+
+    @TableField(exist = false)
+    @Excel(name = "查询期间",sort = 5)
+    private String currentPeriod;
+
+    @Excel(name = "当前状态",sort = 6)
+    @TableField(exist = false)
+    private String currentStatus;
+
     /** 查询条件新增 */
     @TableField(exist = false)
     private String year;
@@ -86,6 +103,7 @@ public class BizFinancialKeepAccount extends BaseEntity {
     private Long principal;
 
     //执行人
+    @Excel(name = "执行人",sort = 7)
     @TableField(exist = false)
     private String serviceName;
 

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

@@ -24,6 +24,8 @@ import cn.ezhizao.project.business.salary.service.IBizFinancialSalaryDetailEmplo
 import cn.ezhizao.project.business.salary.service.IBizFinancialSalaryDetailService;
 import cn.ezhizao.project.business.workOrder.domain.BizWorkOrderRecord;
 import cn.ezhizao.project.business.workOrder.service.IBizWorkOrderRecordService;
+import cn.ezhizao.project.system.domain.SysUser;
+import cn.ezhizao.project.system.mapper.SysUserMapper;
 import cn.hutool.core.date.DateTime;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import io.swagger.annotations.ApiOperation;
@@ -52,6 +54,8 @@ public class BizFinancialReceiveTicketController extends BaseController
     @Resource
     private IBizFinancialReceiveTicketService bizFinancialReceiveTicketService;
     @Resource
+    private SysUserMapper sysUserMapper;
+    @Resource
     private IBizFinancialReceiveTicketDetailService financialReceiveTicketDetailService;
     @Resource
     private IBizFinancialReceiveTicketFeedbackService financialReceiveTicketFeedbackService;
@@ -117,7 +121,46 @@ public class BizFinancialReceiveTicketController extends BaseController
     public void export(HttpServletResponse response, BizFinancialReceiveTicket bizFinancialReceiveTicket) throws NoSuchFieldException, IllegalAccessException
     {
         setTenantId(bizFinancialReceiveTicket);
+        startOrderBy();
+        bizFinancialReceiveTicket.setIsZero(0);
         List<BizFinancialReceiveTicket> list = bizFinancialReceiveTicketService.getList(bizFinancialReceiveTicket);
+        for(BizFinancialReceiveTicket l : list){
+            l.setCurrentPeriod(bizFinancialReceiveTicket.getYear()+"-"+bizFinancialReceiveTicket.getMonth());
+            BizFinancialReceiveTicketDetail detail = new BizFinancialReceiveTicketDetail();
+            detail.setFinancialReceiveTicketId(l.getId());
+            detail.setYear(bizFinancialReceiveTicket.getYear());
+            detail.setMonth(bizFinancialReceiveTicket.getMonth());
+            List<BizFinancialReceiveTicketDetail>ticketDetail  = financialReceiveTicketDetailService.getList(detail);
+            if(ticketDetail.size() == 0){
+                detail.setStatus(0);
+                l.setServiceName("");
+            }else{
+                detail=ticketDetail.get(0);
+                SysUser sysUser = sysUserMapper.selectUserById(detail.getVerifierId());
+                l.setServiceName(sysUser==null?"":sysUser.getNickName());
+            }
+            //设置状态
+            switch (detail.getStatus()) {
+                case 0:
+                    l.setCurrentStatus("未开始");
+                    break;
+                case 1:
+                    l.setCurrentStatus("进行中");
+                    break;
+                case 2:
+                    l.setCurrentStatus("待审核");
+                    break;
+                case 3:
+                    l.setCurrentStatus("已完成");
+                    break;
+                case 4:
+                    l.setCurrentStatus("驳回待处理");
+                    break;
+                default:
+                    break;
+            }
+
+        }
         ExcelUtil<BizFinancialReceiveTicket> util = new ExcelUtil<BizFinancialReceiveTicket>(BizFinancialReceiveTicket.class);
         util.exportExcel(response, list, "收票任务数据");
     }

+ 14 - 0
src/main/java/cn/ezhizao/project/business/receiveTicket/controller/BizFinancialReceiveTicketFeedbackController.java

@@ -59,7 +59,21 @@ public class BizFinancialReceiveTicketFeedbackController extends BaseController
     public void export(HttpServletResponse response, BizFinancialReceiveTicketFeedback bizFinancialReceiveTicketFeedback) throws NoSuchFieldException, IllegalAccessException
     {
         setTenantId(bizFinancialReceiveTicketFeedback);
+        startOrderBy();
         List<BizFinancialReceiveTicketFeedback> list = bizFinancialReceiveTicketFeedbackService.getList(bizFinancialReceiveTicketFeedback);
+        for (BizFinancialReceiveTicketFeedback item : list){
+            item.setCollectTicket(item.getYear()+"-"+item.getMonth());
+            switch (item.getNeedSync()){
+                case 0 :
+                    item.setStatusText("流转反馈");
+                    break;
+                case 1 :
+                    item.setStatusText("驳回反馈");
+                    break;
+                default:
+                    break;
+            }
+        }
         ExcelUtil<BizFinancialReceiveTicketFeedback> util = new ExcelUtil<BizFinancialReceiveTicketFeedback>(BizFinancialReceiveTicketFeedback.class);
         util.exportExcel(response, list, "收票反馈数据");
     }

+ 21 - 1
src/main/java/cn/ezhizao/project/business/receiveTicket/domain/BizFinancialReceiveTicket.java

@@ -46,7 +46,7 @@ public class BizFinancialReceiveTicket extends BaseEntity
     private Long workOrderId;
 
     /** 任务停止 */
-    @Excel(name = "任务停止")
+//    @Excel(name = "任务停止")
     @ApiModelProperty(value = "任务停止")
     private Integer isStop;
 
@@ -54,10 +54,15 @@ public class BizFinancialReceiveTicket extends BaseEntity
     private String keyword;
 
     /** 列表显示新增 */
+    @Excel(name = "客户名称",sort=1)
     @TableField(exist = false)
     private String companyName;
+
     @TableField(exist = false)
+    @Excel(name = "来源",sort=2)
     private String fromCompanyName;
+
+    @Excel(name = "纳税性质",sort=3)
     @TableField(exist = false)
     private String taxType;
 
@@ -66,14 +71,28 @@ public class BizFinancialReceiveTicket extends BaseEntity
     private String year;
     @TableField(exist = false)
     private String month;
+
     @TableField(exist = false)
     private Integer status;
 
+    @Excel(name = "当前状态",sort = 6)
+    @TableField(exist = false)
+    private String currentStatus;
+
     @TableField(exist = false)
     private List<BizFinancialReceiveTicketDetail> details;
     @TableField(exist = false)
     private Integer isZero;
 
+    /** 社会信用代码 */
+    @Excel(name = "税号",width = 30,sort = 4)
+    @TableField(exist = false)
+    private String socialCreditCode;
+
+    @TableField(exist = false)
+    @Excel(name = "查询期间",sort = 5)
+    private String currentPeriod;
+
     //收入票
     @TableField(exist = false)
     private Integer hasIncomeTicket;
@@ -119,6 +138,7 @@ public class BizFinancialReceiveTicket extends BaseEntity
     private Long principal;
 
     //执行人
+    @Excel(name = "执行人",sort=7)
     @TableField(exist = false)
     private String serviceName;
 

+ 25 - 4
src/main/java/cn/ezhizao/project/business/receiveTicket/domain/BizFinancialReceiveTicketFeedback.java

@@ -38,7 +38,7 @@ public class BizFinancialReceiveTicketFeedback extends BaseEntity
 
     /** 回复时间 */
     @JsonFormat(pattern = "yyyy-MM-dd")
-    @Excel(name = "回复时间", width = 30, dateFormat = "yyyy-MM-dd")
+    @Excel(name = "回复时间", width = 30, dateFormat = "yyyy-MM-dd",sort=8)
     @ApiModelProperty(value = "回复时间")
     private Date feedbackTime;
 
@@ -47,28 +47,44 @@ public class BizFinancialReceiveTicketFeedback extends BaseEntity
     private Long tenantId;
 
     /** 回复详情 */
-    @Excel(name = "回复详情")
+    @Excel(name = "回复详情",sort=7)
     @ApiModelProperty(value = "回复详情")
     private String feedbackContent;
 
     /** 是否同步信息 */
-    @Excel(name = "是否同步信息")
+//    @Excel(name = "是否同步信息")
     @ApiModelProperty(value = "是否同步信息")
     private Integer needSync;
 
     /** 状态 */
-    @Excel(name = "状态")
     @ApiModelProperty(value = "状态")
     private Integer status;
 
+    @TableField(exist = false)
+    @Excel(name = "状态",sort=4)
+    private String statusText;
+
     @TableField(exist = false)
     private String currentMonth;
 
+    @Excel(name = "纳税性质",sort=3)
     @TableField(exist = false)
     private String taxType;
+
+    @Excel(name = "反馈信息",sort=6)
+    @ApiModelProperty(value = "反馈信息")
+    private String remark;
+
+    @Excel(name = "收票月份",sort=5)
     @TableField(exist = false)
+    private String collectTicket;
+
+    @TableField(exist = false)
+    @Excel(name = "客户名称",sort=1)
     private String companyName;
+
     @TableField(exist = false)
+    @Excel(name = "来源",sort=2)
     private String fromCompanyName;
 
     @TableField(exist = false)
@@ -83,4 +99,9 @@ public class BizFinancialReceiveTicketFeedback extends BaseEntity
     //执行人
     @TableField(exist = false)
     private String serviceName;
+
+    public void setRemark(String remark)
+    {
+        this.remark = remark;
+    }
 }

+ 56 - 0
src/main/java/cn/ezhizao/project/business/reportTax/controller/BizFinancialReportTaxNonZeroController.java

@@ -1,6 +1,7 @@
 package cn.ezhizao.project.business.reportTax.controller;
 
 import cn.ezhizao.common.exception.ServiceException;
+import cn.ezhizao.common.utils.poi.ExcelUtil;
 import cn.ezhizao.framework.aspectj.lang.annotation.Log;
 import cn.ezhizao.framework.aspectj.lang.enums.BusinessType;
 import cn.ezhizao.framework.web.controller.BaseController;
@@ -22,10 +23,13 @@ import cn.ezhizao.project.business.reportTax.domain.BizFinancialReportTaxDetailR
 import cn.ezhizao.project.business.reportTax.service.IBizFinancialReportTaxDetailNonZeroService;
 import cn.ezhizao.project.business.reportTax.service.IBizFinancialReportTaxDetailReportNonZeroService;
 import cn.ezhizao.project.business.reportTax.service.IBizFinancialReportTaxNonZeroService;
+import cn.ezhizao.project.business.reportTaxIsZero.domain.BizFinancialReportTax;
 import cn.ezhizao.project.business.reportTaxIsZero.domain.BizFinancialReportTaxDetail;
 import cn.ezhizao.project.business.reportTaxIsZero.service.IBizFinancialReportTaxDetailReportService;
 import cn.ezhizao.project.business.reportTaxIsZero.service.IBizFinancialReportTaxDetailService;
 import cn.ezhizao.project.system.domain.SysFileStorage;
+import cn.ezhizao.project.system.domain.SysUser;
+import cn.ezhizao.project.system.mapper.SysUserMapper;
 import cn.ezhizao.project.system.service.ISysFileStorageService;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import io.swagger.annotations.Api;
@@ -35,6 +39,7 @@ import org.springframework.transaction.annotation.Transactional;
 import org.springframework.web.bind.annotation.*;
 
 import javax.annotation.Resource;
+import javax.servlet.http.HttpServletResponse;
 import java.math.BigDecimal;
 import java.util.ArrayList;
 import java.util.HashMap;
@@ -55,6 +60,9 @@ public class BizFinancialReportTaxNonZeroController extends BaseController {
     @Resource
     IBizFinancialReportTaxDetailService financialReportTaxDetaiIsZerolService;
 
+    @Resource
+    private SysUserMapper sysUserMapper;
+
     @Resource
     IBizFinancialMergeService financialMergeService;
     @Resource
@@ -109,9 +117,11 @@ public class BizFinancialReportTaxNonZeroController extends BaseController {
     @PostMapping("/saveDetail")
     @ResponseBody
     public AjaxResult saveDetail(@RequestBody BizFinancialReportTaxDetail detail) {
+        detail.setVerifierId(getUserId());
         boolean bool = financialReportTaxDetaiIsZerolService.saveOrUpdate(detail);
         Map<String, Object> conditions = new HashMap<>(1);
         conditions.put("financialReportTaxDetailId", detail.getId());
+        detail.setVerifierId(getUserId());
         financialReportTaxDetailReportIsZeroService.physicallyDelete(conditions);
         detail.getReportFiles().forEach(l -> {
             l.setFinancialReportTaxId(detail.getFinancialReportTaxId());
@@ -140,6 +150,52 @@ public class BizFinancialReportTaxNonZeroController extends BaseController {
         return bool ? success(detail) : error();
     }
 
+    /**
+     * 导出报税任务列表
+     */
+    @PreAuthorize("@ss.hasPermi('business:financialReportTaxNonZero:export')")
+    @Log(title = "报税零申报", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, BizFinancialReportTaxNonZero financialReportTax) throws NoSuchFieldException, IllegalAccessException {
+        setTenantId(financialReportTax);
+        List<BizFinancialReportTaxNonZero> list = financialReportTaxService.getList(financialReportTax);
+        for (BizFinancialReportTaxNonZero l : list) {
+            l.setCurrentPeriod(financialReportTax.getYear() + "-" + financialReportTax.getMonth());
+            BizFinancialReportTaxDetailNonZero detail = new BizFinancialReportTaxDetailNonZero();
+            detail.setFinancialReportTaxId(l.getId());
+            detail.setYear(financialReportTax.getYear());
+            detail.setMonth(financialReportTax.getMonth());
+            List<BizFinancialReportTaxDetailNonZero> details = financialReportTaxDetailService.getList(detail);
+            l.setZero(l.getIsZero() == 1 ? "是" : "否");
+            if (details.size() >0) {
+                detail=details.get(0);
+                SysUser sysUser = sysUserMapper.selectUserById(detail.getVerifierId());
+                l.setServiceName(sysUser==null?"":sysUser.getNickName());
+                switch (detail.getStatus()) {
+                    case 0:
+                        l.setStatusText("未开始");
+                        l.setMakeOut("未填写");
+                        break;
+                    case 1:
+                        l.setStatusText("进行中");
+                        l.setMakeOut("进行中");
+                        break;
+                    case 3:
+                        l.setStatusText("已完成");
+                        l.setMakeOut("已填写");
+                        break;
+                    default:
+                        break;
+                }
+            } else {
+                l.setStatusText("未开始");
+                l.setMakeOut("未填写");
+            }
+        }
+        ExcelUtil<BizFinancialReportTaxNonZero> util = new ExcelUtil<BizFinancialReportTaxNonZero>(BizFinancialReportTaxNonZero.class);
+        util.exportExcel(response, list, "报税非零申报数据");
+    }
+
     /**
      * 修改报税详情
      */

+ 24 - 0
src/main/java/cn/ezhizao/project/business/reportTax/domain/BizFinancialReportTaxNonZero.java

@@ -1,5 +1,6 @@
 package cn.ezhizao.project.business.reportTax.domain;
 
+import cn.ezhizao.framework.aspectj.lang.annotation.Excel;
 import cn.ezhizao.framework.web.domain.BaseEntity;
 import com.baomidou.mybatisplus.annotation.TableField;
 import io.swagger.annotations.ApiModel;
@@ -28,6 +29,24 @@ public class BizFinancialReportTaxNonZero extends BaseEntity {
     @ApiModelProperty("工单外键")
     private Long workOrderId;
 
+    @ApiModelProperty(value = "报税所属期")
+    @Excel(name = "报税所属期",sort = 6)
+    @TableField(exist = false)
+    private String currentPeriod;
+
+    @Excel(name = "状态",sort = 8)
+    @TableField(exist = false)
+    private String statusText;
+
+    @Excel(name = "是否零申报",sort = 5)
+    @TableField(exist = false)
+    private String zero;
+
+    @Excel(name = "报税填写",sort = 7)
+    @TableField(exist = false)
+    private String makeOut;
+
+    @Excel(name = "客户名称",sort = 1)
     @TableField(exist = false)
     private String companyName;
     @TableField(exist = false)
@@ -36,6 +55,8 @@ public class BizFinancialReportTaxNonZero extends BaseEntity {
     private String currentDate;
     @TableField(exist = false)
     private String checkoutDate;
+
+    @Excel(name = "纳税性质",sort = 4)
     @TableField(exist = false)
     private String taxType;
     @TableField(exist = false)
@@ -46,8 +67,10 @@ public class BizFinancialReportTaxNonZero extends BaseEntity {
     @TableField(exist = false)
     private BizFinancialReportTaxDetailNonZero detail;
 
+    @Excel(name = "税号",sort = 3)
     @TableField(exist = false)
     private String socialCreditCode;
+    @Excel(name = "来源",sort = 2)
     @TableField(exist = false)
     private String fromCompanyName;
 
@@ -69,6 +92,7 @@ public class BizFinancialReportTaxNonZero extends BaseEntity {
     private Long principal;
 
     //执行人
+    @Excel(name = "执行人",sort = 9)
     @TableField(exist = false)
     private String serviceName;
 }

+ 55 - 0
src/main/java/cn/ezhizao/project/business/reportTaxIsZero/controller/BizFinancialReportTaxController.java

@@ -1,6 +1,7 @@
 package cn.ezhizao.project.business.reportTaxIsZero.controller;
 
 import cn.ezhizao.common.exception.ServiceException;
+import cn.ezhizao.common.utils.poi.ExcelUtil;
 import cn.ezhizao.framework.aspectj.lang.annotation.Log;
 import cn.ezhizao.framework.aspectj.lang.enums.BusinessType;
 import cn.ezhizao.framework.web.controller.BaseController;
@@ -11,6 +12,7 @@ import cn.ezhizao.project.business.company.service.IBizCompanyService;
 import cn.ezhizao.project.business.deduction.domain.BizDeduction;
 import cn.ezhizao.project.business.deduction.service.IBizDeductionService;
 import cn.ezhizao.project.business.finance.IndividualIncomeTaxIsZero.domain.BizFinancialIndividualIncomeTaxDetailIsZero;
+import cn.ezhizao.project.business.finance.IndividualIncomeTaxIsZero.domain.BizFinancialIndividualIncomeTaxIsZero;
 import cn.ezhizao.project.business.finance.IndividualIncomeTaxIsZero.service.IBizFinancialIndividualIncomeTaxDetailIsZeroService;
 import cn.ezhizao.project.business.financialBase.domain.BizFinancialMerge;
 import cn.ezhizao.project.business.financialBase.service.IBizFinancialMergeService;
@@ -21,6 +23,8 @@ import cn.ezhizao.project.business.reportTaxIsZero.service.IBizFinancialReportTa
 import cn.ezhizao.project.business.reportTaxIsZero.service.IBizFinancialReportTaxDetailService;
 import cn.ezhizao.project.business.reportTaxIsZero.service.IBizFinancialReportTaxService;
 import cn.ezhizao.project.system.domain.SysFileStorage;
+import cn.ezhizao.project.system.domain.SysUser;
+import cn.ezhizao.project.system.mapper.SysUserMapper;
 import cn.ezhizao.project.system.service.ISysFileStorageService;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import io.swagger.annotations.Api;
@@ -30,6 +34,7 @@ import org.springframework.transaction.annotation.Transactional;
 import org.springframework.web.bind.annotation.*;
 
 import javax.annotation.Resource;
+import javax.servlet.http.HttpServletResponse;
 import java.math.BigDecimal;
 import java.util.*;
 import java.util.stream.Collectors;
@@ -49,6 +54,9 @@ public class BizFinancialReportTaxController extends BaseController {
     IBizFinancialIndividualIncomeTaxDetailIsZeroService financialIndividualIncomeTaxDetailService;
     @Resource
     IBizFinancialReportTaxDetailReportService financialReportTaxDetailReportService;
+
+    @Resource
+    private SysUserMapper sysUserMapper;
     @Resource
     ISysFileStorageService fileStorageService;
     @Resource
@@ -89,6 +97,7 @@ public class BizFinancialReportTaxController extends BaseController {
     @PreAuthorize("@ss.hasPermi('business:financialReportTax:saveDetail')")
     @ResponseBody
     public AjaxResult saveDetail(@RequestBody BizFinancialReportTaxDetail detail) {
+        detail.setVerifierId(getUserId());
         boolean bool = financialReportTaxDetailService.saveOrUpdate(detail);
         Map<String, Object> conditions = new HashMap<>(1);
         conditions.put("financialReportTaxDetailId", detail.getId());
@@ -120,6 +129,52 @@ public class BizFinancialReportTaxController extends BaseController {
         return bool ? success(detail) : error();
     }
 
+    /**
+     * 导出报税任务列表
+     */
+    @PreAuthorize("@ss.hasPermi('business:financialReportTax:export')")
+    @Log(title = "报税零申报", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, BizFinancialReportTax financialReportTax) throws NoSuchFieldException, IllegalAccessException {
+        setTenantId(financialReportTax);
+        List<BizFinancialReportTax> list = financialReportTaxService.getList(financialReportTax);
+        for (BizFinancialReportTax l : list) {
+            l.setCurrentPeriod(financialReportTax.getYear() + "-" + financialReportTax.getMonth());
+            BizFinancialReportTaxDetail detail = new BizFinancialReportTaxDetail();
+            detail.setFinancialReportTaxId(l.getId());
+            detail.setYear(financialReportTax.getYear());
+            detail.setMonth(financialReportTax.getMonth());
+            List<BizFinancialReportTaxDetail> details = financialReportTaxDetailService.getList(detail);
+            l.setZero(l.getIsZero() == 1 ? "是" : "否");
+            if (details.size() >0) {
+                detail=details.get(0);
+                SysUser sysUser = sysUserMapper.selectUserById(detail.getVerifierId());
+                l.setServiceName(sysUser==null?"":sysUser.getNickName());
+                switch (detail.getStatus()) {
+                    case 0:
+                        l.setStatusText("未开始");
+                        l.setMakeOut("未填写");
+                        break;
+                    case 1:
+                        l.setStatusText("进行中");
+                        l.setMakeOut("进行中");
+                        break;
+                    case 3:
+                        l.setStatusText("已完成");
+                        l.setMakeOut("已填写");
+                        break;
+                    default:
+                        break;
+                }
+            } else {
+                l.setStatusText("未开始");
+                l.setMakeOut("未填写");
+            }
+        }
+        ExcelUtil<BizFinancialReportTax> util = new ExcelUtil<BizFinancialReportTax>(BizFinancialReportTax.class);
+        util.exportExcel(response, list, "报税零申报数据");
+    }
+
     /**
      * 修改报税详情
      */

+ 28 - 0
src/main/java/cn/ezhizao/project/business/reportTaxIsZero/domain/BizFinancialReportTax.java

@@ -1,5 +1,6 @@
 package cn.ezhizao.project.business.reportTaxIsZero.domain;
 
+import cn.ezhizao.framework.aspectj.lang.annotation.Excel;
 import cn.ezhizao.framework.web.domain.BaseEntity;
 import com.baomidou.mybatisplus.annotation.TableField;
 import io.swagger.annotations.ApiModel;
@@ -28,26 +29,52 @@ public class BizFinancialReportTax extends BaseEntity {
     @ApiModelProperty("工单外键")
     private Long workOrderId;
 
+    @ApiModelProperty(value = "报税所属期")
+    @Excel(name = "报税所属期",sort = 6)
+    @TableField(exist = false)
+    private String currentPeriod;
+
+    @Excel(name = "客户名称",sort = 1)
     @TableField(exist = false)
     private String companyName;
+
+    @Excel(name = "状态",sort = 8)
+    @TableField(exist = false)
+    private String statusText;
+
+    @Excel(name = "报税填写",sort = 7)
+    @TableField(exist = false)
+    private String makeOut;
+
     @TableField(exist = false)
     private String companyLevel;
     @TableField(exist = false)
     private String currentDate;
     @TableField(exist = false)
     private String checkoutDate;
+
+    @Excel(name = "纳税性质",sort = 4)
     @TableField(exist = false)
     private String taxType;
+
+
     @TableField(exist = false)
     private Integer isZero;
 
+    @Excel(name = "是否零申报",sort = 5)
+    @TableField(exist = false)
+    private String zero;
+
     @TableField(exist = false)
     private List<BizFinancialReportTaxDetail> details;
     @TableField(exist = false)
     private BizFinancialReportTaxDetail detail;
 
+    @Excel(name = "税号",sort = 3)
     @TableField(exist = false)
     private String socialCreditCode;
+
+    @Excel(name = "来源",sort = 2)
     @TableField(exist = false)
     private String fromCompanyName;
 
@@ -69,6 +96,7 @@ public class BizFinancialReportTax extends BaseEntity {
     private Long principal;
 
     //执行人
+    @Excel(name = "执行人",sort = 9)
     @TableField(exist = false)
     private String serviceName;
 }

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

@@ -34,6 +34,8 @@ import cn.ezhizao.project.business.salary.service.IBizFinancialSalaryDetailEmplo
 import cn.ezhizao.project.business.salary.service.IBizFinancialSalaryDetailService;
 import cn.ezhizao.project.business.workOrder.domain.BizWorkOrderRecord;
 import cn.ezhizao.project.business.workOrder.service.IBizWorkOrderRecordService;
+import cn.ezhizao.project.system.domain.SysUser;
+import cn.ezhizao.project.system.mapper.SysUserMapper;
 import cn.hutool.core.io.IoUtil;
 import cn.hutool.poi.excel.ExcelWriter;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
@@ -56,6 +58,7 @@ import cn.ezhizao.framework.web.controller.BaseController;
 import cn.ezhizao.framework.web.domain.AjaxResult;
 import cn.ezhizao.common.utils.poi.ExcelUtil;
 import cn.ezhizao.framework.web.page.TableDataInfo;
+import org.springframework.web.multipart.MultipartFile;
 import org.springframework.web.servlet.view.freemarker.FreeMarkerConfigurer;
 
 /**
@@ -78,6 +81,8 @@ public class BizFinancialSalaryController extends BaseController {
     @Resource
     private IBizFinancialReceiveTicketService financialReceiveTicketService;
     @Resource
+    private SysUserMapper sysUserMapper;
+    @Resource
     private IBizFinancialReceiveTicketDetailService financialReceiveTicketDetailService;
     @Resource
     private IBizWorkOrderRecordService bizWorkOrderRecordService;
@@ -123,13 +128,79 @@ public class BizFinancialSalaryController extends BaseController {
     @PreAuthorize("@ss.hasPermi('business:salary:export')")
     @Log(title = "工资", businessType = BusinessType.EXPORT)
     @PostMapping("/export")
-    public void export(HttpServletResponse response, BizFinancialSalary bizFinancialSalary) throws NoSuchFieldException, IllegalAccessException {
+    public void export(BizFinancialSalary bizFinancialSalary,HttpServletResponse response ) throws NoSuchFieldException, IllegalAccessException {
+        //设置当前账套
         setTenantId(bizFinancialSalary);
+        startOrderBy();
+        //非零申报
+        bizFinancialSalary.setIsZero(0);
+        //查询数据
         List<BizFinancialSalary> list = bizFinancialSalaryService.getList(bizFinancialSalary);
+        //设置状态和当前期间
+        for(BizFinancialSalary salary:list){
+            //设置当前期间
+            salary.setCurrentPeriod(bizFinancialSalary.getYear()+"-"+bizFinancialSalary.getMonth());
+            BizFinancialSalaryDetail salaryDetail = new BizFinancialSalaryDetail();
+            salaryDetail.setFinancialSalaryId(salary.getId());
+            salaryDetail.setYear(bizFinancialSalary.getYear());
+            salaryDetail.setMonth(bizFinancialSalary.getMonth());
+            //查询当前期间明细
+            List <BizFinancialSalaryDetail> bizFinancialSalaryDetails = bizFinancialSalaryDetailService.getList(salaryDetail);
+            if(bizFinancialSalaryDetails.size()==0){
+                salaryDetail.setStatus(0);
+                salary.setServiceName("");
+            }else{
+                salaryDetail=bizFinancialSalaryDetails.get(0);
+                SysUser sysUser = sysUserMapper.selectUserById(salaryDetail.getVerifierId());
+                salary.setServiceName(sysUser==null?"":sysUser.getNickName());
+            }
+            //设置状态
+            switch (salaryDetail.getStatus()) {
+                case 0:
+                    salary.setCurrentStatus("未开始");
+                    break;
+                case 1:
+                    salary.setCurrentStatus("待确认");
+                    break;
+                case 2:
+                    salary.setCurrentStatus("待审核");
+                    break;
+                case 3:
+                    salary.setCurrentStatus("已完成");
+                    break;
+                case 4:
+                    salary.setCurrentStatus("驳回待处理");
+                    break;
+                default:
+                    break;
+            }
+
+        }
         ExcelUtil<BizFinancialSalary> util = new ExcelUtil<BizFinancialSalary>(BizFinancialSalary.class);
         util.exportExcel(response, list, "工资数据");
     }
 
+    /**
+     * 导出工资模板
+     */
+    @Log(title = "导出工资模板", businessType = BusinessType.EXPORT)
+    @PostMapping("/exportSalaryTemplate")
+    public void exportSalaryTemplate(HttpServletResponse response) throws NoSuchFieldException, IllegalAccessException {
+        ExcelUtil<BizFinancialSalaryDetailEmployee> util = new ExcelUtil<BizFinancialSalaryDetailEmployee>(BizFinancialSalaryDetailEmployee.class);
+        util.importTemplateExcel(response, "工资模板");
+    }
+
+    @Log(title = "工资导入", businessType = BusinessType.IMPORT)
+    @PreAuthorize("@ss.hasPermi('business:salary:import')")
+    @PostMapping("/importData")
+    public AjaxResult importData(MultipartFile file, @RequestParam String year, @RequestParam String month) throws Exception
+    {
+        ExcelUtil<BizFinancialSalaryDetailEmployee> util = new ExcelUtil<>(BizFinancialSalaryDetailEmployee.class);
+        List<BizFinancialSalaryDetailEmployee> detailList = util.importExcel(file.getInputStream());
+        String message=bizFinancialSalaryService.importSalary(detailList,year,month,getTenantId()==null?0:getTenantId(),0);
+        return success(message);
+    }
+
     /**
      * 获取工资详细信息
      */
@@ -471,6 +542,15 @@ public class BizFinancialSalaryController extends BaseController {
         IoUtil.close(out);
     }
 
+//    @Log(title = "导出工资", businessType = BusinessType.EXPORT)
+//    @PreAuthorize("@ss.hasPermi('business:salary:verify')")
+//    @PostMapping("/export")
+//    public void export( @RequestBody List<BizFinancialSalary> list,HttpServletResponse response) throws NoSuchFieldException, IllegalAccessException {
+//
+//        ExcelUtil<BizFinancialSalary> util = new ExcelUtil<BizFinancialSalary>(BizFinancialSalary.class);
+//        util.exportExcel(response, list, "用户数据");
+//    }
+
     @ApiOperation("打印工资信息")
     @PostMapping("/printDetailPdf")
     public void printDetailPdf(@RequestParam Long id, HttpServletResponse response) throws IOException, TemplateException {

+ 73 - 11
src/main/java/cn/ezhizao/project/business/salary/controller/BizFinancialSalaryZeroController.java

@@ -26,10 +26,13 @@ import cn.ezhizao.project.business.salary.service.IBizFinancialSalaryDetailServi
 import cn.ezhizao.project.business.salary.service.IBizFinancialSalaryService;
 import cn.ezhizao.project.business.workOrder.domain.BizWorkOrderRecord;
 import cn.ezhizao.project.business.workOrder.service.IBizWorkOrderRecordService;
+import cn.ezhizao.project.system.domain.SysUser;
+import cn.ezhizao.project.system.mapper.SysUserMapper;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
 
 import javax.annotation.Resource;
 import javax.servlet.http.HttpServletResponse;
@@ -57,6 +60,9 @@ public class BizFinancialSalaryZeroController extends BaseController {
     private IBizFinancialIndividualIncomeTaxDetailIsZeroService financialIndividualIncomeTaxDetailService;
     @Resource
     private IBizFinancialReceiveTicketService financialReceiveTicketService;
+
+    @Resource
+    private SysUserMapper sysUserMapper;
     @Resource
     private IBizFinancialReceiveTicketDetailService financialReceiveTicketDetailService;
     @Resource
@@ -89,17 +95,15 @@ public class BizFinancialSalaryZeroController extends BaseController {
         return getDataTable(list);
     }
 
-    /**
-     * 导出工资列表
-     */
-    @PreAuthorize("@ss.hasPermi('business:salary:export')")
-    @Log(title = "工资", businessType = BusinessType.EXPORT)
-    @PostMapping("/export")
-    public void export(HttpServletResponse response, BizFinancialSalary bizFinancialSalary) throws NoSuchFieldException, IllegalAccessException {
-        setTenantId(bizFinancialSalary);
-        List<BizFinancialSalary> list = bizFinancialSalaryService.getList(bizFinancialSalary);
-        ExcelUtil<BizFinancialSalary> util = new ExcelUtil<BizFinancialSalary>(BizFinancialSalary.class);
-        util.exportExcel(response, list, "工资数据");
+    @Log(title = "工资零申报导入", businessType = BusinessType.IMPORT)
+    @PreAuthorize("@ss.hasPermi('business:salaryZero:import')")
+    @PostMapping("/importData")
+    public AjaxResult importData(MultipartFile file, @RequestParam String year, @RequestParam String month) throws Exception
+    {
+        ExcelUtil<BizFinancialSalaryDetailEmployee> util = new ExcelUtil<>(BizFinancialSalaryDetailEmployee.class);
+        List<BizFinancialSalaryDetailEmployee> detailList = util.importExcel(file.getInputStream());
+        String message=bizFinancialSalaryService.importSalary(detailList,year,month,getTenantId()==null?0:getTenantId(),1);
+        return success(message);
     }
 
     /**
@@ -320,4 +324,62 @@ public class BizFinancialSalaryZeroController extends BaseController {
                     bizWorkOrderRecordService.updateById(fromRecord);
         }
     }
+
+    /**
+     * 导出工资列表
+     */
+    @PreAuthorize("@ss.hasPermi('business:salary:export')")
+    @Log(title = "工资", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(BizFinancialSalary bizFinancialSalary,HttpServletResponse response ) throws NoSuchFieldException, IllegalAccessException {
+        //设置当前账套
+        setTenantId(bizFinancialSalary);
+        startOrderBy();
+        //零申报
+        bizFinancialSalary.setIsZero(1);
+        //查询数据
+        List<BizFinancialSalary> list = bizFinancialSalaryService.getList(bizFinancialSalary);
+        //设置状态和当前期间
+        for(BizFinancialSalary salary:list){
+            //设置当前期间
+            salary.setCurrentPeriod(bizFinancialSalary.getYear()+"-"+bizFinancialSalary.getMonth());
+            BizFinancialSalaryDetail salaryDetail = new BizFinancialSalaryDetail();
+            salaryDetail.setFinancialSalaryId(salary.getId());
+            salaryDetail.setYear(bizFinancialSalary.getYear());
+            salaryDetail.setMonth(bizFinancialSalary.getMonth());
+            //查询当前期间明细
+            List <BizFinancialSalaryDetail> bizFinancialSalaryDetails = bizFinancialSalaryDetailService.getList(salaryDetail);
+            if(bizFinancialSalaryDetails.size()==0){
+                salaryDetail.setStatus(0);
+                salary.setServiceName("");
+            }else{
+                salaryDetail=bizFinancialSalaryDetails.get(0);
+                SysUser sysUser = sysUserMapper.selectUserById(salaryDetail.getVerifierId());
+                salary.setServiceName(sysUser==null?"":sysUser.getNickName());
+            }
+            //设置状态
+            switch (salaryDetail.getStatus()) {
+                case 0:
+                    salary.setCurrentStatus("未开始");
+                    break;
+                case 1:
+                    salary.setCurrentStatus("待确认");
+                    break;
+                case 2:
+                    salary.setCurrentStatus("待审核");
+                    break;
+                case 3:
+                    salary.setCurrentStatus("已完成");
+                    break;
+                case 4:
+                    salary.setCurrentStatus("驳回待处理");
+                    break;
+                default:
+                    break;
+            }
+
+        }
+        ExcelUtil<BizFinancialSalary> util = new ExcelUtil<BizFinancialSalary>(BizFinancialSalary.class);
+        util.exportExcel(response, list, "工资数据");
+    }
 }

+ 25 - 1
src/main/java/cn/ezhizao/project/business/salary/domain/BizFinancialSalary.java

@@ -7,6 +7,8 @@ import lombok.Data;
 import io.swagger.annotations.ApiModelProperty;
 import cn.ezhizao.framework.aspectj.lang.annotation.Excel;
 
+import javax.validation.constraints.Pattern;
+import java.security.Timestamp;
 import java.util.List;
 
 /**
@@ -45,19 +47,36 @@ public class BizFinancialSalary extends BaseEntity
     @ApiModelProperty(value = "${comment}")
     private Long workOrderId;
 
+    @TableField(exist = false)
+    private Timestamp currentTime;
+
     /** 任务停止 */
-    @Excel(name = "任务停止")
+//    @Excel(name = "任务停止")
     @ApiModelProperty(value = "任务停止")
     private Integer isStop;
 
     /** 列表显示新增 */
     @TableField(exist = false)
+    @Excel(name = "客户名称",sort = 1)
     private String companyName;
+
     @TableField(exist = false)
+    @Excel(name = "来源",sort = 2)
     private String fromCompanyName;
+
+    @TableField(exist = false)
+    @Excel(name = "查询期间",sort = 4)
+    private String currentPeriod;
+
     @TableField(exist = false)
+    @Excel(name = "纳税性质",sort = 6)
     private String taxType;
 
+    /** 社会信用代码 */
+    @Excel(name = "税号",sort = 3)
+    @TableField(exist = false)
+    private String socialCreditCode;
+
     @TableField(exist = false)
     private List<BizFinancialSalaryDetail> details;
 
@@ -71,6 +90,10 @@ public class BizFinancialSalary extends BaseEntity
     @TableField(exist = false)
     private Integer status;
 
+    @Excel(name = "当前状态",sort = 5)
+    @TableField(exist = false)
+    private String currentStatus;
+
     @TableField(exist = false)
     private Integer hasIndividualIncomeTax;
 
@@ -83,6 +106,7 @@ public class BizFinancialSalary extends BaseEntity
 
     //执行人
     @TableField(exist = false)
+    @Excel(name = "执行人",sort = 7)
     private String serviceName;
     @TableField(exist = false)
     private String currentDate;

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

@@ -30,6 +30,7 @@ public class BizFinancialSalaryDetail extends BaseEntity
     @ApiModelProperty(value = "${comment}")
     private Long companyId;
 
+    @Excel(name = "客户名称")
     @TableField(exist = false)
     private String companyName;
     @TableField(exist = false)
@@ -71,7 +72,7 @@ public class BizFinancialSalaryDetail extends BaseEntity
     private Integer hasIndividualIncomeTax;
 
     /** 审核人 */
-    @ApiModelProperty(value = "是否有税款")
+    @ApiModelProperty(value = "审核人")
     private Long verifierId;
 
     /** 人员数量 */
@@ -129,4 +130,6 @@ public class BizFinancialSalaryDetail extends BaseEntity
     private BigDecimal  otherCut;
 
 
+
+
 }

+ 33 - 25
src/main/java/cn/ezhizao/project/business/salary/domain/BizFinancialSalaryDetailEmployee.java

@@ -26,6 +26,10 @@ public class BizFinancialSalaryDetailEmployee extends BaseEntity
     @ApiModelProperty(value = "${comment}")
     private Long financialSalaryId;
 
+    @Excel(name = "客户名称")
+    @TableField(exist = false)
+    private String companyName;
+
     /** 月工资单外键 */
     @ApiModelProperty(value = "${comment}")
     private Long financialSalaryDetailId;
@@ -42,7 +46,7 @@ public class BizFinancialSalaryDetailEmployee extends BaseEntity
     private String employeeName;
 
     /** 部门名称 */
-    @Excel(name = "部门名称")
+//    @Excel(name = "部门名称")
     @ApiModelProperty(value = "部门名称")
     private String departmentName;
 
@@ -52,37 +56,38 @@ public class BizFinancialSalaryDetailEmployee extends BaseEntity
     private String idCode;
 
     /** 工资 */
-    @Excel(name = "工资")
     @ApiModelProperty(value = "工资")
     private BigDecimal salaryAmount;
 
+    /** 应发工资 */
+    @Excel(name = "应发工资")
+    @ApiModelProperty(value = "应发工资")
+    private BigDecimal planSalary;
+
     /** 奖金 */
     @Excel(name = "奖金")
     @ApiModelProperty(value = "奖金")
     private BigDecimal bonusAmount;
 
     /** 津贴 */
-    @Excel(name = "津贴")
+//    @Excel(name = "津贴")
     @ApiModelProperty(value = "津贴")
     private BigDecimal allowanceAmount;
 
     /** 补贴 */
-    @Excel(name = "补贴")
+//    @Excel(name = "补贴")
     @ApiModelProperty(value = "补贴")
     private BigDecimal subsidyAmount;
 
     /** 缺勤扣款 */
-    @Excel(name = "缺勤扣款")
+//    @Excel(name = "缺勤扣款")
     @ApiModelProperty(value = "缺勤扣款")
     private BigDecimal absenceCut;
 
-    /** 应发工资 */
-    @Excel(name = "应发工资")
-    @ApiModelProperty(value = "应发工资")
-    private BigDecimal planSalary;
+
 
     /** 实发工资 */
-    @Excel(name = "实发工资")
+//    @Excel(name = "实发工资")
     @ApiModelProperty(value = "实发工资")
     private BigDecimal actuallySalary;
 
@@ -117,77 +122,77 @@ public class BizFinancialSalaryDetailEmployee extends BaseEntity
     private BigDecimal otherCut;
 
     /** 累计收入 */
-    @Excel(name = "累计收入")
+//    @Excel(name = "累计收入")
     @ApiModelProperty(value = "累计收入")
     private BigDecimal cumulativeIncome;
 
     /** 累计专项扣除 */
-    @Excel(name = "累计专项扣除")
+//    @Excel(name = "累计专项扣除")
     @ApiModelProperty(value = "累计专项扣除")
     private BigDecimal cumulativeSpecialCut;
 
     /** 累计子女教育扣除 */
-    @Excel(name = "累计子女教育扣除")
+//    @Excel(name = "累计子女教育扣除")
     @ApiModelProperty(value = "累计子女教育扣除")
     private BigDecimal cumulativeChildEduCut;
 
     /** 累计住房贷款利息扣除 */
-    @Excel(name = "累计住房贷款利息扣除")
+//    @Excel(name = "累计住房贷款利息扣除")
     @ApiModelProperty(value = "累计住房贷款利息扣除")
     private BigDecimal cumulativeHouseLoanInterestCut;
 
     /** 累计住房租金扣除 */
-    @Excel(name = "累计住房租金扣除")
+//    @Excel(name = "累计住房租金扣除")
     @ApiModelProperty(value = "累计住房租金扣除")
     private BigDecimal cumulativeHouseRentCut;
 
     /** 累计赡养老人扣除 */
-    @Excel(name = "累计赡养老人扣除")
+//    @Excel(name = "累计赡养老人扣除")
     @ApiModelProperty(value = "累计赡养老人扣除")
     private BigDecimal cumulativeSupportElderCut;
 
     /** 累计继续教育扣除 */
-    @Excel(name = "累计继续教育扣除")
+//    @Excel(name = "累计继续教育扣除")
     @ApiModelProperty(value = "累计继续教育扣除")
     private BigDecimal cumulativeContinuingEduCut;
 
     /** 累计婴幼儿照料扣除 */
-    @Excel(name = "累计婴幼儿照料扣除")
+//    @Excel(name = "累计婴幼儿照料扣除")
     @ApiModelProperty(value = "累计婴幼儿照料扣除")
     private BigDecimal cumulativeBabyCareCut;
 
     /** 累计专项扣除合计 */
-    @Excel(name = "累计专项扣除合计")
+//    @Excel(name = "累计专项扣除合计")
     @ApiModelProperty(value = "累计专项扣除合计")
     private BigDecimal sumSpecialCumulativeCut;
 
     /** 累计其他扣除 */
-    @Excel(name = "累计其他扣除")
+//    @Excel(name = "累计其他扣除")
     @ApiModelProperty(value = "累计其他扣除")
     private BigDecimal cumulativeOtherCut;
 
     /** 累计应缴个税 */
-    @Excel(name = "累计应缴个税")
+//    @Excel(name = "累计应缴个税")
     @ApiModelProperty(value = "累计应缴个税")
     private BigDecimal cumulativeIndividualIncomeTax;
 
     /** 累计已缴纳个税 */
-    @Excel(name = "累计已缴纳个税")
+//    @Excel(name = "累计已缴纳个税")
     @ApiModelProperty(value = "累计已缴纳个税")
     private BigDecimal cumulativeHasPaidIit;
 
     /** 本月应缴个税 */
-    @Excel(name = "本月应缴个税")
+    @Excel(name = "个税")
     @ApiModelProperty(value = "本月应缴个税")
     private BigDecimal currentIndividualIncomeTax;
 
     /** 签名 */
-    @Excel(name = "签名")
+//    @Excel(name = "签名")
     @ApiModelProperty(value = "签名")
     private String idiograph;
 
     /** 确认税款 */
-    @Excel(name = "确认税款")
+//    @Excel(name = "确认税款")
     @ApiModelProperty(value = "确认税款")
     private BigDecimal individualIncomeTaxConfirm;
 
@@ -200,4 +205,7 @@ public class BizFinancialSalaryDetailEmployee extends BaseEntity
     @TableField(exist = false)
     private BigDecimal individualIncomeTax;
 
+    /** 备注 */
+    @Excel(name = "备注")
+    private String remark;
 }

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

@@ -27,4 +27,5 @@ public interface IBizFinancialSalaryDetailEmployeeService extends IService<BizFi
      */
     public int physicalDelete(BizFinancialSalaryDetailEmployee bizFinancialSalaryDetailEmployee);
 
+
 }

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

@@ -1,6 +1,8 @@
 package cn.ezhizao.project.business.salary.service;
 
 import java.util.List;
+
+import cn.ezhizao.project.business.salary.domain.BizFinancialSalaryDetailEmployee;
 import com.baomidou.mybatisplus.extension.service.IService;
 import cn.ezhizao.project.business.salary.domain.BizFinancialSalaryDetail;
 
@@ -27,4 +29,6 @@ public interface IBizFinancialSalaryDetailService extends IService<BizFinancialS
      */
     public int physicalDelete(BizFinancialSalaryDetail bizFinancialSalaryDetail);
 
+
+
 }

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

@@ -1,6 +1,8 @@
 package cn.ezhizao.project.business.salary.service;
 
 import java.util.List;
+
+import cn.ezhizao.project.business.salary.domain.BizFinancialSalaryDetailEmployee;
 import com.baomidou.mybatisplus.extension.service.IService;
 import cn.ezhizao.project.business.salary.domain.BizFinancialSalary;
 
@@ -27,4 +29,5 @@ public interface IBizFinancialSalaryService extends IService<BizFinancialSalary>
      */
     public int physicalDelete(BizFinancialSalary bizFinancialSalary);
 
+    String importSalary(List<BizFinancialSalaryDetailEmployee> detailList, String year, String month, Long tenantId,Integer isZero);
 }

+ 12 - 1
src/main/java/cn/ezhizao/project/business/salary/service/impl/BizFinancialSalaryDetailEmployeeServiceImpl.java

@@ -2,6 +2,13 @@ package cn.ezhizao.project.business.salary.service.impl;
 
 import java.util.List;
 import javax.annotation.Resource;
+
+import cn.ezhizao.common.exception.ServiceException;
+import cn.ezhizao.common.utils.StringUtils;
+import cn.ezhizao.project.business.salary.domain.BizFinancialSalary;
+import cn.ezhizao.project.business.salary.domain.BizFinancialSalaryDetail;
+import cn.ezhizao.project.business.salary.service.IBizFinancialSalaryDetailService;
+import cn.ezhizao.project.business.salary.service.IBizFinancialSalaryService;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import org.springframework.stereotype.Service;
 import cn.ezhizao.project.business.salary.mapper.BizFinancialSalaryDetailEmployeeMapper;
@@ -20,6 +27,8 @@ public class BizFinancialSalaryDetailEmployeeServiceImpl  extends ServiceImpl<Bi
     @Resource
     private BizFinancialSalaryDetailEmployeeMapper bizFinancialSalaryDetailEmployeeMapper;
 
+
+
     /**
      * 查询工资人员信息列表
      *
@@ -38,6 +47,8 @@ public class BizFinancialSalaryDetailEmployeeServiceImpl  extends ServiceImpl<Bi
      * @return 删除结果
      */
     @Override
-    public int physicalDelete(BizFinancialSalaryDetailEmployee bizFinancialSalaryDetailEmployee){ return bizFinancialSalaryDetailEmployeeMapper.physicalDelete(bizFinancialSalaryDetailEmployee); };
+    public int physicalDelete(BizFinancialSalaryDetailEmployee bizFinancialSalaryDetailEmployee){ return bizFinancialSalaryDetailEmployeeMapper.physicalDelete(bizFinancialSalaryDetailEmployee); }
+
+
 
 }

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

@@ -3,9 +3,13 @@ package cn.ezhizao.project.business.salary.service.impl;
 import java.util.List;
 import javax.annotation.Resource;
 
+import cn.ezhizao.common.exception.ServiceException;
+import cn.ezhizao.common.utils.StringUtils;
 import cn.ezhizao.project.business.salary.domain.BizFinancialSalary;
 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 cn.ezhizao.project.business.salary.service.IBizFinancialSalaryService;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import org.springframework.stereotype.Service;
 import cn.ezhizao.project.business.salary.mapper.BizFinancialSalaryDetailMapper;
@@ -26,6 +30,8 @@ public class BizFinancialSalaryDetailServiceImpl  extends ServiceImpl<BizFinanci
     @Resource
     private IBizFinancialSalaryDetailEmployeeService bizFinancialSalaryDetailEmployeeService;
 
+
+
     /**
      * 查询工资报工信息列表
      *
@@ -75,4 +81,6 @@ public class BizFinancialSalaryDetailServiceImpl  extends ServiceImpl<BizFinanci
         return status;
     }
 
+
+
 }

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

@@ -1,7 +1,17 @@
 package cn.ezhizao.project.business.salary.service.impl;
 
+import java.math.BigDecimal;
 import java.util.List;
 import javax.annotation.Resource;
+
+import cn.ezhizao.common.exception.ServiceException;
+import cn.ezhizao.common.utils.StringUtils;
+import cn.ezhizao.project.business.company.domain.BizCompany;
+import cn.ezhizao.project.business.salary.domain.BizFinancialSalaryDetail;
+import cn.ezhizao.project.business.salary.domain.BizFinancialSalaryDetailEmployee;
+import cn.ezhizao.project.business.salary.mapper.BizFinancialSalaryDetailEmployeeMapper;
+import cn.ezhizao.project.business.salary.mapper.BizFinancialSalaryDetailMapper;
+import cn.ezhizao.project.business.salary.service.IBizFinancialSalaryDetailService;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import org.springframework.stereotype.Service;
 import cn.ezhizao.project.business.salary.mapper.BizFinancialSalaryMapper;
@@ -20,6 +30,15 @@ public class BizFinancialSalaryServiceImpl  extends ServiceImpl<BizFinancialSala
     @Resource
     private BizFinancialSalaryMapper bizFinancialSalaryMapper;
 
+    @Resource
+    private IBizFinancialSalaryDetailService bizFinancialSalaryDetailService;
+
+    @Resource
+    private BizFinancialSalaryDetailEmployeeMapper bizFinancialSalaryDetailEmployeeMapper;
+
+    @Resource
+    private BizFinancialSalaryDetailMapper bizFinancialSalaryDetailMapper;
+
     /**
      * 查询工资列表
      *
@@ -40,4 +59,72 @@ public class BizFinancialSalaryServiceImpl  extends ServiceImpl<BizFinancialSala
     @Override
     public int physicalDelete(BizFinancialSalary bizFinancialSalary){ return bizFinancialSalaryMapper.physicalDelete(bizFinancialSalary); };
 
+
+    @Override
+    public String importSalary(List<BizFinancialSalaryDetailEmployee> detailList, String year, String month, Long tenantId,Integer isZero  ) {
+        if (StringUtils.isNull(detailList) || detailList.size() == 0) {
+            throw new ServiceException("导入数据不能为空!");
+        }
+        int successNum = 0;
+        int failureNum = 0;
+        StringBuilder successMsg = new StringBuilder();
+        StringBuilder failureMsg = new StringBuilder();
+        //获取工资信息
+        for(BizFinancialSalaryDetailEmployee l : detailList){
+            BizFinancialSalary salary=new BizFinancialSalary();
+            salary.setCompanyName(l.getCompanyName());
+            salary.setTenantId(tenantId);
+            salary.setIsZero(isZero);
+            List <BizFinancialSalary> salaryList= getList(salary);
+            //是否存在该客户
+            if(salaryList.size() == 0){
+                failureNum++;
+                failureMsg.append("<br/>").append(failureNum).append("、客户 ").append(l.getCompanyName()).append(" 不存在");
+                continue;
+            }
+            if(salaryList.size() > 1){
+                failureNum++;
+                failureMsg.append("<br/>").append(failureNum).append("、客户 ").append(l.getCompanyName()).append("请输入详细客户名称");
+                continue;
+            }
+            salary=salaryList.get(0);
+            //获取工资明细
+            BizFinancialSalaryDetail salaryDetail=new BizFinancialSalaryDetail();
+            salaryDetail.setFinancialSalaryId(salary.getId());
+            salaryDetail.setMonth(month);
+            salaryDetail.setYear(year);
+            List<BizFinancialSalaryDetail> salaryDetailList=bizFinancialSalaryDetailService.getList(salaryDetail);
+            if(salaryDetailList.size()>0){
+                failureNum++;
+                failureMsg.append("<br/>").append(failureNum).append("、客户 ").append(l.getCompanyName()).append(year+"年"+month+"月").append("工资已有数据");
+                continue;
+            }
+
+            //设置状态为待确认
+            salaryDetail.setStatus(1);
+            salaryDetail.setCompanyId(salary.getCompanyId());
+            //新增工资明细
+            bizFinancialSalaryDetailMapper.insert(salaryDetail);
+            //计算应发工资
+            l.setActuallySalary(l.getPlanSalary()==null? BigDecimal.valueOf(0) :l.getPlanSalary().add(l.getBonusAmount()==null? BigDecimal.valueOf(0) :l.getBonusAmount()));
+            //计算实发工资
+            l.setActuallySalary(l.getActuallySalary()==null? BigDecimal.valueOf(0) :l.getActuallySalary().subtract(l.getEndowmentInsurance()==null? BigDecimal.valueOf(0) :l.getEndowmentInsurance()).subtract(l.getMedicalInsurance()==null? BigDecimal.valueOf(0) :l.getMedicalInsurance())
+                    .subtract(l.getUnemploymentBenefit()==null? BigDecimal.valueOf(0) :l.getUnemploymentBenefit()).subtract(l.getSeriousIllnessInsurance()==null? BigDecimal.valueOf(0) :l.getSeriousIllnessInsurance())
+                    .subtract(l.getHousingFund()==null? BigDecimal.valueOf(0) :l.getHousingFund()).subtract(l.getOtherCut()==null? BigDecimal.valueOf(0) :l.getOtherCut()));
+            //设置外键
+            l.setFinancialSalaryId(salary.getId());
+            l.setFinancialSalaryDetailId(salaryDetail.getId());
+            //新增人员明细
+            bizFinancialSalaryDetailEmployeeMapper.insert(l);
+            successNum++;
+            successMsg.append("<br/>").append(successNum).append("、工资 ").append(l.getCompanyName()).append(" 导入成功");
+        }
+        if (failureNum > 0) {
+            failureMsg.insert(0, "很抱歉,导入失败!共 " + failureNum + " 条数据格式不正确,错误如下:");
+            throw new ServiceException(failureMsg.toString());
+        } else {
+            successMsg.insert(0, "恭喜您,数据已全部导入成功!共 " + successNum + " 条,数据如下:");
+        }
+        return successMsg.toString();
+    }
 }

+ 91 - 10
src/main/java/cn/ezhizao/project/business/socialSecurity/controller/SocialSecurityConfirmController.java

@@ -2,11 +2,15 @@ package cn.ezhizao.project.business.socialSecurity.controller;
 
 import cn.ezhizao.common.utils.PdfUtil;
 import cn.ezhizao.common.utils.SecurityUtils;
+import cn.ezhizao.common.utils.poi.ExcelUtil;
+import cn.ezhizao.framework.aspectj.lang.annotation.Log;
+import cn.ezhizao.framework.aspectj.lang.enums.BusinessType;
 import cn.ezhizao.framework.web.controller.BaseController;
 import cn.ezhizao.framework.web.domain.AjaxResult;
 import cn.ezhizao.framework.web.page.TableDataInfo;
 import cn.ezhizao.project.business.company.domain.BizCompany;
 import cn.ezhizao.project.business.company.service.IBizCompanyService;
+import cn.ezhizao.project.business.finance.IndividualIncomeTaxIsZero.domain.BizFinancialIndividualIncomeTaxDetailIsZero;
 import cn.ezhizao.project.business.housingFund.domain.BizHousingFundConfirmDetail;
 import cn.ezhizao.project.business.housingFund.domain.BizHousingFundConfirmDetailEmployee;
 import cn.ezhizao.project.business.salary.domain.BizFinancialSalaryDetail;
@@ -15,6 +19,8 @@ import cn.ezhizao.project.business.socialSecurity.domain.*;
 import cn.ezhizao.project.business.socialSecurity.service.*;
 import cn.ezhizao.project.business.workOrder.domain.BizWorkOrderRecord;
 import cn.ezhizao.project.business.workOrder.service.IBizWorkOrderRecordService;
+import cn.ezhizao.project.system.domain.SysUser;
+import cn.ezhizao.project.system.mapper.SysUserMapper;
 import cn.hutool.core.io.IoUtil;
 import cn.hutool.poi.excel.ExcelWriter;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
@@ -30,6 +36,7 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
 import org.springframework.web.servlet.view.freemarker.FreeMarkerConfigurer;
 
 import javax.annotation.Resource;
@@ -63,6 +70,8 @@ public class SocialSecurityConfirmController extends BaseController {
     IBizSocialSecurityConfirmDetailService socialSecurityConfirmDetailService;
     @Resource
     IBizSocialSecurityConfirmDetailEmployeeService socialSecurityConfirmDetailEmployeeService;
+    @Resource
+    SysUserMapper sysUserMapper;
 
     /**
      * 生成pdf
@@ -264,6 +273,27 @@ public class SocialSecurityConfirmController extends BaseController {
         return toAjax(socialSecurityConfirmDetailService.save(detail) && addRecord(detail.getSocialSecurityConfirmId(), detail.getYear(), detail.getMonth(), SecurityUtils.getUserId(), "填写社保人员信息"));
     }
 
+    @Log(title = "社保导入", businessType = BusinessType.IMPORT)
+    @PreAuthorize("@ss.hasPermi('business:socialSecurityConfirm:import')")
+    @PostMapping("/importData")
+    public AjaxResult importData(MultipartFile file, @RequestParam String year, @RequestParam String month) throws Exception
+    {
+        ExcelUtil<BizSocialSecurityConfirmDetailEmployee> util = new ExcelUtil<>(BizSocialSecurityConfirmDetailEmployee.class);
+        List<BizSocialSecurityConfirmDetailEmployee> detailList = util.importExcel(file.getInputStream());
+        String message=socialSecurityConfirmService.importSalary(detailList,year,month,getTenantId()==null?0:getTenantId());
+        return success(message);
+    }
+
+    /**
+     * 导出社保模板
+     */
+    @Log(title = "导出社保模板", businessType = BusinessType.EXPORT)
+    @PostMapping("/exportSocialSecurityTemplate")
+    public void exportSalaryTemplate(HttpServletResponse response) throws NoSuchFieldException, IllegalAccessException {
+        ExcelUtil<BizSocialSecurityConfirmDetailEmployee> util = new ExcelUtil<BizSocialSecurityConfirmDetailEmployee>(BizSocialSecurityConfirmDetailEmployee.class);
+        util.importTemplateExcel(response, "社保模板");
+    }
+
     @PreAuthorize("@ss.hasPermi('business:socialSecurityConfirm:edit')")
     @PostMapping("/updateDetail")
     @Transactional(rollbackFor = Exception.class)
@@ -281,6 +311,8 @@ public class SocialSecurityConfirmController extends BaseController {
         return toAjax(socialSecurityConfirmDetailService.updateById(detail) && addRecord(detail.getSocialSecurityConfirmId(), detail.getYear(), detail.getMonth(), SecurityUtils.getUserId(), "修改社保人员信息"));
     }
 
+
+
     @PreAuthorize("@ss.hasPermi('business:socialSecurityConfirm:edit')")
     @PostMapping("/checkEmployees")
     @Transactional(rollbackFor = Exception.class)
@@ -407,7 +439,53 @@ public class SocialSecurityConfirmController extends BaseController {
         }
     }
 
-    @ApiOperation("导出公积金人员信息")
+    /**
+     * 导出列表
+     */
+    @PreAuthorize("@ss.hasPermi('business:socialSecurityConfirm:export')")
+    @Log(title = "个税详情", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, BizSocialSecurityConfirm financialSocialSecurityConfirm) throws NoSuchFieldException, IllegalAccessException
+    {
+        setTenantId(financialSocialSecurityConfirm);
+        List<BizSocialSecurityConfirm> list = socialSecurityConfirmService.getListByBean(financialSocialSecurityConfirm);
+        for (BizSocialSecurityConfirm l: list){
+            l.setCurrentPeriod(financialSocialSecurityConfirm.getYear()+"-"+financialSocialSecurityConfirm.getMonth());
+            BizSocialSecurityConfirmDetail detail = new BizSocialSecurityConfirmDetail();
+            detail.setSocialSecurityConfirmId(l.getId());
+            detail.setYear(financialSocialSecurityConfirm.getYear());
+            detail.setMonth(financialSocialSecurityConfirm.getMonth());
+            List<BizSocialSecurityConfirmDetail> details = socialSecurityConfirmDetailService.getListByBean(detail);
+            if(details.size() == 0){
+                l.setStatusText("未开始");
+                l.setServiceName("");
+            }else{
+                detail=details.get(0);
+                SysUser sysUser = sysUserMapper.selectUserById(detail.getVerifierId());
+                l.setServiceName(sysUser==null?"":sysUser.getNickName());
+                switch (detail.getStatus()){
+                    case 0:
+                        l.setStatusText("未开始");
+                        break;
+                    case 2:
+                        l.setStatusText("待审核");
+                        break;
+                    case 3:
+                        l.setStatusText("已完成");
+                        break;
+                    case 4:
+                        l.setStatusText("驳回待处理");
+                        break;
+                    default:
+                        break;
+                }
+            }
+        }
+        ExcelUtil<BizSocialSecurityConfirm> util = new ExcelUtil<BizSocialSecurityConfirm>(BizSocialSecurityConfirm.class);
+        util.exportExcel(response, list, "社保人员确认数据");
+    }
+
+    @ApiOperation("导出社保人员信息")
     @PostMapping("/exportSocialSecurityExcel")
     public void exportDetailExcel(@RequestParam Long id, HttpServletResponse response) {
         BizSocialSecurityConfirmDetail socialSecurityConfirm = socialSecurityConfirmDetailService.getById(id);
@@ -423,22 +501,24 @@ public class SocialSecurityConfirmController extends BaseController {
             return;
         }
         ExcelWriter writer = cn.hutool.poi.excel.ExcelUtil.getWriter(true);
-        writer.merge(0, 0, 0, 4, "公积金人员信息", true);
-        writer.merge(1, 1, 0, 2, company.getName(), false);
-        writer.merge(1, 1, 3, 4, socialSecurityConfirm.getYear() + "年 第" + socialSecurityConfirm.getMonth() + "期", false);
+        writer.merge(0, 0, 0, 5, "社保员信息", true);
+        writer.merge(1, 1, 0, 3, company.getName(), false);
+        writer.merge(1, 1, 4, 5, socialSecurityConfirm.getYear() + "年 第" + socialSecurityConfirm.getMonth() + "期", false);
         writer.writeCellValue(0, 2, "员工名");
         writer.writeCellValue(1, 2, "电话号码");
-        writer.writeCellValue(2, 2, "基数");
-        writer.writeCellValue(3, 2, "医疗基数");
-        writer.writeCellValue(4, 2, "备注");
+        writer.writeCellValue(2, 2, "采暖费");
+        writer.writeCellValue(3, 2, "基数");
+        writer.writeCellValue(4, 2, "医疗基数");
+        writer.writeCellValue(5, 2, "备注");
 
         int row = 0;
         for (int i = 0; i < socialSecurityConfirm.getDetails().size(); i++) {
             writer.writeCellValue(0, i + 3, socialSecurityConfirm.getDetails().get(i).getEmployeeName());
             writer.writeCellValue(1, i + 3, socialSecurityConfirm.getDetails().get(i).getPhone());
-            writer.writeCellValue(2, i + 3, socialSecurityConfirm.getDetails().get(i).getCardinalNumber());
-            writer.writeCellValue(3, i + 3, socialSecurityConfirm.getDetails().get(i).getMedicalCardinalNumber());
-            writer.writeCellValue(4, i + 3, socialSecurityConfirm.getDetails().get(i).getRemark());
+            writer.writeCellValue(2, i + 3, socialSecurityConfirm.getDetails().get(i).getHeatingFee());
+            writer.writeCellValue(3, i + 3, socialSecurityConfirm.getDetails().get(i).getCardinalNumber());
+            writer.writeCellValue(4, i + 3, socialSecurityConfirm.getDetails().get(i).getMedicalCardinalNumber());
+            writer.writeCellValue(5, i + 3, socialSecurityConfirm.getDetails().get(i).getRemark());
 
             row = i + 1;
         }
@@ -456,6 +536,7 @@ public class SocialSecurityConfirmController extends BaseController {
         writer.setColumnWidth(2, 10);
         writer.setColumnWidth(3, 10);
         writer.setColumnWidth(4, 10);
+        writer.setColumnWidth(5, 10);
 
         //设置标题单元格 样式
         Font headFont = writer.createFont();

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

@@ -1,6 +1,9 @@
 package cn.ezhizao.project.business.socialSecurity.controller;
 
 import cn.ezhizao.common.utils.SecurityUtils;
+import cn.ezhizao.common.utils.poi.ExcelUtil;
+import cn.ezhizao.framework.aspectj.lang.annotation.Log;
+import cn.ezhizao.framework.aspectj.lang.enums.BusinessType;
 import cn.ezhizao.framework.web.controller.BaseController;
 import cn.ezhizao.framework.web.domain.AjaxResult;
 import cn.ezhizao.framework.web.page.TableDataInfo;
@@ -16,6 +19,8 @@ import cn.ezhizao.project.business.socialSecurity.service.IBizSocialSecurityDecl
 import cn.ezhizao.project.business.workOrder.domain.BizWorkOrderRecord;
 import cn.ezhizao.project.business.workOrder.service.IBizWorkOrderRecordService;
 import cn.ezhizao.project.system.domain.SysFileStorage;
+import cn.ezhizao.project.system.domain.SysUser;
+import cn.ezhizao.project.system.mapper.SysUserMapper;
 import cn.ezhizao.project.system.service.ISysFileStorageService;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
@@ -25,6 +30,7 @@ import org.springframework.transaction.annotation.Transactional;
 import org.springframework.web.bind.annotation.*;
 
 import javax.annotation.Resource;
+import javax.servlet.http.HttpServletResponse;
 import java.math.BigDecimal;
 import java.util.*;
 import java.util.stream.Collectors;
@@ -49,6 +55,8 @@ public class SocialSecurityDeclareController extends BaseController {
     @Resource
     IBizCompanyService companyService;
     @Resource
+    SysUserMapper sysUserMapper;
+    @Resource
     ISysFileStorageService fileStorageService;
     @Resource
     IBizDeductionService deductionService;
@@ -116,6 +124,60 @@ public class SocialSecurityDeclareController extends BaseController {
         return getDataTable(list);
     }
 
+    /**
+     * 导出列表
+     */
+    @PreAuthorize("@ss.hasPermi('business:socialSecurityConfirm:export')")
+    @Log(title = "个税详情", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, BizSocialSecurityDeclare conditions) throws NoSuchFieldException, IllegalAccessException
+    {
+        setTenantId(conditions);
+        startOrderBy();
+        List<BizSocialSecurityDeclare> list = socialSecurityDeclareService.getListByBean(conditions);
+        for (BizSocialSecurityDeclare l: list){
+            l.setCurrentPeriod(conditions.getYear()+"-"+conditions.getMonth());
+            BizSocialSecurityDeclareDetail detail = new BizSocialSecurityDeclareDetail();
+            detail.setSocialSecurityDeclareId(l.getId());
+            detail.setYear(conditions.getYear());
+            detail.setMonth(conditions.getMonth());
+            List<BizSocialSecurityDeclareDetail> details = socialSecurityDeclareDetailService.getListByBean(detail);
+            if(details.size() == 0){
+                l.setStatusText("未开始");
+                l.setMakeOut("未填写");
+                l.setServiceName("");
+            }else{
+                detail=details.get(0);
+                List<BizWorkOrderRecord> records = bizWorkOrderRecordService.query().eq("work_order_id", l.getWorkOrderId()).eq("year", conditions.getYear()).eq("month", conditions.getMonth()).eq("from_id", 0).list();
+                if(records.size()>0){
+                    SysUser sysUser = sysUserMapper.selectUserById(records.get(0).getRecorderId());
+                    l.setServiceName(sysUser==null?"":sysUser.getNickName());
+                }else{
+                    l.setServiceName("");
+                }
+                switch (detail.getStatus()){
+                    case 0:
+                        l.setStatusText("未开始");
+                        l.setMakeOut("未填写");
+                        break;
+                    case 1:
+                        l.setStatusText("进行中");
+                        l.setMakeOut("进行中");
+                        break;
+                    case 3:
+                        l.setStatusText("已完成");
+                        l.setMakeOut("已填写");
+                        break;
+                    default:
+                        break;
+                }
+            }
+        }
+        ExcelUtil<BizSocialSecurityDeclare> util = new ExcelUtil<BizSocialSecurityDeclare>(BizSocialSecurityDeclare.class);
+        util.exportExcel(response, list, "社保申报任务数据");
+    }
+
+
     @ApiOperation(value = "带条件List 分页查询", notes = "带条件List 分页查询")
     @PostMapping("/getListForYear")
     @ResponseBody
@@ -135,6 +197,8 @@ public class SocialSecurityDeclareController extends BaseController {
         return getDataTable(list);
     }
 
+
+
     @ApiOperation(value = "整体保存", notes = "整体保存")
     @PostMapping("/saveFile")
     @Transactional(rollbackFor = Exception.class)
@@ -154,11 +218,15 @@ public class SocialSecurityDeclareController extends BaseController {
             // 先获取之前的一个月是否已填报,然后获取填报后的工资人员信息
             BizSocialSecurityDeclareDetail detail = socialSecurityDeclareDetailService.query().eq("social_security_declare_id", condition.getSocialSecurityDeclareId()).lt("concat(year,month)", condition.getYear() + condition.getMonth()).orderByDesc("concat(year, month)").last("limit 1").one();
             if (detail != null) {
-                List<SysFileStorage> files = fileStorageService.query().eq("master_table_name", "biz_social_security_declare_detail").eq("master_id", detail.getId()).list();
+                List<SysFileStorage> files = fileStorageService.query().eq("master_table_name", "biz_social_security_declare_detail").eq("master_id", detail.getId()).eq("type","evidenceFile").list();
                 files.forEach(l -> l.setId(null));
                 condition.setEvidenceFiles(files);
+                List<SysFileStorage> reportFiles = fileStorageService.query().eq("master_table_name", "biz_social_security_declare_detail").eq("master_id", detail.getId()).eq("type","reportFile").list();
+                reportFiles.forEach(l -> l.setId(null));
+                condition.setReportFiles(reportFiles);
             } else {
                 condition.setEvidenceFiles(new ArrayList<>());
+                condition.setReportFiles(new ArrayList<>());
             }
             condition.setEmployeePassword(company.getEmployeePassword());
             condition.setGovernmentAccountNo(company.getGovernmentAccountNo());
@@ -180,15 +248,22 @@ public class SocialSecurityDeclareController extends BaseController {
         boolean bool = socialSecurityDeclareDetailService.saveOrUpdate(detail);
         bool = bool && checkDeduction(detail);
         List<SysFileStorage> fileStorages = detail.getEvidenceFiles();
+        List<SysFileStorage> reportFiles = detail.getReportFiles();
         fileStorages.forEach(l -> {
             l.setMasterId(detail.getId());
             l.setMasterTableName("biz_social_security_declare_detail");
+            l.setType("evidenceFile");
+        });
+        reportFiles.forEach(l -> {
+            l.setMasterId(detail.getId());
+            l.setMasterTableName("biz_social_security_declare_detail");
+            l.setType("reportFile");
         });
         SysFileStorage delCondition = new SysFileStorage();
         delCondition.setMasterId(detail.getId());
         delCondition.setMasterTableName("biz_social_security_declare_detail");
         fileStorageService.physicalDelete(delCondition);
-        bool = bool && (fileStorages.isEmpty() || fileStorageService.saveOrUpdateBatch(fileStorages)) && addRecord(detail.getSocialSecurityDeclareId(), detail.getYear(), detail.getMonth(), SecurityUtils.getUserId(), detail.getAmount().compareTo(BigDecimal.ZERO) > 0 ? "社保申报保存" : "社保申报完成", detail.getAmount().compareTo(BigDecimal.ZERO) > 0 ? 1 : 3);
+        bool = bool && (reportFiles.isEmpty() || fileStorageService.saveOrUpdateBatch(reportFiles))&& (fileStorages.isEmpty() || fileStorageService.saveOrUpdateBatch(fileStorages)) && addRecord(detail.getSocialSecurityDeclareId(), detail.getYear(), detail.getMonth(), SecurityUtils.getUserId(), detail.getAmount().compareTo(BigDecimal.ZERO) > 0 ? "社保申报保存" : "社保申报完成", detail.getAmount().compareTo(BigDecimal.ZERO) > 0 ? 1 : 3);
         return bool ? success(detail) : error();
     }
 

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

@@ -1,5 +1,6 @@
 package cn.ezhizao.project.business.socialSecurity.domain;
 
+import cn.ezhizao.framework.aspectj.lang.annotation.Excel;
 import cn.ezhizao.framework.web.domain.BaseEntity;
 import com.baomidou.mybatisplus.annotation.FieldFill;
 import com.baomidou.mybatisplus.annotation.TableField;
@@ -32,9 +33,15 @@ public class BizSocialSecurityConfirm extends BaseEntity implements Serializable
     @ApiModelProperty(value = "当前维护人员")
     private Long currentEmployeeId;
 
+    //税号
+    @TableField(exist = false)
+    @Excel(name = "税号",sort = 4)
+    private String socialCreditCode;
+
     @ApiModelProperty(value = "全部维护人员")
     private String employeeIds;
 
+    @Excel(name = "客户名称",sort = 1)
     @TableField(exist = false)
     private String companyName;
     @TableField(exist = false)
@@ -47,9 +54,15 @@ public class BizSocialSecurityConfirm extends BaseEntity implements Serializable
     @TableField(exist = false)
     private List<BizSocialSecurityConfirmDetail> details;
 
+    @Excel(name = "来源",sort = 2)
     @TableField(exist = false)
     private String fromCompanyName;
 
+    @Excel(name = "查询期间",sort = 5)
+    @TableField(exist = false)
+    private String currentPeriod;
+
+    @Excel(name = "纳税类型",sort = 3)
     @TableField(exist = false)
     private String taxType;
 
@@ -71,7 +84,12 @@ public class BizSocialSecurityConfirm extends BaseEntity implements Serializable
     @TableField(exist = false)
     private Long principal;
 
+    @Excel(name = "状态",sort = 6)
+    @TableField(exist = false)
+    private String statusText;
+
     //执行人
+    @Excel(name = "执行人",sort = 7)
     @TableField(exist = false)
     private String serviceName;
 }

+ 22 - 1
src/main/java/cn/ezhizao/project/business/socialSecurity/domain/BizSocialSecurityConfirmDetailEmployee.java

@@ -1,6 +1,8 @@
 package cn.ezhizao.project.business.socialSecurity.domain;
 
+import cn.ezhizao.framework.aspectj.lang.annotation.Excel;
 import cn.ezhizao.framework.web.domain.BaseEntity;
+import com.baomidou.mybatisplus.annotation.TableField;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
@@ -19,13 +21,18 @@ public class BizSocialSecurityConfirmDetailEmployee extends BaseEntity implement
     private static final long serialVersionUID = 1L;
     @ApiModelProperty(value = "社保任务外键")
     private Long socialSecurityConfirmId;
+    @Excel(name = "客户名称")
+    @TableField(exist = false)
+    private String companyName;
 
     @ApiModelProperty(value = "月社保单外键")
     private Long socialSecurityConfirmDetailId;
 
+    @Excel(name = "员工姓名")
     @ApiModelProperty(value = "员工姓名")
     private String employeeName;
 
+    @Excel(name = "电话号码")
     @ApiModelProperty(value = "电话号码")
     private String phone;
 
@@ -35,17 +42,31 @@ public class BizSocialSecurityConfirmDetailEmployee extends BaseEntity implement
     @ApiModelProperty(value = "身份证反面照片")
     private String idCardImageBack;
 
+    @Excel(name = "基数")
     @ApiModelProperty(value = "基数")
     private BigDecimal cardinalNumber;
 
-
+    @Excel(name = "医疗基数")
     @ApiModelProperty(value = "医疗基数")
     private BigDecimal medicalCardinalNumber;
 
+    @Excel(name = "采暖费")
+    @ApiModelProperty(value = "采暖费")
+    private BigDecimal heatingFee;
+
     @ApiModelProperty(value = "状态")
     private Integer changeStatus;
 
     @ApiModelProperty(value = "客户外键")
     private Long companyId;
 
+    @Excel(name = "备注")
+    @ApiModelProperty(value = "备注")
+    private String remark;
+
+    public void setRemark(String remark)
+    {
+        this.remark = remark;
+    }
+
 }

+ 17 - 0
src/main/java/cn/ezhizao/project/business/socialSecurity/domain/BizSocialSecurityDeclare.java

@@ -1,5 +1,6 @@
 package cn.ezhizao.project.business.socialSecurity.domain;
 
+import cn.ezhizao.framework.aspectj.lang.annotation.Excel;
 import cn.ezhizao.framework.web.domain.BaseEntity;
 import com.baomidou.mybatisplus.annotation.FieldFill;
 import com.baomidou.mybatisplus.annotation.TableField;
@@ -35,6 +36,19 @@ public class BizSocialSecurityDeclare extends BaseEntity implements Serializable
     @ApiModelProperty(value = "全部维护人员")
     private String employeeIds;
 
+    @Excel(name = "所属月",sort = 6)
+    @TableField(exist = false)
+    private String currentPeriod;
+
+    @Excel(name = "状态",sort = 5)
+    @TableField(exist = false)
+    private String statusText;
+
+    @Excel(name = "申报填写",sort = 4)
+    @TableField(exist = false)
+    private String makeOut;
+
+    @Excel(name = "客户名称",sort = 1)
     @TableField(exist = false)
     private String companyName;
     @TableField(exist = false)
@@ -50,9 +64,11 @@ public class BizSocialSecurityDeclare extends BaseEntity implements Serializable
     @TableField(exist = false)
     private List<BizSocialSecurityDeclareDetail> details;
 
+    @Excel(name = "来源",sort = 2)
     @TableField(exist = false)
     private String fromCompanyName;
 
+    @Excel(name = "纳税性质",sort =3)
     @TableField(exist = false)
     private String taxType;
 
@@ -75,6 +91,7 @@ public class BizSocialSecurityDeclare extends BaseEntity implements Serializable
     private Long principal;
 
     //执行人
+    @Excel(name = "执行人",sort = 7)
     @TableField(exist = false)
     private String serviceName;
 }

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

@@ -79,6 +79,9 @@ public class BizSocialSecurityDeclareDetail extends BaseEntity implements Serial
     @TableField(exist = false)
     private List<SysFileStorage> evidenceFiles;
 
+    @TableField(exist = false)
+    private List<SysFileStorage> reportFiles;
+
     @TableField(exist = false)
     private String companyName;
     @TableField(exist = false)

+ 1 - 0
src/main/java/cn/ezhizao/project/business/socialSecurity/service/IBizSocialSecurityConfirmDetailService.java

@@ -20,6 +20,7 @@ public interface IBizSocialSecurityConfirmDetailService extends IService<BizSoci
     List<BizSocialSecurityConfirmDetail> getListByBean(BizSocialSecurityConfirmDetail financialSocialSecurityConfirmDetail);
 
 
+
     /**
      * 带条件的查询
      *

+ 2 - 0
src/main/java/cn/ezhizao/project/business/socialSecurity/service/IBizSocialSecurityConfirmService.java

@@ -1,6 +1,7 @@
 package cn.ezhizao.project.business.socialSecurity.service;
 
 import cn.ezhizao.project.business.socialSecurity.domain.BizSocialSecurityConfirm;
+import cn.ezhizao.project.business.socialSecurity.domain.BizSocialSecurityConfirmDetailEmployee;
 import com.baomidou.mybatisplus.extension.service.IService;
 
 import java.util.List;
@@ -36,4 +37,5 @@ public interface IBizSocialSecurityConfirmService extends IService<BizSocialSecu
      */
     int getTotal(Map<String, Object> conditions);
 
+    String importSalary(List<BizSocialSecurityConfirmDetailEmployee> detailList, String year, String month, Long tenantId);
 }

+ 77 - 0
src/main/java/cn/ezhizao/project/business/socialSecurity/service/impl/BizSocialSecurityConfirmServiceImpl.java

@@ -1,12 +1,22 @@
 package cn.ezhizao.project.business.socialSecurity.service.impl;
 
+import cn.ezhizao.common.exception.ServiceException;
+import cn.ezhizao.common.utils.StringUtils;
+import cn.ezhizao.project.business.salary.domain.BizFinancialSalary;
+import cn.ezhizao.project.business.salary.domain.BizFinancialSalaryDetail;
+import cn.ezhizao.project.business.salary.domain.BizFinancialSalaryDetailEmployee;
 import cn.ezhizao.project.business.socialSecurity.domain.BizSocialSecurityConfirm;
+import cn.ezhizao.project.business.socialSecurity.domain.BizSocialSecurityConfirmDetail;
+import cn.ezhizao.project.business.socialSecurity.domain.BizSocialSecurityConfirmDetailEmployee;
+import cn.ezhizao.project.business.socialSecurity.mapper.BizSocialSecurityConfirmDetailEmployeeMapper;
+import cn.ezhizao.project.business.socialSecurity.mapper.BizSocialSecurityConfirmDetailMapper;
 import cn.ezhizao.project.business.socialSecurity.mapper.BizSocialSecurityConfirmMapper;
 import cn.ezhizao.project.business.socialSecurity.service.IBizSocialSecurityConfirmService;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
+import java.math.BigDecimal;
 import java.util.List;
 import java.util.Map;
 
@@ -20,6 +30,12 @@ public class BizSocialSecurityConfirmServiceImpl extends ServiceImpl<BizSocialSe
     @Resource
     BizSocialSecurityConfirmMapper financialSocialSecurityConfirmDao;
 
+    @Resource
+    BizSocialSecurityConfirmDetailMapper bizSocialSecurityConfirmDetailMapper;
+
+    @Resource
+    BizSocialSecurityConfirmDetailEmployeeMapper bizSocialSecurityConfirmDetailEmployeeMapper;
+
     @Override
     public List<BizSocialSecurityConfirm> getList(Map<String,Object> conditions) {
         return financialSocialSecurityConfirmDao.getList(conditions);
@@ -34,4 +50,65 @@ public class BizSocialSecurityConfirmServiceImpl extends ServiceImpl<BizSocialSe
     public int getTotal(Map<String,Object> conditions) {
         return financialSocialSecurityConfirmDao.getTotal(conditions);
     }
+
+    @Override
+    public String importSalary(List<BizSocialSecurityConfirmDetailEmployee> detailList, String year, String month, Long tenantId) {
+        if (StringUtils.isNull(detailList) || detailList.size() == 0) {
+            throw new ServiceException("导入数据不能为空!");
+        }
+        int successNum = 0;
+        int failureNum = 0;
+        StringBuilder successMsg = new StringBuilder();
+        StringBuilder failureMsg = new StringBuilder();
+        //获取工资信息
+        for(BizSocialSecurityConfirmDetailEmployee l : detailList){
+            BizSocialSecurityConfirm securityConfirm=new BizSocialSecurityConfirm();
+            securityConfirm.setCompanyName(l.getCompanyName());
+            securityConfirm.setTenantId(tenantId);
+            List <BizSocialSecurityConfirm> list= getListByBean(securityConfirm);
+            //是否存在该客户
+            if(list.size() == 0){
+                failureNum++;
+                failureMsg.append("<br/>").append(failureNum).append("、客户 ").append(l.getCompanyName()).append(" 不存在");
+                continue;
+            }
+            if(list.size() > 1){
+                failureNum++;
+                failureMsg.append("<br/>").append(failureNum).append("、客户 ").append(l.getCompanyName()).append("请输入详细客户名称");
+                continue;
+            }
+            securityConfirm=list.get(0);
+            //获取工资明细
+            BizSocialSecurityConfirmDetail detail=new BizSocialSecurityConfirmDetail();
+            detail.setSocialSecurityConfirmId(securityConfirm.getId());
+            detail.setMonth(month);
+            detail.setYear(year);
+            List<BizSocialSecurityConfirmDetail> salaryDetailList=bizSocialSecurityConfirmDetailMapper.getList(detail);
+            if(salaryDetailList.size()>0){
+                failureNum++;
+                failureMsg.append("<br/>").append(failureNum).append("、客户 ").append(l.getCompanyName()).append(year+"年"+month+"月").append("社保已有数据");
+                continue;
+            }
+
+            //设置状态为待确认
+            detail.setStatus(1);
+            detail.setCompanyId(securityConfirm.getCompanyId());
+            //新增工资明细
+            bizSocialSecurityConfirmDetailMapper.insert(detail);
+            //设置外键
+            l.setSocialSecurityConfirmDetailId(detail.getId());
+            l.setSocialSecurityConfirmId(securityConfirm.getId());
+            //新增人员明细
+            bizSocialSecurityConfirmDetailEmployeeMapper.insert(l);
+            successNum++;
+            successMsg.append("<br/>").append(successNum).append("、社保 ").append(l.getCompanyName()).append(" 导入成功");
+        }
+        if (failureNum > 0) {
+            failureMsg.insert(0, "很抱歉,导入失败!共 " + failureNum + " 条数据格式不正确,错误如下:");
+            throw new ServiceException(failureMsg.toString());
+        } else {
+            successMsg.insert(0, "恭喜您,数据已全部导入成功!共 " + successNum + " 条,数据如下:");
+        }
+        return successMsg.toString();
+    }
 }

+ 48 - 0
src/main/java/cn/ezhizao/project/business/workOrder/controller/OnceWorkOrderProductionController.java

@@ -1,9 +1,13 @@
 package cn.ezhizao.project.business.workOrder.controller;
 
 import cn.ezhizao.common.utils.SecurityUtils;
+import cn.ezhizao.common.utils.poi.ExcelUtil;
+import cn.ezhizao.framework.aspectj.lang.annotation.Log;
+import cn.ezhizao.framework.aspectj.lang.enums.BusinessType;
 import cn.ezhizao.framework.web.controller.BaseController;
 import cn.ezhizao.framework.web.domain.AjaxResult;
 import cn.ezhizao.framework.web.page.TableDataInfo;
+import cn.ezhizao.project.business.deduction.domain.BizDeduction;
 import cn.ezhizao.project.business.keepAccounts.domain.BizFinancialKeepAccountDetail;
 import cn.ezhizao.project.business.reportTaxIsZero.domain.BizFinancialReportTaxDetail;
 import cn.ezhizao.project.business.urgent.domain.BizFinancialUrgent;
@@ -12,12 +16,15 @@ import cn.ezhizao.project.business.workOrder.domain.BizWorkOrderRecord;
 import cn.ezhizao.project.business.workOrder.service.IBizWorkOrderDetailService;
 import cn.ezhizao.project.business.workOrder.service.IBizWorkOrderRecordService;
 import cn.ezhizao.project.business.workOrder.service.IBizWorkOrderService;
+import cn.ezhizao.project.system.domain.SysUser;
+import cn.ezhizao.project.system.mapper.SysUserMapper;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.web.bind.annotation.*;
 
 import javax.annotation.Resource;
+import javax.servlet.http.HttpServletResponse;
 import java.math.BigDecimal;
 import java.util.List;
 
@@ -32,6 +39,8 @@ public class OnceWorkOrderProductionController extends BaseController {
     IBizWorkOrderService workOrderService;
     @Resource
     IBizWorkOrderRecordService workOrderRecordService;
+    @Resource
+    private SysUserMapper sysUserMapper;
 
 
     @ApiOperation(value = "带条件List 分页查询",notes= "带条件List 分页查询")
@@ -47,6 +56,45 @@ public class OnceWorkOrderProductionController extends BaseController {
         return getDataTable(list);
     }
 
+    /**
+     * 导出划款列表
+     */
+    @PreAuthorize("@ss.hasPermi('business:deduction:export')")
+    @Log(title = "单次任务", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, BizWorkOrder conditions) throws NoSuchFieldException, IllegalAccessException
+    {
+        setTenantId(conditions);
+        startOrderBy();
+        List<BizWorkOrder> list = workOrderService.getList(conditions);
+        for(BizWorkOrder l : list){
+            l.setProjectType((l.getNoContract()==1?l.getRemark():"")+l.getTaskTypeName()+(l.getTaskTypeDetailName()!=null?"-"+l.getTaskTypeDetailName():""));
+            l.setOrderType(l.getType() ==1? "循环工单":"代办工单");
+            List<BizWorkOrderRecord> records = workOrderRecordService.query().eq("work_order_id", l.getId()).eq("from_id", 0).list();
+            if(records.size()>0){
+                SysUser sysUser = sysUserMapper.selectUserById(records.get(0).getRecorderId());
+                l.setServiceName(sysUser==null?"":sysUser.getNickName());
+            }else{
+                l.setServiceName("");
+            }
+            //设置状态
+            switch (l.getRecord()==null?0:l.getRecord().getStatus()) {
+                case 0:
+                    l.setStatusType("未开始");
+                    break;
+
+                case 3:
+                    l.setStatusType("已完成");
+                    break;
+                default:
+                    break;
+            }
+
+        }
+        ExcelUtil<BizWorkOrder> util = new ExcelUtil<BizWorkOrder>(BizWorkOrder.class);
+        util.exportExcel(response, list, "单次任务数据");
+    }
+
     @PreAuthorize("@ss.hasPermi('business:production:onceWork:query')")
     @PostMapping("/getDetail")
     public AjaxResult getDetail(@RequestBody BizWorkOrderRecord detail) {

+ 28 - 13
src/main/java/cn/ezhizao/project/business/workOrder/domain/BizWorkOrder.java

@@ -33,9 +33,11 @@ public class BizWorkOrder extends BaseEntity
     private Long companyId;
 
     @ApiModelProperty("客户名称")
+    @Excel(name = "客户名称",sort = 1)
     @TableField(exist = false)
     private String companyName;
 
+    @Excel(name = "税号",width = 30 ,sort = 2)
     @ApiModelProperty("税号")
     @TableField(exist = false)
     private String socialCreditCode;
@@ -47,17 +49,20 @@ public class BizWorkOrder extends BaseEntity
     private Long contractDetailProcessId;
 
     /** 工单类型 1循环 2代办 */
-    @Excel(name = "工单类型 1循环 2代办")
+//    @Excel(name = "工单类型 1循环 2代办")
     @ApiModelProperty(value = "工单类型 1循环 2代办")
     private Integer type;
 
+    /** 工单类型 1循环 2代办 */
+    @Excel(name = "工单类型",sort = 3)
+    @ApiModelProperty(value = "工单类型 1循环 2代办")
+    private String orderType;
+
     /** 无合同 */
-    @Excel(name = "无合同")
     @ApiModelProperty(value = "无合同")
     private Integer noContract;
 
     /** 编号 */
-    @Excel(name = "编号")
     @ApiModelProperty(value = "编号")
     private String workOrderNo;
 
@@ -68,6 +73,10 @@ public class BizWorkOrder extends BaseEntity
     @TableField(exist = false)
     private String taskTypeName;
 
+    @Excel(name = "项目",sort = 4)
+    @TableField(exist = false)
+    private String projectType;
+
     /** 任务类型 任务表外键 任务明细表 */
     @ApiModelProperty(value = "任务明细外键")
     private Long taskTypeDetailId;
@@ -77,18 +86,18 @@ public class BizWorkOrder extends BaseEntity
 
     /** 开始月 */
     @JsonFormat(pattern = "yyyy-MM-dd")
-    @Excel(name = "开始月", width = 30, dateFormat = "yyyy-MM-dd")
+//    @Excel(name = "开始月", width = 30, dateFormat = "yyyy-MM-dd")
     @ApiModelProperty(value = "开始月")
     private Date startMonth;
 
     /** 结束月 */
     @JsonFormat(pattern = "yyyy-MM-dd")
-    @Excel(name = "结束月", width = 30, dateFormat = "yyyy-MM-dd")
+//    @Excel(name = "结束月", width = 30, dateFormat = "yyyy-MM-dd")
     @ApiModelProperty(value = "结束月")
     private Date endMonth;
 
     /** 月数 */
-    @Excel(name = "月数")
+//    @Excel(name = "月数")
     @ApiModelProperty(value = "月数")
     private Integer monthNum;
 
@@ -101,37 +110,37 @@ public class BizWorkOrder extends BaseEntity
     private Long tenantId;
 
     /** 停止任务 */
-    @Excel(name = "停止任务")
+//    @Excel(name = "停止任务")
     @ApiModelProperty(value = "停止任务")
     private Integer isStop;
 
 
-    @Excel(name = "注册省份编码")
+//    @Excel(name = "注册省份编码")
     @ApiModelProperty(value = "注册省份编码")
     private String provinceCode;
 
     /** 省 */
-    @Excel(name = "省")
+//    @Excel(name = "省")
     @ApiModelProperty(value = "省")
     private String province;
 
     /** 注册城市编码 */
-    @Excel(name = "注册城市编码")
+//    @Excel(name = "注册城市编码")
     @ApiModelProperty(value = "注册城市编码")
     private String cityCode;
 
     /** 市 */
-    @Excel(name = "市")
+//    @Excel(name = "市")
     @ApiModelProperty(value = "市")
     private String city;
 
     /** 注册行政区编码 */
-    @Excel(name = "注册行政区编码")
+//    @Excel(name = "注册行政区编码")
     @ApiModelProperty(value = "注册行政区编码")
     private String districtCode;
 
     /** 区 */
-    @Excel(name = "区")
+//    @Excel(name = "区")
     @ApiModelProperty(value = "区")
     private String district;
 
@@ -143,6 +152,11 @@ public class BizWorkOrder extends BaseEntity
     /** 服务管理查询条件 */
     @TableField(exist = false)
     private Integer status;
+
+    @Excel(name = "状态",sort = 6)
+    @TableField(exist = false)
+    private String statusType;
+
     @TableField(exist = false)
     private String year;
     @TableField(exist = false)
@@ -151,6 +165,7 @@ public class BizWorkOrder extends BaseEntity
     @ApiModelProperty("服务人员")
     private Long serviceId;
 
+    @Excel(name = "执行人",sort = 5)
     @TableField(exist = false)
     private String serviceName;
 

+ 3 - 0
src/main/java/cn/ezhizao/project/system/domain/SysFileStorage.java

@@ -42,4 +42,7 @@ public class SysFileStorage extends BaseEntity
     @ApiModelProperty(value = "${comment}")
     private String originalFileName;
 
+    @ApiModelProperty(value = "类型")
+    private String type;
+
 }

+ 0 - 1
src/main/resources/application-dev.yml

@@ -82,7 +82,6 @@ spring:
                 wall:
                     config:
                         multi-statement-allow: true
-
 # 文件上传
 ruoyi:
     profile: D:/Ezhizao/yzbh/

+ 3 - 0
src/main/resources/mybatis/business/BizFinancialIndividualIncomeTaxMapper.xml

@@ -47,6 +47,7 @@
 
     </resultMap>
 
+
     <resultMap type="cn.ezhizao.project.system.domain.SysFileStorage" id="FileStorageResult">
         <id column="id" property="id"/>
     </resultMap>
@@ -113,6 +114,8 @@
           and master_id = #{id}
     </select>
 
+
+
     <select id="getTaxDetail" parameterType="BizFinancialIndividualIncomeTaxDetail"
             resultMap="BizFinancialIndividualIncomeTaxDetailResult">
         SELECT *

+ 6 - 0
src/main/resources/mybatis/business/BizFinancialKeepAccountMapper.xml

@@ -6,6 +6,7 @@
         <result column="company_id" jdbcType="BIGINT" property="companyId"/>
         <result column="create_time"  property="createTime"/>
         <association property="serviceName" select="getServiceName" column="company_id"></association>
+        <association property="socialCreditCode" select="getSocialCreditCode" column="company_id"></association>
     </resultMap>
 
     <!--带条件的List查询-->
@@ -76,4 +77,9 @@
             </if>
         </if>
     </sql>
+
+    <select id="getSocialCreditCode" resultType="String">
+        SELECT c.social_credit_code FROM biz_company c
+        WHERE c.id =#{company_id}
+    </select>
 </mapper>

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

@@ -8,6 +8,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <id column="id" property="id"/>
         <result column="company_id" jdbcType="BIGINT" property="companyId" />
         <association property="serviceName" select="getServiceName" column="company_id" />
+        <association property="socialCreditCode" select="getSocialCreditCode" column="company_id"/>
     </resultMap>
 
     <select id="getList" parameterType="BizFinancialReceiveTicket" resultMap="BizFinancialReceiveTicketResult">
@@ -67,6 +68,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         WHERE s.user_id =(SELECT leader_id  FROM biz_company WHERE id=#{company_id})
     </select>
 
+    <select id="getSocialCreditCode" resultType="String">
+        SELECT c.social_credit_code FROM biz_company c
+        WHERE c.id =#{company_id}
+    </select>
+
     <delete id="physicalDelete">
         DELETE FROM biz_financial_receive_ticket
         <trim prefix=" WHERE" suffix="" suffixOverrides="AND">

+ 3 - 0
src/main/resources/mybatis/business/BizFinancialReportTaxDetailMapper.xml

@@ -44,6 +44,9 @@
         left join biz_company t2 on t2.id = t1.company_id
         WHERE
         t1.deleted = 0
+        <if test="financialReportTaxId != null">
+            AND t1.financial_report_tax_id = #{financialReportTaxId}
+        </if>
         <if test="id != null">
             AND t1.id = #{id}
         </if>

+ 3 - 0
src/main/resources/mybatis/business/BizFinancialReportTaxDetailNonZeroMapper.xml

@@ -44,6 +44,9 @@
         <if test="id != null">
             AND t1.id = #{id}
         </if>
+        <if test="financialReportTaxId != null">
+            AND t1.financial_report_tax_id = #{financialReportTaxId}
+        </if>
         <if test="year != null and year != ''">
             AND t1.year = #{year}
         </if>

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

@@ -8,6 +8,7 @@
         <id column="id" property="id"/>
         <result column="company_id" jdbcType="BIGINT" property="companyId"/>
         <association property="serviceName" select="getServiceName" column="company_id"></association>
+        <association property="socialCreditCode" select="getSocialCreditCode" column="company_id"></association>
     </resultMap>
 
 
@@ -63,6 +64,11 @@
         WHERE s.user_id =(SELECT leader_id  FROM biz_company WHERE id=#{company_id})
     </select>
 
+    <select id="getSocialCreditCode" resultType="String">
+        SELECT c.social_credit_code FROM biz_company c
+        WHERE c.id =#{company_id}
+    </select>
+
     <delete id="physicalDelete">
         DELETE FROM biz_financial_salary
         <trim prefix=" WHERE" suffix="" suffixOverrides="AND">

+ 13 - 0
src/main/resources/mybatis/business/BizHousingFundConfirmMapper.xml

@@ -6,6 +6,8 @@
         <id column="id" jdbcType="BIGINT" property="id"/>
         <result column="id" jdbcType="BIGINT" property="id"/>
         <result column="company_id" jdbcType="BIGINT" property="companyId"/>
+        <association property="serviceName" select="getServiceName" column="company_id"></association>
+        <association property="socialCreditCode"  select="getSocialCreditCode" column="company_id"/>
     </resultMap>
 
     <!--带条件的List查询-->
@@ -98,4 +100,15 @@
             </if>
         </trim>
     </sql>
+
+    <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>
+
+    <select id="getSocialCreditCode" resultType="String">
+        SELECT social_credit_code
+        FROM biz_company
+        WHERE id = #{company_id};
+    </select>
 </mapper>

+ 9 - 4
src/main/resources/mybatis/business/BizHousingFundDeclareDetailMapper.xml

@@ -7,6 +7,7 @@
         <result column="id" jdbcType="BIGINT" property="id"/>
         <collection property="evidenceFiles" ofType="cn.ezhizao.project.system.domain.SysFileStorage" select="getFiles"
                     column="id"/>
+
     </resultMap>
 
     <resultMap type="cn.ezhizao.project.system.domain.SysFileStorage" id="FileStorageResult">
@@ -14,11 +15,15 @@
     </resultMap>
 
     <select id="getFiles" resultMap="FileStorageResult">
-        select * from sys_file_storage
-        where deleted = 0
-        and master_table_name = 'biz_housing_fund_declare_detail'
-        and master_id = #{id}
+        select s.*
+        from sys_file_storage s
+        where s.deleted = 1
+          and s.master_table_name = 'biz_housing_fund_declare_detail'
+          and s.master_id = #{id}
+
     </select>
+
+
     <!--带条件的List查询-->
     <select id="getList" resultMap="BaseResultMap">
         <include refid="getListSql"/>

+ 8 - 0
src/main/resources/mybatis/business/BizHousingFundDeclareMapper.xml

@@ -6,6 +6,7 @@
         <id column="id" jdbcType="BIGINT" property="id"/>
         <result column="id" jdbcType="BIGINT" property="id"/>
         <result column="company_id" jdbcType="BIGINT" property="companyId"/>
+        <association property="serviceName" select="getServiceName" column="company_id"></association>
     </resultMap>
 
     <!--带条件的List查询-->
@@ -34,6 +35,9 @@
             <if test="companyId != null  ">
                 t1.company_id = #{companyId} AND
             </if>
+            <if test="companyName != null and companyName != ''">
+                (t2.name like concat('%', #{companyName}, '%')) AND
+            </if>
             <if test="principal != null and principal != ''">
                 (t2.leader_id=#{principal} OR t2.adviser_id=#{principal}) AND
             </if>
@@ -95,4 +99,8 @@
         </trim>
     </sql>
 
+    <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>
 </mapper>

+ 7 - 0
src/main/resources/mybatis/business/BizSocialSecurityConfirmMapper.xml

@@ -7,6 +7,7 @@
         <result column="id" jdbcType="BIGINT" property="id"/>
         <result column="company_id" jdbcType="BIGINT" property="companyId"/>
         <association property="serviceName" select="getServiceName" column="company_id"></association>
+        <association property="socialCreditCode"  select="getSocialCreditCode" column="company_id"/>
     </resultMap>
 
     <!--带条件的List查询-->
@@ -98,6 +99,12 @@
         </trim>
     </sql>
 
+    <select id="getSocialCreditCode" resultType="String">
+        SELECT social_credit_code
+        FROM biz_company
+        WHERE id = #{company_id};
+    </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})

+ 20 - 5
src/main/resources/mybatis/business/BizSocialSecurityDeclareDetailMapper.xml

@@ -6,7 +6,11 @@
                type="cn.ezhizao.project.business.socialSecurity.domain.BizSocialSecurityDeclareDetail">
         <id column="id" jdbcType="BIGINT" property="id"/>
         <result column="id" jdbcType="BIGINT" property="id"/>
-        <collection property="evidenceFiles" ofType="cn.ezhizao.project.system.domain.SysFileStorage" select="getFiles" column="id" />
+        <collection property="evidenceFiles" ofType="cn.ezhizao.project.system.domain.SysFileStorage" select="getFiles"
+                    column="id"/>
+        <collection property="reportFiles"
+                    ofType="cn.ezhizao.project.system.domain.SysFileStorage"
+                    select="getReportFiles" column="id"/>
     </resultMap>
 
     <resultMap type="cn.ezhizao.project.system.domain.SysFileStorage" id="FileStorageResult">
@@ -14,10 +18,21 @@
     </resultMap>
 
     <select id="getFiles" resultMap="FileStorageResult">
-        select * from sys_file_storage
-        where deleted = 0
-        and master_table_name = 'biz_social_security_declare_detail'
-        and master_id = #{id}
+        select s.*
+        from sys_file_storage s
+        where s.deleted = 0
+          and s.master_table_name = 'biz_social_security_declare_detail'
+          and s.master_id = #{id}
+          and s.type = 'evidenceFile'
+    </select>
+
+    <select id="getReportFiles" resultMap="FileStorageResult">
+        select s.*
+        from sys_file_storage s
+        where s.deleted = 0
+          and s.master_table_name = 'biz_social_security_declare_detail'
+          and s.master_id = #{id}
+          and s.type = 'reportFile'
     </select>
     <!--带条件的List查询-->
     <select id="getList" resultMap="BaseResultMap">

+ 6 - 4
src/main/resources/templates/socialSecurityTemplate.html

@@ -29,20 +29,20 @@
         /*font-weight: bold;*/
     }
 
-    /* 用于模拟5列布局 */
-    .col-1 { width: calc(100% / 5); }
+    /* 用于模拟6列布局 */
+    .col-1 { width: calc(100% / 6); }
     </style>
 </head>
 <body>
 <table>
     <!-- 第一行 -->
     <tr class="header border col-12" >
-        <td align="center"  style="font-weight: bold;font-size: 12px;" valign="middle"bgcolor="#c0c0c0" colspan="5">社保人员信息</td>
+        <td align="center"  style="font-weight: bold;font-size: 12px;" valign="middle"bgcolor="#c0c0c0" colspan="6">社保人员信息</td>
     </tr>
 
     <!-- 第二行 -->
     <tr class="header border">
-        <td class="col-4" colspan="3" align="left" valign="middle"> ${socialSecurityConfirm.companyName}</td>
+        <td class="col-4" colspan="4" align="left" valign="middle"> ${socialSecurityConfirm.companyName}</td>
         <td class="col-4" colspan="2" align="center" valign="middle">${ socialSecurityConfirm.year + "年 第" + socialSecurityConfirm.month + "期" }</td>
     </tr>
 
@@ -52,6 +52,7 @@
         <td class="col-1" align="center" valign="middle">电话号码</td>
         <td class="col-1" align="center" valign="middle">基数</td>
         <td class="col-1" align="center" valign="middle">医疗基数</td>
+        <td class="col-1" align="center" valign="middle">采暖费</td>
         <td class="col-1" align="center" valign="middle">备注</td>
     </tr>
 
@@ -62,6 +63,7 @@
         <td class="col-1" align="center">${ item.phone }</td>
         <td class="col-1" align="center">${ item.cardinalNumber }</td>
         <td class="col-1" align="center">${ item.medicalCardinalNumber }</td>
+        <td class="col-1" align="center">${ item.heatingFee }</td>
         <td class="col-1" align="center">${ item.remark }</td>
     </tr>
     </#list>