 --T_PF_FORM

 --添加列表表单 
 --添加 编辑表单
 
 --编辑 填充区域
 --T_PF_PAGE_EDIT_PANEL

 --编辑
 --T_PF_PAGE_EDIT 
 --List<T_PF_EDIT_COLUMN>

 --//列表
 --T_PF_PAGE_TABLE
 --List<T_PF_COLUMN>

 --列表页查询
 --T_PF_FORM_QUERY
 --List<T_PF_QUERY> 

 --添加表单按钮
 --T_PF_BTN

 --菜单
 --T_PF_MENU


select top 1 ORG_ID from T_FM_USER

--CM模块移植到lyyl

--1、T_PF_FORM 
--修改
update T_PF_FORM set 
[CODE]=tb.CODE, [NAME]=tb.[NAME] , [NAME_ACRONYM]=tb.[NAME_ACRONYM] , [PLATFORM_TYPE]=tb.[PLATFORM_TYPE] , [FORM_TYPE]=tb.[FORM_TYPE] , [MODULE_TYPE]=tb.[MODULE_TYPE] , [URI]=tb.[URI] , [CUSTOM_PARAMS]=tb.[CUSTOM_PARAMS] , [JS_FILES]=tb.[JS_FILES] , [ENABLE_STATUS]=tb.[ENABLE_STATUS] , [TABLE_NAME]=tb.[TABLE_NAME] , [IS_IGNORE_PERMISSION]=tb.[IS_IGNORE_PERMISSION] , [AUTH_ORG_CODES]=tb.[AUTH_ORG_CODES] , [REMARK]=tb.[REMARK] , [SRC_ID]=tb.[SRC_ID] , [PLATFORM_CATEGORY]=tb.[PLATFORM_CATEGORY] , [IS_DELETED]=tb.[IS_DELETED],  [ORG_ID]='D9871BA8-0EEC-9E4A-BB87-7D5A540D8913' , [ENTITY_ORG_TPYE]=tb.[ENTITY_ORG_TPYE] , [FORM_ID]=tb.[FORM_ID] , [FLOW_STATUS]=tb.[FLOW_STATUS] , [FLOW_SEND_STATUS]=tb.[FLOW_SEND_STATUS] , [FLOW_ID]=tb.[FLOW_ID] ,  [CREATE_TIME]=tb.[CREATE_TIME] , [MODIFY_TIME]=tb.[MODIFY_TIME] , [CREATER_ID]=tb.[CREATER_ID] , [MODIFIER_ID]=tb.[MODIFIER_ID] , [ICON]=tb.[ICON]
from (
select * from mh_db.dbo.T_PF_FORM where CODE like 'CM%'  
) tb where tb.ID=T_PF_FORM.ID

--新增
insert into T_PF_FORM
 select  [ID], [CODE], [NAME], [NAME_ACRONYM], [PLATFORM_TYPE], [FORM_TYPE], [MODULE_TYPE], [URI], [CUSTOM_PARAMS], [JS_FILES], [ENABLE_STATUS], [TABLE_NAME], [IS_IGNORE_PERMISSION], [AUTH_ORG_CODES], [REMARK], [SRC_ID], [PLATFORM_CATEGORY], [IS_DELETED],'D9871BA8-0EEC-9E4A-BB87-7D5A540D8913' [ORG_ID], [ENTITY_ORG_TPYE], [FORM_ID], [FLOW_STATUS], [FLOW_SEND_STATUS], [FLOW_ID],'2022-12-20 00:00:00' [CREATE_TIME], [MODIFY_TIME], [CREATER_ID], [MODIFIER_ID], [ICON]
 from mh_db.dbo.T_PF_FORM where CODE like 'CM%' order by CREATE_TIME desc


 --2、T_PF_PAGE_EDIT
update T_PF_PAGE_EDIT set 
  [PAGE_FORM_ID]=tb.[PAGE_FORM_ID] , [CODE]=tb.[CODE] , [EDIT_NAME]=tb.[EDIT_NAME] , [LABEL_NAME]=tb.[LABEL_NAME] , [API_URL]=tb.[API_URL] , [IS_CONTAINS_NAV]=tb.[IS_CONTAINS_NAV] , [SEND_TYPE]=tb.[SEND_TYPE] , [WIDTH]=tb.[WIDTH] , [HEIGTH]=tb.[HEIGTH] , [QUERY_API_URL]=tb.[QUERY_API_URL] , [QUERY_SEND_TYPE]=tb.[QUERY_SEND_TYPE] , [BATCH_QUERY_API]=tb.[BATCH_QUERY_API] , [BATCH_UPDATE_API]=tb.[BATCH_UPDATE_API] , [RELATION_FIELD]=tb.[RELATION_FIELD] , [NAV_PROPERTY]=tb.[NAV_PROPERTY] , [IS_DETAIL_REQUIRED]=tb.[IS_DETAIL_REQUIRED] , [CODE_FIELD_NAME]=tb.[CODE_FIELD_NAME] , [CODE_RULE_TYPE]=tb.[CODE_RULE_TYPE] , [SORT_FIELDS]=tb.[SORT_FIELDS] , [SORT_ORDERS]=tb.[SORT_ORDERS] , [CUSTOM_PARAMS]=tb.[CUSTOM_PARAMS] , [SUB_TABLE_CONDITION]=tb.[SUB_TABLE_CONDITION] , [PARENT_COPY_FIELD]=tb.[PARENT_COPY_FIELD] , [CHILD_SET_FIELD]=tb.[CHILD_SET_FIELD] , [NUM]=tb.[NUM] , [IS_PERMIT_ADD_ROW]=tb.[IS_PERMIT_ADD_ROW] , [IS_PERMIT_DEL_ROW]=tb.[IS_PERMIT_DEL_ROW] , [EDIT_PAGE_ENTITY_ORG_TYPE]=tb.[EDIT_PAGE_ENTITY_ORG_TYPE] , [IS_SUB_ADD_BTN_DISABLED]=tb.[IS_SUB_ADD_BTN_DISABLED] , [IS_SUB_DELETE_BTN_DISABLED]=tb.[IS_SUB_DELETE_BTN_DISABLED] , [SHOW_CHECK]=tb.[SHOW_CHECK] , [PARAM_SCHEME_ID]=tb.[PARAM_SCHEME_ID] , [SRC_ID]=tb.[SRC_ID] , [IS_DELETED]=tb.[IS_DELETED] , [ORG_ID]='D9871BA8-0EEC-9E4A-BB87-7D5A540D8913' , [ENTITY_ORG_TPYE]=tb.[ENTITY_ORG_TPYE] , [FORM_ID]=tb.[FORM_ID] , [FLOW_STATUS]=tb.[FLOW_STATUS] , [FLOW_SEND_STATUS]=tb.[FLOW_SEND_STATUS] , [FLOW_ID]=tb.[FLOW_ID] , [CREATE_TIME]='2022-12-20 00:00:00' , [MODIFY_TIME]=tb.[MODIFY_TIME] , [CREATER_ID]=tb.[CREATER_ID] , [MODIFIER_ID]=tb.[MODIFIER_ID] , [PARENT_ID]=tb.[PARENT_ID] , [TEXT]=tb.[TEXT] , [IS_LEAF]=tb.[IS_LEAF] , [NAV_ROW_CLASS_FILTER]=tb.[NAV_ROW_CLASS_FILTER] , [DEFAULT_PAGE_SIZE]=tb.[DEFAULT_PAGE_SIZE] , [IS_PAGE]=tb.[IS_PAGE]
from (
 select * from mh_db.dbo.T_PF_PAGE_EDIT where EDIT_NAME like 'T_CM_%'
 ) tb where T_PF_PAGE_EDIT.ID=tb.ID
 
--新增
insert into T_PF_PAGE_EDIT
 select 
[ID], [PAGE_FORM_ID], [CODE], [EDIT_NAME], [LABEL_NAME], [API_URL], [IS_CONTAINS_NAV], [SEND_TYPE], [WIDTH], [HEIGTH], [QUERY_API_URL], [QUERY_SEND_TYPE], [BATCH_QUERY_API], [BATCH_UPDATE_API], [RELATION_FIELD], [NAV_PROPERTY], [IS_DETAIL_REQUIRED], [CODE_FIELD_NAME], [CODE_RULE_TYPE], [SORT_FIELDS], [SORT_ORDERS], [CUSTOM_PARAMS], [SUB_TABLE_CONDITION], [PARENT_COPY_FIELD], [CHILD_SET_FIELD], [NUM], [IS_PERMIT_ADD_ROW], [IS_PERMIT_DEL_ROW], [EDIT_PAGE_ENTITY_ORG_TYPE], [IS_SUB_ADD_BTN_DISABLED], [IS_SUB_DELETE_BTN_DISABLED], [SHOW_CHECK], [PARAM_SCHEME_ID], [SRC_ID], [IS_DELETED],'D9871BA8-0EEC-9E4A-BB87-7D5A540D8913' [ORG_ID], [ENTITY_ORG_TPYE], [FORM_ID], [FLOW_STATUS], [FLOW_SEND_STATUS], [FLOW_ID],'2022-12-20 00:00:00'  [CREATE_TIME], [MODIFY_TIME], [CREATER_ID], [MODIFIER_ID], [PARENT_ID], [TEXT], [IS_LEAF], [NAV_ROW_CLASS_FILTER], [DEFAULT_PAGE_SIZE], [IS_PAGE]
 from mh_db.dbo.T_PF_PAGE_EDIT where EDIT_NAME like 'T_CM_%' order by CREATE_TIME desc


--3、T_PF_PAGE_EDIT_PANEL   
--修改
update T_PF_PAGE_EDIT_PANEL set 
[PAGE_EDIT_ID]=tb.[PAGE_EDIT_ID], [LABEL]=tb.[LABEL], [IS_DEFAULT_EXPAND]=tb.[IS_DEFAULT_EXPAND], [IS_DISPLAY]=tb.[IS_DISPLAY], [NUM]=tb.[NUM], [SRC_ID]=tb.[SRC_ID], [IS_DELETED]=tb.[IS_DELETED], [ORG_ID]='D9871BA8-0EEC-9E4A-BB87-7D5A540D8913', [ENTITY_ORG_TPYE]=tb.[ENTITY_ORG_TPYE], [FORM_ID]=tb.[FORM_ID], [FLOW_STATUS]=tb.[FLOW_STATUS], [FLOW_SEND_STATUS]=tb.[FLOW_SEND_STATUS], [FLOW_ID]=tb.[FLOW_ID], [CREATE_TIME]='2022-12-20 00:00:00', [MODIFY_TIME]=tb.[MODIFY_TIME], [CREATER_ID]=tb.[CREATER_ID], [MODIFIER_ID]=tb.[MODIFIER_ID]
from (
select * from   mh_db.dbo.T_PF_PAGE_EDIT_PANEL where  PAGE_EDIT_ID in(
 select ID  from   mh_db.dbo.T_PF_PAGE_EDIT where EDIT_NAME like 'T_CM_%'
 )
) tb where T_PF_PAGE_EDIT_PANEL.ID=tb.ID

--新增
insert into T_PF_PAGE_EDIT_PANEL
select 
[ID], [PAGE_EDIT_ID], [LABEL], [IS_DEFAULT_EXPAND], [IS_DISPLAY], [NUM], [SRC_ID], [IS_DELETED],'D9871BA8-0EEC-9E4A-BB87-7D5A540D8913' [ORG_ID], [ENTITY_ORG_TPYE], [FORM_ID], [FLOW_STATUS], [FLOW_SEND_STATUS], [FLOW_ID],'2022-12-20 00:00:00' [CREATE_TIME], [MODIFY_TIME], [CREATER_ID], [MODIFIER_ID]
from   mh_db.dbo.T_PF_PAGE_EDIT_PANEL where  PAGE_EDIT_ID in(
 select ID  from   mh_db.dbo.T_PF_PAGE_EDIT where EDIT_NAME like 'T_CM_%'
 )




 --4.T_PF_EDIT_COLUMN
update T_PF_EDIT_COLUMN set
 [CODE]=tb.[CODE] , [PAGE_EDIT_ID]=tb.[PAGE_EDIT_ID] , [FIELD_NAME]=tb.[FIELD_NAME] , [IS_TABLE_COLUMN]=tb.[IS_TABLE_COLUMN] , [LABEL]=tb.[LABEL] , [IS_DEFAULT]=tb.[IS_DEFAULT] , [IS_CUSTOM]=tb.[IS_CUSTOM] , [TYPE_NAME]=tb.[TYPE_NAME] , [REQUIRED]=tb.[REQUIRED] , [EDITABLE]=tb.[EDITABLE] , [PERMIT_EDITABLE]=tb.[PERMIT_EDITABLE] , [FORMAT]=tb.[FORMAT] , [INPUT_DATA_API]=tb.[INPUT_DATA_API] , [INPUT_ID_FIELD]=tb.[INPUT_ID_FIELD] , [IS_ONLY_CHECK_LEAF]=tb.[IS_ONLY_CHECK_LEAF] , [INPUT_DATA_LEVEL]=tb.[INPUT_DATA_LEVEL] , [INPUT_FILTER_FIELD]=tb.[INPUT_FILTER_FIELD] , [INPUT_SORT_FIELD]=tb.[INPUT_SORT_FIELD] , [INPUT_SORT_ORDER]=tb.[INPUT_SORT_ORDER] , [INPUT_LABEL_FIELD]=tb.[INPUT_LABEL_FIELD] , [INPUT_SHOW_FIELD]=tb.[INPUT_SHOW_FIELD] , [INPUT_NAV_FIELD]=tb.[INPUT_NAV_FIELD] , [INPUT_SAVE_FIELD]=tb.[INPUT_SAVE_FIELD] , [INPUT_FILTER_ORG_TYPE]=tb.[INPUT_FILTER_ORG_TYPE] , [IS_IGNORE_TENANT]=tb.[IS_IGNORE_TENANT] , [INPUT_KEEP_VALUE_BY_NO_SRC]=tb.[INPUT_KEEP_VALUE_BY_NO_SRC] , [QUERY_FORMAT]=tb.[QUERY_FORMAT] , [ENUM]=tb.[ENUM] , [CONTROL_TYPE]=tb.[CONTROL_TYPE] , [VALIDATA_TYPE]=tb.[VALIDATA_TYPE] , [NUM]=tb.[NUM] , [MIN_LEN]=tb.[MIN_LEN] , [MAX_LEN]=tb.[MAX_LEN] , [VERIFY_MSG]=tb.[VERIFY_MSG] , [SHOW_FORM_CODE]=tb.[SHOW_FORM_CODE] , [SHOW_ID_FIELD]=tb.[SHOW_ID_FIELD] , [PAGE_EDIT_PANEL_ID]=tb.[PAGE_EDIT_PANEL_ID] , [IS_CAN_BATCH_EDIT]=tb.[IS_CAN_BATCH_EDIT] , [EDIT_FORM_CODE]=tb.[EDIT_FORM_CODE] , [EDIT_FORM_FILTER]=tb.[EDIT_FORM_FILTER] , [EDIT_FORM_FILTER_VALUE]=tb.[EDIT_FORM_FILTER_VALUE] , [CASE]=tb.[CASE] , [WIDTH]=tb.[WIDTH] , [REMARK]=tb.[REMARK] , [DEFAULT_VALUE]=tb.[DEFAULT_VALUE] , [PROMPT_INFO]=tb.[PROMPT_INFO] , [VERIFY_EXPRESS]=tb.[VERIFY_EXPRESS] , [VERIFY_TYPE]=tb.[VERIFY_TYPE] , [VERIFY_ERROR_INFO]=tb.[VERIFY_ERROR_INFO] , [IS_COPY]=tb.[IS_COPY] , [CODE_RULE_TYPE]=tb.[CODE_RULE_TYPE] , [SRC_ID]=tb.[SRC_ID] , [IS_RULE]=tb.[IS_RULE] , [IS_DELETED]=tb.[IS_DELETED] ,[ORG_ID]='D9871BA8-0EEC-9E4A-BB87-7D5A540D8913'  , [ENTITY_ORG_TPYE]=tb.[ENTITY_ORG_TPYE] , [FORM_ID]=tb.[FORM_ID] , [FLOW_STATUS]=tb.[FLOW_STATUS] , [FLOW_SEND_STATUS]=tb.[FLOW_SEND_STATUS] , [FLOW_ID]=tb.[FLOW_ID] ,  [CREATE_TIME]='2022-12-20 00:00:00' , [MODIFY_TIME]=tb.[MODIFY_TIME] , [CREATER_ID]=tb.[CREATER_ID] , [MODIFIER_ID]=tb.[MODIFIER_ID] , [SELECTD_LABEL_FIELD]=tb.[SELECTD_LABEL_FIELD] , [HEIGHT]=tb.[HEIGHT] , [SHOW_TYPE]=tb.[SHOW_TYPE] , [IS_CHECK_MAX]=tb.[IS_CHECK_MAX] , [IS_CHECK_MIN]=tb.[IS_CHECK_MIN] , [MAX_VAL]=tb.[MAX_VAL] , [MIN_VAL]=tb.[MIN_VAL] , [STEP]=tb.[STEP]

from (
select * from mh_db.dbo.T_PF_EDIT_COLUMN where PAGE_EDIT_ID in(
 select ID  from   mh_db.dbo.T_PF_PAGE_EDIT where EDIT_NAME like 'T_CM_%'
 )
) tb where T_PF_EDIT_COLUMN.ID=tb.ID

--新增
insert into T_PF_EDIT_COLUMN
 select [ID], [CODE], [PAGE_EDIT_ID], [FIELD_NAME], [IS_TABLE_COLUMN], [LABEL], [IS_DEFAULT], [IS_CUSTOM], [TYPE_NAME], [REQUIRED], [EDITABLE], [PERMIT_EDITABLE], [FORMAT], [INPUT_DATA_API], [INPUT_ID_FIELD], [IS_ONLY_CHECK_LEAF], [INPUT_DATA_LEVEL], [INPUT_FILTER_FIELD], [INPUT_SORT_FIELD], [INPUT_SORT_ORDER], [INPUT_LABEL_FIELD], [INPUT_SHOW_FIELD], [INPUT_NAV_FIELD], [INPUT_SAVE_FIELD], [INPUT_FILTER_ORG_TYPE], [IS_IGNORE_TENANT], [INPUT_KEEP_VALUE_BY_NO_SRC], [QUERY_FORMAT], [ENUM], [CONTROL_TYPE], [VALIDATA_TYPE], [NUM], [MIN_LEN], [MAX_LEN], [VERIFY_MSG], [SHOW_FORM_CODE], [SHOW_ID_FIELD], [PAGE_EDIT_PANEL_ID], [IS_CAN_BATCH_EDIT], [EDIT_FORM_CODE], [EDIT_FORM_FILTER], [EDIT_FORM_FILTER_VALUE], [CASE], [WIDTH], [REMARK], [DEFAULT_VALUE], [PROMPT_INFO], [VERIFY_EXPRESS], [VERIFY_TYPE], [VERIFY_ERROR_INFO], [IS_COPY], [CODE_RULE_TYPE], [SRC_ID], [IS_RULE], [IS_DELETED],'D9871BA8-0EEC-9E4A-BB87-7D5A540D8913' [ORG_ID], [ENTITY_ORG_TPYE], [FORM_ID], [FLOW_STATUS], [FLOW_SEND_STATUS], [FLOW_ID], '2022-12-20 00:00:00' [CREATE_TIME], [MODIFY_TIME], [CREATER_ID], [MODIFIER_ID], [SELECTD_LABEL_FIELD], [HEIGHT], [SHOW_TYPE], [IS_CHECK_MAX], [IS_CHECK_MIN], [MAX_VAL], [MIN_VAL], [STEP]
 from mh_db.dbo.T_PF_EDIT_COLUMN where PAGE_EDIT_ID in(
 select ID  from   mh_db.dbo.T_PF_PAGE_EDIT where EDIT_NAME like 'T_CM_%'
 )



 --5、T_PF_PAGE_TABLE
--修改
 update T_PF_PAGE_TABLE set CODE=tb.[CODE] , [PAGE_FORM_ID]=tb.[PAGE_FORM_ID] , [TABLE_NAME]=tb.[TABLE_NAME] , [TITLE]=tb.[TITLE] , [DATA_TABLE]=tb.[DATA_TABLE] , [SHOW_CHECK]=tb.[SHOW_CHECK] , [TABLE_CONDITION]=tb.[TABLE_CONDITION] , [CHECK_TYPE]=tb.[CHECK_TYPE] , [LABEL_NAME]=tb.[LABEL_NAME] , [API_URL]=tb.[API_URL] , [DEL_API_URL]=tb.[DEL_API_URL] , [BATCH_DEL_API_URL]=tb.[BATCH_DEL_API_URL] , [SEND_TYPE]=tb.[SEND_TYPE] , [SORT]=tb.[SORT] , [SORTS]=tb.[SORTS] , [ORDER]=tb.[ORDER] , [ORDERS]=tb.[ORDERS] , [CLASS_FIELD]=tb.[CLASS_FIELD] , [CLASS_FUNC_NAME]=tb.[CLASS_FUNC_NAME] , [NUM]=tb.[NUM] , [MAX_SELECT]=tb.[MAX_SELECT] , [WIDTH]=tb.[WIDTH] , [PIC_CODE_FIELD]=tb.[PIC_CODE_FIELD] , [HEIGTH]=tb.[HEIGTH] , [POSITION]=tb.[POSITION] , [PARENT_RELATION_FIELD]=tb.[PARENT_RELATION_FIELD] , [RELATION_FIELD]=tb.[RELATION_FIELD] , [IS_SHOW_CARD]=tb.[IS_SHOW_CARD] , [NO_SELECT_FIELD]=tb.[NO_SELECT_FIELD] , [IS_SHOW_FOOTER]=tb.[IS_SHOW_FOOTER] , [FOOTER_SUM_TYPE]=tb.[FOOTER_SUM_TYPE] , [CUSTOM_PARAMS]=tb.[CUSTOM_PARAMS] , [IS_SHOW_ROW_NO]=tb.[IS_SHOW_ROW_NO] , [FILTER_ORG_TYPE]=tb.[FILTER_ORG_TYPE] , [IGNORE_ORG_RULE]=tb.[IGNORE_ORG_RULE] , [PARAM_SCHEME_ID]=tb.[PARAM_SCHEME_ID] , [SRC_ID]=tb.[SRC_ID] , [IS_DELETED]=tb.[IS_DELETED] , [ORG_ID]='D9871BA8-0EEC-9E4A-BB87-7D5A540D8913'  , [ENTITY_ORG_TPYE]=tb.[ENTITY_ORG_TPYE] , [FORM_ID]=tb.[FORM_ID] , [FLOW_STATUS]=tb.[FLOW_STATUS] , [FLOW_SEND_STATUS]=tb.[FLOW_SEND_STATUS] , [FLOW_ID]=tb.[FLOW_ID] ,[CREATE_TIME] =  '2022-12-20 00:00:00' , [MODIFY_TIME]=tb.[MODIFY_TIME] , [CREATER_ID]=tb.[CREATER_ID] , [MODIFIER_ID]=tb.[MODIFIER_ID] , [PARENT_ID]=tb.[PARENT_ID] , [TEXT]=tb.[TEXT] , [IS_LEAF]=tb.[IS_LEAF]
 from (
 select *  from mh_db.dbo.T_PF_PAGE_TABLE where TABLE_NAME like 'T_CM_%'
 ) tb  where T_PF_PAGE_TABLE.ID=tb.ID

--新增
insert into T_PF_PAGE_TABLE
 select 
 [ID], [CODE], [PAGE_FORM_ID], [TABLE_NAME], [TITLE], [DATA_TABLE], [SHOW_CHECK], [TABLE_CONDITION], [CHECK_TYPE], [LABEL_NAME], [API_URL], [DEL_API_URL], [BATCH_DEL_API_URL], [SEND_TYPE], [SORT], [SORTS], [ORDER], [ORDERS], [CLASS_FIELD], [CLASS_FUNC_NAME], [NUM], [MAX_SELECT], [WIDTH], [PIC_CODE_FIELD], [HEIGTH], [POSITION], [PARENT_RELATION_FIELD], [RELATION_FIELD], [IS_SHOW_CARD], [NO_SELECT_FIELD], [IS_SHOW_FOOTER], [FOOTER_SUM_TYPE], [CUSTOM_PARAMS], [IS_SHOW_ROW_NO], [FILTER_ORG_TYPE], [IGNORE_ORG_RULE], [PARAM_SCHEME_ID], [SRC_ID], [IS_DELETED],'D9871BA8-0EEC-9E4A-BB87-7D5A540D8913' [ORG_ID], [ENTITY_ORG_TPYE], [FORM_ID], [FLOW_STATUS], [FLOW_SEND_STATUS], [FLOW_ID],  '2022-12-20 00:00:00'[CREATE_TIME], [MODIFY_TIME], [CREATER_ID], [MODIFIER_ID], [PARENT_ID], [TEXT], [IS_LEAF]
 from mh_db.dbo.T_PF_PAGE_TABLE where TABLE_NAME like 'T_CM_%'



 --6、T_PF_COLUMN
update T_PF_COLUMN set 
[FIELD_NAME]=tb.[FIELD_NAME] , [LABEL]=tb.[LABEL] , [TABLE_NAME]=tb.[TABLE_NAME] , [PAGE_TABLE_ID]=tb.[PAGE_TABLE_ID] , [IS_RULE]=tb.[IS_RULE] , [IS_DEFAULT]=tb.[IS_DEFAULT] , [DATA_TYPE]=tb.[DATA_TYPE] , [NO_SORT]=tb.[NO_SORT] , [CONTROL_TYPE]=tb.[CONTROL_TYPE] , [VALIDATA_TYPE]=tb.[VALIDATA_TYPE] , [FORMAT]=tb.[FORMAT] , [ENUM]=tb.[ENUM] , [NUM]=tb.[NUM] , [WIDTH]=tb.[WIDTH] , [INPUT_DATA_LEVEL]=tb.[INPUT_DATA_LEVEL] , [IS_ONLY_CHECK_LEAF]=tb.[IS_ONLY_CHECK_LEAF] , [SHOW_FORM_CODE]=tb.[SHOW_FORM_CODE] , [MIN_LEN]=tb.[MIN_LEN] , [MAX_LEN]=tb.[MAX_LEN] , [SHOW_ID_FIELD]=tb.[SHOW_ID_FIELD] , [FOOTER_SUM_TYPE]=tb.[FOOTER_SUM_TYPE] , [CUSTOM_PARAMS]=tb.[CUSTOM_PARAMS] , [MERGE_CELLS]=tb.[MERGE_CELLS] , [IS_SHOW_SUM]=tb.[IS_SHOW_SUM] , [INPUT_DATA_API]=tb.[INPUT_DATA_API] , [INPUT_ID_FIELD]=tb.[INPUT_ID_FIELD] , [INPUT_FILTER_FIELD]=tb.[INPUT_FILTER_FIELD] , [INPUT_SORT_FIELD]=tb.[INPUT_SORT_FIELD] , [INPUT_SORT_ORDER]=tb.[INPUT_SORT_ORDER] , [INPUT_LABEL_FIELD]=tb.[INPUT_LABEL_FIELD] , [INPUT_SHOW_FIELD]=tb.[INPUT_SHOW_FIELD] , [INPUT_NAV_FIELD]=tb.[INPUT_NAV_FIELD] , [INPUT_SAVE_FIELD]=tb.[INPUT_SAVE_FIELD] , [INPUT_FILTER_ORG_TYPE]=tb.[INPUT_FILTER_ORG_TYPE] , [PAGE_TABLE_PANEL_ID]=tb.[PAGE_TABLE_PANEL_ID] , [SRC_ID]=tb.[SRC_ID] , [IS_DELETED]=tb.[IS_DELETED] , [ORG_ID]='D9871BA8-0EEC-9E4A-BB87-7D5A540D8913' , [ENTITY_ORG_TPYE]=tb.[ENTITY_ORG_TPYE] , [FORM_ID]=tb.[FORM_ID] , [FLOW_STATUS]=tb.[FLOW_STATUS] , [FLOW_SEND_STATUS]=tb.[FLOW_SEND_STATUS] , [FLOW_ID]=tb.[FLOW_ID] ,  [CREATE_TIME]='2022-12-20 00:00:00' , [MODIFY_TIME]=tb.[MODIFY_TIME] , [CREATER_ID]=tb.[CREATER_ID] , [MODIFIER_ID]=tb.[MODIFIER_ID]
from (
select * from mh_db.dbo.T_PF_COLUMN where PAGE_TABLE_ID in(select ID from  mh_db.dbo.T_PF_PAGE_TABLE where TABLE_NAME like 'T_CM_%' )
) tb where T_PF_COLUMN.ID=tb.id



insert into T_PF_COLUMN
select [ID], [FIELD_NAME], [LABEL], [TABLE_NAME], [PAGE_TABLE_ID], [IS_RULE], [IS_DEFAULT], [DATA_TYPE], [NO_SORT], [CONTROL_TYPE], [VALIDATA_TYPE], [FORMAT], [ENUM], [NUM], [WIDTH], [INPUT_DATA_LEVEL], [IS_ONLY_CHECK_LEAF], [SHOW_FORM_CODE], [MIN_LEN], [MAX_LEN], [SHOW_ID_FIELD], [FOOTER_SUM_TYPE], [CUSTOM_PARAMS], [MERGE_CELLS], [IS_SHOW_SUM], [INPUT_DATA_API], [INPUT_ID_FIELD], [INPUT_FILTER_FIELD], [INPUT_SORT_FIELD], [INPUT_SORT_ORDER], [INPUT_LABEL_FIELD], [INPUT_SHOW_FIELD], [INPUT_NAV_FIELD], [INPUT_SAVE_FIELD], [INPUT_FILTER_ORG_TYPE], [PAGE_TABLE_PANEL_ID], [SRC_ID], [IS_DELETED],'D9871BA8-0EEC-9E4A-BB87-7D5A540D8913' [ORG_ID], [ENTITY_ORG_TPYE], [FORM_ID], [FLOW_STATUS], [FLOW_SEND_STATUS], [FLOW_ID], '2022-12-20 00:00:00' [CREATE_TIME], [MODIFY_TIME], [CREATER_ID], [MODIFIER_ID]
from mh_db.dbo.T_PF_COLUMN where PAGE_TABLE_ID in(select ID from  mh_db.dbo.T_PF_PAGE_TABLE where TABLE_NAME like 'T_CM_%' )



--7、T_PF_FORM_QUERY
update T_PF_FORM_QUERY set [CODE]=tb.CODE, [LABEL]=tb.[LABEL] , [FORM_QUERY_SHOW_TYPE]=tb.[FORM_QUERY_SHOW_TYPE] , [TABLE_NAME]=tb.[TABLE_NAME] , [PAGE_FORM_ID]=tb.[PAGE_FORM_ID] , [SHARE_KEY]=tb.[SHARE_KEY] , [IS_REMEMBER]=tb.[IS_REMEMBER] , [NUM]=tb.[NUM] , [INPUT_FILTER_ORG_TYPE]=tb.[INPUT_FILTER_ORG_TYPE] , [SRC_ID]=tb.[SRC_ID] , [IS_DELETED]=tb.[IS_DELETED] , [ORG_ID]='D9871BA8-0EEC-9E4A-BB87-7D5A540D8913'  , [ENTITY_ORG_TPYE]=tb.[ENTITY_ORG_TPYE] , [FORM_ID]=tb.[FORM_ID] , [FLOW_STATUS]=tb.[FLOW_STATUS] , [FLOW_SEND_STATUS]=tb.[FLOW_SEND_STATUS] , [FLOW_ID]=tb.[FLOW_ID] , [CREATE_TIME]='2022-12-20 00:00:00' , [MODIFY_TIME]=tb.[MODIFY_TIME] , [CREATER_ID]=tb.[CREATER_ID] , [MODIFIER_ID]=tb.[MODIFIER_ID]
from ( select * from  mh_db.dbo.T_PF_FORM_QUERY  where TABLE_NAME like 'T_CM_%'   ) tb  where T_PF_FORM_QUERY.ID=tb.ID


insert into T_PF_FORM_QUERY
select 
[ID], [CODE], [LABEL], [FORM_QUERY_SHOW_TYPE], [TABLE_NAME], [PAGE_FORM_ID], [SHARE_KEY], [IS_REMEMBER], [NUM], [INPUT_FILTER_ORG_TYPE], [SRC_ID], [IS_DELETED],'D9871BA8-0EEC-9E4A-BB87-7D5A540D8913' [ORG_ID], [ENTITY_ORG_TPYE], [FORM_ID], [FLOW_STATUS], [FLOW_SEND_STATUS], [FLOW_ID],'2022-12-20 00:00:00' [CREATE_TIME], [MODIFY_TIME], [CREATER_ID], [MODIFIER_ID]
from  mh_db.dbo.T_PF_FORM_QUERY  where TABLE_NAME like 'T_CM_%' 




--8、T_PF_QUERY
update T_PF_QUERY set [CODE]=tb.CODE , [QUERY_NAME]=tb.[QUERY_NAME] , [LABEL]=tb.[LABEL] , [PAGE_FORM_ID]=tb.[PAGE_FORM_ID] , [PAGE_FORM_QUERY_ID]=tb.[PAGE_FORM_QUERY_ID] , [DATA_TYPE]=tb.[DATA_TYPE] , [IS_DEFAULT_QUERY]=tb.[IS_DEFAULT_QUERY] , [IS_TITLE]=tb.[IS_TITLE] , [IS_CUSTOM]=tb.[IS_CUSTOM] , [MULTIPLE_CHOICE]=tb.[MULTIPLE_CHOICE] , [IS_DEFAULT_SHOW]=tb.[IS_DEFAULT_SHOW] , [OP_DEFAULT]=tb.[OP_DEFAULT] , [DATA_VALUE]=tb.[DATA_VALUE] , [ENUM_NAME]=tb.[ENUM_NAME] , [CHECK_STRICTLY]=tb.[CHECK_STRICTLY] , [NUM]=tb.[NUM] , [IS_SYS_PARAM]=tb.[IS_SYS_PARAM] , [CASE]=tb.[CASE] , [IS_REQUIRE]=tb.[IS_REQUIRE] , [INPUT_ID_FIELD]=tb.[INPUT_ID_FIELD] , [INPUT_FILTER_FIELD]=tb.[INPUT_FILTER_FIELD] , [INPUT_SORT_FIELD]=tb.[INPUT_SORT_FIELD] , [INPUT_SORT_ORDER]=tb.[INPUT_SORT_ORDER] , [INPUT_LABEL_FIELD]=tb.[INPUT_LABEL_FIELD] , [INPUT_SHOW_FIELD]=tb.[INPUT_SHOW_FIELD] , [INPUT_NAV_FIELD]=tb.[INPUT_NAV_FIELD] , [INPUT_SAVE_FIELD]=tb.[INPUT_SAVE_FIELD] , [INPUT_DATA_LEVEL]=tb.[INPUT_DATA_LEVEL] , [IS_ONLY_CHECK_LEAF]=tb.[IS_ONLY_CHECK_LEAF] , [INPUT_DATA_API]=tb.[INPUT_DATA_API] , [SELECT_CONDITION]=tb.[SELECT_CONDITION] , [SRC_ID]=tb.[SRC_ID] , [IS_DELETED]=tb.[IS_DELETED] , [ORG_ID]='D9871BA8-0EEC-9E4A-BB87-7D5A540D8913' , [ENTITY_ORG_TPYE]=tb.[ENTITY_ORG_TPYE] , [FORM_ID]=tb.[FORM_ID] , [FLOW_STATUS]=tb.[FLOW_STATUS] , [FLOW_SEND_STATUS]=tb.[FLOW_SEND_STATUS] , [FLOW_ID]=tb.[FLOW_ID] ,[CREATE_TIME]= '2022-12-20 00:00:00' , [MODIFY_TIME]=tb.[MODIFY_TIME] , [CREATER_ID]=tb.[CREATER_ID] , [MODIFIER_ID]=tb.[MODIFIER_ID]
from (
select * from  mh_db.dbo.T_PF_QUERY where PAGE_FORM_QUERY_ID in(select ID from    mh_db.dbo.T_PF_FORM_QUERY  where TABLE_NAME like 'T_CM_%'  )
) tb  where T_PF_QUERY.ID=tb.ID

insert into T_PF_QUERY
select [ID], [CODE], [QUERY_NAME], [LABEL], [PAGE_FORM_ID], [PAGE_FORM_QUERY_ID], [DATA_TYPE], [IS_DEFAULT_QUERY], [IS_TITLE], [IS_CUSTOM], [MULTIPLE_CHOICE], [IS_DEFAULT_SHOW], [OP_DEFAULT], [DATA_VALUE], [ENUM_NAME], [CHECK_STRICTLY], [NUM], [IS_SYS_PARAM], [CASE], [IS_REQUIRE], [INPUT_ID_FIELD], [INPUT_FILTER_FIELD], [INPUT_SORT_FIELD], [INPUT_SORT_ORDER], [INPUT_LABEL_FIELD], [INPUT_SHOW_FIELD], [INPUT_NAV_FIELD], [INPUT_SAVE_FIELD], [INPUT_DATA_LEVEL], [IS_ONLY_CHECK_LEAF], [INPUT_DATA_API], [SELECT_CONDITION], [SRC_ID], [IS_DELETED],'D9871BA8-0EEC-9E4A-BB87-7D5A540D8913' [ORG_ID], [ENTITY_ORG_TPYE], [FORM_ID], [FLOW_STATUS], [FLOW_SEND_STATUS], [FLOW_ID], '2022-12-20 00:00:00'[CREATE_TIME], [MODIFY_TIME], [CREATER_ID], [MODIFIER_ID] from  mh_db.dbo.T_PF_QUERY where PAGE_FORM_QUERY_ID in(select ID from    mh_db.dbo.T_PF_FORM_QUERY  where TABLE_NAME like 'T_CM_%'  )




--9、T_PF_BTN
update T_PF_BTN set [CODE]=tb.[CODE], [LABEL]=tb.[LABEL] , [PAGE_ID]=tb.[PAGE_ID] , [PAGE_TABLE_ID]=tb.[PAGE_TABLE_ID] , [PAGE_EDIT_ID]=tb.[PAGE_EDIT_ID] , [PAGE_CUSTOM_FORM_ID]=tb.[PAGE_CUSTOM_FORM_ID] , [BTN_PAGE_TYPE]=tb.[BTN_PAGE_TYPE] , [BTN_FUN_TYPE]=tb.[BTN_FUN_TYPE] , [BTN_TYPE]=tb.[BTN_TYPE] , [IS_RULE]=tb.[IS_RULE] , [CLICK_EVENT]=tb.[CLICK_EVENT] , [BTN_CONDITION]=tb.[BTN_CONDITION] , [CSS]=tb.[CSS] , [ICON]=tb.[ICON] , [INPUT_SAVE_FIELD]=tb.[INPUT_SAVE_FIELD] , [INPUT_NAV_FIELD]=tb.[INPUT_NAV_FIELD] , [FORM_CODE]=tb.[FORM_CODE] , [WORD_TEMPLATE_CODE]=tb.[WORD_TEMPLATE_CODE] , [CUSTOM_PARAMS]=tb.[CUSTOM_PARAMS] , [SELECT_SHOW]=tb.[SELECT_SHOW] , [IS_SAME_LEVEL]=tb.[IS_SAME_LEVEL] , [IS_DEFAULT]=tb.[IS_DEFAULT] , [IS_COMFIRM]=tb.[IS_COMFIRM] , [API_URL]=tb.[API_URL] , [SAVE_CLOSE_TYPE]=tb.[SAVE_CLOSE_TYPE] , [SAVE_CLEAR_TYPE]=tb.[SAVE_CLEAR_TYPE] , [NUM]=tb.[NUM] , [ENABLE_STATUS]=tb.[ENABLE_STATUS] , [SRC_ID]=tb.[SRC_ID] , [IS_DELETED]=tb.[IS_DELETED] , [ORG_ID]='D9871BA8-0EEC-9E4A-BB87-7D5A540D8913'  , [ENTITY_ORG_TPYE]=tb.[ENTITY_ORG_TPYE] , [FORM_ID]=tb.[FORM_ID] , [FLOW_STATUS]=tb.[FLOW_STATUS] , [FLOW_SEND_STATUS]=tb.[FLOW_SEND_STATUS] , [FLOW_ID]=tb.[FLOW_ID] ,[CREATE_TIME]='2022-12-20 00:00:00'   , [MODIFY_TIME]=tb.[MODIFY_TIME] , [CREATER_ID]=tb.[CREATER_ID] , [MODIFIER_ID]=tb.[MODIFIER_ID]
from(
select * from mh_db.dbo.T_PF_BTN
where PAGE_ID in(
  select ID from mh_db.dbo.T_PF_PAGE_TABLE where TABLE_NAME like 'T_CM_%' union
  select ID from mh_db.dbo.T_PF_PAGE_EDIT where EDIT_NAME like 'T_CM_%'
)
) tb  where T_PF_BTN.ID=tb.ID


insert into T_PF_BTN
select [ID], [CODE], [LABEL], [PAGE_ID], [PAGE_TABLE_ID], [PAGE_EDIT_ID], [PAGE_CUSTOM_FORM_ID], [BTN_PAGE_TYPE], [BTN_FUN_TYPE], [BTN_TYPE], [IS_RULE], [CLICK_EVENT], [BTN_CONDITION], [CSS], [ICON], [INPUT_SAVE_FIELD], [INPUT_NAV_FIELD], [FORM_CODE], [WORD_TEMPLATE_CODE], [CUSTOM_PARAMS], [SELECT_SHOW], [IS_SAME_LEVEL], [IS_DEFAULT], [IS_COMFIRM], [API_URL], [SAVE_CLOSE_TYPE], [SAVE_CLEAR_TYPE], [NUM], [ENABLE_STATUS], [SRC_ID], [IS_DELETED],'D9871BA8-0EEC-9E4A-BB87-7D5A540D8913' [ORG_ID], [ENTITY_ORG_TPYE], [FORM_ID], [FLOW_STATUS], [FLOW_SEND_STATUS], [FLOW_ID],'2022-12-20 00:00:00' [CREATE_TIME], [MODIFY_TIME], [CREATER_ID], [MODIFIER_ID] from mh_db.dbo.T_PF_BTN
where PAGE_ID in(
  select ID from mh_db.dbo.T_PF_PAGE_TABLE where TABLE_NAME like 'T_CM_%' union
  select ID from mh_db.dbo.T_PF_PAGE_EDIT where EDIT_NAME like 'T_CM_%'
)


--10、T_PF_MENU
--修改
update T_PF_MENU set   [NAME]=tb.[NAME] , [NAME_ACRONYM]=tb.[NAME_ACRONYM] , [MENU_FORM_PARAMS]=tb.[MENU_FORM_PARAMS] , [MENU_FORM_ID]=tb.[MENU_FORM_ID] , [ICON]=tb.[ICON] , [PICTURE_ID]=tb.[PICTURE_ID] , [NUM]=tb.[NUM] , [ENABLE_STATUS]=tb.[ENABLE_STATUS] , [REMARK]=tb.[REMARK] , [IS_INIT_SHOW]=tb.[IS_INIT_SHOW] , [IS_INIT_REQ]=tb.[IS_INIT_REQ] , [SRC_ID]=tb.[SRC_ID] , [IS_PERMISSION_MENU]=tb.[IS_PERMISSION_MENU] , [PLATFORM_CATEGORY]=tb.[PLATFORM_CATEGORY] , [IS_PERMISSION_SUB]=tb.[IS_PERMISSION_SUB] , [IS_RESIDENT]=tb.[IS_RESIDENT] , [IS_DELETED]=tb.[IS_DELETED] , [ORG_ID]='D9871BA8-0EEC-9E4A-BB87-7D5A540D8913' , [ENTITY_ORG_TPYE]=tb.[ENTITY_ORG_TPYE] , [FORM_ID]=tb.[FORM_ID] , [FLOW_STATUS]=tb.[FLOW_STATUS] , [FLOW_SEND_STATUS]=tb.[FLOW_SEND_STATUS] , [FLOW_ID]=tb.[FLOW_ID] , [CREATE_TIME]='2022-12-20 00:00:00' , [MODIFY_TIME]=tb.[MODIFY_TIME] , [CREATER_ID]=tb.[CREATER_ID] , [MODIFIER_ID]=tb.[MODIFIER_ID] , [PARENT_ID]=tb.[PARENT_ID] , [TEXT]=tb.[TEXT] , [IS_LEAF]=tb.[IS_LEAF] , [IS_MOBILE_MENU]=tb.[IS_MOBILE_MENU]
from (
 select *  from mh_db.dbo.T_PF_MENU where ID in( select PARENT_ID from mh_db.dbo.T_PF_MENU where MENU_FORM_ID in(select ID from mh_db.dbo.T_PF_FORM where CODE like 'CM%'))
 union all
 select * from mh_db.dbo.T_PF_MENU where MENU_FORM_ID in(select ID from mh_db.dbo.T_PF_FORM where CODE like 'CM%')
) tb  where T_PF_MENU.ID=tb.ID


--插入
insert into T_PF_MENU
 select [ID], [NAME], [NAME_ACRONYM], [MENU_FORM_PARAMS], [MENU_FORM_ID], [ICON], [PICTURE_ID], [NUM], [ENABLE_STATUS], [REMARK], [IS_INIT_SHOW], [IS_INIT_REQ], [SRC_ID], [IS_PERMISSION_MENU], [PLATFORM_CATEGORY], [IS_PERMISSION_SUB], [IS_RESIDENT], [IS_DELETED],'D9871BA8-0EEC-9E4A-BB87-7D5A540D8913' [ORG_ID], [ENTITY_ORG_TPYE], [FORM_ID], [FLOW_STATUS], [FLOW_SEND_STATUS], [FLOW_ID], '2022-12-20 00:00:00'[CREATE_TIME], [MODIFY_TIME], [CREATER_ID], [MODIFIER_ID], [PARENT_ID], [TEXT], [IS_LEAF], [IS_MOBILE_MENU]  from mh_db.dbo.T_PF_MENU where ID in( select PARENT_ID from mh_db.dbo.T_PF_MENU where MENU_FORM_ID in(select ID from mh_db.dbo.T_PF_FORM where CODE like 'CM%'))
union all
 select [ID], [NAME], [NAME_ACRONYM], [MENU_FORM_PARAMS], [MENU_FORM_ID], [ICON], [PICTURE_ID], [NUM], [ENABLE_STATUS], [REMARK], [IS_INIT_SHOW], [IS_INIT_REQ], [SRC_ID], [IS_PERMISSION_MENU], [PLATFORM_CATEGORY], [IS_PERMISSION_SUB], [IS_RESIDENT], [IS_DELETED],'D9871BA8-0EEC-9E4A-BB87-7D5A540D8913' [ORG_ID], [ENTITY_ORG_TPYE], [FORM_ID], [FLOW_STATUS], [FLOW_SEND_STATUS], [FLOW_ID], '2022-12-20 00:00:00'[CREATE_TIME], [MODIFY_TIME], [CREATER_ID], [MODIFIER_ID], [PARENT_ID], [TEXT], [IS_LEAF], [IS_MOBILE_MENU] from mh_db.dbo.T_PF_MENU where MENU_FORM_ID in(select ID from mh_db.dbo.T_PF_FORM where CODE like 'CM%')


 
 --实际两边不对等改造
 --insert into T_PF_MENU
 --select [ID], [NAME], [NAME_ACRONYM], [MENU_FORM_PARAMS], [MENU_FORM_ID], [ICON], [PICTURE_ID], [NUM], [ENABLE_STATUS], [REMARK], [IS_INIT_SHOW], [IS_INIT_REQ], [SRC_ID], [IS_PERMISSION_MENU], [PLATFORM_CATEGORY], [IS_PERMISSION_SUB], [IS_RESIDENT], [IS_DELETED],'D9871BA8-0EEC-9E4A-BB87-7D5A540D8913' [ORG_ID], [ENTITY_ORG_TPYE], [FORM_ID], [FLOW_STATUS], [FLOW_SEND_STATUS], [FLOW_ID], '2022-12-20 00:00:00'[CREATE_TIME], [MODIFY_TIME], [CREATER_ID], [MODIFIER_ID],'439EB7CE-898F-42A5-B0A1-1052BC655405' [PARENT_ID], [TEXT], [IS_LEAF], [IS_MOBILE_MENU]  from mh_db.dbo.T_PF_MENU where ID in( select PARENT_ID from mh_db.dbo.T_PF_MENU where MENU_FORM_ID in(select ID from mh_db.dbo.T_PF_FORM where CODE like 'CM%')) and NAME='应急管理'
 --union all
 --select [ID], [NAME], [NAME_ACRONYM], [MENU_FORM_PARAMS], [MENU_FORM_ID], [ICON], [PICTURE_ID], [NUM], [ENABLE_STATUS], [REMARK], [IS_INIT_SHOW], [IS_INIT_REQ], [SRC_ID], [IS_PERMISSION_MENU], [PLATFORM_CATEGORY], [IS_PERMISSION_SUB], [IS_RESIDENT], [IS_DELETED],'D9871BA8-0EEC-9E4A-BB87-7D5A540D8913' [ORG_ID], [ENTITY_ORG_TPYE], [FORM_ID], [FLOW_STATUS], [FLOW_SEND_STATUS], [FLOW_ID], '2022-12-20 00:00:00'[CREATE_TIME], [MODIFY_TIME], [CREATER_ID], [MODIFIER_ID], '67689A14-912B-4F18-8D74-D2CB95DB3078'[PARENT_ID], [TEXT], [IS_LEAF], [IS_MOBILE_MENU]  from mh_db.dbo.T_PF_MENU where ID in( select PARENT_ID from mh_db.dbo.T_PF_MENU where MENU_FORM_ID in(select ID from mh_db.dbo.T_PF_FORM where CODE like 'CM%') )and NAME='应急管理设置'
 --union all
 --select [ID], [NAME], [NAME_ACRONYM], [MENU_FORM_PARAMS], [MENU_FORM_ID], [ICON], [PICTURE_ID], [NUM], [ENABLE_STATUS], [REMARK], [IS_INIT_SHOW], [IS_INIT_REQ], [SRC_ID], [IS_PERMISSION_MENU], [PLATFORM_CATEGORY], [IS_PERMISSION_SUB], [IS_RESIDENT], [IS_DELETED],'D9871BA8-0EEC-9E4A-BB87-7D5A540D8913' [ORG_ID], [ENTITY_ORG_TPYE], [FORM_ID], [FLOW_STATUS], [FLOW_SEND_STATUS], [FLOW_ID], '2022-12-20 00:00:00'[CREATE_TIME], [MODIFY_TIME], [CREATER_ID], [MODIFIER_ID], [PARENT_ID], [TEXT], [IS_LEAF], [IS_MOBILE_MENU] from mh_db.dbo.T_PF_MENU where MENU_FORM_ID in(select ID from mh_db.dbo.T_PF_FORM where CODE like 'CM%')


