Commit 65b73690 authored by zhaji's avatar zhaji

"feature-zhaJi:移动EKP对接类的位置"

parent 9a5dde17
...@@ -31,5 +31,11 @@ ...@@ -31,5 +31,11 @@
<version>5.8.0</version> <version>5.8.0</version>
<scope>compile</scope> <scope>compile</scope>
</dependency> </dependency>
<dependency>
<groupId>com.yifu.cloud.plus.v1</groupId>
<artifactId>yifu-insurances-api</artifactId>
<version>1.0.0</version>
<scope>compile</scope>
</dependency>
</dependencies> </dependencies>
</project> </project>
...@@ -29,4 +29,16 @@ public class EkpSalaryProperties { ...@@ -29,4 +29,16 @@ public class EkpSalaryProperties {
String LoginName; String LoginName;
String docSubject; String docSubject;
String insuranceUrl;
String insuranceFdModelId;
String insuranceFdFlowId;
String insuranceDocStatus;
String insuranceLoginName;
String insuranceFocSubject;
} }
...@@ -16,4 +16,14 @@ public interface EkpConstants { ...@@ -16,4 +16,14 @@ public interface EkpConstants {
* 推送失败 * 推送失败
*/ */
String SEND_FAILED = "推送失败"; String SEND_FAILED = "推送失败";
/**
* 有
*/
String HAVE = "有";
/**
* 无
*/
String NOTHING = "无";
} }
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
com.yifu.cloud.plus.v1.yifu.ekp.util.EkpSalaryUtil,\
com.yifu.cloud.plus.v1.yifu.ekp.util.EKPInsuranceUtil
com.yifu.cloud.plus.v1.yifu.ekp.util.EkpSalaryUtil,\ com.yifu.cloud.plus.v1.yifu.ekp.util.EkpSalaryUtil,\
com.yifu.cloud.plus.v1.yifu.ekp.util.EkpSocialUtil,\ com.yifu.cloud.plus.v1.yifu.ekp.util.EkpSocialUtil,\
com.yifu.cloud.plus.v1.yifu.ekp.util.EkpFundUtil com.yifu.cloud.plus.v1.yifu.ekp.util.EkpFundUtil
\ No newline at end of file
...@@ -4,3 +4,11 @@ ekp.fdFlowId=182b40249c1bc940d7226b941c7a4183 ...@@ -4,3 +4,11 @@ ekp.fdFlowId=182b40249c1bc940d7226b941c7a4183
ekp.docStatus=20 ekp.docStatus=20
ekp.LoginName=admin ekp.LoginName=admin
ekp.docSubject=\u85AA\u8D44\u8BA2\u5355\u660E\u7EC6\u6570\u636E\u63A5\u53E3 ekp.docSubject=\u85AA\u8D44\u8BA2\u5355\u660E\u7EC6\u6570\u636E\u63A5\u53E3
ekp.insuranceUrl=http://119.96.227.251:8080/api/sys-modeling/appModelRestService/addModel
ekp.insuranceFdModelId=181d73279372e5a55438a47d7436ab7e
ekp.insuranceFdFlowId=18267f206233f29cbd3c5ee425c9408a
ekp.insuranceDocStatus=20
ekp.insuranceLoginName=admin
ekp.insuranceFocSubject='??????'
package com.yifu.cloud.plus.v1.yifu.insurances.entity; package com.yifu.cloud.plus.v1.yifu.insurances.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.Data; import lombok.Data;
...@@ -20,6 +22,7 @@ public class TInsuranceEkp implements Serializable { ...@@ -20,6 +22,7 @@ public class TInsuranceEkp implements Serializable {
/** /**
* 主键id * 主键id
*/ */
@TableId(type = IdType.ASSIGN_ID)
private String id; private String id;
/** /**
......
...@@ -74,6 +74,12 @@ public class TInsuranceRefund extends BaseEntity { ...@@ -74,6 +74,12 @@ public class TInsuranceRefund extends BaseEntity {
@Schema(description = "创建人所在部门名称") @Schema(description = "创建人所在部门名称")
private String createUserDeptName; private String createUserDeptName;
/**
* 派单类型
*/
@Schema(description = " 购买类型, 1新增、3批增、4替换,5减员")
private Integer buyType;
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
......
package com.yifu.cloud.plus.v1.yifu.insurances.util;
import cn.hutool.json.JSONObject;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.EKPInteractiveParam;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.TInsuranceSettlePushParam;
import lombok.Getter;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.*;
import org.springframework.stereotype.Component;
import org.springframework.util.LinkedMultiValueMap;
import org.springframework.util.MultiValueMap;
import org.springframework.web.client.RestTemplate;
import java.time.LocalDate;
import java.time.format.DateTimeFormatter;
/**
* @author zhaji
* @description EKP交互工具类
*
* @date 2022-08-05 09:42:33
*/
@Slf4j
@Component
public class EKPUtil {
@Getter
public static String url;
@Getter
public static String LoginName;
@Getter
private static String fdModelId;
@Getter
private static String fdFlowId;
@Getter
private static String docStatus;
@Getter
private static String docSubject;
@Value("${ekp.url}")
public void setUrl(String db) {
url = db;
}
@Value("${ekp.LoginName}")
public void setLoginName(String db) {
LoginName = db;
}
@Value("${ekp.fdModelId}")
public void setFdModelId(String db) {
fdModelId = db;
}
@Value("${ekp.fdFlowId}")
public void setFdFlowId(String db) {
fdFlowId = db;
}
@Value("${ekp.docStatus}")
public void setDocStatus(String db) {
docStatus = db;
}
@Value("${ekp.docSubject}")
public void setDocSubject(String db) {
docSubject = db;
}
/**
* 多层级的VO对象,且包含上传功能的样例
* 注意key的书写格式,类似EL表达式的方式,属性关系用'.', 列表和数组关系用[],Map关系用["xxx"]
*/
public static String sendToEKP(EKPInteractiveParam param){
log.info("推送EKP开始");
RestTemplate yourRestTemplate = new RestTemplate();
TInsuranceSettlePushParam pushParam = insuranceDetail2PushParam(param);
try{
String formValues = new ObjectMapper().writeValueAsString(pushParam);
log.info("formValues:"+formValues);
//指向EKP的接口url
//把ModelingAppModelParameterAddForm转换成MultiValueMap
JSONObject loginName = new JSONObject();
loginName.append("LoginName",LoginName);
String loginData = new ObjectMapper().writeValueAsString(loginName);
MultiValueMap<String,Object> wholeForm = new LinkedMultiValueMap<>();
//wholeForm.add("docSubject", new String(docSubject.getBytes("UTF-8"),"ISO-8859-1") );
wholeForm.add("docSubject",docSubject);
wholeForm.add("docCreator", "{\"LoginName\":\"admin\"}");
//wholeForm.add("docCreator", loginData);
wholeForm.add("docStatus", docStatus);
wholeForm.add("fdModelId", fdModelId);
wholeForm.add("fdFlowId", fdFlowId);
//wholeForm.add("formValues", new String(formValues.getBytes("UTF-8"),"ISO-8859-1"));
wholeForm.add("formValues", formValues);
//wholeForm.add("formValues", new String("{\"fd_3adfe6af71a1cc\":\"王五\", \"fd_3adfe658c6229e\":\"2019-03-26\", \"fd_3adfe6592b4158\":\"这里内容\"}".getBytes("UTF-8"),"ISO-8859-1") );
//System.out.println("wholeForm:"+wholeForm);
HttpHeaders headers = new HttpHeaders();
//如果EKP对该接口启用了Basic认证,那么客户端需要加入
//addAuth(headers,"yourAccount"+":"+"yourPassword");是VO,则使用APPLICATION_JSON
headers.setContentType(MediaType.MULTIPART_FORM_DATA);
//必须设置上传类型,如果入参是字符串,使用MediaType.TEXT_PLAIN;如果
HttpEntity<MultiValueMap<String,Object>> entity = new HttpEntity<MultiValueMap<String,Object>>(wholeForm,headers);
//有返回值的情况 VO可以替换成具体的JavaBean
ResponseEntity<String> obj = yourRestTemplate.exchange(url, HttpMethod.POST, entity, String.class);
String body = obj.getBody();
if (StringUtils.isBlank(body)){
log.error("交易失败");
return null;
}else{
log.info("交易成功:"+body);
return body;
}
}catch (Exception e){
log.info(e.getMessage());
return null;
}
}
/**
* 将类转换成EKP要求的格式
*
* @author zhaji
* @param param 转换类
* @return {@link TInsuranceSettlePushParam}
*/
public static TInsuranceSettlePushParam insuranceDetail2PushParam(EKPInteractiveParam param){
String format = LocalDate.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd"));
TInsuranceSettlePushParam pushParam = new TInsuranceSettlePushParam();
param.setHappenDate(format);
//ekpId
if(null != param.getDetailId() && null != param.getDefaultSettleId()){
pushParam.setFd_3afa8a70006bea(param.getDetailId()+CommonConstants.DOWN_LINE_STRING+param.getDefaultSettleId());
}else{
pushParam.setFd_3afa8a70006bea(CommonConstants.EMPTY_STRING);
}
//单据类型
if(null != param.getSettleType()){
pushParam.setFd_3adfe6af71a1cc(param.getSettleType());
}else{
pushParam.setFd_3adfe6af71a1cc(CommonConstants.ZERO_INT);
}
//项目编码
pushParam.setFd_3adfe658c6229e(param.getDeptNo());
if(null != param.getDeptNo()){
pushParam.setFd_3adfe658c6229e(param.getDeptNo());
}else{
pushParam.setFd_3adfe658c6229e(CommonConstants.EMPTY_STRING);
}
//项目名称
pushParam.setFd_3adfe6592b4158(param.getDeptName());
if(null != param.getDeptName()){
pushParam.setFd_3adfe6592b4158(param.getDeptName());
}else{
pushParam.setFd_3adfe6592b4158(CommonConstants.EMPTY_STRING);
}
//客户编码
pushParam.setFd_3adfe6598281e8(param.getCustomerCode());
if(null != param.getCustomerCode()){
pushParam.setFd_3adfe6598281e8(param.getCustomerCode());
}else{
pushParam.setFd_3adfe6598281e8(CommonConstants.EMPTY_STRING);
}
//客户名称
pushParam.setFd_3adfe7a2688902(param.getCustomerName());
if(null != param.getCustomerName()){
pushParam.setFd_3adfe7a2688902(param.getCustomerName());
}else{
pushParam.setFd_3adfe7a2688902(CommonConstants.EMPTY_STRING);
}
//发生日期
pushParam.setFd_3adfe67c24dace(param.getHappenDate());
//姓名
pushParam.setFd_3adfe65d759650(param.getEmpName());
if(null != param.getEmpName()){
pushParam.setFd_3adfe65d759650(param.getEmpName());
}else{
pushParam.setFd_3adfe65d759650(CommonConstants.EMPTY_STRING);
}
//身份证号
pushParam.setFd_3adfe65dbd9f68(param.getEmpIdcardNo());
if(null != param.getEmpIdcardNo()){
pushParam.setFd_3adfe65dbd9f68(param.getEmpIdcardNo());
}else{
pushParam.setFd_3adfe65dbd9f68(CommonConstants.EMPTY_STRING);
}
//发票号
if(null != param.getInvoiceNo()){
pushParam.setFd_3adfe65e0cd094(param.getInvoiceNo());
}else{
pushParam.setFd_3adfe65e0cd094(CommonConstants.EMPTY_STRING);
}
//险种
if(null != param.getInsuranceTypeName()){
pushParam.setFd_3adfe65f6599e4(param.getInsuranceTypeName());
}else{
pushParam.setFd_3adfe65f6599e4(CommonConstants.EMPTY_STRING);
}
//保险公司
if(null != param.getInsuranceCompanyName()){
pushParam.setFd_3adfe65ea04728(param.getInsuranceCompanyName());
}else{
pushParam.setFd_3adfe65ea04728(CommonConstants.EMPTY_STRING);
}
//保单号
if(null != param.getPolicyNo()){
pushParam.setFd_3adfe65e60e110(param.getPolicyNo());
}else{
pushParam.setFd_3adfe65e60e110(CommonConstants.EMPTY_STRING);
}
//保险开始日期
if(null != param.getPolicyStart()){
pushParam.setFd_3adfe6b7e0ede8(param.getPolicyStart().toString());
}else{
pushParam.setFd_3adfe6b7e0ede8(CommonConstants.EMPTY_STRING);
}
//保险结束日期
if(null != param.getPolicyEnd()){
pushParam.setFd_3adfe6b847bfe6(param.getPolicyEnd().toString());
}else{
pushParam.setFd_3adfe6b847bfe6(CommonConstants.EMPTY_STRING);
}
//购买标准
pushParam.setFd_3adfe6d55384c6(param.getBuyStandard());
if(null != param.getBuyStandard()){
pushParam.setFd_3adfe6d55384c6(param.getBuyStandard());
}else{
pushParam.setFd_3adfe6d55384c6(CommonConstants.EMPTY_STRING);
}
//实际保费
if(null != param.getActualPremium()){
pushParam.setFd_3adfe6610c0d2c(param.getActualPremium().toString());
}else{
pushParam.setFd_3adfe6610c0d2c(CommonConstants.EMPTY_STRING);
}
//医保
if(null != param.getMedicalQuota()){
pushParam.setFd_3adfe66041a996(param.getMedicalQuota());
}else{
pushParam.setFd_3adfe66041a996(CommonConstants.EMPTY_STRING);
}
//事故或残疾
if(null != param.getDieDisableQuota()){
pushParam.setFd_3adfe6609aa810(param.getDieDisableQuota());
}else{
pushParam.setFd_3adfe6609aa810(CommonConstants.EMPTY_STRING);
}
//预估保费
if(null != param.getEstimatePremium()){
pushParam.setFd_3adfe6e30f2a3c(param.getEstimatePremium().toString());
}else{
pushParam.setFd_3adfe6e30f2a3c(CommonConstants.EMPTY_STRING);
}
//结算月
if(null != param.getSettleMonth()){
pushParam.setFd_3aea2f0180eccc(param.getSettleMonth());
}else{
pushParam.setFd_3aea2f0180eccc(CommonConstants.EMPTY_STRING);
}
//交易类型
if(null != param.getInteractiveType()){
pushParam.setFd_3af9197b31071c(param.getInteractiveType());
}else{
pushParam.setFd_3af9197b31071c(CommonConstants.ZERO_INT);
}
return pushParam;
}
}
...@@ -171,4 +171,9 @@ public class EKPInteractiveParam implements Serializable { ...@@ -171,4 +171,9 @@ public class EKPInteractiveParam implements Serializable {
@Schema(description = "1推送预估费用,2推送实缴费用,3变更结算月,4推送作废信息,5推送红冲信息,6投保退回红冲,7变更保单保费") @Schema(description = "1推送预估费用,2推送实缴费用,3变更结算月,4推送作废信息,5推送红冲信息,6投保退回红冲,7变更保单保费")
private Integer pushType; private Integer pushType;
/**
* 有无预估
*/
@Schema(description = "状态:有,无")
private String estimateStatus;
} }
...@@ -23,6 +23,12 @@ public class TInsuranceSettlePushParam{ ...@@ -23,6 +23,12 @@ public class TInsuranceSettlePushParam{
@Schema(description = "单据类型") @Schema(description = "单据类型")
private Integer fd_3adfe6af71a1cc; private Integer fd_3adfe6af71a1cc;
/**
* 交易类型 200
*/
@Schema(description = "交易类型 1新增结算单,2作废结算信息,3更新保单信息")
private Integer fd_3af9197b31071c;
/** /**
* 项目编码 200 * 项目编码 200
*/ */
...@@ -134,19 +140,12 @@ public class TInsuranceSettlePushParam{ ...@@ -134,19 +140,12 @@ public class TInsuranceSettlePushParam{
@Schema(description = "预估保费") @Schema(description = "预估保费")
private String fd_3adfe6e30f2a3c; private String fd_3adfe6e30f2a3c;
/** /**
* 结算月份 200 * 结算月份 200
*/ */
@Schema(description = "结算月份") @Schema(description = "结算月份")
private String fd_3aea2f0180eccc; private String fd_3aea2f0180eccc;
/**
* 交易类型 200
*/
@Schema(description = "交易类型 1新增结算单,2作废结算信息,3更新保单信息")
private Integer fd_3af9197b31071c;
/** /**
* 商险ID 200 * 商险ID 200
*/ */
......
...@@ -65,6 +65,12 @@ ...@@ -65,6 +65,12 @@
<artifactId>commons-collections</artifactId> <artifactId>commons-collections</artifactId>
<version>3.2.2</version> <version>3.2.2</version>
</dependency> </dependency>
<dependency>
<groupId>com.yifu.cloud.plus.v1</groupId>
<artifactId>yifu-common-ekp</artifactId>
<version>1.0.0</version>
<scope>compile</scope>
</dependency>
</dependencies> </dependencies>
<build> <build>
......
...@@ -216,16 +216,6 @@ public interface TInsuranceDetailMapper extends BaseMapper<TInsuranceDetail> { ...@@ -216,16 +216,6 @@ public interface TInsuranceDetailMapper extends BaseMapper<TInsuranceDetail> {
*/ */
TInsuranceDetail selectByRegionSql(@Param("regionSql") String regionSql, @Param("id") String id); TInsuranceDetail selectByRegionSql(@Param("regionSql") String regionSql, @Param("id") String id);
/**
* 商险订单投保列表查询
*
* @author zhaji
* @param page
* @param param
* @return {@link IPage< InsuredOrderListVo>}
*/
IPage<InsuredOrderListVo> getOrderInsuredListPage(Page<InsuredOrderListVo> page,@Param("param") InsuredOrderParam param);
/** /**
* 商险订单减员列表查询 * 商险订单减员列表查询
* *
...@@ -234,7 +224,7 @@ public interface TInsuranceDetailMapper extends BaseMapper<TInsuranceDetail> { ...@@ -234,7 +224,7 @@ public interface TInsuranceDetailMapper extends BaseMapper<TInsuranceDetail> {
* @param param * @param param
* @return {@link IPage< InsuredOrderListVo>} * @return {@link IPage< InsuredOrderListVo>}
*/ */
IPage<InsuredOrderListVo> getOrderRefundInsuredListPage(Page<InsuredOrderListVo> page,@Param("param") InsuredOrderParam param); IPage<InsuredOrderListVo> getOrderInsuredListPage(Page<InsuredOrderListVo> page, @Param("param") InsuredOrderParam param);
} }
...@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; ...@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants; import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
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.ekp.util.EKPInsuranceUtil;
import com.yifu.cloud.plus.v1.yifu.insurances.constants.InsurancesConstants; import com.yifu.cloud.plus.v1.yifu.insurances.constants.InsurancesConstants;
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.TInsuranceEkp; import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceEkp;
...@@ -16,12 +17,12 @@ import com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.TInsuranceEkpSer ...@@ -16,12 +17,12 @@ import com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.TInsuranceEkpSer
import com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.TInsuranceSettleService; import com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.TInsuranceSettleService;
import com.yifu.cloud.plus.v1.yifu.insurances.util.BeanCopyUtils; import com.yifu.cloud.plus.v1.yifu.insurances.util.BeanCopyUtils;
import com.yifu.cloud.plus.v1.yifu.insurances.util.BigDecimalUtils; import com.yifu.cloud.plus.v1.yifu.insurances.util.BigDecimalUtils;
import com.yifu.cloud.plus.v1.yifu.insurances.util.EKPUtil;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.EKPInteractiveParam; import com.yifu.cloud.plus.v1.yifu.insurances.vo.EKPInteractiveParam;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.SettleVo; import com.yifu.cloud.plus.v1.yifu.insurances.vo.SettleVo;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy; import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -40,6 +41,9 @@ import java.util.List; ...@@ -40,6 +41,9 @@ import java.util.List;
@Slf4j @Slf4j
public class TInsuranceEkpServiceImpl extends ServiceImpl<TInsuranceEkpMapper, TInsuranceEkp> implements TInsuranceEkpService { public class TInsuranceEkpServiceImpl extends ServiceImpl<TInsuranceEkpMapper, TInsuranceEkp> implements TInsuranceEkpService {
@Resource
EKPInsuranceUtil eKPInsuranceUtil;
@Resource @Resource
TInsuranceSettleService tInsuranceSettleService; TInsuranceSettleService tInsuranceSettleService;
@Resource @Resource
...@@ -83,7 +87,7 @@ public class TInsuranceEkpServiceImpl extends ServiceImpl<TInsuranceEkpMapper, T ...@@ -83,7 +87,7 @@ public class TInsuranceEkpServiceImpl extends ServiceImpl<TInsuranceEkpMapper, T
EKPInteractiveParam ekpParam = new EKPInteractiveParam(); EKPInteractiveParam ekpParam = new EKPInteractiveParam();
BeanCopyUtils.copyProperties(tInsuranceEkp,ekpParam); BeanCopyUtils.copyProperties(tInsuranceEkp,ekpParam);
if(actualStatus.equals(InsurancesConstants.SETTLE_ZERO)){ if(actualStatus.equals(InsurancesConstants.SETTLE_ZERO)){
String s = EKPUtil.sendToEKP(ekpParam); String s = eKPInsuranceUtil.sendToEKP(ekpParam);
//如果发送成功 //如果发送成功
if (StringUtils.isNotBlank(s)){ if (StringUtils.isNotBlank(s)){
//预估则更新预估保费 //预估则更新预估保费
...@@ -130,7 +134,7 @@ public class TInsuranceEkpServiceImpl extends ServiceImpl<TInsuranceEkpMapper, T ...@@ -130,7 +134,7 @@ public class TInsuranceEkpServiceImpl extends ServiceImpl<TInsuranceEkpMapper, T
ekpParam.setActualPremium(actualPremium.negate()); ekpParam.setActualPremium(actualPremium.negate());
} }
ekpParam.setInteractiveType(CommonConstants.ONE_INT); ekpParam.setInteractiveType(CommonConstants.ONE_INT);
String s = EKPUtil.sendToEKP(ekpParam); String s = eKPInsuranceUtil.sendToEKP(ekpParam);
if(StringUtils.isNotBlank(s)){ if(StringUtils.isNotBlank(s)){
tInsuranceEkp.setResendFlag(CommonConstants.ONE_INT); tInsuranceEkp.setResendFlag(CommonConstants.ONE_INT);
successLit.add(tInsuranceEkp); successLit.add(tInsuranceEkp);
...@@ -139,7 +143,7 @@ public class TInsuranceEkpServiceImpl extends ServiceImpl<TInsuranceEkpMapper, T ...@@ -139,7 +143,7 @@ public class TInsuranceEkpServiceImpl extends ServiceImpl<TInsuranceEkpMapper, T
} }
//如果为红冲数据则正常发送 //如果为红冲数据则正常发送
}else if(CommonConstants.FIVE_INT == pushType || CommonConstants.SIX_INT == pushType){ }else if(CommonConstants.FIVE_INT == pushType || CommonConstants.SIX_INT == pushType){
String s = EKPUtil.sendToEKP(ekpParam); String s = eKPInsuranceUtil.sendToEKP(ekpParam);
if(StringUtils.isNotBlank(s)){ if(StringUtils.isNotBlank(s)){
tInsuranceEkp.setResendFlag(CommonConstants.ONE_INT); tInsuranceEkp.setResendFlag(CommonConstants.ONE_INT);
successLit.add(tInsuranceEkp); successLit.add(tInsuranceEkp);
......
...@@ -258,6 +258,7 @@ ...@@ -258,6 +258,7 @@
</if> </if>
ORDER BY detail.BUY_HANDLE_STATUS,detail.CREATE_TIME DESC ORDER BY detail.BUY_HANDLE_STATUS,detail.CREATE_TIME DESC
</select> </select>
<!--通过id查询商险信息-->
<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">
select select
detail.id as id, detail.id as id,
...@@ -305,7 +306,7 @@ ...@@ -305,7 +306,7 @@
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}
</select> </select>
<!-- 导出办理勾选查询结果--> <!--导出办理勾选查询结果-->
<select id="getInsuranceExportListBySelect" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceExportListVO"> <select id="getInsuranceExportListBySelect" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceExportListVO">
select detail.id as id, select detail.id as id,
detail.DEPT_NO as deptNo, detail.DEPT_NO as deptNo,
...@@ -389,11 +390,13 @@ ...@@ -389,11 +390,13 @@
</if> </if>
ORDER BY detail.CREATE_TIME DESC ORDER BY detail.CREATE_TIME DESC
</select> </select>
<!--批量更新保单号-->
<update id="updatePolicyNoBatch"> <update id="updatePolicyNoBatch">
<foreach collection="details" index="index" item="item" separator=";"> <foreach collection="details" index="index" item="item" separator=";">
update t_insurance_detail set POLICY_NO = #{item.policyNo} where ID = #{item.id} update t_insurance_detail set POLICY_NO = #{item.policyNo} where ID = #{item.id}
</foreach> </foreach>
</update> </update>
<!--批量更新发票号-->
<update id="updateInvoiceNoBatch"> <update id="updateInvoiceNoBatch">
<foreach collection="details" index="index" item="item" separator=";"> <foreach collection="details" index="index" item="item" separator=";">
update t_insurance_detail set INVOICE_NO = #{item.invoiceNo} where ID = #{item.id} update t_insurance_detail set INVOICE_NO = #{item.invoiceNo} where ID = #{item.id}
...@@ -904,6 +907,7 @@ ...@@ -904,6 +907,7 @@
</where> </where>
ORDER BY CREATE_TIME desc ORDER BY CREATE_TIME desc
</select> </select>
<!--查询所有在保,未出险,未过期,未失效,未减员的保单信息-->
<select id="selectListByEmpIdcardNo" resultType="com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail"> <select id="selectListByEmpIdcardNo" resultType="com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail">
SELECT SELECT
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
...@@ -934,8 +938,8 @@ ...@@ -934,8 +938,8 @@
</where> </where>
ORDER BY CREATE_TIME desc ORDER BY CREATE_TIME desc
</select> </select>
<!--商险订单减员列表查询--> <!--商险订单列表查询-->
<select id="getOrderRefundInsuredListPage" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuredOrderListVo"> <select id="getOrderInsuredListPage" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuredOrderListVo">
( (
select select
detail.id as id, detail.id as id,
...@@ -1021,45 +1025,5 @@ ...@@ -1021,45 +1025,5 @@
</if> </if>
)order by createTime desc )order by createTime desc
</select> </select>
<select id="getOrderInsuredListPage" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuredOrderListVo">
select
detail.id as id,
detail.BUY_TYPE as buyType,
detail.EMP_NAME as empName,
detail.EMP_IDCARD_NO as empIdcardNo,
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.CREATE_NAME as createName,
detail.CREATE_USER_DEPT_NAME as createUserDeptName,
detail.CREATE_TIME as createTime,
detail.BUY_HANDLE_STATUS as buyHandleStatus
from
t_insurance_detail detail
where
detail.DELETE_FLAG = 0
and
detail.ORDER_NO = #{param.orderNo}
<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.startDate != null and param.startDate.trim() != ''">
AND detail.CREATE_TIME <![CDATA[ >= ]]> concat(#{param.startDate}, '00:00:00')
</if>
<if test="param.endDate != null and param.endDate.trim() != ''">
AND detail.CREATE_TIME <![CDATA[ <= ]]> concat(#{param.endDate}, '23:59:59')
</if>
<if test="param.deptNoList != null">
and detail.DEPT_NO in
<foreach collection="param.deptNoList" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
</select>
</mapper> </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