huxy 2 tygodni temu
rodzic
commit
0ba31ffc4d

+ 5 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/cost/mapper/SyCostAllocationMapper.java

@@ -1,5 +1,6 @@
 package org.jeecg.modules.cost.mapper;
 
+import java.math.BigDecimal;
 import java.util.List;
 
 import com.baomidou.dynamic.datasource.annotation.DS;
@@ -37,4 +38,8 @@ public interface SyCostAllocationMapper extends BaseMapper<SyCostAllocation> {
     //查询销售订单总数量
     @DS("multi-three")
     SyCostAllocation querySalerIauantity(@Param("csocode") List csocode);
+
+    //查询销售订单总数量
+    @DS("multi-three")
+    BigDecimal getPlanQuantity(@Param("code") String plannum);
 }

+ 7 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/cost/mapper/xml/SyCostAllocationMapper.xml

@@ -408,6 +408,13 @@
         and 销售订单号 is not null
 	</select>
 
+    <!-- 获取 头信息 主要是成衣委外及源头订单信息 -->
+    <select id="getPlanQuantity" resultType="java.math.BigDecimal">
+		select SuM(订单数量)
+        from TimeberwordFunction.dbo.sy_shipping_details_item101
+        where 委外采购订单号 like '%${code}%'
+	</select>
+
     <!--<select id="queryByCostHead2" resultType="java.lang.String">
         &#45;&#45; SS23-RPI-59960,SS23-PRI-59960-2
 

+ 3 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/cost/service/impl/SyCostAllocationServiceImpl.java

@@ -192,6 +192,9 @@ public class SyCostAllocationServiceImpl extends ServiceImpl<SyCostAllocationMap
         }
         syCostAllocation = list.get(0);
         List<String> strs3= syCostAllocationMapper.queryByCostHead3(plannum);
+
+        BigDecimal getPlanQuantity=syCostAllocationMapper.getPlanQuantity(plannum);//计划数量
+        syCostAllocation.setPlanQuantity(getPlanQuantity);
         syCostAllocation.setGarmentContractno(strs3.toString().substring(1,strs3.toString().length()-1));
         // 销售订单附件
         List<AccessorItem> accessorItemList = new ArrayList<>();