-- ----------------------------- 2023-12-28 add by zhangs------------begin
ALTER TABLE t_lims_folder ADD SKIPAUDIT varchar(1) NULL;
-- ----------------------------- 2023-12-28 add by zhangs------------end
-- ----------------------------- 2024-01-23 add by gaozq------------begin
INSERT INTO t_core_code (id,codename,codecategoryid,remark,orderno,version,createdbyid,createdbyname,createdtime,lastsuspendedflag,lastsuspendedbyid,lastsuspendedbyname,lastsuspendedtime,code,i18ncode) VALUES
(20240123001,'粉末电阻率','acqExector',NULL,NULL,NULL,'admin','系统管理员1','2024-01-23 17:00:00.000','0',NULL,NULL,NULL,'PowderAcqExector',NULL);
-- ----------------------------- 2024-01-23 add by gaozq------------end

-- ----------------------------- 2024-01-23 add by zhangs------------begin
ALTER TABLE t_lims_result ADD TESTID bigint NULL COMMENT '静态测试ID';
update t_lims_result r join t_lims_test_method c on c.id=r.TESTMETHODID
set r.testid=c.TESTID;

ALTER TABLE t_lims_order ADD SAMPLEBATCHREMARK varchar(100) NULL COMMENT '批次补充信息';
CALL INSERTI18N('T_LIMS_ORDER.SAMPLEBATCHREMARK', '批次补充信息', '批次补充信息', 'zh-CN', '批次补充信息');

INSERT INTO T_CORE_CODE_CATEGORY (ID,CODECATEGORYNAME,CODECLASSID,REMARK,ORDERNO,VERSION,CREATEDBYID,CREATEDBYNAME,CREATEDTIME) VALUES
('sampleBatchRemark','批次补充信息','biz',NULL,1,NULL,NULL,NULL,NULL);

INSERT INTO t_core_code (id,codename,codecategoryid,remark,orderno,version,createdbyid,createdbyname,createdtime,lastsuspendedflag,lastsuspendedbyid,lastsuspendedbyname,lastsuspendedtime,code,i18ncode) VALUES
(2024012315111,'混料','sampleBatchRemark',NULL,10,NULL,'admin','系统管理员1','2023-12-04 17:00:00.000','0',NULL,NULL,NULL,'混料',NULL),
(2024012315112,'粗磨','sampleBatchRemark',NULL,20,NULL,'admin','系统管理员1','2023-12-04 17:00:00.000','0',NULL,NULL,NULL,'粗磨',NULL),
(2024012315113,'细磨','sampleBatchRemark',NULL,30,NULL,'admin','系统管理员1','2023-12-04 17:00:00.000','0',NULL,NULL,NULL,'细磨',NULL),
(2024012315114,'喷雾','sampleBatchRemark',NULL,40,NULL,'admin','系统管理员1','2023-12-04 17:00:00.000','0',NULL,NULL,NULL,'喷雾',NULL),
(2024012315115,'烧结','sampleBatchRemark',NULL,50,NULL,'admin','系统管理员1','2023-12-04 17:00:00.000','0',NULL,NULL,NULL,'烧结',NULL),
(2024012315116,'粉碎','sampleBatchRemark',NULL,60,NULL,'admin','系统管理员1','2023-12-04 17:00:00.000','0',NULL,NULL,NULL,'粉碎',NULL);
-- ----------------------------- 2024-01-23 add by zhangs------------end

-- ----------------------------- 2024-01-24 add by zhangs------------begin
ALTER TABLE t_lims_folder ADD SAMPLECONFIRM varchar(1) NULL COMMENT '取样';
CALL INSERTI18N('T_LIMS_FOLDER.SAMPLECONFIRM', '取样', '取样', 'zh-CN', '取样');
ALTER TABLE t_lims_folder ADD AUDITAGAIN varchar(1) NULL COMMENT '复审';
CALL INSERTI18N('T_LIMS_FOLDER.AUDITAGAIN', '复审', '复审', 'zh-CN', '复审');

INSERT INTO t_core_menu (ID,MENUNAME,HREF,PARENTID,ORDERNO,MENUINITNAME,LASTUPDATEDBYID,LASTUPDATEDBYNAME,LASTUPDATEDTIME,ICON,TODOICON,I18NCODE) VALUES
('20240124001','取样确认','/secure/basemodule/business/test/folders/page/edit-list?pageType=sampleConfirm','1001',1,'取样确认',NULL,NULL,NULL,'024.svg','027.png',NULL);
INSERT INTO t_core_todo_config (ID,NAME,MENUID,CATEGORY,ICON,INHERITPARAM,JSONPARAM,SERVICEMETHOD,ACTIVATEDFLAG,ACTIVATEDBYID,ACTIVATEDBYNAME,ACTIVATEDTIME,DESCEXPRESSION,ORDERNO,I18NCODE,VOICEWARNING,SELECTSQL) VALUES
(1309632986596000,'取样确认','20240124001','business','024.png','1','{"filterUser":"sampleConfirm","bpmn_statusCode":"sampleConfirm"}','com.sunwayworld.basemodule.business.test.folder.service.impl.LimsFolderServiceImpl.selectPagination','1','zhangs','张胜','2024-01-24 15:36:10',NULL,NULL,NULL,'1',NULL);
-- ----------------------------- 2024-01-24 add by zhangs------------end

-- ----------------------------- 2024-01-25 add by zhangs------------begin
ALTER TABLE t_lims_folder ADD TOORDERRECEIVETIME datetime NULL COMMENT '到样时间';
CALL INSERTI18N('T_LIMS_FOLDER.TOORDERRECEIVETIME', '到样时间', '到样时间', 'zh-CN', '到样时间');
update t_lims_folder s inner join (select  replace(TARGETID,'T_LIMS_FOLDER$','') id,max(CREATEDTIME)  CREATEDTIME from t_core_bpmn_comment tcbc where route like '%-> 样品接收%' group by replace(TARGETID,'T_LIMS_FOLDER$','')
) temp on temp.id=s.id set s.toOrderReceiveTime=temp.CREATEDTIME;
-- ----------------------------- 2024-01-25 add by zhangs------------end
-- ----------------------------- 2024-01-30 add by gaozq------------end
alter table T_LIMS_FILE_DATA_COLLECT add column PROCESSES VARCHAR(36) null comment '工序';
CALL INSERTI18N('T_LIMS_FILE_DATA_COLLECT.PROCESSES','工序','工序','zh-CN','工序');
-- ----------------------------- 2024-01-30 add by gaozq------------end


