Commit eea843dd authored by fangxinjiang's avatar fangxinjiang

Merge remote-tracking branch 'origin/MVP1.7.6' into MVP1.7.6

parents c4078104 b053b47b
......@@ -187,10 +187,10 @@ public class PreUploadEmpImportTwoVo implements Serializable {
@ExcelAttribute(name = "身份证截止日期-值")
private Date validityEndValue;
@ExcelAttribute(name = "是否有职业资格证书", isDataId = true, readConverterExp = "0=是,1=否")
@ExcelAttribute(name = "是否有不良记录", isDataId = true, readConverterExp = "0=是,1=否")
private String badRecordFlag;
@ExcelAttribute(name = "是否有不良记录", isDataId = true, readConverterExp = "0=是,1=否")
@ExcelAttribute(name = "是否有职业资格证书", isDataId = true, readConverterExp = "0=是,1=否")
private String haveQualification;
// 字典值结束
......
......@@ -1515,23 +1515,24 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
} else {
saveEmp.setIdProvince(Integer.parseInt(areaStr));
}
}
if (Common.isNotNull(excel.getIdCity())) {
areaStr = ExcelUtil.getRedisAreaValue(CacheConstants.AREA_VALUE + excel.getIdCity().trim() + CommonConstants.DOWN_LINE_STRING + excel.getIdProvince().trim());
if (Common.isEmpty(areaStr)) {
errorMsg.add(MsgUtils.getMessage(ErrorCodes.ARCHIVES_IMPORT_EMP_AREA_ERROR, excel.getEmpIdcard()));
} else {
saveEmp.setIdCity(Integer.parseInt(areaStr));
if (Common.isNotNull(excel.getIdCity())) {
areaStr = ExcelUtil.getRedisAreaValue(CacheConstants.AREA_VALUE + excel.getIdCity().trim() + CommonConstants.DOWN_LINE_STRING + excel.getIdProvince().trim());
if (Common.isEmpty(areaStr)) {
errorMsg.add(MsgUtils.getMessage(ErrorCodes.ARCHIVES_IMPORT_EMP_AREA_ERROR, excel.getEmpIdcard()));
} else {
saveEmp.setIdCity(Integer.parseInt(areaStr));
}
}
}
if (Common.isNotNull(excel.getIdTown())) {
areaStr = ExcelUtil.getRedisAreaValue(CacheConstants.AREA_VALUE + excel.getIdTown().trim() + CommonConstants.DOWN_LINE_STRING + excel.getIdCity().trim());
if (Common.isEmpty(areaStr)) {
errorMsg.add(MsgUtils.getMessage(ErrorCodes.ARCHIVES_IMPORT_EMP_AREA_ERROR, excel.getEmpIdcard()));
} else {
saveEmp.setIdTown(Integer.parseInt(areaStr));
if (Common.isNotNull(excel.getIdTown())) {
areaStr = ExcelUtil.getRedisAreaValue(CacheConstants.AREA_VALUE + excel.getIdTown().trim() + CommonConstants.DOWN_LINE_STRING + excel.getIdCity().trim());
if (Common.isEmpty(areaStr)) {
errorMsg.add(MsgUtils.getMessage(ErrorCodes.ARCHIVES_IMPORT_EMP_AREA_ERROR, excel.getEmpIdcard()));
} else {
saveEmp.setIdTown(Integer.parseInt(areaStr));
}
}
}
// 档案所在地
if (Common.isNotNull(excel.getFileProvince())) {
saveEmp.setFileProvince(Integer.parseInt(excel.getFileProvince()));
......@@ -2046,23 +2047,24 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
} else {
saveEmp.setIdProvince(Integer.parseInt(areaStr));
}
}
if (Common.isNotNull(excel.getIdCity())) {
areaStr = ExcelUtil.getRedisAreaValue(CacheConstants.AREA_VALUE + excel.getIdCity().trim() + CommonConstants.DOWN_LINE_STRING + excel.getIdProvince().trim());
if (Common.isEmpty(areaStr)) {
errorMsg.add(MsgUtils.getMessage(ErrorCodes.ARCHIVES_IMPORT_EMP_AREA_ERROR, excel.getEmpIdcard()));
} else {
saveEmp.setIdCity(Integer.parseInt(areaStr));
}
}
if (Common.isNotNull(excel.getIdTown())) {
areaStr = ExcelUtil.getRedisAreaValue(CacheConstants.AREA_VALUE + excel.getIdTown().trim() + CommonConstants.DOWN_LINE_STRING + excel.getIdCity().trim());
if (Common.isEmpty(areaStr)) {
errorMsg.add(MsgUtils.getMessage(ErrorCodes.ARCHIVES_IMPORT_EMP_AREA_ERROR, excel.getEmpIdcard()));
} else {
saveEmp.setIdTown(Integer.parseInt(areaStr));
if (Common.isNotNull(excel.getIdCity())) {
areaStr = ExcelUtil.getRedisAreaValue(CacheConstants.AREA_VALUE + excel.getIdCity().trim() + CommonConstants.DOWN_LINE_STRING + excel.getIdProvince().trim());
if (Common.isEmpty(areaStr)) {
errorMsg.add(MsgUtils.getMessage(ErrorCodes.ARCHIVES_IMPORT_EMP_AREA_ERROR, excel.getEmpIdcard()));
} else {
saveEmp.setIdCity(Integer.parseInt(areaStr));
}
if (Common.isNotNull(excel.getIdTown())) {
areaStr = ExcelUtil.getRedisAreaValue(CacheConstants.AREA_VALUE + excel.getIdTown().trim() + CommonConstants.DOWN_LINE_STRING + excel.getIdCity().trim());
if (Common.isEmpty(areaStr)) {
errorMsg.add(MsgUtils.getMessage(ErrorCodes.ARCHIVES_IMPORT_EMP_AREA_ERROR, excel.getEmpIdcard()));
} else {
saveEmp.setIdTown(Integer.parseInt(areaStr));
}
}
}
}
if (Common.isNotNull(excel.getIsCollege())) {
if (CommonConstants.IS_TRUE.equals(excel.getIsCollege())) {
saveEmp.setIsCollege(CommonConstants.ONE_INT);
......@@ -3824,7 +3826,7 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
&& ("是".equals(excel.getBadRecordFlag()) || "否".equals(excel.getBadRecordFlag()))
) {
String badFlag = CommonConstants.ZERO_STRING;
if("否".equals(excel.getHaveQualification())){
if("否".equals(excel.getBadRecordFlag())){
badFlag = CommonConstants.ONE_STRING;
}
badRecord = new TEmpBadRecord();
......
......@@ -1472,7 +1472,6 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
if(Common.isNotNull(tPreEmpBadRecord.getRemark())){
if(tPreEmpBadRecord.getRemark().contains("未曾经")){
tPreEmpBadRecord.setBadRecordFlag(CommonConstants.ONE_STRING);
} else {
tPreEmpBadRecord.setBadRecordFlag(CommonConstants.ZERO_STRING);
}
......@@ -1490,8 +1489,6 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
.set(TPreEmpBadRecord::getHappenTime, null)
.set(TPreEmpBadRecord::getLoseFee, null)
.set(TPreEmpBadRecord::getLoseFeeOther, null)
.set(TPreEmpBadRecord::getProject, null)
.set(TPreEmpBadRecord::getProjectCode, null)
.set(TPreEmpBadRecord::getUpdateBy, user.getId())
.set(TPreEmpBadRecord::getUpdateTime, LocalDateTime.now());
tPreEmpBadRecordService.update(null, updateDiyInfoWrapper);
......@@ -3889,6 +3886,9 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
tPreEmpBadRecord = new TPreEmpBadRecord();
tPreEmpBadRecord.setOldId(oldBadRecordMap.get(empIdCard));
tPreEmpBadRecord.setPreMainId(mainId);
tPreEmpBadRecord.setSettleDomain(deptId);
tPreEmpBadRecord.setProject(dept.getDepartName());
tPreEmpBadRecord.setProjectCode(dept.getDepartNo());
if (employee != null) {
tPreEmpBadRecord.setEmpName(employee.getEmpName());
}
......@@ -3898,9 +3898,6 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
tPreEmpBadRecord.setCreateTime(LocalDateTime.now());
if ("是".equals(info.getRemark())) {
// 有不良记录,存项目信息
tPreEmpBadRecord.setSettleDomain(deptId);
tPreEmpBadRecord.setProject(dept.getDepartName());
tPreEmpBadRecord.setProjectCode(dept.getDepartNo());
tPreEmpBadRecord.setRemark("曾经或正在追究与承担过刑事责任");
// 1.9.6-chenyuxi: 记录不良记录标识
tPreEmpBadRecord.setBadRecordFlag(CommonConstants.ZERO_STRING);
......
......@@ -363,7 +363,7 @@ public interface CommonConstants {
public static final String JAR_TYPE = "jar";
int BATCH_COUNT = 100;
int BATCH_COUNT1 = 2000;
String IMPORT_DATA_ANALYSIS_ERROR = "数据导入解析异常,请检查表数据格式(常见错误:1.日期格式:yyyy-MM-dd,2.比例为整数且不含%)";
String IMPORT_DATA_ANALYSIS_ERROR = "数据导入解析异常,请检查表数据格式(常见错误:1.日期格式:yyyy-MM-dd,2.比例为整数且不含%,3涉及金额相关的只能填数字)";
String IMPORT_DATA_ANALYSIS_ERROR_TWO = "数据导入解析异常,请检查表数据格式";
String CREATE_TIME = "CREATE_TIME";
......
......@@ -30,7 +30,6 @@ import com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprArchivesProperties;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.*;
import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
import com.yifu.cloud.plus.v1.yifu.ekp.constant.EkpConstants;
import com.yifu.cloud.plus.v1.yifu.ekp.util.EkpInsuranceUtil;
import com.yifu.cloud.plus.v1.yifu.insurances.constants.InsurancesConstants;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.*;
import com.yifu.cloud.plus.v1.yifu.insurances.mapper.insurances.TInsuranceAreaResMapper;
......@@ -111,8 +110,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
private TInsuranceRefundService tInsuranceRefundService;
@Resource
private TInsuranceEkpService tInsuranceEkpService;
@Resource
private EkpInsuranceUtil eKPInsuranceUtil;
@Resource
private EkpSettleService ekpSettleService;
......
......@@ -6,17 +6,16 @@ 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.R;
import com.yifu.cloud.plus.v1.yifu.ekp.constant.EkpConstants;
import com.yifu.cloud.plus.v1.yifu.ekp.util.EkpInsuranceUtil;
import com.yifu.cloud.plus.v1.yifu.insurances.constants.InsurancesConstants;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceEkp;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceSettle;
import com.yifu.cloud.plus.v1.yifu.insurances.mapper.insurances.TInsuranceEkpMapper;
import com.yifu.cloud.plus.v1.yifu.insurances.service.ekp.EkpSettleService;
import com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.TInsuranceDetailService;
import com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.TInsuranceEkpService;
import com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.TInsuranceSettleService;
import com.yifu.cloud.plus.v1.yifu.insurances.util.BeanCopyUtils;
import com.yifu.cloud.plus.v1.yifu.insurances.util.DoJointInsuranceTask;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.EkpInteractiveParam;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.SettleVo;
import lombok.extern.slf4j.Slf4j;
......@@ -40,18 +39,15 @@ import java.util.List;
public class TInsuranceEkpServiceImpl extends ServiceImpl<TInsuranceEkpMapper, TInsuranceEkp> implements TInsuranceEkpService {
@Resource
EkpInsuranceUtil ekpInsuranceUtil;
@Lazy
private DoJointInsuranceTask doJointInsuranceTask;
@Resource
TInsuranceSettleService tInsuranceSettleService;
@Resource
@Lazy
TInsuranceDetailService tInsuranceDetailService;
@Resource
@Lazy
EkpSettleService ekpSettleService;
TInsuranceDetailService tInsuranceDetailService;
@Override
public R resend() {
......@@ -113,7 +109,7 @@ public class TInsuranceEkpServiceImpl extends ServiceImpl<TInsuranceEkpMapper, T
} else{
ekpParam.setInteractiveType(InsurancesConstants.NEW_SETTLE_BILL);
ekpParam.setSettleType(InsurancesConstants.ESTIMATE_SETTLE_BILL);
s = ekpInsuranceUtil.sendToEkp(ekpParam);
s = doJointInsuranceTask.insertInsrancesDetail(ekpParam);
if(StringUtils.isNotBlank(s)){
settleUpdate.set(TInsuranceSettle :: getEstimatePushTime,LocalDateTime.now())
.set(TInsuranceSettle ::getIsEstimatePush,CommonConstants.ONE_INT);
......@@ -145,7 +141,7 @@ public class TInsuranceEkpServiceImpl extends ServiceImpl<TInsuranceEkpMapper, T
}else{
ekpParam.setInteractiveType(InsurancesConstants.NEW_SETTLE_BILL);
ekpParam.setSettleType(InsurancesConstants.ACTUAL_SETTLE_BILL);
s = ekpInsuranceUtil.sendToEkp(ekpParam);
s = doJointInsuranceTask.insertInsrancesDetail(ekpParam);
if(StringUtils.isNotBlank(s)){
settleUpdate.set(TInsuranceSettle :: getActualPushTime,LocalDateTime.now())
.set(TInsuranceSettle ::getIsActualPush,CommonConstants.ONE_INT);
......@@ -187,7 +183,7 @@ public class TInsuranceEkpServiceImpl extends ServiceImpl<TInsuranceEkpMapper, T
}else{
ekpParam.setInteractiveType(InsurancesConstants.UPDATE_SETTLE_BILL);
ekpParam.setSettleType(CommonConstants.EMPTY_STRING);
s = ekpInsuranceUtil.sendToEkp(ekpParam);
s = doJointInsuranceTask.insertInsrancesDetail(ekpParam);
if(StringUtils.isNotBlank(s)){
ekpUpdate.set(TInsuranceEkp :: getResendFlag ,CommonConstants.ONE_INT)
.set(TInsuranceEkp :: getPushTime ,LocalDateTime.now());
......@@ -203,7 +199,7 @@ public class TInsuranceEkpServiceImpl extends ServiceImpl<TInsuranceEkpMapper, T
if(eStatus && aStatus){
ekpParam.setSettleType(InsurancesConstants.ESTIMATE_SETTLE_BILL);
ekpParam.setInteractiveType(InsurancesConstants.ABOLISH_SETTLE_BILL);
s = ekpInsuranceUtil.sendToEkp(ekpParam);
s = doJointInsuranceTask.insertInsrancesDetail(ekpParam);
if(StringUtils.isNotBlank(s)){
ekpUpdate.set(TInsuranceEkp :: getResendFlag ,CommonConstants.ONE_INT)
.set(TInsuranceEkp :: getPushTime ,LocalDateTime.now());
......@@ -219,7 +215,7 @@ public class TInsuranceEkpServiceImpl extends ServiceImpl<TInsuranceEkpMapper, T
BigDecimal estimatePremium = ekpParam.getEstimatePremium();
ekpParam.setEstimatePremium(estimatePremium.negate());
ekpParam.setSettleType(InsurancesConstants.ESTIMATE_SETTLE_BILL);
s = ekpInsuranceUtil.sendToEkp(ekpParam);
s = doJointInsuranceTask.insertInsrancesDetail(ekpParam);
if(StringUtils.isNotBlank(s)){
ekpUpdate.set(TInsuranceEkp :: getResendFlag ,CommonConstants.ONE_INT)
.set(TInsuranceEkp :: getPushTime ,LocalDateTime.now());
......@@ -233,7 +229,7 @@ public class TInsuranceEkpServiceImpl extends ServiceImpl<TInsuranceEkpMapper, T
ekpParam.setSettleType(InsurancesConstants.ACTUAL_SETTLE_BILL);
BigDecimal actualPremium = ekpParam.getActualPremium();
ekpParam.setActualPremium(actualPremium.negate());
s = ekpInsuranceUtil.sendToEkp(ekpParam);
s = doJointInsuranceTask.insertInsrancesDetail(ekpParam);
if(StringUtils.isNotBlank(s)){
ekpUpdate.set(TInsuranceEkp :: getResendFlag ,CommonConstants.ONE_INT)
.set(TInsuranceEkp :: getPushTime ,LocalDateTime.now());
......@@ -248,7 +244,7 @@ public class TInsuranceEkpServiceImpl extends ServiceImpl<TInsuranceEkpMapper, T
if(CommonConstants.FIVE_INT == pushType){
ekpParam.setSettleType(InsurancesConstants.ESTIMATE_SETTLE_BILL);
ekpParam.setInteractiveType(InsurancesConstants.CORRECT_SETTLE_BILL);
s = ekpInsuranceUtil.sendToEkp(ekpParam);
s = doJointInsuranceTask.insertInsrancesDetail(ekpParam);
if(StringUtils.isNotBlank(s)){
ekpUpdate.set(TInsuranceEkp :: getResendFlag ,CommonConstants.ONE_INT)
.set(TInsuranceEkp :: getPushTime ,LocalDateTime.now());
......@@ -261,7 +257,7 @@ public class TInsuranceEkpServiceImpl extends ServiceImpl<TInsuranceEkpMapper, T
if(CommonConstants.SIX_INT == pushType){
ekpParam.setSettleType(InsurancesConstants.ACTUAL_SETTLE_BILL);
ekpParam.setInteractiveType(InsurancesConstants.CORRECT_SETTLE_BILL);
s = ekpInsuranceUtil.sendToEkp(ekpParam);
s = doJointInsuranceTask.insertInsrancesDetail(ekpParam);
if(StringUtils.isNotBlank(s)){
ekpUpdate.set(TInsuranceEkp :: getResendFlag ,CommonConstants.ONE_INT)
.set(TInsuranceEkp :: getPushTime ,LocalDateTime.now());
......
......@@ -567,7 +567,13 @@ public class DoJointInsuranceTask {
//新建商险订单明细
if (InsurancesConstants.NEW_SETTLE_BILL.equals(param.getInteractiveType())) {
EkpInsurancesInfo pushParam = new EkpInsurancesInfo();
initValues(pushParam, deptInfoVo, param);
String code = "";
if (InsurancesConstants.ESTIMATE_SETTLE_BILL.equals(param.getSettleType())) {
code = "1";
} else if (InsurancesConstants.ACTUAL_SETTLE_BILL.equals(param.getSettleType())) {
code = "2";
}
initValues(pushParam, deptInfoVo, param,code);
//应收
double ys = 0L;
if (!"是".equals(deptInfoVo.getIsBpo())) {
......@@ -603,7 +609,13 @@ public class DoJointInsuranceTask {
//红冲
if (InsurancesConstants.CORRECT_SETTLE_BILL.equals(param.getInteractiveType())) {
EkpInsurancesInfo pushParam = new EkpInsurancesInfo();
initValues(pushParam, deptInfoVo, param);
String code = "";
if (InsurancesConstants.ESTIMATE_SETTLE_BILL.equals(param.getSettleType())) {
code = "3";
} else if (InsurancesConstants.ACTUAL_SETTLE_BILL.equals(param.getSettleType())) {
code = "4";
}
initValues(pushParam, deptInfoVo, param,code);
//应收
pushParam.setFd_3adfe6e30f2a3c(InsurancesConstants.ACTUAL_SETTLE_BILL.equals(param.getSettleType()) ? param.getActualPremium().doubleValue() :param.getEstimatePremium().doubleValue());
insurancesInfoMapper.insert(pushParam);
......@@ -721,10 +733,10 @@ public class DoJointInsuranceTask {
}
//商险新增初始化
public void initValues(EkpInsurancesInfo pushParam,EkpInsuranceDeptInfoVo deptInfoVo,EkpInteractiveParam param) throws ParseException {
//单号
public void initValues(EkpInsurancesInfo pushParam,EkpInsuranceDeptInfoVo deptInfoVo,EkpInteractiveParam param,String code) throws ParseException {
//单号,sxdd + 商险id + 标识
pushParam.setFd_3adfe67a9f6364("SXDD" + LocalDateTimeUtils.formatTime(LocalDateTime.now(),DateUtil.ISO_DATE_FORMAT)
+ "_" + param.getDetailId());
+ param.getDetailId() + code );
//项目id 项目编码
pushParam.setFd_3b16dfb32778f2(deptInfoVo.getFdId());
pushParam.setFd_3b16dfb32778f2_text(deptInfoVo.getDeptNo());
......@@ -801,7 +813,7 @@ public class DoJointInsuranceTask {
//商险更新赋值
public void initValueUpdate(EkpInsurancesInfo info,EkpInsuranceDeptInfoVo deptInfoVo,EkpInteractiveParam param) throws ParseException {
//实际结算月份
info.setFd_3af9d11088facc("全量未结算数据".equals(deptInfoVo.getInsurancesType()) ? DateUtil.parseDate(param.getSettleMonth(), "yyyyMM") : null);
info.setFd_3af9d11088facc(!"全量未结算数据".equals(deptInfoVo.getInsurancesType()) ? DateUtil.parseDate(param.getSettleMonth(), DateUtil.DATETIME_YYYY_MM) : null);
//是否全部结算
info.setFd_3b13b2ecc164aa("全量未结算数据".equals(deptInfoVo.getInsurancesType()) ? "是" : "否");
//预估保费
......
......@@ -50,18 +50,22 @@
<select id="getSettle" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"></include>
fd_id,
fd_3b0a5743acab7e as fd_3b05ba46bb042e,
MAX(case when fd_3adfe6af71a1cc = '预估' THEN fd_3adfe6ec6a8cbe END) AS fd_3b05ba4808a3ca,
MAX(case when fd_3adfe6af71a1cc = '实缴' THEN fd_3adfe6ec6a8cbe END) AS fd_3b05bd5ed0b976
from
ekp_f80727b647a403b975ae
ekp_insurances_info
where
fd_3b05ba46bb042e = #{id}
fd_3b0a5743acab7e = #{id}
group by fd_3b0a5743acab7e
</select>
<select id="getSettleStatusFromEkpInsuranceDetail" resultType="java.lang.String">
select
fd_3adfe6ec6a8cbe
from
ekp_e96a0a28442447c81ec0
ekp_insurances_info
where
fd_3b0a5743acab7e = #{id} and fd_3adfe6af71a1cc = '实缴' limit 1
</select>
......@@ -70,7 +74,7 @@
select
<include refid="Base_Column_Dept"></include>
from
ekp_e96a0a28442447c81ec0
ekp_insurances_info
where
fd_3b0a5743acab7e = #{id} and fd_3adfe6af71a1cc = '实缴' limit 1
</select>
......@@ -79,7 +83,7 @@
select
<include refid="Base_Column_Dept"></include>
from
ekp_e96a0a28442447c81ec0
ekp_insurances_info
where
fd_3b0a5743acab7e = #{id} and fd_3adfe6af71a1cc = '预估' limit 1
</select>
......
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