修改预配远程调用 接口名称 接口添加 参数是否为空 判断 安检添加 后台校验 货物品名是否为空
正在显示
5 个修改的文件
包含
38 行增加
和
21 行删除
@@ -1253,16 +1253,34 @@ public class ManifestController extends BasicController { | @@ -1253,16 +1253,34 @@ public class ManifestController extends BasicController { | ||
1253 | * @param manifest | 1253 | * @param manifest |
1254 | * @return | 1254 | * @return |
1255 | */ | 1255 | */ |
1256 | - @RequestMapping(value = "/savesenManifest", method = { RequestMethod.POST }) | 1256 | + @RequestMapping(value = "/f5f5669bbdecefd3dacfaba194647c35", method = { RequestMethod.POST }) |
1257 | @ResponseBody | 1257 | @ResponseBody |
1258 | public ResponseModel savesenManifest(ManifestEntity manifest, HttpServletRequest request, HttpServletResponse response) { | 1258 | public ResponseModel savesenManifest(ManifestEntity manifest, HttpServletRequest request, HttpServletResponse response) { |
1259 | 1259 | ||
1260 | ResponseModel model = new ResponseModel(); | 1260 | ResponseModel model = new ResponseModel(); |
1261 | - if ("dcdf38d9a5d6411985e49155481882f5".equals(manifest.getDe_size())){ | ||
1262 | - | ||
1263 | - if(manifest.getWaybillnomaster().contains("-")){ | 1261 | + try { |
1262 | + if ("dcdf38d9a5d6411985e49155481882f5".equals(manifest.getDe_size())) { | ||
1263 | + | ||
1264 | + if (StringUtils.isBlank(manifest.getWaybillnomaster()) || StringUtils.isBlank(manifest.getDe_type()) | ||
1265 | + || StringUtils.isBlank(manifest.getDelivery_station()) || StringUtils.isBlank(manifest.getFlightno()) | ||
1266 | + || manifest.getFlightdate() == null || StringUtils.isBlank(manifest.getOriginatingstation()) | ||
1267 | + || StringUtils.isBlank(manifest.getDestinationstation()) || StringUtils.isBlank(manifest.getTotalpiece()) | ||
1268 | + || StringUtils.isBlank(manifest.getTotalweight()) || StringUtils.isBlank(manifest.getPaymode()) | ||
1269 | + || StringUtils.isBlank(manifest.getCustomsstatus()) || StringUtils.isBlank(manifest.getCustomscode()) | ||
1270 | + || StringUtils.isBlank(manifest.getName_ofgoods()) || StringUtils.isBlank(manifest.getCo_company()) | ||
1271 | + || StringUtils.isBlank(manifest.getCo_address()) || StringUtils.isBlank(manifest.getShpcusid()) | ||
1272 | + || StringUtils.isBlank(manifest.getCo_country()) || StringUtils.isBlank(manifest.getSh_company()) | ||
1273 | + || StringUtils.isBlank(manifest.getSh_address()) || StringUtils.isBlank(manifest.getCnecusid()) | ||
1274 | + || StringUtils.isBlank(manifest.getSh_country()) || StringUtils.isBlank(manifest.getSh_city()) | ||
1275 | + || StringUtils.isBlank(manifest.getReach_station()) || manifest.getUSER_ID() == null){ | ||
1276 | + | ||
1277 | + model.setStatus(203); | ||
1278 | + model.setMsg("缺少参数"); | ||
1264 | 1279 | ||
1265 | }else { | 1280 | }else { |
1281 | + if (manifest.getWaybillnomaster().contains("-")) { | ||
1282 | + | ||
1283 | + } else { | ||
1266 | StringBuilder stringBuilder = new StringBuilder(manifest.getWaybillnomaster()); | 1284 | StringBuilder stringBuilder = new StringBuilder(manifest.getWaybillnomaster()); |
1267 | 1285 | ||
1268 | StringBuilder waybill = stringBuilder.insert(3, "-"); | 1286 | StringBuilder waybill = stringBuilder.insert(3, "-"); |
@@ -1283,8 +1301,7 @@ public class ManifestController extends BasicController { | @@ -1283,8 +1301,7 @@ public class ManifestController extends BasicController { | ||
1283 | manifest.setFlightno(flightno); | 1301 | manifest.setFlightno(flightno); |
1284 | 1302 | ||
1285 | 1303 | ||
1286 | - try { | ||
1287 | -// manifest.setUSER_ID(Tools.getUserId()); | 1304 | + // manifest.setUSER_ID(Tools.getUserId()); |
1288 | ManifestEntity wbm = manifestService.findWbm(manifest.getWaybillnomaster()); | 1305 | ManifestEntity wbm = manifestService.findWbm(manifest.getWaybillnomaster()); |
1289 | if (wbm != null) { | 1306 | if (wbm != null) { |
1290 | model.setStatus(201); | 1307 | model.setStatus(201); |
@@ -1305,16 +1322,19 @@ public class ManifestController extends BasicController { | @@ -1305,16 +1322,19 @@ public class ManifestController extends BasicController { | ||
1305 | model.setData(manifest); | 1322 | model.setData(manifest); |
1306 | model.setStatus(200); | 1323 | model.setStatus(200); |
1307 | model.setMsg(HttpJsonMsg.SUCCESS); | 1324 | model.setMsg(HttpJsonMsg.SUCCESS); |
1325 | + | ||
1326 | + | ||
1327 | + } | ||
1328 | + } | ||
1329 | + }else{ | ||
1330 | + model.setStatus(202); | ||
1331 | + model.setMsg("缺少验证密码"); | ||
1308 | } | 1332 | } |
1309 | } catch (Exception e) { | 1333 | } catch (Exception e) { |
1310 | model.setStatus(500); | 1334 | model.setStatus(500); |
1311 | model.setMsg(HttpJsonMsg.ERROR); | 1335 | model.setMsg(HttpJsonMsg.ERROR); |
1312 | logger.error("系统异常 >>", e); | 1336 | logger.error("系统异常 >>", e); |
1313 | } | 1337 | } |
1314 | - }else { | ||
1315 | - model.setStatus(202); | ||
1316 | - model.setMsg("缺少验证密码"); | ||
1317 | - } | ||
1318 | return model; | 1338 | return model; |
1319 | } | 1339 | } |
1320 | 1340 |
@@ -200,7 +200,7 @@ public class SecurityDeclarationController { | @@ -200,7 +200,7 @@ public class SecurityDeclarationController { | ||
200 | sdCargoTypeService.save(sdCargoTypeEntity); | 200 | sdCargoTypeService.save(sdCargoTypeEntity); |
201 | } | 201 | } |
202 | 202 | ||
203 | - if(StringUtils.isBlank(cargoName)){ | 203 | + if(!StringUtils.isBlank(cargoName)){ |
204 | //货物品名 | 204 | //货物品名 |
205 | String cName = cargoName.replaceAll(",", ","); | 205 | String cName = cargoName.replaceAll(",", ","); |
206 | String[] split = cName.split(","); | 206 | String[] split = cName.split(","); |
@@ -29,7 +29,7 @@ public class MyShiroController implements Filter { | @@ -29,7 +29,7 @@ public class MyShiroController implements Filter { | ||
29 | } | 29 | } |
30 | 30 | ||
31 | private String publicAction[] = { "/login", "/doLogin", "/manifest/app/send", | 31 | private String publicAction[] = { "/login", "/doLogin", "/manifest/app/send", |
32 | - "/receipt/a0608c4054662dd902e1314f7e450e3eaa81c114", "/manifest/savesenManifest" }; | 32 | + "/receipt/a0608c4054662dd902e1314f7e450e3eaa81c114", "/manifest/f5f5669bbdecefd3dacfaba194647c35" }; |
33 | private String crossDomain[] = { "/cross/", "tracking/detail" }; | 33 | private String crossDomain[] = { "/cross/", "tracking/detail" }; |
34 | 34 | ||
35 | // manifest/cross/grid.json | 35 | // manifest/cross/grid.json |
@@ -70,16 +70,14 @@ | @@ -70,16 +70,14 @@ | ||
70 | <bean id="shiroFilter" class="org.apache.shiro.spring.web.ShiroFilterFactoryBean"> | 70 | <bean id="shiroFilter" class="org.apache.shiro.spring.web.ShiroFilterFactoryBean"> |
71 | <property name="securityManager" ref="securityManager" /> | 71 | <property name="securityManager" ref="securityManager" /> |
72 | <property name="loginUrl" value="/login" /> | 72 | <property name="loginUrl" value="/login" /> |
73 | - <property name="unauthorizedUrl" value="/unauthorized" /> | 73 | + <!--<property name="unauthorizedUrl" value="/manifest/savesendMainfest" />--> |
74 | <property name="filterChainDefinitions"> | 74 | <property name="filterChainDefinitions"> |
75 | 75 | ||
76 | <value> | 76 | <value> |
77 | /receipt/a0608c4054662dd902e1314f7e450e3eaa81c114 = anon | 77 | /receipt/a0608c4054662dd902e1314f7e450e3eaa81c114 = anon |
78 | /login = anon | 78 | /login = anon |
79 | <!--开放预配添加接口--> | 79 | <!--开放预配添加接口--> |
80 | - /manifest/savesend = anon | ||
81 | - | ||
82 | - | 80 | + <!--/manifest/savesenManifest = anon--> |
83 | /druid/** = anon | 81 | /druid/** = anon |
84 | /unauthorized = anon | 82 | /unauthorized = anon |
85 | /resource/** = anon | 83 | /resource/** = anon |
@@ -89,10 +87,8 @@ | @@ -89,10 +87,8 @@ | ||
89 | /change/passwd= anon | 87 | /change/passwd= anon |
90 | /captcha/** = anon | 88 | /captcha/** = anon |
91 | /fileDownload/** = anon | 89 | /fileDownload/** = anon |
92 | - | ||
93 | /**/cross/** = anon | 90 | /**/cross/** = anon |
94 | /tracking/detail/** = anon | 91 | /tracking/detail/** = anon |
95 | - | ||
96 | /manifest/save = anon | 92 | /manifest/save = anon |
97 | /logout = logout | 93 | /logout = logout |
98 | /** = anon | 94 | /** = anon |
1 | <?xml version="1.0" encoding="UTF-8"?> | 1 | <?xml version="1.0" encoding="UTF-8"?> |
2 | <beans xmlns="http://www.springframework.org/schema/beans" | 2 | <beans xmlns="http://www.springframework.org/schema/beans" |
3 | - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context" | 3 | + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
4 | + xmlns:context="http://www.springframework.org/schema/context" | ||
4 | xmlns:mvc="http://www.springframework.org/schema/mvc" xmlns:aop="http://www.springframework.org/schema/aop" | 5 | xmlns:mvc="http://www.springframework.org/schema/mvc" xmlns:aop="http://www.springframework.org/schema/aop" |
5 | xmlns:p="http://www.springframework.org/schema/p" xmlns:task="http://www.springframework.org/schema/task" | 6 | xmlns:p="http://www.springframework.org/schema/p" xmlns:task="http://www.springframework.org/schema/task" |
7 | + xmlns:jawxs="http://cxf.apache.org/jaxws" | ||
6 | xsi:schemaLocation="http://www.springframework.org/schema/beans | 8 | xsi:schemaLocation="http://www.springframework.org/schema/beans |
7 | http://www.springframework.org/schema/beans/spring-beans.xsd | 9 | http://www.springframework.org/schema/beans/spring-beans.xsd |
8 | http://www.springframework.org/schema/context | 10 | http://www.springframework.org/schema/context |
@@ -12,7 +14,7 @@ | @@ -12,7 +14,7 @@ | ||
12 | http://www.springframework.org/schema/aop | 14 | http://www.springframework.org/schema/aop |
13 | http://www.springframework.org/schema/aop/spring-aop.xsd | 15 | http://www.springframework.org/schema/aop/spring-aop.xsd |
14 | http://www.springframework.org/schema/task | 16 | http://www.springframework.org/schema/task |
15 | - http://www.springframework.org/schema/task/spring-task-4.0.xsd"> | 17 | + http://www.springframework.org/schema/task/spring-task-4.0.xsd http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd"> |
16 | 18 | ||
17 | <mvc:cors> | 19 | <mvc:cors> |
18 | <mvc:mapping path="/api/**" allowed-origins="http://d.demo.com:8080" | 20 | <mvc:mapping path="/api/**" allowed-origins="http://d.demo.com:8080" |
@@ -122,5 +124,4 @@ | @@ -122,5 +124,4 @@ | ||
122 | 124 | ||
123 | <!-- <context:component-scan base-package="com.agent.billcheck"/> | 125 | <!-- <context:component-scan base-package="com.agent.billcheck"/> |
124 | <task:annotation-driven/> --> | 126 | <task:annotation-driven/> --> |
125 | - | ||
126 | </beans> | 127 | </beans> |
-
请 注册 或 登录 后发表评论