Commit ddebfb8b by wubh

包活干V1.9.0-修改:保单列表查询方式

git-svn-id: svn://192.168.3.233/frms/code/car-service/trunk/car-service@27032 aeb6102e-e053-11e5-9fec-f9ebc45caf4b
1 parent f50d2d9e
...@@ -61,9 +61,13 @@ public class InsuranceReq extends PagedReq { ...@@ -61,9 +61,13 @@ public class InsuranceReq extends PagedReq {
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
//@DateTimeFormat(pattern = "yyyy-MM-dd") //@DateTimeFormat(pattern = "yyyy-MM-dd")
private Date startTimeEnd; private Date startTimeEnd;
/**
* 关键词
*/
private String keyWord;
public Integer getId() { public Integer getId() {
return this.id; return id;
} }
public void setId(Integer id) { public void setId(Integer id) {
...@@ -71,7 +75,7 @@ public class InsuranceReq extends PagedReq { ...@@ -71,7 +75,7 @@ public class InsuranceReq extends PagedReq {
} }
public String getInsuranceId() { public String getInsuranceId() {
return this.insuranceId; return insuranceId;
} }
public void setInsuranceId(String insuranceId) { public void setInsuranceId(String insuranceId) {
...@@ -79,7 +83,7 @@ public class InsuranceReq extends PagedReq { ...@@ -79,7 +83,7 @@ public class InsuranceReq extends PagedReq {
} }
public String getVehicleOwnerName() { public String getVehicleOwnerName() {
return this.vehicleOwnerName; return vehicleOwnerName;
} }
public void setVehicleOwnerName(String vehicleOwnerName) { public void setVehicleOwnerName(String vehicleOwnerName) {
...@@ -87,7 +91,7 @@ public class InsuranceReq extends PagedReq { ...@@ -87,7 +91,7 @@ public class InsuranceReq extends PagedReq {
} }
public String getVin() { public String getVin() {
return this.vin; return vin;
} }
public void setVin(String vin) { public void setVin(String vin) {
...@@ -95,7 +99,7 @@ public class InsuranceReq extends PagedReq { ...@@ -95,7 +99,7 @@ public class InsuranceReq extends PagedReq {
} }
public String getGpsNo() { public String getGpsNo() {
return this.gpsNo; return gpsNo;
} }
public void setGpsNo(String gpsNo) { public void setGpsNo(String gpsNo) {
...@@ -103,7 +107,7 @@ public class InsuranceReq extends PagedReq { ...@@ -103,7 +107,7 @@ public class InsuranceReq extends PagedReq {
} }
public Byte getStatus() { public Byte getStatus() {
return this.status; return status;
} }
public void setStatus(Byte status) { public void setStatus(Byte status) {
...@@ -111,7 +115,7 @@ public class InsuranceReq extends PagedReq { ...@@ -111,7 +115,7 @@ public class InsuranceReq extends PagedReq {
} }
public Date getApplyTimeStart() { public Date getApplyTimeStart() {
return this.applyTimeStart; return applyTimeStart;
} }
public void setApplyTimeStart(Date applyTimeStart) { public void setApplyTimeStart(Date applyTimeStart) {
...@@ -119,7 +123,7 @@ public class InsuranceReq extends PagedReq { ...@@ -119,7 +123,7 @@ public class InsuranceReq extends PagedReq {
} }
public Date getApplyTimeEnd() { public Date getApplyTimeEnd() {
return this.applyTimeEnd; return applyTimeEnd;
} }
public void setApplyTimeEnd(Date applyTimeEnd) { public void setApplyTimeEnd(Date applyTimeEnd) {
...@@ -127,7 +131,7 @@ public class InsuranceReq extends PagedReq { ...@@ -127,7 +131,7 @@ public class InsuranceReq extends PagedReq {
} }
public Date getStartTimeStart() { public Date getStartTimeStart() {
return this.startTimeStart; return startTimeStart;
} }
public void setStartTimeStart(Date startTimeStart) { public void setStartTimeStart(Date startTimeStart) {
...@@ -135,26 +139,35 @@ public class InsuranceReq extends PagedReq { ...@@ -135,26 +139,35 @@ public class InsuranceReq extends PagedReq {
} }
public Date getStartTimeEnd() { public Date getStartTimeEnd() {
return this.startTimeEnd; return startTimeEnd;
} }
public void setStartTimeEnd(Date startTimeEnd) { public void setStartTimeEnd(Date startTimeEnd) {
this.startTimeEnd = startTimeEnd; this.startTimeEnd = startTimeEnd;
} }
public String getKeyWord() {
return keyWord;
}
public void setKeyWord(String keyWord) {
this.keyWord = keyWord;
}
@Override @Override
public String toString() { public String toString() {
return "InsuranceReq{" + return "InsuranceReq{" +
"id=" + this.id + "id=" + id +
", insuranceId='" + this.insuranceId + '\'' + ", insuranceId='" + insuranceId + '\'' +
", vehicleOwnerName='" + this.vehicleOwnerName + '\'' + ", vehicleOwnerName='" + vehicleOwnerName + '\'' +
", vin='" + this.vin + '\'' + ", vin='" + vin + '\'' +
", gpsNo='" + this.gpsNo + '\'' + ", gpsNo='" + gpsNo + '\'' +
", status=" + this.status + ", status=" + status +
", applyTimeStart=" + this.applyTimeStart + ", applyTimeStart=" + applyTimeStart +
", applyTimeEnd=" + this.applyTimeEnd + ", applyTimeEnd=" + applyTimeEnd +
", startTimeStart=" + this.startTimeStart + ", startTimeStart=" + startTimeStart +
", startTimeEnd=" + this.startTimeEnd + ", startTimeEnd=" + startTimeEnd +
", keyWord='" + keyWord + '\'' +
"} " + super.toString(); "} " + super.toString();
} }
} }
...@@ -148,18 +148,18 @@ public class InsuranceServiceImpl extends BaseOrderService implements InsuranceS ...@@ -148,18 +148,18 @@ public class InsuranceServiceImpl extends BaseOrderService implements InsuranceS
SysInsurancePolicyExample.Criteria byExample = example.createCriteria(); SysInsurancePolicyExample.Criteria byExample = example.createCriteria();
// 根据多个条件动态查询 // 根据多个条件动态查询
if (StringUtils.isNotBlank(insuranceReq.getVehicleOwnerName())) { //if (StringUtils.isNotBlank(insuranceReq.getVehicleOwnerName())) {
byExample.andVehicleOwnerNameLike( // byExample.andVehicleOwnerNameLike(
"%" + insuranceReq.getVehicleOwnerName() + "%"); // "%" + insuranceReq.getVehicleOwnerName() + "%");
} //}
//
if (StringUtils.isNotBlank(insuranceReq.getVin())) { //if (StringUtils.isNotBlank(insuranceReq.getVin())) {
byExample.andVinLike("%" + insuranceReq.getVin() + "%"); // byExample.andVinLike("%" + insuranceReq.getVin() + "%");
} //}
//
if (StringUtils.isNotBlank(insuranceReq.getGpsNo())) { //if (StringUtils.isNotBlank(insuranceReq.getGpsNo())) {
byExample.andGpsNoLike("%" + insuranceReq.getGpsNo() + "%"); // byExample.andGpsNoLike("%" + insuranceReq.getGpsNo() + "%");
} //}
if (insuranceReq.getStatus() != null) { if (insuranceReq.getStatus() != null) {
byExample.andStatusEqualTo(insuranceReq.getStatus()); byExample.andStatusEqualTo(insuranceReq.getStatus());
...@@ -183,6 +183,13 @@ public class InsuranceServiceImpl extends BaseOrderService implements InsuranceS ...@@ -183,6 +183,13 @@ public class InsuranceServiceImpl extends BaseOrderService implements InsuranceS
byExample.andExpectedEffectiveTimeLessThan(insuranceReq.getStartTimeEnd()); byExample.andExpectedEffectiveTimeLessThan(insuranceReq.getStartTimeEnd());
} }
// 使用关键词查询
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;
......
...@@ -121,7 +121,7 @@ ...@@ -121,7 +121,7 @@
</sql> </sql>
<sql id="joinClause"> <sql id="joinClause">
JOIN sys_insurance_data LEFT JOIN sys_insurance_data
ON sys_insurance_policy.id = sys_insurance_data.policy_id ON sys_insurance_policy.id = sys_insurance_data.policy_id
</sql> </sql>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!