作者 zhangFan

修改部分bug

@@ -27,4 +27,10 @@ public interface LandBusinesstypeListDao extends CrudDao<LandBusinesstypeList> { @@ -27,4 +27,10 @@ public interface LandBusinesstypeListDao extends CrudDao<LandBusinesstypeList> {
27 27
28 int updateByBarcode(LandBusinesstypeList landBusinesstypeList); 28 int updateByBarcode(LandBusinesstypeList landBusinesstypeList);
29 29
  30 + List<LandBusinesstypeList> findByMessageId(@Param("massageId")String messageId);
  31 +
  32 + int updateEntry(LandBusinesstypeList landBusinesstypeList);
  33 +
  34 + int deleteByMessageId(LandBusinesstypeList landBusinesstypeList);
  35 +
30 } 36 }
@@ -36,7 +36,7 @@ public class LandRoadVeRecord extends DataEntity<LandRoadVeRecord> { @@ -36,7 +36,7 @@ public class LandRoadVeRecord extends DataEntity<LandRoadVeRecord> {
36 private String brand; // 厂牌 36 private String brand; // 厂牌
37 private String model; // 车型 37 private String model; // 车型
38 private String exhaustCapacity; // 排气量 38 private String exhaustCapacity; // 排气量
39 - private Date veFactoryDate; // 车辆出厂日期 39 + private Date veFactoryDate; // 行驶证有效日期
40 private String veMotorNo; // 发动机号 40 private String veMotorNo; // 发动机号
41 private String veFrameNo; // 车架号(车辆识别代号) 41 private String veFrameNo; // 车架号(车辆识别代号)
42 private String veTon; // 核定载客/核定载质量:客车的核定载客单位仍为:人;货车的核定载客单位改为:千克。 42 private String veTon; // 核定载客/核定载质量:客车的核定载客单位仍为:人;货车的核定载客单位改为:千克。
@@ -62,7 +62,7 @@ public class LandRoadVeRecord extends DataEntity<LandRoadVeRecord> { @@ -62,7 +62,7 @@ public class LandRoadVeRecord extends DataEntity<LandRoadVeRecord> {
62 private String proposer; // 申请人 62 private String proposer; // 申请人
63 private Date proposeTime; // 申请时间 63 private Date proposeTime; // 申请时间
64 private String veClassFlag; // 车辆分类 64 private String veClassFlag; // 车辆分类
65 - private String operationType; // 数据操作类型 65 + private String operationType; // 删除标识
66 private String trailerLicenseNo; // 挂车牌号 66 private String trailerLicenseNo; // 挂车牌号
67 private String trailerFrameNo; // 挂车车架号 67 private String trailerFrameNo; // 挂车车架号
68 private String approNoPic; // 批文扫描图 68 private String approNoPic; // 批文扫描图
@@ -68,4 +68,18 @@ public class LandBusinesstypeListService extends CrudService<LandBusinesstypeLis @@ -68,4 +68,18 @@ public class LandBusinesstypeListService extends CrudService<LandBusinesstypeLis
68 return dao.updateByBarcode(landBusinesstypeList); 68 return dao.updateByBarcode(landBusinesstypeList);
69 } 69 }
70 70
  71 + @Transactional(readOnly = false)
  72 + public List<LandBusinesstypeList> findByMessageId(String messageId) {
  73 + return dao.findByMessageId(messageId);
  74 + }
  75 +
  76 + @Transactional(readOnly = false)
  77 + public int updateEntry(LandBusinesstypeList landBusinesstypeList) {
  78 + return dao.updateEntry(landBusinesstypeList);
  79 + }
  80 +
  81 + @Transactional(readOnly = false)
  82 + public int deleteByMessageId(LandBusinesstypeList landBusinesstypeList) {
  83 + return dao.deleteByMessageId(landBusinesstypeList);
  84 + }
71 } 85 }
@@ -6,6 +6,7 @@ package com.thinkgem.jeesite.modules.land.web; @@ -6,6 +6,7 @@ package com.thinkgem.jeesite.modules.land.web;
6 import java.text.SimpleDateFormat; 6 import java.text.SimpleDateFormat;
7 import java.util.Date; 7 import java.util.Date;
8 import java.util.List; 8 import java.util.List;
  9 +import java.util.Random;
9 10
10 import javax.annotation.PostConstruct; 11 import javax.annotation.PostConstruct;
11 import javax.servlet.http.HttpServletRequest; 12 import javax.servlet.http.HttpServletRequest;
@@ -43,6 +44,7 @@ import com.thinkgem.jeesite.modules.yard.service.YardService; @@ -43,6 +44,7 @@ import com.thinkgem.jeesite.modules.yard.service.YardService;
43 44
44 /** 45 /**
45 * 货物流转类型Controller 46 * 货物流转类型Controller
  47 + *
46 * @author zhangfan 48 * @author zhangfan
47 * @version 2018-10-08 49 * @version 2018-10-08
48 */ 50 */
@@ -68,32 +70,36 @@ public class LandBusinesstypeListController extends BaseController { @@ -68,32 +70,36 @@ public class LandBusinesstypeListController extends BaseController {
68 @Autowired 70 @Autowired
69 private SystemService systemService; 71 private SystemService systemService;
70 72
71 - private static final String TYPE1 = "进口流转"; 73 + private static final String TYPE1 = "调拨业务";
72 private static final String TYPE2 = "进口提货"; 74 private static final String TYPE2 = "进口提货";
73 private static final String TYPE3 = "出口送货"; 75 private static final String TYPE3 = "出口送货";
74 - private static final String TYPE4 = "出口流转";  
75 - 76 + private static final String TYPE4 = "分拨业务";
76 77
77 @ModelAttribute 78 @ModelAttribute
78 - public LandBusinesstypeList get(@RequestParam(required=false) String id) { 79 + public LandBusinesstypeList get(@RequestParam(required = false) String id) {
79 LandBusinesstypeList entity = null; 80 LandBusinesstypeList entity = null;
80 - if (StringUtils.isNotBlank(id)){ 81 + if (StringUtils.isNotBlank(id)) {
81 entity = landBusinesstypeListService.get(id); 82 entity = landBusinesstypeListService.get(id);
82 } 83 }
83 - if (entity == null){ 84 + if (entity == null) {
84 entity = new LandBusinesstypeList(); 85 entity = new LandBusinesstypeList();
85 } 86 }
86 return entity; 87 return entity;
87 } 88 }
88 89
89 @RequiresPermissions("land:landBusinesstypeList:view") 90 @RequiresPermissions("land:landBusinesstypeList:view")
90 - @RequestMapping(value = {"list", ""})  
91 - public String list(LandBusinesstypeList landBusinesstypeList, HttpServletRequest request, HttpServletResponse response, Model model) { 91 + @RequestMapping(value = { "list", "" })
  92 + public String list(LandBusinesstypeList landBusinesstypeList, HttpServletRequest request,
  93 + HttpServletResponse response, Model model) {
92 Principal principal = UserUtils.getPrincipal(); 94 Principal principal = UserUtils.getPrincipal();
93 String loginName = principal.getLoginName(); 95 String loginName = principal.getLoginName();
94 User user = systemService.getUserByLoginName(loginName); 96 User user = systemService.getUserByLoginName(loginName);
95 landBusinesstypeList.setCreateBy(user); 97 landBusinesstypeList.setCreateBy(user);
96 - Page<LandBusinesstypeList> page = landBusinesstypeListService.findPage(new Page<LandBusinesstypeList>(request, response), landBusinesstypeList); 98 + Yard yard = new Yard();
  99 + List<Yard> yardList = yardService.findList(yard);
  100 + Page<LandBusinesstypeList> page = landBusinesstypeListService
  101 + .findPage(new Page<LandBusinesstypeList>(request, response), landBusinesstypeList);
  102 + model.addAttribute("yardList", yardList);
97 model.addAttribute("page", page); 103 model.addAttribute("page", page);
98 return "modules/land/landBusinesstypeListList"; 104 return "modules/land/landBusinesstypeListList";
99 105
@@ -106,30 +112,36 @@ public class LandBusinesstypeListController extends BaseController { @@ -106,30 +112,36 @@ public class LandBusinesstypeListController extends BaseController {
106 Page<LandRoadVeRecord> page = new Page<LandRoadVeRecord>(); 112 Page<LandRoadVeRecord> page = new Page<LandRoadVeRecord>();
107 List<LandBusinesstypeList> list = landBusinesstypeListService.findByStatus(frameNo); 113 List<LandBusinesstypeList> list = landBusinesstypeListService.findByStatus(frameNo);
108 List<LandRoadVeRecord> veList = roadVeService.selectByFrameNo(frameNo); 114 List<LandRoadVeRecord> veList = roadVeService.selectByFrameNo(frameNo);
109 - if(list.size()>0 ) { 115 + if (veList.size() < 1) {
  116 + page.setResultMsg("此车辆未备案,请先备案");
  117 + } else {
  118 + if (list.size() > 0) {
110 for (int i = 0; i < list.size(); i++) { 119 for (int i = 0; i < list.size(); i++) {
111 - boolean flag = (list.get(i).getContrastflag()==null || list.get(i).getContrastflag().length()<1);  
112 - if("I".equals(list.get(i).getTurnoverflag()) && flag) { 120 + boolean flag = (list.get(i).getContrastflag() == null
  121 + || list.get(i).getContrastflag().length() < 1);
  122 + if ("I".equals(list.get(i).getTurnoverflag()) && flag) {
113 page.setResultMsg("此车辆已存在进出场业务,请勿重新申报"); 123 page.setResultMsg("此车辆已存在进出场业务,请勿重新申报");
114 - }else if("E".equals(list.get(i).getTurnoverflag())&& flag ) { 124 + } else if ("E".equals(list.get(i).getTurnoverflag()) && flag) {
115 page.setResultMsg("此车辆已存在进出场业务,请勿重新申报"); 125 page.setResultMsg("此车辆已存在进出场业务,请勿重新申报");
116 - }else { 126 + } else {
117 page.setResultMsg("此车辆可以正常申报业务"); 127 page.setResultMsg("此车辆可以正常申报业务");
118 } 128 }
119 break; 129 break;
120 } 130 }
121 - }else { 131 + } else {
122 page.setResultMsg("此车辆可以正常申报业务"); 132 page.setResultMsg("此车辆可以正常申报业务");
123 } 133 }
  134 + }
124 page.setList(veList); 135 page.setList(veList);
125 return page; 136 return page;
126 137
127 } 138 }
  139 +
128 @RequiresPermissions("land:landBusinesstypeList:view") 140 @RequiresPermissions("land:landBusinesstypeList:view")
129 @RequestMapping(value = "option") 141 @RequestMapping(value = "option")
130 @ResponseBody 142 @ResponseBody
131 - public Page<Bayonet> option(String st_select,Model model) throws Exception {  
132 - Page<Bayonet>page = new Page<Bayonet>(); 143 + public Page<Bayonet> option(String st_select) throws Exception {
  144 + Page<Bayonet> page = new Page<Bayonet>();
133 Yard yard = yardService.findByStaionId(st_select); 145 Yard yard = yardService.findByStaionId(st_select);
134 List<Bayonet> bayonet = bayService.findByYardId(yard.getStationid()); 146 List<Bayonet> bayonet = bayService.findByYardId(yard.getStationid());
135 page.setList(bayonet); 147 page.setList(bayonet);
@@ -142,18 +154,16 @@ public class LandBusinesstypeListController extends BaseController { @@ -142,18 +154,16 @@ public class LandBusinesstypeListController extends BaseController {
142 Yard yard = new Yard(); 154 Yard yard = new Yard();
143 List<Yard> yardList = yardService.findList(yard); 155 List<Yard> yardList = yardService.findList(yard);
144 LandRoadVeRecord ve = new LandRoadVeRecord(); 156 LandRoadVeRecord ve = new LandRoadVeRecord();
145 - Principal principal = UserUtils.getPrincipal();  
146 - String loginName = principal.getLoginName();  
147 - User user = systemService.getUserByLoginName(loginName); 157 + User user = systemService.getUserByLoginName("admin");
148 ve.setCreateBy(user); 158 ve.setCreateBy(user);
149 159
150 List<LandRoadVeRecord> veList = roadVeService.findList(ve); 160 List<LandRoadVeRecord> veList = roadVeService.findList(ve);
151 - if(landBusinesstypeList.getEndstation() !=null) { 161 + if (landBusinesstypeList.getEndstation() != null) {
152 Yard yard1 = yardService.findByStaionId(landBusinesstypeList.getEndstation()); 162 Yard yard1 = yardService.findByStaionId(landBusinesstypeList.getEndstation());
153 List<Bayonet> bayonets = bayService.findByYardId(yard1.getStationid()); 163 List<Bayonet> bayonets = bayService.findByYardId(yard1.getStationid());
154 model.addAttribute("bayonets", bayonets); 164 model.addAttribute("bayonets", bayonets);
155 } 165 }
156 - model.addAttribute("veList",veList); 166 + model.addAttribute("veList", veList);
157 model.addAttribute("yardList", yardList); 167 model.addAttribute("yardList", yardList);
158 model.addAttribute("landBusinesstypeList", landBusinesstypeList); 168 model.addAttribute("landBusinesstypeList", landBusinesstypeList);
159 return "modules/land/landBusinesstypeListForm"; 169 return "modules/land/landBusinesstypeListForm";
@@ -162,77 +172,86 @@ public class LandBusinesstypeListController extends BaseController { @@ -162,77 +172,86 @@ public class LandBusinesstypeListController extends BaseController {
162 @RequiresPermissions("land:landBusinesstypeList:edit") 172 @RequiresPermissions("land:landBusinesstypeList:edit")
163 @RequestMapping(value = "save") 173 @RequestMapping(value = "save")
164 public String save(LandBusinesstypeList landBusinesstypeList, Model model, RedirectAttributes redirectAttributes) { 174 public String save(LandBusinesstypeList landBusinesstypeList, Model model, RedirectAttributes redirectAttributes) {
165 - if (!beanValidator(model, landBusinesstypeList)){ 175 + if (!beanValidator(model, landBusinesstypeList)) {
166 return form(landBusinesstypeList, model); 176 return form(landBusinesstypeList, model);
167 } 177 }
  178 + boolean flag = false;
168 landBusinesstypeList.setIsDelete("0"); 179 landBusinesstypeList.setIsDelete("0");
169 landBusinesstypeList.setIsvalid("0"); 180 landBusinesstypeList.setIsvalid("0");
170 - if(landBusinesstypeList.getId().length()>0) { 181 + if (landBusinesstypeList.getId().length() > 0) {
171 String masterList = landBusinesstypeList.getMasterList(); 182 String masterList = landBusinesstypeList.getMasterList();
172 - insertVm(landBusinesstypeList.getMassageId(),landBusinesstypeList.getTrailerFrameNo(),masterList); 183 + insertVm(landBusinesstypeList.getMassageId(), landBusinesstypeList.getTrailerFrameNo(), masterList);
173 landBusinesstypeListService.save(landBusinesstypeList); 184 landBusinesstypeListService.save(landBusinesstypeList);
174 - List<LandBusinesstypeList> list = landBusinesstypeListService.findByBarcode(landBusinesstypeList.getBarcode()); 185 + List<LandBusinesstypeList> list = landBusinesstypeListService
  186 + .findByBarcode(landBusinesstypeList.getBarcode());
175 for (int i = 0; i < list.size(); i++) { 187 for (int i = 0; i < list.size(); i++) {
176 - if(list.get(i).getBusinesstype().endsWith("流转")) {  
177 - if(list.get(i).getMasterList().length()>0) {  
178 - if(list.get(i).getContrastflag()==null) { 188 + if (list.get(i).getBusinesstype().endsWith("业务")) {
  189 + if (list.get(i).getMasterList().length() > 0) {
  190 + if (list.get(i).getContrastflag() == null) {
179 list.get(i).setMasterList(masterList); 191 list.get(i).setMasterList(masterList);
180 - // list.get(i).setBusinesstype(landBusinesstypeList.getBusinesstype());  
181 landBusinesstypeListService.save(list.get(i)); 192 landBusinesstypeListService.save(list.get(i));
182 } 193 }
183 - }else {  
184 - if("I".equals(list.get(i).getTurnoverflag())) { 194 + } else {
  195 + if ("I".equals(list.get(i).getTurnoverflag()) && list.get(i).getContrastflag() == null) {
185 list.get(i).setMasterList(masterList); 196 list.get(i).setMasterList(masterList);
186 - // list.get(i).setBusinesstype(landBusinesstypeList.getBusinesstype());  
187 landBusinesstypeListService.save(list.get(i)); 197 landBusinesstypeListService.save(list.get(i));
188 } 198 }
189 } 199 }
190 } 200 }
191 } 201 }
192 - }else{  
193 - if(TYPE1.equals(landBusinesstypeList.getBusinesstype())) {  
194 - insertType1(landBusinesstypeList); 202 + flag=true;
  203 + } else {
  204 + if (TYPE1.equals(landBusinesstypeList.getBusinesstype())) {
  205 + flag = insertType1(landBusinesstypeList);
195 } 206 }
196 - if(TYPE2.equals(landBusinesstypeList.getBusinesstype())) {  
197 - insertType2(landBusinesstypeList); 207 + if (TYPE2.equals(landBusinesstypeList.getBusinesstype())) {
  208 + flag = insertType2(landBusinesstypeList);
198 } 209 }
199 - if(TYPE3.equals(landBusinesstypeList.getBusinesstype())) {  
200 - insertType3(landBusinesstypeList); 210 + if (TYPE3.equals(landBusinesstypeList.getBusinesstype())) {
  211 + flag = insertType3(landBusinesstypeList);
201 } 212 }
202 - if(TYPE4.equals(landBusinesstypeList.getBusinesstype())) {  
203 - insertType1(landBusinesstypeList); 213 + if (TYPE4.equals(landBusinesstypeList.getBusinesstype())) {
  214 + flag = insertType1(landBusinesstypeList);
204 } 215 }
205 } 216 }
  217 + if(flag) {
206 addMessage(redirectAttributes, "保存申请单成功"); 218 addMessage(redirectAttributes, "保存申请单成功");
207 - return "redirect:"+Global.getAdminPath()+"/land/landBusinesstypeList/?repage"; 219 + }else {
  220 + addMessage(redirectAttributes, "保存申请单失败,请重新录入");
  221 + }
  222 +
  223 + return "redirect:" + Global.getAdminPath() + "/land/landBusinesstypeList/?repage";
208 } 224 }
209 225
210 @RequiresPermissions("land:landBusinesstypeList:edit") 226 @RequiresPermissions("land:landBusinesstypeList:edit")
211 @RequestMapping(value = "delete") 227 @RequestMapping(value = "delete")
212 - public String delete(LandBusinesstypeList landBusinesstypeList, RedirectAttributes redirectAttributes) { 228 + public String delete(LandBusinesstypeList landBusinesstypeList, RedirectAttributes redirectAttributes)
  229 + throws Exception {
213 boolean flag = false; 230 boolean flag = false;
214 List<LandBusinesstypeList> list = landBusinesstypeListService.findByBarcode(landBusinesstypeList.getBarcode()); 231 List<LandBusinesstypeList> list = landBusinesstypeListService.findByBarcode(landBusinesstypeList.getBarcode());
215 for (int i = 0; i < list.size(); i++) { 232 for (int i = 0; i < list.size(); i++) {
216 String flag1 = list.get(i).getContrastflag(); 233 String flag1 = list.get(i).getContrastflag();
217 - if(flag1!=null) {  
218 - flag =true; 234 + if (flag1 != null) {
  235 + flag = true;
219 break; 236 break;
220 } 237 }
221 } 238 }
222 - if(!flag) { 239 + if (!flag) {
223 landBusinesstypeListService.deleteByBarcode(landBusinesstypeList.getBarcode()); 240 landBusinesstypeListService.deleteByBarcode(landBusinesstypeList.getBarcode());
224 veMainService.deleteById(landBusinesstypeList.getMassageId()); 241 veMainService.deleteById(landBusinesstypeList.getMassageId());
225 buildBarCode.cancleBarCode(landBusinesstypeList.getTrailerFrameNo()); 242 buildBarCode.cancleBarCode(landBusinesstypeList.getTrailerFrameNo());
226 addMessage(redirectAttributes, "删除申请单成功"); 243 addMessage(redirectAttributes, "删除申请单成功");
227 - }else { 244 + } else {
228 addMessage(redirectAttributes, "删除失败,已有业务已进出站"); 245 addMessage(redirectAttributes, "删除失败,已有业务已进出站");
229 } 246 }
230 247
231 - return "redirect:"+Global.getAdminPath()+"/land/landBusinesstypeList/?repage"; 248 + return "redirect:" + Global.getAdminPath() + "/land/landBusinesstypeList/?repage";
232 } 249 }
233 250
234 - public void insertType1(LandBusinesstypeList landBusinesstypeList) {  
235 - //first entry in 251 + public boolean insertType1(LandBusinesstypeList landBusinesstypeList) {
  252 + boolean flag = false;
  253 + try {
  254 + // first entry in
236 String messageId = LandBusinesstypeListController.dateTimeFormat(); 255 String messageId = LandBusinesstypeListController.dateTimeFormat();
237 String mainfistList = landBusinesstypeList.getMasterList(); 256 String mainfistList = landBusinesstypeList.getMasterList();
238 String startport = landBusinesstypeList.getStartport(); 257 String startport = landBusinesstypeList.getStartport();
@@ -241,23 +260,20 @@ public class LandBusinesstypeListController extends BaseController { @@ -241,23 +260,20 @@ public class LandBusinesstypeListController extends BaseController {
241 String endStation = landBusinesstypeList.getEndstation(); 260 String endStation = landBusinesstypeList.getEndstation();
242 String isfull = landBusinesstypeList.getIsfull(); 261 String isfull = landBusinesstypeList.getIsfull();
243 landBusinesstypeList.setMassageId(messageId); 262 landBusinesstypeList.setMassageId(messageId);
244 - String barCode = buildBarCode.CreateBarCode(landBusinesstypeList.getTrailerFrameNo(),messageId);  
245 landBusinesstypeList.setStartport(""); 263 landBusinesstypeList.setStartport("");
246 landBusinesstypeList.setStartsatation(""); 264 landBusinesstypeList.setStartsatation("");
247 landBusinesstypeList.setEndport(startport); 265 landBusinesstypeList.setEndport(startport);
248 landBusinesstypeList.setEndstation(startStation); 266 landBusinesstypeList.setEndstation(startStation);
249 - landBusinesstypeList.setBarcode(barCode);  
250 landBusinesstypeList.setMasterList(""); 267 landBusinesstypeList.setMasterList("");
251 landBusinesstypeList.setProdectTime(new Date()); 268 landBusinesstypeList.setProdectTime(new Date());
252 landBusinesstypeList.setAisle(bayService.findByYardAndName(startStation, "1号卡口-进").getChannel()); 269 landBusinesstypeList.setAisle(bayService.findByYardAndName(startStation, "1号卡口-进").getChannel());
253 landBusinesstypeListService.save(landBusinesstypeList); 270 landBusinesstypeListService.save(landBusinesstypeList);
254 - insertVm(landBusinesstypeList.getMassageId(),landBusinesstypeList.getTrailerFrameNo(),mainfistList); 271 + insertVm(landBusinesstypeList.getMassageId(), landBusinesstypeList.getTrailerFrameNo(), mainfistList);
255 272
256 - //second out 273 + // second out
257 LandBusinesstypeList list = new LandBusinesstypeList(); 274 LandBusinesstypeList list = new LandBusinesstypeList();
258 list.setAgentname(landBusinesstypeList.getAgentname()); 275 list.setAgentname(landBusinesstypeList.getAgentname());
259 list.setAgentno(landBusinesstypeList.getAgentno()); 276 list.setAgentno(landBusinesstypeList.getAgentno());
260 - list.setBarcode(barCode);  
261 list.setIsDelete("0"); 277 list.setIsDelete("0");
262 list.setIsvalid("0"); 278 list.setIsvalid("0");
263 list.setIsfull(isfull); 279 list.setIsfull(isfull);
@@ -275,14 +291,13 @@ public class LandBusinesstypeListController extends BaseController { @@ -275,14 +291,13 @@ public class LandBusinesstypeListController extends BaseController {
275 list.setMassageId(messageId); 291 list.setMassageId(messageId);
276 landBusinesstypeListService.save(list); 292 landBusinesstypeListService.save(list);
277 293
278 - //third 294 + // third
279 LandBusinesstypeList list1 = new LandBusinesstypeList(); 295 LandBusinesstypeList list1 = new LandBusinesstypeList();
280 list1.setAgentname(landBusinesstypeList.getAgentname()); 296 list1.setAgentname(landBusinesstypeList.getAgentname());
281 list1.setAgentno(landBusinesstypeList.getAgentno()); 297 list1.setAgentno(landBusinesstypeList.getAgentno());
282 list1.setIsDelete("0"); 298 list1.setIsDelete("0");
283 list1.setIsvalid("0"); 299 list1.setIsvalid("0");
284 list1.setIsfull(isfull); 300 list1.setIsfull(isfull);
285 - list1.setBarcode(barCode);  
286 list1.setBusinesstype(landBusinesstypeList.getBusinesstype()); 301 list1.setBusinesstype(landBusinesstypeList.getBusinesstype());
287 list1.setCocode(landBusinesstypeList.getCocode()); 302 list1.setCocode(landBusinesstypeList.getCocode());
288 list1.setTrailerFrameNo(landBusinesstypeList.getTrailerFrameNo()); 303 list1.setTrailerFrameNo(landBusinesstypeList.getTrailerFrameNo());
@@ -299,11 +314,10 @@ public class LandBusinesstypeListController extends BaseController { @@ -299,11 +314,10 @@ public class LandBusinesstypeListController extends BaseController {
299 list1.setMassageId(messageId); 314 list1.setMassageId(messageId);
300 landBusinesstypeListService.save(list1); 315 landBusinesstypeListService.save(list1);
301 316
302 - //four 317 + // four
303 LandBusinesstypeList list2 = new LandBusinesstypeList(); 318 LandBusinesstypeList list2 = new LandBusinesstypeList();
304 list2.setAgentname(landBusinesstypeList.getAgentname()); 319 list2.setAgentname(landBusinesstypeList.getAgentname());
305 list2.setAgentno(landBusinesstypeList.getAgentno()); 320 list2.setAgentno(landBusinesstypeList.getAgentno());
306 - list2.setBarcode(barCode);  
307 list2.setIsDelete("0"); 321 list2.setIsDelete("0");
308 list2.setIsvalid("0"); 322 list2.setIsvalid("0");
309 list2.setIsfull(isfull); 323 list2.setIsfull(isfull);
@@ -325,26 +339,48 @@ public class LandBusinesstypeListController extends BaseController { @@ -325,26 +339,48 @@ public class LandBusinesstypeListController extends BaseController {
325 list2.setMassageId(messageId); 339 list2.setMassageId(messageId);
326 landBusinesstypeListService.save(list2); 340 landBusinesstypeListService.save(list2);
327 341
  342 +
  343 + String barCode = buildBarCode.CreateBarCode(landBusinesstypeList.getTrailerFrameNo(), messageId);
  344 + List<LandBusinesstypeList> typeList = landBusinesstypeListService.findByMessageId(messageId);
  345 + for (int i = 0; i < typeList.size(); i++) {
  346 + typeList.get(i).setBarcode(barCode);
  347 + landBusinesstypeListService.updateEntry(typeList.get(i));
  348 + flag = true;
  349 + }
  350 + if (barCode==null) {
  351 + List<LandBusinesstypeList> typeList1 = landBusinesstypeListService.findByMessageId(messageId);
  352 + for (int i = 0; i < typeList1.size(); i++) {
  353 + landBusinesstypeListService.deleteByMessageId(typeList1.get(i));
  354 + flag =false;
  355 + }
  356 + }
  357 + } catch (Exception e) {
  358 + e.printStackTrace();
  359 + }
  360 + return flag;
  361 +
328 } 362 }
329 363
330 - public void insertType2(LandBusinesstypeList landBusinesstypeList) {  
331 - //first entry 364 + public boolean insertType2(LandBusinesstypeList landBusinesstypeList) {
  365 +
  366 + boolean flag = false;
  367 + try {
  368 +
  369 + // first entry
332 String messageId = dateTimeFormat(); 370 String messageId = dateTimeFormat();
333 String mainfistList = landBusinesstypeList.getMasterList(); 371 String mainfistList = landBusinesstypeList.getMasterList();
334 String isfull = landBusinesstypeList.getIsfull(); 372 String isfull = landBusinesstypeList.getIsfull();
335 landBusinesstypeList.setMassageId(messageId); 373 landBusinesstypeList.setMassageId(messageId);
336 - String barCode = buildBarCode.CreateBarCode(landBusinesstypeList.getTrailerFrameNo(),messageId);  
337 - landBusinesstypeList.setBarcode(barCode);  
338 landBusinesstypeList.setMasterList(""); 374 landBusinesstypeList.setMasterList("");
  375 + landBusinesstypeList.setProdectTime(new Date());
339 landBusinesstypeListService.save(landBusinesstypeList); 376 landBusinesstypeListService.save(landBusinesstypeList);
340 - insertVm(landBusinesstypeList.getMassageId(),landBusinesstypeList.getTrailerFrameNo(),mainfistList);  
341 - //second 377 + insertVm(landBusinesstypeList.getMassageId(), landBusinesstypeList.getTrailerFrameNo(), mainfistList);
  378 + // second
342 LandBusinesstypeList list = new LandBusinesstypeList(); 379 LandBusinesstypeList list = new LandBusinesstypeList();
343 list.setAgentname(landBusinesstypeList.getAgentname()); 380 list.setAgentname(landBusinesstypeList.getAgentname());
344 list.setAgentno(landBusinesstypeList.getAgentno()); 381 list.setAgentno(landBusinesstypeList.getAgentno());
345 list.setIsDelete("0"); 382 list.setIsDelete("0");
346 list.setIsvalid("0"); 383 list.setIsvalid("0");
347 - list.setBarcode(barCode);  
348 list.setIsfull(isfull); 384 list.setIsfull(isfull);
349 list.setBusinesstype(landBusinesstypeList.getBusinesstype()); 385 list.setBusinesstype(landBusinesstypeList.getBusinesstype());
350 list.setCocode(landBusinesstypeList.getCocode()); 386 list.setCocode(landBusinesstypeList.getCocode());
@@ -361,28 +397,45 @@ public class LandBusinesstypeListController extends BaseController { @@ -361,28 +397,45 @@ public class LandBusinesstypeListController extends BaseController {
361 list.setTurnoverflag("E"); 397 list.setTurnoverflag("E");
362 list.setMassageId(messageId); 398 list.setMassageId(messageId);
363 landBusinesstypeListService.save(list); 399 landBusinesstypeListService.save(list);
  400 + String barCode = buildBarCode.CreateBarCode(landBusinesstypeList.getTrailerFrameNo(), messageId);
  401 + List<LandBusinesstypeList> typeList = landBusinesstypeListService.findByMessageId(messageId);
  402 + for (int i = 0; i < typeList.size(); i++) {
  403 + typeList.get(i).setBarcode(barCode);
  404 + landBusinesstypeListService.updateEntry(typeList.get(i));
  405 + flag = true;
  406 + }
  407 + if (barCode==null) {
  408 + List<LandBusinesstypeList> typeList1 = landBusinesstypeListService.findByMessageId(messageId);
  409 + for (int i = 0; i < typeList1.size(); i++) {
  410 + landBusinesstypeListService.deleteByMessageId(typeList1.get(i));
  411 + flag=false;
  412 + }
  413 + }
  414 + } catch (Exception e) {
  415 + e.printStackTrace();
  416 + }
  417 + return flag;
364 } 418 }
365 419
366 - public void insertType3(LandBusinesstypeList landBusinesstypeList) {  
367 - //first entry 420 + public boolean insertType3(LandBusinesstypeList landBusinesstypeList) {
368 421
  422 + boolean flag = false;
  423 + try {
  424 + // first entry
369 String messageId = dateTimeFormat(); 425 String messageId = dateTimeFormat();
370 landBusinesstypeList.setMassageId(messageId); 426 landBusinesstypeList.setMassageId(messageId);
371 String mainfistList = landBusinesstypeList.getMasterList(); 427 String mainfistList = landBusinesstypeList.getMasterList();
372 - String barCode = buildBarCode.CreateBarCode(landBusinesstypeList.getTrailerFrameNo(),messageId);  
373 - //String barCode = messageId;  
374 String isfull = landBusinesstypeList.getIsfull(); 428 String isfull = landBusinesstypeList.getIsfull();
375 - landBusinesstypeList.setBarcode(barCode); 429 + landBusinesstypeList.setProdectTime(new Date());
376 landBusinesstypeListService.save(landBusinesstypeList); 430 landBusinesstypeListService.save(landBusinesstypeList);
377 - insertVm(landBusinesstypeList.getMassageId(),landBusinesstypeList.getTrailerFrameNo(),mainfistList);  
378 - //second 431 + insertVm(landBusinesstypeList.getMassageId(), landBusinesstypeList.getTrailerFrameNo(), mainfistList);
  432 + // second
379 LandBusinesstypeList list = new LandBusinesstypeList(); 433 LandBusinesstypeList list = new LandBusinesstypeList();
380 list.setAgentname(landBusinesstypeList.getAgentname()); 434 list.setAgentname(landBusinesstypeList.getAgentname());
381 list.setAgentno(landBusinesstypeList.getAgentno()); 435 list.setAgentno(landBusinesstypeList.getAgentno());
382 list.setIsDelete("0"); 436 list.setIsDelete("0");
383 list.setIsvalid("0"); 437 list.setIsvalid("0");
384 list.setIsfull(isfull); 438 list.setIsfull(isfull);
385 - list.setBarcode(barCode);  
386 list.setBusinesstype(landBusinesstypeList.getBusinesstype()); 439 list.setBusinesstype(landBusinesstypeList.getBusinesstype());
387 list.setCocode(landBusinesstypeList.getCocode()); 440 list.setCocode(landBusinesstypeList.getCocode());
388 list.setTrailerFrameNo(landBusinesstypeList.getTrailerFrameNo()); 441 list.setTrailerFrameNo(landBusinesstypeList.getTrailerFrameNo());
@@ -398,28 +451,132 @@ public class LandBusinesstypeListController extends BaseController { @@ -398,28 +451,132 @@ public class LandBusinesstypeListController extends BaseController {
398 list.setTurnoverflag("E"); 451 list.setTurnoverflag("E");
399 list.setMassageId(messageId); 452 list.setMassageId(messageId);
400 landBusinesstypeListService.save(list); 453 landBusinesstypeListService.save(list);
401 - }  
402 454
  455 + String barCode = buildBarCode.CreateBarCode(landBusinesstypeList.getTrailerFrameNo(), messageId);
  456 + List<LandBusinesstypeList> typeList = landBusinesstypeListService.findByMessageId(messageId);
  457 + for (int i = 0; i < typeList.size(); i++) {
  458 + typeList.get(i).setBarcode(barCode);
  459 + landBusinesstypeListService.updateEntry(typeList.get(i));
  460 + flag = true;
  461 + }
  462 + if (barCode==null) {
  463 + List<LandBusinesstypeList> typeList1 = landBusinesstypeListService.findByMessageId(messageId);
  464 + for (int i = 0; i < typeList1.size(); i++) {
  465 + landBusinesstypeListService.deleteByMessageId(typeList1.get(i));
  466 + flag = false;
  467 + }
  468 + }
  469 + } catch (Exception e) {
  470 + e.printStackTrace();
  471 + }
  472 + return flag;
  473 + }
  474 +
  475 + /*
  476 + * public void insertType1(LandBusinesstypeList landBusinesstypeList) { //first
  477 + * entry in String messageId = LandBusinesstypeListController.dateTimeFormat();
  478 + * String mainfistList = landBusinesstypeList.getMasterList(); String startport
  479 + * = landBusinesstypeList.getStartport(); String endport =
  480 + * landBusinesstypeList.getEndport(); String startStation =
  481 + * landBusinesstypeList.getStartsatation(); String endStation =
  482 + * landBusinesstypeList.getEndstation(); String isfull =
  483 + * landBusinesstypeList.getIsfull();
  484 + * landBusinesstypeList.setMassageId(messageId); String barCode =
  485 + * buildBarCode.CreateBarCode(landBusinesstypeList.getTrailerFrameNo(),messageId
  486 + * ); landBusinesstypeList.setStartport("");
  487 + * landBusinesstypeList.setStartsatation("");
  488 + * landBusinesstypeList.setEndport(startport);
  489 + * landBusinesstypeList.setEndstation(startStation);
  490 + * landBusinesstypeList.setBarcode(barCode);
  491 + * landBusinesstypeList.setMasterList("");
  492 + * landBusinesstypeList.setProdectTime(new Date());
  493 + * landBusinesstypeList.setAisle(bayService.findByYardAndName(startStation,
  494 + * "1号卡口-进").getChannel());
  495 + * landBusinesstypeListService.save(landBusinesstypeList);
  496 + * insertVm(landBusinesstypeList.getMassageId(),landBusinesstypeList.
  497 + * getTrailerFrameNo(),mainfistList);
  498 + *
  499 + * //second out LandBusinesstypeList list = new LandBusinesstypeList();
  500 + * list.setAgentname(landBusinesstypeList.getAgentname());
  501 + * list.setAgentno(landBusinesstypeList.getAgentno()); list.setBarcode(barCode);
  502 + * list.setIsDelete("0"); list.setIsvalid("0"); list.setIsfull(isfull);
  503 + * list.setBusinesstype(landBusinesstypeList.getBusinesstype());
  504 + * list.setCocode(landBusinesstypeList.getCocode());
  505 + * list.setTrailerFrameNo(landBusinesstypeList.getTrailerFrameNo());
  506 + * list.setEndport(startport); list.setEndstation(startStation);
  507 + * list.setProdectTime(new Date()); list.setMasterList(mainfistList);
  508 + * list.setDriverid(landBusinesstypeList.getDriverid());
  509 + * list.setDrivername(landBusinesstypeList.getDrivername());
  510 + * list.setAisle(bayService.findByYardAndName(startStation,
  511 + * "1号卡口-出").getChannel()); list.setTurnoverflag("E");
  512 + * list.setMassageId(messageId); landBusinesstypeListService.save(list);
  513 + *
  514 + * //third LandBusinesstypeList list1 = new LandBusinesstypeList();
  515 + * list1.setAgentname(landBusinesstypeList.getAgentname());
  516 + * list1.setAgentno(landBusinesstypeList.getAgentno()); list1.setIsDelete("0");
  517 + * list1.setIsvalid("0"); list1.setIsfull(isfull); list1.setBarcode(barCode);
  518 + * list1.setBusinesstype(landBusinesstypeList.getBusinesstype());
  519 + * list1.setCocode(landBusinesstypeList.getCocode());
  520 + * list1.setTrailerFrameNo(landBusinesstypeList.getTrailerFrameNo());
  521 + * list1.setStartport(startport); list1.setStartsatation(startStation);
  522 + * list1.setEndport(endport); list1.setEndstation(endStation);
  523 + * list1.setProdectTime(new Date()); list1.setMasterList(mainfistList);
  524 + * list1.setDriverid(landBusinesstypeList.getDriverid());
  525 + * list1.setDrivername(landBusinesstypeList.getDrivername());
  526 + * list1.setAisle(bayService.findByYardAndName(endStation,
  527 + * "1号卡口-进").getChannel()); list1.setTurnoverflag("I");
  528 + * list1.setMassageId(messageId); landBusinesstypeListService.save(list1);
  529 + *
  530 + * //four LandBusinesstypeList list2 = new LandBusinesstypeList();
  531 + * list2.setAgentname(landBusinesstypeList.getAgentname());
  532 + * list2.setAgentno(landBusinesstypeList.getAgentno());
  533 + * list2.setBarcode(barCode); list2.setIsDelete("0"); list2.setIsvalid("0");
  534 + * list2.setIsfull(isfull);
  535 + * list2.setBusinesstype(landBusinesstypeList.getBusinesstype());
  536 + * list2.setCocode(landBusinesstypeList.getCocode());
  537 + * list2.setTrailerFrameNo(landBusinesstypeList.getTrailerFrameNo());
  538 + * list2.setStartport(""); list2.setStartsatation("");
  539 + * list2.setStartport(startport); list2.setStartsatation(startStation);
  540 + * list2.setEndport(endport); list2.setEndstation(endStation);
  541 + * list2.setProdectTime(new Date()); list2.setMasterList("");
  542 + * list2.setDriverid(landBusinesstypeList.getDriverid());
  543 + * list2.setDrivername(landBusinesstypeList.getDrivername());
  544 + * list2.setAisle(bayService.findByYardAndName(endStation,
  545 + * "1号卡口-出").getChannel()); list2.setTurnoverflag("E");
  546 + * list2.setMassageId(messageId); landBusinesstypeListService.save(list2);
  547 + *
  548 + * }
  549 + */
403 public static String dateTimeFormat() { 550 public static String dateTimeFormat() {
404 Date dateTime = new Date(); 551 Date dateTime = new Date();
405 SimpleDateFormat format = new SimpleDateFormat("yyyyMMddHHmmss"); 552 SimpleDateFormat format = new SimpleDateFormat("yyyyMMddHHmmss");
406 - return format.format(dateTime); 553 + String str = String.valueOf(new Random().nextInt(9999)+1);
  554 + if(str.length()==1) {
  555 + str = "000"+str;
  556 + }else if(str.length()==2) {
  557 + str = "00"+str;
  558 + }else if(str.length()==3) {
  559 + str = "0"+str;
  560 + }
  561 + str = format.format(dateTime)+str;
  562 + return str;
407 } 563 }
408 564
409 - public void insertVm(String id ,String frameNo,String mainfistList) { 565 +
  566 + public void insertVm(String id, String frameNo, String mainfistList) {
410 567
411 List<VehicleMainifist> vmList = veMainService.selectByBueId(id); 568 List<VehicleMainifist> vmList = veMainService.selectByBueId(id);
412 569
413 - if(mainfistList.length()>0) { 570 + if (mainfistList.length() > 0) {
414 String[] list = mainfistList.replace(",", ",").split(","); 571 String[] list = mainfistList.replace(",", ",").split(",");
415 - if(vmList.size()>list.length) { 572 + if (vmList.size() > list.length) {
416 for (int j = 0; j < vmList.size(); j++) { 573 for (int j = 0; j < vmList.size(); j++) {
417 for (int i = 0; i < list.length; i++) { 574 for (int i = 0; i < list.length; i++) {
418 - if(vmList.get(j).getMainifist() != list[i]) { 575 + if (vmList.get(j).getMainifist() != list[i]) {
419 veMainService.deleteEntry(vmList.get(j)); 576 veMainService.deleteEntry(vmList.get(j));
420 } 577 }
421 - VehicleMainifist vm = veMainService.selectByVm(id,list[i]);  
422 - if(vm==null) { 578 + VehicleMainifist vm = veMainService.selectByVm(id, list[i]);
  579 + if (vm == null) {
423 VehicleMainifist vehicleMainifist = new VehicleMainifist(); 580 VehicleMainifist vehicleMainifist = new VehicleMainifist();
424 vehicleMainifist.setBusinessId(id); 581 vehicleMainifist.setBusinessId(id);
425 vehicleMainifist.setBusinessNum(frameNo); 582 vehicleMainifist.setBusinessNum(frameNo);
@@ -432,5 +589,4 @@ public class LandBusinesstypeListController extends BaseController { @@ -432,5 +589,4 @@ public class LandBusinesstypeListController extends BaseController {
432 } 589 }
433 } 590 }
434 591
435 -  
436 } 592 }
@@ -3,6 +3,9 @@ @@ -3,6 +3,9 @@
3 */ 3 */
4 package com.thinkgem.jeesite.modules.land.web; 4 package com.thinkgem.jeesite.modules.land.web;
5 5
  6 +import java.util.Date;
  7 +import java.util.List;
  8 +
6 import javax.servlet.http.HttpServletRequest; 9 import javax.servlet.http.HttpServletRequest;
7 import javax.servlet.http.HttpServletResponse; 10 import javax.servlet.http.HttpServletResponse;
8 11
@@ -13,6 +16,7 @@ import org.springframework.ui.Model; @@ -13,6 +16,7 @@ import org.springframework.ui.Model;
13 import org.springframework.web.bind.annotation.ModelAttribute; 16 import org.springframework.web.bind.annotation.ModelAttribute;
14 import org.springframework.web.bind.annotation.RequestMapping; 17 import org.springframework.web.bind.annotation.RequestMapping;
15 import org.springframework.web.bind.annotation.RequestParam; 18 import org.springframework.web.bind.annotation.RequestParam;
  19 +import org.springframework.web.bind.annotation.ResponseBody;
16 import org.springframework.web.servlet.mvc.support.RedirectAttributes; 20 import org.springframework.web.servlet.mvc.support.RedirectAttributes;
17 21
18 import com.thinkgem.jeesite.common.barCode.buildBarCode; 22 import com.thinkgem.jeesite.common.barCode.buildBarCode;
@@ -83,6 +87,7 @@ public class LandRoadVeRecordController extends BaseController { @@ -83,6 +87,7 @@ public class LandRoadVeRecordController extends BaseController {
83 String barcode = landRoadVeRecord.getBarcode(); 87 String barcode = landRoadVeRecord.getBarcode();
84 if(barcode ==null) { 88 if(barcode ==null) {
85 String barCode = buildBarCode.crateCar(landRoadVeRecord); 89 String barCode = buildBarCode.crateCar(landRoadVeRecord);
  90 + // String barCode = "111";
86 if("0".equals(barCode)) { 91 if("0".equals(barCode)) {
87 landRoadVeRecord.setReturnmessage("备案成功"); 92 landRoadVeRecord.setReturnmessage("备案成功");
88 }else { 93 }else {
@@ -90,6 +95,9 @@ public class LandRoadVeRecordController extends BaseController { @@ -90,6 +95,9 @@ public class LandRoadVeRecordController extends BaseController {
90 } 95 }
91 landRoadVeRecord.setBarcode(barCode); 96 landRoadVeRecord.setBarcode(barCode);
92 } 97 }
  98 + if(landRoadVeRecord.getProposeTime()==null) {
  99 + landRoadVeRecord.setProposeTime(new Date());
  100 + }
93 landRoadVeRecordService.save(landRoadVeRecord); 101 landRoadVeRecordService.save(landRoadVeRecord);
94 addMessage(redirectAttributes, "保存备案成功"); 102 addMessage(redirectAttributes, "保存备案成功");
95 return "redirect:"+Global.getAdminPath()+"/land/landRoadVeRecord/?repage"; 103 return "redirect:"+Global.getAdminPath()+"/land/landRoadVeRecord/?repage";
@@ -104,4 +112,21 @@ public class LandRoadVeRecordController extends BaseController { @@ -104,4 +112,21 @@ public class LandRoadVeRecordController extends BaseController {
104 return "redirect:"+Global.getAdminPath()+"/land/landRoadVeRecord/?repage"; 112 return "redirect:"+Global.getAdminPath()+"/land/landRoadVeRecord/?repage";
105 } 113 }
106 114
  115 + @RequiresPermissions("land:landRoadVeRecord:edit")
  116 + @RequestMapping(value = "selectByVeName")
  117 + @ResponseBody
  118 + public Page<LandRoadVeRecord> selectByVeName(String veName){
  119 + Page<LandRoadVeRecord> page = new Page<LandRoadVeRecord>();
  120 + Principal principal = UserUtils.getPrincipal();
  121 + String loginName = principal.getLoginName();
  122 + User user = systemService.getUserByLoginName(loginName);
  123 + List<LandRoadVeRecord> veList = landRoadVeRecordService.selectByFrameNo(veName);
  124 + if(veList.size()>0) {
  125 + page.setCount(1L);
  126 + }
  127 + return page;
  128 + }
  129 +
  130 +
  131 +
107 } 132 }
@@ -10,17 +10,23 @@ @@ -10,17 +10,23 @@
10 #jdbc.password=123456 10 #jdbc.password=123456
11 11
12 #mysql database setting 12 #mysql database setting
13 -jdbc.type=mysql  
14 -jdbc.driver=com.mysql.cj.jdbc.Driver  
15 -jdbc.url=jdbc:mysql://10.50.7.70:3306/station?useUnicode=true&characterEncoding=utf8&autoReconnect=true&failOverReadOnly=false&allowMultiQueries=true&useSSL=true&serverTimezone=Asia/Shanghai  
16 -jdbc.username=station  
17 -jdbc.password=station@10.50.7.70 13 +#jdbc.type=mysql
  14 +#jdbc.driver=com.mysql.cj.jdbc.Driver
  15 +#jdbc.url=jdbc:mysql://10.50.7.70:3306/station?useUnicode=true&characterEncoding=utf8&autoReconnect=true&failOverReadOnly=false&allowMultiQueries=true&useSSL=true&serverTimezone=Asia/Shanghai
  16 +#jdbc.username=station
  17 +#jdbc.password=station@10.50.7.70
18 18
19 #jdbc.type=mysql 19 #jdbc.type=mysql
20 #jdbc.driver=com.mysql.cj.jdbc.Driver 20 #jdbc.driver=com.mysql.cj.jdbc.Driver
21 -#jdbc.url=jdbc:mysql://localhost:3306/station?characterEncoding=utf8&useSSL=false&serverTimezone=UTC&rewriteBatchedStatements=true  
22 -#jdbc.username=root  
23 -#jdbc.password=root 21 +#jdbc.url=jdbc:mysql://10.50.7.10:3306/station?useUnicode=true&characterEncoding=utf8&autoReconnect=true&failOverReadOnly=false&allowMultiQueries=true&useSSL=true&serverTimezone=Asia/Shanghai
  22 +#jdbc.username=kako
  23 +#jdbc.password=mysql10.50.7.10
  24 +
  25 +jdbc.type=mysql
  26 +jdbc.driver=com.mysql.cj.jdbc.Driver
  27 +jdbc.url=jdbc:mysql://localhost:3306/station?characterEncoding=utf8&useSSL=false&serverTimezone=UTC&rewriteBatchedStatements=true
  28 +jdbc.username=root
  29 +jdbc.password=root
24 30
25 #mssql database settings 31 #mssql database settings
26 #jdbc.type=mssql 32 #jdbc.type=mssql
@@ -47,7 +53,7 @@ redis.port=6379 @@ -47,7 +53,7 @@ redis.port=6379
47 #============================# 53 #============================#
48 54
49 #\u4ea7\u54c1\u4fe1\u606f\u8bbe\u7f6e 55 #\u4ea7\u54c1\u4fe1\u606f\u8bbe\u7f6e
50 -productName=\u6D77\u5173\u8F85\u52A9\u7BA1\u7406\u7CFB\u7EDF 56 +productName=\u673A\u573A\u53E3\u5CB8\u901A\u5173\u7269\u6D41\u8F85\u52A9\u7BA1\u7406\u7CFB\u7EDF
51 copyrightYear=2018 57 copyrightYear=2018
52 #version=V1.2.7 58 #version=V1.2.7
53 59
@@ -56,8 +56,12 @@ @@ -56,8 +56,12 @@
56 <if test="trailerFrameNo !=null and trailerFrameNo !=''"> 56 <if test="trailerFrameNo !=null and trailerFrameNo !=''">
57 and trailer_frame_no = #{trailerFrameNo} 57 and trailer_frame_no = #{trailerFrameNo}
58 </if> 58 </if>
  59 + <!-- <if test='createBy.id !="1" and createBy.id !=null and createBy.id !=""'>
  60 + and create_by = #{createBy.id}
  61 + </if> -->
59 order by a.create_date DESC 62 order by a.create_date DESC
60 </select> 63 </select>
  64 +
61 <select id="findByBarcode" resultType="LandBusinesstypeList"> 65 <select id="findByBarcode" resultType="LandBusinesstypeList">
62 SELECT 66 SELECT
63 <include refid="landBusinesstypeListColumns"/> 67 <include refid="landBusinesstypeListColumns"/>
@@ -69,7 +73,17 @@ @@ -69,7 +73,17 @@
69 </if> 73 </if>
70 order by a.create_date DESC 74 order by a.create_date DESC
71 </select> 75 </select>
72 - 76 + <select id="findByMessageId" resultType="LandBusinesstypeList">
  77 + SELECT
  78 + <include refid="landBusinesstypeListColumns"/>
  79 + FROM land_businesstype_list a
  80 + <include refid="landBusinesstypeListJoins"/>
  81 + where a.is_delete = "0"
  82 + <if test="massageId !=null and massageId !=''">
  83 + and massage_id = #{massageId}
  84 + </if>
  85 + order by a.create_date DESC
  86 + </select>
73 <select id="findList" resultType="LandBusinesstypeList"> 87 <select id="findList" resultType="LandBusinesstypeList">
74 SELECT 88 SELECT
75 <include refid="landBusinesstypeListColumns"/> 89 <include refid="landBusinesstypeListColumns"/>
@@ -77,6 +91,24 @@ @@ -77,6 +91,24 @@
77 <include refid="landBusinesstypeListJoins"/> 91 <include refid="landBusinesstypeListJoins"/>
78 <where> 92 <where>
79 a.is_delete = "0" 93 a.is_delete = "0"
  94 + <if test='trailerFrameNo !="1" and trailerFrameNo !=null and trailerFrameNo !=""'>
  95 + and trailer_frame_no = #{trailerFrameNo}
  96 + </if>
  97 + <if test='(createBy.id !="1" and createBy.id !=null and createBy.id !="")'>
  98 + and create_by = #{createBy.id}
  99 + </if>
  100 + <if test="endstation !=null and endstation !=''">
  101 + and endstation = #{endstation}
  102 + </if>
  103 + <if test="contrastflag !=null and contrastflag !=''">
  104 + and contrastflag = #{contrastflag}
  105 + </if>
  106 + <if test="aisle !=null and aisle !=''">
  107 + and aisle = #{aisle}
  108 + </if>
  109 + <if test="agentname !=null and agentname !=''">
  110 + and agentname like "%"#{agentname}"%"
  111 + </if>
80 </where> 112 </where>
81 <choose> 113 <choose>
82 <when test="page !=null and page.orderBy != null and page.orderBy != ''"> 114 <when test="page !=null and page.orderBy != null and page.orderBy != ''">
@@ -111,6 +143,11 @@ @@ -111,6 +143,11 @@
111 WHERE barcode = #{barcode} 143 WHERE barcode = #{barcode}
112 </update> 144 </update>
113 145
  146 + <update id="deleteByMessageId" parameterType="java.lang.String">
  147 + DELETE FROM land_businesstype_list
  148 + WHERE massage_id = #{massageId}
  149 + </update>
  150 +
114 <insert id="insert"> 151 <insert id="insert">
115 INSERT INTO land_businesstype_list( 152 INSERT INTO land_businesstype_list(
116 id, 153 id,
@@ -211,6 +248,38 @@ @@ -211,6 +248,38 @@
211 remark2 = #{remark2} 248 remark2 = #{remark2}
212 WHERE id = #{id} 249 WHERE id = #{id}
213 </update> 250 </update>
  251 + <update id="updateEntry">
  252 + UPDATE land_businesstype_list SET
  253 + massage_id = #{massageId},
  254 + trailer_frame_no = #{trailerFrameNo},
  255 + trailer_license_no = #{trailerLicenseNo},
  256 + master_list = #{masterList},
  257 + prodect_time = #{prodectTime},
  258 + is_delete = #{isDelete},
  259 + agentno = #{agentno},
  260 + agentname = #{agentname},
  261 + cocode = #{cocode},
  262 + drivername = #{drivername},
  263 + driverid = #{driverid},
  264 + startport = #{startport},
  265 + endport = #{endport},
  266 + startsatation = #{startsatation},
  267 + endstation = #{endstation},
  268 + aisle = #{aisle},
  269 + businesstype = #{businesstype},
  270 + turnoverflag = #{turnoverflag},
  271 + barcode = #{barcode},
  272 + contrastflag = #{contrastflag},
  273 + update_by = #{updateBy.id},
  274 + update_date = #{updateDate},
  275 + isvalid = #{isvalid},
  276 + aislewt = #{aislewt},
  277 + isfull = #{isfull},
  278 + remark = #{remark},
  279 + remark1 = #{remark1},
  280 + remark2 = #{remark2}
  281 + WHERE id = #{id}
  282 + </update>
214 283
215 <update id="delete"> 284 <update id="delete">
216 DELETE FROM land_businesstype_list 285 DELETE FROM land_businesstype_list
@@ -81,14 +81,14 @@ @@ -81,14 +81,14 @@
81 <include refid="landRoadVeRecordColumns"/> 81 <include refid="landRoadVeRecordColumns"/>
82 FROM land_road_ve_record a 82 FROM land_road_ve_record a
83 <include refid="landRoadVeRecordJoins"/> 83 <include refid="landRoadVeRecordJoins"/>
84 - <where> 84 + <trim prefix="WHERE" prefixOverrides="and">
85 <if test='domesticLisenceNo !="1" and domesticLisenceNo !=null and domesticLisenceNo !=""'> 85 <if test='domesticLisenceNo !="1" and domesticLisenceNo !=null and domesticLisenceNo !=""'>
86 - domestic_lisence_no = #{domesticLisenceNo} 86 + and domestic_lisence_no = #{domesticLisenceNo}
87 </if> 87 </if>
88 <if test='createBy.id !="1" and createBy.id !=null and createBy.id !=""'> 88 <if test='createBy.id !="1" and createBy.id !=null and createBy.id !=""'>
89 - create_by = #{createBy.id} 89 + and create_by = #{createBy.id}
90 </if> 90 </if>
91 - </where> 91 + </trim>
92 <choose> 92 <choose>
93 <when test="page !=null and page.orderBy != null and page.orderBy != ''"> 93 <when test="page !=null and page.orderBy != null and page.orderBy != ''">
94 ORDER BY ${page.orderBy} 94 ORDER BY ${page.orderBy}
@@ -104,10 +104,10 @@ th, td { @@ -104,10 +104,10 @@ th, td {
104 <div class="span6"> 104 <div class="span6">
105 <label class="control-label">车牌号:</label> 105 <label class="control-label">车牌号:</label>
106 <div class="controls"> 106 <div class="controls">
107 - <form:select path="trailerFrameNo" htmlEscape="false" maxlength="64" class="input-xlarge required" id="frameNo" >  
108 - <form:option value="" label="--请选择--" /> 107 + <form:input path="trailerFrameNo" htmlEscape="false" maxlength="64" class="input-xlarge required" id="frameNo" />
  108 + <%-- <form:option value="" label="--请选择--" />
109 <form:options items="${veList}" itemLabel="domesticLisenceNo" itemValue="domesticLisenceNo" htmlEscape="false" /> 109 <form:options items="${veList}" itemLabel="domesticLisenceNo" itemValue="domesticLisenceNo" htmlEscape="false" />
110 - </form:select> 110 + </form:select> --%>
111 <span class="help-inline"><font color="red">*</font></span> 111 <span class="help-inline"><font color="red">*</font></span>
112 <span class="help-inline" id="message" style="color: red"></span> 112 <span class="help-inline" id="message" style="color: red"></span>
113 </div> 113 </div>
@@ -119,16 +119,16 @@ th, td { @@ -119,16 +119,16 @@ th, td {
119 <form:option value="" label="--请选择--" /> 119 <form:option value="" label="--请选择--" />
120 <form:option value="进口提货" label="进口提货" /> 120 <form:option value="进口提货" label="进口提货" />
121 <form:option value="出口送货" label="出口送货" /> 121 <form:option value="出口送货" label="出口送货" />
122 - <form:option value="进口流转" label="进口流转" />  
123 - <form:option value="出口流转" label="出口流转" /> 122 + <form:option value="分拨业务" label="分拨业务" />
  123 + <form:option value="调拨业务" label="调拨业务" />
124 </form:select> 124 </form:select>
  125 + <span class="help-inline"><font color="red">*</font></span>
125 </div> 126 </div>
126 </div> 127 </div>
127 </div> 128 </div>
128 -  
129 </div> 129 </div>
130 </div> 130 </div>
131 - <div class="control-group"> 131 + <%-- <div class="control-group">
132 <div class="row-fluid"> 132 <div class="row-fluid">
133 <div class="span12"> 133 <div class="span12">
134 <div class="span6"> 134 <div class="span6">
@@ -141,28 +141,28 @@ th, td { @@ -141,28 +141,28 @@ th, td {
141 </div> 141 </div>
142 </div> 142 </div>
143 <div class="span6"> 143 <div class="span6">
144 - <%-- <label class="control-label">所在企业代码:</label> 144 + <label class="control-label">所在企业代码:</label>
145 <div class="controls"> 145 <div class="controls">
146 <form:input path="cocode" htmlEscape="false" maxlength="32" 146 <form:input path="cocode" htmlEscape="false" maxlength="32"
147 class="input-xlarge " id="cocode" /> 147 class="input-xlarge " id="cocode" />
148 <span class="help-inline"><font color="red">*</font></span> 148 <span class="help-inline"><font color="red">*</font></span>
149 - </div> --%>  
150 </div> 149 </div>
151 </div> 150 </div>
152 </div> 151 </div>
153 </div> 152 </div>
  153 + </div> --%>
154 <div class="control-group"> 154 <div class="control-group">
155 <div class="row-fluid"> 155 <div class="row-fluid">
156 <div class="span12"> 156 <div class="span12">
157 <div class="span6"> 157 <div class="span6">
158 - <label class="control-label">货代代码</label> 158 + <label class="control-label">运输公司</label>
159 <div class="controls"> 159 <div class="controls">
160 <form:input path="agentno" htmlEscape="false" maxlength="32" 160 <form:input path="agentno" htmlEscape="false" maxlength="32"
161 class="input-xlarge" id="agentno" style="disabled:true"/> 161 class="input-xlarge" id="agentno" style="disabled:true"/>
162 </div> 162 </div>
163 </div> 163 </div>
164 <div class="span6"> 164 <div class="span6">
165 - <label class="control-label">货代名称</label> 165 + <label class="control-label">挂靠单位</label>
166 <div class="controls"> 166 <div class="controls">
167 <form:input path="agentname" htmlEscape="false" maxlength="255" 167 <form:input path="agentname" htmlEscape="false" maxlength="255"
168 class="input-xlarge" id="agentName" /> 168 class="input-xlarge" id="agentName" />
@@ -171,7 +171,7 @@ th, td { @@ -171,7 +171,7 @@ th, td {
171 </div> 171 </div>
172 </div> 172 </div>
173 </div> 173 </div>
174 - <div class="control-group"> 174 + <div class="control-group" style="display:none">
175 <div class="row-fluid"> 175 <div class="row-fluid">
176 <div class="span12"> 176 <div class="span12">
177 <div class="span6"> 177 <div class="span6">
@@ -200,21 +200,21 @@ th, td { @@ -200,21 +200,21 @@ th, td {
200 <form:select path="startport" class="input-xlarge "> 200 <form:select path="startport" class="input-xlarge ">
201 <form:option value="" label="--请选择--" /> 201 <form:option value="" label="--请选择--" />
202 <form:option value="4604" label="4604" /> 202 <form:option value="4604" label="4604" />
203 - <form:option value="4613" label="4613" />  
204 <form:option value="4620" label="4620" /> 203 <form:option value="4620" label="4620" />
205 </form:select> 204 </form:select>
206 - <span class="help-inline"><font color="red">流转业务填写,其他业务可不填写</font></span> 205 + <span class="help-inline"><font color="red">分拨、调拨业务填写</font></span>
207 </div> 206 </div>
208 </div> 207 </div>
209 <div class="span6"> 208 <div class="span6">
210 - <label class="control-label">目的关区代码</label> 209 + <label class="control-label">起始场站</label>
211 <div class="controls"> 210 <div class="controls">
212 - <form:select path="endport" class="input-xlarge "> 211 + <form:select path="startsatation" class="input-xlarge"
  212 + id="st_select">
213 <form:option value="" label="--请选择--" /> 213 <form:option value="" label="--请选择--" />
214 - <form:option value="4604" label="4604" />  
215 - <form:option value="4613" label="4613" />  
216 - <form:option value="4620" label="4620" /> 214 + <form:options items="${yardList}" itemLabel="name"
  215 + itemValue="stationid" htmlEscape="false" />
217 </form:select> 216 </form:select>
  217 + <span class="help-inline"><font color="red">分拨、调拨业务填写</font></span>
218 </div> 218 </div>
219 </div> 219 </div>
220 </div> 220 </div>
@@ -225,25 +225,25 @@ th, td { @@ -225,25 +225,25 @@ th, td {
225 <div class="row-fluid"> 225 <div class="row-fluid">
226 <div class="span12"> 226 <div class="span12">
227 <div class="span6"> 227 <div class="span6">
228 - <label class="control-label">起始场站</label> 228 + <label class="control-label">目的关区代码</label>
229 <div class="controls"> 229 <div class="controls">
230 - <form:select path="startsatation" class="input-xlarge"  
231 - id="st_select"> 230 + <form:select path="endport" class="input-xlarge ">
232 <form:option value="" label="--请选择--" /> 231 <form:option value="" label="--请选择--" />
233 - <form:options items="${yardList}" itemLabel="name"  
234 - itemValue="stationid" htmlEscape="false" /> 232 + <form:option value="4604" label="4604" selected = "selected"/>
  233 + <form:option value="4620" label="4620" />
235 </form:select> 234 </form:select>
236 - <span class="help-inline"><font color="red">流转业务填写,其他业务可不填写</font></span>  
237 </div> 235 </div>
  236 +
238 </div> 237 </div>
239 <div class="span6"> 238 <div class="span6">
240 </label> <label class="control-label">目的场站:</label> 239 </label> <label class="control-label">目的场站:</label>
241 <div class="controls"> 240 <div class="controls">
242 - <form:select path="endstation" class="input-xlarge" id="en_select"> 241 + <form:select path="endstation" class="input-xlarge required" id="en_select">
243 <form:option value="" label="--请选择--" /> 242 <form:option value="" label="--请选择--" />
244 <form:options items="${yardList}" itemLabel="name" 243 <form:options items="${yardList}" itemLabel="name"
245 itemValue="stationid" htmlEscape="false" /> 244 itemValue="stationid" htmlEscape="false" />
246 </form:select> 245 </form:select>
  246 + <span class="help-inline"><font color="red">*</font></span>
247 </div> 247 </div>
248 </div> 248 </div>
249 </div> 249 </div>
@@ -255,11 +255,12 @@ th, td { @@ -255,11 +255,12 @@ th, td {
255 <div class="span6"> 255 <div class="span6">
256 <label class="control-label">目的场站通道/卡口:</label> 256 <label class="control-label">目的场站通道/卡口:</label>
257 <div class="controls"> 257 <div class="controls">
258 - <form:select path="aisle" class="input-xlarge" id="aisle"> 258 + <form:select path="aisle" class="input-xlarge required" id="aisle">
259 <form:option value="" label="--请选择--" /> 259 <form:option value="" label="--请选择--" />
260 <form:options items="${bayonets}" itemLabel="name" 260 <form:options items="${bayonets}" itemLabel="name"
261 itemValue="channel" htmlEscape="false" /> 261 itemValue="channel" htmlEscape="false" />
262 </form:select> 262 </form:select>
  263 + <span class="help-inline"><font color="red">*</font></span>
263 </div> 264 </div>
264 </div> 265 </div>
265 <div class="span6"> 266 <div class="span6">
@@ -289,19 +290,18 @@ th, td { @@ -289,19 +290,18 @@ th, td {
289 <div class="control-group"> 290 <div class="control-group">
290 <label class="control-label">主单列表:</label> 291 <label class="control-label">主单列表:</label>
291 <div class="controls"> 292 <div class="controls">
292 - <form:textarea path="masterList" rows="5" maxlength="1000" 293 + <form:textarea path="masterList" rows="5" maxlength="1000" id="masterList"
293 placeholder="请输入主单号,例如172-12341234,多个单号以“,”(英文)分割" 294 placeholder="请输入主单号,例如172-12341234,多个单号以“,”(英文)分割"
294 class="input-xxlarge textarea" /> 295 class="input-xxlarge textarea" />
295 </div> 296 </div>
296 </div> 297 </div>
297 - <div class="form-actions"> 298 + <div class="form-actions" id="btnAll">
298 <shiro:hasPermission name="land:landBusinesstypeList:edit"> 299 <shiro:hasPermission name="land:landBusinesstypeList:edit">
299 - <input id="btnSubmit" class="btn btn-primary" type="submit"  
300 - value="保 存" />&nbsp; 300 + <input id="btnSubmit" class="btn btn-primary" type="submit" value="保 存" />&nbsp;
301 </shiro:hasPermission> 301 </shiro:hasPermission>
302 - <input id="btnCancel" class="btn" type="button" value="返 回"  
303 - onclick="history.go(-1)" /> 302 + <input id="btnCancel" class="btn" type="button" value="返 回" onclick="history.go(-1)" />
304 </div> 303 </div>
  304 +
305 </form:form> 305 </form:form>
306 <style> 306 <style>
307 </style> 307 </style>
@@ -316,7 +316,13 @@ th, td { @@ -316,7 +316,13 @@ th, td {
316 } 316 }
317 }); 317 });
318 }) 318 })
319 - $("#frameNo").change(function(){ 319 + $("#masterList").blur(function(){
  320 + var masterList = $("#masterList").val();
  321 + if(masterList.indexOf(",")!=-1){
  322 + $("#masterList").val(masterList.replace(/,/g,","));
  323 + }
  324 + })
  325 + $("#frameNo").blur(function(){
320 var frameNo = $("#frameNo").val(); 326 var frameNo = $("#frameNo").val();
321 if(frameNo !=null && frameNo !="" ){ 327 if(frameNo !=null && frameNo !="" ){
322 $.ajax({ 328 $.ajax({
@@ -332,6 +338,10 @@ th, td { @@ -332,6 +338,10 @@ th, td {
332 $("#agentno").val(data.list[0].coCode) 338 $("#agentno").val(data.list[0].coCode)
333 $("#driverid").val(data.list[0].veOwnerNo) 339 $("#driverid").val(data.list[0].veOwnerNo)
334 $("#drivername").val(data.list[0].veOwnerName) 340 $("#drivername").val(data.list[0].veOwnerName)
  341 + if(str.indexOf("已存在进出场")!=-1){
  342 + $("#btnAll").css("display","none");
  343 + }
  344 +
335 } 345 }
336 if(data.list ==undefined){ 346 if(data.list ==undefined){
337 $("#agentName").val(""); 347 $("#agentName").val("");
@@ -339,6 +349,12 @@ th, td { @@ -339,6 +349,12 @@ th, td {
339 $("#driverid").val(""); 349 $("#driverid").val("");
340 $("#drivername").val(""); 350 $("#drivername").val("");
341 } 351 }
  352 + if(str.indexOf("车辆未备案")!=-1){
  353 + $("#btnAll").css("display","none");
  354 + }
  355 + if(str.indexOf("正常")!=-1){
  356 + $("#btnAll").css("display","block");
  357 + }
342 $("#message").html(str); 358 $("#message").html(str);
343 }, 359 },
344 error:function(data){ 360 error:function(data){
@@ -375,7 +391,7 @@ th, td { @@ -375,7 +391,7 @@ th, td {
375 391
376 </script> 392 </script>
377 <script type="text/javascript"> 393 <script type="text/javascript">
378 - $("#putMaster").blur(function(){ 394 + /* $("#putMaster").blur(function(){
379 var master = $("#putMaster").val(); 395 var master = $("#putMaster").val();
380 var str = parseInt(master.substring(4,11)); 396 var str = parseInt(master.substring(4,11));
381 var endStr = parseInt(master.substring(11)); 397 var endStr = parseInt(master.substring(11));
@@ -384,14 +400,30 @@ th, td { @@ -384,14 +400,30 @@ th, td {
384 $("#error_p").html("输入主单号不符合模七校验"); 400 $("#error_p").html("输入主单号不符合模七校验");
385 //$("#putMaster").val(" "); 401 //$("#putMaster").val(" ");
386 } 402 }
387 - }) 403 + }) */
388 $("#select").click(function(){ 404 $("#select").click(function(){
389 var masterNum = $("#putMaster").val(); 405 var masterNum = $("#putMaster").val();
390 var ieType=$("#ieType").val(); 406 var ieType=$("#ieType").val();
  407 + if(masterNum.length<1 || ieType.length<1){
  408 + return false;
  409 + }
391 410
392 - if(ieType=="进口提货" | ieType=="进口流转" ){ 411 + if(masterNum.indexOf("-")==-1){
  412 + masterNum = masterNum.substr(0,3)+"-"+masterNum.substr(3);
  413 + }
  414 +
  415 + var str = parseInt(masterNum.substring(4,11));
  416 + var endStr = parseInt(masterNum.substring(11));
  417 + if(str%7 != endStr){
  418 + $(".error_div").css("display","block");
  419 + $("#error_p").html("输入主单号不符合模七校验");
  420 + //$("#putMaster").val(" ");
  421 + return false;
  422 + }
  423 +
  424 + if(ieType=="进口提货" | ieType=="分拨业务" ){
393 ieType="I"; 425 ieType="I";
394 - }else if(ieType=="出口送货" | ieType=="出口流转"){ 426 + }else if(ieType=="出口送货" | ieType=="调拨业务"){
395 ieType="E"; 427 ieType="E";
396 } 428 }
397 var url = "http://tjfx.15miaoo.com:8003/tj/orig/orig"; 429 var url = "http://tjfx.15miaoo.com:8003/tj/orig/orig";
@@ -406,29 +438,40 @@ th, td { @@ -406,29 +438,40 @@ th, td {
406 var flightNo = ""; 438 var flightNo = "";
407 var flightDate = ""; 439 var flightDate = "";
408 var data = JSON.parse(xhr.responseText); 440 var data = JSON.parse(xhr.responseText);
  441 + for(var i = 0;i<data.length;i++ ){
  442 + console.log(data[i])
  443 + console.log()
  444 + if(data[i].receiptinformation!=undefined){
  445 + if(data[i].receiptinformation.indexOf("41301")!=-1 || data[i].receiptinformation.indexOf("41106")!=-1 ||
  446 + data[i].receiptinformation.indexOf("31301")!=-1 || data[i].receiptinformation.indexOf("31106")!=-1 ||
  447 + data[i].receiptinformation.indexOf("提运单放行")!=-1 ){
409 if(ieType=="I"){ 448 if(ieType=="I"){
410 - flightNo = data[0].flightno;  
411 - flightDate = timeFormat(data[0].flightDate).substring(0,10); 449 + flightNo = data[i].flightno;
  450 + flightDate = timeFormat(data[i].flightDate).substring(0,10);
412 }else{ 451 }else{
413 - flightNo = data[0].carrier+data[0].flightno  
414 - flightDate = timeFormat(data[0].flightdate).substring(0,10) 452 + flightNo = data[i].carrier+data[i].flightno
  453 + flightDate = timeFormat(data[i].flightdate).substring(0,10)
415 } 454 }
416 $("#tableInfo").children("tr").remove(); 455 $("#tableInfo").children("tr").remove();
417 var str = '<tr>'+ 456 var str = '<tr>'+
418 '<td><button class="btn btn-primary" onclick="addData(this);">添加</button></td>'+ 457 '<td><button class="btn btn-primary" onclick="addData(this);">添加</button></td>'+
419 '<td>'+flightNo+'</td>'+ 458 '<td>'+flightNo+'</td>'+
420 '<td>'+flightDate+'</td>'+ 459 '<td>'+flightDate+'</td>'+
421 - '<td>'+data[0].originatingstation+"-"+data[0].destinationstation+'</td>'+  
422 - '<td>'+data[0].waybillnomaster+'</td>'+  
423 - '<td>'+data[0].totalpiece +'</td>'+  
424 - '<td>'+data[0].totalweight +'</td>'+  
425 - '<td>'+data[0].customscode+'</td>'+  
426 - '<td>'+timeFormat(data[0].createdate) +'</td>'+  
427 - '<td>'+data[0].receiptinformation +'</td>'+ 460 + '<td>'+data[i].originatingstation+"-"+data[0].destinationstation+'</td>'+
  461 + '<td>'+data[i].waybillnomaster+'</td>'+
  462 + '<td>'+data[i].totalpiece +'</td>'+
  463 + '<td>'+data[i].totalweight +'</td>'+
  464 + '<td>'+data[i].customscode+'</td>'+
  465 + '<td>'+timeFormat(data[i].createdate) +'</td>'+
  466 + '<td>'+data[i].receiptinformation +'</td>'+
428 '</tr>'; 467 '</tr>';
429 $("#tableInfo").append(str); 468 $("#tableInfo").append(str);
430 } 469 }
431 } 470 }
  471 +
  472 + }
  473 + }
  474 + }
432 } 475 }
433 }) 476 })
434 477
@@ -14,6 +14,29 @@ @@ -14,6 +14,29 @@
14 $("#searchForm").submit(); 14 $("#searchForm").submit();
15 return false; 15 return false;
16 } 16 }
  17 + function change(){
  18 + var st_select = $("#station").val();
  19 + $.ajax({
  20 + type:"post",
  21 + url:"${ctx}/land/landBusinesstypeList/option",
  22 + data:{st_select,st_select},
  23 + dataType:"json",
  24 + success:function(data){
  25 + $("#aisle").val("");
  26 + $("#aisle").empty();
  27 + for(var i=0;i<data.list.length;i++){
  28 + var option = document.createElement("option");
  29 + $(option).val(data.list[i].channel);
  30 + $(option).text(data.list[i].name);
  31 + $("#aisle").append(option);
  32 + }
  33 + },
  34 + error:function(data){
  35 + $(".error_div").css("display","block");
  36 + $("#error_p").html(data);
  37 + }
  38 + })
  39 + }
17 </script> 40 </script>
18 </head> 41 </head>
19 <body> 42 <body>
@@ -28,7 +51,29 @@ @@ -28,7 +51,29 @@
28 <ul class="ul-form"> 51 <ul class="ul-form">
29 <li> 52 <li>
30 <label>车牌号:</label> 53 <label>车牌号:</label>
31 - <form:input path="trailerFrameNo" htmlEscape="false" maxlength="32" class="input-medium"/> 54 + <form:input path="trailerFrameNo" htmlEscape="false" maxlength="10" class="input-small"/>
  55 +
  56 + <label>挂靠名称:</label>
  57 + <form:input path="agentname" htmlEscape="false" maxlength="32" class="input-small"/>
  58 +
  59 + <label>目的场站:</label>
  60 + <form:select path="endstation" class="input" id="station" onchange="change()">
  61 + <form:option value="" label="--请选择--" />
  62 + <form:options items="${yardList}" itemLabel="name" itemValue="stationid" htmlEscape="false" />
  63 + </form:select>
  64 +
  65 + <label>卡口:</label>
  66 + <form:select path="aisle" class="input" id="aisle">
  67 + <form:option value="" label="--请选择--" />
  68 + </form:select>
  69 +
  70 + <label>是否出站</label>
  71 + <form:select path="contrastflag" class="input">
  72 + <form:option value="" label="--请选择--" />
  73 + <form:option value="已进站" label="已进站" />
  74 + <form:option value="已出站" label="已出站" />
  75 + </form:select>
  76 +
32 </li> 77 </li>
33 <li class="btns"><input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/></li> 78 <li class="btns"><input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/></li>
34 <li class="clearfix"></li> 79 <li class="clearfix"></li>
@@ -38,14 +83,18 @@ @@ -38,14 +83,18 @@
38 <table id="contentTable" class="table table-striped table-bordered table-condensed"> 83 <table id="contentTable" class="table table-striped table-bordered table-condensed">
39 <thead> 84 <thead>
40 <tr> 85 <tr>
  86 + <shiro:hasRole name="dept">
  87 + <th>操作</th>
  88 + </shiro:hasRole>
41 <th>车牌号</th> 89 <th>车牌号</th>
42 - <th>货代名称</th>  
43 - <th>起始海关代码</th>  
44 - <th>起始关区</th> 90 + <th>挂靠单位</th>
45 <th>目的海关代码</th> 91 <th>目的海关代码</th>
46 <th>目的关区</th> 92 <th>目的关区</th>
47 <th>卡口</th> 93 <th>卡口</th>
  94 + <th>地磅称重</th>
  95 + <th>总货重</th>
48 <th>业务类型</th> 96 <th>业务类型</th>
  97 + <th>二维码编号</th>
49 <th>进出场站</th> 98 <th>进出场站</th>
50 <th>已进已出</th> 99 <th>已进已出</th>
51 <th>更新时间</th> 100 <th>更新时间</th>
@@ -55,36 +104,33 @@ @@ -55,36 +104,33 @@
55 <tbody> 104 <tbody>
56 <c:forEach items="${page.list}" var="landBusinesstypeList"> 105 <c:forEach items="${page.list}" var="landBusinesstypeList">
57 <tr> 106 <tr>
  107 + <shiro:hasRole name="dept">
58 <td> 108 <td>
59 - <a href="${ctx}/land/landBusinesstypeList/form?id=${landBusinesstypeList.id}">  
60 - ${landBusinesstypeList.trailerFrameNo}  
61 - </a> 109 + <a href="${ctx}/land/landBusinesstypeList/form?id=${landBusinesstypeList.id}">查看</a>
62 </td> 110 </td>
  111 + </shiro:hasRole>
  112 + <td>${landBusinesstypeList.trailerFrameNo}</td>
63 <td>${landBusinesstypeList.agentname}</td> 113 <td>${landBusinesstypeList.agentname}</td>
64 - <td>${landBusinesstypeList.startport}</td>  
65 - <td>  
66 - <c:if test='${landBusinesstypeList.startsatation =="4604000000"}'>西货站</c:if>  
67 - <c:if test='${landBusinesstypeList.startsatation =="4604499001"}'>军投货站</c:if>  
68 - <c:if test='${landBusinesstypeList.startsatation =="4604511001"}'>快邮站</c:if>  
69 - </td>  
70 -  
71 <td>${landBusinesstypeList.endport}</td> 114 <td>${landBusinesstypeList.endport}</td>
72 <td> 115 <td>
73 <c:if test='${landBusinesstypeList.endstation =="4604000000"}'>西货站</c:if> 116 <c:if test='${landBusinesstypeList.endstation =="4604000000"}'>西货站</c:if>
74 - <c:if test='${landBusinesstypeList.endstation =="4604499001"}'>军投货站</c:if>  
75 - <c:if test='${landBusinesstypeList.endstation =="4604511001"}'>快邮站</c:if> 117 + <c:if test='${landBusinesstypeList.endstation =="4604499001"}'>三号货站</c:if>
  118 + <c:if test='${landBusinesstypeList.endstation =="4604511001"}'>快邮货站</c:if>
76 </td> 119 </td>
77 <td> 120 <td>
78 <c:if test="${landBusinesstypeList.aisle =='4604333311'}">1号卡口-进</c:if> 121 <c:if test="${landBusinesstypeList.aisle =='4604333311'}">1号卡口-进</c:if>
79 <c:if test="${landBusinesstypeList.aisle =='4604111111'}">1号卡口-进</c:if> 122 <c:if test="${landBusinesstypeList.aisle =='4604111111'}">1号卡口-进</c:if>
80 <c:if test="${landBusinesstypeList.aisle =='4604444411'}">1号卡口-进</c:if> 123 <c:if test="${landBusinesstypeList.aisle =='4604444411'}">1号卡口-进</c:if>
81 - <c:if test="${landBusinesstypeList.aisle =='4604333321'}">2号卡口-进</c:if>  
82 <c:if test="${landBusinesstypeList.aisle =='4604333312'}">1号卡口-出</c:if> 124 <c:if test="${landBusinesstypeList.aisle =='4604333312'}">1号卡口-出</c:if>
83 <c:if test="${landBusinesstypeList.aisle =='4604444412'}">1号卡口-出</c:if> 125 <c:if test="${landBusinesstypeList.aisle =='4604444412'}">1号卡口-出</c:if>
84 <c:if test="${landBusinesstypeList.aisle =='4604110112'}">1号卡口-出</c:if> 126 <c:if test="${landBusinesstypeList.aisle =='4604110112'}">1号卡口-出</c:if>
85 - <c:if test="${landBusinesstypeList.aisle =='4604333322'}">2号卡口-出</c:if> 127 + <c:if test="${landBusinesstypeList.aisle =='4604333321'}">暂不启用</c:if>
  128 + <c:if test="${landBusinesstypeList.aisle =='4604333322'}">暂不启用</c:if>
86 </td> 129 </td>
  130 + <td>${landBusinesstypeList.aislewt}</td>
  131 + <td>${landBusinesstypeList.remark}</td>
87 <td>${landBusinesstypeList.businesstype}</td> 132 <td>${landBusinesstypeList.businesstype}</td>
  133 + <td>${landBusinesstypeList.barcode}</td>
88 <td> 134 <td>
89 <c:if test="${landBusinesstypeList.turnoverflag =='E'}">出场站</c:if> 135 <c:if test="${landBusinesstypeList.turnoverflag =='E'}">出场站</c:if>
90 <c:if test="${landBusinesstypeList.turnoverflag =='I'}">进场站</c:if> 136 <c:if test="${landBusinesstypeList.turnoverflag =='I'}">进场站</c:if>
@@ -84,7 +84,15 @@ input { @@ -84,7 +84,15 @@ input {
84 class="input-large" id="mainPort" value="4604"/> 84 class="input-large" id="mainPort" value="4604"/>
85 <span class="help-inline"><font color="red">*</font></span> 85 <span class="help-inline"><font color="red">*</font></span>
86 </div> 86 </div>
87 - <label class="row-lable">海关货代备案代码:</label> 87 + </div>
  88 + <div class="control-group">
  89 + <label class="row-lable">挂靠单位:</label>
  90 + <span class="row-controls">
  91 + <form:input path="proposer" htmlEscape="false" maxlength="32"
  92 + class="input-large required" />
  93 + <span class="help-inline"><font color="red">*</font></span>
  94 + </span>
  95 + <label class="row-lable">运输公司名称:</label>
88 <div class="row-controls"> 96 <div class="row-controls">
89 <form:input path="coCode" htmlEscape="false" maxlength="20" 97 <form:input path="coCode" htmlEscape="false" maxlength="20"
90 class="input-large required" /> 98 class="input-large required" />
@@ -95,8 +103,8 @@ input { @@ -95,8 +103,8 @@ input {
95 <label class="row-lable">国内车牌:</label> 103 <label class="row-lable">国内车牌:</label>
96 <span class="row-controls"> 104 <span class="row-controls">
97 <form:input path="domesticLisenceNo" htmlEscape="false" 105 <form:input path="domesticLisenceNo" htmlEscape="false"
98 - maxlength="32" class="input-large required" /> <span  
99 - class="help-inline"><font color="red">*</font></span> 106 + maxlength="32" class="input-large required" id ="vename"/> <span
  107 + class="help-inline"><font color="red">*<span id="returnMsg"></span></font></span>
100 </span> 108 </span>
101 <label class="row-lable">车主姓名:</label> 109 <label class="row-lable">车主姓名:</label>
102 <span class="row-controls"> 110 <span class="row-controls">
@@ -106,16 +114,24 @@ input { @@ -106,16 +114,24 @@ input {
106 </span> 114 </span>
107 </div> 115 </div>
108 <div class="control-group"> 116 <div class="control-group">
109 - <label class="row-lable">车主证件号码:</label> <span 117 + <%-- <label class="row-lable">车主证件号码:</label> <span
110 class="row-controls"> <form:input path="veOwnerNo" 118 class="row-controls"> <form:input path="veOwnerNo"
111 htmlEscape="false" maxlength="32" class="input-large required" /> 119 htmlEscape="false" maxlength="32" class="input-large required" />
112 - <span class="help-inline"><font color="red">*</font></span> 120 + <span class="help-inline"><font color="red">*</font></span> --%>
113 </span> <label class="row-lable">车主联系电话:</label> <span 121 </span> <label class="row-lable">车主联系电话:</label> <span
114 class="row-controls"> <form:input path="ownerInsideTel" 122 class="row-controls"> <form:input path="ownerInsideTel"
115 htmlEscape="false" maxlength="32" 123 htmlEscape="false" maxlength="32"
116 class="input-large required" /> <span class="help-inline"><font 124 class="input-large required" /> <span class="help-inline"><font
117 color="red">*</font></span> 125 color="red">*</font></span>
118 </span> 126 </span>
  127 + <label class="row-lable">行驶证有效期:</label>
  128 + <span class="row-controls">
  129 + <input name="VE_FACTORY_DATE" type="text" readonly="readonly"
  130 + maxlength="20" class="input-medium Wdate required"
  131 + value="<fmt:formatDate value="${landRoadVeRecord.proposeTime}" pattern="yyyy-MM-dd HH:mm:ss"/>"
  132 + onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:false});" />
  133 + <span class="help-inline"><font color="red">*</font></span>
  134 + </span>
119 </div> 135 </div>
120 <div class="control-group"> 136 <div class="control-group">
121 <label class="row-lable">自重(空车重量):</label> 137 <label class="row-lable">自重(空车重量):</label>
@@ -130,8 +146,8 @@ input { @@ -130,8 +146,8 @@ input {
130 class="input-large numberCheck" placeholder="货车核载单位为:kg" /> 146 class="input-large numberCheck" placeholder="货车核载单位为:kg" />
131 </span> 147 </span>
132 </div> 148 </div>
133 - <div class="control-group">  
134 - <label class="row-lable">货代名称:</label> 149 +<%-- <div class="control-group">
  150 + <%-- <label class="row-lable">货代名称:</label>
135 <span class="row-controls"> 151 <span class="row-controls">
136 <form:input path="proposer" htmlEscape="false" maxlength="32" 152 <form:input path="proposer" htmlEscape="false" maxlength="32"
137 class="input-large required" /> 153 class="input-large required" />
@@ -139,13 +155,13 @@ input { @@ -139,13 +155,13 @@ input {
139 </span> 155 </span>
140 <label class="row-lable">申请时间:</label> 156 <label class="row-lable">申请时间:</label>
141 <span class="row-controls"> 157 <span class="row-controls">
142 - <input name="proposeTime" type="text" readonly="readonly" 158 + <input name="VE_FACTORY_DATE" type="text" readonly="readonly"
143 maxlength="20" class="input-medium Wdate required" 159 maxlength="20" class="input-medium Wdate required"
144 value="<fmt:formatDate value="${landRoadVeRecord.proposeTime}" pattern="yyyy-MM-dd HH:mm:ss"/>" 160 value="<fmt:formatDate value="${landRoadVeRecord.proposeTime}" pattern="yyyy-MM-dd HH:mm:ss"/>"
145 onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:false});" /> 161 onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:false});" />
146 <span class="help-inline"><font color="red">*</font></span> 162 <span class="help-inline"><font color="red">*</font></span>
147 </span> 163 </span>
148 - </div> 164 + </div> --%>
149 <div class="control-group"> 165 <div class="control-group">
150 <label class="row-lable">挂车牌号:</label> 166 <label class="row-lable">挂车牌号:</label>
151 <span class="row-controls"> 167 <span class="row-controls">
@@ -165,12 +181,38 @@ input { @@ -165,12 +181,38 @@ input {
165 maxlength="512" class="input-xxlarge" /> 181 maxlength="512" class="input-xxlarge" />
166 </span> 182 </span>
167 </div> 183 </div>
168 - <div class="form-actions"> 184 + <div class="form-actions" id="btnAll">
169 <shiro:hasPermission name="land:landRoadVeRecord:edit"> 185 <shiro:hasPermission name="land:landRoadVeRecord:edit">
170 <input id="btnSubmit" class="btn btn-primary" type="submit" value="保 存" />&nbsp; 186 <input id="btnSubmit" class="btn btn-primary" type="submit" value="保 存" />&nbsp;
171 </shiro:hasPermission> 187 </shiro:hasPermission>
172 <input id="btnCancel" class="btn" type="button" value="返 回" onclick="history.go(-1)" /> 188 <input id="btnCancel" class="btn" type="button" value="返 回" onclick="history.go(-1)" />
173 </div> 189 </div>
174 </form:form> 190 </form:form>
  191 + <script type="text/javascript">
  192 + $("#vename").on("blur",function(){
  193 + var veName = $("#vename").val();
  194 + if(veName.length>0){
  195 + $.ajax({
  196 + type:"post",
  197 + url:"${ctx}/land/landRoadVeRecord/selectByVeName",
  198 + data:{veName:veName},
  199 + dataType:"json",
  200 + success:function(data){
  201 + if(data.count===1){
  202 + $("#returnMsg").html("车辆已备案");
  203 + $("#btnAll").css("display","none");
  204 + }else{
  205 + $("#returnMsg").html("");
  206 + }
  207 +
  208 + },
  209 + error:function(data){
  210 + console.log(data)
  211 + }
  212 + })
  213 + }
  214 + })
  215 +</script>
175 </body> 216 </body>
  217 +
176 </html> 218 </html>
@@ -37,15 +37,15 @@ @@ -37,15 +37,15 @@
37 <table id="contentTable" class="table table-striped table-bordered table-condensed"> 37 <table id="contentTable" class="table table-striped table-bordered table-condensed">
38 <thead> 38 <thead>
39 <tr> 39 <tr>
40 - <th>企业代码</th> 40 + <th>运输公司名称</th>
  41 + <th>挂靠单位</th>
41 <th>国内车牌</th> 42 <th>国内车牌</th>
42 <th>车主姓名</th> 43 <th>车主姓名</th>
43 - <th>车主证件号</th>  
44 - <th>批准车辆进出口岸</th>  
45 - <th>车辆类型</th> 44 + <th>车主联系方式</th>
  45 + <th>本地关代码</th>
46 <th>自重</th> 46 <th>自重</th>
47 - <th>最大牵引重量</th>  
48 - <th>车辆分类</th> 47 + <th>载重</th>
  48 + <th>备案结果</th>
49 <th>更新时间</th> 49 <th>更新时间</th>
50 <shiro:hasPermission name="land:landRoadVeRecord:edit"><th>操作</th></shiro:hasPermission> 50 <shiro:hasPermission name="land:landRoadVeRecord:edit"><th>操作</th></shiro:hasPermission>
51 </tr> 51 </tr>
@@ -54,21 +54,22 @@ @@ -54,21 +54,22 @@
54 <c:forEach items="${page.list}" var="landRoadVeRecord"> 54 <c:forEach items="${page.list}" var="landRoadVeRecord">
55 <tr> 55 <tr>
56 <td>${landRoadVeRecord.coCode }</td> 56 <td>${landRoadVeRecord.coCode }</td>
  57 + <td>${landRoadVeRecord.proposer }</td>
57 <td>${landRoadVeRecord.domesticLisenceNo }</td> 58 <td>${landRoadVeRecord.domesticLisenceNo }</td>
58 <td>${landRoadVeRecord.veOwnerName }</td> 59 <td>${landRoadVeRecord.veOwnerName }</td>
59 - <td>${landRoadVeRecord.veOwnerNo }</td>  
60 - <td>${landRoadVeRecord.allowVeIePort }</td>  
61 - <td>${landRoadVeRecord.veType }</td> 60 + <td>${landRoadVeRecord.ownerInsideTel }</td>
  61 + <td>${landRoadVeRecord.mainPort }</td>
62 <td>${landRoadVeRecord.selfWt }</td> 62 <td>${landRoadVeRecord.selfWt }</td>
63 - <td>${landRoadVeRecord.allowTowTotalWt }</td>  
64 - <td>${landRoadVeRecord.veClassFlag }</td> 63 + <td>${landRoadVeRecord.veTon }</td>
65 <td>${landRoadVeRecord.returnmessage }</td> 64 <td>${landRoadVeRecord.returnmessage }</td>
66 <td><a href="${ctx}/land/landRoadVeRecord/form?id=${landRoadVeRecord.id}"> 65 <td><a href="${ctx}/land/landRoadVeRecord/form?id=${landRoadVeRecord.id}">
67 <fmt:formatDate value="${landRoadVeRecord.updateDate}" pattern="yyyy-MM-dd HH:mm:ss"/> 66 <fmt:formatDate value="${landRoadVeRecord.updateDate}" pattern="yyyy-MM-dd HH:mm:ss"/>
68 </a></td> 67 </a></td>
69 <shiro:hasPermission name="land:landRoadVeRecord:edit"><td> 68 <shiro:hasPermission name="land:landRoadVeRecord:edit"><td>
70 <a href="${ctx}/land/landRoadVeRecord/form?id=${landRoadVeRecord.id}">修改</a> 69 <a href="${ctx}/land/landRoadVeRecord/form?id=${landRoadVeRecord.id}">修改</a>
  70 + <shiro:hasRole name="dept">
71 <a href="${ctx}/land/landRoadVeRecord/delete?id=${landRoadVeRecord.id}" onclick="return confirmx('确认要删除该备案吗?', this.href)">删除</a> 71 <a href="${ctx}/land/landRoadVeRecord/delete?id=${landRoadVeRecord.id}" onclick="return confirmx('确认要删除该备案吗?', this.href)">删除</a>
  72 + </shiro:hasRole>
72 </td></shiro:hasPermission> 73 </td></shiro:hasPermission>
73 </tr> 74 </tr>
74 </c:forEach> 75 </c:forEach>