Commit 3c3fdcf3 authored by hongguangwu's avatar hongguangwu

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

parents c1294507 db36e50e
......@@ -124,6 +124,12 @@ public class InsuranceAddParam implements Serializable {
@Schema(description = "商险待购买id")
private String insurancePreId;
/**
* 前端客服姓名
*/
@Schema(description = "前端客服姓名")
private String customerUserName;
/***********************************以下字段由系统算出,前端不用传,是为了方便入库***********************************/
/**
* 结算类型 (1、单独结算 2、合并结算-和工资一起结算)
......
......@@ -151,4 +151,9 @@ public class InsuranceAutoParam implements Serializable {
@Schema(description = "商险待购买id")
private String insurancePreId;
/**
* 前端客服姓名
*/
@Schema(description = "前端客服姓名")
private String customerUserName;
}
......@@ -119,6 +119,12 @@ public class InsuranceBatchParam implements Serializable {
@Schema(description = "商险待购买id")
private String insurancePreId;
/**
* 前端客服姓名
*/
@Schema(description = "前端客服姓名")
private String customerUserName;
/***********************************以下字段由系统算出,前端不用传,是为了方便入库***********************************/
/**
* 结算类型 (1、单独结算 2、合并结算-和工资一起结算)
......
......@@ -107,6 +107,12 @@ public class InsuranceReplaceParam implements Serializable {
@Schema(description = "商险待购买id")
private String insurancePreId;
/**
* 前端客服姓名
*/
@Schema(description = "前端客服姓名")
private String customerUserName;
/**
* 数据传递对象
*/
......
......@@ -207,6 +207,7 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur
addParam.setPost(insurancePre.getPosition());
addParam.setRemark(CommonConstants.EMPTY_STRING);
addParam.setInsurancePreId(insurancePre.getId());
addParam.setCustomerUserName(insurancePre.getCustomerUsername());
addParamList.add(addParam);
}
if (CommonConstants.THREE_INT == insurancePre.getBuyType()) {
......@@ -224,6 +225,7 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur
addParam.setPost(insurancePre.getPosition());
addParam.setRemark(CommonConstants.EMPTY_STRING);
addParam.setInsurancePreId(insurancePre.getId());
addParam.setCustomerUserName(insurancePre.getCustomerUsername());
batchAddParamList.add(addParam);
}
if (CommonConstants.FOUR_INT == insurancePre.getBuyType()) {
......@@ -242,6 +244,7 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur
addParam.setReplaceEmpIdcardNo(insurancePre.getEmpIdcard());
addParam.setRemark(CommonConstants.EMPTY_STRING);
addParam.setInsurancePreId(insurancePre.getId());
addParam.setCustomerUserName(insurancePre.getCustomerUsername());
replaceAddParamList.add(addParam);
}
}
......@@ -488,6 +491,7 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur
autoParam.setRemark(addParam.getRemark());
autoParam.setErrorMessage(addParam.getErrorMessage());
autoParam.setInsurancePreId(addParam.getInsurancePreId());
autoParam.setCustomerUserName(addParam.getCustomerUserName());
return autoParam;
}
......@@ -508,6 +512,7 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur
autoParam.setRemark(batchParam.getRemark());
autoParam.setErrorMessage(batchParam.getErrorMessage());
autoParam.setInsurancePreId(batchParam.getInsurancePreId());
autoParam.setCustomerUserName(batchParam.getCustomerUserName());
return autoParam;
}
......@@ -528,6 +533,7 @@ public class TEmployeeInsurancePreServiceImpl extends ServiceImpl<TEmployeeInsur
autoParam.setReplaceEmpIdcardNo(replaceParam.getReplaceEmpIdcardNo());
autoParam.setErrorMessage(replaceParam.getErrorMessage());
autoParam.setInsurancePreId(replaceParam.getInsurancePreId());
autoParam.setCustomerUserName(replaceParam.getCustomerUserName());
return autoParam;
}
......
......@@ -373,7 +373,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
detail.setActualPremium(new BigDecimal("0.00"));
detail.setEstimatePremium(new BigDecimal("0.00"));
detail.setCreateBy(null == user ? "1" : user.getId());
detail.setCreateName(null == user ? "自动化派单" : user.getNickname());
detail.setCreateName(null == user ? "自动化派单" + "-" + success.getCustomerUserName() : user.getNickname());
detailList.add(detail);
sourceIdCardList.add(detail.getEmpIdcardNo());
baseMapper.insert(detail);
......@@ -446,7 +446,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
detail.setActualPremium(new BigDecimal("0.00"));
detail.setEstimatePremium(new BigDecimal("0.00"));
detail.setCreateBy(null == user ? "1" : user.getId());
detail.setCreateName(null == user ? "自动化派单" : user.getNickname());
detail.setCreateName(null == user ? "自动化派单" + "-" + success.getCustomerUserName() : user.getNickname());
detailList.add(detail);
sourceIdCardList.add(detail.getEmpIdcardNo());
replaceIdList.add(detail.getId());
......@@ -557,7 +557,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
//创建时间是新数据插入时间
newDetail.setCreateTime(LocalDateTime.now());
newDetail.setCreateBy(null == user ? "1" : user.getId());
newDetail.setCreateName(null == user ? "自动化派单" : user.getNickname());
newDetail.setCreateName(null == user ? "自动化派单" + "-" + success.getCustomerUserName() : user.getNickname());
//替换不参与结算
newDetail.setDefaultSettleId(null);
//替换不继承备注 20250331 fxj 替换模板新增备注字段不用清空
......@@ -585,7 +585,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
replace.setReplaceStatus(CommonConstants.ONE_INT);
replace.setReplaceTime(LocalDateTime.now());
replace.setCreateBy(null == user ? "1" : user.getId());
replace.setCreateName(null == user ? "自动化派单" : user.getNickname());
replace.setCreateName(null == user ? "自动化派单" + "-" + success.getCustomerUserName() : user.getNickname());
replace.setCreateTime(LocalDateTime.now());
tInsuranceReplaceService.save(replace);
updateEmployeeInsurancePre(success.getInsurancePreId(),newDetail,CommonConstants.THREE_STRING);
......@@ -2671,7 +2671,11 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
* @return {@link Map<String, List<InsuranceAddParam>>}
*/
private Map<String,List<InsuranceAddParam>> addInsuranceCheck(List<InsuranceAddParam> paramList,YifuUser user){
List<String> deptNoList = getDeptNoList(null == user ? "1" : user.getId());
//1.9.11超管无需校验项目权限
List<String> deptNoList = new ArrayList<>();
if (Common.isNotNull(user) && !CommonConstants.ZERO_STRING.equals(user.getSystemFlag())) {
deptNoList = getDeptNoList(user.getId());
}
Map<String,List<InsuranceAddParam>> map = new HashMap<>();
List<InsuranceAddParam> listResult = new ArrayList<>();
List<InsuranceAddParam> listSuccess = new ArrayList<>();
......@@ -2886,15 +2890,18 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
continue;
}
//校验当前项目是否在权限范围内
if(CollectionUtils.isEmpty(deptNoList)){
param.setErrorMessage(InsurancesConstants.DEPT_NO_NOT_IN_USER_DEPT_LIST);
listResult.add(param);
continue;
}
if(!deptNoList.stream().anyMatch(u ->u.equals(param.getDeptNo()))){
param.setErrorMessage(InsurancesConstants.DEPT_NO_NOT_IN_USER_DEPT_LIST);
listResult.add(param);
continue;
//1.9.11超管无需校验项目权限
if (Common.isNotNull(user) && !CommonConstants.ZERO_STRING.equals(user.getSystemFlag())) {
if (CollectionUtils.isEmpty(deptNoList)) {
param.setErrorMessage(InsurancesConstants.DEPT_NO_NOT_IN_USER_DEPT_LIST);
listResult.add(param);
continue;
}
if (!deptNoList.stream().anyMatch(u -> u.equals(param.getDeptNo()))) {
param.setErrorMessage(InsurancesConstants.DEPT_NO_NOT_IN_USER_DEPT_LIST);
listResult.add(param);
continue;
}
}
//省市区域校验是否正确并设置对应id
String redisProvinceName = getRedisAreaValue(param.getInsuranceProvinceName());
......@@ -3058,7 +3065,11 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
* @return {@link Map< String, List< InsuranceBatchParam>>}
*/
private Map<String,List<InsuranceBatchParam>> batchInsuranceCheck(List<InsuranceBatchParam> paramList,YifuUser user){
List<String> deptNoList = getDeptNoList(null == user ? "1" : user.getId());
//1.9.11超管无需校验项目权限
List<String> deptNoList = new ArrayList<>();
if (Common.isNotNull(user) && !CommonConstants.ZERO_STRING.equals(user.getSystemFlag())) {
deptNoList = getDeptNoList(user.getId());
}
Map<String,List<InsuranceBatchParam>> map = new HashMap<>();
List<InsuranceBatchParam> listResult = new ArrayList<>();
List<InsuranceBatchParam> listSuccess = new ArrayList<>();
......@@ -3234,15 +3245,18 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
continue;
}
//校验当前项目是否在权限范围内
if(CollectionUtils.isEmpty(deptNoList)){
param.setErrorMessage(InsurancesConstants.DEPT_NO_NOT_IN_USER_DEPT_LIST);
listResult.add(param);
continue;
}
if(!deptNoList.stream().anyMatch(u ->u.equals(param.getDeptNo()))){
param.setErrorMessage(InsurancesConstants.DEPT_NO_NOT_IN_USER_DEPT_LIST);
listResult.add(param);
continue;
//1.9.11超管无需校验项目权限
if (Common.isNotNull(user) && !CommonConstants.ZERO_STRING.equals(user.getSystemFlag())) {
if (CollectionUtils.isEmpty(deptNoList)) {
param.setErrorMessage(InsurancesConstants.DEPT_NO_NOT_IN_USER_DEPT_LIST);
listResult.add(param);
continue;
}
if (!deptNoList.stream().anyMatch(u -> u.equals(param.getDeptNo()))) {
param.setErrorMessage(InsurancesConstants.DEPT_NO_NOT_IN_USER_DEPT_LIST);
listResult.add(param);
continue;
}
}
//省市区域校验是否正确并设置对应id
String redisProvinceName = getRedisAreaValue(param.getInsuranceProvinceName());
......@@ -3444,7 +3458,11 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
* @return {@link Map< String, List<InsuranceReplaceParam>>}
*/
private Map<String,List<InsuranceReplaceParam>> replaceInsuranceCheck(List<InsuranceReplaceParam> paramList,YifuUser user){
List<String> deptNoList = getDeptNoList(null == user ? "1" : user.getId());
//1.9.11超管无需校验项目权限
List<String> deptNoList = new ArrayList<>();
if (Common.isNotNull(user) && !CommonConstants.ZERO_STRING.equals(user.getSystemFlag())) {
deptNoList = getDeptNoList(user.getId());
}
Map<String,List<InsuranceReplaceParam>> map = new HashMap<>();
List<InsuranceReplaceParam> listResult = new ArrayList<>();
List<InsuranceReplaceParam> listSuccess = new ArrayList<>();
......@@ -3707,21 +3725,24 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
continue;
}else {
//校验当前项目是否在权限范围内
if(CollectionUtils.isEmpty(deptNoList)){
param.setErrorMessage(InsurancesConstants.DEPT_NO_NOT_IN_USER_DEPT_LIST);
listResult.add(param);
continue;
}
if(deptNoList.stream().noneMatch(u ->u.equals(param.getDeptNo()))){
param.setErrorMessage(InsurancesConstants.OLD_DEPT_NO_NOT_IN_DEPT_LIST);
listResult.add(param);
continue;
}
//校验当前项目是否在权限范围内
if(deptNoList.stream().noneMatch(u ->u.equals(param.getReplaceDeptNo()))){
param.setErrorMessage(InsurancesConstants.NEW_DEPT_NO_NOT_IN_DEPT_LIST);
listResult.add(param);
continue;
//1.9.11超管无需校验项目权限
if (Common.isNotNull(user) && !CommonConstants.ZERO_STRING.equals(user.getSystemFlag())) {
if (CollectionUtils.isEmpty(deptNoList)) {
param.setErrorMessage(InsurancesConstants.DEPT_NO_NOT_IN_USER_DEPT_LIST);
listResult.add(param);
continue;
}
if (deptNoList.stream().noneMatch(u -> u.equals(param.getDeptNo()))) {
param.setErrorMessage(InsurancesConstants.OLD_DEPT_NO_NOT_IN_DEPT_LIST);
listResult.add(param);
continue;
}
//校验当前项目是否在权限范围内
if (deptNoList.stream().noneMatch(u -> u.equals(param.getReplaceDeptNo()))) {
param.setErrorMessage(InsurancesConstants.NEW_DEPT_NO_NOT_IN_DEPT_LIST);
listResult.add(param);
continue;
}
}
// 投保状态 待投保 不能替换
if (detail.getBuyHandleStatus() == CommonConstants.ONE_INT){
......@@ -4343,8 +4364,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
operate.setCreateBy(user.getId());
operate.setCreateName(user.getNickname());
}else {
operate.setCreateBy("1");
operate.setCreateName("自动化派单");
operate.setCreateBy(detail.getCreateBy());
operate.setCreateName(detail.getCreateName());
}
operate.setCreateTime(LocalDateTime.now());
operateList.add(operate);
......
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