ysh 2 роки тому
батько
коміт
60d7305c47

+ 9 - 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/openApi/controller/SubcontractingOrderController.java

@@ -2,6 +2,7 @@ package org.jeecg.modules.openApi.controller;
 
 import io.swagger.annotations.Api;
 import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang.StringUtils;
 import org.jeecg.common.system.base.controller.JeecgController;
 import org.jeecg.modules.openApi.entity.PurchaseWarehousing;
 import org.jeecg.modules.openApi.entity.ResHttpStatus;
@@ -16,6 +17,8 @@ import org.springframework.web.bind.annotation.RequestMethod;
 import org.springframework.web.bind.annotation.ResponseBody;
 import org.springframework.web.bind.annotation.RestController;
 
+import java.util.List;
+
 /**
  * @Description: 委外订单
  * @Author: jeecg-boot
@@ -38,8 +41,13 @@ public class SubcontractingOrderController extends JeecgController<Subcontractin
     @ResponseBody
     public ResponseEntity<ResHttpStatus> getSubcontractingOrderByCode(String code, String key) {
         ResHttpStatus res = new ResHttpStatus();
+        if(!StringUtils.isNotBlank(code)){
+            res.setCode("0");
+            res.setMsg("订单号不能为空");
+            res.setSuccess(false);
+        }
 
-        SubcontractingOrder order =subcontractingOrderService.selectOrderByCode("SYW313-森宏");
+        List<SubcontractingOrder> order =subcontractingOrderService.selectOrderByCode(code);//"SYW313-森宏"
         res.setCode("200");
         res.setMsg("成功");
         res.setSuccess(true);

+ 11 - 13
jeecg-boot-module-system/src/main/java/org/jeecg/modules/openApi/entity/SubcontractingOrder.java

@@ -1,23 +1,21 @@
 package org.jeecg.modules.openApi.entity;
 
-import com.baomidou.mybatisplus.annotation.TableName;
-import io.swagger.annotations.ApiModel;
 import lombok.Data;
-import lombok.EqualsAndHashCode;
-import lombok.experimental.Accessors;
 
 @Data
 public class SubcontractingOrder {
-    //染厂
+
+    private String cvcName; //染厂
     private String cCode; //委外订单号
     private String cInvCode; //存货编码
-    private String cInvName; //存货名称(英文名称)
+    private String cInvName; //存货名称
+    private String cEnglishName; //存货名称(英文名称)
     private String itemNumber; //款号
-    //缸号
-    //织厂
-    //颜色
-    private String dyeFactoryCode;//色号
-    //要求克重
-    //总卷数
-    //要求门幅
+    //缸号(条码取)
+    //织厂(条码取)
+    private String color;//颜色
+    private String colorNumber;//色号
+    private String gram;//要求克重
+    //总卷数(条码取)
+    private String doorWidth;//要求门幅
 }

+ 3 - 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/openApi/mapper/SubcontractingOrderMapper.java

@@ -4,6 +4,8 @@ import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import org.jeecg.modules.openApi.entity.SubcontractingOrder;
 
+import java.util.List;
+
 
 /**
  * @Description: 委外订单
@@ -17,6 +19,6 @@ public interface SubcontractingOrderMapper extends BaseMapper<SubcontractingOrde
      * @param code
      * @return
      */
-    SubcontractingOrder selectOrderByCode( String code);
+    List<SubcontractingOrder> selectOrderByCode(String code);
 
 }

+ 16 - 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/openApi/mapper/xml/SubcontractingOrderMapper.xml

@@ -4,7 +4,22 @@
 
     <select id="selectOrderByCode" resultType="org.jeecg.modules.openApi.entity.SubcontractingOrder">
 
-        select * from OM_MOMain where ccode = 'SYW313-森宏'
+        select e.cvcName ,-- 染厂
+               a.cCode ,-- 委外订单号
+               b.cInvCode , -- 存货编码
+               c.cInvName , -- 存货名称
+               c.cEnglishName , -- 存货英文名称
+               b.cdefine22 itemNumber, -- 款号
+               b.cfree1 color-- 颜色
+                -- 色号
+                -- 要求克重
+                -- 要求门幅
+        from OM_MOMain a
+                 left join OM_MODetails b on a.moid = b.moid
+                 left join Inventory c on b.cInvCode = c.cInvCode
+                 left join Vendor d on a.cVenCode = d.cVenCode
+                 left join VendorClass e on d.cVCCode = e.cVCCode
+        where a.ccode = #{code}
 
     </select>
 </mapper>

+ 3 - 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/openApi/service/SubcontractingOrderService.java

@@ -3,7 +3,9 @@ package org.jeecg.modules.openApi.service;
 import com.baomidou.mybatisplus.extension.service.IService;
 import org.jeecg.modules.openApi.entity.SubcontractingOrder;
 
+import java.util.List;
+
 public interface SubcontractingOrderService extends IService<SubcontractingOrder> {
 
-    SubcontractingOrder selectOrderByCode(String code);
+    List<SubcontractingOrder> selectOrderByCode(String code);
 }

+ 2 - 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/openApi/service/impl/SubcontractingOrderImpl.java

@@ -10,6 +10,7 @@ import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
 import javax.annotation.Resource;
+import java.util.List;
 
 @Service
 public class SubcontractingOrderImpl extends ServiceImpl<SubcontractingOrderMapper, SubcontractingOrder> implements SubcontractingOrderService {
@@ -18,7 +19,7 @@ public class SubcontractingOrderImpl extends ServiceImpl<SubcontractingOrderMapp
     private SubcontractingOrderMapper subcontractingOrderMapper;
 
     @DS("multi-one")
-    public SubcontractingOrder selectOrderByCode(String code){
+    public List<SubcontractingOrder> selectOrderByCode(String code){
         return subcontractingOrderMapper.selectOrderByCode(code);
     }
 }