Commit 2c21b5f9 authored by fangxinjiang's avatar fangxinjiang

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

parents b9044a17 92093959
......@@ -7,6 +7,7 @@ import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.time.LocalDate;
import java.time.ZoneId;
import java.time.format.DateTimeFormatter;
import java.util.Calendar;
import java.util.Date;
......@@ -75,11 +76,14 @@ public class LocalDateUtil {
*/
public static LocalDate parseLocalDate(String strDate){
try {
DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern(NORM_DATE_PATTERN, Locale.CHINA);
LocalDate localDate = LocalDate.parse(strDate, dateTimeFormatter);
return localDate;
if (isDate(strDate,NORM_DATE_PATTERN)){
DateFormat dateFormat = new SimpleDateFormat(NORM_DATE_PATTERN);
Date date = dateFormat.parse(strDate);
return date.toInstant().atZone(ZoneId.systemDefault()).toLocalDate();
}
return null;
}catch (Exception e){
e.printStackTrace();
System.out.println("字符串格式的日期转LocalDate失败");
return null;
}
}
......@@ -337,6 +341,6 @@ public class LocalDateUtil {
}
public static void main(String[] args) {
System.out.println(isOverdueDate("2022-08-03"));
System.out.println(parseLocalDate("2022-8-3"));
}
}
......@@ -138,15 +138,19 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
List<UpdateInsuranceSettleParam.SettleData> settleData = param.getSettleData();
List<TInsuranceSettle> list = new ArrayList<>();
for (UpdateInsuranceSettleParam.SettleData settleDatum : settleData) {
TInsuranceSettle settle = new TInsuranceSettle();
String settleId = settleDatum.getSn().split("_")[1];
settle.setId(settleId);
settle.setUpdateTime(pushTime);
settle.setSettleHandleStatus(settleDatum.getSettleStatus());
if (StringUtils.isNotBlank(settleId)){
TInsuranceSettle byId = tInsuranceSettleService.getById(settleId);
if (!Optional.ofNullable(byId).isPresent()){
continue;
}
byId.setUpdateTime(pushTime);
byId.setSettleHandleStatus(settleDatum.getSettleStatus());
if (CommonConstants.THREE_STRING.equals(settleDatum.getSettleStatus())){
settle.setSettleDoneTime(pushTime);
byId.setSettleDoneTime(pushTime);
}
list.add(byId);
}
list.add(settle);
}
if (CollectionUtils.isNotEmpty(list)){
tInsuranceSettleService.saveOrUpdateBatch(list);
......@@ -326,6 +330,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.eq(TInsuranceDetail::getPolicyStart, LocalDateUtil.parseLocalDate(success.getPolicyStart()))
.eq(TInsuranceDetail::getPolicyEnd, LocalDateUtil.parseLocalDate(success.getPolicyEnd()))
.eq(TInsuranceDetail::getDeleteFlag, CommonConstants.ZERO_INT)
.last(CommonConstants.LAST_ONE_SQL)
);
BeanCopyUtils.copyProperties(detail,newDetail);
detail.setIsEffect(CommonConstants.ONE_INT);
......@@ -1000,6 +1005,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.eq(TInsuranceDetail::getPolicyStart, LocalDateUtil.parseLocalDate(success.getPolicyStart()))
.eq(TInsuranceDetail::getPolicyEnd, LocalDateUtil.parseLocalDate(success.getPolicyEnd()))
.eq(TInsuranceDetail::getDeleteFlag, CommonConstants.ZERO_INT)
.last(CommonConstants.LAST_ONE_SQL)
);
if (StringUtils.isNotBlank(success.getInvoiceNo())){
detail.setInvoiceNo(success.getInvoiceNo());
......@@ -1954,6 +1960,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.eq(TInsuranceDetail::getPolicyStart, LocalDateUtil.parseLocalDate(param.getPolicyStart()))
.eq(TInsuranceDetail::getPolicyEnd, LocalDateUtil.parseLocalDate(param.getPolicyEnd()))
.eq(TInsuranceDetail::getDeleteFlag, CommonConstants.ZERO_INT)
.last(CommonConstants.LAST_ONE_SQL)
);
if (!Optional.ofNullable(detail).isPresent()){
param.setErrorMessage(InsurancesConstants.REPLACE_IS_NOT_EXIST);
......@@ -2157,6 +2164,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.eq(TInsuranceDetail::getPolicyStart, LocalDateUtil.parseLocalDate(param.getPolicyStart()))
.eq(TInsuranceDetail::getPolicyEnd, LocalDateUtil.parseLocalDate(param.getPolicyEnd()))
.eq(TInsuranceDetail::getDeleteFlag, CommonConstants.ZERO_INT)
.last(CommonConstants.LAST_ONE_SQL)
);
if (!Optional.ofNullable(detail).isPresent()){
param.setErrorMessage(InsurancesConstants.DATA_IS_NOT_EXIST);
......@@ -2763,9 +2771,13 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
cancel.setCreateTime(LocalDateTime.now());
tInsuranceSettleCancelService.save(cancel);
//推送EKP // TODO: 2022/8/2
TInsuranceSettle byId = tInsuranceSettleService.getById(insuranceDetailId);
TInsuranceSettle byId = tInsuranceSettleService.getById(defaultSettleId);
//如果已经推送过实际保费,则先作废,再推送新的预估保费和实际保费
if (byId.getIsActualPush() ==1){
if (byId.getIsActualPush() ==CommonConstants.ONE_INT){
}
if(byId.getIsActualPush() ==CommonConstants.ZERO_INT){
}
//新增新的结算数据
......@@ -3192,11 +3204,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.eq(TInsuranceDetail ::getEmpIdcardNo,empIdCardNo ).eq(TInsuranceDetail :: getInsuranceCompanyName,insuranceCompanyName )
.eq(TInsuranceDetail :: getInsuranceTypeName,insuranceTypeName)
.eq(TInsuranceDetail :: getPolicyStart,LocalDateUtil.parseLocalDate(policyStart))
.eq(TInsuranceDetail :: getPolicyEnd,LocalDateUtil.parseLocalDate(policyEnd));
//排除已减员的数据
queryWrapper.ne(TInsuranceDetail :: getBuyHandleStatus,CommonConstants.FIVE_INT);
//排除投保退回的数据
queryWrapper.ne(TInsuranceDetail :: getBuyHandleStatus,CommonConstants.FOUR_INT);
.eq(TInsuranceDetail :: getPolicyEnd,LocalDateUtil.parseLocalDate(policyEnd)).last(CommonConstants.LAST_ONE_SQL);
List<TInsuranceDetail> list = list(queryWrapper);
if (list.size()>1){
param.setErrorMessage(InsurancesConstants.MULTIPLE_RECORDS_UNDER_WARRANTY);
......@@ -3454,10 +3462,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.eq(TInsuranceDetail :: getDeptNo,deptNo).eq(TInsuranceDetail :: getBuyStandard,buyStandard)
.eq(TInsuranceDetail :: getInsuranceTypeName,insuranceTypeName)
.eq(TInsuranceDetail :: getPolicyStart,LocalDateUtil.parseLocalDate(policyStart) )
.eq(TInsuranceDetail :: getPolicyEnd,LocalDateUtil.parseLocalDate(policyEnd));
//排除已减员的数据
queryWrapper.ne(TInsuranceDetail :: getBuyHandleStatus,CommonConstants.FIVE_INT);
queryWrapper.ne(TInsuranceDetail :: getBuyHandleStatus,CommonConstants.FOUR_INT);
.eq(TInsuranceDetail :: getPolicyEnd,LocalDateUtil.parseLocalDate(policyEnd)).last(CommonConstants.LAST_ONE_SQL);
List<TInsuranceDetail> list = list(queryWrapper);
if (list.size()>1){
param.setErrorMessage(InsurancesConstants.MULTIPLE_RECORDS_UNDER_WARRANTY);
......@@ -3674,11 +3679,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.eq(TInsuranceDetail :: getBuyStandard,buyStandard).eq(TInsuranceDetail::getDeptNo,oldDeptNo)
.eq(TInsuranceDetail :: getInsuranceCompanyName,insuranceCompanyName)
.eq(TInsuranceDetail :: getPolicyStart,LocalDateUtil.parseLocalDate(policyStart))
.eq(TInsuranceDetail :: getPolicyEnd,LocalDateUtil.parseLocalDate(policyEnd));
//排除已减员的数据
queryWrapper.ne(TInsuranceDetail :: getBuyHandleStatus,CommonConstants.FIVE_INT);
//排除投保退回的数据
queryWrapper.ne(TInsuranceDetail :: getBuyHandleStatus,CommonConstants.FOUR_INT);
.eq(TInsuranceDetail :: getPolicyEnd,LocalDateUtil.parseLocalDate(policyEnd)).last(CommonConstants.LAST_ONE_SQL);
List<TInsuranceDetail> list = list(queryWrapper);
if (list.size()>1){
param.setErrorMessage(InsurancesConstants.MULTIPLE_RECORDS_UNDER_WARRANTY);
......@@ -3833,17 +3834,20 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if(StringUtils.isBlank(empIdcardNo)){
return R.failed("身份证号为空");
}
//员工身份 // 身份证号位数校验(18 位合法)
// 身份证号位数校验(18 位合法)
if (!ValidityUtil.validateIDCard(empIdcardNo)){
return R.failed("身份证格式不正确");
}
LambdaQueryWrapper<TInsuranceDetail> queryWrapper = new LambdaQueryWrapper<>();
//查询所有在保,未出险,未过期,未失效,未减员的保单信息
queryWrapper.eq(TInsuranceDetail :: getEmpIdcardNo,empIdcardNo).eq(TInsuranceDetail :: getBuyHandleStatus ,CommonConstants.THREE_INT)
.eq(TInsuranceDetail :: getIsEffect,CommonConstants.ZERO_INT).eq(TInsuranceDetail :: getIsUse,CommonConstants.ZERO_INT)
queryWrapper.eq(TInsuranceDetail :: getEmpIdcardNo,empIdcardNo)
.eq(TInsuranceDetail :: getBuyHandleStatus ,CommonConstants.THREE_INT)
.eq(TInsuranceDetail :: getIsEffect,CommonConstants.ZERO_INT)
.eq(TInsuranceDetail :: getIsUse,CommonConstants.ZERO_INT)
.eq(TInsuranceDetail :: getIsOverdue,CommonConstants.ZERO_INT)
.ne(TInsuranceDetail :: getReduceHandleStatus,CommonConstants.ONE_INT)
.ne(TInsuranceDetail :: getReduceHandleStatus,CommonConstants.TWO_INT);
.ne(TInsuranceDetail :: getReduceHandleStatus,CommonConstants.TWO_INT)
.ne(TInsuranceDetail :: getReduceHandleStatus,CommonConstants.FOUR_INT);
List<TInsuranceDetail> list = list(queryWrapper);
if (CollectionUtils.isEmpty(list)){
return R.failed("无可出险的保单");
......@@ -3861,6 +3865,13 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
}
/**
* 根据身份证查询商险列表
*
* @author huyc
* @param
* @return {@link R}
*/
@Override
public IPage<InsuranceListByIdCardVo> getInsuranceListByIdCard(Page<TInsuranceDetail> page, String idCard) {
IPage<InsuranceListByIdCardVo> insuranceListByIdCard = baseMapper.getInsuranceListByIdCard(page, idCard);
......
......@@ -464,12 +464,15 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
if (null == lib) {
lib = new TForecastLibrary();
}
lib.setSocialHousehold(tSocialInfo.getSocialHousehold());
lib.setSocialHouseholdName(tSocialInfo.getSocialHouseholdName());
lib.setDiffType(diffType);
lib.setDataType(CommonConstants.ZERO_INT);
lib.setEmpId(tSocialInfo.getEmpId());
lib.setEmpIdcard(tSocialInfo.getEmpIdcard());
lib.setEmpName(tSocialInfo.getEmpName());
lib.setEmpNo(tSocialInfo.getEmpNo());
lib.setEmpNatrue(tSocialInfo.getEmpType());
lib.setSocialCreateMonth(ServiceUtil.initCreateMonth(tSocialInfo.getCreateTime(), payMonth));
lib.setProvidentCreateMonth(lib.getSocialCreateMonth());
lib.setSocialPayMonth(payMonth);
......@@ -1253,12 +1256,15 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
if (lib == null) {
lib = new TForecastLibrary();
}
lib.setProvidentHousehold(providentFund.getProvidentHousehold());
lib.setProvidentHouseholdName(providentFund.getProvidentHouseholdName());
lib.setDiffType(diffType);
lib.setDataType(CommonConstants.ONE_INT);
lib.setEmpId(providentFund.getEmpId());
lib.setEmpIdcard(providentFund.getEmpIdcard());
lib.setEmpName(providentFund.getEmpName());
lib.setEmpNo(providentFund.getEmpNo());
lib.setEmpNatrue(providentFund.getEmpType());
lib.setProvidentCreateMonth(ServiceUtil.initCreateMonth(providentFund.getCreateTime(), payMonth));
lib.setSocialCreateMonth(lib.getProvidentCreateMonth());
//同时处理社保日期
......
......@@ -94,6 +94,7 @@
<result property="idCardTown" column="ID_CARD_TOWN"/>
<result property="idCardAddress" column="ID_CARD_ADDRESS"/>
<result property="applyNo" column="APPLY_NO"/>
<result property="createTime" column="CREATE_TIME"/>
</resultMap>
<resultMap id="dispatchPageMap" type="com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchInfoPageVo" extends="tDispatchInfoMap">
<result property="providentHouseholdName" column="PROVIDENT_HOUSEHOLD_NAME"/>
......@@ -196,6 +197,7 @@
a.CREATE_BY,
a.UPDATE_BY,
a.CREATE_NAME,
a.CREATE_TIME,
a.UPDATE_TIME,
a.ORGAN_NAME,
a.DISPATCH_ITEM,
......@@ -261,7 +263,7 @@
AND a.SETTLE_DOMAIN = #{tDispatchInfo.settleDomain}
</if>
<if test="tDispatchInfo.settleDomainName != null and tDispatchInfo.settleDomainName.trim() != ''">
AND a.SETTLE_DOMAIN_NAME like CONCAT(CONCAT(#{tDispatchInfo.settleDomainName}), '%')
AND a.SETTLE_DOMAIN_NAME like CONCAT(#{tDispatchInfo.settleDomainName}, '%')
</if>
<if test="tDispatchInfo.settleDomainCode != null and tDispatchInfo.settleDomainCode.trim() != ''">
AND a.SETTLE_DOMAIN_CODE = #{tDispatchInfo.settleDomainCode}
......
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