SAP BAPI 客户主数据创建:cmd_ei_api=>maintain_bapi

BAPI函数:cmd_ei_api=>maintain_bapi

事物代码:XD01/XD02

客户主数据创建、修改、拓展功能开发

数据结构定义:

基本视图信息

公司代码信息结构:

销售视图信息结构:

客户主数据税分类信息结构:

代码参考

详细代码样例参考:

FUNCTION zsd_customer_maintain.
*"----------------------------------------------------------------------
*"*"本地接口:
*"  IMPORTING
*"     REFERENCE(IS_GENERAL) TYPE  ZSGENERAL OPTIONAL
*"  EXPORTING
*"     REFERENCE(KUNNR) TYPE  KUNNR
*"  TABLES
*"      IT_COMPANY_DATA STRUCTURE  ZSCOMPANY_DATA OPTIONAL
*"      IT_SALES_DATA STRUCTURE  ZSSALES_DATA OPTIONAL
*"      IT_TAX_DATA STRUCTURE  ZSTAX_DATA OPTIONAL
*"      ET_RETURN STRUCTURE  BAPIRET2 OPTIONAL
*"----------------------------------------------------------------------
  DATA: is_master_data           TYPE cmds_ei_main,
        es_error                 TYPE cvis_message,
        ls_messages              TYPE bapiret2,
        ls_return                TYPE bapiret2,
        ls_company_data          TYPE zscompany_data,
        ls_company               TYPE cmds_ei_company,
        ls_customers             TYPE cmds_ei_extern,
        ls_sales_data            TYPE zssales_data,
        ls_sales                 TYPE cmds_ei_sales,
        ls_tax_data              TYPE zstax_data,
        ls_tax                   TYPE cmds_ei_tax_ind,
        ls_banks                 TYPE cvis_ei_cvi_bankdetail,
        lv_kunnr                 TYPE knvk-kunnr,
        lt_knvk                  TYPE TABLE OF knvk,
        ls_knvk                  TYPE knvk,
        ls_adr6                  TYPE adr6,
        lv_name                  TYPE string,
        ls_contact               TYPE cmds_ei_contacts,
        gs_error                 TYPE cvis_message,
        ls_phone                 TYPE cvis_ei_phone_str,
        ls_smtp                  TYPE cvis_ei_smtp_str,
        ls_functions             TYPE cmds_ei_functions,
        es_master_data_correct   TYPE cmds_ei_main,
        es_message_correct       TYPE cvis_message,
        ls_customrers            TYPE cmds_ei_extern,
        es_master_data_defective TYPE cmds_ei_main,
        es_message_defective     TYPE cvis_message.

*--------------------------------------------------------------------*
*  基本视图信息
*--------------------------------------------------------------------*
  ls_customers-header-object_task = 'M'.
  CLEAR: lv_kunnr.
  CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
    EXPORTING
      input  = is_general-kunnr
    IMPORTING
      output = lv_kunnr.
  IF lv_kunnr IS NOT INITIAL.
    ls_customers-header-object_instance-kunnr = lv_kunnr.
  ENDIF.

  IF is_general-ktokd IS NOT INITIAL.
    ls_customers-central_data-central-data-ktokd = is_general-ktokd. "客户帐户组
    ls_customers-central_data-central-datax-ktokd = 'X'.
  ENDIF.

  IF is_general-stcd5 IS NOT INITIAL.
    ls_customers-central_data-central-data-stcd5 = is_general-stcd5. "税号 5
    ls_customers-central_data-central-datax-stcd5 = 'X'.
  ENDIF.

  IF is_general-title IS NOT INITIAL.
    ls_customers-central_data-address-postal-data-title = is_general-title. "称谓默认公司:0003
    ls_customers-central_data-address-postal-datax-title = 'X'.
  ENDIF.

  IF is_general-name IS NOT INITIAL.
    ls_customers-central_data-address-postal-data-name = is_general-name. "名称 1
    ls_customers-central_data-address-postal-datax-name = 'X'.
  ENDIF.

  IF is_general-name_2 IS NOT INITIAL.
    ls_customers-central_data-address-postal-data-name_2 = is_general-name_2. "名称 2
    ls_customers-central_data-address-postal-datax-name_2 = 'X'.
  ENDIF.

  IF is_general-name_3 IS NOT INITIAL.
    ls_customers-central_data-address-postal-data-name_3 = is_general-name_3. "名称 3
    ls_customers-central_data-address-postal-datax-name_3 = 'X'.
  ENDIF.

  IF is_general-name_4 IS NOT INITIAL.
    ls_customers-central_data-address-postal-data-name_4 = is_general-name_4. "名称 4
    ls_customers-central_data-address-postal-datax-name_4 = 'X'.
  ENDIF.

  IF is_general-sort1 IS NOT INITIAL.
    ls_customers-central_data-address-postal-data-sort1 = is_general-sort1. "检索项1
    ls_customers-central_data-address-postal-datax-sort1 = 'X'.
  ENDIF.

  IF is_general-sort2 IS NOT INITIAL.
    ls_customers-central_data-address-postal-data-sort2 = is_general-sort2. "检索项2
    ls_customers-central_data-address-postal-datax-sort2 = 'X'.
  ENDIF.

  IF is_general-street IS NOT INITIAL.
    ls_customers-central_data-address-postal-data-street = is_general-street. "街道
    ls_customers-central_data-address-postal-datax-street = 'X'.
  ENDIF.

  IF is_general-country IS NOT INITIAL.
    ls_customers-central_data-address-postal-data-country = is_general-country. "国家键值
    ls_customers-central_data-address-postal-datax-country = 'X'.
    IF is_general-country = 'CN'.
      ls_customers-central_data-address-postal-data-langu = '1'. "语言代码
    ELSE.
      ls_customers-central_data-address-postal-data-langu = 'E'. "语言代码
    ENDIF.
    ls_customers-central_data-address-postal-datax-langu = 'X'.
  ENDIF.
  IF ls_customers-central_data-address IS NOT INITIAL.
    ls_customers-central_data-address-task = 'M'.
  ENDIF.

  IF is_general-banks IS NOT INITIAL.
    ls_banks-data_key-banks = is_general-banks. "银行国家代码
  ENDIF.

  IF is_general-bankl IS NOT INITIAL.
    ls_banks-data_key-bankl = is_general-bankl. "银行编号
  ENDIF.

  IF is_general-bankn IS NOT INITIAL.
    ls_banks-data_key-bankn = is_general-bankn. "银行帐户号码
  ENDIF.

  IF is_general-bvtyp IS NOT INITIAL.
    ls_banks-data-bvtyp = is_general-bvtyp. "合作银行类型
    ls_banks-datax-bvtyp = 'X'.
  ENDIF.

  IF is_general-bkref IS NOT INITIAL.
    ls_banks-data-bkref = is_general-bkref. "银行帐户的参考规定
    ls_banks-datax-bkref = 'X'.
  ENDIF.

  IF is_general-koinh IS NOT INITIAL.
    ls_banks-data-koinh = is_general-koinh. "帐户持有人姓名
    ls_banks-datax-koinh = 'X'.
  ENDIF.

  IF ls_banks IS NOT INITIAL.
    ls_banks-task = 'M'.
    APPEND ls_banks TO ls_customers-central_data-bankdetail-bankdetails[].
    CLEAR: ls_banks.
  ENDIF.

  "检查联系人是否有创建,如果有的话,就进行修改,如果没有,则新建
  SELECT * INTO TABLE lt_knvk
    FROM knvk
    WHERE kunnr = lv_kunnr.

  LOOP AT lt_knvk INTO ls_knvk.
    CLEAR: lv_name.
    CONCATENATE ls_knvk-name1 ls_knvk-namev INTO lv_name.
    IF lv_name = is_general-name_c.
      ls_contact-task = 'U'.
      ls_contact-data_key-parnr = ls_knvk-parnr.
      EXIT.
    ELSE.
      ls_contact-task = 'M'.
    ENDIF.
  ENDLOOP.
  IF ls_contact-task = 'M'.
    cmd_ei_api=>get_contact_number( IMPORTING ev_parnr = ls_contact-data_key-parnr
                                                es_error = gs_error ).
  ENDIF.


  IF is_general-telephone IS NOT INITIAL.
    ls_phone-contact-data-telephone = is_general-telephone.
    ls_phone-contact-datax-telephone = 'X'.
  ENDIF.

  IF is_general-extension IS NOT INITIAL.
    ls_phone-contact-data-extension = is_general-extension.
    ls_phone-contact-datax-extension = 'X'.
  ENDIF.

  IF is_general-tel_no IS NOT INITIAL.
    ls_phone-contact-data-tel_no = is_general-tel_no.
    ls_phone-contact-datax-tel_no = 'X'.
  ENDIF.

  IF ls_phone IS NOT INITIAL.
    ls_phone-contact-task = 'M'.
    APPEND ls_phone TO ls_contact-address_type_1-communication-phone-phone[].
    CLEAR: ls_phone.
  ENDIF.

  IF is_general-e_mail IS NOT INITIAL.
    READ TABLE lt_knvk INTO ls_knvk WITH KEY parnr = ls_contact-data_key-parnr.
    IF sy-subrc = 0.
      SELECT SINGLE * INTO ls_adr6
        FROM adr6
        WHERE persnumber = ls_knvk-prsnr.
      IF ls_adr6-smtp_addr IS INITIAL.
        ls_smtp-contact-task = 'I'.
      ELSE.
        ls_smtp-contact-task = 'U'.
      ENDIF.
    ENDIF.

    ls_smtp-contact-data-e_mail = is_general-e_mail.
    ls_smtp-contact-datax-e_mail = 'X'.
    APPEND ls_smtp TO ls_contact-address_type_1-communication-smtp-smtp[].
    APPEND ls_smtp TO ls_contact-address_type_3-communication-smtp-smtp[].
    CLEAR: ls_smtp.
  ENDIF.

  IF is_general-postl_cod1 IS NOT INITIAL.
    ls_contact-address_type_1-postal-data-postl_cod1 = is_general-postl_cod1.
    ls_contact-address_type_1-postal-datax-postl_cod1 = 'X'.

    ls_contact-address_type_2-postal-data-postl_cod1 = is_general-postl_cod1.
    ls_contact-address_type_2-postal-datax-postl_cod1 = 'X'.
  ENDIF.

  IF is_general-country IS NOT INITIAL.
    ls_contact-address_type_1-postal-data-country = is_general-country.
    ls_contact-address_type_1-postal-datax-country = 'X'.

    ls_contact-address_type_2-postal-data-country = is_general-country.
    ls_contact-address_type_2-postal-datax-country = 'X'.
  ENDIF.

  IF is_general-name_c IS NOT INITIAL.
    ls_contact-address_type_1-postal-data-name = is_general-name_c.
    ls_contact-address_type_1-postal-datax-name = 'X'.

    ls_contact-address_type_3-postal-data-fullname = is_general-name_c.
    ls_contact-address_type_3-postal-data-firstname = is_general-name_c.
    ls_contact-address_type_3-postal-data-lastname = is_general-name_c.
    ls_contact-address_type_3-postal-datax-fullname = 'X'.
    ls_contact-address_type_3-postal-datax-firstname = 'X'.
    ls_contact-address_type_3-postal-datax-lastname = 'X'.
  ENDIF.

  IF ls_contact IS NOT INITIAL.
    ls_contact-address_type_1-task = 'M'.
    ls_contact-address_type_2-task = 'M'.
    ls_contact-address_type_3-task = 'M'.
    APPEND ls_contact TO ls_customers-central_data-contact-contacts[].
    CLEAR: ls_contact.
  ENDIF.

  "紧急联系人
  LOOP AT lt_knvk INTO ls_knvk.
    CLEAR: lv_name.
    CONCATENATE ls_knvk-name1 ls_knvk-namev INTO lv_name.
    IF lv_name = is_general-name_jj.
      ls_contact-task = 'U'.
      ls_contact-data_key-parnr = ls_knvk-parnr.
      EXIT.
    ELSE.
      ls_contact-task = 'M'.
    ENDIF.
  ENDLOOP.
  IF ls_contact-task = 'M'.
    cmd_ei_api=>get_contact_number( IMPORTING ev_parnr = ls_contact-data_key-parnr
                                              es_error = gs_error ).
  ENDIF.

  IF is_general-telephone_jj IS NOT INITIAL.
    ls_phone-contact-data-telephone = is_general-telephone_jj.
    ls_phone-contact-datax-telephone = 'X'.
  ENDIF.

  IF is_general-extension_jj IS NOT INITIAL.
    ls_phone-contact-data-extension = is_general-extension_jj.
    ls_phone-contact-datax-extension = 'X'.
  ENDIF.

  IF is_general-tel_no_jj IS NOT INITIAL.
    ls_phone-contact-data-tel_no = is_general-tel_no_jj.
    ls_phone-contact-datax-tel_no = 'X'.
  ENDIF.

  IF ls_phone IS NOT INITIAL.
    ls_phone-contact-task = 'M'.
    APPEND ls_phone TO ls_contact-address_type_1-communication-phone-phone[].
    CLEAR: ls_phone.
  ENDIF.

  IF is_general-e_mail_jj IS NOT INITIAL.
    READ TABLE lt_knvk INTO ls_knvk WITH KEY parnr = ls_contact-data_key-parnr.
    IF sy-subrc = 0.
      SELECT SINGLE * INTO ls_adr6
        FROM adr6
        WHERE persnumber = ls_knvk-prsnr.
      IF ls_adr6-smtp_addr IS INITIAL.
        ls_smtp-contact-task = 'I'.
      ELSE.
        ls_smtp-contact-task = 'U'.
      ENDIF.
    ENDIF.

    ls_smtp-contact-data-e_mail = is_general-e_mail_jj.
    ls_smtp-contact-datax-e_mail = 'X'.
    APPEND ls_smtp TO ls_contact-address_type_1-communication-smtp-smtp[].
    APPEND ls_smtp TO ls_contact-address_type_3-communication-smtp-smtp[].
    CLEAR: ls_smtp.
  ENDIF.

  IF is_general-postl_cod1_jj IS NOT INITIAL.
    ls_contact-address_type_1-postal-data-postl_cod1 = is_general-postl_cod1_jj.
    ls_contact-address_type_1-postal-datax-postl_cod1 = 'X'.

    ls_contact-address_type_2-postal-data-postl_cod1 = is_general-postl_cod1_jj.
    ls_contact-address_type_2-postal-datax-postl_cod1 = 'X'.
  ENDIF.

  IF is_general-country IS NOT INITIAL.
    ls_contact-address_type_1-postal-data-country = is_general-country.
    ls_contact-address_type_1-postal-datax-country = 'X'.

    ls_contact-address_type_2-postal-data-country = is_general-country.
    ls_contact-address_type_2-postal-datax-country = 'X'.
  ENDIF.

  IF is_general-name_jj IS NOT INITIAL.
    ls_contact-address_type_1-postal-data-name = is_general-name_jj.
    ls_contact-address_type_1-postal-datax-name = 'X'.

    ls_contact-address_type_3-postal-data-fullname = is_general-name_jj.
    ls_contact-address_type_3-postal-data-firstname = is_general-name_jj.
    ls_contact-address_type_3-postal-data-lastname = is_general-name_jj.
    ls_contact-address_type_3-postal-datax-fullname = 'X'.
    ls_contact-address_type_3-postal-datax-firstname = 'X'.
    ls_contact-address_type_3-postal-datax-lastname = 'X'.
  ENDIF.

  IF ls_contact IS NOT INITIAL.
    ls_contact-address_type_1-task = 'M'.
    ls_contact-address_type_2-task = 'M'.
    ls_contact-address_type_3-task = 'M'.
    APPEND ls_contact TO ls_customers-central_data-contact-contacts[].
    CLEAR: ls_contact.
  ENDIF.

  " 税分类
  LOOP AT it_tax_data INTO ls_tax_data.
    ls_tax-task = 'M'.
    ls_tax-data_key-aland = ls_tax_data-aland. "发货国(由该国家发货)
    ls_tax-data_key-tatyp = ls_tax_data-tatyp. "税类别(营业税,联邦营业税,...)
    ls_tax-data-taxkd = ls_tax_data-taxkd. "客户税分类

    ls_tax-datax-taxkd = 'X'.
    APPEND ls_tax TO ls_customers-central_data-tax_ind-tax_ind[].
    CLEAR: ls_tax, ls_tax_data.
  ENDLOOP.
*--------------------------------------------------------------------*
*  销售视图信息
*--------------------------------------------------------------------*
  LOOP AT it_sales_data INTO ls_sales_data.
    ls_sales-task = 'M'.
    ls_sales-data_key-vkorg = ls_sales_data-vkorg. "销售组织
    ls_sales-data_key-vtweg = ls_sales_data-vtweg. "分销渠道
    ls_sales-data_key-spart = ls_sales_data-spart. "产品组
    ls_sales-data-bzirk = ls_sales_data-bzirk."销售地区
    ls_sales-data-vkgrp = ls_sales_data-vkgrp. "销售组
    ls_sales-data-vkbur = ls_sales_data-vkbur. "销售部门
    ls_sales-data-awahr = ls_sales_data-awahr."该项目的订单可能性
    ls_sales-data-kdgrp = ls_sales_data-kdgrp. "客户组
    ls_sales-data-waers = ls_sales_data-waers. "货币
    ls_sales-data-kalks = ls_sales_data-kalks."定价过程分配到该客户
    ls_sales-data-zterm = ls_sales_data-zterm. "付款条件代码
    ls_sales-data-mrnkz = ls_sales_data-mrnkz. "人工发票维护
    ls_sales-data-bokre = ls_sales_data-bokre. "标识:客户将接受回扣
    ls_sales-data-prfre = ls_sales_data-prfre. "定价标识相关
    ls_sales-data-ktgrd = ls_sales_data-ktgrd. "客户组的帐户分配
    ls_sales-data-inco1 = ls_sales_data-inco1. "国际贸易条款 (部分1)
    ls_sales-data-inco2 = ls_sales_data-inco2. "国际贸易条件(部分2)
    ls_sales-data-kzazu = 'X'. "订单组合标识

    ls_functions-task = 'M'.
    ls_functions-data_key-parvw = 'AG'.
    IF lv_kunnr IS NOT INITIAL.
      ls_functions-data-partner = lv_kunnr.
      ls_functions-datax-partner = 'X'.
    ENDIF.
    APPEND ls_functions TO ls_sales-functions-functions[].
    CLEAR: ls_functions.
    ls_functions-task = 'M'.
    ls_functions-data_key-parvw = 'RE'.
    IF lv_kunnr IS NOT INITIAL.
      ls_functions-data-partner = lv_kunnr.
      ls_functions-datax-partner = 'X'.
    ENDIF.
    APPEND ls_functions TO ls_sales-functions-functions[].
    CLEAR: ls_functions.
    ls_functions-task = 'M'.
    ls_functions-data_key-parvw = 'RG'.
    IF lv_kunnr IS NOT INITIAL.
      ls_functions-data-partner = lv_kunnr.
      ls_functions-datax-partner = 'X'.
    ENDIF.
    APPEND ls_functions TO ls_sales-functions-functions[].
    CLEAR: ls_functions.
    ls_functions-task = 'M'.
    ls_functions-data_key-parvw = 'WE'.
    IF lv_kunnr IS NOT INITIAL.
      ls_functions-data-partner = lv_kunnr.
      ls_functions-datax-partner = 'X'.
    ENDIF.
    APPEND ls_functions TO ls_sales-functions-functions[].
    CLEAR: ls_functions.

    ls_sales-datax-bzirk = 'X'.
    ls_sales-datax-vkgrp = 'X'.
    ls_sales-datax-vkbur = 'X'.
    ls_sales-datax-awahr = 'X'.
    ls_sales-datax-kdgrp = 'X'.
    ls_sales-datax-waers = 'X'.
    ls_sales-datax-kalks = 'X'.
    ls_sales-datax-zterm = 'X'.
    ls_sales-datax-mrnkz = 'X'.
    ls_sales-datax-bokre = 'X'.
    ls_sales-datax-prfre = 'X'.
    ls_sales-datax-ktgrd = 'X'.
    ls_sales-datax-inco1 = 'X'.
    ls_sales-datax-inco2 = 'X'.
    ls_sales-datax-kzazu = 'X'.

    APPEND ls_sales TO ls_customers-sales_data-sales[].
    CLEAR: ls_sales, ls_sales_data.
  ENDLOOP.

*--------------------------------------------------------------------*
*  公司代码视图信息
*--------------------------------------------------------------------*
  LOOP AT it_company_data INTO ls_company_data.
    ls_company-task = 'M'.
    ls_company-data_key-bukrs = ls_company_data-bukrs. "公司代码
    ls_company-data-akont = ls_company_data-akont. "统驭科目

    ls_company-datax-akont = 'X'.
    APPEND ls_company TO ls_customers-company_data-company[].
    CLEAR: ls_company, ls_company_data.
  ENDLOOP.

  APPEND ls_customers TO is_master_data-customers[].

*  CALL METHOD cmd_ei_api=>maintain
*    EXPORTING
*      iv_test_run    = space
*      is_master_data = is_master_data
*    IMPORTING
*      es_error       = es_error.

  CALL METHOD cmd_ei_api=>maintain_bapi
    EXPORTING
*     iv_test_run              = SPACE
*     iv_collect_messages      = SPACE
      is_master_data           = is_master_data
    IMPORTING
      es_master_data_correct   = es_master_data_correct
      es_message_correct       = es_message_correct
      es_master_data_defective = es_master_data_defective
      es_message_defective     = es_message_defective.


  READ TABLE es_master_data_correct-customers[] INTO ls_customrers INDEX 1.
  IF sy-subrc <> 0.
    CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'
*     IMPORTING
*       RETURN        =
      .
  ELSE.
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
      EXPORTING
        wait = 'X'
*     IMPORTING
*       RETURN        =
      .
*    READ TABLE es_master_data_correct-customers[] INTO ls_customrers INDEX 1.
    kunnr = ls_customrers-header-object_instance-kunnr.

  ENDIF.

  LOOP AT es_error-messages INTO ls_messages.
    MOVE-CORRESPONDING ls_messages TO ls_return.
    APPEND ls_return TO et_return.
    CLEAR: ls_return, ls_messages.
  ENDLOOP.

  LOOP AT es_message_defective-messages INTO ls_messages..
    MOVE-CORRESPONDING ls_messages TO ls_return.
    APPEND ls_return TO et_return.
    CLEAR: ls_return, ls_messages.
  ENDLOOP.

ENDFUNCTION.

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

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

C++面向对象编程与泛型编程(GP)

C既支持面向对象编程&#xff0c;又支持泛型编程 1.面向对象编程 将数据结构与处理方法&#xff08;容器与算法&#xff09;组成对象封装在一个类中&#xff0c;通过类的封装隐藏内部细节&#xff0c;可以使用继承&#xff0c;多态等方法。 注意&#xff1a;list容器本身带有…

计算机毕业设计——SpringBoot 招投标 任务发布网站(附源码)

1&#xff0c;绪论 在市场范围内&#xff0c;任务发布网站很受欢迎&#xff0c;有很多开发者以及其他领域的牛人&#xff0c;更倾向于选择工作时间、工作场景更自由的零工市场寻求零散单子来补贴家用。 如今市场上&#xff0c;任务发布网站鱼龙混杂&#xff0c;用户需要找一个…

CH341StreamI2C参数解释

总体思路&#xff1a; 第一步&#xff1a;使用EEPROM写入相应的数据 第二步&#xff1a;使用EEPROM读取相应的数据 第三步&#xff1a;使用CH341StreamI2C函数还原读取过程 每一步需要逻辑分析仪进行对比。 第一步&#xff1a;数据写入CH341WriteEEPROM 使用CH341WriteE…

性能测试之Mysql数据库调优

一、前言 性能调优前提&#xff1a;无监控不调优&#xff0c;对于mysql性能的监控前几天有文章提到过&#xff0c;有兴趣的朋友可以去看一下 二、Mysql性能指标及问题分析和定位 1、我们在监控图表中关注的性能指标大概有这么几个&#xff1a;CPU、内存、连接数、io读写时间…

【网络安全】【密码学】常见数据加(解)密算法及Python实现(一)

一、Base64编码 1、算法简介 Base64是一种常见的编&#xff08;解&#xff09;码方法&#xff0c;用于传输少量二进制数据。该编码方式较为简短&#xff0c;并不具有可读性&#xff0c;对敏感数据可以起到较好的保护作用。 2、Python实现&#xff08;调库&#xff09; &…

每日一道算法题day-one(备战蓝桥杯)

从今天开始博主会每天做一道算法题备战蓝桥杯&#xff0c;并分享博主做题的思路&#xff0c;有兴趣就加入我把&#xff01; 算法题目&#xff1a; 有一个长度为 N 的字符串 S &#xff0c;其中的每个字符要么是 B&#xff0c;要么是 E。 我们规定 S 的价值等于其中包含的子…

C++模板(泛型)

1. 模板 1.1 知识点 模板&#xff1a;template 泛型编程&#xff1a; 是指数据的类型是广泛&#xff0c;任意的数据类型 模板&#xff1a;可以将一个函数或类描述成一个模板&#xff0c;例如&#xff1a;画画&#xff0c;给一个人物模型上色彩&#xff0c;根据用户上的色彩是什…

Bean如何诞生与消亡:生命周期探秘【beans 二】

欢迎来到我的博客&#xff0c;代码的世界里&#xff0c;每一行都是一个故事 Bean如何诞生与消亡&#xff1a;生命周期探秘【beans 二】 前言bean的创建过程bean的初始化阶段1. 实现InitializingBean接口&#xff1a;2. 使用PostConstruct注解&#xff1a; bean的属性注入1. Set…

视频倒放软件,看视频如何演绎“逆袭”之旅

你是否厌倦了日复一日的平淡生活&#xff0c;渴望时光倒流&#xff0c;重温那些逝去的精彩瞬间&#xff1f;在数字技术的世界里&#xff0c;这样的愿望或许不再遥不可及。视频倒放仿佛让时光倒流&#xff0c;给我们的视觉带来了全新的冲击&#xff0c;今天&#xff0c;让我们一…

新手第一次在linux上用git上传代码到仓库全过程

目录 背景&#xff1a; 过程&#xff1a; -1.去github.com自己的账号先建个仓库repository 0.命令行输入 git version 看下有无安装git 1.git init 初始化了一个Git仓库&#xff0c;你可以 ls -a 看见这个隐藏的目录 3.git add . 添加要上传的文件到Git的暂存区&#xff0…

windows对微信及小程序抓包:Burp+Fiddler+Proxifier

本文由掌控安全学院 - zbs 投稿 话不多说&#xff0c;直接先上个效果图&#xff1a; 新新的版本哈&#xff1b; 好好的抓包哈&#xff1b; 然后直接说我如何配置的&#xff1a; 准备好三个工具&#xff1a;bp、fiddler、proxifier【也可以用其他的进行代理】 bp、proxifie…

ELement UI时间控件el-date-picker误差8小时解决办法

一、问题描述&#xff1a; 在项目中引用了elementui中的date-picker组件&#xff0c;选中的时间跟实际相差八小时&#xff0c;且格式不是自己想要的格式 <el-date-pickertype"date"placeholder"选择日期"format"yyyy/M/d"v-model"form…

R304S 指纹识别模块的硬件接口说明

一.外部接口尺寸图 二.串行通讯 R304S 指纹模块通讯接口定义&#xff1a; 引脚号名称定义描述15V电源输入电源正输入端 DC 4.2--6V2GND电源和信号地电源和信号地3TXD数据发送串行数据输出&#xff0c;TTL 逻辑电平4RXD数据接收串行数据输入&#xff0c;TTL 逻辑电平 三.USB通…

EtherCAT的COE报文

本文主要用于记录工作中需要学习的内容&#xff0c;如有冒犯请私信&#xff01; COE协议 下面我们介绍以下CANOpen在EtherCAT中的应用。 COE的对象字典 COE协议是完全遵循CANopen协议的&#xff0c;但针对EtherCAT通信做了一些扩展&#xff0c;索引为0x1c00~0x1c4f&#xff0…

Java中关键词strictfp有什么作用?

在Java中&#xff0c;关键词strictfp用于声明一个方法、类或接口是严格遵守浮点数计算规范的。 具体作用包括&#xff1a; 保证浮点数计算的结果在不同平台上是一致的&#xff0c;避免由于浮点数计算的不精确性导致的结果不确定性。 指定了严格的浮点数计算规则&#xff0c;禁…

LeetCode刷题---矩阵置零

解题思路&#xff1a; 本题要求原地置换元素 对矩阵进行第一轮遍历&#xff0c;使用第一行第一列来充当该行该列是否要置换为0的标记位&#xff0c;如果第一行或第一列本身就含有零元素&#xff0c;我们使用colZero和rowZero变量来对其标记。如果第i行第j列的那个元素为0&#…

产品经理如何选择城市?

年底&#xff0c;全国性的人口大迁徙即将开始。选择城市&#xff0c;堪称年轻人的“二次投胎”&#xff0c;族望留原籍&#xff0c;家贫走他乡。 古人在选择城市时&#xff0c;主要的考量因素是家族势力&#xff0c;这一点放在当代&#xff0c;大致也成立&#xff0c;如果在老…

Cell 文章图复现

多组差异火山图复现 参考文章: A Spatiotemporal Organ-Wide Gene Expression and Cell Atlas of the Developing Human Heart Figure 2. H 图里主要是单细胞数据不同cluster之间的差异火山图, 所以说白了就是散点图和柱状图的结合, 散点图用差异基因绘制, 柱状图利用logFC最…

关于MIPS上手应知应会-如何把C语言改写为MIPS!

文章目录 寄存器指令使用技巧翻译C/Cif/else语句switch语句for循环while 循环do...while循环一维数组定义与使用二维数组定义与使用例 &#xff1a;哈密顿回路 注意立即数被符号位扩展 参考链接 寄存器 NameReg. NumUsage z e r o zero zero0constant value 0(恒为0) a t at a…

TypeScript Array(数组)

目录 1、数组初始化 2、Array 对象 3、数组迭代 4、数组在函数中的使用 4.1、作为参数传递给函数 4.2、作为函数的返回值 5、数组方法 数组对象是使用单独的变量名来存储一系列的值。数组非常常用。假如你有一组数据&#xff08;例如&#xff1a;网站名字&#xff09;…