|
@@ -1,45 +1,354 @@
|
|
|
package com.xt.jygl.gkyxtjyfx.hxhbtj.ctl;
|
|
|
|
|
|
import java.text.SimpleDateFormat;
|
|
|
+import java.util.ArrayList;
|
|
|
import java.util.Calendar;
|
|
|
import java.util.Date;
|
|
|
import java.util.List;
|
|
|
+import javax.persistence.criteria.CriteriaBuilder;
|
|
|
+import javax.persistence.criteria.CriteriaQuery;
|
|
|
+import javax.persistence.criteria.Predicate;
|
|
|
+import javax.persistence.criteria.Root;
|
|
|
+import javax.servlet.http.HttpServletRequest;
|
|
|
|
|
|
+import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.data.domain.Page;
|
|
|
+import org.springframework.data.jpa.domain.Specification;
|
|
|
import org.springframework.stereotype.Controller;
|
|
|
import org.springframework.ui.Model;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
+import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
|
|
|
-import com.xt.jygl.ggfwxxgl.hxgl.entity.HxglEntity;
|
|
|
+import com.fasterxml.jackson.core.JsonProcessingException;
|
|
|
+import com.xt.jygl.common.BaseWebCtl;
|
|
|
+import com.xt.jygl.common.Constants;
|
|
|
+import com.xt.jygl.common.GlobalData;
|
|
|
import com.xt.jygl.ggfwxxgl.hxgl.service.HxglService;
|
|
|
import com.xt.jygl.gkjcxx.gk.entity.GkEntity;
|
|
|
import com.xt.jygl.gkjcxx.gk.service.GkService;
|
|
|
+import com.xt.jygl.gkyxtjyfx.hxhbtj.entity.HxhbtjEntity;
|
|
|
+import com.xt.jygl.gkyxtjyfx.hxhbtj.service.HxhbtjService;
|
|
|
import com.xt.jygl.gkyxtjyfx.hxhbtj.vo.HxhbtjVo;
|
|
|
-import com.xtframe.core.base.ctl.BaseCtl;
|
|
|
+import com.xtframe.core.base.ctl.WebJsonResult;
|
|
|
import com.xtframe.core.support.SecurityMgr;
|
|
|
+import com.xtframe.sec.code.entity.CodeEntity;
|
|
|
+import com.xtframe.sec.common.BaseEntity;
|
|
|
+import com.xtframe.sec.common.QueryService;
|
|
|
+import com.xtframe.sec.common.SimplePageRequest;
|
|
|
+import com.xtframe.sec.utils.SecUtils;
|
|
|
import com.xtframe.util.StringUtils;
|
|
|
|
|
|
@Controller
|
|
|
@RequestMapping("/hxhbtj")
|
|
|
-public class HxhbtjCtl extends BaseCtl {
|
|
|
+public class HxhbtjCtl extends BaseWebCtl {
|
|
|
@Autowired
|
|
|
private HxglService hxglService;
|
|
|
@Autowired
|
|
|
private SecurityMgr securityMgr;
|
|
|
@Autowired
|
|
|
private GkService gkService;
|
|
|
+ @Autowired
|
|
|
+ private HxhbtjService hxhbtjService;
|
|
|
+ @Autowired
|
|
|
+ private QueryService query;
|
|
|
|
|
|
- /**
|
|
|
- * 统计一览页面
|
|
|
- * @param model
|
|
|
- * @param rq 日期
|
|
|
- * @param szgkid 所在港区ID
|
|
|
- * @param menuid
|
|
|
- * @return
|
|
|
- */
|
|
|
- @SuppressWarnings("unused")
|
|
|
+// @SuppressWarnings("unused")
|
|
|
@RequestMapping(value = "/main")
|
|
|
- public String main(Model model, final String rq, final String szgkid, final String menuid) {
|
|
|
+// @RequiresPermissions("hxhbtj:main")
|
|
|
+ public String main(SimplePageRequest page, Model model, final HttpServletRequest request, final String rq, final String szgkid, final String menuid) throws JsonProcessingException {
|
|
|
+ // 查询条件
|
|
|
+ Specification<HxhbtjEntity> spec = new Specification<HxhbtjEntity>() {
|
|
|
+ @Override
|
|
|
+ public Predicate toPredicate(Root<HxhbtjEntity> root, CriteriaQuery<?> query, CriteriaBuilder cb) {
|
|
|
+ List<Predicate> list = new ArrayList<Predicate>();
|
|
|
+ //所在港口
|
|
|
+ if (StringUtils.isNotEmpty(szgkid)) {
|
|
|
+ list.add(cb.like(root.get("szgk").get("id").as(String.class), "%" + szgkid + "%"));
|
|
|
+ }
|
|
|
+ //日期
|
|
|
+ if (rq != null) {
|
|
|
+ list.add(cb.like(root.get("rq").as(String.class), "%" + rq + "%"));
|
|
|
+ }
|
|
|
+
|
|
|
+ list.add(cb.notEqual(root.get("recordStatus").as(Integer.class), BaseEntity.RECORD_STATE_DELETE));
|
|
|
+ return cb.and(list.toArray(new Predicate[] {}));
|
|
|
+ }
|
|
|
+ };
|
|
|
+
|
|
|
+ Page<HxhbtjEntity> list = query.findAll(spec, toPageRequest(page), HxhbtjEntity.class);
|
|
|
+ List<HxhbtjVo> voList = new ArrayList<HxhbtjVo>();
|
|
|
+ for (HxhbtjEntity entity : list) {
|
|
|
+ HxhbtjVo vo = new HxhbtjVo();
|
|
|
+ if (entity != null) {
|
|
|
+ BeanUtils.copyProperties(entity, vo);
|
|
|
+ vo.setSzgkzw(entity.getSzgk() != null ? entity.getSzgk().getGkmc() : "");
|
|
|
+ vo.setBywcl(entity.getBywcl() != null ? entity.getBywcl().toString() : "");
|
|
|
+ vo.setBnljl(entity.getBnljl() != null ? entity.getBnljl().toString() : "");
|
|
|
+ vo.setTbzzs(entity.getTbzzs() != null ? entity.getTbzzs().toString() : "");
|
|
|
+ vo.setRq(entity.getRq() != null ? entity.getRq().toString() : "");
|
|
|
+ voList.add(vo);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ model.addAttribute("list", voList);
|
|
|
+ model.addAttribute("menuid", menuid);
|
|
|
+ model.addAttribute("szgkid", szgkid);
|
|
|
+ model.addAttribute("rq", rq);
|
|
|
+
|
|
|
+ // 翻页共通
|
|
|
+ putPageInfo(model, page, list);
|
|
|
+ return "gkyxtjyfx/hxhbtj/hxhbtj";
|
|
|
+ }
|
|
|
+
|
|
|
+ @RequestMapping(value = "/delete")
|
|
|
+// @RequiresPermissions("hxhbtj:delete")
|
|
|
+ @ResponseBody
|
|
|
+ public WebJsonResult delete(Model model, String id) {
|
|
|
+ WebJsonResult wr = success();
|
|
|
+ try {
|
|
|
+ hxhbtjService.logicDelete(id);
|
|
|
+ } catch (Exception e) {
|
|
|
+ wr.setSuccess(false);
|
|
|
+ wr.setMessage("操作失败!");
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ return wr;
|
|
|
+ }
|
|
|
+
|
|
|
+ @RequestMapping(value = "/view")
|
|
|
+// @RequiresPermissions("hxhbtj:main")
|
|
|
+ public String view(Model model, String id, String menuid) {
|
|
|
+ HxhbtjEntity entity = hxhbtjService.findOne(id);
|
|
|
+ HxhbtjVo vo = new HxhbtjVo();
|
|
|
+ BeanUtils.copyProperties(entity, vo);
|
|
|
+ vo.setSzgkzw(entity.getSzgk() != null ? entity.getSzgk().getGkmc() : "");
|
|
|
+ vo.setBywcl(entity.getBywcl() != null ? entity.getBywcl().toString() : "");
|
|
|
+ vo.setBnljl(entity.getBnljl() != null ? entity.getBnljl().toString() : "");
|
|
|
+ vo.setTbzzs(entity.getTbzzs() != null ? entity.getTbzzs().toString() : "");
|
|
|
+ vo.setRq(entity.getRq() != null ? entity.getRq().toString() : "");
|
|
|
+
|
|
|
+ //月内外贸完成量
|
|
|
+ vo.setNmjzxttl(entity.getNmjzxttl() != null ? entity.getNmjzxttl().toString() : "");
|
|
|
+ vo.setWmjzxttl(entity.getWmjzxttl() != null ? entity.getWmjzxttl().toString() : "");
|
|
|
+
|
|
|
+ //年内外贸完成量
|
|
|
+ vo.setNnmjzxttl(entity.getNnmjzxttl() != null ? entity.getNnmjzxttl().toString() : "");
|
|
|
+ vo.setNwmjzxttl(entity.getNwmjzxttl() != null ? entity.getNwmjzxttl().toString() : "");
|
|
|
+
|
|
|
+ //内外贸同比增长数
|
|
|
+ vo.setNmtbzzs(entity.getNmtbzzs() != null ? entity.getNmtbzzs().toString() : "");
|
|
|
+ vo.setWmtbzzs(entity.getWmtbzzs() != null ? entity.getWmtbzzs().toString() : "");
|
|
|
+
|
|
|
+ //本月运营航线、航班数
|
|
|
+ vo.setYyhxts(entity.getYyhxts() != null ? entity.getYyhxts().toString() : "");
|
|
|
+ vo.setYyhxhbs(entity.getYyhxhbs() != null ? entity.getYyhxhbs().toString() : "");
|
|
|
+ vo.setJyhxts(entity.getJyhxts() != null ? entity.getJyhxts().toString() : "");
|
|
|
+ vo.setJyhxhbs(entity.getJyhxhbs() != null ? entity.getJyhxhbs().toString() : "");
|
|
|
+
|
|
|
+ vo.setNzxts(entity.getNzxts() != null ? entity.getNzxts().toString() : "");
|
|
|
+ vo.setNzxhbs(entity.getJyhxhbs() != null ? entity.getNzxhbs().toString() : "");
|
|
|
+ vo.setNmhxts(entity.getNmhxts() != null ? entity.getNmhxts().toString() : "");
|
|
|
+ vo.setNmhxhbs(entity.getNmhxhbs() != null ? entity.getNmhxhbs().toString() : "");
|
|
|
+
|
|
|
+ // 新开辟航线数
|
|
|
+ vo.setYyxkphxs(entity.getYyxkphxs() != null ? entity.getYyxkphxs().toString() : "");
|
|
|
+ vo.setYytkhxs(entity.getYytkhxs() != null ? entity.getYytkhxs().toString() : "");
|
|
|
+ vo.setJyxkphxs(entity.getJyxkphxs() != null ? entity.getJyxkphxs().toString() : "");
|
|
|
+ vo.setJytkhxs(entity.getJytkhxs() != null ? entity.getJytkhxs().toString() : "");
|
|
|
+
|
|
|
+ //停开航线数
|
|
|
+ vo.setNzxxkphxs(entity.getNzxxkphxs() != null ? entity.getNzxxkphxs().toString() : "");
|
|
|
+ vo.setNzxtkhxs(entity.getNzxtkhxs() != null ? entity.getNzxtkhxs().toString() : "");
|
|
|
+ vo.setNmxkphxs(entity.getNmxkphxs() != null ? entity.getNmxkphxs().toString() : "");
|
|
|
+ vo.setNmtkhxs(entity.getNmtkhxs() != null ? entity.getNmtkhxs().toString() : "");
|
|
|
+
|
|
|
+ // 填表人跟联系电话
|
|
|
+ vo.setTbr(securityMgr.getCurrUser().getName());
|
|
|
+ if (securityMgr.getCurrUser().getSfjyr().getText().equals("是")) {
|
|
|
+ vo.setLxdh(securityMgr.getCurrUser().getSsjyr().getLxdh());
|
|
|
+ } else {
|
|
|
+ vo.setLxdh(securityMgr.getCurrUser().getSsglbm() != null ? securityMgr.getCurrUser().getSsglbm().getLxdh() : "");
|
|
|
+ }
|
|
|
+
|
|
|
+ model.addAttribute("record", vo);
|
|
|
+ model.addAttribute("menuid", menuid);
|
|
|
+ return "gkyxtjyfx/hxhbtj/hxhbtjView";
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ @RequestMapping(value = "/add")
|
|
|
+// @RequiresPermissions("hxhbtj:add")
|
|
|
+ public String add(Model model, String menuid, String path) {
|
|
|
+ if (!StringUtils.isEmpty(path)) {
|
|
|
+ path = path.replace(":", "&");
|
|
|
+ String jyrid = path.substring(path.lastIndexOf("=") + 1);
|
|
|
+ }
|
|
|
+ if(SecUtils.getCurrUser() != null){
|
|
|
+ List<CodeEntity> list = securityMgr.codeService().findValidCodesByGroupCodeAndCity(Constants.GROUP_CODE_SZD, GlobalData.CITY_CODE);
|
|
|
+ model.addAttribute("sz",list.size()==1?list.get(0).getId():"");
|
|
|
+ if(list.size()==1){
|
|
|
+ List<GkEntity> gklist = gkService.findBySzd(list.get(0).getId());
|
|
|
+ model.addAttribute("gk",gklist.size()==1?gklist.get(0).getId():"");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ model.addAttribute("path", path);
|
|
|
+ model.addAttribute("menuid", menuid);
|
|
|
+ return "gkyxtjyfx/hxhbtj/hxhbtjAdd";
|
|
|
+ }
|
|
|
+
|
|
|
+ @RequestMapping(value = "/edit")
|
|
|
+// @RequiresPermissions("hxhbtj:edit")
|
|
|
+ public String edit(Model model, String id, String path) {
|
|
|
+ if (!StringUtils.isEmpty(path)) {
|
|
|
+ path = path.replace(":", "&");
|
|
|
+ }
|
|
|
+ model.addAttribute("path", path);
|
|
|
+ HxhbtjEntity entity = hxhbtjService.findOne(id);
|
|
|
+ HxhbtjVo vo = new HxhbtjVo();
|
|
|
+ BeanUtils.copyProperties(entity, vo);
|
|
|
+ vo.setSzgkzw(entity.getSzgk() != null ? entity.getSzgk().getGkmc() : "");
|
|
|
+ vo.setBywcl(entity.getBywcl() != null ? entity.getBywcl().toString() : "");
|
|
|
+ vo.setBnljl(entity.getBnljl() != null ? entity.getBnljl().toString() : "");
|
|
|
+ vo.setTbzzs(entity.getTbzzs() != null ? entity.getTbzzs().toString() : "");
|
|
|
+ vo.setRq(entity.getRq() != null ? entity.getRq().toString() : "");
|
|
|
+
|
|
|
+ //月内外贸完成量
|
|
|
+ vo.setNmjzxttl(entity.getNmjzxttl() != null ? entity.getNmjzxttl().toString() : "");
|
|
|
+ vo.setWmjzxttl(entity.getWmjzxttl() != null ? entity.getWmjzxttl().toString() : "");
|
|
|
+
|
|
|
+ //年内外贸完成量
|
|
|
+ vo.setNnmjzxttl(entity.getNnmjzxttl() != null ? entity.getNnmjzxttl().toString() : "");
|
|
|
+ vo.setNwmjzxttl(entity.getNwmjzxttl() != null ? entity.getNwmjzxttl().toString() : "");
|
|
|
+
|
|
|
+ //内外贸同比增长数
|
|
|
+ vo.setNmtbzzs(entity.getNmtbzzs() != null ? entity.getNmtbzzs().toString() : "");
|
|
|
+ vo.setWmtbzzs(entity.getWmtbzzs() != null ? entity.getWmtbzzs().toString() : "");
|
|
|
+
|
|
|
+ //本月运营航线、航班数
|
|
|
+ vo.setYyhxts(entity.getYyhxts() != null ? entity.getYyhxts().toString() : "");
|
|
|
+ vo.setYyhxhbs(entity.getYyhxhbs() != null ? entity.getYyhxhbs().toString() : "");
|
|
|
+ vo.setJyhxts(entity.getJyhxts() != null ? entity.getJyhxts().toString() : "");
|
|
|
+ vo.setJyhxhbs(entity.getJyhxhbs() != null ? entity.getJyhxhbs().toString() : "");
|
|
|
+
|
|
|
+ vo.setNzxts(entity.getNzxts() != null ? entity.getNzxts().toString() : "");
|
|
|
+ vo.setNzxhbs(entity.getJyhxhbs() != null ? entity.getNzxhbs().toString() : "");
|
|
|
+ vo.setNmhxts(entity.getNmhxts() != null ? entity.getNmhxts().toString() : "");
|
|
|
+ vo.setNmhxhbs(entity.getNmhxhbs() != null ? entity.getNmhxhbs().toString() : "");
|
|
|
+
|
|
|
+ // 新开辟航线数
|
|
|
+ vo.setYyxkphxs(entity.getYyxkphxs() != null ? entity.getYyxkphxs().toString() : "");
|
|
|
+ vo.setYytkhxs(entity.getYytkhxs() != null ? entity.getYytkhxs().toString() : "");
|
|
|
+ vo.setJyxkphxs(entity.getJyxkphxs() != null ? entity.getJyxkphxs().toString() : "");
|
|
|
+ vo.setJytkhxs(entity.getJytkhxs() != null ? entity.getJytkhxs().toString() : "");
|
|
|
+
|
|
|
+ //停开航线数
|
|
|
+ vo.setNzxxkphxs(entity.getNzxxkphxs() != null ? entity.getNzxxkphxs().toString() : "");
|
|
|
+ vo.setNzxtkhxs(entity.getNzxtkhxs() != null ? entity.getNzxtkhxs().toString() : "");
|
|
|
+ vo.setNmxkphxs(entity.getNmxkphxs() != null ? entity.getNmxkphxs().toString() : "");
|
|
|
+ vo.setNmtkhxs(entity.getNmtkhxs() != null ? entity.getNmtkhxs().toString() : "");
|
|
|
+
|
|
|
+ // 填表人跟联系电话
|
|
|
+ vo.setTbr(securityMgr.getCurrUser().getName());
|
|
|
+ if (securityMgr.getCurrUser().getSfjyr().getText().equals("是")) {
|
|
|
+ vo.setLxdh(securityMgr.getCurrUser().getSsjyr().getLxdh());
|
|
|
+ } else {
|
|
|
+ vo.setLxdh(securityMgr.getCurrUser().getSsglbm() != null ? securityMgr.getCurrUser().getSsglbm().getLxdh() : "");
|
|
|
+ }
|
|
|
+ model.addAttribute("record", vo);
|
|
|
+ model.addAttribute("szgkid", entity.getSzgk().getId());
|
|
|
+ return "gkyxtjyfx/hxhbtj/hxhbtjEdit";
|
|
|
+ }
|
|
|
+
|
|
|
+ @RequestMapping(value = "/save")
|
|
|
+// @RequiresPermissions("hxhbtj:add")
|
|
|
+ @ResponseBody
|
|
|
+ public WebJsonResult save(Model model,String path, String szgkid, String rq, HxhbtjEntity code ) {
|
|
|
+ WebJsonResult wr = success();
|
|
|
+ if (StringUtils.isEmpty(szgkid)) {
|
|
|
+ wr.setSuccess(false);
|
|
|
+ wr.setMessage("请选择所在港口!");
|
|
|
+ return wr;
|
|
|
+ }
|
|
|
+ if (StringUtils.isEmpty(rq)) {
|
|
|
+ wr.setSuccess(false);
|
|
|
+ wr.setMessage("请选择日期!");
|
|
|
+ return wr;
|
|
|
+ }
|
|
|
+ //日期、港口不能重复
|
|
|
+// List<Object> cf = hxhbtjService.cf(rq, szgkid);
|
|
|
+// if (cf != null && cf.size() != 0){
|
|
|
+// wr.setSuccess(false);
|
|
|
+// wr.setMessage("该日期已存在记录!");
|
|
|
+// return wr;
|
|
|
+// }
|
|
|
+ HxhbtjEntity entity = new HxhbtjEntity();
|
|
|
+ try {
|
|
|
+ if (!StringUtils.isEmpty(code.getId())) {
|
|
|
+ entity = hxhbtjService.findOne(code.getId());
|
|
|
+ }
|
|
|
+ entity.setBywcl(code.getBywcl());
|
|
|
+ entity.setBnljl(code.getBnljl());
|
|
|
+ entity.setTbzzs(code.getTbzzs());
|
|
|
+ entity.setRq(code.getRq());
|
|
|
+
|
|
|
+ //月内外贸完成量
|
|
|
+ entity.setNmjzxttl(code.getNmjzxttl());
|
|
|
+ entity.setWmjzxttl(code.getWmjzxttl());
|
|
|
+
|
|
|
+ //年内外贸完成量
|
|
|
+ entity.setNnmjzxttl(code.getNnmjzxttl());
|
|
|
+ entity.setNwmjzxttl(code.getNwmjzxttl());
|
|
|
+
|
|
|
+ //内外贸同比增长数
|
|
|
+ entity.setNmtbzzs(code.getNmtbzzs());
|
|
|
+ entity.setWmtbzzs(code.getWmtbzzs());
|
|
|
+
|
|
|
+ //本月运营航线、航班数
|
|
|
+ entity.setYyhxts(code.getYyhxts());
|
|
|
+ entity.setYyhxhbs(code.getYyhxhbs());
|
|
|
+ entity.setJyhxts(code.getJyhxts());
|
|
|
+ entity.setJyhxhbs(code.getJyhxhbs());
|
|
|
+
|
|
|
+ entity.setNzxts(code.getNzxts());
|
|
|
+ entity.setNzxhbs(code.getJyhxhbs());
|
|
|
+ entity.setNmhxts(code.getNmhxts());
|
|
|
+ entity.setNmhxhbs(code.getNmhxhbs());
|
|
|
+
|
|
|
+ // 新开辟航线数
|
|
|
+ entity.setYyxkphxs(code.getYyxkphxs());
|
|
|
+ entity.setYytkhxs(code.getYytkhxs());
|
|
|
+ entity.setJyxkphxs(code.getJyxkphxs());
|
|
|
+ entity.setJytkhxs(code.getJytkhxs());
|
|
|
+
|
|
|
+ //停开航线数
|
|
|
+ entity.setNzxxkphxs(code.getNzxxkphxs());
|
|
|
+ entity.setNzxtkhxs(code.getNzxtkhxs());
|
|
|
+ entity.setNmxkphxs(code.getNmxkphxs());
|
|
|
+ entity.setNmtkhxs(code.getNmtkhxs());
|
|
|
+
|
|
|
+ GkEntity szgk = new GkEntity();
|
|
|
+ szgk.setId(szgkid);
|
|
|
+ entity.setSzgk(szgk);
|
|
|
+
|
|
|
+ if (!StringUtils.isEmpty(path) && path.indexOf("bg") > 0) {
|
|
|
+ if (path.indexOf("add") > 0) {
|
|
|
+ entity.setRecordStatus(BaseEntity.RECORE_STATE_COPY);
|
|
|
+ } else {
|
|
|
+ entity.setRecordStatus(BaseEntity.RECORE_STATE_BGFLAG);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ hxhbtjService.save(entity);
|
|
|
+ } catch (Exception e) {
|
|
|
+ wr.setSuccess(false);
|
|
|
+ wr.setMessage("操作失败!");
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ return wr;
|
|
|
+ }
|
|
|
+
|
|
|
+ @RequestMapping(value = "/stat")
|
|
|
+ public String stat(Model model, String rq, String szgkid) {
|
|
|
// 取到所在地下第一个所在港口
|
|
|
List<GkEntity> list = gkService.findBySzd(securityMgr.getCurrUser().getSzd() != null ? securityMgr.getCurrUser().getSzd().getId() : "");
|
|
|
String dftszgk = "";
|
|
@@ -47,11 +356,14 @@ public class HxhbtjCtl extends BaseCtl {
|
|
|
dftszgk = list.get(0).getId();
|
|
|
}
|
|
|
Date date = new Date();
|
|
|
- // 本月数据
|
|
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM");
|
|
|
String benyue = sdf.format(date);
|
|
|
Object[] ob = (Object[]) hxglService.bywcltj(StringUtils.isEmpty(rq) ? benyue : rq, StringUtils.isEmpty(szgkid) ? dftszgk : szgkid);
|
|
|
HxhbtjVo vo = new HxhbtjVo();
|
|
|
+
|
|
|
+ vo.setRq(rq);
|
|
|
+
|
|
|
+ // 本月数据
|
|
|
vo.setBywcl(ob[0] != null ? (ob[0].toString()) : "");
|
|
|
vo.setBynmwcl(ob[1] != null ? (ob[1].toString()) : "");
|
|
|
vo.setBywmwcl(ob[2] != null ? (ob[2].toString()) : "");
|
|
@@ -97,6 +409,7 @@ public class HxhbtjCtl extends BaseCtl {
|
|
|
for (Object[] obj : list1) {
|
|
|
Object[] data = (Object[]) obj;
|
|
|
if (data[0].equals(bn + by)) {
|
|
|
+
|
|
|
vo.setByyyhxzs1(Integer.parseInt(data[1] + ""));
|
|
|
vo.setByyyhbzs1(Integer.parseInt(data[2] + ""));
|
|
|
vo.setByyyhxzs2(Integer.parseInt(data[3] + ""));
|
|
@@ -105,96 +418,49 @@ public class HxhbtjCtl extends BaseCtl {
|
|
|
vo.setByyyhbzs3(Integer.parseInt(data[6] + ""));
|
|
|
vo.setByyyhxzs4(Integer.parseInt(data[7] + ""));
|
|
|
vo.setByyyhbzs4(Integer.parseInt(data[8] + ""));
|
|
|
+
|
|
|
+ vo.setYyhxts(data[1] + "");
|
|
|
+ vo.setYyhxhbs(data[2] + "");
|
|
|
+ vo.setJyhxts(data[3] + "");
|
|
|
+ vo.setJyhxhbs(data[4] + "");
|
|
|
+ vo.setNzxts(data[5] + "");
|
|
|
+ vo.setNzxhbs(data[6] + "");
|
|
|
+ vo.setNmhxts(data[7] + "");
|
|
|
+ vo.setNmhxhbs(data[8] + "");
|
|
|
// 默认新开辟航线数为本月数量
|
|
|
- vo.setByxkphxs1(vo.getByyyhxzs1());
|
|
|
- vo.setByxkphxs2(vo.getByyyhxzs2());
|
|
|
- vo.setByxkphxs3(vo.getByyyhxzs3());
|
|
|
- vo.setByxkphxs4(vo.getByyyhxzs4());
|
|
|
+ vo.setYyxkphxs(vo.getYyhxts());
|
|
|
+ vo.setJyxkphxs(vo.getJyhxts());
|
|
|
+ vo.setNzxxkphxs(vo.getNzxts());
|
|
|
+ vo.setNmxkphxs(vo.getNmhxts());
|
|
|
} else if (data[0].equals(sn + sy)) {
|
|
|
int t1 = Integer.parseInt(data[1] + "");
|
|
|
- vo.setByxkphxs1(vo.getByyyhxzs1() - t1 < 0 ? 0 : vo.getByyyhxzs1() - t1);
|
|
|
- vo.setBytkhxs1(t1 - vo.getByyyhxzs1() < 0 ? 0 : t1 - vo.getByyyhxzs1());
|
|
|
+ vo.setYyxkphxs(vo.getByyyhxzs1() - t1 < 0 ? "0" : vo.getByyyhxzs1() - t1 +"");
|
|
|
+ vo.setYytkhxs(t1 - vo.getByyyhxzs1() < 0 ? "0" : t1 - vo.getByyyhxzs1() +"");
|
|
|
int t2 = Integer.parseInt(data[3] + "");
|
|
|
- vo.setByxkphxs2(vo.getByyyhxzs2() - t2 < 0 ? 0 : vo.getByyyhxzs2() - t2);
|
|
|
- vo.setBytkhxs2(t2 - vo.getByyyhxzs2() < 0 ? 0 : t2 - vo.getByyyhxzs2());
|
|
|
+ vo.setJyxkphxs(vo.getByyyhxzs2() - t2 < 0 ? "0" : vo.getByyyhxzs2() - t2 +"");
|
|
|
+ vo.setJytkhxs(t2 - vo.getByyyhxzs2() < 0 ? "0" : t2 - vo.getByyyhxzs2() +"");
|
|
|
int t3 = Integer.parseInt(data[5] + "");
|
|
|
- vo.setByxkphxs3(vo.getByyyhxzs3() - t3 < 0 ? 0 : vo.getByyyhxzs3() - t3);
|
|
|
- vo.setBytkhxs3(t3 - vo.getByyyhxzs3() < 0 ? 0 : t3 - vo.getByyyhxzs3());
|
|
|
+ vo.setNzxxkphxs(vo.getByyyhxzs3() - t3 < 0 ? "0" : vo.getByyyhxzs3() - t3 +"");
|
|
|
+ vo.setNzxtkhxs(t3 - vo.getByyyhxzs3() < 0 ? "0" : t3 - vo.getByyyhxzs3() +"");
|
|
|
int t4 = Integer.parseInt(data[7] + "");
|
|
|
- vo.setByxkphxs4(vo.getByyyhxzs4() - t4 < 0 ? 0 : vo.getByyyhxzs4() - t4);
|
|
|
- vo.setBytkhxs1(t4 - vo.getByyyhxzs4() < 0 ? 0 : t4 - vo.getByyyhxzs4());
|
|
|
-
|
|
|
+ vo.setNmxkphxs(vo.getByyyhxzs4() - t4 < 0 ? "0" : vo.getByyyhxzs4() - t4 +"");
|
|
|
+ vo.setNmtkhxs(t4 - vo.getByyyhxzs4() < 0 ? "0" : t4 - vo.getByyyhxzs4() +"");
|
|
|
+
|
|
|
+ /*int t1 = Integer.parseInt(data[1] + "");
|
|
|
+ vo.setYyxkphxs(Integer.parseInt(vo.getYyhxts()) - t1 < 0 ? "0" : vo.getByyyhxzs1() - t1 +"");
|
|
|
+ vo.setYytkhxs(t1 - Integer.parseInt(vo.getYyhxts()) < 0 ? "0" : t1 - Integer.parseInt(vo.getYyhxts()) +"");
|
|
|
+ int t2 = Integer.parseInt(data[3] + "");
|
|
|
+ vo.setJyxkphxs(Integer.parseInt(vo.getJyhxts()) - t2 < 0 ? "0" : Integer.parseInt(vo.getJyhxts()) - t2 +"");
|
|
|
+ vo.setJytkhxs(t2 - Integer.parseInt(vo.getJyhxts()) < 0 ? "0" : t2 - Integer.parseInt(vo.getJyhxts()) +"");
|
|
|
+ int t3 = Integer.parseInt(data[5] + "");
|
|
|
+ vo.setNzxxkphxs(Integer.parseInt(vo.getNzxts()) - t3 < 0 ? "0" : Integer.parseInt(vo.getNzxts()) - t3 +"");
|
|
|
+ vo.setNzxtkhxs(t3 - Integer.parseInt(vo.getNzxts()) < 0 ? "0" : t3 - Integer.parseInt(vo.getNzxts()) +"");
|
|
|
+ int t4 = Integer.parseInt(data[7] + "");
|
|
|
+ vo.setNmxkphxs(Integer.parseInt(vo.getNmhxts()) - t4 < 0 ? "0" : Integer.parseInt(vo.getNmhxts()) +"");
|
|
|
+ vo.setNmtkhxs(t4 - Integer.parseInt(vo.getNmhxts()) < 0 ? "0" : t4 - Integer.parseInt(vo.getNmhxts()) +"");*/
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- /*
|
|
|
- * //航线航班本月营运航线 List<Object>
|
|
|
- * list1=hxglService.hxhbyytj(StringUtils.isEmpty(rq)?benyue:rq,
|
|
|
- * StringUtils.isEmpty(szgkid)?dftszgk:szgkid);
|
|
|
- * vo.setByyyhxzs1(list1.get(0).toString());
|
|
|
- * vo.setByyyhxzs2(list1.get(1).toString());
|
|
|
- * vo.setByyyhxzs3(list1.get(2).toString());
|
|
|
- * vo.setByyyhxzs4(list1.get(3).toString()); //本月航班数量按照航线类型分组
|
|
|
- * List<Object>
|
|
|
- * list2=hxglService.hbyytj(StringUtils.isEmpty(rq)?benyue:rq,
|
|
|
- * StringUtils.isEmpty(szgkid)?dftszgk:szgkid);
|
|
|
- * vo.setByyyhbzs1(list2.get(0).toString());
|
|
|
- * vo.setByyyhbzs2(list2.get(1).toString());
|
|
|
- * vo.setByyyhbzs3(list2.get(2).toString());
|
|
|
- * vo.setByyyhbzs4(list2.get(3).toString()); //本月停航航班数量按照航线类型分组
|
|
|
- * List<Object>
|
|
|
- * list3=hxglService.bytyhxs(StringUtils.isEmpty(rq)?benyue:rq,
|
|
|
- * StringUtils.isEmpty(szgkid)?dftszgk:szgkid);
|
|
|
- * vo.setBytkhxs1(list3.get(0).toString());
|
|
|
- * vo.setBytkhxs2(list3.get(1).toString());
|
|
|
- * vo.setBytkhxs3(list3.get(2).toString());
|
|
|
- * vo.setBytkhxs4(list3.get(3).toString()); //按照日期统计所有本月航线(名称)
|
|
|
- * List<HxglEntity>
|
|
|
- * hxgl=hxglService.findByRqAndSzgk(StringUtils.isEmpty(
|
|
|
- * rq)?benyue:rq,StringUtils.isEmpty(szgkid)?dftszgk:szgkid); String
|
|
|
- * lastmonth=""; if(StringUtils.isEmpty(rq)){ Integer i =
|
|
|
- * Integer.parseInt(benyue.substring(5, 7))-1; if(i<10){
|
|
|
- * lastmonth=benyue.substring(0, 5)+"0"+i; }else{
|
|
|
- * lastmonth=benyue.substring(0, 5)+i; } }else{ Integer i =
|
|
|
- * Integer.parseInt(rq.substring(5, 7))-1; if(i<10){
|
|
|
- * lastmonth=rq.substring(0, 5)+"0"+i; }else{ lastmonth=rq.substring(0,
|
|
|
- * 5)+i; } } //按照日期统计所有上个月月航线(名称) List<HxglEntity>
|
|
|
- * lasthxgl=hxglService.findByRqAndSzgk
|
|
|
- * (lastmonth,StringUtils.isEmpty(szgkid)?dftszgk:szgkid);
|
|
|
- * //count表示本月航线名称与上月航线名称相同的航线总数 int count1 = 0; int count2 = 0; int
|
|
|
- * count3 = 0; int count4 = 0; for(int i=0;i<hxgl.size();i++){ for(int
|
|
|
- * j=0;j<lasthxgl.size();j++){
|
|
|
- * if(hxgl.get(i).getHxlx().getId().equals("7001")){
|
|
|
- * if(hxgl.get(i).getHxmc
|
|
|
- * ().equals(lasthxgl.get(j).getHxmc())&&lasthxgl.get
|
|
|
- * (j).getHxlx().getId().equals("7001")){ count1=count1+1; break; }
|
|
|
- * }else
|
|
|
- * if(hxgl.get(i).getHxlx().getId().equals("7002")&&lasthxgl.get(j)
|
|
|
- * .getHxlx().getId().equals("7002")){
|
|
|
- * if(hxgl.get(i).getHxmc().equals(lasthxgl.get(j).getHxmc())){
|
|
|
- * count2=count2+1; break; } }else
|
|
|
- * if(hxgl.get(i).getHxlx().getId().equals
|
|
|
- * ("7003")&&lasthxgl.get(j).getHxlx().getId().equals("7003")){
|
|
|
- * if(hxgl.get(i).getHxmc().equals(lasthxgl.get(j).getHxmc())){
|
|
|
- * count3=count3+1; break; } }else
|
|
|
- * if(hxgl.get(i).getHxlx().getId().equals
|
|
|
- * ("7004")&&lasthxgl.get(j).getHxlx().getId().equals("7004")){
|
|
|
- * if(hxgl.get(i).getHxmc().equals(lasthxgl.get(j).getHxmc())){
|
|
|
- * count4=count4+1; break; } } } } int hxlxcount1 = 0; int hxlxcount2 =
|
|
|
- * 0; int hxlxcount3 = 0; int hxlxcount4 = 0; for(int
|
|
|
- * i=0;i<hxgl.size();i++){
|
|
|
- * if(hxgl.get(i).getHxlx().getId().equals("7001")){
|
|
|
- * hxlxcount1=hxlxcount1+1; }
|
|
|
- * if(hxgl.get(i).getHxlx().getId().equals("7002")){
|
|
|
- * hxlxcount2=hxlxcount2+1; }
|
|
|
- * if(hxgl.get(i).getHxlx().getId().equals("7003")){
|
|
|
- * hxlxcount3=hxlxcount3+1; }
|
|
|
- * if(hxgl.get(i).getHxlx().getId().equals("7004")){
|
|
|
- * hxlxcount4=hxlxcount4+1; } } vo.setByxkphxs1((hxlxcount1-count1)+"");
|
|
|
- * vo.setByxkphxs2((hxlxcount2-count2)+"");
|
|
|
- * vo.setByxkphxs3((hxlxcount3-count3)+"");
|
|
|
- * vo.setByxkphxs4((hxlxcount4-count4)+"");
|
|
|
- */
|
|
|
// 填表人跟联系电话
|
|
|
vo.setTbr(securityMgr.getCurrUser().getName());
|
|
|
if (securityMgr.getCurrUser().getSfjyr().getText().equals("是")) {
|
|
@@ -202,10 +468,211 @@ public class HxhbtjCtl extends BaseCtl {
|
|
|
} else {
|
|
|
vo.setLxdh(securityMgr.getCurrUser().getSsglbm() != null ? securityMgr.getCurrUser().getSsglbm().getLxdh() : "");
|
|
|
}
|
|
|
+
|
|
|
model.addAttribute("record", vo);
|
|
|
model.addAttribute("szgkid", StringUtils.isEmpty(szgkid) ? dftszgk : szgkid);
|
|
|
model.addAttribute("rq", rq != null ? rq : benyue);
|
|
|
- model.addAttribute("menuid", menuid);
|
|
|
- return "gkyxtjyfx/hxhbtj/hxhbtj";
|
|
|
+ return "gkyxtjyfx/hxhbtj/hxhbtjStat";
|
|
|
+ }
|
|
|
+
|
|
|
+ //同步省级数据
|
|
|
+ @RequestMapping(value = "/saveTbzt")
|
|
|
+ @ResponseBody
|
|
|
+ public WebJsonResult saveTbzt(Model model, String id, String spflag) {
|
|
|
+ WebJsonResult wr = success();
|
|
|
+ HxhbtjEntity entity = hxhbtjService.findOne(id);
|
|
|
+
|
|
|
+ entity.setSftb(Constants.YES);
|
|
|
+ hxhbtjService.save(entity);
|
|
|
+
|
|
|
+ String url = "GK_OPERATION_JSJY_HXHBTJ_ONE_CP?condition=ID=" + id;
|
|
|
+
|
|
|
+ boolean flag = getTbStatus(url, null);
|
|
|
+ if (flag) {
|
|
|
+// entity.setFlowstatus("0");
|
|
|
+ entity.setTbzt(Constants.YES);
|
|
|
+ hxhbtjService.save(entity);
|
|
|
+ } else {
|
|
|
+// entity.setFlowstatus(null);
|
|
|
+ entity.setSftb(Constants.NO);
|
|
|
+ hxhbtjService.save(entity);
|
|
|
+ wr.setSuccess(false);
|
|
|
+ wr.setMessage("提交失败");
|
|
|
+ }
|
|
|
+ return wr;
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+// @SuppressWarnings("unused")
|
|
|
+// @RequestMapping(value = "/main")
|
|
|
+// public String main(Model model, final String rq, final String szgkid, final String menuid) {
|
|
|
+// // 取到所在地下第一个所在港口
|
|
|
+// List<GkEntity> list = gkService.findBySzd(securityMgr.getCurrUser().getSzd() != null ? securityMgr.getCurrUser().getSzd().getId() : "");
|
|
|
+// String dftszgk = "";
|
|
|
+// if (list.size() > 0) {
|
|
|
+// dftszgk = list.get(0).getId();
|
|
|
+// }
|
|
|
+// Date date = new Date();
|
|
|
+// // 本月数据
|
|
|
+// SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM");
|
|
|
+// String benyue = sdf.format(date);
|
|
|
+// Object[] ob = (Object[]) hxglService.bywcltj(StringUtils.isEmpty(rq) ? benyue : rq, StringUtils.isEmpty(szgkid) ? dftszgk : szgkid);
|
|
|
+// HxhbtjVo vo = new HxhbtjVo();
|
|
|
+// vo.setBywcl(ob[0] != null ? (ob[0].toString()) : "");
|
|
|
+// vo.setBynmwcl(ob[1] != null ? (ob[1].toString()) : "");
|
|
|
+// vo.setBywmwcl(ob[2] != null ? (ob[2].toString()) : "");
|
|
|
+// // 本年数据
|
|
|
+// SimpleDateFormat sdf2 = new SimpleDateFormat("yyyy");
|
|
|
+// String bennian = sdf2.format(date);
|
|
|
+// String rq2 = "";
|
|
|
+// if (!StringUtils.isEmpty(rq)) {
|
|
|
+// rq2 = rq.substring(0, 4);
|
|
|
+// }
|
|
|
+// Object[] ob2 = (Object[]) hxglService.bnljltj(StringUtils.isEmpty(rq2) ? bennian : rq2, StringUtils.isEmpty(szgkid) ? dftszgk : szgkid);
|
|
|
+// vo.setBnljl(ob2[0] != null ? (ob2[0].toString()) : "");
|
|
|
+// vo.setBnnmljl(ob2[1] != null ? (ob2[1].toString()) : "");
|
|
|
+// vo.setBnwmljl(ob2[2] != null ? (ob2[2].toString()) : "");
|
|
|
+// // 同比增长数
|
|
|
+// String lastyear = "";
|
|
|
+// if (StringUtils.isEmpty(rq)) {
|
|
|
+// Integer i = Integer.parseInt(benyue.substring(0, 4)) - 1;
|
|
|
+// lastyear = i + benyue.substring(4, 7);
|
|
|
+// } else {
|
|
|
+// Integer i = Integer.parseInt(rq.substring(0, 4)) - 1;
|
|
|
+// lastyear = i + rq.substring(4, 7);
|
|
|
+// }
|
|
|
+// Object[] ob3 = (Object[]) hxglService.tbzzs(StringUtils.isEmpty(rq) ? benyue : rq, lastyear, StringUtils.isEmpty(szgkid) ? dftszgk : szgkid);
|
|
|
+// vo.setTbzzs(ob3[0] != null ? (String.format("%.2f", ob3[0]) + "%") : "- -");
|
|
|
+// vo.setNmtbzzs(ob3[1] != null ? (String.format("%.2f", ob3[1]) + "%") : "- -");
|
|
|
+// vo.setWmtbzzs(ob3[2] != null ? (String.format("%.2f", ob3[2]) + "%") : "- -");
|
|
|
+// // 集装箱航线航班开辟情况
|
|
|
+// Calendar cal = Calendar.getInstance();
|
|
|
+// if (StringUtils.isNotEmpty(rq)) {
|
|
|
+// String year = rq.substring(0, 4);
|
|
|
+// String month = rq.substring(5, 7);
|
|
|
+// cal.set(Calendar.YEAR, Integer.parseInt(year));
|
|
|
+// cal.set(Calendar.MONTH, Integer.parseInt(month));
|
|
|
+// }
|
|
|
+// String bn = cal.get(Calendar.YEAR) + "";
|
|
|
+// String by = (cal.get(Calendar.MONTH) + 1) + "";
|
|
|
+// cal.add(Calendar.MONTH, -1);
|
|
|
+// String sn = cal.get(Calendar.YEAR) + "";
|
|
|
+// String sy = (cal.get(Calendar.MONTH) + 1) + "";
|
|
|
+// List<Object[]> list1 = hxglService.kbxk(bn, by, sn, sy, StringUtils.isEmpty(szgkid) ? dftszgk : szgkid);
|
|
|
+// if (list1 != null && list1.size() > 0) {
|
|
|
+// for (Object[] obj : list1) {
|
|
|
+// Object[] data = (Object[]) obj;
|
|
|
+// if (data[0].equals(bn + by)) {
|
|
|
+// vo.setByyyhxzs1(Integer.parseInt(data[1] + ""));
|
|
|
+// vo.setByyyhbzs1(Integer.parseInt(data[2] + ""));
|
|
|
+// vo.setByyyhxzs2(Integer.parseInt(data[3] + ""));
|
|
|
+// vo.setByyyhbzs2(Integer.parseInt(data[4] + ""));
|
|
|
+// vo.setByyyhxzs3(Integer.parseInt(data[5] + ""));
|
|
|
+// vo.setByyyhbzs3(Integer.parseInt(data[6] + ""));
|
|
|
+// vo.setByyyhxzs4(Integer.parseInt(data[7] + ""));
|
|
|
+// vo.setByyyhbzs4(Integer.parseInt(data[8] + ""));
|
|
|
+// // 默认新开辟航线数为本月数量
|
|
|
+// vo.setByxkphxs1(vo.getByyyhxzs1());
|
|
|
+// vo.setByxkphxs2(vo.getByyyhxzs2());
|
|
|
+// vo.setByxkphxs3(vo.getByyyhxzs3());
|
|
|
+// vo.setByxkphxs4(vo.getByyyhxzs4());
|
|
|
+// } else if (data[0].equals(sn + sy)) {
|
|
|
+// int t1 = Integer.parseInt(data[1] + "");
|
|
|
+// vo.setByxkphxs1(vo.getByyyhxzs1() - t1 < 0 ? 0 : vo.getByyyhxzs1() - t1);
|
|
|
+// vo.setBytkhxs1(t1 - vo.getByyyhxzs1() < 0 ? 0 : t1 - vo.getByyyhxzs1());
|
|
|
+// int t2 = Integer.parseInt(data[3] + "");
|
|
|
+// vo.setByxkphxs2(vo.getByyyhxzs2() - t2 < 0 ? 0 : vo.getByyyhxzs2() - t2);
|
|
|
+// vo.setBytkhxs2(t2 - vo.getByyyhxzs2() < 0 ? 0 : t2 - vo.getByyyhxzs2());
|
|
|
+// int t3 = Integer.parseInt(data[5] + "");
|
|
|
+// vo.setByxkphxs3(vo.getByyyhxzs3() - t3 < 0 ? 0 : vo.getByyyhxzs3() - t3);
|
|
|
+// vo.setBytkhxs3(t3 - vo.getByyyhxzs3() < 0 ? 0 : t3 - vo.getByyyhxzs3());
|
|
|
+// int t4 = Integer.parseInt(data[7] + "");
|
|
|
+// vo.setByxkphxs4(vo.getByyyhxzs4() - t4 < 0 ? 0 : vo.getByyyhxzs4() - t4);
|
|
|
+// vo.setBytkhxs1(t4 - vo.getByyyhxzs4() < 0 ? 0 : t4 - vo.getByyyhxzs4());
|
|
|
+//
|
|
|
+// }
|
|
|
+// }
|
|
|
+// }
|
|
|
+// /*
|
|
|
+// * //航线航班本月营运航线 List<Object>
|
|
|
+// * list1=hxglService.hxhbyytj(StringUtils.isEmpty(rq)?benyue:rq,
|
|
|
+// * StringUtils.isEmpty(szgkid)?dftszgk:szgkid);
|
|
|
+// * vo.setByyyhxzs1(list1.get(0).toString());
|
|
|
+// * vo.setByyyhxzs2(list1.get(1).toString());
|
|
|
+// * vo.setByyyhxzs3(list1.get(2).toString());
|
|
|
+// * vo.setByyyhxzs4(list1.get(3).toString()); //本月航班数量按照航线类型分组
|
|
|
+// * List<Object>
|
|
|
+// * list2=hxglService.hbyytj(StringUtils.isEmpty(rq)?benyue:rq,
|
|
|
+// * StringUtils.isEmpty(szgkid)?dftszgk:szgkid);
|
|
|
+// * vo.setByyyhbzs1(list2.get(0).toString());
|
|
|
+// * vo.setByyyhbzs2(list2.get(1).toString());
|
|
|
+// * vo.setByyyhbzs3(list2.get(2).toString());
|
|
|
+// * vo.setByyyhbzs4(list2.get(3).toString()); //本月停航航班数量按照航线类型分组
|
|
|
+// * List<Object>
|
|
|
+// * list3=hxglService.bytyhxs(StringUtils.isEmpty(rq)?benyue:rq,
|
|
|
+// * StringUtils.isEmpty(szgkid)?dftszgk:szgkid);
|
|
|
+// * vo.setBytkhxs1(list3.get(0).toString());
|
|
|
+// * vo.setBytkhxs2(list3.get(1).toString());
|
|
|
+// * vo.setBytkhxs3(list3.get(2).toString());
|
|
|
+// * vo.setBytkhxs4(list3.get(3).toString()); //按照日期统计所有本月航线(名称)
|
|
|
+// * List<HxglEntity>
|
|
|
+// * hxgl=hxglService.findByRqAndSzgk(StringUtils.isEmpty(
|
|
|
+// * rq)?benyue:rq,StringUtils.isEmpty(szgkid)?dftszgk:szgkid); String
|
|
|
+// * lastmonth=""; if(StringUtils.isEmpty(rq)){ Integer i =
|
|
|
+// * Integer.parseInt(benyue.substring(5, 7))-1; if(i<10){
|
|
|
+// * lastmonth=benyue.substring(0, 5)+"0"+i; }else{
|
|
|
+// * lastmonth=benyue.substring(0, 5)+i; } }else{ Integer i =
|
|
|
+// * Integer.parseInt(rq.substring(5, 7))-1; if(i<10){
|
|
|
+// * lastmonth=rq.substring(0, 5)+"0"+i; }else{ lastmonth=rq.substring(0,
|
|
|
+// * 5)+i; } } //按照日期统计所有上个月月航线(名称) List<HxglEntity>
|
|
|
+// * lasthxgl=hxglService.findByRqAndSzgk
|
|
|
+// * (lastmonth,StringUtils.isEmpty(szgkid)?dftszgk:szgkid);
|
|
|
+// * //count表示本月航线名称与上月航线名称相同的航线总数 int count1 = 0; int count2 = 0; int
|
|
|
+// * count3 = 0; int count4 = 0; for(int i=0;i<hxgl.size();i++){ for(int
|
|
|
+// * j=0;j<lasthxgl.size();j++){
|
|
|
+// * if(hxgl.get(i).getHxlx().getId().equals("7001")){
|
|
|
+// * if(hxgl.get(i).getHxmc
|
|
|
+// * ().equals(lasthxgl.get(j).getHxmc())&&lasthxgl.get
|
|
|
+// * (j).getHxlx().getId().equals("7001")){ count1=count1+1; break; }
|
|
|
+// * }else
|
|
|
+// * if(hxgl.get(i).getHxlx().getId().equals("7002")&&lasthxgl.get(j)
|
|
|
+// * .getHxlx().getId().equals("7002")){
|
|
|
+// * if(hxgl.get(i).getHxmc().equals(lasthxgl.get(j).getHxmc())){
|
|
|
+// * count2=count2+1; break; } }else
|
|
|
+// * if(hxgl.get(i).getHxlx().getId().equals
|
|
|
+// * ("7003")&&lasthxgl.get(j).getHxlx().getId().equals("7003")){
|
|
|
+// * if(hxgl.get(i).getHxmc().equals(lasthxgl.get(j).getHxmc())){
|
|
|
+// * count3=count3+1; break; } }else
|
|
|
+// * if(hxgl.get(i).getHxlx().getId().equals
|
|
|
+// * ("7004")&&lasthxgl.get(j).getHxlx().getId().equals("7004")){
|
|
|
+// * if(hxgl.get(i).getHxmc().equals(lasthxgl.get(j).getHxmc())){
|
|
|
+// * count4=count4+1; break; } } } } int hxlxcount1 = 0; int hxlxcount2 =
|
|
|
+// * 0; int hxlxcount3 = 0; int hxlxcount4 = 0; for(int
|
|
|
+// * i=0;i<hxgl.size();i++){
|
|
|
+// * if(hxgl.get(i).getHxlx().getId().equals("7001")){
|
|
|
+// * hxlxcount1=hxlxcount1+1; }
|
|
|
+// * if(hxgl.get(i).getHxlx().getId().equals("7002")){
|
|
|
+// * hxlxcount2=hxlxcount2+1; }
|
|
|
+// * if(hxgl.get(i).getHxlx().getId().equals("7003")){
|
|
|
+// * hxlxcount3=hxlxcount3+1; }
|
|
|
+// * if(hxgl.get(i).getHxlx().getId().equals("7004")){
|
|
|
+// * hxlxcount4=hxlxcount4+1; } } vo.setByxkphxs1((hxlxcount1-count1)+"");
|
|
|
+// * vo.setByxkphxs2((hxlxcount2-count2)+"");
|
|
|
+// * vo.setByxkphxs3((hxlxcount3-count3)+"");
|
|
|
+// * vo.setByxkphxs4((hxlxcount4-count4)+"");
|
|
|
+// */
|
|
|
+// // 填表人跟联系电话
|
|
|
+// vo.setTbr(securityMgr.getCurrUser().getName());
|
|
|
+// if (securityMgr.getCurrUser().getSfjyr().getText().equals("是")) {
|
|
|
+// vo.setLxdh(securityMgr.getCurrUser().getSsjyr().getLxdh());
|
|
|
+// } else {
|
|
|
+// vo.setLxdh(securityMgr.getCurrUser().getSsglbm() != null ? securityMgr.getCurrUser().getSsglbm().getLxdh() : "");
|
|
|
+// }
|
|
|
+// model.addAttribute("record", vo);
|
|
|
+// model.addAttribute("szgkid", StringUtils.isEmpty(szgkid) ? dftszgk : szgkid);
|
|
|
+// model.addAttribute("rq", rq != null ? rq : benyue);
|
|
|
+// model.addAttribute("menuid", menuid);
|
|
|
+// return "gkyxtjyfx/hxhbtj/hxhbtj";
|
|
|
+// }
|
|
|
}
|