Commit ac1ce209 by 王军业

[改正从数据库中查询的日期格式]

1 parent f2aa3fe3
...@@ -13,6 +13,7 @@ import org.springframework.web.bind.annotation.RestController; ...@@ -13,6 +13,7 @@ import org.springframework.web.bind.annotation.RestController;
import com.vion.financial.service.ContractService; import com.vion.financial.service.ContractService;
import com.vion.financial.vo.ContractVo; import com.vion.financial.vo.ContractVo;
import com.vion.financial.vo.SelectVo;
@RestController @RestController
public class ContractController extends BaseController { public class ContractController extends BaseController {
...@@ -50,4 +51,10 @@ public class ContractController extends BaseController { ...@@ -50,4 +51,10 @@ public class ContractController extends BaseController {
public Object queryList() { public Object queryList() {
return contractService.queryList(); return contractService.queryList();
} }
@GetMapping
@ResponseBody
public Object queryByCondition(SelectVo selectVo) {
return contractService.selectByCondition(selectVo);
}
} }
...@@ -2,6 +2,9 @@ package com.vion.financial.entity; ...@@ -2,6 +2,9 @@ package com.vion.financial.entity;
import java.util.Date; import java.util.Date;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.vion.financial.serializer.DateYMDHMSJsonSerializer;
public class Contract { public class Contract {
private String contract_unid; private String contract_unid;
private String salesperson_unid; private String salesperson_unid;
...@@ -80,6 +83,7 @@ public class Contract { ...@@ -80,6 +83,7 @@ public class Contract {
public void setGuarantee_period(int guarantee_period) { public void setGuarantee_period(int guarantee_period) {
this.guarantee_period = guarantee_period; this.guarantee_period = guarantee_period;
} }
@JsonSerialize(using = DateYMDHMSJsonSerializer.class)
public Date getSign_date() { public Date getSign_date() {
return sign_date; return sign_date;
} }
...@@ -176,12 +180,14 @@ public class Contract { ...@@ -176,12 +180,14 @@ public class Contract {
public void setAmount_state_unid(String amount_state_unid) { public void setAmount_state_unid(String amount_state_unid) {
this.amount_state_unid = amount_state_unid; this.amount_state_unid = amount_state_unid;
} }
@JsonSerialize(using = DateYMDHMSJsonSerializer.class)
public Date getStart_guarantee_date() { public Date getStart_guarantee_date() {
return start_guarantee_date; return start_guarantee_date;
} }
public void setStart_guarantee_date(Date start_guarantee_date) { public void setStart_guarantee_date(Date start_guarantee_date) {
this.start_guarantee_date = start_guarantee_date; this.start_guarantee_date = start_guarantee_date;
} }
@JsonSerialize(using = DateYMDHMSJsonSerializer.class)
public Date getEnd_guarantee_date() { public Date getEnd_guarantee_date() {
return end_guarantee_date; return end_guarantee_date;
} }
......
...@@ -5,6 +5,8 @@ import java.util.List; ...@@ -5,6 +5,8 @@ import java.util.List;
import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.vion.financial.serializer.DateYMDHMSJsonSerializer;
@JsonInclude(value=Include.NON_NULL) @JsonInclude(value=Include.NON_NULL)
public class DeliverGoods { public class DeliverGoods {
...@@ -26,12 +28,14 @@ public class DeliverGoods { ...@@ -26,12 +28,14 @@ public class DeliverGoods {
public void setContract_unid(String contract_unid) { public void setContract_unid(String contract_unid) {
this.contract_unid = contract_unid; this.contract_unid = contract_unid;
} }
@JsonSerialize(using = DateYMDHMSJsonSerializer.class)
public Date getDeliver_goods_date() { public Date getDeliver_goods_date() {
return deliver_goods_date; return deliver_goods_date;
} }
public void setDeliver_goods_date(Date deliver_goods_date) { public void setDeliver_goods_date(Date deliver_goods_date) {
this.deliver_goods_date = deliver_goods_date; this.deliver_goods_date = deliver_goods_date;
} }
@JsonSerialize(using = DateYMDHMSJsonSerializer.class)
public Date getGoods_acceptanc_date() { public Date getGoods_acceptanc_date() {
return goods_acceptanc_date; return goods_acceptanc_date;
} }
......
...@@ -3,6 +3,9 @@ package com.vion.financial.entity; ...@@ -3,6 +3,9 @@ package com.vion.financial.entity;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.vion.financial.serializer.DateYMDHMSJsonSerializer;
public class ProjectAcceptanc { public class ProjectAcceptanc {
private int acceptanc_unid; private int acceptanc_unid;
private String contract_unid; private String contract_unid;
...@@ -29,6 +32,7 @@ public class ProjectAcceptanc { ...@@ -29,6 +32,7 @@ public class ProjectAcceptanc {
public void setAcceptanc_type(String acceptanc_type) { public void setAcceptanc_type(String acceptanc_type) {
this.acceptanc_type = acceptanc_type; this.acceptanc_type = acceptanc_type;
} }
@JsonSerialize(using = DateYMDHMSJsonSerializer.class)
public Date getAcceptanc_date() { public Date getAcceptanc_date() {
return acceptanc_date; return acceptanc_date;
} }
......
...@@ -30,7 +30,7 @@ public class ReturnInfo { ...@@ -30,7 +30,7 @@ public class ReturnInfo {
public void setReback_progress(int reback_progress) { public void setReback_progress(int reback_progress) {
this.reback_progress = reback_progress; this.reback_progress = reback_progress;
} }
//@JsonSerialize(using = DateYMDHMSJsonSerializer.class) @JsonSerialize(using = DateYMDHMSJsonSerializer.class)
public Date getReback_date() { public Date getReback_date() {
return reback_date; return reback_date;
} }
......
...@@ -346,8 +346,8 @@ ...@@ -346,8 +346,8 @@
amount_state_unid=#{amount_state_unid} amount_state_unid=#{amount_state_unid}
and and
</if> </if>
<if test="start_date !='' and end_date !=''"> <if test="start_date != null and end_date !=null">
#{start_date} <![CDATA[<=]]> sign_date <![CDATA[<=]]> #{end_date} #{start_date} <![CDATA[<=]]> sign_date and sign_date <![CDATA[<=]]> #{end_date}
and and
</if> </if>
<if test="amount_point !=null"> <if test="amount_point !=null">
...@@ -356,7 +356,6 @@ ...@@ -356,7 +356,6 @@
</if> </if>
<if test="overdays_point !=null"> <if test="overdays_point !=null">
<!--逾期天数-->contract_unid in (select over_days_view.contract_unid from over_days_view where over_days <![CDATA[>=]]> #{overdays_point}) <!--逾期天数-->contract_unid in (select over_days_view.contract_unid from over_days_view where over_days <![CDATA[>=]]> #{overdays_point})
and
</if> </if>
<!--应收款余额--> <!--应收款余额-->
<if test="limit !=null and offset !=null"> <if test="limit !=null and offset !=null">
......
...@@ -7,27 +7,30 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include; ...@@ -7,27 +7,30 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include;
@JsonInclude(value=Include.NON_NULL) @JsonInclude(value=Include.NON_NULL)
public class SelectVo { public class SelectVo {
private String salesperson_name__like; private String salesperson_name__like; //销售员name,模糊查询
private String project_name__like; private String project_name__like; //工程name,模糊查询
private String customer_name__like; private String customer_name__like; //客户name,模糊查询
private String province; private String province; //所属省份
private String city; private String city; //所属市
private String county; private String county; //所属县
private int guarantee_period; private int guarantee_period; //保质周
private String year; private String year; //所属年份
private String month; private String month; //所属月份
private String product_line_type; private String product_line_type; //生产线类型
private String contract_state; private String contract_state; //合同状态
private String contract_type; private String contract_type; //合同性质
private String acceptanc_type; private String acceptanc_type; //验收类型
private boolean is_archive; private boolean is_archive; //是否归档
private double confirm_income_amount; private double confirm_income_amount; //确认收入金额
private String amount_state_unid; private String amount_state_unid; //账款状态
private Date start_date; private Date start_date; //设置开始查询时间
private Date end_date; private Date end_date; //设置结束时间
private double amount_point; private double amount_point; //设置金额查询节点
private int overdays_point; private int overdays_point; //逾期天数查询节点
private double leave_amount_point; private double leave_amount_point; //账款余额查询节点
private int offset; private int offset; //设置查询起始位置
private int limit; private int limit; //设置每次查询条数
/*
* 查询条件
*/
} }
...@@ -346,8 +346,8 @@ ...@@ -346,8 +346,8 @@
amount_state_unid=#{amount_state_unid} amount_state_unid=#{amount_state_unid}
and and
</if> </if>
<if test="start_date !='' and end_date !=''"> <if test="start_date != null and end_date !=null">
#{start_date} <![CDATA[<=]]> sign_date <![CDATA[<=]]> #{end_date} #{start_date} <![CDATA[<=]]> sign_date and sign_date <![CDATA[<=]]> #{end_date}
and and
</if> </if>
<if test="amount_point !=null"> <if test="amount_point !=null">
...@@ -356,7 +356,6 @@ ...@@ -356,7 +356,6 @@
</if> </if>
<if test="overdays_point !=null"> <if test="overdays_point !=null">
<!--逾期天数-->contract_unid in (select over_days_view.contract_unid from over_days_view where over_days <![CDATA[>=]]> #{overdays_point}) <!--逾期天数-->contract_unid in (select over_days_view.contract_unid from over_days_view where over_days <![CDATA[>=]]> #{overdays_point})
and
</if> </if>
<!--应收款余额--> <!--应收款余额-->
<if test="limit !=null and offset !=null"> <if test="limit !=null and offset !=null">
......
#Generated by Maven Integration for Eclipse #Generated by Maven Integration for Eclipse
#Tue Jul 31 10:30:36 CST 2018 #Wed Aug 01 08:58:35 CST 2018
version=SNAPSHOT version=SNAPSHOT
groupId=com.vion groupId=com.vion
m2e.projectName=finance_serv m2e.projectName=finance_serv
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!