zx 2 years ago
parent
commit
b38c7346f4

+ 3 - 0
src/main/java/com/steerinfo/dil/controller/AmsshipDeliveryNoticeController.java

@@ -89,6 +89,9 @@ public class AmsshipDeliveryNoticeController extends BaseRESTfulController {
     @PostMapping(value = "/insertDeliveryNotice")
     public RESTfulResult insertSelective(@RequestBody Map<String,Object> map){
         int code=amsshipDeliveryNoticeService.insert(map);
+        if (code==-1){
+            return failed("进厂船名重复,请输入唯一的进厂船名");
+        }
         return success(code);
     }
 

+ 1 - 0
src/main/java/com/steerinfo/dil/service/impl/AmsshipDeliveryNoticeServiceImpl.java

@@ -133,6 +133,7 @@ public class AmsshipDeliveryNoticeServiceImpl implements IAmsshipDeliveryNoticeS
         //如果存在则取批次id
         if (batchFacotryId != null && batchFacotryId.intValue() != 0){
             amsshipDeliveryNotice.setBatchId(batchFacotryId);
+            return -1;
         }else {
             Map<String, Object> map1 = dilBatchService.insertBatchId(map);
             if (map1 != null) {

+ 1 - 1
src/main/resources/application-prod.yml

@@ -27,7 +27,7 @@ piction:
 
 openfeign:
   WmshboundFeign:
-    url: ${WMSHBOUNDFEIGN_URL:172.16.33.166:8070}
+    url: ${WMSHBOUNDFEIGN_URL:localhost:8070}
   ColumnDataFeign:
     url: ${COLUMNDATAFEIGN_URL:172.16.33.166:8083}