Commit 9791b4a6 authored by fangxinjiang's avatar fangxinjiang

Merge remote-tracking branch 'origin/develop' into develop

parents a1245590 9f4ecdfc
......@@ -172,18 +172,22 @@ public class FddContractAttachInfoController {
} else {
if (null != util1.getEntityList()) {
List<ErrorMessage> errorInfo = fddContractAttachInfoService.batchAdd(util1.getEntityList());
Map<String,Object> variableMap = new HashMap<>();
Map<Integer,Object> map = new HashMap<>();
boolean allExitContract = errorInfo.stream().allMatch(e-> checkInfo(e));
if (allExitContract) {
variableMap.put("allMatch","true");
for (ErrorMessage errorMessage :errorInfo){
map.put(errorMessage.getLineNum(),util1.getEntityList().get(errorMessage.getLineNum()-2));
if (errorInfo.size() > CommonConstants.ZERO_INT) {
Map<String, Object> variableMap = new HashMap<>();
Map<Integer, Object> map = new HashMap<>();
boolean allExitContract = errorInfo.stream().allMatch(e -> e.getMessage().equals("存在“在用”的合同"));
if (allExitContract) {
variableMap.put("allMatch", "true");
for (ErrorMessage errorMessage : errorInfo) {
map.put(errorMessage.getLineNum(), util1.getEntityList().get(errorMessage.getLineNum() - 2));
}
variableMap.put("data", map);
return R.ok(variableMap, "存在“在用”的合同");
}
variableMap.put("data",map);
return R.ok(variableMap);
return R.failed(errorInfo);
} else {
return R.ok(null,"保存成功");
}
return new R<>(CommonConstants.dingleDigitIntArray[1], "", errorInfo);
} else {
return R.ok(null,"无数据可导入");
}
......@@ -271,11 +275,9 @@ public class FddContractAttachInfoController {
return R.failed("数据为空!");
}
List<ErrorMessage> errorInfo = fddContractAttachInfoService.sendTask(entityList);
return R.ok(errorInfo);
}
public boolean checkInfo(ErrorMessage errorMessage) {
Set<String> set = errorMessage.getErrors();
return set.stream().allMatch(e-> e.equals("存在“在用”的合同"));
if (errorInfo.size() > CommonConstants.ZERO_INT) {
return R.failed(errorInfo);
}
return R.ok(null,"保存成功");
}
}
......@@ -147,6 +147,7 @@ public class FddController {
@Operation(summary = "异步通知", description = "异步通知")
@RequestMapping(value = "/notifyUrl")
public R<String> notifyUrl(HttpServletRequest request, HttpServletResponse response) throws Exception {
YifuUser user = SecurityUtils.getUser();
checkSign(request);
String fddEvent = request.getHeader(FDD_EVENT);
String fddBizContent = request.getParameter(FDD_BIZ_CONTENT);
......@@ -159,7 +160,6 @@ public class FddController {
if (StringUtils.equals(CommonConstants.TWO_STRING, jsonObject.getString("status"))) {
//成功
FddPersonAccount entity = fddPersonAccountService.getById(clientId);
YifuUser user = SecurityUtils.getUser();
if (entity != null) {
entity.setRealStatus(CommonConstants.ONE_STRING);
entity.setUnionid(unionId);
......@@ -221,7 +221,7 @@ public class FddController {
e.printStackTrace();
}
});
return R.ok(null,"success");
return R.ok(null,"成功");
}
}
} else if (StringUtils.equals(fddEvent, "sign")) {
......@@ -254,7 +254,7 @@ public class FddController {
// 2021-3-15 16:24 hgw 全部签名成功,更新合同的状态:
if (CommonConstants.TWO_STRING.equals(fddContractInfo.getSendSignStatus())
&& CommonConstants.TWO_STRING.equals(fddContractInfo.getReceiveSignStatus())) {
fddContractAttachInfoService.saveEmpAndAttarch(fddContractInfo);
fddContractAttachInfoService.saveEmpAndAttarch(fddContractInfo,user);
TEmployeeContractInfo ec = employeeContractInfoService.getById(fddContractInfo.getContractId());
// 如果合同的状态是待电子签,则变更为已电子签
......@@ -263,7 +263,7 @@ public class FddController {
employeeContractInfoService.updateById(ec);
}
}
return R.ok(null,"success");
return R.ok(null,"成功");
}else if (StringUtils.equals(fddEvent, "notifyUrlVerify")) {
return R.ok(null,"success");
}
......
......@@ -25,8 +25,8 @@ import com.yifu.cloud.plus.v1.yifu.archives.entity.FddContractAttachInfo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.FddContractInfo;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import java.io.InputStream;
import java.util.List;
/**
......@@ -53,7 +53,7 @@ public interface FddContractAttachInfoService extends IService<FddContractAttach
List<ErrorMessage> sendTask(List<FddContractAttachInfo> entityList);
R<String> saveEmpAndAttarch(FddContractInfo fddContractInfo);
R<String> saveEmpAndAttarch(FddContractInfo fddContractInfo, YifuUser user);
List<ErrorMessage> batchAdd(List<FddContractAttachInfo> entityList);
......
......@@ -18,6 +18,7 @@
package com.yifu.cloud.plus.v1.yifu.archives.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.archives.entity.FddContractAttachInfo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeLog;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
......@@ -54,4 +55,17 @@ public interface TEmployeeLogService extends IService<TEmployeeLog> {
* @return
**/
<T> TEmployeeLog saveModificationRecord(Integer type, String empId, String projectId, T oldInfo, T newInfo, YifuUser user);
/**
* 生成修改记录
* @Author pwang
* @Date 2022-06-22 11:32
* @param type 类型:0人员档案;1项目档案;2人员和项目档案;3员工合同更新
* @param empId 档案id
* @param projectId 项目id
* @param oldInfo
* @param newInfo
* @return
**/
<T> TEmployeeLog saveModificationRecord(Integer type, String empId, String projectId, T oldInfo, T newInfo, FddContractAttachInfo fddContractAttachInfo);
}
......@@ -74,6 +74,7 @@ import java.io.IOException;
import java.io.InputStream;
import java.net.URLEncoder;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.ZoneId;
import java.time.ZonedDateTime;
import java.util.*;
......@@ -118,9 +119,16 @@ public class FddContractInfoServiceImpl extends ServiceImpl<FddContractInfoMappe
private OSSUtil ossUtil;
@Autowired
private TSettleDomainService tSettleDomainService;
@Autowired
private TAttaInfoService tAttaInfoService;
@Override
public R<String> saveEmpContract(FddContractAttachInfo fddContractAttachInfo,YifuUser user) throws ApiException {
long haveFddConCount = this.count(Wrappers.<FddContractInfo>query().lambda().eq(FddContractInfo::getContractId, fddContractAttachInfo.getContractId())
.eq(FddContractInfo::getDeleteFlag, CommonConstants.ZERO_STRING));
if (haveFddConCount > CommonConstants.ZERO_INT) {
return R.failed("已存在法大大电子合同");
}
if (!user.getId().equals(fddContractAttachInfo.getCreateBy())) {
return R.failed("当前用户不是电子合同导入用户,不能操作");
}
......@@ -576,17 +584,25 @@ public class FddContractInfoServiceImpl extends ServiceImpl<FddContractInfoMappe
String key = name + ".zip";
ossUtil.uploadFileByStream(bis, key, null);
// 1:保存为
// TEmpAtta empAtta = BasicServiceUtil.initTEmpAttaForInsert(name, key, (long) rspData.getFileBytes().length);
// empAttaService.save(empAtta);
// MEmpContractAtta contractAtta = new MEmpContractAtta();
// contractAtta.setAttaId(empAtta.getId());
// contractAtta.setContractId(employeeContractInfo.getId());
// mempContractAttaService.save(contractAtta);
TAttaInfo attaInfo = initUnitAttaForInsert(name, key, (long)rspData.getFileBytes().length);
attaInfo.setRelationType(CommonConstants.FOUR_STRING);
attaInfo.setDomainId(entity.getContractId());
tAttaInfoService.save(attaInfo);
FddContractAttachInfo fddContractAttachInfo = fddContractAttachInfoMapper.selectOne(Wrappers.<FddContractAttachInfo>query().lambda()
.eq(FddContractAttachInfo::getContractId,entity.getContractId()).last(CommonConstants.LAST_ONE_SQL));
if (fddContractAttachInfo != null) {
fddContractAttachInfo.setIsMove(CommonConstants.ONE_INT);
fddContractAttachInfoMapper.updateById(fddContractAttachInfo);
TEmployeeContractInfo tEmployeeContractInfo = employeeContractInfoService.getOne(Wrappers.<TEmployeeContractInfo>query().lambda()
.eq(TEmployeeContractInfo::getId,fddContractAttachInfo.getContractId())
.eq(TEmployeeContractInfo::getDeleteFlag,CommonConstants.ZERO_STRING)
.eq(TEmployeeContractInfo::getInUse,CommonConstants.ZERO_STRING)
.last(CommonConstants.LAST_ONE_SQL));
tEmployeeContractInfo.setIsFile(CommonConstants.ZERO_STRING);
employeeContractInfoService.updateById(tEmployeeContractInfo);
}
return R.ok();
} finally {
......@@ -921,4 +937,24 @@ public class FddContractInfoServiceImpl extends ServiceImpl<FddContractInfoMappe
return R.failed(rsp.getMsg());
}
}
/**
* 对象初始化
* @param fileName
* @param key
* @param fileSize
* @return
*/
private TAttaInfo initUnitAttaForInsert(String fileName, String key, long fileSize) {
TAttaInfo unitAtta = new TAttaInfo();
char point = '.';
unitAtta.setAttaName(fileName);
unitAtta.setAttaSize(fileSize);
unitAtta.setAttaSrc(key);
if (key.lastIndexOf(point) >= 0) {
unitAtta.setAttaType(key.substring(key.lastIndexOf(point)));
}
unitAtta.setCreateTime(LocalDateTime.now());
return unitAtta;
}
}
......@@ -437,7 +437,7 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
tEmployeeProjectService.updateById(tEmployeeProject);
}
// 更新档案、项目合同状态为(1在用)
TEmployeeInfo tEmployeeInfo = tEmployeeInfoService.getById(tEmployeeContractInfo.getEmpId());
TEmployeeInfo tEmployeeInfo = tEmployeeInfoService.getById(contractInfo.getEmpId());
if (tEmployeeInfo != null) {
tEmployeeInfo.setContractStatus(CommonConstants.ONE_INT);
tEmployeeInfoService.updateById(tEmployeeInfo);
......@@ -457,7 +457,7 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
}
// 更新档案、项目合同状态为(0无合同 1在用 2不在用)
TEmployeeInfo tEmployeeInfo = tEmployeeInfoService.getById(tEmployeeContractInfo.getEmpId());
TEmployeeInfo tEmployeeInfo = tEmployeeInfoService.getById(contractInfo.getEmpId());
if (tEmployeeInfo != null) {
// 判断人员有无审核通过的其他合同
TEmployeeContractInfo contractInfoInUse = this.getOne(Wrappers.<TEmployeeContractInfo>query()
......
......@@ -19,6 +19,7 @@ package com.yifu.cloud.plus.v1.yifu.archives.service.impl;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.serializer.SerializerFeature;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.yifu.archives.entity.FddContractAttachInfo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeLog;
import com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmployeeLogMapper;
import com.yifu.cloud.plus.v1.yifu.archives.service.TEmployeeLogService;
......@@ -94,6 +95,36 @@ public class TEmployeeLogServiceImpl extends ServiceImpl<TEmployeeLogMapper, TEm
return null;
}
@Override
public <T> TEmployeeLog saveModificationRecord(Integer type, String empId, String projectId, T oldInfo, T newInfo, FddContractAttachInfo fddContractAttachInfo) {
try{
//比较记录不影响业务逻辑,用try套住
//比较差异
String differenceKey = HrEquator.comparisonValue(oldInfo, newInfo);
//如果有差异保存差异
if(!Common.isEmpty(differenceKey)){
TEmployeeLog employeeLog = new TEmployeeLog();
employeeLog.setProjectId(projectId);
employeeLog.setType(type);
employeeLog.setEmpId(empId);
employeeLog.setCreateTime(LocalDateTime.now());
if (Common.isNotNull(fddContractAttachInfo)) {
employeeLog.setCreateBy(fddContractAttachInfo.getCreateBy());
employeeLog.setCreateName(fddContractAttachInfo.getCreateName());
employeeLog.setUpdateBy(fddContractAttachInfo.getUpdateBy());
}
employeeLog.setOldInfo(JSON.toJSONString(oldInfo,features));
employeeLog.setNewInfo(JSON.toJSONString(newInfo,features));
employeeLog.setDifferenceInfo(differenceKey);
baseMapper.insert(employeeLog);
return employeeLog;
}
}catch (Exception e){
log.error(JSON.toJSON(oldInfo)+"插入修改记录报错>>>",e);
}
return null;
}
private SerializerFeature[] features = new SerializerFeature[] {
WriteMapNullValue, WriteNullNumberAsZero, WriteNullListAsEmpty,
WriteNullStringAsEmpty,WriteDateUseDateFormat
......
package com.yifu.cloud.plus.v1.yifu.archives.utils;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.yifu.cloud.plus.v1.yifu.archives.entity.FddContractAttachInfo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeInfo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeProject;
import com.yifu.cloud.plus.v1.yifu.archives.service.TEmployeeInfoService;
......@@ -77,4 +78,44 @@ public class DoJointTask {
log.info("档案-批量更新人员档案结束");
}
/**
* @Description: 合同-批量更换负责人
* @Author: huyc
* @Date: 2022-7-8
* @return: void
**/
@Async
public void updateFddEmployeeInfo(List<TEmployeeInfo> tEmployeeInfoList, FddContractAttachInfo fddContractAttachInfo) {
log.info("法大大档案-批量更新人员档案-线程开始");
try {
for(TEmployeeInfo tEmployeeInfo:tEmployeeInfoList) {
TEmployeeInfo tEmployeeInfoOld = tEmployeeInfoService.getById(tEmployeeInfo.getId());
//查询该人员所有的项目档案
List<TEmployeeProject> list = tEmployeeProjectService.list(Wrappers.<TEmployeeProject>query().lambda()
.eq(TEmployeeProject::getEmpIdcard, tEmployeeInfo.getEmpIdcard())
.eq(TEmployeeProject::getDeleteFlag, CommonConstants.STATUS_NORMAL)
.eq(TEmployeeProject::getProjectStatus, CommonConstants.ZERO_INT));
if (Common.isNotNull(list)) {
Set<String> empNatrue = list.stream().map(TEmployeeProject::getEmpNatrue).collect(Collectors.toSet());
if (empNatrue.stream().anyMatch(e -> e.equals(CommonConstants.ZERO_STRING))) {
tEmployeeInfo.setEmpNatrue(CommonConstants.ZERO_STRING);
} else if (empNatrue.stream().anyMatch(e -> e.equals(CommonConstants.ONE_STRING))) {
tEmployeeInfo.setEmpNatrue(CommonConstants.ONE_STRING);
} else {
tEmployeeInfo.setEmpNatrue(CommonConstants.TWO_STRING);
}
tEmployeeInfo.setProjectNum(list.size());
} else {
tEmployeeInfo.setProjectNum(CommonConstants.ZERO_INT);
}
tEmployeeInfoService.updateById(tEmployeeInfo);
tEmployeeLogService.saveModificationRecord(CommonConstants.dingleDigitIntArray[0]
, tEmployeeInfo.getId(), "", tEmployeeInfoOld, tEmployeeInfo,fddContractAttachInfo);
}
} catch (Exception e) {
log.error("法大大档案-批量更新人员档案错误", e);
}
log.info("法大大档案-批量更新人员档案结束");
}
}
......@@ -119,6 +119,6 @@
1=1
<include refid="fddPersonAccount_where"/>
</where>
GROUP BY a.ID_CARD ORDER BY a.CREATE_TIME desc
GROUP BY a.ID_CARD,a.MOBLIE ORDER BY a.CREATE_TIME desc
</select>
</mapper>
......@@ -124,6 +124,8 @@ public interface CommonConstants {
String FOUR_STRING = "4";
String FIVE_STRING = "5";
/**
* number 0
*/
......
package com.yifu.cloud.plus.v1.yifu.common.core.util;
import com.alibaba.fastjson.JSONObject;
import com.google.common.collect.Lists;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CacheConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
......@@ -950,4 +951,23 @@ public class ExcelUtil <T> implements Serializable {
this.setErrorInfo(errorList);
this.setErrorMessageHashMap(errorMessageHashMap);
}
/**
* @param clazz
* @Author: wangan
* @Date: 2020/9/28
* @Description: 获取导出中文字段
* @return: com.yifu.cloud.v1.common.core.util.R
**/
public static R<List<String>> getExportfieldsName(Class<?> clazz){
ArrayList<String> exportfieldsName = Lists.newArrayList();
Field[] fields = clazz.getDeclaredFields();
for (Field field : fields) {
ExcelAttribute annotation = field.getAnnotation(ExcelAttribute.class);
if (annotation != null && Common.isNotNull(annotation.name()) && annotation.needExport()) {
exportfieldsName.add(annotation.name());
}
}
return R.ok(exportfieldsName,"成功");
}
}
......@@ -27,6 +27,10 @@ public class InsurancesConstants {
* 非投保退回状态,无法删除
*/
public static final String DELETE_ERROR = "非投保退回状态,无法删除";
/**
* 不允许编辑
*/
public static final String EDIT_NOT_ALLOW = "不允许编辑";
/**
* 投保信息已存在
*/
......
package com.yifu.cloud.plus.v1.yifu.insurances.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
......@@ -26,24 +28,29 @@ public class TInsuranceCompany extends BaseEntity {
/**
* 保险公司id
*/
@Schema(description = "保险公司id")
@TableId(type = IdType.ASSIGN_ID)
private String id;
/**
* 保险公司名称
*/
@NotBlank(message = "保险公司名称不能为空")
@Schema(description = "保险公司名称")
private String companyName;
/**
* 保险公司地址
*/
@NotBlank(message = "保险公司地址不能为空")
@Schema(description = "保险公司地址")
private String companyAddress;
/**
* 对接人
*/
@NotBlank(message = "对接人不能为空")
@Schema(description = "对接人")
private String companyDocking;
/**
......@@ -51,6 +58,7 @@ public class TInsuranceCompany extends BaseEntity {
*/
@NotBlank(message = "计费方式不能为空")
@StringVal({"0","1"})
@Schema(description = "计费方式")
private String billingType;
/**
......
......@@ -5,7 +5,6 @@ import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
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;
import lombok.EqualsAndHashCode;
import java.math.BigDecimal;
......@@ -21,7 +20,7 @@ import java.time.LocalDateTime;
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("t_insurance_detail")
@Tag(name = "商险明细表")
@Schema(description = "商险明细表")
public class TInsuranceDetail extends BaseEntity {
/**
* 主键
......
......@@ -3,7 +3,6 @@ package com.yifu.cloud.plus.v1.yifu.insurances.entity;
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.Data;
import java.io.Serializable;
......@@ -16,7 +15,7 @@ import java.time.LocalDateTime;
*/
@Data
@TableName("t_insurance_replace")
@Tag(name = "商险替换表")
@Schema(description = "商险替换表")
public class TInsuranceReplace implements Serializable {
private static final long serialVersionUID = -8528017421473755436L;
......
package com.yifu.cloud.plus.v1.yifu.insurances.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
......@@ -23,36 +25,43 @@ public class TInsuranceType extends BaseEntity {
/**
* 险种id
*/
@Schema(description = "险种id")
@TableId(type = IdType.ASSIGN_ID)
private Long id;
/**
* 险种名称
*/
@NotBlank(message = "险种名称不能为空")
@Schema(description = "险种名称")
private String name;
/**
* 保险公司主键ID
*/
@NotBlank(message = "所属保险公司不能为空")
@Schema(description = "保险公司主键ID")
private String insuranceCompanyId;
/**
* 收款单位名称
*/
@NotBlank(message = "收款单位名称不能为空")
@Schema(description = "收款单位名称")
private String receiptUnitName;
/**
* 收款银行名称
*/
@NotBlank(message = "收款银行名称不能为空")
@Schema(description = "收款银行名称")
private String bankName;
/**
* 收款银行账号
*/
@NotBlank(message = "收款银行账号不能为空")
@Schema(description = "收款银行账号")
private String bankNo;
/**
......
package com.yifu.cloud.plus.v1.yifu.insurances.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
......@@ -22,24 +24,29 @@ public class TInsuranceTypeRate extends BaseEntity {
/**
* 费率id
*/
@Schema(description = "费率id")
@TableId(type = IdType.ASSIGN_ID)
private String id;
/**
* 险种ID
*/
@NotBlank(message = "所属险种不能为空")
@Schema(description = "险种ID")
private String insuranceTypeId;
/**
* 月数
*/
@NotBlank(message = "月不能为空")
@Schema(description = "月数")
private String month;
/**
* 费率
*/
@NotBlank(message = "费率不能为空")
@Schema(description = "费率")
private String rate;
/**
......
package com.yifu.cloud.plus.v1.yifu.insurances.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
......@@ -7,6 +9,8 @@ import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.Data;
import lombok.EqualsAndHashCode;
import javax.validation.constraints.NotBlank;
/**
* 购买标准表
......@@ -17,29 +21,40 @@ import lombok.EqualsAndHashCode;
@TableName("t_insurance_type_standard")
@Tag(name = "购买标准表")
public class TInsuranceTypeStandard extends BaseEntity {
/**
*
* 购买标准id
*/
@Schema(description = "保险公司id")
@TableId(type = IdType.ASSIGN_ID)
private String id;
/**
* 险种主键ID
*/
@Schema(description = "险种主键ID")
@NotBlank(message = "险种主键ID不能为空")
private Long insuranceTypeId;
/**
* 购买标准
*/
@Schema(description = "购买标准")
@NotBlank(message = "购买标准不能为空")
private String buyStandard;
/**
* 医疗额度
*/
@Schema(description = "医疗额度")
@NotBlank(message = "医疗额度不能为空")
private String medicalQuota;
/**
* 身故或残疾额度
*/
@Schema(description = "身故或残疾额度")
@NotBlank(message = "身故或残疾额度不能为空")
private String dieDisableQuota;
/**
......
......@@ -149,6 +149,11 @@ public class LocalDateUtil {
return flag;
}
//获取指定时间的指定格式
public static String formatTime(LocalDate time, String pattern) {
return time.format(DateTimeFormatter.ofPattern(pattern));
}
public static void main(String[] args) {
System.out.println(isCurrentOrFutureMonth("2023-1"));
}
......
package com.yifu.cloud.plus.v1.yifu.insurances.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.Data;
import java.io.Serializable;
......@@ -11,7 +10,7 @@ import java.io.Serializable;
* @date 2022-07-18 17:03:31
*/
@Data
@Tag(name = "商险办理新增入参")
@Schema(description = "商险办理新增入参")
public class InsuranceAddParam implements Serializable {
private static final long serialVersionUID = -2689686777914935788L;
/**
......
package com.yifu.cloud.plus.v1.yifu.insurances.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.Data;
import java.io.Serializable;
......@@ -13,7 +12,7 @@ import java.time.LocalDate;
* @date 2022-07-20 08:43:31
*/
@Data
@Tag(name = "商险办理批增入参")
@Schema(description = "商险办理批增入参")
public class InsuranceBatchParam implements Serializable {
private static final long serialVersionUID = -2689686777914935788L;
/**
......
......@@ -3,7 +3,6 @@ package com.yifu.cloud.plus.v1.yifu.insurances.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.Data;
import java.io.Serializable;
......@@ -17,7 +16,7 @@ import java.time.LocalDateTime;
* @date 2022-07-20 19:23:17
*/
@Data
@Tag(name = "投保详情VO")
@Schema(description = "投保详情VO")
public class InsuranceDetailVO implements Serializable {
private static final long serialVersionUID = 628032758008497542L;
/**
......@@ -191,24 +190,48 @@ public class InsuranceDetailVO implements Serializable {
@Schema(description = "商险购买地省")
private String insuranceProvinceName;
/**
* 商险购买地省code
*/
@Schema(description = "商险购买地省code")
private Integer insuranceProvince;
/**
* 商险购买地市
*/
@Schema(description = "商险购买地市")
private String insuranceCityName;
/**
* 商险购买地市code
*/
@Schema(description = "商险购买地市code")
private Integer insuranceCity;
/**
* 商险办理省
*/
@Schema(description = "商险办理省")
private String insuranceHandleProvinceName;
/**
* 商险办理省code
*/
@Schema(description = "商险办理省code")
private Integer insuranceHandleProvince;
/**
* 商险办理城市
*/
@Schema(description = "商险办理城市")
private String insuranceHandleCityName;
/**
* 商险办理城市code
*/
@Schema(description = "商险办理城市code")
private Integer insuranceHandleCity;
/**
* 创建人姓名
*/
......
package com.yifu.cloud.plus.v1.yifu.insurances.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;
/**
* @author licancan
* @description 投保编辑入参
* @date 2022-07-21 11:33:30
*/
@Data
@Schema(description = "投保编辑入参")
public class InsuranceEditParam implements Serializable {
private static final long serialVersionUID = -7742645628926325904L;
/**
* 主键
*/
@Schema(description = "主键")
@NotBlank(message = "主键不能为空")
private String id;
/**
* 员工姓名
*/
@Schema(description = "员工姓名")
@Size(max = 20, message = "员工姓名不可超过20位")
@NotBlank(message = "员工姓名不能为空")
private String empName;
/**
* 员工身份证号
*/
@Schema(description = "员工身份证号")
@NotBlank(message = "员工身份证号不能为空")
private String empIdcardNo;
/**
* 保单开始时间
*/
@Schema(description = "保单开始时间")
@NotBlank(message = "保单开始时间不能为空")
private String policyStart;
/**
* 保单结束时间
*/
@Schema(description = "保单结束时间")
@NotBlank(message = "保单结束时间不能为空")
private String policyEnd;
/**
* 岗位
*/
@Schema(description = "岗位")
@NotBlank(message = "岗位不能为空")
private String post;
/**
* 险种名称
*/
@Schema(description = "险种名称")
@NotBlank(message = "险种名称不能为空")
private String insuranceTypeName;
/**
* 保险公司名称
*/
@Schema(description = "保险公司名称")
@NotBlank(message = "保险公司名称不能为空")
private String insuranceCompanyName;
/**
* 购买标准
*/
@Schema(description = "购买标准")
@NotBlank(message = "购买标准不能为空")
private String buyStandard;
/**
* 商险购买地省code
*/
@Schema(description = "商险购买地省code")
@NotNull(message = "商险购买地省ID不能为空")
private Integer insuranceProvince;
/**
* 商险购买地省
*/
@Schema(description = "商险购买地省")
@NotBlank(message = "商险购买地省不能为空")
private String insuranceProvinceName;
/**
* 商险购买地市code
*/
@Schema(description = "商险购买地市code")
@NotNull(message = "商险购买地市ID不能为空")
private Integer insuranceCity;
/**
* 商险购买地市
*/
@Schema(description = "商险购买地市")
@NotBlank(message = "商险购买地市不能为空")
private String insuranceCityName;
/**
* 商险办理省code
*/
@Schema(description = "商险办理省code")
@NotNull(message = "商险办理省ID不能为空")
private Integer insuranceHandleProvince;
/**
* 商险办理省
*/
@Schema(description = "商险办理省")
@NotBlank(message = "商险办理省不能为空")
private String insuranceHandleProvinceName;
/**
* 商险办理城市code
*/
@Schema(description = "商险办理城市code")
@NotNull(message = "商险办理城市ID不能为空")
private Integer insuranceHandleCity;
/**
* 商险办理城市
*/
@Schema(description = "商险办理城市")
@NotBlank(message = "商险办理城市不能为空")
private String insuranceHandleCityName;
/***********************************以下字段由系统算出,前端不用传,是为了方便入库***********************************/
/**
* 医疗额度
*/
private String medicalQuota;
/**
* 身故或残疾额度
*/
private String dieDisableQuota;
/**
* 险种主键
*/
private Long insuranceTypeId;
}
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 licancan
* @description 导出办理请求参数
* @date 2022-07-21 14:21:06
*/
@Data
@Schema(description = "导出办理请求参数")
public class InsuranceExportListParam 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;
/**
* 商险id集合
*/
@Schema(description = "商险id集合")
private List<String> idList;
}
package com.yifu.cloud.plus.v1.yifu.insurances.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.io.Serializable;
import java.time.LocalDate;
/**
* @author licancan
* @description 导出办理VO
* @date 2022-07-21 14:21:39
*/
@Data
@Schema(description = "导出办理VO")
public class InsuranceExportListVO implements Serializable {
private static final long serialVersionUID = -8159190612104775933L;
/**
* 主键
*/
private String id;
/**
* 订单编号
*/
@Schema(description = "订单编号")
private String orderNo;
/**
* 项目名称
*/
@Schema(description = "项目名称")
private String projectName;
/**
* 项目编码
*/
@Schema(description = "项目编码")
private String deptNo;
/**
* 员工姓名
*/
@Schema(description = "员工姓名")
private String empName;
/**
* 员工身份证号
*/
@Schema(description = "员工身份证号")
private String empIdcardNo;
/**
* 投保类型, 1新增、3批增、4替换
*/
@Schema(description = " 投保类型, 1新增、3批增、4替换")
private Integer buyType;
/**
* 投保岗位
*/
@Schema(description = "投保岗位")
private String post;
/**
* 商险购买地省
*/
@Schema(description = "商险购买地省")
private String insuranceProvinceName;
/**
* 商险购买地市
*/
@Schema(description = "商险购买地市")
private String insuranceCityName;
/**
* 商险办理省
*/
@Schema(description = "商险办理省")
private String insuranceHandleProvinceName;
/**
* 商险办理城市
*/
@Schema(description = "商险办理城市")
private String insuranceHandleCityName;
/**
* 保单开始时间
*/
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd")
@Schema(description = "保单开始时间")
private LocalDate policyStart;
/**
* 保单结束时间
*/
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd")
@Schema(description = "保单结束时间")
private LocalDate policyEnd;
/**
* 保险公司名称(冗余字段)
*/
@Schema(description = "保险公司名称")
private String insuranceCompanyName;
/**
* 险种名称
*/
@Schema(description = "险种名称")
private String insuranceTypeName;
/**
* 购买标准
*/
@Schema(description = "购买标准")
private String buyStandard;
/**
* 医疗额度
*/
@Schema(description = "医疗额度")
private String medicalQuota;
/**
* 身故或残疾额度
*/
@Schema(description = "身故或残疾额度")
private String dieDisableQuota;
/**
* 结算月
*/
@Schema(description = "结算月")
private String settleMonth;
/**
* 结算类型 (0、预估 1、实缴)
*/
@Schema(description = "结算类型 (0、预估 1、实缴)")
private Integer settleType;
/**
* 创建人姓名
*/
@Schema(description = "创建人(派单人)")
private String createName;
/**
* 备注
*/
@Schema(description = "备注")
private String remark;
}
package com.yifu.cloud.plus.v1.yifu.insurances.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.Data;
import java.io.Serializable;
......@@ -12,7 +11,7 @@ import java.io.Serializable;
* @date 2022-07-20 16:14:19
*/
@Data
@Tag(name = "投保列表请求参数")
@Schema(description = "投保列表请求参数")
public class InsuranceListParam implements Serializable {
private static final long serialVersionUID = -4692341622141432288L;
......
......@@ -3,7 +3,6 @@ package com.yifu.cloud.plus.v1.yifu.insurances.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.Data;
import java.io.Serializable;
......@@ -15,7 +14,7 @@ import java.time.LocalDate;
* @date 2022-07-20 16:18:41
*/
@Data
@Tag(name = "投保列表VO")
@Schema(description = "投保列表VO")
public class InsuranceListVO implements Serializable {
private static final long serialVersionUID = -6673220061558171816L;
......
package com.yifu.cloud.plus.v1.yifu.insurances.entity;
package com.yifu.cloud.plus.v1.yifu.insurances.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag;
......
package com.yifu.cloud.plus.v1.yifu.insurances.vo;
import java.io.Serializable;
/**
* @author zhaji
* @description 减员办理返回类
* @date 2022-07-21 11:47:16
*/
public class InsuranceRefundHandlingListVo implements Serializable {
private static final long serialVersionUID = -2689686777914935788L;
}
package com.yifu.cloud.plus.v1.yifu.insurances.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.Data;
import java.io.Serializable;
/**
* @author zhaji
* @description 减员办理查询条件
* @date 2022-07-21 11:40:47
*/
@Data
@Tag(name = "减员办理查询条件")
public class InsuranceRefundHandlingParam implements Serializable {
private static final long serialVersionUID = -2689686777914935788L;
/**
* 员工姓名
*/
@Schema(description = "员工姓名")
private String empName;
/**
* 员工身份证号
*/
@Schema(description = "员工身份证号")
private String empIdcardNo;
/**
* 项目编码
*/
@Schema(description = "项目编码")
private String deptNo;
/**
* 减员状态 1待减员 2减员中3减员退回
*/
@Schema(description = "减员状态 1待减员 2减员中3减员退回")
private Integer reduceHandleStatus;
}
package com.yifu.cloud.plus.v1.yifu.insurances.vo;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.List;
/**
* @author zhaji
* @description 减员办理类
* @date 2022-07-21 11:56:40
*/
@Data
@Tag(name = "减员办理类")
public class InsuranceRefundListParam implements Serializable {
private static final long serialVersionUID = -2689686777914935788L;
@Schema(name = "办理类型")
@NotBlank(message = "办理类型不能为空")
private String refundType;
@Schema(name = "办理列表")
@NotBlank(message = "办理列表不能为空")
private List<TInsuranceDetail> insuranceRefundList;
}
package com.yifu.cloud.plus.v1.yifu.insurances.vo;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.Data;
import java.io.Serializable;
/**
* @author zhaji
* @description 已投保列表
* @date 2022-07-21 11:31:30
*/
@Data
@Tag(name = "已投保列表")
public class InsuranceRefundListVo implements Serializable {
private static final long serialVersionUID = -2689686777914935788L;
}
package com.yifu.cloud.plus.v1.yifu.insurances.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.Data;
import java.io.Serializable;
/**
* @author zhaji
* @description 已减员查询列表参数
* @date 2022-07-21 11:24:03
*/
@Data
@Tag(name = "已减员查询列表参数")
public class InsuranceRefundParam implements Serializable {
private static final long serialVersionUID = -2689686777914935788L;
/**
* 员工姓名
*/
@Schema(description = "员工姓名")
private String empName;
/**
* 员工身份证号
*/
@Schema(description = "员工身份证号")
private String empIdcardNo;
/**
* 项目编码
*/
@Schema(description = "项目编码")
private String deptNo;
/**
* 保单号
*/
@Schema(description = "保单号")
private String policyNo;
/**
* 保险公司ID
*/
@Schema(description = "保险公司ID")
private String insuranceCompanyId;
/**
* 保险公司名称
*/
@Schema(description = "保险公司名称")
private String insuranceCompanyName;
/**
* 保单开始时间
*/
@Schema(description = "保单开始时间")
private String policyStart;
/**
* 保单结束时间
*/
@Schema(description = "保单结束时间")
private String policyEnd;
/**
* 投保办理状态 1待投保 2投保中 3已投保 4投保退回 5 已减员
*/
@Schema(description = "投保办理状态 1待投保 2投保中 3已投保 4投保退回 5 已减员")
private Integer buyHandleStatus;
}
package com.yifu.cloud.plus.v1.yifu.insurances.vo;
import java.io.Serializable;
/**
* @author zhaji
* @description 减员办理返回类
* @date 2022-07-21 12:30:37
*/
public class InsuranceRefundResultVo implements Serializable {
private static final long serialVersionUID = -2689686777914935788L;
}
package com.yifu.cloud.plus.v1.yifu.insurances.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.Data;
import java.io.Serializable;
import java.time.LocalDate;
/**
* @author licancan
......@@ -13,7 +11,7 @@ import java.time.LocalDate;
* @date 2022-07-20 08:43:31
*/
@Data
@Tag(name = "商险办理替换入参")
@Schema(description = "商险办理替换入参")
public class InsuranceReplaceParam implements Serializable {
private static final long serialVersionUID = -2689686777914935788L;
......
......@@ -15,6 +15,11 @@ import java.util.List;
@Data
public class InsuranceTypeVo extends TInsuranceType {
/**
* 所属保险公司名称
*/
private String insuranceCompanyName;
/**
* 费率信息
*/
......
package com.yifu.cloud.plus.v1.yifu.insurances.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.Data;
import java.io.Serializable;
import java.time.LocalDate;
/**
* @author zhaji
* @description 已投保查询返回类
* @date 2022-07-21 09:46:09
*/
@Data
@Tag(name = "已投保查询返回类")
public class InsuredListVo implements Serializable {
private static final long serialVersionUID = -6673220061558171816L;
//订单编号、姓名、身份证、投保类型、项目、岗位、保单起止日期、购买月数、保单生效日期、保险公司、是否出险、险种、购买标准 减员状态、
/**
* 主键
*/
@Schema(description = "主键")
private String id;
/**
* 订单编号
*/
@Schema(description = "订单编号")
private String orderNo;
/**
* 员工姓名
*/
@Schema(description = "员工姓名")
private String empName;
/**
* 员工身份证号
*/
@Schema(description = "员工身份证号")
private String empIdcardNo;
/**
* 投保类型, 1新增、3批增、4替换
*/
@Schema(description = " 投保类型, 1新增、3批增、4替换")
private Integer buyType;
/**
* 项目名称
*/
@Schema(description = "项目名称")
private String projectName;
/**
* 项目编码
*/
@JsonIgnore
private String deptNo;
/**
* 投保岗位
*/
@Schema(description = "投保岗位")
private String post;
/**
* 保单开始时间
*/
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd")
@Schema(description = "保单开始时间")
private LocalDate policyStart;
/**
* 保单结束时间
*/
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd")
@Schema(description = "保单结束时间")
private LocalDate policyEnd;
/**
* 保险公司名称
*/
@Schema(description = "保险公司名称")
private String insuranceCompanyName;
/**
* 险种名称
*/
@Schema(description = "险种名称")
private String insuranceTypeName;
/**
* 购买标准
*/
@Schema(description = "购买标准")
private String buyStandard;
/**
* 创建人姓名
*/
@Schema(description = "创建人(派单人)")
private String createName;
/**
* 投保状态 1待投保 2投保中 3已投保 4投保退回 5 已减员
*/
@Schema(description = "投保状态 1待投保 2投保中 3已投保 4投保退回 5 已减员")
private Integer buyHandleStatus;
/**
* 结算类型 (0、预估 1、实缴)
*/
@Schema(description = "结算类型 (0、预估 1、实缴)")
private Integer settleType;
/**
* 结算月
*/
@Schema(description = "结算月")
private String settleMonth;
//订单编号、姓名、身份证号、投保类型、项目、岗位、保单开始日期、保单结束日期、保险公司、险种、购买标准、医保、身故或残疾、预估保费、实际保费、保单号、发票号、保单生效日期、商险购买地、商险办理地、是否出险、是否过期、是否失效、派单日期、派单人
}
package com.yifu.cloud.plus.v1.yifu.insurances.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.Data;
import java.io.Serializable;
import java.time.LocalDateTime;
/**
* @author zhaji
* @description 已投保列表查询条件
* @date 2022-07-21 09:25:34
*/
@Data
@Tag(name = "已投保列表查询条件")
public class InsuredParam implements Serializable {
private static final long serialVersionUID = -2689686777914935788L;
/**
* 员工姓名
*/
@Schema(description = "员工姓名")
private String empName;
/**
* 员工身份证号
*/
@Schema(description = "员工身份证号")
private String empIdcardNo;
/**
* 项目编码
*/
@Schema(description = "项目编码")
private String deptNo;
/**
* 保单号
*/
@Schema(description = "保单号")
private String policyNo;
/**
* 保险公司ID
*/
@Schema(description = "保险公司ID")
private String insuranceCompanyId;
/**
* 保单开始时间
*/
@Schema(description = "保单开始时间")
private String policyStart;
/**
* 保单结束时间
*/
@Schema(description = "保单结束时间")
private String policyEnd;
/**
* 发票号
*/
@Schema(description = "发票号")
private String invoiceNo;
/**
* 投保办理状态 1待投保 2投保中 3已投保 4投保退回 5 已减员
*/
@Schema(description = "投保办理状态 1待投保 2投保中 3已投保 4投保退回 5 已减员")
private Integer buyHandleStatus;
/**
* 是否出险 0未出险 1已出险
*/
@Schema(description = "是否出险 0未出险 1已出险")
private Integer isUse;
/**
* 是否有效 0有效 1无效
*/
@Schema(description = "是否有效 0有效 1无效")
private Integer isEffect;
/**
* 是否过期 0未过期 1已过期
*/
@Schema(description = "是否过期 0未过期 1已过期")
private Integer isOverdue;
/**
* 派单日期
*/
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
@Schema(description = "派单日期")
@ExcelProperty("派单日期")
private LocalDateTime createTime;
}
......@@ -3,7 +3,6 @@ package com.yifu.cloud.plus.v1.yifu.insurances.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.InsuranceRefundCheck;
import com.yifu.cloud.plus.v1.yifu.insurances.service.TInsuranceDetailService;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.*;
import io.swagger.v3.oas.annotations.Operation;
......@@ -11,7 +10,6 @@ import io.swagger.v3.oas.annotations.security.SecurityRequirement;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.http.HttpHeaders;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
......@@ -111,11 +109,25 @@ public class TInsuranceDetailController {
*/
@GetMapping("/deleteInsurance")
@Operation(summary = "通过id删除", description = "通过id删除")
//@PreAuthorize("@pms.hasPermission('temployeeinfo_del')")
//@PreAuthorize("@pms.hasPermission('insurance_del')")
public R<String> deleteInsurance(@RequestParam String id) {
return tInsuranceDetailService.deleteInsurance(id);
}
/**
* 编辑
*
* @author licancan
* @param param
* @return {@link R<String>}
*/
@PostMapping("/editInsurance")
@Operation(summary = "编辑", description = "编辑")
//@PreAuthorize("@pms.hasPermission('insurance_edit')")
public R<String> editInsurance(@RequestBody @Valid InsuranceEditParam param) {
return tInsuranceDetailService.editInsurance(param);
}
/**
* 通过id查询
*
......@@ -129,6 +141,45 @@ public class TInsuranceDetailController {
return R.ok(tInsuranceDetailService.getInsuranceDetailById(id));
}
/**
* 导出办理
*
* @author licancan
* @param param
* @return {@link R<List<InsuranceExportListVO>>}
*/
@Operation(summary = "导出办理", description = "导出办理")
@PostMapping("/getInsuranceExportList")
public R<List<InsuranceExportListVO>> getInsuranceExportList(@RequestBody InsuranceExportListParam param) {
return R.ok(tInsuranceDetailService.getInsuranceExportList(param));
}
/**
* 投保退回
*
* @author licancan
* @param idList
* @return {@link R<String>}
*/
@Operation(summary = "投保退回", description = "投保退回")
@PostMapping("/rollBackInsurance")
public R<String> rollBackInsurance(@RequestBody @Valid @Size(min = 1,message = "集合不能为空") List<String> idList){
return tInsuranceDetailService.rollBackInsurance(idList);
}
/**
* 办理成功
*
* @author licancan
* @param idList
* @return {@link R<String>}
*/
@Operation(summary = "办理成功", description = "办理成功")
@PostMapping("/successfulInsurance")
public R<String> successfulInsurance(@RequestBody @Valid @Size(min = 1,message = "集合不能为空") List<String> idList){
return tInsuranceDetailService.successfulInsurance(idList);
}
/***********************减员办理********************************/
/**
* 导入减员校验
......@@ -142,4 +193,97 @@ public class TInsuranceDetailController {
return tInsuranceDetailService.checkInsuranceRefundList(insuranceRefundCheckList);
}
/**
* 已投保列表分页查询
*
* @author zhaji
* @param page 分页参数
* @param param 查询条件
* @return {@link R<IPage<InsuredListVo>>}
*/
@Operation(summary = "已投保列表分页查询", description = "已投保列表分页查询")
@PostMapping("/getInsuredListPage")
public R<IPage<InsuredListVo>> getInsuredListPage(Page<InsuredListVo> page, @RequestBody InsuredParam param) {
return R.ok(tInsuranceDetailService.getInsuredListPage(page, param));
}
/**
* 已投保列表不分页查询
*
* @author zhaji
* @param param 查询条件
* @return {@link R<List<InsuredListVo>>}
*/
@Operation(summary = "已投保列表不分页查询", description = "已投保列表不分页查询")
@PostMapping("/getInsuredList")
public R<List<InsuredListVo>> getInsuredList(@RequestBody InsuredParam param) {
return R.ok(tInsuranceDetailService.getInsuredList(param));
}
/**
* 已减员列表分页查询
*
* @author zhaji
* @param param 查询条件
* @return {@link R<IPage< InsuranceRefundListVo >>}
*/
@Operation(summary = "已减员列表分页查询", description = "已减员列表分页查询")
@PostMapping("/getInsuranceRefundPageList")
public R<IPage<InsuranceRefundListVo>> getInsuranceRefundPageList(Page<InsuranceRefundParam> page, @RequestBody InsuranceRefundParam param) {
return R.ok(tInsuranceDetailService.getInsuranceRefundPageList(page,param));
}
/**
* 已减员列表不分页查询
*
* @author zhaji
* @param param 查询条件
* @return {@link R<List< InsuranceRefundListVo >>}
*/
@Operation(summary = "已减员列表不分页查询", description = "已减员列表不分页查询")
@PostMapping("/getInsuranceRefundList")
public R<List<InsuranceRefundListVo>> getInsuranceRefundList(@RequestBody InsuranceRefundParam param) {
return R.ok(tInsuranceDetailService.getInsuranceRefundList(param));
}
/**
* 减员办理列表分页查询
*
* @author zhaji
* @param param 查询条件
* @return {@link R<IPage< InsuranceRefundHandlingListVo >>}
*/
@Operation(summary = "减员办理列表分页查询", description = "减员办理列表分页查询")
@PostMapping("/getInsuranceRefundHandlingPageList")
public R<IPage<InsuranceRefundHandlingListVo>> getInsuranceRefundHandlingPageList(Page<InsuranceRefundHandlingParam> page, @RequestBody InsuranceRefundHandlingParam param) {
return R.ok(tInsuranceDetailService.getInsuranceRefundHandlingPageList(page,param));
}
/**
* 减员办理列表不分页查询
*
* @author zhaji
* @param param 查询条件
* @return {@link R<List< InsuranceRefundHandlingListVo >>}
*/
@Operation(summary = "减员办理列表不分页查询", description = "减员办理列表不分页查询")
@PostMapping("/getInsuranceRefundHandlingList")
public R<List<InsuranceRefundHandlingListVo>> getInsuranceRefundHandlingList(@RequestBody InsuranceRefundHandlingParam param) {
return R.ok(tInsuranceDetailService.getInsuranceRefundHandlingList(param));
}
/**
* 减员办理
*
* @author zhaji
* @param insuranceDetail 减员信息
* @return {@link R<List< InsuranceRefundHandlingListVo >>}
*/
@Operation(summary = "减员办理", description = "减员办理")
@PostMapping("/updateInsuranceRefund")
public R updateInsuranceRefund(@RequestBody InsuranceRefundListParam insuranceDetail) {
return tInsuranceDetailService.updateInsuranceRefund(insuranceDetail);
}
}
......@@ -40,7 +40,7 @@ public class TInsuranceTypeController {
*/
@Operation(summary = "分页查询", description = "分页查询")
@GetMapping("/page" )
public R<IPage<TInsuranceType>> getTCertRecordPage(Page page, TInsuranceType insuranceType) {
public R<IPage<InsuranceTypeVo>> getInsuranceTypePage(Page page, @RequestBody TInsuranceType insuranceType) {
return R.ok(insuranceTypeService.pageDiy(page, insuranceType));
}
......
......@@ -4,9 +4,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceDetailVO;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceListParam;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceListVO;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.*;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
......@@ -48,5 +46,42 @@ public interface TInsuranceDetailMapper extends BaseMapper<TInsuranceDetail> {
*/
InsuranceDetailVO getInsuranceDetailById(@Param("id") String id);
/**
* 导出办理勾选查询结果
*
* @author licancan
* @param idList
* @return {@link List<InsuranceExportListVO>}
*/
List<InsuranceExportListVO> getInsuranceExportListBySelect(@Param("idList") List<String> idList);
/**
* 导出办理非勾选查询结果
*
* @author licancan
* @param param
* @return {@link List< InsuranceExportListVO>}
*/
List<InsuranceExportListVO> getInsuranceExportList(@Param("param") InsuranceExportListParam param);
/***********************减员办理********************************/
/**
* 已投保列表分页查询
*
* @author zhaji
* @param page
* @param param
* @return {@link IPage< InsuredListVo>}
*/
IPage<InsuredListVo> getInsuredListPage(Page<InsuredListVo> page, @Param("param") InsuredParam param);
/**
* 已投保列表不分页查询
*
* @author zhaji
* @param param
* @return {@link List<InsuredListVo>}
*/
List<InsuredListVo> getInsuredList(@Param("param") InsuredParam param);
}
package com.yifu.cloud.plus.v1.yifu.insurances.mapper;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceType;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceTypeRate;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceTypeStandard;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceTypeVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
......@@ -34,4 +38,14 @@ public interface TInsuranceTypeMapper extends BaseMapper<TInsuranceType> {
* @return {@link List< TInsuranceTypeStandard>}
*/
List<TInsuranceTypeStandard> selectInsuranceTypeStandardList(String id);
/**
* 险种分页查询
*
* @author zhaji
* @param page 分页参数
* @param insuranceType 查询参数
* @return {@link IPage< InsuranceTypeVo>}
*/
IPage<InsuranceTypeVo> selectInsuranceTypePage(Page page, @Param("insuranceType") TInsuranceType insuranceType);
}
......@@ -5,7 +5,6 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.InsuranceRefundCheck;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.*;
......@@ -73,6 +72,15 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> {
*/
R<String> deleteInsurance(String id);
/**
* 编辑
*
* @author licancan
* @param param
* @return {@link R<String>}
*/
R<String> editInsurance(InsuranceEditParam param);
/**
* 通过id查询
*
......@@ -82,6 +90,33 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> {
*/
InsuranceDetailVO getInsuranceDetailById(String id);
/**
* 导出办理
*
* @author licancan
* @param param
* @return {@link List<InsuranceExportListVO>}
*/
List<InsuranceExportListVO> getInsuranceExportList(InsuranceExportListParam param);
/**
* 投保退回
*
* @author licancan
* @param idList
* @return {@link R<String>}
*/
R<String> rollBackInsurance(List<String> idList);
/**
* 办理成功
*
* @author licancan
* @param idList
* @return {@link R<String>}
*/
R<String> successfulInsurance(List<String> idList);
/***********************减员办理********************************/
/**
* 减员导入校验
......@@ -92,4 +127,69 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> {
*/
R checkInsuranceRefundList(List<InsuranceRefundCheck> insuranceRefundCheckList);
/**
* 已投保列表分页查询
*
* @author zhaji
* @param page 分页参数
* @param param 查询参数
* @return {@link IPage< InsuredListVo>}
*/
IPage<InsuredListVo> getInsuredListPage(Page<InsuredListVo> page, InsuredParam param);
/**
* 已投保列表不分页查询
*
* @author zhaji
* @param param 查询参数
* @return {@link List< InsuredListVo>}
*/
List<InsuredListVo> getInsuredList(InsuredParam param);
/**
* 已减员列表分页查询
*
* @author zhaji
* @param page 分页数据
* @param param 查询参数
* @return {@link IPage< InsuranceRefundListVo >}
*/
IPage<InsuranceRefundListVo> getInsuranceRefundPageList(Page<InsuranceRefundParam> page, InsuranceRefundParam param);
/**
* 已减员列表不分页查询
*
* @author zhaji
* @param param 查询参数
* @return {@link List< InsuranceRefundListVo >}
*/
List<InsuranceRefundListVo> getInsuranceRefundList(InsuranceRefundParam param);
/**
* 减员办理列表分页查询
*
* @author zhaji
* @param page 分页数据
* @param param 查询参数
* @return {@link IPage< InsuranceRefundHandlingListVo>}
*/
IPage<InsuranceRefundHandlingListVo> getInsuranceRefundHandlingPageList(Page<InsuranceRefundHandlingParam> page, InsuranceRefundHandlingParam param);
/**
* 减员办理列表不分页查询
*
* @author zhaji
* @param param 查询参数
* @return {@link List< InsuranceRefundHandlingListVo>}
*/
List<InsuranceRefundHandlingListVo> getInsuranceRefundHandlingList(InsuranceRefundHandlingParam param);
/**
* 减员办理
*
* @author zhaji
* @param insuranceDetail 办理类
* @return {@link R}
*/
R updateInsuranceRefund(InsuranceRefundListParam insuranceDetail);
}
......@@ -23,7 +23,7 @@ public interface TInsuranceTypeService extends IService<TInsuranceType> {
* @param insuranceType 分页查询参数
* @return {@link IPage< TInsuranceType>}
*/
IPage<TInsuranceType> pageDiy(Page page, TInsuranceType insuranceType);
IPage<InsuranceTypeVo> pageDiy(Page page,TInsuranceType insuranceType);
/**
* 新增险种信息
......
......@@ -98,7 +98,15 @@ public class TInsuranceTypeRateServiceImpl extends ServiceImpl<TInsuranceTypeRat
if (!Common.isNumber(rate)){
return R.failed("当前费率格式不正确");
}
return R.ok(this.baseMapper.insert(insuranceTypeRate));
LambdaQueryWrapper<TInsuranceTypeRate> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(TInsuranceTypeRate::getDeleteFlag, CommonConstants.ZERO_INT).eq(TInsuranceTypeRate::getInsuranceTypeId,insuranceTypeId)
.eq(TInsuranceTypeRate :: getRate,insuranceTypeRate.getRate()).eq(TInsuranceTypeRate:: getMonth ,insuranceTypeRate.getMonth());
List<TInsuranceTypeRate> list = this.list(queryWrapper);
if (list.isEmpty()){
return R.ok(this.baseMapper.insert(insuranceTypeRate));
}else{
return R.failed("当前险种已存在相同的费率");
}
}
}
......@@ -45,10 +45,8 @@ public class TInsuranceTypeServiceImpl extends ServiceImpl<TInsuranceTypeMapper,
* @return {@link IPage< TInsuranceType>}
*/
@Override
public IPage<TInsuranceType> pageDiy(Page page, TInsuranceType insuranceType) {
LambdaQueryWrapper<TInsuranceType> wrapper = new LambdaQueryWrapper<>();
wrapper.orderByDesc(TInsuranceType::getCreateTime);
return this.baseMapper.selectPage(page,wrapper);
public IPage<InsuranceTypeVo> pageDiy(Page page, TInsuranceType insuranceType) {
return this.baseMapper.selectInsuranceTypePage(page,insuranceType);
}
/**
......
......@@ -111,6 +111,16 @@ public class TInsuranceTypeStandardServiceImpl extends ServiceImpl<TInsuranceTyp
if (!Common.isNumber(dieDisableQuota)){
return R.failed("当前身故或残疾额度格式不正确");
}
return R.ok(this.baseMapper.insert(insuranceTypeStandard));
LambdaQueryWrapper<TInsuranceTypeStandard> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(TInsuranceTypeStandard::getInsuranceTypeId,insuranceTypeStandard.getInsuranceTypeId())
.eq(TInsuranceTypeStandard::getBuyStandard,insuranceTypeStandard.getBuyStandard())
.eq(TInsuranceTypeStandard::getDeleteFlag,CommonConstants.ZERO_INT);
List<TInsuranceTypeStandard> list = list(queryWrapper);
if(list.isEmpty()){
return R.ok(this.baseMapper.insert(insuranceTypeStandard));
}else{
return R.failed("当前险种下的购买标准已存在");
}
}
}
......@@ -169,13 +169,165 @@
detail.IS_EFFECT as isEffect,
detail.IS_OVERDUE as isOverdue,
detail.INSURANCE_PROVINCE_NAME as insuranceProvinceName,
detail.INSURANCE_PROVINCE as insuranceProvince,
detail.INSURANCE_CITY_NAME as insuranceCityName,
detail.INSURANCE_CITY as insuranceCity,
detail.INSURANCE_HANDLE_PROVINCE_NAME as insuranceHandleProvinceName,
detail.INSURANCE_HANDLE_PROVINCE as insuranceHandleProvince,
detail.INSURANCE_HANDLE_CITY_NAME as insuranceHandleCityName,
detail.INSURANCE_HANDLE_CITY as insuranceHandleCity,
detail.CREATE_NAME as createName,
detail.CREATE_TIME as createTime
from t_insurance_detail detail
left join t_insurance_settle tis on detail.DEFAULT_SETTLE_ID = tis.ID
where detail.ID = #{id}
</select>
<select id="getInsuranceExportListBySelect" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceExportListVO">
select detail.id as id,
detail.ORDER_NO as orderNo,
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="getInsuranceExportList" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceExportListVO">
select detail.id as id,
detail.ORDER_NO as orderNo,
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.BUY_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(#{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>
<!-- ***********************减员办理******************************** -->
<select id="getInsuredListPage" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuredListVo">
select
detail.id as id,
detail.ORDER_NO as orderNo,
detail.EMP_NAME as empName,
detail.EMP_IDCARD_NO as empIdcardNo,
detail.BUY_TYPE as buyType,
detail.POST as post,
detail.DEPT_NO as deptNo,
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.CREATE_NAME as createName,
detail.BUY_HANDLE_STATUS as buyHandleStatus,
detail.SETTLE_TYPE as settleType,
detail.SETTLE_MONTH as settleMonth
from t_insurance_detail detail
where detail.DELETE_FLAG = 0
<if test="param.deptNo != null and param.deptNo.trim() != ''">
and detail.DEPT_NO like concat('%',replace(replace(#{deptNo},'_','\_'),'%','\%'),'%')
</if>
<if test="param.buyHandleStatus != null">
and detail.BUY_HANDLE_STATUS = #{param.buyHandleStatus}
</if>
<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.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>
<select id="getInsuredList" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuredListVo">
select detail.id as id,
detail.ORDER_NO as orderNo,
detail.EMP_NAME as empName,
detail.EMP_IDCARD_NO as empIdcardNo,
detail.BUY_TYPE as buyType,
detail.POST as post,
detail.DEPT_NO as deptNo,
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.CREATE_NAME as createName,
detail.BUY_HANDLE_STATUS as buyHandleStatus,
detail.SETTLE_TYPE as settleType,
detail.SETTLE_MONTH as settleMonth
from t_insurance_detail detail
where detail.DELETE_FLAG = 0
<if test="param.deptNo != null and param.deptNo.trim() != ''">
and detail.DEPT_NO like concat('%',replace(replace(#{deptNo},'_','\_'),'%','\%'),'%')
</if>
<if test="param.buyHandleStatus != null">
and detail.BUY_HANDLE_STATUS = #{param.buyHandleStatus}
</if>
<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.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>
</mapper>
......@@ -54,5 +54,23 @@
and
DELETE_FLAG = 0
</select>
<select id="selectInsuranceTypePage" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceTypeVo">
select
a.ID as id,
a.NAME as name ,
b.COMPANY_NAME as insuranceCompanyName,
a.INSURANCE_COMPANY_ID as insuranceCompanyId,
a.RECEIPT_UNIT_NAME as receiptUnitName,
a.BANK_NAME as bankName,
a.BANK_NO as bankNo
from
t_insurance_type a,
t_insurance_company b
where
a.INSURANCE_COMPANY_ID = b.ID
and
a.DELETE_FLAG = 0
</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