Commit eef55806 authored by fangxinjiang's avatar fangxinjiang

派单调整

parent 43a3fd79
......@@ -17,6 +17,9 @@ public class UpdateEmpVo implements Serializable {
String empIdCard;
// 项目编码
String projectNo;
// 合同开始时间
String contractName;
// 合同ID
String contractId;
// type 0 审核通过 2.审核不通过
String type;
}
......@@ -2095,41 +2095,49 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
public Boolean updateEmpInfo(UpdateEmpVo vo) {
if (Common.isNotNull(vo)){
if (Common.isNotNull(vo.getEmpIdCard())){
TEmployeeInfo employeeInfo = baseMapper.selectOne(Wrappers.<TEmployeeInfo>query().lambda()
.eq(TEmployeeInfo::getDeleteFlag,CommonConstants.ZERO_STRING)
.eq(TEmployeeInfo::getEmpIdcard,vo.getEmpIdCard())
.eq(TEmployeeInfo::getStatus,CommonConstants.ZERO_INT)
.last(CommonConstants.LAST_ONE_SQL));
if (Common.isNotNull(employeeInfo)){
employeeInfo.setStatus(CommonConstants.ONE_INT);
baseMapper.updateById(employeeInfo);
}
if (Common.isNotNull(vo.getContractName())){
if (CommonConstants.ZERO_STRING.equals(vo.getType())){
TEmployeeInfo employeeInfo = baseMapper.selectOne(Wrappers.<TEmployeeInfo>query().lambda()
.eq(TEmployeeInfo::getDeleteFlag,CommonConstants.ZERO_STRING)
.eq(TEmployeeInfo::getEmpIdcard,vo.getEmpIdCard())
.eq(TEmployeeInfo::getStatus,CommonConstants.ZERO_INT)
.last(CommonConstants.LAST_ONE_SQL));
if (Common.isNotNull(employeeInfo)){
employeeInfo.setStatus(CommonConstants.ONE_INT);
baseMapper.updateById(employeeInfo);
}
if (Common.isNotNull(vo.getProjectNo())){
TEmployeeProject p = tEmployeeProjectService.getOne(Wrappers.<TEmployeeProject>query().lambda()
.eq(TEmployeeProject::getDeleteFlag,CommonConstants.ZERO_INT)
.eq(TEmployeeProject::getEmpIdcard,vo.getEmpIdCard())
.eq(TEmployeeProject::getDeptNo,vo.getProjectNo())
.eq(TEmployeeProject::getStatus,CommonConstants.ZERO_INT)
.last(CommonConstants.LAST_ONE_SQL));
if (Common.isNotNull(p)){
p.setStatus(CommonConstants.ONE_INT);
tEmployeeProjectService.updateById(p);
}
}
}
if (Common.isNotNull(vo.getContractId())){
TEmployeeContractInfo c = contractServicer.getOne(Wrappers.<TEmployeeContractInfo>query().lambda()
.eq(TEmployeeContractInfo::getDeleteFlag,CommonConstants.ZERO_INT)
.eq(TEmployeeContractInfo::getEmpIdcard,vo.getEmpIdCard())
.eq(TEmployeeContractInfo::getId,vo.getContractId())
.eq(TEmployeeContractInfo::getAuditStatus,CommonConstants.ONE_INT)
.eq(TEmployeeContractInfo::getContractName,vo.getContractName())
.eq(TEmployeeContractInfo::getDispatchFlag,CommonConstants.ONE_STRING)
.last(CommonConstants.LAST_ONE_SQL));
if (Common.isNotNull(c)){
c.setAuditStatus(CommonConstants.TWO_INT);
c.setInUse(CommonConstants.ZERO_STRING);
if (CommonConstants.ZERO_STRING.equals(vo.getType())){
c.setAuditStatus(CommonConstants.TWO_INT);
c.setInUse(CommonConstants.ZERO_STRING);
}else if (CommonConstants.ONE_STRING.equals(vo.getType())){
c.setAuditStatus(CommonConstants.THREE_INT);
c.setInUse(CommonConstants.ONE_STRING);
}
contractServicer.updateById(c);
}
}
if (Common.isNotNull(vo.getProjectNo())){
TEmployeeProject p = tEmployeeProjectService.getOne(Wrappers.<TEmployeeProject>query().lambda()
.eq(TEmployeeProject::getDeleteFlag,CommonConstants.ZERO_INT)
.eq(TEmployeeProject::getEmpIdcard,vo.getEmpIdCard())
.eq(TEmployeeProject::getDeptNo,vo.getProjectNo())
.eq(TEmployeeProject::getStatus,CommonConstants.ZERO_INT)
.last(CommonConstants.LAST_ONE_SQL));
if (Common.isNotNull(p)){
p.setStatus(CommonConstants.ONE_INT);
tEmployeeProjectService.updateById(p);
}
}
}
}
return true;
......@@ -2178,6 +2186,7 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
contract.setApplyNo(contractServicer.getCode(false));
contract.setInUse(CommonConstants.ONE_STRING);
contract.setIsObsolete(CommonConstants.ZERO_ONE);
contract.setDispatchFlag(CommonConstants.ONE_STRING);
contractServicer.save(contract);
contractAdd.setId(contract.getId());
contractAdd.setEmpNo(contract.getEmpNo());
......
......@@ -336,6 +336,12 @@ public class Common {
}
return obj;
}
public static String isNullToString(StringBuilder obj) {
if(obj == null) {
return CommonConstants.EMPTY_STRING;
}
return obj.toString();
}
/**
* 两个日期中间年份
......
......@@ -168,17 +168,21 @@ public class ArchivesDaprUtil {
* @Author fxj
* @Description 派单审核通过 同步人员档案 项目档案 合同状态信息
* @Date 19:30 2022/8/1
* @Param
* @Param type 0 审核通过 1 审核不通过
* @return
**/
public R<Boolean> updateEmpInfo(String empIdCard, String projectNo, String contractName){
if (Common.isEmpty(empIdCard) || Common.isEmpty(projectNo) || Common.isEmpty(contractName)){
public R<Boolean> updateEmpInfo(String empIdCard, String projectNo, String contractId,String type){
if (Common.isEmpty(empIdCard)
|| Common.isEmpty(projectNo)
|| Common.isEmpty(contractId)
|| Common.isEmpty(type)){
return R.failed(CommonConstants.PARAM_IS_NOT_ERROR);
}
UpdateEmpVo vo = new UpdateEmpVo();
vo.setEmpIdCard(empIdCard);
vo.setProjectNo(projectNo);
vo.setContractName(contractName);
vo.setContractId(contractId);
vo.setType(type);
R<Boolean> res = HttpDaprUtil.invokeMethodPost(
daprArchivesProperties.getAppUrl(),daprArchivesProperties.getAppId()
,"/temployeeinfo/inner/updateEmpInfo" , JSON.toJSONString(vo), Boolean.class, SecurityConstants.FROM_IN);
......
......@@ -41,7 +41,8 @@ public class DispatchConstants {
public static final String DISPATCH_UNEMP = "失业、";
public static final String DISPATCH_BIGMAILMENT= "大病、";
public static final String DISPATCH_FUND= "公积金、";
public static final String DISPATCH_FUND_REDUCE_SUCCESS = "公积金派减办理成功:";
public static final String DISPATCH_FUND_REDUCE_FAIL = "公积金派减办理失败:";
/**
......
......@@ -267,8 +267,9 @@ public class TDispatchInfoController {
//@PreAuthorize("@pms.hasPermission('wxhr:tdispatchinfo_addApplyAudit')")
public R<List<ErrorMessage>> addApplyAudit(@RequestParam(name = "ids", required = true) String ids,
@RequestParam(name = "auditStatus", required = true) String auditStatus,
@RequestParam(name = "auditRemark", required = false) String auditRemark) {
return tDispatchInfoService.addApplyAudit(ids,auditStatus,auditRemark);
@RequestParam(name = "auditRemark", required = false) String auditRemark,
@RequestParam(name = "remark", required = false) String remark) {
return tDispatchInfoService.addApplyAudit(ids,auditStatus,auditRemark,remark);
}
/**
......@@ -290,8 +291,9 @@ public class TDispatchInfoController {
@RequestParam(name = "typeSub", required = true) String typeSub,
@RequestParam(name = "handleStatus", required = true) String handleStatus,
@RequestParam(name = "handleRemark", required = false) String handleRemark,
@RequestParam(name = "socialType", required = false) String socialType) {
return tDispatchInfoService.addApplyHandle(ids,typeSub,handleStatus,handleRemark,socialType);
@RequestParam(name = "socialType", required = false) String socialType,
@RequestParam(name = "remark", required = false) String remark) {
return tDispatchInfoService.addApplyHandle(ids,typeSub,handleStatus,handleRemark,socialType,remark);
}
/**
......
......@@ -64,11 +64,11 @@ public interface TDispatchInfoService extends IService<TDispatchInfo> {
DispatchDetailVo getSocialAndFundInfoById(String id);
List<ErrorMessage> addBatchApplyAudit(List<String> initStrToList, YifuUser user, Integer flag, String auditStatus, String auditRemark);
List<ErrorMessage> addBatchApplyAudit(List<String> idsList, YifuUser user, Integer flag, String auditStatus, String auditRemark, String remark);
R<List<ErrorMessage>> addApplyAudit(String ids,String auditStatus,String auditRemark);
R<List<ErrorMessage>> addApplyAudit(String ids, String auditStatus, String auditRemark, String remark);
R<List<ErrorMessage>> addApplyHandle(String ids,String typeSub,String handleStatus,String handleRemark,String socialType);
R<List<ErrorMessage>> addApplyHandle(String ids, String typeSub, String handleStatus, String handleRemark, String socialType, String remark);
void doexportSocialRecordRoster(HttpServletResponse response, SocialHandleSearchVo searchVo, String idStr, String[] exportFields);
......
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