Commit e9e45892 authored by 李灿灿's avatar 李灿灿

Merge branch 'feature-licancan' into 'develop'

Feature licancan

See merge request fangxinjiang/yifu!176
parents 36c81675 fc7d6668
...@@ -36,6 +36,12 @@ public class ProjectSetInfoVo implements Serializable { ...@@ -36,6 +36,12 @@ public class ProjectSetInfoVo implements Serializable {
@Schema(description = "项目名称") @Schema(description = "项目名称")
private String departName; private String departName;
/**
* 封面抬头
*/
@Schema(description = "封面抬头")
private String invoiceTitle;
/** /**
* 所属客户 * 所属客户
*/ */
...@@ -58,7 +64,7 @@ public class ProjectSetInfoVo implements Serializable { ...@@ -58,7 +64,7 @@ public class ProjectSetInfoVo implements Serializable {
* 商险结算类型:0预估 1 实缴 * 商险结算类型:0预估 1 实缴
*/ */
@Schema(description = "商险结算类型") @Schema(description = "商险结算类型")
private String insuranceSettleType = CommonConstants.ONE_STRING; private String insuranceSettleType;
/** /**
* 业务类型一级分类 * 业务类型一级分类
......
...@@ -234,7 +234,8 @@ ...@@ -234,7 +234,8 @@
a.BUSINESS_PRIMARY_TYPE, a.BUSINESS_PRIMARY_TYPE,
a.BUSINESS_SECOND_TYPE, a.BUSINESS_SECOND_TYPE,
a.BUSINESS_THIRD_TYPE, a.BUSINESS_THIRD_TYPE,
a.STOP_FLAG a.STOP_FLAG,
a.INVOICE_TITLE
FROM t_settle_domain a FROM t_settle_domain a
LEFT JOIN t_customer_info c ON a.CUSTOMER_ID = c.ID LEFT JOIN t_customer_info c ON a.CUSTOMER_ID = c.ID
where 1=1 where 1=1
......
...@@ -378,6 +378,16 @@ public interface CommonConstants { ...@@ -378,6 +378,16 @@ public interface CommonConstants {
// 日 // 日
String DAY = "日"; String DAY = "日";
/**
* 一年365天
*/
int ONE_YEAR = 365;
/**
* 数字70
*/
int SEVENTY = 70;
/** /**
* 省市 * 省市
* @Author fxj * @Author fxj
......
...@@ -4,6 +4,7 @@ import lombok.extern.slf4j.Slf4j; ...@@ -4,6 +4,7 @@ import lombok.extern.slf4j.Slf4j;
import java.text.ParseException; import java.text.ParseException;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date; import java.util.Date;
import java.util.regex.Matcher; import java.util.regex.Matcher;
import java.util.regex.Pattern; import java.util.regex.Pattern;
...@@ -30,6 +31,42 @@ public class IdCardUtil { ...@@ -30,6 +31,42 @@ public class IdCardUtil {
} }
/**
* 根据身份证号计算周岁
* 例如:当前时间是2022-08-22,那么2007-08-22算15周岁,2007-08-23才算16周岁
*
* @author licancan
* @param idNO
* @return {@link int}
*/
public static int getFullAge(String idNO){
Date birthday = getBirthdate(idNO);
// 从Calendar对象中获得一个Date对象
Calendar cal = Calendar.getInstance();
// 把出生日期放入Calendar类型的bir对象中,进行Calendar和Date类型进行转换
Calendar bir = Calendar.getInstance();
bir.setTime(birthday);
// 如果生日大于当前日期,则抛出异常:出生日期不能大于当前日期
if (cal.before(birthday)) {
throw new IllegalArgumentException("The birthday is after Now,It's unbelievable");
}
// 取出当前年月日
int yearNow = cal.get(Calendar.YEAR);
int monthNow = cal.get(Calendar.MONTH);
int dayNow = cal.get(Calendar.DAY_OF_MONTH);
// 取出出生年月日
int yearBirth = bir.get(Calendar.YEAR);
int monthBirth = bir.get(Calendar.MONTH);
int dayBirth = bir.get(Calendar.DAY_OF_MONTH);
// 大概年龄是当前年减去出生年
int age = yearNow - yearBirth;
// 如果出当前月大于出生月,或者当前月等于出生月但是当前日大于出生日,那么年龄age就加一岁
if (monthNow > monthBirth || (monthNow == monthBirth && dayNow > dayBirth)) {
age++;
}
return age;
}
/** /**
* 提取身份证中的出生日期,身份证非法则返回空 * 提取身份证中的出生日期,身份证非法则返回空
* @param idNum * @param idNum
......
...@@ -185,6 +185,14 @@ public class InsurancesConstants { ...@@ -185,6 +185,14 @@ public class InsurancesConstants {
* 员工身份证号格式错误 * 员工身份证号格式错误
*/ */
public static final String EMP_IDCARD_NO_NOT_LEGITIMATE = "员工身份证号格式错误"; public static final String EMP_IDCARD_NO_NOT_LEGITIMATE = "员工身份证号格式错误";
/**
* 员工年龄需在16岁-70岁之间
*/
public static final String EMP_AGE_NOT_LEGITIMATE = "员工年龄需在16岁-70岁之间";
/**
* 替换员工年龄需在16岁-70岁之间
*/
public static final String REPLACE_EMP_AGE_NOT_LEGITIMATE = "替换员工年龄需在16岁-70岁之间";
/** /**
* 员工未通过实名认证 * 员工未通过实名认证
*/ */
...@@ -245,6 +253,10 @@ public class InsurancesConstants { ...@@ -245,6 +253,10 @@ public class InsurancesConstants {
* 保单结束时间需要大于保单开始时间 * 保单结束时间需要大于保单开始时间
*/ */
public static final String POLICY_START_SHOULD_LESS_THAN_POLICY_END = "保单结束时间需要大于保单开始时间"; public static final String POLICY_START_SHOULD_LESS_THAN_POLICY_END = "保单结束时间需要大于保单开始时间";
/**
* 保单起止时间不能超过365天
*/
public static final String POLICY_DATE_NOT_MORE_THAN_365 = "保单起止时间不能超过365天";
/** /**
* 保单结束时间不能为空 * 保单结束时间不能为空
*/ */
......
...@@ -52,9 +52,15 @@ public class InsuranceDetailVO implements Serializable { ...@@ -52,9 +52,15 @@ public class InsuranceDetailVO implements Serializable {
/** /**
* 项目编码 * 项目编码
*/ */
@JsonIgnore @Schema(description = "项目编码")
private String deptNo; private String deptNo;
/**
* 封面抬头
*/
@Schema(description = "封面抬头")
private String invoiceTitle;
/** /**
* 投保岗位 * 投保岗位
*/ */
...@@ -167,9 +173,9 @@ public class InsuranceDetailVO implements Serializable { ...@@ -167,9 +173,9 @@ public class InsuranceDetailVO implements Serializable {
private Integer buyHandleStatus; private Integer buyHandleStatus;
/** /**
* 减员状态 1待减员 2减员中3减员退回 * 减员状态 1待减员 2减员中 3减员退回 4减员成功
*/ */
@Schema(description = "减员状态 1待减员 2减员中3减员退回") @Schema(description = "减员状态 1待减员 2减员中 3减员退回 4减员成功")
private Integer reduceHandleStatus; private Integer reduceHandleStatus;
/** /**
...@@ -256,4 +262,78 @@ public class InsuranceDetailVO implements Serializable { ...@@ -256,4 +262,78 @@ public class InsuranceDetailVO implements Serializable {
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss") @JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
@Schema(description = "创建时间") @Schema(description = "创建时间")
private LocalDateTime createTime; private LocalDateTime createTime;
/**
* 附件 todo 数据库暂时未关联附件,这个字段没值
*/
@Schema(description = "附件:预留字段,暂时都是空")
private String enclosure;
/**
* 备注
*/
@Schema(description = "备注")
private String remark;
/**
* 计费方式(0:按天,1:按月)
*/
@Schema(description = "计费方式(0:按天,1:按月)")
private Integer billingType;
/**
* 购买周期
*/
@Schema(description = "购买周期")
private String buyCycle;
/**
* 费率
*/
@Schema(description = "费率")
private String rate;
/**
* 派单类型 1新增、3批增、4替换、5减员
*/
@Schema(description = "派单类型:1新增、3批增、4替换、5减员")
private Integer distributeType;
/**
* 派单状态
* 减员状态 1待减员 2减员中 3减员退回 4减员成功
* 办理状态 1待投保 2投保中 3已投保 4投保退回
*/
@Schema(description = "派单状态:派单类型是1、3、4时:1待投保 2投保中 3已投保 4投保退回,派单类型是5时:1待减员 2减员中 3减员退回 4减员成功")
private Integer distributeStatus;
/**
* 被替换人姓名
*/
@Schema(description = "被替换人姓名(替换类型专用字段)")
private String coverEmpName;
/**
* 被替换人身份证号
*/
@Schema(description = "被替换人身份证号(替换类型专用字段)")
private String coverEmpIdcardNo;
/**
* 被替换人项目名称
*/
@Schema(description = "被替换人项目名称(替换类型专用字段)")
private String coverProjectName;
/**
* 退保金额 todo 数据库暂时没有
*/
@Schema(description = "退保金额 :预留字段,暂时都是空(减员类型专用)")
private String surrender;
/**
* 退保结算状态 todo 数据库暂时没有
*/
@Schema(description = "退保结算状态 :预留字段,暂时都是空(减员类型专用)")
private String surrenderSettleStatus;
} }
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 java.io.Serializable;
/**
* @author licancan
* @description 商险操作(加审批意见)请求参数
* @date 2022-08-22 13:58:58
*/
@Data
@Schema(description = "商险操作(加审批意见)请求参数")
public class InsuranceHandleParam implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 商险明细id
*/
@Schema(description = "商险明细id")
@NotBlank(message = "商险明细id不能为空")
private String id;
/**
* 审批意见
*/
@Schema(description = "审批意见")
private String remark;
}
package com.yifu.cloud.plus.v1.yifu.insurances.vo; package com.yifu.cloud.plus.v1.yifu.insurances.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import java.io.Serializable; import java.io.Serializable;
import java.time.LocalDate;
import java.util.List; import java.util.List;
/** /**
...@@ -75,4 +77,30 @@ public class InsuranceListParam implements Serializable { ...@@ -75,4 +77,30 @@ public class InsuranceListParam implements Serializable {
*/ */
@Schema(description = "保单办理人") @Schema(description = "保单办理人")
private String updateBy; private String updateBy;
/**
* 购买类型, 1新增、3批增、4替换
*/
@Schema(description = " 购买类型(派单类型), 1新增、3批增、4替换")
private Integer buyType;
/**
* 创建者-姓名
*/
@Schema(description = "派单人")
private String createName;
/**
* 派单开始时间
*/
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd")
@Schema(description = "派单开始时间")
private LocalDate startDate;
/**
* 派单结束时间
*/
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd")
@Schema(description = "派单结束时间")
private LocalDate endDate;
} }
...@@ -2,9 +2,14 @@ package com.yifu.cloud.plus.v1.yifu.insurances.controller; ...@@ -2,9 +2,14 @@ package com.yifu.cloud.plus.v1.yifu.insurances.controller;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R; import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog; import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog;
import com.yifu.cloud.plus.v1.yifu.common.security.annotation.Inner; import com.yifu.cloud.plus.v1.yifu.common.security.annotation.Inner;
import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceOperate;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.Dept; import com.yifu.cloud.plus.v1.yifu.insurances.vo.Dept;
import com.yifu.cloud.plus.v1.yifu.insurances.service.TInsuranceDetailService; import com.yifu.cloud.plus.v1.yifu.insurances.service.TInsuranceDetailService;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.*; import com.yifu.cloud.plus.v1.yifu.insurances.vo.*;
...@@ -116,8 +121,6 @@ public class TInsuranceDetailController { ...@@ -116,8 +121,6 @@ public class TInsuranceDetailController {
return R.ok(tInsuranceDetailService.getInsuranceList(param)); return R.ok(tInsuranceDetailService.getInsuranceList(param));
} }
/** /**
* 商险新增 * 商险新增
* *
...@@ -198,6 +201,19 @@ public class TInsuranceDetailController { ...@@ -198,6 +201,19 @@ public class TInsuranceDetailController {
return R.ok(tInsuranceDetailService.getInsuranceDetailById(id)); return R.ok(tInsuranceDetailService.getInsuranceDetailById(id));
} }
/**
* 通过商险id查询操作记录
*
* @author licancan
* @param id
* @return {@link R< List<TInsuranceOperate>>}
*/
@Operation(summary = "通过商险id查询操作记录", description = "通过商险id查询操作记录")
@GetMapping("/operate/{id}")
public R<List<TInsuranceOperate>> getInsuranceOperateList(@PathVariable("id") String id) {
return R.ok(tInsuranceDetailService.getInsuranceOperateList(id));
}
/** /**
* 导出办理 * 导出办理
* *
...@@ -215,26 +231,34 @@ public class TInsuranceDetailController { ...@@ -215,26 +231,34 @@ public class TInsuranceDetailController {
* 投保退回 * 投保退回
* *
* @author licancan * @author licancan
* @param idList * @param paramList
* @return {@link R<List<InsuranceListVO>>} * @return {@link R<List<InsuranceListVO>>}
*/ */
@Operation(summary = "投保退回", description = "投保退回") @Operation(summary = "投保退回", description = "投保退回")
@PostMapping("/rollBackInsurance") @PostMapping("/rollBackInsurance")
public R<List<InsuranceListVO>> rollBackInsurance(@RequestBody @Valid @Size(min = 1,message = "集合不能为空") List<String> idList){ public R<List<InsuranceListVO>> rollBackInsurance(@RequestBody @Valid @Size(min = 1,message = "集合不能为空") List<InsuranceHandleParam> paramList){
return tInsuranceDetailService.rollBackInsurance(idList); YifuUser user = SecurityUtils.getUser();
if (user == null || Common.isEmpty(user.getId())) {
return R.failed(CommonConstants.PLEASE_LOG_IN);
}
return tInsuranceDetailService.rollBackInsurance(user,paramList);
} }
/** /**
* 办理成功 * 办理成功
* *
* @author licancan * @author licancan
* @param idList * @param paramList
* @return {@link R<List<InsuranceListVO>>} * @return {@link R<List<InsuranceListVO>>}
*/ */
@Operation(summary = "办理成功", description = "办理成功") @Operation(summary = "办理成功", description = "办理成功")
@PostMapping("/successfulInsurance") @PostMapping("/successfulInsurance")
public R<List<InsuranceListVO>> successfulInsurance(@RequestBody @Valid @Size(min = 1,message = "集合不能为空") List<String> idList){ public R<List<InsuranceListVO>> successfulInsurance(@RequestBody @Valid @Size(min = 1,message = "集合不能为空") List<InsuranceHandleParam> paramList){
return tInsuranceDetailService.successfulInsurance(idList); YifuUser user = SecurityUtils.getUser();
if (user == null || Common.isEmpty(user.getId())) {
return R.failed(CommonConstants.PLEASE_LOG_IN);
}
return tInsuranceDetailService.successfulInsurance(user,paramList);
} }
/** /**
......
...@@ -5,7 +5,9 @@ import com.baomidou.mybatisplus.core.metadata.IPage; ...@@ -5,7 +5,9 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService; 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.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail; import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceOperate;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.*; import com.yifu.cloud.plus.v1.yifu.insurances.vo.*;
import java.util.List; import java.util.List;
...@@ -129,6 +131,15 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> { ...@@ -129,6 +131,15 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> {
*/ */
InsuranceDetailVO getInsuranceDetailById(String id); InsuranceDetailVO getInsuranceDetailById(String id);
/**
* 通过商险id查询操作记录
*
* @author licancan
* @param id
* @return {@link List<TInsuranceOperate>}
*/
List<TInsuranceOperate> getInsuranceOperateList(String id);
/** /**
* 导出办理 * 导出办理
* *
...@@ -142,19 +153,21 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> { ...@@ -142,19 +153,21 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> {
* 投保退回 * 投保退回
* *
* @author licancan * @author licancan
* @param idList * @param user
* @param paramList
* @return {@link R<List<InsuranceListVO>>} * @return {@link R<List<InsuranceListVO>>}
*/ */
R<List<InsuranceListVO>> rollBackInsurance(List<String> idList); R<List<InsuranceListVO>> rollBackInsurance(YifuUser user, List<InsuranceHandleParam> paramList);
/** /**
* 办理成功 * 办理成功
* *
* @author licancan * @author licancan
* @param idList * @param user
* @param paramList
* @return {@link R<List<InsuranceListVO>>} * @return {@link R<List<InsuranceListVO>>}
*/ */
R<List<InsuranceListVO>> successfulInsurance(List<String> idList); R<List<InsuranceListVO>> successfulInsurance(YifuUser user, List<InsuranceHandleParam> paramList);
/** /**
* 登记保单保费 * 登记保单保费
...@@ -341,5 +354,4 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> { ...@@ -341,5 +354,4 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> {
* @return {@link R} * @return {@link R}
*/ */
IPage<InsuranceListByIdCardVo> getInsuranceListByIdCard(Page<TInsuranceDetail> page, String idCard,String deptNo); IPage<InsuranceListByIdCardVo> getInsuranceListByIdCard(Page<TInsuranceDetail> page, String idCard,String deptNo);
} }
...@@ -69,7 +69,7 @@ ...@@ -69,7 +69,7 @@
CREATE_BY,CREATE_NAME,CREATE_TIME, CREATE_BY,CREATE_NAME,CREATE_TIME,
UPDATE_BY,UPDATE_TIME,DELETE_FLAG,DEFAULT_SETTLE_ID,HANDLED_BY,HANDLED_TIME UPDATE_BY,UPDATE_TIME,DELETE_FLAG,DEFAULT_SETTLE_ID,HANDLED_BY,HANDLED_TIME
</sql> </sql>
<!--投保办理分页查询--> <!--投保分页查询-->
<select id="getInsuranceListPage" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceListVO"> <select id="getInsuranceListPage" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceListVO">
select detail.id as id, select detail.id as id,
detail.EMP_NAME as empName, detail.EMP_NAME as empName,
...@@ -119,6 +119,15 @@ ...@@ -119,6 +119,15 @@
#{item} #{item}
</foreach> </foreach>
</if> </if>
<if test="param.buyType != null">
and detail.BUY_TYPE = #{param.buyType}
</if>
<if test="param.createName != null and param.createName.trim() != ''">
and detail.CREATE_NAME like concat('%',replace(replace(#{param.createName},'_','\_'),'%','\%'),'%')
</if>
<if test="param.startDate != null and param.startDate.trim() != '' and param.endDate != null and param.endDate.trim() != ''">
and detail.CREATE_TIME <![CDATA[ >= ]]> concat(#{param.startDate}, ' 00:00:00') and detail.CREATE_TIME <![CDATA[ <= ]]> concat(#{param.endDate}, ' 23:59:59')
</if>
ORDER BY detail.BUY_HANDLE_STATUS,detail.CREATE_TIME DESC ORDER BY detail.BUY_HANDLE_STATUS,detail.CREATE_TIME DESC
</select> </select>
...@@ -171,10 +180,19 @@ ...@@ -171,10 +180,19 @@
<if test="param.updateBy != null and param.updateBy.trim() != ''"> <if test="param.updateBy != null and param.updateBy.trim() != ''">
and detail.HANDLED_BY = #{param.updateBy} and detail.HANDLED_BY = #{param.updateBy}
</if> </if>
<if test="param.buyType != null">
and detail.BUY_TYPE = #{param.buyType}
</if>
<if test="param.createName != null and param.createName.trim() != ''">
and detail.CREATE_NAME like concat('%',replace(replace(#{param.createName},'_','\_'),'%','\%'),'%')
</if>
<if test="param.startDate != null and param.startDate.trim() != '' and param.endDate != null and param.endDate.trim() != ''">
and detail.CREATE_TIME <![CDATA[ >= ]]> concat(#{param.startDate}, ' 00:00:00') and detail.CREATE_TIME <![CDATA[ <= ]]> concat(#{param.endDate}, ' 23:59:59')
</if>
ORDER BY detail.BUY_HANDLE_STATUS,detail.CREATE_TIME DESC ORDER BY detail.BUY_HANDLE_STATUS,detail.CREATE_TIME DESC
</select> </select>
<!--投保办理不分页查询--> <!--投保不分页查询-->
<select id="getInsuranceList" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceListVO"> <select id="getInsuranceList" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceListVO">
select detail.id as id, select detail.id as id,
detail.EMP_NAME as empName, detail.EMP_NAME as empName,
...@@ -224,6 +242,15 @@ ...@@ -224,6 +242,15 @@
#{item} #{item}
</foreach> </foreach>
</if> </if>
<if test="param.buyType != null">
and detail.BUY_TYPE = #{param.buyType}
</if>
<if test="param.createName != null and param.createName.trim() != ''">
and detail.CREATE_NAME like concat('%',replace(replace(#{param.createName},'_','\_'),'%','\%'),'%')
</if>
<if test="param.startDate != null and param.startDate.trim() != '' and param.endDate != null and param.endDate.trim() != ''">
and detail.CREATE_TIME <![CDATA[ >= ]]> concat(#{param.startDate}, ' 00:00:00') and detail.CREATE_TIME <![CDATA[ <= ]]> concat(#{param.endDate}, ' 23:59:59')
</if>
ORDER BY detail.BUY_HANDLE_STATUS,detail.CREATE_TIME DESC ORDER BY detail.BUY_HANDLE_STATUS,detail.CREATE_TIME DESC
</select> </select>
...@@ -276,7 +303,15 @@ ...@@ -276,7 +303,15 @@
#{item} #{item}
</foreach> </foreach>
</if> </if>
<if test="param.buyType != null">
and detail.BUY_TYPE = #{param.buyType}
</if>
<if test="param.createName != null and param.createName.trim() != ''">
and detail.CREATE_NAME like concat('%',replace(replace(#{param.createName},'_','\_'),'%','\%'),'%')
</if>
<if test="param.startDate != null and param.startDate.trim() != '' and param.endDate != null and param.endDate.trim() != ''">
and detail.CREATE_TIME <![CDATA[ >= ]]> concat(#{param.startDate}, ' 00:00:00') and detail.CREATE_TIME <![CDATA[ <= ]]> concat(#{param.endDate}, ' 23:59:59')
</if>
ORDER BY detail.BUY_HANDLE_STATUS,detail.CREATE_TIME DESC ORDER BY detail.BUY_HANDLE_STATUS,detail.CREATE_TIME DESC
</select> </select>
<select id="getInsuranceDetailById" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceDetailVO"> <select id="getInsuranceDetailById" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceDetailVO">
...@@ -318,7 +353,10 @@ ...@@ -318,7 +353,10 @@
detail.INSURANCE_HANDLE_CITY_NAME as insuranceHandleCityName, detail.INSURANCE_HANDLE_CITY_NAME as insuranceHandleCityName,
detail.INSURANCE_HANDLE_CITY as insuranceHandleCity, detail.INSURANCE_HANDLE_CITY as insuranceHandleCity,
detail.CREATE_NAME as createName, detail.CREATE_NAME as createName,
detail.CREATE_TIME as createTime detail.CREATE_TIME as createTime,
detail.REMARK as remark,
detail.BILLING_TYPE as billingType,
detail.RATE as rate
from t_insurance_detail detail from t_insurance_detail detail
left join t_insurance_settle tis on detail.DEFAULT_SETTLE_ID = tis.ID left join t_insurance_settle tis on detail.DEFAULT_SETTLE_ID = tis.ID
where detail.ID = #{id} where detail.ID = #{id}
......
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