ABAP BP维护客户cl_md_bp_maintain=>maintain

news2024/11/17 15:59:47

ps_head结构如下
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

下面是封装好的form示例

*&---------------------------------------------------------------------*
*& Form frm_modify_customer
*&---------------------------------------------------------------------*
*& text
*&---------------------------------------------------------------------*
*&      --> LS_HEAD
*&      <-- LS_RETINFO
*&---------------------------------------------------------------------*
FORM frm_modify_customer  USING    ps_head      TYPE zsds002
                          CHANGING ps_retinfo   TYPE zsds008.

*--& 变量声明
  DATA: lt_return_map TYPE  mdg_bs_bp_msgmap_t.
  DATA: lt_data   TYPE cvis_ei_extern_t,
        lt_return TYPE bapiretm,
        ls_return TYPE bapireti,
        ls_retmsg TYPE LINE OF bapiretct,
        lv_text   TYPE string.

  DATA: ls_data         LIKE LINE OF lt_data,
        ls_bupa_role    TYPE bus_ei_bupa_roles,
        ls_relation     TYPE burs_ei_extern,
        ls_paadr        TYPE bus_ei_bupa_address,
        ls_company_view TYPE cmds_ei_company.

  DATA: lv_guid    TYPE guid_32,
        lv_pguid   LIKE but000-partner_guid,
        lv_partner LIKE but000-partner.

  DATA: ls_functions_st    TYPE cmds_ei_functions,
        ls_functions_t     TYPE cmds_ei_functions_t,
        ls_functions       TYPE cmds_ei_cmd_functions,
        ls_sales_data_st   TYPE cmds_ei_sales,
        ls_sales_data      TYPE cmds_ei_cmd_sales,
        ls_customer        TYPE cmds_ei_extern,
        ls_customers       TYPE cmds_ei_main,
        ls_company_code_st TYPE cmds_ei_company,
        ls_company_code    TYPE cmds_ei_cmd_company,
        ls_phone           TYPE bus_ei_bupa_telephone,
        ls_fax             TYPE bus_ei_bupa_fax,
        ls_mail            TYPE bus_ei_bupa_smtp,
        ls_cphone          TYPE cvis_ei_phone_str,
        ls_cfax            TYPE cvis_ei_fax_str,
        ls_cmail           TYPE cvis_ei_smtp_str,
        ls_taxnumber       TYPE bus_ei_bupa_taxnumber,
        lt_taxnumber       TYPE bus_ei_bupa_taxnumber_t,
        ls_tax_ind         TYPE cmds_ei_tax_ind,
        ls_line            TYPE tline,
        ls_ret             TYPE bapiret2,
        lt_bankdetails     TYPE bus_ei_bupa_bankdetail_t,
        ls_bankdetails     TYPE bus_ei_bupa_bankdetail,
        lv_partner_guid    TYPE but000-partner_guid,
        ls_profile         TYPE ukm_ei_bp_cms,
        ls_segments        TYPE ukm_ei_bp_cms_sgm.

  DATA: lv_name_org1 TYPE but000-name_org1,
        lv_name_org2 TYPE but000-name_org2.
  DATA: lv_street     TYPE adrc-street,
        lv_str_suppl3 TYPE adrc-str_suppl3,
        lv_location   TYPE adrc-location.
  DATA: lv_len   TYPE i,
        lv_spras TYPE kna1-spras.

  " 合作伙伴名称
  lv_partner = ps_head-partner.
  lv_partner = |{ lv_partner ALPHA = IN }|.

  " 操作标识  I 新建 U 更新 M 修改/新建
  ls_data-partner-header-object_task = gc_m.

  " bp guid
  SELECT SINGLE
    partner_guid
  INTO lv_partner_guid
  FROM but000
  WHERE partner = lv_partner.
  " bp guid
  IF sy-subrc <> 0.
    TRY.
        CALL METHOD cl_system_uuid=>create_uuid_c32_static
          RECEIVING
            uuid = lv_guid.
      CATCH cx_uuid_error .
    ENDTRY.
  ELSE.
    lv_guid = lv_partner_guid.
  ENDIF.
  ls_data-partner-header-object_instance-bpartnerguid = lv_guid.

*--- BP基础数据------------------------------*

  " 合作伙伴类别     3: 组 2: 组织
  ls_data-partner-central_data-common-data-bp_control-category = '2'.

  " 客户分组  
  ls_data-partner-central_data-common-data-bp_control-grouping = ps_head-bu_group.

  " 标题    0001  女士    0002  先生    0003  公司
  ls_data-partner-central_data-common-data-bp_centraldata-title_key  = ps_head-title.
  ls_data-partner-central_data-common-datax-bp_centraldata-title_key = gc_x.

  " 搜索项(检索项)
  ls_data-partner-central_data-common-data-bp_centraldata-searchterm1  = ps_head-bu_sort1.
  ls_data-partner-central_data-common-datax-bp_centraldata-searchterm1 = gc_x.

  " 公司名称(客户名称)
  " 第1到40位存入BUT000-NAME_ORG1中,第41-80位存入BUT000-NAME_ORG2中
  IF strlen( ps_head-name_org ) > 40.
    lv_name_org1 = ps_head-name_org+0(40).
    lv_len       = strlen( ps_head-name_org ) MOD 40.
    lv_name_org2 = ps_head-name_org+40(lv_len).
  ELSE.
    lv_name_org1 = ps_head-name_org.
  ENDIF.
  ls_data-partner-central_data-common-data-bp_organization-name1  = lv_name_org1.
  ls_data-partner-central_data-common-data-bp_organization-name2  = lv_name_org2.
  ls_data-partner-central_data-common-datax-bp_organization-name1 = gc_x.
  ls_data-partner-central_data-common-datax-bp_organization-name2 = gc_x.

  " 客户冻结
  ls_data-partner-central_data-common-data-bp_centraldata-centralblock  = ps_head-xblck.
  ls_data-partner-central_data-common-datax-bp_centraldata-centralblock = gc_x.

*--- BP地址 -----------------------------*

  " 地址操作标识
  ls_paadr-task = gc_m.

  " 地址 guid
  SELECT SINGLE
    address_guid
  FROM but020
  WHERE partner = @lv_partner
  INTO @DATA(lv_addguid).
  IF sy-subrc <> 0.
    TRY.
        CLEAR lv_guid.
        CALL METHOD cl_system_uuid=>create_uuid_c32_static
          RECEIVING
            uuid = lv_guid.
      CATCH cx_uuid_error .
    ENDTRY.
    ls_paadr-data_key-guid = lv_guid.
  ELSE.
    ls_paadr-data_key-guid = lv_addguid.
  ENDIF.

  " 街道
  " 第1到60位存入ADRC-STREET中,第61-100位存入ADRC-STR_SUPPL3中,第101-120位存入ADRC-LOCATION中
  IF strlen( ps_head-stras ) <= 60.
    lv_street = ps_head-stras.
  ELSEIF strlen( ps_head-stras ) > 60 AND strlen( ps_head-stras ) <= 100.
    lv_street     = ps_head-stras+0(60).
    lv_len        = strlen( ps_head-stras ) MOD 60.
    lv_str_suppl3 = ps_head-stras+60(lv_len).
  ELSE.
    lv_street     = ps_head-stras+0(60).
    lv_str_suppl3 = ps_head-stras+60(40).
    lv_len        = strlen( ps_head-stras ) MOD 100.
    lv_location   = ps_head-stras+100(lv_len).
  ENDIF.
  ls_paadr-data-postal-data-street      = lv_street.
  ls_paadr-data-postal-data-str_suppl3  = lv_str_suppl3.
  ls_paadr-data-postal-data-location    = lv_location.
  ls_paadr-data-postal-datax-street     = gc_x.
  ls_paadr-data-postal-datax-str_suppl3 = gc_x.
  ls_paadr-data-postal-datax-location   = gc_x.

  " 邮政编码
  ls_paadr-data-postal-data-postl_cod1  = ps_head-pstlz.
  ls_paadr-data-postal-datax-postl_cod1 = gc_x.

  " 城市
  ls_paadr-data-postal-data-city  = ps_head-ort01.
  ls_paadr-data-postal-datax-city = gc_x.

  " 国家
  ls_paadr-data-postal-data-country  = ps_head-land1.
  ls_paadr-data-postal-datax-country = gc_x.

  " 地区(省份)
  ls_paadr-data-postal-data-region  = ps_head-regio.
  ls_paadr-data-postal-datax-region = gc_x.

  " 语言 (外部传入2位外码转换为1位内码)
  CALL FUNCTION 'CONVERSION_EXIT_ISOLA_INPUT'
    EXPORTING
      input  = ps_head-spras
    IMPORTING
      output = lv_spras.
  ls_paadr-data-postal-data-langu  = lv_spras."语言代码
  ls_paadr-data-postal-datax-langu = gc_x.

  " 电话
  ls_phone-contact-task            = gc_m.
  ls_phone-contact-data-telephone  = ps_head-tel_number.
  ls_phone-contact-datax-telephone = gc_x.
  APPEND ls_phone TO ls_paadr-data-communication-phone-phone.

  " 传真
  ls_fax-contact-task      = gc_m.
  ls_fax-contact-data-fax  = ps_head-fax_number. "传真
  ls_fax-contact-datax-fax = gc_x.
  APPEND ls_fax TO ls_paadr-data-communication-fax-fax.

  " 邮箱
  ls_mail-contact-task         = gc_m.
  ls_mail-contact-data-e_mail  = ps_head-smtp_addr.
  ls_mail-contact-datax-e_mail = gc_x.
  APPEND ls_mail TO ls_paadr-data-communication-smtp-smtp.

  ls_paadr-currently_valid = abap_true.
  APPEND ls_paadr TO ls_data-partner-central_data-address-addresses.

*-------------- Customer / Header ---------------------------------*

  " 客户抬头操作标识
  IF lv_partner_guid IS INITIAL AND ps_head-zoperate = 'I'.  " BP中没有合作伙伴则新建
    ls_data-ensure_create-create_customer = abap_true.
    ls_data-customer-header-object_task = 'I'.
  ELSE.
    IF ps_head-partner IS NOT INITIAL AND ps_head-zoperate = 'I'.  " BP中有合作伙伴但没有客户则新建
      ls_data-ensure_create-create_customer = abap_true.
      ls_data-customer-header-object_task = 'I'.
    ELSE.                               " BP中有合作伙伴且有客户则更新
      ls_data-customer-header-object_task = 'U'.
    ENDIF.
  ENDIF.

  " 客户编码
  ls_data-customer-header-object_instance-kunnr = lv_partner.

  " 税号信息
  ls_taxnumber-task               = gc_m.
  ls_taxnumber-data_key-taxtype   = ps_head-taxtype.
  ls_taxnumber-data_key-taxnumxl  = ps_head-taxnumxl.
  APPEND ls_taxnumber TO lt_taxnumber .
  ls_data-partner-central_data-taxnumber-current_state = 'X' .
  ls_data-partner-central_data-taxnumber-taxnumbers    = lt_taxnumber .
  
*----& 角色
  IF ps_head-sales[] IS NOT INITIAL.
    ls_bupa_role-task = gc_m.
    ls_bupa_role-data_key = 'FLCU01'. " FI 客户
    APPEND ls_bupa_role TO ls_data-partner-central_data-role-roles.
  ENDIF.

  IF ps_head-company[] IS NOT INITIAL.
    ls_bupa_role-task = gc_m.
    ls_bupa_role-data_key = 'FLCU00'. " 客户
    APPEND ls_bupa_role TO ls_data-partner-central_data-role-roles.
  ENDIF.

*----& 银行段
  IF ps_head-bank[] IS NOT INITIAL.
    " 检查银行更新/新建
    SELECT
      bkvid,  " 银行明细标识
      partner " 合作伙伴编号
    FROM but0bk
    WHERE
      partner = @lv_partner
    INTO TABLE @DATA(lt_but0bk).

    LOOP AT ps_head-bank INTO DATA(ls_bank).
      READ TABLE lt_but0bk TRANSPORTING NO FIELDS WITH KEY bkvid = ls_bank-bkvid.
      IF sy-subrc = 0.
        ls_bankdetails-task = gc_u.
      ELSE.
        ls_bankdetails-task = gc_i.
      ENDIF.

      " 序号
      ls_bankdetails-data_key = ls_bank-bkvid.

      " 银行国家
      ls_bankdetails-data-bank_ctry  = ls_bank-banks.
      ls_bankdetails-datax-bank_ctry = gc_x.

      " 银行代码
      ls_bankdetails-data-bank_key   = ls_bank-bankl.
      ls_bankdetails-datax-bank_key  = gc_x.

      " 银行名称
      ls_bankdetails-data-bankaccountname  = ls_bank-banka.
      ls_bankdetails-datax-bankaccountname = gc_x.

      " 银行账户,超过18位时填入参考字段
      ls_bankdetails-data-bank_acct  = ls_bank-bankn.
      ls_bankdetails-datax-bank_acct = gc_x.

      ls_bankdetails-data-bank_ref  = ls_bank-bkref.
      ls_bankdetails-datax-bank_ref = gc_x.

      " 是否默认
      ls_bankdetails-data-coll_auth  = ls_bank-xezer.
      ls_bankdetails-datax-coll_auth = gc_x.

      APPEND ls_bankdetails TO lt_bankdetails.

      PERFORM frm_create_bank USING ls_bankdetails .

    ENDLOOP.
    ls_data-partner-central_data-bankdetail-bankdetails = lt_bankdetails .
  ENDIF.

*----& 销售段
  LOOP AT ps_head-sales INTO DATA(ls_sales).
    ls_sales_data_st-task = gc_m.
    ls_sales_data_st-data_key-spart = ls_sales-spart."产品组
    ls_sales_data_st-data_key-vkorg = ls_sales-vkorg."销售组织
    ls_sales_data_st-data_key-vtweg = ls_sales-vtweg."分销渠道

    " 销售地区
    ls_sales_data_st-data-bzirk  = ls_sales-bzirk.
    ls_sales_data_st-datax-bzirk = gc_x.

    " 销售办事处
    ls_sales_data_st-data-vkbur  = ls_sales-vkbur.
    ls_sales_data_st-datax-vkbur = gc_x.

    " 销售组
    ls_sales_data_st-data-vkgrp  = ls_sales-kdgrp.
    ls_sales_data_st-datax-vkgrp = gc_x.

    " 货币
    ls_sales_data_st-data-waers  = ls_sales-waers.
    ls_sales_data_st-datax-waers = gc_x.

    " 定价过程
    ls_sales_data_st-data-kalks  = ls_sales-kalks.
    ls_sales_data_st-datax-kalks = gc_x.

    " 装运条件  默认01
    IF ls_sales-vsbed IS INITIAL.
      ls_sales-vsbed = '01'.
    ENDIF.
    ls_sales_data_st-data-vsbed  = ls_sales-vsbed.
    ls_sales_data_st-datax-vsbed = gc_x.

    " 与 POD 处理相关
    ls_sales_data_st-data-podkz  = ls_sales-podkz .
    ls_sales_data_st-datax-podkz = gc_x.

    " 国际贸易条款1
*    IF ls_sales-inco1 IS NOT INITIAL.
    ls_sales_data_st-data-inco1  = ls_sales-inco1.
    ls_sales_data_st-datax-inco1 = gc_x.

    " 国际贸易条款位置 1
    ls_sales_data_st-data-inco2_l  = ls_sales-inco2_l.
    ls_sales_data_st-datax-inco2_l = gc_x.

    " 付款条件代码
    ls_sales_data_st-data-zterm  = ls_sales-zterm.
    ls_sales_data_st-datax-zterm = gc_x.

    " 客户的科目分配组
    ls_sales_data_st-data-ktgrd  = ls_sales-ktgrd.
    ls_sales_data_st-datax-ktgrd = gc_x.

    " 销售范围订单冻结
    ls_sales_data_st-data-aufsd  = ls_sales-aufsd.
    ls_sales_data_st-datax-aufsd = gc_x.

*------& 销售段->合作伙伴职能段
    LOOP AT ls_sales-partner INTO DATA(ls_partner).
      " 合作伙伴外码转内码
      CALL FUNCTION 'CONVERSION_EXIT_PARVW_INPUT'
        EXPORTING
          input  = ls_partner-parvw
        IMPORTING
          output = ls_partner-parvw.

      ls_functions_st-data_key-parvw = ls_partner-parvw.
      ls_functions_st-data_key-parza = ls_partner-parza.

      ls_functions_st-data-partner = ls_partner-kunn2.
      ls_functions_st-datax-partner = gc_x.
      APPEND ls_functions_st TO ls_functions_t.

    ENDLOOP.

    ls_functions-functions = ls_functions_t.
    ls_sales_data_st-functions = ls_functions.
    IF ls_sales-partner IS NOT INITIAL.
      ls_sales_data_st-functions-current_state = gc_x.
    ENDIF.

    APPEND ls_sales_data_st TO ls_sales_data-sales.
    CLEAR: ls_sales_data_st,ls_functions_t[],ls_functions.

  ENDLOOP.

  ls_data-customer-sales_data = ls_sales_data.

*----税段
  LOOP AT ps_head-tax INTO DATA(ls_tax).
    ls_tax_ind-task = gc_m.
    ls_tax_ind-data_key-tatyp = ls_tax-tatyp." 税类别
    ls_tax_ind-data_key-aland = ls_tax-aland." 国家

    " 客户税分类
    ls_tax_ind-data-taxkd     = ls_tax-takld.
    ls_tax_ind-datax-taxkd    = gc_x.
    APPEND ls_tax_ind TO ls_data-customer-central_data-tax_ind-tax_ind.
  ENDLOOP.

*----公司视图段
  LOOP AT ps_head-company INTO DATA(ls_company).
    ls_company_view-task = gc_m.
    ls_company_view-data_key   = ls_company-bukrs. " 公司代码

    " 统驭科目
    ls_company_view-data-akont  = ls_company-akont.
    ls_company_view-datax-akont = gc_x.

    " 付款条件
    ls_company_view-data-zterm = ls_company-zterm.
    ls_company_view-datax-zterm = gc_x.

    " 排序代码
    ls_company_view-data-zuawa = ls_company-zuawa.
    ls_company_view-datax-zuawa = gc_x.

    " 对公司代码过帐冻结
    ls_company_view-data-sperr = ls_company-sperr.
    ls_company_view-datax-sperr = gc_x.

    " K3客户编码
    ls_company_view-data-altkn = ls_company-altkn.
    ls_company_view-datax-altkn = gc_x.

    APPEND ls_company_view TO ls_data-customer-company_data-company.

  ENDLOOP.

  " 校验BP数据
  CALL METHOD cl_md_bp_maintain=>validate_single
    EXPORTING
      i_data        = ls_data "lt_data
    IMPORTING
      et_return_map = lt_return_map. "lt_return.

  APPEND ls_data TO lt_data.

  " 创建BP
  IF lt_return_map IS INITIAL.
    CALL METHOD cl_md_bp_maintain=>maintain
      EXPORTING
        i_data   = lt_data
      IMPORTING
        e_return = lt_return.

    " 异常返回校验
    LOOP AT lt_return INTO ls_return.
      LOOP AT ls_return-object_msg INTO ls_retmsg WHERE type CA 'AE'.
        CLEAR lv_text.
        MESSAGE ID ls_retmsg-id TYPE 'S' NUMBER ls_retmsg-number INTO lv_text
        WITH ls_retmsg-message_v1 ls_retmsg-message_v2 ls_retmsg-message_v3 ls_retmsg-message_v4.
        CONCATENATE ps_retinfo-message lv_text INTO ps_retinfo-message.
      ENDLOOP.
    ENDLOOP.
    IF ps_retinfo-message IS NOT INITIAL.
      CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'.
    ELSE.
      IF ps_head-partner IS INITIAL.
        ps_retinfo-kunnr = sy-msgv1.
      ELSE.
        ps_retinfo-kunnr = ps_head-partner.
      ENDIF.

      ps_retinfo-kunnr = |{ ps_retinfo-kunnr ALPHA = IN }|.
      CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
        EXPORTING
          wait = 'X'.
    ENDIF.

  ELSE.
    LOOP AT lt_return_map INTO DATA(ls_return_map) WHERE type CA 'AE'.
      CLEAR lv_text.
      CALL FUNCTION 'MESSAGE_TEXT_BUILD'
        EXPORTING
          msgid               = ls_return_map-id
          msgnr               = ls_return_map-number
          msgv1               = ls_return_map-message_v1
          msgv2               = ls_return_map-message_v2
          msgv3               = ls_return_map-message_v3
          msgv4               = ls_return_map-message_v4
        IMPORTING
          message_text_output = lv_text.
      CONCATENATE ps_retinfo-message lv_text INTO ps_retinfo-message.
    ENDLOOP.

  ENDIF.

  IF ps_retinfo-message IS NOT INITIAL.
    ps_retinfo-code = gc_e.
    ps_retinfo-message = TEXT-m09 && ps_retinfo-message.
  ELSE.
    ps_retinfo-code = gc_s.
    ps_retinfo-message = TEXT-m08.
  ENDIF.
ENDFORM.

*&---------------------------------------------------------------------*
*& Form frm_create_bank
*&---------------------------------------------------------------------*
*& text
*&---------------------------------------------------------------------*
*&      --> LS_BANKDETAILS
*&---------------------------------------------------------------------*
FORM frm_create_bank  USING  ps_bank_detail TYPE bus_ei_bupa_bankdetail.

  DATA: ls_return        TYPE bapiret2,
        lv_ret_bank_ctry TYPE bapi1011_key-bank_ctry,
        lv_ret_bank_key  TYPE bapi1011_key-bank_key,
        lv_bank_ctry     TYPE bapi1011_key-bank_ctry,
        lv_bank_key      TYPE bapi1011_key-bank_key,
        ls_bank_address  TYPE bapi1011_address,
        ls_bank_addressx TYPE bapi1011_addressx.

  CLEAR: ls_return,lv_ret_bank_ctry,lv_ret_bank_key  .

  lv_bank_key  = ps_bank_detail-data-bank_key.
  lv_bank_ctry = ps_bank_detail-data-bank_ctry.
  ls_bank_address-bank_name = ps_bank_detail-data-bankaccountname.
  ls_bank_addressx-bank_name = 'X' .

  SELECT COUNT(*)
    FROM bnka
    WHERE banks = lv_bank_ctry
      AND bankl = lv_bank_key.
  IF sy-subrc <> 0 .  "银行不存在

    CALL FUNCTION 'BAPI_BANK_CREATE'
      EXPORTING
        bank_ctry    = lv_bank_ctry
        bank_key     = lv_bank_key
        bank_address = ls_bank_address
      IMPORTING
        return       = ls_return
        bankcountry  = lv_ret_bank_ctry
        bankkey      = lv_ret_bank_key.

    IF lv_bank_key IS NOT INITIAL AND lv_ret_bank_ctry IS NOT INITIAL .
      CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
        EXPORTING
          wait = 'X'.

      WAIT UP TO 1 SECONDS .
    ELSE.
      CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'.
    ENDIF.
  ENDIF .

ENDFORM.

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

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

相关文章

异步编程 - 07 基于JDK中的Future实现异步编程(下)_当Stream遇见CompletableFuture

文章目录 JDK8 StreamStream遇见CompletableFuture小结 JDK8 Stream JDK8中提供了流式对数据进行处理的功能&#xff0c;它的出现允许我们以声明式方式对数据集合进行处理。所谓声明式是相对于我们平时所用的命令式编程来说的&#xff0c;使用声明式编程会让我们对业务的表达更…

意向客户的信息获取到底是怎样的,快来get一下

客户信息获取技术真的可以为企业提供精准客源吗&#xff1f;这个渠道到底安不安全&#xff0c;技术到底成不成熟&#xff1f;效果到底如何&#xff1f;下面简单的和大家分析一下。 客户信息获取技术是怎样的 手机采集引流方面&#xff0c;上量不精准&#xff0c;精准不上量的说…

《Web安全基础》05. XSS · CSRF · SSRF · RCE

web 1&#xff1a;XSS1.1&#xff1a;简介1.2&#xff1a;防护与绕过1.2.1&#xff1a;HttpOnly1.2.2&#xff1a;WAF 绕过 1.3&#xff1a;相关资源 2&#xff1a;CSRF3&#xff1a;SSRF4&#xff1a;RCE 本系列侧重方法论&#xff0c;各工具只是实现目标的载体。 命令与工具只…

什么人群适合考PMP?

PMP是不受行业限制的&#xff0c;只要工作涉及到管理&#xff0c;或者想要往管理方面发展&#xff0c;或者想提升自身的能力&#xff0c;那么考PMP绝对是有必要的。像IT、电子、通信、工程、金融、房产、石化、数据管理、军工、航天等几乎涵盖所有。各行各业都会用的到。 PMP证…

爬虫逆向实战(28)-某税网第一步登录(sm2、sm4、HMacSHA256)

一、数据接口分析 主页地址&#xff1a;某税网 1、抓包 通过抓包可以发现登录接口是factorAccountLogin 2、判断是否有加密参数 请求参数是否加密&#xff1f; 通过查看载荷模块可以发现有一个datagram 和 一个signature加密参数 请求头是否加密&#xff1f; 通过查看“标…

nvm管理(切换)node版本,方便vue2,vue3+ts开发

使用nvm切换node版本 1. 完全删除之前的node及npm&#xff08;清理干净Node: 应用程序&#xff0c;缓存的文件&#xff0c;环境变量 &#xff09; 2. 使用管理员身份安装nvm&#xff0c;下载如下 3. 安装完nvm之后找到nvm下载路径对应的文件 4. 使用管理员身份打开cmd&#xff…

中缀表达式转后缀表达式(逆波兰式)

方法一&#xff1a;加括号法示例 步骤&#xff1a; 1、根据运算符的优先级对中缀表达式加括号&#xff08;有几个运算符就有几对括号&#xff0c;原有的括号不用加&#xff09; 2、将运算符移到对应括号后面 3、去掉所有括号&#xff0c;即为后缀表达式 以下面的中缀表达式为…

2023 年全国大学生数学建模A题目-定日镜场的优化设计

A题目是个典型的优化问题 大致思路&#xff08;非完整&#xff09; 先说题目的模型&#xff0c;有点类似一个人拿着镜子&#xff0c;这个镜子最终要映射到某个点上&#xff0c;有点类似下面这个玩意儿&#xff0c;只不过是个大型的而已 规划的吸收塔类似这个烧水壶&#xff0c;…

纷享销客华为云 | 聚力前行 共创云上新价值

近日&#xff0c;由华为云联合上万家生态伙伴举行的“第二届828 B2B企业节”在深圳盛大开幕&#xff0c;纷享销客作为华为云的战略合作伙伴出席了本次企业节的开幕&#xff0c;并斩获“华为云创新中心优秀制造解决方案伙伴”等多个奖项。纷享销客联合创始人 & 经营中心副总…

CTFHUB ICS(3)

1.S7协议恶意攻击分析 因为是plc的关机&#xff0c;我们直接过滤s7comm协议的内容 然后是提供info的排序我们可以根据这个进行分析 在plc中ack_data是对于job的响应这里ack_data返回了plc的stop即题目中描述的plc关机&#xff0c;而关机的发出属于job的信息所以我们去查找job里…

java八股文面试[设计模式]——创建型模式

创建型模式的作用就是创建对象&#xff0c;说到创建一个对象&#xff0c;最熟悉的就是 new 一个对象&#xff0c;然后 set 相关属性。但是&#xff0c;在很多场景下&#xff0c;我们需要给客户端提供更加友好的创建对象的方式&#xff0c;尤其是那种我们定义了类&#xff0c;但…

29 | 聊聊性能测试的基本方法与应用领域

并发用户数、响应时间、系统吞吐量之间的关系 当系统并发用户数较少时&#xff0c;系统的吞吐量也低&#xff0c;系统处于空闲状态&#xff0c;这个阶段被称为 “空闲区间”。 并发用户数进一步增长&#xff0c;系统的处理能力逐渐趋于饱和&#xff0c;因此每个用户的响应时间会…

2023全国大学生数学建模竞赛A题思路模型代码

目录 一.选题建议先发布&#xff0c;思路模型代码论文第一时间更新&#xff0c;获取见文末名片 二.选题建议&#xff0c;后续思路代码论文 A 题 定日镜场的优化设计 各题分析 获取完整思路代码见此处名片 一.选题建议先发布&#xff0c;思路模型代码论文第一时间更新&…

五大优化技巧,让你的视频直播app源码更加流畅

优化技巧一&#xff1a;性能调优 视频直播app源码在确保流畅体验方面是至关重要的。为了提升性能&#xff0c;以下是几项关键的优化技巧&#xff1a; 使用轻量级编码器和解码器&#xff1a;选择高效的编码器和解码器&#xff0c;以减少资源占用&#xff0c;并确保视频流畅播放…

2023全国大学生数学建模ABCDE选题建议,思路模型,小白要怎么选?难度怎么样

首先最重要的&#xff0c;难度C<B<A&#xff0c;D、E题推荐选E题 大家可以查看我们的视频讲解&#xff0c;在这里&#xff1a;【2023全国大学生数学建模竞赛选题建议&#xff0c;难度分析&#xff0c;小白应该怎么选】 https://b23.tv/S6O26uc 选题建议视频播放​b23.t…

Matlab如何导入Excel数据并进行FFT变换

如果你发现某段信号里面有干扰&#xff0c;想要分析这段信号里面的频率成分&#xff0c;就可以使用matlab导入Excel数据后进行快速傅里叶变换&#xff08;fft&#xff09;。 先直接上使用方法&#xff0c;后面再补充理论知识。 可以通过串口将需要分析的数据发送到串口助手&a…

【1++的数据结构】之哈希(一)

&#x1f44d;作者主页&#xff1a;进击的1 &#x1f929; 专栏链接&#xff1a;【1的数据结构】 文章目录 一&#xff0c;什么是哈希&#xff1f;二&#xff0c;哈希冲突哈希函数哈希冲突解决 unordered_map与unordered_set 一&#xff0c;什么是哈希&#xff1f; 首先我们要…

(3)MyBatis-Plus待开发

常用注解 TableName MyBatis-Plus在确定操作的表时&#xff0c;由BaseMapper的泛型决定即实体类型决定&#xff0c;且默认操作的表名和实体类型的类名一致,如果不一致则会因找不到表报异常 //向表中插入一条数据 Test public void testInsert(){User user new User(null, &…

Android 10.0 禁用adb shell input输入功能

1.前言 在10.0的产品开发中,在进行一些定制开发中,对于一些adb shell功能需要通过属性来控制禁止使用input 等输入功能,比如adb shell input keyevent 响应输入事件等,所以就需要 熟悉adb shell input的输入事件流程,然后来禁用adb shell input的输入事件功能,接下来分…

yolov7添加注意力机制

yolov7结构图 方法:直接在common里改,在相关的后面加上就行 1、接受通道数的注意力机制 1、目的:在三个输出地方添加注意力 yolov7.yaml文件,换成其他模块 注意力链接 2、models下建SE.py 3、common.py下,先找class Conv,再复制一份修改,把模块导进来 4、yolo.…