Commit 4bddd503 authored by fangxinjiang's avatar fangxinjiang

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

parents dc1e071c 6b8a4648
...@@ -187,8 +187,6 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe ...@@ -187,8 +187,6 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
oldInsurance = oldMap.get(newInsurance.getId()); oldInsurance = oldMap.get(newInsurance.getId());
if (oldInsurance != null) { if (oldInsurance != null) {
differenceInsuranceKey = HrEquator.comparisonValue(oldInsurance, newInsurance); differenceInsuranceKey = HrEquator.comparisonValue(oldInsurance, newInsurance);
} else {
saveOrUpdateList.add(newInsurance);
} }
if (Common.isNotNull(differenceInsuranceKey) || oldInsurance == null) { if (Common.isNotNull(differenceInsuranceKey) || oldInsurance == null) {
detailInsuranceLog = new TEmployeePreLogDetail(); detailInsuranceLog = new TEmployeePreLogDetail();
...@@ -199,7 +197,6 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe ...@@ -199,7 +197,6 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
detailList.add(detailInsuranceLog); detailList.add(detailInsuranceLog);
} }
} else { } else {
saveOrUpdateList.add(newInsurance);
// 2:修改无老ID // 2:修改无老ID
detailInsuranceLog = new TEmployeePreLogDetail(); detailInsuranceLog = new TEmployeePreLogDetail();
detailInsuranceLog.setModelType(CommonConstants.ONE_STRING); detailInsuranceLog.setModelType(CommonConstants.ONE_STRING);
...@@ -208,6 +205,7 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe ...@@ -208,6 +205,7 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
isModifyInsurance = true; isModifyInsurance = true;
detailList.add(detailInsuranceLog); detailList.add(detailInsuranceLog);
} }
saveOrUpdateList.add(newInsurance);
} else if (CommonConstants.THREE_STRING.equals(newInsurance.getModelType())) { } else if (CommonConstants.THREE_STRING.equals(newInsurance.getModelType())) {
// 3:删除 // 3:删除
detailInsuranceLog = new TEmployeePreLogDetail(); detailInsuranceLog = new TEmployeePreLogDetail();
...@@ -251,6 +249,10 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe ...@@ -251,6 +249,10 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
HttpDaprUtil.invokeMethodPost(daprInsurancesProperties.getAppUrl(), daprInsurancesProperties.getAppId() HttpDaprUtil.invokeMethodPost(daprInsurancesProperties.getAppUrl(), daprInsurancesProperties.getAppId()
, "/temployeeinsurancepre/inner/saveOrUpdateInsuranceList" , "/temployeeinsurancepre/inner/saveOrUpdateInsuranceList"
, saveOrUpdateList, Boolean.class, SecurityConstants.FROM_IN); , saveOrUpdateList, Boolean.class, SecurityConstants.FROM_IN);
} else {
HttpDaprUtil.invokeMethodPost(daprInsurancesProperties.getAppUrl(), daprInsurancesProperties.getAppId()
, "/temployeeinsurancepre/inner/deleteInsuranceByPreId"
, empPreId, Boolean.class, SecurityConstants.FROM_IN);
} }
} }
} catch (Exception e) { } catch (Exception e) {
......
...@@ -213,10 +213,28 @@ public class TEmployeeInsurancePreController { ...@@ -213,10 +213,28 @@ public class TEmployeeInsurancePreController {
return tEmployeeInsurancePreService.getListByEmpPreId(empPreId); return tEmployeeInsurancePreService.getListByEmpPreId(empPreId);
} }
/**
* @Description: 先删后增
* @Author: hgw
* @Date: 2025/4/10 14:49
* @return: java.lang.Boolean
**/
@Inner @Inner
@PostMapping("/inner/saveOrUpdateInsuranceList") @PostMapping("/inner/saveOrUpdateInsuranceList")
public Boolean saveOrUpdateInsuranceList(@RequestBody List<TEmployeeInsurancePre> preList) { public Boolean saveOrUpdateInsuranceList(@RequestBody List<TEmployeeInsurancePre> preList) {
return tEmployeeInsurancePreService.saveOrUpdateInsuranceList(preList); return tEmployeeInsurancePreService.saveOrUpdateInsuranceList(preList);
} }
/**
* @Description: 清空
* @Author: hgw
* @Date: 2025/4/10 14:45
* @return: java.lang.Boolean
**/
@Inner
@PostMapping("/inner/deleteInsuranceByPreId")
public Boolean deleteInsuranceByPreId(@RequestBody String preId) {
return tEmployeeInsurancePreService.deleteInsuranceByPreId(preId);
}
} }
...@@ -92,5 +92,12 @@ public interface TEmployeeInsurancePreService extends IService<TEmployeeInsuranc ...@@ -92,5 +92,12 @@ public interface TEmployeeInsurancePreService extends IService<TEmployeeInsuranc
* @return: boolean * @return: boolean
**/ **/
boolean saveOrUpdateInsuranceList(List<TEmployeeInsurancePre> preList); boolean saveOrUpdateInsuranceList(List<TEmployeeInsurancePre> preList);
/**
* @Description: 清空
* @Author: hgw
* @Date: 2025/4/10 14:47
* @return: boolean
**/
boolean deleteInsuranceByPreId(String preId);
} }
...@@ -553,4 +553,16 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur ...@@ -553,4 +553,16 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur
return true; return true;
} }
/**
* @Description: 删除
* @Author: hgw
* @Date: 2025/4/10 14:49
* @return: boolean
**/
@Override
public boolean deleteInsuranceByPreId(String preId) {
baseMapper.deleteByEmpPreId(preId);
return true;
}
} }
...@@ -8290,12 +8290,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -8290,12 +8290,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if (Common.isNotNull(param.getAuthSql()) && param.getAuthSql().contains("1=2 CONCAT")) { if (Common.isNotNull(param.getAuthSql()) && param.getAuthSql().contains("1=2 CONCAT")) {
param.setAuthSql(param.getAuthSql().replace("1=2 CONCAT", "CONCAT")); param.setAuthSql(param.getAuthSql().replace("1=2 CONCAT", "CONCAT"));
} }
IPage<InsuredListVo> insuranceList = baseMapper.replacePageToAutoSelect(page,param); return baseMapper.replacePageToAutoSelect(page,param);
// 购买月数
// if (CollectionUtils.isNotEmpty(insuranceList.getRecords())){
// insuranceList.getRecords().forEach(e -> e.setBuyMonth(LocalDateUtil.betweenMonth(e.getPolicyStart().toString(),e.getPolicyEnd().toString())));
// }
return insuranceList;
} }
/** /**
...@@ -8323,11 +8318,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -8323,11 +8318,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
// 查保单未过期的数据 // 查保单未过期的数据
String today = LocalDateUtil.getDateSrt(LocalDate.now()); String today = LocalDateUtil.getDateSrt(LocalDate.now());
param.setPolicyEnd(today); param.setPolicyEnd(today);
IPage<InsuredListVo> insuranceList = baseMapper.policyPageToAutoSelect(page,param); return baseMapper.policyPageToAutoSelect(page,param);
// 购买月数
// if (CollectionUtils.isNotEmpty(insuranceList.getRecords())){
// insuranceList.getRecords().forEach(e -> e.setBuyMonth(LocalDateUtil.betweenMonth(e.getPolicyStart().toString(),e.getPolicyEnd().toString())));
// }
return insuranceList;
} }
} }
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