Commit 1692470d authored by huyuchen's avatar huyuchen

huych-入职登记商险待办提交

parent 0caeff84
...@@ -546,6 +546,15 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr ...@@ -546,6 +546,15 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
*/ */
@Override @Override
public R confirmReceive(EmployeeRegistrationPreVo preVo) { public R confirmReceive(EmployeeRegistrationPreVo preVo) {
YifuUser user = SecurityUtils.getUser();
if (Common.isEmpty(preVo)) {
return R.failed(CommonConstants.PARAM_IS_NOT_ERROR);
}
EmployeeRegistration registration = baseMapper.selectById(preVo.getId());
if (Common.isEmpty(registration) || (Common.isNotNull(registration) &&
!CommonConstants.ONE_STRING.equals(registration.getProcessStatus()))) {
return R.failed(CommonConstants.NO_DATA_TO_HANDLE);
}
if (preVo.getServerItem().contains("商险") && !preVo.getEmployeeInsurancePreVos().isEmpty()) { if (preVo.getServerItem().contains("商险") && !preVo.getEmployeeInsurancePreVos().isEmpty()) {
List<TEmployeeInsuranceExitCheckVo> errorList = new ArrayList<>(); List<TEmployeeInsuranceExitCheckVo> errorList = new ArrayList<>();
TEmployeeInsuranceExitCheckVo checkVo; TEmployeeInsuranceExitCheckVo checkVo;
...@@ -553,13 +562,6 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr ...@@ -553,13 +562,6 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
// 判断重复性MAP // 判断重复性MAP
Map<String, Integer> keyMap = new HashMap<>(); Map<String, Integer> keyMap = new HashMap<>();
for (TEmployeeInsurancePreVo insurancePreVo : preVo.getEmployeeInsurancePreVos()) { for (TEmployeeInsurancePreVo insurancePreVo : preVo.getEmployeeInsurancePreVos()) {
insurancePreVo.setEmpIdcard(preVo.getEmpIdcard());
insurancePreVo.setDeptNo(preVo.getDeptNo());
//商险是否存在判断
checkVo = checkInsuranceExit(insurancePreVo,preVo.getEmployeeName(),preVo.getEmpIdcard());
if (null != checkVo) {
errorList.add(checkVo);
}
// 1:重复性判断 // 1:重复性判断
key = this.getFiveKey(insurancePreVo); key = this.getFiveKey(insurancePreVo);
if (keyMap.get(key) == null) { if (keyMap.get(key) == null) {
...@@ -567,22 +569,19 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr ...@@ -567,22 +569,19 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
} else { } else {
return R.other(CommonConstants.TWO_INT,null,"保险公司、险种、购买标准、保单起、止日期不可同时重复;"); return R.other(CommonConstants.TWO_INT,null,"保险公司、险种、购买标准、保单起、止日期不可同时重复;");
} }
insurancePreVo.setEmpIdcard(preVo.getEmpIdcard());
insurancePreVo.setDeptNo(preVo.getDeptNo());
//商险是否存在判断
checkVo = checkInsuranceExit(insurancePreVo,preVo.getEmployeeName(),preVo.getEmpIdcard());
if (null != checkVo) {
errorList.add(checkVo);
}
} }
if (!errorList.isEmpty()) { if (!errorList.isEmpty()) {
return R.other(CommonConstants.TWO_INT,null,errorList); return R.other(CommonConstants.TWO_INT,null,errorList);
} }
} }
YifuUser user = SecurityUtils.getUser();
if (Common.isEmpty(preVo)) {
return R.failed(CommonConstants.PARAM_IS_NOT_ERROR);
}
EmployeeRegistration registration = baseMapper.selectById(preVo.getId());
if (Common.isEmpty(registration) || (Common.isNotNull(registration) &&
!CommonConstants.ONE_STRING.equals(registration.getProcessStatus()))) {
return R.failed(CommonConstants.NO_DATA_TO_HANDLE);
}
//点击“接收确认”的时候,监测到该人员该项目下已有在项的档案时,再次提醒:该人员已在项, //点击“接收确认”的时候,监测到该人员该项目下已有在项的档案时,再次提醒:该人员已在项,
//状态将更新成“已处理”;处理记录中,针对此情况,记录真实的进项时间,备注:先于登记入项 //状态将更新成“已处理”;处理记录中,针对此情况,记录真实的进项时间,备注:先于登记入项
EmpProjectStatusVo vo = new EmpProjectStatusVo(); EmpProjectStatusVo vo = new EmpProjectStatusVo();
...@@ -1261,7 +1260,7 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr ...@@ -1261,7 +1260,7 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
return null; return null;
} }
//商险是否存在判断 type 1 单个接收 2 批量接收 //商险是否存在判断
private TEmployeeInsuranceExitCheckVo checkInsuranceExit(TEmployeeInsurancePreVo preVo,String empName,String empIdcard) { private TEmployeeInsuranceExitCheckVo checkInsuranceExit(TEmployeeInsurancePreVo preVo,String empName,String empIdcard) {
//查询入职确认信息数据 //查询入职确认信息数据
TEmployeeInsuranceExitCheckVo exitCheckVo = new TEmployeeInsuranceExitCheckVo(); TEmployeeInsuranceExitCheckVo exitCheckVo = new TEmployeeInsuranceExitCheckVo();
...@@ -1319,6 +1318,8 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr ...@@ -1319,6 +1318,8 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
} else if (insuranceDetail.getBuyHandleStatus() == CommonConstants.FOUR_INT) { } else if (insuranceDetail.getBuyHandleStatus() == CommonConstants.FOUR_INT) {
preVo.setProcessStatus(CommonConstants.FIVE_STRING); preVo.setProcessStatus(CommonConstants.FIVE_STRING);
} }
//是否地市自购
preVo.setIsAddress(insuranceDetail.getIsAdress());
} }
} }
} }
......
...@@ -118,6 +118,12 @@ public class InsuranceAddParam implements Serializable { ...@@ -118,6 +118,12 @@ public class InsuranceAddParam implements Serializable {
@Schema(description = "错误信息") @Schema(description = "错误信息")
private String errorMessage; private String errorMessage;
/**
* 商险待购买id
*/
@Schema(description = "商险待购买id")
private String insurancePreId;
/***********************************以下字段由系统算出,前端不用传,是为了方便入库***********************************/ /***********************************以下字段由系统算出,前端不用传,是为了方便入库***********************************/
/** /**
* 结算类型 (1、单独结算 2、合并结算-和工资一起结算) * 结算类型 (1、单独结算 2、合并结算-和工资一起结算)
......
...@@ -113,6 +113,12 @@ public class InsuranceBatchParam implements Serializable { ...@@ -113,6 +113,12 @@ public class InsuranceBatchParam implements Serializable {
@Schema(description = "错误信息") @Schema(description = "错误信息")
private String errorMessage; private String errorMessage;
/**
* 商险待购买id
*/
@Schema(description = "商险待购买id")
private String insurancePreId;
/***********************************以下字段由系统算出,前端不用传,是为了方便入库***********************************/ /***********************************以下字段由系统算出,前端不用传,是为了方便入库***********************************/
/** /**
* 结算类型 (1、单独结算 2、合并结算-和工资一起结算) * 结算类型 (1、单独结算 2、合并结算-和工资一起结算)
......
...@@ -101,6 +101,12 @@ public class InsuranceReplaceParam implements Serializable { ...@@ -101,6 +101,12 @@ public class InsuranceReplaceParam implements Serializable {
@Schema(description = "错误信息") @Schema(description = "错误信息")
private String errorMessage; private String errorMessage;
/**
* 商险待购买id
*/
@Schema(description = "商险待购买id")
private String insurancePreId;
/** /**
* 数据传递对象 * 数据传递对象
*/ */
......
...@@ -138,6 +138,8 @@ public class TEmployeeInsurancePreController { ...@@ -138,6 +138,8 @@ public class TEmployeeInsurancePreController {
@Operation(description = "导出商险待办任务表") @Operation(description = "导出商险待办任务表")
@PostMapping("/export") @PostMapping("/export")
public void export(HttpServletResponse response, @RequestBody TEmployeeInsurancePreSearchVo searchVo) { public void export(HttpServletResponse response, @RequestBody TEmployeeInsurancePreSearchVo searchVo) {
YifuUser user = SecurityUtils.getUser();
menuUtil.setAuthSql(user, searchVo);
tEmployeeInsurancePreService.listExport(response,searchVo); tEmployeeInsurancePreService.listExport(response,searchVo);
} }
......
...@@ -35,6 +35,8 @@ public interface TEmployeeInsurancePreMapper extends BaseMapper<TEmployeeInsuran ...@@ -35,6 +35,8 @@ public interface TEmployeeInsurancePreMapper extends BaseMapper<TEmployeeInsuran
long selectExportCount(@Param("tEmployeeInsurancePre") TEmployeeInsurancePreSearchVo employeeRegistration); long selectExportCount(@Param("tEmployeeInsurancePre") TEmployeeInsurancePreSearchVo employeeRegistration);
void updateBatchById(@Param("idList") List<String> idList);
List<TEmployeeInsurancePreExportVo> selectExportList(@Param("employeeRegistration") TEmployeeInsurancePreSearchVo employeeRegistration); List<TEmployeeInsurancePreExportVo> selectExportList(@Param("employeeRegistration") TEmployeeInsurancePreSearchVo employeeRegistration);
List<TEmployeeInsurancePre> getAllUnconfimData(); List<TEmployeeInsurancePre> getAllUnconfimData();
......
...@@ -70,14 +70,6 @@ public interface TEmployeeInsurancePreService extends IService<TEmployeeInsuranc ...@@ -70,14 +70,6 @@ public interface TEmployeeInsurancePreService extends IService<TEmployeeInsuranc
*/ */
Boolean saveInsurancePreInfo(EmployeeRegistrationPreVo preVo); Boolean saveInsurancePreInfo(EmployeeRegistrationPreVo preVo);
/**
* 更新商险待购买状态
* @param id
* @param status 状态
* @return
*/
void updateInsurancePreInfo(String id,String status);
TEmployeeInsuranceSelectVo selectInsurancePreInfoList(TEmployeeInsurancePreVo preVo); TEmployeeInsuranceSelectVo selectInsurancePreInfoList(TEmployeeInsurancePreVo preVo);
void updateInsurancePreCustomerName(EmployeeRegistrationCustomerUserUpdateVo updateVo); void updateInsurancePreCustomerName(EmployeeRegistrationCustomerUserUpdateVo updateVo);
......
...@@ -120,6 +120,11 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur ...@@ -120,6 +120,11 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur
String fileName = "商险待办任务表批量导出" + DateUtil.getThisTime() + ".xlsx"; String fileName = "商险待办任务表批量导出" + DateUtil.getThisTime() + ".xlsx";
//获取要导出的列表 //获取要导出的列表
List<TEmployeeInsurancePreExportVo> list = new ArrayList<>(); List<TEmployeeInsurancePreExportVo> list = new ArrayList<>();
if (null == searchVo.getStatusList()) {
searchVo.setStatusList(CommonConstants.processListPreArchivesStatus);
}
//权限赋值
initSearchVo(searchVo);
long count = baseMapper.selectExportCount(searchVo); long count = baseMapper.selectExportCount(searchVo);
try (ServletOutputStream out= response.getOutputStream();){ try (ServletOutputStream out= response.getOutputStream();){
response.setContentType(CommonConstants.MULTIPART_FORM_DATA); response.setContentType(CommonConstants.MULTIPART_FORM_DATA);
...@@ -201,6 +206,7 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur ...@@ -201,6 +206,7 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur
addParam.setSettleMonth(CommonConstants.EMPTY_STRING); addParam.setSettleMonth(CommonConstants.EMPTY_STRING);
addParam.setPost(insurancePre.getPosition()); addParam.setPost(insurancePre.getPosition());
addParam.setRemark(CommonConstants.EMPTY_STRING); addParam.setRemark(CommonConstants.EMPTY_STRING);
addParam.setInsurancePreId(insurancePre.getId());
addParamList.add(addParam); addParamList.add(addParam);
} }
if (CommonConstants.TWO_INT == insurancePre.getBuyType()) { if (CommonConstants.TWO_INT == insurancePre.getBuyType()) {
...@@ -217,6 +223,7 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur ...@@ -217,6 +223,7 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur
addParam.setSettleMonth(CommonConstants.EMPTY_STRING); addParam.setSettleMonth(CommonConstants.EMPTY_STRING);
addParam.setPost(insurancePre.getPosition()); addParam.setPost(insurancePre.getPosition());
addParam.setRemark(CommonConstants.EMPTY_STRING); addParam.setRemark(CommonConstants.EMPTY_STRING);
addParam.setInsurancePreId(insurancePre.getId());
batchAddParamList.add(addParam); batchAddParamList.add(addParam);
} }
if (CommonConstants.THREE_INT == insurancePre.getBuyType()) { if (CommonConstants.THREE_INT == insurancePre.getBuyType()) {
...@@ -234,6 +241,7 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur ...@@ -234,6 +241,7 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur
addParam.setReplaceDeptNo(insurancePre.getReplaceDeptNo()); addParam.setReplaceDeptNo(insurancePre.getReplaceDeptNo());
addParam.setReplaceEmpIdcardNo(insurancePre.getReplaceEmpIdcard()); addParam.setReplaceEmpIdcardNo(insurancePre.getReplaceEmpIdcard());
addParam.setRemark(CommonConstants.EMPTY_STRING); addParam.setRemark(CommonConstants.EMPTY_STRING);
addParam.setInsurancePreId(insurancePre.getId());
replaceAddParamList.add(addParam); replaceAddParamList.add(addParam);
} }
} }
...@@ -325,6 +333,7 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur ...@@ -325,6 +333,7 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur
for (TEmployeeInsurancePreVo preVo : employeeInsurancePreVos) { for (TEmployeeInsurancePreVo preVo : employeeInsurancePreVos) {
//判断是否存在商险待购买信息 //判断是否存在商险待购买信息
preExit = baseMapper.selectOne(Wrappers.<TEmployeeInsurancePre>query().lambda() preExit = baseMapper.selectOne(Wrappers.<TEmployeeInsurancePre>query().lambda()
.eq(TEmployeeInsurancePre::getRegisterId, preVo.getRegisterId())
.eq(TEmployeeInsurancePre::getEmpIdcard, preVo.getEmpIdcard()) .eq(TEmployeeInsurancePre::getEmpIdcard, preVo.getEmpIdcard())
.eq(TEmployeeInsurancePre::getBuyStandard, preVo.getBuyStandard()) .eq(TEmployeeInsurancePre::getBuyStandard, preVo.getBuyStandard())
.eq(TEmployeeInsurancePre::getInsuranceTypeName, preVo.getInsuranceTypeName()) .eq(TEmployeeInsurancePre::getInsuranceTypeName, preVo.getInsuranceTypeName())
...@@ -341,7 +350,6 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur ...@@ -341,7 +350,6 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur
pre.setId(preExit.getId()); pre.setId(preExit.getId());
baseMapper.insert(pre); baseMapper.insert(pre);
baseMapper.deleteById(preExit); baseMapper.deleteById(preExit);
//todo 操作记录
} else { } else {
baseMapper.insert(pre); baseMapper.insert(pre);
//暂时不需要,先注释,后续可能会需要 //暂时不需要,先注释,后续可能会需要
...@@ -365,17 +373,6 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur ...@@ -365,17 +373,6 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur
return true; return true;
} }
@Override
public void updateInsurancePreInfo(String id, String status) {
if (Common.isNotNull(id) && Common.isNotNull(status)) {
TEmployeeInsurancePre preExit = baseMapper.selectById(id);
if (Common.isNotNull(preExit)) {
preExit.setProcessStatus(status);
baseMapper.updateById(preExit);
}
}
}
@Override @Override
public TEmployeeInsuranceSelectVo selectInsurancePreInfoList(TEmployeeInsurancePreVo preVo) { public TEmployeeInsuranceSelectVo selectInsurancePreInfoList(TEmployeeInsurancePreVo preVo) {
TEmployeeInsuranceSelectVo selectVo = new TEmployeeInsuranceSelectVo(); TEmployeeInsuranceSelectVo selectVo = new TEmployeeInsuranceSelectVo();
......
...@@ -150,8 +150,11 @@ ...@@ -150,8 +150,11 @@
<if test="tEmployeeInsurancePre.expectedCollectionTime != null"> <if test="tEmployeeInsurancePre.expectedCollectionTime != null">
AND a.expected_collection_time = #{tEmployeeInsurancePre.expectedCollectionTime} AND a.expected_collection_time = #{tEmployeeInsurancePre.expectedCollectionTime}
</if> </if>
<if test="tEmployeeInsurancePre.joinTimeStart != null">
AND a.regist_time <![CDATA[ >= ]]> #{tEmployeeInsurancePre.registTimeStart}
</if>
<if test="tEmployeeInsurancePre.registTimeEnd != null"> <if test="tEmployeeInsurancePre.registTimeEnd != null">
and a.regist_time <![CDATA[ <= ]]> concat(#{tEmployeeInsurancePre.registTimeEnd}, ' 23:59:59') and a.regist_time <![CDATA[ <= ]]> #{tEmployeeInsurancePre.registTimeEnd}
</if> </if>
<if test="tEmployeeInsurancePre.insuranceCompanyName != null and tEmployeeInsurancePre.insuranceCompanyName.trim() != ''"> <if test="tEmployeeInsurancePre.insuranceCompanyName != null and tEmployeeInsurancePre.insuranceCompanyName.trim() != ''">
AND a.insurance_company_name = #{tEmployeeInsurancePre.insuranceCompanyName} AND a.insurance_company_name = #{tEmployeeInsurancePre.insuranceCompanyName}
...@@ -257,6 +260,15 @@ ...@@ -257,6 +260,15 @@
</where> </where>
</select> </select>
<update id="updateBatchById">
update t_employee_insurance_pre a
set a.process_status = '2'
where a.process_status in ('0','1') and a.id in
<foreach item="idStr" index="index" collection="idList" open="(" separator="," close=")">
#{idStr}
</foreach>
</update>
<select id="selectExportList" resultMap="tEmployeeInsurancePreExportMap"> <select id="selectExportList" resultMap="tEmployeeInsurancePreExportMap">
SELECT SELECT
a.dept_name, a.dept_name,
......
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