Commit 6f0dd3ee authored by fangxinjiang's avatar fangxinjiang

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

parents ab377cf7 1a045d4c
...@@ -54,7 +54,6 @@ public class TCustomerInfoController { ...@@ -54,7 +54,6 @@ public class TCustomerInfoController {
*/ */
@Operation(summary = "分页查询", description = "分页查询") @Operation(summary = "分页查询", description = "分页查询")
@GetMapping("/page") @GetMapping("/page")
@PreAuthorize("@pms.hasPermission('demo_tcustomerinfo_get')")
public R<IPage<TCustomerInfo>> getTCustomerInfoPage(Page<TCustomerInfo> page, TCustomerInfo tCustomerInfo) { public R<IPage<TCustomerInfo>> getTCustomerInfoPage(Page<TCustomerInfo> page, TCustomerInfo tCustomerInfo) {
return R.ok(tCustomerInfoService.page(page, Wrappers.query(tCustomerInfo))); return R.ok(tCustomerInfoService.page(page, Wrappers.query(tCustomerInfo)));
} }
...@@ -68,7 +67,6 @@ public class TCustomerInfoController { ...@@ -68,7 +67,6 @@ public class TCustomerInfoController {
*/ */
@Operation(summary = "通过id查询", description = "通过id查询") @Operation(summary = "通过id查询", description = "通过id查询")
@GetMapping("/{id}") @GetMapping("/{id}")
@PreAuthorize("@pms.hasPermission('demo_tcustomerinfo_get')")
public R<TCustomerInfo> getById(@PathVariable("id") String id) { public R<TCustomerInfo> getById(@PathVariable("id") String id) {
return R.ok(tCustomerInfoService.getById(id)); return R.ok(tCustomerInfoService.getById(id));
} }
...@@ -82,7 +80,7 @@ public class TCustomerInfoController { ...@@ -82,7 +80,7 @@ public class TCustomerInfoController {
@Operation(summary = "新增客户信息", description = "新增客户信息") @Operation(summary = "新增客户信息", description = "新增客户信息")
@SysLog("新增客户信息") @SysLog("新增客户信息")
@PostMapping @PostMapping
@PreAuthorize("@pms.hasPermission('demo_tcustomerinfo_add')") @PreAuthorize("@pms.hasPermission('tcustomerinfo_add')")
public R<Boolean> save(@RequestBody TCustomerInfo tCustomerInfo) { public R<Boolean> save(@RequestBody TCustomerInfo tCustomerInfo) {
return R.ok(tCustomerInfoService.save(tCustomerInfo)); return R.ok(tCustomerInfoService.save(tCustomerInfo));
} }
...@@ -96,7 +94,7 @@ public class TCustomerInfoController { ...@@ -96,7 +94,7 @@ public class TCustomerInfoController {
@Operation(summary = "修改客户信息", description = "修改客户信息") @Operation(summary = "修改客户信息", description = "修改客户信息")
@SysLog("修改客户信息") @SysLog("修改客户信息")
@PutMapping @PutMapping
@PreAuthorize("@pms.hasPermission('demo_tcustomerinfo_edit')") @PreAuthorize("@pms.hasPermission('tcustomerinfo_edit')")
public R<Boolean> updateById(@RequestBody TCustomerInfo tCustomerInfo) { public R<Boolean> updateById(@RequestBody TCustomerInfo tCustomerInfo) {
return R.ok(tCustomerInfoService.updateById(tCustomerInfo)); return R.ok(tCustomerInfoService.updateById(tCustomerInfo));
} }
...@@ -110,7 +108,7 @@ public class TCustomerInfoController { ...@@ -110,7 +108,7 @@ public class TCustomerInfoController {
@Operation(summary = "通过id删除客户信息", description = "通过id删除客户信息") @Operation(summary = "通过id删除客户信息", description = "通过id删除客户信息")
@SysLog("通过id删除客户信息") @SysLog("通过id删除客户信息")
@DeleteMapping("/{id}") @DeleteMapping("/{id}")
@PreAuthorize("@pms.hasPermission('demo_tcustomerinfo_del')") @PreAuthorize("@pms.hasPermission('tcustomerinfo_del')")
public R<Boolean> removeById(@PathVariable String id) { public R<Boolean> removeById(@PathVariable String id) {
return R.ok(tCustomerInfoService.removeById(id)); return R.ok(tCustomerInfoService.removeById(id));
} }
......
...@@ -60,7 +60,6 @@ public class TSettleDomainController { ...@@ -60,7 +60,6 @@ public class TSettleDomainController {
*/ */
@Operation(summary = "分页查询", description = "分页查询") @Operation(summary = "分页查询", description = "分页查询")
@GetMapping("/page") @GetMapping("/page")
@PreAuthorize("@pms.hasPermission('demo_tsettledomain_get')")
public R<IPage<TSettleDomain>> getTSettleDomainPage(Page<TSettleDomain> page, TSettleDomain tSettleDomain) { public R<IPage<TSettleDomain>> getTSettleDomainPage(Page<TSettleDomain> page, TSettleDomain tSettleDomain) {
return R.ok(tSettleDomainService.page(page, Wrappers.query(tSettleDomain))); return R.ok(tSettleDomainService.page(page, Wrappers.query(tSettleDomain)));
} }
...@@ -74,7 +73,6 @@ public class TSettleDomainController { ...@@ -74,7 +73,6 @@ public class TSettleDomainController {
*/ */
@Operation(summary = "通过id查询", description = "通过id查询") @Operation(summary = "通过id查询", description = "通过id查询")
@GetMapping("/{id}") @GetMapping("/{id}")
@PreAuthorize("@pms.hasPermission('demo_tsettledomain_get')")
public R<TSettleDomain> getById(@PathVariable("id") String id) { public R<TSettleDomain> getById(@PathVariable("id") String id) {
return R.ok(tSettleDomainService.getById(id)); return R.ok(tSettleDomainService.getById(id));
} }
...@@ -88,7 +86,7 @@ public class TSettleDomainController { ...@@ -88,7 +86,7 @@ public class TSettleDomainController {
@Operation(summary = "新增项目表", description = "新增项目表") @Operation(summary = "新增项目表", description = "新增项目表")
@SysLog("新增项目表") @SysLog("新增项目表")
@PostMapping @PostMapping
@PreAuthorize("@pms.hasPermission('demo_tsettledomain_add')") @PreAuthorize("@pms.hasPermission('tsettledomain_add')")
public R<Boolean> save(@RequestBody TSettleDomain tSettleDomain) { public R<Boolean> save(@RequestBody TSettleDomain tSettleDomain) {
return R.ok(tSettleDomainService.save(tSettleDomain)); return R.ok(tSettleDomainService.save(tSettleDomain));
} }
...@@ -102,7 +100,7 @@ public class TSettleDomainController { ...@@ -102,7 +100,7 @@ public class TSettleDomainController {
@Operation(summary = "修改项目表", description = "修改项目表") @Operation(summary = "修改项目表", description = "修改项目表")
@SysLog("修改项目表") @SysLog("修改项目表")
@PutMapping @PutMapping
@PreAuthorize("@pms.hasPermission('demo_tsettledomain_edit')") @PreAuthorize("@pms.hasPermission('tsettledomain_edit')")
public R<Boolean> updateById(@RequestBody TSettleDomain tSettleDomain) { public R<Boolean> updateById(@RequestBody TSettleDomain tSettleDomain) {
return R.ok(tSettleDomainService.updateById(tSettleDomain)); return R.ok(tSettleDomainService.updateById(tSettleDomain));
} }
...@@ -116,7 +114,7 @@ public class TSettleDomainController { ...@@ -116,7 +114,7 @@ public class TSettleDomainController {
@Operation(summary = "通过id删除项目表", description = "通过id删除项目表") @Operation(summary = "通过id删除项目表", description = "通过id删除项目表")
@SysLog("通过id删除项目表") @SysLog("通过id删除项目表")
@DeleteMapping("/{id}") @DeleteMapping("/{id}")
@PreAuthorize("@pms.hasPermission('demo_tsettledomain_del')") @PreAuthorize("@pms.hasPermission('tsettledomain_del')")
public R<Boolean> removeById(@PathVariable String id) { public R<Boolean> removeById(@PathVariable String id) {
return R.ok(tSettleDomainService.removeById(id)); return R.ok(tSettleDomainService.removeById(id));
} }
......
...@@ -125,9 +125,13 @@ public class InsurancesConstants { ...@@ -125,9 +125,13 @@ public class InsurancesConstants {
*/ */
public static final String REDUCE_REPLACE_IS_NOT_ALLOW = "当前记录在减员流程中,无法替换"; public static final String REDUCE_REPLACE_IS_NOT_ALLOW = "当前记录在减员流程中,无法替换";
/** /**
* 投保状态不是投保中或已投保,无法退回 * 投保状态不是待投保、投保中、已投保,无法退回
*/ */
public static final String REDUCE_ROLLBACK_IS_NOT_ALLOW = "投保状态不是投保中或已投保,无法退回"; public static final String REDUCE_ROLLBACK_IS_NOT_ALLOW = "投保状态不是待投保、投保中、已投保,无法退回";
/**
* 减员中,无法退回
*/
public static final String REDUCE_ROLLBACK_REDUCE_IS_NOT_ALLOW = "减员中,无法退回";
/** /**
* 员工姓名不能为空 * 员工姓名不能为空
*/ */
......
package com.yifu.cloud.plus.v1.yifu.insurances.entity;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.Data;
import java.io.Serializable;
/**
* @author zhaji
* @description 项目
* @date 2022-07-29 09:35:31
*/
@Data
@Tag(name = "项目类")
public class Dept implements Serializable {
/**
* 项目编码
*/
@Schema(description = "项目编码")
private String deptNo;
/**
* 项目名称
*/
@Schema(description = "项目名称")
private String projectName;
}
...@@ -5,6 +5,7 @@ import io.swagger.v3.oas.annotations.tags.Tag; ...@@ -5,6 +5,7 @@ import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.Data; import lombok.Data;
import java.io.Serializable; import java.io.Serializable;
import java.math.BigDecimal;
/** /**
* @author zhaji * @author zhaji
...@@ -82,13 +83,13 @@ public class DeptChangeCheckParam implements Serializable { ...@@ -82,13 +83,13 @@ public class DeptChangeCheckParam implements Serializable {
/** /**
* 新项目结算方式 * 新项目结算方式
*/ */
@Schema(description = "结算方式") @Schema(description = "新项目结算方式")
private Integer newSettleType; private Integer newSettleType;
/** /**
* 旧项目结算方式 * 旧项目结算方式
*/ */
@Schema(description = "结算方式") @Schema(description = "旧项目结算方式")
private Integer oldSettleType; private Integer oldSettleType;
/** /**
...@@ -101,13 +102,13 @@ public class DeptChangeCheckParam implements Serializable { ...@@ -101,13 +102,13 @@ public class DeptChangeCheckParam implements Serializable {
* 预估保费 * 预估保费
*/ */
@Schema(description = "预估保费") @Schema(description = "预估保费")
private String estimatePremium; private BigDecimal estimatePremium;
/** /**
* 实际保费 * 实际保费
*/ */
@Schema(description = "实际保费") @Schema(description = "实际保费")
private String actualPremium; private BigDecimal actualPremium;
} }
...@@ -3,6 +3,7 @@ package com.yifu.cloud.plus.v1.yifu.insurances.controller; ...@@ -3,6 +3,7 @@ package com.yifu.cloud.plus.v1.yifu.insurances.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.common.core.util.R; import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.Dept;
import com.yifu.cloud.plus.v1.yifu.insurances.service.TInsuranceDetailService; import com.yifu.cloud.plus.v1.yifu.insurances.service.TInsuranceDetailService;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.*; import com.yifu.cloud.plus.v1.yifu.insurances.vo.*;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
...@@ -373,9 +374,20 @@ public class TInsuranceDetailController { ...@@ -373,9 +374,20 @@ public class TInsuranceDetailController {
@Operation(summary = "更新减员退费", description = "更新减员退费") @Operation(summary = "更新减员退费", description = "更新减员退费")
@PostMapping("/updateRefundMoney") @PostMapping("/updateRefundMoney")
public R updateRefundMoney(@RequestBody @Valid @Size(min = 1,message = "更新减员退费不能为空") List<RefundMoneyParam> paramList) { public R updateRefundMoney(@RequestBody @Valid @Size(min = 1,message = "更新减员退费不能为空") List<RefundMoneyParam> paramList) {
return tInsuranceDetailService.updateRefundMoney(paramList); return R.failed("该功能暂未开放");
//return tInsuranceDetailService.updateRefundMoney(paramList);
} }
/**
* 查询项目列表
*
* @author zhaji
* @return {@link R<List<Dept>>}
*/
@Operation(summary = "查询项目列表", description = "查询项目列表")
@GetMapping("/deptList")
public R getDeptList() {
return tInsuranceDetailService.getDeptList();
}
} }
...@@ -257,4 +257,13 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> { ...@@ -257,4 +257,13 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> {
*/ */
R updateRefundMoney(List<RefundMoneyParam> paramList); R updateRefundMoney(List<RefundMoneyParam> paramList);
/**
* 查询项目列表
*
* @author zhaji
* @param
* @return {@link R}
*/
R getDeptList();
} }
...@@ -9,6 +9,8 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; ...@@ -9,6 +9,8 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.google.common.collect.Sets; import com.google.common.collect.Sets;
import com.yifu.cloud.plus.v1.yifu.archives.vo.ProjectSetInfoVo; import com.yifu.cloud.plus.v1.yifu.archives.vo.ProjectSetInfoVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.SetInfoVo; import com.yifu.cloud.plus.v1.yifu.archives.vo.SetInfoVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainListVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CacheConstants; import com.yifu.cloud.plus.v1.yifu.common.core.constant.CacheConstants;
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;
...@@ -577,13 +579,20 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -577,13 +579,20 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
List<TInsuranceDetail> successList = new ArrayList<>(); List<TInsuranceDetail> successList = new ArrayList<>();
if (CollectionUtils.isNotEmpty(detailList)){ if (CollectionUtils.isNotEmpty(detailList)){
for (TInsuranceDetail detail : detailList) { for (TInsuranceDetail detail : detailList) {
if (detail.getBuyHandleStatus() != CommonConstants.TWO_INT if (detail.getBuyHandleStatus() == CommonConstants.FOUR_INT
&& detail.getBuyHandleStatus() != CommonConstants.THREE_INT){ || detail.getBuyHandleStatus() == CommonConstants.FIVE_INT){
InsuranceListVO listVO = new InsuranceListVO(); InsuranceListVO listVO = new InsuranceListVO();
BeanCopyUtils.copyProperties(detail,listVO); BeanCopyUtils.copyProperties(detail,listVO);
listVO.setErrorMessage(InsurancesConstants.REDUCE_ROLLBACK_IS_NOT_ALLOW); listVO.setErrorMessage(InsurancesConstants.REDUCE_ROLLBACK_IS_NOT_ALLOW);
errorList.add(listVO); errorList.add(listVO);
}else { }else if(detail.getBuyHandleStatus() == CommonConstants.THREE_INT
&& (detail.getReduceHandleStatus() != null && (detail.getReduceHandleStatus() == CommonConstants.ONE_INT
|| detail.getReduceHandleStatus() == CommonConstants.TWO_INT))){
InsuranceListVO listVO = new InsuranceListVO();
BeanCopyUtils.copyProperties(detail,listVO);
listVO.setErrorMessage(InsurancesConstants.REDUCE_ROLLBACK_REDUCE_IS_NOT_ALLOW);
errorList.add(listVO);
}else{
// 记录状态置为「退回」 // 记录状态置为「退回」
detail.setBuyHandleStatus(CommonConstants.FOUR_INT); detail.setBuyHandleStatus(CommonConstants.FOUR_INT);
detail.setUpdateBy(user.getId()); detail.setUpdateBy(user.getId());
...@@ -732,7 +741,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -732,7 +741,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
//计算起止时间的天数 //计算起止时间的天数
long day = LocalDateUtil.betweenDay(detail.getPolicyStart().toString(), detail.getPolicyEnd().toString()); long day = LocalDateUtil.betweenDay(detail.getPolicyStart().toString(), detail.getPolicyEnd().toString());
//预估保费 = (购买标准 / 365) * 天数 //预估保费 = (购买标准 / 365) * 天数
BigDecimal estimatePremium = new BigDecimal(detail.getBuyStandard()).divide(new BigDecimal("365")).multiply(new BigDecimal(day)).setScale(2,BigDecimal.ROUND_HALF_UP); BigDecimal estimatePremium = new BigDecimal(detail.getBuyStandard()).divide(new BigDecimal("365"),CommonConstants.TWO_INT,BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal(day)).setScale(CommonConstants.TWO_INT,BigDecimal.ROUND_HALF_UP);
detail.setEstimatePremium(estimatePremium); detail.setEstimatePremium(estimatePremium);
if (detail.getBuyType() == CommonConstants.THREE_INT){ if (detail.getBuyType() == CommonConstants.THREE_INT){
detail.setPolicyEffect(LocalDate.now().plusDays(CommonConstants.ONE_INT)); detail.setPolicyEffect(LocalDate.now().plusDays(CommonConstants.ONE_INT));
...@@ -2418,10 +2427,10 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -2418,10 +2427,10 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.set(TInsuranceDetail :: getDeptNo,success.getNewDeptNo()) .set(TInsuranceDetail :: getDeptNo,success.getNewDeptNo())
.set(TInsuranceDetail :: getSettleType,success.getNewSettleType()) .set(TInsuranceDetail :: getSettleType,success.getNewSettleType())
.set(TInsuranceDetail :: getUpdateBy,user.getId()) .set(TInsuranceDetail :: getUpdateBy,user.getId())
.set(TInsuranceDetail ::getEstimatePremium,success.getEstimatePremium())
.set(TInsuranceDetail :: getUpdateTime,LocalDateTime.now()); .set(TInsuranceDetail :: getUpdateTime,LocalDateTime.now());
update(updateWrapper); update(updateWrapper);
} }
updateDept2EKP(successList);
} }
List<DeptChangeCheckParam> errorList = stringListMap.get("errorList"); List<DeptChangeCheckParam> errorList = stringListMap.get("errorList");
return R.ok(errorList,"导入成功"); return R.ok(errorList,"导入成功");
...@@ -3169,31 +3178,22 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -3169,31 +3178,22 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
// 预估保费 = 费率 * 购买标准 // 预估保费 = 费率 * 购买标准
BigDecimal estimatePremium = new BigDecimal(insuranceDetail.getBuyStandard()).multiply(new BigDecimal(typeRate.getRate())).setScale(2,BigDecimal.ROUND_HALF_UP); BigDecimal estimatePremium = new BigDecimal(insuranceDetail.getBuyStandard()).multiply(new BigDecimal(typeRate.getRate())).setScale(2,BigDecimal.ROUND_HALF_UP);
insuranceDetail.setEstimatePremium(estimatePremium); insuranceDetail.setEstimatePremium(estimatePremium);
if (insuranceDetail.getBuyType() == CommonConstants.THREE_INT){
insuranceDetail.setPolicyEffect(LocalDate.now().plusDays(CommonConstants.ONE_INT));
}
} }
}else { }else {
//按天 //按天
//计算起止时间的天数 //计算起止时间的天数
long day = LocalDateUtil.betweenDay(insuranceDetail.getPolicyStart().toString(), insuranceDetail.getPolicyEnd().toString()); long day = LocalDateUtil.betweenDay(insuranceDetail.getPolicyStart().toString(), insuranceDetail.getPolicyEnd().toString());
//预估保费 = (购买标准 / 365) * 天数 //预估保费 = (购买标准 / 365) * 天数
BigDecimal estimatePremium = new BigDecimal(insuranceDetail.getBuyStandard()).divide(new BigDecimal("365")).multiply(new BigDecimal(day)).setScale(2,BigDecimal.ROUND_HALF_UP); BigDecimal estimatePremium = new BigDecimal(insuranceDetail.getBuyStandard()).divide(new BigDecimal("365"),2,BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal(day)).setScale(2,BigDecimal.ROUND_HALF_UP);
insuranceDetail.setEstimatePremium(estimatePremium); insuranceDetail.setEstimatePremium(estimatePremium);
if (insuranceDetail.getBuyType() == CommonConstants.THREE_INT){
insuranceDetail.setPolicyEffect(LocalDate.now().plusDays(CommonConstants.ONE_INT));
}
//保费存储
TInsuranceSettle settle = new TInsuranceSettle();
settle.setInsDetailId(insuranceDetail.getId());
settle.setSettleType(insuranceDetail.getSettleType());
settle.setSettleHandleStatus(CommonConstants.ONE_STRING);
settle.setEstimatePremium(estimatePremium);
} }
} }
} }
} }
//判断当前数据中是否存在重复数据 //判断当前数据中是否存在重复数据
param.setEstimatePremium(insuranceDetail.getEstimatePremium());
param.setActualPremium(insuranceDetail.getActualPremium());
param.setId(insuranceDetail.getId()); param.setId(insuranceDetail.getId());
successList.add(param); successList.add(param);
} }
...@@ -3202,4 +3202,21 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -3202,4 +3202,21 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
return map; return map;
} }
@Override
public R getDeptList(){
R<TSettleDomainListVo> tSettleDomainListVoR = archivesDaprUtil.selectAllSettleDomainSelectVos();
TSettleDomainListVo data = tSettleDomainListVoR.getData();
List<TSettleDomainSelectVo> listSelectVO = data.getListSelectVO();
List<Dept> deptList = new ArrayList<>();
if(CollectionUtils.isNotEmpty(listSelectVO)){
for (TSettleDomainSelectVo tSettleDomainSelectVo : listSelectVO) {
Dept dept = new Dept();
dept.setDeptNo(tSettleDomainSelectVo.getDepartNo());
dept.setProjectName(tSettleDomainSelectVo.getDepartName());
deptList.add(dept);
}
}
return R.ok(deptList);
};
} }
...@@ -470,7 +470,7 @@ public class TPreDispatchInfo extends BaseEntity { ...@@ -470,7 +470,7 @@ public class TPreDispatchInfo extends BaseEntity {
*/ */
@Schema(description ="员工类型") @Schema(description ="员工类型")
@Size(max = 20, message = "员工类型不可超过20位") @Size(max = 20, message = "员工类型不可超过20位")
@NotNull(message = "员工姓名不可为空") @NotNull(message = "员工类型不可为空")
private String empTypeAdd; private String empTypeAdd;
/** /**
......
...@@ -569,12 +569,12 @@ public class TSocialFundInfo extends BaseEntity { ...@@ -569,12 +569,12 @@ public class TSocialFundInfo extends BaseEntity {
@ExcelProperty("大病缴纳周期:0按年1按月" ) @ExcelProperty("大病缴纳周期:0按年1按月" )
private String collectType; private String collectType;
/** /**
* 大病取值方式0 按比例 1按定值 * 大病取值方式0按定值 1按比例
*/ */
@Length(max = 1, message = "大病取值方式0 按比例 1按定值 不能超过1个字符" ) @Length(max = 1, message = "大病取值方式0按定值 1按比例 不能超过1个字符" )
@ExcelAttribute(name = "大病取值方式0 按比例 1按定值", maxLength = 1) @ExcelAttribute(name = "大病取值方式0按定值 1按比例", maxLength = 1)
@Schema(description = "大病取值方式0 按比例 1按定值" ) @Schema(description = "大病取值方式0按定值 1按比例" )
@ExcelProperty("大病取值方式0 按比例 1按定值" ) @ExcelProperty("大病取值方式0按定值 1按比例 " )
private String valueType; private String valueType;
/** /**
* 大病按年收收取月份1-12月 * 大病按年收收取月份1-12月
......
...@@ -43,8 +43,5 @@ public class PreDispatchConstants { ...@@ -43,8 +43,5 @@ public class PreDispatchConstants {
public static final String DATA_IMPORT_ANALYSIS_ERROR = "数据导入解析失败!"; public static final String DATA_IMPORT_ANALYSIS_ERROR = "数据导入解析失败!";
public static final String NO_SOCIAL_FUND_ADDRESS_ADD = "派增:养老城市和公积金城市不可同时为空,请确认表中有‘养老城市’和‘公积金城市’数据列及数据!"; public static final String NO_SOCIAL_FUND_ADDRESS_ADD = "派增:养老城市和公积金城市不可同时为空,请确认表中有‘养老城市’和‘公积金城市’数据列及数据!";
public static final String NO_SOCIAL_FUND_ADDRESS_REDUCE = "派减:养老城市和公积金城市不可同时为空,请确认表中有‘养老城市’和‘公积金城市’数据列及数据!"; public static final String NO_SOCIAL_FUND_ADDRESS_REDUCE = "派减:养老城市和公积金城市不可同时为空,请确认表中有‘养老城市’和‘公积金城市’数据列及数据!";
public static final String TEL_NOT_EMPTY = "联系电话1不可为空!";
public static final String TEL_INVALID = "联系电话1无效!";
public static final String TEL_INVALID2 = "联系电话2无效!";
public static final String GET_AREA_INFO = "获取区域数据失败!"; public static final String GET_AREA_INFO = "获取区域数据失败!";
} }
...@@ -26,15 +26,12 @@ import com.yifu.cloud.plus.v1.yifu.common.security.annotation.Inner; ...@@ -26,15 +26,12 @@ import com.yifu.cloud.plus.v1.yifu.common.security.annotation.Inner;
import com.yifu.cloud.plus.v1.yifu.social.entity.TForecastLibrary; import com.yifu.cloud.plus.v1.yifu.social.entity.TForecastLibrary;
import com.yifu.cloud.plus.v1.yifu.social.service.TForecastLibraryService; import com.yifu.cloud.plus.v1.yifu.social.service.TForecastLibraryService;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import org.springframework.http.HttpHeaders;
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 javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.util.List;
/** /**
...@@ -47,7 +44,6 @@ import java.util.List; ...@@ -47,7 +44,6 @@ import java.util.List;
@RequiredArgsConstructor @RequiredArgsConstructor
@RequestMapping("/tforecastlibrary") @RequestMapping("/tforecastlibrary")
@Tag(name = "预估费用管理") @Tag(name = "预估费用管理")
@SecurityRequirement(name = HttpHeaders.AUTHORIZATION)
public class TForecastLibraryController { public class TForecastLibraryController {
private final TForecastLibraryService tForecastLibraryService; private final TForecastLibraryService tForecastLibraryService;
......
...@@ -777,11 +777,11 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap ...@@ -777,11 +777,11 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
private void initLibrayOfPersonal(TForecastLibrary library, TSocialFundInfo socialInfo private void initLibrayOfPersonal(TForecastLibrary library, TSocialFundInfo socialInfo
, SysBaseSetInfo sysBaseSetInfo, TForecastLibrary historyLibrary) { , SysBaseSetInfo sysBaseSetInfo, TForecastLibrary historyLibrary) {
// 个人养老基数 // 个人养老基数
BigDecimal personalPersionBase = BigDecimal.ZERO; BigDecimal personalPersionBase;
// 个人医疗基数 // 个人医疗基数
BigDecimal personalMedicalBase = BigDecimal.ZERO; BigDecimal personalMedicalBase;
// 个人失业基数 // 个人失业基数
BigDecimal personalUnemploymentBase = BigDecimal.ZERO; BigDecimal personalUnemploymentBase;
// 个人养老比例 // 个人养老比例
BigDecimal personalPersionPro = BigDecimal.ZERO; BigDecimal personalPersionPro = BigDecimal.ZERO;
// 个人医疗比例 // 个人医疗比例
...@@ -822,8 +822,6 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap ...@@ -822,8 +822,6 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
personalMedicalPro = socialInfo.getPersonalMedicalPer(); personalMedicalPro = socialInfo.getPersonalMedicalPer();
personalUnemploymentPro = socialInfo.getPersonalUnemploymentPer(); personalUnemploymentPro = socialInfo.getPersonalUnemploymentPer();
} }
}
personalPersionMoney = BigDecimalUtils.safeMultiply(personalPersionBase, personalPersionPro, personalPersionMoney = BigDecimalUtils.safeMultiply(personalPersionBase, personalPersionPro,
CommonConstants.ONE_OF_PERCENT); CommonConstants.ONE_OF_PERCENT);
personalMedicalMoney = BigDecimalUtils.safeMultiply(personalMedicalBase, personalMedicalPro, personalMedicalMoney = BigDecimalUtils.safeMultiply(personalMedicalBase, personalMedicalPro,
...@@ -831,31 +829,40 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap ...@@ -831,31 +829,40 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
personalUnemploymentMoney = BigDecimalUtils.safeMultiply(personalUnemploymentBase, personalUnemploymentPro, personalUnemploymentMoney = BigDecimalUtils.safeMultiply(personalUnemploymentBase, personalUnemploymentPro,
CommonConstants.ONE_OF_PERCENT); CommonConstants.ONE_OF_PERCENT);
if (library.getSocialPayMonth() != null) {
int libraryPayMonth = Integer.parseInt(library.getSocialPayMonth());
if (socialInfo.getPensionStart() != null && libraryPayMonth >= DateUtil.formatDateInt(socialInfo.getPensionStart())) {
library.setPersonalPensionBase(personalPersionBase); library.setPersonalPensionBase(personalPersionBase);
library.setPersonalMedicalBase(personalMedicalBase);
library.setPersonalUnemploymentBase(personalUnemploymentBase);
library.setPersonalPersionPro(personalPersionPro); library.setPersonalPersionPro(personalPersionPro);
library.setPersonalPensionFee(personalPersionMoney);
}
if (socialInfo.getMedicalStart() != null && libraryPayMonth >= DateUtil.formatDateInt(socialInfo.getMedicalStart())) {
library.setPersonalMedicalBase(personalMedicalBase);
library.setPersonalMedicalPro(personalMedicalPro); library.setPersonalMedicalPro(personalMedicalPro);
library.setPersonalUnemploymentPro(personalUnemploymentPro);
library.setPersonalMedicalFee(personalMedicalMoney); library.setPersonalMedicalFee(personalMedicalMoney);
library.setPersonalPensionFee(personalPersionMoney); }
if (socialInfo.getUnemployStart() != null && libraryPayMonth >= DateUtil.formatDateInt(socialInfo.getUnemployStart())) {
library.setPersonalUnemploymentBase(personalUnemploymentBase);
library.setPersonalUnemploymentPro(personalUnemploymentPro);
library.setPersonalUnemploymentFee(personalUnemploymentMoney); library.setPersonalUnemploymentFee(personalUnemploymentMoney);
} }
}
}
}
private void initLibraryOfUnit(TForecastLibrary library, TSocialFundInfo socialInfo private void initLibraryOfUnit(TForecastLibrary library, TSocialFundInfo socialInfo
, SysBaseSetInfo sysBaseSetInfo, TForecastLibrary historyLibrary) { , SysBaseSetInfo sysBaseSetInfo, TForecastLibrary historyLibrary) {
// 单位养老基数 // 单位养老基数
BigDecimal unitPersionBase = BigDecimal.ZERO; BigDecimal unitPersionBase;
// 单位医疗基数 // 单位医疗基数
BigDecimal unitMedicalBase = BigDecimal.ZERO; BigDecimal unitMedicalBase;
// 单位失业基数 // 单位失业基数
BigDecimal unitUnemploymentBase = BigDecimal.ZERO; BigDecimal unitUnemploymentBase;
// 单位工伤基数 // 单位工伤基数
BigDecimal unitInjuryBase = BigDecimal.ZERO; BigDecimal unitInjuryBase;
// 单位生育基数 // 单位生育基数
BigDecimal unitBirthBase = BigDecimal.ZERO; BigDecimal unitBirthBase;
// 单位养老比例 // 单位养老比例
BigDecimal unitPersionPro = BigDecimal.ZERO; BigDecimal unitPersionPro = BigDecimal.ZERO;
...@@ -918,8 +925,6 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap ...@@ -918,8 +925,6 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
unitInjuryPro = socialInfo.getUnitWorkUnjuryPer(); unitInjuryPro = socialInfo.getUnitWorkUnjuryPer();
unitBirthPro = socialInfo.getUnitBirthPer(); unitBirthPro = socialInfo.getUnitBirthPer();
} }
}
unitPersionMoney = BigDecimalUtils.safeMultiply(unitPersionBase, unitPersionPro, unitPersionMoney = BigDecimalUtils.safeMultiply(unitPersionBase, unitPersionPro,
CommonConstants.ONE_OF_PERCENT); CommonConstants.ONE_OF_PERCENT);
unitMedicalMoney = BigDecimalUtils.safeMultiply(unitMedicalBase, unitMedicalPro, unitMedicalMoney = BigDecimalUtils.safeMultiply(unitMedicalBase, unitMedicalPro,
...@@ -931,23 +936,35 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap ...@@ -931,23 +936,35 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
unitBirthMoney = BigDecimalUtils.safeMultiply(unitBirthBase, unitBirthPro, unitBirthMoney = BigDecimalUtils.safeMultiply(unitBirthBase, unitBirthPro,
CommonConstants.ONE_OF_PERCENT); CommonConstants.ONE_OF_PERCENT);
if (library.getSocialPayMonth() != null) {
int libraryPayMonth = Integer.parseInt(library.getSocialPayMonth());
if (socialInfo.getPensionStart() != null && libraryPayMonth >= DateUtil.formatDateInt(socialInfo.getPensionStart())) {
library.setUnitPensionBase(unitPersionBase); library.setUnitPensionBase(unitPersionBase);
library.setUnitMedicalBase(unitMedicalBase);
library.setUnitUnemploymentBase(unitUnemploymentBase);
library.setUnitInjuryBase(unitInjuryBase);
library.setUnitBirthBase(unitBirthBase);
library.setUnitPersionPro(unitPersionPro); library.setUnitPersionPro(unitPersionPro);
library.setUnitPensionFee(unitPersionMoney);
}
if (socialInfo.getMedicalStart() != null && libraryPayMonth >= DateUtil.formatDateInt(socialInfo.getMedicalStart())) {
library.setUnitMedicalBase(unitMedicalBase);
library.setUnitMedicalPro(unitMedicalPro); library.setUnitMedicalPro(unitMedicalPro);
library.setUnitMedicalFee(unitMedicalMoney);
}
if (socialInfo.getUnemployStart() != null && libraryPayMonth >= DateUtil.formatDateInt(socialInfo.getUnemployStart())) {
library.setUnitUnemploymentBase(unitUnemploymentBase);
library.setUnitUnemploymentPro(unitUnemploymentPro); library.setUnitUnemploymentPro(unitUnemploymentPro);
library.setUnitUnemploymentFee(unitUnemploymentMoney);
}
if (socialInfo.getWorkInjuryStart() != null && libraryPayMonth >= DateUtil.formatDateInt(socialInfo.getWorkInjuryStart())) {
library.setUnitInjuryBase(unitInjuryBase);
library.setUnitInjuryPro(unitInjuryPro); library.setUnitInjuryPro(unitInjuryPro);
library.setUnitWorkInjuryFee(unitInjuryMoney);
}
if (socialInfo.getBirthStart() != null && libraryPayMonth >= DateUtil.formatDateInt(socialInfo.getBirthStart())) {
library.setUnitBirthBase(unitBirthBase);
library.setUnitBirthPro(unitBirthPro); library.setUnitBirthPro(unitBirthPro);
library.setUnitPensionFee(unitPersionMoney);
library.setUnitMedicalFee(unitMedicalMoney);
library.setUnitUnemploymentFee(unitUnemploymentMoney);
library.setUnitBirthFee(unitBirthMoney); library.setUnitBirthFee(unitBirthMoney);
library.setUnitWorkInjuryFee(unitInjuryMoney); }
}
}
} }
/** /**
...@@ -1559,7 +1576,10 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap ...@@ -1559,7 +1576,10 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
return R.failed("同步预估库,doMonth格式错误:" + doMonth); return R.failed("同步预估库,doMonth格式错误:" + doMonth);
} }
} else { } else {
monthDiff = DateUtil.getMonthDiff(socialFundInfo.getSocialStartDate(), new Date()) + 2; // 获取最小的起缴月
Date minStartDate = this.getMinDate(socialFundInfo);
// 再计算月份
monthDiff = DateUtil.getMonthDiff(minStartDate, new Date()) + 2;
} }
List<String> payMonthList = new ArrayList<>(); List<String> payMonthList = new ArrayList<>();
for (int i = 0; i < monthDiff; i++) { for (int i = 0; i < monthDiff; i++) {
...@@ -1648,6 +1668,33 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap ...@@ -1648,6 +1668,33 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
} }
} }
/**
* @param socialFundInfo
* @Description: 获取最小起缴日
* @Author: hgw
* @Date: 2022/7/29 11:06
* @return: java.util.Date
**/
private Date getMinDate(TSocialFundInfo socialFundInfo) {
Date minStartDate = socialFundInfo.getSocialStartDate();
if (socialFundInfo.getUnitPersionMoney() != null && socialFundInfo.getPensionStart() != null && socialFundInfo.getPensionStart().before(minStartDate)) {
minStartDate = socialFundInfo.getPensionStart();
}
if (socialFundInfo.getUnitMedicalMoney() != null && socialFundInfo.getMedicalStart() != null && socialFundInfo.getMedicalStart().before(minStartDate)) {
minStartDate = socialFundInfo.getMedicalStart();
}
if (socialFundInfo.getUnitUnemploymentMoney() != null && socialFundInfo.getUnemployStart() != null && socialFundInfo.getUnemployStart().before(minStartDate)) {
minStartDate = socialFundInfo.getUnemployStart();
}
if (socialFundInfo.getUnitInjuryMoney() != null && socialFundInfo.getWorkInjuryStart() != null && socialFundInfo.getWorkInjuryStart().before(minStartDate)) {
minStartDate = socialFundInfo.getWorkInjuryStart();
}
if (socialFundInfo.getUnitBirthMoney() != null && socialFundInfo.getBirthStart() != null && socialFundInfo.getBirthStart().before(minStartDate)) {
minStartDate = socialFundInfo.getBirthStart();
}
return minStartDate;
}
/** /**
* @Description: 核心刷新 * @Description: 核心刷新
* @Author: hgw * @Author: hgw
...@@ -1666,10 +1713,12 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap ...@@ -1666,10 +1713,12 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
String sfMapKey; String sfMapKey;
TForecastLibrary tForecastLibrary; TForecastLibrary tForecastLibrary;
String diffType; String diffType;
Date minStartDate;
for (String payMonth : payMonthList) { for (String payMonth : payMonthList) {
//封装社保预估数据 //封装社保预估数据
if (Common.isNotNull(socialInfoList)) { if (Common.isNotNull(socialInfoList)) {
for (TSocialFundInfo tSocialInfo : socialInfoList) { for (TSocialFundInfo tSocialInfo : socialInfoList) {
minStartDate = this.getMinDate(tSocialInfo);
createMonth = ServiceUtil.initCreateMonth(tSocialInfo.getCreateTime(), payMonth); createMonth = ServiceUtil.initCreateMonth(tSocialInfo.getCreateTime(), payMonth);
sfMapKey = this.getMapKey(tSocialInfo.getEmpIdcard(), tSocialInfo.getSettleDomain(), payMonth, createMonth); sfMapKey = this.getMapKey(tSocialInfo.getEmpIdcard(), tSocialInfo.getSettleDomain(), payMonth, createMonth);
...@@ -1685,12 +1734,12 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap ...@@ -1685,12 +1734,12 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
continue; continue;
} }
//起缴月份在要生成的月份前不处理 || 截止月份在要生成的月份后不处理 //起缴月份在要生成的月份前不处理 || 截止月份在要生成的月份后不处理
if (Integer.parseInt(payMonth) < DateUtil.formatDateInt(tSocialInfo.getSocialStartDate()) 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 == tSocialInfo.getSocialStartDate()); flag = CommonConstants.ZERO_STRING.equals(tSocialInfo.getCanOverpay()) && (null == tSocialInfo.getOverpayNumber() || null == tSocialInfo.getHaveThisMonth() || null == minStartDate);
if (flag) { if (flag) {
return R.failed("员工" + tSocialInfo.getEmpName() + ":" + tSocialInfo.getEmpIdcard() + SocialConstants.SOCIAL_SET_ERROR); return R.failed("员工" + tSocialInfo.getEmpName() + ":" + tSocialInfo.getEmpIdcard() + SocialConstants.SOCIAL_SET_ERROR);
} else { } else {
......
...@@ -550,18 +550,6 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap ...@@ -550,18 +550,6 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
if (x != null) { if (x != null) {
return x; return x;
} }
// 手机号码必填及格式校验
if (Common.isEmpty(tPreDispatchInfo.getTelOne())) {
return R.failed(PreDispatchConstants.TEL_NOT_EMPTY);
}
if (ValidityUtil.checkInvalidEmpPhone(tPreDispatchInfo.getTelOne())) {
return R.failed(PreDispatchConstants.TEL_INVALID);
}
if (ValidityUtil.checkInvalidEmpPhone(tPreDispatchInfo.getTelTwo())) {
return R.failed(PreDispatchConstants.TEL_INVALID2);
}
} }
if (CommonConstants.ONE_STRING.equals(tPreDispatchInfo.getType())) { if (CommonConstants.ONE_STRING.equals(tPreDispatchInfo.getType())) {
initLeaveReason(tPreDispatchInfo); initLeaveReason(tPreDispatchInfo);
...@@ -1082,9 +1070,9 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap ...@@ -1082,9 +1070,9 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
info.setUnitIdAdd(selectVo.getCustomerId()); info.setUnitIdAdd(selectVo.getCustomerId());
info.setUnitNameAdd(selectVo.getCustomerName()); info.setUnitNameAdd(selectVo.getCustomerName());
} }
// 默认合同名称为代理社保 合同类型为固定期限1 // 默认合同名称为代理社保 合同类型为其他
info.setContractNameAdd(PreDispatchConstants.CONTRACT_NAME); info.setContractNameAdd(PreDispatchConstants.CONTRACT_NAME);
info.setContractTypeAdd(CommonConstants.ONE_STRING); info.setContractTypeAdd(CommonConstants.THREE_STRING);
info.setContractStartAdd(info.getContractStart()); info.setContractStartAdd(info.getContractStart());
// 默认为开始时间后的两年时间 // 默认为开始时间后的两年时间
info.setContractEndAdd(info.getContractEnd()); info.setContractEndAdd(info.getContractEnd());
...@@ -1149,12 +1137,6 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap ...@@ -1149,12 +1137,6 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
private String checkAddPreDispatch(TPreDispatchInfo tPreDispatchInfo) { private String checkAddPreDispatch(TPreDispatchInfo tPreDispatchInfo) {
if (CommonConstants.ZERO_STRING.equals(tPreDispatchInfo.getType())) { if (CommonConstants.ZERO_STRING.equals(tPreDispatchInfo.getType())) {
if (Common.isEmpty(tPreDispatchInfo.getTelOne())) {
return PreDispatchConstants.TEL_NOT_EMPTY;
}
if (ValidityUtil.checkInvalidEmpPhone(tPreDispatchInfo.getTelOne())) {
return PreDispatchConstants.TEL_INVALID;
}
if (Common.isEmpty(tPreDispatchInfo.getPensionAddress()) && if (Common.isEmpty(tPreDispatchInfo.getPensionAddress()) &&
Common.isEmpty(tPreDispatchInfo.getFundAddress())) { Common.isEmpty(tPreDispatchInfo.getFundAddress())) {
return PreDispatchConstants.NO_SOCIAL_FUND_ADDRESS_ADD; return PreDispatchConstants.NO_SOCIAL_FUND_ADDRESS_ADD;
...@@ -1794,18 +1776,6 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap ...@@ -1794,18 +1776,6 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
} }
} }
private void initDayConfMap(HashMap<String, Integer> dayConfMap) {
List<TDispatchDayConf> dayConfList = dispatchDayConfMapper.selectList(Wrappers.<TDispatchDayConf>query().lambda());
if (Common.isNotNull(dayConfList)) {
for (TDispatchDayConf conf : dayConfList) {
dayConfMap.put(Common.isBlankToNullString(conf.getProvince()) +
CommonConstants.DOWN_LINE_STRING + Common.isBlankToNullString(conf.getCity()) +
CommonConstants.DOWN_LINE_STRING + Common.isBlankToNullString(conf.getTown()), conf.getDay());
}
}
}
/** /**
* 通过身份证+派单类型 确定是否唯一(创建时间为当月的) * 通过身份证+派单类型 确定是否唯一(创建时间为当月的)
* *
...@@ -1828,6 +1798,18 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap ...@@ -1828,6 +1798,18 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
initExistsMapByIdCards(existsMap, idcards, type); initExistsMapByIdCards(existsMap, idcards, type);
} }
private void initDayConfMap(HashMap<String, Integer> dayConfMap) {
List<TDispatchDayConf> dayConfList = dispatchDayConfMapper.selectList(Wrappers.<TDispatchDayConf>query().lambda());
if (Common.isNotNull(dayConfList)) {
for (TDispatchDayConf conf : dayConfList) {
dayConfMap.put(Common.isBlankToNullString(conf.getProvince()) +
CommonConstants.DOWN_LINE_STRING + Common.isBlankToNullString(conf.getCity()) +
CommonConstants.DOWN_LINE_STRING + Common.isBlankToNullString(conf.getTown()), conf.getDay());
}
}
}
private void initExistsMapByIdCards(Map<String, TPreDispatchInfo> existsMap, List<String> idcards, String type) { private void initExistsMapByIdCards(Map<String, TPreDispatchInfo> existsMap, List<String> idcards, String type) {
if (Common.isNotNull(idcards)) { if (Common.isNotNull(idcards)) {
List<TPreDispatchInfo> preDispatchInfoList = baseMapper.selectList(Wrappers.<TPreDispatchInfo>query() List<TPreDispatchInfo> preDispatchInfoList = baseMapper.selectList(Wrappers.<TPreDispatchInfo>query()
...@@ -2231,7 +2213,7 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap ...@@ -2231,7 +2213,7 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
**/ **/
private void initDispatchContractVo(TPreDispatchInfo preInfo, TDispatchImportVo importVo) { private void initDispatchContractVo(TPreDispatchInfo preInfo, TDispatchImportVo importVo) {
if (Common.isNotNull(preInfo.getContractNameAdd())){ if (Common.isNotNull(preInfo.getContractNameAdd())){
importVo.setContractName(CommonConstants.THREE_STRING); importVo.setContractName(preInfo.getContractTypeAdd());
if (Common.isNotNull(preInfo.getContractStartAdd())){ if (Common.isNotNull(preInfo.getContractStartAdd())){
importVo.setContractStart(DateUtil.stringToDate(ServiceUtil. importVo.setContractStart(DateUtil.stringToDate(ServiceUtil.
replaceSeparator(preInfo.getContractStartAdd(),CommonConstants.CENTER_SPLIT_LINE_STRING, replaceSeparator(preInfo.getContractStartAdd(),CommonConstants.CENTER_SPLIT_LINE_STRING,
...@@ -2242,7 +2224,7 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap ...@@ -2242,7 +2224,7 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
replaceSeparator(preInfo.getContractEndAdd(), CommonConstants.CENTER_SPLIT_LINE_STRING, replaceSeparator(preInfo.getContractEndAdd(), CommonConstants.CENTER_SPLIT_LINE_STRING,
CommonConstants.SLASH_SPLIT_LINE_STRING), DateUtil.ISO_DATE_FORMAT)); CommonConstants.SLASH_SPLIT_LINE_STRING), DateUtil.ISO_DATE_FORMAT));
} }
importVo.setContractTerm(CommonConstants.TWO_STRING); importVo.setContractTerm(preInfo.getContractTermAdd());
importVo.setContractType(CommonConstants.ONE_STRING); importVo.setContractType(CommonConstants.ONE_STRING);
importVo.setContractSubName(PreDispatchConstants.CONTRACT_NAME); importVo.setContractSubName(PreDispatchConstants.CONTRACT_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