Commit 79aad3bb authored by fangxinjiang's avatar fangxinjiang

Merge remote-tracking branch 'origin/MVP1.5.5' into MVP1.5.5

parents fabb6caa b31564da
......@@ -50,22 +50,22 @@ public class TWorkHandlerInfo {
@Schema(description = "主键")
private String id;
/**
* 结算主体编码
* 项目编码
*/
@ExcelAttribute(name = "结算主体编码", isNotEmpty = true, errorInfo = "结算主体编码不能为空", maxLength = 32)
@NotBlank(message = "结算主体编码不能为空")
@Length(max = 32, message = "结算主体编码不能超过32个字符")
@ExcelProperty("结算主体编码")
@Schema(description = "结算主体编码")
@ExcelAttribute(name = "项目编码", isNotEmpty = true, errorInfo = "项目编码不能为空", maxLength = 32)
@NotBlank(message = "项目编码不能为空")
@Length(max = 32, message = "项目编码不能超过32个字符")
@ExcelProperty("项目编码")
@Schema(description = "项目编码")
private String departNo;
/**
* 结算主体名称
* 项目名称
*/
@ExcelAttribute(name = "结算主体名称", isNotEmpty = true, errorInfo = "结算主体名称不能为空", maxLength = 50)
@NotBlank(message = "结算主体名称不能为空")
@Length(max = 50, message = "结算主体名称不能超过50个字符")
@ExcelProperty("结算主体名称")
@Schema(description = "结算主体名称")
@ExcelAttribute(name = "项目名称", isNotEmpty = true, errorInfo = "项目名称不能为空", maxLength = 50)
@NotBlank(message = "项目名称不能为空")
@Length(max = 50, message = "项目名称不能超过50个字符")
@ExcelProperty("项目名称")
@Schema(description = "项目名称")
private String departName;
/**
* 员工姓名
......@@ -138,5 +138,11 @@ public class TWorkHandlerInfo {
@ExcelProperty("原因")
@Schema(description = "原因")
private String reason;
/**
* 明细id
*/
@ExcelAttribute(name = "明细id",isExport = false)
@Schema(description = "明细id")
private String detailId;
}
package com.yifu.cloud.plus.v1.yifu.archives.vo;
import lombok.Data;
import java.io.Serializable;
/**
* @Author huyc
* @Date 2023/6/25
* @Description
*/
@Data
public class InsertWorkHandlerVo implements Serializable {
/**
* 项目编码
*/
String departNo;
/**
* 项目名称
*/
String departName;
/**
* 员工姓名
*/
private String empName;
/**
* 员工身份证
*/
String empIdcard;
/**
* 操作人
*/
String operUser;
/**
* 明细id
*/
String detailId;
}
......@@ -48,4 +48,7 @@ public class UpProjectSocialFundVo implements Serializable {
String changeContractAndEmployee;
String userName;
String userId;
String empName;
String deptName;
String detailId;
}
......@@ -22,7 +22,9 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TWorkHandlerInfo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TWorkHandlerInfoSearchVo;
import com.yifu.cloud.plus.v1.yifu.archives.service.TWorkHandlerInfoService;
import com.yifu.cloud.plus.v1.yifu.archives.vo.InsertWorkHandlerVo;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.security.annotation.Inner;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
......@@ -84,4 +86,16 @@ public class TWorkHandlerInfoController {
public void export(HttpServletResponse response, @RequestBody TWorkHandlerInfoSearchVo searchVo) {
tWorkHandlerInfoService.listExport(response, searchVo);
}
/**
* 新增任务处理表
* @author huyc
* @date 2023-06-25 12:18:28
**/
@Operation(description = "新增任务处理表)")
@Inner
@PostMapping("/inner/insertWorkHandler")
public Boolean insertWorkHandler(@RequestBody InsertWorkHandlerVo vo) {
return tWorkHandlerInfoService.insertWorkHandler(vo);
}
}
......@@ -22,6 +22,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TWorkHandlerInfo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TWorkHandlerInfoSearchVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.InsertWorkHandlerVo;
import javax.servlet.http.HttpServletResponse;
......@@ -40,4 +41,6 @@ public interface TWorkHandlerInfoService extends IService<TWorkHandlerInfo> {
IPage<TWorkHandlerInfo> getTWorkHandlerInfoPage(Page<TWorkHandlerInfo> page, TWorkHandlerInfoSearchVo tWorkHandlerInfo);
void listExport(HttpServletResponse response, TWorkHandlerInfoSearchVo searchVo);
Boolean insertWorkHandler(InsertWorkHandlerVo vo);
}
......@@ -488,6 +488,22 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
tEmployeeContractInfo.setApplyNo(code);
}
baseMapper.insert(tEmployeeContractInfo);
//如果是否同步终止合同、减项、减档为是则生成同步任务处理清单
//增加任务处理情况查询表数据
if (Common.isNotNull(tEmployeeContractInfo.getChangeContractAndEmployee())
&& CommonConstants.ZERO_STRING.equals(tEmployeeContractInfo.getChangeContractAndEmployee())) {
TWorkHandlerInfo handlerInfo = new TWorkHandlerInfo();
handlerInfo.setEmpIdcard(tEmployeeContractInfo.getEmpIdcard());
handlerInfo.setEmpName(tEmployeeContractInfo.getEmpName());
handlerInfo.setDepartName(tEmployeeContractInfo.getSubjectDepart());
handlerInfo.setDepartNo(tEmployeeContractInfo.getDeptNo());
handlerInfo.setInfoFrom("合同终止");
handlerInfo.setOperUser(user.getNickname());
handlerInfo.setOperTime(LocalDateTime.now());
handlerInfo.setDetailId(tEmployeeContractInfo.getId());
handlerInfo.setOperResult(CommonConstants.ZERO_STRING);
workHandlerInfoService.save(handlerInfo);
}
if (Common.isNotNull(tEmployeeContractInfo.getAttaList()) && Common.isNotNull(tEmployeeContractInfo.getId())) {
this.updateFileMainId(tEmployeeContractInfo);
}
......@@ -727,6 +743,7 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
} else {
//是否同步终止合同、减项、减档为是的时候 单独写逻辑
if (EmployeeConstants.SITUATION_SEVEN.equals(contractInfo.getSituation())
&& Common.isNotNull(contractInfo.getChangeContractAndEmployee())
&& CommonConstants.ZERO_STRING.equals(contractInfo.getChangeContractAndEmployee())) {
//同步任务处理清单执行详情
StringBuilder workInfo = new StringBuilder();
......@@ -805,19 +822,16 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
}
}
}
//增加任务处理情况查询表数据
TWorkHandlerInfo handlerInfo = new TWorkHandlerInfo();
handlerInfo.setEmpIdcard(contractInfo.getEmpIdcard());
handlerInfo.setEmpName(contractInfo.getEmpName());
handlerInfo.setDepartName(contractInfo.getSubjectDepart());
handlerInfo.setDepartNo(contractInfo.getDeptNo());
handlerInfo.setInfoFrom("合同终止");
handlerInfo.setOperInfo(workInfo.substring(0,workInfo.length()-1));
handlerInfo.setReason(failueInfo.length() > 1 ? failueInfo.toString() : "");
handlerInfo.setOperResult(failueInfo.length() > 1 ? "1" :"2");
handlerInfo.setOperUser(user.getNickname());
handlerInfo.setOperTime(LocalDateTime.now());
workHandlerInfoService.save(handlerInfo);
//更新任务处理情况数据
TWorkHandlerInfo handlerInfo = workHandlerInfoService.getOne(Wrappers.<TWorkHandlerInfo>query()
.lambda().eq(TWorkHandlerInfo::getDetailId, contractInfo.getId())
.last(CommonConstants.LAST_ONE_SQL));
if (Common.isNotNull(handlerInfo)) {
handlerInfo.setOperInfo(workInfo.substring(0, workInfo.length() - 1));
handlerInfo.setReason(failueInfo.length() > 1 ? failueInfo.toString() : "");
handlerInfo.setOperResult(failueInfo.length() > 1 ? "1" : "2");
workHandlerInfoService.updateById(handlerInfo);
}
} else {
//先停用项目内的其他的员工合同————不要这个逻辑了
// 2022-7-22 16:54:12 产品倩倩与测试说,作废终止审核通过,仅将原先选择的合同不在用即可
......@@ -1198,6 +1212,10 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
if (Common.isEmpty(insert.getEmpIdcard()) || Common.isEmpty(insert.getDeptNo())) {
errorInfo.append(EmployeeConstants.EMPID_NOT_EMPTY);
} else {
//签订类型不是终止的把是否同步终止合同、减项、减档设为空
if (!EmployeeConstants.SITUATION_SEVEN.equals(insert.getSituation())) {
insert.setChangeContractAndEmployee(null);
}
if (EmployeeConstants.SITUATION_SIX.equals(insert.getSituation())
|| EmployeeConstants.SITUATION_SEVEN.equals(insert.getSituation())) {
// 终止 离职日期 和减少原因必填
......@@ -1604,6 +1622,7 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
List<TEmployeeContractInfo> contractInfoList;
List<TEmployeeContractInfo> contractInfoListZt;
TWorkHandlerInfo handlerInfo;
for (TEmployeeContractInfo contract : contractInfos) {
i++;
if (contract.getAuditStatus() != CommonConstants.ONE_INT) {
......@@ -1725,19 +1744,16 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
}
}
}
//增加任务处理情况查询表数据
TWorkHandlerInfo handlerInfo = new TWorkHandlerInfo();
handlerInfo.setEmpIdcard(contract.getEmpIdcard());
handlerInfo.setEmpName(contract.getEmpName());
handlerInfo.setDepartName(contract.getSubjectDepart());
handlerInfo.setDepartNo(contract.getDeptNo());
handlerInfo.setInfoFrom("合同终止");
handlerInfo.setOperInfo(workInfo.substring(0, workInfo.length() - 1));
handlerInfo.setReason(failueInfo.length() > 1 ? failueInfo.toString() : "");
handlerInfo.setOperResult(failueInfo.length() > 1 ? "1" : "2");
handlerInfo.setOperUser(user.getNickname());
handlerInfo.setOperTime(LocalDateTime.now());
workHandlerInfoService.save(handlerInfo);
//更新任务处理情况数据
handlerInfo = workHandlerInfoService.getOne(Wrappers.<TWorkHandlerInfo>query()
.lambda().eq(TWorkHandlerInfo::getDetailId, contract.getId())
.last(CommonConstants.LAST_ONE_SQL));
if (Common.isNotNull(handlerInfo)) {
handlerInfo.setOperInfo(workInfo.substring(0, workInfo.length() - 1));
handlerInfo.setReason(failueInfo.length() > 1 ? failueInfo.toString() : "");
handlerInfo.setOperResult(failueInfo.length() > 1 ? "1" : "2");
workHandlerInfoService.updateById(handlerInfo);
}
} else{
//先停用项目内的其他的员工合同————不要这个逻辑了
// 2022-7-22 16:54:12 产品倩倩与测试说,作废终止审核通过,仅将原先选择的合同不在用即可
......
......@@ -1386,7 +1386,8 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
return false;
}
//是否同步终止合同、减项、减档为是的时候 单独写逻辑
if (Common.isNotNull(vo.getChangeContractAndEmployee())) {
if (Common.isNotNull(vo.getChangeContractAndEmployee())
&& CommonConstants.ZERO_STRING.equals(vo.getChangeContractAndEmployee())) {
List<TEmployeeContractInfo> contractInfoList;
List<TEmployeeContractInfo> contractInfoListZt;
//同步任务处理清单执行详情
......@@ -1466,19 +1467,14 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
}
}
}
//增加任务处理情况查询表数据
TWorkHandlerInfo handlerInfo = new TWorkHandlerInfo();
handlerInfo.setEmpIdcard(vo.getEmpIdCard());
handlerInfo.setEmpName(null == tEmployeeProject.getEmpName() ? "" : tEmployeeProject.getEmpName());
handlerInfo.setDepartName(null == tEmployeeProject.getDeptName() ? "" : tEmployeeProject.getDeptName());
handlerInfo.setDepartNo(vo.getDepartNo());
handlerInfo.setInfoFrom("合同终止");
//更新任务处理情况查询表数据
TWorkHandlerInfo handlerInfo = workHandlerInfoService.getOne(Wrappers.<TWorkHandlerInfo>query()
.lambda().eq(TWorkHandlerInfo::getDetailId, vo.getDetailId())
.last(CommonConstants.LAST_ONE_SQL));
handlerInfo.setOperInfo(workInfo.substring(0, workInfo.length() - 1));
handlerInfo.setReason(failueInfo.length() > 1 ? failueInfo.toString() : "");
handlerInfo.setOperResult(failueInfo.length() > 1 ? "1" : "2");
handlerInfo.setOperUser(vo.getUserName());
handlerInfo.setOperTime(LocalDateTime.now());
workHandlerInfoService.save(handlerInfo);
workHandlerInfoService.updateById(handlerInfo);
}else {
TEmployeeInfo employee = tEmployeeInfoMapper.selectOne(Wrappers.<TEmployeeInfo>query().lambda()
.eq(TEmployeeInfo::getEmpIdcard, vo.getEmpIdCard())
......
......@@ -26,6 +26,7 @@ import com.yifu.cloud.plus.v1.yifu.archives.entity.TWorkHandlerInfo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TWorkHandlerInfoSearchVo;
import com.yifu.cloud.plus.v1.yifu.archives.mapper.TWorkHandlerInfoMapper;
import com.yifu.cloud.plus.v1.yifu.archives.service.TWorkHandlerInfoService;
import com.yifu.cloud.plus.v1.yifu.archives.vo.InsertWorkHandlerVo;
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;
......@@ -35,6 +36,7 @@ import org.springframework.stereotype.Service;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletResponse;
import java.net.URLEncoder;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;
/**
......@@ -103,4 +105,21 @@ public class TWorkHandlerInfoServiceImpl extends ServiceImpl<TWorkHandlerInfoMap
log.error("执行异常" ,e);
}
}
@Override
public Boolean insertWorkHandler(InsertWorkHandlerVo vo) {
//增加任务处理情况查询表数据
TWorkHandlerInfo handlerInfo = new TWorkHandlerInfo();
handlerInfo.setEmpIdcard(vo.getEmpIdcard());
handlerInfo.setEmpName(null == vo.getEmpName() ? "" : vo.getEmpName());
handlerInfo.setDepartName(null == vo.getDepartName() ? "" : vo.getDepartName());
handlerInfo.setDepartNo(vo.getDepartNo());
handlerInfo.setInfoFrom("社保派减");
handlerInfo.setOperUser(vo.getOperUser());
handlerInfo.setOperTime(LocalDateTime.now());
handlerInfo.setDetailId(vo.getDetailId());
handlerInfo.setOperResult(CommonConstants.ZERO_STRING);
baseMapper.insert(handlerInfo);
return true;
}
}
......@@ -428,6 +428,21 @@ public class ArchivesDaprUtil {
return res;
}
public R<Boolean> insertWorkHandler(InsertWorkHandlerVo vo){
if (Common.isEmpty(vo.getDetailId())
|| Common.isEmpty(vo.getEmpIdcard())
|| Common.isEmpty(vo.getDepartNo())){
return R.failed(CommonConstants.PARAM_IS_NOT_ERROR);
}
R<Boolean> res = HttpDaprUtil.invokeMethodPost(
daprArchivesProperties.getAppUrl(),daprArchivesProperties.getAppId()
,"/tworkhandlerinfo/inner/insertWorkHandler" , JSON.toJSONString(vo), Boolean.class, SecurityConstants.FROM_IN);
if (Common.isEmpty(res)){
return R.failed("增加任务处理情况查询表数据失败!");
}
return res;
}
/**
* @Description: 更新项目档案的商险状态。商险的status 0无2正常3失效4处理中
* @Author: hgw
......
......@@ -2815,6 +2815,21 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
dispatch.setStatus(CommonConstants.FIVE_STRING);
}
baseMapper.insert(dispatch);
//是否同步减档减项减合同未是时新增任务处理表
if (Common.isNotNull(dispatch.getChangeContractAndEmployee())
&& CommonConstants.ZERO_STRING.equals(dispatch.getChangeContractAndEmployee())) {
InsertWorkHandlerVo insertVo = new InsertWorkHandlerVo();
insertVo.setDepartName(dispatch.getSettleDomainName());
insertVo.setEmpIdcard(dispatch.getEmpIdcard());
insertVo.setEmpName(dispatch.getEmpName());
insertVo.setDepartNo(dispatch.getSettleDomainCode());
insertVo.setDetailId(dispatch.getId());
insertVo.setOperUser(user.getNickname());
R<Boolean> resUp = archivesDaprUtil.insertWorkHandler(insertVo);
if (Common.isEmpty(resUp) || !(CommonConstants.SUCCESS.intValue() == resUp.getCode()) || !resUp.getData().booleanValue()) {
ServiceUtil.runTimeExceptionDiy(insertVo.getEmpIdcard() + DispatchConstants.DISPATCH_SYN_DOC_EXE);
}
}
socialFundMapper.updateById(socialFund);
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), CommonConstants.SAVE_SUCCESS, CommonConstants.GREEN));
}catch (Exception e){
......@@ -3927,10 +3942,15 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
vo.setEmpIdCard(dis.getEmpIdcard());
vo.setDepartNo(dis.getSettleDomainCode());
//派减审核通过才会处理合同档案状态
if (CommonConstants.ONE_INT == flag) {
if (CommonConstants.ONE_INT == flag
&& Common.isNotNull(dis.getChangeContractAndEmployee())
&& CommonConstants.ZERO_STRING.equals(dis.getChangeContractAndEmployee())) {
vo.setChangeContractAndEmployee(dis.getChangeContractAndEmployee());
vo.setUserId(user.getId());
vo.setUserName(user.getNickname());
vo.setEmpName(dis.getEmpName());
vo.setDeptName(dis.getSettleDomainName());
vo.setDetailId(dis.getId());
}
R<Boolean> resUp = archivesDaprUtil.updateProjectSocialFund(vo);
if (Common.isEmpty(resUp) || !(CommonConstants.SUCCESS.intValue() == resUp.getCode()) || !resUp.getData().booleanValue()){
......
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