Commit 99796814 authored by fangxinjiang's avatar fangxinjiang

批量办理 100%

parent 8e0cdd53
...@@ -160,4 +160,44 @@ public class EmpContractDispatchVo implements Serializable { ...@@ -160,4 +160,44 @@ public class EmpContractDispatchVo implements Serializable {
@ExcelAttribute(name = "备注", maxLength = 200) @ExcelAttribute(name = "备注", maxLength = 200)
@Schema(description = "备注", name = "remark") @Schema(description = "备注", name = "remark")
private String remark; private String remark;
/**
* 档案-省
*/
@ExcelAttribute(name = "档案-省", maxLength = 32, isDataId = true, isArea = true, parentField = "")
@Schema(description = "档案-省", name = "fileProvince")
private Integer fileProvince;
/**
* 档案-市
*/
@ExcelAttribute(name = "档案-市", maxLength = 32, isDataId = true, isArea = true, parentField = "fileProvince")
@Schema(description = "档案-市", name = "fileCity")
private Integer fileCity;
/**
* 档案-县
*/
@ExcelAttribute(name = "档案-县", maxLength = 32, isDataId = true, isArea = true, parentField = "fileCity")
@Schema(description = "档案-县", name = "fileTown")
private Integer fileTown;
/**
* 客户id
*/
@Schema(description = "客户id")
private String customerId;
/**
* 客户编码
*/
@Schema(description = "客户编码")
private String unitNo;
/**
* 项目
*/
@NotBlank(message = "项目不能为空")
@Length(max = 32, message = "项目不能超过32个字符")
@ExcelAttribute(name = "项目", errorInfo = "项目不能为空", isOrgan = true, maxLength = 32)
@Schema(description = "项目", name = "settleDomain")
private String settleDomain;
} }
package com.yifu.cloud.plus.v1.yifu.archives.vo; package com.yifu.cloud.plus.v1.yifu.archives.vo;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty; import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.FieldFill;
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;
...@@ -9,6 +13,7 @@ import lombok.Data; ...@@ -9,6 +13,7 @@ import lombok.Data;
import javax.validation.constraints.NotNull; import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size; import javax.validation.constraints.Size;
import java.io.Serializable; import java.io.Serializable;
import java.time.LocalDateTime;
/** /**
* @Author fxj * @Author fxj
...@@ -97,4 +102,73 @@ public class EmpProjectDispatchVo implements Serializable { ...@@ -97,4 +102,73 @@ public class EmpProjectDispatchVo implements Serializable {
@Schema(description ="员工项目编码") @Schema(description ="员工项目编码")
@Size(max = 20, message = "员工项目编码不可超过20位") @Size(max = 20, message = "员工项目编码不可超过20位")
private String empNo; private String empNo;
/**
* 创建者-姓名
*/
@Schema(description = "创建人-姓名")
@TableField(fill = FieldFill.INSERT)
@ExcelProperty("创建人")
private String createName;
/**
* 创建者
*/
@Schema(description = "创建人")
@TableField(fill = FieldFill.INSERT)
@ExcelIgnore
private String createBy;
/**
* 业务类型一级分类
*/
@Schema(description ="业务类型一级分类")
private String businessPrimaryType;
/**
* 业务类型二级分类
*/
@Schema(description ="业务类型二级分类")
private String businessSecondType;
/**
* 业务类型三级分类
*/
@Schema(description ="业务类型三级分类")
private String businessThirdType;
/**
* 客户id
*/
@Schema(description ="客户id")
private String unitId;
/**
* 客户名称
*/
@Schema(description ="客户名称")
private String unitName;
/**
* 客户编码
*/
@Schema(description ="客户编码")
private String unitNo;
/**
* 社保-省
*/
@Schema(description = "社保-省")
private Integer socialProvince;
/**
* 社保-市
*/
@Schema(description = "社保-市")
private Integer socialCity;
/**
* 社保-县
*/
@Schema(description = "社保-县")
private Integer socialTown;
} }
...@@ -60,5 +60,27 @@ public class ProjectSetInfoVo implements Serializable { ...@@ -60,5 +60,27 @@ public class ProjectSetInfoVo implements Serializable {
@Schema(description = "商险结算类型") @Schema(description = "商险结算类型")
private String insuranceSettleType = CommonConstants.ONE_STRING; private String insuranceSettleType = CommonConstants.ONE_STRING;
/**
* 业务类型一级分类
*/
@Schema(description ="业务类型一级分类")
private String businessPrimaryType;
/**
* 业务类型二级分类
*/
@Schema(description ="业务类型二级分类")
private String businessSecondType;
/**
* 业务类型三级分类
*/
@Schema(description ="业务类型三级分类")
private String businessThirdType;
/**
* 服务状态:0正常 1停止服务
*/
@Schema(description = "服务状态:0正常 1停止服务")
private String stopFlag;
} }
...@@ -2106,6 +2106,10 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T ...@@ -2106,6 +2106,10 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
emp = empAddsMap.get(contract.getEmpIdcard()); emp = empAddsMap.get(contract.getEmpIdcard());
if (Common.isNotNull(emp)){ if (Common.isNotNull(emp)){
contract.setEmpId(emp.getId()); contract.setEmpId(emp.getId());
contract.setEmpNatrue(emp.getEmpNatrue());
contract.setFileProvince(emp.getFileProvince());
contract.setFileCity(emp.getFileCity());
contract.setFileTown(emp.getFileTown());
} }
} }
contractMapper.insert(contract); contractMapper.insert(contract);
......
...@@ -193,12 +193,16 @@ ...@@ -193,12 +193,16 @@
</select> </select>
<select id="getSetInfoByCodes" resultType="com.yifu.cloud.plus.v1.yifu.archives.vo.ProjectSetInfoVo"> <select id="getSetInfoByCodes" resultType="com.yifu.cloud.plus.v1.yifu.archives.vo.ProjectSetInfoVo">
SELECT a.ID, SELECT a.ID,
a.DEPART_NO, a.DEPART_NO,
a.DEPART_NAME, a.DEPART_NAME,
a.INSURANCE_SETTLE_TYPE, a.INSURANCE_SETTLE_TYPE,
c.ID AS 'customerId', c.ID AS 'customerId',
c.CUSTOMER_NAME as 'customerName', c.CUSTOMER_NAME as 'customerName',
c.CUSTOMER_CODE as 'customerCode' c.CUSTOMER_CODE as 'customerCode',
a.BUSINESS_PRIMARY_TYPE,
a.BUSINESS_SECOND_TYPE,
a.BUSINESS_THIRD_TYPE,
a.STOP_FLAG
FROM t_settle_domain a FROM t_settle_domain a
LEFT JOIN t_customer_info c ON a.CUSTOMER_ID = c.ID LEFT JOIN t_customer_info c ON a.CUSTOMER_ID = c.ID
where 1=1 where 1=1
......
...@@ -185,6 +185,12 @@ public @interface ExcelAttribute { ...@@ -185,6 +185,12 @@ public @interface ExcelAttribute {
*/ */
public abstract boolean isOrgan() default false; public abstract boolean isOrgan() default false;
/**
* 是否转义,默认 true 如果是字典会转义, false不会转义值
* @return
*/
public abstract boolean isConvert() default true;
/** /**
* 是否为区域数据 前提:isDataId = true * 是否为区域数据 前提:isDataId = true
* @Author fxj * @Author fxj
......
...@@ -464,4 +464,8 @@ public interface ErrorCodes { ...@@ -464,4 +464,8 @@ public interface ErrorCodes {
* 派增异常: 系统无对应项目档案,档案相关同色字段必填 * 派增异常: 系统无对应项目档案,档案相关同色字段必填
*/ */
String EMP_DISPATCH_EMP_NOT_EMPTY = "emp.dispatch.emp.not.empty"; String EMP_DISPATCH_EMP_NOT_EMPTY = "emp.dispatch.emp.not.empty";
/**
* 派增异常: 对应项目编码已停止合作
*/
String EMP_DISPATCH_SETTLEDOMAIN_STOP = "emp.dispatch.settleDomain.stop";
} }
...@@ -475,7 +475,11 @@ public class ExcelUtil <T> implements Serializable { ...@@ -475,7 +475,11 @@ public class ExcelUtil <T> implements Serializable {
boolean flag = true; boolean flag = true;
for (Map.Entry<String,String> entry:dicObj.entrySet()){ for (Map.Entry<String,String> entry:dicObj.entrySet()){
if (Common.isNotNull(entry.getValue()) && entry.getValue().equals(c.trim())){ if (Common.isNotNull(entry.getValue()) && entry.getValue().equals(c.trim())){
tempStr = entry.getKey(); if (attr.isConvert()){
tempStr = entry.getKey();
}else {
tempStr = c;
}
flag = false; flag = false;
break; break;
} }
......
...@@ -175,6 +175,8 @@ emp.dispatch.emp.contract.not.empty=\u6D3E\u589E\u5F02\u5E38\uFF1A \u5408\u540C\ ...@@ -175,6 +175,8 @@ emp.dispatch.emp.contract.not.empty=\u6D3E\u589E\u5F02\u5E38\uFF1A \u5408\u540C\
emp.dispatch.emp.not.empty=\u6D3E\u589E\u5F02\u5E38\uFF1A \u7CFB\u7EDF\u65E0\u5BF9\u5E94\u9879\u76EE\u6863\u6848\uFF0C\u6863\u6848\u76F8\u5173\u540C\u8272\u5B57\u6BB5\u5FC5\u586B emp.dispatch.emp.not.empty=\u6D3E\u589E\u5F02\u5E38\uFF1A \u7CFB\u7EDF\u65E0\u5BF9\u5E94\u9879\u76EE\u6863\u6848\uFF0C\u6863\u6848\u76F8\u5173\u540C\u8272\u5B57\u6BB5\u5FC5\u586B
emp.dispatch.settleDomain.stop=\u6D3E\u589E\u5F02\u5E38\uFF1A \u5BF9\u5E94\u9879\u76EE\u7F16\u7801\u5DF2\u505C\u6B62\u5408\u4F5C
......
...@@ -553,12 +553,12 @@ public class TSocialFundInfo extends BaseEntity { ...@@ -553,12 +553,12 @@ public class TSocialFundInfo extends BaseEntity {
@ExcelProperty("补缴是否采用最新基数0是1否" ) @ExcelProperty("补缴是否采用最新基数0是1否" )
private String latestCardinality; private String latestCardinality;
/** /**
* 大病是否收费:0否 1 是 * 大病是否收费:0收取;1不收取
*/ */
@Length(max = 1, message = "大病是否收费:0否 1 是 不能超过1个字符" ) @Length(max = 1, message = "大病是否收费:0收取;1不收取 不能超过1个字符" )
@ExcelAttribute(name = "大病是否收费:0否 1 是", maxLength = 1) @ExcelAttribute(name = "大病是否收费:0收取;1不收取", maxLength = 1)
@Schema(description = "大病是否收费:0否 1 是" ) @Schema(description = "大病是否收费:0收取;1不收取" )
@ExcelProperty("大病是否收费:0否 1 是" ) @ExcelProperty("大病是否收费:0收取;1不收取" )
private String isIllness; private String isIllness;
/** /**
* 大病缴纳周期:0按年1按月 * 大病缴纳周期:0按年1按月
......
...@@ -392,12 +392,12 @@ public class TSocialInfo extends BaseEntity { ...@@ -392,12 +392,12 @@ public class TSocialInfo extends BaseEntity {
@ExcelProperty("个人大病金额" ) @ExcelProperty("个人大病金额" )
private BigDecimal personalBigailmentMoney; private BigDecimal personalBigailmentMoney;
/** /**
* 大病取值方式0 按比例 1按定值 * 大病取值方式 0.按定值1比例
*/ */
@Length(max = 1, message = "大病取值方式0 按比例 1按定值 不能超过1个字符" ) @Length(max = 1, message = "大病取值方式 0.按定值1比例 不能超过1个字符" )
@ExcelAttribute(name = "大病取值方式0 按比例 1按定值", maxLength = 1) @ExcelAttribute(name = "大病取值方式 0.按定值1比例", maxLength = 1)
@Schema(description = "大病取值方式0 按比例 1按定值" ) @Schema(description = "大病取值方式 0.按定值1比例" )
@ExcelProperty("大病取值方式0 按比例 1按定值" ) @ExcelProperty("大病取值方式 0.按定值1比例" )
private String valueType; private String valueType;
/** /**
* 个人大病比例 * 个人大病比例
...@@ -414,12 +414,12 @@ public class TSocialInfo extends BaseEntity { ...@@ -414,12 +414,12 @@ public class TSocialInfo extends BaseEntity {
@ExcelProperty("单位大病救助比例" ) @ExcelProperty("单位大病救助比例" )
private BigDecimal unitBigailmentPer; private BigDecimal unitBigailmentPer;
/** /**
* 是否收取大病费用0否 1 是 * 是否收取大病费用: 0收取;1不收取
*/ */
@Length(max = 1, message = "是否收取大病费用0否 1 是 不能超过1个字符" ) @Length(max = 1, message = "是否收取大病费用0收取;1不收取 不能超过1个字符" )
@ExcelAttribute(name = "是否收取大病费用0否 1 是", maxLength = 1) @ExcelAttribute(name = "是否收取大病费用0收取;1不收取", maxLength = 1)
@Schema(description = "是否收取大病费用0否 1 是" ) @Schema(description = "是否收取大病费用0收取;1不收取" )
@ExcelProperty("是否收取大病费用0否 1 是" ) @ExcelProperty("是否收取大病费用0收取;1不收取" )
private String isIllness; private String isIllness;
/** /**
* 大病按年收收取月份1-12月 * 大病按年收收取月份1-12月
......
...@@ -191,7 +191,7 @@ public class TDispatchImportVo extends RowIndex implements Serializable { ...@@ -191,7 +191,7 @@ public class TDispatchImportVo extends RowIndex implements Serializable {
* 合同类型 * 合同类型
*/ */
@Length(max = 32, message = "合同类型 不能超过32 个字符" ) @Length(max = 32, message = "合同类型 不能超过32 个字符" )
@ExcelAttribute(name = "合同类型", maxLength = 32, isDataId = true,dataType = ExcelAttributeConstants.PERSONNEL_TYPE) @ExcelAttribute(name = "合同类型", maxLength = 32, isDataId = true,isConvert = false,dataType = ExcelAttributeConstants.PERSONNEL_TYPE)
@Schema(description = "合同类型" ) @Schema(description = "合同类型" )
@ExcelProperty("合同类型" ) @ExcelProperty("合同类型" )
private String contractName; private String contractName;
......
...@@ -409,12 +409,12 @@ public class TSocialInfoVo extends RowIndex implements Serializable { ...@@ -409,12 +409,12 @@ public class TSocialInfoVo extends RowIndex implements Serializable {
@ExcelProperty("单位大病救助比例" ) @ExcelProperty("单位大病救助比例" )
private BigDecimal unitBigailmentPer; private BigDecimal unitBigailmentPer;
/** /**
* 是否收取大病费用0否 1 是 * 是否收取大病费用0收取;1不收取
*/ */
@Length(max = 1, message = "是否收取大病费用0否 1 是 不能超过1 个字符" ) @Length(max = 1, message = "是否收取大病费用0收取;1不收取 不能超过1 个字符" )
@ExcelAttribute(name = "是否收取大病费用0否 1 是", maxLength = 1) @ExcelAttribute(name = "是否收取大病费用0收取;1不收取", maxLength = 1)
@Schema(description = "是否收取大病费用0否 1 是" ) @Schema(description = "是否收取大病费用0收取;1不收取" )
@ExcelProperty("是否收取大病费用0否 1 是" ) @ExcelProperty("是否收取大病费用0收取;1不收取" )
private String isIllness; private String isIllness;
/** /**
* 大病按年收收取月份1-12月 * 大病按年收收取月份1-12月
......
...@@ -354,7 +354,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -354,7 +354,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
continue; continue;
} }
// 初始化新增信息:档案、项目档案、员工合同 // 初始化新增信息:档案、项目档案、员工合同
initAddInfo(empAddsMap, contractsMap, projectsMap, empVo, excel); initAddInfo(empAddsMap, contractsMap, projectsMap, empVo, excel,user,setInfoVo,socialSet);
// 新增社保 // 新增社保
initSocialAddInfo(socialsMap, empVo, socialSet, excel,socialFundMap); initSocialAddInfo(socialsMap, empVo, socialSet, excel,socialFundMap);
// 新增公积金 // 新增公积金
...@@ -903,29 +903,30 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -903,29 +903,30 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
private void initAddInfo(Map<String, EmpAddDispatchVo> empAdds, private void initAddInfo(Map<String, EmpAddDispatchVo> empAdds,
Map<String, EmpContractDispatchVo> contracts, Map<String, EmpContractDispatchVo> contracts,
Map<String, EmpProjectDispatchVo> projects, Map<String, EmpProjectDispatchVo> projects,
DispatchEmpVo empVo, TDispatchImportVo excel) { DispatchEmpVo empVo, TDispatchImportVo excel,
YifuUser user, ProjectSetInfoVo setInfoVo, SysBaseSetInfo socialSet) {
// 无档案无项目档案无合同无学历 // 无档案无项目档案无合同无学历
if (Common.isEmpty(empVo) || Common.isEmpty(empVo.getId())) { if (Common.isEmpty(empVo) || Common.isEmpty(empVo.getId())) {
// 初始化档案 // 初始化档案
initEmpAddInfo(empAdds, excel); initEmpAddInfo(empAdds, excel,user);
// 初始化项目档案 // 初始化项目档案
initProjectInfo(projects, excel, empVo); initProjectInfo(projects, excel, empVo,user,setInfoVo,socialSet);
// 初始化合同 // 初始化合同
initContractInfo(contracts, excel, empVo); initContractInfo(contracts, excel, empVo,setInfoVo);
} }
// 有档案无项目档案无合同 // 有档案无项目档案无合同
if (Common.isNotNull(empVo) && Common.isEmpty(empVo.getDeptNo())) { if (Common.isNotNull(empVo) && Common.isEmpty(empVo.getDeptNo())) {
// 初始化项目档案 // 初始化项目档案
initProjectInfo(projects, excel, empVo); initProjectInfo(projects, excel, empVo, user, setInfoVo, socialSet);
// 初始化合同 // 初始化合同
initContractInfo(contracts, excel, empVo); initContractInfo(contracts, excel, empVo, setInfoVo);
} }
// 有档案有项目档案无合同 // 有档案有项目档案无合同
if (Common.isNotNull(empVo) if (Common.isNotNull(empVo)
&& Common.isNotNull(empVo.getDeptNo()) && Common.isNotNull(empVo.getDeptNo())
&& Common.isEmpty(empVo.getContractType())) { && Common.isEmpty(empVo.getContractType())) {
// 初始化合同 // 初始化合同
initContractInfo(contracts, excel, empVo); initContractInfo(contracts, excel, empVo, setInfoVo);
} }
} }
...@@ -1064,17 +1065,18 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -1064,17 +1065,18 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
}else if (CommonConstants.ONE_STRING.equals(social.getCollectType())) { }else if (CommonConstants.ONE_STRING.equals(social.getCollectType())) {
//收取方式按月 //收取方式按月
if (CommonConstants.ZERO_STRING.equals(social.getValueType())) { if (CommonConstants.ZERO_STRING.equals(social.getValueType())) {
//收取大病按比例
social.setUnitBigailmentMoney(BigDecimalUtils.safeMultiply(social.getUnitBigailmentCardinal(), socialSet.getPayCompanyPro(), BigDecimal.valueOf(CommonConstants.ONE_OF_PERCENT.doubleValue())));
social.setPersonalBigailmentMoney(BigDecimalUtils.safeMultiply(social.getPersonalBigailmentCardinal(), socialSet.getPayPersonalPro(), BigDecimal.valueOf(CommonConstants.ONE_OF_PERCENT.doubleValue())));
} else if (CommonConstants.ONE_STRING.equals(social.getValueType()) && Common.isNotNull(socialSet)) {
//收取大病方式按定值 //收取大病方式按定值
social.setUnitBigailmentMoney(socialSet.getChargeCompany()); social.setUnitBigailmentMoney(socialSet.getPayCompany());
social.setPersonalBigailmentMoney(socialSet.getChargePersonal()); social.setPersonalBigailmentMoney(socialSet.getPayPersonal());
social.setPersonalBigailmentCardinal(null); social.setPersonalBigailmentCardinal(null);
social.setPersonalBigailmentPer(null); social.setPersonalBigailmentPer(null);
social.setUnitBigailmentCardinal(null); social.setUnitBigailmentCardinal(null);
social.setUnitBigailmentPer(null); social.setUnitBigailmentPer(null);
} else if (CommonConstants.ONE_STRING.equals(social.getValueType()) && Common.isNotNull(socialSet)) {
//收取大病按比例
social.setUnitBigailmentMoney(BigDecimalUtils.safeMultiply(social.getUnitBigailmentCardinal(), socialSet.getPayCompanyPro(), BigDecimal.valueOf(CommonConstants.ONE_OF_PERCENT.doubleValue())));
social.setPersonalBigailmentMoney(BigDecimalUtils.safeMultiply(social.getPersonalBigailmentCardinal(), socialSet.getPayPersonalPro(), BigDecimal.valueOf(CommonConstants.ONE_OF_PERCENT.doubleValue())));
} }
} }
} }
...@@ -1149,7 +1151,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -1149,7 +1151,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
.in(SysBaseSetInfo::getDepartName,socialholds) .in(SysBaseSetInfo::getDepartName,socialholds)
.eq(SysBaseSetInfo::getStatus,CommonConstants.ZERO_STRING) .eq(SysBaseSetInfo::getStatus,CommonConstants.ZERO_STRING)
.eq(SysBaseSetInfo::getDeleteFlag, CommonConstants.ZERO_STRING) .eq(SysBaseSetInfo::getDeleteFlag, CommonConstants.ZERO_STRING)
.and(obj-> obj.isNotNull(SysBaseSetInfo::getApplyEndDate).or().ge(SysBaseSetInfo::getApplyEndDate,now)) .and(obj-> obj.isNull(SysBaseSetInfo::getApplyEndDate).or().ge(SysBaseSetInfo::getApplyEndDate,now))
.groupBy(SysBaseSetInfo::getDepartName)); .groupBy(SysBaseSetInfo::getDepartName));
if (Common.isNotNull(socialBases)) { if (Common.isNotNull(socialBases)) {
for (SysBaseSetInfo set:socialBases){ for (SysBaseSetInfo set:socialBases){
...@@ -1171,7 +1173,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -1171,7 +1173,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
private void initContractInfo(Map<String, EmpContractDispatchVo> contracts, private void initContractInfo(Map<String, EmpContractDispatchVo> contracts,
TDispatchImportVo excel, TDispatchImportVo excel,
DispatchEmpVo empVo) { DispatchEmpVo empVo, ProjectSetInfoVo setInfoVo) {
// 合同开始时间和截止时间一致直接跳过 // 合同开始时间和截止时间一致直接跳过
if (Common.isNotNull(excel.getContractStart()) if (Common.isNotNull(excel.getContractStart())
&& Common.isNotNull(empVo) && Common.isNotNull(empVo)
...@@ -1199,19 +1201,27 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -1199,19 +1201,27 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
if (Common.isEmpty(excel.getSocialHousehold()) && Common.isNotNull(excel.getProvidentHousehold())){ if (Common.isEmpty(excel.getSocialHousehold()) && Common.isNotNull(excel.getProvidentHousehold())){
contract.setContractParty(excel.getSocialHousehold()); contract.setContractParty(excel.getSocialHousehold());
} }
contract.setSettleDomain(setInfoVo.getId());
contract.setDeptNo(setInfoVo.getDepartNo());
contract.setCustomerId(setInfoVo.getCustomerId());
if (Common.isNotNull(empVo)) { if (Common.isNotNull(empVo)) {
contract.setEmpId(empVo.getId()); contract.setEmpId(empVo.getId());
contract.setEmpNo(empVo.getEmpNo()); contract.setEmpNo(empVo.getEmpNo());
contract.setEmpType(empVo.getEmpNatrue()); contract.setEmpType(empVo.getEmpNatrue());
contract.setFileProvince(empVo.getFileProvince());
contract.setFileCity(empVo.getFileCity());
contract.setFileTown(empVo.getFileTown());
} }
contracts.put(excel.getEmpIdcard()+CommonConstants.DOWN_LINE_STRING+excel.getSettleDomainCode(),contract); contracts.put(excel.getEmpIdcard()+CommonConstants.DOWN_LINE_STRING+excel.getSettleDomainCode(),contract);
} }
private void initProjectInfo(Map<String, EmpProjectDispatchVo> projects, private void initProjectInfo(Map<String, EmpProjectDispatchVo> projects,
TDispatchImportVo excel, TDispatchImportVo excel,
DispatchEmpVo empVo) { DispatchEmpVo empVo, YifuUser user, ProjectSetInfoVo setInfoVo, SysBaseSetInfo socialSet) {
EmpProjectDispatchVo project; EmpProjectDispatchVo project;
project = new EmpProjectDispatchVo(); project = new EmpProjectDispatchVo();
project.setCreateBy(user.getId());
project.setCreateName(user.getNickname());
project.setDeptNo(excel.getSettleDomainCode()); project.setDeptNo(excel.getSettleDomainCode());
project.setContractType(excel.getContractType()); project.setContractType(excel.getContractType());
project.setEmpIdcard(excel.getEmpIdcard()); project.setEmpIdcard(excel.getEmpIdcard());
...@@ -1219,17 +1229,32 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -1219,17 +1229,32 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
project.setEmpNatrue(excel.getEmpType()); project.setEmpNatrue(excel.getEmpType());
project.setPost(excel.getPost()); project.setPost(excel.getPost());
project.setWorkingHours(excel.getWorkingHours()); project.setWorkingHours(excel.getWorkingHours());
if (Common.isNotNull(socialSet)){
project.setSocialProvince(socialSet.getProvince());
project.setSocialCity(socialSet.getCity());
project.setSocialTown(socialSet.getTown());
}
if (Common.isNotNull(empVo)) { if (Common.isNotNull(empVo)) {
project.setEmpId(empVo.getId()); project.setEmpId(empVo.getId());
project.setEmpCode(empVo.getEmpCode()); project.setEmpCode(empVo.getEmpCode());
project.setEmpNo(empVo.getEmpNo()); project.setEmpNo(empVo.getEmpNo());
} }
if (Common.isNotNull(setInfoVo)){
project.setBusinessPrimaryType(setInfoVo.getBusinessPrimaryType());
project.setBusinessSecondType(setInfoVo.getBusinessSecondType());
project.setBusinessThirdType(setInfoVo.getBusinessThirdType());
project.setUnitId(setInfoVo.getCustomerId());
project.setUnitName(setInfoVo.getCustomerName());
project.setUnitNo(setInfoVo.getCustomerCode());
}
projects.put(excel.getEmpIdcard()+CommonConstants.DOWN_LINE_STRING+excel.getSettleDomainCode(),project); projects.put(excel.getEmpIdcard()+CommonConstants.DOWN_LINE_STRING+excel.getSettleDomainCode(),project);
} }
private void initEmpAddInfo(Map<String, EmpAddDispatchVo> empAdds, TDispatchImportVo excel) { private void initEmpAddInfo(Map<String, EmpAddDispatchVo> empAdds, TDispatchImportVo excel, YifuUser user) {
EmpAddDispatchVo emp; EmpAddDispatchVo emp;
emp = new EmpAddDispatchVo(); emp = new EmpAddDispatchVo();
emp.setCreateBy(user.getId());
emp.setCreateName(user.getNickname());
emp.setEmpIdcard(excel.getEmpIdcard()); emp.setEmpIdcard(excel.getEmpIdcard());
emp.setEmpName(excel.getEmpName()); emp.setEmpName(excel.getEmpName());
emp.setEmpNational(excel.getEmpNational()); emp.setEmpNational(excel.getEmpNational());
...@@ -1359,6 +1384,10 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -1359,6 +1384,10 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), MsgUtils.getMessage(ErrorCodes.EMP_DISPATCH_PROJECT_NOT_FOUND))); errorMessageList.add(new ErrorMessage(excel.getRowIndex(), MsgUtils.getMessage(ErrorCodes.EMP_DISPATCH_PROJECT_NOT_FOUND)));
return true; return true;
} }
if (CommonConstants.ONE_STRING.equals(setInfoVo.getStopFlag())){
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), MsgUtils.getMessage(ErrorCodes.EMP_DISPATCH_SETTLEDOMAIN_STOP)));
return true;
}
if (Common.isEmpty(empVo)){ if (Common.isEmpty(empVo)){
if (Common.isEmpty(excel.getFileProvince()) if (Common.isEmpty(excel.getFileProvince())
|| Common.isEmpty(excel.getFileCity()) || Common.isEmpty(excel.getFileCity())
......
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