正在显示
1 个修改的文件
包含
12 行增加
和
9 行删除
@@ -200,18 +200,21 @@ public class SecurityDeclarationController { | @@ -200,18 +200,21 @@ public class SecurityDeclarationController { | ||
200 | sdCargoTypeService.save(sdCargoTypeEntity); | 200 | sdCargoTypeService.save(sdCargoTypeEntity); |
201 | } | 201 | } |
202 | 202 | ||
203 | - //货物品名 | ||
204 | - String cName = cargoName.replaceAll(",", ","); | ||
205 | - String[] split = cName.split(","); | ||
206 | - for (int i=0; i<split.length; i++){ | ||
207 | - if (!StringUtils.isBlank(split[i]) || !"".equals(split[i])){ | ||
208 | - SDCargoNameEntity sdCargoNameEntity = new SDCargoNameEntity(); | ||
209 | - sdCargoNameEntity.setSd_waybill(waybill); | ||
210 | - sdCargoNameEntity.setSd_cargo_name(split[i]); | ||
211 | - sdCargoNameService.save(sdCargoNameEntity); | 203 | + if(StringUtils.isBlank(cargoName)){ |
204 | + //货物品名 | ||
205 | + String cName = cargoName.replaceAll(",", ","); | ||
206 | + String[] split = cName.split(","); | ||
207 | + for (int i=0; i<split.length; i++){ | ||
208 | + if (!StringUtils.isBlank(split[i]) || !"".equals(split[i])){ | ||
209 | + SDCargoNameEntity sdCargoNameEntity = new SDCargoNameEntity(); | ||
210 | + sdCargoNameEntity.setSd_waybill(waybill); | ||
211 | + sdCargoNameEntity.setSd_cargo_name(split[i]); | ||
212 | + sdCargoNameService.save(sdCargoNameEntity); | ||
213 | + } | ||
212 | } | 214 | } |
213 | } | 215 | } |
214 | 216 | ||
217 | + | ||
215 | UserEntity ue = (UserEntity)SecurityUtils.getSubject().getSession().getAttribute("user"); | 218 | UserEntity ue = (UserEntity)SecurityUtils.getSubject().getSession().getAttribute("user"); |
216 | //添加安检申报 | 219 | //添加安检申报 |
217 | SecurityDeclarationEntity sd = new SecurityDeclarationEntity(); | 220 | SecurityDeclarationEntity sd = new SecurityDeclarationEntity(); |
-
请 注册 或 登录 后发表评论