Commit 851d9160 authored by hongguangwu's avatar hongguangwu

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

parents a4303810 d678b65d
......@@ -110,7 +110,7 @@ public class FileUploadController {
}
for (TAttaInfo atta:attas){
URL url = ossUtil.getObjectUrl(null, atta.getAttaSrc());
atta.setAttaUrl(url.toString());
atta.setAttaUrl(url.toString().replace("http","https"));
}
return new R<>(attas);
}
......
......@@ -116,11 +116,12 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
UpdateSocialFoundVo updateSocialFoundVo = new UpdateSocialFoundVo();
updateSocialFoundVo.setEmpIdcard(tEmpChangeInfo.getEmpIdcard());
updateSocialFoundVo.setSettleDomainCode(tEmpChangeInfo.getDeptNo());
updateSocialFoundVo.setSettleDomainId(tEmpChangeInfo.getDeptId());
updateSocialFoundVo.setUnitId(tEmpChangeInfo.getUnitId());
updateSocialFoundVo.setUnitName(tEmpChangeInfo.getNewDept());
updateSocialFoundVo.setEmpIdcard(updateTEmployeeProject.getEmpIdcard());
updateSocialFoundVo.setSettleDomainCode(updateTEmployeeProject.getDeptNo());
updateSocialFoundVo.setSettleDomainId(updateTEmployeeProject.getDeptId());
updateSocialFoundVo.setSettleDomainName(updateTEmployeeProject.getDeptName());
updateSocialFoundVo.setUnitId(updateTEmployeeProject.getUnitId());
updateSocialFoundVo.setUnitName(updateTEmployeeProject.getUnitName());
updateSocialFoundVo.setSocialCreateMonth(tEmpChangeInfo.getChangeStartMonth());
socialDaprUtils.updatePaymentSocialAndFound(updateSocialFoundVo);
socialDaprUtils.updateForSocialAndFound(updateSocialFoundVo);
......@@ -244,6 +245,7 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
updateSocialFoundVo.setSettleDomainId(tEmployeeProject.getDeptId());
updateSocialFoundVo.setUnitId(tEmployeeProject.getUnitId());
updateSocialFoundVo.setUnitName(tEmployeeProject.getUnitName());
updateSocialFoundVo.setSettleDomainName(tEmployeeProject.getDeptName());
updateSocialFoundVo.setSocialCreateMonth(tEmployeeProject.getChangeStartMonth());
socialDaprUtils.updatePaymentSocialAndFound(updateSocialFoundVo);
socialDaprUtils.updateForSocialAndFound(updateSocialFoundVo);
......
......@@ -67,7 +67,7 @@ public class ValidityConstants {
/** 最多60位 规则 */
public static final String PATTERN_60 = "^.{1,60}$";
/** 最多200位 规则 */
public static final String PATTERN_200 = "^.{1,200}$";
public static final String PATTERN_200 = "[\\s\\S]{1,200}$";
/** 不超过两位小数的正数 */
public static final String POSITIVE_INTEGER_PATTERN_TWO_FLOAT = "^[+]?([0-9]+(.[0-9]{1,2})?)$";
......
......@@ -64,7 +64,7 @@ public class SocialDaprUtils {
* @return
**/
public void updateForSocialAndFound(UpdateSocialFoundVo infoVo) {
HttpDaprUtil.invokeMethodPost(daprProperties.getAppUrl(),daprProperties.getAppId(),"/tpaymentinfo/inner/updateForSocialAndFound", JSON.toJSONString(infoVo), UpdateSocialFoundVo.class, SecurityConstants.FROM_IN);
HttpDaprUtil.invokeMethodPost(daprProperties.getAppUrl(),daprProperties.getAppId(),"/tforecastlibrary/inner/updateForSocialAndFound", JSON.toJSONString(infoVo), UpdateSocialFoundVo.class, SecurityConstants.FROM_IN);
}
/**
......
......@@ -37,5 +37,10 @@
<version>1.0.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.6</version>
</dependency>
</dependencies>
</project>
package com.yifu.cloud.plus.v1.yifu.ekp.config;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;
/**
* @author licancan
* @description 对接ekp订单
* @date 2022-08-31 15:35:20
*/
@Data
@Component
@PropertySource("classpath:ekpOrderConfig.properties")
@ConfigurationProperties(value = "ekporder",ignoreInvalidFields = false)
public class EkpOrderProperties {
/**
* 接口url
*/
String url;
/**
* 订单modelId
*/
String orderFdModelId;
/**
* 订单flowID
*/
String orderFdFlowId;
/**
* 订单回复modelId
*/
String replyFdModelId;
/**
* 订单回复flowID
*/
String replyFdFlowId;
/**
* 订单附件key
*/
String replyAttachKey;
String docStatus;
String LoginName;
/**
* 描述:用于项目订单更新接口
*/
String orderDocSubject;
/**
* 描述:用于订单回复接口
*/
String replyDocSubject;
}
package com.yifu.cloud.plus.v1.yifu.ekp.util;
import com.yifu.cloud.plus.v1.yifu.ekp.config.EkpOrderProperties;
import com.yifu.cloud.plus.v1.yifu.ekp.constant.EkpConstants;
import com.yifu.cloud.plus.v1.yifu.ekp.vo.AttachmentForm;
import com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpOrderParam;
import com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpOrderReplyParam;
import io.micrometer.core.instrument.util.StringUtils;
import lombok.extern.log4j.Log4j2;
import org.apache.commons.io.FileUtils;
import org.apache.commons.lang.ArrayUtils;
import org.codehaus.jackson.map.ObjectMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.http.*;
import org.springframework.util.LinkedMultiValueMap;
import org.springframework.util.MultiValueMap;
import org.springframework.web.client.RestTemplate;
import org.springframework.web.multipart.MultipartFile;
import javax.activation.DataHandler;
import javax.activation.DataSource;
import javax.activation.FileDataSource;
import java.io.File;
import java.util.ArrayList;
import java.util.List;
/**
* @author licancan
* @description 对接ekp订单
* @date 2022-08-31 15:35:20
*/
@Log4j2
@EnableConfigurationProperties(EkpOrderProperties.class)
public class EkpOrderUtil {
@Autowired
private EkpOrderProperties ekpProperties;
/**
* 更新订单状态
*
* @author licancan
* @param param
* @return {@link String}
*/
public String sendOrderToEKP(EkpOrderParam param){
log.info("推送EKP开始--订单状态");
RestTemplate yourRestTemplate = new RestTemplate();
try{
String formValues = new ObjectMapper().writeValueAsString(param);
//指向EKP的接口url
//把ModelingAppModelParameterAddForm转换成MultiValueMap
MultiValueMap<String,Object> wholeForm = new LinkedMultiValueMap<>();
wholeForm.add("docSubject",ekpProperties.getOrderDocSubject());
wholeForm.add("docCreator", "{\"LoginName\":\"admin\"}");
wholeForm.add("docStatus", ekpProperties.getDocStatus());
wholeForm.add("fdModelId", ekpProperties.getOrderFdModelId());
wholeForm.add("fdFlowId", ekpProperties.getOrderFdFlowId());
wholeForm.add("formValues", formValues);
log.info("wholeForm:" + wholeForm);
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<MultiValueMap<String,Object>>(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 null;
}else{
log.info(EkpConstants.SEND_SUCCESS + body);
return body;
}
}catch (Exception e){
log.error(e);
return null;
}
}
/**
* 推送订单回复
*
* @author licancan
* @param param
* @return {@link String}
*/
public String sendReplyToEKP(EkpOrderReplyParam param, MultipartFile[] multipartFiles){
log.info("推送EKP开始--订单回复信息");
RestTemplate yourRestTemplate = new RestTemplate();
List<AttachmentForm> fileList = createAllAttach(multipartFiles);
try{
String formValues = new ObjectMapper().writeValueAsString(param);
//指向EKP的接口url
//把ModelingAppModelParameterAddForm转换成MultiValueMap
MultiValueMap<String,Object> wholeForm = new LinkedMultiValueMap<>();
wholeForm.add("docSubject",ekpProperties.getReplyDocSubject());
wholeForm.add("docCreator", "{\"LoginName\":\"admin\"}");
wholeForm.add("docStatus", ekpProperties.getDocStatus());
wholeForm.add("fdModelId", ekpProperties.getReplyFdModelId());
wholeForm.add("fdFlowId", ekpProperties.getReplyFdFlowId());
wholeForm.add("formValues", formValues);
wholeForm.add("attachmentForms", fileList);
log.info("wholeForm:" + wholeForm);
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<MultiValueMap<String,Object>>(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 null;
}else{
log.info(EkpConstants.SEND_SUCCESS + body);
return body;
}
}catch (Exception e){
log.error(e);
return null;
}finally {
//将产生的临时附件删除,这里的fileList没值得话是[],不会是null,如果是null需要做判空处理
fileList.stream().forEach(e -> {
FileDataSource dataSource = (FileDataSource)e.getFdAttachment().getDataSource();
boolean delete = dataSource.getFile().delete();
log.info("临时附件删除结果:",delete);
});
}
}
/**
* 处理成ekp要的附件格式
*
* @author licancan
* @param multipartFiles
* @return {@link List<AttachmentForm>}
*/
public List<AttachmentForm> createAllAttach(MultipartFile[] multipartFiles){
List<AttachmentForm> attForms = new ArrayList<>();
if (ArrayUtils.isNotEmpty(multipartFiles)){
try {
for (MultipartFile multipartFile : multipartFiles) {
AttachmentForm attForm = new AttachmentForm();
//设置附件关键字,注意附件列表的key是一样的
attForm.setFdKey(ekpProperties.getReplyAttachKey());
attForm.setFdFileName(multipartFile.getOriginalFilename());
File file = new File(multipartFile.getOriginalFilename());
FileUtils.copyInputStreamToFile(multipartFile.getInputStream(), file);
DataSource dataSource = new FileDataSource(file);
DataHandler dataHandler = new DataHandler(dataSource);
attForm.setFdAttachment(dataHandler);
attForms.add(attForm);
}
}catch (Exception e){
log.error("createAllAttach--->error:",e);
}
}
return attForms;
}
}
package com.yifu.cloud.plus.v1.yifu.ekp.vo;
import lombok.Data;
import javax.activation.DataHandler;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlMimeType;
/**
* @author licancan
* @description ekp附件类
* @date 2022-08-31 17:02:49
*/
@XmlAccessorType(XmlAccessType.FIELD)
@Data
public class AttachmentForm {
private String fdKey;
private String fdFileName;
@XmlMimeType("application/octet-stream")
private DataHandler fdAttachment;
}
package com.yifu.cloud.plus.v1.yifu.ekp.vo;
import lombok.Data;
import java.io.Serializable;
/**
* @author licancan
* @description 对接ekp订单请求参数
* @date 2022-08-31 15:35:20
*/
@Data
public class EkpOrderParam implements Serializable {
private static final long serialVersionUID = 8276721461475968927L;
/**
* 订单编号
**/
private String fd_3b0b02a93e9cda;
/**
* 订单状态 待处理,处理中,已办结
**/
private String fd_3b0b02a34a0134;
}
package com.yifu.cloud.plus.v1.yifu.ekp.vo;
import lombok.Data;
import java.io.Serializable;
/**
* @author licancan
* @description 对接ekp订单回复请求参数
* @date 2022-08-31 15:35:20
*/
@Data
public class EkpOrderReplyParam implements Serializable {
private static final long serialVersionUID = 8671347855651484998L;
/**
* 订单编号
**/
private String fd_3ac904bbaf972a;
/**
* 回复人 (人员账号)
**/
private String fd_3ac904badcaa06;
/**
* 回复时间
**/
private String fd_3ac904b8590598;
/**
* 回复内容
*/
private String fd_3ac904c7798e5c;
}
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
com.yifu.cloud.plus.v1.yifu.ekp.util.EkpOrderUtil,\
com.yifu.cloud.plus.v1.yifu.ekp.util.EkpInsuranceUtil,\
com.yifu.cloud.plus.v1.yifu.ekp.util.EkpSalaryUtil,\
com.yifu.cloud.plus.v1.yifu.ekp.util.EkpSocialUtil,\
......
ekporder.url=http://119.96.227.251:8080/api/sys-modeling/appModelRestService/addModel
ekporder.orderFdModelId=182f1b7ffe2e96f975564e44e559847d
ekporder.orderFdFlowId=182f1c098ce991ca96bc927408792beb
ekporder.replyFdModelId=182f1bb35bb2156fb9a02904bc88dd8a
ekporder.replyFdFlowId=182f1c3d6f5724e335b88d544be8c993
ekporder.replyAttachKey=fd_3ac904c9342fe2
ekporder.docStatus=20
ekporder.LoginName=admin
ekporder.orderDocSubject=\u7528\u4e8e\u9879\u76ee\u8ba2\u5355\u66f4\u65b0\u63a5\u53e3
ekporder.replyDocSubject=\u7528\u4e8e\u8ba2\u5355\u56de\u590d\u63a5\u53e3
......@@ -42,6 +42,10 @@ public class OrderConstants {
* 订单不存在
*/
public static final String ORDER_NO_NOT_EXIST = "订单不存在";
/**
* 订单已办结,无法添加回复
*/
public static final String ORDER_STATUS_IS_TWO = "订单已办结,无法添加回复";
/**
* 订单已存在
*/
......
......@@ -65,6 +65,12 @@
<artifactId>commons-collections</artifactId>
<version>3.2.2</version>
</dependency>
<dependency>
<groupId>com.yifu.cloud.plus.v1</groupId>
<artifactId>yifu-common-ekp</artifactId>
<version>1.0.0</version>
<scope>compile</scope>
</dependency>
</dependencies>
<build>
......
......@@ -10,6 +10,9 @@ 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.vo.YifuUser;
import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
import com.yifu.cloud.plus.v1.yifu.ekp.util.EkpOrderUtil;
import com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpOrderParam;
import com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpOrderReplyParam;
import com.yifu.cloud.plus.v1.yifu.order.constants.OrderConstants;
import com.yifu.cloud.plus.v1.yifu.order.entity.TOrder;
import com.yifu.cloud.plus.v1.yifu.order.entity.TOrderEnclosure;
......@@ -56,6 +59,8 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
private TOrderHandlerService tOrderHandlerService;
@Resource
private OSSUtil ossUtil;
@Resource
private EkpOrderUtil ekpOrderUtil;
/**
* 订单列表分页查询
......@@ -120,10 +125,39 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
byId.setUpdateName(user.getNickname());
byId.setUpdateTime(LocalDateTime.now());
this.updateById(byId);
// todo 如果是办结完成同步给ekp
// 状态同步给ekp
EkpOrderParam param = new EkpOrderParam();
param.setFd_3b0b02a93e9cda(byId.getOrderNo());
param.setFd_3b0b02a34a0134(getOrderStatus(status));
//ekpOrderUtil.sendOrderToEKP(param);
return R.ok(OrderConstants.OPERATE_SUCCESS);
}
/**
* 获取订单状态
*
* @author licancan
* @param orderStatus
* @return {@link String}
*/
private String getOrderStatus(Integer orderStatus){
String result;
switch (orderStatus){
case 0:
result = "待处理";
break;
case 1:
result = "处理中";
break;
case 2:
result = "已办结";
break;
default:
result = "";
}
return result;
}
/**
* 通过id查询详情
*
......@@ -200,6 +234,10 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
);
if (!Optional.ofNullable(one).isPresent()){
return R.failed(OrderConstants.ORDER_NO_NOT_EXIST);
}else {
if (CommonConstants.TWO_INT == one.getOrderStatus()){
return R.failed(OrderConstants.ORDER_STATUS_IS_TWO);
}
}
if (Common.isEmpty(replyContent) && ArrayUtils.isEmpty(file)){
return R.failed(OrderConstants.REPLY_CONTENT_AND_ENCLOSURE_IS_EMPTY);
......@@ -231,7 +269,13 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
reply.setCreateTime(LocalDateTime.now());
reply.setDeleteFlag(CommonConstants.ZERO_INT);
boolean save = tOrderReplyService.save(reply);
//todo 同步推送ekp
//同步推送ekp
EkpOrderReplyParam param = new EkpOrderReplyParam();
param.setFd_3ac904bbaf972a(orderNo);
param.setFd_3ac904badcaa06(user.getUsername());
param.setFd_3ac904b8590598(reply.getCreateTime().toString());
param.setFd_3ac904c7798e5c(replyContent);
//ekpOrderUtil.sendReplyToEKP(param,file);
if (save && ArrayUtils.isNotEmpty(file)){
for (MultipartFile multipartFile : file) {
String fileName = System.currentTimeMillis() + "_" + multipartFile.getOriginalFilename();
......@@ -408,6 +452,10 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
);
if (!Optional.ofNullable(one).isPresent()){
return R.failed(OrderConstants.ORDER_NO_NOT_EXIST);
}else {
if (CommonConstants.TWO_INT == one.getOrderStatus()){
return R.failed(OrderConstants.ORDER_STATUS_IS_TWO);
}
}
if (Common.isEmpty(vo.getCreateName())){
return R.failed(OrderConstants.REPLY_NAME_IS_EMPTY);
......
......@@ -117,7 +117,7 @@ public class TSalaryAttaController {
return R.failed("无对应附件信息");
}
URL url = ossUtil.getObjectUrl(null, salaryAtta.getAttaSrc());
salaryAtta.setAttaUrl(url.toString());
salaryAtta.setAttaUrl(url.toString().replace("http","https"));
return new R<>(salaryAtta);
}
......
......@@ -150,14 +150,6 @@ public class THaveSalaryNosocialServiceImpl extends ServiceImpl<THaveSalaryNosoc
for (TSettleDomainSelectVo selectVo : domainListVoR.getData().getListSelectVO()) {
settleDomainSelectVoMap.put(selectVo.getId(),selectVo);
}
//其获取所有用户
R<AllUserNaVo> allUserVoR = upmsDaprUtils.getAllUserName();
Map<String,String> allUserDTOMap=Maps.newHashMap();
if (Common.isNotNull(allUserVoR)
&& Common.isNotNull(allUserVoR.getData())
&& Common.isNotNull(allUserVoR.getData().getUserNames())){
allUserDTOMap = allUserVoR.getData().getUserNames();
}
for (THaveSalaryNosocial haveSalaryNosocial : haveSalaryNosocialList) {
// 有工资无社保 薪酬人员查询 表单类型为薪资的 连续3个月有发薪记录 但是这三个月都没有社保缴费记录
if (empPaymentInfoMap.get(haveSalaryNosocial.getEmployeeIdCard()) != null) {
......@@ -168,10 +160,6 @@ public class THaveSalaryNosocialServiceImpl extends ServiceImpl<THaveSalaryNosoc
TSettleDomainSelectVo selectVo = settleDomainSelectVoMap.get(haveSalaryNosocial.getSettleDomainId());
haveSalaryNosocial.setCustomerId(selectVo!=null?selectVo.getCustomerId():null);
haveSalaryNosocial.setCustomerName(selectVo!=null?selectVo.getCustomerName():null);
//塞创建人数据
if(haveSalaryNosocial.getCreateBy()!=null) {
haveSalaryNosocial.setCreateBy(allUserDTOMap.get(haveSalaryNosocial.getCreateBy()));
}
haveSalaryNosocial.setCreateTime(LocalDateTime.now());
haveSalaryNosocial.setCreateMonth(salaryMonth);
this.save(haveSalaryNosocial);
......
......@@ -119,6 +119,9 @@ public class TSpecialDeducationSumServiceImpl extends ServiceImpl<TSpecialDeduca
.replace("/","")
.replace("-",""));
if (Common.isNotNull(yearMonth)) {
if (!Common.isNumber(yearMonth) || yearMonth.length() != CommonConstants.SIX_INT){
return R.failed("日期格式有误:" + yearMonth + ",不允许导入");
}
if (!yearMonth.equals(nowYearMonth)) {
return R.failed("所得期间-不是当前年月:" + nowYearMonth + ",不允许导入");
}
......
......@@ -95,6 +95,7 @@
a.month,
a.relay_salary,
a.CREATE_NAME,
a.CREATE_BY,
a.feed_back,a.reason_type
FROM t_have_salary_nosocial a
<include refid="querPage"/>
......
......@@ -106,5 +106,6 @@
WHERE s.DELETE_FLAG = '0' AND b.max_day = s.CREATE_TIME
AND s.EMP_IDCARD = b.EMP_IDCARD AND s.INVOICE_TITLE = b.INVOICE_TITLE
AND s.SETTLEMENT_MONTH = b.SETTLEMENT_MONTH) c
GROUP BY c.EMP_IDCARD,c.INVOICE_TITLE,c.SETTLEMENT_MONTH
</select>
</mapper>
......@@ -80,7 +80,6 @@
1=1
<include refid="tStatisticsRemuneration_where"/>
</where>
group by a.EMP_IDCARD,a.DECLARE_MONTH,a.EMP_NAME
order by a.DECLARE_MONTH desc
</select>
......
......@@ -532,12 +532,12 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
// 插入社保信息并封装社保公积金查询信息
if (Common.isNotNull(socialsMap)){
social = socialsMap.get(excel.getEmpIdcard());
insertSocial(emp, social);
insertSocial(emp, social,project);
}
// 插入公积金信息并封装社保公积金查询信息
if (Common.isNotNull(fundsMap)){
fund = fundsMap.get(excel.getEmpIdcard());
insertFund(emp, fund);
insertFund(emp, fund,project);
}
// 插入派单信息
if (Common.isNotNull(dispatchMap)){
......@@ -615,22 +615,26 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
}
}
private void insertSocial(EmpAddDispatchVo emp, TSocialInfo social) {
private void insertSocial(EmpAddDispatchVo emp, TSocialInfo social, EmpProjectDispatchVo project) {
if (Common.isNotNull(social) && Common.isEmpty(social.getId())){
if (Common.isNotNull(emp)){
social.setEmpNo(emp.getEmpCode());
social.setEmpId(emp.getId());
}
if (Common.isNotNull(project)){
social.setEmpNo(project.getEmpNo());
}
socialMapper.insert(social);
}
}
private void insertFund(EmpAddDispatchVo emp, TProvidentFund fund) {
private void insertFund(EmpAddDispatchVo emp, TProvidentFund fund, EmpProjectDispatchVo project) {
if (Common.isNotNull(fund) && Common.isEmpty(fund.getId())){
if (Common.isNotNull(emp)){
fund.setEmpNo(emp.getEmpCode());
fund.setEmpId(emp.getId());
}
if (Common.isNotNull(project)){
fund.setEmpNo(project.getEmpNo());
}
fundMapper.insert(fund);
}
}
......
......@@ -1093,8 +1093,9 @@
SETTLE_DOMAIN_CODE = #{infoVo.settleDomainCode},
SETTLE_DOMAIN_ID = #{infoVo.settleDomainId}
where
(SALARY_SOCIAL_FLAG = '0' or SALARY_FUND_FLAG = '0') and PUSH_STATUS = '1' and EMP_IDCARD = #{infoVo.empIdcard}
and (SOCIAL_CREATE_MONTH >= #{infoVo.socialCreateMonth} or PROVIDENT_CREATE_MONTH >= #{infoVo.socialCreateMonth})
(SALARY_SOCIAL_FLAG = '0' and SOCIAL_CREATE_MONTH >= #{infoVo.socialCreateMonth}) or
(SALARY_FUND_FLAG = '0' and PROVIDENT_CREATE_MONTH >= #{infoVo.socialCreateMonth})
and PUSH_STATUS = '1' and EMP_IDCARD = #{infoVo.empIdcard}
</update>
<!-- 更改社保推送结算状态 -->
......
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