Commit 40856258 authored by hongguangwu's avatar hongguangwu

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

parents fcad5961 b08bd8c2
...@@ -2,6 +2,7 @@ package com.yifu.cloud.plus.v1.yifu.archives.vo; ...@@ -2,6 +2,7 @@ package com.yifu.cloud.plus.v1.yifu.archives.vo;
import com.alibaba.excel.annotation.format.DateTimeFormat; import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute; import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttributeConstants; import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttributeConstants;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
...@@ -123,6 +124,7 @@ public class EmpContractDispatchVo implements Serializable { ...@@ -123,6 +124,7 @@ public class EmpContractDispatchVo implements Serializable {
*/ */
@NotBlank(message = "起始日期不能为空") @NotBlank(message = "起始日期不能为空")
@DateTimeFormat("yyyy-MM-dd") @DateTimeFormat("yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd")
@ExcelAttribute(name = "起始日期", isDate = true) @ExcelAttribute(name = "起始日期", isDate = true)
@Schema(description = "起始日期", name = "contractStart") @Schema(description = "起始日期", name = "contractStart")
private Date contractStart; private Date contractStart;
...@@ -131,6 +133,7 @@ public class EmpContractDispatchVo implements Serializable { ...@@ -131,6 +133,7 @@ public class EmpContractDispatchVo implements Serializable {
*/ */
@ExcelAttribute(name = "截止日期", needExport = true, isDate = true) @ExcelAttribute(name = "截止日期", needExport = true, isDate = true)
@DateTimeFormat("yyyy-MM-dd") @DateTimeFormat("yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd")
@Schema(description = "截止日期", name = "contractEnd") @Schema(description = "截止日期", name = "contractEnd")
private Date contractEnd; private Date contractEnd;
......
...@@ -35,7 +35,7 @@ public class EmpProjectDispatchVo implements Serializable { ...@@ -35,7 +35,7 @@ public class EmpProjectDispatchVo implements Serializable {
*/ */
@Schema(description ="员工编码") @Schema(description ="员工编码")
@Size(max = 20, message = "员工编码不可超过20位") @Size(max = 20, message = "员工编码不可超过20位")
private String empNo; private String empCode;
/** /**
* 员工类型(字典值,0外包1派遣2代理) * 员工类型(字典值,0外包1派遣2代理)
*/ */
...@@ -90,4 +90,11 @@ public class EmpProjectDispatchVo implements Serializable { ...@@ -90,4 +90,11 @@ public class EmpProjectDispatchVo implements Serializable {
@ExcelProperty(value ="就职岗位") @ExcelProperty(value ="就职岗位")
@ExcelAttribute(name = "就职岗位",isNotEmpty = true, errorInfo = "就职岗位不能为空",maxLength = 20) @ExcelAttribute(name = "就职岗位",isNotEmpty = true, errorInfo = "就职岗位不能为空",maxLength = 20)
private String post; private String post;
/**
* 员工编码
*/
@Schema(description ="员工编码")
@Size(max = 20, message = "员工编码不可超过20位")
private String empNo;
} }
...@@ -187,4 +187,7 @@ public interface TEmployeeProjectService extends IService<TEmployeeProject> { ...@@ -187,4 +187,7 @@ public interface TEmployeeProjectService extends IService<TEmployeeProject> {
TEmployeeProject getByEmpIdAndDeptId(String empId, String deptId); TEmployeeProject getByEmpIdAndDeptId(String empId, String deptId);
R<Map<String, String>> getProjectByIdCard(String empIdCard); R<Map<String, String>> getProjectByIdCard(String empIdCard);
//获取员工编码
String getEmpNo(String deptNo);
} }
...@@ -228,10 +228,12 @@ public class TEmpContractAlertServiceImpl extends ServiceImpl<TEmpContractAlertM ...@@ -228,10 +228,12 @@ public class TEmpContractAlertServiceImpl extends ServiceImpl<TEmpContractAlertM
.eq(TEmployeeContractInfo::getWorkFlag,CommonConstants.ZERO_STRING) .eq(TEmployeeContractInfo::getWorkFlag,CommonConstants.ZERO_STRING)
.eq(TEmployeeContractInfo::getDeleteFlag,CommonConstants.ZERO_STRING)); .eq(TEmployeeContractInfo::getDeleteFlag,CommonConstants.ZERO_STRING));
Map<String,TEmpContractAlert> alertMap = new HashMap<>(); Map<String,TEmpContractAlert> alertMap = new HashMap<>();
Map<String,TEmpContractAlert> existMap = new HashMap<>();
initExistMap(existMap);
if (Common.isNotNull(alertList)){ if (Common.isNotNull(alertList)){
Date nowDate = DateUtil.dateIncreaseByDay(new Date(),CommonConstants.ONE_INT); Date nowDate = DateUtil.dateIncreaseByDay(new Date(),CommonConstants.ONE_INT);
for (TEmployeeContractInfo contract:alertList){ for (TEmployeeContractInfo contract:alertList){
extracted(nowDate, contract,alertMap); extracted(nowDate, contract,alertMap,existMap);
} }
} }
if (Common.isNotNull(notAccessList) && Common.isNotNull(alertMap)){ if (Common.isNotNull(notAccessList) && Common.isNotNull(alertMap)){
...@@ -251,16 +253,29 @@ public class TEmpContractAlertServiceImpl extends ServiceImpl<TEmpContractAlertM ...@@ -251,16 +253,29 @@ public class TEmpContractAlertServiceImpl extends ServiceImpl<TEmpContractAlertM
return R.ok(); return R.ok();
} }
private void initExistMap(Map<String, TEmpContractAlert> existMap) {
List<TEmpContractAlert> exists = baseMapper.selectList(Wrappers.<TEmpContractAlert>query());
if (Common.isNotNull(exists)){
for (TEmpContractAlert alert:exists){
existMap.put(alert.getEmpIdcard()
+CommonConstants.DOWN_LINE_STRING
+alert.getProjectNo()
+CommonConstants.DOWN_LINE_STRING
+alert.getContractId(),alert);
}
}
}
private void extracted(Date nowDate, private void extracted(Date nowDate,
TEmployeeContractInfo contract, TEmployeeContractInfo contract,
Map<String,TEmpContractAlert> alertMap) { Map<String, TEmpContractAlert> alertMap, Map<String, TEmpContractAlert> existMap) {
TEmployeeInfo employeeInfo = employeeInfoMapper.selectById(contract.getEmpId()); TEmployeeInfo employeeInfo = employeeInfoMapper.selectById(contract.getEmpId());
if (Common.isNotNull(employeeInfo) if (Common.isNotNull(employeeInfo)
&& !CommonConstants.ZERO_STRING.equals(employeeInfo.getEmpNatrue()) && !CommonConstants.ZERO_STRING.equals(employeeInfo.getEmpNatrue())
&& !CommonConstants.ONE_STRING.equals(employeeInfo.getEmpNatrue())){ && !CommonConstants.ONE_STRING.equals(employeeInfo.getEmpNatrue())){
return; return;
} }
TEmpContractAlert alert = alertMap.get(contract.getEmpIdcard()); TEmpContractAlert alert = alertMap.get(contract.getEmpIdcard()+CommonConstants.DOWN_LINE_STRING+contract.getDeptNo());
// 存在多个审核通过的数据 用最新的审核通过的合同覆盖已有的 // 存在多个审核通过的数据 用最新的审核通过的合同覆盖已有的
if (Common.isNotNull(alert) if (Common.isNotNull(alert)
&& Common.isNotNull(alert.getContractEnd()) && Common.isNotNull(alert.getContractEnd())
...@@ -268,7 +283,17 @@ public class TEmpContractAlertServiceImpl extends ServiceImpl<TEmpContractAlertM ...@@ -268,7 +283,17 @@ public class TEmpContractAlertServiceImpl extends ServiceImpl<TEmpContractAlertM
&& alert.getAuditTime().after(contract.getContractEnd())){ && alert.getAuditTime().after(contract.getContractEnd())){
return; return;
} }
TEmpContractAlert exist = existMap.get(alert.getEmpIdcard()
+CommonConstants.DOWN_LINE_STRING
+alert.getProjectNo()
+CommonConstants.DOWN_LINE_STRING
+alert.getContractId());
alert = new TEmpContractAlert(); alert = new TEmpContractAlert();
if (Common.isNotNull(exist) && Common.isNotNull(exist.getFirstAlertTime())){
alert.setFirstAlertTime(exist.getFirstAlertTime());
}else {
alert.setFirstAlertTime(new Date());
}
alert.setContractId(contract.getId()); alert.setContractId(contract.getId());
alert.setAlertPerson(contract.getCreateName()); alert.setAlertPerson(contract.getCreateName());
alert.setEmpName(contract.getEmpName()); alert.setEmpName(contract.getEmpName());
...@@ -300,9 +325,8 @@ public class TEmpContractAlertServiceImpl extends ServiceImpl<TEmpContractAlertM ...@@ -300,9 +325,8 @@ public class TEmpContractAlertServiceImpl extends ServiceImpl<TEmpContractAlertM
alert.setDaysDue(DateUtil.daysBetween( nowDate,alert.getContractEnd())); alert.setDaysDue(DateUtil.daysBetween( nowDate,alert.getContractEnd()));
alert.setDueFlag(CommonConstants.ZERO_STRING); alert.setDueFlag(CommonConstants.ZERO_STRING);
} }
alert.setFirstAlertTime(DateUtil.dateIncreaseByMonth(alert.getContractEnd(),CommonConstants.THREE_INT_NEGATE));
} }
alert.setHandleStatus(CommonConstants.ZERO_STRING); alert.setHandleStatus(CommonConstants.ZERO_STRING);
alertMap.put(alert.getEmpIdcard(),alert); alertMap.put(alert.getEmpIdcard()+CommonConstants.DOWN_LINE_STRING+alert.getProjectNo(),alert);
} }
} }
...@@ -2079,14 +2079,14 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T ...@@ -2079,14 +2079,14 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
// 新增项目档案不需要返回ID // 新增项目档案不需要返回ID
saveProject(empAddsMap, projectsMap); saveProject(empAddsMap, projectsMap);
// 新增合同 // 新增合同
saveContract(empAddsMap, contractsMap); saveContract(projectsMap, contractsMap);
addVo.setProjectsMap(projectsMap); addVo.setProjectsMap(projectsMap);
addVo.setEmpAddsMap(empAddsMap); addVo.setEmpAddsMap(empAddsMap);
addVo.setContractsMap(contractsMap); addVo.setContractsMap(contractsMap);
return addVo; return addVo;
} }
private void saveContract(Map<String, EmpAddDispatchVo> empAddsMap, Map<String, EmpContractDispatchVo> contractsMap) { private void saveContract(Map<String, EmpProjectDispatchVo> projectsMap, Map<String, EmpContractDispatchVo> contractsMap) {
if (Common.isNotNull(contractsMap)) { if (Common.isNotNull(contractsMap)) {
EmpContractDispatchVo contractAdd; EmpContractDispatchVo contractAdd;
TEmployeeContractInfo contract; TEmployeeContractInfo contract;
...@@ -2096,19 +2096,19 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T ...@@ -2096,19 +2096,19 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
if (Common.isNotNull(contractAdd)) { if (Common.isNotNull(contractAdd)) {
contract = new TEmployeeContractInfo(); contract = new TEmployeeContractInfo();
BeanUtil.copyProperties(contractAdd, contract); BeanUtil.copyProperties(contractAdd, contract);
if (Common.isEmpty(contract.getEmpId()) && Common.isNotNull(empAddsMap)) { if (Common.isEmpty(contract.getEmpId()) && Common.isNotNull(projectsMap)) {
EmpAddDispatchVo emp = empAddsMap.get(contract.getEmpIdcard()); EmpProjectDispatchVo project = projectsMap.get(contract.getEmpIdcard());
if (Common.isNotNull(emp)) { if (Common.isNotNull(project)) {
contract.setEmpId(emp.getId()); contract.setEmpId(project.getId());
contract.setEmpNo(emp.getEmpCode()); contract.setEmpNo(project.getEmpNo());
}
} }
contractMapper.insert(contract); contractMapper.insert(contract);
contractAdd.setId(contract.getId()); contractAdd.setId(contract.getId());
contractsMap.put(contractAdd.getEmpIdcard() + CommonConstants.DOWN_LINE_STRING + contractAdd.getDeptNo(), contractAdd); contractsMap.put(contractAdd.getEmpIdcard() + CommonConstants.DOWN_LINE_STRING + contractAdd.getDeptNo(), contractAdd);
} }
}
} catch (Exception e) { } catch (Exception e) {
log.error(contractAdd.getEmpIdcard() + CommonConstants.COLON_STRING + "派单新增合同失败"); log.error(contractAdd.getEmpIdcard() + CommonConstants.COLON_STRING + "派单新增合同失败",e);
} }
} }
} }
...@@ -2131,7 +2131,7 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T ...@@ -2131,7 +2131,7 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
empAddsMap.put(empAdd.getEmpIdcard(), empAdd); empAddsMap.put(empAdd.getEmpIdcard(), empAdd);
} }
} catch (Exception e) { } catch (Exception e) {
log.error(empAdd.getEmpIdcard() + CommonConstants.COLON_STRING + "派单新增档案失败"); log.error(empAdd.getEmpIdcard() + CommonConstants.COLON_STRING + "派单新增档案失败",e);
} }
} }
} }
...@@ -2156,12 +2156,14 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T ...@@ -2156,12 +2156,14 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
project.setEmpId(emp.getId()); project.setEmpId(emp.getId());
} }
} }
project.setEmpNo(tEmployeeProjectService.getEmpNo(project.getDeptNo()));
tEmployeeProjectService.save(project); tEmployeeProjectService.save(project);
projectAdd.setId(project.getId()); projectAdd.setId(project.getId());
projectAdd.setEmpNo(project.getEmpNo());
projectsMap.put(project.getEmpIdcard() + CommonConstants.DOWN_LINE_STRING + project.getDeptNo(), projectAdd); projectsMap.put(project.getEmpIdcard() + CommonConstants.DOWN_LINE_STRING + project.getDeptNo(), projectAdd);
} }
} catch (Exception e) { } catch (Exception e) {
log.error(projectAdd.getEmpIdcard() + CommonConstants.COLON_STRING + "派单新增项目档案失败"); log.error(projectAdd.getEmpIdcard() + CommonConstants.COLON_STRING + "派单新增项目档案失败",e);
} }
} }
} }
......
...@@ -1388,6 +1388,7 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap ...@@ -1388,6 +1388,7 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
} }
//获取员工编码 //获取员工编码
@Override
public String getEmpNo(String deptNo) { public String getEmpNo(String deptNo) {
String str = ""; String str = "";
String EmpNo = baseMapper.findEmployeeMaxOnlyNoByDepId(deptNo); String EmpNo = baseMapper.findEmployeeMaxOnlyNoByDepId(deptNo);
......
...@@ -375,6 +375,8 @@ public interface CommonConstants { ...@@ -375,6 +375,8 @@ public interface CommonConstants {
public static final int SIXTEEN_INT = 16; public static final int SIXTEEN_INT = 16;
public static final String FIFTEEN = "15"; public static final String FIFTEEN = "15";
public static final String NINETEEN = "19"; public static final String NINETEEN = "19";
public static final String NINE_STRING = "9";
String EIGHT_STRING = "8";
//百分之一 1/100 //百分之一 1/100
public static final BigDecimal ONE_OF_PERCENT = new BigDecimal("0.01"); public static final BigDecimal ONE_OF_PERCENT = new BigDecimal("0.01");
...@@ -382,4 +384,7 @@ public interface CommonConstants { ...@@ -382,4 +384,7 @@ public interface CommonConstants {
// 1/2 // 1/2
public static final BigDecimal HALF_OF_ONE = new BigDecimal("0.5"); public static final BigDecimal HALF_OF_ONE = new BigDecimal("0.5");
public static final BigDecimal TWO_BIG = new BigDecimal("2"); public static final BigDecimal TWO_BIG = new BigDecimal("2");
String SIX_STRING = "6";
String SEVEN_STRING = "7";
} }
...@@ -124,4 +124,6 @@ public class ExcelAttributeConstants { ...@@ -124,4 +124,6 @@ public class ExcelAttributeConstants {
//区域字段组合 //区域字段组合
public static final String DEPARTID_PROVINCE_CITY_TOWN = "departId_province_city_town"; public static final String DEPARTID_PROVINCE_CITY_TOWN = "departId_province_city_town";
//派减离职原因
public static final String REDUCE_PROJECT_REASON = "reduce_project_reason";
} }
...@@ -341,10 +341,8 @@ public interface ErrorCodes { ...@@ -341,10 +341,8 @@ public interface ErrorCodes {
*/ */
String EMP_DISPATCH_FUND_NOT_EMPTY = "emp.dispatch.fund.not.empty"; String EMP_DISPATCH_FUND_NOT_EMPTY = "emp.dispatch.fund.not.empty";
/** /**
* 新增异常:存在派增待审核|待办理|办理成功但未派减办理成功的社保数据 * 新增异常:已存在社保数据
*/ */
String EMP_DISPATCH_SOCIAL_EXISTING = "emp.dispatch.social.existing"; String EMP_DISPATCH_SOCIAL_EXISTING = "emp.dispatch.social.existing";
/** /**
...@@ -394,4 +392,28 @@ public interface ErrorCodes { ...@@ -394,4 +392,28 @@ public interface ErrorCodes {
* 新增异常:派单新增项目档案失败,请重试 * 新增异常:派单新增项目档案失败,请重试
*/ */
String EMP_DISPATCH_ADD_PROJECT_ERROR="emp.dispatch.add.project.error"; String EMP_DISPATCH_ADD_PROJECT_ERROR="emp.dispatch.add.project.error";
/**
* 新增异常:已存在公积金数据
*/
String EMP_DISPATCH_FUND_EXISTING = "emp.dispatch.fund.existing";
/**
* 派减异常: 未找到社保及公积金信息
*/
String EMP_DISPATCH_SOCIAL_FUND_NOT_EMPTY = "emp.dispatch.social.fund.not.empty";
/**
* 派减异常: 请选择社保停缴日期或公积金停缴日期
*/
String EMP_DISPATCH_REDUCE_SOCIAL_FUND_NOT_EMPTY = "emp.dispatch.reduce.social.fund.not.empty";
/**
* 派减异常: 未找到办理成功的社保状态,或社保派减中,请确认后重试
*/
String EMP_DISPATCH_REDUCE_SOCIAL_STATUS_ERROR = "emp.dispatch.reduce.social.status.error";
/**
* 派减异常: 未找到办理成功的公积金状态,或公积金派减中,请确认后重试
*/
String EMP_DISPATCH_REDUCE_FUND_STATUS_ERROR = "emp.dispatch.reduce.fund.status.error";
/**
* 派减异常: 本次派增已存在对应身份证号的派减记录
*/
String EMP_DISPATCH_REDUCE_EXISTS = "emp.dispatch.reduce.exists";
} }
...@@ -32,6 +32,7 @@ public class ErrorMessage implements Serializable { ...@@ -32,6 +32,7 @@ public class ErrorMessage implements Serializable {
public ErrorMessage(Integer lineNum, String message) { public ErrorMessage(Integer lineNum, String message) {
this.lineNum = lineNum; this.lineNum = lineNum;
this.color = "red";
this.message = message; this.message = message;
} }
public ErrorMessage(Integer lineNum, String message, String color) { public ErrorMessage(Integer lineNum, String message, String color) {
......
...@@ -115,7 +115,7 @@ emp.dispatch.social.not.empty=\u6D3E\u5355\u5458\u5DE5\u793E\u4FDD\u76F8\u5173\u ...@@ -115,7 +115,7 @@ emp.dispatch.social.not.empty=\u6D3E\u5355\u5458\u5DE5\u793E\u4FDD\u76F8\u5173\u
emp.dispatch.fund.not.empty=\u6D3E\u5355\u5458\u5DE5\u516C\u79EF\u91D1\u76F8\u5173\u4FE1\u606F\u4E0D\u53EF\u4E3A\u7A7A emp.dispatch.fund.not.empty=\u6D3E\u5355\u5458\u5DE5\u516C\u79EF\u91D1\u76F8\u5173\u4FE1\u606F\u4E0D\u53EF\u4E3A\u7A7A
emp.dispatch.social.existing=\u65B0\u589E\u5F02\u5E38\uFF1A\u5B58\u5728\u6D3E\u589E\u5F85\u5BA1\u6838|\u5F85\u529E\u7406|\u529E\u7406\u6210\u529F\u4F46\u672A\u6D3E\u51CF\u529E\u7406\u6210\u529F\u7684\u793E\u4FDD\u6570\u636E emp.dispatch.social.existing=\u65B0\u589E\u5F02\u5E38\uFF1A\u5DF2\u5B58\u5728\u793E\u4FDD\u6570\u636E
emp.dispatch.social.injury.existing=\u65B0\u589E\u5F02\u5E38\uFF1A\u5B58\u5728\u529E\u7406\u6210\u529F\u672A\u6D3E\u51CF\u7684\u5DE5\u4F24\u793E\u4FDD\u6570\u636E emp.dispatch.social.injury.existing=\u65B0\u589E\u5F02\u5E38\uFF1A\u5B58\u5728\u529E\u7406\u6210\u529F\u672A\u6D3E\u51CF\u7684\u5DE5\u4F24\u793E\u4FDD\u6570\u636E
...@@ -139,6 +139,18 @@ emp.dispatch.add.contract.error=\u65B0\u589E\u5F02\u5E38\uFF1A\u6D3E\u5355\u65B0 ...@@ -139,6 +139,18 @@ emp.dispatch.add.contract.error=\u65B0\u589E\u5F02\u5E38\uFF1A\u6D3E\u5355\u65B0
emp.dispatch.add.project.error=\u65B0\u589E\u5F02\u5E38\uFF1A\u6D3E\u5355\u65B0\u589E\u9879\u76EE\u6863\u6848\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5 emp.dispatch.add.project.error=\u65B0\u589E\u5F02\u5E38\uFF1A\u6D3E\u5355\u65B0\u589E\u9879\u76EE\u6863\u6848\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5
emp.dispatch.fund.existing=\u65B0\u589E\u5F02\u5E38\uFF1A\u5DF2\u5B58\u5728\u516C\u79EF\u91D1\u6570\u636E
emp.dispatch.social.fund.not.empty=\u6D3E\u51CF\u5F02\u5E38\uFF1A \u672A\u627E\u5230\u793E\u4FDD\u53CA\u516C\u79EF\u91D1\u4FE1\u606F
emp.dispatch.reduce.social.fund.not.empty=\u6D3E\u51CF\u5F02\u5E38\uFF1A \u8BF7\u9009\u62E9\u793E\u4FDD\u505C\u7F34\u65E5\u671F\u6216\u516C\u79EF\u91D1\u505C\u7F34\u65E5\u671F
emp.dispatch.reduce.social.status.error=\u6D3E\u51CF\u5F02\u5E38\uFF1A \u672A\u627E\u5230\u529E\u7406\u6210\u529F\u7684\u793E\u4FDD\u72B6\u6001\uFF0C\u6216\u793E\u4FDD\u6D3E\u51CF\u4E2D\uFF0C\u8BF7\u786E\u8BA4\u540E\u91CD\u8BD5
emp.dispatch.reduce.fund.status.error=\u6D3E\u51CF\u5F02\u5E38\uFF1A \u672A\u627E\u5230\u529E\u7406\u6210\u529F\u7684\u516C\u79EF\u91D1\u72B6\u6001\uFF0C\u6216\u516C\u79EF\u91D1\u6D3E\u51CF\u4E2D\uFF0C\u8BF7\u786E\u8BA4\u540E\u91CD\u8BD5
emp.dispatch.reduce.exists=\u6D3E\u51CF\u5F02\u5E38\uFF1A \u672C\u6B21\u6D3E\u589E\u5DF2\u5B58\u5728\u5BF9\u5E94\u8EAB\u4EFD\u8BC1\u53F7\u7684\u6D3E\u51CF\u8BB0\u5F55
......
package com.yifu.cloud.plus.v1.yifu.common.dapr.util; package com.yifu.cloud.plus.v1.yifu.common.dapr.util;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.TypeReference;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeInfo; import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeInfo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeProject; import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeProject;
import com.yifu.cloud.plus.v1.yifu.archives.vo.*; import com.yifu.cloud.plus.v1.yifu.archives.vo.*;
...@@ -10,9 +10,11 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.Common; ...@@ -10,9 +10,11 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
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.dapr.config.DaprArchivesProperties; import com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprArchivesProperties;
import lombok.extern.log4j.Log4j2; import lombok.extern.log4j.Log4j2;
import org.apache.poi.ss.formula.functions.T;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.boot.context.properties.EnableConfigurationProperties;
import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -48,18 +50,13 @@ public class ArchivesDaprUtil { ...@@ -48,18 +50,13 @@ public class ArchivesDaprUtil {
* @Param * @Param
* @return * @return
**/ **/
public R<Map> getDispatchEmpVo(DispatchCheckVo checkVo){ public R<Map<String, DispatchEmpVo>> getDispatchEmpVo(DispatchCheckVo checkVo){
R<Map> res = HttpDaprUtil.invokeMethodPost(daprArchivesProperties.getAppUrl(),daprArchivesProperties.getAppId(),"/temployeeinfo/getDispatchEmpVo" , JSON.toJSONString(checkVo), Map.class, SecurityConstants.FROM_IN); R<Map> res = HttpDaprUtil.invokeMethodPost(daprArchivesProperties.getAppUrl(),daprArchivesProperties.getAppId(),"/temployeeinfo/getDispatchEmpVo" , JSON.toJSONString(checkVo), Map.class, SecurityConstants.FROM_IN);
if (Common.isEmpty(res)){ if (Common.isEmpty(res)){
return R.failed("获取档案派单信息失败!"); return R.failed("获取档案派单信息失败!");
} }
R<String> test = HttpDaprUtil.invokeMethodObject(daprArchivesProperties.getAppUrl(),daprArchivesProperties.getAppId(),"/temployeeinfo/getDispatchEmpVo" , JSON.toJSONString(checkVo), String.class, SecurityConstants.FROM_IN); Map<String,DispatchEmpVo> map = JSON.parseObject(JSON.toJSONString(res.getData()),new TypeReference<HashMap<String,DispatchEmpVo>>(){});
//Map<String,DispatchEmpVo> map = JSON.parseArray() return R.ok(map);
if (Common.isEmpty(res)){
return R.failed("获取档案派单信息失败!");
}
return res;
} }
/** /**
* @Author fxj * @Author fxj
......
...@@ -120,35 +120,6 @@ public class HttpDaprUtil { ...@@ -120,35 +120,6 @@ public class HttpDaprUtil {
return R.failed("获取信息失败!"); return R.failed("获取信息失败!");
} }
}
public static <T> R<T> invokeMethodObject(String appUrl,
String appId,
String method,
Object param,
Class cs,
@RequestHeader(SecurityConstants.FROM) String from){
// 实例化 RestTemplate
initResTemplate();
// 初始化请求URL
initUrl(appUrl, appId, method, "");
ResponseEntity<String> res;
HttpHeaders headers = new HttpHeaders();
headers.add(SecurityConstants.FROM, from);
headers.setContentType(MediaType.APPLICATION_JSON);
headers.add("Authorization", null);
HttpEntity<String> entity = new HttpEntity(param, headers);
try {
res = restTemplate.postForEntity(URI.create(stringBuffer.toString()),entity, cs);
} catch (Exception e) {
log.error("日志保存异常:",e);
return R.failed("获取信息失败:" + e.getMessage());
}
if (null != res && CommonConstants.SUCCESS == res.getStatusCodeValue()) {
return (R<T>) R.ok(res.getBody());
} else {
return R.failed("获取信息失败!");
}
} }
private static void initResTemplate() { private static void initResTemplate() {
if (null == restTemplate) { if (null == restTemplate) {
......
...@@ -512,4 +512,5 @@ public class TDispatchInfo extends BaseEntity { ...@@ -512,4 +512,5 @@ public class TDispatchInfo extends BaseEntity {
} }
...@@ -961,4 +961,28 @@ public class TSocialFundInfo extends BaseEntity { ...@@ -961,4 +961,28 @@ public class TSocialFundInfo extends BaseEntity {
@ExcelAttribute(name = "个人公积金金额") @ExcelAttribute(name = "个人公积金金额")
@ExcelProperty("个人公积金金额") @ExcelProperty("个人公积金金额")
private BigDecimal personalFundSum; private BigDecimal personalFundSum;
/**
* 社保状态:派增(0待审核、1待办理、2办理中 3办理成功、4部分办理失败 5 办理失败)、派减(6待审核 7待办理 8办理成功 9 办理失败)
*/
@ExcelAttribute(name = "社保状态", maxLength = 1)
@Schema(description = "社保状态:派增(0待审核、1待办理、2办理中 3办理成功、4部分办理失败 5 办理失败)、派减(6待审核 7待办理 8办理成功 9 办理失败)" )
@ExcelProperty("社保派增状态" )
private String socialStatus;
/**
* 公积金状态:派增(0待审核、1待办理、3办理成功、4办理失败)、派减(5待审核 6待办理 7 办理成功 8 办理失败)
*/
@Length(max = 1, message = "公积金状态 不能超过1个字符" )
@ExcelAttribute(name = "公积金状态", maxLength = 1)
@Schema(description = "公积金状态:派增(0待审核、1待办理、3办理成功、4办理失败)、派减(5待审核 6待办理 7 办理成功 8 办理失败)" )
@ExcelProperty("公积金状态" )
private String fundStatus;
/**
* 派单ID (实时更新)
*/
@ExcelAttribute(name = "派单ID", maxLength = 32)
@Schema(description = "派单ID" )
@ExcelProperty("派单ID" )
private String dispatchId;
} }
...@@ -437,4 +437,12 @@ public class TDispatchImportVo extends RowIndex implements Serializable { ...@@ -437,4 +437,12 @@ public class TDispatchImportVo extends RowIndex implements Serializable {
@ExcelIgnore @ExcelIgnore
private String customerCode; private String customerCode;
/**
* 派单ID (实时更新)
*/
@ExcelIgnore
@Schema(description = "派单ID" )
@ExcelProperty("派单ID" )
private String dispatchId;
} }
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.social.vo;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttributeConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.RowIndex;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
* 派单信息记录表-批量派减
*
* @author fxj
* @date 2022-07-15 11:38:05
*/
@Data
public class TDispatchReduceVo extends RowIndex implements Serializable {
/**
* 员工姓名
*/
@Length(max = 50, message = "员工姓名 不能超过50 个字符" )
@ExcelAttribute(name = "员工姓名", maxLength = 50, isNotEmpty = true)
@Schema(description = "员工姓名" )
@ExcelProperty("员工姓名" )
private String empName;
/**
* 身份证号
*/
@Length(max = 20, message = "身份证号 不能超过20 个字符" )
@ExcelAttribute(name = "身份证号", maxLength = 20, isNotEmpty = true)
@Schema(description = "身份证号" )
@ExcelProperty("身份证号" )
private String empIdcard;
/**
* 社保停缴日期
*/
@ExcelAttribute(name = "社保停缴日期", isDate = true)
@Schema(description = "社保停缴日期:购买社保时必填" )
@ExcelProperty("社保停缴日期" )
private Date socialReduceDate;
/**
* 公积金停缴日期
*/
@ExcelAttribute(name = "公积金停缴日期", isDate = true)
@Schema(description = "公积金停缴日期" )
@ExcelProperty("公积金停缴日期" )
private Date fundReduceDate;
/**
* 离职日期
*/
@ExcelAttribute(name = "离职日期", isDate = true)
@Schema(description = "离职日期" )
@ExcelProperty("离职日期" )
private Date leaveDate;
/**
* 减少原因
*/
@ExcelAttribute(name = "减少原因",isNotEmpty = true, isDataId = true,dataType = ExcelAttributeConstants.REDUCE_PROJECT_REASON)
@Schema(description = "减少原因" )
@ExcelProperty("减少原因" )
private String reasonType;
/**
* 委托备注
*/
@ExcelAttribute(name = "委托备注")
@Schema(description = "委托备注" )
@ExcelProperty("委托备注" )
private String trustRemark;
}
...@@ -125,7 +125,7 @@ public class TDispatchInfoController { ...@@ -125,7 +125,7 @@ public class TDispatchInfoController {
@DeleteMapping("/{id}" ) @DeleteMapping("/{id}" )
@PreAuthorize("@pms.hasPermission('demo_tdispatchinfo_del')" ) @PreAuthorize("@pms.hasPermission('demo_tdispatchinfo_del')" )
public R<Boolean> removeById(@PathVariable String id) { public R<Boolean> removeById(@PathVariable String id) {
return R.ok(tDispatchInfoService.removeById(id)); return tDispatchInfoService.removeByIdDiy(id);
} }
/** /**
...@@ -154,4 +154,19 @@ public class TDispatchInfoController { ...@@ -154,4 +154,19 @@ public class TDispatchInfoController {
public void export(HttpServletResponse response, @RequestBody TDispatchInfoSearchVo searchVo) { public void export(HttpServletResponse response, @RequestBody TDispatchInfoSearchVo searchVo) {
tDispatchInfoService.listExport(response,searchVo); tDispatchInfoService.listExport(response,searchVo);
} }
/**
* 派单信息记录表 批量导入-派减
*
* @author fxj
* @date 2022-07-15 11:38:05
**/
@SneakyThrows
@Operation(description = "派单信息记录表 批量导入-派减 hasPermission('demo_tdispatchinfo-batch-reduce')")
@SysLog("派单信息记录表 批量导入-派减")
@PostMapping("/importListReduce")
//@PreAuthorize("@pms.hasPermission('demo_tdispatchinfo-batch-reduce')")
public R<List<ErrorMessage>> importListReduce(@RequestBody MultipartFile file){
return tDispatchInfoService.importReduceDiy(file.getInputStream());
}
} }
...@@ -46,4 +46,8 @@ public interface TDispatchInfoService extends IService<TDispatchInfo> { ...@@ -46,4 +46,8 @@ public interface TDispatchInfoService extends IService<TDispatchInfo> {
void listExport(HttpServletResponse response, TDispatchInfoSearchVo searchVo); void listExport(HttpServletResponse response, TDispatchInfoSearchVo searchVo);
List<TDispatchInfo> noPageDiy(TDispatchInfoSearchVo searchVo); List<TDispatchInfo> noPageDiy(TDispatchInfoSearchVo searchVo);
R<List<ErrorMessage>> importReduceDiy(InputStream inputStream);
R<Boolean> removeByIdDiy(String id);
} }
...@@ -152,7 +152,9 @@ ...@@ -152,7 +152,9 @@
<result property="personalSocialSum" column="PERSONAL_SOCIAL_SUM"/> <result property="personalSocialSum" column="PERSONAL_SOCIAL_SUM"/>
<result property="unitInterestFee" column="UNIT_INTEREST_FEE"/> <result property="unitInterestFee" column="UNIT_INTEREST_FEE"/>
<result property="personalInterestFee" column="PERSONAL_INTEREST_FEE"/> <result property="personalInterestFee" column="PERSONAL_INTEREST_FEE"/>
<result property="socialStatus" column="SOCIAL_STATUS"/>
<result property="fundStatus" column="FUND_STATUS"/>
<result property="dispatchId" column="DISPATCH_ID"/>
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
...@@ -280,7 +282,10 @@ ...@@ -280,7 +282,10 @@
a.UNIT_SOCIAL_SUM, a.UNIT_SOCIAL_SUM,
a.PERSONAL_SOCIAL_SUM, a.PERSONAL_SOCIAL_SUM,
a.UNIT_INTEREST_FEE, a.UNIT_INTEREST_FEE,
a.PERSONAL_INTEREST_FEE a.PERSONAL_INTEREST_FEE,
a.SOCIAL_STATUS,
a.FUND_STATUS,
a.DISPATCH_ID
</sql> </sql>
<sql id="tSocialFundInfo_where"> <sql id="tSocialFundInfo_where">
<if test="tSocialFundInfo != null"> <if test="tSocialFundInfo != null">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment