...
|
...
|
@@ -10,6 +10,7 @@ import com.framework.core.Servlets; |
|
|
import com.plugin.easyui.DataGrid;
|
|
|
import com.plugin.easyui.EasyPage;
|
|
|
import org.apache.commons.collections.CollectionUtils;
|
|
|
import org.apache.commons.lang.StringUtils;
|
|
|
import org.springframework.stereotype.Controller;
|
|
|
import org.springframework.ui.Model;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
...
|
...
|
@@ -18,7 +19,10 @@ import org.springframework.web.bind.annotation.ResponseBody; |
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
import java.text.ParseException;
|
|
|
import java.text.SimpleDateFormat;
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.Date;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
|
|
...
|
...
|
@@ -46,13 +50,26 @@ public class CargoController { |
|
|
*/
|
|
|
@RequestMapping(value="grid.json")
|
|
|
@ResponseBody
|
|
|
public DataGrid<CargoCountVo> grid(HttpServletRequest request, EasyPage<CargoCountEntity> pageForm) {
|
|
|
public DataGrid<CargoCountVo> grid(HttpServletRequest request, EasyPage<CargoCountEntity> pageForm) throws ParseException {
|
|
|
Map<String, Object> searchParams = Servlets.getParametersStartingWith(request, "search_");
|
|
|
if (!searchParams.containsKey("LIKE_tstype")){
|
|
|
searchParams.put("LIKE_tstype", 1);
|
|
|
//
|
|
|
if (searchParams.containsKey("GTES_flightdate")){
|
|
|
String gte_flightdate = searchParams.get("GTES_flightdate").toString();
|
|
|
if (!StringUtils.isBlank(gte_flightdate)){
|
|
|
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
Date parse = simpleDateFormat.parse(gte_flightdate);
|
|
|
searchParams.put("GTES_flightdate", parse);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
if (searchParams.containsKey("LTES_flightdate")){
|
|
|
String gte_flightdate = searchParams.get("LTES_flightdate").toString();
|
|
|
if (!StringUtils.isBlank(gte_flightdate)) {
|
|
|
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
Date parse = simpleDateFormat.parse(gte_flightdate);
|
|
|
searchParams.put("LTES_flightdate", parse);
|
|
|
}
|
|
|
}
|
|
|
pageForm.setSearchParams(searchParams);
|
|
|
pageForm.parseData(cargoCountService.getPage(pageForm));
|
|
|
DataGrid<CargoCountEntity> cargoCountEntityDataGrid = pageForm.getData();
|
...
|
...
|
@@ -64,13 +81,15 @@ public class CargoController { |
|
|
CargoCountVo vo = new CargoCountVo();
|
|
|
vo.setForshort(cargo.getForshort());
|
|
|
vo.setFullname(cargo.getFullname());
|
|
|
if ("1".equals(cargo.getTstype())){
|
|
|
vo.setTstype("发货人");
|
|
|
}else if ("2".equals(cargo.getTstype())){
|
|
|
vo.setTstype("订舱代理");
|
|
|
}else {
|
|
|
vo.setTstype("操作代理");
|
|
|
}
|
|
|
vo.setTstype(cargo.getTstype());
|
|
|
// if ("1".equals(cargo.getTstype())){
|
|
|
// vo.setTstype("发货人");
|
|
|
// }else if ("2".equals(cargo.getTstype())){
|
|
|
// vo.setTstype("订舱代理");
|
|
|
// }else if("3".equals(cargo.getTstype())){
|
|
|
// vo.setTstype("操作代理");
|
|
|
// }
|
|
|
vo.setTstype(cargo.getTstype());
|
|
|
vo.setContacts(cargo.getContacts());
|
|
|
vo.setPhone(cargo.getPhone());
|
|
|
vo.setWaybill(cargo.getWaybill());
|
...
|
...
|
@@ -93,7 +112,6 @@ public class CargoController { |
|
|
vos.setRows(cargoCountVos);
|
|
|
vos.setTotal(cargoCountEntityDataGrid.getTotal());
|
|
|
return vos;
|
|
|
|
|
|
}
|
|
|
|
|
|
} |
...
|
...
|
|