ABAP 承运路单
*&---------------------------------------------------------------------*
*& Report ZSDR010
*&
*&---------------------------------------------------------------------*
*&程序名称:承运路单
*&事物代码:ZSD030
*&导入模板:无
*&作者:
*&时间:2016/3/2
*&更新时间:2016/3/2
*&--------------------------------------------------------------------
REPORT zsdr010.
INCLUDE zsdr010_inc.
TYPE-POOLS: slis.
TABLES:likp, kna1, lips ,vttp ,vttk.
TYPES: BEGIN OF ty_all,
tknum LIKE vttk-tknum, "运单号
tplst LIKE vttk-tplst, "装运点
tdlnr LIKE vttk-tdlnr, "物流公司
erdat LIKE vttk-erdat, "装运日期
route LIKE vttk-route, "路线
distz LIKE vttk-distz, "里程
add01 LIKE vttk-add01, "车主、车号
add02 LIKE vttk-add02, "司机
bfart LIKE vttk-bfart, "车型
ernam LIKE vttk-ernam, "创建者
shtyp LIKE vttk-shtyp, "装运类型
btgew_sum LIKE likp-btgew, "总重量
tpnum LIKE vttp-tpnum, "项目号
vbeln LIKE vttp-vbeln, "交货单号
kunnr LIKE likp-kunnr, "客户代码
name1 LIKE kna1-name1, "客户名称
btgew LIKE likp-btgew, "重量
gewei LIKE likp-gewei, "重量单位
volum LIKE likp-volum, "体积
voleh LIKE likp-voleh, "体积单位
beizhu(20) TYPE c , "备注
END OF ty_all.
TYPES:BEGIN OF ty_header,
tknum LIKE vttk-tknum, "运单号
tplst LIKE vttk-tplst, "装运点
tplst_text LIKE ttdst-bezei,"装运点描述
tdlnr LIKE vttk-tdlnr, "物流公司
tdlnr_text LIKE lfa1-name1, "物流公司描述
erdat LIKE vttk-erdat, "装运日期
route LIKE vttk-route, "路线
route_text LIKE tvrot-bezei,"路线描述
distz LIKE vttk-distz, "里程
add01 LIKE vttk-add01, "车主、车号
add02 LIKE vttk-add02, "司机
bfart LIKE vttk-bfart, "车型
ernam LIKE vttk-ernam, "创建者
shtyp LIKE vttk-shtyp, "装运类型
btgew_sum LIKE likp-btgew, "总重量
beizhu(20) TYPE c , "备注
END OF ty_header.
TYPES:BEGIN OF ty_items,
tknum LIKE vttk-tknum, "运单号
tpnum LIKE vttp-tpnum, "项目号
vbeln LIKE vttp-vbeln, "交货单号
kunnr LIKE likp-kunnr, "客户代码
name1 LIKE kna1-name1, "客户名称
btgew LIKE likp-btgew, "重量
gewei LIKE likp-gewei, "重量单位
volum LIKE likp-volum, "体积
voleh LIKE likp-voleh, "体积单位
beizhu(20) TYPE c , "备注
END OF ty_items.
DATA:wa_all TYPE ty_all,
gt_all TYPE ty_all OCCURS 0.
DATA:wa_header TYPE ty_header,
gt_header TYPE ty_header OCCURS 0.
DATA:wa_items TYPE ty_items,
gt_items TYPE ty_items OCCURS 0.
*定义传入到smartforms的变量开始
DATA:fm_name TYPE rs38l_fnam.
DATA:itemsname(32) TYPE c.
DATA:headername(32) TYPE c.
*定义传入到smartforms的变量结束
*定义存储ALV向smartforms传入数据的内表开始
DATA:gt_header_temp TYPE ty_header OCCURS 0.
DATA:gt_items_temp TYPE ty_items OCCURS 0.
DATA:gt_all_temp TYPE ty_all OCCURS 0.
*定义存储ALV向smartforms传入数据的内表结束
*ALV显示头数据开始
DATA:gt_header_show TYPE ty_header OCCURS 0.
DATA:gt_items_show TYPE ty_items OCCURS 0.
*ALV显示头数据结束
"控制smartforms参数声明开始
DATA :control_parameters TYPE ssfctrlop.
"控制smartforms参数声明结束
DATA: gs_fcat TYPE lvc_s_fcat,
gt_fcat TYPE lvc_t_fcat,
gs_layo TYPE lvc_s_layo,
gs_grid TYPE lvc_s_glay.
DATA: gt_event TYPE slis_t_event WITH HEADER LINE,
gt_event_exit TYPE slis_t_event_exit WITH HEADER LINE.
DATA: ref_grid TYPE REF TO cl_gui_alv_grid .
START-OF-SELECTION.
SELECT-OPTIONS: p_tknum FOR vttk-tknum , "运单号
p_shtyp FOR vttk-shtyp,"装运类型
p_tdlnr FOR vttk-tdlnr ,"服务代理
p_route FOR vttk-route,"装运线路
p_ernam FOR vttk-ernam,"创建者
p_erdat FOR vttk-erdat . "装运日期
"P_TPLST FOR VTTK-TPLST ,
"P_ERNAM FOR VTTK-ERNAM ,
"P_ROUTE FOR VTTK-ROUTE .
PERFORM frm_get_data.
PERFORM display_data .
END-OF-SELECTION.
"当屏幕失去焦点时,自动刷新声明类开始
CLASS lcl_event_receiver DEFINITION.
PUBLIC SECTION.
METHODS handle_modify
FOR EVENT data_changed_finished OF cl_gui_alv_grid
IMPORTING e_modified et_good_cells.
ENDCLASS.
CLASS lcl_event_receiver IMPLEMENTATION.
METHOD handle_modify.
* PERFORM refresh.
DATA stbl TYPE lvc_s_stbl.
stbl-row = 'X'." 基于行的稳定刷新
stbl-col = 'X'." 基于列稳定刷新
CALL METHOD ref_grid->refresh_table_display
EXPORTING
is_stable = stbl.
ENDMETHOD. "HANDLE_MODIFY
ENDCLASS. "LCL_EVENT_RECEIVER IMPLEMENTATION
DATA gt_event_receiver TYPE REF TO lcl_event_receiver .
"当屏幕失去焦点时,自动刷新声明类结束
FORM frm_get_data .
TYPES: BEGIN OF ty_tknum ,"存储动态显示列的内表结构
tknum LIKE vttk-tknum , "运单号
btgew LIKE likp-btgew, "一个运单对应的重量
END OF ty_tknum.
DATA : hs_tknum TYPE HASHED TABLE OF ty_tknum WITH UNIQUE KEY tknum WITH HEADER LINE .
SELECT vk~tknum vk~tplst vk~tdlnr vk~erdat vk~route vk~distz
vk~add01 vk~add02 vk~bfart vk~ernam vk~shtyp
vp~tpnum vp~vbeln lp~kunnr k~name1 lp~btgew lp~gewei
lp~volum lp~voleh
FROM vttk AS vk
INNER JOIN vttp AS vp
ON vk~tknum = vp~tknum
INNER JOIN likp AS lp
ON vp~vbeln = lp~vbeln
INNER
JOIN kna1 AS k
ON k~kunnr = lp~kunnr
INTO CORRESPONDING FIELDS OF TABLE gt_all
WHERE ( vk~tknum IN p_tknum
AND vk~erdat IN p_erdat
AND vk~route IN p_route
AND vk~tdlnr IN p_tdlnr
AND vk~ernam IN p_ernam
AND vk~shtyp IN p_shtyp ).
LOOP AT gt_all INTO wa_all.
IF wa_all-gewei NE 'KG'.
CALL FUNCTION 'UNIT_CONVERSION_SIMPLE'
EXPORTING
input = wa_all-btgew
round_sign
= 'X'
unit_in
= 'G'
unit_out
= 'KG'
IMPORTING
output = wa_all-btgew
EXCEPTIONS
conversion_not_found
= 01
division_by_zero
= 02
input_invalid
= 03.
ENDIF.
hs_tknum
-tknum = wa_all-tknum.
hs_tknum
-btgew = wa_all-btgew.
COLLECT hs_tknum.
ENDLOOP.
SORT gt_all ASCENDING BY tknum ."BUDAT_MKPF CPUTM_MKPF.
MOVE-CORRESPONDING gt_all TO gt_header_show.
MOVE-CORRESPONDING gt_all TO gt_items_show.
DELETE ADJACENT DUPLICATES FROM gt_header_show COMPARING tknum.
SORT gt_items_show BY tknum tpnum.
CLEAR wa_header.
LOOP AT gt_header_show INTO wa_header.
READ TABLE hs_tknum WITH KEY tknum = wa_header-tknum.
wa_header
-btgew_sum = hs_tknum-btgew.
SELECT SINGLE bezei FROM ttdst INTO wa_header-tplst_text
WHERE tplst eq wa_header-tplst.
SELECT SINGLE bezei FROM tvrot INTO wa_header-route_text
WHERE route eq wa_header-route.
SELECT SINGLE name1 FROM lfa1 INTO wa_header-tdlnr_text
WHERE lifnr eq wa_header-tdlnr.
MODIFY gt_header_show FROM wa_header.
CLEAR wa_header.
ENDLOOP.
ENDFORM.
FORM display_data .
PERFORM set_fcat.
PERFORM set_layout.
PERFORM show_alv TABLES gt_fcat gt_header_show[]
USING gs_layo.
ENDFORM. " DISPLAY_DATA
*&---------------------------------------------------------------------*
FORM set_fcat .
PERFORM csalv_set_fcat USING:
" 'Field' 'Text' 'Edit' 'Zero' 'Type' 'Qfieldname' 'Key' 'Hostspot' 'Emphasize' 'Checkbox'
'TKNUM' '运单号' '' '' '' '' '' '' '' '' '' '' '' '10',
'TPLST' '装运点' '' '' '' '' '' '' '' '' '' '' '' '5',
'TPLST_TEXT' '装运点名称' '' '' '' '' '' '' '' '' '' '' '' '30',
'TDLNR' '物流公司代码' '' '' '' '' '' '' '' '' '' '' '' '15',
'TDLNR_TEXT' '物流公司' '' '' '' '' '' '' '' '' '' '' '' '30',
'ERDAT' '装运日期' '' '' '' '' '' '' '' '' '' '' '' '10',
'ROUTE' '装运线路' '' '' '' '' '' '' '' '' '' '' '' '10',
'ROUTE_TEXT' '装运线路描述' '' '' '' '' '' '' '' '' '' '' '' '30',
'SHTYP' '装运类型' '' '' '' '' '' '' '' '' '' '' '' '5',
'BTGEW_SUM' '总重量(KG)' '' '' '' '' '' '' '' '' '' '' '' '10',
'DISTZ' '里程' '' '' '' '' '' '' '' '' '' '' '' '10',
'ADD02' '司机' '' '' '' '' '' '' '' '' '' '' '' '10',
'BFART' '车型' '' '' '' '' '' '' '' '' '' '' '' '5',
'ERNAM' '创建者' '' '' '' '' '' '' '' '' '' '' '' '20',
'BEIZHU' '备注' 'X' '' '' '' '' '' '' '' '' '' 'X' ''.
ENDFORM. " SET_FCAT
*&---------------------------------------------------------------------*
FORM set_layout .
gs_layo
-zebra = 'X'.
* gs_layout-stylefname = 'FIELD_STYLE'.
gs_layo
-CWIDTH_OPT = 'X'.
ENDFORM. " SET_LAYOUT
*&---------------------------------------------------------------------*
FORM csalv_set_fcat USING
p_name
p_text
p_edit
p_zero
p_type
p_qfieldname
p_key
p_hotspot
p_emphasize
p_checkbox
p_do_sum
p_decimals_out
p_no_out
p_outputlen
.
gs_fcat
-fieldname = p_name.
* gs_fcat-reptext_l =
* gs_fcat-selddictxt =
gs_fcat
-reptext = p_text.
gs_fcat
-edit = p_edit.
gs_fcat
-no_zero = p_zero.
gs_fcat
-datatype = p_type.
gs_fcat
-qfieldname = p_qfieldname.
gs_fcat
-key = p_key.
gs_fcat
-hotspot = p_hotspot.
gs_fcat
-emphasize = p_emphasize.
gs_fcat
-checkbox = p_checkbox.
gs_fcat
-do_sum = p_do_sum.
gs_fcat
-decimals_o = p_decimals_out.
gs_fcat
-no_out = p_no_out.
gs_fcat
-outputlen = p_outputlen.
APPEND gs_fcat TO gt_fcat.
ENDFORM. "csalv_set_fcat
*&---------------------------------------------------------------------*
FORM show_alv TABLES pt_fcat
pt_tab
USING ps_layout.
gs_grid
-edt_cll_cb = 'X'."当屏幕失去焦点时,自动刷新
gt_event
-name = 'CALLER_EXIT'. "slis_ev_caller_exit_at_start事件
gt_event
-form = 'FM_BUTTON'.
APPEND gt_event .
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY_LVC'
EXPORTING
i_callback_program
= sy-repid
i_callback_user_command
= 'USER_COMMAND'
i_grid_settings
= gs_grid
i_callback_pf_status_set
= 'SET_PF_STATUS'
is_layout_lvc
= gs_layo
it_fieldcat_lvc
= pt_fcat[]
it_events
= gt_event[]
i_save
= 'X'
* it_event_exit = gt_event_exit[]
TABLES
t_outtab
= pt_tab
EXCEPTIONS
program_error
= 1
OTHERS = 2.
ENDFORM. "csalv_set_fcat
FORM print.
DATA:ptr_count(10) TYPE c.
DATA: lines TYPE i."获取往smartforms传入的要打印的行数目
DATA: insertrows TYPE i."需要再插入多少空行
DATA: rows TYPE i VALUE 22."一页要打印的行数
CLEAR gt_all_temp.
CLEAR gt_header.
CLEAR gt_items.
CLEAR gt_header_temp.
CLEAR gt_items_temp.
DATA count LIKE lips-brgew VALUE 0.
DATA:ls_row TYPE lvc_s_row,
lt_rows
TYPE lvc_t_row.
"CLEAR GT_HEADER.
"CLEAR GT_ITEMS.
CALL METHOD ref_grid->get_selected_rows
IMPORTING
et_index_rows
= lt_rows
* et_row_no =
.
LOOP AT lt_rows INTO ls_row.
READ TABLE gt_header_show INTO wa_header INDEX ls_row-index.
APPEND wa_header TO gt_header.
LOOP AT gt_items_show INTO wa_items.
IF ( wa_header-tknum EQ wa_items-tknum ).
APPEND wa_items TO gt_items.
ENDIF.
ENDLOOP.
ENDLOOP.
CLEAR: control_parameters.
control_parameters
-preview = 'X'.
control_parameters
-no_open = 'X'.
control_parameters
-no_close = 'X'.
CALL FUNCTION 'SSF_OPEN'
EXPORTING
control_parameters
= control_parameters
EXCEPTIONS
formatting_error
= 1
internal_error
= 2
send_error
= 3
user_canceled
= 4
OTHERS = 5.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
EXIT.
ENDIF.
LOOP AT gt_header INTO wa_header.
APPEND wa_header TO gt_header_temp.
LOOP AT gt_items INTO wa_items.
IF ( wa_header-tknum EQ wa_items-tknum ) .
APPEND wa_items TO gt_items_temp.
ENDIF.
ENDLOOP.
"WA_HEADER-TOTAL_BRGEW = COUNT.
"MODIFY TABLE gt_header_temp FROM wa_header.
CLEAR wa_items.
CLEAR wa_header.
CLEAR count.
IF gt_items_temp IS INITIAL.
MESSAGE i000(0k) WITH '请选中要打印的内容!'.
EXIT .
ENDIF.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname
= 'ZSDSF003'
IMPORTING
fm_name
= fm_name
EXCEPTIONS
no_form
= 1
no_function_module
= 2
OTHERS = 3.
"SET HANDLER gt_event_receiver->handle_modify FOR ref_grid.
DESCRIBE TABLE gt_items_temp LINES lines.
insertrows
= lines MOD rows .
insertrows
= rows - insertrows.
DO insertrows TIMES.
APPEND wa_items TO gt_items_temp.
ENDDO.
PERFORM frm_print_data."每一个表头数据向smartforms传入数据
ENDLOOP.
CALL FUNCTION 'SSF_CLOSE'
EXCEPTIONS
formatting_error
= 1
internal_error
= 2
send_error
= 3
OTHERS = 4.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDFORM.
FORM frm_print_data.
CONCATENATE 'ZDDITEMMM' sy-uzeit INTO itemsname.
CONCATENATE 'ZDDHEADER' sy-uzeit INTO headername.
savebuffer gt_items_temp itemsname
.
savebuffer gt_header_temp headername
.
* PTR_COUNT = GV_COUNT .
*调用 smartForms
CALL FUNCTION fm_name
EXPORTING
control_parameters
= control_parameters
ptr_items
= itemsname
ptr_header
= headername
* PTR_TOTAL = GV_COUNT
EXCEPTIONS
formatting_error
= 1
internal_error
= 2
send_error
= 3
user_canceled
= 4.
clearbuffer itemsname
.
clearbuffer headername
.
CLEAR gt_header_temp.
CLEAR gt_items_temp.
ENDFORM.
*&---------------------------------------------------------------------*
*& Form user_command
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* -->P_UCOMM text
* -->PS_SELFIELD text
*----------------------------------------------------------------------*
FORM user_command USING r_ucomm LIKE sy-ucomm
rs_selfield
TYPE slis_selfield.
CASE r_ucomm.
WHEN '&DATA_SAVE'.
WHEN '&PRINT' OR '&PRT'.
PERFORM print.
WHEN OTHERS.
LEAVE PROGRAM.
ENDCASE.
ENDFORM. "user_command
*&---------------------------------------------------------------------*
*& Form SET_PF_STATUS
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* -->RT_EXTAB text
*----------------------------------------------------------------------*
FORM set_pf_status USING rt_extab TYPE slis_t_extab..
SET PF-STATUS 'STANDARD'.
ENDFORM. "SET_PF_STATUS
*&---------------------------------------------------------------------*
*& Form fm_button
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* -->E_GRID text
*----------------------------------------------------------------------*
FORM fm_button USING e_grid TYPE slis_data_caller_exit.
CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
* EXPORTING
* IR_SALV_FULLSCREEN_ADAPTER =
IMPORTING
* ET_EXCLUDING =
* E_REPID =
* E_CALLBACK_PROGRAM =
* E_CALLBACK_ROUTINE =
e_grid
= ref_grid
* ET_FIELDCAT_LVC =
* ER_TRACE =
* E_FLG_NO_HTML =
* ES_LAYOUT_KKBLO =
* ES_SEL_HIDE =
* ET_EVENT_EXIT =
* ER_FORM_TOL =
* ER_FORM_EOL =
.
* CALL METHOD ref_grid->check_changed_data.
* 设置enter事件
CALL METHOD ref_grid->register_edit_event
EXPORTING
i_event_id
= cl_gui_alv_grid=>mc_evt_enter
EXCEPTIONS
error
= 1
OTHERS = 2.
CREATE OBJECT gt_event_receiver.
SET HANDLER gt_event_receiver->handle_modify FOR ref_grid.
ENDFORM. "FM_BUTTON
ABAP 承运路单的更多相关文章
- ABAP单元测试最佳实践
本文包含了我在开发项目中经历过的实用的ABAP单元测试指导方针.我把它们安排成为问答的风格,欢迎任何人添加更多的Q&A's,以完成这个列表. 在我的项目中,只使用传统的ABAP report. ...
- ABAP实现屏幕自己刷新和跳转功能
ABAP开发工程中,有时候需要让跳转出的屏幕自动实现跳转和刷新的功能,该功能的实现需要在屏幕PBO 里面调用相应的事件执行. 关键代码为: SET TITLEBAR ' 屏幕自动程序'. IF g_c ...
- 一步步实现ABAP后台导入EXCEL到数据库【3】
在一步步实现ABAP后台导入EXCEL到数据库[2]里,我们已经实现计划后台作业将数据导入数据库的功能.但是,这只是针对一个简单的自定义结构的导入程序.在实践应用中,面对不同的表.不同的导入文件,我们 ...
- 一步步实现ABAP后台导入EXCEL到数据库【2】
前文:http://www.cnblogs.com/hhelibeb/p/5912330.html 既然后台作业只能在应用服务器运行,那么,我们可以先将要上传的数据保存在应用服务器中,之后再以后台作业 ...
- 让ABAP开发者愈加轻松的若干快捷键
引言 ABAP是一种和当代编程语言在许多方面有着相当不同的编程语言.ABAP的某些方面可能会让我们奇怪,为什么它会如此复杂?而它的某些方面又是那么杰出,给予了ABAP开发者们比其它任何语言更多的便利. ...
- ABAP游标的使用
在Oracle,SQLServer中游标的使用是经常的,所以在ABAP不懂是不行的...... 1.声明游标 OPEN CURSOR [WITH HOLD] <c> FOR SEL ...
- 一步步实现ABAP后台导入EXCEL到数据库【1】
在SAP的应用当中,导入.导出EXCEL文件的情况是一个常见的需求,有时候用户需要将大量数据定期导入到SAP的数据库中.这种情况下,使用导入程序在前台导入可能要花费不少的时间,如果能安排导入程序为后台 ...
- ABAP关键字SUBMIT的简单例子和学习小记
网上有关SUBMIT实现程序调用的例子稍显复杂,而相关的参考和解释则不是很完善.本文给出一个SUBMIT的小示例程序(代码见文末),实现了最简单的程序间调用及返回值,以及SAP官方文档中相关内容的翻译 ...
- ABAP 常见查询问题解决方法
在ABAP 编程的时候会遇到查询单条语句的时候数能取对 但是条目数多了的话 会出现数不准确的问题 原因可能出现在查询使用了二分法查询方式 二分法查询下必须按排序的字段排序 还得按照排序的字段 ...
随机推荐
- Spring实战 (第3版)——依赖注入
首先弄明白几个概念: 1.什么是POJO 2.JavaBean规范 3.EJB(Enterprise JavaBean) 体会Spring如何简化Java开发. 创建应用对象(组件)之间协作关系的行为 ...
- oracle中一些用法总结
1. case用法: --简单case函数 case sex when '1' then 'boy' when '2' then 'girl' else '其他' end; --case搜索函数 ca ...
- jQuery源码-dom操作之jQuery.fn.text
写在前面 jQuery.fn.text在jQuery是个使用频率比较高的接口,它的作用无非是设置/获取dom节点的内容文本,下文会通过几个简单的例子来说明.text()接口的使用,以及最后会对源码进行 ...
- webpack入门(一)——webpack 介绍
如今的网站正在演化为web应用程序: 1. 越来越多的使用JavaScript. 2. 现代浏览器提供更广泛的接口. 3. 整页刷新的情况越来越少,甚至更多代码在同一个页面.(SPA) 因此有很多代码 ...
- web 开发前端学习
调试插件:http://www.getpostman.com/ http://bootstrap.evget.com/javascript.html bootstrap: http://www.bo ...
- SqlServer中字符串和日期类型的转换
SQL Server Date 函数 定义和用法 CONVERT() 函数是把日期转换为新数据类型的通用函数. CONVERT() 函数可以用不同的格式显示日期/时间数据. 语法 CONVERT(da ...
- ajax如何返回多个值
应用场景: 在前端有个ajax请求到后端后,需要返回多个变量的值,在这里使用的是Json格式作为值传递,使用eval函数来解析Json格式. 要传递的值data: var data = " ...
- 基于Windows10安装Ubuntu双系统
步骤: 1.从Ubuntu的官网上下载Ubuntu的iSO安装包. http://www.ubuntu.com/download/ 我安装的版本是Ubuntu 14.04.3 LTS 64位版本 2. ...
- 开发板支持wifi
参考网址: http://wangye.org/blog/archives/845/ http://blog.csdn.net/lme525/article/details/37762519 htt ...
- 一次失败的动态转换bean的尝试与思考
前因 公司规范确定不允许使用反射类的进行属性bean的拷贝了,只允许手动的get/set,可以猜到这样定义的原因是制定规范的同事认为反射性能低,虽然写get/set慢点好在性能高.平时开发的时候也是迫 ...