Commit 17cc6626 authored by fangxinjiang's avatar fangxinjiang

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

parents 8867accd db7d8dba
package com.yifu.cloud.plus.v1.yifu.common.core.util; package com.yifu.cloud.plus.v1.yifu.common.core.util;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.sms.MonthObject; import com.yifu.cloud.plus.v1.yifu.common.core.util.sms.MonthObject;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
...@@ -287,7 +288,9 @@ public class DateUtil { ...@@ -287,7 +288,9 @@ public class DateUtil {
// setLenient avoids allowing dates like 9/32/2001 // setLenient avoids allowing dates like 9/32/2001
// which would otherwise parse to 10/2/2001 // which would otherwise parse to 10/2/2001
df.setLenient(false); df.setLenient(false);
return df.parse( dateText.replace("/","").replace("-","")); return df.parse( dateText.replace("/","").replace("-","")
.replace(CommonConstants.YEAR,"").replace(CommonConstants.MONTH,"")
.replace(CommonConstants.DAY,""));
} catch (ParseException e) { } catch (ParseException e) {
return null; return null;
......
...@@ -31,6 +31,10 @@ public class InsurancesConstants { ...@@ -31,6 +31,10 @@ public class InsurancesConstants {
* 编辑 * 编辑
*/ */
public static final String EDIT = "编辑"; public static final String EDIT = "编辑";
/**
* 数据发生变动,请刷新数据后重新办理
*/
public static final String CHANGE_ERROR = "数据发生变动,请刷新数据后重新办理";
/** /**
* 导出办理 * 导出办理
*/ */
......
package com.yifu.cloud.plus.v1.yifu.insurances.util; package com.yifu.cloud.plus.v1.yifu.insurances.util;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.TInsuranceSettlePushParam;
import org.springframework.core.io.FileSystemResource; import org.springframework.core.io.FileSystemResource;
import org.springframework.http.*; import org.springframework.http.*;
import org.springframework.util.LinkedMultiValueMap; import org.springframework.util.LinkedMultiValueMap;
...@@ -22,6 +24,8 @@ public class EKPUtil { ...@@ -22,6 +24,8 @@ public class EKPUtil {
*/ */
public static void testAddNewsInRestTemplate() throws Exception{ public static void testAddNewsInRestTemplate() throws Exception{
RestTemplate yourRestTemplate = new RestTemplate(); RestTemplate yourRestTemplate = new RestTemplate();
TInsuranceSettlePushParam formValues = new TInsuranceSettlePushParam();
String jsonObject = new ObjectMapper().writeValueAsString(formValues);
//指向EKP的接口url //指向EKP的接口url
String url = "http://119.96.227.251:8080/api/sys-modeling/appModelRestService/addModel"; String url = "http://119.96.227.251:8080/api/sys-modeling/appModelRestService/addModel";
//把ModelingAppModelParameterAddForm转换成MultiValueMap //把ModelingAppModelParameterAddForm转换成MultiValueMap
...@@ -32,6 +36,7 @@ public class EKPUtil { ...@@ -32,6 +36,7 @@ public class EKPUtil {
wholeForm.add("fdModelId", "181d73279372e5a55438a47d7436ab7e"); wholeForm.add("fdModelId", "181d73279372e5a55438a47d7436ab7e");
wholeForm.add("fdFlowId", "18267f206233f29cbd3c5ee425c9408a"); wholeForm.add("fdFlowId", "18267f206233f29cbd3c5ee425c9408a");
wholeForm.add("formValues", new String("{\"fd_3adfe6af71a1cc\":\"王五\", \"fd_3adfe658c6229e\":\"2019-03-26\", \"fd_3adfe6592b4158\":\"这里内容\"}".getBytes("UTF-8"),"ISO-8859-1") ); wholeForm.add("formValues", new String("{\"fd_3adfe6af71a1cc\":\"王五\", \"fd_3adfe658c6229e\":\"2019-03-26\", \"fd_3adfe6592b4158\":\"这里内容\"}".getBytes("UTF-8"),"ISO-8859-1") );
//wholeForm.add("formValues", new String("{\"fd_3adfe6af71a1cc\":\"王五\", \"fd_3adfe658c6229e\":\"2019-03-26\", \"fd_3adfe6592b4158\":\"这里内容\"}".getBytes("UTF-8"),"ISO-8859-1") );
HttpHeaders headers = new HttpHeaders(); HttpHeaders headers = new HttpHeaders();
//如果EKP对该接口启用了Basic认证,那么客户端需要加入 //如果EKP对该接口启用了Basic认证,那么客户端需要加入
......
package com.yifu.cloud.plus.v1.yifu.insurances.vo; package com.yifu.cloud.plus.v1.yifu.insurances.vo;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
...@@ -52,6 +53,12 @@ public class InsuranceExportListVO implements Serializable { ...@@ -52,6 +53,12 @@ public class InsuranceExportListVO implements Serializable {
@Schema(description = " 投保类型, 1新增、3批增、4替换") @Schema(description = " 投保类型, 1新增、3批增、4替换")
private Integer buyType; private Integer buyType;
/**
* 投保办理状态 1待投保 2投保中 3已投保 4投保退回 5 已减员
*/
@JsonIgnore
private Integer buyHandleStatus;
/** /**
* 购买月数 * 购买月数
*/ */
...@@ -150,6 +157,12 @@ public class InsuranceExportListVO implements Serializable { ...@@ -150,6 +157,12 @@ public class InsuranceExportListVO implements Serializable {
@Schema(description = "结算类型 (0、预估 1、实缴)") @Schema(description = "结算类型 (0、预估 1、实缴)")
private Integer settleType; private Integer settleType;
/**
* 保单编号
*/
@Schema(description = "保单编号")
private String policyNo;
/** /**
* 创建人姓名 * 创建人姓名
*/ */
......
package com.yifu.cloud.plus.v1.yifu.insurances.vo; package com.yifu.cloud.plus.v1.yifu.insurances.vo;
import lombok.Data; import lombok.Data;
import org.springframework.cglib.core.Local;
import java.time.LocalDate;
/** /**
* @author zhaji * @author zhaji
...@@ -9,6 +12,159 @@ import lombok.Data; ...@@ -9,6 +12,159 @@ import lombok.Data;
*/ */
@Data @Data
public class TInsuranceSettlePushParam { public class TInsuranceSettlePushParam {
/**
* ID主键 36位
*/
private String fd_id ;
/**
* 单据类型 200 单选(预估单,实缴单,差异单)
*/
private String fd_3adfe6af71a1cc;
/**
* 项目编码 200
*/
private String fd_3adfe658c6229e;
/**
* 项目名称 200
*/
private String fd_3adfe6592b4158;
/**
* 单号 200
*/
private String fd_3adfe67a9f6364;
/**
* 客户编码 200
*/
private String fd_3adfe6598281e8;
/**
* 客户名称 200
*/
private String fd_3adfe7a2688902;
/**
* 发生日期 "xxxx--xx--xx"
*/
private LocalDate fd_3adfe67c24dace;
/**
* 姓名 200
*/
private String fd_3adfe65d759650;
/**
* 身份证号 200
*/
private String fd_3adfe65dbd9f68;
/**
* 发票号 200
*/
private String fd_3adfe65e0cd094;
/**
* 险种 200
*/
private String fd_3adfe65f6599e4;
/**
* 保险公司 200
*/
private String fd_3adfe65ea04728;
/**
* 保单号 200
*/
private String fd_3adfe65e60e110;
/**
* 保险开始日期 "xxxx--xx--xx"
*/
private LocalDate fd_3adfe6b7e0ede8;
/**
* 保险结束日期 "xxxx--xx--xx"
*/
private LocalDate fd_3adfe6b847bfe6;
/**
* 购买标准 精确到小数点后两位
*/
private Double fd_3adfe6d55384c6;
/**
* 实际保费 精确到小数点后两位
*/
private Double fd_3adfe6610c0d2c;
/**
* 医保 精确到小数点后两位
*/
private Double fd_3adfe66041a996;
/**
* 事故或残疾 200
*/
private String fd_3adfe6609aa810;
/**
* 应收 精确到小数点后两位
*/
private Double fd_3adfe6e30f2a3c;
/**
* 应收 200 单选(已结算,结算中,未结算)
*/
private String fd_3adfe6ec6a8cbe;
/**
* 收款状态 200 单选(已收,未收)
*/
private String fd_3adfe6ef5dfaac;
/**
* 收入结算单号 200
*/
private String fd_3adfe79fd04606;
/**
* 收款认领单号 200
*/
private String fd_3adfe7a117f086;
/**
* 应支出 精确到小数点后两位
*/
private Double fd_3adfe6e3911ffe;
/**
* 支出结算状态 200 单选(已结算,结算中,未结算)
*/
private String fd_3adfe6eda67236;
/**
* 付款状态 200 单选(已收,未收)
*/
private String fd_3adfe6f05531ec;
/**
* 支出结算单号 200
*/
private String fd_3adfe7a035849c;
/**
* 付款单号 200
*/
private String fd_3adfe7a08eba96;
/**
* 结算月份 200
*/
private String fd_3aea2f0180eccc;
} }
...@@ -208,7 +208,7 @@ public class TInsuranceDetailController { ...@@ -208,7 +208,7 @@ public class TInsuranceDetailController {
@Operation(summary = "导出办理", description = "导出办理") @Operation(summary = "导出办理", description = "导出办理")
@PostMapping("/getInsuranceExportList") @PostMapping("/getInsuranceExportList")
public R<List<InsuranceExportListVO>> getInsuranceExportList(@RequestBody InsuranceExportListParam param) { public R<List<InsuranceExportListVO>> getInsuranceExportList(@RequestBody InsuranceExportListParam param) {
return R.ok(tInsuranceDetailService.getInsuranceExportList(param)); return tInsuranceDetailService.getInsuranceExportList(param);
} }
/** /**
...@@ -365,7 +365,7 @@ public class TInsuranceDetailController { ...@@ -365,7 +365,7 @@ public class TInsuranceDetailController {
@Operation(summary = "导出减员列表", description = "导出减员列表") @Operation(summary = "导出减员列表", description = "导出减员列表")
@PostMapping("/getInsuranceRefundHandlingList") @PostMapping("/getInsuranceRefundHandlingList")
public R<List<RefundExportListVo>> getInsuranceRefundHandlingList(@RequestBody RefundExportListParam param) { public R<List<RefundExportListVo>> getInsuranceRefundHandlingList(@RequestBody RefundExportListParam param) {
return R.ok(tInsuranceDetailService.getInsuranceRefundHandlingList(param)); return tInsuranceDetailService.getInsuranceRefundHandlingList(param);
} }
/** /**
......
...@@ -189,4 +189,6 @@ public interface TInsuranceDetailMapper extends BaseMapper<TInsuranceDetail> { ...@@ -189,4 +189,6 @@ public interface TInsuranceDetailMapper extends BaseMapper<TInsuranceDetail> {
IPage<InsuranceListByIdCardVo> getInsuranceListByIdCard(Page<TInsuranceDetail> page, @Param("idCard") String idCard); IPage<InsuranceListByIdCardVo> getInsuranceListByIdCard(Page<TInsuranceDetail> page, @Param("idCard") String idCard);
List<TInsuranceDetail> selectListByempIdcardNo(String empIdcardNo); List<TInsuranceDetail> selectListByempIdcardNo(String empIdcardNo);
TInsuranceDetail selectByregionSQL(@Param("regionSql") String regionSQL,@Param("id") String id);
} }
...@@ -134,9 +134,9 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> { ...@@ -134,9 +134,9 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> {
* *
* @author licancan * @author licancan
* @param param * @param param
* @return {@link List<InsuranceExportListVO>} * @return {@link R<List<InsuranceExportListVO>>}
*/ */
List<InsuranceExportListVO> getInsuranceExportList(InsuranceExportListParam param); R<List<InsuranceExportListVO>> getInsuranceExportList(InsuranceExportListParam param);
/** /**
* 投保退回 * 投保退回
...@@ -231,7 +231,7 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> { ...@@ -231,7 +231,7 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> {
* @param param 查询参数 * @param param 查询参数
* @return {@link List< RefundExportListVo >} * @return {@link List< RefundExportListVo >}
*/ */
List<RefundExportListVo> getInsuranceRefundHandlingList(RefundExportListParam param); R<List<RefundExportListVo>> getInsuranceRefundHandlingList(RefundExportListParam param);
/** /**
* 减员办理 * 减员办理
......
...@@ -781,18 +781,26 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -781,18 +781,26 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
* @author licancan * @author licancan
*/ */
@Override @Override
public List<InsuranceExportListVO> getInsuranceExportList(InsuranceExportListParam param) { public R<List<InsuranceExportListVO>> getInsuranceExportList(InsuranceExportListParam param) {
YifuUser user = SecurityUtils.getUser(); YifuUser user = SecurityUtils.getUser();
List<InsuranceExportListVO> insuranceExportList = new ArrayList<>(); List<InsuranceExportListVO> insuranceExportList = new ArrayList<>();
//todo 根据登录人获取数据权限 //todo 根据登录人获取数据权限
String regionSQL = getRegionSQL(user); String regionSQL = getRegionSQL(user);
param.setRegionSql(regionSQL); param.setRegionSql(regionSQL);
if(StringUtils.isBlank(regionSQL)){ if(StringUtils.isBlank(regionSQL)){
return insuranceExportList; return R.ok(insuranceExportList);
} }
//如勾选项不为空,则导出勾选记录;否则导出当前筛选条件下 && 「待投保」的结果集 //如勾选项不为空,则导出勾选记录;否则导出当前筛选条件下 && 「待投保」的结果集
if (CollectionUtils.isNotEmpty(param.getIdList())){ if (CollectionUtils.isNotEmpty(param.getIdList())){
insuranceExportList = baseMapper.getInsuranceExportListBySelect(param.getIdList()); insuranceExportList = baseMapper.getInsuranceExportListBySelect(param.getIdList());
if (CollectionUtils.isNotEmpty(insuranceExportList)){
for (InsuranceExportListVO exportListVO : insuranceExportList) {
if (exportListVO.getBuyHandleStatus() != CommonConstants.ONE_INT){
return R.failed(InsurancesConstants.CHANGE_ERROR);
}
}
}
}else { }else {
insuranceExportList = baseMapper.getInsuranceExportList(param); insuranceExportList = baseMapper.getInsuranceExportList(param);
} }
...@@ -875,7 +883,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -875,7 +883,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
} }
} }
return insuranceExportList; return R.ok(insuranceExportList);
} }
/** /**
...@@ -2394,17 +2402,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -2394,17 +2402,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
listResult.add(param); listResult.add(param);
continue; continue;
}else { }else {
//查数据是否存在:姓名 + 身份证号 + 保险公司 + 险种名称 + 保单开始时间 + 保单结束时间 //查数据是否存在权限范围内
TInsuranceDetail detailByRegionSQL = this.baseMapper.selectOne(Wrappers.<TInsuranceDetail>query().lambda() TInsuranceDetail detailByRegionSQL = this.baseMapper.selectByregionSQL(regionSQL, detail.getId());
.eq(TInsuranceDetail::getEmpName, param.getEmpName())
.eq(TInsuranceDetail::getEmpIdcardNo, param.getEmpIdcardNo())
.eq(TInsuranceDetail::getInsuranceCompanyName, param.getInsuranceCompanyName())
.eq(TInsuranceDetail::getInsuranceTypeName, param.getInsuranceTypeName())
.eq(TInsuranceDetail::getPolicyStart, LocalDateUtil.parseLocalDate(param.getPolicyStart()))
.eq(TInsuranceDetail::getPolicyEnd, LocalDateUtil.parseLocalDate(param.getPolicyEnd()))
.eq(TInsuranceDetail::getDeleteFlag, CommonConstants.ZERO_INT)
.last(regionSQL+CommonConstants.LAST_ONE_SQL)
);
if (!Optional.ofNullable(detailByRegionSQL).isPresent()){ if (!Optional.ofNullable(detailByRegionSQL).isPresent()){
param.setErrorMessage(InsurancesConstants.NO_UPDATE_DETAIL_JURISDICTION); param.setErrorMessage(InsurancesConstants.NO_UPDATE_DETAIL_JURISDICTION);
listResult.add(param); listResult.add(param);
...@@ -2825,7 +2824,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -2825,7 +2824,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
*/ */
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public List<RefundExportListVo> getInsuranceRefundHandlingList(RefundExportListParam param){ public R<List<RefundExportListVo>> getInsuranceRefundHandlingList(RefundExportListParam param){
YifuUser user = SecurityUtils.getUser(); YifuUser user = SecurityUtils.getUser();
List<RefundExportListVo> refundExportList; List<RefundExportListVo> refundExportList;
...@@ -2835,6 +2834,11 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -2835,6 +2834,11 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
//如勾选项不为空,则导出勾选记录;否则导出当前筛选条件下 && 「待减员」的结果集 //如勾选项不为空,则导出勾选记录;否则导出当前筛选条件下 && 「待减员」的结果集
if (CollectionUtils.isNotEmpty(param.getIdList())){ if (CollectionUtils.isNotEmpty(param.getIdList())){
refundExportList = baseMapper.getRefundExportListBySelect(param.getIdList()); refundExportList = baseMapper.getRefundExportListBySelect(param.getIdList());
for (RefundExportListVo refundExportListVo : refundExportList) {
if(null != refundExportListVo.getReduceHandleStatus() && CommonConstants.ONE_INT != refundExportListVo.getReduceHandleStatus()){
return R.failed(InsurancesConstants.CHANGE_ERROR);
}
}
}else { }else {
refundExportList = baseMapper.getRefundExportList(param); refundExportList = baseMapper.getRefundExportList(param);
} }
...@@ -2872,7 +2876,14 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -2872,7 +2876,14 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
} }
//批量更新 //批量更新
if (CollectionUtils.isNotEmpty(detailList)){ if (CollectionUtils.isNotEmpty(detailList)){
this.saveOrUpdateBatch(detailList); LambdaUpdateWrapper<TInsuranceDetail> updateWrapper = new LambdaUpdateWrapper<>();
for (TInsuranceDetail s : detailList) {
updateWrapper.eq(TInsuranceDetail :: getId,s.getId())
.set(TInsuranceDetail :: getUpdateBy,user.getId())
.set(TInsuranceDetail :: getReduceHandleStatus,CommonConstants.TWO_INT)
.set(TInsuranceDetail :: getUpdateTime,LocalDateTime.now());
update(updateWrapper);
}
} }
//批量更新 //批量更新
if (CollectionUtils.isNotEmpty(refundList)){ if (CollectionUtils.isNotEmpty(refundList)){
...@@ -2883,7 +2894,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -2883,7 +2894,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
//操作记录 //操作记录
addOperate(detailList,user,InsurancesConstants.INSURANCE_REFUND_EXPORT); addOperate(detailList,user,InsurancesConstants.INSURANCE_REFUND_EXPORT);
} }
return refundExportList; return R.ok(refundExportList);
} }
/** /**
...@@ -2902,6 +2913,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -2902,6 +2913,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
} }
YifuUser user = SecurityUtils.getUser(); YifuUser user = SecurityUtils.getUser();
List<String> insuranceDetailList = insuranceDetail.getInsuranceDetailList(); List<String> insuranceDetailList = insuranceDetail.getInsuranceDetailList();
if (CollectionUtils.isEmpty(insuranceDetailList)){
return R.failed("减员办理列表为空");
}
List<RefundErrorVo> errorList = new ArrayList<>(); List<RefundErrorVo> errorList = new ArrayList<>();
List<TInsuranceDetail> successList = new ArrayList<>(); List<TInsuranceDetail> successList = new ArrayList<>();
List<TInsuranceDetail> tInsuranceDetails = this.listByIds(insuranceDetailList); List<TInsuranceDetail> tInsuranceDetails = this.listByIds(insuranceDetailList);
...@@ -2926,6 +2940,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -2926,6 +2940,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
tInsuranceDetail.setReduceHandleStatus(refundType); tInsuranceDetail.setReduceHandleStatus(refundType);
if(CommonConstants.FOUR_INT == refundType){ if(CommonConstants.FOUR_INT == refundType){
tInsuranceDetail.setIsOverdue(null); tInsuranceDetail.setIsOverdue(null);
tInsuranceDetail.setIsEffect(null);
tInsuranceDetail.setBuyHandleStatus(CommonConstants.FIVE_INT); tInsuranceDetail.setBuyHandleStatus(CommonConstants.FIVE_INT);
}else { }else {
tInsuranceDetail.setBuyHandleStatus(CommonConstants.THREE_INT); tInsuranceDetail.setBuyHandleStatus(CommonConstants.THREE_INT);
......
...@@ -141,12 +141,6 @@ ...@@ -141,12 +141,6 @@
<if test="param.deptNo != null and param.deptNo.trim() != ''"> <if test="param.deptNo != null and param.deptNo.trim() != ''">
and detail.DEPT_NO = #{param.deptNo} and detail.DEPT_NO = #{param.deptNo}
</if> </if>
<if test="param.deptNo == null or param.deptNo.trim() == ''">
and detail.DEPT_NO in
<foreach collection="param.deptNoList" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="param.buyHandleStatus != null"> <if test="param.buyHandleStatus != null">
and detail.BUY_HANDLE_STATUS = #{param.buyHandleStatus} and detail.BUY_HANDLE_STATUS = #{param.buyHandleStatus}
</if> </if>
...@@ -332,6 +326,7 @@ ...@@ -332,6 +326,7 @@
detail.EMP_NAME as empName, detail.EMP_NAME as empName,
detail.EMP_IDCARD_NO as empIdcardNo, detail.EMP_IDCARD_NO as empIdcardNo,
detail.BUY_TYPE as buyType, detail.BUY_TYPE as buyType,
detail.BUY_HANDLE_STATUS as buyHandleStatus,
detail.POST as post, detail.POST as post,
detail.INSURANCE_PROVINCE_NAME as insuranceProvinceName, detail.INSURANCE_PROVINCE_NAME as insuranceProvinceName,
detail.INSURANCE_CITY_NAME as insuranceCityName, detail.INSURANCE_CITY_NAME as insuranceCityName,
...@@ -347,9 +342,10 @@ ...@@ -347,9 +342,10 @@
detail.SETTLE_MONTH as settleMonth, detail.SETTLE_MONTH as settleMonth,
detail.SETTLE_TYPE as settleType, detail.SETTLE_TYPE as settleType,
detail.CREATE_NAME as createName, detail.CREATE_NAME as createName,
detail.POLICY_NO as policyNo,
detail.REMARK as remark detail.REMARK as remark
from t_insurance_detail detail from t_insurance_detail detail
where detail.DELETE_FLAG = 0 and detail.BUY_HANDLE_STATUS = 1 and detail.id in where detail.DELETE_FLAG = 0 and detail.id in
<foreach collection="idList" index="index" item="item" open="(" separator="," close=")"> <foreach collection="idList" index="index" item="item" open="(" separator="," close=")">
#{item} #{item}
</foreach> </foreach>
...@@ -377,6 +373,7 @@ ...@@ -377,6 +373,7 @@
detail.SETTLE_MONTH as settleMonth, detail.SETTLE_MONTH as settleMonth,
detail.SETTLE_TYPE as settleType, detail.SETTLE_TYPE as settleType,
detail.CREATE_NAME as createName, detail.CREATE_NAME as createName,
detail.POLICY_NO as policyNo,
detail.REMARK as remark detail.REMARK as remark
from t_insurance_detail detail from t_insurance_detail detail
where detail.DELETE_FLAG = 0 and detail.BUY_HANDLE_STATUS = 1 where detail.DELETE_FLAG = 0 and detail.BUY_HANDLE_STATUS = 1
...@@ -806,6 +803,7 @@ ...@@ -806,6 +803,7 @@
detail.SETTLE_MONTH as settleMonth, detail.SETTLE_MONTH as settleMonth,
detail.SETTLE_TYPE as settleType, detail.SETTLE_TYPE as settleType,
detail.CREATE_NAME as createName, detail.CREATE_NAME as createName,
detail.REDUCE_HANDLE_STATUS as reduceHandleStatus,
detail.REMARK as remark detail.REMARK as remark
from from
t_insurance_detail detail t_insurance_detail detail
...@@ -906,4 +904,17 @@ ...@@ -906,4 +904,17 @@
</where> </where>
ORDER BY CREATE_TIME desc ORDER BY CREATE_TIME desc
</select> </select>
<select id="selectByregionSQL" resultType="com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail">
SELECT
<include refid="Base_Column_List"/>
FROM
t_insurance_detail detail
<where>
detail.ID = #{id}
<if test="regionSql != null and regionSql.trim() != ''">
and ${regionSql}
</if>
</where>
ORDER BY CREATE_TIME desc
</select>
</mapper> </mapper>
...@@ -1693,11 +1693,15 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap ...@@ -1693,11 +1693,15 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
} }
if (Common.isNotNull(library.getId())) { if (Common.isNotNull(library.getId())) {
baseMapper.updateById(library); baseMapper.updateById(library);
isSaveAndUpdate = true;
} else { } else {
library.setCreateTime(LocalDateTime.now()); if (BigDecimal.ZERO.compareTo(BigDecimalUtils.isNullToZero(library.getUnitSocialSum())) != CommonConstants.ZERO_INT
baseMapper.insert(library); || BigDecimal.ZERO.compareTo(BigDecimalUtils.isNullToZero(library.getUnitFundSum())) != CommonConstants.ZERO_INT) {
library.setCreateTime(LocalDateTime.now());
baseMapper.insert(library);
isSaveAndUpdate = true;
}
} }
isSaveAndUpdate = true;
} }
if (isSaveAndUpdate) { if (isSaveAndUpdate) {
return R.ok(null, "执行成功!"); return R.ok(null, "执行成功!");
...@@ -1810,7 +1814,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap ...@@ -1810,7 +1814,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
//起缴月份在要生成的月份前不处理 || 截止月份在要生成的月份后不处理 //起缴月份在要生成的月份前不处理 || 截止月份在要生成的月份后不处理
if (Integer.parseInt(payMonth) < DateUtil.formatDateInt(minStartDate) if (Integer.parseInt(payMonth) < DateUtil.formatDateInt(minStartDate)
|| (Common.isNotNull(tSocialInfo.getSocialReduceDate()) || (Common.isNotNull(tSocialInfo.getSocialReduceDate())
&& Integer.parseInt(payMonth) > DateUtil.formatDateInt(tSocialInfo.getSocialReduceDate()))) { && Integer.parseInt(payMonth) >= DateUtil.formatDateInt(tSocialInfo.getSocialReduceDate()))) {
continue; continue;
} }
flag = CommonConstants.ZERO_STRING.equals(tSocialInfo.getCanOverpay()) && (null == tSocialInfo.getOverpayNumber() || null == tSocialInfo.getHaveThisMonth() || null == minStartDate); flag = CommonConstants.ZERO_STRING.equals(tSocialInfo.getCanOverpay()) && (null == tSocialInfo.getOverpayNumber() || null == tSocialInfo.getHaveThisMonth() || null == minStartDate);
......
...@@ -876,15 +876,16 @@ ...@@ -876,15 +876,16 @@
1=1 1=1
<include refid="tSocialFundInfo_where"/> <include refid="tSocialFundInfo_where"/>
</where> </where>
order by a.CREATE_TIME desc
</select> </select>
<!--获取在用社保--> <!--获取在用社保 #a.SOCIAL_ADD_STATUS != '4' and a.SOCIAL_REDUCE_STATUS != '2' -->
<select id="getSocialList" resultMap="tSocialFundInfoMap"> <select id="getSocialList" resultMap="tSocialFundInfoMap">
SELECT SELECT
<include refid="Other_Base_Column_List"/> <include refid="Other_Base_Column_List"/>
FROM t_social_fund_info a FROM t_social_fund_info a
<where> <where>
a.SOCIAL_ADD_STATUS != '4' and a.SOCIAL_REDUCE_STATUS != '2' 1=1
<if test="empIdCard != null"> <if test="empIdCard != null">
and a.EMP_IDCARD = #{empIdCard} and a.EMP_IDCARD = #{empIdCard}
</if> </if>
...@@ -896,13 +897,13 @@ ...@@ -896,13 +897,13 @@
</if> </if>
</where> </where>
</select> </select>
<!--获取在用公积金--> <!--获取在用公积金 a.FUND_ADD_STATUS != '4' and a.FUND_REDUCE_STATUS != '2' -->
<select id="getFundList" resultMap="tSocialFundInfoMap"> <select id="getFundList" resultMap="tSocialFundInfoMap">
SELECT SELECT
<include refid="Other_Base_Column_List"/> <include refid="Other_Base_Column_List"/>
FROM t_social_fund_info a FROM t_social_fund_info a
<where> <where>
a.FUND_ADD_STATUS != '4' and a.FUND_REDUCE_STATUS != '2' 1=1
<if test="empIdCard != null"> <if test="empIdCard != null">
and a.EMP_IDCARD = #{empIdCard} and a.EMP_IDCARD = #{empIdCard}
</if> </if>
......
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