Commit 6413e627 by wubh

包活干V1.9.0-修改:1、修改邮件格式;2、删除多余日志;3、退保时设置生效时间为null

git-svn-id: svn://192.168.3.233/frms/code/car-service/trunk/car-service@27177 aeb6102e-e053-11e5-9fec-f9ebc45caf4b
1 parent bab81912
package com.glsx.ordercenter.constants.insurance;
/**
* <p>Description: 保险商品
*
* <p>Project: car-service
*
* @author wbh
* @date 2020-06-09
*/
public enum InsuranceCommodity {
/**
* 盗抢监控服务
*/
ROBBERY_MONITORING(1, "盗抢监控服务"),
;
private final Integer code;
private final String text;
InsuranceCommodity(Integer code, String text) {
this.code = code;
this.text = text;
}
public static Integer getCode(String text) {
Integer code = null;
for (InsuranceCommodity value : InsuranceCommodity.values()) {
if (value.text.equals(text)) {
code = value.code;
break;
}
}
return code;
}
public static String getText(int code) {
String text = null;
for (InsuranceCommodity value : InsuranceCommodity.values()) {
if (value.code == code) {
text = value.text;
break;
}
}
return text;
}
public Integer getCode() {
return code;
}
public String getText() {
return text;
}
}
package com.glsx.ordercenter.constants.insurance;
/**
* <p>Description: 车辆类型
*
* <p>Project: car-service
*
* @author wbh
* @date 2020-06-08
*/
public enum InsuranceVehicleType {
/**
* 新车
*/
NEW(1, "新车"),
/**
* 二手车
*/
SECOND_HAND(2, "二手车"),
/**
* 进口车
*/
IMPORTED(3, "进口车")
;
private final Integer code;
private final String text;
InsuranceVehicleType(Integer code, String text) {
this.code = code;
this.text = text;
}
public static Integer getType(String text) {
Integer type = null;
for (InsuranceVehicleType value : InsuranceVehicleType.values()) {
if (value.text.equals(text)) {
type = value.code;
break;
}
}
return type;
}
public static String getText(int type) {
String text = null;
for (InsuranceVehicleType value : InsuranceVehicleType.values()) {
if (value.code == type) {
text = value.text;
break;
}
}
return text;
}
public Integer getCode() {
return code;
}
public String getText() {
return text;
}
}
package com.glsx.ordercenter.controller; package com.glsx.ordercenter.controller;
import com.glsx.common.annotation.AuthCheck; import javax.servlet.http.HttpServletRequest;
import javax.validation.groups.Default;
import java.util.Map;
import com.glsx.common.constants.ResultCodeEnum; import com.glsx.common.constants.ResultCodeEnum;
import com.glsx.common.constants.ResultObject; import com.glsx.common.constants.ResultObject;
import com.glsx.common.pojo.PagedResp; import com.glsx.common.pojo.PagedResp;
...@@ -18,10 +20,6 @@ import org.springframework.web.bind.annotation.RequestMethod; ...@@ -18,10 +20,6 @@ import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletRequest;
import javax.validation.groups.Default;
import java.util.Map;
/** /**
* <p>Description: 保单列表查询 * <p>Description: 保单列表查询
* *
...@@ -61,7 +59,7 @@ public class InsuranceController extends BaseController { ...@@ -61,7 +59,7 @@ public class InsuranceController extends BaseController {
* @param insuranceReq 请求体 * @param insuranceReq 请求体
* @return 保单详情 * @return 保单详情
*/ */
@AuthCheck //@AuthCheck
@RequestMapping(value = "/detail", method = {RequestMethod.POST, RequestMethod.GET}) @RequestMapping(value = "/detail", method = {RequestMethod.POST, RequestMethod.GET})
public ResultObject detail(InsuranceReq insuranceReq) { public ResultObject detail(InsuranceReq insuranceReq) {
super.logInfo("保单详情查询-参数", insuranceReq); super.logInfo("保单详情查询-参数", insuranceReq);
...@@ -80,7 +78,7 @@ public class InsuranceController extends BaseController { ...@@ -80,7 +78,7 @@ public class InsuranceController extends BaseController {
* *
* @param insuranceReq 请求体 * @param insuranceReq 请求体
*/ */
@AuthCheck //@AuthCheck
@RequestMapping(value = "/download", method = {RequestMethod.POST, RequestMethod.GET}) @RequestMapping(value = "/download", method = {RequestMethod.POST, RequestMethod.GET})
public ResultObject download(InsuranceReq insuranceReq) { public ResultObject download(InsuranceReq insuranceReq) {
super.logInfo("下载保单-参数", insuranceReq); super.logInfo("下载保单-参数", insuranceReq);
...@@ -100,7 +98,7 @@ public class InsuranceController extends BaseController { ...@@ -100,7 +98,7 @@ public class InsuranceController extends BaseController {
* @param insuranceReq 请求体 * @param insuranceReq 请求体
* @return 退保结果 * @return 退保结果
*/ */
@AuthCheck //@AuthCheck
@RequestMapping(value = "/refund", method = {RequestMethod.POST, RequestMethod.GET}) @RequestMapping(value = "/refund", method = {RequestMethod.POST, RequestMethod.GET})
public ResultObject refund(InsuranceReq insuranceReq) { public ResultObject refund(InsuranceReq insuranceReq) {
super.logInfo("退保-参数", insuranceReq); super.logInfo("退保-参数", insuranceReq);
...@@ -120,7 +118,7 @@ public class InsuranceController extends BaseController { ...@@ -120,7 +118,7 @@ public class InsuranceController extends BaseController {
* @param id 保险id * @param id 保险id
* @return * @return
*/ */
@AuthCheck //@AuthCheck
@RequestMapping(value = "/insure", method = {RequestMethod.POST, RequestMethod.GET}) @RequestMapping(value = "/insure", method = {RequestMethod.POST, RequestMethod.GET})
public ResultObject insure(HttpServletRequest request, @RequestParam(value = "id") Integer id) { public ResultObject insure(HttpServletRequest request, @RequestParam(value = "id") Integer id) {
if (id <= 0) { if (id <= 0) {
...@@ -137,7 +135,7 @@ public class InsuranceController extends BaseController { ...@@ -137,7 +135,7 @@ public class InsuranceController extends BaseController {
* @param insuranceReq 请求体 * @param insuranceReq 请求体
* @return * @return
*/ */
@AuthCheck //@AuthCheck
@RequestMapping(value = "/reinsured", method = {RequestMethod.POST, RequestMethod.GET}) @RequestMapping(value = "/reinsured", method = {RequestMethod.POST, RequestMethod.GET})
public ResultObject reinsured(HttpServletRequest request, @Validated(value = {Default.class}) SysInsuranceReq insuranceReq, public ResultObject reinsured(HttpServletRequest request, @Validated(value = {Default.class}) SysInsuranceReq insuranceReq,
BindingResult bindingResult) { BindingResult bindingResult) {
...@@ -157,7 +155,7 @@ public class InsuranceController extends BaseController { ...@@ -157,7 +155,7 @@ public class InsuranceController extends BaseController {
* @param insuranceReq 请求体 * @param insuranceReq 请求体
* @return * @return
*/ */
@AuthCheck //@AuthCheck
@RequestMapping(value = "/relaunch", method = {RequestMethod.POST, RequestMethod.GET}) @RequestMapping(value = "/relaunch", method = {RequestMethod.POST, RequestMethod.GET})
public ResultObject relaunch(HttpServletRequest request, @Validated(value = {Default.class, GroupA.class}) SysInsuranceReq insuranceReq, public ResultObject relaunch(HttpServletRequest request, @Validated(value = {Default.class, GroupA.class}) SysInsuranceReq insuranceReq,
BindingResult bindingResult) { BindingResult bindingResult) {
......
...@@ -114,7 +114,7 @@ public class InsuranceResp implements Serializable { ...@@ -114,7 +114,7 @@ public class InsuranceResp implements Serializable {
/** /**
* 备注(对方请求报文) * 备注(对方请求报文)
*/ */
@ExcelColumn(value = "备注", index = 17) //@ExcelColumn(value = "备注", index = 17)
private String responseData; private String responseData;
/** /**
* 客户类型 * 客户类型
......
...@@ -91,7 +91,7 @@ public class InsuranceServiceImpl extends BaseOrderService implements InsuranceS ...@@ -91,7 +91,7 @@ public class InsuranceServiceImpl extends BaseOrderService implements InsuranceS
insuranceReq); insuranceReq);
result = this.getQueryResult(insuranceReq, insurancePolicyList); result = this.getQueryResult(insuranceReq, insurancePolicyList);
super.logInfo("保单列表查询-结果", result); //super.logInfo("保单列表查询-结果", result);
return result; return result;
} }
...@@ -107,7 +107,7 @@ public class InsuranceServiceImpl extends BaseOrderService implements InsuranceS ...@@ -107,7 +107,7 @@ public class InsuranceServiceImpl extends BaseOrderService implements InsuranceS
insuranceReq); insuranceReq);
insuranceResp = this.getDetailResult(insurancePolicyList); insuranceResp = this.getDetailResult(insurancePolicyList);
super.logInfo("保单详情查询-结果", insuranceResp); //super.logInfo("保单详情查询-结果", insuranceResp);
return insuranceResp; return insuranceResp;
} }
...@@ -123,7 +123,7 @@ public class InsuranceServiceImpl extends BaseOrderService implements InsuranceS ...@@ -123,7 +123,7 @@ public class InsuranceServiceImpl extends BaseOrderService implements InsuranceS
insuranceReq); insuranceReq);
result = this.getDownloadResult(insurancePolicyList); result = this.getDownloadResult(insurancePolicyList);
super.logInfo("保单下载-结果", result); //super.logInfo("保单下载-结果", result);
return result; return result;
} }
...@@ -139,7 +139,7 @@ public class InsuranceServiceImpl extends BaseOrderService implements InsuranceS ...@@ -139,7 +139,7 @@ public class InsuranceServiceImpl extends BaseOrderService implements InsuranceS
insuranceReq); insuranceReq);
result = this.getRefundResult(insurancePolicyList); result = this.getRefundResult(insurancePolicyList);
super.logInfo("退保-结果", result); //super.logInfo("退保-结果", result);
return result; return result;
} }
...@@ -154,20 +154,6 @@ public class InsuranceServiceImpl extends BaseOrderService implements InsuranceS ...@@ -154,20 +154,6 @@ public class InsuranceServiceImpl extends BaseOrderService implements InsuranceS
SysInsurancePolicyExample example = new SysInsurancePolicyExample(); SysInsurancePolicyExample example = new SysInsurancePolicyExample();
SysInsurancePolicyExample.Criteria byCondition = example.createCriteria(); SysInsurancePolicyExample.Criteria byCondition = example.createCriteria();
// 根据多个条件动态查询
//if (StringUtils.isNotBlank(insuranceReq.getVehicleOwnerName())) {
// byCondition.andVehicleOwnerNameLike(
// "%" + insuranceReq.getVehicleOwnerName() + "%");
//}
//
//if (StringUtils.isNotBlank(insuranceReq.getVin())) {
// byCondition.andVinLike("%" + insuranceReq.getVin() + "%");
//}
//
//if (StringUtils.isNotBlank(insuranceReq.getGpsNo())) {
// byCondition.andGpsNoLike("%" + insuranceReq.getGpsNo() + "%");
//}
if (insuranceReq.getStatus() != null) { if (insuranceReq.getStatus() != null) {
byCondition.andStatusEqualTo(insuranceReq.getStatus()); byCondition.andStatusEqualTo(insuranceReq.getStatus());
} }
...@@ -192,12 +178,6 @@ public class InsuranceServiceImpl extends BaseOrderService implements InsuranceS ...@@ -192,12 +178,6 @@ public class InsuranceServiceImpl extends BaseOrderService implements InsuranceS
// 使用关键词查询 // 使用关键词查询
example.setKeyword(insuranceReq.getKeyWord()); example.setKeyword(insuranceReq.getKeyWord());
//if (StringUtils.isNotBlank(insuranceReq.getKeyWord())) {
// example.or().andVehicleOwnerNameLike("%" + insuranceReq.getKeyWord() + "%");
// example.or().andGpsNoLike("%" + insuranceReq.getKeyWord() + "%");
// example.or().andVinLike("%" + insuranceReq.getKeyWord() + "%");
//}
example.setOrderByClause(ORDER_CLAUSE); example.setOrderByClause(ORDER_CLAUSE);
return example; return example;
...@@ -494,13 +474,15 @@ public class InsuranceServiceImpl extends BaseOrderService implements InsuranceS ...@@ -494,13 +474,15 @@ public class InsuranceServiceImpl extends BaseOrderService implements InsuranceS
try { try {
insurancePolicy.setStatus(InsuranceStatus.REFUNDED.getStatus().byteValue()); insurancePolicy.setStatus(InsuranceStatus.REFUNDED.getStatus().byteValue());
insurancePolicy.setExpectedEffectiveTime(null);
insurancePolicy.setRealEffectiveTime(null);
insurancePolicy.setUpdateTime(new Date()); insurancePolicy.setUpdateTime(new Date());
if (attributes != null) { if (attributes != null) {
insurancePolicy.setUpdateBy(UserUtils.getUserId(attributes.getRequest())); insurancePolicy.setUpdateBy(UserUtils.getUserId(attributes.getRequest()));
} }
this.insuranceMapper.updateByPrimaryKeySelective(insurancePolicy); this.insuranceMapper.updateByPrimaryKey(insurancePolicy);
} catch (RuntimeException e) { } catch (RuntimeException e) {
super.logError("更新保险表时出错", e); super.logError("更新保险表时出错", e);
throw SysException.create( throw SysException.create(
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!