ccj vor 11 Monaten
Ursprung
Commit
12c7d9d7ab

+ 1 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/mapper/WarehousePositionStorageInfoMapper.java

@@ -26,4 +26,5 @@ public interface WarehousePositionStorageInfoMapper extends BaseMapper<Warehouse
     List<BiViewInfo> selectSumWareNewByGoods(String compId, String baseId, String flag, String seachMoth, String jointVentureParties);
     List<BiViewInfo> selectSumWareChaoByGoods(String compId, String baseId, String flag, String seachMoth, String jointVentureParties);
     List<WarehouseNumView> getQuantityZhe(String compId,String baseId, String flag, String seachMoth);
+    List<WarehouseNumView> getQuantityHong(String compId,String baseId, String flag, String seachMoth);
 }

+ 9 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/InOutWarehouseTaskServiceImpl.java

@@ -919,6 +919,15 @@ public class InOutWarehouseTaskServiceImpl extends ServiceImpl<InOutWarehouseTas
                     .orderBy("update_date", false));
             inOutWarehouseTaskList = inOutWarehouseTaskList1;
         }
+        //所有出入库任务
+        else if("5".equals(inOutWarehouseTask.getFlag())){
+            List<InOutWarehouseTask> inOutWarehouseTaskList1 = this.selectList(new EntityWrapper<InOutWarehouseTask>()
+                    .eq("comp_id", AuthSecurityUtils.getCurrentUserInfo().getCompId())
+                    .eq("warehouse_name", inOutWarehouseTask.getWarehouseName())
+                    .ge("update_date", DateUtil.formatDate(calendar.getTime(), DateUtils.DATE_FMT_YYYY_MM_DD))
+                    .orderBy("update_date", false));
+            inOutWarehouseTaskList = inOutWarehouseTaskList1;
+        }
         //入库
         else {
             List<InOutWarehouseTask> inOutWarehouseTaskList1 = this.selectList(new EntityWrapper<InOutWarehouseTask>()

+ 10 - 1
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/WarehouseBaseInfoServiceImpl.java

@@ -5967,6 +5967,8 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
     public WarehouseBaseInfo getQuantityZhe(String compId, String baseId) {
         String seachMonth = "2022-10-01";
         List<WarehouseNumView> warehouseNumViewList = warehousePositionStorageInfoMapper.getQuantityZhe(compId, baseId, "2", seachMonth);
+        //烘干数
+        List<WarehouseNumView> warehouseNumViewListHong = warehousePositionStorageInfoMapper.getQuantityHong(compId, baseId, "2", seachMonth);
         List<WarehouseNumView> warehouseNumViewList1 = warehousePositionStorageInfoMapper.getQuantityZhe(compId, baseId, "1", seachMonth);
         WarehouseBaseInfo warehouseBaseInfo = new WarehouseBaseInfo();
         List<WarehouseNumView> list = new ArrayList<>();
@@ -5974,7 +5976,14 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
             for (int i = 0; i < warehouseNumViewList.size(); i++) {
                 WarehouseNumView biViewInfo = new WarehouseNumView();
                 biViewInfo.setGoodsName(warehouseNumViewList.get(i).getGoodsName());
-                biViewInfo.setPureWeight(warehouseNumViewList.get(i).getPureWeight());
+                Double hongNum = 0.0d;
+                for (WarehouseNumView tmp: warehouseNumViewListHong
+                     ) {
+                    if(tmp.getGoodsName().equals(warehouseNumViewList.get(i).getGoodsName())){
+                        hongNum = tmp.getPureWeight();
+                    }
+                }
+                biViewInfo.setPureWeight(warehouseNumViewList.get(i).getPureWeight() - hongNum);
                 if (org.apache.commons.collections.CollectionUtils.isNotEmpty(warehouseNumViewList1)) {
                     for (int j = 0; j < warehouseNumViewList1.size(); j++) {
                         if (warehouseNumViewList.get(i).getGoodsName().equals(warehouseNumViewList1.get(j).getGoodsName())) {

+ 1 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/WarehouseInOutInfoServiceImpl.java

@@ -2860,6 +2860,7 @@ public class WarehouseInOutInfoServiceImpl extends ServiceImpl<WarehouseInOutInf
         pageView.put("currentPage", warehouseInOutInfo.getCurrentPage());
         pageView.put("phone", warehouseInOutInfo.getPhone());
         pageView.put("binded", warehouseInOutInfo.getBinded());
+        pageView.put("inOutTaskNo", warehouseInOutInfo.getInOutTaskNo());
         // 查询记录总数
         Integer dataCount = baseMapper.getCountByCondition(pageView);
         List<WarehouseInOutInfo> dataList = baseMapper.getListByCondition(pageView);

+ 12 - 12
winsea-haixin-plugin-yiliangyiyun/src/main/resources/mapper/WarehouseBaseInfoMapper.xml

@@ -106,11 +106,11 @@
             AND a.warehouse_name= #{warehouseName}
         </if>
         <if test="startDate != null">
-            AND (DATE_FORMAT(a.settlement_date,"%Y%m%d%H%i%s") &gt;=
+            AND (DATE_FORMAT(a.settlement_date,"%Y%m%d%H%i%s") &gt;
             DATE_FORMAT(#{startDate},"%Y%m%d%H%i%s"))
         </if>
         <if test="endDate != null">
-            AND (DATE_FORMAT(a.settlement_date,"%Y%m%d%H%i%s") &lt;=
+            AND (DATE_FORMAT(a.settlement_date,"%Y%m%d%H%i%s") &lt;
             DATE_FORMAT(#{endDate},"%Y%m%d%H%i%s"))
         </if>
         UNION ALL
@@ -186,11 +186,11 @@
             AND s.warehouse_name= #{warehouseName}
         </if>
         <if test="startDate != null">
-            AND (DATE_FORMAT(w.update_date,"%Y%m%d%H%i%s") &gt;=
+            AND (DATE_FORMAT(w.update_date,"%Y%m%d%H%i%s") &gt;
             DATE_FORMAT(#{startDate},"%Y%m%d%H%i%s"))
         </if>
         <if test="endDate != null">
-            AND (DATE_FORMAT(w.update_date,"%Y%m%d%H%i%s") &lt;=
+            AND (DATE_FORMAT(w.update_date,"%Y%m%d%H%i%s") &lt;
             DATE_FORMAT(#{endDate},"%Y%m%d%H%i%s"))
         </if>
         group by w.id
@@ -275,11 +275,11 @@
             AND w.warehouse_name= #{warehouseName}
         </if>
         <if test="startDate != null">
-            AND (DATE_FORMAT(w.update_date,"%Y%m%d%H%i%s") &gt;=
+            AND (DATE_FORMAT(w.update_date,"%Y%m%d%H%i%s") &gt;
             DATE_FORMAT(#{startDate},"%Y%m%d%H%i%s"))
         </if>
         <if test="endDate != null">
-            AND (DATE_FORMAT(w.update_date,"%Y%m%d%H%i%s") &lt;=
+            AND (DATE_FORMAT(w.update_date,"%Y%m%d%H%i%s") &lt;
             DATE_FORMAT(#{endDate},"%Y%m%d%H%i%s"))
         </if>
         group by w.id
@@ -351,11 +351,11 @@
             AND w.warehouse_name= #{warehouseName}
         </if>
         <if test="startDate != null">
-            AND (DATE_FORMAT(w.update_date,"%Y%m%d%H%i%s") &gt;=
+            AND (DATE_FORMAT(w.update_date,"%Y%m%d%H%i%s") &gt;
             DATE_FORMAT(#{startDate},"%Y%m%d%H%i%s"))
         </if>
         <if test="endDate != null">
-            AND (DATE_FORMAT(w.update_date,"%Y%m%d%H%i%s") &lt;=
+            AND (DATE_FORMAT(w.update_date,"%Y%m%d%H%i%s") &lt;
             DATE_FORMAT(#{endDate},"%Y%m%d%H%i%s"))
         </if>
         group by w.id
@@ -437,11 +437,11 @@
             AND w.warehouse_name= #{warehouseName}
         </if>
         <if test="startDate != null">
-            AND (DATE_FORMAT(w.update_date,"%Y%m%d%H%i%s") &gt;=
+            AND (DATE_FORMAT(w.update_date,"%Y%m%d%H%i%s") &gt;
             DATE_FORMAT(#{startDate},"%Y%m%d%H%i%s"))
         </if>
         <if test="endDate != null">
-            AND (DATE_FORMAT(w.update_date,"%Y%m%d%H%i%s") &lt;=
+            AND (DATE_FORMAT(w.update_date,"%Y%m%d%H%i%s") &lt;
             DATE_FORMAT(#{endDate},"%Y%m%d%H%i%s"))
         </if>
         GROUP BY w.id
@@ -522,11 +522,11 @@
             AND s.warehouse_name= #{warehouseName}
         </if>
         <if test="startDate != null">
-            AND (DATE_FORMAT(s.delivery_date,"%Y%m%d%H%i%s") &gt;=
+            AND (DATE_FORMAT(s.delivery_date,"%Y%m%d%H%i%s") &gt;
             DATE_FORMAT(#{startDate},"%Y%m%d%H%i%s"))
         </if>
         <if test="endDate != null">
-            AND (DATE_FORMAT(s.delivery_date,"%Y%m%d%H%i%s") &lt;=
+            AND (DATE_FORMAT(s.delivery_date,"%Y%m%d%H%i%s") &lt;
             DATE_FORMAT(#{endDate},"%Y%m%d%H%i%s"))
         </if>
         GROUP BY w.id

+ 6 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/resources/mapper/WarehouseInOutInfoMapper.xml

@@ -23,6 +23,9 @@
         <if test="binded != null and binded != ''">
             AND w.binded = #{binded}
         </if>
+        <if test="inOutTaskNo != null and inOutTaskNo != ''">
+            AND w.in_out_task_no = #{inOutTaskNo}
+        </if>
         <if test="printedFlag != null and printedFlag != ''">
             AND w.printed_flag = #{printedFlag}
         </if>
@@ -170,6 +173,9 @@
         <if test="binded != null and binded != ''">
             AND w.binded = #{binded}
         </if>
+        <if test="inOutTaskNo != null and inOutTaskNo != ''">
+            AND w.in_out_task_no = #{inOutTaskNo}
+        </if>
         <if test="printedFlag != null and printedFlag != ''">
             AND w.printed_flag = #{printedFlag}
         </if>

+ 27 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/resources/mapper/WarehousePositionStorageInfoMapper.xml

@@ -141,4 +141,31 @@
         group by
         REPLACE(wioi.goods_name,'(潮粮)','')
     </select>
+    <select id="getQuantityHong" resultType="com.yh.saas.plugin.yiliangyiyun.entity.view.WarehouseNumView">
+        SELECT
+        REPLACE(wioi.goods_name,'(潮粮)','') as goodsName,
+        ifnull(sum( case when wioi.goods_name like '%潮粮%' and wioi.type = '潮粮' then wioi.pure_weight else wioi.net_weight end ),0) as pureWeight
+        FROM
+        warehouse_in_out_info wioi
+        LEFT JOIN warehouse_base_info wbi ON wbi.id = wioi.base_id
+        AND wbi.delete_flag = 0
+        left join in_out_warehouse_task iowt on iowt.in_out_task_no = wioi.in_out_task_no and iowt.delete_flag = 0
+        WHERE
+        wioi.delete_flag = 0
+        and iowt.task_flag = '烘干入库'
+        and wbi.comp_id = #{compId}
+        and
+        wioi.status_flag = '3'
+        <if test="baseId != null">
+            and wbi.id = #{baseId}
+        </if>
+        and wioi.in_out_flag = #{flag}
+        and wioi.in_out_type not like '%折%'
+        <if test="seachMoth != null and seachMoth != ''">
+            and wioi.create_date >= #{seachMoth}
+            and wbi.create_date >= #{seachMoth}
+        </if>
+        group by
+        REPLACE(wioi.goods_name,'(潮粮)','')
+    </select>
 </mapper>