Commit 33ae28a6 authored by hongguangwu's avatar hongguangwu

MVP1.7.9-修改商险自动化

parent cd7efe6f
...@@ -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) {
......
...@@ -200,10 +200,28 @@ public class TEmployeeInsurancePreController { ...@@ -200,10 +200,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);
}
} }
...@@ -86,5 +86,12 @@ public interface TEmployeeInsurancePreService extends IService<TEmployeeInsuranc ...@@ -86,5 +86,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);
} }
...@@ -543,4 +543,16 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur ...@@ -543,4 +543,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;
}
} }
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