--样式方案
DELETE FROM t_msplan_vwscheme WHERE FID = 1514353786498396160;
INSERT INTO t_msplan_vwscheme(FMONDAY,FAUDITORID,FSHOWDATAL,FSECONDYQ,FMASTERID,FWEDNESDAY,FCREATETIME,FENABLE,FSECONDYM,FFIRSTYM,FINTERNALCOL,FSUMMARYAREA,FID,FFIRSTYQ,FSECONDHOUR,FSHOWLVLLINE,FISSYS,FASSISLINETYPE,FASSISHLINETYPE,FSATURDAY,FFRIDAY,FAREA,FFIRSTYEAR,FSHOWHLINE,FSTATUS,FNUMBER,FTHURSDAY,FSECONDYEAR,FLINETYPE,FMODIFIERID,FINTERNALROW,FMODIFYTIME,FCOLORVALUE,FTUESDAY,FAUDITTIME,FCREATORID,FPLANAREA,FSUNDAY,FTODOAREA) VALUES ('0',1,'1','0',1514353786498396160,'0',{ts'2018-08-08  18:08:08'},'1','1','0',1,'0',1514353786498396160,'0','0','1','0','1','1','1','0',' ','0','0','C','personplan_S','0','0','1',1,1,{ts'2018-08-08  18:08:08'},'#d32d03','0',{ts'2018-08-08  18:08:08'},1,'1','1','0'); 

DELETE FROM t_msplan_vwscheme_L WHERE FPKID = '2R/3H490X6D6';
INSERT INTO t_msplan_vwscheme_L(FID,FPKID,FLOCALEID,FNAME) VALUES (1514353786498396160,'2R/3H490X6D6','zh_CN','人员预排预设样式方案'); 
DELETE FROM t_msplan_vwscheme_L WHERE FPKID = '2R/3H490X6D7';
INSERT INTO t_msplan_vwscheme_L(FID,FPKID,FLOCALEID,FNAME) VALUES (1514353786498396160,'2R/3H490X6D7','zh_TW','人員預排預設樣式方案'); 



DELETE FROM t_msplan_jvwschcross WHERE FENTRYID = 1514353786984936448;
INSERT INTO t_msplan_jvwschcross(FID,FPOSITION,FLIMITVALUE,FHEIGHT,FLABELISSHOW,FCROSSTYPEID,FCROSSOBJ,FENTRYID,FSEQ,FCROSSSHAP,FISLINE,FCROSSCOLOR) VALUES (1514353786498396160,'3',0,'16','1',1078085411659881472,'1',1514353786984936448,1,'3','0','rgba(85, 160, 245, 1)'); 
DELETE FROM t_msplan_jvwschcross WHERE FENTRYID = 1514353786984936449;
INSERT INTO t_msplan_jvwschcross(FID,FPOSITION,FLIMITVALUE,FHEIGHT,FLABELISSHOW,FCROSSTYPEID,FCROSSOBJ,FENTRYID,FSEQ,FCROSSSHAP,FISLINE,FCROSSCOLOR) VALUES (1514353786498396160,'2',0,'20','0',0,'4',1514353786984936449,2,'3','0','rgba(128, 113, 166, 1)'); 
DELETE FROM t_msplan_jvwschcross WHERE FENTRYID = 1514353786984936450;
INSERT INTO t_msplan_jvwschcross(FID,FPOSITION,FLIMITVALUE,FHEIGHT,FLABELISSHOW,FCROSSTYPEID,FCROSSOBJ,FENTRYID,FSEQ,FCROSSSHAP,FISLINE,FCROSSCOLOR) VALUES (1514353786498396160,'2',0,'20','1',0,'5',1514353786984936450,3,'3','0','rgba(187, 187, 187, 0.5)'); 


DELETE FROM t_msplan_dataline WHERE FENTRYID = 1514353786984935424;
INSERT INTO t_msplan_dataline(FID,FDATALINETYPE,FISSHOW,FLINESHAPE,FLINECOLORVALUE,FENTRYID,FSEQ,FISSHOWCURRENT,FLINECOLOR) VALUES (1514353786498396160,'1','1','1','rgba(225, 69, 62, 1)',1514353786984935424,1,'1',' '); 
DELETE FROM t_msplan_dataline WHERE FENTRYID = 1514353786984935425;
INSERT INTO t_msplan_dataline(FID,FDATALINETYPE,FISSHOW,FLINESHAPE,FLINECOLORVALUE,FENTRYID,FSEQ,FISSHOWCURRENT,FLINECOLOR) VALUES (1514353786498396160,'4','1','1','rgba(212, 176, 163, 0.5)',1514353786984935425,2,'0',' '); 
DELETE FROM t_msplan_dataline WHERE FENTRYID = 1514353786984935426;
INSERT INTO t_msplan_dataline(FID,FDATALINETYPE,FISSHOW,FLINESHAPE,FLINECOLORVALUE,FENTRYID,FSEQ,FISSHOWCURRENT,FLINECOLOR) VALUES (1514353786498396160,'3','1','1','rgba(225, 69, 62, 1)',1514353786984935426,3,'0',' '); 
DELETE FROM t_msplan_dataline WHERE FENTRYID = 1514353786984935427;
INSERT INTO t_msplan_dataline(FID,FDATALINETYPE,FISSHOW,FLINESHAPE,FLINECOLORVALUE,FENTRYID,FSEQ,FISSHOWCURRENT,FLINECOLOR) VALUES (1514353786498396160,'2','1','1','rgba(148, 138, 21, 1)',1514353786984935427,4,'1',' '); 


--甘特图数据源
DELETE FROM t_msplan_gttsource WHERE FID = 1505661681320088576;
INSERT INTO t_msplan_gttsource(FPOSTRALATIONFLAG,FGTENTITYID,FMASTERID,FHIGHCOLORVALUE,FPOSTENTITY,FCREATETIME,FENABLE,FPRERALATIONFLAG,FTTIMEFIELD,FID,FRALATIONENTITYID,FHIGHLIGHTGROUPFLAG,FENTITYLAYOUTID,FSTATUS,FHIGHLIGHTGROUP,FNUMBER,FTASKENTITYID,FDATAMODELMUTL,FPRERALATION,FPOSTRALATION,FMODIFIERID,FPREENTITY,FMODIFYTIME,FTTIMEFIELDDESC,FPOSTRALATIONNAME,FPRERALATIONNAME,FCREATORID) VALUES (' ',' ',1505661681320088576,' ',' ',{ts'2018-08-08  18:08:08'},'1','mpdm_workcenter_info','estiapproachtime',1505661681320088576,' ','billno',' ','C','单据头.单据编号','personplan_S','pmpd_resourceplan','0',' ',' ',1,' ',{ts'2018-08-08  18:08:08'},'单据头.预计进场时间',' ','单据头.mpdm_workcenter_info',1); 

DELETE FROM t_msplan_gttsource_L WHERE FPKID = '2PYGDXGKHEGJ';
INSERT INTO t_msplan_gttsource_L(FID,FPKID,FLOCALEID,FNAME) VALUES (1505661681320088576,'2PYGDXGKHEGJ','zh_CN','人员预排默认数据源'); 
DELETE FROM t_msplan_gttsource_L WHERE FPKID = '2PYGDXGKHEGK';
INSERT INTO t_msplan_gttsource_L(FID,FPKID,FLOCALEID,FNAME) VALUES (1505661681320088576,'2PYGDXGKHEGK','zh_TW','人員預排默認數據源'); 

DELETE FROM t_msplan_souceviewscheme WHERE FPKID = 1514354269992596480;
INSERT INTO t_msplan_souceviewscheme(FID,FBASEDATAID,FPKID) VALUES (1505661681320088576,1514353786498396160,1514354269992596480); 

DELETE FROM t_msplan_entity WHERE FENTRYID = 1505661681353641984;
INSERT INTO t_msplan_entity(FGROUPENTITYID,FFILTERTEXT,FGROUPFIELDDESC,FTASKENTITYFLAGDESC,FFILTER_TAG,FTIMEFIELDDESC,FENTITYID,FUPUPGROUPFIELD,FISMAPPINGENTITY,FSEQ,FUPUPGROUPENTITYID,FVIEWID,FTIMEFIELD,FID,FGROUPFIELD,FUPGROUPENTITYID,FVIEWALIAS,FENTRYID,FUPGROUPFIELDDESC,FGANTTTYPE,FDEFAULTVIEW,FJOINFILTER,FFILTER,FTASKENTITYFLAG,FUPGROUPFIELD,FUPUPGROUPFIELDDESC) VALUES (' ',' ',' ',' ',' ',' ','mpdm_workcenter_info',' ','0',1,' ',1503462016008873984,' ',1505661681320088576,' ',' ','检修工作中心',1505661681353641984,' ','A','0','1',' ',' ',' ',' '); 

DELETE FROM t_msplan_entity_condition WHERE FDETAILID = 1505661681353643008;
INSERT INTO t_msplan_entity_condition(FVERSIONFILED,FFIELDSORTFLAG,FDETAILID,FCENTITYID,FCFILTERTEXT,FFIELDSORT,FENTRYID,FSEQ,FCFILTER_TAG,FCFILTER) VALUES ('version',' ',1505661681353643008,'pmpd_resourceplan','版本.版本号 为 为空 并且 发布状态 等于 发布 ',' ',1505661681353641984,1,'{"filterRow":[{"id":"2JIKWCPG7Q6I","leftBracket":"","compareType":"37","fieldName":"version.number","rightBracket":"","logic":"0","value":[{"id":"2JIKWCPJV3PS","value":""}],"baseDataIds":[]},{"id":"2JIKWCPJV4D0","leftBracket":"","compareType":"105","fieldName":"pulishstatus","rightBracket":"","logic":"0","value":[{"id":"2JIKWCPJV3PT","value":"1"}],"baseDataIds":[]}],"forList":false}',' '); 
DELETE FROM t_msplan_entity_condition WHERE FDETAILID = 1505661681353643009;
INSERT INTO t_msplan_entity_condition(FVERSIONFILED,FFIELDSORTFLAG,FDETAILID,FCENTITYID,FCFILTERTEXT,FFIELDSORT,FENTRYID,FSEQ,FCFILTER_TAG,FCFILTER) VALUES (' ','number',1505661681353643009,'mpdm_workcenter_info',' ','单据头.编码',1505661681353641984,2,' ',' '); 

DELETE FROM t_msplan_entity_relation WHERE FDETAILID = 1505661681353641985;
INSERT INTO t_msplan_entity_relation(FRENTITYID,FDETAILID,FENTRYID,FSEQ,FRENTITYFLAG,FRUPLEVELENTITYID,FRENTITYFLAGDESC,FRENTRYFLAG) VALUES ('pmpd_resourceplan',1505661681353641985,1505661681353641984,1,'entry_repair.sectionresource','mpdm_workcenter_info','检修场地时间.分段占用工作中心','entry_repair'); 


DELETE FROM t_msplan_filter WHERE FENTRYID = 1505661681353641986;
INSERT INTO t_msplan_filter(FID,FENTITYCONDFILTER,FENTITYCONDALIGNDESC,FENTITYCONDID,FENTRYID,FISUNLIMITED,FISMULTI,FENTITYCONDFILTER_TAG,FCONTROLRANGEONE,FCONTROLRANGETWO,FCONTROLRANGEFOUR,FCONTROLRANGETHREE,FSEQ,FENTITYCONDALIGN,FENTITYCONDSET) VALUES (1505661681320088576,' ','检修场地时间.分段占用工作中心','mpdm_workcenter_info',1505661681353641986,'1','1','{"filterRow":[{"id":"2JILLN9BWSJL","leftBracket":"","compareType":"105","fieldName":"enable","rightBracket":"","logic":"0","value":[{"id":"2JILLN9BWT7V","value":"1"}],"baseDataIds":[]},{"id":"2JILLN9BWSJM","leftBracket":"","compareType":"105","fieldName":"status","rightBracket":"","logic":"0","value":[{"id":"2JILLN9BWT7W","value":"C"}],"baseDataIds":[]}],"forList":false}','1','0','0','0',1,'entry_repair.sectionresource','使用状态 等于 可用 并且 数据状态 等于 已审核 '); 

DELETE FROM t_msplan_filterentry WHERE FDETAILID = 1505661681353643011;
INSERT INTO t_msplan_filterentry(FDETAILID,FCHILDENTITYFLAG,FTOFILTERFLAGDESC,FTOFILTERFLAG,FENTRYID,FSEQ) VALUES (1505661681353643011,'mpdm_workcenter_info','单据头.mpdm_workcenter_info','mpdm_workcenter_info',1505661681353641986,1); 



DELETE FROM t_msplan_crossset WHERE FENTRYID = 1505661681353641988;
INSERT INTO t_msplan_crossset(FID,FCROSSFLAGDETAILCONTENT,FENDDATEFILED,FCROSSFLAGDETAILDESC,FCROSSFCONE,FSTARTDATEFILED,FENTRYID,FCROSSFLAGCONTENTDESC,FCROSSFLAGCONTENT,FFLAGCONNECTOR,FFLAGDETAILCONNECTOR,FISGROUPCOUNT,FCROSSTYPEID,FCROSSOBJ,FLANDMARKSFILED,FSTARTDATEFILEDDESC,FSEQ,FCROSSFCDESCONE,FCROSSENTITYID,FENDDATEFILEDDESC,FFLAGCONNECTORONE) VALUES (1505661681320088576,'estiapproachtime,estideparttime,entry_project.projcet.number,entry_project.projcet.name','entry_repair.sectionendtime','单据头.预计进场时间,单据头.预计离场时间,关联项目编码.项目编号,关联项目编码.项目名称',' ','entry_repair.sectionstarttime',1505661681353641988,'单据头.单据编号,单据头.客户编码.名称','billno,customer.name','|',',','0',1078085411659881472,'1',' ','检修场地时间.分段占用开始时间',1,' ','pmpd_resourceplan','检修场地时间.分段占用结束时间',' '); 


DELETE FROM t_msplan_crosscontent WHERE FDETAILID = 1505661681353643012;
INSERT INTO t_msplan_crosscontent(FENTRYCROSSFCDESCONE,FCVIEWALIAS,FCVIEWID,FLTYPEONE,FLABELFORMAT,FENTRYID,FENTRYFLAGCONNECTOR,FLTYPE,FLABELTYPE,FENTRYCROSSFLAGCONTENT,FLABELFORMATTWO,FLABELTYPETWO,FLABELFORMATONE,FENTRYCROSSFLAGDETAILDESC,FENTRYCROSSFLAGDETAILCONT,FLABELTYPEONE,FDETAILID,FCSVIEWSCHEMEID,FENTRYCROSSFCONE,FENTRYCROSSFLAGCONTENTDES,FSEQ,FENTRYFLAGCONNECTORONE,FLTYPEONEWO,FENTRYFLAGDETAILCONNECTOR) VALUES (' ','检修工作中心',1503462016008873984,' ',' ',1505661681353641988,'|',' ',' ','billno,customer.name',' ',' ',' ','单据头.预计进场时间,单据头.预计离场时间,单据头.计划检修周期','estiapproachtime,estideparttime,repaircycle',' ',1505661681353643012,'mpdm_workcenter_info',' ','单据头.单据编号,单据头.客户编码.名称',1,' ',' ',','); 

DELETE FROM t_msplan_crossmoveentry WHERE FDETAILID = 1505661681353641989;
INSERT INTO t_msplan_crossmoveentry(FPARTMOVE,FCMVIEWSCHEMEID,FDETAILID,FENTRYID,FSEQ,FENTIRETYMOVE,FTVIEWALIAS,FTVIEWID) VALUES ('0','mpdm_workcenter_info',1505661681353641989,1505661681353641988,1,'0','检修工作中心',1503462016008873984); 

DELETE FROM t_msplan_person_color WHERE FENTRYID = 1505661681353643013;
INSERT INTO t_msplan_person_color(FID,FENTRYID,FSEQ,FCOLORCONDFILTER,FCOLORVALUE,FCOLORCONDITON,FCOLORCONDFILTER_TAG) VALUES (1505661681320088576,1505661681353643013,1,' ','rgba(187, 187, 187, 1)','检修场地时间.分段占用工作中心.编码 为 为空 ','{"filterRow":[{"id":"2JQKELXSKCBT","leftBracket":"","compareType":"37","fieldName":"sectionresource.number","rightBracket":"","logic":"0","value":[{"id":"2JQKELXW86RB","value":""}],"baseDataIds":[]}],"forList":false}'); 

--实体对照数据源
DELETE FROM t_msplan_gemapping WHERE FID = 1503720808600605696;
INSERT INTO t_msplan_gemapping(FID,FCREATETIME,FMODIFIERID,FENABLE,FMODELENTITYID,FMODIFYTIME,FMASTERID,FVERSIONFIELD,FSTATUS,FDATASOURCEID,FCREATORID,FNUMBER) VALUES (1503720808600605696,{ts'2018-08-08  18:08:08'},1,'1','2PW563BRAY65',{ts'2018-08-08  18:08:08'},1503720808600605696,' ','C',1505661681320088576,1,'personplan_S'); 

DELETE FROM t_msplan_gemapping_L WHERE FPKID = '2PP5RTB08W5Q';
INSERT INTO t_msplan_gemapping_L(FID,FPKID,FLOCALEID,FNAME) VALUES (1503720808600605696,'2PP5RTB08W5Q','zh_CN','人员预排甘特图'); 
DELETE FROM t_msplan_gemapping_L WHERE FPKID = '2PP5RTB08W5R';
INSERT INTO t_msplan_gemapping_L(FID,FPKID,FLOCALEID,FNAME) VALUES (1503720808600605696,'2PP5RTB08W5R','zh_TW','人員預排甘特圖'); 
