Browse Source

钢坯热送002

qiangxuan 6 months ago
parent
commit
c142fa60d8

+ 9 - 12
zgztBus/jeecg-module-sbm/src/main/java/org/jeecg/modules/billet/billetHotsend/controller/BilletHotsendBaseController.java

@@ -1,7 +1,6 @@
 package org.jeecg.modules.billet.billetHotsend.controller;
 
 import com.alibaba.fastjson.JSONObject;
-import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@@ -110,15 +109,11 @@ public class BilletHotsendBaseController extends JeecgController<BilletHotsend,
     @PostMapping(value = "/addBilletHotsendInfo")
     public Result<?> addBilletHotsend(@RequestBody BilletHotsendDetailsVo billetHotsendDetailsVo) {
         // 根据铸机号、炉号查询热送单信息是否存在
-        String ccmNo = billetHotsendDetailsVo.getBilletHotsend().getCcmNo();
-        String heatNo = billetHotsendDetailsVo.getBilletHotsend().getHeatNo();
-        BilletHotsend billetHotsend = billetHotsendBaseService.getOne(new LambdaQueryWrapper<BilletHotsend>()
-                .eq(BilletHotsend::getCcmNo, ccmNo).eq(BilletHotsend::getHeatNo, heatNo));
-        if (oConvertUtils.isNotEmpty(billetHotsend)){
-            return Result.OK("该炉次钢坯热送信息已存在!");
-        }
         JSONObject jsonObject = billetHotsendBaseService.addBilletHotsendInfo(billetHotsendDetailsVo);
-        return Result.OK("钢坯热送信息新增成功!");
+        if (jsonObject.containsKey("fail")){
+            return Result.OK((String) jsonObject.get("fail"));
+        }
+        return Result.OK((String) jsonObject.get("success"));
     }
 
 
@@ -132,9 +127,11 @@ public class BilletHotsendBaseController extends JeecgController<BilletHotsend,
     @ApiOperation(value="钢坯棒线发车", notes="钢坯棒线发车")
     @PostMapping(value = "/rodLineDepart")
     public Result<?> adds(@RequestBody BilletHotsendDetailsVo billetHotsendDetailsVo) {
-        billetHotsendBaseService.saveBilletHotsendDetailsCar(billetHotsendDetailsVo);
-//        operateLogService.add(billetHotsend,null,BilletHotsend.class);
-        return Result.OK("棒线发车成功!");
+        JSONObject jsonObject = billetHotsendBaseService.saveBilletHotsendDetailsCar(billetHotsendDetailsVo);
+        if (jsonObject.containsKey("fail")){
+            return Result.OK((String) jsonObject.get("fail"));
+        }
+        return Result.OK((String) jsonObject.get("success"));
     }
 
 

+ 1 - 1
zgztBus/jeecg-module-sbm/src/main/java/org/jeecg/modules/billet/billetHotsend/service/IBilletHotsendBaseService.java

@@ -27,7 +27,7 @@ public interface IBilletHotsendBaseService extends IService<BilletHotsend> {
 
     Integer queryEndNumByCcmNo(String ccmNo, String heatNo, String belongTable);
 
-    void saveBilletHotsendDetailsCar(BilletHotsendDetailsVo billetHotsendDetailsVo);
+    JSONObject saveBilletHotsendDetailsCar(BilletHotsendDetailsVo billetHotsendDetailsVo);
 
     JSONObject addBilletHotsendInfo(BilletHotsendDetailsVo billetHotsendDetailsVo);
 }

File diff suppressed because it is too large
+ 311 - 660
zgztBus/jeecg-module-sbm/src/main/java/org/jeecg/modules/billet/billetHotsend/service/impl/BilletHotsendBaseServiceImpl.java


Some files were not shown because too many files changed in this diff