Pārlūkot izejas kodu

fix:“优化冰淇淋远程制作,添加冰沙机产品"

soobin 4 mēneši atpakaļ
vecāks
revīzija
d52f6b5e74

+ 8 - 0
src/main/java/com/szwl/controller/IndexController.java

@@ -391,6 +391,10 @@ public class IndexController {
         if (equimentType.equals("SI320")) {
             machineType = "2";
         }
+        // 如果是冰沙机
+        if (equimentType.equals("EF210")) {
+            machineType = "3";
+        }
         equipmentApply.setMachineType(machineType);
         equipmentApply.setCreateDate(new Date());
         equipmentApply.setModifyDate(new Date());
@@ -625,6 +629,10 @@ public class IndexController {
                                 if (equimentType.equals("SI320")) {
                                     saveGoodsData(equipmentId, machineType, 6, equimentType);
                                 }
+                            } else if (StringUtils.isNotEmpty(machineType) && machineType.equals("3")) {
+                                if (equimentType.equals("EF210")) {
+                                    saveGoodsData(equipmentId, machineType, 5, equimentType);
+                                }
                             }
                         }
 

+ 1 - 1
src/main/java/com/szwl/controller/SugarDoOrderController.java

@@ -35,7 +35,7 @@ public class SugarDoOrderController {
     //远程做糖状态回返
     @RequestMapping(value = "/updateSugarDoStatus.htm", method = RequestMethod.GET, produces = "text/html;charset=utf-8")
     @ResponseBody
-    public String updateSugarDoStatus(String clientId,  String status, String no,String note) {
+    public String updateSugarDoStatus(String clientId,  String status, String no, String note) {
         if(!StringUtils.isEmpty(no)&&!StringUtils.isEmpty(status)){
             LambdaQueryWrapper<TSugarDo> query = Wrappers.lambdaQuery();
             query.eq(TSugarDo::getNo,no);

+ 4 - 0
src/main/java/com/szwl/controller/TEquipmentApplyController.java

@@ -308,6 +308,10 @@ public class TEquipmentApplyController {
                             if (equipmentType.equals("SI320")) {
                                 saveGoodsData(equipmentId, machineType, 6, equipmentType);
                             }
+                        } else if (StringUtils.isNotEmpty(machineType) && machineType.equals("3")){
+                            if (equipmentType.equals("EF210")) {
+                                saveGoodsData(equipmentId, machineType, 5, equipmentType);
+                            }
                         }
                         LambdaQueryWrapper<TEquipment> query1 = Wrappers.lambdaQuery();
                         query1.eq(TEquipment::getClientId,clientId);

+ 3 - 1
src/main/java/com/szwl/controller/TSugarDoController.java

@@ -107,12 +107,14 @@ public class TSugarDoController {
             sugarDo.setModifyDate(date);
             tSugarDoService.save(sugarDo);
             String machineType = equipment.getMachineType();
+            JSONObject kindData = new JSONObject();
             if (StringUtils.isNotEmpty(machineType) && machineType.equals("2")) {
                 // 如果是冰淇淋
+                kindData.put("makeCodes", makeCodes);
+                kindData.put("no", sugarDo.getNo());
                 makeCodes = "[" + makeCodes + "]";
                 tEquipmentService.sentMessage(equipment.getClientId(), PushUtils.buildJson("dosugar", makeCodes).toString());
             } else {
-                JSONObject kindData = new JSONObject();
                 LambdaQueryWrapper<TProduct> queryWrapper = Wrappers.lambdaQuery();
                 queryWrapper.eq(TProduct::getEquipmentId, equipmentId);
                 queryWrapper.eq(TProduct::getProductName, productName);