作者 朱兆平

时间搜索

... ... @@ -55,19 +55,22 @@ public class TransArriveExportController {
@GetMapping("/selectTrans")
public ResultJson<PageInfo<TRANSTOARRIVEEXPORT>> selectPrediction(@RequestParam(value = "customscode", required = false) String customscode,
@RequestParam(value = "username", required = false) String username,
@RequestParam(value = "trafmode", required = false) String trafmode,
@RequestParam(value = "trnmode", required = false) String trnmode,
@RequestParam(value = "unloadcode", required = false) String unloadcode,
@RequestParam(value = "creattime", required = false) String creattime,
@RequestParam(value = "startDate", required = false) String startDate,
@RequestParam(value = "endDate", required = false) String endDate,
@RequestParam(value = "pageNum",required = false,defaultValue = "1") int pageNum,
@RequestParam(value = "pageSize",required = false,defaultValue = "100") int pageSize){
TRANSTOARRIVEEXPORT trans=new TRANSTOARRIVEEXPORT();
if(StringUtils.isNotEmpty(creattime)){
Date flight_Date = DateUtil.parseDate(creattime,"yyyyMMdd");
trans.setCreattime(flight_Date);
if(StringUtils.isNotEmpty(endDate) && StringUtils.isNotEmpty(startDate)){
Date start = DateUtil.parseDate(startDate,"yyyy-MM-dd");
Date end = DateUtil.parseDate(endDate,"yyyy-MM-dd");
trans.setCreattimeStart(start);
trans.setCreattimeEnd(end);
}
trans.setCustomscode(customscode);
trans.setUsername(username);
trans.setTrafmode(trafmode);
trans.setTrnmode(trnmode);
trans.setUnloadcode(unloadcode);
PageInfo<TRANSTOARRIVEEXPORT> pageInfo = transArriveExportService.selectTrans(trans,pageNum,pageSize);
return new ResultJson("200","success",pageInfo);
... ...
... ... @@ -70,6 +70,8 @@ public class TRANSTOARRIVEEXPORT {
private String username;
private Date creattime;
private Date creattimeStart;
private Date creattimeEnd;
private String dstatus;
... ... @@ -363,6 +365,22 @@ public class TRANSTOARRIVEEXPORT {
this.updatetime = updatetime;
}
public Date getCreattimeStart() {
return creattimeStart;
}
public void setCreattimeStart(Date creattimeStart) {
this.creattimeStart = creattimeStart;
}
public Date getCreattimeEnd() {
return creattimeEnd;
}
public void setCreattimeEnd(Date creattimeEnd) {
this.creattimeEnd = creattimeEnd;
}
@Override
public String toString() {
return super.toString();
... ...
... ... @@ -103,14 +103,14 @@
<if test="username != null and username != ''">
and USERNAME = #{username,jdbcType=VARCHAR}
</if>
<if test="trafmode != null and trafmode != ''" >
and TrafMode = #{trafmode,jdbcType=VARCHAR}
<if test="trnmode != null and trnmode != ''" >
and TrnMode = #{trnmode,jdbcType=VARCHAR}
</if>
<if test="unloadcode != null and unloadcode != ''" >
and UnloadCode = #{unloadcode,jdbcType=VARCHAR}
</if>
<if test="creattime != null" >
and #{creattime,jdbcType=TIMESTAMP}
<if test="creattimeStart != null and creattimeEnd != null" >
and CREATTIME between #{creattimeStart,jdbcType=TIMESTAMP} and #{creattimeEnd,jdbcType=TIMESTAMP}
</if>
order by CREATTIME desc
</select>
... ...