Commit 76ed41fc authored by 查济's avatar 查济

Merge branch 'feature-zhaji' into 'develop'

"feature-zhaJi:优化减员导入逻辑,优化减员,已投保列表的展示"

See merge request fangxinjiang/yifu!44
parents a89f24ec 1211380e
......@@ -359,5 +359,10 @@ public class InsurancesConstants {
*/
public static final String REFUND_MONEY_IS_NOT_NULL = "已更新保单减员退费,不能再次更新";
/**
* 减员导出办理
*/
public static final String REFUND_EXPORT = "减员导出办理";
}
package com.yifu.cloud.plus.v1.yifu.insurances.entity;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.Data;
......@@ -15,7 +16,7 @@ import java.util.Date;
*/
@Data
@Tag(name = "减员信息表")
public class TInsuranceRefund implements Serializable {
public class TInsuranceRefund extends BaseEntity {
/**
* 主键id
*/
......@@ -31,24 +32,6 @@ public class TInsuranceRefund implements Serializable {
*/
private Integer reduceHandleStatus;
/**
* 员工姓名
*/
@Schema(description = "员工姓名")
private String empName;
/**
* 员工身份证号
*/
@Schema(description = "员工身份证号")
private String empIdcardNo;
/**
* 保单编号
*/
@Schema(description = "保单编号")
private String policyNo;
/**
* 退费金额
*/
......@@ -59,21 +42,6 @@ public class TInsuranceRefund implements Serializable {
*/
private String remark;
/**
* 减员创建时间
*/
private LocalDateTime createTime;
/**
* 减员创建人
*/
private String createBy;
/**
* 减员创建人姓名
*/
private String createName;
/**
* 是否删除 0未删除/1删除
*/
......@@ -81,6 +49,8 @@ public class TInsuranceRefund implements Serializable {
private Integer deleteFlag;
private static final long serialVersionUID = 1L;
......
......@@ -61,6 +61,12 @@ public class InsuranceRefundCheck implements Serializable {
@Schema(description = "保单结束日期")
private String policyEnd;
/**
* 减员状态 1待减员 2减员中3减员退回
*/
@Schema(description = "减员状态 1待减员 2减员中3减员退回")
private Integer reduceHandleStatus;
/**
* 备注
*/
......
......@@ -165,5 +165,11 @@ public class InsuranceRefundListVo implements Serializable {
@Schema(description = "减员派单日期")
private LocalDate refundCreateTime;
/**
* 减员状态 1待减员 2减员中3减员退回
*/
@Schema(description = "减员状态 1待减员 2减员中3减员退回")
private Integer reduceHandleStatus;
}
......@@ -23,7 +23,7 @@ public class InsuranceRefundOperationParam implements Serializable {
private Integer operationType;
@Schema(name = "减员办理列表")
private List<InsuranceRefundHandlingListVo> insuranceRefundHandlingList;
private List<RefundExportListVo> insuranceRefundHandlingList;
@Schema(name = "办理参数")
private InsuranceRefundHandlingParam param;
......
package com.yifu.cloud.plus.v1.yifu.insurances.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* @author zhaji
* @description 导出减员办理请求参数
* @date 2022-07-26 15:53:56
*/
@Data
@Schema(description = "导出减员办理请求参数")
public class RefundExportListParam implements Serializable {
private static final long serialVersionUID = 3623027153213352936L;
/**
* 员工姓名
*/
@Schema(description = "员工姓名")
private String empName;
/**
* 员工身份证号
*/
@Schema(description = "员工身份证号")
private String empIdcardNo;
/**
* 项目编码
*/
@Schema(description = "项目编码")
private String deptNo;
/**
* 保险公司名称
*/
@Schema(description = "保险公司名称")
private String insuranceCompanyName;
/**
* 险种名称
*/
@Schema(description = "险种名称")
private String insuranceTypeName;
/**
* 商险id集合
*/
@Schema(description = "商险id集合")
private List<String> idList;
}
......@@ -15,7 +15,7 @@ import java.time.LocalDate;
*/
@Data
@Tag(name ="减员办理返回类")
public class InsuranceRefundHandlingListVo implements Serializable {
public class RefundExportListVo implements Serializable {
private static final long serialVersionUID = -2689686777914935788L;
......@@ -169,7 +169,7 @@ public class InsuranceRefundHandlingListVo implements Serializable {
* 创建人姓名
*/
@Schema(description = "创建人(派单人)")
private String refundCreateName;
private String createName;
/**
* 备注
......
......@@ -291,11 +291,11 @@ public class TInsuranceDetailController {
*
* @author zhaji
* @param param 查询条件
* @return {@link R<IPage< InsuranceRefundHandlingListVo >>}
* @return {@link R<IPage< RefundExportListVo >>}
*/
@Operation(summary = "减员办理列表分页查询", description = "减员办理列表分页查询")
@PostMapping("/getInsuranceRefundHandlingPageList")
public R<IPage<InsuranceRefundHandlingListVo>> getInsuranceRefundHandlingPageList(Page<InsuranceRefundHandlingParam> page, @RequestBody InsuranceRefundHandlingParam param) {
public R<IPage<RefundExportListVo>> getInsuranceRefundHandlingPageList(Page<InsuranceRefundHandlingParam> page, @RequestBody InsuranceRefundHandlingParam param) {
return R.ok(tInsuranceDetailService.getInsuranceRefundHandlingPageList(page,param));
}
......@@ -304,11 +304,11 @@ public class TInsuranceDetailController {
*
* @author zhaji
* @param param 查询条件
* @return {@link R<List< InsuranceRefundHandlingListVo >>}
* @return {@link R<List< RefundExportListVo >>}
*/
@Operation(summary = "导出减员列表", description = "导出减员列表")
@PostMapping("/getInsuranceRefundHandlingList")
public R<List<InsuranceRefundHandlingListVo>> getInsuranceRefundHandlingList(@RequestBody InsuranceRefundOperationParam param) {
public R<List<RefundExportListVo>> getInsuranceRefundHandlingList(@RequestBody RefundExportListParam param) {
return R.ok(tInsuranceDetailService.getInsuranceRefundHandlingList(param));
}
......@@ -317,7 +317,7 @@ public class TInsuranceDetailController {
*
* @author zhaji
* @param insuranceDetail 减员信息
* @return {@link R<List< InsuranceRefundHandlingListVo >>}
* @return {@link R<List< RefundExportListVo >>}
*/
@Operation(summary = "减员办理", description = "减员办理")
@PostMapping("/updateInsuranceRefund")
......@@ -330,7 +330,7 @@ public class TInsuranceDetailController {
*
* @author zhaji
* @param CompanyName 保险公司id
* @return {@link R<List< InsuranceRefundHandlingListVo >>}
* @return {@link R<List< RefundExportListVo >>}
*/
@Operation(summary = "根据保险公司名称查询保单明细", description = "根据保险公司名称查询保单明细")
@GetMapping("/selectByCompanyName")
......@@ -343,7 +343,7 @@ public class TInsuranceDetailController {
*
* @author zhaji
* @param id 险种id
* @return {@link R<List< InsuranceRefundHandlingListVo >>}
* @return {@link R<List< RefundExportListVo >>}
*/
@Operation(summary = "根据险种名称查询保单明细", description = "根据险种名称查询保单明细")
@GetMapping("/selectByTypeId")
......@@ -356,7 +356,7 @@ public class TInsuranceDetailController {
*
* @author zhaji
* @param id 险种id
* @return {@link R<List< InsuranceRefundHandlingListVo >>}
* @return {@link R<List< RefundExportListVo >>}
*/
@Operation(summary = "出险", description = "出险")
@GetMapping("/updateIsUse")
......
......@@ -7,6 +7,7 @@ import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceCompany;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceType;
import com.yifu.cloud.plus.v1.yifu.insurances.service.TInsuranceTypeService;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceRefundHandlingParam;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceTypeVo;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
......@@ -40,8 +41,8 @@ public class TInsuranceTypeController {
* @return
*/
@Operation(summary = "分页查询", description = "分页查询")
@GetMapping("/page" )
public R<IPage<InsuranceTypeVo>> getInsuranceTypePage(Page page,TInsuranceType insuranceType) {
@PostMapping("/page" )
public R<IPage<InsuranceTypeVo>> getInsuranceTypePage(Page<TInsuranceType> page, @RequestBody TInsuranceType insuranceType) {
return R.ok(insuranceTypeService.pageDiy(page, insuranceType));
}
......@@ -53,7 +54,6 @@ public class TInsuranceTypeController {
@Operation(summary = "新增险种", description = "新增险种:hasPermission('demo_insuranceType_add')")
@SysLog("新增险种")
@PostMapping("/save")
//@PreAuthorize("@pms.hasPermission('demo_insuranceType_add')" )
public R save(@RequestBody TInsuranceType insuranceType) {
return insuranceTypeService.saveInsuranceType(insuranceType);
}
......@@ -65,7 +65,6 @@ public class TInsuranceTypeController {
*/
@Operation(summary = "通过id查询险种详情", description = "通过id查询:hasPermission('demo_insuranceType_get')")
@GetMapping("/{id}" )
//@PreAuthorize("@pms.hasPermission('demo_insuranceType_get')" )
public R getInsuranceTypeDetail(@PathVariable("id" ) String id) {
return insuranceTypeService.getInsuranceTypeDetail(id);
}
......@@ -79,7 +78,6 @@ public class TInsuranceTypeController {
@Operation(summary = "修改险种", description = "新增险种:hasPermission('demo_insuranceType_add')")
@SysLog("修改险种")
@PostMapping("/update")
//@PreAuthorize("@pms.hasPermission('demo_insuranceType_add')" )
public R update(@RequestBody TInsuranceType insuranceType) {
return insuranceTypeService.updateInsuranceType(insuranceType);
}
......@@ -90,8 +88,8 @@ public class TInsuranceTypeController {
* @return
*/
@Operation(summary = "查询险种列表", description = "查询险种列表")
@GetMapping("/list" )
public R getInsuranceTypeList(TInsuranceType insuranceType) {
@PostMapping("/list" )
public R getInsuranceTypeList(@RequestBody TInsuranceType insuranceType) {
return insuranceTypeService.getInsuranceTypeList(insuranceType);
}
}
......@@ -111,18 +111,18 @@ public interface TInsuranceDetailMapper extends BaseMapper<TInsuranceDetail> {
* @author zhaji
* @param page 分页参数
* @param param 查询参数
* @return {@link IPage< InsuranceRefundHandlingListVo>}
* @return {@link IPage< RefundExportListVo >}
*/
IPage<InsuranceRefundHandlingListVo> getInsuranceRefundHandlingPageList(Page<InsuranceRefundHandlingParam> page, @Param("param") InsuranceRefundHandlingParam param);
IPage<RefundExportListVo> getInsuranceRefundHandlingPageList(Page<InsuranceRefundHandlingParam> page, @Param("param") InsuranceRefundHandlingParam param);
/**
* 减员办理列表不分页查询
*
* @author zhaji
* @param param 查询参数
* @return {@link List< InsuranceRefundHandlingListVo>}
* @return {@link List< RefundExportListVo >}
*/
List<InsuranceRefundHandlingListVo> getInsuranceRefundHandlingList(@Param("param")InsuranceRefundHandlingParam param);
List<RefundExportListVo> getInsuranceRefundHandlingList(@Param("param")InsuranceRefundHandlingParam param);
/**
* 减员办理
......@@ -150,4 +150,22 @@ public interface TInsuranceDetailMapper extends BaseMapper<TInsuranceDetail> {
* @return {@link TInsuranceRefundDetail}
*/
TInsuranceRefundDetail selectRefundDetail(@Param("param") TInsuranceRefundDetail refundDetail);
/**
* TODO
*
* @author zhaji
* @param idList
* @return {@link List< RefundExportListVo>}
*/
List<RefundExportListVo> getRefundExportListBySelect(@Param("idList")List<String> idList);
/**
* TODO
*
* @author zhaji
* @param param
* @return {@link List< RefundExportListVo>}
*/
List<RefundExportListVo> getRefundExportList(@Param("param") RefundExportListParam param);
}
......@@ -3,7 +3,6 @@ package com.yifu.cloud.plus.v1.yifu.insurances.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceRefund;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Service;
/**
* @author Administrator
......@@ -14,5 +13,14 @@ import org.springframework.stereotype.Service;
@Mapper
public interface TInsuranceRefundMapper extends BaseMapper<TInsuranceRefund> {
/**
* 根据保单id查询减员信息
*
* @author zhaji
* @param id
* @return {@link TInsuranceRefund}
*/
TInsuranceRefund getByInsDetailId(String id);
void updateByInsDetailId(TInsuranceRefund insuranceRefund);
}
......@@ -181,18 +181,18 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> {
* @author zhaji
* @param page 分页数据
* @param param 查询参数
* @return {@link IPage< InsuranceRefundHandlingListVo>}
* @return {@link IPage< RefundExportListVo >}
*/
IPage<InsuranceRefundHandlingListVo> getInsuranceRefundHandlingPageList(Page<InsuranceRefundHandlingParam> page, InsuranceRefundHandlingParam param);
IPage<RefundExportListVo> getInsuranceRefundHandlingPageList(Page<InsuranceRefundHandlingParam> page, InsuranceRefundHandlingParam param);
/**
* 减员办理列表不分页查询
*
* @author zhaji
* @param param 查询参数
* @return {@link List< InsuranceRefundHandlingListVo>}
* @return {@link List< RefundExportListVo >}
*/
List<InsuranceRefundHandlingListVo> getInsuranceRefundHandlingList(InsuranceRefundOperationParam param);
List<RefundExportListVo> getInsuranceRefundHandlingList(RefundExportListParam param);
/**
* 减员办理
......
......@@ -11,4 +11,8 @@ import org.springframework.stereotype.Service;
*/
public interface TInsuranceRefundService extends IService<TInsuranceRefund> {
TInsuranceRefund getByInsDetailId(String id);
void updateByInsDetailId(TInsuranceRefund insuranceRefund);
}
......@@ -25,7 +25,7 @@ public interface TInsuranceTypeService extends IService<TInsuranceType> {
* @param insuranceType 分页查询参数
* @return {@link IPage< TInsuranceType>}
*/
IPage<InsuranceTypeVo> pageDiy(Page page,TInsuranceType insuranceType);
IPage<InsuranceTypeVo> pageDiy(Page<TInsuranceType> page,TInsuranceType insuranceType);
/**
* 新增险种信息
......
package com.yifu.cloud.plus.v1.yifu.insurances.service.impl;
import cn.hutool.core.bean.BeanUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.BeanUtils;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
......@@ -1605,6 +1603,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
continue;
}
param.setId(one.getId());
param.setReduceHandleStatus(one.getReduceHandleStatus());
successList.add(param);
}
map.put("successList",successList);
......@@ -1633,23 +1632,24 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
updateWrapper.set(TInsuranceDetail :: getUpdateBy,user.getId())
.set(TInsuranceDetail :: getUpdateTime,LocalDateTime.now())
.set(TInsuranceDetail :: getReduceHandleStatus,CommonConstants.ONE_INT);
for (InsuranceRefundCheck refund : successList) {
for (InsuranceRefundCheck refund : successList){
TInsuranceRefund insuranceRefund = new TInsuranceRefund();
insuranceRefund.setInsDetailId(refund.getId());
insuranceRefund.setEmpName(refund.getEmpName());
insuranceRefund.setEmpIdcardNo(refund.getEmpIdcardNo());
insuranceRefund.setEmpName(refund.getEmpName());
insuranceRefund.setPolicyNo(refund.getPolicyNo());
insuranceRefund.setReduceHandleStatus(CommonConstants.ONE_INT);
insuranceRefund.setCreateBy(user.getId());
insuranceRefund.setCreateName(user.getNickname());
insuranceRefund.setCreateTime(LocalDateTime.now());
insuranceRefund.setRemark(refund.getRemark());
refundList.add(insuranceRefund);
if(CommonConstants.THREE_INT == refund.getReduceHandleStatus()){
tInsuranceRefundService.updateByInsDetailId(insuranceRefund);
}else{
tInsuranceRefundService.save(insuranceRefund);
}
updateWrapper.eq(TInsuranceDetail :: getId,refund.getId());
update(updateWrapper);
}
tInsuranceRefundService.saveBatch(refundList);
}
List<InsuranceRefundCheck> errorList = refundMap.get("errorList");
return R.ok(errorList,"校验完成,成功:"+successList.size()+"条,失败:"+errorList.size()+"条");
......@@ -1771,19 +1771,19 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
* @author zhaji
* @param page 分页数据
* @param param 查询参数
* @return {@link IPage< InsuranceRefundHandlingListVo>}
* @return {@link IPage< RefundExportListVo >}
*/
@Override
public IPage<InsuranceRefundHandlingListVo> getInsuranceRefundHandlingPageList(Page<InsuranceRefundHandlingParam> page, InsuranceRefundHandlingParam param) {
public IPage<RefundExportListVo> getInsuranceRefundHandlingPageList(Page<InsuranceRefundHandlingParam> page, InsuranceRefundHandlingParam param) {
IPage<InsuranceRefundHandlingListVo> insuranceRefundHandlingPageList = this.baseMapper.getInsuranceRefundHandlingPageList(page, param);
IPage<RefundExportListVo> insuranceRefundHandlingPageList = this.baseMapper.getInsuranceRefundHandlingPageList(page, param);
if (CollectionUtils.isNotEmpty(insuranceRefundHandlingPageList.getRecords())){
//根据项目编码获取项目名称
List<String> collect = insuranceRefundHandlingPageList.getRecords().stream().map(e -> e.getDeptNo()).distinct().collect(Collectors.toList());
R<SetInfoVo> setInfoByCodes = archivesDaprUtil.getSetInfoByCodes(collect);
if (null != setInfoByCodes && setInfoByCodes.getCode() == CommonConstants.SUCCESS && Common.isNotNull(setInfoByCodes.getData())) {
Map<String, ProjectSetInfoVo> data = setInfoByCodes.getData().getProjectSetInfoVoMap();
for (InsuranceRefundHandlingListVo record : insuranceRefundHandlingPageList.getRecords()) {
for (RefundExportListVo record : insuranceRefundHandlingPageList.getRecords()) {
ProjectSetInfoVo jsonObject = data.get(record.getDeptNo());
if (null != jsonObject){
record.setProjectName(Optional.ofNullable(jsonObject.getDepartName()).orElse(""));
......@@ -1800,44 +1800,65 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
*
* @author zhaji
* @param param 查询参数
* @return {@link List< InsuranceRefundHandlingListVo>}
* @return {@link List< RefundExportListVo >}
*/
@Override
@Transactional(rollbackFor = Exception.class)
public List<InsuranceRefundHandlingListVo> getInsuranceRefundHandlingList(InsuranceRefundOperationParam param) {
Integer operationType = param.getOperationType();
public List<RefundExportListVo> getInsuranceRefundHandlingList(RefundExportListParam param){
YifuUser user = SecurityUtils.getUser();
List<InsuranceRefundHandlingListVo> insuranceRefundHandlingList = new ArrayList<>();
//如果是导出类型的则查询列表并返回
if(CommonConstants.ONE_INT ==operationType){
InsuranceRefundHandlingParam insuranceRefundHandlingParam = param.getParam();
insuranceRefundHandlingList = this.baseMapper.getInsuranceRefundHandlingList(insuranceRefundHandlingParam);
if (CollectionUtils.isNotEmpty(insuranceRefundHandlingList)){
List<RefundExportListVo> refundExportList;
//todo 根据登录人获取数据权限
//如勾选项不为空,则导出勾选记录;否则导出当前筛选条件下 && 「待减员」的结果集
if (CollectionUtils.isNotEmpty(param.getIdList())){
refundExportList = baseMapper.getRefundExportListBySelect(param.getIdList());
}else {
refundExportList = baseMapper.getRefundExportList(param);
}
if (CollectionUtils.isNotEmpty(refundExportList)){
List<TInsuranceDetail> detailList = new ArrayList<>();
List<TInsuranceRefund> refundList = new ArrayList<>();
//根据项目编码获取项目名称
List<String> collect = insuranceRefundHandlingList.stream().map(e -> e.getDeptNo()).distinct().collect(Collectors.toList());
List<String> collect = refundExportList.stream().map(e -> e.getDeptNo()).distinct().collect(Collectors.toList());
R<SetInfoVo> setInfoByCodes = archivesDaprUtil.getSetInfoByCodes(collect);
if (null != setInfoByCodes && setInfoByCodes.getCode() == CommonConstants.SUCCESS && Common.isNotNull(setInfoByCodes.getData())) {
Map<String, ProjectSetInfoVo> data = setInfoByCodes.getData().getProjectSetInfoVoMap();
for (InsuranceRefundHandlingListVo record : insuranceRefundHandlingList) {
for (RefundExportListVo record : refundExportList) {
ProjectSetInfoVo jsonObject = data.get(record.getDeptNo());
if (null != jsonObject){
record.setProjectName(Optional.ofNullable(jsonObject.getDepartName()).orElse(""));
}
TInsuranceDetail detail = new TInsuranceDetail();
TInsuranceRefund refund = new TInsuranceRefund();
detail.setId(record.getId());
//update状态由「待减员」置为「减员中」
detail.setReduceHandleStatus(CommonConstants.TWO_INT);
detail.setUpdateBy(user.getId());
detail.setUpdateTime(LocalDateTime.now());
detailList.add(detail);
refund.setInsDetailId(record.getId());
refund.setReduceHandleStatus(CommonConstants.TWO_INT);
refund.setCreateBy(user.getId());
refund.setCreateTime(LocalDateTime.now());
refundList.add(refund);
}
}
//批量更新
if (CollectionUtils.isNotEmpty(detailList)){
this.saveOrUpdateBatch(detailList);
}
//批量更新
if (CollectionUtils.isNotEmpty(refundList)){
for (TInsuranceRefund refund : refundList) {
tInsuranceRefundService.updateByInsDetailId(refund);
}
}else{
insuranceRefundHandlingList = param.getInsuranceRefundHandlingList();
}
for (InsuranceRefundHandlingListVo insuranceRefund : insuranceRefundHandlingList) {
LambdaUpdateWrapper<TInsuranceDetail> updateWrapper = new LambdaUpdateWrapper<>();
updateWrapper.eq(TInsuranceDetail :: getId,insuranceRefund.getId())
.set(TInsuranceDetail :: getReduceHandleStatus,CommonConstants.TWO_INT)
.set(TInsuranceDetail ::getUpdateTime,LocalDateTime.now())
.set(TInsuranceDetail ::getUpdateBy,user.getId());
update(updateWrapper);
//操作记录
addOperate(detailList,user,InsurancesConstants.REFUND_EXPORT);
}
return insuranceRefundHandlingList;
return refundExportList;
}
/**
......
......@@ -15,4 +15,13 @@ import org.springframework.stereotype.Service;
public class TInsuranceRefundServiceImpl extends ServiceImpl<TInsuranceRefundMapper, TInsuranceRefund>
implements TInsuranceRefundService {
@Override
public TInsuranceRefund getByInsDetailId(String id) {
return this.baseMapper.getByInsDetailId(id);
}
@Override
public void updateByInsDetailId(TInsuranceRefund insuranceRefund) {
this.baseMapper.updateByInsDetailId(insuranceRefund);
}
}
......@@ -50,7 +50,7 @@ public class TInsuranceTypeServiceImpl extends ServiceImpl<TInsuranceTypeMapper,
* @return {@link IPage< TInsuranceType>}
*/
@Override
public IPage<InsuranceTypeVo> pageDiy(Page page, TInsuranceType insuranceType) {
public IPage<InsuranceTypeVo> pageDiy(Page<TInsuranceType> page, TInsuranceType insuranceType) {
return this.baseMapper.selectInsuranceTypePage(page,insuranceType);
}
......
......@@ -257,6 +257,7 @@
</select>
<!-- ***********************减员办理******************************** -->
<!-- 已投保列表分页查询-->
<select id="getInsuredListPage" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuredListVo">
select
detail.id as id,
......@@ -322,7 +323,7 @@
</if>
ORDER BY detail.CREATE_TIME DESC
</select>
<!-- 已投保列表不分页查询-->
<select id="getInsuredList" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuredListVo">
select
detail.id as id,
......@@ -400,6 +401,7 @@
</if>
ORDER BY detail.CREATE_TIME DESC
</select>
<!-- 已减员列表分页查询-->
<select id="getInsuranceRefundPageList" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceRefundListVo">
select
detail.id as id,
......@@ -451,6 +453,7 @@
</if>
ORDER BY refund.CREATE_TIME DESC
</select>
<!-- 已减员列表不分页查询-->
<select id="getInsuranceRefundList" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceRefundListVo">
select
detail.id as id,
......@@ -510,8 +513,10 @@
</if>
ORDER BY refund.CREATE_TIME DESC
</select>
<select id="getInsuranceRefundHandlingPageList" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceRefundHandlingListVo">
<!-- 减员办理列表分页查询-->
<select id="getInsuranceRefundHandlingPageList" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.RefundExportListVo">
select
DISTINCT
detail.id as id,
detail.EMP_NAME as empName,
detail.EMP_IDCARD_NO as empIdcardNo,
......@@ -529,7 +534,7 @@
detail.BUY_STANDARD as buyStandard,
detail.MEDICAL_QUOTA as medicalQuota,
detail.DIE_DISABLE_QUOTA as dieDisableQuota,
detail.CREATE_NAME as createName,
refund.CREATE_NAME as createName,
detail.REDUCE_HANDLE_STATUS as reduceHandleStatus
from
t_insurance_detail detail,
......@@ -547,8 +552,8 @@
<if test="param.deptNo != null and param.deptNo.trim() != ''">
and detail.DEPT_NO like concat('%',replace(replace(#{param.deptNo},'_','\_'),'%','\%'),'%')
</if>
<if test="param.reduceHandleStatus != null and param.reduceHandleStatus.trim() != ''">
and detail.REDUCE_HANDLE_STATUS like concat('%',replace(replace(#{param.reduceHandleStatus},'_','\_'),'%','\%'),'%')
<if test="param.reduceHandleStatus != null">
and detail.REDUCE_HANDLE_STATUS = #{param.reduceHandleStatus}
</if>
<if test="param.isOverdue != null">
and detail.IS_OVERDUE like concat('%',replace(replace(#{param.isOverdue},'_','\_'),'%','\%'),'%')
......@@ -558,8 +563,10 @@
</if>
ORDER BY refund.CREATE_TIME DESC
</select>
<select id="getInsuranceRefundHandlingList" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceRefundHandlingListVo">
<!-- 减员办理列表不分页查询-->
<select id="getInsuranceRefundHandlingList" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.RefundExportListVo">
select
DISTINCT
detail.id as id,
detail.DEPT_NO as deptNo,
detail.EMP_NAME as empName,
......@@ -579,13 +586,17 @@
detail.DIE_DISABLE_QUOTA as dieDisableQuota,
detail.SETTLE_TYPE as settleType,
detail.SETTLE_MONTH as settleMonth,
detail.CREATE_NAME as createName,
detail.REMARK as remark
refund.CREATE_NAME as createName,
detail.REMARK as remark,
detail.REDUCE_HANDLE_STATUS as reduceHandleStatus
from
t_insurance_detail detail
t_insurance_detail detail,
t_insurance_refund refund
where
detail.DELETE_FLAG = 0
and
detail.ID = refund.INS_DETAIL_ID
and
detail.REDUCE_HANDLE_STATUS = 1
<if test="param.empName != null and param.empName.trim() != ''">
and detail.EMP_NAME like concat('%',replace(replace(#{param.empName},'_','\_'),'%','\%'),'%')
......@@ -596,8 +607,8 @@
<if test="param.deptNo != null and param.deptNo.trim() != ''">
and detail.DEPT_NO like concat('%',replace(replace(#{param.deptNo},'_','\_'),'%','\%'),'%')
</if>
<if test="param.reduceHandleStatus != null and param.reduceHandleStatus.trim() != ''">
and detail.REDUCE_HANDLE_STATUS like concat('%',replace(replace(#{param.reduceHandleStatus},'_','\_'),'%','\%'),'%')
<if test="param.reduceHandleStatus != null ">
and detail.REDUCE_HANDLE_STATUS = #{param.reduceHandleStatus}
</if>
<if test="param.isOverdue != null ">
and detail.IS_OVERDUE like concat('%',replace(replace(#{param.isOverdue},'_','\_'),'%','\%'),'%')
......@@ -607,6 +618,7 @@
</if>
ORDER BY detail.REFUND_CREATE_TIME DESC
</select>
<!-- 查询保单列表-->
<select id="selectDetailListByIds"
resultType="com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail">
select
......@@ -619,6 +631,7 @@
#{item}
</foreach>
</select>
<!-- 查询保单减员退费信息-->
<select id="selectRefundDetail" resultType="com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceRefundDetail">
select
detail.DEPT_NO as deptNo,
......@@ -648,6 +661,82 @@
and detail.POLICY_NO = #{param.policyNo}
</if>
</select>
<!-- 已投保列表分页查询-->
<select id="getRefundExportListBySelect" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.RefundExportListVo">
select
detail.id as id,
detail.DEPT_NO as deptNo,
detail.EMP_NAME as empName,
detail.EMP_IDCARD_NO as empIdcardNo,
detail.BUY_TYPE as buyType,
detail.POST as post,
detail.INSURANCE_PROVINCE_NAME as insuranceProvinceName,
detail.INSURANCE_CITY_NAME as insuranceCityName,
detail.INSURANCE_HANDLE_PROVINCE_NAME as insuranceHandleProvinceName,
detail.INSURANCE_HANDLE_CITY_NAME as insuranceHandleCityName,
detail.POLICY_START as policyStart,
detail.POLICY_END as policyEnd,
detail.INSURANCE_COMPANY_NAME as insuranceCompanyName,
detail.INSURANCE_TYPE_NAME as insuranceTypeName,
detail.BUY_STANDARD as buyStandard,
detail.MEDICAL_QUOTA as medicalQuota,
detail.DIE_DISABLE_QUOTA as dieDisableQuota,
detail.SETTLE_MONTH as settleMonth,
detail.SETTLE_TYPE as settleType,
detail.CREATE_NAME as createName,
detail.REMARK as remark
from
t_insurance_detail detail
where
detail.id in
<foreach collection="idList" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
ORDER BY detail.CREATE_TIME DESC
</select>
<!-- 已投保列表分页查询-->
<select id="getRefundExportList" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.RefundExportListVo">
select
detail.id as id,
detail.DEPT_NO as deptNo,
detail.EMP_NAME as empName,
detail.EMP_IDCARD_NO as empIdcardNo,
detail.BUY_TYPE as buyType,
detail.POST as post,
detail.INSURANCE_PROVINCE_NAME as insuranceProvinceName,
detail.INSURANCE_CITY_NAME as insuranceCityName,
detail.INSURANCE_HANDLE_PROVINCE_NAME as insuranceHandleProvinceName,
detail.INSURANCE_HANDLE_CITY_NAME as insuranceHandleCityName,
detail.POLICY_START as policyStart,
detail.POLICY_END as policyEnd,
detail.INSURANCE_COMPANY_NAME as insuranceCompanyName,
detail.INSURANCE_TYPE_NAME as insuranceTypeName,
detail.BUY_STANDARD as buyStandard,
detail.MEDICAL_QUOTA as medicalQuota,
detail.DIE_DISABLE_QUOTA as dieDisableQuota,
detail.SETTLE_MONTH as settleMonth,
detail.SETTLE_TYPE as settleType,
detail.CREATE_NAME as createName,
detail.REMARK as remark
from
t_insurance_detail detail
where
detail.DELETE_FLAG = 0 and detail.REDUCE_HANDLE_STATUS = 1
<if test="param.empName != null and param.empName.trim() != ''">
and detail.EMP_NAME like concat('%',replace(replace(#{param.empName},'_','\_'),'%','\%'),'%')
</if>
<if test="param.empIdcardNo != null and param.empIdcardNo.trim() != ''">
and detail.EMP_IDCARD_NO like concat('%',replace(replace(#{param.empIdcardNo},'_','\_'),'%','\%'),'%')
</if>
<if test="param.deptNo != null and param.deptNo.trim() != ''">
and detail.DEPT_NO like concat('%',replace(replace(#{param.deptNo},'_','\_'),'%','\%'),'%')
</if>
<if test="param.insuranceCompanyName != null and param.insuranceCompanyName.trim() != ''">
and detail.INSURANCE_COMPANY_NAME like concat('%',replace(replace(#{param.insuranceCompanyName},'_','\_'),'%','\%'),'%')
</if>
ORDER BY detail.CREATE_TIME DESC
</select>
<!-- 已投保列表分页查询-->
<update id="updateInsuranceRefund">
update
t_insurance_detail detail
......@@ -661,6 +750,4 @@
#{item}
</foreach>
</update>
</mapper>
......@@ -8,9 +8,6 @@
<id property="id" column="ID" jdbcType="BIGINT"/>
<result property="insDetailId" column="INS_DETAIL_ID" jdbcType="BIGINT"/>
<result property="reduceHandleStatus" column="REDUCE_HANDLE_STATUS" jdbcType="TINYINT"/>
<result property="empName" column="EMP_NAME" jdbcType="VARCHAR"/>
<result property="empIdcardNo" column="EMP_IDCARD_NO" jdbcType="VARCHAR"/>
<result property="policyNo" column="POLICY_NO" jdbcType="VARCHAR"/>
<result property="refundMoney" column="REFUND_MONEY" jdbcType="DECIMAL"/>
<result property="remark" column="REMARK" jdbcType="VARCHAR"/>
<result property="createTime" column="CREATE_TIME" jdbcType="TIMESTAMP"/>
......@@ -21,6 +18,19 @@
<sql id="Base_Column_List">
ID,INS_DETAIL_ID,REDUCE_HANDLE_STATUS,
REFUND_MONEY,REMARK,CREATE_TIME,
CREATE_BY,CREATE_NAME,EMP_NAME,EMP_IDCARD_NO,POLICY_NO
CREATE_BY,CREATE_NAME
</sql>
<update id="updateByInsDetailId">
update
t_insurance_refund
set
REDUCE_HANDLE_STATUS = #{reduceHandleStatus},
UPDATE_BY = #{createBy},
UPDATE_TIME = #{createTime}
where
INS_DETAIL_ID = #{insDetailId}
</update>
<select id="getByInsDetailId" resultType="com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceRefund">
</select>
</mapper>
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