SAP-创建预留和采购申请

METHOD zyc_ii_si_data_dump_in~si_data_dump_in.
"反馈
DATA: output_hd TYPE zmmi005_dt_mesg_hd,
output_body TYPE zun_dt_un_resp_msgbd_tab,
output_line TYPE zun_dt_un_resp_msgbd.
DATA: r_obj TYPE REF TO zun_co_si_un_resp_out,
out TYPE zun_mt_un_resp.
*
TYPES: BEGIN OF emp,
fylhv TYPE resb-rsnum,
message_v1 TYPE string,
message_v2 TYPE string,
END OF emp.

DATA: l_itemid TYPE string,l_msgid  TYPE string.TYPES : BEGIN OF st_ylfz,usnam  TYPE zsbbjjh-usnam,werks  TYPE zsbbjjh-werks,bwart  TYPE zsbbjjh-bwart,bdter  TYPE zsbbjjh-bdter,kostl  TYPE zsbbjjh-kostl,aufnr  TYPE zsbbjjh-aufnr,wempf  TYPE zsbbjjh-wempf,umwrk  TYPE zsbbjjh-umwrk,umlgo  TYPE zsbbjjh-umlgo,anln1  TYPE zsbbjjh-anln1,ekgrp  TYPE zsbbjjh-ekgrp,rsnum  TYPE zsbbjjh-rsnum,itemid TYPE zsbbjjh-itemid,msgid  TYPE zsbbjjh-msgid,END   OF   st_ylfz.
DATA : reservation_header TYPE bapirkpfc,lw_reservation     TYPE  bapiresbc,reservation_items  TYPE  TABLE OF bapiresbc.
  •       return              TYPE TABLE OF bapireturn,
    
  •       lw_return          TYPE  bapireturn,
    
  •       lreturn            TYPE TABLE OF bapireturn,
    
  •       lw_lreturn         TYPE  bapireturn.
    

    DATA : itab TYPE TABLE OF emp,
    wa_1 TYPE emp.
    DATA: tab1 TYPE TABLE OF st_ylfz,
    tab_err TYPE TABLE OF st_ylfz,
    tab_zylsp TYPE TABLE OF zsbbjjh.

  •      it_disp   TYPE TABLE OF zsbbjjh WITH HEADER LINE.
    

    DATA: wa_tab1 TYPE st_ylfz,
    wa_zylsp TYPE zsbbjjh.
    DATA: vylh TYPE resb-rsnum,
    vanswer TYPE c,
    v_continue TYPE c,
    v_line TYPE i,
    vindex TYPE sy-tabix.

    DATA: indx TYPE sy-tabix,
    num_temp TYPE zsbbjjh_h-rspos.

    DATA: s_matnr TYPE RANGE OF zsbbjjh_h-matnr,
    lw_matnr LIKE LINE OF s_matnr,

        s_budat  TYPE RANGE OF zsbbjjh_h-budat,lw_budat LIKE LINE OF s_budat.
    

    DATA : s_werks TYPE RANGE OF ekpo-werks,
    lw_werks LIKE LINE OF s_werks.

    DATA: flag TYPE c,
    l_con TYPE c.

    "申请

    TYPES : BEGIN OF ty_rsnum ,
    rsnum TYPE zsbbjjh-rsnum,
    END OF ty_rsnum.

    DATA: lt_rsnum TYPE TABLE OF ty_rsnum,
    lw_rsnum TYPE ty_rsnum.

    DATA : lt_pr TYPE TABLE OF zsbbjjh_h,
    lw_pr TYPE zsbbjjh_h,

         lt_temp TYPE TABLE OF zsbbjjh_h,lw_temp TYPE  zsbbjjh_h,lt_modi TYPE TABLE OF zsbbjjh_h,lw_modi TYPE zsbbjjh_h.
    

    DATA : requisition_items TYPE TABLE OF bapiebanc,
    lw_req_items TYPE bapiebanc,

         return2           TYPE TABLE OF bapireturn,lw_return2        TYPE bapireturn,number            TYPE bapiebanc-preq_no.
    

    DATA : l_zcsj TYPE zsbbjjh-budat,
    l_trac TYPE c LENGTH 10,
    l_rec TYPE n LENGTH 6.

    DATA : r_zcsj TYPE RANGE OF sy-datum,
    lw_zcsj LIKE LINE OF r_zcsj.

    TYPES: BEGIN OF ty_remsg,
    include TYPE bapireturn,
    idmsg TYPE string,
    itemmsg TYPE string.
    TYPES: END OF ty_remsg.

    DATA: lreturn TYPE TABLE OF ty_remsg,
    lw_lreturn TYPE ty_remsg.

    DATA: return TYPE TABLE OF bapireturn,
    lw_return TYPE bapireturn.

    "拆分itemid
    DATA: t_item TYPE TABLE OF string,
    l_item LIKE LINE OF t_item.

    DATA: cgsq_item TYPE string.

    LOOP AT input-mt_data_dump-msgbd INTO DATA(ls_msgbd).

    CALL FUNCTION 'CONVERSION_EXIT_MATN1_INPUT'EXPORTINGinput  = ls_msgbd-matnrIMPORTINGoutput = ls_msgbd-matnr.IF ls_msgbd-matnr IS NOT INITIAL.lw_matnr-sign   = 'I'.lw_matnr-option = 'EQ'.lw_matnr-low    = ls_msgbd-matnr.APPEND lw_matnr TO s_matnr.CLEAR:lw_matnr.
    ENDIF.lw_budat-sign   = 'I'.
    lw_budat-option = 'EQ'.
    lw_budat-low    = ls_msgbd-budat.
    APPEND lw_budat TO s_budat.
    CLEAR:lw_budat.IF ls_msgbd-zfzt = 'R1'.flag = 'X'.
    ENDIF.
    

    ENDLOOP.

    lw_werks-sign = ‘I’.
    lw_werks-option = ‘EQ’.
    lw_werks-low = ‘2064’.

    APPEND lw_werks TO s_werks.
    CLEAR:lw_werks.

    lw_werks-sign = ‘I’.
    lw_werks-option = ‘EQ’.
    lw_werks-low = ‘2063’.
    APPEND lw_werks TO s_werks.
    CLEAR:lw_werks.

    lw_werks-sign = ‘I’.
    lw_werks-option = ‘EQ’.
    lw_werks-low = ‘2071’.
    APPEND lw_werks TO s_werks.
    CLEAR:lw_werks.

    IF flag = ‘X’. "转储

    SELECT DISTINCT usnam werks bwart bdter kostl aufnr wempf umwrk umlgo anln1 ekgrpFROM zsbbjjh INTO TABLE tab1WHERE werks IN s_werks AND budat IN s_budat AND matnr IN s_matnr AND fspr3 <> '' AND  fsjly = '' AND  usnam = 'YC_MES' ."201903添加过滤统采 "fspr2-->fspr3
    IF sy-subrc <> 0.
    
  •    MESSAGE i001(00) WITH '没有可用数据或未审批!'.output_line-retid = 'E'.output_line-rettxt = '没有可用数据或未审批!'.APPEND output_line TO output_body.CLEAR output_line.
    ENDIF.IF output_body IS INITIAL.
    

*****取所有审批后的数据
SELECT * FROM zsbbjjh INTO TABLE tab_zylsp WHERE werks IN s_werks AND budat IN s_budat AND matnr IN s_matnr AND fspr3 <> ‘’ AND fsjly = ‘’."201903添加过滤统采 "fspr2–>fspr3

    SORT tab_zylsp BY rspos.LOOP AT tab1 INTO wa_tab1.vindex = sy-tabix.reservation_header-res_date   = wa_tab1-bdter."需求日期reservation_header-created_by = wa_tab1-usnam."用户名reservation_header-move_type  = wa_tab1-bwart."移动类型reservation_header-cost_ctr   = wa_tab1-kostl."成本中心reservation_header-order_no   = wa_tab1-aufnr."订单号reservation_header-move_plant = wa_tab1-umwrk."发货工厂reservation_header-move_stloc = wa_tab1-umlgo."发货库存地reservation_header-plant      = wa_tab1-werks."工厂reservation_header-gr_rcpt    = wa_tab1-wempf."接受方reservation_header-asset_no   = wa_tab1-anln1."资产号

***add fdel3 = ‘’
num_temp = 1.
LOOP AT tab_zylsp INTO wa_zylsp WHERE fdel1 = ‘’ AND fdel2 = ‘’ AND fdel3 = ‘’ AND werks = wa_tab1-werks
AND usnam = wa_tab1-usnam AND bwart = wa_tab1-bwart AND bdter = wa_tab1-bdter
AND aufnr = wa_tab1-aufnr AND wempf = wa_tab1-wempf AND umwrk = wa_tab1-umwrk
AND umlgo = wa_tab1-umlgo AND kostl = wa_tab1-kostl AND ekgrp = wa_tab1-ekgrp AND anln1 = wa_tab1-anln1.

        indx = sy-tabix.lw_reservation-material   = wa_zylsp-matnr."物料号lw_reservation-plant      = wa_zylsp-werks."工厂lw_reservation-quantity   = wa_zylsp-fsl3v."数量    fsl2v--> fsl3vlw_reservation-req_date   = wa_zylsp-bdter."日期lw_reservation-gr_rcpt    = wa_zylsp-wempf."收货方lw_reservation-short_text = wa_zylsp-sgtxt."文本1lw_reservation-movement   = 'X'.           "允许移动标志APPEND lw_reservation TO reservation_items .

*****2019.7.19 添加预留的行号码信息
wa_zylsp-rspos1 = num_temp.
MODIFY tab_zylsp INDEX indx FROM wa_zylsp TRANSPORTING rspos1.
num_temp = num_temp + 1.
CLEAR: lw_reservation.

        CALL FUNCTION 'CONVERSION_EXIT_MATN1_OUTPUT'EXPORTINGinput  = wa_zylsp-matnrIMPORTINGoutput = wa_zylsp-matnr.IF l_msgid IS NOT INITIAL.l_msgid  = l_msgid && ',' && wa_zylsp-msgid &&  ':' && wa_zylsp-itemid .ELSE.l_msgid  =  wa_zylsp-msgid &&  ':' && wa_zylsp-itemid.ENDIF.IF l_itemid IS NOT  INITIAL.l_itemid  = l_itemid && ',' &&  wa_zylsp-itemid.ELSE.l_itemid  =  wa_zylsp-itemid.ENDIF.CLEAR:wa_zylsp.ENDLOOP.

*****如果没有项目数据则继续下一预留分组
IF reservation_items IS INITIAL.
CLEAR: reservation_header, lw_reservation,reservation_items[],return.
CONTINUE.
ENDIF.

      CALL FUNCTION 'BAPI_RESERVATION_CREATE'EXPORTINGreservation_header = reservation_headerIMPORTINGreservation        = vylhTABLESreservation_items  = reservation_itemsreturn             = return.IF vylh = 0.

*****生成预留错误时的处理
APPEND wa_tab1 TO tab_err.

        READ TABLE return INTO lw_return INDEX 1.
  •        lw_return-message_v1 = wa_tab1-usnam.
    
  •        lw_return-message_v2 = wa_tab1-bwart.
    
  •        lw_return-message_v1 = wa_tab1-kostl.
    
  •        lw_return-message_v2 = l_mara.lw_lreturn-idmsg              = l_msgid.lw_lreturn-itemmsg            = l_itemid.lw_lreturn-include-message    = lw_return-message.APPEND lw_lreturn TO lreturn.CLEAR:lw_lreturn.ELSE.CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'EXPORTINGwait = 'X'.wa_tab1-rsnum = vylh.
    
  •        wa_tab1-message_v1   = wa_tab1-kostl.
    
  •        wa_tab1-message_v2   = wa_tab1-bwart.SHIFT vylh LEFT DELETING LEADING '0'.wa_1-fylhv       = vylh.wa_1-message_v1  = l_msgid.wa_1-message_v2  = l_itemid.APPEND wa_1 TO itab.MODIFY tab1 FROM wa_tab1 INDEX vindex.CLEAR:wa_1.ENDIF.CLEAR: reservation_header, reservation_items,reservation_items[],return,wa_1,l_itemid,l_msgid.ENDLOOP.
    

*****把生成的预留号填写到内表,为转到历史库做准备
*****生成预留号错误的不转储
LOOP AT tab_err INTO wa_tab1.
DELETE tab_zylsp WHERE werks = wa_tab1-werks AND usnam = wa_tab1-usnam AND bwart = wa_tab1-bwart
AND bdter = wa_tab1-bdter AND aufnr = wa_tab1-aufnr AND wempf = wa_tab1-wempf
AND umwrk = wa_tab1-umwrk AND umlgo = wa_tab1-umlgo AND kostl = wa_tab1-kostl
AND ekgrp = wa_tab1-ekgrp AND anln1 = wa_tab1-anln1.
ENDLOOP.
*****生成预留号 或分组为空的进行转储
LOOP AT tab1 INTO wa_tab1.
LOOP AT tab_zylsp INTO wa_zylsp WHERE usnam = wa_tab1-usnam AND werks = wa_tab1-werks AND bwart = wa_tab1-bwart
AND bdter = wa_tab1-bdter AND kostl = wa_tab1-kostl AND aufnr = wa_tab1-aufnr
AND wempf = wa_tab1-wempf AND umwrk = wa_tab1-umwrk AND umlgo = wa_tab1-umlgo
AND ekgrp = wa_tab1-ekgrp AND anln1 = wa_tab1-anln1.
vindex = sy-tabix.
wa_zylsp-fzcsj = sy-datum.
wa_zylsp-date_new = sy-datum.
wa_zylsp-flag_dl = ‘U’.
wa_zylsp-fzcrv = ‘YC_MES’.
IF wa_tab1-rsnum <> ‘’.
IF wa_zylsp-fdel1 = ‘’ AND wa_zylsp-fdel2 = ‘’ AND wa_zylsp-fdel3 = ‘’. "add wa_zylsp-fdel3 = ‘’
wa_zylsp-rsnum = wa_tab1-rsnum.
ENDIF.
ENDIF.
MODIFY tab_zylsp FROM wa_zylsp.
ENDLOOP.
ENDLOOP.
*****转到历史库并从当前表中删除

  • 为保障两条修改数据库表语句的事务一致性 改成以下 start 20210901 by renyl
    MODIFY zsbbjjh_h FROM TABLE tab_zylsp.
    IF sy-subrc = 0.
    DELETE zsbbjjh FROM TABLE tab_zylsp.
    IF sy-subrc = 0.
    COMMIT WORK.
    ELSE.
    ROLLBACK WORK.
    ENDIF.
    ENDIF.
    *end 20210901
    ****输出转储结果

  •    DATA: yu TYPE i.
    
  •    WRITE :/ '生成的预留号如下(详细内容见''计划查询''):',/ .LOOP AT itab INTO wa_1 WHERE fylhv <> 0.
    
  •    output_line-itemid = sy-tabix.output_line-order1  = wa_1-fylhv.output_line-retid = 'S'.
    
  •    output_line-rettxt = '没有可用数据或未审批!'.output_line-yl-yl1  = wa_1-message_v1.SPLIT wa_1-message_v2  AT ',' INTO TABLE t_item.LOOP AT t_item INTO l_item.output_line-yl-yl2  = l_item.APPEND output_line TO output_body.CLEAR: l_item.ENDLOOP.
    
  •      output_line-yl-yl2  = wa_1-message_v2.CLEAR: output_line,t_item.ENDLOOP.LOOP AT lreturn INTO lw_lreturn.
    
  •    output_line-itemid = sy-tabix.output_line-order1   = ''.output_line-retid    = 'E'.output_line-rettxt   = lw_lreturn-include-message .output_line-yl-yl1   = lw_lreturn-idmsg.SPLIT lw_lreturn-itemmsg  AT ',' INTO TABLE t_item.LOOP AT t_item INTO l_item.output_line-yl-yl2  = l_item.APPEND output_line TO output_body.CLEAR: l_item.ENDLOOP.
    
  •      output_line-yl-yl2   = lw_lreturn-itemmsg.CLEAR: output_line,t_item.ENDLOOP.ELSE."没有数据直接反馈ENDIF."反馈头信息
    out-mt_un_resp-msghd-msgid     = input-mt_data_dump-msghd-msgid.
    out-mt_un_resp-msghd-tlgid     = input-mt_data_dump-msghd-tlgid.
    out-mt_un_resp-msghd-tlgname   = input-mt_data_dump-msghd-tlgname.
    out-mt_un_resp-msghd-dtsend    = sy-datum && sy-uzeit.
    out-mt_un_resp-msghd-sender    = 'ERP'.
    out-mt_un_resp-msghd-receiver  = input-mt_data_dump-msghd-sender.
    "反馈行信息
    out-mt_un_resp-msgbd  = output_body.TRY .CREATE OBJECT r_obj.CALL METHOD r_obj->si_un_resp_outEXPORTINGoutput = out.COMMIT WORK AND WAIT.CALL FUNCTION 'ZFUN_PO_LOG'EXPORTINGoutput1 = out.CATCH cx_ai_system_fault.
    ENDTRY.
    

    ELSE."申请

    lw_zcsj-sign   = 'I'.
    lw_zcsj-option = 'BT'.
    lw_zcsj-low  = sy-datum - 60.
    lw_zcsj-high = sy-datum.
    APPEND lw_zcsj TO r_zcsj.SELECT DISTINCT rsnum INTO TABLE lt_rsnum FROM zsbbjjh_h WHERE werks IN s_werks AND fzcsj IN r_zcsj AND banfn = '' AND  fsjly = '' AND  usnam = 'YC_MES'."201903添加过滤统采
    DELETE lt_rsnum WHERE rsnum = ''.
    IF NOT lt_rsnum[] IS INITIAL.SELECT * INTO TABLE lt_pr FROM zsbbjjh_h FOR ALL ENTRIES IN lt_rsnum WHERE rsnum = lt_rsnum-rsnum  AND  fsjly = ''."201903添加过滤统采
    
  •  WRITE : / '生成的采购请求如下(详细内容见''计划查询''):',/.
    
  •  ULINE (110).SORT lt_pr BY rsnum rspos.LOOP AT lt_rsnum INTO lw_rsnum.l_rec = sy-tabix.REFRESH : requisition_items,return2,lt_temp.CLEAR number.LOOP AT lt_pr INTO lw_pr WHERE rsnum = lw_rsnum-rsnum.APPEND lw_pr TO lt_temp.   "增加数据到临时表lw_req_items-doc_type   = 'NB'.        "申请类型lw_req_items-pur_group  = lw_pr-ekgrp. "采购组lw_req_items-preq_date  = lw_pr-bdter. "需求日期lw_req_items-material   = lw_pr-matnr. "物料号lw_req_items-plant      = lw_pr-werks. "工厂CASE lw_pr-bwart.WHEN '201'.l_trac = lw_pr-kostl.WHEN 'Z21'.l_trac = lw_pr-kostl.WHEN '301'.CONCATENATE lw_pr-umwrk ',' lw_pr-umlgo INTO l_trac.WHEN '241'.l_trac = lw_pr-anln1+2(10).WHEN '251'.l_trac = lw_pr-wempf.WHEN 'Z51'.l_trac = lw_pr-wempf.WHEN 'Y51'.l_trac = lw_pr-wempf.WHEN '261'.l_trac = lw_pr-aufnr+2(10).ENDCASE.
    
  •  lw_req_items-store_loc  = ''.          "库存地lw_req_items-trackingno = l_trac.      "需求跟踪号lw_req_items-preq_name  = lw_pr-usnam. "用户名lw_req_items-quantity   = lw_pr-fsl3v. "数量    "   fsl2v --> fsl3vlw_req_items-deliv_date = lw_pr-bdter. "交货期
    

*{ INSERT APEK901352 1
IF lw_pr-verpr IS INITIAL. "增加价格判断。20210624
lw_req_items-c_amt_bapi = lw_pr-fsgjg.
ELSE.
lw_req_items-c_amt_bapi = lw_pr-verpr.
ENDIF.

*} INSERT
APPEND lw_req_items TO requisition_items.

        "记录所有itemid  “R1和R2返回的vbillcode都需要修改成返回ITEMID的值”  申请号都不用嗯宋梦尧20230703IF cgsq_item  IS INITIAL.cgsq_item = lw_pr-itemid.ELSE.cgsq_item = cgsq_item && ',' && lw_pr-itemid.ENDIF.CLEAR:lw_pr.ENDLOOP.CALL FUNCTION 'BAPI_REQUISITION_CREATE'IMPORTINGnumber            = numberTABLESrequisition_items = requisition_itemsreturn            = return2.COMMIT WORK AND WAIT.
  •      WRITE :/ '序号:',l_rec,'、预留号:',lw_pr-rsnum,'->','采购申请号:',number.IF number IS INITIAL.LOOP AT return2 INTO lw_return2.output_line-order1   = number.output_line-retid    = 'E'.output_line-yl-yl1   = lw_rsnum-rsnum.output_line-rettxt   = lw_return2-message && lw_return2-message_v1 && lw_return2-message_v2.SPLIT cgsq_item  AT ',' INTO TABLE t_item.LOOP AT t_item INTO l_item.output_line-yl-yl2  = l_item.APPEND output_line TO output_body.CLEAR: l_item.ENDLOOP.
    
  •          output_line-yl-yl2   = cgsq_item.CLEAR: output_line,t_item.ENDLOOP.ELSE.LOOP AT lt_temp INTO lw_temp.lw_temp-banfn = number.lw_temp-bnfpo = sy-tabix * 10.  "MODIFY lt_temp FROM lw_temp.ENDLOOP.APPEND LINES OF lt_temp TO lt_modi.REFRESH lt_temp.
    
  •        output_line-yl-yl2   = cgsq_item.output_line-yl-yl1   = lw_rsnum-rsnum.output_line-order1  = number.output_line-retid   = 'S'.
    
  •        output_line-yl-yl3   = lw_rsnum-rsnum.
    
  •        output_line-rettxt = lw_return2-message && w_return2-message_v1 && lw_return2-message_v2.SPLIT cgsq_item  AT ',' INTO TABLE t_item.LOOP AT t_item INTO l_item.output_line-yl-yl2  = l_item.READ TABLE lt_modi INTO DATA(l_modi) WITH KEY itemid = l_item.IF sy-subrc = 0.output_line-yl-yl3   = l_modi-bnfpo.ENDIF.APPEND output_line TO output_body.CLEAR: l_item,l_modi.ENDLOOP.CLEAR: output_line,t_item.ENDIF.CLEAR:lw_rsnum,cgsq_item.ENDLOOP.IF NOT lt_modi[] IS INITIAL.MODIFY zsbbjjh_h FROM TABLE lt_modi.ENDIF.ELSE.
    
  •    MESSAGE '没有可以生成采购申请的数据!' TYPE 'I'.
    
  •        output_line-tlgid   = lw_pr-rsnum.
    
  •        output_line-order1  = number.output_line-retid = 'E'.output_line-rettxt = '没有可以生成采购申请的数据'.APPEND output_line TO output_body.CLEAR output_line.
    ENDIF."反馈头信息
    out-mt_un_resp-msghd-msgid     = input-mt_data_dump-msghd-msgid.
    out-mt_un_resp-msghd-tlgid     = input-mt_data_dump-msghd-tlgid.
    out-mt_un_resp-msghd-tlgname   = input-mt_data_dump-msghd-tlgname.
    out-mt_un_resp-msghd-dtsend    = sy-datum && sy-uzeit.
    out-mt_un_resp-msghd-sender    = 'ERP'.
    out-mt_un_resp-msghd-receiver  = input-mt_data_dump-msghd-sender.
    "反馈行信息
    out-mt_un_resp-msgbd  = output_body.TRY .CREATE OBJECT r_obj.CALL METHOD r_obj->si_un_resp_outEXPORTINGoutput = out.COMMIT WORK AND WAIT.CALL FUNCTION 'ZFUN_PO_LOG'EXPORTINGoutput1 = out
    
  •         output2 = out.CATCH cx_ai_system_fault.
    ENDTRY." 备份,防止yc影响业务.
    DATA:ls_zmm_r2log TYPE zmm_r2log .
    IF out IS NOT INITIAL.MOVE-CORRESPONDING out-mt_un_resp-msghd TO ls_zmm_r2log.LOOP AT out-mt_un_resp-msgbd INTO DATA(line2).ls_zmm_r2log-itemid = line2-itemid .ls_zmm_r2log-order1 = line2-order1.ls_zmm_r2log-retid  =  line2-retid.ls_zmm_r2log-rettxt = line2-rettxt.ls_zmm_r2log-yl1    =  line2-yl-yl1.ls_zmm_r2log-yl2    = line2-yl-yl2.ls_zmm_r2log-date1  = sy-datum.ls_zmm_r2log-time1  = sy-uzeit.MODIFY zmm_r2log FROM ls_zmm_r2log.ENDLOOP.COMMIT WORK.
    ENDIF.
    

    ENDIF.

    ENDMETHOD.

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/bicheng/35906.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

串级PID控制算原理及法详解

文章目录 1. PID 2. 串级PID 3. 串级PID的物理量 4. C语言实现单极PID 5. C语言实现串极PID 6. 模拟仿真 1. PID PID是应用最广泛的闭环控制方法之一&#xff0c;是一种常用的反馈控制方法&#xff0c;对于每个PID控制器由三个部分组成&#xff1a;比例控制&#xff08;…

自然语言处理——英文文本预处理

高质量数据的重要性 数据的质量直接影响模型的性能和准确性。高质量的数据可以显著提升模型的学习效果&#xff0c;帮助模型更准确地识别模式、进行预测和决策。具体原因包括以下几点&#xff1a; 噪音减少&#xff1a;高质量的数据经过清理&#xff0c;减少了无关或错误信息…

Wp-scan一键扫描wordpress网页(KALI工具系列三十)

目录 1、KALI LINUX 简介 2、Wp-scan工具简介 3、信息收集 3.1 目标IP&#xff08;服务器) 3.2kali的IP 4、操作实例 4.1 基本扫描 4.2 扫描已知漏洞 4.3 扫描目标主题 4.4 列出用户 4.5 输出扫描文件 4.6 输出详细结果 5、总结 1、KALI LINUX 简介 Kali Linux 是一…

《梦醒蝶飞:释放Excel函数与公式的力量》6.1 DATE函数

6.1 DATE函数 第一节&#xff1a;DATE函数 1&#xff09;DATE函数概述 DATE函数是Excel中的一个内置函数&#xff0c;用于根据指定的年、月、日返回对应的日期序列号。这个函数非常有用&#xff0c;尤其是在处理日期数据时&#xff0c;它可以帮助你构建特定的日期&#xff0…

pycharm工具回退键调出

pycharm工具调出回退键。 View->Appearance->Toolbar,即可调出 调不出的可以使用快捷键&#xff1a;ctrlalt向左箭头 但是这个快捷键容易和电脑屏幕旋转冲突。可将电脑的快捷键关掉&#xff0c;即可。 ctrlalt向上箭头&#xff1a;将屏幕旋转到正常&#xff08;横向&am…

【面试干货】final、finalize 和 finally 的区别

【面试干货】final、finalize 和 finally 的区别 1、final1.1 修饰类1.2 修饰方法1.3 修饰变量 2、finally3、finalize4、总结 &#x1f496;The Begin&#x1f496;点点关注&#xff0c;收藏不迷路&#x1f496; 在Java编程语言中&#xff0c;final、finalize和finally都是关键…

汽车免拆诊断案例 | 2016 款吉利帝豪EV车无法加速

故障现象 一辆2016款吉利帝豪EV车&#xff0c;累计行驶里程约为28.4万km&#xff0c;车主反映车辆无法加速。 故障诊断 接车后路试&#xff0c;行驶约1 km&#xff0c;踩下加速踏板&#xff0c;无法加速&#xff0c;车速为20 km/h左右&#xff0c;同时组合仪表上的电机及控制…

设备驱动框架之LED

文章目录 前言一、什么是驱动框架二、使用步骤1.注册LED设备2.卸载LED设备3.内核中申请内存4.container_of5.platform_get_drvdata 和 platform_set_drvdata6.module_platform_driver 三、驱动示例总结 前言 为了尽量降低驱动开发者难度以及接口标准化&#xff0c;就出现了设备…

面试-Java线程池

1.利用Excutors创建不同的线程池满足不同场景的需求 分析&#xff1a; 如果并发的请求的数量非常多&#xff0c;但每个线程执行的时间非常短&#xff0c;这样就会频繁的创建和销毁线程。如此一来&#xff0c;会大大降低系统的效率。 可能出现&#xff0c;服务器在为每个线程创建…

Docker创建容器时提示 [Warning] IPv4 forwarding is disabled. Networking will not work.

解决办法 1. 在docker的宿主机中更改以下文件&#xff1a; [rootlocalhost ~]# vi /usr/lib/sysctl.d/00-system.conf2. 添加如下代码&#xff1a; net.ipv4.ip_forward13. 重启network服务&#xff1a; systemctl restart network

Lua 垃圾回收

Lua 垃圾回收 Lua 是一种轻量级的编程语言&#xff0c;广泛用于游戏开发、脚本编写和其他应用程序。Lua 的设计哲学是简单和高效&#xff0c;这同样体现在它的内存管理机制中。在 Lua 中&#xff0c;垃圾回收&#xff08;Garbage Collection&#xff0c;简称 GC&#xff09;是…

利用powershell开展网络钓鱼

要确保人们打开我们的恶意文件并执行它们&#xff0c;我们只需让微软努力工作多年来赢得人们的信任&#xff0c;然后将一些危险的宏插入到幻灯片中。 本博文将介绍如何通过屏幕顶部的一个友好的警告提示&#xff0c;在用户启用宏后立即运行您的宏。 首先&#xff0c;我们需要打…

【面向对象】复习(四)

const构不构成重载 C 加const能不能构成重载的几种情况_多个const修饰可以重载吗-CSDN博客

如何在Java中实现并发编程,包括锁机制、线程池等。

在Java中实现并发编程有很多种方式&#xff0c;包括使用锁机制、线程池等。以下是一些基本的步骤和代码示例&#xff1a; 1. **锁机制**&#xff1a;Java提供了多种锁机制&#xff0c;包括ReentrantLock&#xff0c;synchronized关键字等。ReentrantLock是一个可重入的锁&…

[分布式网络通讯框架]----MprpcApplication实现

在之前我们提到了很多回MprpcApplication类&#xff0c;这是一个mprpc框架的初始化类。 在此之前&#xff0c;先来看看MprpcConfig 类 MprpcConfig 类 重要成员变量 std::unordered_map<std::string,std::string> m_configMap;存放配置信息键值对。 本项目配置信息 …

Spring Boot中的国际化(i18n)实现技巧

Spring Boot中的国际化&#xff08;i18n&#xff09;实现技巧 大家好&#xff0c;我是免费搭建查券返利机器人省钱赚佣金就用微赚淘客系统3.0的小编&#xff0c;也是冬天不穿秋裤&#xff0c;天冷也要风度的程序猿&#xff01;在开发多语言支持的应用程序时&#xff0c;国际化…

python环境变量

目录 python环境变量 python-opencv cuda cudnn pytorch pycharm 激活ok了 pyqt5 labelimg notepad gpu-z python 3.6或3.7 标注,文件路径不能有 python环境变量 import os import syscurrent_dir = os.path.dirname(os.path.abspath(__file__))paths = [os.path.abspath(…

浏览器扩展V3开发系列之 chrome.commands 快捷键的用法和案例

【作者主页】&#xff1a;小鱼神1024 【擅长领域】&#xff1a;JS逆向、小程序逆向、AST还原、验证码突防、Python开发、浏览器插件开发、React前端开发、NestJS后端开发等等 chrome.commands API 允许开发者使用快捷键来执行特定的命令。 在使用 chrome.commands API 之前必须…

Vue 学习之 axios

目录 执行安装命令&#xff1a;npm install axios 使用的时候导入 axios以data&#xff0c;params&#xff0c;headers传参方式的区别 axios封装 是一个基于 promise 的 网络请求库&#xff0c;作用于浏览器和 node.js 中。使用Axios可以在前端项目中发送各种方式的HTTP请求…

如何查看websocket连接信息

Chrome 浏览器中查看 webSocket 连接信息_谷歌浏览器看不到 websocket-CSDN博客 Getting Started — Flask-SocketIO documentation 运作原理 | Socket.IO