正在显示
20 个修改的文件
包含
431 行增加
和
124 行删除
@@ -6,6 +6,7 @@ package com.thinkgem.jeesite.modules.land.dao; | @@ -6,6 +6,7 @@ package com.thinkgem.jeesite.modules.land.dao; | ||
6 | import java.util.List; | 6 | import java.util.List; |
7 | 7 | ||
8 | import org.apache.ibatis.annotations.Param; | 8 | import org.apache.ibatis.annotations.Param; |
9 | +import org.springframework.security.access.method.P; | ||
9 | 10 | ||
10 | import com.thinkgem.jeesite.common.persistence.CrudDao; | 11 | import com.thinkgem.jeesite.common.persistence.CrudDao; |
11 | import com.thinkgem.jeesite.common.persistence.annotation.MyBatisDao; | 12 | import com.thinkgem.jeesite.common.persistence.annotation.MyBatisDao; |
@@ -33,4 +34,6 @@ public interface LandBusinesstypeListDao extends CrudDao<LandBusinesstypeList> { | @@ -33,4 +34,6 @@ public interface LandBusinesstypeListDao extends CrudDao<LandBusinesstypeList> { | ||
33 | 34 | ||
34 | int deleteByMessageId(LandBusinesstypeList landBusinesstypeList); | 35 | int deleteByMessageId(LandBusinesstypeList landBusinesstypeList); |
35 | 36 | ||
37 | + List<LandBusinesstypeList> findByIsValid(@Param("trailerFrameNo")String frameNo, @Param("isvalid")String isValid); | ||
38 | + | ||
36 | } | 39 | } |
@@ -19,7 +19,7 @@ public class LandBusinesstypeList extends DataEntity<LandBusinesstypeList> { | @@ -19,7 +19,7 @@ public class LandBusinesstypeList extends DataEntity<LandBusinesstypeList> { | ||
19 | private static final long serialVersionUID = 1L; | 19 | private static final long serialVersionUID = 1L; |
20 | private String massageId; // 主键 | 20 | private String massageId; // 主键 |
21 | private String trailerFrameNo; // 车牌号 | 21 | private String trailerFrameNo; // 车牌号 |
22 | - private String trailerLicenseNo; // 车架号 | 22 | + private String trailerLicenseNo; // 暂用 备案单位 |
23 | private String masterList; // 主单列表 | 23 | private String masterList; // 主单列表 |
24 | private Date prodectTime; // 申请时间 | 24 | private Date prodectTime; // 申请时间 |
25 | private String agentno; // 货代代码 | 25 | private String agentno; // 货代代码 |
@@ -20,12 +20,12 @@ public class LandRoadVeRecord extends DataEntity<LandRoadVeRecord> { | @@ -20,12 +20,12 @@ public class LandRoadVeRecord extends DataEntity<LandRoadVeRecord> { | ||
20 | private String eportId; // 电子口岸录入号ID(电子口岸与海关数据传输使用,企业无需填写) | 20 | private String eportId; // 电子口岸录入号ID(电子口岸与海关数据传输使用,企业无需填写) |
21 | private String mainPort; // 主管海关代码 | 21 | private String mainPort; // 主管海关代码 |
22 | private String coCode; // 企业代码 | 22 | private String coCode; // 企业代码 |
23 | - private String veTargetNo; // 车牌指标编码 | 23 | + private String veTargetNo; // 暂用 备案单位 |
24 | private String domesticLisenceNo; // 国内车牌 | 24 | private String domesticLisenceNo; // 国内车牌 |
25 | private String domesticLicenseColor; // 车牌颜色 | 25 | private String domesticLicenseColor; // 车牌颜色 |
26 | private String foreignLicense; // 外籍车牌 | 26 | private String foreignLicense; // 外籍车牌 |
27 | private String veRegPlace; // 注册地址 | 27 | private String veRegPlace; // 注册地址 |
28 | - private String veProperty; // 使用性质 | 28 | + private String veProperty; // 暂用 流转申请单位 |
29 | private String veConveyQua; // 车辆运输资格 | 29 | private String veConveyQua; // 车辆运输资格 |
30 | private String veCardNo; // 车辆行驶证编号 | 30 | private String veCardNo; // 车辆行驶证编号 |
31 | private String veOwnerName; // 车辆登记车主名称 | 31 | private String veOwnerName; // 车辆登记车主名称 |
@@ -60,6 +60,7 @@ public class LandRoadVeRecord extends DataEntity<LandRoadVeRecord> { | @@ -60,6 +60,7 @@ public class LandRoadVeRecord extends DataEntity<LandRoadVeRecord> { | ||
60 | private String veBottomPic; // 车底照片 | 60 | private String veBottomPic; // 车底照片 |
61 | private String memo; // 备注 | 61 | private String memo; // 备注 |
62 | private String proposer; // 申请人 | 62 | private String proposer; // 申请人 |
63 | + @JsonFormat(timezone="GMT+8") | ||
63 | private Date proposeTime; // 申请时间 | 64 | private Date proposeTime; // 申请时间 |
64 | private String veClassFlag; // 车辆分类 | 65 | private String veClassFlag; // 车辆分类 |
65 | private String operationType; // 删除标识 | 66 | private String operationType; // 删除标识 |
@@ -82,4 +82,9 @@ public class LandBusinesstypeListService extends CrudService<LandBusinesstypeLis | @@ -82,4 +82,9 @@ public class LandBusinesstypeListService extends CrudService<LandBusinesstypeLis | ||
82 | public int deleteByMessageId(LandBusinesstypeList landBusinesstypeList) { | 82 | public int deleteByMessageId(LandBusinesstypeList landBusinesstypeList) { |
83 | return dao.deleteByMessageId(landBusinesstypeList); | 83 | return dao.deleteByMessageId(landBusinesstypeList); |
84 | } | 84 | } |
85 | + | ||
86 | + @Transactional(readOnly = false) | ||
87 | + public List<LandBusinesstypeList> findByIsValid(String frameNo,String isValid){ | ||
88 | + return dao.findByIsValid(frameNo,isValid); | ||
89 | + } | ||
85 | } | 90 | } |
@@ -53,5 +53,10 @@ public class LandRoadVeRecordService extends CrudService<LandRoadVeRecordDao, La | @@ -53,5 +53,10 @@ public class LandRoadVeRecordService extends CrudService<LandRoadVeRecordDao, La | ||
53 | return dao.selectByFrameNo(domesticLisenceNo); | 53 | return dao.selectByFrameNo(domesticLisenceNo); |
54 | } | 54 | } |
55 | 55 | ||
56 | + /*@Transactional(readOnly = false) | ||
57 | + public List<LandRoadVeRecord> selectById(String domesticLisenceNo) { | ||
58 | + return dao.selectByFrameNo(domesticLisenceNo); | ||
59 | + }*/ | ||
60 | + | ||
56 | 61 | ||
57 | } | 62 | } |
@@ -4,6 +4,7 @@ | @@ -4,6 +4,7 @@ | ||
4 | package com.thinkgem.jeesite.modules.land.web; | 4 | package com.thinkgem.jeesite.modules.land.web; |
5 | 5 | ||
6 | import java.text.SimpleDateFormat; | 6 | import java.text.SimpleDateFormat; |
7 | +import java.util.ArrayList; | ||
7 | import java.util.Date; | 8 | import java.util.Date; |
8 | import java.util.List; | 9 | import java.util.List; |
9 | import java.util.Random; | 10 | import java.util.Random; |
@@ -33,8 +34,11 @@ import com.thinkgem.jeesite.modules.land.entity.VehicleMainifist; | @@ -33,8 +34,11 @@ import com.thinkgem.jeesite.modules.land.entity.VehicleMainifist; | ||
33 | import com.thinkgem.jeesite.modules.land.service.LandBusinesstypeListService; | 34 | import com.thinkgem.jeesite.modules.land.service.LandBusinesstypeListService; |
34 | import com.thinkgem.jeesite.modules.land.service.LandRoadVeRecordService; | 35 | import com.thinkgem.jeesite.modules.land.service.LandRoadVeRecordService; |
35 | import com.thinkgem.jeesite.modules.land.service.VehicleMainifistService; | 36 | import com.thinkgem.jeesite.modules.land.service.VehicleMainifistService; |
37 | +import com.thinkgem.jeesite.modules.sys.entity.Office; | ||
38 | +import com.thinkgem.jeesite.modules.sys.entity.Role; | ||
36 | import com.thinkgem.jeesite.modules.sys.entity.User; | 39 | import com.thinkgem.jeesite.modules.sys.entity.User; |
37 | import com.thinkgem.jeesite.modules.sys.security.SystemAuthorizingRealm.Principal; | 40 | import com.thinkgem.jeesite.modules.sys.security.SystemAuthorizingRealm.Principal; |
41 | +import com.thinkgem.jeesite.modules.sys.service.OfficeService; | ||
38 | import com.thinkgem.jeesite.modules.sys.service.SystemService; | 42 | import com.thinkgem.jeesite.modules.sys.service.SystemService; |
39 | import com.thinkgem.jeesite.modules.sys.utils.UserUtils; | 43 | import com.thinkgem.jeesite.modules.sys.utils.UserUtils; |
40 | import com.thinkgem.jeesite.modules.yard.entity.Bayonet; | 44 | import com.thinkgem.jeesite.modules.yard.entity.Bayonet; |
@@ -69,6 +73,9 @@ public class LandBusinesstypeListController extends BaseController { | @@ -69,6 +73,9 @@ public class LandBusinesstypeListController extends BaseController { | ||
69 | 73 | ||
70 | @Autowired | 74 | @Autowired |
71 | private SystemService systemService; | 75 | private SystemService systemService; |
76 | + | ||
77 | + @Autowired | ||
78 | + private OfficeService officeService; | ||
72 | 79 | ||
73 | private static final String TYPE1 = "调拨业务"; | 80 | private static final String TYPE1 = "调拨业务"; |
74 | private static final String TYPE2 = "进口提货"; | 81 | private static final String TYPE2 = "进口提货"; |
@@ -94,11 +101,30 @@ public class LandBusinesstypeListController extends BaseController { | @@ -94,11 +101,30 @@ public class LandBusinesstypeListController extends BaseController { | ||
94 | Principal principal = UserUtils.getPrincipal(); | 101 | Principal principal = UserUtils.getPrincipal(); |
95 | String loginName = principal.getLoginName(); | 102 | String loginName = principal.getLoginName(); |
96 | User user = systemService.getUserByLoginName(loginName); | 103 | User user = systemService.getUserByLoginName(loginName); |
97 | - landBusinesstypeList.setCreateBy(user); | ||
98 | Yard yard = new Yard(); | 104 | Yard yard = new Yard(); |
99 | List<Yard> yardList = yardService.findList(yard); | 105 | List<Yard> yardList = yardService.findList(yard); |
100 | - Page<LandBusinesstypeList> page = landBusinesstypeListService | ||
101 | - .findPage(new Page<LandBusinesstypeList>(request, response), landBusinesstypeList); | 106 | + List<LandBusinesstypeList> lists = new ArrayList<LandBusinesstypeList>(); |
107 | + Page<LandBusinesstypeList> page = null; | ||
108 | + if ("2".equals(user.getUserType())) { | ||
109 | + Office office = officeService.get(user.getOffice()); | ||
110 | + List<User> u = systemService.findByOfficeId(office.getId()); | ||
111 | + for (int i = 0; i < u.size(); i++) { | ||
112 | + landBusinesstypeList.setCreateBy(u.get(i)); | ||
113 | + page = landBusinesstypeListService | ||
114 | + .findPage(new Page<LandBusinesstypeList>(request, response), landBusinesstypeList); | ||
115 | + lists.addAll(page.getList()); | ||
116 | + } | ||
117 | + } else { | ||
118 | + Role role = systemService.getByUserId(user.getId()); | ||
119 | + if("admin".equals(role.getEnname())||"leader".equals(role.getEnname())) { | ||
120 | + landBusinesstypeList.setCreateBy(systemService.getUserByLoginName("admin")); | ||
121 | + }else { | ||
122 | + landBusinesstypeList.setCreateBy(user); | ||
123 | + } | ||
124 | + page = landBusinesstypeListService.findPage(new Page<LandBusinesstypeList>(request, response), landBusinesstypeList); | ||
125 | + lists.addAll(page.getList()); | ||
126 | + } | ||
127 | + page.setList(lists); | ||
102 | model.addAttribute("yardList", yardList); | 128 | model.addAttribute("yardList", yardList); |
103 | model.addAttribute("page", page); | 129 | model.addAttribute("page", page); |
104 | return "modules/land/landBusinesstypeListList"; | 130 | return "modules/land/landBusinesstypeListList"; |
@@ -108,30 +134,54 @@ public class LandBusinesstypeListController extends BaseController { | @@ -108,30 +134,54 @@ public class LandBusinesstypeListController extends BaseController { | ||
108 | @RequiresPermissions("land:landBusinesstypeList:view") | 134 | @RequiresPermissions("land:landBusinesstypeList:view") |
109 | @RequestMapping(value = "check") | 135 | @RequestMapping(value = "check") |
110 | @ResponseBody | 136 | @ResponseBody |
111 | - public Page<LandRoadVeRecord> list(String frameNo) throws Exception { | ||
112 | - Page<LandRoadVeRecord> page = new Page<LandRoadVeRecord>(); | 137 | + public Page<LandRoadVeRecord> list(String frameNo, LandBusinesstypeList landBusinesstypeList, |
138 | + HttpServletRequest request, HttpServletResponse response) throws Exception { | ||
139 | + LandRoadVeRecord landRoadVeRecord = new LandRoadVeRecord(); | ||
140 | + landRoadVeRecord.setDomesticLisenceNo(frameNo); | ||
141 | + landRoadVeRecord.setCreateBy(systemService.getUserByLoginName("admin")); | ||
142 | + Page<LandRoadVeRecord> page = roadVeService.findPage(new Page<LandRoadVeRecord>(request, response), | ||
143 | + landRoadVeRecord); | ||
144 | + | ||
113 | List<LandBusinesstypeList> list = landBusinesstypeListService.findByStatus(frameNo); | 145 | List<LandBusinesstypeList> list = landBusinesstypeListService.findByStatus(frameNo); |
114 | - List<LandRoadVeRecord> veList = roadVeService.selectByFrameNo(frameNo); | 146 | + List<LandRoadVeRecord> veList = page.getList(); |
147 | + String userName = null; | ||
115 | if (veList.size() < 1) { | 148 | if (veList.size() < 1) { |
116 | page.setResultMsg("此车辆未备案,请先备案"); | 149 | page.setResultMsg("此车辆未备案,请先备案"); |
117 | } else { | 150 | } else { |
118 | if (list.size() > 0) { | 151 | if (list.size() > 0) { |
152 | + boolean check = false; | ||
119 | for (int i = 0; i < list.size(); i++) { | 153 | for (int i = 0; i < list.size(); i++) { |
120 | - boolean flag = (list.get(i).getContrastflag() == null | ||
121 | - || list.get(i).getContrastflag().length() < 1); | ||
122 | - if ("I".equals(list.get(i).getTurnoverflag()) && flag) { | ||
123 | - page.setResultMsg("此车辆已存在进出场业务,请勿重新申报"); | ||
124 | - } else if ("E".equals(list.get(i).getTurnoverflag()) && flag) { | ||
125 | - page.setResultMsg("此车辆已存在进出场业务,请勿重新申报"); | ||
126 | - } else { | ||
127 | - page.setResultMsg("此车辆可以正常申报业务"); | 154 | + if ("0".equals(list.get(i).getIsvalid())) { |
155 | + User id = list.get(i).getCreateBy(); | ||
156 | + User ue = systemService.getUser(id.toString()); | ||
157 | + userName = ue.getName(); | ||
158 | + boolean flag = (list.get(i).getContrastflag() == null | ||
159 | + || list.get(i).getContrastflag().length() < 1); | ||
160 | + if ("I".equals(list.get(i).getTurnoverflag()) && flag) { | ||
161 | + page.setResultMsg("此车辆已存在进出场业务,请勿重新申报"); | ||
162 | + check = true; | ||
163 | + break; | ||
164 | + } | ||
165 | + if ("E".equals(list.get(i).getTurnoverflag()) && flag) { | ||
166 | + page.setResultMsg("此车辆已存在进出场业务,请勿重新申报"); | ||
167 | + check = true; | ||
168 | + break; | ||
169 | + } | ||
128 | } | 170 | } |
129 | - break; | 171 | + } |
172 | + if (!check) { | ||
173 | + page.setResultMsg("此车辆可以正常申报业务"); | ||
130 | } | 174 | } |
131 | } else { | 175 | } else { |
132 | page.setResultMsg("此车辆可以正常申报业务"); | 176 | page.setResultMsg("此车辆可以正常申报业务"); |
133 | } | 177 | } |
134 | } | 178 | } |
179 | + for (int i = 0; i < veList.size(); i++) { | ||
180 | + User id = veList.get(i).getCreateBy(); | ||
181 | + User ue = systemService.getUser(id.toString()); | ||
182 | + veList.get(i).setVeTargetNo(ue.getName()); | ||
183 | + veList.get(i).setVeProperty(userName); | ||
184 | + } | ||
135 | page.setList(veList); | 185 | page.setList(veList); |
136 | return page; | 186 | return page; |
137 | 187 | ||
@@ -175,6 +225,13 @@ public class LandBusinesstypeListController extends BaseController { | @@ -175,6 +225,13 @@ public class LandBusinesstypeListController extends BaseController { | ||
175 | if (!beanValidator(model, landBusinesstypeList)) { | 225 | if (!beanValidator(model, landBusinesstypeList)) { |
176 | return form(landBusinesstypeList, model); | 226 | return form(landBusinesstypeList, model); |
177 | } | 227 | } |
228 | + if(!(landBusinesstypeList.getIsvalid()!=null)) { | ||
229 | + List<LandBusinesstypeList> lists = landBusinesstypeListService.findByIsValid(landBusinesstypeList.getTrailerFrameNo(), "0"); | ||
230 | + if(lists.size()>0) { | ||
231 | + addMessage(redirectAttributes, "当前车辆已做出入申请,请重新录入"); | ||
232 | + return "redirect:" + Global.getAdminPath() + "/land/landBusinesstypeList/?repage"; | ||
233 | + } | ||
234 | + } | ||
178 | boolean flag = false; | 235 | boolean flag = false; |
179 | landBusinesstypeList.setIsDelete("0"); | 236 | landBusinesstypeList.setIsDelete("0"); |
180 | landBusinesstypeList.setIsvalid("0"); | 237 | landBusinesstypeList.setIsvalid("0"); |
@@ -199,7 +256,7 @@ public class LandBusinesstypeListController extends BaseController { | @@ -199,7 +256,7 @@ public class LandBusinesstypeListController extends BaseController { | ||
199 | } | 256 | } |
200 | } | 257 | } |
201 | } | 258 | } |
202 | - flag=true; | 259 | + flag = true; |
203 | } else { | 260 | } else { |
204 | if (TYPE1.equals(landBusinesstypeList.getBusinesstype())) { | 261 | if (TYPE1.equals(landBusinesstypeList.getBusinesstype())) { |
205 | flag = insertType1(landBusinesstypeList); | 262 | flag = insertType1(landBusinesstypeList); |
@@ -214,12 +271,12 @@ public class LandBusinesstypeListController extends BaseController { | @@ -214,12 +271,12 @@ public class LandBusinesstypeListController extends BaseController { | ||
214 | flag = insertType1(landBusinesstypeList); | 271 | flag = insertType1(landBusinesstypeList); |
215 | } | 272 | } |
216 | } | 273 | } |
217 | - if(flag) { | 274 | + if (flag) { |
218 | addMessage(redirectAttributes, "保存申请单成功"); | 275 | addMessage(redirectAttributes, "保存申请单成功"); |
219 | - }else { | 276 | + } else { |
220 | addMessage(redirectAttributes, "保存申请单失败,请重新录入"); | 277 | addMessage(redirectAttributes, "保存申请单失败,请重新录入"); |
221 | } | 278 | } |
222 | - | 279 | + |
223 | return "redirect:" + Global.getAdminPath() + "/land/landBusinesstypeList/?repage"; | 280 | return "redirect:" + Global.getAdminPath() + "/land/landBusinesstypeList/?repage"; |
224 | } | 281 | } |
225 | 282 | ||
@@ -247,6 +304,23 @@ public class LandBusinesstypeListController extends BaseController { | @@ -247,6 +304,23 @@ public class LandBusinesstypeListController extends BaseController { | ||
247 | 304 | ||
248 | return "redirect:" + Global.getAdminPath() + "/land/landBusinesstypeList/?repage"; | 305 | return "redirect:" + Global.getAdminPath() + "/land/landBusinesstypeList/?repage"; |
249 | } | 306 | } |
307 | + | ||
308 | + @RequiresPermissions("land:landBusinesstypeList:edit") | ||
309 | + @RequestMapping(value = "update") | ||
310 | + public String update(LandBusinesstypeList landBusinesstypeList, RedirectAttributes redirectAttributes) | ||
311 | + throws Exception { | ||
312 | + List<LandBusinesstypeList> list = landBusinesstypeListService.findByBarcode(landBusinesstypeList.getBarcode()); | ||
313 | + for (int i = 0; i < list.size(); i++) { | ||
314 | + list.get(i).setIsvalid("1"); | ||
315 | + if("E".equals(list.get(i).getTurnoverflag())) { | ||
316 | + list.get(i).setContrastflag("非正常出站"); | ||
317 | + } | ||
318 | + landBusinesstypeListService.updateEntry(list.get(i)); | ||
319 | + } | ||
320 | + buildBarCode.cancleBarCode(landBusinesstypeList.getTrailerFrameNo()); | ||
321 | + return "redirect:" + Global.getAdminPath() + "/land/landBusinesstypeList/?repage"; | ||
322 | + } | ||
323 | + | ||
250 | 324 | ||
251 | public boolean insertType1(LandBusinesstypeList landBusinesstypeList) { | 325 | public boolean insertType1(LandBusinesstypeList landBusinesstypeList) { |
252 | boolean flag = false; | 326 | boolean flag = false; |
@@ -277,6 +351,7 @@ public class LandBusinesstypeListController extends BaseController { | @@ -277,6 +351,7 @@ public class LandBusinesstypeListController extends BaseController { | ||
277 | list.setIsDelete("0"); | 351 | list.setIsDelete("0"); |
278 | list.setIsvalid("0"); | 352 | list.setIsvalid("0"); |
279 | list.setIsfull(isfull); | 353 | list.setIsfull(isfull); |
354 | + list.setTrailerLicenseNo(landBusinesstypeList.getTrailerLicenseNo()); | ||
280 | list.setBusinesstype(landBusinesstypeList.getBusinesstype()); | 355 | list.setBusinesstype(landBusinesstypeList.getBusinesstype()); |
281 | list.setCocode(landBusinesstypeList.getCocode()); | 356 | list.setCocode(landBusinesstypeList.getCocode()); |
282 | list.setTrailerFrameNo(landBusinesstypeList.getTrailerFrameNo()); | 357 | list.setTrailerFrameNo(landBusinesstypeList.getTrailerFrameNo()); |
@@ -298,6 +373,7 @@ public class LandBusinesstypeListController extends BaseController { | @@ -298,6 +373,7 @@ public class LandBusinesstypeListController extends BaseController { | ||
298 | list1.setIsDelete("0"); | 373 | list1.setIsDelete("0"); |
299 | list1.setIsvalid("0"); | 374 | list1.setIsvalid("0"); |
300 | list1.setIsfull(isfull); | 375 | list1.setIsfull(isfull); |
376 | + list1.setTrailerLicenseNo(landBusinesstypeList.getTrailerLicenseNo()); | ||
301 | list1.setBusinesstype(landBusinesstypeList.getBusinesstype()); | 377 | list1.setBusinesstype(landBusinesstypeList.getBusinesstype()); |
302 | list1.setCocode(landBusinesstypeList.getCocode()); | 378 | list1.setCocode(landBusinesstypeList.getCocode()); |
303 | list1.setTrailerFrameNo(landBusinesstypeList.getTrailerFrameNo()); | 379 | list1.setTrailerFrameNo(landBusinesstypeList.getTrailerFrameNo()); |
@@ -321,6 +397,7 @@ public class LandBusinesstypeListController extends BaseController { | @@ -321,6 +397,7 @@ public class LandBusinesstypeListController extends BaseController { | ||
321 | list2.setIsDelete("0"); | 397 | list2.setIsDelete("0"); |
322 | list2.setIsvalid("0"); | 398 | list2.setIsvalid("0"); |
323 | list2.setIsfull(isfull); | 399 | list2.setIsfull(isfull); |
400 | + list2.setTrailerLicenseNo(landBusinesstypeList.getTrailerLicenseNo()); | ||
324 | list2.setBusinesstype(landBusinesstypeList.getBusinesstype()); | 401 | list2.setBusinesstype(landBusinesstypeList.getBusinesstype()); |
325 | list2.setCocode(landBusinesstypeList.getCocode()); | 402 | list2.setCocode(landBusinesstypeList.getCocode()); |
326 | list2.setTrailerFrameNo(landBusinesstypeList.getTrailerFrameNo()); | 403 | list2.setTrailerFrameNo(landBusinesstypeList.getTrailerFrameNo()); |
@@ -339,19 +416,26 @@ public class LandBusinesstypeListController extends BaseController { | @@ -339,19 +416,26 @@ public class LandBusinesstypeListController extends BaseController { | ||
339 | list2.setMassageId(messageId); | 416 | list2.setMassageId(messageId); |
340 | landBusinesstypeListService.save(list2); | 417 | landBusinesstypeListService.save(list2); |
341 | 418 | ||
342 | - | ||
343 | String barCode = buildBarCode.CreateBarCode(landBusinesstypeList.getTrailerFrameNo(), messageId); | 419 | String barCode = buildBarCode.CreateBarCode(landBusinesstypeList.getTrailerFrameNo(), messageId); |
344 | List<LandBusinesstypeList> typeList = landBusinesstypeListService.findByMessageId(messageId); | 420 | List<LandBusinesstypeList> typeList = landBusinesstypeListService.findByMessageId(messageId); |
421 | + int count = 0; | ||
345 | for (int i = 0; i < typeList.size(); i++) { | 422 | for (int i = 0; i < typeList.size(); i++) { |
346 | typeList.get(i).setBarcode(barCode); | 423 | typeList.get(i).setBarcode(barCode); |
347 | landBusinesstypeListService.updateEntry(typeList.get(i)); | 424 | landBusinesstypeListService.updateEntry(typeList.get(i)); |
348 | - flag = true; | 425 | + count++; |
426 | + if (count == typeList.size()) { | ||
427 | + flag = true; | ||
428 | + } | ||
349 | } | 429 | } |
350 | - if (barCode==null) { | 430 | + int countType = 0; |
431 | + if (barCode == null) { | ||
351 | List<LandBusinesstypeList> typeList1 = landBusinesstypeListService.findByMessageId(messageId); | 432 | List<LandBusinesstypeList> typeList1 = landBusinesstypeListService.findByMessageId(messageId); |
352 | for (int i = 0; i < typeList1.size(); i++) { | 433 | for (int i = 0; i < typeList1.size(); i++) { |
353 | landBusinesstypeListService.deleteByMessageId(typeList1.get(i)); | 434 | landBusinesstypeListService.deleteByMessageId(typeList1.get(i)); |
354 | - flag =false; | 435 | + countType++; |
436 | + if (countType == typeList1.size()) { | ||
437 | + flag = false; | ||
438 | + } | ||
355 | } | 439 | } |
356 | } | 440 | } |
357 | } catch (Exception e) { | 441 | } catch (Exception e) { |
@@ -362,7 +446,7 @@ public class LandBusinesstypeListController extends BaseController { | @@ -362,7 +446,7 @@ public class LandBusinesstypeListController extends BaseController { | ||
362 | } | 446 | } |
363 | 447 | ||
364 | public boolean insertType2(LandBusinesstypeList landBusinesstypeList) { | 448 | public boolean insertType2(LandBusinesstypeList landBusinesstypeList) { |
365 | - | 449 | + |
366 | boolean flag = false; | 450 | boolean flag = false; |
367 | try { | 451 | try { |
368 | 452 | ||
@@ -382,6 +466,7 @@ public class LandBusinesstypeListController extends BaseController { | @@ -382,6 +466,7 @@ public class LandBusinesstypeListController extends BaseController { | ||
382 | list.setIsDelete("0"); | 466 | list.setIsDelete("0"); |
383 | list.setIsvalid("0"); | 467 | list.setIsvalid("0"); |
384 | list.setIsfull(isfull); | 468 | list.setIsfull(isfull); |
469 | + list.setTrailerLicenseNo(landBusinesstypeList.getTrailerLicenseNo()); | ||
385 | list.setBusinesstype(landBusinesstypeList.getBusinesstype()); | 470 | list.setBusinesstype(landBusinesstypeList.getBusinesstype()); |
386 | list.setCocode(landBusinesstypeList.getCocode()); | 471 | list.setCocode(landBusinesstypeList.getCocode()); |
387 | list.setTrailerFrameNo(landBusinesstypeList.getTrailerFrameNo()); | 472 | list.setTrailerFrameNo(landBusinesstypeList.getTrailerFrameNo()); |
@@ -399,16 +484,24 @@ public class LandBusinesstypeListController extends BaseController { | @@ -399,16 +484,24 @@ public class LandBusinesstypeListController extends BaseController { | ||
399 | landBusinesstypeListService.save(list); | 484 | landBusinesstypeListService.save(list); |
400 | String barCode = buildBarCode.CreateBarCode(landBusinesstypeList.getTrailerFrameNo(), messageId); | 485 | String barCode = buildBarCode.CreateBarCode(landBusinesstypeList.getTrailerFrameNo(), messageId); |
401 | List<LandBusinesstypeList> typeList = landBusinesstypeListService.findByMessageId(messageId); | 486 | List<LandBusinesstypeList> typeList = landBusinesstypeListService.findByMessageId(messageId); |
487 | + int count = 0; | ||
402 | for (int i = 0; i < typeList.size(); i++) { | 488 | for (int i = 0; i < typeList.size(); i++) { |
403 | typeList.get(i).setBarcode(barCode); | 489 | typeList.get(i).setBarcode(barCode); |
404 | landBusinesstypeListService.updateEntry(typeList.get(i)); | 490 | landBusinesstypeListService.updateEntry(typeList.get(i)); |
405 | - flag = true; | 491 | + count++; |
492 | + if (count == typeList.size()) { | ||
493 | + flag = true; | ||
494 | + } | ||
406 | } | 495 | } |
407 | - if (barCode==null) { | 496 | + int countType = 0; |
497 | + if (barCode == null) { | ||
408 | List<LandBusinesstypeList> typeList1 = landBusinesstypeListService.findByMessageId(messageId); | 498 | List<LandBusinesstypeList> typeList1 = landBusinesstypeListService.findByMessageId(messageId); |
409 | for (int i = 0; i < typeList1.size(); i++) { | 499 | for (int i = 0; i < typeList1.size(); i++) { |
410 | landBusinesstypeListService.deleteByMessageId(typeList1.get(i)); | 500 | landBusinesstypeListService.deleteByMessageId(typeList1.get(i)); |
411 | - flag=false; | 501 | + countType++; |
502 | + if (countType == typeList.size()) { | ||
503 | + flag = false; | ||
504 | + } | ||
412 | } | 505 | } |
413 | } | 506 | } |
414 | } catch (Exception e) { | 507 | } catch (Exception e) { |
@@ -418,7 +511,7 @@ public class LandBusinesstypeListController extends BaseController { | @@ -418,7 +511,7 @@ public class LandBusinesstypeListController extends BaseController { | ||
418 | } | 511 | } |
419 | 512 | ||
420 | public boolean insertType3(LandBusinesstypeList landBusinesstypeList) { | 513 | public boolean insertType3(LandBusinesstypeList landBusinesstypeList) { |
421 | - | 514 | + |
422 | boolean flag = false; | 515 | boolean flag = false; |
423 | try { | 516 | try { |
424 | // first entry | 517 | // first entry |
@@ -436,6 +529,7 @@ public class LandBusinesstypeListController extends BaseController { | @@ -436,6 +529,7 @@ public class LandBusinesstypeListController extends BaseController { | ||
436 | list.setIsDelete("0"); | 529 | list.setIsDelete("0"); |
437 | list.setIsvalid("0"); | 530 | list.setIsvalid("0"); |
438 | list.setIsfull(isfull); | 531 | list.setIsfull(isfull); |
532 | + list.setTrailerLicenseNo(landBusinesstypeList.getTrailerLicenseNo()); | ||
439 | list.setBusinesstype(landBusinesstypeList.getBusinesstype()); | 533 | list.setBusinesstype(landBusinesstypeList.getBusinesstype()); |
440 | list.setCocode(landBusinesstypeList.getCocode()); | 534 | list.setCocode(landBusinesstypeList.getCocode()); |
441 | list.setTrailerFrameNo(landBusinesstypeList.getTrailerFrameNo()); | 535 | list.setTrailerFrameNo(landBusinesstypeList.getTrailerFrameNo()); |
@@ -451,19 +545,27 @@ public class LandBusinesstypeListController extends BaseController { | @@ -451,19 +545,27 @@ public class LandBusinesstypeListController extends BaseController { | ||
451 | list.setTurnoverflag("E"); | 545 | list.setTurnoverflag("E"); |
452 | list.setMassageId(messageId); | 546 | list.setMassageId(messageId); |
453 | landBusinesstypeListService.save(list); | 547 | landBusinesstypeListService.save(list); |
454 | - | 548 | + |
455 | String barCode = buildBarCode.CreateBarCode(landBusinesstypeList.getTrailerFrameNo(), messageId); | 549 | String barCode = buildBarCode.CreateBarCode(landBusinesstypeList.getTrailerFrameNo(), messageId); |
456 | List<LandBusinesstypeList> typeList = landBusinesstypeListService.findByMessageId(messageId); | 550 | List<LandBusinesstypeList> typeList = landBusinesstypeListService.findByMessageId(messageId); |
551 | + int count = 0; | ||
457 | for (int i = 0; i < typeList.size(); i++) { | 552 | for (int i = 0; i < typeList.size(); i++) { |
458 | typeList.get(i).setBarcode(barCode); | 553 | typeList.get(i).setBarcode(barCode); |
459 | landBusinesstypeListService.updateEntry(typeList.get(i)); | 554 | landBusinesstypeListService.updateEntry(typeList.get(i)); |
460 | - flag = true; | 555 | + count++; |
556 | + if (count == typeList.size()) { | ||
557 | + flag = true; | ||
558 | + } | ||
461 | } | 559 | } |
462 | - if (barCode==null) { | 560 | + int countType = 0; |
561 | + if (barCode == null) { | ||
463 | List<LandBusinesstypeList> typeList1 = landBusinesstypeListService.findByMessageId(messageId); | 562 | List<LandBusinesstypeList> typeList1 = landBusinesstypeListService.findByMessageId(messageId); |
464 | for (int i = 0; i < typeList1.size(); i++) { | 563 | for (int i = 0; i < typeList1.size(); i++) { |
465 | landBusinesstypeListService.deleteByMessageId(typeList1.get(i)); | 564 | landBusinesstypeListService.deleteByMessageId(typeList1.get(i)); |
466 | - flag = false; | 565 | + countType++; |
566 | + if (countType == typeList.size()) { | ||
567 | + flag = false; | ||
568 | + } | ||
467 | } | 569 | } |
468 | } | 570 | } |
469 | } catch (Exception e) { | 571 | } catch (Exception e) { |
@@ -550,43 +652,85 @@ public class LandBusinesstypeListController extends BaseController { | @@ -550,43 +652,85 @@ public class LandBusinesstypeListController extends BaseController { | ||
550 | public static String dateTimeFormat() { | 652 | public static String dateTimeFormat() { |
551 | Date dateTime = new Date(); | 653 | Date dateTime = new Date(); |
552 | SimpleDateFormat format = new SimpleDateFormat("yyyyMMddHHmmss"); | 654 | SimpleDateFormat format = new SimpleDateFormat("yyyyMMddHHmmss"); |
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; | 655 | + String str = String.valueOf(new Random().nextInt(9999) + 1); |
656 | + if (str.length() == 1) { | ||
657 | + str = "000" + str; | ||
658 | + } else if (str.length() == 2) { | ||
659 | + str = "00" + str; | ||
660 | + } else if (str.length() == 3) { | ||
661 | + str = "0" + str; | ||
560 | } | 662 | } |
561 | - str = format.format(dateTime)+str; | 663 | + str = format.format(dateTime) + str; |
562 | return str; | 664 | return str; |
563 | } | 665 | } |
564 | - | ||
565 | 666 | ||
566 | public void insertVm(String id, String frameNo, String mainfistList) { | 667 | public void insertVm(String id, String frameNo, String mainfistList) { |
567 | 668 | ||
568 | List<VehicleMainifist> vmList = veMainService.selectByBueId(id); | 669 | List<VehicleMainifist> vmList = veMainService.selectByBueId(id); |
569 | 670 | ||
570 | - if (mainfistList.length() > 0) { | ||
571 | - String[] list = mainfistList.replace(",", ",").split(","); | ||
572 | - if (vmList.size() > list.length) { | ||
573 | - for (int j = 0; j < vmList.size(); j++) { | ||
574 | - for (int i = 0; i < list.length; i++) { | ||
575 | - if (vmList.get(j).getMainifist() != list[i]) { | ||
576 | - veMainService.deleteEntry(vmList.get(j)); | 671 | + String[] list = mainfistList.replaceAll(",", ",").replaceAll("-", "").split(","); |
672 | + boolean flag = vmList.size() == 0; | ||
673 | + boolean listFlag = "".equals(list[0]); | ||
674 | + if (listFlag) { | ||
675 | + if (!flag) { | ||
676 | + for (int i = 0; i < vmList.size(); i++) { | ||
677 | + veMainService.deleteEntry(vmList.get(i)); | ||
678 | + } | ||
679 | + } | ||
680 | + } | ||
681 | + if (!listFlag) { | ||
682 | + if (flag) { | ||
683 | + for (int i = 0; i < list.length; i++) { | ||
684 | + VehicleMainifist vm = veMainService.selectByVm(id, list[i]); | ||
685 | + if (vm == null) { | ||
686 | + VehicleMainifist vehicleMainifist = new VehicleMainifist(); | ||
687 | + vehicleMainifist.setBusinessId(id); | ||
688 | + vehicleMainifist.setBusinessNum(frameNo); | ||
689 | + vehicleMainifist.setMainifist(list[i]); | ||
690 | + veMainService.save(vehicleMainifist); | ||
691 | + } | ||
692 | + } | ||
693 | + } else { | ||
694 | + int count = 0; | ||
695 | + if (vmList.size() >= list.length) { | ||
696 | + for (int i = 0; i < vmList.size(); i++) { | ||
697 | + System.out.println(vmList.get(i).getMainifist()); | ||
698 | + System.out.println(mainfistList.indexOf(vmList.get(i).getMainifist()) != -1); | ||
699 | + for (int j = 0; j < list.length; j++) { | ||
700 | + if (!(mainfistList.indexOf(vmList.get(i).getMainifist()) != -1)) { | ||
701 | + veMainService.deleteEntry(vmList.get(i)); | ||
702 | + } else { | ||
703 | + VehicleMainifist vm = veMainService.selectByVm(id, list[j]); | ||
704 | + if (vm == null) { | ||
705 | + VehicleMainifist vehicleMainifist = new VehicleMainifist(); | ||
706 | + vehicleMainifist.setBusinessId(id); | ||
707 | + vehicleMainifist.setBusinessNum(frameNo); | ||
708 | + vehicleMainifist.setMainifist(list[j]); | ||
709 | + veMainService.save(vehicleMainifist); | ||
710 | + } | ||
711 | + } | ||
577 | } | 712 | } |
578 | - VehicleMainifist vm = veMainService.selectByVm(id, list[i]); | ||
579 | - if (vm == null) { | ||
580 | - VehicleMainifist vehicleMainifist = new VehicleMainifist(); | ||
581 | - vehicleMainifist.setBusinessId(id); | ||
582 | - vehicleMainifist.setBusinessNum(frameNo); | ||
583 | - vehicleMainifist.setMainifist(list[i]); | ||
584 | - veMainService.save(vehicleMainifist); | 713 | + } |
714 | + } else { | ||
715 | + for (int i = 0; i < list.length; i++) { | ||
716 | + for (int j = 0; j < vmList.size(); j++) { | ||
717 | + if (!(mainfistList.indexOf(vmList.get(j).getMainifist()) != -1)) { | ||
718 | + veMainService.deleteEntry(vmList.get(j)); | ||
719 | + } else { | ||
720 | + VehicleMainifist vm = veMainService.selectByVm(id, list[i]); | ||
721 | + if (vm == null) { | ||
722 | + VehicleMainifist vehicleMainifist = new VehicleMainifist(); | ||
723 | + vehicleMainifist.setBusinessId(id); | ||
724 | + vehicleMainifist.setBusinessNum(frameNo); | ||
725 | + vehicleMainifist.setMainifist(list[i]); | ||
726 | + veMainService.save(vehicleMainifist); | ||
727 | + } | ||
728 | + } | ||
585 | } | 729 | } |
586 | } | 730 | } |
587 | } | 731 | } |
732 | + | ||
588 | } | 733 | } |
589 | } | 734 | } |
590 | } | 735 | } |
591 | - | ||
592 | } | 736 | } |
@@ -3,6 +3,7 @@ | @@ -3,6 +3,7 @@ | ||
3 | */ | 3 | */ |
4 | package com.thinkgem.jeesite.modules.land.web; | 4 | package com.thinkgem.jeesite.modules.land.web; |
5 | 5 | ||
6 | +import java.util.ArrayList; | ||
6 | import java.util.Date; | 7 | import java.util.Date; |
7 | import java.util.List; | 8 | import java.util.List; |
8 | 9 | ||
@@ -26,13 +27,17 @@ import com.thinkgem.jeesite.common.web.BaseController; | @@ -26,13 +27,17 @@ import com.thinkgem.jeesite.common.web.BaseController; | ||
26 | import com.thinkgem.jeesite.common.utils.StringUtils; | 27 | import com.thinkgem.jeesite.common.utils.StringUtils; |
27 | import com.thinkgem.jeesite.modules.land.entity.LandRoadVeRecord; | 28 | import com.thinkgem.jeesite.modules.land.entity.LandRoadVeRecord; |
28 | import com.thinkgem.jeesite.modules.land.service.LandRoadVeRecordService; | 29 | import com.thinkgem.jeesite.modules.land.service.LandRoadVeRecordService; |
30 | +import com.thinkgem.jeesite.modules.sys.entity.Office; | ||
31 | +import com.thinkgem.jeesite.modules.sys.entity.Role; | ||
29 | import com.thinkgem.jeesite.modules.sys.entity.User; | 32 | import com.thinkgem.jeesite.modules.sys.entity.User; |
30 | import com.thinkgem.jeesite.modules.sys.security.SystemAuthorizingRealm.Principal; | 33 | import com.thinkgem.jeesite.modules.sys.security.SystemAuthorizingRealm.Principal; |
34 | +import com.thinkgem.jeesite.modules.sys.service.OfficeService; | ||
31 | import com.thinkgem.jeesite.modules.sys.service.SystemService; | 35 | import com.thinkgem.jeesite.modules.sys.service.SystemService; |
32 | import com.thinkgem.jeesite.modules.sys.utils.UserUtils; | 36 | import com.thinkgem.jeesite.modules.sys.utils.UserUtils; |
33 | 37 | ||
34 | /** | 38 | /** |
35 | * 汽车备案Controller | 39 | * 汽车备案Controller |
40 | + * | ||
36 | * @author zhangfan | 41 | * @author zhangfan |
37 | * @version 2018-10-08 | 42 | * @version 2018-10-08 |
38 | */ | 43 | */ |
@@ -42,31 +47,68 @@ public class LandRoadVeRecordController extends BaseController { | @@ -42,31 +47,68 @@ public class LandRoadVeRecordController extends BaseController { | ||
42 | 47 | ||
43 | @Autowired | 48 | @Autowired |
44 | private LandRoadVeRecordService landRoadVeRecordService; | 49 | private LandRoadVeRecordService landRoadVeRecordService; |
45 | - | 50 | + |
46 | @Autowired | 51 | @Autowired |
47 | private SystemService systemService; | 52 | private SystemService systemService; |
48 | - | 53 | + |
54 | + @Autowired | ||
55 | + private OfficeService officeService; | ||
56 | + | ||
49 | @ModelAttribute | 57 | @ModelAttribute |
50 | - public LandRoadVeRecord get(@RequestParam(required=false) String id) { | 58 | + public LandRoadVeRecord get(@RequestParam(required = false) String id) { |
51 | LandRoadVeRecord entity = null; | 59 | LandRoadVeRecord entity = null; |
52 | - if (StringUtils.isNotBlank(id)){ | 60 | + if (StringUtils.isNotBlank(id)) { |
53 | entity = landRoadVeRecordService.get(id); | 61 | entity = landRoadVeRecordService.get(id); |
54 | } | 62 | } |
55 | - if (entity == null){ | 63 | + if (entity == null) { |
56 | entity = new LandRoadVeRecord(); | 64 | entity = new LandRoadVeRecord(); |
57 | } | 65 | } |
58 | return entity; | 66 | return entity; |
59 | } | 67 | } |
60 | - | 68 | + |
61 | @RequiresPermissions("land:landRoadVeRecord:view") | 69 | @RequiresPermissions("land:landRoadVeRecord:view") |
62 | - @RequestMapping(value = {"list", ""}) | ||
63 | - public String list(LandRoadVeRecord landRoadVeRecord, HttpServletRequest request, HttpServletResponse response, Model model) { | 70 | + @RequestMapping(value = { "list", "" }) |
71 | + public String list(LandRoadVeRecord landRoadVeRecord, HttpServletRequest request, HttpServletResponse response, | ||
72 | + Model model) { | ||
64 | Principal principal = UserUtils.getPrincipal(); | 73 | Principal principal = UserUtils.getPrincipal(); |
65 | String loginName = principal.getLoginName(); | 74 | String loginName = principal.getLoginName(); |
66 | User user = systemService.getUserByLoginName(loginName); | 75 | User user = systemService.getUserByLoginName(loginName); |
67 | - landRoadVeRecord.setCreateBy(user); | ||
68 | - Page<LandRoadVeRecord> page = | ||
69 | - landRoadVeRecordService.findPage(new Page<LandRoadVeRecord>(request, response), landRoadVeRecord); | 76 | + List<LandRoadVeRecord> lists = new ArrayList<LandRoadVeRecord>(); |
77 | + Page<LandRoadVeRecord> page = null; | ||
78 | + if ("2".equals(user.getUserType())) { | ||
79 | + Office office = officeService.get(user.getOffice()); | ||
80 | + List<User> u = systemService.findByOfficeId(office.getId()); | ||
81 | + for (int i = 0; i < u.size(); i++) { | ||
82 | + landRoadVeRecord.setCreateBy(u.get(i)); | ||
83 | + page = landRoadVeRecordService.findPage(new Page<LandRoadVeRecord>(request, response), | ||
84 | + landRoadVeRecord); | ||
85 | + lists.addAll(page.getList()); | ||
86 | + } | ||
87 | + page.setCount(lists.size()); | ||
88 | + } else { | ||
89 | + /* | ||
90 | + * Role role = systemService.getByUserId(user.getId()); List<Role> roles = | ||
91 | + * systemService.findAllRole(); if("admin".equals(role.getEnname()) | ||
92 | + * ||"leader".equals(role.getEnname())) { | ||
93 | + * | ||
94 | + * }else { landRoadVeRecord.setCreateBy(user); } | ||
95 | + */ | ||
96 | + if ("3".equals(user.getUserType())) { | ||
97 | + landRoadVeRecord.setCreateBy(user); | ||
98 | + } else { | ||
99 | + landRoadVeRecord.setCreateBy(systemService.getUserByLoginName("admin")); | ||
100 | + } | ||
101 | + page = landRoadVeRecordService.findPage(new Page<LandRoadVeRecord>(request, response), landRoadVeRecord); | ||
102 | + lists.addAll(page.getList()); | ||
103 | + } | ||
104 | + // List<LandRoadVeRecord> list = page.getList(); | ||
105 | + for (int i = 0; i < lists.size(); i++) { | ||
106 | + User id = lists.get(i).getCreateBy(); | ||
107 | + User ue = systemService.getUser(id.toString()); | ||
108 | + lists.get(i).setVeTargetNo(ue.getName()); | ||
109 | + } | ||
110 | + page.setList(lists); | ||
111 | + | ||
70 | model.addAttribute("page", page); | 112 | model.addAttribute("page", page); |
71 | return "modules/land/landRoadVeRecordList"; | 113 | return "modules/land/landRoadVeRecordList"; |
72 | } | 114 | } |
@@ -81,52 +123,49 @@ public class LandRoadVeRecordController extends BaseController { | @@ -81,52 +123,49 @@ public class LandRoadVeRecordController extends BaseController { | ||
81 | @RequiresPermissions("land:landRoadVeRecord:edit") | 123 | @RequiresPermissions("land:landRoadVeRecord:edit") |
82 | @RequestMapping(value = "save") | 124 | @RequestMapping(value = "save") |
83 | public String save(LandRoadVeRecord landRoadVeRecord, Model model, RedirectAttributes redirectAttributes) { | 125 | public String save(LandRoadVeRecord landRoadVeRecord, Model model, RedirectAttributes redirectAttributes) { |
84 | - if (!beanValidator(model, landRoadVeRecord)){ | 126 | + if (!beanValidator(model, landRoadVeRecord)) { |
85 | return form(landRoadVeRecord, model); | 127 | return form(landRoadVeRecord, model); |
86 | } | 128 | } |
87 | String barcode = landRoadVeRecord.getBarcode(); | 129 | String barcode = landRoadVeRecord.getBarcode(); |
88 | - if(barcode ==null) { | ||
89 | - String barCode = buildBarCode.crateCar(landRoadVeRecord); | ||
90 | - // String barCode = "111"; | ||
91 | - if("0".equals(barCode)) { | ||
92 | - landRoadVeRecord.setReturnmessage("备案成功"); | ||
93 | - }else { | ||
94 | - landRoadVeRecord.setReturnmessage("备案失败"); | ||
95 | - } | ||
96 | - landRoadVeRecord.setBarcode(barCode); | 130 | + |
131 | + String barCode = buildBarCode.crateCar(landRoadVeRecord); | ||
132 | + // String barCode = "111"; | ||
133 | + if ("0".equals(barCode)) { | ||
134 | + landRoadVeRecord.setReturnmessage("备案成功"); | ||
135 | + } else { | ||
136 | + landRoadVeRecord.setReturnmessage("备案失败"); | ||
97 | } | 137 | } |
98 | - if(landRoadVeRecord.getProposeTime()==null) { | 138 | + landRoadVeRecord.setBarcode(barCode); |
139 | + if (landRoadVeRecord.getProposeTime() == null) { | ||
99 | landRoadVeRecord.setProposeTime(new Date()); | 140 | landRoadVeRecord.setProposeTime(new Date()); |
100 | } | 141 | } |
101 | landRoadVeRecordService.save(landRoadVeRecord); | 142 | landRoadVeRecordService.save(landRoadVeRecord); |
102 | addMessage(redirectAttributes, "保存备案成功"); | 143 | addMessage(redirectAttributes, "保存备案成功"); |
103 | - return "redirect:"+Global.getAdminPath()+"/land/landRoadVeRecord/?repage"; | 144 | + return "redirect:" + Global.getAdminPath() + "/land/landRoadVeRecord/?repage"; |
104 | } | 145 | } |
105 | - | 146 | + |
106 | @RequiresPermissions("land:landRoadVeRecord:edit") | 147 | @RequiresPermissions("land:landRoadVeRecord:edit") |
107 | @RequestMapping(value = "delete") | 148 | @RequestMapping(value = "delete") |
108 | public String delete(LandRoadVeRecord landRoadVeRecord, RedirectAttributes redirectAttributes) { | 149 | public String delete(LandRoadVeRecord landRoadVeRecord, RedirectAttributes redirectAttributes) { |
109 | landRoadVeRecordService.delete(landRoadVeRecord); | 150 | landRoadVeRecordService.delete(landRoadVeRecord); |
110 | buildBarCode.cancleCar(landRoadVeRecord); | 151 | buildBarCode.cancleCar(landRoadVeRecord); |
111 | addMessage(redirectAttributes, "删除备案成功"); | 152 | addMessage(redirectAttributes, "删除备案成功"); |
112 | - return "redirect:"+Global.getAdminPath()+"/land/landRoadVeRecord/?repage"; | 153 | + return "redirect:" + Global.getAdminPath() + "/land/landRoadVeRecord/?repage"; |
113 | } | 154 | } |
114 | - | 155 | + |
115 | @RequiresPermissions("land:landRoadVeRecord:edit") | 156 | @RequiresPermissions("land:landRoadVeRecord:edit") |
116 | @RequestMapping(value = "selectByVeName") | 157 | @RequestMapping(value = "selectByVeName") |
117 | @ResponseBody | 158 | @ResponseBody |
118 | - public Page<LandRoadVeRecord> selectByVeName(String veName){ | 159 | + public Page<LandRoadVeRecord> selectByVeName(String veName) { |
119 | Page<LandRoadVeRecord> page = new Page<LandRoadVeRecord>(); | 160 | Page<LandRoadVeRecord> page = new Page<LandRoadVeRecord>(); |
120 | Principal principal = UserUtils.getPrincipal(); | 161 | Principal principal = UserUtils.getPrincipal(); |
121 | String loginName = principal.getLoginName(); | 162 | String loginName = principal.getLoginName(); |
122 | User user = systemService.getUserByLoginName(loginName); | 163 | User user = systemService.getUserByLoginName(loginName); |
123 | List<LandRoadVeRecord> veList = landRoadVeRecordService.selectByFrameNo(veName); | 164 | List<LandRoadVeRecord> veList = landRoadVeRecordService.selectByFrameNo(veName); |
124 | - if(veList.size()>0) { | 165 | + if (veList.size() > 0) { |
125 | page.setCount(1L); | 166 | page.setCount(1L); |
126 | } | 167 | } |
127 | return page; | 168 | return page; |
128 | } | 169 | } |
129 | - | ||
130 | - | ||
131 | 170 | ||
132 | } | 171 | } |
@@ -36,5 +36,12 @@ public interface RoleDao extends CrudDao<Role> { | @@ -36,5 +36,12 @@ public interface RoleDao extends CrudDao<Role> { | ||
36 | public int deleteRoleOffice(Role role); | 36 | public int deleteRoleOffice(Role role); |
37 | 37 | ||
38 | public int insertRoleOffice(Role role); | 38 | public int insertRoleOffice(Role role); |
39 | + | ||
40 | + /** | ||
41 | + * 根据userID获取相对应的角色 | ||
42 | + * @param id | ||
43 | + * @return | ||
44 | + */ | ||
45 | + public Role getByUserId(String id); | ||
39 | 46 | ||
40 | } | 47 | } |
@@ -71,5 +71,12 @@ public interface UserDao extends CrudDao<User> { | @@ -71,5 +71,12 @@ public interface UserDao extends CrudDao<User> { | ||
71 | * @return | 71 | * @return |
72 | */ | 72 | */ |
73 | public int updateUserInfo(User user); | 73 | public int updateUserInfo(User user); |
74 | + | ||
75 | + /** | ||
76 | + * 根据部门号查询当前部门下所有用户,用于数据查询,当前用户为部门经理时使用 | ||
77 | + * @param id | ||
78 | + * @return | ||
79 | + */ | ||
80 | + public List<User> findByOfficeId(String id); | ||
74 | 81 | ||
75 | } | 82 | } |
@@ -408,6 +408,16 @@ public class SystemService extends BaseService implements InitializingBean { | @@ -408,6 +408,16 @@ public class SystemService extends BaseService implements InitializingBean { | ||
408 | return true; | 408 | return true; |
409 | } | 409 | } |
410 | 410 | ||
411 | + @Transactional(readOnly = false) | ||
412 | + public List<User> findByOfficeId(String id){ | ||
413 | + List<User> list = userDao.findByOfficeId(id); | ||
414 | + return list; | ||
415 | + } | ||
416 | + | ||
417 | + public Role getByUserId(String id) { | ||
418 | + return roleDao.getByUserId(id); | ||
419 | + } | ||
420 | + | ||
411 | ///////////////// Synchronized to the Activiti ////////////////// | 421 | ///////////////// Synchronized to the Activiti ////////////////// |
412 | 422 | ||
413 | // 已废弃,同步见:ActGroupEntityServiceFactory.java、ActUserEntityServiceFactory.java | 423 | // 已废弃,同步见:ActGroupEntityServiceFactory.java、ActUserEntityServiceFactory.java |
@@ -10,11 +10,11 @@ | @@ -10,11 +10,11 @@ | ||
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 |
@@ -22,11 +22,11 @@ | @@ -22,11 +22,11 @@ | ||
22 | #jdbc.username=kako | 22 | #jdbc.username=kako |
23 | #jdbc.password=mysql10.50.7.10 | 23 | #jdbc.password=mysql10.50.7.10 |
24 | 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 | 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 | ||
30 | 30 | ||
31 | #mssql database settings | 31 | #mssql database settings |
32 | #jdbc.type=mssql | 32 | #jdbc.type=mssql |
@@ -91,10 +91,10 @@ | @@ -91,10 +91,10 @@ | ||
91 | <include refid="landBusinesstypeListJoins"/> | 91 | <include refid="landBusinesstypeListJoins"/> |
92 | <where> | 92 | <where> |
93 | a.is_delete = "0" | 93 | a.is_delete = "0" |
94 | - <if test='trailerFrameNo !="1" and trailerFrameNo !=null and trailerFrameNo !=""'> | 94 | + <if test='trailerFrameNo !=null and trailerFrameNo !=""'> |
95 | and trailer_frame_no = #{trailerFrameNo} | 95 | and trailer_frame_no = #{trailerFrameNo} |
96 | </if> | 96 | </if> |
97 | - <if test='(createBy.id !="1" and createBy.id !=null and createBy.id !="")'> | 97 | + <if test='createBy.id !="1" and createBy.id !=null and createBy.id !=""'> |
98 | and create_by = #{createBy.id} | 98 | and create_by = #{createBy.id} |
99 | </if> | 99 | </if> |
100 | <if test="endstation !=null and endstation !=''"> | 100 | <if test="endstation !=null and endstation !=''"> |
@@ -120,6 +120,39 @@ | @@ -120,6 +120,39 @@ | ||
120 | </choose> | 120 | </choose> |
121 | </select> | 121 | </select> |
122 | 122 | ||
123 | + <select id="findByUserType" resultType="LandBusinesstypeList"> | ||
124 | + SELECT | ||
125 | + <include refid="landBusinesstypeListColumns"/> | ||
126 | + FROM land_businesstype_list a | ||
127 | + <include refid="landBusinesstypeListJoins"/> | ||
128 | + <where> | ||
129 | + a.is_delete = "0" | ||
130 | + <if test='trailerFrameNo !=null and trailerFrameNo !=""'> | ||
131 | + and trailer_frame_no = #{trailerFrameNo} | ||
132 | + </if> | ||
133 | + <if test="endstation !=null and endstation !=''"> | ||
134 | + and endstation = #{endstation} | ||
135 | + </if> | ||
136 | + <if test="contrastflag !=null and contrastflag !=''"> | ||
137 | + and contrastflag = #{contrastflag} | ||
138 | + </if> | ||
139 | + <if test="aisle !=null and aisle !=''"> | ||
140 | + and aisle = #{aisle} | ||
141 | + </if> | ||
142 | + <if test="agentname !=null and agentname !=''"> | ||
143 | + and agentname like "%"#{agentname}"%" | ||
144 | + </if> | ||
145 | + </where> | ||
146 | + <choose> | ||
147 | + <when test="page !=null and page.orderBy != null and page.orderBy != ''"> | ||
148 | + ORDER BY ${page.orderBy} | ||
149 | + </when> | ||
150 | + <otherwise> | ||
151 | + ORDER BY a.update_date DESC | ||
152 | + </otherwise> | ||
153 | + </choose> | ||
154 | + </select> | ||
155 | + | ||
123 | <select id="findAllList" resultType="LandBusinesstypeList"> | 156 | <select id="findAllList" resultType="LandBusinesstypeList"> |
124 | SELECT | 157 | SELECT |
125 | <include refid="landBusinesstypeListColumns"/> | 158 | <include refid="landBusinesstypeListColumns"/> |
@@ -137,7 +170,10 @@ | @@ -137,7 +170,10 @@ | ||
137 | </otherwise> | 170 | </otherwise> |
138 | </choose> | 171 | </choose> |
139 | </select> | 172 | </select> |
140 | - | 173 | + <select id="findByIsValid" resultType="LandBusinesstypeList"> |
174 | + select * from land_businesstype_list | ||
175 | + WHERE trailer_frame_no =#{trailerFrameNo} AND isvalid=#{isvalid} | ||
176 | + </select> | ||
141 | <update id="deleteByBarcode" parameterType="java.lang.String"> | 177 | <update id="deleteByBarcode" parameterType="java.lang.String"> |
142 | UPDATE land_businesstype_list set is_delete = "1",isvalid = "1" | 178 | UPDATE land_businesstype_list set is_delete = "1",isvalid = "1" |
143 | WHERE barcode = #{barcode} | 179 | WHERE barcode = #{barcode} |
@@ -82,10 +82,10 @@ | @@ -82,10 +82,10 @@ | ||
82 | FROM land_road_ve_record a | 82 | FROM land_road_ve_record a |
83 | <include refid="landRoadVeRecordJoins"/> | 83 | <include refid="landRoadVeRecordJoins"/> |
84 | <trim prefix="WHERE" prefixOverrides="and"> | 84 | <trim prefix="WHERE" prefixOverrides="and"> |
85 | - <if test='domesticLisenceNo !="1" and domesticLisenceNo !=null and domesticLisenceNo !=""'> | 85 | + <if test='domesticLisenceNo !=null and domesticLisenceNo !=""'> |
86 | and 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 | and create_by = #{createBy.id} | 89 | and create_by = #{createBy.id} |
90 | </if> | 90 | </if> |
91 | </trim> | 91 | </trim> |
@@ -70,6 +70,15 @@ | @@ -70,6 +70,15 @@ | ||
70 | ORDER BY a.code | 70 | ORDER BY a.code |
71 | </select> | 71 | </select> |
72 | 72 | ||
73 | + <select id="findById" resultType="Office"> | ||
74 | + SELECT | ||
75 | + <include refid="officeColumns"/> | ||
76 | + FROM sys_office a | ||
77 | + <include refid="officeJoins"/> | ||
78 | + WHERE a.del_flag = #{DEL_FLAG_NORMAL} | ||
79 | + ORDER BY a.code | ||
80 | + </select> | ||
81 | + | ||
73 | <select id="findByParentIdsLike" resultType="Office"> | 82 | <select id="findByParentIdsLike" resultType="Office"> |
74 | SELECT | 83 | SELECT |
75 | <include refid="officeColumns"/> | 84 | <include refid="officeColumns"/> |
@@ -84,6 +84,11 @@ | @@ -84,6 +84,11 @@ | ||
84 | WHERE a.name = #{name} AND a.del_flag = #{DEL_FLAG_NORMAL} | 84 | WHERE a.name = #{name} AND a.del_flag = #{DEL_FLAG_NORMAL} |
85 | </select> | 85 | </select> |
86 | 86 | ||
87 | + <select id="getByUserId" resultType="Role"> | ||
88 | + SELECT r.* FROM sys_role r,sys_user u,sys_user_role ur | ||
89 | + WHERE r.id = ur.role_id AND u.id=ur.user_id AND u.id=#{id}; | ||
90 | + </select> | ||
91 | + | ||
87 | <select id="getByEnname" resultType="Role"> | 92 | <select id="getByEnname" resultType="Role"> |
88 | SELECT | 93 | SELECT |
89 | <include refid="roleColumns"/> | 94 | <include refid="roleColumns"/> |
@@ -201,10 +201,16 @@ | @@ -201,10 +201,16 @@ | ||
201 | a.id, a.name, a.login_name | 201 | a.id, a.name, a.login_name |
202 | FROM sys_user a | 202 | FROM sys_user a |
203 | WHERE a.del_flag = #{DEL_FLAG_NORMAL} | 203 | WHERE a.del_flag = #{DEL_FLAG_NORMAL} |
204 | - AND a.office_id = #{office.id} | 204 | + AND a.office_id = #{office.id} |
205 | ORDER BY a.name | 205 | ORDER BY a.name |
206 | </select> | 206 | </select> |
207 | 207 | ||
208 | + <select id="findByOfficeId" resultType="User"> | ||
209 | + SELECT sys_user.id FROM sys_user | ||
210 | + WHERE office_id = #{id} AND user_type !="1" | ||
211 | + ORDER BY id | ||
212 | + </select> | ||
213 | + | ||
208 | <!-- 查询全部用户 --> | 214 | <!-- 查询全部用户 --> |
209 | <select id="findAllList" resultType="User"> | 215 | <select id="findAllList" resultType="User"> |
210 | SELECT | 216 | SELECT |
@@ -66,7 +66,7 @@ th, td { | @@ -66,7 +66,7 @@ th, td { | ||
66 | <div class="control-group"> | 66 | <div class="control-group"> |
67 | <label class="control-label">主单号:</label> | 67 | <label class="control-label">主单号:</label> |
68 | <div class="controls"> | 68 | <div class="controls"> |
69 | - <input type="text" name="coCode" placeholder="请输入主单号,例如172-12341234" | 69 | + <input type="text" name="coCode" placeholder="请输入主单号,例如17212341234" |
70 | autocomplete="off" class="input-xxlarge" id="putMaster"> | 70 | autocomplete="off" class="input-xxlarge" id="putMaster"> |
71 | <button class="btn btn-primary" id="select">查询</button> | 71 | <button class="btn btn-primary" id="select">查询</button> |
72 | <span class="help-inline"><font color="red">查询单号前请先选定业务类型</font> | 72 | <span class="help-inline"><font color="red">查询单号前请先选定业务类型</font> |
@@ -171,7 +171,27 @@ th, td { | @@ -171,7 +171,27 @@ th, td { | ||
171 | </div> | 171 | </div> |
172 | </div> | 172 | </div> |
173 | </div> | 173 | </div> |
174 | - <div class="control-group" style="display:none"> | 174 | + <div class="control-group"> |
175 | + <div class="row-fluid"> | ||
176 | + <div class="span12"> | ||
177 | + <div class="span6"> | ||
178 | + <label class="control-label">备案单位:</label> | ||
179 | + <div class="controls" > | ||
180 | + <form:input path="trailerLicenseNo" htmlEscape="false" maxlength="32" | ||
181 | + class="input-xlarge ReadOnly" id="veTargetNo" readonly="true"/> | ||
182 | + </div> | ||
183 | + </div> | ||
184 | + <div class="span6"> | ||
185 | + <label class="control-label">当前业务申请单位:</label> | ||
186 | + <div class="controls" > | ||
187 | + <form:input path="" htmlEscape="false" maxlength="32" | ||
188 | + class="input-xlarge ReadOnly" id="businessPro" readonly="true"/> | ||
189 | + </div> | ||
190 | + </div> | ||
191 | + </div> | ||
192 | + </div> | ||
193 | + </div> | ||
194 | + <%-- <div class="control-group" style="display:none"> | ||
175 | <div class="row-fluid"> | 195 | <div class="row-fluid"> |
176 | <div class="span12"> | 196 | <div class="span12"> |
177 | <div class="span6"> | 197 | <div class="span6"> |
@@ -190,7 +210,7 @@ th, td { | @@ -190,7 +210,7 @@ th, td { | ||
190 | </div> | 210 | </div> |
191 | </div> | 211 | </div> |
192 | </div> | 212 | </div> |
193 | - </div> | 213 | + </div> --%> |
194 | <div class="control-group"> | 214 | <div class="control-group"> |
195 | <div class="row-fluid"> | 215 | <div class="row-fluid"> |
196 | <div class="span12"> | 216 | <div class="span12"> |
@@ -291,7 +311,7 @@ th, td { | @@ -291,7 +311,7 @@ th, td { | ||
291 | <label class="control-label">主单列表:</label> | 311 | <label class="control-label">主单列表:</label> |
292 | <div class="controls"> | 312 | <div class="controls"> |
293 | <form:textarea path="masterList" rows="5" maxlength="1000" id="masterList" | 313 | <form:textarea path="masterList" rows="5" maxlength="1000" id="masterList" |
294 | - placeholder="请输入主单号,例如172-12341234,多个单号以“,”(英文)分割" | 314 | + placeholder="请输入主单号,例如17212341234,多个单号以“,”(英文)分割" |
295 | class="input-xxlarge textarea" /> | 315 | class="input-xxlarge textarea" /> |
296 | </div> | 316 | </div> |
297 | </div> | 317 | </div> |
@@ -318,9 +338,7 @@ th, td { | @@ -318,9 +338,7 @@ th, td { | ||
318 | }) | 338 | }) |
319 | $("#masterList").blur(function(){ | 339 | $("#masterList").blur(function(){ |
320 | var masterList = $("#masterList").val(); | 340 | var masterList = $("#masterList").val(); |
321 | - if(masterList.indexOf(",")!=-1){ | ||
322 | - $("#masterList").val(masterList.replace(/,/g,",")); | ||
323 | - } | 341 | + $("#masterList").val(masterList.replace(/\,/g,",").replace(/\-/g,"")); |
324 | }) | 342 | }) |
325 | $("#frameNo").blur(function(){ | 343 | $("#frameNo").blur(function(){ |
326 | var frameNo = $("#frameNo").val(); | 344 | var frameNo = $("#frameNo").val(); |
@@ -338,16 +356,19 @@ th, td { | @@ -338,16 +356,19 @@ th, td { | ||
338 | $("#agentno").val(data.list[0].coCode) | 356 | $("#agentno").val(data.list[0].coCode) |
339 | $("#driverid").val(data.list[0].veOwnerNo) | 357 | $("#driverid").val(data.list[0].veOwnerNo) |
340 | $("#drivername").val(data.list[0].veOwnerName) | 358 | $("#drivername").val(data.list[0].veOwnerName) |
359 | + $("#veTargetNo").val(data.list[0].veTargetNo) | ||
360 | + $("#businessPro").val(data.list[0].veProperty) | ||
341 | if(str.indexOf("已存在进出场")!=-1){ | 361 | if(str.indexOf("已存在进出场")!=-1){ |
342 | $("#btnAll").css("display","none"); | 362 | $("#btnAll").css("display","none"); |
343 | } | 363 | } |
344 | - | ||
345 | } | 364 | } |
346 | if(data.list ==undefined){ | 365 | if(data.list ==undefined){ |
347 | $("#agentName").val(""); | 366 | $("#agentName").val(""); |
348 | $("#agentno").val(""); | 367 | $("#agentno").val(""); |
349 | $("#driverid").val(""); | 368 | $("#driverid").val(""); |
350 | $("#drivername").val(""); | 369 | $("#drivername").val(""); |
370 | + $("#veTargeNo").val(""); | ||
371 | + $("#businessPro").val(""); | ||
351 | } | 372 | } |
352 | if(str.indexOf("车辆未备案")!=-1){ | 373 | if(str.indexOf("车辆未备案")!=-1){ |
353 | $("#btnAll").css("display","none"); | 374 | $("#btnAll").css("display","none"); |
@@ -67,12 +67,12 @@ | @@ -67,12 +67,12 @@ | ||
67 | <form:option value="" label="--请选择--" /> | 67 | <form:option value="" label="--请选择--" /> |
68 | </form:select> | 68 | </form:select> |
69 | 69 | ||
70 | - <label>是否出站</label> | 70 | + <%-- <label>是否出站</label> |
71 | <form:select path="contrastflag" class="input"> | 71 | <form:select path="contrastflag" class="input"> |
72 | <form:option value="" label="--请选择--" /> | 72 | <form:option value="" label="--请选择--" /> |
73 | <form:option value="已进站" label="已进站" /> | 73 | <form:option value="已进站" label="已进站" /> |
74 | <form:option value="已出站" label="已出站" /> | 74 | <form:option value="已出站" label="已出站" /> |
75 | - </form:select> | 75 | + </form:select> --%> |
76 | 76 | ||
77 | </li> | 77 | </li> |
78 | <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> |
@@ -83,9 +83,9 @@ | @@ -83,9 +83,9 @@ | ||
83 | <table id="contentTable" class="table table-striped table-bordered table-condensed"> | 83 | <table id="contentTable" class="table table-striped table-bordered table-condensed"> |
84 | <thead> | 84 | <thead> |
85 | <tr> | 85 | <tr> |
86 | - <shiro:hasRole name="dept"> | 86 | + <shiro:hasAnyRoles name="dept,admin,leader"> |
87 | <th>操作</th> | 87 | <th>操作</th> |
88 | - </shiro:hasRole> | 88 | + </shiro:hasAnyRoles> |
89 | <th>车牌号</th> | 89 | <th>车牌号</th> |
90 | <th>挂靠单位</th> | 90 | <th>挂靠单位</th> |
91 | <th>目的海关代码</th> | 91 | <th>目的海关代码</th> |
@@ -93,6 +93,8 @@ | @@ -93,6 +93,8 @@ | ||
93 | <th>卡口</th> | 93 | <th>卡口</th> |
94 | <th>地磅称重</th> | 94 | <th>地磅称重</th> |
95 | <th>总货重</th> | 95 | <th>总货重</th> |
96 | + <th>进出差值</th> | ||
97 | + <th>备案车重</th> | ||
96 | <th>业务类型</th> | 98 | <th>业务类型</th> |
97 | <th>二维码编号</th> | 99 | <th>二维码编号</th> |
98 | <th>进出场站</th> | 100 | <th>进出场站</th> |
@@ -104,11 +106,11 @@ | @@ -104,11 +106,11 @@ | ||
104 | <tbody> | 106 | <tbody> |
105 | <c:forEach items="${page.list}" var="landBusinesstypeList"> | 107 | <c:forEach items="${page.list}" var="landBusinesstypeList"> |
106 | <tr> | 108 | <tr> |
107 | - <shiro:hasRole name="dept"> | 109 | + <shiro:hasAnyRoles name="dept,admin,leader"> |
108 | <td> | 110 | <td> |
109 | <a href="${ctx}/land/landBusinesstypeList/form?id=${landBusinesstypeList.id}">查看</a> | 111 | <a href="${ctx}/land/landBusinesstypeList/form?id=${landBusinesstypeList.id}">查看</a> |
110 | </td> | 112 | </td> |
111 | - </shiro:hasRole> | 113 | + </shiro:hasAnyRoles> |
112 | <td>${landBusinesstypeList.trailerFrameNo}</td> | 114 | <td>${landBusinesstypeList.trailerFrameNo}</td> |
113 | <td>${landBusinesstypeList.agentname}</td> | 115 | <td>${landBusinesstypeList.agentname}</td> |
114 | <td>${landBusinesstypeList.endport}</td> | 116 | <td>${landBusinesstypeList.endport}</td> |
@@ -129,6 +131,8 @@ | @@ -129,6 +131,8 @@ | ||
129 | </td> | 131 | </td> |
130 | <td>${landBusinesstypeList.aislewt}</td> | 132 | <td>${landBusinesstypeList.aislewt}</td> |
131 | <td>${landBusinesstypeList.remark}</td> | 133 | <td>${landBusinesstypeList.remark}</td> |
134 | + <td>${landBusinesstypeList.remark1}</td> | ||
135 | + <td>${landBusinesstypeList.remark2}</td> | ||
132 | <td>${landBusinesstypeList.businesstype}</td> | 136 | <td>${landBusinesstypeList.businesstype}</td> |
133 | <td>${landBusinesstypeList.barcode}</td> | 137 | <td>${landBusinesstypeList.barcode}</td> |
134 | <td> | 138 | <td> |
@@ -143,6 +147,9 @@ | @@ -143,6 +147,9 @@ | ||
143 | <c:if test="${landBusinesstypeList.contrastflag==null ||landBusinesstypeList.contrastflag==''}"> | 147 | <c:if test="${landBusinesstypeList.contrastflag==null ||landBusinesstypeList.contrastflag==''}"> |
144 | <a href="${ctx}/land/landBusinesstypeList/form?id=${landBusinesstypeList.id}">修改</a> | 148 | <a href="${ctx}/land/landBusinesstypeList/form?id=${landBusinesstypeList.id}">修改</a> |
145 | <a href="${ctx}/land/landBusinesstypeList/delete?id=${landBusinesstypeList.id}" onclick="return confirmx('确认要删除该流转吗?', this.href)">删除</a> | 149 | <a href="${ctx}/land/landBusinesstypeList/delete?id=${landBusinesstypeList.id}" onclick="return confirmx('确认要删除该流转吗?', this.href)">删除</a> |
150 | + <shiro:hasAnyRoles name="dept,admin.leader"> | ||
151 | + <a href="${ctx}/land/landBusinesstypeList/update?id=${landBusinesstypeList.id}" onclick="return confirmx('确认要更新异常吗?', this.href)">异常处理</a> | ||
152 | + </shiro:hasAnyRoles> | ||
146 | </c:if> | 153 | </c:if> |
147 | </td></shiro:hasPermission> | 154 | </td></shiro:hasPermission> |
148 | </tr> | 155 | </tr> |
@@ -126,10 +126,10 @@ input { | @@ -126,10 +126,10 @@ input { | ||
126 | </span> | 126 | </span> |
127 | <label class="row-lable">行驶证有效期:</label> | 127 | <label class="row-lable">行驶证有效期:</label> |
128 | <span class="row-controls"> | 128 | <span class="row-controls"> |
129 | - <input name="VE_FACTORY_DATE" type="text" readonly="readonly" | 129 | + <input name="veFactoryDate" type="text" |
130 | maxlength="20" class="input-medium Wdate required" | 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});" /> | 131 | + value="<fmt:formatDate value="${landRoadVeRecord.veFactoryDate}" pattern="yyyy-MM-dd"/>" |
132 | + onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});" /> | ||
133 | <span class="help-inline"><font color="red">*</font></span> | 133 | <span class="help-inline"><font color="red">*</font></span> |
134 | </span> | 134 | </span> |
135 | </div> | 135 | </div> |
@@ -39,6 +39,7 @@ | @@ -39,6 +39,7 @@ | ||
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> |
44 | <th>车主联系方式</th> | 45 | <th>车主联系方式</th> |
@@ -55,6 +56,7 @@ | @@ -55,6 +56,7 @@ | ||
55 | <tr> | 56 | <tr> |
56 | <td>${landRoadVeRecord.coCode }</td> | 57 | <td>${landRoadVeRecord.coCode }</td> |
57 | <td>${landRoadVeRecord.proposer }</td> | 58 | <td>${landRoadVeRecord.proposer }</td> |
59 | + <td>${landRoadVeRecord.veTargetNo }</td> | ||
58 | <td>${landRoadVeRecord.domesticLisenceNo }</td> | 60 | <td>${landRoadVeRecord.domesticLisenceNo }</td> |
59 | <td>${landRoadVeRecord.veOwnerName }</td> | 61 | <td>${landRoadVeRecord.veOwnerName }</td> |
60 | <td>${landRoadVeRecord.ownerInsideTel }</td> | 62 | <td>${landRoadVeRecord.ownerInsideTel }</td> |
@@ -67,9 +69,9 @@ | @@ -67,9 +69,9 @@ | ||
67 | </a></td> | 69 | </a></td> |
68 | <shiro:hasPermission name="land:landRoadVeRecord:edit"><td> | 70 | <shiro:hasPermission name="land:landRoadVeRecord:edit"><td> |
69 | <a href="${ctx}/land/landRoadVeRecord/form?id=${landRoadVeRecord.id}">修改</a> | 71 | <a href="${ctx}/land/landRoadVeRecord/form?id=${landRoadVeRecord.id}">修改</a> |
70 | - <shiro:hasRole name="dept"> | 72 | + <shiro:hasAnyRoles name="dept,admin,leader"> |
71 | <a href="${ctx}/land/landRoadVeRecord/delete?id=${landRoadVeRecord.id}" onclick="return confirmx('确认要删除该备案吗?', this.href)">删除</a> | 73 | <a href="${ctx}/land/landRoadVeRecord/delete?id=${landRoadVeRecord.id}" onclick="return confirmx('确认要删除该备案吗?', this.href)">删除</a> |
72 | - </shiro:hasRole> | 74 | + </shiro:hasAnyRoles> |
73 | </td></shiro:hasPermission> | 75 | </td></shiro:hasPermission> |
74 | </tr> | 76 | </tr> |
75 | </c:forEach> | 77 | </c:forEach> |
-
请 注册 或 登录 后发表评论