Jelajahi Sumber

第一阶段脚本

zhangguo 1 Minggu lalu
induk
melakukan
bb1f086b16

+ 25 - 1
Dic/README.md

@@ -63,4 +63,28 @@
 
 <h2 id="组坯">组坯</h2>
 
-似乎有这个概念,当然可能也没有
+似乎有这个概念,当然可能也没有
+
+<h2 id="实体视图">实体视图</h2>
+
+oracle数据库的概念,作为视图,但是又要持久化,刷新频率随缘,刷新内容全量,危险性非常大
+
+<h2 id="材料状态">材料状态</h2>
+
+材料状态(801501在制品阶段、801502成品、801503商品...)去问下生产
+
+<h2 id="生产批号">生产批号</h2>
+
+车管工序生产批号,去问一下生产
+
+<h2 id="组号(长度分组)">组号(长度分组)</h2>
+
+组号(长度分组)
+
+<h2 id="产出盘盈">产出盘盈</h2>
+
+是什么意思呢
+
+<h2 id="申请判定单号">申请判定单号</h2>
+
+C072801402202012307060611 这么长一串,怎么解读?

+ 6 - 6
MES_FIN_MONTH/FinMES202602.md

@@ -69,19 +69,19 @@
 
 - 调整下列存储过程
   
-  > 月份改为当月02和次月03 (需要重新确认一次)
+  > 月份改为当月02和次月03 (其中有一条特殊,带上几个关键值时,时间还是01)
   > 
   > **理解阶段1**
   > 
-  > [MES_CX_YDM_BC_INITIAL_hand](./FinMES202602/MES_CX_YDM_BC_INITIAL_hand.md)
+  > [MES_CX_YDM_BC_INITIAL_hand](./FinMES202602/MES_CX_YDM_BC_INITIAL_hand.md) 持久化半成品期初
   > 
-  > [mes_cx_ydm_bc_inlist_csjg_hand](./FinMES202602/mes_cx_ydm_bc_inlist_csjg_hand.md)
+  > [mes_cx_ydm_bc_inlist_csjg_hand](./FinMES202602/mes_cx_ydm_bc_inlist_csjg_hand.md) 持久化半成品入库
   > 
-  > [mes_cx_ydm_bc_inlist_new_hand](./FinMES202602/mes_cx_ydm_bc_inlist_new_hand.md)
+  > [mes_cx_ydm_bc_inlist_new_hand](./FinMES202602/mes_cx_ydm_bc_inlist_new_hand.md) 持久化半成品入库(特别版本 为红冲改变权单独实现的)
   > 
-  > [mes_cx_ydm_bc_outlist_csjg](./FinMES202602/mes_cx_ydm_bc_outlist_csjg.md)
+  > [mes_cx_ydm_bc_outlist_csjg](./FinMES202602/mes_cx_ydm_bc_outlist_csjg.md) 持久化半成品出库
   > 
-  > [mes_cx_ydm_bc_outlist_new_hand](./FinMES202602/mes_cx_ydm_bc_outlist_new_hand.md)
+  > [mes_cx_ydm_bc_outlist_new_hand](./FinMES202602/mes_cx_ydm_bc_outlist_new_hand.md) 也是持久化半成品出库(特别版本)
   > 
   > **理解阶段2**
   > 

+ 28 - 29
MES_FIN_MONTH/FinMES202602/MES_CX_YDM_BC_INITIAL_hand.md

@@ -1,4 +1,4 @@
-# MES_CX_YDM_BC_INITIAL_hand 半成品期初结算
+# MES_CX_YDM_BC_INITIAL_hand 半成品期初信息持久化下来
 
 ## 模板下载
 
@@ -34,7 +34,7 @@
    这个表在cx_to_mes这个用户会提供视图给产销
    
    在视图**CX_MES.HOT_CX_YDM_BC_INITIAL**
-   
+
 ## 执行过程
 
 `查询ydm_bc_initial数据,结合mvm_order_matno_info视图(时效性和可靠性不太好),将该补的字段补好,最终写入结果表cx_ydm_bc_initial`
@@ -49,9 +49,9 @@
 
 2. 输入表来源
    
-   | 表名                   | 用途      |
-   | -------------------- | ------- |
-   | mvm_order_matno_info | 实体化视图  |
+   | 表名                   | 用途               |
+   | -------------------- | ---------------- |
+   | mvm_order_matno_info | **实体化视图**        |
    | ydm_bc_initial       | 制造部半成品期初(谁翻译一下 ) |
 
 3. 间接关联表
@@ -86,45 +86,44 @@
    4.2. **get_cp_order**
    
    > 很复杂的过程通过判定炉号获得合同行号
-   >
+   > 
    > 按照下列步骤依次取,直到取到合同行号
    > 如果cxuser.qcm_zg_jugde_apply 对应判定炉号judge_stove_no有,取第一条的订单号
    > 如果pln_zy_zg_m 对应判定炉号feed_heat_no有,取第一条的订单号t.order_no || t.order_seq
    > 然后在MIL_OFFLINE_GROUP 组炉批履历表各种找
+   > 
    > > 结合mat_zc_m, YDM_ZC_OUTLIST
-   > 总的来说就是找到判定炉号对应的合同行号
+   > > 总的来说就是找到判定炉号对应的合同行号
    
    > 参数
-   >
+   > 
    > JUDGE_STOVE_NO2 判定炉号
-   >
+   > 
    > 返回值 合同行号
-   >
-  
    
    4.3. **get_cp_buyer**
    
    通过合同行号获取买家名称的值
-   
-   > 参数 
-   > 
-   > pro_order 合同行号
-   > 
-   > 返回值 买家名称的值
-   > 
-   > [pln_saleord](../../CXUSER/README.md#pln_saleord) 轧管订单排产顺序耗时
-   
+
+> 参数 
+> 
+> pro_order 合同行号
+> 
+> 返回值 买家名称的值
+> 
+> [pln_saleord](../../CXUSER/README.md#pln_saleord) 轧管订单排产顺序耗时
+
    4.4. **get_cp_pass**
-   
+
    通过合同行号获取[孔型](../../Dic/README.md#孔型)的值
-   
-   > 参数 pro_order 合同行号
-   > 
-   > 返回值 vcp_code [孔型](../../Dic/README.md#孔型)??
-   > 
-   > [pln_order_zg_s](../../CXUSER/README.md#pln_order_zg_s) 轧管订单排产顺序耗时
-   > 
-   > 通过合同行号获得PASS_NAME的前3个字,例如454
+
+> 参数 pro_order 合同行号
+> 
+> 返回值 vcp_code [孔型](../../Dic/README.md#孔型)??
+> 
+> [pln_order_zg_s](../../CXUSER/README.md#pln_order_zg_s) 轧管订单排产顺序耗时
+> 
+> 通过合同行号获得PASS_NAME的前3个字,例如454
 
 ## 原始脚本内容
 

+ 20 - 1
MES_FIN_MONTH/FinMES202602/mes_cx_ydm_bc_inlist_csjg_hand.md

@@ -1,4 +1,4 @@
-# mes_cx_ydm_bc_inlist_CSJG_hand 存储过程(什么什么热轧
+# mes_cx_ydm_bc_inlist_CSJG_hand 存储过程(将入库实绩添加上修饰内容持久化下来
 
 ## 模板下载
 
@@ -10,6 +10,25 @@
 
 用{2}表达 下个月份 替换成01
 
+## 执行过程
+
+`查询ydm_zc_inlist数据,结合orderdetail_v@th_cx_link视图,将该补的字段补好,最终写入结果表cx_ydm_bc_inlist`
+
+## 功能拆解
+
+1. 结果表写入
+   
+   | 表名               | 用途         |
+   | ---------------- | ---------- |
+   | cx_ydm_bc_inlist | 结果表 半成品入库表 |
+
+2. 输入表来源
+   
+   | 表名                       | 用途                     |
+   | ------------------------ | ---------------------- |
+   | orderdetail_v@th_cx_link | 谁能解释前面用实体视图,这里又直接上手    |
+   | ydm_zc_inlist            | 轧管、热处理、管加工等钢管生产物料入库实绩表 |
+
 ## 原始脚本内容
 
 ```sql

+ 29 - 1
MES_FIN_MONTH/FinMES202602/mes_cx_ydm_bc_inlist_new_hand.md

@@ -10,6 +10,34 @@
 
 用{2}表达 下个月份 替换成01
 
+## 执行过程
+
+`查询ydm_bc_inlist数据,结合mvm_order_matno_info视图(时效性和可靠性不太好),将该补的字段补好,最终写入结果表cx_ydm_bc_inlist`
+
+与 mes_cx_ydm_bc_inlist_CSJG_hand 不同的点如下:
+
+```
+   and t1.bal_year_month in ('202601')
+   and instock_type_code in ('800704','800706','800709')--红冲改判产权
+```
+这个不执行就不用带上了
+
+
+## 功能拆解
+
+1. 结果表写入
+   
+   | 表名               | 用途  |
+   | ---------------- | --- |
+   | cx_ydm_bc_inlist | 结果表 |
+
+2. 输入表来源
+   
+   | 表名                       | 用途                     |
+   | ------------------------ | ---------------------- |
+   | orderdetail_v@th_cx_link | 谁能解释前面用实体视图,这里又直接上手    |
+   | ydm_zc_inlist            | 轧管、热处理、管加工等钢管生产物料入库实绩表 |
+
 ## 原始脚本内容
 
 ```sql
@@ -112,7 +140,7 @@ CREATE OR REPLACE procedure mes_cx_ydm_bc_inlist_new_hand is
      where nvl(replace(PRO_ORDER_NO, '/', ''),
                 replace(get_cp_order(t1.judge_stove_no), '/', '')) = mvm.CONTRACTNO_NUM
 
-       and t1.bal_year_month in ('202602')
+       and t1.bal_year_month in ('202601')
        and t1.belong_code = '002023005'
        and instock_type_code in ('800704','800706','800709')--红冲改判产权
        and t1.judge_stove_no in( 'C26020471')

+ 4 - 0
MES_FIN_MONTH/FinMES202602/mes_cx_ydm_bc_outlist_csjg.md

@@ -10,6 +10,10 @@
 
 用{2}表达 下个月份 替换成01
 
+## 执行过程
+
+`查询ydm_zc_inlist数据,结合orderdetail_v@th_cx_link视图,将该补的字段补好,结果写入CX_YDM_BC_OUTLIST 半成品出库`
+
 ## 原始脚本内容
 
 ```sql

+ 258 - 92
MES_FIN_MONTH/FinMES202602/mes_cx_ydm_bc_outlist_new_hand.md

@@ -10,13 +10,22 @@
 
 用{2}表达 下个月份 替换成01
 
+## 执行过程
+
+`查询ydm_bc_outlist数据,结合mvm_order_matno_info视图(时效性和可靠性不太好),将该补的字段补好,最终写入结果表cx_ydm_bc_outlist 半成品出库`
+执行过程多了一些判定条件,而且是按入库的什么类型分的
+`AND instock_type_code in ('800701', '800702', '800706')
+       and belong_code in ('100101', '100102', '100105')
+       and supply_unit_code = '120504' `
+
+
 ## 原始脚本内容
 
 ```sql
-CREATE OR REPLACE procedure mes_cx_ydm_bc_inlist_CSJG_hand is
+CREATE OR REPLACE procedure MES_CX_YDM_BC_OUTLIST_NEW_hand is
   a                 number(4);
   b                 varchar(200);
-  cxdata            orderdetail_v@th_cx_link%rowtype;
+  cxdata            mvm_order_matno_info%rowtype;
   prod_name_cx      varchar(200);
   prod_code_cx      varchar(200);
   sg_grade_cx       varchar(200);
@@ -25,14 +34,16 @@ CREATE OR REPLACE procedure mes_cx_ydm_bc_inlist_CSJG_hand is
   sg_signname_cx    varchar(200);
   wall_thickness_cx varchar(200);
   material_code_cx  varchar(200);
-  material_name_cx  varchar(200);
-
-  cursor oporder_cursor is
+  MATERIAL_NAME_cx  varchar(200);
+  outer_diam_cx     varchar(200);
 
+  CURSOR OPOrder_Cursor IS
+  
     select substr(t1.bal_year_month, 0, 4) || '-' ||
-            substr(t1.bal_year_month, 5, 2) bal_year_month,
+           substr(t1.bal_year_month, 5, 2) bal_year_month,
            --记账日期
-           '天淮中间库' ckmc, t1.judge_stove_no,
+           '天淮中间库' ckmc,
+           t1.judge_stove_no,
            --库存地名称,
            spec_code,
            --产品规格代码,
@@ -58,58 +69,91 @@ CREATE OR REPLACE procedure mes_cx_ydm_bc_inlist_CSJG_hand is
            --期初库存支数,
            0 act_weight,
            --期初库存重量,
-           sum(act_count) act_in_count,
+           0 act_in_count,
            --本期入库支数,
-           sum(act_weight) act_in_weight,
+           0 act_in_weight,
            --本期入库重量,
-           0 act_out_count,
+           sum(act_count) act_out_count,
            --本期出库支数,
-           0 act_out_weight,
+           sum(act_weight) act_out_weight,
            --本期出库重量,
-           max(t1.instock_time) instock_time,
            getislljg(t1.judge_stove_no,
-                      nvl(replace(pro_order_no, '/', ''),
-                          replace(get_cp_order(t1.judge_stove_no), '/', ''))) is_lljg,
+                     nvl(replace(PRO_ORDER_NO, '/', ''),
+                         replace(get_cp_order(t1.judge_stove_no), '/', ''))) is_lljg,
            --是否来料加工,
-           '加工' process_name,
+           (case process_desc
+             when '轧制' then
+              '热轧'
+             when '加工线' then
+              '加工'
+             else
+              process_desc
+           end) process_name,
            --工序,
-           '否' is_ckc,
+           
+           --'否' is_ckc,
            --是否出口材
+           (case
+             when nvl(mvm.if_export, '内贸') = '内贸' then
+              '否'
+             when nvl(mvm.if_export, '内贸') = '外贸' then
+              '是'
+             else
+              '否'
+           end) is_ckc,
+           
            act_dimater dimater,
            --外径
            act_height height,
            --壁厚
-           nvl(replace(pro_order_no, '/', ''),
-                replace(get_cp_order(t1.judge_stove_no), '/', '')) orderid,
+           nvl(replace(PRO_ORDER_NO, '/', ''),
+               replace(get_cp_order(t1.judge_stove_no), '/', '')) orderid,
            --合同号
            model_desc,
            -- 扣型描述
+           outstock_type_name,
+           --入库类型名称
            get_cp_buyer(get_cp_order(t1.judge_stove_no)) buyer,
            --客户名称
            get_cp_pass(get_cp_order(t1.judge_stove_no)) pass --孔型
-      from ydm_zc_inlist t1
-     where instock_type_code in ('800701', '800702', '800706')--产出盘盈改判
-        and BAL_YEAR_MONTH = '202602'
-       and belong_code in ('100101', '100102', '100105')
-       and supply_unit_code = '120504'
+    
+      from ydm_bc_outlist t1, mvm_order_matno_info mvm --增加MVN
+    
+     where nvl(replace(pro_order_no, '/', ''),
+               replace(get_cp_order(t1.judge_stove_no), '/', '')) =
+           mvm.CONTRACTNO_NUM
+       and t1.bal_year_month in ('202601')
+       and t1.belong_code = '002023005'
+       and outstock_type_code in ('800809', '800808','800806')
        and nvl(replace(pro_order_no, '/', ''),
                replace(get_cp_order(t1.judge_stove_no), '/', '')) not like
            'ZZBY%'
-       AND T1.PLINE_CODE = 'C108'
-     group by bal_year_month, spec_code,
+            and t1.judge_stove_no in('A25080210','A25070249','A25070271')
+     group by bal_year_month,
+              spec_code,
               --产品规格代码,
               produccode,
               --品名代码,
-              producname, gradecode,
+              producname,
+              gradecode,
               --钢种代码,
-              gradename, steelcode,
+              gradename,
+              steelcode,
               --钢级代码,
-              steelname, judge_stove_no, process_desc, act_dimater,
+              steelname,
+              judge_stove_no,
+              process_desc,
+              act_dimater,
               --外径
               act_height,
               --壁厚
-              model_desc, t1.pro_order_no, t1.order_no, t1.order_seq,
-              spec_code, spec_name;
+              model_desc,
+              t1.pro_order_no,
+              t1.order_no,
+              t1.order_seq,
+              spec_code,
+              spec_name,
+              mvm.if_export,outstock_type_name;
 
   curoporder oporder_cursor%rowtype;
 
@@ -120,95 +164,217 @@ begin
     fetch oporder_cursor
       into curoporder;
     exit when oporder_cursor%notfound;
-
+  
     select count(*)
       into a
-      from orderdetail_v@th_cx_link t
+      from mvm_order_matno_info t
      where t.contractno_num = curoporder.orderid
-       and material_code is not null;
-
+       AND MATERIAL_CODE IS NOT NULL;
+  
     if a > 0 then
-      select prod_code, prod_name, sg_grade_code, sg_grade, sg_sign_code,
-             sg_sign, wall_thickness, material_code, material_name
-        into prod_code_cx, prod_name_cx, sg_grade_cx, sg_gradename_cx,
-             sg_sign_cx, sg_signname_cx, wall_thickness_cx, material_code_cx,
-             material_name_cx
-        from orderdetail_v@th_cx_link t
+      select outer_diam,
+             prod_code,
+             prod_name,
+             SG_GRADE_CODE,
+             sg_grade,
+             SG_SIGN_CODE,
+             sg_sign,
+             wall_thickness,
+             material_code,
+             MATERIAL_NAME
+        into outer_diam_cx,
+             prod_code_cx,
+             prod_name_cx,
+             sg_grade_cx,
+             sg_gradename_cx,
+             sg_sign_cx,
+             sg_signname_cx,
+             wall_thickness_cx,
+             material_code_cx,
+             MATERIAL_NAME_cx
+        from mvm_order_matno_info t
        where t.contractno_num = curoporder.orderid
-         and material_code is not null
+         AND MATERIAL_CODE IS NOT NULL
          and rownum = 1;
-
+    
     elsif substr(curoporder.orderid, 1, 2) in ('TH', 'XS') then
       select count(*)
         into a
-        from orderdetail_v@th_cx_link t
+        from mvm_order_matno_info t
        where substr(t.contractno_num, 3) = substr(curoporder.orderid, 3)
-         and material_code is not null
+         AND MATERIAL_CODE IS NOT NULL
          and rownum = 1;
       if a > 0 then
-        select prod_code, prod_name, sg_grade_code, sg_grade, sg_sign_code,
-               sg_sign, wall_thickness, material_code, material_name
-          into prod_code_cx, prod_name_cx, sg_grade_cx, sg_gradename_cx,
-               sg_sign_cx, sg_signname_cx, wall_thickness_cx,
-               material_code_cx, material_name_cx
-          from orderdetail_v@th_cx_link t
+        select outer_diam,
+               prod_code,
+               prod_name,
+               SG_GRADE_CODE,
+               sg_grade,
+               SG_SIGN_CODE,
+               sg_sign,
+               wall_thickness,
+               material_code,
+               MATERIAL_NAME
+          into outer_diam_cx,
+               prod_code_cx,
+               prod_name_cx,
+               sg_grade_cx,
+               sg_gradename_cx,
+               sg_sign_cx,
+               sg_signname_cx,
+               wall_thickness_cx,
+               material_code_cx,
+               MATERIAL_NAME_cx
+          from mvm_order_matno_info t
          where substr(t.contractno_num, 3) = substr(curoporder.orderid, 3)
-           and material_code is not null
+           AND MATERIAL_CODE IS NOT NULL
            and rownum = 1;
       end if;
     end if;
-
+  
     if a > 0 then
-      insert into cx_ydm_bc_inlist
-        (bal_year_month, ckmc, material_no, material_name, spec_code,
-         spec_name, std_code, std_name, produccode, producname, gradecode,
-         gradename, steelcode, steelname, act_count, act_weight,
-         act_in_count, act_in_weight, act_out_count, act_out_weight, is_lljg,
-         process_name, is_ckc, dimater, height, pass, model_desc, buyer,
-         orderid, bc_type, judge_stove_no, instock_time,INSERT_TIME)
+      insert into CX_YDM_BC_OUTLIST
+        (bal_year_month,
+         ckmc,
+         material_no,
+         material_name,
+         spec_code,
+         spec_name,
+         std_code,
+         std_name,
+         produccode,
+         producname,
+         gradecode,
+         gradename,
+         steelcode,
+         steelname,
+         act_count,
+         act_weight,
+         act_in_count,
+         act_in_weight,
+         act_out_count,
+         act_out_weight,
+         is_lljg,
+         process_name,
+         is_ckc,
+         dimater,
+         height,
+         pass,
+         model_desc,
+         buyer,
+         orderid,
+         bc_type,
+         judge_stove_no,
+         INSERT_TIME,bak1)
       values
-        (curoporder.bal_year_month, curoporder.ckmc, material_code_cx,
-         material_name_cx, curoporder.spec_code,
-         sg_sign_cx || '*' || wall_thickness_cx, curoporder.std_code,
-         curoporder.std_name, prod_code_cx, prod_name_cx, sg_grade_cx,
-         sg_gradename_cx, sg_sign_cx, sg_signname_cx, curoporder.act_count,
-         curoporder.act_weight, curoporder.act_in_count,
-         curoporder.act_in_weight, curoporder.act_out_count,
-         curoporder.act_out_weight, curoporder.is_lljg,
-         curoporder.process_name, curoporder.is_ckc, curoporder.dimater,
-         curoporder.height, curoporder.pass, curoporder.model_desc,
-         curoporder.buyer, curoporder.orderid, '半成品入库',
-         curoporder.judge_stove_no, curoporder.instock_time,sysdate);
-
+        (curoporder.bal_year_month,
+         curoporder.ckmc,
+         material_code_cx,
+         MATERIAL_NAME_cx,
+         curoporder.spec_code,
+         outer_diam_cx || '*' || wall_thickness_cx,
+         curoporder.std_code,
+         curoporder.std_name,
+         prod_code_cx,
+         prod_name_cx,
+         sg_grade_cx,
+         sg_gradename_cx,
+         sg_sign_cx,
+         sg_signname_cx,
+         curoporder.act_count,
+         curoporder.act_weight,
+         curoporder.act_in_count,
+         curoporder.act_in_weight,
+         curoporder.act_out_count,
+         curoporder.act_out_weight,
+         curoporder.is_lljg,
+         curoporder.process_name,
+         curoporder.is_ckc,
+         curoporder.dimater,
+         curoporder.height,
+         curoporder.pass,
+         curoporder.model_desc,
+         curoporder.buyer,
+         curoporder.orderid,
+         '半成品出库',
+         curoporder.judge_stove_no,
+         sysdate,curoporder.outstock_type_name);
     else
-      insert into cx_ydm_bc_inlist
-        (bal_year_month, ckmc, material_no, material_name, spec_code,
-         spec_name, std_code, std_name, produccode, producname, gradecode,
-         gradename, steelcode, steelname, act_count, act_weight,
-         act_in_count, act_in_weight, act_out_count, act_out_weight, is_lljg,
-         process_name, is_ckc, dimater, height, pass, model_desc, buyer,
-         orderid, bc_type, judge_stove_no, instock_time)
+      insert into CX_YDM_BC_OUTLIST
+        (bal_year_month,
+         ckmc,
+         material_no,
+         material_name,
+         spec_code,
+         spec_name,
+         std_code,
+         std_name,
+         produccode,
+         producname,
+         gradecode,
+         gradename,
+         steelcode,
+         steelname,
+         act_count,
+         act_weight,
+         act_in_count,
+         act_in_weight,
+         act_out_count,
+         act_out_weight,
+         is_lljg,
+         process_name,
+         is_ckc,
+         dimater,
+         height,
+         pass,
+         model_desc,
+         buyer,
+         orderid,
+         bc_type,
+         judge_stove_no,bak1)
       values
-        (curoporder.bal_year_month, curoporder.ckmc, null, null,
-         curoporder.spec_code, null, curoporder.std_code,
-         curoporder.std_name, null, null, null, null, null, null,
-         curoporder.act_count, curoporder.act_weight,
-         curoporder.act_in_count, curoporder.act_in_weight,
-         curoporder.act_out_count, curoporder.act_out_weight,
-         curoporder.is_lljg, curoporder.process_name, curoporder.is_ckc,
-         curoporder.dimater, curoporder.height, curoporder.pass,
-         curoporder.model_desc, curoporder.buyer, curoporder.orderid,
-         '半成品入库', curoporder.judge_stove_no, curoporder.instock_time);
+        (curoporder.bal_year_month,
+         curoporder.ckmc,
+         null,
+         null,
+         curoporder.spec_code,
+         null,
+         curoporder.std_code,
+         curoporder.std_name,
+         null,
+         null,
+         null,
+         null,
+         null,
+         null,
+         curoporder.act_count,
+         curoporder.act_weight,
+         curoporder.act_in_count,
+         curoporder.act_in_weight,
+         curoporder.act_out_count,
+         curoporder.act_out_weight,
+         curoporder.is_lljg,
+         curoporder.process_name,
+         curoporder.is_ckc,
+         curoporder.dimater,
+         curoporder.height,
+         curoporder.pass,
+         curoporder.model_desc,
+         curoporder.buyer,
+         curoporder.orderid,
+         '半成品出库',
+         curoporder.judge_stove_no,
+         curoporder.outstock_type_name);
     end if;
-
+  
   end loop;
   close oporder_cursor;
   commit;
 
   /*
-
+  
   exception
     when others then
       null;*/
-end mes_cx_ydm_bc_inlist_CSJG_hand;
+end MES_CX_YDM_BC_OUTLIST_new_hand;
 ```

+ 1 - 1
MES_FIN_MONTH/InitScript/Origin/mes_cx_ydm_bc_inlist_new_hand.sql

@@ -97,7 +97,7 @@ CREATE OR REPLACE procedure mes_cx_ydm_bc_inlist_new_hand is
      where nvl(replace(PRO_ORDER_NO, '/', ''),
                 replace(get_cp_order(t1.judge_stove_no), '/', '')) = mvm.CONTRACTNO_NUM
                 
-       and t1.bal_year_month in ('{0}')
+       and t1.bal_year_month in ('202601')
        and t1.belong_code = '002023005'
        and instock_type_code in ('800704','800706','800709')--红冲改判产权
        and t1.judge_stove_no in( 'C26020471')

+ 1 - 0
README.md

@@ -4,6 +4,7 @@
 
 | 版本号  | 变更日期       | 变更内容                   | 变更人 |
 | ---- | ---------- | ---------------------- | --- |
+| v1.7 | 2026-03-17 | 首次月结的内容里,完成第一个存储过程的解读  | 张果  |
 | v1.6 | 2026-03-12 | 增加第三课的视频解读             | 薛渗  |
 | v1.5 | 2026-03-11 | 增加第二课的视频解读             | 张果  |
 | v1.4 | 2026-03-11 | 增加财务月结栏目,添加FinMES.md链接 | 张果  |