|
@@ -4,6 +4,7 @@ import java.io.FileInputStream;
|
|
import java.io.IOException;
|
|
import java.io.IOException;
|
|
import java.io.InputStream;
|
|
import java.io.InputStream;
|
|
import java.io.UnsupportedEncodingException;
|
|
import java.io.UnsupportedEncodingException;
|
|
|
|
+import java.text.DateFormat;
|
|
import java.text.ParseException;
|
|
import java.text.ParseException;
|
|
import java.text.SimpleDateFormat;
|
|
import java.text.SimpleDateFormat;
|
|
import java.util.ArrayList;
|
|
import java.util.ArrayList;
|
|
@@ -1363,39 +1364,38 @@ public class ZysqbpController extends BaseController {
|
|
* @param szd
|
|
* @param szd
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
- public BusinessContext countSpZxl(String szd) {
|
|
|
|
|
|
+ public BusinessContext countSpZxl(String szd,Date ks,Date js) {
|
|
List<Map<String, Object>> list = null;
|
|
List<Map<String, Object>> list = null;
|
|
if (null == szd) {
|
|
if (null == szd) {
|
|
- list = zysqbpService.countSpZxl(null);
|
|
|
|
|
|
+ list = zysqbpService.countSpZxl(null,ks,js);
|
|
} else {
|
|
} else {
|
|
- list = zysqbpService.countSpZxl(Long.parseLong(szd));
|
|
|
|
|
|
+ list = zysqbpService.countSpZxl(Long.parseLong(szd),ks,js);
|
|
}
|
|
}
|
|
BusinessContext bc = createBusinessContext();
|
|
BusinessContext bc = createBusinessContext();
|
|
bc.setAttribute("records", list);
|
|
bc.setAttribute("records", list);
|
|
return bc;
|
|
return bc;
|
|
}
|
|
}
|
|
|
|
|
|
- @RequestMapping(value = "bdwhspTjJasper", method = RequestMethod.POST)
|
|
|
|
- @ResponseBody
|
|
|
|
- @RemotingExclude
|
|
|
|
- public void jasperPrintTj(
|
|
|
|
- @RequestParam(value = "type", required = false) final String type,
|
|
|
|
- @RequestParam(value = "szd", required = false) final String szd,
|
|
|
|
- HttpServletResponse response, HttpServletRequest request) {
|
|
|
|
- List<Map<String, Object>> dataList = (List<Map<String, Object>>) countSp(
|
|
|
|
- szd, type).getAttribute("records");
|
|
|
|
- String reportFile = "";
|
|
|
|
- Map<String, Object> parameters = new HashMap<String, Object>();
|
|
|
|
- if (GlobalData.DEPLOY_MODE.equals(Constants.DEPLOY_MODE_CITY)) {
|
|
|
|
- reportFile = "iReport/aqsp/aqspglTj-city.jasper";
|
|
|
|
- } else {
|
|
|
|
- reportFile = "iReport/aqsp/aqspglTj-pro.jasper";
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- ReportExportHelper.exportFromIreport(reportFile, response, parameters,
|
|
|
|
- new JRBeanCollectionDataSource(dataList), "本地危货审批统计",
|
|
|
|
- ReportExportHelper.REPORT_EXPORT_TYPE_WORD);
|
|
|
|
- }
|
|
|
|
|
|
+// @RequestMapping(value = "bdwhspTjJasper", method = RequestMethod.POST)
|
|
|
|
+// @ResponseBody
|
|
|
|
+// @RemotingExclude
|
|
|
|
+// public void jasperPrintTj(
|
|
|
|
+// @RequestParam(value = "type", required = false) final String type,
|
|
|
|
+// @RequestParam(value = "szd", required = false) final String szd,
|
|
|
|
+// HttpServletResponse response, HttpServletRequest request) {
|
|
|
|
+// List<Map<String, Object>> dataList = (List<Map<String, Object>>) countSp(szd, type).getAttribute("records");
|
|
|
|
+// String reportFile = "";
|
|
|
|
+// Map<String, Object> parameters = new HashMap<String, Object>();
|
|
|
|
+// if (GlobalData.DEPLOY_MODE.equals(Constants.DEPLOY_MODE_CITY)) {
|
|
|
|
+// reportFile = "iReport/aqsp/aqspglTj-city.jasper";
|
|
|
|
+// } else {
|
|
|
|
+// reportFile = "iReport/aqsp/aqspglTj-pro.jasper";
|
|
|
|
+// }
|
|
|
|
+//
|
|
|
|
+// ReportExportHelper.exportFromIreport(reportFile, response, parameters,
|
|
|
|
+// new JRBeanCollectionDataSource(dataList), "本地危货审批统计",
|
|
|
|
+// ReportExportHelper.REPORT_EXPORT_TYPE_WORD);
|
|
|
|
+// }
|
|
|
|
|
|
/**
|
|
/**
|
|
* 审批统计
|
|
* 审批统计
|
|
@@ -1404,12 +1404,12 @@ public class ZysqbpController extends BaseController {
|
|
* @param type
|
|
* @param type
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
- public BusinessContext countSp(String szd, String type) {
|
|
|
|
|
|
+ public BusinessContext countSp(String szd,Date ks,Date js) {
|
|
List<Map<String, Object>> list = null;
|
|
List<Map<String, Object>> list = null;
|
|
if (null == szd) {
|
|
if (null == szd) {
|
|
- list = zysqbpService.countSp(null, type);
|
|
|
|
|
|
+ list = zysqbpService.countSp(null,ks,js);
|
|
} else {
|
|
} else {
|
|
- list = zysqbpService.countSp(Long.parseLong(szd), type);
|
|
|
|
|
|
+ list = zysqbpService.countSp(Long.parseLong(szd),ks,js);
|
|
}
|
|
}
|
|
BusinessContext bc = createBusinessContext();
|
|
BusinessContext bc = createBusinessContext();
|
|
bc.setAttribute("records", list);
|
|
bc.setAttribute("records", list);
|
|
@@ -2068,26 +2068,93 @@ public class ZysqbpController extends BaseController {
|
|
return bc;
|
|
return bc;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+// public BusinessContext countEvent3(CodeEntity szd, int ndName, int jdName,
|
|
|
|
+// Long qymcName, String hzName, Long mtbwName, Date bgsj1,
|
|
|
|
+// Date bgsj2, Date kgsj1, Date kgsj2, Date wgsj1, Date wgsj2) {
|
|
|
|
+// BusinessContext bc = new BusinessContext();
|
|
|
|
+//
|
|
|
|
+// if (qymcName == 0) {
|
|
|
|
+// if (szd == null || szd.getId() == 900l)
|
|
|
|
+// bc = zysqbpService.getForSeasonList(0l, ndName, jdName, bgsj1,
|
|
|
|
+// bgsj2, kgsj1, kgsj2, wgsj1, wgsj2, hzName, false);
|
|
|
|
+// else {
|
|
|
|
+// bc = zysqbpService.getForSeasonList(szd.getId(), ndName,
|
|
|
|
+// jdName, bgsj1, bgsj2, kgsj1, kgsj2, wgsj1, wgsj2,
|
|
|
|
+// hzName, false);
|
|
|
|
+// }
|
|
|
|
+// } else if (qymcName != 0)
|
|
|
|
+// bc.setAttribute("countList8", zysqbpService.findJyrBwAndHwList(
|
|
|
|
+// ndName, jdName, bgsj1, bgsj2, kgsj1, kgsj2, wgsj1, wgsj2,
|
|
|
|
+// qymcName, hzName, mtbwName, false));
|
|
|
|
+// return bc;
|
|
|
|
+// }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 统计集装箱数量
|
|
|
|
+ * @param szd
|
|
|
|
+ * @param ndName
|
|
|
|
+ * @param jdName
|
|
|
|
+ * @param qymcName
|
|
|
|
+ * @param hzName
|
|
|
|
+ * @param mtbwName
|
|
|
|
+ * @param bgsj1
|
|
|
|
+ * @param bgsj2
|
|
|
|
+ * @param kgsj1
|
|
|
|
+ * @param kgsj2
|
|
|
|
+ * @param wgsj1
|
|
|
|
+ * @param wgsj2
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
public BusinessContext countEvent3(CodeEntity szd, int ndName, int jdName,
|
|
public BusinessContext countEvent3(CodeEntity szd, int ndName, int jdName,
|
|
Long qymcName, String hzName, Long mtbwName, Date bgsj1,
|
|
Long qymcName, String hzName, Long mtbwName, Date bgsj1,
|
|
Date bgsj2, Date kgsj1, Date kgsj2, Date wgsj1, Date wgsj2) {
|
|
Date bgsj2, Date kgsj1, Date kgsj2, Date wgsj1, Date wgsj2) {
|
|
BusinessContext bc = new BusinessContext();
|
|
BusinessContext bc = new BusinessContext();
|
|
|
|
|
|
if (qymcName == 0) {
|
|
if (qymcName == 0) {
|
|
- if (szd == null || szd.getId() == 900l)
|
|
|
|
|
|
+ if (szd == null || szd.getId() == 900l){
|
|
bc = zysqbpService.getForSeasonList(0l, ndName, jdName, bgsj1,
|
|
bc = zysqbpService.getForSeasonList(0l, ndName, jdName, bgsj1,
|
|
bgsj2, kgsj1, kgsj2, wgsj1, wgsj2, hzName, false);
|
|
bgsj2, kgsj1, kgsj2, wgsj1, wgsj2, hzName, false);
|
|
|
|
+
|
|
|
|
+ // 查询吞吐量前n的货物
|
|
|
|
+ // TODO 数据来源
|
|
|
|
+ List<Map<String, Object>> list = new ArrayList<Map<String, Object>>();
|
|
|
|
+ List<Object[]> hzTjList = zysqbpService.hzTj(bgsj1, bgsj2, kgsj1, kgsj2, wgsj1, wgsj2,hzName,false);
|
|
|
|
+ for(Object[] obj : hzTjList){
|
|
|
|
+ if(null != obj){
|
|
|
|
+ Map<String, Object> map = new HashMap<String, Object>();
|
|
|
|
+ map.put("NAME", String.valueOf(obj[0])+String.valueOf(obj[2]));
|
|
|
|
+ map.put("NUM", obj[1]);
|
|
|
|
+ list.add(map);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+// map = new HashMap<String, Object>();
|
|
|
|
+// map.put("NAME", "货种2");
|
|
|
|
+// map.put("NUM", 90);
|
|
|
|
+// list.add(map);
|
|
|
|
+// map = new HashMap<String, Object>();
|
|
|
|
+// map.put("NAME", "货种3");
|
|
|
|
+// map.put("NUM", 28);
|
|
|
|
+// list.add(map);
|
|
|
|
+// map = new HashMap<String, Object>();
|
|
|
|
+// map.put("NAME", "货种4");
|
|
|
|
+// map.put("NUM", 54);
|
|
|
|
+// list.add(map);
|
|
|
|
+ bc.setAttribute("tj", list);
|
|
|
|
+ }
|
|
else {
|
|
else {
|
|
bc = zysqbpService.getForSeasonList(szd.getId(), ndName,
|
|
bc = zysqbpService.getForSeasonList(szd.getId(), ndName,
|
|
jdName, bgsj1, bgsj2, kgsj1, kgsj2, wgsj1, wgsj2,
|
|
jdName, bgsj1, bgsj2, kgsj1, kgsj2, wgsj1, wgsj2,
|
|
hzName, false);
|
|
hzName, false);
|
|
}
|
|
}
|
|
- } else if (qymcName != 0)
|
|
|
|
|
|
+ } else if (qymcName != 0){
|
|
bc.setAttribute("countList8", zysqbpService.findJyrBwAndHwList(
|
|
bc.setAttribute("countList8", zysqbpService.findJyrBwAndHwList(
|
|
ndName, jdName, bgsj1, bgsj2, kgsj1, kgsj2, wgsj1, wgsj2,
|
|
ndName, jdName, bgsj1, bgsj2, kgsj1, kgsj2, wgsj1, wgsj2,
|
|
qymcName, hzName, mtbwName, false));
|
|
qymcName, hzName, mtbwName, false));
|
|
|
|
+ }
|
|
return bc;
|
|
return bc;
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
|
|
/**
|
|
/**
|
|
* 统计危货作业数量
|
|
* 统计危货作业数量
|
|
@@ -5021,5 +5088,32 @@ public class ZysqbpController extends BaseController {
|
|
|
|
|
|
return "error";
|
|
return "error";
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 放回当天日期年份的一月一号到当天日期
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ public BusinessContext getDateRange() {
|
|
|
|
+ BusinessContext bc = createBusinessContext();
|
|
|
|
+ Calendar cal = Calendar.getInstance();
|
|
|
|
+ Date js = cal.getTime();//end
|
|
|
|
+
|
|
|
|
+ //1.1
|
|
|
|
+ int year = Calendar.YEAR;
|
|
|
|
+ String date = year + "-01-01";
|
|
|
|
+
|
|
|
|
+ DateFormat fmt = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
|
+ Date ks = null;
|
|
|
|
+ try {
|
|
|
|
+ ks = fmt.parse(date);
|
|
|
|
+ } catch (ParseException e) {
|
|
|
|
+ // TODO Auto-generated catch block
|
|
|
|
+ e.printStackTrace();
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ bc.setAttribute("ks",ks);
|
|
|
|
+ bc.setAttribute("js",js);
|
|
|
|
+ return bc;
|
|
|
|
+ }
|
|
|
|
|
|
}
|
|
}
|