Commit e238d405 authored by fangxinjiang's avatar fangxinjiang

批量办理 100%

parent 29a27c01
...@@ -30,8 +30,15 @@ public class DispatchEmpVo implements Serializable { ...@@ -30,8 +30,15 @@ public class DispatchEmpVo implements Serializable {
*/ */
@Schema(description = "主键") @Schema(description = "主键")
private String id; private String id;
@ExcelProperty(value = "员工主码") @ExcelProperty(value = "员工主码")
private String empCode; private String empCode;
/**
* 员工项目编码
*/
@ExcelProperty(value = "员工项目编码")
private String empNo;
@Schema(description = "员工类型") @Schema(description = "员工类型")
@ExcelAttribute(name = "员工类型", isDataId = true,dataType = ExcelAttributeConstants.EMP_NATRUE) @ExcelAttribute(name = "员工类型", isDataId = true,dataType = ExcelAttributeConstants.EMP_NATRUE)
...@@ -191,4 +198,9 @@ public class DispatchEmpVo implements Serializable { ...@@ -191,4 +198,9 @@ public class DispatchEmpVo implements Serializable {
@Schema(description = "业务细分(存lable)", name = "contractName") @Schema(description = "业务细分(存lable)", name = "contractName")
private String contractSubName; private String contractSubName;
/**
* 项目状态(0正常;1已减项)
*/
@Schema(description ="项目状态(0正常;1已减项)")
private Integer projectStatus;
} }
...@@ -31,10 +31,10 @@ public class EmpProjectDispatchVo implements Serializable { ...@@ -31,10 +31,10 @@ public class EmpProjectDispatchVo implements Serializable {
@Size(max = 32, message = "人员档案主表id不可超过32位") @Size(max = 32, message = "人员档案主表id不可超过32位")
private String empId; private String empId;
/** /**
* 员工 * 员工
*/ */
@Schema(description ="员工码") @Schema(description ="员工码")
@Size(max = 20, message = "员工码不可超过20位") @Size(max = 20, message = "员工码不可超过20位")
private String empCode; private String empCode;
/** /**
* 员工类型(字典值,0外包1派遣2代理) * 员工类型(字典值,0外包1派遣2代理)
...@@ -92,9 +92,9 @@ public class EmpProjectDispatchVo implements Serializable { ...@@ -92,9 +92,9 @@ public class EmpProjectDispatchVo implements Serializable {
private String post; private String post;
/** /**
* 员工编码 * 员工项目编码
*/ */
@Schema(description ="员工编码") @Schema(description ="员工项目编码")
@Size(max = 20, message = "员工编码不可超过20位") @Size(max = 20, message = "员工项目编码不可超过20位")
private String empNo; private String empNo;
} }
...@@ -59,6 +59,4 @@ public class ProjectSetInfoVo implements Serializable { ...@@ -59,6 +59,4 @@ public class ProjectSetInfoVo implements Serializable {
*/ */
@Schema(description = "商险结算类型") @Schema(description = "商险结算类型")
private String insuranceSettleType = CommonConstants.ONE_STRING; private String insuranceSettleType = CommonConstants.ONE_STRING;
} }
...@@ -19,19 +19,15 @@ package com.yifu.cloud.plus.v1.yifu.archives.controller; ...@@ -19,19 +19,15 @@ package com.yifu.cloud.plus.v1.yifu.archives.controller;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysArea;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpFamily; import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpFamily;
import com.yifu.cloud.plus.v1.yifu.archives.service.TEmpFamilyService; import com.yifu.cloud.plus.v1.yifu.archives.service.TEmpFamilyService;
import com.yifu.cloud.plus.v1.yifu.archives.vo.DispatchCheckVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.FamilySearchVO; import com.yifu.cloud.plus.v1.yifu.archives.vo.FamilySearchVO;
import com.yifu.cloud.plus.v1.yifu.archives.vo.ProjectSetInfoVo;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants; 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.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage; import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage;
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.DaprCheckProperties; import com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprCheckProperties;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.ArchivesDaprUtil; import com.yifu.cloud.plus.v1.yifu.common.dapr.util.ArchivesDaprUtil;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.UpmsDaprUtils;
import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog; import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.tags.Tag;
...@@ -44,10 +40,8 @@ import org.springframework.security.access.prepost.PreAuthorize; ...@@ -44,10 +40,8 @@ import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.List; import java.util.List;
import java.util.Map;
/** /**
......
...@@ -2110,6 +2110,7 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T ...@@ -2110,6 +2110,7 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
} }
contractMapper.insert(contract); contractMapper.insert(contract);
contractAdd.setId(contract.getId()); contractAdd.setId(contract.getId());
contractAdd.setEmpNo(contract.getEmpNo());
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) {
...@@ -2131,8 +2132,10 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T ...@@ -2131,8 +2132,10 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
employeeInfo = new TEmployeeInfo(); employeeInfo = new TEmployeeInfo();
BeanUtil.copyProperties(empAdd, employeeInfo); BeanUtil.copyProperties(empAdd, employeeInfo);
employeeInfo.setEmpCode(getCode()); employeeInfo.setEmpCode(getCode());
employeeInfo.setStatus(CommonConstants.ZERO_INT);
baseMapper.insert(employeeInfo); baseMapper.insert(employeeInfo);
empAdd.setId(employeeInfo.getId()); empAdd.setId(employeeInfo.getId());
empAdd.setEmpCode(employeeInfo.getEmpCode());
empAddsMap.put(empAdd.getEmpIdcard(), empAdd); empAddsMap.put(empAdd.getEmpIdcard(), empAdd);
} }
} catch (Exception e) { } catch (Exception e) {
......
...@@ -142,6 +142,8 @@ ...@@ -142,6 +142,8 @@
<result property="fileTown" column="FILE_TOWN"/> <result property="fileTown" column="FILE_TOWN"/>
<result property="hignEducation" column="HIGN_EDUCATION"/> <result property="hignEducation" column="HIGN_EDUCATION"/>
<result property="fileStatus" column="FILE_STATUS"/> <result property="fileStatus" column="FILE_STATUS"/>
<result property="projectStatus" column="PROJECT_STATUS"/>
<result property="contractName" column="CONTRACT_NAME"/> <result property="contractName" column="CONTRACT_NAME"/>
<result property="contractType" column="CONTRACT_TYPE"/> <result property="contractType" column="CONTRACT_TYPE"/>
...@@ -157,6 +159,8 @@ ...@@ -157,6 +159,8 @@
<result property="deptName" column="DEPT_NAME"/> <result property="deptName" column="DEPT_NAME"/>
<result property="deptNo" column="DEPT_NO"/> <result property="deptNo" column="DEPT_NO"/>
<result property="post" column="POST"/> <result property="post" column="POST"/>
<result property="empNo" column="EMP_NO"/>
</resultMap> </resultMap>
<sql id="baseParam"> <sql id="baseParam">
a a
...@@ -673,7 +677,7 @@ ...@@ -673,7 +677,7 @@
b.CONTRACT_START,b.CONTRACT_END,b.CONTRACT_TERM,b.CONTRACT_SUB_NAME,b.CONTRACT_ID, b.CONTRACT_START,b.CONTRACT_END,b.CONTRACT_TERM,b.CONTRACT_SUB_NAME,b.CONTRACT_ID,
c.UNIT_NAME, c.UNIT_NAME,
c.UNIT_NO,c.DEPT_ID,c.DEPT_NAME,c.DEPT_NO,c.POST c.UNIT_NO,c.DEPT_ID,c.DEPT_NAME,c.DEPT_NO,c.POST,c.EMP_NO,c.PROJECT_STATUS
from ( from (
select e.ID,e.EMP_CODE,e.EMP_NATRUE,e.EMP_NAME,e.EMP_IDCARD,e.EMP_NATIONAL,e.EMP_PHONE,e.ID_PROVINCE,e.ID_CITY, select e.ID,e.EMP_CODE,e.EMP_NATRUE,e.EMP_NAME,e.EMP_IDCARD,e.EMP_NATIONAL,e.EMP_PHONE,e.ID_PROVINCE,e.ID_CITY,
e.ID_TOWN,e.EMP_REGIS_TYPE,e.FILE_PROVINCE,e.FILE_CITY,e.FILE_TOWN,e.HIGN_EDUCATION,e.FILE_STATUS e.ID_TOWN,e.EMP_REGIS_TYPE,e.FILE_PROVINCE,e.FILE_CITY,e.FILE_TOWN,e.HIGN_EDUCATION,e.FILE_STATUS
...@@ -689,7 +693,7 @@ ...@@ -689,7 +693,7 @@
</if> </if>
) a ) a
left join ( left join (
select p.UNIT_NAME,p.UNIT_NO,p.DEPT_ID,p.DEPT_NAME,p.DEPT_NO,p.POST,p.EMP_ID select p.UNIT_NAME,p.UNIT_NO,p.DEPT_ID,p.DEPT_NAME,p.DEPT_NO,p.POST,p.EMP_ID,p.EMP_NO,P.PROJECT_STATUS
from t_employee_project p from t_employee_project p
where 1=1 where 1=1
<if test="checkVo != null"> <if test="checkVo != null">
......
...@@ -290,7 +290,7 @@ public interface CommonConstants { ...@@ -290,7 +290,7 @@ public interface CommonConstants {
public static final String ZIP_TYPE = "zip"; public static final String ZIP_TYPE = "zip";
int BATCH_COUNT = 100; int BATCH_COUNT = 100;
String IMPORT_DATA_ANALYSIS_ERROR = "数据导入解析异常,请检查表数据格式"; String IMPORT_DATA_ANALYSIS_ERROR = "数据导入解析异常,请检查表数据格式(1.日期格式:yyyy-MM-dd,2.比例为整数且不含%)";
String CREATE_TIME = "CREATE_TIME"; String CREATE_TIME = "CREATE_TIME";
String ID = "ID"; String ID = "ID";
String PARAM_IS_NOT_ERROR = "传参异常,请检查参数"; String PARAM_IS_NOT_ERROR = "传参异常,请检查参数";
......
...@@ -337,7 +337,7 @@ public interface ErrorCodes { ...@@ -337,7 +337,7 @@ public interface ErrorCodes {
String EMP_DISPATCH_SOCIAL_NOT_EMPTY = "emp.dispatch.social.not.empty"; String EMP_DISPATCH_SOCIAL_NOT_EMPTY = "emp.dispatch.social.not.empty";
/** /**
* 派单信息不可为空 * 派单公积金信息不可为空
*/ */
String EMP_DISPATCH_FUND_NOT_EMPTY = "emp.dispatch.fund.not.empty"; String EMP_DISPATCH_FUND_NOT_EMPTY = "emp.dispatch.fund.not.empty";
...@@ -424,4 +424,16 @@ public interface ErrorCodes { ...@@ -424,4 +424,16 @@ public interface ErrorCodes {
* 派增异常: 自定义缴纳养老基数不可为空 * 派增异常: 自定义缴纳养老基数不可为空
*/ */
String EMP_DISPATCH_SOCIAL_DIY_NOT_EMPTY = "emp.dispatch.social.diy.not.empty"; String EMP_DISPATCH_SOCIAL_DIY_NOT_EMPTY = "emp.dispatch.social.diy.not.empty";
/**
* 派增异常: 对应项目编码的项目档案已减项,请去项目档案处复项
*/
String EMP_DISPATCH_EMP_PROJECT_NOT_USED = "emp.dispatch.emp.project.not.used";
/**
* 派增异常: 对应身份证的人员档案已减档
*/
String EMP_DISPATCH_EMP_NOT_USED = "emp.dispatch.emp.not.used";
/**
* 派增异常: 社保派单基数不可小于最低基数且不可大于最高基数
*/
String EMP_DISPATCH_SOCIAL_LIMIT_ERROR = "emp.dispatch.social.limit.error";
} }
...@@ -312,7 +312,7 @@ public class ExcelUtil <T> implements Serializable { ...@@ -312,7 +312,7 @@ public class ExcelUtil <T> implements Serializable {
} }
if (Common.isNotNull(tempStr)){ if (Common.isNotNull(tempStr)){
c = tempStr; c = tempStr;
mapArea.put(tempStr,field); mapArea.put(tempStr+CommonConstants.DOWN_LINE_STRING+attr.name(),field);
} }
// 取得类型,并根据对象类型设置值. // 取得类型,并根据对象类型设置值.
fieldType = field.getType(); fieldType = field.getType();
...@@ -377,7 +377,7 @@ public class ExcelUtil <T> implements Serializable { ...@@ -377,7 +377,7 @@ public class ExcelUtil <T> implements Serializable {
} }
if (Common.isNotNull(mapArea)){ if (Common.isNotNull(mapArea)){
for (Map.Entry<String, Field> entry: mapArea.entrySet()){ for (Map.Entry<String, Field> entry: mapArea.entrySet()){
entry.getValue().set(data,entry.getKey()); entry.getValue().set(data,entry.getKey().substring(0,entry.getKey().indexOf(CommonConstants.DOWN_LINE_STRING)));
} }
} }
}catch (Exception e){ }catch (Exception e){
......
...@@ -153,7 +153,13 @@ emp.dispatch.reduce.exists=\u6D3E\u51CF\u5F02\u5E38\uFF1A \u672C\u6B21\u6D3E\u58 ...@@ -153,7 +153,13 @@ emp.dispatch.reduce.exists=\u6D3E\u51CF\u5F02\u5E38\uFF1A \u672C\u6B21\u6D3E\u58
socialinfo.list.num.large=\u5F53\u524D\u793E\u4FDD\u5BFC\u5165\u961F\u5217\u4E0D\u8DB3\u6216\u8005\u6570\u636E\u91CF\u8FC7\u5927\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\uFF01 socialinfo.list.num.large=\u5F53\u524D\u793E\u4FDD\u5BFC\u5165\u961F\u5217\u4E0D\u8DB3\u6216\u8005\u6570\u636E\u91CF\u8FC7\u5927\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\uFF01
emp.dispatch.social.diy.not.empty=\u6D3E\u589E\u5F02\u5E38\uFF1A \u81EA\u5B9A\u4E49\u7F34\u7EB3\u517B\u8001\u57FA\u6570\u4E0D\u53EF\u4E3A\u7A7A
emp.dispatch.emp.project.not.used=\u6D3E\u589E\u5F02\u5E38\uFF1A \u5BF9\u5E94\u9879\u76EE\u7F16\u7801\u7684\u9879\u76EE\u6863\u6848\u5DF2\u51CF\u9879\uFF0C\u8BF7\u53BB\u9879\u76EE\u6863\u6848\u5904\u590D\u9879
emp.dispatch.emp.not.used=\u6D3E\u589E\u5F02\u5E38\uFF1A \u5BF9\u5E94\u8EAB\u4EFD\u8BC1\u7684\u4EBA\u5458\u6863\u6848\u5DF2\u51CF\u6863
emp.dispatch.social.limit.error=\u6D3E\u589E\u5F02\u5E38\uFF1A \u793E\u4FDD\u6D3E\u5355\u57FA\u6570\u4E0D\u53EF\u5C0F\u4E8E\u6700\u4F4E\u57FA\u6570\u4E14\u4E0D\u53EF\u5927\u4E8E\u6700\u9AD8\u57FA\u6570
......
...@@ -38,7 +38,7 @@ public class DispatchConstants { ...@@ -38,7 +38,7 @@ public class DispatchConstants {
/** /**
* 社保派单 * 社保派单
* '缴纳类型(0最低缴纳、1自定义缴纳、2最高缴纳) PAYMENT_TYPE * '缴纳类型(0最低缴纳、1自定义、2最高缴纳) PAYMENT_TYPE
*/ */
enum PaymentType { enum PaymentType {
LATEST("0", "最低"), LATEST("0", "最低"),
......
...@@ -298,11 +298,11 @@ public class TSocialFundHistory extends BaseEntity { ...@@ -298,11 +298,11 @@ public class TSocialFundHistory extends BaseEntity {
@ExcelProperty("个人公积金金额" ) @ExcelProperty("个人公积金金额" )
private BigDecimal personalFundMoney; private BigDecimal personalFundMoney;
/** /**
* 缴纳类型(0最低缴纳、1自定义缴纳、2最高缴纳) * 缴纳类型(0最低缴纳、1自定义、2最高缴纳)
*/ */
@ExcelAttribute(name = "缴纳类型(0最低缴纳、1自定义缴纳、2最高缴纳)" ) @ExcelAttribute(name = "缴纳类型(0最低缴纳、1自定义、2最高缴纳)" )
@Schema(description = "缴纳类型(0最低缴纳、1自定义缴纳、2最高缴纳)" ) @Schema(description = "缴纳类型(0最低缴纳、1自定义、2最高缴纳)" )
@ExcelProperty("缴纳类型(0最低缴纳、1自定义缴纳、2最高缴纳)" ) @ExcelProperty("缴纳类型(0最低缴纳、1自定义、2最高缴纳)" )
private Integer paymentType; private Integer paymentType;
/** /**
* 是否是社保:0否1是 * 是否是社保:0否1是
......
...@@ -610,10 +610,10 @@ public class TSocialFundInfo extends BaseEntity { ...@@ -610,10 +610,10 @@ public class TSocialFundInfo extends BaseEntity {
/** /**
* 缴纳类型(0最低缴纳、1自定义缴纳、2最高缴纳) * 缴纳类型(0最低缴纳、1自定义缴纳、2最高缴纳)
*/ */
@Length(max = 1, message = "缴纳类型(0最低缴纳、1自定义缴纳、2最高缴纳) 不能超过1个字符" ) @Length(max = 1, message = "缴纳类型(0最低缴纳、1自定义、2最高缴纳) 不能超过1个字符" )
@ExcelAttribute(name = "缴纳类型(0最低缴纳、1自定义缴纳、2最高缴纳)", maxLength = 1) @ExcelAttribute(name = "缴纳类型(0最低缴纳、1自定义、2最高缴纳)", maxLength = 1)
@Schema(description = "缴纳类型(0最低缴纳、1自定义缴纳、2最高缴纳)" ) @Schema(description = "缴纳类型(0最低缴纳、1自定义、2最高缴纳)" )
@ExcelProperty("缴纳类型(0最低缴纳、1自定义缴纳、2最高缴纳)" ) @ExcelProperty("缴纳类型(0最低缴纳、1自定义、2最高缴纳)" )
private String paymentType; private String paymentType;
/** /**
* 基数上限(社保或公积金) * 基数上限(社保或公积金)
......
...@@ -625,12 +625,12 @@ public class TSocialInfo extends BaseEntity { ...@@ -625,12 +625,12 @@ public class TSocialInfo extends BaseEntity {
@ExcelProperty("电信编号" ) @ExcelProperty("电信编号" )
private String telecomNumber; private String telecomNumber;
/** /**
* 缴纳类型(0最低缴纳、1自定义缴纳、2最高缴纳) * 缴纳类型(0最低缴纳、1自定义、2最高缴纳)
*/ */
@Length(max = 1, message = "缴纳类型(0最低缴纳、1自定义缴纳、2最高缴纳) 不能超过1个字符" ) @Length(max = 1, message = "缴纳类型(0最低缴纳、1自定义、2最高缴纳) 不能超过1个字符" )
@ExcelAttribute(name = "缴纳类型(0最低缴纳、1自定义缴纳、2最高缴纳)", maxLength = 1) @ExcelAttribute(name = "缴纳类型(0最低缴纳、1自定义、2最高缴纳)", maxLength = 1)
@Schema(description = "缴纳类型(0最低缴纳、1自定义缴纳、2最高缴纳)" ) @Schema(description = "缴纳类型(0最低缴纳、1自定义、2最高缴纳)" )
@ExcelProperty("缴纳类型(0最低缴纳、1自定义缴纳、2最高缴纳)" ) @ExcelProperty("缴纳类型(0最低缴纳、1自定义、2最高缴纳)" )
private String paymentType; private String paymentType;
/** /**
* 备案基数 * 备案基数
......
...@@ -203,10 +203,10 @@ public class SocialHandleExportVo implements Serializable { ...@@ -203,10 +203,10 @@ public class SocialHandleExportVo implements Serializable {
private String recordBase; private String recordBase;
/** /**
* 缴纳类型(0最低缴纳、1自定义缴纳、2最高缴纳) * 缴纳类型(0最低缴纳、1自定义、2最高缴纳)
*/ */
@ExcelAttribute(name = "缴纳类型",isDataId = true,readConverterExp = "0=最低缴纳,1=自定义缴纳,2=最高缴纳",needExport = true) @ExcelAttribute(name = "缴纳类型",isDataId = true,readConverterExp = "0=最低缴纳,1=自定义,2=最高缴纳",needExport = true)
@Schema(description = "缴纳类型(0最低缴纳、1自定义缴纳、2最高缴纳)") @Schema(description = "缴纳类型(0最低缴纳、1自定义、2最高缴纳)")
@ExcelProperty("缴纳类型" ) @ExcelProperty("缴纳类型" )
private Integer paymentType; private Integer paymentType;
/** /**
......
...@@ -130,7 +130,7 @@ public class TDispatchImportVo extends RowIndex implements Serializable { ...@@ -130,7 +130,7 @@ public class TDispatchImportVo extends RowIndex implements Serializable {
/** /**
* 档案-县 * 档案-县
*/ */
@ExcelAttribute(name = "档案-县" ,isArea = true,parentField = "fileCity", isNotEmpty = true) @ExcelAttribute(name = "档案-县" ,isArea = true,parentField = "fileCity")
@Schema(description = "档案-县" ) @Schema(description = "档案-县" )
@ExcelProperty("档案-县" ) @ExcelProperty("档案-县" )
private String fileTown; private String fileTown;
...@@ -239,9 +239,9 @@ public class TDispatchImportVo extends RowIndex implements Serializable { ...@@ -239,9 +239,9 @@ public class TDispatchImportVo extends RowIndex implements Serializable {
/** /**
* 学历名称 * 学历名称
*/ */
@ExcelAttribute(name = "学历",isDataId = true,dataType = ExcelAttributeConstants.EDUCATION) @ExcelAttribute(name = "学历")
@NotNull(message = "学历不可为空") @NotNull(message = "学历不可为空")
@Schema(description = "学历:无档案的时候 新增档案时同步新增学历" ) @Schema(description = "学历:派增只做记录" )
@ExcelProperty(value ="学历") @ExcelProperty(value ="学历")
private String educationName; private String educationName;
...@@ -306,11 +306,11 @@ public class TDispatchImportVo extends RowIndex implements Serializable { ...@@ -306,11 +306,11 @@ public class TDispatchImportVo extends RowIndex implements Serializable {
@ExcelProperty("大病起缴日期" ) @ExcelProperty("大病起缴日期" )
private Date bigailmentStart; private Date bigailmentStart;
/** /**
* 缴纳类型(0最低缴纳、1自定义缴纳、2最高缴纳) * 缴纳类型(0最低缴纳、1自定义、2最高缴纳)
*/ */
@Length(max = 1, message = "缴纳类型 不能超过1 个字符" ) @Length(max = 1, message = "缴纳类型 不能超过1 个字符" )
@ExcelAttribute(name = "缴纳类型", isDataId = true, readConverterExp = "0=最低缴纳,1=自定义缴纳,2=最高缴纳") @ExcelAttribute(name = "缴纳类型", isDataId = true, readConverterExp = "0=最低缴纳,1=自定义,2=最高缴纳")
@Schema(description = "缴纳类型:(0最低缴纳、1自定义缴纳、2最高缴纳)" ) @Schema(description = "缴纳类型:(0最低缴纳、1自定义、2最高缴纳)" )
@ExcelProperty("缴纳类型" ) @ExcelProperty("缴纳类型" )
private String paymentType; private String paymentType;
......
...@@ -50,8 +50,8 @@ public class TSocialFundHistoryVo extends RowIndex implements Serializable { ...@@ -50,8 +50,8 @@ public class TSocialFundHistoryVo extends RowIndex implements Serializable {
@ExcelProperty("身份证号") @ExcelProperty("身份证号")
private String empIdcard; private String empIdcard;
@ExcelAttribute(name = "缴纳类型", isNotEmpty = true, errorInfo = "缴纳类型必填", readConverterExp = "0=最低缴纳,1=自定义缴纳,2=最高缴纳") @ExcelAttribute(name = "缴纳类型", isNotEmpty = true, errorInfo = "缴纳类型必填", readConverterExp = "0=最低缴纳,1=自定义,2=最高缴纳")
@Schema(description = "缴纳类型(0最低缴纳、1自定义缴纳、2最高缴纳)") @Schema(description = "缴纳类型(0最低缴纳、1自定义、2最高缴纳)")
@ExcelProperty("缴纳类型") @ExcelProperty("缴纳类型")
private String paymentType; private String paymentType;
......
...@@ -303,8 +303,8 @@ public class TSocialFundInfoExportVo extends RowIndex implements Serializable { ...@@ -303,8 +303,8 @@ public class TSocialFundInfoExportVo extends RowIndex implements Serializable {
@ExcelProperty("大病起缴日期") @ExcelProperty("大病起缴日期")
private Date bigailmentStart; private Date bigailmentStart;
@ExcelAttribute(name = "缴纳类型", readConverterExp = "0=最低缴纳,1=自定义缴纳,2=最高缴纳") @ExcelAttribute(name = "缴纳类型", readConverterExp = "0=最低缴纳,1=自定义,2=最高缴纳")
@Schema(description = "缴纳类型(0最低缴纳、1自定义缴纳、2最高缴纳)") @Schema(description = "缴纳类型(0最低缴纳、1自定义、2最高缴纳)")
@ExcelProperty("缴纳类型") @ExcelProperty("缴纳类型")
private String paymentType; private String paymentType;
......
...@@ -301,8 +301,8 @@ public class TSocialFundInfoVo extends RowIndex implements Serializable { ...@@ -301,8 +301,8 @@ public class TSocialFundInfoVo extends RowIndex implements Serializable {
@ExcelProperty("大病起缴日期") @ExcelProperty("大病起缴日期")
private Date bigailmentStart; private Date bigailmentStart;
@ExcelAttribute(name = "缴纳类型", readConverterExp = "0=最低缴纳,1=自定义缴纳,2=最高缴纳") @ExcelAttribute(name = "缴纳类型", readConverterExp = "0=最低缴纳,1=自定义,2=最高缴纳")
@Schema(description = "缴纳类型(0最低缴纳、1自定义缴纳、2最高缴纳)") @Schema(description = "缴纳类型(0最低缴纳、1自定义、2最高缴纳)")
@ExcelProperty("缴纳类型") @ExcelProperty("缴纳类型")
private String paymentType; private String paymentType;
......
...@@ -622,10 +622,10 @@ public class TSocialInfoVo extends RowIndex implements Serializable { ...@@ -622,10 +622,10 @@ public class TSocialInfoVo extends RowIndex implements Serializable {
/** /**
* 缴纳类型(0最低缴纳、1自定义缴纳、2最高缴纳) * 缴纳类型(0最低缴纳、1自定义缴纳、2最高缴纳)
*/ */
@Length(max = 1, message = "缴纳类型(0最低缴纳、1自定义缴纳、2最高缴纳) 不能超过1 个字符" ) @Length(max = 1, message = "缴纳类型(0最低缴纳、1自定义、2最高缴纳) 不能超过1 个字符" )
@ExcelAttribute(name = "缴纳类型(0最低缴纳、1自定义缴纳、2最高缴纳)", maxLength = 1) @ExcelAttribute(name = "缴纳类型(0最低缴纳、1自定义、2最高缴纳)", maxLength = 1)
@Schema(description = "缴纳类型(0最低缴纳、1自定义缴纳、2最高缴纳)" ) @Schema(description = "缴纳类型(0最低缴纳、1自定义、2最高缴纳)" )
@ExcelProperty("缴纳类型(0最低缴纳、1自定义缴纳、2最高缴纳)" ) @ExcelProperty("缴纳类型(0最低缴纳、1自定义、2最高缴纳)" )
private String paymentType; private String paymentType;
/** /**
* 备案基数 * 备案基数
......
...@@ -28,24 +28,21 @@ import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog; ...@@ -28,24 +28,21 @@ import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog;
import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils; import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
import com.yifu.cloud.plus.v1.yifu.social.entity.TDispatchInfo; import com.yifu.cloud.plus.v1.yifu.social.entity.TDispatchInfo;
import com.yifu.cloud.plus.v1.yifu.social.service.TDispatchInfoService; import com.yifu.cloud.plus.v1.yifu.social.service.TDispatchInfoService;
import com.yifu.cloud.plus.v1.yifu.social.vo.*; import com.yifu.cloud.plus.v1.yifu.social.vo.DispatchDetailVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.FundSupplementaryExportVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.SocialHandleSearchVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchInfoSearchVo;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.SneakyThrows; import lombok.SneakyThrows;
import lombok.extern.log4j.Log4j2; import lombok.extern.log4j.Log4j2;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.OutputStream;
import java.net.URLEncoder;
import java.time.LocalDateTime;
import java.util.HashMap;
import java.util.List; import java.util.List;
/** /**
...@@ -73,6 +70,7 @@ public class TDispatchInfoController { ...@@ -73,6 +70,7 @@ public class TDispatchInfoController {
@Operation(description = "简单分页查询") @Operation(description = "简单分页查询")
@GetMapping("/page") @GetMapping("/page")
public R<IPage<TDispatchInfo>> getTDispatchInfoPage(Page<TDispatchInfo> page, TDispatchInfoSearchVo tDispatchInfo) { public R<IPage<TDispatchInfo>> getTDispatchInfoPage(Page<TDispatchInfo> page, TDispatchInfoSearchVo tDispatchInfo) {
tDispatchInfo.setDeleteFlag(CommonConstants.ZERO_STRING);
return new R<>(tDispatchInfoService.getTDispatchInfoPage(page,tDispatchInfo)); return new R<>(tDispatchInfoService.getTDispatchInfoPage(page,tDispatchInfo));
} }
...@@ -85,6 +83,7 @@ public class TDispatchInfoController { ...@@ -85,6 +83,7 @@ public class TDispatchInfoController {
@PostMapping("/noPage" ) @PostMapping("/noPage" )
//@PreAuthorize("@pms.hasPermission('demo_tdispatchinfo_get')" ) //@PreAuthorize("@pms.hasPermission('demo_tdispatchinfo_get')" )
public R<List<TDispatchInfo>> getTDispatchInfoNoPage(@RequestBody TDispatchInfoSearchVo tDispatchInfo) { public R<List<TDispatchInfo>> getTDispatchInfoNoPage(@RequestBody TDispatchInfoSearchVo tDispatchInfo) {
tDispatchInfo.setDeleteFlag(CommonConstants.ZERO_STRING);
return R.ok(tDispatchInfoService.noPageDiy(tDispatchInfo)); return R.ok(tDispatchInfoService.noPageDiy(tDispatchInfo));
} }
/** /**
...@@ -101,6 +100,7 @@ public class TDispatchInfoController { ...@@ -101,6 +100,7 @@ public class TDispatchInfoController {
return R.failed(CommonConstants.USER_FAIL); return R.failed(CommonConstants.USER_FAIL);
} }
tDispatchInfo.setCreateBy(user.getId()); tDispatchInfo.setCreateBy(user.getId());
tDispatchInfo.setDeleteFlag(CommonConstants.ZERO_STRING);
return new R<>(tDispatchInfoService.getTDispatchInfoPage(page,tDispatchInfo)); return new R<>(tDispatchInfoService.getTDispatchInfoPage(page,tDispatchInfo));
} }
...@@ -114,6 +114,7 @@ public class TDispatchInfoController { ...@@ -114,6 +114,7 @@ public class TDispatchInfoController {
@GetMapping("/pageAudit") @GetMapping("/pageAudit")
public R<IPage<TDispatchInfo>> getTDispatchAuditPage(Page<TDispatchInfo> page, TDispatchInfoSearchVo tDispatchInfo) { public R<IPage<TDispatchInfo>> getTDispatchAuditPage(Page<TDispatchInfo> page, TDispatchInfoSearchVo tDispatchInfo) {
tDispatchInfo.setStatus(CommonConstants.ZERO_STRING); tDispatchInfo.setStatus(CommonConstants.ZERO_STRING);
tDispatchInfo.setDeleteFlag(CommonConstants.ZERO_STRING);
return new R<>(tDispatchInfoService.getTDispatchInfoPage(page,tDispatchInfo)); return new R<>(tDispatchInfoService.getTDispatchInfoPage(page,tDispatchInfo));
} }
...@@ -130,6 +131,7 @@ public class TDispatchInfoController { ...@@ -130,6 +131,7 @@ public class TDispatchInfoController {
List<String> settleDomains = null; List<String> settleDomains = null;
// 获取自定义sql TODO // 获取自定义sql TODO
String sql = CommonConstants.EMPTY_STRING; String sql = CommonConstants.EMPTY_STRING;
tDispatchInfo.setDeleteFlag(CommonConstants.ZERO_STRING);
return new R<>(tDispatchInfoService.getTDispatchSocialHandlePage(page,tDispatchInfo,settleDomains,sql)); return new R<>(tDispatchInfoService.getTDispatchSocialHandlePage(page,tDispatchInfo,settleDomains,sql));
} }
...@@ -146,6 +148,7 @@ public class TDispatchInfoController { ...@@ -146,6 +148,7 @@ public class TDispatchInfoController {
List<String> settleDomains = null; List<String> settleDomains = null;
// 获取自定义sql TODO // 获取自定义sql TODO
String sql = CommonConstants.EMPTY_STRING; String sql = CommonConstants.EMPTY_STRING;
tDispatchInfo.setDeleteFlag(CommonConstants.ZERO_STRING);
return new R<>(tDispatchInfoService.getTDispatchFundHandlePage(page,tDispatchInfo,settleDomains,sql)); return new R<>(tDispatchInfoService.getTDispatchFundHandlePage(page,tDispatchInfo,settleDomains,sql));
} }
/** /**
...@@ -262,9 +265,9 @@ public class TDispatchInfoController { ...@@ -262,9 +265,9 @@ public class TDispatchInfoController {
* @Param * @Param
* @return * @return
**/ **/
@Operation(description = "派单申请批量审核,传参派单ID hasPermission('wxhr:tdispatchinfo_addApplyAudit')") @Operation(description = "派单申请批量审核,传参派单ID hasPermission('wxhr:tdispatchinfo_addApplyAudit') auditStatus:1审核通过 2审核不通过")
@PostMapping("/addApplyAudit") @PostMapping("/addApplyAudit")
@PreAuthorize("@pms.hasPermission('wxhr:tdispatchinfo_addApplyAudit')") //@PreAuthorize("@pms.hasPermission('wxhr:tdispatchinfo_addApplyAudit')")
public R<List<ErrorMessage>> addApplyAudit(@RequestParam(name = "ids", required = true) String ids, public R<List<ErrorMessage>> addApplyAudit(@RequestParam(name = "ids", required = true) String ids,
@RequestParam(name = "auditStatus", required = true) String auditStatus, @RequestParam(name = "auditStatus", required = true) String auditStatus,
@RequestParam(name = "auditRemark", required = false) String auditRemark) { @RequestParam(name = "auditRemark", required = false) String auditRemark) {
...@@ -283,9 +286,9 @@ public class TDispatchInfoController { ...@@ -283,9 +286,9 @@ public class TDispatchInfoController {
* @Author fxj * @Author fxj
* @Date 2019-09-27 * @Date 2019-09-27
**/ **/
@Operation(description = "派单批量办理,传参派单ID hasPermission('wxhr:tdispatchinfo_addApplyHandle')") @Operation(description = "派单批量办理,传参派单ID hasPermission('wxhr:tdispatchinfo_addApplyHandle') handleStatus 1 办理成功 2 办理失败")
@PostMapping("/addApplyHandle") @PostMapping("/addApplyHandle")
@PreAuthorize("@pms.hasPermission('wxhr:tdispatchinfo_addApplyHandle')") //@PreAuthorize("@pms.hasPermission('wxhr:tdispatchinfo_addApplyHandle')")
public R<List<ErrorMessage>> addApplyHandle(@RequestParam(name = "ids", required = true) String ids, public R<List<ErrorMessage>> addApplyHandle(@RequestParam(name = "ids", required = true) String ids,
@RequestParam(name = "typeSub", required = true) String typeSub, @RequestParam(name = "typeSub", required = true) String typeSub,
@RequestParam(name = "auditStatus", required = true) String handleStatus, @RequestParam(name = "auditStatus", required = true) String handleStatus,
......
...@@ -85,6 +85,7 @@ public interface TDispatchInfoMapper extends BaseMapper<TDispatchInfo> { ...@@ -85,6 +85,7 @@ public interface TDispatchInfoMapper extends BaseMapper<TDispatchInfo> {
IPage<TDispatchInfo> getTDispatchSocialHandlePage(Page<TDispatchInfo> page, IPage<TDispatchInfo> getTDispatchSocialHandlePage(Page<TDispatchInfo> page,
@Param("tDispatchInfo") SocialHandleSearchVo tDispatchInfo, @Param("tDispatchInfo") SocialHandleSearchVo tDispatchInfo,
@Param("settleDomainIds")List<String> settleDomains, @Param("settleDomainIds")List<String> settleDomains,
@Param("idsStr") List<String> idsStr,
@Param("sql")String sql); @Param("sql")String sql);
/** /**
* 公积金办理页面查询 * 公积金办理页面查询
...@@ -98,6 +99,7 @@ public interface TDispatchInfoMapper extends BaseMapper<TDispatchInfo> { ...@@ -98,6 +99,7 @@ public interface TDispatchInfoMapper extends BaseMapper<TDispatchInfo> {
IPage<TDispatchInfo> getTDispatchFundHandlePage(Page<TDispatchInfo> page, IPage<TDispatchInfo> getTDispatchFundHandlePage(Page<TDispatchInfo> page,
@Param("tDispatchInfo")SocialHandleSearchVo tDispatchInfo, @Param("tDispatchInfo")SocialHandleSearchVo tDispatchInfo,
@Param("settleDomainIds")List<String> settleDomains, @Param("settleDomainIds")List<String> settleDomains,
@Param("idsStr") List<String> idsStr,
@Param("sql")String sql); @Param("sql")String sql);
/** /**
* @Author fxj * @Author fxj
......
...@@ -258,8 +258,8 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -258,8 +258,8 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
@Override @Override
@GlobalTransactional @GlobalTransactional
public void importTDispatchInfo(List<TDispatchImportVo> excelVOList, public void importTDispatchInfo(List<TDispatchImportVo> excelVOList,
List<ErrorMessage> errorMessageList, List<ErrorMessage> errorMessageList,
YifuUser user) { YifuUser user) {
if (!Common.isNotNull(excelVOList)){ if (!Common.isNotNull(excelVOList)){
return; return;
} }
...@@ -310,8 +310,11 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -310,8 +310,11 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
socialSet = socialHoldMap.get(excel.getSocialHousehold()); socialSet = socialHoldMap.get(excel.getSocialHousehold());
socialFund = getSocialFund(socialFundMap,excel); socialFund = getSocialFund(socialFundMap,excel);
setInfoVo = getSetInfoVo(projectVoMap,excel); setInfoVo = getSetInfoVo(projectVoMap,excel);
if (Common.isNotNull(empVoMap)) {
empVo = empVoMap.get(excel.getEmpIdcard());
}
// 数据合法情况 // 数据合法情况
if (validImport(errorMessageList, excel,setInfoVo,socialFundMap)) { if (validImport(errorMessageList, excel,setInfoVo,socialFundMap,empVo,socialSet)) {
excelVOTemp.put(excel.getEmpIdcard(),excel.getEmpIdcard()); excelVOTemp.put(excel.getEmpIdcard(),excel.getEmpIdcard());
continue; continue;
} }
...@@ -334,9 +337,6 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -334,9 +337,6 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
excelVOTemp.put(excel.getEmpIdcard(),excel.getEmpIdcard()); excelVOTemp.put(excel.getEmpIdcard(),excel.getEmpIdcard());
continue; continue;
} }
if (Common.isNotNull(empVoMap)) {
empVo = empVoMap.get(excel.getEmpIdcard());
}
// 初始化新增信息:档案、项目档案、员工合同 // 初始化新增信息:档案、项目档案、员工合同
initAddInfo(empAddsMap, contractsMap, projectsMap, empVo, excel); initAddInfo(empAddsMap, contractsMap, projectsMap, empVo, excel);
// 新增社保 // 新增社保
...@@ -396,7 +396,6 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -396,7 +396,6 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
Map<String, EmpContractDispatchVo> contractsMap = null; Map<String, EmpContractDispatchVo> contractsMap = null;
Map<String, EmpProjectDispatchVo> projectsMap = null; Map<String, EmpProjectDispatchVo> projectsMap = null;
TDispatchImportVo excel; TDispatchImportVo excel;
DispatchEmpVo empVo;
EmpContractDispatchVo contract = null; EmpContractDispatchVo contract = null;
EmpProjectDispatchVo project = null; EmpProjectDispatchVo project = null;
EmpAddDispatchVo emp = null; EmpAddDispatchVo emp = null;
...@@ -414,30 +413,28 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -414,30 +413,28 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
if (Common.isNotNull(excelVOTemp) && Common.isNotNull(excelVOTemp.get(excel.getEmpIdcard()))){ if (Common.isNotNull(excelVOTemp) && Common.isNotNull(excelVOTemp.get(excel.getEmpIdcard()))){
continue; continue;
} }
empVo = getEmpVoMap(empVoMap,excel);
// 验证档案是否插入成功 如果MAP 无数据直接不处理 // 验证档案是否插入成功 如果MAP 无数据直接不处理
if (Common.isEmpty(empVo) && Common.isNotNull(empAddsMap)){ if (Common.isNotNull(empAddsMap)){
emp = empAddsMap.get(excel.getEmpIdcard()); emp = empAddsMap.get(excel.getEmpIdcard());
if (Common.isEmpty(emp) || Common.isEmpty(emp.getId())){ if (Common.isNotNull(emp) && Common.isEmpty(emp.getId())){
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), MsgUtils.getMessage(ErrorCodes.EMP_DISPATCH_ADD_EMP_ERROR))); errorMessageList.add(new ErrorMessage(excel.getRowIndex(), MsgUtils.getMessage(ErrorCodes.EMP_DISPATCH_ADD_EMP_ERROR)));
continue; continue;
} }
}else if (Common.isNotNull(empVo)){ }
// 验证合同是否插入成功 // 验证合同是否插入成功
if (Common.isEmpty(empVo.getContractType()) && Common.isNotNull(contractsMap)){ if (Common.isNotNull(contractsMap)){
contract = contractsMap.get(excel.getEmpIdcard()+CommonConstants.DOWN_LINE_STRING+excel.getSettleDomainCode()); contract = contractsMap.get(excel.getEmpIdcard()+CommonConstants.DOWN_LINE_STRING+excel.getSettleDomainCode());
if (Common.isEmpty(contract) || Common.isEmpty(contract.getId())){ if (Common.isNotNull(contract) && Common.isEmpty(contract.getId())){
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), MsgUtils.getMessage(ErrorCodes.EMP_DISPATCH_ADD_CONTRACT_ERROR))); errorMessageList.add(new ErrorMessage(excel.getRowIndex(), MsgUtils.getMessage(ErrorCodes.EMP_DISPATCH_ADD_CONTRACT_ERROR)));
continue; continue;
}
} }
// 验证项目档案是否插入成功 }
if (Common.isEmpty(empVo.getEmpCode()) && Common.isNotNull(projectsMap)){ // 验证项目档案是否插入成功
project = projectsMap.get(excel.getEmpIdcard()+CommonConstants.DOWN_LINE_STRING+excel.getSettleDomainCode()); if (Common.isNotNull(projectsMap)){
if (Common.isEmpty(project) || Common.isEmpty(project.getId())){ project = projectsMap.get(excel.getEmpIdcard()+CommonConstants.DOWN_LINE_STRING+excel.getSettleDomainCode());
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), MsgUtils.getMessage(ErrorCodes.EMP_DISPATCH_ADD_PROJECT_ERROR))); if (Common.isNotNull(project) && Common.isEmpty(project.getId())){
continue; errorMessageList.add(new ErrorMessage(excel.getRowIndex(), MsgUtils.getMessage(ErrorCodes.EMP_DISPATCH_ADD_PROJECT_ERROR)));
} continue;
} }
} }
try { try {
...@@ -464,6 +461,9 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -464,6 +461,9 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
if (Common.isNotNull(contract)){ if (Common.isNotNull(contract)){
dispatch.setContractId(contract.getId()); dispatch.setContractId(contract.getId());
} }
if (Common.isNotNull(project)){
dispatch.setEmpNo(project.getEmpNo());
}
} }
insertDispatch(emp, dispatch); insertDispatch(emp, dispatch);
} }
...@@ -481,16 +481,11 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -481,16 +481,11 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
continue; continue;
} }
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), CommonConstants.SAVE_SUCCESS,CommonConstants.GREEN)); errorMessageList.add(new ErrorMessage(excel.getRowIndex(), CommonConstants.SAVE_SUCCESS,CommonConstants.GREEN));
// 清理map list 等数据
Common.clear(empAddsMap);
Common.clear(contractsMap);
Common.clear(projectsMap);
} }
} // 清理map list 等数据
Common.clear(empAddsMap);
private DispatchEmpVo getEmpVoMap(Map<String, DispatchEmpVo> empVoMap, TDispatchImportVo excel) { Common.clear(contractsMap);
return Common.isNotNull(empVoMap)?empVoMap.get(excel.getEmpIdcard()):null; Common.clear(projectsMap);
} }
private void insertSocial(EmpAddDispatchVo emp, TSocialInfo social) { private void insertSocial(EmpAddDispatchVo emp, TSocialInfo social) {
...@@ -522,6 +517,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -522,6 +517,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
dispatch.setSettleDomain(emp.getDeptId()); dispatch.setSettleDomain(emp.getDeptId());
dispatch.setSettleDomainName(emp.getDeptName()); dispatch.setSettleDomainName(emp.getDeptName());
} }
dispatch.setCreateTime(LocalDateTime.now());
baseMapper.insert(dispatch); baseMapper.insert(dispatch);
} }
} }
...@@ -550,6 +546,8 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -550,6 +546,8 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
if (Common.isEmpty(socialFund.getFirstBuyMonthSocial())){ if (Common.isEmpty(socialFund.getFirstBuyMonthSocial())){
socialFund.setFirstBuyMonthSocial(social.getSocialStartDate()); socialFund.setFirstBuyMonthSocial(social.getSocialStartDate());
} }
socialFund.setUnitBigailmentMoney(social.getUnitBigailmentMoney());
socialFund.setPersonalBigailmentMoney(social.getPersonalBigailmentMoney());
socialFund.setUnitPensionCardinal(social.getUnitPensionCardinal()); socialFund.setUnitPensionCardinal(social.getUnitPensionCardinal());
socialFund.setUnitMedicalCardinal(social.getUnitMedicalCardinal()); socialFund.setUnitMedicalCardinal(social.getUnitMedicalCardinal());
socialFund.setUnitUnemploymentCardinal(social.getUnitUnemploymentCardinal()); socialFund.setUnitUnemploymentCardinal(social.getUnitUnemploymentCardinal());
...@@ -671,7 +669,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -671,7 +669,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
if (Common.isEmpty(socialFund)){ if (Common.isEmpty(socialFund)){
socialFund = new TSocialFundInfo(); socialFund = new TSocialFundInfo();
if (Common.isNotNull(empVo)){ if (Common.isNotNull(empVo)){
socialFund.setEmpNo(empVo.getEmpCode()); socialFund.setEmpNo(empVo.getEmpNo());
socialFund.setEmpName(empVo.getEmpName()); socialFund.setEmpName(empVo.getEmpName());
socialFund.setEmpIdcard(empVo.getEmpIdcard()); socialFund.setEmpIdcard(empVo.getEmpIdcard());
socialFund.setEmpId(empVo.getId()); socialFund.setEmpId(empVo.getId());
...@@ -694,7 +692,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -694,7 +692,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
socialFund.setSocialStatus(CommonConstants.ZERO_STRING); socialFund.setSocialStatus(CommonConstants.ZERO_STRING);
socialFund.setSocialStartDate(excel.getPensionStart()); socialFund.setSocialStartDate(excel.getPensionStart());
if (Common.isNotNull(socialSet)){ if (Common.isNotNull(socialSet)){
socialFund.setSocialHousehold(socialSet.getId()); socialFund.setSocialHousehold(socialSet.getDepartId());
socialFund.setSocialHouseholdName(socialSet.getDepartName()); socialFund.setSocialHouseholdName(socialSet.getDepartName());
socialFund.setSocialProvince(Common.isNotNullToStr(socialSet.getProvince())); socialFund.setSocialProvince(Common.isNotNullToStr(socialSet.getProvince()));
socialFund.setSocialCity(Common.isNotNullToStr(socialSet.getCity())); socialFund.setSocialCity(Common.isNotNullToStr(socialSet.getCity()));
...@@ -712,7 +710,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -712,7 +710,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
socialFund.setUnitIdFund(setInfoVo.getCustomerId()); socialFund.setUnitIdFund(setInfoVo.getCustomerId());
socialFund.setFundStatus(CommonConstants.ZERO_STRING); socialFund.setFundStatus(CommonConstants.ZERO_STRING);
if (Common.isNotNull(fundSet)){ if (Common.isNotNull(fundSet)){
socialFund.setProvidentHousehold(fundSet.getId()); socialFund.setProvidentHousehold(fundSet.getDepartId());
socialFund.setProvidentHouseholdName(fundSet.getDepartName()); socialFund.setProvidentHouseholdName(fundSet.getDepartName());
socialFund.setFundProvince(Common.isNotNullToStr(fundSet.getProvince())); socialFund.setFundProvince(Common.isNotNullToStr(fundSet.getProvince()));
socialFund.setFundCity(Common.isNotNullToStr(fundSet.getCity())); socialFund.setFundCity(Common.isNotNullToStr(fundSet.getCity()));
...@@ -790,7 +788,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -790,7 +788,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
// 封装客户信息 // 封装客户信息
if (Common.isNotNull(empVo)){ if (Common.isNotNull(empVo)){
dispatch.setEmpId(empVo.getId()); dispatch.setEmpId(empVo.getId());
dispatch.setEmpNo(empVo.getEmpCode()); dispatch.setEmpNo(empVo.getEmpNo());
// 封装合同信息 如果有合同取值实际合同信息 // 封装合同信息 如果有合同取值实际合同信息
dispatch.setSettleDomainName(empVo.getDeptName()); dispatch.setSettleDomainName(empVo.getDeptName());
dispatch.setContractStart(empVo.getContractStart()); dispatch.setContractStart(empVo.getContractStart());
...@@ -825,18 +823,18 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -825,18 +823,18 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
fund.setSettleDomain(excel.getSettleDomainId()); fund.setSettleDomain(excel.getSettleDomainId());
if (Common.isNotNull(empVo)){ if (Common.isNotNull(empVo)){
fund.setEmpId(empVo.getId()); fund.setEmpId(empVo.getId());
fund.setEmpNo(empVo.getEmpCode()); fund.setEmpNo(empVo.getEmpNo());
} }
fund.setEmpIdcard(excel.getEmpIdcard()); fund.setEmpIdcard(excel.getEmpIdcard());
fund.setEmpName(excel.getEmpName()); fund.setEmpName(excel.getEmpName());
fund.setTrustRemark(excel.getTrustRemark()); fund.setTrustRemark(excel.getTrustRemark());
fund.setUnitProvidengCardinal(excel.getProvidentPer());
fund.setPersonalProvidentPer(excel.getProvidentPer());
fund.setUnitProvidengCardinal(excel.getProvidentCardinal()); fund.setUnitProvidengCardinal(excel.getProvidentCardinal());
fund.setPersonalProvidentCardinal(excel.getProvidentCardinal()); fund.setPersonalProvidentCardinal(excel.getProvidentCardinal());
fund.setPersonalProvidentPer(excel.getProvidentPer());
fund.setUnitProvidentPer(excel.getProvidentPer());
fund.setProvidentStart(excel.getProvidentStart()); fund.setProvidentStart(excel.getProvidentStart());
if (Common.isNotNull(fundSet)){ if (Common.isNotNull(fundSet)){
fund.setProvidentHousehold(fundSet.getId()); fund.setProvidentHousehold(fundSet.getDepartId());
if (!checkFundPer(fundSet.getFundProList(), excel)){ if (!checkFundPer(fundSet.getFundProList(), excel)){
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), MsgUtils.getMessage(ErrorCodes.EMP_DISPATCH_FUND_PERCENT_NOT_EXIST))); errorMessageList.add(new ErrorMessage(excel.getRowIndex(), MsgUtils.getMessage(ErrorCodes.EMP_DISPATCH_FUND_PERCENT_NOT_EXIST)));
return true; return true;
...@@ -924,7 +922,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -924,7 +922,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
social.setEmpId(empVo.getId()); social.setEmpId(empVo.getId());
social.setEmpName(empVo.getEmpName()); social.setEmpName(empVo.getEmpName());
social.setEmpIdcard(empVo.getEmpIdcard()); social.setEmpIdcard(empVo.getEmpIdcard());
social.setEmpNo(empVo.getEmpCode()); social.setEmpNo(empVo.getEmpNo());
} }
social.setEmpIdcard(excel.getEmpIdcard()); social.setEmpIdcard(excel.getEmpIdcard());
social.setBigailmentHandle(CommonConstants.ZERO_STRING); social.setBigailmentHandle(CommonConstants.ZERO_STRING);
...@@ -968,7 +966,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -968,7 +966,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
if (Common.isNotNull(socialSet)){ if (Common.isNotNull(socialSet)){
social.setCanOverpay(socialSet.getCanOverpay()); social.setCanOverpay(socialSet.getCanOverpay());
social.setCardinalId(socialSet.getId()); social.setCardinalId(socialSet.getId());
social.setSocialHousehold(socialSet.getId()); social.setSocialHousehold(socialSet.getDepartId());
social.setSocialHouseholdName(socialSet.getDepartName()); social.setSocialHouseholdName(socialSet.getDepartName());
social.setCollectMoth(socialSet.getCollectMoth()); social.setCollectMoth(socialSet.getCollectMoth());
social.setCollectType(socialSet.getCollectType()); social.setCollectType(socialSet.getCollectType());
...@@ -997,8 +995,6 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -997,8 +995,6 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
social.setUnitBigailmentPer(socialSet.getPayCompanyPro()); social.setUnitBigailmentPer(socialSet.getPayCompanyPro());
social.setUnitBirthPer(socialSet.getUnitBirthPro()); social.setUnitBirthPer(socialSet.getUnitBirthPro());
social.setUnitBigailmentMoney(socialSet.getPayCompany());
social.setPersonalBigailmentMoney(socialSet.getPayPersonal());
//按最低 //按最低
if (CommonConstants.ZERO_STRING.equals(excel.getPaymentType())){ if (CommonConstants.ZERO_STRING.equals(excel.getPaymentType())){
social.setPersonalPensionCardinal(socialSet.getLowerLimit()); social.setPersonalPensionCardinal(socialSet.getLowerLimit());
...@@ -1035,16 +1031,24 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -1035,16 +1031,24 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
//按年收取大病方式按定值 //按年收取大病方式按定值
social.setUnitBigailmentMoney(socialSet.getPayCompany()); social.setUnitBigailmentMoney(socialSet.getPayCompany());
social.setPersonalBigailmentMoney(socialSet.getPayPersonal()); social.setPersonalBigailmentMoney(socialSet.getPayPersonal());
social.setUnitBigailmentCardinal(null);
social.setUnitBigailmentPer(null);
social.setPersonalBigailmentCardinal(null);
social.setPersonalBigailmentPer(null);
}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(), social.getUnitBigailmentPer(), BigDecimal.valueOf(CommonConstants.ONE_OF_PERCENT.doubleValue()))); social.setUnitBigailmentMoney(BigDecimalUtils.safeMultiply(social.getUnitBigailmentCardinal(), socialSet.getPayCompanyPro(), BigDecimal.valueOf(CommonConstants.ONE_OF_PERCENT.doubleValue())));
social.setPersonalBigailmentMoney(BigDecimalUtils.safeMultiply(social.getPersonalBigailmentCardinal(), social.getPersonalBigailmentPer(), 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)) { } else if (CommonConstants.ONE_STRING.equals(social.getValueType()) && Common.isNotNull(socialSet)) {
//收取大病方式按定值 //收取大病方式按定值
social.setUnitBigailmentMoney(socialSet.getPayCompany()); social.setUnitBigailmentMoney(socialSet.getChargeCompany());
social.setPersonalBigailmentMoney(socialSet.getPayPersonal()); social.setPersonalBigailmentMoney(socialSet.getChargePersonal());
social.setPersonalBigailmentCardinal(null);
social.setPersonalBigailmentPer(null);
social.setUnitBigailmentCardinal(null);
social.setUnitBigailmentPer(null);
} }
} }
} }
...@@ -1169,7 +1173,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -1169,7 +1173,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
} }
if (Common.isNotNull(empVo)) { if (Common.isNotNull(empVo)) {
contract.setEmpId(empVo.getId()); contract.setEmpId(empVo.getId());
contract.setEmpNo(empVo.getEmpCode()); contract.setEmpNo(empVo.getEmpNo());
contract.setEmpType(empVo.getEmpNatrue()); contract.setEmpType(empVo.getEmpNatrue());
} }
contracts.put(excel.getEmpIdcard()+CommonConstants.DOWN_LINE_STRING+excel.getSettleDomainCode(),contract); contracts.put(excel.getEmpIdcard()+CommonConstants.DOWN_LINE_STRING+excel.getSettleDomainCode(),contract);
...@@ -1190,6 +1194,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -1190,6 +1194,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
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());
} }
projects.put(excel.getEmpIdcard()+CommonConstants.DOWN_LINE_STRING+excel.getSettleDomainCode(),project); projects.put(excel.getEmpIdcard()+CommonConstants.DOWN_LINE_STRING+excel.getSettleDomainCode(),project);
} }
...@@ -1230,7 +1235,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -1230,7 +1235,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
TSocialFundInfo sf; TSocialFundInfo sf;
if (Common.isNotNull(socialFundMap)) { if (Common.isNotNull(socialFundMap)) {
sf = socialFundMap.get(excel.getEmpIdcard()); sf = socialFundMap.get(excel.getEmpIdcard());
if (Common.isNotNull(sf)) { if (Common.isNotNull(sf) && Common.isNotNull(excel.getSocialHousehold())) {
// 拒绝新增1:派单待审核、派单待办理、办理成功且未派减成功------ 先排除兼职工伤 // 拒绝新增1:派单待审核、派单待办理、办理成功且未派减成功------ 先排除兼职工伤
if (CommonConstants.ZERO_STRING.equals(sf.getSocialAddStatus()) if (CommonConstants.ZERO_STRING.equals(sf.getSocialAddStatus())
|| CommonConstants.ONE_STRING.equals(sf.getSocialAddStatus()) || CommonConstants.ONE_STRING.equals(sf.getSocialAddStatus())
...@@ -1320,16 +1325,28 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -1320,16 +1325,28 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
private boolean validImport(List<ErrorMessage> errorMessageList, private boolean validImport(List<ErrorMessage> errorMessageList,
TDispatchImportVo excel, TDispatchImportVo excel,
ProjectSetInfoVo setInfoVo, ProjectSetInfoVo setInfoVo,
Map<String, TSocialFundInfo> socialFundMap) { Map<String, TSocialFundInfo> socialFundMap,
DispatchEmpVo empVo, SysBaseSetInfo socialSet) {
if (Common.isEmpty(setInfoVo)){ if (Common.isEmpty(setInfoVo)){
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 (Common.isNotNull(empVo)){
if (CommonConstants.ONE_STRING.equals(empVo.getProjectStatus())){
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), MsgUtils.getMessage(ErrorCodes.EMP_DISPATCH_EMP_PROJECT_NOT_USED)));
return true;
}
if (CommonConstants.ONE_STRING.equals(empVo.getFileStatus())){
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), MsgUtils.getMessage(ErrorCodes.EMP_DISPATCH_EMP_NOT_USED)));
return true;
}
}
excel.setSettleDomainId(setInfoVo.getId()); excel.setSettleDomainId(setInfoVo.getId());
excel.setDepartName(setInfoVo.getDepartName()); excel.setDepartName(setInfoVo.getDepartName());
excel.setCustomerCode(setInfoVo.getCustomerCode()); excel.setCustomerCode(setInfoVo.getCustomerCode());
excel.setCustomerId(setInfoVo.getCustomerId()); excel.setCustomerId(setInfoVo.getCustomerId());
excel.setCustomerName(setInfoVo.getCustomerName()); excel.setCustomerName(setInfoVo.getCustomerName());
if (Common.isEmpty(excel.getSocialHousehold()) && Common.isEmpty(excel.getProvidentHousehold())){ if (Common.isEmpty(excel.getSocialHousehold()) && Common.isEmpty(excel.getProvidentHousehold())){
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), MsgUtils.getMessage(ErrorCodes.EMP_DISPATCH_SOCIAL_AND_FUND_NOT_EMPTY))); errorMessageList.add(new ErrorMessage(excel.getRowIndex(), MsgUtils.getMessage(ErrorCodes.EMP_DISPATCH_SOCIAL_AND_FUND_NOT_EMPTY)));
return true; return true;
...@@ -1365,7 +1382,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -1365,7 +1382,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
return true; return true;
} }
TSocialFundInfo socialFund = null; TSocialFundInfo socialFund;
if (Common.isNotNull(socialFundMap)){ if (Common.isNotNull(socialFundMap)){
socialFund = socialFundMap.get(excel.getEmpIdcard()); socialFund = socialFundMap.get(excel.getEmpIdcard());
if (Common.isNotNull(socialFund)){ if (Common.isNotNull(socialFund)){
...@@ -1396,6 +1413,31 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -1396,6 +1413,31 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
} }
} }
} }
if (Common.isNotNull(excel.getSocialHousehold()) && Common.isNotNull(socialSet)
&& CommonConstants.ONE_STRING.equals(excel.getPaymentType())){
if ((Common.isNotNull(excel.getPensionCardinal())
&& excel.getPensionCardinal().compareTo(socialSet.getUpperLimit()) > CommonConstants.ZERO_INT
&& excel.getPensionCardinal().compareTo(socialSet.getLowerLimit())< CommonConstants.ZERO_INT)
||(Common.isNotNull(excel.getMedicalCardinal())
&& excel.getMedicalCardinal().compareTo(socialSet.getUpperLimit()) > CommonConstants.ZERO_INT
&& excel.getMedicalCardinal().compareTo(socialSet.getLowerLimit())< CommonConstants.ZERO_INT)
||(Common.isNotNull(excel.getUnemploymentCardinal())
&& excel.getUnemploymentCardinal().compareTo(socialSet.getUpperLimit()) > CommonConstants.ZERO_INT
&& excel.getUnemploymentCardinal().compareTo(socialSet.getLowerLimit())< CommonConstants.ZERO_INT)
||(Common.isNotNull(excel.getWorkInjuryCardinal())
&& excel.getWorkInjuryCardinal().compareTo(socialSet.getUpperLimit()) > CommonConstants.ZERO_INT
&& excel.getWorkInjuryCardinal().compareTo(socialSet.getLowerLimit())< CommonConstants.ZERO_INT)
||(Common.isNotNull(excel.getBirthCardinal())
&& excel.getBirthCardinal().compareTo(socialSet.getUpperLimit()) > CommonConstants.ZERO_INT
&& excel.getBirthCardinal().compareTo(socialSet.getLowerLimit())< CommonConstants.ZERO_INT)
||(Common.isNotNull(excel.getBigailmentCardinal())
&& excel.getBigailmentCardinal().compareTo(socialSet.getUpperLimit()) > CommonConstants.ZERO_INT
&& excel.getBigailmentCardinal().compareTo(socialSet.getLowerLimit())< CommonConstants.ZERO_INT)
){
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), MsgUtils.getMessage(ErrorCodes.EMP_DISPATCH_SOCIAL_LIMIT_ERROR)));
return true;
}
}
return false; return false;
} }
...@@ -1719,6 +1761,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -1719,6 +1761,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
TSocialFundInfo sf = null; TSocialFundInfo sf = null;
Date now = new Date(); Date now = new Date();
for (TDispatchInfo dis : dispatchs) { for (TDispatchInfo dis : dispatchs) {
auditInfo = new TAuditInfo();
remark = ""; remark = "";
if (Common.isNotNull(socialFundMap)){ if (Common.isNotNull(socialFundMap)){
sf = socialFundMap.get(dis.getEmpIdcard()); sf = socialFundMap.get(dis.getEmpIdcard());
...@@ -1749,6 +1792,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -1749,6 +1792,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
socialInfo.setDeleteFlag(CommonConstants.ONE_STRING); socialInfo.setDeleteFlag(CommonConstants.ONE_STRING);
// 作废更新:社保状态、同步预估数据 审核不通过直接作废 TODO 预估数据 // 作废更新:社保状态、同步预估数据 审核不通过直接作废 TODO 预估数据
socialInfo.setAuditStatus(CommonConstants.TWO_STRING); socialInfo.setAuditStatus(CommonConstants.TWO_STRING);
socialInfo.setDeleteFlag(CommonConstants.ZERO_STRING);
sf.setSocialAddStatus(CommonConstants.FOUR_STRING); sf.setSocialAddStatus(CommonConstants.FOUR_STRING);
sf.setSocialStatus(CommonConstants.TEN_STRING); sf.setSocialStatus(CommonConstants.TEN_STRING);
} }
...@@ -1797,6 +1841,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -1797,6 +1841,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
} else if (CommonConstants.ONE_INT == flag.intValue()) { } else if (CommonConstants.ONE_INT == flag.intValue()) {
// 作废更新:公积金状态、同步档案的公积金状态、同步预估数据 TODO // 作废更新:公积金状态、同步档案的公积金状态、同步预估数据 TODO
providentFund.setAuditStatus(CommonConstants.TWO_STRING); providentFund.setAuditStatus(CommonConstants.TWO_STRING);
providentFund.setDeleteFlag(CommonConstants.ONE_STRING);
sf.setFundAddStatus(CommonConstants.FOUR_STRING); sf.setFundAddStatus(CommonConstants.FOUR_STRING);
sf.setFundStatus(CommonConstants.NINE_STRING); sf.setFundStatus(CommonConstants.NINE_STRING);
} }
...@@ -2551,12 +2596,12 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -2551,12 +2596,12 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
@Override @Override
public IPage<TDispatchInfo> getTDispatchSocialHandlePage(Page<TDispatchInfo> page, SocialHandleSearchVo tDispatchInfo, List<String> settleDomains, String sql) { public IPage<TDispatchInfo> getTDispatchSocialHandlePage(Page<TDispatchInfo> page, SocialHandleSearchVo tDispatchInfo, List<String> settleDomains, String sql) {
return baseMapper.getTDispatchSocialHandlePage(page,tDispatchInfo,settleDomains,sql); return baseMapper.getTDispatchSocialHandlePage(page,tDispatchInfo,settleDomains,null,sql);
} }
@Override @Override
public IPage<TDispatchInfo> getTDispatchFundHandlePage(Page<TDispatchInfo> page, SocialHandleSearchVo tDispatchInfo,List<String> settleDomains, String sql) { public IPage<TDispatchInfo> getTDispatchFundHandlePage(Page<TDispatchInfo> page, SocialHandleSearchVo tDispatchInfo,List<String> settleDomains, String sql) {
return baseMapper.getTDispatchFundHandlePage(page,tDispatchInfo,settleDomains,sql); return baseMapper.getTDispatchFundHandlePage(page,tDispatchInfo,settleDomains,null,sql);
} }
/** /**
* 导出公积金补缴清册 * 导出公积金补缴清册
......
...@@ -1078,7 +1078,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap ...@@ -1078,7 +1078,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
* @param library 预估库 * @param library 预估库
* @param socialInfo 社保 * @param socialInfo 社保
* @param sysBaseSetInfo 基数配置 * @param sysBaseSetInfo 基数配置
* @param paymentType 0最低缴纳、1自定义缴纳、2最高缴纳 * @param paymentType 0最低缴纳、1自定义、2最高缴纳
* @Description: 塞大病金额 * @Description: 塞大病金额
* @Author: hgw * @Author: hgw
* @Date: 2020/11/25 15:51 * @Date: 2020/11/25 15:51
...@@ -1145,7 +1145,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap ...@@ -1145,7 +1145,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
private void changeSocialInfoByBase(TSocialFundInfo social, SysBaseSetInfo socialSet) { private void changeSocialInfoByBase(TSocialFundInfo social, SysBaseSetInfo socialSet) {
if (Common.isNotNull(socialSet)) { if (Common.isNotNull(socialSet)) {
social.setCanOverpay(socialSet.getCanOverpay()); social.setCanOverpay(socialSet.getCanOverpay());
social.setSocialHousehold(socialSet.getId()); social.setSocialHousehold(socialSet.getDepartId());
social.setCollectMoth(socialSet.getCollectMoth()); social.setCollectMoth(socialSet.getCollectMoth());
social.setCollectType(socialSet.getCollectType()); social.setCollectType(socialSet.getCollectType());
social.setHaveThisMonth(socialSet.getHaveThisMonth()); social.setHaveThisMonth(socialSet.getHaveThisMonth());
......
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