Commit 21e5e43e authored by hongguangwu's avatar hongguangwu

商险加字段

parent 710dbe24
...@@ -322,8 +322,17 @@ public class TInsuranceDetail extends BaseEntity { ...@@ -322,8 +322,17 @@ public class TInsuranceDetail extends BaseEntity {
@ExcelIgnore @ExcelIgnore
private String bpoFlag; private String bpoFlag;
@Schema(description = "项目名称")
private String deptName;
@Schema(description ="客户id")
private String unitId;
@Schema(description ="客户名称")
private String unitName;
@Schema(description ="客户编码")
private String unitNo;
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
} }
\ No newline at end of file
...@@ -183,4 +183,16 @@ public class InsuranceAddParam implements Serializable { ...@@ -183,4 +183,16 @@ public class InsuranceAddParam implements Serializable {
@Schema(description = "是否BPO", name = "bpoFlag") @Schema(description = "是否BPO", name = "bpoFlag")
@ExcelIgnore @ExcelIgnore
private String bpoFlag; private String bpoFlag;
@Schema(description = "项目名称")
private String deptName;
@Schema(description ="客户id")
private String unitId;
@Schema(description ="客户名称")
private String unitName;
@Schema(description ="客户编码")
private String unitNo;
} }
...@@ -108,4 +108,16 @@ public class InsuranceReplaceParam implements Serializable { ...@@ -108,4 +108,16 @@ public class InsuranceReplaceParam implements Serializable {
@ExcelIgnore @ExcelIgnore
private String bpoFlag; private String bpoFlag;
@Schema(description = "项目名称")
private String deptName;
@Schema(description ="客户id")
private String unitId;
@Schema(description ="客户名称")
private String unitName;
@Schema(description ="客户编码")
private String unitNo;
} }
...@@ -201,8 +201,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -201,8 +201,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
menuUtil.setAuthSql(user, param); menuUtil.setAuthSql(user, param);
IPage<InsuranceListVO> insuranceList; IPage<InsuranceListVO> insuranceList;
insuranceList = baseMapper.getInsuranceListPage(page,param); insuranceList = baseMapper.getInsuranceListPage(page,param);
//根据项目编码获取项目名称
setProjectNameByDeptNo(insuranceList.getRecords());
// 购买月数 // 购买月数
if (CollectionUtils.isNotEmpty(insuranceList.getRecords())){ if (CollectionUtils.isNotEmpty(insuranceList.getRecords())){
insuranceList.getRecords().stream().forEach(e ->{ insuranceList.getRecords().stream().forEach(e ->{
...@@ -229,8 +227,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -229,8 +227,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
menuUtil.setAuthSql(user, param); menuUtil.setAuthSql(user, param);
List<InsuranceListVO> insuranceList; List<InsuranceListVO> insuranceList;
insuranceList = baseMapper.getInsuranceList(param); insuranceList = baseMapper.getInsuranceList(param);
//根据项目编码获取项目名称
setProjectNameByDeptNo(insuranceList);
// 购买月数 // 购买月数
if (CollectionUtils.isNotEmpty(insuranceList)){ if (CollectionUtils.isNotEmpty(insuranceList)){
if(insuranceList.size() > CommonConstants.EXPORT_TWENTY_THOUSAND){ if(insuranceList.size() > CommonConstants.EXPORT_TWENTY_THOUSAND){
...@@ -263,8 +259,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -263,8 +259,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
param.setUpdateBy(user.getId()); param.setUpdateBy(user.getId());
} }
IPage<InsuranceListVO> insuranceList = baseMapper.getInsuranceHandleListPage(page,param); IPage<InsuranceListVO> insuranceList = baseMapper.getInsuranceHandleListPage(page,param);
//根据项目编码获取项目名称
setProjectNameByDeptNo(insuranceList.getRecords());
// 购买月数 // 购买月数
if (CollectionUtils.isNotEmpty(insuranceList.getRecords())){ if (CollectionUtils.isNotEmpty(insuranceList.getRecords())){
insuranceList.getRecords().stream().forEach(e ->{ insuranceList.getRecords().stream().forEach(e ->{
...@@ -436,6 +430,11 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -436,6 +430,11 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
newDetail.setEmpIdcardNo(success.getReplaceEmpIdcardNo()); newDetail.setEmpIdcardNo(success.getReplaceEmpIdcardNo());
newDetail.setDeptNo(success.getReplaceDeptNo()); newDetail.setDeptNo(success.getReplaceDeptNo());
newDetail.setDeptId(success.getDeptId()); newDetail.setDeptId(success.getDeptId());
newDetail.setBpoFlag(success.getBpoFlag());
newDetail.setDeptName(success.getDeptName());
newDetail.setUnitId(success.getUnitId());
newDetail.setUnitName(success.getUnitName());
newDetail.setUnitNo(success.getUnitNo());
//替换项目的结算方式 //替换项目的结算方式
newDetail.setSettleType(success.getSettleType()); newDetail.setSettleType(success.getSettleType());
newDetail.setPost(success.getPost()); newDetail.setPost(success.getPost());
...@@ -938,6 +937,10 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -938,6 +937,10 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
detail.setUpdateTime(LocalDateTime.now()); detail.setUpdateTime(LocalDateTime.now());
if (Common.isNotNull(jsonObject)){ if (Common.isNotNull(jsonObject)){
detail.setDeptId(jsonObject.getId()); detail.setDeptId(jsonObject.getId());
detail.setDeptName(jsonObject.getDepartName());
detail.setUnitId(jsonObject.getCustomerId());
detail.setUnitName(jsonObject.getCustomerName());
detail.setUnitNo(jsonObject.getCustomerCode());
} }
detailList.add(detail); detailList.add(detail);
} }
...@@ -1036,6 +1039,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -1036,6 +1039,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
|| detail.getBuyHandleStatus() == CommonConstants.FIVE_INT){ || detail.getBuyHandleStatus() == CommonConstants.FIVE_INT){
InsuranceListVO listVO = new InsuranceListVO(); InsuranceListVO listVO = new InsuranceListVO();
BeanCopyUtils.copyProperties(detail,listVO); BeanCopyUtils.copyProperties(detail,listVO);
listVO.setProjectName(detail.getDeptName());
listVO.setErrorMessage(InsurancesConstants.REDUCE_ROLLBACK_IS_NOT_ALLOW); listVO.setErrorMessage(InsurancesConstants.REDUCE_ROLLBACK_IS_NOT_ALLOW);
errorList.add(listVO); errorList.add(listVO);
}else if(detail.getBuyHandleStatus() == CommonConstants.THREE_INT }else if(detail.getBuyHandleStatus() == CommonConstants.THREE_INT
...@@ -1043,6 +1047,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -1043,6 +1047,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
|| detail.getReduceHandleStatus() == CommonConstants.TWO_INT))){ || detail.getReduceHandleStatus() == CommonConstants.TWO_INT))){
InsuranceListVO listVO = new InsuranceListVO(); InsuranceListVO listVO = new InsuranceListVO();
BeanCopyUtils.copyProperties(detail,listVO); BeanCopyUtils.copyProperties(detail,listVO);
listVO.setProjectName(detail.getDeptName());
listVO.setErrorMessage(InsurancesConstants.REDUCE_ROLLBACK_REDUCE_IS_NOT_ALLOW); listVO.setErrorMessage(InsurancesConstants.REDUCE_ROLLBACK_REDUCE_IS_NOT_ALLOW);
errorList.add(listVO); errorList.add(listVO);
}else{ }else{
...@@ -1170,8 +1175,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -1170,8 +1175,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
//更新状态 //更新状态
this.saveOrUpdateBatch(successList); this.saveOrUpdateBatch(successList);
} }
//根据项目编码获取项目名称
setProjectNameByDeptNo(errorList);
//操作记录 //操作记录
addOperate(operateList,user,InsurancesConstants.ROLLBACK); addOperate(operateList,user,InsurancesConstants.ROLLBACK);
return R.ok(errorList,InsurancesConstants.OPERATE_SUCCESS); return R.ok(errorList,InsurancesConstants.OPERATE_SUCCESS);
...@@ -1254,6 +1257,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -1254,6 +1257,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if(detail.getBuyHandleStatus() != CommonConstants.TWO_INT){ if(detail.getBuyHandleStatus() != CommonConstants.TWO_INT){
InsuranceListVO listVO = new InsuranceListVO(); InsuranceListVO listVO = new InsuranceListVO();
BeanCopyUtils.copyProperties(detail,listVO); BeanCopyUtils.copyProperties(detail,listVO);
listVO.setProjectName(detail.getDeptName());
listVO.setErrorMessage(InsurancesConstants.INSURANCE_BUY_STATUS_NOT_TWO); listVO.setErrorMessage(InsurancesConstants.INSURANCE_BUY_STATUS_NOT_TWO);
errorList.add(listVO); errorList.add(listVO);
}else { }else {
...@@ -1383,8 +1387,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -1383,8 +1387,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
} }
}); });
} }
//根据项目编码获取项目名称
setProjectNameByDeptNo(errorList);
//操作记录 //操作记录
if (CollectionUtils.isNotEmpty(successList)){ if (CollectionUtils.isNotEmpty(successList)){
for (TInsuranceDetail detail : successList) { for (TInsuranceDetail detail : successList) {
...@@ -1946,6 +1948,10 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -1946,6 +1948,10 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
} }
param.setBpoFlag(projectSetInfoVo.getBpoFlag()); param.setBpoFlag(projectSetInfoVo.getBpoFlag());
param.setDeptId(projectSetInfoVo.getId()); param.setDeptId(projectSetInfoVo.getId());
param.setDeptName(projectSetInfoVo.getDepartName());
param.setUnitId(projectSetInfoVo.getCustomerId());
param.setUnitName(projectSetInfoVo.getCustomerName());
param.setUnitNo(projectSetInfoVo.getCustomerCode());
} }
} }
} }
...@@ -2702,6 +2708,10 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -2702,6 +2708,10 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
param.setSettleType(Integer.parseInt(settleType)); param.setSettleType(Integer.parseInt(settleType));
param.setDeptId(projectSetInfoVo.getId()); param.setDeptId(projectSetInfoVo.getId());
param.setBpoFlag(projectSetInfoVo.getBpoFlag()); param.setBpoFlag(projectSetInfoVo.getBpoFlag());
param.setDeptName(projectSetInfoVo.getDepartName());
param.setUnitId(projectSetInfoVo.getCustomerId());
param.setUnitName(projectSetInfoVo.getCustomerName());
param.setUnitNo(projectSetInfoVo.getCustomerCode());
} }
} }
} }
...@@ -3143,37 +3153,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -3143,37 +3153,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
return String.valueOf(RedisUtil.redis.opsForValue().get(CacheConstants.AREA_VALUE + areaString)); return String.valueOf(RedisUtil.redis.opsForValue().get(CacheConstants.AREA_VALUE + areaString));
} }
/**
* 根据项目编码获取项目名称
*
* @author licancan
* @param insuranceList
* @return void
*/
private void setProjectNameByDeptNo(List<InsuranceListVO> insuranceList) {
if (CollectionUtils.isNotEmpty(insuranceList)){
List<String> collect = insuranceList.stream().map(e -> e.getDeptNo()).distinct().collect(Collectors.toList());
try{
R<SetInfoVo> setInfoByCodes = archivesDaprUtil.getSetInfoByCodes(collect);
if (null != setInfoByCodes && setInfoByCodes.getCode() == CommonConstants.SUCCESS && Common.isNotNull(setInfoByCodes.getData())) {
Map<String, ProjectSetInfoVo> data = setInfoByCodes.getData().getProjectSetInfoVoMap();
if (data != null) {
for (InsuranceListVO record : insuranceList) {
ProjectSetInfoVo jsonObject = data.get(record.getDeptNo());
if (null != jsonObject) {
record.setProjectName(Optional.ofNullable(jsonObject.getDepartName()).orElse(""));
}
}
}
}
}catch (Exception e){
for (InsuranceListVO record : insuranceList) {
record.setProjectName(CommonConstants.EMPTY_STRING);
}
}
}
}
/** /**
* 操作记录(无审批remark) * 操作记录(无审批remark)
* *
......
...@@ -58,6 +58,10 @@ ...@@ -58,6 +58,10 @@
<result property="createUserDeptName" column="CREATE_USER_DEPT_NAME" jdbcType="VARCHAR"/> <result property="createUserDeptName" column="CREATE_USER_DEPT_NAME" jdbcType="VARCHAR"/>
<result property="deptId" column="DEPT_ID" jdbcType="VARCHAR"/> <result property="deptId" column="DEPT_ID" jdbcType="VARCHAR"/>
<result property="bpoFlag" column="BPO_FLAG" jdbcType="VARCHAR"/> <result property="bpoFlag" column="BPO_FLAG" jdbcType="VARCHAR"/>
<result property="deptName" column="DEPT_NAME" jdbcType="VARCHAR"/>
<result property="unitId" column="UNIT_ID" jdbcType="VARCHAR"/>
<result property="unitName" column="UNIT_NAME" jdbcType="VARCHAR"/>
<result property="unitNo" column="UNIT_NO" jdbcType="VARCHAR"/>
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
ID,EMP_NAME, ID,EMP_NAME,
...@@ -71,7 +75,9 @@ ...@@ -71,7 +75,9 @@
BUY_HANDLE_STATUS,DEFAULT_SETTLE_ID,REDUCE_HANDLE_STATUS, BUY_HANDLE_STATUS,DEFAULT_SETTLE_ID,REDUCE_HANDLE_STATUS,
IS_USE,IS_EFFECT,IS_OVERDUE,REMARK, IS_USE,IS_EFFECT,IS_OVERDUE,REMARK,
CREATE_BY,CREATE_NAME,CREATE_TIME,BPO_FLAG, CREATE_BY,CREATE_NAME,CREATE_TIME,BPO_FLAG,
UPDATE_BY,UPDATE_TIME,DELETE_FLAG,DEFAULT_SETTLE_ID,HANDLED_BY,HANDLED_TIME,ORDER_NO,CREATE_USER_DEPT_ID,CREATE_USER_DEPT_NAME UPDATE_BY,UPDATE_TIME,DELETE_FLAG,DEFAULT_SETTLE_ID,HANDLED_BY,HANDLED_TIME,ORDER_NO,CREATE_USER_DEPT_ID,CREATE_USER_DEPT_NAME,
DEPT_NAME,UNIT_ID,UNIT_NAME,UNIT_NO
</sql> </sql>
<!--投保分页查询--> <!--投保分页查询-->
...@@ -92,7 +98,8 @@ ...@@ -92,7 +98,8 @@
a.BUY_HANDLE_STATUS as buyHandleStatus, a.BUY_HANDLE_STATUS as buyHandleStatus,
a.SETTLE_TYPE as settleType, a.SETTLE_TYPE as settleType,
a.CREATE_USER_DEPT_NAME as createUserDeptName, a.CREATE_USER_DEPT_NAME as createUserDeptName,
a.SETTLE_MONTH as settleMonth a.SETTLE_MONTH as settleMonth,
a.DEPT_NAME as projectName
from t_insurance_detail a from t_insurance_detail a
<if test="param.authSql != null and param.authSql.trim() != ''"> <if test="param.authSql != null and param.authSql.trim() != ''">
left join t_insurance_area_res p on p.USER_ID = #{param.createBy} left join t_insurance_area_res p on p.USER_ID = #{param.createBy}
...@@ -157,7 +164,8 @@ ...@@ -157,7 +164,8 @@
a.CREATE_NAME as createName, a.CREATE_NAME as createName,
a.BUY_HANDLE_STATUS as buyHandleStatus, a.BUY_HANDLE_STATUS as buyHandleStatus,
a.SETTLE_TYPE as settleType, a.SETTLE_TYPE as settleType,
a.SETTLE_MONTH as settleMonth a.SETTLE_MONTH as settleMonth,
a.DEPT_NAME as projectName
from t_insurance_detail a from t_insurance_detail a
<if test="param.authSql != null and param.authSql.trim() != ''"> <if test="param.authSql != null and param.authSql.trim() != ''">
left join t_insurance_area_res p on p.USER_ID = #{param.createBy} left join t_insurance_area_res p on p.USER_ID = #{param.createBy}
...@@ -218,7 +226,8 @@ ...@@ -218,7 +226,8 @@
a.CREATE_NAME as createName, a.CREATE_NAME as createName,
a.BUY_HANDLE_STATUS as buyHandleStatus, a.BUY_HANDLE_STATUS as buyHandleStatus,
a.SETTLE_TYPE as settleType, a.SETTLE_TYPE as settleType,
a.SETTLE_MONTH as settleMonth a.SETTLE_MONTH as settleMonth,
a.DEPT_NAME as projectName
from t_insurance_detail a from t_insurance_detail a
<if test="param.authSql != null and param.authSql.trim() != ''"> <if test="param.authSql != null and param.authSql.trim() != ''">
left join t_insurance_area_res p on p.USER_ID = #{param.createBy} left join t_insurance_area_res p on p.USER_ID = #{param.createBy}
......
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