Commit 2aeecd8e authored by fangxinjiang's avatar fangxinjiang

Merge remote-tracking branch 'origin/develop' into develop

parents bdd2b633 7275d6e4
...@@ -9,6 +9,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.OSSUtil; ...@@ -9,6 +9,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.OSSUtil;
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.core.vo.FileVo; import com.yifu.cloud.plus.v1.yifu.common.core.vo.FileVo;
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.vo.SalaryAttaVo;
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;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
...@@ -18,6 +19,7 @@ import org.springframework.web.multipart.MultipartFile; ...@@ -18,6 +19,7 @@ import org.springframework.web.multipart.MultipartFile;
import java.io.IOException; import java.io.IOException;
import java.net.URL; import java.net.URL;
import java.util.ArrayList;
import java.util.List; import java.util.List;
/** /**
...@@ -114,4 +116,31 @@ public class FileUploadController { ...@@ -114,4 +116,31 @@ public class FileUploadController {
} }
return new R<>(attas); return new R<>(attas);
} }
/**
* 获取附件
* @author hgw
* @return R
*/
@Operation(summary = "获取薪资原表附件--EKP调用接口", description = "获取薪资原表附件--EKP调用接口")
@SysLog("获取薪资原表附件--EKP调用接口")
@GetMapping("/getAttaListBySalaryId")
public R<List<SalaryAttaVo>> getAttaListBySalaryId(@RequestParam String salaryId) {
List<SalaryAttaVo> voList = new ArrayList<>();
List<TAttaInfo> attaList = tAttaInfoService.list(Wrappers.<TAttaInfo>query().lambda()
.eq(TAttaInfo::getRelationType,11)
.eq(TAttaInfo::getDomainId,salaryId));
if (attaList != null && !attaList.isEmpty()) {
SalaryAttaVo vo;
URL url;
for (TAttaInfo a : attaList){
url = ossUtil.getObjectUrl(null, a.getAttaSrc());
vo = new SalaryAttaVo();
vo.setAttaName(a.getAttaName());
vo.setAttaUrl(url.toString().replace("http","https"));
voList.add(vo);
}
}
return R.ok(voList);
}
} }
...@@ -91,6 +91,13 @@ public interface CacheConstants { ...@@ -91,6 +91,13 @@ public interface CacheConstants {
**/ **/
String EVERYDAY_EMP_CONTRACT_CODE = "everyday_emp_contract_code"; String EVERYDAY_EMP_CONTRACT_CODE = "everyday_emp_contract_code";
/**
* @Description: 每日薪资表的 申请编码 缓存
* @Author: hgw
* @Date: 2022-11-2 09:56:32
**/
String EVERYDAY_SALARY_FORM_CODE = "everyday_salary_form_code";
/** /**
* @Description: 派单申请编码 * @Description: 派单申请编码
* @Author: fxj * @Author: fxj
......
...@@ -20,14 +20,23 @@ public class EkpSalaryProperties { ...@@ -20,14 +20,23 @@ public class EkpSalaryProperties {
String url; String url;
// 薪资报账明细-所需参数
String fdModelId; String fdModelId;
// 薪资报账明细-所需参数
String fdFlowId; String fdFlowId;
String docStatus; String docStatus;
String LoginName; String loginName;
String docSubject; String docSubject;
// 薪资主表-所需参数(推送申请编号等)
String standardFdModelId;
// 薪资主表-所需参数(推送申请编号等)
String standardFdFlowId;
// 薪资退表-所需参数
String backSalaryFdModelId;
// 薪资退表-所需参数
String backSalaryFdFlowId;
} }
...@@ -3,7 +3,9 @@ package com.yifu.cloud.plus.v1.yifu.ekp.util; ...@@ -3,7 +3,9 @@ package com.yifu.cloud.plus.v1.yifu.ekp.util;
import cn.hutool.json.JSONObject; import cn.hutool.json.JSONObject;
import com.yifu.cloud.plus.v1.yifu.ekp.config.EkpSalaryProperties; 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.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;
...@@ -36,16 +38,90 @@ public class EkpSalaryUtil { ...@@ -36,16 +38,90 @@ public class EkpSalaryUtil {
JSONObject loginName = new JSONObject(); JSONObject loginName = new JSONObject();
loginName.append("LoginName",ekpProperties.getLoginName()); loginName.append("LoginName",ekpProperties.getLoginName());
MultiValueMap<String,Object> wholeForm = new LinkedMultiValueMap<>(); MultiValueMap<String,Object> wholeForm = new LinkedMultiValueMap<>();
//wholeForm.add("docSubject", new String(docSubject.getBytes("UTF-8"),"ISO-8859-1") )
wholeForm.add("docSubject",ekpProperties.getDocSubject()); wholeForm.add("docSubject",ekpProperties.getDocSubject());
wholeForm.add("docCreator", "{\"LoginName\":\"admin\"}"); wholeForm.add("docCreator", "{\"LoginName\":\"admin\"}");
//wholeForm.add("docCreator", loginData)
wholeForm.add("docStatus", ekpProperties.getDocStatus()); wholeForm.add("docStatus", ekpProperties.getDocStatus());
wholeForm.add("fdModelId", ekpProperties.getFdModelId()); wholeForm.add("fdModelId", ekpProperties.getFdModelId());
wholeForm.add("fdFlowId", ekpProperties.getFdFlowId()); wholeForm.add("fdFlowId", ekpProperties.getFdFlowId());
//wholeForm.add("formValues", new String(formValues.getBytes("UTF-8"),"ISO-8859-1"))
wholeForm.add("formValues", formValues); wholeForm.add("formValues", formValues);
//wholeForm.add("formValues", new String("{\"fd_3adfe6af71a1cc\":\"王五\", \"fd_3adfe658c6229e\":\"2019-03-26\", \"fd_3adfe6592b4158\":\"这里内容\"}".getBytes("UTF-8"),"ISO-8859-1") ) HttpHeaders headers = new HttpHeaders();
//如果EKP对该接口启用了Basic认证,那么客户端需要加入
//addAuth(headers,"yourAccount"+":"+"yourPassword");是VO,则使用APPLICATION_JSON
headers.setContentType(MediaType.MULTIPART_FORM_DATA);
//必须设置上传类型,如果入参是字符串,使用MediaType.TEXT_PLAIN;如果
HttpEntity<MultiValueMap<String,Object>> entity = new HttpEntity<>(wholeForm,headers);
//有返回值的情况 VO可以替换成具体的JavaBean
ResponseEntity<String> obj = yourRestTemplate.exchange(ekpProperties.getUrl(), HttpMethod.POST, entity, String.class);
String body = obj.getBody();
if (StringUtils.isBlank(body)){
log.error(EkpConstants.SEND_FAILED);
return EkpConstants.SEND_FAILED;
}else{
log.info(EkpConstants.SEND_SUCCESS+body);
return body;
}
}catch (Exception e){
log.info(e.getMessage());
return e.getMessage();
}
}
// 推送主表到ekp
public String sendStandardToEKP(EkpSalaryStandardParam param){
log.info("推送EKP开始--薪资主表数据");
RestTemplate yourRestTemplate = new RestTemplate();
try{
//指向EKP的接口url
//把ModelingAppModelParameterAddForm转换成MultiValueMap
JSONObject loginName = new JSONObject();
String formValues = new ObjectMapper().writeValueAsString(param);
loginName.append("LoginName",ekpProperties.getLoginName());
MultiValueMap<String,Object> wholeForm = new LinkedMultiValueMap<>();
wholeForm.add("docSubject",ekpProperties.getDocSubject());
wholeForm.add("docCreator", "{\"LoginName\":\"admin\"}");
wholeForm.add("docStatus", ekpProperties.getDocStatus());
wholeForm.add("formValues", formValues);
wholeForm.add("fdModelId", ekpProperties.getStandardFdModelId());
wholeForm.add("fdFlowId", ekpProperties.getStandardFdFlowId());
HttpHeaders headers = new HttpHeaders();
//如果EKP对该接口启用了Basic认证,那么客户端需要加入
//addAuth(headers,"yourAccount"+":"+"yourPassword");是VO,则使用APPLICATION_JSON
headers.setContentType(MediaType.MULTIPART_FORM_DATA);
//必须设置上传类型,如果入参是字符串,使用MediaType.TEXT_PLAIN;如果
HttpEntity<MultiValueMap<String,Object>> entity = new HttpEntity<>(wholeForm,headers);
//有返回值的情况 VO可以替换成具体的JavaBean
ResponseEntity<String> obj = yourRestTemplate.exchange(ekpProperties.getUrl(), HttpMethod.POST, entity, String.class);
String body = obj.getBody();
if (StringUtils.isBlank(body)){
log.error(EkpConstants.SEND_FAILED);
return EkpConstants.SEND_FAILED;
}else{
log.info(EkpConstants.SEND_SUCCESS+body);
return body;
}
}catch (Exception e){
log.info(e.getMessage());
return e.getMessage();
}
}
// 退表到ekp
public String backStandardToEKP(EkpSalaryBackParam param){
log.info("推送EKP开始--薪资退表");
RestTemplate yourRestTemplate = new RestTemplate();
try{
//指向EKP的接口url
//把ModelingAppModelParameterAddForm转换成MultiValueMap
JSONObject loginName = new JSONObject();
loginName.append("LoginName",ekpProperties.getLoginName());
MultiValueMap<String,Object> wholeForm = new LinkedMultiValueMap<>();
wholeForm.add("docSubject",ekpProperties.getDocSubject());
wholeForm.add("docCreator", "{\"LoginName\":\"admin\"}");
wholeForm.add("docStatus", ekpProperties.getDocStatus());
String formValues = new ObjectMapper().writeValueAsString(param);
wholeForm.add("formValues", formValues);
wholeForm.add("fdModelId", ekpProperties.getBackSalaryFdModelId());
wholeForm.add("fdFlowId", ekpProperties.getBackSalaryFdFlowId());
HttpHeaders headers = new HttpHeaders(); HttpHeaders headers = new HttpHeaders();
//如果EKP对该接口启用了Basic认证,那么客户端需要加入 //如果EKP对该接口启用了Basic认证,那么客户端需要加入
//addAuth(headers,"yourAccount"+":"+"yourPassword");是VO,则使用APPLICATION_JSON //addAuth(headers,"yourAccount"+":"+"yourPassword");是VO,则使用APPLICATION_JSON
......
...@@ -30,4 +30,8 @@ public class EkpIncomeParamManage extends EkpIncomeParam { ...@@ -30,4 +30,8 @@ public class EkpIncomeParamManage extends EkpIncomeParam {
* 管理费ID * 管理费ID
**/ **/
private String fd_3b13dae9bd70f8; private String fd_3b13dae9bd70f8;
/**
* 薪酬申请编号
**/
private String fd_3b3bf13759b850;
} }
...@@ -30,4 +30,8 @@ public class EkpIncomeParamRisk extends EkpIncomeParam { ...@@ -30,4 +30,8 @@ public class EkpIncomeParamRisk extends EkpIncomeParam {
* 风险金ID * 风险金ID
**/ **/
private String fd_3b13dac4c03022; private String fd_3b13dac4c03022;
/**
* 薪酬申请编号
**/
private String fd_3b3bf0e75ef6c4;
} }
...@@ -144,5 +144,8 @@ public class EkpPushFundParam implements Serializable { ...@@ -144,5 +144,8 @@ public class EkpPushFundParam implements Serializable {
* 是否为BPO业务 * 是否为BPO业务
**/ **/
private String fd_3b178ea361cabe; private String fd_3b178ea361cabe;
/**
* 薪酬申请编号
**/
private String fd_3b3cabde83d1d0;
} }
\ No newline at end of file
...@@ -248,5 +248,9 @@ public class EkpPushSocialParam implements Serializable { ...@@ -248,5 +248,9 @@ public class EkpPushSocialParam implements Serializable {
* 是否为BPO业务 * 是否为BPO业务
**/ **/
private String fd_3b178dfcf9e3e6; private String fd_3b178dfcf9e3e6;
/**
* 薪酬申请编号
**/
private String fd_3b3cab77923f44;
} }
\ No newline at end of file
package com.yifu.cloud.plus.v1.yifu.ekp.vo;
import lombok.Data;
import java.io.Serializable;
/**
* @Author hgw
* @Date 2022-11-4 17:10:36
* @Description 薪资退表对应参数
* @Version 1.0
*/
@Data
public class EkpSalaryBackParam implements Serializable {
/**
* 项目名称
**/
private String fd_3b3c293745e7b4;
/**
* 项目编码
**/
private String fd_3b3c2935c13056;
/**
* 薪酬申请编号
**/
private String fd_3b3c293811c0ee;
}
...@@ -266,4 +266,9 @@ public class EkpSalaryParam implements Serializable { ...@@ -266,4 +266,9 @@ public class EkpSalaryParam implements Serializable {
**/ **/
private String fd_3b178f0ded2114; private String fd_3b178f0ded2114;
/**
* 薪酬申请编号
**/
private String fd_3b3bef19b61c38;
} }
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;
}
ekp.url=http://119.96.227.251:8080/api/sys-modeling/appModelRestService/addModel #ekp.url=http://119.96.227.251:8080/api/sys-modeling/appModelRestService/addModel
ekp.url=http://36.7.147.19:28080/api/sys-modeling/appModelRestService/addModel
ekp.fdModelId=181d7633ff8bc797276d0d3a54e80ad6 ekp.fdModelId=181d7633ff8bc797276d0d3a54e80ad6
ekp.fdFlowId=182b40249c1bc940d7226b941c7a4183 ekp.fdFlowId=182b40249c1bc940d7226b941c7a4183
ekp.docStatus=20 ekp.docStatus=20
ekp.LoginName=admin ekp.loginName=admin
ekp.docSubject=\u85AA\u8D44\u8BA2\u5355\u660E\u7EC6\u6570\u636E\u63A5\u53E3 ekp.docSubject=\u85AA\u8D44\u8BA2\u5355\u660E\u7EC6\u6570\u636E\u63A5\u53E3
ekp.standardFdModelId=184326e4b122e5fa3068628470285b71
ekp.standardFdFlowId=1843272d8103adae6d332a54bce88255
ekp.backSalaryFdModelId=18433d5df69433ea9073400476c9cb8b
ekp.backSalaryFdFlowId=18433d7d9f83e800bd292984488ac770
\ No newline at end of file
...@@ -103,11 +103,11 @@ public class TSalaryAtta extends BaseEntity { ...@@ -103,11 +103,11 @@ public class TSalaryAtta extends BaseEntity {
@ExcelProperty("链接ID") @ExcelProperty("链接ID")
private String linkId; private String linkId;
/** /**
* 类型:0工资;1工程工资;2暂停发;3自定义项暂停发;4打印记录;5核准表打印记录;6:非扣税项;8自有员工附件;9财务回执附件 * 类型:0工资;1工程工资;2暂停发;3自定义项暂停发;4打印记录;5核准表打印记录;6:非扣税项;8自有员工附件;9财务回执附件;10换人换卡;11薪资原表;12劳务费或稿酬已有发薪记录;13薪资特殊值(3500、5000)
*/ */
@ExcelAttribute(name = "类型:0工资;1工程工资;2暂停发;3自定义项暂停发;4打印记录;5核准表打印记录;6:非扣税项;8自有员工附件;9财务回执附件") @ExcelAttribute(name = "类型")
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("类型:0工资;1工程工资;2暂停发;3自定义项暂停发;4打印记录;5核准表打印记录;6:非扣税项;8自有员工附件;9财务回执附件") @ExcelProperty("类型")
private Integer linkType; private Integer linkType;
/** /**
* 工程文件类型:0三方协议;1委托付款函;2劳务费 * 工程文件类型:0三方协议;1委托付款函;2劳务费
......
...@@ -389,6 +389,25 @@ public class TSalaryStandard extends BaseEntity { ...@@ -389,6 +389,25 @@ public class TSalaryStandard extends BaseEntity {
@ExcelProperty("订单ID" ) @ExcelProperty("订单ID" )
private String orderId; private String orderId;
/**
* 申请编码
*/
@Schema(description = "申请编码")
private String applyNo;
/**
* 推送时间
*/
@ExcelAttribute(name = "退表时间", isDate = true)
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("退表时间")
private Date backTime;
/**
* 退表EkpId
*/
@ExcelAttribute(name = "退表EkpId")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("退表EkpId")
private String backEkpId;
/** /**
* EKP的 是否BPO: 是 否 * EKP的 是否BPO: 是 否
*/ */
......
package com.yifu.cloud.plus.v1.yifu.salary.vo;
import lombok.Getter;
import lombok.Setter;
/**
* @author hgw2
* @description 薪资附件vo
* @date 2022/11/3
*/
@Getter
@Setter
public class SalaryAttaVo {
/**
* 附件名称
*/
private String attaName;
/**
* 资源地址
*/
private String attaUrl;
}
...@@ -216,4 +216,16 @@ public class TSalaryStandardController { ...@@ -216,4 +216,16 @@ public class TSalaryStandardController {
public R<String> doSend(@RequestParam String id) { public R<String> doSend(@RequestParam String id) {
return tSalaryStandardService.doSend(id); return tSalaryStandardService.doSend(id);
} }
/**
* 退回薪资表,退回中,再调用ekp接口,通知他们删除
* @author hgw
* @return R
*/
@Operation(summary = "退回薪资表--EKP调用接口", description = "退回薪资表--EKP调用接口")
@SysLog("退回薪资表--EKP调用接口")
@GetMapping("/backSalaryByApplyNo")
public R<String> backSalaryByApplyNo(@RequestParam String applyNo) {
return tSalaryStandardService.backSalaryByApplyNo(applyNo);
}
} }
...@@ -55,4 +55,11 @@ public interface TSalaryStandardMapper extends BaseMapper<TSalaryStandard> { ...@@ -55,4 +55,11 @@ public interface TSalaryStandardMapper extends BaseMapper<TSalaryStandard> {
int getSalaryStandardExportCount(@Param("searchVo") TSalaryStandardSearchVo searchVo, @Param("idList")List<String> idList); int getSalaryStandardExportCount(@Param("searchVo") TSalaryStandardSearchVo searchVo, @Param("idList")List<String> idList);
/**
* @Description: 获取当日薪酬最大编码
* @Author: hgw
* @Date: 2022-11-2 11:09:25
* @return: java.lang.String
**/
String getMaxSalaryCode();
} }
...@@ -95,4 +95,13 @@ public interface TSalaryStandardService extends IService<TSalaryStandard> { ...@@ -95,4 +95,13 @@ public interface TSalaryStandardService extends IService<TSalaryStandard> {
* @return: void * @return: void
**/ **/
void saveRecordLog(TSalaryStandard tSalaryStandard, YifuUser user, String status, String nodeId); void saveRecordLog(TSalaryStandard tSalaryStandard, YifuUser user, String status, String nodeId);
/**
* @Description: 从EKP退回薪资表
* @Author: hgw
* @Date: 2022/11/4 16:32
* @return:
**/
R<String> backSalaryByApplyNo(String applyNo);
} }
package com.yifu.cloud.plus.v1.yifu.salary.service.impl; package com.yifu.cloud.plus.v1.yifu.salary.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TDepartSettlementInfo; import com.yifu.cloud.plus.v1.yifu.archives.entity.TDepartSettlementInfo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TSettleDomain; import com.yifu.cloud.plus.v1.yifu.archives.entity.TSettleDomain;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo; import com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CacheConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants; import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants; import com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.*; import com.yifu.cloud.plus.v1.yifu.common.core.util.*;
...@@ -23,6 +23,9 @@ import com.yifu.cloud.plus.v1.yifu.salary.vo.*; ...@@ -23,6 +23,9 @@ import com.yifu.cloud.plus.v1.yifu.salary.vo.*;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.extern.log4j.Log4j2; import lombok.extern.log4j.Log4j2;
import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.cache.Cache;
import org.springframework.cache.CacheManager;
import org.springframework.cache.support.SimpleValueWrapper;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
...@@ -78,6 +81,9 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper, ...@@ -78,6 +81,9 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
private final TApprovalRecordService auditLogService; private final TApprovalRecordService auditLogService;
// 缓存信息
private final CacheManager cacheManager;
/** /**
* @param jsonString 客户原表数据 * @param jsonString 客户原表数据
* repeatFlag 默认 0:不允许重复导入已存在系统内的数据;1:允许重复导入 * repeatFlag 默认 0:不允许重复导入已存在系统内的数据;1:允许重复导入
...@@ -566,21 +572,28 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper, ...@@ -566,21 +572,28 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
modelPersonSocialFlag = false; modelPersonSocialFlag = false;
personalDebt = personalDebt.add(sai.getSalaryMoney()); personalDebt = personalDebt.add(sai.getSalaryMoney());
sai.setIsTax(CommonConstants.ONE_INT); sai.setIsTax(CommonConstants.ONE_INT);
a.setPersonSocial(sai.getSalaryMoney());
} }
//代扣个人公积金
if (SalaryConstants.WITHHOLIDING_PERSON_FUND.equals(sai.getJavaFiedName())) { if (SalaryConstants.WITHHOLIDING_PERSON_FUND.equals(sai.getJavaFiedName())) {
modelPersonFundFlag = false; modelPersonFundFlag = false;
personalDebt = personalDebt.add(sai.getSalaryMoney()); personalDebt = personalDebt.add(sai.getSalaryMoney());
sai.setIsTax(CommonConstants.ONE_INT); sai.setIsTax(CommonConstants.ONE_INT);
a.setPersonFund(sai.getSalaryMoney());
} }
//个人代扣:李靖2020-6-16 18:16:09提的需求: //个人代扣:李靖2020-6-16 18:16:09提的需求:
if (SalaryConstants.PDEDUCTION_JAVA.equals(sai.getJavaFiedName())) { if (SalaryConstants.PDEDUCTION_JAVA.equals(sai.getJavaFiedName())) {
personalDebt = personalDebt.add(sai.getSalaryMoney()); personalDebt = personalDebt.add(sai.getSalaryMoney());
} }
//代扣单位社保
if (SalaryConstants.WITHHOLIDING_UNIT_SOCIAL.equals(sai.getJavaFiedName())) { if (SalaryConstants.WITHHOLIDING_UNIT_SOCIAL.equals(sai.getJavaFiedName())) {
modelUnitSocialFlag = false; modelUnitSocialFlag = false;
a.setUnitSocial(sai.getSalaryMoney());
} }
//代扣单位公积金
if (SalaryConstants.WITHHOLIDING_UNIT_FUND.equals(sai.getJavaFiedName())) { if (SalaryConstants.WITHHOLIDING_UNIT_FUND.equals(sai.getJavaFiedName())) {
modelUnitFundFlag = false; modelUnitFundFlag = false;
a.setUnitFund(sai.getSalaryMoney());
} }
saiList.add(sai); saiList.add(sai);
//工资应发 //工资应发
...@@ -805,6 +818,9 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper, ...@@ -805,6 +818,9 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
HttpDaprUtil.invokeMethodPost(socialProperties.getAppUrl(), socialProperties.getAppId() HttpDaprUtil.invokeMethodPost(socialProperties.getAppUrl(), socialProperties.getAppId()
, "/tforecastlibrary/inner/updateForecastFundStatusToSettle", forecastFundList, TDepartSettlementInfo.class, SecurityConstants.FROM_IN); , "/tforecastlibrary/inner/updateForecastFundStatusToSettle", forecastFundList, TDepartSettlementInfo.class, SecurityConstants.FROM_IN);
} }
if (Common.isEmpty(salary.getApplyNo())) {
salary.setApplyNo(this.getCode());
}
//保存工资表 //保存工资表
tSalaryStandardService.save(salary); tSalaryStandardService.save(salary);
TApprovalRecord tApprovalRecord = new TApprovalRecord(); TApprovalRecord tApprovalRecord = new TApprovalRecord();
...@@ -1584,6 +1600,9 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper, ...@@ -1584,6 +1600,9 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
salary.setIsRepeat(CommonConstants.ONE_INT); salary.setIsRepeat(CommonConstants.ONE_INT);
} }
} }
if (Common.isEmpty(salary.getApplyNo())) {
salary.setApplyNo(this.getCode());
}
//保存工资表 //保存工资表
tSalaryStandardService.save(salary); tSalaryStandardService.save(salary);
TApprovalRecord tApprovalRecord = new TApprovalRecord(); TApprovalRecord tApprovalRecord = new TApprovalRecord();
...@@ -1848,6 +1867,9 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper, ...@@ -1848,6 +1867,9 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
salary.setIsRepeat(CommonConstants.ONE_INT); salary.setIsRepeat(CommonConstants.ONE_INT);
} }
} }
if (Common.isEmpty(salary.getApplyNo())) {
salary.setApplyNo(this.getCode());
}
//保存工资表 //保存工资表
tSalaryStandardService.save(salary); tSalaryStandardService.save(salary);
TApprovalRecord tApprovalRecord = new TApprovalRecord(); TApprovalRecord tApprovalRecord = new TApprovalRecord();
...@@ -1931,5 +1953,42 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper, ...@@ -1931,5 +1953,42 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
nowTax = nowTax.setScale(SalaryConstants.PLACES, BigDecimal.ROUND_HALF_UP); nowTax = nowTax.setScale(SalaryConstants.PLACES, BigDecimal.ROUND_HALF_UP);
return nowTax; return nowTax;
} }
public synchronized String getCode() {
String nowDay = DateUtil.getThisDay();
int nowNums;
String empCode = null;
Cache cache = cacheManager.getCache(CacheConstants.EVERYDAY_SALARY_FORM_CODE);
if (cache != null) {
try {
Object nowNumObj = cache.get(nowDay);
if (Common.isNotNull(nowNumObj)) {
SimpleValueWrapper value = (SimpleValueWrapper) nowNumObj;
nowNums = (Integer) value.get() + 1;
} else {
empCode = baseMapper.getMaxSalaryCode();
nowNums = Integer.parseInt(empCode) + 1;
}
} catch (NumberFormatException e) {
log.error("获取人员合同当日最大编码时出错:" + empCode);
nowNums = 1;
}
cache.put(nowDay, nowNums);
} else {
empCode = baseMapper.getMaxSalaryCode();
nowNums = Integer.parseInt(empCode) + 1;
}
return "XC" + nowDay + this.getFourNum(String.valueOf(nowNums));
}
private String getFourNum(String nowNums) {
if (nowNums.length() >= 4) {
return nowNums.substring(0, 4);
}
String[] zeroArr = {"0", "00", "000"};
int num = 3 - nowNums.length();
return zeroArr[num] + nowNums;
}
} }
...@@ -26,20 +26,27 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.OSSUtil; ...@@ -26,20 +26,27 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.OSSUtil;
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.core.vo.FileVo; import com.yifu.cloud.plus.v1.yifu.common.core.vo.FileVo;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser; import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog;
import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils; import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAtta; import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAtta;
import com.yifu.cloud.plus.v1.yifu.salary.mapper.TSalaryAttaMapper; import com.yifu.cloud.plus.v1.yifu.salary.mapper.TSalaryAttaMapper;
import com.yifu.cloud.plus.v1.yifu.salary.service.TSalaryAttaService; import com.yifu.cloud.plus.v1.yifu.salary.service.TSalaryAttaService;
import com.yifu.cloud.plus.v1.yifu.salary.service.TSalaryStandardService;
import io.swagger.v3.oas.annotations.Operation;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.extern.log4j.Log4j2; import lombok.extern.log4j.Log4j2;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
import java.io.IOException; import java.io.IOException;
import java.net.URL; import java.net.URL;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List; import java.util.List;
/** /**
...@@ -52,8 +59,11 @@ import java.util.List; ...@@ -52,8 +59,11 @@ import java.util.List;
@Service @Service
@AllArgsConstructor @AllArgsConstructor
public class TSalaryAttaServiceImpl extends ServiceImpl<TSalaryAttaMapper, TSalaryAtta> implements TSalaryAttaService { public class TSalaryAttaServiceImpl extends ServiceImpl<TSalaryAttaMapper, TSalaryAtta> implements TSalaryAttaService {
private final OSSUtil ossUtil; private final OSSUtil ossUtil;
private final TSalaryStandardService tSalaryStandardService;
/** /**
* 薪资结算附件表简单分页查询 * 薪资结算附件表简单分页查询
* *
......
...@@ -21,6 +21,7 @@ import com.alibaba.excel.ExcelWriter; ...@@ -21,6 +21,7 @@ import com.alibaba.excel.ExcelWriter;
import com.alibaba.excel.write.metadata.WriteSheet; import com.alibaba.excel.write.metadata.WriteSheet;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; 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.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TDepartSettlementInfo; import com.yifu.cloud.plus.v1.yifu.archives.entity.TDepartSettlementInfo;
...@@ -36,10 +37,7 @@ import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils; ...@@ -36,10 +37,7 @@ import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
import com.yifu.cloud.plus.v1.yifu.ekp.util.EkpFundUtil; 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.EkpPushFundParam; import com.yifu.cloud.plus.v1.yifu.ekp.vo.*;
import com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpPushSocialParam;
import com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpSalaryParam;
import com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpSalaryParamVo;
import com.yifu.cloud.plus.v1.yifu.salary.entity.MSalaryEstimate; import com.yifu.cloud.plus.v1.yifu.salary.entity.MSalaryEstimate;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TApprovalRecord; 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.TSalaryAccount;
...@@ -52,6 +50,7 @@ import com.yifu.cloud.plus.v1.yifu.salary.service.TSalaryStandardService; ...@@ -52,6 +50,7 @@ import com.yifu.cloud.plus.v1.yifu.salary.service.TSalaryStandardService;
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;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryStandardSearchVo; import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryStandardSearchVo;
import com.yifu.cloud.plus.v1.yifu.social.entity.TIncome;
import com.yifu.cloud.plus.v1.yifu.social.entity.TIncomeDetail; import com.yifu.cloud.plus.v1.yifu.social.entity.TIncomeDetail;
import com.yifu.cloud.plus.v1.yifu.social.entity.TSendEkpError; import com.yifu.cloud.plus.v1.yifu.social.entity.TSendEkpError;
import com.yifu.cloud.plus.v1.yifu.social.vo.TIncomeDetailReturnVo; import com.yifu.cloud.plus.v1.yifu.social.vo.TIncomeDetailReturnVo;
...@@ -310,6 +309,7 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe ...@@ -310,6 +309,7 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
**/ **/
private R<String> getIncomeDetailMap(TSalaryStandard tSalaryStandard, TSettleDomainSelectVo dept, List<String> idCardList, Map<String, Integer> detailMap) { private R<String> getIncomeDetailMap(TSalaryStandard tSalaryStandard, TSettleDomainSelectVo dept, List<String> idCardList, Map<String, Integer> detailMap) {
TIncomeDetail detail = new TIncomeDetail(); TIncomeDetail detail = new TIncomeDetail();
detail.setApplyNo(tSalaryStandard.getApplyNo());
detail.setPayMonth(tSalaryStandard.getSalaryMonth()); detail.setPayMonth(tSalaryStandard.getSalaryMonth());
detail.setIdCardList(idCardList); detail.setIdCardList(idCardList);
detail.setDeptId(dept.getId()); detail.setDeptId(dept.getId());
...@@ -392,6 +392,7 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe ...@@ -392,6 +392,7 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
detail.setRedData(CommonConstants.ZERO_STRING); detail.setRedData(CommonConstants.ZERO_STRING);
detail.setSourceId(account.getId()); detail.setSourceId(account.getId());
detail.setSourceType(CommonConstants.FOUR_STRING); detail.setSourceType(CommonConstants.FOUR_STRING);
detail.setApplyNo(tSalaryStandard.getApplyNo());
R<Boolean> saveR = HttpDaprUtil.invokeMethodPost(socialProperties.getAppUrl(), socialProperties.getAppId() R<Boolean> saveR = HttpDaprUtil.invokeMethodPost(socialProperties.getAppUrl(), socialProperties.getAppId()
, "/tincome/inner/saveDetail", detail, Boolean.class, SecurityConstants.FROM_IN); , "/tincome/inner/saveDetail", detail, Boolean.class, SecurityConstants.FROM_IN);
if (saveR == null || saveR.getCode() == CommonConstants.ONE_INT || Boolean.FALSE.equals(saveR.getData())) { if (saveR == null || saveR.getCode() == CommonConstants.ONE_INT || Boolean.FALSE.equals(saveR.getData())) {
...@@ -583,9 +584,37 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe ...@@ -583,9 +584,37 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
} }
salaryAccountService.updateBatchById(accountList); salaryAccountService.updateBatchById(accountList);
if (sendStatus) { if (sendStatus) {
EkpSalaryStandardParam standardParam = new EkpSalaryStandardParam();
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));
// 推送主表信息
sendBack = ekpSalaryUtil.sendStandardToEKP(standardParam);
if (Common.isEmpty(sendBack) || sendBack.length() != 32) {
sendBack = ekpSalaryUtil.sendStandardToEKP(standardParam);
}
s.setSendTime(new Date()); s.setSendTime(new Date());
s.setSendMonth(DateUtil.addMonth(0)); s.setSendMonth(nowMonth);
s.setStatus(SalaryConstants.STATUS[3]); if (Common.isNotNull(sendBack) && sendBack.length() == 32) {
s.setStatus(SalaryConstants.STATUS[3]);
} else {
s.setStatus(SalaryConstants.STATUS[10]);
TSendEkpError error = new TSendEkpError();
error.setCreateTime(new Date());
error.setCreateDay(DateUtil.getThisDay());
error.setType(CommonConstants.SIX_STRING);
error.setCreateUserName(s.getCreateName());
error.setLinkId(s.getId());
error.setTitle(sendBack);
error.setNums(CommonConstants.ONE_INT);
HttpDaprUtil.invokeMethodPost(socialProperties.getAppUrl(), socialProperties.getAppId()
, "/tsendekperror/inner/saveError", error, Boolean.class, SecurityConstants.FROM_IN);
}
this.updateById(s); this.updateById(s);
// 添加流程进展明细 // 添加流程进展明细
this.saveRecordLog(s, user, CommonConstants.ZERO_STRING, "发送数字化平台-成功"); this.saveRecordLog(s, user, CommonConstants.ZERO_STRING, "发送数字化平台-成功");
...@@ -747,6 +776,8 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe ...@@ -747,6 +776,8 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
socialParam.setFd_3b0afbe1f94a08(account.getFd_3b10af838eab5c()); socialParam.setFd_3b0afbe1f94a08(account.getFd_3b10af838eab5c());
// 是否为BPO业务 // 是否为BPO业务
socialParam.setFd_3b178dfcf9e3e6(s.getBpoFlag()); socialParam.setFd_3b178dfcf9e3e6(s.getBpoFlag());
// 薪酬申请编号
socialParam.setFd_3b3cab77923f44(s.getApplyNo()==null?"":s.getApplyNo());
String sendBack = ekpSocialUtil.sendToEKP(socialParam); String sendBack = ekpSocialUtil.sendToEKP(socialParam);
if (Common.isEmpty(sendBack) || sendBack.length() != 32) { if (Common.isEmpty(sendBack) || sendBack.length() != 32) {
sendBack = ekpSocialUtil.sendToEKP(socialParam); sendBack = ekpSocialUtil.sendToEKP(socialParam);
...@@ -833,6 +864,8 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe ...@@ -833,6 +864,8 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
socialParam.setFd_3b0afbaf10df2c(account.getFd_3b10af838eab5c()); socialParam.setFd_3b0afbaf10df2c(account.getFd_3b10af838eab5c());
// 是否为BPO业务 // 是否为BPO业务
socialParam.setFd_3b178ea361cabe(s.getBpoFlag()); socialParam.setFd_3b178ea361cabe(s.getBpoFlag());
// 薪酬申请编号
socialParam.setFd_3b3cabde83d1d0(s.getApplyNo()==null?"":s.getApplyNo());
String sendBack = ekpFundUtil.sendToEKP(socialParam); String sendBack = ekpFundUtil.sendToEKP(socialParam);
if (Common.isEmpty(sendBack) || sendBack.length() != 32) { if (Common.isEmpty(sendBack) || sendBack.length() != 32) {
sendBack = ekpFundUtil.sendToEKP(socialParam); sendBack = ekpFundUtil.sendToEKP(socialParam);
...@@ -850,4 +883,60 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe ...@@ -850,4 +883,60 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
, "/tsendekperror/inner/saveError", error, Boolean.class, SecurityConstants.FROM_IN); , "/tsendekperror/inner/saveError", error, Boolean.class, SecurityConstants.FROM_IN);
} }
} }
/**
* @param applyNo
* @Description: 从EKP退回薪资表
* @Author: hgw
* @Date: 2022/11/4 17:26
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.Boolean>
**/
public R<String> backSalaryByApplyNo(String applyNo) {
List<TSalaryStandard> salaryList = this.list(Wrappers.<TSalaryStandard>query().lambda().eq(TSalaryStandard::getApplyNo,applyNo));
if (salaryList != null && !salaryList.isEmpty()) {
TSalaryStandard ss = salaryList.get(0);
if (ss.getStatus() != SalaryConstants.STATUS[6]) {
// 通知EKP
EkpSalaryBackParam param = new EkpSalaryBackParam();
param.setFd_3b3c293745e7b4(ss.getDeptName());
param.setFd_3b3c2935c13056(ss.getDeptNo());
param.setFd_3b3c293811c0ee(ss.getApplyNo());
String sendBack = ekpSalaryUtil.backStandardToEKP(param);
if (Common.isEmpty(sendBack) || sendBack.length() != 32) {
sendBack = ekpSalaryUtil.backStandardToEKP(param);
}
if (Common.isNotNull(sendBack) && sendBack.length() == 32) {
// 更新薪资为确认不通过
ss.setStatus(SalaryConstants.STATUS[6]);
ss.setBackTime(new Date());
ss.setBackEkpId(sendBack);
this.updateById(ss);
TIncome income = new TIncome();
income.setApplyNo(applyNo);
// 删除收入对应编号的明细
HttpDaprUtil.invokeMethodPost(socialProperties.getAppUrl(), socialProperties.getAppId()
, "/tincome/inner/deleteIncomeAndDetailByApplyNo", income
, Object.class, SecurityConstants.FROM_IN);
return R.ok();
} else {
TSendEkpError error = new TSendEkpError();
error.setCreateTime(new Date());
error.setCreateDay(DateUtil.getThisDay());
error.setType(CommonConstants.SEVEN_STRING);
error.setCreateUserName(ss.getCreateName());
error.setLinkId(ss.getId());
error.setTitle(sendBack);
error.setNums(CommonConstants.ONE_INT);
HttpDaprUtil.invokeMethodPost(socialProperties.getAppUrl(), socialProperties.getAppId()
, "/tsendekperror/inner/saveError", error, Boolean.class, SecurityConstants.FROM_IN);
return R.failed("连续两次请求EKP,均未接收到EKP删除成功的返回信息,不予退回");
}
} else {
return R.failed("工资表已退回,请不要重复操作");
}
}
return R.failed("未找到工资表");
}
} }
...@@ -553,7 +553,7 @@ ...@@ -553,7 +553,7 @@
,ifnull(ifnull(withholidingPersonSocial.SALARY_MONEY,personalSocial.SALARY_MONEY),'') fd_3adfee1e88723e ,ifnull(ifnull(withholidingPersonSocial.SALARY_MONEY,personalSocial.SALARY_MONEY),'') fd_3adfee1e88723e
,ifnull(ifnull(withholidingUnitFund.SALARY_MONEY,unitFund.SALARY_MONEY),'') fd_3adfee1ee24680 ,ifnull(ifnull(withholidingUnitFund.SALARY_MONEY,unitFund.SALARY_MONEY),'') fd_3adfee1ee24680
,ifnull(ifnull(withholidingPersonFund.SALARY_MONEY,personalFund.SALARY_MONEY),'') fd_3adfee1f32fa24 ,ifnull(ifnull(withholidingPersonFund.SALARY_MONEY,personalFund.SALARY_MONEY),'') fd_3adfee1f32fa24
,ifnull(a.SALARY_TAX,'0') fd_3adfee1f901c46 ,ifnull(a.SALARY_TAX,'0') + ifnull(a.SALARY_TAX_UNIT,'0') + ifnull(a.ANNUAL_BONUS_TAX,'0') fd_3adfee1f901c46
,'' fd_3adfee1ff1ca6a ,'' fd_3adfee1ff1ca6a
,'' fd_3adfee203f86b2 ,'' fd_3adfee203f86b2
,ifnull(a.ACTUAL_SALARY,'0') fd_3adfee20fe5ba4 ,ifnull(a.ACTUAL_SALARY,'0') fd_3adfee20fe5ba4
...@@ -598,6 +598,7 @@ ...@@ -598,6 +598,7 @@
,concat(left(ifnull(a.DEDU_SOCIAL_MONTH,'1970'),4),'-',right(ifnull(a.DEDU_SOCIAL_MONTH,'02'),2)) DEDU_SOCIAL_MONTH ,concat(left(ifnull(a.DEDU_SOCIAL_MONTH,'1970'),4),'-',right(ifnull(a.DEDU_SOCIAL_MONTH,'02'),2)) DEDU_SOCIAL_MONTH
,concat(left(ifnull(a.DEDU_PROVIDENT_MONTH,'1970'),4),'-',right(ifnull(a.DEDU_PROVIDENT_MONTH,'02'),2)) DEDU_PROVIDENT_MONTH ,concat(left(ifnull(a.DEDU_PROVIDENT_MONTH,'1970'),4),'-',right(ifnull(a.DEDU_PROVIDENT_MONTH,'02'),2)) DEDU_PROVIDENT_MONTH
,ifnull(s.BPO_FLAG,'') fd_3b178f0ded2114 ,ifnull(s.BPO_FLAG,'') fd_3b178f0ded2114
,ifnull(s.APPLY_NO,'') fd_3b3bef19b61c38
from t_salary_account a from t_salary_account a
LEFT JOIN t_salary_standard s on a.SALARY_FORM_ID=s.ID LEFT JOIN t_salary_standard s on a.SALARY_FORM_ID=s.ID
left join t_salary_account_item withholidingPersonSocial on withholidingPersonSocial.SALARY_ACCOUNT_ID = a.id and withholidingPersonSocial.JAVA_FIED_NAME='withholidingPersonSocial' left join t_salary_account_item withholidingPersonSocial on withholidingPersonSocial.SALARY_ACCOUNT_ID = a.id and withholidingPersonSocial.JAVA_FIED_NAME='withholidingPersonSocial'
......
...@@ -74,6 +74,7 @@ ...@@ -74,6 +74,7 @@
<result property="repeatRemark" column="REPEAT_REMARK"/> <result property="repeatRemark" column="REPEAT_REMARK"/>
<result property="orderId" column="ORDER_ID"/> <result property="orderId" column="ORDER_ID"/>
<result property="bpoFlag" column="BPO_FLAG"/> <result property="bpoFlag" column="BPO_FLAG"/>
<result property="applyNo" column="APPLY_NO"/>
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
a.ID, a.ID,
...@@ -126,7 +127,8 @@ ...@@ -126,7 +127,8 @@
a.REPEAT_REMARK, a.REPEAT_REMARK,
a.INVOICE_TITLE, a.INVOICE_TITLE,
a.ORDER_ID, a.ORDER_ID,
a.BPO_FLAG a.BPO_FLAG,
a.APPLY_NO
</sql> </sql>
<sql id="tSalaryStandard_where"> <sql id="tSalaryStandard_where">
<if test="tSalaryStandard != null"> <if test="tSalaryStandard != null">
...@@ -232,39 +234,42 @@ ...@@ -232,39 +234,42 @@
<if test="tSalaryStandard.repeatNums != null"> <if test="tSalaryStandard.repeatNums != null">
AND a.REPEAT_NUMS = #{tSalaryStandard.repeatNums} AND a.REPEAT_NUMS = #{tSalaryStandard.repeatNums}
</if> </if>
<if test="tSalaryStandard.ownRemark != null and tSalaryStandard.ownRemark.trim() != ''"> <if test="tSalaryStandard.ownRemark != null and tSalaryStandard.ownRemark.trim() != ''">
AND a.OWN_REMARK = #{tSalaryStandard.ownRemark} AND a.OWN_REMARK = #{tSalaryStandard.ownRemark}
</if> </if>
<if test="tSalaryStandard.submitRemark != null and tSalaryStandard.submitRemark.trim() != ''"> <if test="tSalaryStandard.submitRemark != null and tSalaryStandard.submitRemark.trim() != ''">
AND a.SUBMIT_REMARK = #{tSalaryStandard.submitRemark} AND a.SUBMIT_REMARK = #{tSalaryStandard.submitRemark}
</if> </if>
<if test="tSalaryStandard.createBy != null and tSalaryStandard.createBy.trim() != ''"> <if test="tSalaryStandard.createBy != null and tSalaryStandard.createBy.trim() != ''">
AND a.CREATE_BY = #{tSalaryStandard.createBy} AND a.CREATE_BY = #{tSalaryStandard.createBy}
</if> </if>
<if test="tSalaryStandard.createName != null and tSalaryStandard.createName.trim() != ''"> <if test="tSalaryStandard.createName != null and tSalaryStandard.createName.trim() != ''">
AND a.CREATE_NAME = #{tSalaryStandard.createName} AND a.CREATE_NAME = #{tSalaryStandard.createName}
</if> </if>
<if test="tSalaryStandard.createTime != null"> <if test="tSalaryStandard.createTime != null">
AND a.CREATE_TIME = #{tSalaryStandard.createTime} AND a.CREATE_TIME = #{tSalaryStandard.createTime}
</if> </if>
<if test="tSalaryStandard.updateBy != null and tSalaryStandard.updateBy.trim() != ''"> <if test="tSalaryStandard.updateBy != null and tSalaryStandard.updateBy.trim() != ''">
AND a.UPDATE_BY = #{tSalaryStandard.updateBy} AND a.UPDATE_BY = #{tSalaryStandard.updateBy}
</if> </if>
<if test="tSalaryStandard.updateTime != null"> <if test="tSalaryStandard.updateTime != null">
AND a.UPDATE_TIME = #{tSalaryStandard.updateTime} AND a.UPDATE_TIME = #{tSalaryStandard.updateTime}
</if> </if>
<if test="tSalaryStandard.unitId != null and tSalaryStandard.unitId.trim() != ''"> <if test="tSalaryStandard.unitId != null and tSalaryStandard.unitId.trim() != ''">
AND a.UNIT_ID = #{tSalaryStandard.unitId} AND a.UNIT_ID = #{tSalaryStandard.unitId}
</if> </if>
<if test="tSalaryStandard.unitName != null and tSalaryStandard.unitName.trim() != ''"> <if test="tSalaryStandard.unitName != null and tSalaryStandard.unitName.trim() != ''">
AND a.UNIT_NAME = #{tSalaryStandard.unitName} AND a.UNIT_NAME = #{tSalaryStandard.unitName}
</if> </if>
<if test="tSalaryStandard.unitNo != null and tSalaryStandard.unitNo.trim() != ''"> <if test="tSalaryStandard.unitNo != null and tSalaryStandard.unitNo.trim() != ''">
AND a.UNIT_NO = #{tSalaryStandard.unitNo} AND a.UNIT_NO = #{tSalaryStandard.unitNo}
</if> </if>
<if test="tSalaryStandard.sendMonth != null and tSalaryStandard.sendMonth.trim() != ''"> <if test="tSalaryStandard.sendMonth != null and tSalaryStandard.sendMonth.trim() != ''">
AND a.SEND_MONTH = #{tSalaryStandard.sendMonth} AND a.SEND_MONTH = #{tSalaryStandard.sendMonth}
</if> </if>
<if test="tSalaryStandard.applyNo != null and tSalaryStandard.applyNo.trim() != ''">
AND a.APPLY_NO like concat('%',#{tSalaryStandard.applyNo},'%')
</if>
</if> </if>
</sql> </sql>
<!--tSalaryStandard简单分页查询--> <!--tSalaryStandard简单分页查询-->
...@@ -461,4 +466,10 @@ ...@@ -461,4 +466,10 @@
</if> </if>
</if> </if>
</sql> </sql>
<!-- 获取当日最大的编码 -->
<select id="getMaxSalaryCode" resultType="java.lang.String">
SELECT ifnull(max(right(e.APPLY_NO,4)),0) APPLY_NO FROM t_salary_standard e where e.DELETE_FLAG = 0 and e.CREATE_TIME>DATE_FORMAT(now(),'%Y-%m-%d')
</select>
</mapper> </mapper>
...@@ -222,6 +222,13 @@ public class TIncome{ ...@@ -222,6 +222,13 @@ public class TIncome{
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("发送返回的EKPID") @ExcelProperty("发送返回的EKPID")
private String ekpId; private String ekpId;
/**
* 薪资申请编码
*/
@Schema(description = "薪资申请编码")
private String applyNo;
/** /**
* 菜单ID 获取查询权限使用 * 菜单ID 获取查询权限使用
*/ */
......
...@@ -218,6 +218,12 @@ public class TIncomeDetail { ...@@ -218,6 +218,12 @@ public class TIncomeDetail {
@ExcelProperty("管理费风险金的结算方式:1预估2实缴") @ExcelProperty("管理费风险金的结算方式:1预估2实缴")
private String mrSettleType; private String mrSettleType;
/**
* 薪资申请编码
*/
@Schema(description = "薪资申请编码")
private String applyNo;
// 查询时框定范围使用 // 查询时框定范围使用
@TableField(exist = false) @TableField(exist = false)
private List<String> idCardList; private List<String> idCardList;
......
...@@ -52,7 +52,7 @@ public class TSendEkpError { ...@@ -52,7 +52,7 @@ public class TSendEkpError {
@ExcelAttribute(name = "类型") @ExcelAttribute(name = "类型")
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("类型(0:薪资代扣推送的社保公积金1薪资明细2预估明细3缴费明细4实时收入5定时收入)") @ExcelProperty("类型(0:薪资代扣推送的社保公积金1薪资明细2预估明细3缴费明细4实时收入5定时收入6薪资主表7薪资退表)")
private String type; private String type;
@ExcelAttribute(name = "创建日") @ExcelAttribute(name = "创建日")
......
...@@ -173,4 +173,10 @@ public class TIncomeSearchVo extends BaseEntity implements Serializable { ...@@ -173,4 +173,10 @@ public class TIncomeSearchVo extends BaseEntity implements Serializable {
@Schema(description = "发送返回的EKPID") @Schema(description = "发送返回的EKPID")
private String ekpId; private String ekpId;
/**
* 薪资申请编码
*/
@Schema(description = "薪资申请编码")
private String applyNo;
} }
...@@ -19,6 +19,7 @@ package com.yifu.cloud.plus.v1.yifu.social.controller; ...@@ -19,6 +19,7 @@ package com.yifu.cloud.plus.v1.yifu.social.controller;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
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.common.core.vo.YifuUser; import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
...@@ -181,4 +182,18 @@ public class TIncomeController { ...@@ -181,4 +182,18 @@ public class TIncomeController {
public void pushDetail() { public void pushDetail() {
tIncomeService.pushDetail(); tIncomeService.pushDetail();
} }
/**
* @Description: 查询list(建议传参项目id、月份,一次性获取大批量,自行组装Map来使用)
* @Author: hgw
* @Date: 2022-9-2 15:56:28
**/
@Inner
@PostMapping("/inner/deleteIncomeAndDetailByApplyNo")
public R<String> deleteIncomeAndDetailByApplyNo(@RequestBody TIncome income) {
if (income != null && Common.isNotNull(income.getApplyNo())) {
tIncomeService.deleteIncomeAndDetailByApplyNo(income.getApplyNo());
}
return R.ok();
}
} }
...@@ -53,4 +53,22 @@ public interface TIncomeMapper extends BaseMapper<TIncome> { ...@@ -53,4 +53,22 @@ public interface TIncomeMapper extends BaseMapper<TIncome> {
void updateIncomeById(@Param("list") List<TIncome> list); void updateIncomeById(@Param("list") List<TIncome> list);
/**
* @param applyNo
* @Description: 删除薪资对应的收入明细
* @Author: hgw
* @Date: 2022/11/4 17:04
* @return: int
**/
int deleteIncomeByApplyNo(@Param("applyNo") String applyNo);
/**
* @param applyNo
* @Description: 删除薪资对应的收入明细de明细
* @Author: hgw
* @Date: 2022/11/4 17:04
* @return: int
**/
int deleteIncomeDetailByApplyNo(@Param("applyNo") String applyNo);
} }
...@@ -67,4 +67,13 @@ public interface TIncomeService extends IService<TIncome> { ...@@ -67,4 +67,13 @@ public interface TIncomeService extends IService<TIncome> {
void pushDetail(); void pushDetail();
/**
* @param applyNo
* @Description: 删除薪资关联的收入明细
* @Author: hgw
* @Date: 2022/11/4 17:04
* @return: boolean
**/
void deleteIncomeAndDetailByApplyNo(String applyNo);
} }
...@@ -2603,7 +2603,8 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap ...@@ -2603,7 +2603,8 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
socialParam.setFd_3b01953871b8be(CommonConstants.EMPTY_STRING); socialParam.setFd_3b01953871b8be(CommonConstants.EMPTY_STRING);
//社保id //社保id
socialParam.setFd_3b0afbe1f94a08(library.getId()); socialParam.setFd_3b0afbe1f94a08(library.getId());
// 薪酬申请编号
socialParam.setFd_3b3cab77923f44(CommonConstants.EMPTY_STRING);
String body = ekpSocialUtil.sendToEKP(socialParam); String body = ekpSocialUtil.sendToEKP(socialParam);
if (Common.isNotNull(body) && body.length() == 32) { if (Common.isNotNull(body) && body.length() == 32) {
//更新推送状态为已推送的列表 //更新推送状态为已推送的列表
...@@ -2785,7 +2786,8 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap ...@@ -2785,7 +2786,8 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
fundParam.setFd_3b019a2e9bfdd6(CommonConstants.EMPTY_STRING); fundParam.setFd_3b019a2e9bfdd6(CommonConstants.EMPTY_STRING);
//公积金id //公积金id
fundParam.setFd_3b0afbaf10df2c(library.getId()); fundParam.setFd_3b0afbaf10df2c(library.getId());
// 薪酬申请编号
fundParam.setFd_3b3cabde83d1d0(CommonConstants.EMPTY_STRING);
String body = ekpFundUtil.sendToEKP(fundParam); String body = ekpFundUtil.sendToEKP(fundParam);
if (Common.isNotNull(body) && body.length() == 32) { if (Common.isNotNull(body) && body.length() == 32) {
//更新推送状态为已推送的列表 //更新推送状态为已推送的列表
......
...@@ -749,6 +749,7 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl ...@@ -749,6 +749,7 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
error.setNums(CommonConstants.ONE_INT); error.setNums(CommonConstants.ONE_INT);
tSendEkpErrorService.saveError(error); tSendEkpErrorService.saveError(error);
} }
income.setApplyNo(tIncomeDetail.getApplyNo());
return this.updateById(income); return this.updateById(income);
} }
...@@ -821,6 +822,8 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl ...@@ -821,6 +822,8 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
sendParam.setFd_3aeae58b14691c(""); sendParam.setFd_3aeae58b14691c("");
// 管理费id // 管理费id
sendParam.setFd_3b13dae9bd70f8(income.getId()); sendParam.setFd_3b13dae9bd70f8(income.getId());
// 薪酬申请编号
sendParam.setFd_3b3bf13759b850(income.getApplyNo()==null?"":income.getApplyNo());
} }
private void copyToEkpRisk(TIncome income, EkpIncomeParamRisk sendParam) { private void copyToEkpRisk(TIncome income, EkpIncomeParamRisk sendParam) {
...@@ -884,6 +887,8 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl ...@@ -884,6 +887,8 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
sendParam.setFd_3aeae59b70fe5a(""); sendParam.setFd_3aeae59b70fe5a("");
// 风险金id // 风险金id
sendParam.setFd_3b13dac4c03022(income.getId()); sendParam.setFd_3b13dac4c03022(income.getId());
// 薪酬申请编号
sendParam.setFd_3b3bf0e75ef6c4(income.getApplyNo()==null?"":income.getApplyNo());
} }
/** /**
...@@ -1055,4 +1060,16 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl ...@@ -1055,4 +1060,16 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
return true; return true;
} }
/**
* @param applyNo
* @Description: 删除薪资关联的收入明细
* @Author: hgw
* @Date: 2022/11/4 17:03
* @return: boolean
**/
public void deleteIncomeAndDetailByApplyNo(String applyNo) {
baseMapper.deleteIncomeByApplyNo(applyNo);
baseMapper.deleteIncomeDetailByApplyNo(applyNo);
}
} }
...@@ -2506,7 +2506,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2506,7 +2506,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
socialParam.setFd_3b01953871b8be(CommonConstants.EMPTY_STRING); socialParam.setFd_3b01953871b8be(CommonConstants.EMPTY_STRING);
//社保id //社保id
socialParam.setFd_3b0afbe1f94a08(library.getId()); socialParam.setFd_3b0afbe1f94a08(library.getId());
// 薪酬申请编号
socialParam.setFd_3b3cab77923f44(CommonConstants.EMPTY_STRING);
String body = ekpSocialUtil.sendToEKP(socialParam); String body = ekpSocialUtil.sendToEKP(socialParam);
if (Common.isNotNull(body) && body.length() == 32) { if (Common.isNotNull(body) && body.length() == 32) {
//更新推送状态为已推送的列表 //更新推送状态为已推送的列表
...@@ -2677,7 +2678,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2677,7 +2678,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
fundParam.setFd_3b019a2e9bfdd6(CommonConstants.EMPTY_STRING); fundParam.setFd_3b019a2e9bfdd6(CommonConstants.EMPTY_STRING);
//公积金id //公积金id
fundParam.setFd_3b0afbaf10df2c(library.getId()); fundParam.setFd_3b0afbaf10df2c(library.getId());
// 薪酬申请编号
fundParam.setFd_3b3cabde83d1d0(CommonConstants.EMPTY_STRING);
String body = ekpFundUtil.sendToEKP(fundParam); String body = ekpFundUtil.sendToEKP(fundParam);
if (Common.isNotNull(body) && body.length() == 32) { if (Common.isNotNull(body) && body.length() == 32) {
//更新推送状态为已推送的列表 //更新推送状态为已推送的列表
......
...@@ -45,6 +45,7 @@ ...@@ -45,6 +45,7 @@
<result property="sourceId" column="SOURCE_ID"/> <result property="sourceId" column="SOURCE_ID"/>
<result property="redData" column="RED_DATA"/> <result property="redData" column="RED_DATA"/>
<result property="mrSettleType" column="MR_SETTLE_TYPE"/> <result property="mrSettleType" column="MR_SETTLE_TYPE"/>
<result property="applyNo" column="APPLY_NO"/>
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
a.ID, a.ID,
...@@ -67,7 +68,8 @@ ...@@ -67,7 +68,8 @@
a.DATA_CREATE_MONTH, a.DATA_CREATE_MONTH,
a.SOURCE_ID, a.SOURCE_ID,
a.RED_DATA, a.RED_DATA,
a.MR_SETTLE_TYPE a.MR_SETTLE_TYPE,
a.APPLY_NO
</sql> </sql>
<sql id="tIncomeDetail_where"> <sql id="tIncomeDetail_where">
<if test="tIncomeDetail != null"> <if test="tIncomeDetail != null">
...@@ -131,6 +133,9 @@ ...@@ -131,6 +133,9 @@
<if test="tIncomeDetail.redData != null and tIncomeDetail.redData.trim() != ''"> <if test="tIncomeDetail.redData != null and tIncomeDetail.redData.trim() != ''">
AND a.RED_DATA = #{tIncomeDetail.redData} AND a.RED_DATA = #{tIncomeDetail.redData}
</if> </if>
<if test="tIncomeDetail.applyNo != null and tIncomeDetail.applyNo.trim() != ''">
AND a.APPLY_NO = #{tIncomeDetail.applyNo}
</if>
<if test="tIncomeDetail.idCardList != null and tIncomeDetail.idCardList.size() > 0"> <if test="tIncomeDetail.idCardList != null and tIncomeDetail.idCardList.size() > 0">
AND a.EMP_IDCARD in AND a.EMP_IDCARD in
<foreach item="item" index="index" collection="tIncomeDetail.idCardList" open="(" separator="," close=")"> <foreach item="item" index="index" collection="tIncomeDetail.idCardList" open="(" separator="," close=")">
......
...@@ -48,6 +48,7 @@ ...@@ -48,6 +48,7 @@
<result property="sendTime" column="SEND_TIME"/> <result property="sendTime" column="SEND_TIME"/>
<result property="sendMonth" column="SEND_MONTH"/> <result property="sendMonth" column="SEND_MONTH"/>
<result property="ekpId" column="EKP_ID"/> <result property="ekpId" column="EKP_ID"/>
<result property="applyNo" column="APPLY_NO"/>
</resultMap> </resultMap>
<resultMap id="incomeExportMap" type="com.yifu.cloud.plus.v1.yifu.social.vo.IncomeExportVo"> <resultMap id="incomeExportMap" type="com.yifu.cloud.plus.v1.yifu.social.vo.IncomeExportVo">
<result property="empName" column="EMP_NAME"/> <result property="empName" column="EMP_NAME"/>
...@@ -87,7 +88,8 @@ ...@@ -87,7 +88,8 @@
a.RED_DATA, a.RED_DATA,
a.SEND_STATUS, a.SEND_STATUS,
a.SEND_TIME, a.SEND_TIME,
a.SEND_MONTH a.SEND_MONTH,
a.APPLY_NO
</sql> </sql>
<sql id="tIncome_where"> <sql id="tIncome_where">
<if test="tIncome != null"> <if test="tIncome != null">
...@@ -148,6 +150,9 @@ ...@@ -148,6 +150,9 @@
<if test="tIncome.redData != null and tIncome.redData.trim() != ''"> <if test="tIncome.redData != null and tIncome.redData.trim() != ''">
AND a.RED_DATA = #{tIncome.redData} AND a.RED_DATA = #{tIncome.redData}
</if> </if>
<if test="tIncome.applyNo != null and tIncome.applyNo.trim() != ''">
AND a.APPLY_NO = #{tIncome.applyNo}
</if>
<if test="tIncome.authSql != null and tIncome.authSql.trim() != ''"> <if test="tIncome.authSql != null and tIncome.authSql.trim() != ''">
${tIncome.authSql} ${tIncome.authSql}
</if> </if>
...@@ -256,4 +261,11 @@ ...@@ -256,4 +261,11 @@
ID=#{i.id} ID=#{i.id}
</foreach> </foreach>
</update> </update>
<delete id="deleteIncomeByApplyNo">
delete from t_income_detail where APPLY_NO = #{applyNo}
</delete>
<delete id="deleteIncomeDetailByApplyNo">
delete from t_income where APPLY_NO = #{applyNo}
</delete>
</mapper> </mapper>
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