Commit ab54def0 authored by hongguangwu's avatar hongguangwu

MVP1.4-salary代发户首次上传代码

parent 03542cf5
...@@ -5,7 +5,6 @@ import com.yifu.cloud.plus.v1.yifu.ekp.config.EkpSalaryProperties; ...@@ -5,7 +5,6 @@ import com.yifu.cloud.plus.v1.yifu.ekp.config.EkpSalaryProperties;
import com.yifu.cloud.plus.v1.yifu.ekp.constant.EkpConstants; import com.yifu.cloud.plus.v1.yifu.ekp.constant.EkpConstants;
import com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpSalaryBackParam; import com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpSalaryBackParam;
import com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpSalaryParam; import com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpSalaryParam;
import com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpSalaryStandardParam;
import io.micrometer.core.instrument.util.StringUtils; import io.micrometer.core.instrument.util.StringUtils;
import lombok.extern.log4j.Log4j2; import lombok.extern.log4j.Log4j2;
import org.codehaus.jackson.map.ObjectMapper; import org.codehaus.jackson.map.ObjectMapper;
...@@ -67,18 +66,18 @@ public class EkpSalaryUtil { ...@@ -67,18 +66,18 @@ public class EkpSalaryUtil {
} }
// 推送主表到ekp // 推送主表到ekp
public String sendStandardToEKP(String loginName, EkpSalaryStandardParam param){ public String sendStandardToEKP(String loginName, String param){
log.info("推送EKP开始--薪资主表数据"); log.info("推送EKP开始--薪资主表数据");
RestTemplate yourRestTemplate = new RestTemplate(); RestTemplate yourRestTemplate = new RestTemplate();
try{ try{
//指向EKP的接口url //指向EKP的接口url
//把ModelingAppModelParameterAddForm转换成MultiValueMap //把ModelingAppModelParameterAddForm转换成MultiValueMap
String formValues = new ObjectMapper().writeValueAsString(param); //String formValues = new ObjectMapper().writeValueAsString(param)
MultiValueMap<String,Object> wholeForm = new LinkedMultiValueMap<>(); MultiValueMap<String,Object> wholeForm = new LinkedMultiValueMap<>();
wholeForm.add("docSubject",ekpProperties.getDocSubject()); wholeForm.add("docSubject",ekpProperties.getDocSubject());
wholeForm.add("docCreator", "{\"LoginName\":\"" + loginName+ "\"}"); wholeForm.add("docCreator", "{\"LoginName\":\"" + loginName+ "\"}");
wholeForm.add("docStatus", ekpProperties.getDocStatus()); wholeForm.add("docStatus", ekpProperties.getDocStatus());
wholeForm.add("formValues", formValues); wholeForm.add("formValues", param);
wholeForm.add("fdModelId", ekpProperties.getStandardFdModelId()); wholeForm.add("fdModelId", ekpProperties.getStandardFdModelId());
wholeForm.add("fdFlowId", ekpProperties.getStandardFdFlowId()); wholeForm.add("fdFlowId", ekpProperties.getStandardFdFlowId());
HttpHeaders headers = new HttpHeaders(); HttpHeaders headers = new HttpHeaders();
......
...@@ -57,6 +57,11 @@ public class EkpSalaryParam implements Serializable { ...@@ -57,6 +57,11 @@ public class EkpSalaryParam implements Serializable {
* 开户行 * 开户行
**/ **/
private String fd_3adfedfc453cc4; private String fd_3adfedfc453cc4;
/**
* 开户行支行
* 2023-1-12 11:40:13 hgw
**/
private String fd_3b73de2809465a;
/** /**
* 工资月份 * 工资月份
**/ **/
......
package com.yifu.cloud.plus.v1.yifu.ekp.vo;
import lombok.Data;
import java.io.Serializable;
/**
* @Author hgw
* @Date 2022-11-3 15:20:35
* @Description 薪资主表对应参数
* @Version 1.0
*/
@Data
public class EkpSalaryStandardParam implements Serializable {
/**
* 项目名称
**/
private String fd_3b3bf2c3b1a6cc;
/**
* 项目编码
**/
private String fd_3b3bf2c426cfc8;
/**
* 薪酬申请编号
**/
private String fd_3b3bf2c4975776;
/**
* 工资薪酬申请id
**/
private String fd_3b3bf2c58d2b46;
/**
* 薪酬原表下载地址
**/
private String fd_3b3cbe1d05f0d6;
/**
* 项目金额
**/
private String fd_3b3d3ec95b68fc;
/**
* 薪酬月份
**/
private String fd_3b3d3ec85bfeb0;
}
...@@ -191,4 +191,13 @@ public class TSalaryEmployee extends BaseEntity { ...@@ -191,4 +191,13 @@ public class TSalaryEmployee extends BaseEntity {
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("在职状态") @ExcelProperty("在职状态")
private String fileStatus; private String fileStatus;
/**
* 代发户状态(0正常;1代发户进的数据,下次要验证银行卡)
*/
@ExcelAttribute(name = "代发户状态(0正常;1代发户进的数据,下次要验证银行卡)" )
@ExcelProperty("代发户状态(0正常;1代发户进的数据,下次要验证银行卡)")
@Schema(description ="代发户状态(0正常;1代发户进的数据,下次要验证银行卡)")
private Integer issueStatus;
} }
...@@ -431,6 +431,14 @@ public class TSalaryStandard extends BaseEntity { ...@@ -431,6 +431,14 @@ public class TSalaryStandard extends BaseEntity {
@ExcelProperty("生成、推送收入的完成时间") @ExcelProperty("生成、推送收入的完成时间")
private Date incomeEndTime; private Date incomeEndTime;
/**
* 代发户状态(0正常;1代发户)
*/
@ExcelAttribute(name = "代发户状态(0正常;1代发户)" )
@ExcelProperty("代发户状态(0正常;1代发户)")
@Schema(description ="代发户状态(0正常;1代发户)")
private Integer issueStatus;
/** /**
* 工资月份-起 * 工资月份-起
*/ */
......
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.salary.entity;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank;
/**
* 薪资代发户配置
*
* @author hgw
* @date 2023-01-10 11:34:27
*/
@Data
@TableName("t_salary_standard_issue")
@EqualsAndHashCode(callSuper = true)
@Schema(description = "薪资代发户配置")
public class TSalaryStandardIssue extends BaseEntity {
/**
* id
*/
@TableId(type = IdType.ASSIGN_ID)
@ExcelProperty("id")
@Schema(description = "id")
private String id;
/**
* 部门ID
*/
@ExcelAttribute(name = "部门ID", isNotEmpty = true, errorInfo = "部门ID不能为空", maxLength = 32)
@NotBlank(message = "部门ID不能为空")
@Length(max = 32, message = "部门ID不能超过32个字符")
@ExcelProperty("部门ID")
@Schema(description = "部门ID")
private String deptId;
/**
* 部门名称
*/
@ExcelAttribute(name = "部门名称", isNotEmpty = true, errorInfo = "部门名称不能为空", maxLength = 50)
@NotBlank(message = "部门名称不能为空")
@Length(max = 50, message = "部门名称不能超过50个字符")
@ExcelProperty("部门名称")
@Schema(description = "部门名称")
private String deptName;
/**
* 部门编码
*/
@ExcelAttribute(name = "部门编码", maxLength = 32)
@Length(max = 32, message = "部门编码不能超过32个字符")
@ExcelProperty("部门编码")
@Schema(description = "部门编码")
private String deptNo;
/**
* 户名
*/
@ExcelAttribute(name = "户名", maxLength = 50)
@Length(max = 50, message = "户名不能超过50个字符")
@ExcelProperty("户名")
@Schema(description = "户名")
private String orgName;
/**
* 开户行总行
*/
@ExcelAttribute(name = "开户行总行", maxLength = 50)
@Length(max = 50, message = "开户行总行不能超过50个字符")
@ExcelProperty("开户行总行")
@Schema(description = "开户行总行")
private String bankName;
/**
* 开户行支行
*/
@ExcelAttribute(name = "开户行支行", maxLength = 50)
@Length(max = 50, message = "开户行支行不能超过50个字符")
@ExcelProperty("开户行支行")
@Schema(description = "开户行支行")
private String bankSubName;
/**
* 银行卡号
*/
@ExcelAttribute(name = "银行卡号", maxLength = 50)
@Length(max = 50, message = "银行卡号不能超过50个字符")
@ExcelProperty("银行卡号")
@Schema(description = "银行卡号")
private String bankNo;
/**
* 开户行省
*/
@ExcelAttribute(name = "开户行省")
@ExcelProperty("开户行省")
@Schema(description = "开户行省")
private Integer bankProvince;
/**
* 开户行市
*/
@ExcelAttribute(name = "开户行市")
@ExcelProperty("开户行市")
@Schema(description = "开户行市")
private Integer bankCity;
/**
* 开户行省名称
*/
@ExcelAttribute(name = "开户行省名称")
@ExcelProperty("开户行省名称")
@Schema(description = "开户行省名称")
private String bankProvinceName;
/**
* 开户行市
*/
@ExcelAttribute(name = "开户行市名称")
@ExcelProperty("开户行市名称")
@Schema(description = "开户行市名称")
private String bankCityName;
}
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.salary.entity;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank;
import java.math.BigDecimal;
/**
* 薪资表与代发户表关联表
*
* @author hgw
* @date 2023-01-10 11:34:27
*/
@Data
@TableName("t_salary_standard_issue_res")
@Schema(description = "薪资表与代发户表关联表")
public class TSalaryStandardIssueRes {
/**
* id
*/
@TableId(type = IdType.ASSIGN_ID)
@ExcelProperty("id")
@Schema(description = "id")
private String id;
/**
* 代发户配置id
*/
@ExcelAttribute(name = "代发户配置id", isNotEmpty = true, errorInfo = "代发户配置id不能为空", maxLength = 32)
@NotBlank(message = "代发户配置id不能为空")
@Length(max = 32, message = "代发户配置id不能超过32个字符")
@ExcelProperty("代发户配置id")
@Schema(description = "代发户配置id")
private String issueId;
/**
* 薪资主表id
*/
@ExcelAttribute(name = "薪资主表id", isNotEmpty = true, errorInfo = "薪资主表id不能为空", maxLength = 32)
@NotBlank(message = "薪资主表id不能为空")
@Length(max = 32, message = "薪资主表id不能超过32个字符")
@ExcelProperty("薪资主表id")
@Schema(description = "薪资主表id")
private String salaryId;
/**
* money
*/
@ExcelAttribute(name = "money", isNotEmpty = true, errorInfo = "money不能为空")
@NotBlank(message = "money不能为空")
@ExcelProperty("money")
@Schema(description = "money")
private BigDecimal money;
/**
* 户名
*/
@ExcelAttribute(name = "户名", maxLength = 50)
@Length(max = 50, message = "户名不能超过50个字符")
@ExcelProperty("户名")
@Schema(description = "户名")
private String orgName;
/**
* 开户行总行
*/
@ExcelAttribute(name = "开户行总行", maxLength = 50)
@Length(max = 50, message = "开户行总行不能超过50个字符")
@ExcelProperty("开户行总行")
@Schema(description = "开户行总行")
private String bankName;
/**
* 开户行支行
*/
@ExcelAttribute(name = "开户行支行", maxLength = 50)
@Length(max = 50, message = "开户行支行不能超过50个字符")
@ExcelProperty("开户行支行")
@Schema(description = "开户行支行")
private String bankSubName;
/**
* 银行卡号
*/
@ExcelAttribute(name = "银行卡号", maxLength = 50)
@Length(max = 50, message = "银行卡号不能超过50个字符")
@ExcelProperty("银行卡号")
@Schema(description = "银行卡号")
private String bankNo;
/**
* 开户行省
*/
@ExcelAttribute(name = "开户行省")
@ExcelProperty("开户行省")
@Schema(description = "开户行省")
private Integer bankProvince;
/**
* 开户行市
*/
@ExcelAttribute(name = "开户行市")
@ExcelProperty("开户行市")
@Schema(description = "开户行市")
private Integer bankCity;
/**
* 开户行省名称
*/
@ExcelAttribute(name = "开户行省名称")
@ExcelProperty("开户行省名称")
@Schema(description = "开户行省名称")
private String bankProvinceName;
/**
* 开户行市
*/
@ExcelAttribute(name = "开户行市名称")
@ExcelProperty("开户行市名称")
@Schema(description = "开户行市名称")
private String bankCityName;
}
package com.yifu.cloud.plus.v1.yifu.salary.vo;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryStandardIssueRes;
import lombok.Getter;
import lombok.Setter;
import java.util.List;
/**
* @author hgw2
* @description 薪资上传vo
* @date 2023/1/10
*/
@Getter
@Setter
public class SalaryUploadParamVo {
// 表格json
String jsonString;
// 结算主体id;必填
String settleDepart;
// 工资配置结算月等信息的id
String configId;
// 工资类型。必填
String salaryType;
// 订单id
String orderId;
// 是否代发户,默认为空或0:非代发户,1是代发户
Integer isIssue;
// 代发户的配置list
List<TSalaryStandardIssueRes> resList;
}
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.salary.vo;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryStandardIssueRes;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
/**
* 薪资表与代发户表关联表
*
* @author hgw
* @date 2023-01-10 11:34:27
*/
@Data
public class TSalaryStandardIssueResSearchVo extends TSalaryStandardIssueRes {
/**
* 多选导出或删除等操作
*/
@Schema(description = "选中ID,多个逗号分割")
private String ids;
/**
* @Author fxj
* 查询数据起
**/
@Schema(description = "查询limit 开始")
private int limitStart;
/**
* @Author fxj
* 查询数据止
**/
@Schema(description = "查询limit 数据条数")
private int limitEnd;
}
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.salary.vo;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryStandardIssue;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.time.LocalDateTime;
/**
* 薪资代发户配置
*
* @author hgw
* @date 2023-01-10 11:34:27
*/
@Data
public class TSalaryStandardIssueSearchVo extends TSalaryStandardIssue {
/**
* 多选导出或删除等操作
*/
@Schema(description = "选中ID,多个逗号分割")
private String ids;
/**
* 创建时间区间 [开始时间,结束时间]
*/
@Schema(description = "创建时间区间")
private LocalDateTime[] createTimes;
/**
* @Author fxj
* 查询数据起
**/
@Schema(description = "查询limit 开始")
private int limitStart;
/**
* @Author fxj
* 查询数据止
**/
@Schema(description = "查询limit 数据条数")
private int limitEnd;
}
...@@ -4,6 +4,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage; ...@@ -4,6 +4,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R; import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog; import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog;
import com.yifu.cloud.plus.v1.yifu.salary.service.SalaryUploadService; import com.yifu.cloud.plus.v1.yifu.salary.service.SalaryUploadService;
import com.yifu.cloud.plus.v1.yifu.salary.vo.SalaryUploadParamVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryDetailVo; import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryDetailVo;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.tags.Tag;
...@@ -40,9 +41,8 @@ public class SalaryUploadController { ...@@ -40,9 +41,8 @@ public class SalaryUploadController {
@Operation(description = "上传:jsonString:表格json;settleDepart:结算主体id;configId:工资配置结算月等信息的id;salaryType:工资类型") @Operation(description = "上传:jsonString:表格json;settleDepart:结算主体id;configId:工资配置结算月等信息的id;salaryType:工资类型")
@SysLog("上传薪资表") @SysLog("上传薪资表")
@PostMapping("/upload") @PostMapping("/upload")
public R<List<ErrorMessage>> upload(@RequestBody String jsonString, @RequestParam String settleDepart, @RequestParam(required = false) String configId public R<List<ErrorMessage>> upload(@RequestBody SalaryUploadParamVo vo) {
, @RequestParam String salaryType, @RequestParam(required = false) String orderId) { return salaryUploadService.salaryUpload(vo);
return salaryUploadService.salaryUpload(jsonString, settleDepart, configId, salaryType, orderId);
} }
@Operation(description = "打开结算单") @Operation(description = "打开结算单")
......
...@@ -239,4 +239,13 @@ public class TSalaryStandardController { ...@@ -239,4 +239,13 @@ public class TSalaryStandardController {
public R<String> salaryDoIncome(@RequestParam String id) { public R<String> salaryDoIncome(@RequestParam String id) {
return tSalaryStandardService.salaryDoIncome(id); return tSalaryStandardService.salaryDoIncome(id);
} }
@Operation(description = "测试推送EKP主表含代发户list")
@SysLog("测试推送EKP主表含代发户list")
@PostMapping("/testSendEkpList")
public String testSendEkpList(@RequestParam String id) {
return tSalaryStandardService.testSendEkpList(id);
}
} }
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.salary.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryStandardIssue;
import com.yifu.cloud.plus.v1.yifu.salary.service.TSalaryStandardIssueService;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryStandardIssueSearchVo;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
* 薪资代发户配置
*
* @author hgw
* @date 2023-01-10 11:34:27
*/
@RestController
@RequiredArgsConstructor
@RequestMapping("/tsalarystandardissue" )
@Tag(name = "薪资代发户配置管理")
public class TSalaryStandardIssueController {
private final TSalaryStandardIssueService tSalaryStandardIssueService;
/**
* 简单分页查询
* @param page 分页对象
* @param tSalaryStandardIssue 薪资代发户配置
* @return
*/
@Operation(description = "简单分页查询")
@GetMapping("/page")
public R<IPage<TSalaryStandardIssue>> getTSalaryStandardIssuePage(Page<TSalaryStandardIssue> page, TSalaryStandardIssueSearchVo tSalaryStandardIssue) {
return new R<>(tSalaryStandardIssueService.getTSalaryStandardIssuePage(page,tSalaryStandardIssue));
}
/**
* 不分页查询
* @param tSalaryStandardIssue 薪资代发户配置
* @return
*/
@Operation(summary = "不分页查询", description = "不分页查询")
@PostMapping("/noPage" )
//@PreAuthorize("@pms.hasPermission('demo_tsalarystandardissue_get')" )
public R<List<TSalaryStandardIssue>> getTSalaryStandardIssueNoPage(@RequestBody TSalaryStandardIssueSearchVo tSalaryStandardIssue) {
return R.ok(tSalaryStandardIssueService.noPageDiy(tSalaryStandardIssue));
}
/**
* 通过id查询薪资代发户配置
* @param id id
* @return R
*/
@Operation(summary = "通过id查询", description = "通过id查询:hasPermission('demo_tsalarystandardissue_get')")
@GetMapping("/{id}" )
@PreAuthorize("@pms.hasPermission('demo_tsalarystandardissue_get')" )
public R<TSalaryStandardIssue> getById(@PathVariable("id" ) String id) {
return R.ok(tSalaryStandardIssueService.getById(id));
}
/**
* 新增薪资代发户配置
* @param tSalaryStandardIssue 薪资代发户配置
* @return R
*/
@Operation(summary = "新增薪资代发户配置", description = "新增薪资代发户配置:hasPermission('demo_tsalarystandardissue_add')")
@SysLog("新增薪资代发户配置" )
@PostMapping
@PreAuthorize("@pms.hasPermission('demo_tsalarystandardissue_add')" )
public R<Boolean> save(@RequestBody TSalaryStandardIssue tSalaryStandardIssue) {
return R.ok(tSalaryStandardIssueService.save(tSalaryStandardIssue));
}
/**
* 修改薪资代发户配置
* @param tSalaryStandardIssue 薪资代发户配置
* @return R
*/
@Operation(summary = "修改薪资代发户配置", description = "修改薪资代发户配置:hasPermission('demo_tsalarystandardissue_edit')")
@SysLog("修改薪资代发户配置" )
@PutMapping
@PreAuthorize("@pms.hasPermission('demo_tsalarystandardissue_edit')" )
public R<Boolean> updateById(@RequestBody TSalaryStandardIssue tSalaryStandardIssue) {
return R.ok(tSalaryStandardIssueService.updateById(tSalaryStandardIssue));
}
/**
* 通过id删除薪资代发户配置
* @param id id
* @return R
*/
@Operation(summary = "通过id删除薪资代发户配置", description = "通过id删除薪资代发户配置:hasPermission('demo_tsalarystandardissue_del')")
@SysLog("通过id删除薪资代发户配置" )
@DeleteMapping("/{id}" )
@PreAuthorize("@pms.hasPermission('demo_tsalarystandardissue_del')" )
public R<Boolean> removeById(@PathVariable String id) {
return R.ok(tSalaryStandardIssueService.removeById(id));
}
/**
* 薪资代发户配置 批量导出
* @author hgw
* @date 2023-01-10 11:34:27
**/
@Operation(description = "导出薪资代发户配置 hasPermission('demo_tsalarystandardissue-export')")
@PostMapping("/export")
@PreAuthorize("@pms.hasPermission('demo_tsalarystandardissue-export')")
public void export(HttpServletResponse response, @RequestBody TSalaryStandardIssueSearchVo searchVo) {
tSalaryStandardIssueService.listExport(response,searchVo);
}
}
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.salary.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryStandardIssue;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
/**
* 薪资代发户配置
*
* @author hgw
* @date 2023-01-10 11:34:27
*/
@Mapper
public interface TSalaryStandardIssueMapper extends BaseMapper<TSalaryStandardIssue> {
/**
* 薪资代发户配置简单分页查询
* @param tSalaryStandardIssue 薪资代发户配置
* @return
*/
IPage<TSalaryStandardIssue> getTSalaryStandardIssuePage(Page<TSalaryStandardIssue> page, @Param("tSalaryStandardIssue") TSalaryStandardIssue tSalaryStandardIssue);
}
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.salary.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryStandardIssueRes;
import org.apache.ibatis.annotations.Mapper;
/**
* 薪资表与代发户表关联表
*
* @author hgw
* @date 2023-01-10 11:34:27
*/
@Mapper
public interface TSalaryStandardIssueResMapper extends BaseMapper<TSalaryStandardIssueRes> {
}
...@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.extension.service.IService; ...@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage; import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R; import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryStandard; import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryStandard;
import com.yifu.cloud.plus.v1.yifu.salary.vo.SalaryUploadParamVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryDetailVo; import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryDetailVo;
import java.util.List; import java.util.List;
...@@ -17,15 +18,13 @@ import java.util.List; ...@@ -17,15 +18,13 @@ import java.util.List;
public interface SalaryUploadService extends IService<TSalaryStandard> { public interface SalaryUploadService extends IService<TSalaryStandard> {
/** /**
* @param jsonString
*repeatFlag 默认 0:不允许重复导入已存在系统内的数据;1:允许重复导入 *repeatFlag 默认 0:不允许重复导入已存在系统内的数据;1:允许重复导入
* @param orderId
* @Description: 普通工资上传 * @Description: 普通工资上传
* @Author: hgw * @Author: hgw
* @Date: 2019/9/4 15:58 * @Date: 2019/9/4 15:58
* @return: com.yifu.cloud.v1.common.core.util.R * @return: com.yifu.cloud.v1.common.core.util.R
**/ **/
R<List<ErrorMessage>> salaryUpload(String jsonString, String settleDepart, String configId, String formType, String orderId); R<List<ErrorMessage>> salaryUpload(SalaryUploadParamVo vo);
R<TSalaryDetailVo> getBill(String salaryFormId); R<TSalaryDetailVo> getBill(String salaryFormId);
......
...@@ -71,4 +71,13 @@ public interface TSalaryEmployeeService extends IService<TSalaryEmployee> { ...@@ -71,4 +71,13 @@ public interface TSalaryEmployeeService extends IService<TSalaryEmployee> {
TSalaryEmployee getByEmpIdCard(String empIdCard); TSalaryEmployee getByEmpIdCard(String empIdCard);
/**
* @param employee
* @Description: 代发户的,下次校验银行卡,同时变更校验flag
* @Author: hgw
* @Date: 2023/1/10 18:09
* @return: boolean
**/
boolean checkBankInfo(TSalaryEmployee employee);
} }
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.salary.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryStandardIssueRes;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryStandardIssueResSearchVo;
import java.util.List;
/**
* 薪资表与代发户表关联表
*
* @author hgw
* @date 2023-01-10 11:34:27
*/
public interface TSalaryStandardIssueResService extends IService<TSalaryStandardIssueRes> {
/**
* @Description: 薪资表与代发户表关联表简单不分页查询
* @Author: hgw
* @Date: 2023/1/10 14:34
* @return: java.util.List<com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryStandardIssueRes>
**/
List<TSalaryStandardIssueRes> noPageDiy(TSalaryStandardIssueResSearchVo searchVo);
}
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.salary.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryStandardIssue;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryStandardIssueSearchVo;
import javax.servlet.http.HttpServletResponse;
import java.io.InputStream;
import java.util.List;
/**
* 薪资代发户配置
*
* @author hgw
* @date 2023-01-10 11:34:27
*/
public interface TSalaryStandardIssueService extends IService<TSalaryStandardIssue> {
/**
* 薪资代发户配置简单分页查询
*
* @param tSalaryStandardIssue 薪资代发户配置
* @return
*/
IPage<TSalaryStandardIssue> getTSalaryStandardIssuePage(Page<TSalaryStandardIssue> page, TSalaryStandardIssueSearchVo tSalaryStandardIssue);
void listExport(HttpServletResponse response, TSalaryStandardIssueSearchVo searchVo);
List<TSalaryStandardIssue> noPageDiy(TSalaryStandardIssueSearchVo searchVo);
}
...@@ -113,4 +113,6 @@ public interface TSalaryStandardService extends IService<TSalaryStandard> { ...@@ -113,4 +113,6 @@ public interface TSalaryStandardService extends IService<TSalaryStandard> {
**/ **/
R<String> backSalaryByApplyNo(String applyNo); R<String> backSalaryByApplyNo(String applyNo);
String testSendEkpList(String id);
} }
...@@ -82,20 +82,27 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper, ...@@ -82,20 +82,27 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
private final TApprovalRecordService auditLogService; private final TApprovalRecordService auditLogService;
private final TSalaryStandardIssueResService tSalaryStandardIssueResService;
// 缓存信息 // 缓存信息
private final CacheManager cacheManager; private final CacheManager cacheManager;
/** /**
* @param jsonString 客户原表数据 * vo.jsonString 客户原表数据
* repeatFlag 默认 0:不允许重复导入已存在系统内的数据;1:允许重复导入 * repeatFlag 默认 0:不允许重复导入已存在系统内的数据;1:允许重复导入
* @param orderId
* @Description: 普通工资上传 * @Description: 普通工资上传
* @Author: hgw * @Author: hgw
* @Date: 2019/9/4 15:58 * @Date: 2019/9/4 15:58
* @return: com.yifu.cloud.v1.common.core.util.R * @return: com.yifu.cloud.v1.common.core.util.R
**/ **/
@Override @Override
public R<List<ErrorMessage>> salaryUpload(String jsonString, String settleDepart, String configId, String salaryType, String orderId) { public R<List<ErrorMessage>> salaryUpload(SalaryUploadParamVo vo) {
// R<List<ErrorMessage>> salaryUpload(String jsonString, String settleDepart, String configId, String salaryType, String orderId)
String jsonString = vo.getJsonString();
String settleDepart = vo.getSettleDepart();
String configId = vo.getConfigId();
String salaryType = vo.getSalaryType();
String orderId = vo.getOrderId();
if (Common.isNotNull(jsonString) && Common.isNotNull(settleDepart) && Common.isNotNull(salaryType)) { if (Common.isNotNull(jsonString) && Common.isNotNull(settleDepart) && Common.isNotNull(salaryType)) {
R<TSettleDomainSelectVo> sdr = HttpDaprUtil.invokeMethodPost(archivesProperties.getAppUrl(), archivesProperties.getAppId() R<TSettleDomainSelectVo> sdr = HttpDaprUtil.invokeMethodPost(archivesProperties.getAppUrl(), archivesProperties.getAppId()
...@@ -144,6 +151,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper, ...@@ -144,6 +151,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
} }
try { try {
jsonString = URLDecoder.decode(jsonString, "UTF-8").replace("=", ""); jsonString = URLDecoder.decode(jsonString, "UTF-8").replace("=", "");
vo.setJsonString(jsonString);
SalaryAccountUtil util1 = new SalaryAccountUtil(); SalaryAccountUtil util1 = new SalaryAccountUtil();
TSalaryEmployee empSearch = new TSalaryEmployee(); TSalaryEmployee empSearch = new TSalaryEmployee();
...@@ -184,8 +192,28 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper, ...@@ -184,8 +192,28 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
checkListY = tSalaryAccountService.getAccountYearCheckMap(); checkListY = tSalaryAccountService.getAccountYearCheckMap();
} }
util1.getJsonStringToList(user, jsonString, dept, configSalary, salaryConfigMap, isMustMap, if (Common.isNotNull(vo.getIsIssue()) && vo.getIsIssue() == 1 && vo.getResList() != null && !vo.getResList().isEmpty()) {
empIdCardMap, empNameMap, isDuplicateName, salaryType, checkListY, invoiceTitle, for (TSalaryStandardIssueRes res : vo.getResList()) {
if (Common.isEmpty(res.getIssueId())) {
return R.failed("代发户配置id不可为空");
}
if (Common.isEmpty(res.getMoney())) {
return R.failed("代发户金额不可为空");
}
if (Common.isEmpty(res.getBankName())) {
return R.failed("代发户开户行不可为空");
}
if (Common.isEmpty(res.getBankNo())) {
return R.failed("代发户卡号不可为空");
}
if (Common.isEmpty(res.getBankProvince()) || Common.isEmpty(res.getBankProvinceName())
|| Common.isEmpty(res.getBankCity()) || Common.isEmpty(res.getBankCityName())) {
return R.failed("代发户开户行省、市不可为空");
}
}
}
util1.getJsonStringToList(user, vo, dept, configSalary, salaryConfigMap, isMustMap,
empIdCardMap, empNameMap, isDuplicateName, checkListY, invoiceTitle,
employeeService, checkMap, specialMap, ownEmployeeMap, ownDeptMap, tSalaryAccountService); employeeService, checkMap, specialMap, ownEmployeeMap, ownDeptMap, tSalaryAccountService);
List<TSalaryAccountVo> saList = util1.getEntityList(); List<TSalaryAccountVo> saList = util1.getEntityList();
...@@ -196,7 +224,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper, ...@@ -196,7 +224,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
// return R.ok(saList) // return R.ok(saList)
//薪资导入 //薪资导入
if (CommonConstants.ZERO_STRING.equals(salaryType)) { if (CommonConstants.ZERO_STRING.equals(salaryType)) {
return this.saveAndSubmit(saList, orderId); return this.saveAndSubmit(saList, vo);
} }
//劳务费和稿酬导入 //劳务费和稿酬导入
if (CommonConstants.THREE_STRING.equals(salaryType) || CommonConstants.FOUR_STRING.equals(salaryType)) { if (CommonConstants.THREE_STRING.equals(salaryType) || CommonConstants.FOUR_STRING.equals(salaryType)) {
...@@ -289,14 +317,18 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper, ...@@ -289,14 +317,18 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
/** /**
* @param savList 报账表Vo * @param savList 报账表Vo
* @param orderId
* @Description: 保存并提交 * @Description: 保存并提交
* @Author: hgw * @Author: hgw
* @Date: 2019/9/20 17:05 * @Date: 2019/9/20 17:05
* @return: com.yifu.cloud.v1.common.core.util.R * @return: com.yifu.cloud.v1.common.core.util.R
**/ **/
private R saveAndSubmit(List<TSalaryAccountVo> savList, String orderId) { private R saveAndSubmit(List<TSalaryAccountVo> savList, SalaryUploadParamVo vo) {
if (Common.isNotNull(savList) && !savList.isEmpty()) { if (Common.isNotNull(savList) && !savList.isEmpty()) {
String orderId = vo.getOrderId();
// 代发户
Integer isIssue = vo.getIsIssue();
// 代发户与薪资关联表
List<TSalaryStandardIssueRes> resList = vo.getResList();
TSalaryAccountVo salaryAccountVo = savList.get(0); TSalaryAccountVo salaryAccountVo = savList.get(0);
List<TSalaryAccountItem> saiList = null; //报账明细List List<TSalaryAccountItem> saiList = null; //报账明细List
R<TSettleDomainSelectVo> sdr = HttpDaprUtil.invokeMethodPost(archivesProperties.getAppUrl(), archivesProperties.getAppId() R<TSettleDomainSelectVo> sdr = HttpDaprUtil.invokeMethodPost(archivesProperties.getAppUrl(), archivesProperties.getAppId()
...@@ -357,7 +389,8 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper, ...@@ -357,7 +389,8 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
//设置订单号 20220831 //设置订单号 20220831
salary.setOrderId(orderId); salary.setOrderId(orderId);
// 薪资核心导入代码 // 薪资核心导入代码
return this.doCoreSalary(savList, salaryAccountVo, saiList, dept, invoiceTitle, user, nowTime, salary, isActual); return this.doCoreSalary(savList, salaryAccountVo, saiList, dept, invoiceTitle, user, nowTime
, salary, isActual, isIssue, resList);
} catch (Exception e) { } catch (Exception e) {
lockUpdate = new TSalaryLock(); lockUpdate = new TSalaryLock();
lockUpdate.setId(lock.getId()); lockUpdate.setId(lock.getId());
...@@ -391,7 +424,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper, ...@@ -391,7 +424,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
public R doCoreSalary(List<TSalaryAccountVo> savList, TSalaryAccountVo salaryAccountVo public R doCoreSalary(List<TSalaryAccountVo> savList, TSalaryAccountVo salaryAccountVo
, List<TSalaryAccountItem> saiList, TSettleDomainSelectVo dept , List<TSalaryAccountItem> saiList, TSettleDomainSelectVo dept
, String invoiceTitle, YifuUser user, LocalDateTime nowTime, TSalaryStandard salary , String invoiceTitle, YifuUser user, LocalDateTime nowTime, TSalaryStandard salary
, boolean isActual) { , boolean isActual, Integer isIssue, List<TSalaryStandardIssueRes> resList) {
// 社保类型0:缴费库;1:预估库 // 社保类型0:缴费库;1:预估库
String socialType = CommonConstants.ZERO_STRING; String socialType = CommonConstants.ZERO_STRING;
if (Common.isNotNull(dept.getSocialType())) { if (Common.isNotNull(dept.getSocialType())) {
...@@ -826,8 +859,16 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper, ...@@ -826,8 +859,16 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
if (Common.isEmpty(salary.getApplyNo())) { if (Common.isEmpty(salary.getApplyNo())) {
salary.setApplyNo(this.getCode()); salary.setApplyNo(this.getCode());
} }
salary.setIssueStatus(isIssue);
//保存工资表 //保存工资表
tSalaryStandardService.save(salary); tSalaryStandardService.save(salary);
// 是代发户且选了代发户卡号,要保存关联表
if (Common.isNotNull(isIssue) && isIssue == 1 && resList != null && !resList.isEmpty()) {
for (TSalaryStandardIssueRes res : resList) {
res.setSalaryId(salary.getId());
}
tSalaryStandardIssueResService.updateBatchById(resList);
}
TApprovalRecord tApprovalRecord = new TApprovalRecord(); TApprovalRecord tApprovalRecord = new TApprovalRecord();
tApprovalRecord.setApprovalResult(CommonConstants.TWO_STRING); tApprovalRecord.setApprovalResult(CommonConstants.TWO_STRING);
tApprovalRecord.setApprovalOpinion("新建表单"); tApprovalRecord.setApprovalOpinion("新建表单");
......
...@@ -285,7 +285,8 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe ...@@ -285,7 +285,8 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
public String saveNewSalaryEmployee(boolean notLabour,TSalaryEmployee employee) { public String saveNewSalaryEmployee(boolean notLabour,TSalaryEmployee employee) {
if (Common.isNotNull(employee.getEmpName()) && Common.isNotNull(employee.getEmpIdcard())) { if (Common.isNotNull(employee.getEmpName()) && Common.isNotNull(employee.getEmpIdcard())) {
// 银行卡 // 银行卡
if (Common.isNotNull(employee.getBankNo())) { // 代发户的,不校验卡号,下次使用的时候校验卡号
if (Common.isNotNull(employee.getBankNo()) && (Common.isEmpty(employee.getIssueStatus()) || employee.getIssueStatus().equals(CommonConstants.ZERO_INT))) {
// 调用校验服务 // 调用校验服务
TCheckBankNo checkIdCard = new TCheckBankNo(); TCheckBankNo checkIdCard = new TCheckBankNo();
checkIdCard.setName(employee.getEmpName()); checkIdCard.setName(employee.getEmpName());
...@@ -504,4 +505,34 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe ...@@ -504,4 +505,34 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
return baseMapper.getByEmpIdCard(empIdCard); return baseMapper.getByEmpIdCard(empIdCard);
} }
/**
* @param employee
* @Description: 代发户的,下次校验银行卡,同时变更校验flag
* @Author: hgw
* @Date: 2023/1/10 18:10
* @return: boolean : true:已验证通过;false:银行卡校验失败
**/
@Override
public boolean checkBankInfo(TSalaryEmployee employee) {
// 调用校验服务
TCheckBankNo checkIdCard = new TCheckBankNo();
checkIdCard.setName(employee.getEmpName());
checkIdCard.setBankNo(employee.getBankNo());
R<CheckBankNoVo> checkListR = HttpDaprUtil.invokeMethodPost(checkProperties.getAppUrl(), checkProperties.getAppId()
, "/tcheckbankno/inner/checkBankNo", checkIdCard, CheckBankNoVo.class, SecurityConstants.FROM_IN);
if (checkListR != null && checkListR.getData() != null) {
CheckBankNoVo vo = checkListR.getData();
TCheckBankNo check = (null == vo.getRes()) ? null : vo.getRes().getData();
if (check != null && check.getResult().equals(CommonConstants.ZERO_ONE)) {
employee.setIssueStatus(CommonConstants.ZERO_INT);
this.updateById(employee);
return true;
} else {
return false;
}
} else {
return false;
}
}
} }
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.salary.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryStandardIssueRes;
import com.yifu.cloud.plus.v1.yifu.salary.mapper.TSalaryStandardIssueResMapper;
import com.yifu.cloud.plus.v1.yifu.salary.service.TSalaryStandardIssueResService;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryStandardIssueResSearchVo;
import lombok.extern.log4j.Log4j2;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* 薪资表与代发户表关联表
*
* @author hgw
* @date 2023-01-10 11:34:27
*/
@Log4j2
@Service
public class TSalaryStandardIssueResServiceImpl extends ServiceImpl<TSalaryStandardIssueResMapper, TSalaryStandardIssueRes> implements TSalaryStandardIssueResService {
@Override
public List<TSalaryStandardIssueRes> noPageDiy(TSalaryStandardIssueResSearchVo searchVo) {
LambdaQueryWrapper<TSalaryStandardIssueRes> wrapper = Wrappers.lambdaQuery();
List<String> idList = Common.getList(searchVo.getIds());
if (Common.isNotNull(idList)) {
wrapper.in(TSalaryStandardIssueRes::getId, idList);
}
if (searchVo.getLimitStart() >= 0 && searchVo.getLimitEnd() > 0) {
wrapper.last(" limit " + searchVo.getLimitStart() + "," + searchVo.getLimitEnd());
}
wrapper.orderByDesc(TSalaryStandardIssueRes::getSalaryId);
return baseMapper.selectList(wrapper);
}
}
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.salary.service.impl;
import cn.hutool.core.util.ArrayUtil;
import com.alibaba.excel.EasyExcel;
import com.alibaba.excel.ExcelWriter;
import com.alibaba.excel.write.metadata.WriteSheet;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.DateUtil;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ExcelUtil;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryStandardIssue;
import com.yifu.cloud.plus.v1.yifu.salary.mapper.TSalaryStandardIssueMapper;
import com.yifu.cloud.plus.v1.yifu.salary.service.TSalaryStandardIssueService;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryStandardIssueSearchVo;
import lombok.extern.log4j.Log4j2;
import org.springframework.stereotype.Service;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.List;
/**
* 薪资代发户配置
*
* @author hgw
* @date 2023-01-10 11:34:27
*/
@Log4j2
@Service
public class TSalaryStandardIssueServiceImpl extends ServiceImpl<TSalaryStandardIssueMapper, TSalaryStandardIssue> implements TSalaryStandardIssueService {
/**
* 薪资代发户配置简单分页查询
*
* @param tSalaryStandardIssue 薪资代发户配置
* @return
*/
@Override
public IPage<TSalaryStandardIssue> getTSalaryStandardIssuePage(Page<TSalaryStandardIssue> page, TSalaryStandardIssueSearchVo tSalaryStandardIssue) {
return baseMapper.getTSalaryStandardIssuePage(page, tSalaryStandardIssue);
}
/**
* 薪资代发户配置批量导出
*
* @param searchVo 薪资代发户配置
* @return
*/
@Override
public void listExport(HttpServletResponse response, TSalaryStandardIssueSearchVo searchVo) {
String fileName = "薪资代发户配置批量导出" + DateUtil.getThisTime() + ".xlsx";
//获取要导出的列表
List<TSalaryStandardIssue> list = new ArrayList<>();
long count = noPageCountDiy(searchVo);
ServletOutputStream out = null;
try {
out = response.getOutputStream();
response.setContentType(CommonConstants.MULTIPART_FORM_DATA);
response.setCharacterEncoding("utf-8");
response.setHeader(CommonConstants.CONTENT_DISPOSITION, CommonConstants.ATTACHMENT_FILENAME + URLEncoder.encode(fileName, CommonConstants.UTF8));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
ExcelWriter excelWriter = EasyExcel.write(out, TSalaryStandardIssue.class).build();
int index = 0;
if (count > CommonConstants.ZERO_INT) {
for (int i = 0; i <= count; ) {
// 获取实际记录
searchVo.setLimitStart(i);
searchVo.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT);
list = noPageDiy(searchVo);
if (Common.isNotNull(list)) {
ExcelUtil<TSalaryStandardIssue> util = new ExcelUtil<>(TSalaryStandardIssue.class);
for (TSalaryStandardIssue vo : list) {
util.convertEntity(vo, null, null, null);
}
}
if (Common.isNotNull(list)) {
WriteSheet writeSheet = EasyExcel.writerSheet("薪资代发户配置" + index).build();
excelWriter.write(list, writeSheet);
index++;
}
i = i + CommonConstants.EXCEL_EXPORT_LIMIT;
if (Common.isNotNull(list)) {
list.clear();
}
}
} else {
WriteSheet writeSheet = EasyExcel.writerSheet("薪资代发户配置" + index).build();
excelWriter.write(list, writeSheet);
}
if (Common.isNotNull(list)) {
list.clear();
}
out.flush();
excelWriter.finish();
} catch (Exception e) {
log.error("执行异常", e);
} finally {
try {
if (null != out) {
out.close();
}
} catch (IOException e) {
log.error("执行异常", e);
}
}
}
@Override
public List<TSalaryStandardIssue> noPageDiy(TSalaryStandardIssueSearchVo searchVo) {
LambdaQueryWrapper<TSalaryStandardIssue> wrapper = buildQueryWrapper(searchVo);
List<String> idList = Common.getList(searchVo.getIds());
if (Common.isNotNull(idList)) {
wrapper.in(TSalaryStandardIssue::getId, idList);
}
if (searchVo.getLimitStart() >= 0 && searchVo.getLimitEnd() > 0) {
wrapper.last(" limit " + searchVo.getLimitStart() + "," + searchVo.getLimitEnd());
}
wrapper.orderByDesc(BaseEntity::getCreateTime);
return baseMapper.selectList(wrapper);
}
private Long noPageCountDiy(TSalaryStandardIssueSearchVo searchVo) {
LambdaQueryWrapper<TSalaryStandardIssue> wrapper = buildQueryWrapper(searchVo);
List<String> idList = Common.getList(searchVo.getIds());
if (Common.isNotNull(idList)) {
wrapper.in(TSalaryStandardIssue::getId, idList);
}
return baseMapper.selectCount(wrapper);
}
private LambdaQueryWrapper buildQueryWrapper(TSalaryStandardIssueSearchVo entity) {
LambdaQueryWrapper<TSalaryStandardIssue> wrapper = Wrappers.lambdaQuery();
if (ArrayUtil.isNotEmpty(entity.getCreateTimes())) {
wrapper.ge(TSalaryStandardIssue::getCreateTime, entity.getCreateTimes()[0])
.le(TSalaryStandardIssue::getCreateTime,
entity.getCreateTimes()[1]);
}
if (Common.isNotNull(entity.getCreateName())) {
wrapper.eq(TSalaryStandardIssue::getCreateName, entity.getCreateName());
}
return wrapper;
}
}
...@@ -44,15 +44,9 @@ import com.yifu.cloud.plus.v1.yifu.ekp.util.EkpFundUtil; ...@@ -44,15 +44,9 @@ import com.yifu.cloud.plus.v1.yifu.ekp.util.EkpFundUtil;
import com.yifu.cloud.plus.v1.yifu.ekp.util.EkpSalaryUtil; import com.yifu.cloud.plus.v1.yifu.ekp.util.EkpSalaryUtil;
import com.yifu.cloud.plus.v1.yifu.ekp.util.EkpSocialUtil; import com.yifu.cloud.plus.v1.yifu.ekp.util.EkpSocialUtil;
import com.yifu.cloud.plus.v1.yifu.ekp.vo.*; import com.yifu.cloud.plus.v1.yifu.ekp.vo.*;
import com.yifu.cloud.plus.v1.yifu.salary.entity.MSalaryEstimate; import com.yifu.cloud.plus.v1.yifu.salary.entity.*;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TApprovalRecord;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccount;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryStandard;
import com.yifu.cloud.plus.v1.yifu.salary.mapper.TSalaryStandardMapper; import com.yifu.cloud.plus.v1.yifu.salary.mapper.TSalaryStandardMapper;
import com.yifu.cloud.plus.v1.yifu.salary.service.MSalaryEstimateService; import com.yifu.cloud.plus.v1.yifu.salary.service.*;
import com.yifu.cloud.plus.v1.yifu.salary.service.TApprovalRecordService;
import com.yifu.cloud.plus.v1.yifu.salary.service.TSalaryAccountService;
import com.yifu.cloud.plus.v1.yifu.salary.service.TSalaryStandardService;
import com.yifu.cloud.plus.v1.yifu.salary.util.DoJointSalaryAsyncTask; import com.yifu.cloud.plus.v1.yifu.salary.util.DoJointSalaryAsyncTask;
import com.yifu.cloud.plus.v1.yifu.salary.util.SalaryConstants; import com.yifu.cloud.plus.v1.yifu.salary.util.SalaryConstants;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryStandardExportVo; import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryStandardExportVo;
...@@ -72,6 +66,7 @@ import java.io.IOException; ...@@ -72,6 +66,7 @@ import java.io.IOException;
import java.net.URLEncoder; import java.net.URLEncoder;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Date; import java.util.Date;
import java.util.HashMap;
import java.util.List; import java.util.List;
/** /**
...@@ -95,6 +90,7 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe ...@@ -95,6 +90,7 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
private final EkpSocialUtil ekpSocialUtil; private final EkpSocialUtil ekpSocialUtil;
private final EkpFundUtil ekpFundUtil; private final EkpFundUtil ekpFundUtil;
private final TApprovalRecordService auditLogService; private final TApprovalRecordService auditLogService;
private final TSalaryStandardIssueResService issueResService;
@Lazy @Lazy
private final DoJointSalaryAsyncTask doSalaryAsync; private final DoJointSalaryAsyncTask doSalaryAsync;
...@@ -452,20 +448,12 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe ...@@ -452,20 +448,12 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
} }
if (sendStatus) { if (sendStatus) {
EkpSalaryStandardParam standardParam = new EkpSalaryStandardParam(); HashMap<String, Object> sendMap = this.setSendEkpStandardParam(s);
standardParam.setFd_3b3bf2c3b1a6cc(s.getDeptName());
standardParam.setFd_3b3bf2c426cfc8(s.getDeptNo());
standardParam.setFd_3b3bf2c4975776(s.getApplyNo() == null ? "" : s.getApplyNo());
standardParam.setFd_3b3bf2c58d2b46(s.getId());
standardParam.setFd_3b3cbe1d05f0d6("");
standardParam.setFd_3b3d3ec95b68fc(String.valueOf(s.getSettlementAmount()));
standardParam.setFd_3b3d3ec85bfeb0(s.getSalaryMonth().substring(0,4)
+ CommonConstants.CENTER_SPLIT_LINE_STRING + s.getSalaryMonth().substring(4,6));
// 推送主表信息 // 推送主表信息
String loginName = user.getUsername(); String loginName = user.getUsername();
sendBack = ekpSalaryUtil.sendStandardToEKP(loginName, standardParam); sendBack = ekpSalaryUtil.sendStandardToEKP(loginName, JSON.toJSONString(sendMap));
if (Common.isEmpty(sendBack) || sendBack.length() != 32) { if (Common.isEmpty(sendBack) || sendBack.length() != 32) {
sendBack = ekpSalaryUtil.sendStandardToEKP(loginName, standardParam); sendBack = ekpSalaryUtil.sendStandardToEKP(loginName, JSON.toJSONString(sendMap));
} }
s.setSendTime(new Date()); s.setSendTime(new Date());
s.setSendMonth(nowMonth); s.setSendMonth(nowMonth);
...@@ -506,6 +494,68 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe ...@@ -506,6 +494,68 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
} }
} }
@Override
public String testSendEkpList(String id) {
TSalaryStandard s = this.getById(id);
HashMap<String, Object> sendMap = this.setSendEkpStandardParam(s);
YifuUser user = SecurityUtils.getUser();
// 推送主表信息
String loginName = user.getUsername();
return ekpSalaryUtil.sendStandardToEKP(loginName, JSON.toJSONString(sendMap));
}
/**
* @param s
* @Description: 组建发送EKP的主表信息
* @Author: hgw
* @Date: 2023/1/12 15:07
* @return: java.util.HashMap<java.lang.String, java.lang.Object>
**/
private HashMap<String, Object> setSendEkpStandardParam(TSalaryStandard s) {
HashMap<String, Object> sendMap = new HashMap<>();
sendMap.put("fd_3b3bf2c3b1a6cc", s.getDeptName());
sendMap.put("fd_3b3bf2c426cfc8", s.getDeptNo());
sendMap.put("fd_3b3bf2c4975776", s.getApplyNo() == null ? "" : s.getApplyNo());
sendMap.put("fd_3b3bf2c58d2b46", s.getId());
sendMap.put("fd_3b3cbe1d05f0d6", "");
sendMap.put("fd_3b3d3ec95b68fc", String.valueOf(s.getSettlementAmount()));
sendMap.put("fd_3b3d3ec85bfeb0", s.getSalaryMonth().substring(0,4)
+ CommonConstants.CENTER_SPLIT_LINE_STRING + s.getSalaryMonth().substring(4,6));
sendMap.put("fd_3b73e18ad34090", "否");
if (Common.isNotNull(s.getIssueStatus()) && s.getIssueStatus() == 1) {
sendMap.put("fd_3b73e18ad34090", "是");
List<TSalaryStandardIssueRes> resList = issueResService.list(
Wrappers.<TSalaryStandardIssueRes>query().lambda().eq(
TSalaryStandardIssueRes::getSalaryId, s.getId()));
if (resList != null && !resList.isEmpty()) {
// 代发户银行账户
List<String> fd_3b71f207c0cfd0 = new ArrayList<>();
// 代发户银行账户
List<String> fd_3b71f20883301a = new ArrayList<>();
// 代发户开户行
List<String> fd_3b71f20933e0d2 = new ArrayList<>();
// 代发户支行
List<String> fd_3b745c35ff27a8 = new ArrayList<>();
// 代发金额
List<String> fd_3b73a736cc9cc8 = new ArrayList<>();
for (TSalaryStandardIssueRes res : resList) {
fd_3b71f207c0cfd0.add(res.getOrgName());
fd_3b71f20883301a.add(res.getBankNo());
fd_3b71f20933e0d2.add(res.getBankName());
fd_3b745c35ff27a8.add(res.getBankSubName());
fd_3b73a736cc9cc8.add(String.valueOf(res.getMoney()));
}
sendMap.put("fd_3b71f1f4fd40ac.fd_3b71f207c0cfd0", fd_3b71f207c0cfd0);
sendMap.put("fd_3b71f1f4fd40ac.fd_3b71f20883301a", fd_3b71f20883301a);
sendMap.put("fd_3b71f1f4fd40ac.fd_3b71f20933e0d2", fd_3b71f20933e0d2);
sendMap.put("fd_3b71f1f4fd40ac.fd_3b745c35ff27a8", fd_3b745c35ff27a8);
sendMap.put("fd_3b71f1f4fd40ac.fd_3b73a736cc9cc8", fd_3b73a736cc9cc8);
}
}
return sendMap;
}
/** /**
* @Description: 添加流程进展明细 * @Description: 添加流程进展明细
* @Author: hgw * @Author: hgw
......
...@@ -13,8 +13,10 @@ import com.yifu.cloud.plus.v1.yifu.insurances.util.ValidityUtil; ...@@ -13,8 +13,10 @@ import com.yifu.cloud.plus.v1.yifu.insurances.util.ValidityUtil;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TConfigSalary; import com.yifu.cloud.plus.v1.yifu.salary.entity.TConfigSalary;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryConfigStandard; import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryConfigStandard;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryEmployee; import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryEmployee;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryStandardIssueRes;
import com.yifu.cloud.plus.v1.yifu.salary.service.TSalaryAccountService; import com.yifu.cloud.plus.v1.yifu.salary.service.TSalaryAccountService;
import com.yifu.cloud.plus.v1.yifu.salary.service.TSalaryEmployeeService; import com.yifu.cloud.plus.v1.yifu.salary.service.TSalaryEmployeeService;
import com.yifu.cloud.plus.v1.yifu.salary.vo.SalaryUploadParamVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryAccountItemVo; import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryAccountItemVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryAccountVo; import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryAccountVo;
import lombok.Data; import lombok.Data;
...@@ -48,7 +50,7 @@ public class SalaryAccountUtil implements Serializable { ...@@ -48,7 +50,7 @@ public class SalaryAccountUtil implements Serializable {
private List<ErrorMessage> errorInfo; private List<ErrorMessage> errorInfo;
/** /**
* @param jsonStr 客户原表json内容 * vo.jsonStr 客户原表json内容
* @param dept 项目 * @param dept 项目
* @param configSalary 当前项目下的配置(结算月等 * @param configSalary 当前项目下的配置(结算月等
* @param salaryConfigMap 客户原表-工资模板配置Map * @param salaryConfigMap 客户原表-工资模板配置Map
...@@ -62,12 +64,18 @@ public class SalaryAccountUtil implements Serializable { ...@@ -62,12 +64,18 @@ public class SalaryAccountUtil implements Serializable {
* @Date: 2019/9/16 17:26 * @Date: 2019/9/16 17:26
* @return: void * @return: void
**/ **/
public void getJsonStringToList(YifuUser user, String jsonStr, TSettleDomainSelectVo dept public void getJsonStringToList(YifuUser user, SalaryUploadParamVo vo, TSettleDomainSelectVo dept
, TConfigSalary configSalary, Map<String, TSalaryConfigStandard> salaryConfigMap, Map<String, Boolean> isMustMap , TConfigSalary configSalary, Map<String, TSalaryConfigStandard> salaryConfigMap, Map<String, Boolean> isMustMap
, Map<String, TSalaryEmployee> empIdCardMap, Map<String, TSalaryEmployee> empNameMap, boolean isDuplicateName , Map<String, TSalaryEmployee> empIdCardMap, Map<String, TSalaryEmployee> empNameMap, boolean isDuplicateName
, String salaryType, List<String> checkListY, String invoiceTitle, TSalaryEmployeeService tSalaryEmployeeService , List<String> checkListY, String invoiceTitle, TSalaryEmployeeService tSalaryEmployeeService
, Map<String, Integer> checkMap, Map<String, BigDecimal> specialMap, Map<String, Integer> ownEmployeeMap , Map<String, Integer> checkMap, Map<String, BigDecimal> specialMap, Map<String, Integer> ownEmployeeMap
, Map<String, Integer> ownDeptMap, TSalaryAccountService tSalaryAccountService) { , Map<String, Integer> ownDeptMap, TSalaryAccountService tSalaryAccountService) {
String jsonStr = vo.getJsonString();
String salaryType = vo.getSalaryType();
Integer isIssue = vo.getIsIssue();
if (Common.isEmpty(isIssue)) {
isIssue = 0;
}
List<TSalaryAccountVo> tList = new ArrayList<>(); List<TSalaryAccountVo> tList = new ArrayList<>();
List<HashMap> list = JSONObject.parseArray(jsonStr, HashMap.class); List<HashMap> list = JSONObject.parseArray(jsonStr, HashMap.class);
List<ErrorMessage> errorList = new ArrayList<>(); List<ErrorMessage> errorList = new ArrayList<>();
...@@ -474,6 +482,18 @@ public class SalaryAccountUtil implements Serializable { ...@@ -474,6 +482,18 @@ public class SalaryAccountUtil implements Serializable {
entity.setCity(dept.getCity()); entity.setCity(dept.getCity());
entity.setTown(dept.getTown()); entity.setTown(dept.getTown());
// 本次不为代发户,并且薪资人员里的代发户标记没去掉,要校验银行卡
if (isIssue == 0 && Common.isNotNull(emp.getBankNo())
&& Common.isNotNull(emp.getIssueStatus())
&& CommonConstants.ONE_INT == emp.getIssueStatus()) {
boolean bankNoIsTrue = tSalaryEmployeeService.checkBankInfo(emp);
if (!bankNoIsTrue) {
error = "第" + (i + 2) + SalaryConstants.LINE_EMP + emp.getEmpIdcard()
+ "-上次代发户未校验【姓名与卡号】,本次校验结果:不匹配。请去薪酬人员查询处更新卡号信息!";
errorList.add(new ErrorMessage((i + 2), error));
continue;
}
}
entity.setEmpId(emp.getId()); entity.setEmpId(emp.getId());
entity.setEmpIdcard(emp.getEmpIdcard()); entity.setEmpIdcard(emp.getEmpIdcard());
entity.setEmpName(emp.getEmpName()); entity.setEmpName(emp.getEmpName());
......
...@@ -110,6 +110,7 @@ ...@@ -110,6 +110,7 @@
<result property="fd_3adfedfbd23ab8" column="fd_3adfedfbd23ab8"/> <result property="fd_3adfedfbd23ab8" column="fd_3adfedfbd23ab8"/>
<result property="fd_3adfedfcb17f1e" column="fd_3adfedfcb17f1e"/> <result property="fd_3adfedfcb17f1e" column="fd_3adfedfcb17f1e"/>
<result property="fd_3adfedfc453cc4" column="fd_3adfedfc453cc4"/> <result property="fd_3adfedfc453cc4" column="fd_3adfedfc453cc4"/>
<result property="fd_3b73de2809465a" column="fd_3b73de2809465a"/>
<result property="fd_3adfee063acff0" column="fd_3adfee063acff0"/> <result property="fd_3adfee063acff0" column="fd_3adfee063acff0"/>
<result property="fd_3adfee0690737c" column="fd_3adfee0690737c"/> <result property="fd_3adfee0690737c" column="fd_3adfee0690737c"/>
<result property="fd_3adfee01668666" column="fd_3adfee01668666"/> <result property="fd_3adfee01668666" column="fd_3adfee01668666"/>
...@@ -546,6 +547,7 @@ ...@@ -546,6 +547,7 @@
,ifnull(a.EMP_PHONE,'') fd_3adfedfbd23ab8 ,ifnull(a.EMP_PHONE,'') fd_3adfedfbd23ab8
,ifnull(a.BANK_NO,'') fd_3adfedfcb17f1e ,ifnull(a.BANK_NO,'') fd_3adfedfcb17f1e
,ifnull(a.BANK_NAME,'') fd_3adfedfc453cc4 ,ifnull(a.BANK_NAME,'') fd_3adfedfc453cc4
,ifnull(a.BANK_SUB_NAME,'') fd_3b73de2809465a
,concat(left(ifnull(a.SALARY_MONTH,'1970'),4),'-',right(ifnull(a.SALARY_MONTH,'02'),2)) fd_3adfee063acff0 ,concat(left(ifnull(a.SALARY_MONTH,'1970'),4),'-',right(ifnull(a.SALARY_MONTH,'02'),2)) fd_3adfee063acff0
,concat(left(ifnull(a.SETTLEMENT_MONTH,'1970'),4),'-',right(ifnull(a.SETTLEMENT_MONTH,'02'),2)) fd_3adfee0690737c ,concat(left(ifnull(a.SETTLEMENT_MONTH,'1970'),4),'-',right(ifnull(a.SETTLEMENT_MONTH,'02'),2)) fd_3adfee0690737c
,'是' fd_3adfee01668666 ,'是' fd_3adfee01668666
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
~
~ Copyright (c) 2018-2025, lengleng All rights reserved.
~
~ Redistribution and use in source and binary forms, with or without
~ modification, are permitted provided that the following conditions are met:
~
~ Redistributions of source code must retain the above copyright notice,
~ this list of conditions and the following disclaimer.
~ Redistributions in binary form must reproduce the above copyright
~ notice, this list of conditions and the following disclaimer in the
~ documentation and/or other materials provided with the distribution.
~ Neither the name of the yifu4cloud.com developer nor the names of its
~ contributors may be used to endorse or promote products derived from
~ this software without specific prior written permission.
~ Author: lengleng (wangiegie@gmail.com)
~
-->
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yifu.cloud.plus.v1.yifu.salary.mapper.TSalaryStandardIssueMapper">
<resultMap id="tSalaryStandardIssueMap" type="com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryStandardIssue">
<id property="id" column="ID"/>
<result property="deptId" column="DEPT_ID"/>
<result property="deptName" column="DEPT_NAME"/>
<result property="deptNo" column="DEPT_NO"/>
<result property="orgName" column="ORG_NAME"/>
<result property="bankName" column="BANK_NAME"/>
<result property="bankSubName" column="BANK_SUB_NAME"/>
<result property="bankNo" column="BANK_NO"/>
<result property="bankProvince" column="BANK_PROVINCE"/>
<result property="bankCity" column="BANK_CITY"/>
<result property="bankProvinceName" column="BANK_PROVINCE_NAME"/>
<result property="bankCityName" column="BANK_CITY_NAME"/>
<result property="createBy" column="CREATE_BY"/>
<result property="createName" column="CREATE_NAME"/>
<result property="createTime" column="CREATE_TIME"/>
<result property="updateBy" column="UPDATE_BY"/>
<result property="updateTime" column="UPDATE_TIME"/>
</resultMap>
<sql id="Base_Column_List">
a.ID,
a.DEPT_ID,
a.DEPT_NAME,
a.DEPT_NO,
a.ORG_NAME,
a.BANK_NAME,
a.BANK_SUB_NAME,
a.BANK_NO,
a.BANK_PROVINCE,
a.BANK_PROVINCE_NAME,
a.BANK_CITY,
a.BANK_CITY_NAME,
a.CREATE_BY,
a.CREATE_NAME,
a.CREATE_TIME,
a.UPDATE_BY,
a.UPDATE_TIME
</sql>
<sql id="tSalaryStandardIssue_where">
<if test="tSalaryStandardIssue != null">
<if test="tSalaryStandardIssue.id != null and tSalaryStandardIssue.id.trim() != ''">
AND a.ID = #{tSalaryStandardIssue.id}
</if>
<if test="tSalaryStandardIssue.deptId != null and tSalaryStandardIssue.deptId.trim() != ''">
AND a.DEPT_ID = #{tSalaryStandardIssue.deptId}
</if>
<if test="tSalaryStandardIssue.deptName != null and tSalaryStandardIssue.deptName.trim() != ''">
AND a.DEPT_NAME = #{tSalaryStandardIssue.deptName}
</if>
<if test="tSalaryStandardIssue.deptNo != null and tSalaryStandardIssue.deptNo.trim() != ''">
AND a.DEPT_NO = #{tSalaryStandardIssue.deptNo}
</if>
<if test="tSalaryStandardIssue.orgName != null and tSalaryStandardIssue.orgName.trim() != ''">
AND a.ORG_NAME = #{tSalaryStandardIssue.orgName}
</if>
<if test="tSalaryStandardIssue.bankName != null and tSalaryStandardIssue.bankName.trim() != ''">
AND a.BANK_NAME = #{tSalaryStandardIssue.bankName}
</if>
<if test="tSalaryStandardIssue.bankSubName != null and tSalaryStandardIssue.bankSubName.trim() != ''">
AND a.BANK_SUB_NAME = #{tSalaryStandardIssue.bankSubName}
</if>
<if test="tSalaryStandardIssue.bankNo != null and tSalaryStandardIssue.bankNo.trim() != ''">
AND a.BANK_NO = #{tSalaryStandardIssue.bankNo}
</if>
<if test="tSalaryStandardIssue.bankProvince != null">
AND a.BANK_PROVINCE = #{tSalaryStandardIssue.bankProvince}
</if>
<if test="tSalaryStandardIssue.bankCity != null">
AND a.BANK_CITY = #{tSalaryStandardIssue.bankCity}
</if>
<if test="tSalaryStandardIssue.createBy != null and tSalaryStandardIssue.createBy.trim() != ''">
AND a.CREATE_BY = #{tSalaryStandardIssue.createBy}
</if>
<if test="tSalaryStandardIssue.createName != null and tSalaryStandardIssue.createName.trim() != ''">
AND a.CREATE_NAME = #{tSalaryStandardIssue.createName}
</if>
<if test="tSalaryStandardIssue.createTime != null">
AND a.CREATE_TIME = #{tSalaryStandardIssue.createTime}
</if>
<if test="tSalaryStandardIssue.updateBy != null and tSalaryStandardIssue.updateBy.trim() != ''">
AND a.UPDATE_BY = #{tSalaryStandardIssue.updateBy}
</if>
<if test="tSalaryStandardIssue.updateTime != null">
AND a.UPDATE_TIME = #{tSalaryStandardIssue.updateTime}
</if>
</if>
</sql>
<!--tSalaryStandardIssue简单分页查询-->
<select id="getTSalaryStandardIssuePage" resultMap="tSalaryStandardIssueMap">
SELECT
<include refid="Base_Column_List"/>
FROM t_salary_standard_issue a
<where>
1=1
<include refid="tSalaryStandardIssue_where"/>
</where>
</select>
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!--
~
~ Copyright (c) 2018-2025, lengleng All rights reserved.
~
~ Redistribution and use in source and binary forms, with or without
~ modification, are permitted provided that the following conditions are met:
~
~ Redistributions of source code must retain the above copyright notice,
~ this list of conditions and the following disclaimer.
~ Redistributions in binary form must reproduce the above copyright
~ notice, this list of conditions and the following disclaimer in the
~ documentation and/or other materials provided with the distribution.
~ Neither the name of the yifu4cloud.com developer nor the names of its
~ contributors may be used to endorse or promote products derived from
~ this software without specific prior written permission.
~ Author: lengleng (wangiegie@gmail.com)
~
-->
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yifu.cloud.plus.v1.yifu.salary.mapper.TSalaryStandardIssueResMapper">
<resultMap id="tSalaryStandardIssueResMap" type="com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryStandardIssueRes">
<id property="id" column="ID"/>
<result property="issueId" column="ISSUE_ID"/>
<result property="salaryId" column="SALARY_ID"/>
<result property="money" column="MONEY"/>
<result property="orgName" column="ORG_NAME"/>
<result property="bankName" column="BANK_NAME"/>
<result property="bankSubName" column="BANK_SUB_NAME"/>
<result property="bankNo" column="BANK_NO"/>
<result property="bankProvince" column="BANK_PROVINCE"/>
<result property="bankCity" column="BANK_CITY"/>
<result property="bankProvinceName" column="BANK_PROVINCE_NAME"/>
<result property="bankCityName" column="BANK_CITY_NAME"/>
</resultMap>
<sql id="Base_Column_List">
a.ID,
a.ISSUE_ID,
a.SALARY_ID,
a.ORG_NAME,
a.BANK_NAME,
a.BANK_SUB_NAME,
a.BANK_NO,
a.BANK_PROVINCE,
a.BANK_PROVINCE_NAME,
a.BANK_CITY,
a.BANK_CITY_NAME,
a.MONEY
</sql>
<sql id="tSalaryStandardIssueRes_where">
<if test="tSalaryStandardIssueRes != null">
<if test="tSalaryStandardIssueRes.id != null and tSalaryStandardIssueRes.id.trim() != ''">
AND a.ID = #{tSalaryStandardIssueRes.id}
</if>
<if test="tSalaryStandardIssueRes.issueId != null and tSalaryStandardIssueRes.issueId.trim() != ''">
AND a.ISSUE_ID = #{tSalaryStandardIssueRes.issueId}
</if>
<if test="tSalaryStandardIssueRes.salaryId != null and tSalaryStandardIssueRes.salaryId.trim() != ''">
AND a.SALARY_ID = #{tSalaryStandardIssueRes.salaryId}
</if>
<if test="tSalaryStandardIssueRes.money != null">
AND a.MONEY = #{tSalaryStandardIssueRes.money}
</if>
</if>
</sql>
</mapper>
...@@ -77,6 +77,7 @@ ...@@ -77,6 +77,7 @@
<result property="applyNo" column="APPLY_NO"/> <result property="applyNo" column="APPLY_NO"/>
<result property="incomeStartTime" column="INCOME_START_TIME"/> <result property="incomeStartTime" column="INCOME_START_TIME"/>
<result property="incomeEndTime" column="INCOME_END_TIME"/> <result property="incomeEndTime" column="INCOME_END_TIME"/>
<result property="issueStatus" column="ISSUE_STATUS"/>
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
a.ID, a.ID,
...@@ -132,7 +133,8 @@ ...@@ -132,7 +133,8 @@
a.BPO_FLAG, a.BPO_FLAG,
a.APPLY_NO, a.APPLY_NO,
a.INCOME_START_TIME, a.INCOME_START_TIME,
a.INCOME_END_TIME a.INCOME_END_TIME,
a.ISSUE_STATUS
</sql> </sql>
<sql id="tSalaryStandard_where"> <sql id="tSalaryStandard_where">
<if test="tSalaryStandard != null"> <if test="tSalaryStandard != null">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment