|
|
@@ -0,0 +1,957 @@
|
|
|
+package com.loygra.mooring.controller;
|
|
|
+
|
|
|
+import java.util.Date;
|
|
|
+import java.util.HashMap;
|
|
|
+import java.util.Map;
|
|
|
+
|
|
|
+import javax.servlet.http.HttpServletRequest;
|
|
|
+import javax.servlet.http.HttpServletResponse;
|
|
|
+
|
|
|
+import org.apache.commons.httpclient.util.DateUtil;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.stereotype.Controller;
|
|
|
+import org.springframework.web.bind.annotation.PathVariable;
|
|
|
+import org.springframework.web.bind.annotation.RequestBody;
|
|
|
+import org.springframework.web.bind.annotation.RequestHeader;
|
|
|
+import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
+import org.springframework.web.bind.annotation.RequestMethod;
|
|
|
+import org.springframework.web.bind.annotation.RequestParam;
|
|
|
+import org.springframework.web.servlet.ModelAndView;
|
|
|
+
|
|
|
+import com.loygra.mooring.bean.AnchorPositionApplyInfo;
|
|
|
+import com.loygra.mooring.bean.ApplyAdjustInfo;
|
|
|
+import com.loygra.mooring.bo.AnchorPositionApplyAuditParam;
|
|
|
+import com.loygra.mooring.bo.AnchorPositionApplyParam;
|
|
|
+import com.loygra.mooring.cache.UserCache;
|
|
|
+import com.loygra.mooring.common.CommonUtil;
|
|
|
+import com.loygra.mooring.common.Constants;
|
|
|
+import com.loygra.mooring.common.KEY;
|
|
|
+import com.loygra.mooring.common.RequestURL;
|
|
|
+import com.loygra.mooring.common.ResponseSC;
|
|
|
+import com.loygra.mooring.service.AnchorageApplyService;
|
|
|
+import com.loygra.mooring.util.DateUtils;
|
|
|
+import com.loygra.mooring.util.LogUtil;
|
|
|
+
|
|
|
+@Controller
|
|
|
+public class AnchorageApplyController extends BaseController {
|
|
|
+
|
|
|
+ /**
|
|
|
+ *
|
|
|
+ */
|
|
|
+ private static final long serialVersionUID = 8066046820583035311L;
|
|
|
+ @Autowired
|
|
|
+ private AnchorageApplyService anchorageApply;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 船代公司查询 江苏省各港口 的详细信息
|
|
|
+ */
|
|
|
+ @RequestMapping(method = RequestMethod.GET, value = RequestURL.HARBOUR.AGENT_SEARCH_HARBOUR)
|
|
|
+ public ModelAndView getALLHarbourInfo(HttpServletRequest req, HttpServletResponse resp) {
|
|
|
+ Map<String, Object> resultMap = getResultMap();
|
|
|
+ try {
|
|
|
+ resultMap = anchorageApply.getAllHarbourInfo();
|
|
|
+ } catch (Exception e) {
|
|
|
+ putStatusCode(resultMap, ResponseSC.SystemSC.SYSTEM_ERROR.getCode());
|
|
|
+ LogUtil.errorLog(e.getMessage());
|
|
|
+ }
|
|
|
+ return getModelAndView(resp, resultMap);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ *
|
|
|
+ * 添加锚位计划申请
|
|
|
+ *
|
|
|
+ * @param req
|
|
|
+ * @param resp
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @RequestMapping(method = RequestMethod.POST, value = RequestURL.ACHOR_POSITION.ANCHOR_POSITION_APPLY)
|
|
|
+ public ModelAndView addAnchorPositionApplyInfo(HttpServletRequest req, HttpServletResponse resp,
|
|
|
+ @RequestHeader(value = KEY.USER_KEY, required = true) String user_key,
|
|
|
+ @RequestBody AnchorPositionApplyInfo apai) {
|
|
|
+ Map<String, Object> resultMap = getResultMap();
|
|
|
+ // 验证权限
|
|
|
+ if (super.checkHttpHeaderUserKey(user_key, resultMap)) {
|
|
|
+ try {
|
|
|
+ apai.setAgent_company_id(UserCache.getUserIdByKey(user_key));
|
|
|
+ resultMap = anchorageApply.insertAnchorPositionApplyInfo(apai);
|
|
|
+ } catch (Exception e) {
|
|
|
+ putStatusCode(resultMap, ResponseSC.SystemSC.SYSTEM_ERROR.getCode());
|
|
|
+ LogUtil.errorLog(e.getMessage());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return getModelAndView(resp, resultMap);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ *
|
|
|
+ * 根据用户查询申请计划信息
|
|
|
+ *
|
|
|
+ * @param req
|
|
|
+ * @param resp
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @RequestMapping(method = RequestMethod.PUT, value = RequestURL.ACHOR_POSITION.ANCHOR_POSITION_APPLY)
|
|
|
+ public ModelAndView getAnchorPositionApplyInfosByUserId(HttpServletRequest req, HttpServletResponse resp,
|
|
|
+ @RequestHeader(value = KEY.USER_KEY, required = true) String user_key,
|
|
|
+ @RequestParam(value = "paged", required = false) Integer paged,
|
|
|
+ @RequestBody AnchorPositionApplyParam apap) {
|
|
|
+ Map<String, Object> resultMap = getResultMap();
|
|
|
+ // 验证权限
|
|
|
+ if (super.checkHttpHeaderUserKey(user_key, resultMap)) {
|
|
|
+ try {
|
|
|
+ Map<String, Object> param = new HashMap<String, Object>();
|
|
|
+ param.put("agent_company_id", UserCache.getUserIdByKey(user_key));
|
|
|
+ param.put("ship_name", apap.getShip_name());
|
|
|
+ param.put("harbour_code", apap.getHarbour_code());
|
|
|
+ // param.put("status", apap.getStatus());
|
|
|
+ // operate==1检索未交费的申请,operate==2检索交费的申请
|
|
|
+ param.put("operate", apap.getOperate());
|
|
|
+ param.put("status", apap.getStatus());
|
|
|
+ param.put("apply_time_begin", apap.getApply_time_begin());
|
|
|
+ param.put("apply_time_end", apap.getApply_time_end());
|
|
|
+ resultMap = anchorageApply.selectAnchorPositionApplyList(resp,getPageBean(paged), param);
|
|
|
+ } catch (Exception e) {
|
|
|
+ putStatusCode(resultMap, ResponseSC.SystemSC.SYSTEM_ERROR.getCode());
|
|
|
+ LogUtil.errorLog(e.getMessage());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return getModelAndView(resp, resultMap);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ *
|
|
|
+ * 根据用户查询申请计划信息
|
|
|
+ *
|
|
|
+ * @param req
|
|
|
+ * @param resp
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @RequestMapping(method = RequestMethod.GET, value = RequestURL.ACHOR_POSITION.ANCHOR_POSITION_APPLY)
|
|
|
+ public ModelAndView expAnchorPositionApplyInfosByUserId(HttpServletRequest req, HttpServletResponse resp,
|
|
|
+ @RequestParam(value = "ukey", required = true) String user_key,
|
|
|
+ @RequestParam(required = false) String ship_name,
|
|
|
+ @RequestParam(required = false) Integer harbour_code,
|
|
|
+ @RequestParam Integer operate,
|
|
|
+ @RequestParam Integer export_type,
|
|
|
+ @RequestParam(required = false) Integer status,
|
|
|
+ @RequestParam(required = false) String apply_time_begin,
|
|
|
+ @RequestParam(required = false) String apply_time_end) {
|
|
|
+ Map<String, Object> resultMap = getResultMap();
|
|
|
+ // 验证权限
|
|
|
+ if (super.checkHttpHeaderUserKey(user_key, resultMap)) {
|
|
|
+ try {
|
|
|
+ Map<String, Object> param = new HashMap<String, Object>();
|
|
|
+ param.put("agent_company_id", UserCache.getUserIdByKey(user_key));
|
|
|
+ param.put("ship_name", ship_name);
|
|
|
+ param.put("harbour_code", harbour_code);
|
|
|
+ // param.put("status", apap.getStatus());
|
|
|
+ // operate==1检索未交费的申请,operate==2检索交费的申请
|
|
|
+ param.put("operate", operate);
|
|
|
+ param.put("status", status);
|
|
|
+ param.put("apply_time_begin", DateUtils.parse(DateUtils.dtSimple, apply_time_begin));
|
|
|
+ param.put("apply_time_end", DateUtils.parse(DateUtils.dtSimple, apply_time_end));
|
|
|
+
|
|
|
+ param.put("export_type", export_type);
|
|
|
+ resultMap = anchorageApply.selectAnchorPositionApplyList(resp,getPageBean(1), param);
|
|
|
+ } catch (Exception e) {
|
|
|
+ putStatusCode(resultMap, ResponseSC.SystemSC.SYSTEM_ERROR.getCode());
|
|
|
+ LogUtil.errorLog(e.getMessage());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ *
|
|
|
+ * 检索某港口排队申请的列表
|
|
|
+ *
|
|
|
+ * @param req
|
|
|
+ * @param resp
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @RequestMapping(method = RequestMethod.POST, value = RequestURL.ACHOR_POSITION.ANCHOR_POSITION_APPLY_PENDING_HARBOUR)
|
|
|
+ public ModelAndView selectPendingAnchorPositionApplyListByHarbourCode(HttpServletRequest req,
|
|
|
+ HttpServletResponse resp, @RequestHeader(value = KEY.USER_KEY, required = true) String user_key,
|
|
|
+ @RequestParam(value = "paged", required = false) Integer paged, @PathVariable Integer harbour_code,
|
|
|
+ @RequestBody AnchorPositionApplyParam apap) {
|
|
|
+ Map<String, Object> resultMap = getResultMap();
|
|
|
+ // 验证权限
|
|
|
+ if (super.checkHttpHeaderUserKey(user_key, resultMap)) {
|
|
|
+ try {
|
|
|
+ Map<String, Object> param = new HashMap<String, Object>();
|
|
|
+ param.put("apply_harbour_code", harbour_code);
|
|
|
+ // param.put("agent_company_id",
|
|
|
+ // UserCache.getUserIdByKey(user_key));
|
|
|
+ if (apap != null) {
|
|
|
+ if (CommonUtil.isNotEmpty(apap.getShip_name())) {
|
|
|
+ param.put("ship_name", apap.getShip_name());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ resultMap = anchorageApply.selectPendingAnchorPositionApplyListByHarbourCode(getPageBean(paged), param);
|
|
|
+ } catch (Exception e) {
|
|
|
+ putStatusCode(resultMap, ResponseSC.SystemSC.SYSTEM_ERROR.getCode());
|
|
|
+ LogUtil.errorLog(e.getMessage());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return getModelAndView(resp, resultMap);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ *
|
|
|
+ * 根据登录用户的港口号检索待审核的申请列表
|
|
|
+ *
|
|
|
+ * @param req
|
|
|
+ * @param resp
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @RequestMapping(method = RequestMethod.POST, value = RequestURL.ACHOR_POSITION.ANCHOR_POSITION_APPLY_UNAUDIT)
|
|
|
+ public ModelAndView selectUnAuditAnchorPositionApplyList(HttpServletRequest req, HttpServletResponse resp,
|
|
|
+ @RequestParam(value = "paged", required = false) Integer paged,
|
|
|
+ @RequestHeader(value = KEY.USER_KEY, required = true) String user_key,
|
|
|
+ @RequestBody AnchorPositionApplyParam apap) {
|
|
|
+ Map<String, Object> resultMap = getResultMap();
|
|
|
+ // 验证权限
|
|
|
+ if (super.checkHttpHeaderUserKey(user_key, resultMap)) {
|
|
|
+ try {
|
|
|
+ Map<String, Object> param = new HashMap<String, Object>();
|
|
|
+ param.put("user_id", UserCache.getUserIdByKey(user_key));
|
|
|
+ if (apap != null) {
|
|
|
+ param.put("ship_name", apap.getShip_name());
|
|
|
+ param.put("adjust_flag", apap.getAdjust_flag());
|
|
|
+ param.put("company_name", apap.getCompany_name());
|
|
|
+ param.put("attach_flag", apap.getAttach_flag());
|
|
|
+ param.put("to_harbour_code", apap.getTo_harbour_code());
|
|
|
+ param.put("goods", apap.getGoods());
|
|
|
+ param.put("apply_time_begin", apap.getApply_time_begin());
|
|
|
+ param.put("apply_time_end", apap.getApply_time_end());
|
|
|
+ param.put("apply_release_type", apap.getApply_release_type());
|
|
|
+ param.put("export_type", apap.getExport_type());
|
|
|
+ }
|
|
|
+ resultMap = anchorageApply.selectUnAuditAnchorPositionApplyList(resp, param, getPageBean(paged));
|
|
|
+ } catch (Exception e) {
|
|
|
+ putStatusCode(resultMap, ResponseSC.SystemSC.SYSTEM_ERROR.getCode());
|
|
|
+ LogUtil.errorLog(e.getMessage());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return getModelAndView(resp, resultMap);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ *
|
|
|
+ * 导出EXCEL:根据登录用户的港口号检索待审核的申请列表
|
|
|
+ *
|
|
|
+ * @param req
|
|
|
+ * @param resp
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @RequestMapping(method = RequestMethod.GET, value = RequestURL.ACHOR_POSITION.ANCHOR_POSITION_APPLY_UNAUDIT)
|
|
|
+ public ModelAndView expUnAuditAnchorPositionApplyList(HttpServletRequest req, HttpServletResponse resp,
|
|
|
+ @RequestParam String user_key, @RequestParam Integer export_type,
|
|
|
+ @RequestParam Integer apply_release_type) {
|
|
|
+ Map<String, Object> resultMap = getResultMap();
|
|
|
+ // 验证权限
|
|
|
+ if (super.checkHttpHeaderUserKey(user_key, resultMap)) {
|
|
|
+ try {
|
|
|
+ Map<String, Object> param = new HashMap<String, Object>();
|
|
|
+ param.put("user_id", UserCache.getUserIdByKey(user_key));
|
|
|
+ param.put("export_type", export_type);
|
|
|
+ param.put("apply_release_type", apply_release_type);
|
|
|
+ resultMap = anchorageApply.selectUnAuditAnchorPositionApplyList(resp, param, getPageBean(1));
|
|
|
+ } catch (Exception e) {
|
|
|
+ putStatusCode(resultMap, ResponseSC.SystemSC.SYSTEM_ERROR.getCode());
|
|
|
+ LogUtil.errorLog(e.getMessage());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return null;// getModelAndView(resp, resultMap);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 检索省厅的待审核申请列表
|
|
|
+ *
|
|
|
+ * @param param
|
|
|
+ */
|
|
|
+ @RequestMapping(method = RequestMethod.POST, value = RequestURL.ACHOR_POSITION.ANCHOR_POSITION_APPLY_DEP_UNAUDIT)
|
|
|
+ public ModelAndView selectUnAuditAnchorPositionApplyList4DepUser(HttpServletRequest req, HttpServletResponse resp,
|
|
|
+ @RequestHeader(value = KEY.USER_KEY, required = true) String user_key,
|
|
|
+ @RequestParam(value = "paged", required = false) Integer paged,
|
|
|
+ @RequestBody AnchorPositionApplyParam apap) {
|
|
|
+ Map<String, Object> resultMap = getResultMap();
|
|
|
+ // 验证权限
|
|
|
+ if (super.checkHttpHeaderUserKey(user_key, resultMap)) {
|
|
|
+ try {
|
|
|
+ Map<String, Object> param = new HashMap<String, Object>();
|
|
|
+ if (apap != null) {
|
|
|
+ param.put("ship_name", apap.getShip_name());
|
|
|
+ param.put("apply_harbour_code", apap.getHarbour_code());
|
|
|
+ param.put("company_name", apap.getCompany_name());
|
|
|
+ param.put("to_harbour_code", apap.getTo_harbour_code());
|
|
|
+ param.put("goods", apap.getGoods());
|
|
|
+ param.put("adjust_flag", apap.getAdjust_flag());
|
|
|
+ param.put("apply_time_begin", apap.getApply_time_begin());
|
|
|
+ param.put("apply_time_end", apap.getApply_time_end());
|
|
|
+ param.put("apply_release_type", apap.getApply_release_type());
|
|
|
+ //
|
|
|
+ param.put("user_id", UserCache.getUserIdByKey(user_key));
|
|
|
+ }
|
|
|
+ resultMap = anchorageApply.selectUnAuditAnchorPositionApplyList4DepUser(resp, getPageBean(paged),
|
|
|
+ param);
|
|
|
+ } catch (Exception e) {
|
|
|
+ putStatusCode(resultMap, ResponseSC.SystemSC.SYSTEM_ERROR.getCode());
|
|
|
+ LogUtil.errorLog(e.getMessage());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return getModelAndView(resp, resultMap);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * XLS导出:检索省厅的待审核申请列表
|
|
|
+ *
|
|
|
+ * @param param
|
|
|
+ */
|
|
|
+ @RequestMapping(method = RequestMethod.GET, value = RequestURL.ACHOR_POSITION.ANCHOR_POSITION_APPLY_DEP_UNAUDIT)
|
|
|
+ public ModelAndView expUnAuditAnchorPositionApplyList4DepUser(HttpServletRequest req, HttpServletResponse resp,
|
|
|
+ @RequestParam String user_key, @RequestParam Integer export_type, @RequestParam String apply_release_type) {
|
|
|
+ Map<String, Object> resultMap = getResultMap();
|
|
|
+ // 验证权限
|
|
|
+ if (super.checkHttpHeaderUserKey(user_key, resultMap)) {
|
|
|
+ try {
|
|
|
+ Map<String, Object> param = new HashMap<String, Object>();
|
|
|
+ param.put("export_type", export_type);
|
|
|
+ param.put("apply_release_type", apply_release_type);
|
|
|
+ //
|
|
|
+ param.put("user_id", UserCache.getUserIdByKey(user_key));
|
|
|
+ resultMap = anchorageApply.selectUnAuditAnchorPositionApplyList4DepUser(resp, getPageBean(1), param);
|
|
|
+ } catch (Exception e) {
|
|
|
+ putStatusCode(resultMap, ResponseSC.SystemSC.SYSTEM_ERROR.getCode());
|
|
|
+ LogUtil.errorLog(e.getMessage());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return null;// getModelAndView(resp, resultMap);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 省厅发布计划
|
|
|
+ *
|
|
|
+ * @param param
|
|
|
+ */
|
|
|
+ @RequestMapping(method = RequestMethod.POST, value = RequestURL.ACHOR_POSITION.ANCHOR_POSITION_APPLY_PUBLISH)
|
|
|
+ public ModelAndView releaseApplyInfos(HttpServletRequest req, HttpServletResponse resp,
|
|
|
+ @RequestHeader(value = KEY.USER_KEY, required = true) String user_key,
|
|
|
+ @RequestBody AnchorPositionApplyParam apap) {
|
|
|
+ Map<String, Object> resultMap = getResultMap();
|
|
|
+ // 验证权限
|
|
|
+ if (super.checkHttpHeaderUserKey(user_key, resultMap)) {
|
|
|
+ try {
|
|
|
+ Map<String, Object> param = new HashMap<String, Object>();
|
|
|
+ param.put("user_id", UserCache.getUserIdByKey(user_key));
|
|
|
+ // 省厅发布申报计划的类型
|
|
|
+ // 1申报计划,2增补计划
|
|
|
+ param.put("apply_release_type", apap.getApply_release_type());
|
|
|
+ resultMap = anchorageApply.releaseApplyInfos(param);
|
|
|
+ } catch (Exception e) {
|
|
|
+ putStatusCode(resultMap, ResponseSC.SystemSC.SYSTEM_ERROR.getCode());
|
|
|
+ LogUtil.errorLog(e.getMessage());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return getModelAndView(resp, resultMap);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ *
|
|
|
+ * 根据申请计划ID检索详情
|
|
|
+ *
|
|
|
+ * @param req
|
|
|
+ * @param resp
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @RequestMapping(method = RequestMethod.GET, value = RequestURL.ACHOR_POSITION.ANCHOR_POSITION_APPLY_ID)
|
|
|
+ public ModelAndView getAnchorPositionApplyList(HttpServletRequest req, HttpServletResponse resp,
|
|
|
+ @RequestHeader(value = KEY.USER_KEY, required = true) String user_key, @PathVariable Integer id) {
|
|
|
+ Map<String, Object> resultMap = getResultMap();
|
|
|
+ // 验证权限
|
|
|
+ if (super.checkHttpHeaderUserKey(user_key, resultMap)) {
|
|
|
+ try {
|
|
|
+ resultMap = anchorageApply.selectAnchorPositionApplyInfo(id);
|
|
|
+ } catch (Exception e) {
|
|
|
+ putStatusCode(resultMap, ResponseSC.SystemSC.SYSTEM_ERROR.getCode());
|
|
|
+ LogUtil.errorLog(e.getMessage());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return getModelAndView(resp, resultMap);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ *
|
|
|
+ * 根据申请计划ID更新审核状态/或更新审核通过后计划的锚位安排
|
|
|
+ *
|
|
|
+ * @param req
|
|
|
+ * @param resp
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @RequestMapping(method = RequestMethod.PUT, value = RequestURL.ACHOR_POSITION.ANCHOR_POSITION_APPLY_ID)
|
|
|
+ public ModelAndView updateAnchorPositionAuditStatus(HttpServletRequest req, HttpServletResponse resp,
|
|
|
+ @RequestHeader(value = KEY.USER_KEY, required = true) String user_key, @PathVariable Integer id,
|
|
|
+ @RequestBody AnchorPositionApplyAuditParam apaap) {
|
|
|
+ Map<String, Object> resultMap = getResultMap();
|
|
|
+ // 验证权限
|
|
|
+ if (super.checkHttpHeaderUserKey(user_key, resultMap)) {
|
|
|
+ try {
|
|
|
+ apaap.setApply_id(id);
|
|
|
+ apaap.setUser_id(UserCache.getUserIdByKey(user_key));
|
|
|
+ resultMap = anchorageApply.updateAnchorPositionApplyInfoAuditStatus(apaap);
|
|
|
+ } catch (Exception e) {
|
|
|
+ putStatusCode(resultMap, ResponseSC.SystemSC.SYSTEM_ERROR.getCode());
|
|
|
+ LogUtil.errorLog(e.getMessage());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return getModelAndView(resp, resultMap);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ *
|
|
|
+ * 省厅调剂港口
|
|
|
+ *
|
|
|
+ * @param req
|
|
|
+ * @param resp
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @RequestMapping(method = RequestMethod.PUT, value = RequestURL.ACHOR_POSITION.ANCHOR_POSITION_APPLY_ID_DEP_ADJUST)
|
|
|
+ public ModelAndView updateAnchorPositionAuditStatusByDepAdjust(HttpServletRequest req, HttpServletResponse resp,
|
|
|
+ @RequestHeader(value = KEY.USER_KEY, required = true) String user_key, @PathVariable Integer id,
|
|
|
+ @RequestBody AnchorPositionApplyAuditParam apaap) {
|
|
|
+ Map<String, Object> resultMap = getResultMap();
|
|
|
+ // 验证权限
|
|
|
+ if (super.checkHttpHeaderUserKey(user_key, resultMap)) {
|
|
|
+ try {
|
|
|
+ apaap.setApply_id(id);
|
|
|
+ resultMap = anchorageApply.updateAnchorPositionAuditStatusByDepAdjust(apaap);
|
|
|
+ } catch (Exception e) {
|
|
|
+ putStatusCode(resultMap, ResponseSC.SystemSC.SYSTEM_ERROR.getCode());
|
|
|
+ LogUtil.errorLog(e.getMessage());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return getModelAndView(resp, resultMap);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ *
|
|
|
+ * 港口用户锚泊管理:检索审核状态2,4,5
|
|
|
+ *
|
|
|
+ * @param req
|
|
|
+ * @param resp
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @RequestMapping(method = RequestMethod.POST, value = RequestURL.ACHOR_POSITION.ANCHOR_POSITION_APPLY_MANAGE)
|
|
|
+ public ModelAndView selectManageAnchorPositionApplyList(HttpServletRequest req, HttpServletResponse resp,
|
|
|
+ @RequestHeader(value = KEY.USER_KEY, required = true) String user_key,
|
|
|
+ @RequestParam(value = "paged", required = false) Integer paged,
|
|
|
+ @RequestBody AnchorPositionApplyParam apap) {
|
|
|
+ Map<String, Object> resultMap = getResultMap();
|
|
|
+ // 验证权限
|
|
|
+ if (super.checkHttpHeaderUserKey(user_key, resultMap)) {
|
|
|
+ try {
|
|
|
+ Map<String, Object> param = new HashMap<String, Object>();
|
|
|
+ param.put("user_id", UserCache.getUserIdByKey(user_key));
|
|
|
+ if (apap != null) {
|
|
|
+ param.put("apply_time_begin", apap.getApply_time_begin());
|
|
|
+ param.put("apply_time_end", apap.getApply_time_end());
|
|
|
+ param.put("ship_name", apap.getShip_name());
|
|
|
+ param.put("attach_flag", apap.getAttach_flag());
|
|
|
+ }
|
|
|
+ resultMap = anchorageApply.selectManageAnchorPositionApplyList(resp, param, getPageBean(paged));
|
|
|
+ } catch (Exception e) {
|
|
|
+ putStatusCode(resultMap, ResponseSC.SystemSC.SYSTEM_ERROR.getCode());
|
|
|
+ LogUtil.errorLog(e.getMessage());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return getModelAndView(resp, resultMap);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ *
|
|
|
+ * XLS导出:港口用户锚泊管理:检索审核状态2,4,5
|
|
|
+ *
|
|
|
+ * @param req
|
|
|
+ * @param resp
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @RequestMapping(method = RequestMethod.GET, value = RequestURL.ACHOR_POSITION.ANCHOR_POSITION_APPLY_MANAGE)
|
|
|
+ public ModelAndView expManageAnchorPositionApplyList(HttpServletRequest req, HttpServletResponse resp,
|
|
|
+ @RequestParam String user_key, @RequestParam Integer export_type) {
|
|
|
+ Map<String, Object> resultMap = getResultMap();
|
|
|
+ // 验证权限
|
|
|
+ if (super.checkHttpHeaderUserKey(user_key, resultMap)) {
|
|
|
+ try {
|
|
|
+ Map<String, Object> param = new HashMap<String, Object>();
|
|
|
+ param.put("user_id", UserCache.getUserIdByKey(user_key));
|
|
|
+ param.put("export_type", export_type);
|
|
|
+ resultMap = anchorageApply.selectManageAnchorPositionApplyList(resp, param, getPageBean(1));
|
|
|
+ } catch (Exception e) {
|
|
|
+ putStatusCode(resultMap, ResponseSC.SystemSC.SYSTEM_ERROR.getCode());
|
|
|
+ LogUtil.errorLog(e.getMessage());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return null;// getModelAndView(resp, resultMap);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ *
|
|
|
+ * 港口用户检索的锚泊记录列表
|
|
|
+ *
|
|
|
+ * @param req
|
|
|
+ * @param resp
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @RequestMapping(method = RequestMethod.POST, value = RequestURL.ACHOR_POSITION.ANCHOR_POSITION_APPLY_LEAVE)
|
|
|
+ public ModelAndView selectMooringList4Harbour(HttpServletRequest req, HttpServletResponse resp,
|
|
|
+ @RequestHeader(value = KEY.USER_KEY, required = true) String user_key,
|
|
|
+ @RequestParam(value = "paged", required = false) Integer paged,
|
|
|
+ @RequestBody AnchorPositionApplyParam apap) {
|
|
|
+ Map<String, Object> resultMap = getResultMap();
|
|
|
+ // 验证权限
|
|
|
+ if (super.checkHttpHeaderUserKey(user_key, resultMap)) {
|
|
|
+ try {
|
|
|
+ Map<String, Object> param = new HashMap<String, Object>();
|
|
|
+ param.put("user_id", UserCache.getUserIdByKey(user_key));
|
|
|
+ if (apap != null) {
|
|
|
+ param.put("ship_name", apap.getShip_name());
|
|
|
+ param.put("attach_flag", apap.getAttach_flag());
|
|
|
+ param.put("apply_time_begin", apap.getApply_time_begin());
|
|
|
+ param.put("apply_time_end", apap.getApply_time_end());
|
|
|
+ }
|
|
|
+ resultMap = anchorageApply.selectMooringList4Harbour(resp, param, getPageBean(paged));
|
|
|
+ } catch (Exception e) {
|
|
|
+ putStatusCode(resultMap, ResponseSC.SystemSC.SYSTEM_ERROR.getCode());
|
|
|
+ LogUtil.errorLog(e.getMessage());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return getModelAndView(resp, resultMap);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ *
|
|
|
+ * XLS导出:港口用户检索的锚泊记录列表
|
|
|
+ *
|
|
|
+ * @param req
|
|
|
+ * @param resp
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @RequestMapping(method = RequestMethod.GET, value = RequestURL.ACHOR_POSITION.ANCHOR_POSITION_APPLY_LEAVE)
|
|
|
+ public ModelAndView expMooringList4Harbour(HttpServletRequest req, HttpServletResponse resp,
|
|
|
+ @RequestParam String user_key, @RequestParam Integer export_type,
|
|
|
+ @RequestParam(required = false) String ship_name) {
|
|
|
+ Map<String, Object> resultMap = getResultMap();
|
|
|
+ // 验证权限
|
|
|
+ if (super.checkHttpHeaderUserKey(user_key, resultMap)) {
|
|
|
+ try {
|
|
|
+ Map<String, Object> param = new HashMap<String, Object>();
|
|
|
+ param.put("user_id", UserCache.getUserIdByKey(user_key));
|
|
|
+ param.put("export_type", export_type);
|
|
|
+ param.put("ship_name", ship_name);
|
|
|
+ resultMap = anchorageApply.selectMooringList4Harbour(resp, param, getPageBean(1));
|
|
|
+ } catch (Exception e) {
|
|
|
+ putStatusCode(resultMap, ResponseSC.SystemSC.SYSTEM_ERROR.getCode());
|
|
|
+ LogUtil.errorLog(e.getMessage());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return null;// getModelAndView(resp, resultMap);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ *
|
|
|
+ * 撤回申请计划
|
|
|
+ *
|
|
|
+ * @param req
|
|
|
+ * @param resp
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @RequestMapping(method = RequestMethod.POST, value = RequestURL.ACHOR_POSITION.ANCHOR_POSITION_APPLY_REVOKE)
|
|
|
+ public ModelAndView revokeAnchorPositionApply(HttpServletRequest req, HttpServletResponse resp,
|
|
|
+ @RequestHeader(value = KEY.USER_KEY, required = true) String user_key, @PathVariable Integer apply_id) {
|
|
|
+ Map<String, Object> resultMap = getResultMap();
|
|
|
+ // 验证权限
|
|
|
+ if (super.checkHttpHeaderUserKey(user_key, resultMap)) {
|
|
|
+ try {
|
|
|
+ Map<String, Object> param = new HashMap<String, Object>();
|
|
|
+ param.put("apply_id", apply_id);
|
|
|
+ resultMap = anchorageApply.revokeAnchorPositionApply(param);
|
|
|
+ } catch (Exception e) {
|
|
|
+ putStatusCode(resultMap, ResponseSC.SystemSC.SYSTEM_ERROR.getCode());
|
|
|
+ LogUtil.errorLog(e.getMessage());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return getModelAndView(resp, resultMap);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ *
|
|
|
+ * 港口管理单位更改已通过审核的申请计划的计划锚泊时间,计划离泊时间和备注
|
|
|
+ *
|
|
|
+ * @param req
|
|
|
+ * @param resp
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @RequestMapping(method = RequestMethod.POST, value = RequestURL.ACHOR_POSITION.ANCHOR_POSITION_APPLY_AUDIT_ID)
|
|
|
+ public ModelAndView updateTimeInfo4AuditApply(HttpServletRequest req, HttpServletResponse resp,
|
|
|
+ @RequestHeader(value = KEY.USER_KEY, required = true) String user_key, @PathVariable Integer apply_id,
|
|
|
+ @RequestBody AnchorPositionApplyAuditParam apaap) {
|
|
|
+ Map<String, Object> resultMap = getResultMap();
|
|
|
+ // 验证权限
|
|
|
+ if (super.checkHttpHeaderUserKey(user_key, resultMap)) {
|
|
|
+ try {
|
|
|
+ Map<String, Object> param = new HashMap<String, Object>();
|
|
|
+ param.put("apply_id", apply_id);
|
|
|
+ if (apaap != null) {
|
|
|
+ param.put("plan_park_time", apaap.getPlan_park_time());
|
|
|
+ param.put("plan_leave_time", apaap.getPlan_leave_time());
|
|
|
+ param.put("remark", apaap.getRemark());
|
|
|
+ }
|
|
|
+ resultMap = anchorageApply.updateTimeInfo4AuditApply(param);
|
|
|
+ } catch (Exception e) {
|
|
|
+ putStatusCode(resultMap, ResponseSC.SystemSC.SYSTEM_ERROR.getCode());
|
|
|
+ LogUtil.errorLog(e.getMessage());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return getModelAndView(resp, resultMap);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ *
|
|
|
+ * 港口管理单位确定船舶离泊:更新实际锚泊时刻,离泊时刻,诚信项目
|
|
|
+ *
|
|
|
+ * @param req
|
|
|
+ * @param resp
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @RequestMapping(method = RequestMethod.POST, value = RequestURL.ACHOR_POSITION.ANCHOR_POSITION_APPLY_LEAVE_ID)
|
|
|
+ public ModelAndView updateApplyInfo4Leave(HttpServletRequest req, HttpServletResponse resp,
|
|
|
+ @RequestHeader(value = KEY.USER_KEY, required = true) String user_key, @PathVariable Integer apply_id,
|
|
|
+ @RequestBody AnchorPositionApplyAuditParam apaap) {
|
|
|
+ Map<String, Object> resultMap = getResultMap();
|
|
|
+ // 验证权限
|
|
|
+ if (super.checkHttpHeaderUserKey(user_key, resultMap)) {
|
|
|
+ try {
|
|
|
+ Map<String, Object> param = new HashMap<String, Object>();
|
|
|
+ param.put("apply_id", apply_id);
|
|
|
+ if (apaap != null) {
|
|
|
+ param.put("actual_park_time", apaap.getActual_park_time());
|
|
|
+ param.put("actual_leave_time", apaap.getActual_leave_time());
|
|
|
+ param.put("integrity", apaap.getIntegrity());
|
|
|
+ }
|
|
|
+ resultMap = anchorageApply.updateApplyInfo4Leave(param);
|
|
|
+ } catch (Exception e) {
|
|
|
+ putStatusCode(resultMap, ResponseSC.SystemSC.SYSTEM_ERROR.getCode());
|
|
|
+ LogUtil.errorLog(e.getMessage());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return getModelAndView(resp, resultMap);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ *
|
|
|
+ * 港口管理单位将船代申请提交给省厅,并为省厅冗余审核记录
|
|
|
+ *
|
|
|
+ * @param req
|
|
|
+ * @param resp
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @RequestMapping(method = RequestMethod.POST, value = RequestURL.ACHOR_POSITION.ANCHOR_POSITION_APPLY_SUBMMIT)
|
|
|
+ public ModelAndView submmitAppy2Dep(HttpServletRequest req, HttpServletResponse resp,
|
|
|
+ @RequestHeader(value = KEY.USER_KEY, required = true) String user_key, @PathVariable Integer apply_id) {
|
|
|
+ Map<String, Object> resultMap = getResultMap();
|
|
|
+ // 验证权限
|
|
|
+ if (super.checkHttpHeaderUserKey(user_key, resultMap)) {
|
|
|
+ try {
|
|
|
+ AnchorPositionApplyAuditParam param = new AnchorPositionApplyAuditParam();
|
|
|
+ param.setApply_id(apply_id);
|
|
|
+ // 省厅审核标志
|
|
|
+ param.setStatus(Constants.Entity.ANCHOR_POSITION_APPLY_STATUS_DEP_AUDIT);
|
|
|
+ resultMap = anchorageApply.submmitAppy2Dep(param);
|
|
|
+ } catch (Exception e) {
|
|
|
+ putStatusCode(resultMap, ResponseSC.SystemSC.SYSTEM_ERROR.getCode());
|
|
|
+ LogUtil.errorLog(e.getMessage());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return getModelAndView(resp, resultMap);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ *
|
|
|
+ * 省厅将港口管理单位转过来的请求重新分发给其他港口 将apply_harbour_code改成最新的港口号, 将状态从省厅待审核改成审核通过
|
|
|
+ * param需要的参数有:apply_id,apply_harbour_code
|
|
|
+ *
|
|
|
+ * @param req
|
|
|
+ * @param resp
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @RequestMapping(method = RequestMethod.POST, value = RequestURL.ACHOR_POSITION.ANCHOR_POSITION_APPLY_DEP_DISPATCHER)
|
|
|
+ public ModelAndView depUserDispatcherApply(HttpServletRequest req, HttpServletResponse resp,
|
|
|
+ @RequestHeader(value = KEY.USER_KEY, required = true) String user_key,
|
|
|
+ @RequestBody AnchorPositionApplyAuditParam param) {
|
|
|
+ Map<String, Object> resultMap = getResultMap();
|
|
|
+ // 验证权限
|
|
|
+ if (super.checkHttpHeaderUserKey(user_key, resultMap)) {
|
|
|
+ try {
|
|
|
+ resultMap = anchorageApply.depUserDispatcherApply(param);
|
|
|
+ } catch (Exception e) {
|
|
|
+ putStatusCode(resultMap, ResponseSC.SystemSC.SYSTEM_ERROR.getCode());
|
|
|
+ LogUtil.errorLog(e.getMessage());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return getModelAndView(resp, resultMap);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ *
|
|
|
+ * 删除未审核的使用计划
|
|
|
+ *
|
|
|
+ * @param req
|
|
|
+ * @param resp
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @RequestMapping(method = RequestMethod.DELETE, value = RequestURL.ACHOR_POSITION.ANCHOR_POSITION_APPLY_ID)
|
|
|
+ public ModelAndView deleteUnauditApply(HttpServletRequest req, HttpServletResponse resp,
|
|
|
+ @RequestHeader(value = KEY.USER_KEY, required = true) String user_key, @PathVariable Integer id) {
|
|
|
+ Map<String, Object> resultMap = getResultMap();
|
|
|
+ // 验证权限
|
|
|
+ if (super.checkHttpHeaderUserKey(user_key, resultMap)) {
|
|
|
+ try {
|
|
|
+ Map<String, Object> param = new HashMap<String, Object>();
|
|
|
+ param.put("id", id);
|
|
|
+ resultMap = anchorageApply.deleteUnauditApply(param);
|
|
|
+ } catch (Exception e) {
|
|
|
+ putStatusCode(resultMap, ResponseSC.SystemSC.SYSTEM_ERROR.getCode());
|
|
|
+ LogUtil.errorLog(e.getMessage());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return getModelAndView(resp, resultMap);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ *
|
|
|
+ * 检索省厅的审核冗余记录:锚泊管理列表(list_type=1)/锚泊记录列表(list_type=2)
|
|
|
+ *
|
|
|
+ * @param req
|
|
|
+ * @param resp
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @RequestMapping(method = RequestMethod.POST, value = RequestURL.ACHOR_POSITION.ANCHOR_POSITION_APPLY_DEP_AUDIT)
|
|
|
+ public ModelAndView getDepAuditApplyInfos(HttpServletRequest req, HttpServletResponse resp,
|
|
|
+ @RequestHeader(value = KEY.USER_KEY, required = true) String user_key,
|
|
|
+ @RequestParam(value = "paged", required = false) Integer paged, @RequestBody AnchorPositionApplyParam apap,
|
|
|
+ @RequestParam(value = "list_type", required = false) Integer list_type) {
|
|
|
+ Map<String, Object> resultMap = getResultMap();
|
|
|
+ // 验证权限
|
|
|
+ if (super.checkHttpHeaderUserKey(user_key, resultMap)) {
|
|
|
+ try {
|
|
|
+ Map<String, Object> param = new HashMap<String, Object>();
|
|
|
+ param.put("ship_name", apap.getShip_name());
|
|
|
+ param.put("cbhh", apap.getCbbh());
|
|
|
+ param.put("harbour_code", apap.getHarbour_code());
|
|
|
+ param.put("company_name", apap.getCompany_name());
|
|
|
+ param.put("to_harbour_code", apap.getTo_harbour_code());
|
|
|
+ param.put("goods", apap.getGoods());
|
|
|
+ param.put("adjust_flag", apap.getAdjust_flag());
|
|
|
+ param.put("attach_flag", apap.getAttach_flag());
|
|
|
+ param.put("apply_time_begin", apap.getApply_time_begin());
|
|
|
+ param.put("apply_time_end", apap.getApply_time_end());
|
|
|
+ if (list_type != null) {
|
|
|
+ if (list_type == 1) {
|
|
|
+ // 锚泊管理
|
|
|
+ param.put("statusArray", new Integer[] { Constants.Entity.ANCHOR_POSITION_APPLY_STATUS_AUDIT_OK,
|
|
|
+ Constants.Entity.ANCHOR_POSITION_APPLY_STATUS_LEAVE_UNCHECKED
|
|
|
+ });
|
|
|
+ } else if (list_type == 2) {
|
|
|
+ // 锚泊记录
|
|
|
+ param.put("statusArray", new Integer[] { Constants.Entity.ANCHOR_POSITION_APPLY_STATUS_AUDIT_NG,
|
|
|
+ Constants.Entity.ANCHOR_POSITION_APPLY_STATUS_LEAVE_UNFEE
|
|
|
+ });
|
|
|
+ }
|
|
|
+ resultMap = anchorageApply.getDepAuditApplyInfos(resp, getPageBean(paged), param);
|
|
|
+ }
|
|
|
+ } catch (Exception e) {
|
|
|
+ putStatusCode(resultMap, ResponseSC.SystemSC.SYSTEM_ERROR.getCode());
|
|
|
+ LogUtil.errorLog(e.getMessage());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return getModelAndView(resp, resultMap);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ *
|
|
|
+ * XLS导出:检索省厅的审核冗余记录:锚泊管理列表(list_type=1)/锚泊记录列表(list_type=2)
|
|
|
+ *
|
|
|
+ * @param req
|
|
|
+ * @param resp
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @RequestMapping(method = RequestMethod.GET, value = RequestURL.ACHOR_POSITION.ANCHOR_POSITION_APPLY_DEP_AUDIT)
|
|
|
+ public ModelAndView expDepAuditApplyInfos(HttpServletRequest req, HttpServletResponse resp,
|
|
|
+ @RequestParam String user_key, @RequestParam Integer export_type, @RequestParam Integer list_type,
|
|
|
+ @RequestParam(required = false) Integer harbour_code) {
|
|
|
+ Map<String, Object> resultMap = getResultMap();
|
|
|
+ // 验证权限
|
|
|
+ if (super.checkHttpHeaderUserKey(user_key, resultMap)) {
|
|
|
+ try {
|
|
|
+ Map<String, Object> param = new HashMap<String, Object>();
|
|
|
+ param.put("export_type", export_type);
|
|
|
+ param.put("harbour_code", harbour_code);
|
|
|
+ param.put("list_type", list_type);
|
|
|
+ if (list_type != null) {
|
|
|
+ if (list_type == 1) {
|
|
|
+ // 锚泊管理
|
|
|
+ param.put("statusArray",
|
|
|
+ new Integer[] { Constants.Entity.ANCHOR_POSITION_APPLY_STATUS_AUDIT_OK,
|
|
|
+ Constants.Entity.ANCHOR_POSITION_APPLY_STATUS_LEAVE_UNCHECKED,
|
|
|
+ Constants.Entity.ANCHOR_POSITION_APPLY_STATUS_LEAVE_UNFEE });
|
|
|
+ } else if (list_type == 2) {
|
|
|
+ // 锚泊记录
|
|
|
+ param.put("statusArray", new Integer[] { Constants.Entity.ANCHOR_POSITION_APPLY_STATUS_AUDIT_NG,
|
|
|
+ Constants.Entity.ANCHOR_POSITION_APPLY_STATUS_FEE_OK });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ resultMap = anchorageApply.getDepAuditApplyInfos(resp, getPageBean(1), param);
|
|
|
+ } catch (Exception e) {
|
|
|
+ putStatusCode(resultMap, ResponseSC.SystemSC.SYSTEM_ERROR.getCode());
|
|
|
+ LogUtil.errorLog(e.getMessage());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ *
|
|
|
+ * 更改计划时间与同意状态
|
|
|
+ *
|
|
|
+ * @param req
|
|
|
+ * @param resp
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @RequestMapping(method = RequestMethod.PUT, value = RequestURL.ACHOR_POSITION.ANCHOR_POSITION_APPLY_TIME)
|
|
|
+ public ModelAndView updateTime(HttpServletRequest req, HttpServletResponse resp,
|
|
|
+ @RequestHeader(value = KEY.USER_KEY, required = true) String user_key,
|
|
|
+ @RequestBody AnchorPositionApplyInfo apap) {
|
|
|
+ Map<String, Object> resultMap = getResultMap();
|
|
|
+ // 验证权限
|
|
|
+ if (super.checkHttpHeaderUserKey(user_key, resultMap)) {
|
|
|
+ try {
|
|
|
+ Map<String, Object> param = new HashMap<String, Object>();
|
|
|
+ param.put("apply_id", apap.getId());
|
|
|
+ Integer operate = null;
|
|
|
+ if (apap.getModify_time_audit_flag() == null) {
|
|
|
+ // 更改修改时间
|
|
|
+ param.put("modify_time_audit_flag", Constants.Entity.ANCHOR_POSITION_APPLY_MODIFY_TIME_WAITING);
|
|
|
+ param.put("modify_park_time", apap.getModify_park_time());
|
|
|
+ param.put("modify_leave_time", apap.getModify_leave_time());
|
|
|
+ operate = Constants.Operate.MODIFY_APPLY_INFO_TIME_UPDATE;
|
|
|
+ } else if (apap.getModify_time_audit_flag() == Constants.Entity.ANCHOR_POSITION_APPLY_MODIFY_TIME_YES
|
|
|
+ || apap.getModify_time_audit_flag() == Constants.Entity.ANCHOR_POSITION_APPLY_MODIFY_TIME_NO) {
|
|
|
+ // 同意修改时间与否
|
|
|
+ param.put("modify_time_audit_flag", apap.getModify_time_audit_flag());
|
|
|
+ operate = Constants.Operate.MODIFY_APPLY_INFO_TIME_UPDATE_AUDIT;
|
|
|
+ }
|
|
|
+ resultMap = anchorageApply.updateApplyInfo(operate, param);
|
|
|
+ } catch (Exception e) {
|
|
|
+ putStatusCode(resultMap, ResponseSC.SystemSC.SYSTEM_ERROR.getCode());
|
|
|
+ LogUtil.errorLog(e.getMessage());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return getModelAndView(resp, resultMap);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ *
|
|
|
+ * 更改计划详情
|
|
|
+ *
|
|
|
+ * @param req
|
|
|
+ * @param resp
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @RequestMapping(method = RequestMethod.POST, value = RequestURL.ACHOR_POSITION.ANCHOR_POSITION_APPLY_ID)
|
|
|
+ public ModelAndView updateApplyInfo(HttpServletRequest req, HttpServletResponse resp,
|
|
|
+ @RequestHeader(value = KEY.USER_KEY, required = true) String user_key, @PathVariable Integer id,
|
|
|
+ @RequestBody AnchorPositionApplyInfo apap) {
|
|
|
+ Map<String, Object> resultMap = getResultMap();
|
|
|
+ // 验证权限
|
|
|
+ if (super.checkHttpHeaderUserKey(user_key, resultMap)) {
|
|
|
+ try {
|
|
|
+ Map<String, Object> param = new HashMap<String, Object>();
|
|
|
+ Integer operate = Constants.Operate.MODIFY_APPLY_INFO;
|
|
|
+ param.put("apply_id", id);
|
|
|
+ param.put("ship_id", apap.getShip_id());
|
|
|
+ param.put("from_harbour_code", apap.getFrom_harbour_code());
|
|
|
+ param.put("to_harbour_code", apap.getTo_harbour_code());
|
|
|
+ param.put("length", apap.getLength());
|
|
|
+ param.put("goods", apap.getGoods());
|
|
|
+ param.put("cbcs", apap.getCbcs());
|
|
|
+ param.put("trade_type", apap.getTrade_type());
|
|
|
+ param.put("plan_park_time", apap.getActual_park_time());
|
|
|
+ param.put("plan_leave_time", apap.getPlan_leave_time());
|
|
|
+ param.put("adjust_flag", apap.getAdjust_flag());
|
|
|
+ param.put("net_tons", apap.getNet_tons());
|
|
|
+ param.put("apply_ship_type", apap.getApply_ship_type());
|
|
|
+ param.put("ship_contact", apap.getShip_contact());
|
|
|
+ param.put("status", Constants.Entity.ANCHOR_POSITION_APPLY_STATUS_UNAUDIT);
|
|
|
+ resultMap = anchorageApply.updateApplyInfo(operate, param);
|
|
|
+ } catch (Exception e) {
|
|
|
+ putStatusCode(resultMap, ResponseSC.SystemSC.SYSTEM_ERROR.getCode());
|
|
|
+ LogUtil.errorLog(e.getMessage());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return getModelAndView(resp, resultMap);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ *
|
|
|
+ * 检索调剂港口列表
|
|
|
+ *
|
|
|
+ * @param req
|
|
|
+ * @param resp
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @RequestMapping(method = RequestMethod.POST, value = RequestURL.ACHOR_POSITION.ANCHOR_POSITION_APPLY_ADJUST_HARBOUR)
|
|
|
+ public ModelAndView getApplyAdjustInfos(HttpServletRequest req, HttpServletResponse resp,
|
|
|
+ @RequestHeader(value = KEY.USER_KEY, required = true) String user_key, @PathVariable Long id,
|
|
|
+ @RequestBody ApplyAdjustInfo aai) {
|
|
|
+ Map<String, Object> resultMap = getResultMap();
|
|
|
+ // 验证权限
|
|
|
+ if (super.checkHttpHeaderUserKey(user_key, resultMap)) {
|
|
|
+ try {
|
|
|
+ aai.setApply_id(id);
|
|
|
+ resultMap = anchorageApply.getAdjustInfos(aai);
|
|
|
+ } catch (Exception e) {
|
|
|
+ putStatusCode(resultMap, ResponseSC.SystemSC.SYSTEM_ERROR.getCode());
|
|
|
+ LogUtil.errorLog(e.getMessage());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return getModelAndView(resp, resultMap);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ *
|
|
|
+ * 根据某锚位下面挂靠的计划
|
|
|
+ *
|
|
|
+ * @param req
|
|
|
+ * @param resp
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @RequestMapping(method = RequestMethod.POST, value = RequestURL.ACHOR_POSITION.ANCHOR_POSITION_APPLY_ANCHOR_POSITION)
|
|
|
+ public ModelAndView getApplyInfoByAuditPosition(HttpServletRequest req, HttpServletResponse resp,
|
|
|
+ @RequestHeader(value = KEY.USER_KEY, required = true) String user_key, @PathVariable Long id,
|
|
|
+ @RequestBody Map<String, Object> param) {
|
|
|
+ Map<String, Object> resultMap = getResultMap();
|
|
|
+ // 验证权限
|
|
|
+ if (super.checkHttpHeaderUserKey(user_key, resultMap)) {
|
|
|
+ try {
|
|
|
+ param.put("audit_anchor_positon_id", id);
|
|
|
+ resultMap = anchorageApply.getApplyInfoByAuditPosition(param);
|
|
|
+ } catch (Exception e) {
|
|
|
+ putStatusCode(resultMap, ResponseSC.SystemSC.SYSTEM_ERROR.getCode());
|
|
|
+ LogUtil.errorLog(e.getMessage());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return getModelAndView(resp, resultMap);
|
|
|
+ }
|
|
|
+}
|