...
|
...
|
@@ -6,13 +6,17 @@ import com.sunyo.wlpt.dispatch.domain.VehicleInfo; |
|
|
import com.sunyo.wlpt.dispatch.response.ResultJson;
|
|
|
import com.sunyo.wlpt.dispatch.service.DispatchNoteService;
|
|
|
import com.sunyo.wlpt.dispatch.service.VehicleInfoService;
|
|
|
import com.sunyo.wlpt.dispatch.utils.DateTimeUtils;
|
|
|
import com.sunyo.wlpt.dispatch.utils.GetUUID;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import io.swagger.annotations.ApiParam;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.beans.propertyeditors.CustomDateEditor;
|
|
|
import org.springframework.web.bind.WebDataBinder;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import java.text.SimpleDateFormat;
|
|
|
import java.util.Date;
|
|
|
|
|
|
/**
|
...
|
...
|
@@ -20,6 +24,7 @@ import java.util.Date; |
|
|
* Description:
|
|
|
* 时间:2020/4/24 20:30
|
|
|
*/
|
|
|
@CrossOrigin
|
|
|
@Api(value = "调度记录信息,业务", tags = "业务管理——车辆调度记录信息")
|
|
|
@RequestMapping("dispatch/dispatchNote")
|
|
|
@RestController
|
...
|
...
|
@@ -38,7 +43,7 @@ public class DispatchNoteController { |
|
|
@RequestParam(value = "userMobile", required = false) String userMobile,
|
|
|
@ApiParam(name = "dispatchType", value = "业务类型", required = false)
|
|
|
@RequestParam(value = "dispatchType", required = false) String dispatchType,
|
|
|
@ApiParam(name = "gmtCreate", value = "创建时间", required = false)
|
|
|
@ApiParam(name = "gmtCreate", value = "任务创建时间", required = false)
|
|
|
@RequestParam(value = "gmtCreate", required = false) Date gmtCreate,
|
|
|
@ApiParam(name = "endTime", value = "任务结束时间", required = false)
|
|
|
@RequestParam(value = "endTime", required = false) Date endTime,
|
...
|
...
|
@@ -58,31 +63,20 @@ public class DispatchNoteController { |
|
|
* 1.用户姓名;2.用户电话;3.创建时间;4.完成时间
|
|
|
* 5.业务类型;6.记录状态
|
|
|
*/
|
|
|
|
|
|
if ("".equals(userName)) {
|
|
|
//获取参数,用户姓名
|
|
|
dispatchNote.setUserName(userName);
|
|
|
}
|
|
|
if ("".equals(userMobile)) {
|
|
|
//获取参数,用户联系方式
|
|
|
dispatchNote.setUserMobile(userMobile);
|
|
|
}
|
|
|
if ("".equals(dispatchType)) {
|
|
|
//获取参数,业务类型
|
|
|
dispatchNote.setDispatchType(dispatchType);
|
|
|
}
|
|
|
if (null != gmtCreate) {
|
|
|
//获取参数,创建时间
|
|
|
dispatchNote.setGmtCreate(gmtCreate);
|
|
|
}
|
|
|
if ("".equals(status)) {
|
|
|
//获取参数,记录表状态
|
|
|
dispatchNote.setStatus(status);
|
|
|
}
|
|
|
if (null != endTime) {
|
|
|
//获取参数,任务结束(完成)时间
|
|
|
dispatchNote.setEndTime(endTime);
|
|
|
}
|
|
|
//获取参数,用户姓名
|
|
|
dispatchNote.setUserName(userName);
|
|
|
//获取参数,用户联系方式
|
|
|
dispatchNote.setUserMobile(userMobile);
|
|
|
//获取参数,业务类型
|
|
|
dispatchNote.setDispatchType(dispatchType);
|
|
|
System.out.println(gmtCreate);
|
|
|
//获取参数,创建时间
|
|
|
dispatchNote.setGmtCreate(gmtCreate);
|
|
|
//获取参数,记录表状态
|
|
|
dispatchNote.setStatus(status);
|
|
|
//获取参数,任务结束(完成)时间
|
|
|
dispatchNote.setEndTime(endTime);
|
|
|
System.out.println(dispatchNote);
|
|
|
PageInfo pageInfo = dispatchNoteService.selectDispatchNoteList(dispatchNote, pageNum, pageSize);
|
|
|
if (pageInfo.getTotal() > 0) {
|
|
|
result.setData(pageInfo);
|
...
|
...
|
@@ -159,4 +153,10 @@ public class DispatchNoteController { |
|
|
}
|
|
|
return result;
|
|
|
}
|
|
|
@InitBinder
|
|
|
public void initBinder(WebDataBinder binder) {
|
|
|
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
dateFormat.setLenient(false);
|
|
|
binder.registerCustomEditor(Date.class, new CustomDateEditor(dateFormat, true));
|
|
|
}
|
|
|
} |
...
|
...
|
|