-- ----------------------------- 2023-12-01 add by zhangs------------begin
ALTER TABLE t_lims_specimen_item ADD JUDGEREF varchar(1) NULL COMMENT '是否判定项';
CALL INSERTI18N('T_LIMS_SPECIMEN_ITEM.JUDGEREF', '是否判定项', '是否判定项', 'zh-CN', '是否判定项');
ALTER TABLE t_lims_folder ADD QUALITYCONTROLCREATE varchar(1) NULL COMMENT '是否质控样定时任务生成';
update t_lims_folder set QUALITYCONTROLCREATE=0;
INSERT INTO t_core_schedule_task (ID,TASKNAME,SERVICENAME,METHODNAME,REMARK,CREATEDBYID,CREATEDBYNAME,CREATEDTIME,CREATEDBYORGID,CREATEDBYORGNAME,`TYPE`,IFEXECUTABLESERVICENAME,IFEXECUTABLEMETHODNAME) VALUES
('qualityControlFolderCreate','质控计划生成委托','com.sunwayworld.basemodule.business.test.folder.service.LimsFolderService','qualityControlFolderCreate',NULL,NULL,NULL,NULL,NULL,NULL,'service',NULL,NULL);
-- ----------------------------- 2023-12-01 add by zhangs------------end

-- ----------------------------- 2023-12-02 add by zhangs------------begin
ALTER TABLE t_lims_task ADD QUALITYEXCEPTIONSTATUS varchar(100) NULL COMMENT '质控异常处理状态';
update t_lims_task set  qualityExceptionStatus='待确认';
ALTER TABLE t_lims_folder ADD QUALITYCONTROLWAY varchar(100) NULL COMMENT '质控方式';

-- ----------------------------- 2023-12-02 add by zhangs------------end

-- ----------------------------- 2023-12-04 add by gaozq--------------begin

-- 建表语句

CREATE TABLE IF NOT EXISTS `T_LIMS_STAFF_COMPETENCY_MATRIX`(
                                                               `ID` BIGINT NOT NULL COMMENT '主键',
                                                               `STAFFID` BIGINT DEFAULT NULL COMMENT '人员ID',
                                                               `SKILL` VARCHAR(60)  DEFAULT NULL COMMENT '技能',
    `GRADE` BIGINT DEFAULT NULL COMMENT '分数',
    `CREATEDBYID` VARCHAR(36)  DEFAULT NULL COMMENT '制单人编码',
    `CREATEDBYNAME` VARCHAR(60)  DEFAULT NULL COMMENT '制单人名称',
    `CREATEDTIME` DATETIME DEFAULT NULL COMMENT '制单时间',
    `CREATEDBYORGID` VARCHAR(36)  DEFAULT NULL COMMENT '制单人单位编码',
    `CREATEDBYORGNAME` VARCHAR(270)  DEFAULT NULL COMMENT '制单人单位名称',
    PRIMARY KEY (`ID`)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='人员能力矩阵';

INSERT INTO T_CORE_AUDIT_CONFIG (ID, NAME, CATEGORY, AUDITABLE)
VALUES ('T_LIMS_STAFF_COMPETENCY_MATRIX', '人员能力矩阵', 'service', '1');
CALL INSERTI18N('T_LIMS_STAFF_COMPETENCY_MATRIX.SERVICE_NAME', '人员能力矩阵', '人员能力矩阵', 'zh-CN', '人员能力矩阵');
CALL INSERTI18N('T_LIMS_STAFF_COMPETENCY_MATRIX.ID', '人员能力矩阵的主键', '主键', 'zh-CN', '主键');
CALL INSERTI18N('T_LIMS_STAFF_COMPETENCY_MATRIX.STAFFID', '人员能力矩阵的人员ID', '人员ID', 'zh-CN', '人员ID');
CALL INSERTI18N('T_LIMS_STAFF_COMPETENCY_MATRIX.SKILL', '人员能力矩阵的技能', '技能', 'zh-CN', '技能');
CALL INSERTI18N('T_LIMS_STAFF_COMPETENCY_MATRIX.GRADE', '人员能力矩阵的分数', '分数', 'zh-CN', '分数');
CALL INSERTI18N('T_LIMS_STAFF_COMPETENCY_MATRIX.CREATEDBYID', '人员能力矩阵的制单人编码', '制单人编码', 'zh-CN', '制单人编码');
CALL INSERTI18N('T_LIMS_STAFF_COMPETENCY_MATRIX.CREATEDBYNAME', '人员能力矩阵的制单人名称', '制单人名称', 'zh-CN', '制单人名称');
CALL INSERTI18N('T_LIMS_STAFF_COMPETENCY_MATRIX.CREATEDTIME', '人员能力矩阵的制单时间', '制单时间', 'zh-CN', '制单时间');
CALL INSERTI18N('T_LIMS_STAFF_COMPETENCY_MATRIX.CREATEDBYORGID', '人员能力矩阵的制单人单位编码', '制单人单位编码', 'zh-CN', '制单人单位编码');
CALL INSERTI18N('T_LIMS_STAFF_COMPETENCY_MATRIX.CREATEDBYORGNAME', '人员能力矩阵的制单人单位名称', '制单人单位名称', 'zh-CN', '制单人单位名称');
CALL INSERTI18N('BASEMODULE.BASEDATA.STAFF.COMPETENCYMATRIXS.MODAL.ADD', '新增', '新增', 'zh-CN', '新增');
CALL INSERTI18N('BASEMODULE.BASEDATA.STAFF.COMPETENCYMATRIXS.TAB.BASE_INFO', '基本信息', '基本信息', 'zh-CN', '基本信息');
CALL INSERTI18N('BASEMODULE.BASEDATA.STAFF.COMPETENCYMATRIXS.BUTTON.BUTTON', '按钮', '按钮', 'zh-CN', '按钮');
CALL INSERTI18N('BASEMODULE.BASEDATA.STAFF.COMPETENCYMATRIXS.TIP.TIP', '提示框', '提示框', 'zh-CN', '提示框');
CALL INSERTI18N('BASEMODULE.BASEDATA.STAFF.COMPETENCYMATRIXS.MODAL.MODAL', '对话框', '对话框', 'zh-CN', '对话框');


INSERT INTO T_CORE_TABLE (ID, AUDITABLE, ATTACHMENT)
VALUES ('T_LIMS_STAFF_COMPETENCY_MATRIX', '0', '0');


COMMIT;

INSERT INTO T_CORE_CODE_CATEGORY (ID,CODECATEGORYNAME,CODECLASSID,REMARK,ORDERNO,VERSION,CREATEDBYID,CREATEDBYNAME,CREATEDTIME) VALUES
('staffSkill','人员技能','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
(20231204001,'铁含量','staffSkill',NULL,NULL,NULL,'admin','系统管理员1','2023-12-04 17:00:00.000','0',NULL,NULL,NULL,'铁含量',NULL),
(20231204002,'磷含量','staffSkill',NULL,NULL,NULL,'admin','系统管理员1','2023-12-04 17:00:00.000','0',NULL,NULL,NULL,'磷含量',NULL),
(20231204003,'Ph','staffSkill',NULL,NULL,NULL,'admin','系统管理员1','2023-12-04 17:00:00.000','0',NULL,NULL,NULL,'Ph',NULL),
(20231204004,'粒度','staffSkill',NULL,NULL,NULL,'admin','系统管理员1','2023-12-04 17:00:00.000','0',NULL,NULL,NULL,'粒度',NULL),
(20231204005,'水分','staffSkill',NULL,NULL,NULL,'admin','系统管理员1','2023-12-04 17:00:00.000','0',NULL,NULL,NULL,'水分',NULL),
(20231204006,'碳硫','staffSkill',NULL,NULL,NULL,'admin','系统管理员1','2023-12-04 17:00:00.000','0',NULL,NULL,NULL,'碳硫',NULL),
(20231204007,'比表面','staffSkill',NULL,NULL,NULL,'admin','系统管理员1','2023-12-04 17:00:00.000','0',NULL,NULL,NULL,'比表面',NULL),
(20231204008,'固含量','staffSkill',NULL,NULL,NULL,'admin','系统管理员1','2023-12-04 17:00:00.000','0',NULL,NULL,NULL,'固含量',NULL),
(20231204009,'收样','staffSkill',NULL,NULL,NULL,'admin','系统管理员1','2023-12-04 17:00:00.000','0',NULL,NULL,NULL,'收样',NULL),
(20231204010,'封磁棒/下料','staffSkill',NULL,NULL,NULL,'admin','系统管理员1','2023-12-04 17:00:00.000','0',NULL,NULL,NULL,'封磁棒/下料',NULL),
(20231204011,'转移/提取','staffSkill',NULL,NULL,NULL,'admin','系统管理员1','2023-12-04 17:00:00.000','0',NULL,NULL,NULL,'转移/提取',NULL),
(20231204012,'漂洗/酸洗','staffSkill',NULL,NULL,NULL,'admin','系统管理员1','2023-12-04 17:00:00.000','0',NULL,NULL,NULL,'漂洗/酸洗',NULL),
(20231204013,'抽滤','staffSkill',NULL,NULL,NULL,'admin','系统管理员1','2023-12-04 17:00:00.000','0',NULL,NULL,NULL,'抽滤',NULL),
(20231204014,'扫描','staffSkill',NULL,NULL,NULL,'admin','系统管理员1','2023-12-04 17:00:00.000','0',NULL,NULL,NULL,'扫描',NULL),
(20231204015,'数据录入','staffSkill',NULL,NULL,NULL,'admin','系统管理员1','2023-12-04 17:00:00.000','0',NULL,NULL,NULL,'数据录入',NULL),
(20231204016,'CMC分离','staffSkill',NULL,NULL,NULL,'admin','系统管理员1','2023-12-04 17:00:00.000','0',NULL,NULL,NULL,'CMC分离',NULL),
(20231204017,'盐酸滴定','staffSkill',NULL,NULL,NULL,'admin','系统管理员1','2023-12-04 17:00:00.000','0',NULL,NULL,NULL,'盐酸滴定',NULL),
(20231204018,'异常处理','staffSkill',NULL,NULL,NULL,'admin','系统管理员1','2023-12-04 17:00:00.000','0',NULL,NULL,NULL,'异常处理',NULL),
(20231204019,'大颗粒','staffSkill',NULL,NULL,NULL,'admin','系统管理员1','2023-12-04 17:00:00.000','0',NULL,NULL,NULL,'大颗粒',NULL),
(20231204020,'压实密度','staffSkill',NULL,NULL,NULL,'admin','系统管理员1','2023-12-04 17:00:00.000','0',NULL,NULL,NULL,'压实密度',NULL),
(20231204021,'粉末电阻','staffSkill',NULL,NULL,NULL,'admin','系统管理员1','2023-12-04 17:00:00.000','0',NULL,NULL,NULL,'粉末电阻',NULL),
(20231204022,'松装振实','staffSkill',NULL,NULL,NULL,'admin','系统管理员1','2023-12-04 17:00:00.000','0',NULL,NULL,NULL,'松装振实',NULL),
(20231204023,'磁感应','staffSkill',NULL,NULL,NULL,'admin','系统管理员1','2023-12-04 17:00:00.000','0',NULL,NULL,NULL,'磁感应',NULL),
(20231204024,'过程铁含量','staffSkill',NULL,NULL,NULL,'admin','系统管理员1','2023-12-04 17:00:00.000','0',NULL,NULL,NULL,'过程铁含量',NULL),
(20231204025,'残碱、残锂','staffSkill',NULL,NULL,NULL,'admin','系统管理员1','2023-12-04 17:00:00.000','0',NULL,NULL,NULL,'残碱、残锂',NULL),
(20231204026,'制胶','staffSkill',NULL,NULL,NULL,'admin','系统管理员1','2023-12-04 17:00:00.000','0',NULL,NULL,NULL,'制胶',NULL),
(20231204027,'配料','staffSkill',NULL,NULL,NULL,'admin','系统管理员1','2023-12-04 17:00:00.000','0',NULL,NULL,NULL,'配料',NULL),
(20231204028,'涂布','staffSkill',NULL,NULL,NULL,'admin','系统管理员1','2023-12-04 17:00:00.000','0',NULL,NULL,NULL,'涂布',NULL),
(20231204029,'辊压制片','staffSkill',NULL,NULL,NULL,'admin','系统管理员1','2023-12-04 17:00:00.000','0',NULL,NULL,NULL,'辊压制片',NULL),
(20231204030,'组装挂测','staffSkill',NULL,NULL,NULL,'admin','系统管理员1','2023-12-04 17:00:00.000','0',NULL,NULL,NULL,'组装挂测',NULL),
(20231204031,'数据录入','staffSkill',NULL,NULL,NULL,'admin','系统管理员1','2023-12-04 17:00:00.000','0',NULL,NULL,NULL,'数据录入',NULL),
(20231204032,'锂含量','staffSkill',NULL,NULL,NULL,'admin','系统管理员1','2023-12-04 17:00:00.000','0',NULL,NULL,NULL,'锂含量',NULL),
(20231204033,'磁性物','staffSkill',NULL,NULL,NULL,'admin','系统管理员1','2023-12-04 17:00:00.000','0',NULL,NULL,NULL,'磁性物',NULL),
(20231204034,'杂质元素','staffSkill',NULL,NULL,NULL,'admin','系统管理员1','2023-12-04 17:00:00.000','0',NULL,NULL,NULL,'杂质元素',NULL),
(20231204035,'纯度','staffSkill',NULL,NULL,NULL,'admin','系统管理员1','2023-12-04 17:00:00.000','0',NULL,NULL,NULL,'纯度',NULL),
(20231204036,'游离锂','staffSkill',NULL,NULL,NULL,'admin','系统管理员1','2023-12-04 17:00:00.000','0',NULL,NULL,NULL,'游离锂',NULL);

UPDATE T_LIMS_STAFF t
    INNER JOIN t_core_user s ON t.USERNO=s.USERNO
    SET t.departmentOffice =s.ORGNAME and t.USERID=S.id;
-- ----------------------------- 2023-12-04 add by gaozq------------end

ALTER TABLE t_lims_task ADD QUALITYEXCEPTIONREASON varchar(100) NULL COMMENT '质控异常原因';
CALL INSERTI18N('T_LIMS_TASK.QUALITYEXCEPTIONREASON', '质控异常原因', '质控异常原因', 'zh-CN', '质控异常原因');
-- ----------------------------- 2023-12-02 add by zhangs------------end

-- ----------------------------- 2023-12-04 add by zhangs------------begin
ALTER TABLE t_lims_order ADD TESTTYPES varchar(200) NULL COMMENT '所属项目类型';
update t_lims_order o inner join (
select tltm.ORDERID,group_concat(distinct k.TESTTYPE) TESTTYPES  from t_lims_test_matrix tltm,
t_lims_task k
where tltm.CHECKFLAG='1'
and k.id=tltm.ORDTASKID
group by tltm.ORDERID ) temp on temp.ORDERID=o.id set o.TESTTYPES=temp.TESTTYPES;
-- ----------------------------- 2023-12-04 add by zhangs------------end

-- ----------------------------- 2023-12-05 add by zhangs------------begin
update t_lims_result set retestNum=0 where retestNum is null;
delete from t_core_menu where id in(100140,100142,100150,20230809001);
INSERT INTO t_core_menu (ID,MENUNAME,HREF,PARENTID,ORDERNO,MENUINITNAME,LASTUPDATEDBYID,LASTUPDATEDBYNAME,LASTUPDATEDTIME,ICON,TODOICON,I18NCODE) VALUES
 ('20231205001','质控异常','/secure/basemodule/business/test/tasks/page/qualityControlException','9107',910702,'质控异常',NULL,NULL,NULL,'025.svg','016.png',NULL),
 ('20231205002','质控SPC统计','/secure/basemodule/trm/qcsample/qc-sample-results/page/spc-list','9107',910703,'质控SPC',NULL,NULL,NULL,'016.svg',NULL,NULL);
-- ----------------------------- 2023-12-05 add by zhangs------------end
-- ----------------------------- 2023-12-05 add by gaozq------------begin
alter table T_LIMS_ORDER add column HANGUPTESTSTEP2 VARCHAR(60) null comment '挂测工步2';
alter table T_LIMS_ORDER add column SOLIDCONTENT VARCHAR(36) null comment '固含量';
alter table T_LIMS_ORDER add column SOLVENTQUALITY VARCHAR(36) null comment '溶剂质量';

CALL INSERTI18N('T_LIMS_ORDER.HANGUPTESTSTEP2','挂测工步2','挂测工步2','zh-CN','挂测工步2');
CALL INSERTI18N('T_LIMS_ORDER.SOLIDCONTENT','固含量','固含量','zh-CN','固含量');
CALL INSERTI18N('T_LIMS_ORDER.SOLVENTQUALITY','溶剂质量','溶剂质量','zh-CN','溶剂质量');
-- ----------------------------- 2023-12-05 add by gaozq------------end

-- ----------------------------- 2023-12-05 add by zhangs------------begin
ALTER TABLE t_lims_result ADD REJECTFLAG varchar(1) NULL COMMENT '退回标记';
ALTER TABLE t_lims_specimen_item ADD T_LIMS_TASK varchar(1) NULL COMMENT '是否判定项';
-- ----------------------------- 2023-12-05 add by zhangs------------end

-- ----------------------------- 2023-12-05 add by zhangs--------------begin

-- 建表语句

CREATE TABLE IF NOT EXISTS `T_LIMS_TASK_CONFIG_PARAM`(
     `ID` BIGINT NOT NULL COMMENT '主键',
     `CONFIGID` BIGINT DEFAULT NULL COMMENT '定时表达式ID',
     `BUSINESSID` BIGINT DEFAULT NULL COMMENT '业务ID',
     `BUSINESSNAME` VARCHAR(120)  DEFAULT NULL COMMENT '业务名称',
     `ENABLE` VARCHAR(1)  DEFAULT NULL COMMENT '启用',
     `CREATEDBYID` VARCHAR(36)  DEFAULT NULL COMMENT '制单人编码',
     `CREATEDBYNAME` VARCHAR(60)  DEFAULT NULL COMMENT '制单人名称',
     `CREATEDTIME` DATETIME DEFAULT NULL COMMENT '制单时间',
     `CREATEDBYORGID` VARCHAR(36)  DEFAULT NULL COMMENT '制单人单位编码',
     `CREATEDBYORGNAME` VARCHAR(270)  DEFAULT NULL COMMENT '制单人单位名称',
      PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='定时任务参数';


INSERT INTO T_CORE_AT_CONFIG (ID, AUDITTRAIL, CREATEDBYID, CREATEDBYNAME, CREATEDTIME, CREATEDBYORGID, CREATEDBYORGNAME)
VALUES ('T_LIMS_TASK_CONFIG_PARAM', '1', 'zhangsheng', 'zhangsheng', NOW(), 'L005', '五行业');

INSERT INTO T_CORE_AUDIT_CONFIG (ID, NAME, CATEGORY, AUDITABLE)
VALUES ('T_LIMS_TASK_CONFIG_PARAM', '定时任务参数', 'service', '1');
CALL INSERTI18N('T_LIMS_TASK_CONFIG_PARAM.SERVICE_NAME', '定时任务参数', '定时任务参数', 'zh-CN', '定时任务参数');
CALL INSERTI18N('T_LIMS_TASK_CONFIG_PARAM.ID', '定时任务参数的主键', '主键', 'zh-CN', '主键');
CALL INSERTI18N('T_LIMS_TASK_CONFIG_PARAM.CONFIGID', '定时任务参数的定时表达式ID', '定时表达式ID', 'zh-CN', '定时表达式ID');
CALL INSERTI18N('T_LIMS_TASK_CONFIG_PARAM.BUSINESSID', '定时任务参数的业务ID', '业务ID', 'zh-CN', '业务ID');
CALL INSERTI18N('T_LIMS_TASK_CONFIG_PARAM.BUSINESSNAME', '定时任务参数的业务名称', '业务名称', 'zh-CN', '业务名称');
CALL INSERTI18N('T_LIMS_TASK_CONFIG_PARAM.ENABLE', '定时任务参数的启用', '启用', 'zh-CN', '启用');
CALL INSERTI18N('T_LIMS_TASK_CONFIG_PARAM.CREATEDBYID', '定时任务参数的制单人编码', '制单人编码', 'zh-CN', '制单人编码');
CALL INSERTI18N('T_LIMS_TASK_CONFIG_PARAM.CREATEDBYNAME', '定时任务参数的制单人名称', '制单人名称', 'zh-CN', '制单人名称');
CALL INSERTI18N('T_LIMS_TASK_CONFIG_PARAM.CREATEDTIME', '定时任务参数的制单时间', '制单时间', 'zh-CN', '制单时间');
CALL INSERTI18N('T_LIMS_TASK_CONFIG_PARAM.CREATEDBYORGID', '定时任务参数的制单人单位编码', '制单人单位编码', 'zh-CN', '制单人单位编码');
CALL INSERTI18N('T_LIMS_TASK_CONFIG_PARAM.CREATEDBYORGNAME', '定时任务参数的制单人单位名称', '制单人单位名称', 'zh-CN', '制单人单位名称');
CALL INSERTI18N('BASEMODULE.TRM.QUALITYCONTROL.TASKPARAMS.MODAL.ADD', '新增', '新增', 'zh-CN', '新增');
CALL INSERTI18N('BASEMODULE.TRM.QUALITYCONTROL.TASKPARAMS.TAB.BASE_INFO', '基本信息', '基本信息', 'zh-CN', '基本信息');
CALL INSERTI18N('BASEMODULE.TRM.QUALITYCONTROL.TASKPARAMS.BUTTON.BUTTON', '按钮', '按钮', 'zh-CN', '按钮');
CALL INSERTI18N('BASEMODULE.TRM.QUALITYCONTROL.TASKPARAMS.TIP.TIP', '提示框', '提示框', 'zh-CN', '提示框');
CALL INSERTI18N('BASEMODULE.TRM.QUALITYCONTROL.TASKPARAMS.MODAL.MODAL', '对话框', '对话框', 'zh-CN', '对话框');


INSERT INTO T_CORE_TABLE (ID, AUDITABLE, ATTACHMENT)
VALUES ('T_LIMS_TASK_CONFIG_PARAM', '0', '0');


COMMIT;
ALTER TABLE T_LIMS_TASK_CONFIG_PARAM ADD REPEATNUM bigint NULL COMMENT '次数';
CALL INSERTI18N('T_LIMS_TASK_CONFIG_PARAM.REPEATNUM', '次数', '次数', 'zh-CN', '次数');
-- ----------------------------- 2023-12-05 add by zhangs------------end

-- ----------------------------- 2023-12-06 add by zhangs------------begin
ALTER TABLE T_LIMS_TASK ADD JUDGEREF varchar(1) NULL COMMENT '是否判定项';
delete from t_core_code where CODECATEGORYID ='specimenType';
INSERT INTO t_core_code (ID,CODENAME,CODECATEGORYID,REMARK,ORDERNO,VERSION,CREATEDBYID,CREATEDBYNAME,CREATEDTIME,LASTSUSPENDEDFLAG,LASTSUSPENDEDBYID,LASTSUSPENDEDBYNAME,LASTSUSPENDEDTIME,CODE,I18NCODE) VALUES
(20230426100,'标准样','specimenType',NULL,10,0,'ADMIN','系统管理员',NULL,'0',NULL,NULL,NULL,'标准样',NULL),
(20230426101,'自选样','specimenType',NULL,20,0,'ADMIN','系统管理员',NULL,'0',NULL,NULL,NULL,'自选样',NULL),
(20230426102,'标准溶液','specimenType',NULL,30,0,'ADMIN','系统管理员',NULL,'0',NULL,NULL,NULL,'标准溶液',NULL),
(2023110713461,'其他','specimenType',NULL,30,0,'ADMIN','系统管理员',NULL,'0',NULL,NULL,NULL,'其他',NULL);
-- ----------------------------- 2023-12-06 add by zhangs------------end

-- ----------------------------- 2023-12-06 add by gaozq------------begin
INSERT INTO T_CORE_CODE_CATEGORY(ID, CODECATEGORYNAME, CODECLASSID, REMARK, ORDERNO, VERSION, CREATEDBYID, CREATEDBYNAME, CREATEDTIME)
VALUES ('asynctask.execStatus', '执行状态', 'biz', NULL, 1, NULL, NULL, NULL, NULL);

INSERT INTO t_core_code (ID,CODENAME,CODECATEGORYID,REMARK,ORDERNO,VERSION,LASTSUSPENDEDFLAG,LASTSUSPENDEDBYID,LASTSUSPENDEDBYNAME,LASTSUSPENDEDTIME,CODE,CREATEDBYID,CREATEDBYNAME,CREATEDTIME)
VALUES(2022101119141,'待分配节点','asynctask.execStatus',NULL,1,0,'0',NULL,NULL,NULL,'pendingAssign','admin','管理员',NULL);
INSERT INTO t_core_code (ID,CODENAME,CODECATEGORYID,REMARK,ORDERNO,VERSION,LASTSUSPENDEDFLAG,LASTSUSPENDEDBYID,LASTSUSPENDEDBYNAME,LASTSUSPENDEDTIME,CODE,CREATEDBYID,CREATEDBYNAME,CREATEDTIME)
VALUES(2022101119142,'已分配节点','asynctask.execStatus',NULL,2,0,'0',NULL,NULL,NULL,'hasAssign','admin','管理员',NULL);
INSERT INTO t_core_code (ID,CODENAME,CODECATEGORYID,REMARK,ORDERNO,VERSION,LASTSUSPENDEDFLAG,LASTSUSPENDEDBYID,LASTSUSPENDEDBYNAME,LASTSUSPENDEDTIME,CODE,CREATEDBYID,CREATEDBYNAME,CREATEDTIME)
VALUES(2022101119143,'已入队列','asynctask.execStatus',NULL,3,0,'0',NULL,NULL,NULL,'joinedQueue','admin','管理员',NULL);
INSERT INTO t_core_code (ID,CODENAME,CODECATEGORYID,REMARK,ORDERNO,VERSION,LASTSUSPENDEDFLAG,LASTSUSPENDEDBYID,LASTSUSPENDEDBYNAME,LASTSUSPENDEDTIME,CODE,CREATEDBYID,CREATEDBYNAME,CREATEDTIME)
VALUES(2022101119144,'执行中','asynctask.execStatus',NULL,4,0,'0',NULL,NULL,NULL,'executing','admin','管理员',NULL);
INSERT INTO t_core_code (ID,CODENAME,CODECATEGORYID,REMARK,ORDERNO,VERSION,LASTSUSPENDEDFLAG,LASTSUSPENDEDBYID,LASTSUSPENDEDBYNAME,LASTSUSPENDEDTIME,CODE,CREATEDBYID,CREATEDBYNAME,CREATEDTIME)
VALUES(2022101119145,'执行失败','asynctask.execStatus',NULL,5,0,'0',NULL,NULL,NULL,'executeFail','admin','管理员',NULL);
INSERT INTO t_core_code (ID,CODENAME,CODECATEGORYID,REMARK,ORDERNO,VERSION,LASTSUSPENDEDFLAG,LASTSUSPENDEDBYID,LASTSUSPENDEDBYNAME,LASTSUSPENDEDTIME,CODE,CREATEDBYID,CREATEDBYNAME,CREATEDTIME)
VALUES(2022101119146,'执行成功','asynctask.execStatus',NULL,6,0,'0',NULL,NULL,NULL,'executeSuccess','admin','管理员',NULL);

ALTER TABLE t_lims_asynctask ADD TASKSERVERREGION varchar(100) NULL COMMENT '任务执行所在服务器区域';
ALTER TABLE t_lims_asynctask ADD EXECMAXCOUNT BIGINT NULL COMMENT '任务最大执行次数';
-- ----------------------------- 2023-12-06 add by gaozq------------end


-- ----------------------------- 2023-12-06 add by zhangs--------------begin

-- 建表语句

CREATE TABLE IF NOT EXISTS `T_LIMS_QUALITYCONTROL_EXCEPTION`(
     `ID` BIGINT NOT NULL COMMENT '主键',
     `TASKID` BIGINT DEFAULT NULL COMMENT '试验任务ID',
     `CREATEDBYID` VARCHAR(36)  DEFAULT NULL COMMENT '制单人编码',
     `CREATEDBYNAME` VARCHAR(60)  DEFAULT NULL COMMENT '制单人名称',
     `CREATEDTIME` DATETIME DEFAULT NULL COMMENT '制单时间',
     `CREATEDBYORGID` VARCHAR(36)  DEFAULT NULL COMMENT '制单人单位编码',
     `CREATEDBYORGNAME` VARCHAR(270)  DEFAULT NULL COMMENT '制单人单位名称',
     `PROCESSSTATUS` VARCHAR(36)  DEFAULT NULL COMMENT '流程状态',
     `QUALITYEXCEPTIONREASON` VARCHAR(270)  DEFAULT NULL COMMENT '异常原因',
      PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='质控异常';

INSERT INTO T_CORE_AT_CONFIG (ID, AUDITTRAIL, CREATEDBYID, CREATEDBYNAME, CREATEDTIME, CREATEDBYORGID, CREATEDBYORGNAME)
VALUES ('T_LIMS_QUALITYCONTROL_EXCEPTION', '1', 'zhangsheng', 'zhangsheng', NOW(), 'L005', '五行业');

INSERT INTO T_CORE_AUDIT_CONFIG (ID, NAME, CATEGORY, AUDITABLE)
VALUES ('T_LIMS_QUALITYCONTROL_EXCEPTION', '质控异常', 'service', '1');
CALL INSERTI18N('T_LIMS_QUALITYCONTROL_EXCEPTION.SERVICE_NAME', '质控异常', '质控异常', 'zh-CN', '质控异常');
CALL INSERTI18N('T_LIMS_QUALITYCONTROL_EXCEPTION.ID', '质控异常的主键', '主键', 'zh-CN', '主键');
CALL INSERTI18N('T_LIMS_QUALITYCONTROL_EXCEPTION.TASKID', '质控异常的试验任务ID', '试验任务ID', 'zh-CN', '试验任务ID');
CALL INSERTI18N('T_LIMS_QUALITYCONTROL_EXCEPTION.CREATEDBYID', '质控异常的制单人编码', '制单人编码', 'zh-CN', '制单人编码');
CALL INSERTI18N('T_LIMS_QUALITYCONTROL_EXCEPTION.CREATEDBYNAME', '质控异常的制单人名称', '制单人名称', 'zh-CN', '制单人名称');
CALL INSERTI18N('T_LIMS_QUALITYCONTROL_EXCEPTION.CREATEDTIME', '质控异常的制单时间', '制单时间', 'zh-CN', '制单时间');
CALL INSERTI18N('T_LIMS_QUALITYCONTROL_EXCEPTION.CREATEDBYORGID', '质控异常的制单人单位编码', '制单人单位编码', 'zh-CN', '制单人单位编码');
CALL INSERTI18N('T_LIMS_QUALITYCONTROL_EXCEPTION.CREATEDBYORGNAME', '质控异常的制单人单位名称', '制单人单位名称', 'zh-CN', '制单人单位名称');
CALL INSERTI18N('T_LIMS_QUALITYCONTROL_EXCEPTION.PROCESSSTATUS', '质控异常的流程状态', '流程状态', 'zh-CN', '流程状态');
CALL INSERTI18N('T_LIMS_QUALITYCONTROL_EXCEPTION.QUALITYEXCEPTIONREASON', '质控异常的异常原因', '异常原因', 'zh-CN', '异常原因');
CALL INSERTI18N('BASEMODULE.TRM.QUALITYCONTROL.EXCEPTIONS.MODAL.ADD', '新增', '新增', 'zh-CN', '新增');
CALL INSERTI18N('BASEMODULE.TRM.QUALITYCONTROL.EXCEPTIONS.TAB.BASE_INFO', '基本信息', '基本信息', 'zh-CN', '基本信息');
CALL INSERTI18N('BASEMODULE.TRM.QUALITYCONTROL.EXCEPTIONS.BUTTON.BUTTON', '按钮', '按钮', 'zh-CN', '按钮');
CALL INSERTI18N('BASEMODULE.TRM.QUALITYCONTROL.EXCEPTIONS.TIP.TIP', '提示框', '提示框', 'zh-CN', '提示框');
CALL INSERTI18N('BASEMODULE.TRM.QUALITYCONTROL.EXCEPTIONS.MODAL.MODAL', '对话框', '对话框', 'zh-CN', '对话框');


INSERT INTO T_CORE_TABLE (ID, AUDITABLE, ATTACHMENT)
VALUES ('T_LIMS_QUALITYCONTROL_EXCEPTION', '1', '0');

INSERT INTO T_CORE_MENU_EXT (ID, SERVICENAME, TABLENAME, TYPE, ENABLE)
VALUES ('11', '质控异常', 'T_LIMS_QUALITYCONTROL_EXCEPTION', 'audit_def', '1');

COMMIT;
INSERT INTO t_core_menu (ID,MENUNAME,HREF,PARENTID,ORDERNO,MENUINITNAME,LASTUPDATEDBYID,LASTUPDATEDBYNAME,LASTUPDATEDTIME,ICON,TODOICON,I18NCODE) VALUES
	 ('20231206006','质控异常管理',NULL,'9107',910702,'质控异常管理',NULL,NULL,NULL,'024.svg',NULL,NULL),
	 ('20231206007','质控异常','/secure/basemodule/trm/qualitycontrol/qualitycontrol-exceptions/page/edit-list?pageType=draft','20231206006',1,'质控异常',NULL,NULL,NULL,'024.svg','027.png',NULL),
	 ('20231206008','质控异常审核','/secure/basemodule/trm/qualitycontrol/qualitycontrol-exceptions/page/edit-list?pageType=audit','20231206006',2,'质控异常确认',NULL,NULL,NULL,'025.svg','028.png',NULL),
	 ('20231206009','质控异常查询','/secure/basemodule/trm/qualitycontrol/qualitycontrol-exceptions/page/edit-list?pageType=search','20231206006',3,'质控异常查询',NULL,NULL,NULL,'024.svg',NULL,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
	 (1274950828276128,'质控异常','20231206007','business','015.png','1','{"filterUser":"draft","processStatus_SB":"draft"}','com.sunwayworld.basemodule.trm.qualitycontrol.exception.service.impl.LimsQualitycontrolExceptionServiceImpl.selectPagination','1','zhangs','张胜','2023-12-06 15:36:56',NULL,NULL,NULL,'1',NULL);
-- ----------------------------- 2023-12-06 add by zhangs------------end
-- ----------------------------- 2023-12-07 add by gaozq------------end
update t_core_sequence set PATTERN = '[yyyy][mm][dd][nn]', JSONPARAM = null where id = 'T_LIMS_EQUIP_MAINTAIN_PLAN';

alter table T_LIMS_EQUIPT_MAINTAIN_ITEM add column EQUIPID BIGINT null comment '设备ID';
CALL INSERTI18N('T_LIMS_EQUIPT_MAINTAIN_ITEM.EQUIPID','设备ID','设备ID','zh-CN','设备ID');
-- ----------------------------- 2023-12-07 add by gaozq------------end
-- ----------------------------- 2023-12-07 add by gaozq--------------begin

-- 建表语句

CREATE TABLE IF NOT EXISTS `T_LIMS_PRODUCT_NAME_LIBRARY`(
                                                            `ID` BIGINT NOT NULL COMMENT '主键',
                                                            `PRODUCTNAME` VARCHAR(60)  DEFAULT NULL COMMENT '产品名称',
    `STATUS` VARCHAR(10)  DEFAULT NULL COMMENT '状态',
    `CREATEDBYID` VARCHAR(36)  DEFAULT NULL COMMENT '制单人编码',
    `CREATEDBYNAME` VARCHAR(60)  DEFAULT NULL COMMENT '制单人名称',
    `CREATEDTIME` DATETIME DEFAULT NULL COMMENT '制单时间',
    `CREATEDBYORGID` VARCHAR(36)  DEFAULT NULL COMMENT '制单人单位编码',
    `CREATEDBYORGNAME` VARCHAR(270)  DEFAULT NULL COMMENT '制单人单位名称',
    PRIMARY KEY (`ID`)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='产品名称库';

INSERT INTO T_CORE_AUDIT_CONFIG (ID, NAME, CATEGORY, AUDITABLE)
VALUES ('T_LIMS_PRODUCT_NAME_LIBRARY', '产品名称库', 'service', '1');
CALL INSERTI18N('T_LIMS_PRODUCT_NAME_LIBRARY.SERVICE_NAME', '产品名称库', '产品名称库', 'zh-CN', '产品名称库');
CALL INSERTI18N('T_LIMS_PRODUCT_NAME_LIBRARY.ID', '产品名称库的主键', '主键', 'zh-CN', '主键');
CALL INSERTI18N('T_LIMS_PRODUCT_NAME_LIBRARY.PRODUCTNAME', '产品名称库的产品名称', '产品名称', 'zh-CN', '产品名称');
CALL INSERTI18N('T_LIMS_PRODUCT_NAME_LIBRARY.STATUS', '产品名称库的状态', '状态', 'zh-CN', '状态');
CALL INSERTI18N('T_LIMS_PRODUCT_NAME_LIBRARY.CREATEDBYID', '产品名称库的制单人编码', '制单人编码', 'zh-CN', '制单人编码');
CALL INSERTI18N('T_LIMS_PRODUCT_NAME_LIBRARY.CREATEDBYNAME', '产品名称库的制单人名称', '制单人名称', 'zh-CN', '制单人名称');
CALL INSERTI18N('T_LIMS_PRODUCT_NAME_LIBRARY.CREATEDTIME', '产品名称库的制单时间', '制单时间', 'zh-CN', '制单时间');
CALL INSERTI18N('T_LIMS_PRODUCT_NAME_LIBRARY.CREATEDBYORGID', '产品名称库的制单人单位编码', '制单人单位编码', 'zh-CN', '制单人单位编码');
CALL INSERTI18N('T_LIMS_PRODUCT_NAME_LIBRARY.CREATEDBYORGNAME', '产品名称库的制单人单位名称', '制单人单位名称', 'zh-CN', '制单人单位名称');
CALL INSERTI18N('BASEMODULE.BASEDATA.PRODUCTNAMELIBRARYS.MODAL.ADD', '新增', '新增', 'zh-CN', '新增');
CALL INSERTI18N('BASEMODULE.BASEDATA.PRODUCTNAMELIBRARYS.TAB.BASE_INFO', '基本信息', '基本信息', 'zh-CN', '基本信息');
CALL INSERTI18N('BASEMODULE.BASEDATA.PRODUCTNAMELIBRARYS.BUTTON.BUTTON', '按钮', '按钮', 'zh-CN', '按钮');
CALL INSERTI18N('BASEMODULE.BASEDATA.PRODUCTNAMELIBRARYS.TIP.TIP', '提示框', '提示框', 'zh-CN', '提示框');
CALL INSERTI18N('BASEMODULE.BASEDATA.PRODUCTNAMELIBRARYS.MODAL.MODAL', '对话框', '对话框', 'zh-CN', '对话框');

INSERT INTO T_CORE_TABLE (ID, AUDITABLE, ATTACHMENT)
VALUES ('T_LIMS_PRODUCT_NAME_LIBRARY', '0', '0');


COMMIT;

-- ----------------------------- 2023-12-07 add by gaozq------------end

-- ----------------------------- 2023-12-07 add by gaozq--------------begin

-- 建表语句

CREATE TABLE IF NOT EXISTS `T_LIMS_PROJECT_NAME_LIBRARY`(
                                                            `ID` BIGINT NOT NULL COMMENT '主键',
                                                            `PROJECTNAME` VARCHAR(60)  DEFAULT NULL COMMENT '项目名称',
    `PROJECTUSERID` VARCHAR(60)  DEFAULT NULL COMMENT '项目负责人id',
    `PROJECTUSER` VARCHAR(60)  DEFAULT NULL COMMENT '项目负责人',
    `STATUS` VARCHAR(10)  DEFAULT NULL COMMENT '状态',
    `CREATEDBYID` VARCHAR(36)  DEFAULT NULL COMMENT '制单人编码',
    `CREATEDBYNAME` VARCHAR(60)  DEFAULT NULL COMMENT '制单人名称',
    `CREATEDTIME` DATETIME DEFAULT NULL COMMENT '制单时间',
    `CREATEDBYORGID` VARCHAR(36)  DEFAULT NULL COMMENT '制单人单位编码',
    `CREATEDBYORGNAME` VARCHAR(270)  DEFAULT NULL COMMENT '制单人单位名称',
    PRIMARY KEY (`ID`)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='项目名称库';

INSERT INTO T_CORE_AUDIT_CONFIG (ID, NAME, CATEGORY, AUDITABLE)
VALUES ('T_LIMS_PROJECT_NAME_LIBRARY', '项目名称库', 'service', '1');
CALL INSERTI18N('T_LIMS_PROJECT_NAME_LIBRARY.SERVICE_NAME', '项目名称库', '项目名称库', 'zh-CN', '项目名称库');
CALL INSERTI18N('T_LIMS_PROJECT_NAME_LIBRARY.ID', '项目名称库的主键', '主键', 'zh-CN', '主键');
CALL INSERTI18N('T_LIMS_PROJECT_NAME_LIBRARY.PROJECTNAME', '项目名称库的项目名称', '项目名称', 'zh-CN', '项目名称');
CALL INSERTI18N('T_LIMS_PROJECT_NAME_LIBRARY.PROJECTUSERID', '项目名称库的项目负责人id', '项目负责人id', 'zh-CN', '项目负责人id');
CALL INSERTI18N('T_LIMS_PROJECT_NAME_LIBRARY.PROJECTUSER', '项目名称库的项目负责人', '项目负责人', 'zh-CN', '项目负责人');
CALL INSERTI18N('T_LIMS_PROJECT_NAME_LIBRARY.STATUS', '项目名称库的状态', '状态', 'zh-CN', '状态');
CALL INSERTI18N('T_LIMS_PROJECT_NAME_LIBRARY.CREATEDBYID', '项目名称库的制单人编码', '制单人编码', 'zh-CN', '制单人编码');
CALL INSERTI18N('T_LIMS_PROJECT_NAME_LIBRARY.CREATEDBYNAME', '项目名称库的制单人名称', '制单人名称', 'zh-CN', '制单人名称');
CALL INSERTI18N('T_LIMS_PROJECT_NAME_LIBRARY.CREATEDTIME', '项目名称库的制单时间', '制单时间', 'zh-CN', '制单时间');
CALL INSERTI18N('T_LIMS_PROJECT_NAME_LIBRARY.CREATEDBYORGID', '项目名称库的制单人单位编码', '制单人单位编码', 'zh-CN', '制单人单位编码');
CALL INSERTI18N('T_LIMS_PROJECT_NAME_LIBRARY.CREATEDBYORGNAME', '项目名称库的制单人单位名称', '制单人单位名称', 'zh-CN', '制单人单位名称');
CALL INSERTI18N('BASEMODULE.BASEDATA.PROJECTNAMELIBRARYS.MODAL.ADD', '新增', '新增', 'zh-CN', '新增');
CALL INSERTI18N('BASEMODULE.BASEDATA.PROJECTNAMELIBRARYS.TAB.BASE_INFO', '基本信息', '基本信息', 'zh-CN', '基本信息');
CALL INSERTI18N('BASEMODULE.BASEDATA.PROJECTNAMELIBRARYS.BUTTON.BUTTON', '按钮', '按钮', 'zh-CN', '按钮');
CALL INSERTI18N('BASEMODULE.BASEDATA.PROJECTNAMELIBRARYS.TIP.TIP', '提示框', '提示框', 'zh-CN', '提示框');
CALL INSERTI18N('BASEMODULE.BASEDATA.PROJECTNAMELIBRARYS.MODAL.MODAL', '对话框', '对话框', 'zh-CN', '对话框');

INSERT INTO T_CORE_TABLE (ID, AUDITABLE, ATTACHMENT)
VALUES ('T_LIMS_PROJECT_NAME_LIBRARY', '0', '0');


COMMIT;

INSERT INTO t_core_admin_choose_config (ID,NAME,TITLE,CATEGORY,URL,WIDTH) VALUES
(20231207001,'产品名称库','产品名称库','productNameLibraryChoose','/secure/basemodule/basedata/product-name-librarys/page/choose-list','80%'),
(20231207002,'项目名称库','项目名称库','projectNameLibraryChoose','/secure/basemodule/basedata/project-name-librarys/page/choose-list','80%');
-- ----------------------------- 2023-12-07 add by gaozq------------end

-- ----------------------------- 2023-12-07 add by zhangs------------begin
ALTER TABLE t_lims_tm_analyst ADD USEBALANCE varchar(1) NULL COMMENT '是否使用天平';
CALL INSERTI18N('T_LIMS_TM_ANALYST.USEBALANCE','使用天平','使用天平','zh-CN','使用天平');
ALTER TABLE t_lims_result ADD USEBALANCE varchar(1) NULL COMMENT '是否使用天平';
update t_lims_result set useBalance='1' where ANALYSTNAME like '%质量%';
-- ----------------------------- 2023-12-07 add by zhangs------------end

-- ----------------------------- 2023-12-08 add by zhangs------------begin
ALTER TABLE t_lims_order DROP INDEX T_LIMS_ORDER_SAMPLECODE_IDX;
CREATE INDEX t_lims_order_FOLDERID_IDX USING BTREE ON t_lims_order (FOLDERID);
ALTER TABLE t_lims_order ADD BALANCEEPTID bigint NULL COMMENT '天平设备';
ALTER TABLE t_lims_order ADD BALANCEEPTCODE varchar(100) NULL COMMENT '天平设备编码';
ALTER TABLE t_lims_order ADD BALANCEEPTNAME varchar(100) NULL COMMENT '天平设备名称';
INSERT INTO t_core_code (ID,CODENAME,CODECATEGORYID,REMARK,ORDERNO,VERSION,CREATEDBYID,CREATEDBYNAME,CREATEDTIME,LASTSUSPENDEDFLAG,LASTSUSPENDEDBYID,LASTSUSPENDEDBYNAME,LASTSUSPENDEDTIME,CODE,I18NCODE) VALUES
 (202312081,'温湿度数据','equiptInstructionType',NULL,6,0,'admin','系统管理员',NULL,'0',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
 (202312082,'天平数据','equiptInstructionType',NULL,6,0,'admin','系统管理员',NULL,'0',NULL,NULL,NULL,'天平数据',NULL);

INSERT INTO t_core_admin_choose_config (ID,NAME,TITLE,CATEGORY,URL,WIDTH) VALUES
(202312081516,'绑定辅助设备','绑定辅助设备','resultChooseBindEpt','/secure/basemodule/business/results/page/result-choose-bindept','80%');
ALTER TABLE t_lims_order ADD BALANCEUSERID varchar(100) NULL COMMENT '天平测试人';
ALTER TABLE t_lims_order ADD BALANCEUSERNAME varchar(100) NULL COMMENT '天平测试人';
ALTER TABLE T_LIMS_RESULT ADD HELPEPTIDS varchar(100) NULL COMMENT '辅助设备';
ALTER TABLE T_LIMS_RESULT ADD HELPEPTCODES varchar(200) NULL COMMENT '辅助设备';
ALTER TABLE T_LIMS_RESULT ADD HELFPEPTNAMES varchar(200) NULL COMMENT '辅助设备';
CALL INSERTI18N('T_LIMS_RESULT.HELPEPTIDS','辅助设备','辅助设备','zh-CN','辅助设备');

ALTER TABLE T_LIMS_RESULT ADD HELPEPTUSERNAME varchar(100) NULL COMMENT '辅助设备测试人';
ALTER TABLE T_LIMS_RESULT ADD HELPEPTUSERID varchar(100) NULL COMMENT '辅助设备测试人';
CALL INSERTI18N('T_LIMS_RESULT.HELPEPTUSERNAME','辅助设备测试人','辅助设备测试人','zh-CN','辅助设备测试人');
-- ----------------------------- 2023-12-08 add by zhangs------------end
-- ----------------------------- 2023-12-11 add by gaozq------------begin
alter table T_LIMS_EQUIPT_FILE_ACQ_CONFIG add column REMARKS VARCHAR(300) null comment '备注';
CALL INSERTI18N('T_LIMS_EQUIPT_FILE_ACQ_CONFIG.REMARKS','备注','备注','zh-CN','备注');

alter table T_LIMS_FILE_DATA_COLLECT add column TESTTYPE VARCHAR(60) null comment '检测项目类型';
CALL INSERTI18N('T_LIMS_FILE_DATA_COLLECT.TESTTYPE','检测项目类型','检测项目类型','zh-CN','检测项目类型');

alter table T_LIMS_ORDER add column KEEPLOCATION VARCHAR(120) null comment '留样位置';
CALL INSERTI18N('T_LIMS_ORDER.KEEPLOCATION','留样位置','留样位置','zh-CN','留样位置');
-- ----------------------------- 2023-12-11 add by gaozq------------end

-- ----------------------------- 2023-12-11 add by zhangs------------begin
INSERT INTO t_core_menu (ID,MENUNAME,HREF,PARENTID,ORDERNO,MENUINITNAME,LASTUPDATEDBYID,LASTUPDATEDBYNAME,LASTUPDATEDTIME,ICON,TODOICON,I18NCODE) VALUES
 ('2023121114051','综合报告',NULL,'1002',6,'综合报告',NULL,NULL,NULL,'013.svg',NULL,NULL),
 ('2023121114052','综合报告编制','/secure/basemodule/business/test/reports/page/edit-list?pageType=reportDraft','2023121114051',1,'综合报告编制',NULL,NULL,NULL,'026.svg',NULL,NULL),
 ('2023121114053','综合报告审核','/secure/basemodule/business/test/reports/page/edit-list?pageType=reportAudit','2023121114051',2,'综合报告审核',NULL,NULL,NULL,'026.svg',NULL,NULL),
 ('2023121114054','综合报告批准','/secure/basemodule/business/test/reports/page/edit-list?pageType=reportApprove','2023121114051',3,'综合报告批准',NULL,NULL,NULL,'026.svg',NULL,NULL),
 ('2023121114055','综合报告查询','/secure/basemodule/business/test/reports/page/edit-list?pageType=reportSearch','2023121114051',4,'综合报告查询',NULL,NULL,NULL,'016.svg',NULL,NULL);

ALTER TABLE t_lims_result ADD SORTER bigint NULL COMMENT '序号';
update t_lims_result s inner join t_lims_tm_analyst t on t.id=s.ANALYSTID
set s.SORTER =t.SORTER ;
-- ----------------------------- 2023-12-11 add by zhangs------------end

-- ----------------------------- 2023-12-12 add by zhangs------------begin
ALTER TABLE t_lims_env_monitor_frequency ADD ROOMID bigint NULL COMMENT '房间ID';
-- ----------------------------- 2023-12-12 add by zhangs------------end

-- ----------------------------- 2023-12-13 add by zhangs------------begin
delete  from t_core_menu tcm where MENUNAME='环境监控频率';
ALTER TABLE t_lims_env_monitor ADD ROOMID bigint NULL COMMENT '房间ID';
ALTER TABLE t_lims_env_monitor ADD ROOMNAME varchar(100) NULL COMMENT '房间';
INSERT INTO t_core_admin_choose_config (ID,NAME,TITLE,CATEGORY,URL,WIDTH) VALUES
(2023121301,'环境区域','环境区域','envMonitorAreaChoose','/secure/basemodule/trm/env-monitor-areas/page/choose-list','80%');
ALTER TABLE t_lims_env_monitor ADD LABID varchar(100) NULL COMMENT '检测组';
ALTER TABLE T_LIMS_ENV_MONITOR_AREA ADD LABID varchar(100) NULL COMMENT '检测组';
CALL INSERTI18N('T_LIMS_ENV_MONITOR.LABID','检测组','检测组','zh-CN','检测组');
ALTER TABLE t_lims_env_monitor ADD UPPERLIMIT varchar(100) NULL COMMENT '温度上限';
ALTER TABLE t_lims_env_monitor ADD LOWERLIMIT varchar(100) NULL COMMENT '温度下限';
ALTER TABLE t_lims_env_monitor ADD UPPERHUMIDITYLIMIT varchar(100) NULL COMMENT '湿度上限';
ALTER TABLE t_lims_env_monitor ADD LOWERHUMIDITYLIMIT varchar(100) NULL COMMENT '湿度下限';
delete from t_core_menu where MENUNAME='温湿度监控';
INSERT INTO t_core_schedule_task (ID,TASKNAME,SERVICENAME,METHODNAME,REMARK,CREATEDBYID,CREATEDBYNAME,CREATEDTIME,CREATEDBYORGID,CREATEDBYORGNAME,`TYPE`,IFEXECUTABLESERVICENAME,IFEXECUTABLEMETHODNAME) VALUES
('scheduleInsertEnvMonitorApply','环境温湿度点检_每天一次','com.sunwayworld.basemodule.trm.environmentrecord.service.LimsEnvMonitorService','scheduleInsertEnvMonitorApply',NULL,NULL,NULL,NULL,NULL,NULL,'service',NULL,NULL);
ALTER TABLE t_lims_env_monitor ADD EPTID bigint NULL COMMENT '温湿度仪';
ALTER TABLE t_lims_env_monitor ADD EPTCODE varchar(100) NULL COMMENT '温湿度仪';
ALTER TABLE t_lims_env_monitor ADD EPTNAME varchar(100) NULL COMMENT '温湿度仪';
ALTER TABLE T_LIMS_ENV_MONITOR_AREA ADD EPTID bigint NULL COMMENT '温湿度仪';
ALTER TABLE T_LIMS_ENV_MONITOR_AREA ADD EPTCODE varchar(100) NULL COMMENT '温湿度仪';
ALTER TABLE T_LIMS_ENV_MONITOR_AREA ADD EPTNAME varchar(100) NULL COMMENT '温湿度仪';
CALL INSERTI18N('T_LIMS_ENV_MONITOR_AREA.EPTID','温湿度仪','温湿度仪','zh-CN','温湿度仪');
INSERT INTO t_core_schedule_task (ID,TASKNAME,SERVICENAME,METHODNAME,REMARK,CREATEDBYID,CREATEDBYNAME,CREATEDTIME,CREATEDBYORGID,CREATEDBYORGNAME,`TYPE`,IFEXECUTABLESERVICENAME,IFEXECUTABLEMETHODNAME) VALUES
('uppdateEnvAcqDataByEnvMonitorApply','环境温湿度点检获取温湿度数据_每分钟','com.sunwayworld.basemodule.trm.environmentrecord.service.LimsEnvMonitorService','sheduleUpdateEnvAcqDataByEnvMonitorApply',NULL,NULL,NULL,NULL,NULL,NULL,'service',NULL,NULL);
ALTER TABLE  t_lims_result ADD DEFAULTRESULT varchar(100) NULL COMMENT '默认结果';
update t_lims_result s inner join t_lims_tm_analyst t on t.id=s.ANALYSTID
set s.DEFAULTRESULT  =t.DEFAULTRESULT;
-- ----------------------------- 2023-12-13 add by zhangs------------end

-- ----------------------------- 2023-12-13 add by zhangs------------begin
ALTER TABLE t_lims_specimen ADD FOLDERLIMIT bigint NULL COMMENT '测试数量';
CALL INSERTI18N('T_LIMS_SPECIMEN.FOLDERLIMIT','测试数量','测试数量','zh-CN','测试数量');
ALTER TABLE t_lims_specimen ADD CURFOLDERCOUNT bigint NULL COMMENT '已测试数量';
CALL INSERTI18N('T_LIMS_SPECIMEN.CURFOLDERCOUNT','已测试数量','已测试数量','zh-CN','已测试数量');
-- ----------------------------- 2023-12-13 add by zhangs------------end
-- ----------------------------- 2023-12-14 add by gaozq------------end
CALL INSERTI18N('T_LIMS_EQUIPT.POINTCHECKSTATUS', '设备点检状态', '设备点检状态', 'zh-CN', '设备点检状态');

-- ----------------------------- 2023-12-14 add by gaozq------------end

-- ----------------------------- 2023-12-14 add by zhangs------------begin
ALTER TABLE t_lims_specimen_item ADD COV varchar(36) NULL COMMENT 'COV';
ALTER TABLE t_lims_task ADD MEANVALUE varchar(36) NULL COMMENT 'mean值';
ALTER TABLE t_lims_task ADD PVALUE varchar(36) NULL COMMENT 'σ值';
ALTER TABLE t_lims_task ADD COV varchar(36) NULL COMMENT 'cov';
ALTER TABLE t_lims_specimen ADD FOLDERGROUP bigint NULL COMMENT '委托单质控计划组';
ALTER TABLE t_lims_folder  ADD FOLDERGROUP bigint NULL COMMENT '委托单质控计划组';
-- ----------------------------- 2023-12-14 add by zhangs------------end
-- ----------------------------- 2023-12-14 add by gaozq------------end
CALL INSERTI18N('T_LIMS_EQUIPT.POINTCHECKSTATUS', '设备点检状态', '设备点检状态', 'zh-CN', '设备点检状态');

alter table T_LIMS_MATERIAL add column ESTIMATEDARRIVALDATE DATETIME null comment '预计到货日期';
alter table T_LIMS_MATERIAL add column DELIVERYDATE DATETIME null comment '到货日期';
alter table T_LIMS_MATERIAL add column PURCHASEDATE DATETIME null comment '请购日期';
alter table T_LIMS_MATERIAL add column ISARRIVAL VARCHAR(12) null comment '是否到货';
alter table T_LIMS_MATERIAL add column MATERIALCATEGORY VARCHAR(60) null comment '耗材分类';
CALL INSERTI18N('T_LIMS_MATERIAL.ESTIMATEDARRIVALDATE','预计到货日期','预计到货日期','zh-CN','预计到货日期');
CALL INSERTI18N('T_LIMS_MATERIAL.DELIVERYDATE','到货日期','到货日期','zh-CN','到货日期');
CALL INSERTI18N('T_LIMS_MATERIAL.PURCHASEDATE','请购日期','请购日期','zh-CN','请购日期');
CALL INSERTI18N('T_LIMS_MATERIAL.ISARRIVAL','是否到货','是否到货','zh-CN','是否到货');
CALL INSERTI18N('T_LIMS_MATERIAL.MATERIALCATEGORY','耗材分类','耗材分类','zh-CN','耗材分类');

alter table T_LIMS_MATERIAL_RECORD add column APPLYTIME DATETIME null comment '申请时间';
alter table T_LIMS_MATERIAL_RECORD add column APPLYUSER VARCHAR(60) null comment '申请人';
CALL INSERTI18N('T_LIMS_MATERIAL_RECORD.APPLYTIME','申请时间','申请时间','zh-CN','申请时间');
CALL INSERTI18N('T_LIMS_MATERIAL_RECORD.APPLYUSER','申请人','申请人','zh-CN','申请人');

INSERT INTO t_core_code (id,codename,codecategoryid,remark,orderno,version,createdbyid,createdbyname,createdtime,lastsuspendedflag,lastsuspendedbyid,lastsuspendedbyname,lastsuspendedtime,code,i18ncode) VALUES
(20231215001,'压实','acqExector',NULL,NULL,NULL,'admin','系统管理员1','2023-12-15 17:00:00.000','0',NULL,NULL,NULL,'YaShiAcqExector',NULL);

-- ----------------------------- 2023-12-14 add by gaozq------------end


-- ----------------------------- 2023-12-14 add by zhangs------------begin
update t_lims_test set itemSorter=1;
ALTER TABLE t_lims_task ADD ITEMSORTER bigint NULL COMMENT '项目排序';
update t_lims_task set ITEMSORTER=1;
ALTER TABLE T_LIMS_TEST_OUTLINE_DETAIL  ADD ITEMSORTER bigint NULL COMMENT '项目排序';
update T_LIMS_TEST_OUTLINE_DETAIL set ITEMSORTER=1;
ALTER TABLE T_LIMS_SPECIMEN_ITEM  ADD ITEMSORTER bigint NULL COMMENT '项目排序';
update T_LIMS_SPECIMEN_ITEM set ITEMSORTER=1;
-- ----------------------------- 2023-12-14 add by zhangs------------end
-- ----------------------------- 2023-12-19 add by gaozq------------end
alter table T_LIMS_EQUIPT_MAINTAIN_ITEM add column EQUIPTCODE VARCHAR(600) null comment '设备编号';
alter table T_LIMS_EQUIPT_MAINTAIN_ITEM add column EQUIPTNAME VARCHAR(600) null comment '设备名称';
CALL INSERTI18N('T_LIMS_EQUIPT_MAINTAIN_ITEM.EQUIPTCODE','设备编号','设备编号','zh-CN','设备编号');
CALL INSERTI18N('T_LIMS_EQUIPT_MAINTAIN_ITEM.EQUIPTNAME','设备名称','设备名称','zh-CN','设备名称');

alter table T_LIMS_MATERIAL add column MATERIALCODE VARCHAR(60) null comment '物料编号';
CALL INSERTI18N('T_LIMS_MATERIAL.MATERIALCODE','物料编号','物料编号','zh-CN','物料编号');
-- ----------------------------- 2023-12-19 add by gaozq------------end

-- ----------------------------- 2023-12-19 add by zhangs------------begin
ALTER TABLE t_lims_task ADD SIGMASTATUS varchar(32) NULL COMMENT 'σ超上限异常';
-- ----------------------------- 2023-12-19 add by zhangs------------end
-- ----------------------------- 2023-12-20 add by gaozq------------end
alter table T_LIMS_ENV_MONITOR_RECORDS add column ACTUALDATE DATETIME null comment '实际填写时间';
CALL INSERTI18N('T_LIMS_ENV_MONITOR_RECORDS.ACTUALDATE','实际填写时间','实际填写时间','zh-CN','实际填写时间');

-- ----------------------------- 2023-12-20 add by gaozq------------end

-- ----------------------------- 2023-12-20 add by zhangs------------begin
ALTER TABLE t_lims_task ADD CALMEAN varchar(36) NULL;
ALTER TABLE t_lims_task ADD CALPVALUE varchar(36) NULL;
ALTER TABLE t_lims_task ADD CALCOV varchar(36) NULL;
CALL INSERTI18N('T_LIMS_TASK.CALMEAN','mean(试验)','mean(试验)','zh-CN','mean(试验)');
CALL INSERTI18N('T_LIMS_TASK.CALPVALUE','σ(试验)','σ(试验)','zh-CN','σ(试验)');
CALL INSERTI18N('T_LIMS_TASK.CALCOV','cov(试验)','cov(试验)','zh-CN','cov(试验)');
-- ----------------------------- 2023-12-20 add by zhangs------------end
-- ----------------------------- 2023-12-21 add by gaozq------------begin
alter table T_LIMS_MATERIAL_RECORD add column INPUTDATE DATETIME null comment '入库日期';
alter table T_LIMS_MATERIAL_RECORD add column TESTGROUP VARCHAR(60) null comment '领用检测组';
alter table T_LIMS_MATERIAL_RECORD add column MANUFACTORY VARCHAR(60) null comment '供应商';
alter table T_LIMS_MATERIAL_RECORD add column OUTDATE DATETIME null comment '出库日期';

CALL INSERTI18N('T_LIMS_MATERIAL_RECORD.INPUTDATE','入库日期','入库日期','zh-CN','入库日期');
CALL INSERTI18N('T_LIMS_MATERIAL_RECORD.TESTGROUP','领用检测组','领用检测组','zh-CN','领用检测组');
CALL INSERTI18N('T_LIMS_MATERIAL_RECORD.MANUFACTORY','供应商','供应商','zh-CN','供应商');
CALL INSERTI18N('T_LIMS_MATERIAL_RECORD.OUTDATE','出库日期','出库日期','zh-CN','出库日期');
-- ----------------------------- 2023-12-21 add by gaozq------------end

-- ----------------------------- 2023-12-27 add by zhangs------------begin
CREATE TABLE IF NOT EXISTS `T_LIMS_DBEXTRACT_CONFIG`(
     `ID` BIGINT NOT NULL COMMENT '主键',
     `EXTRACTID` BIGINT DEFAULT NULL COMMENT '规则ID',
     `SQL` VARCHAR(2048)  DEFAULT NULL COMMENT 'sql',
     `ARGS` VARCHAR(1024)  DEFAULT NULL COMMENT '参数',
     `ENABLE` VARCHAR(12)  DEFAULT NULL COMMENT '停启用',
     `RESOLVEFUNCTION` VARCHAR(240)  DEFAULT NULL COMMENT '数据再处理Service',
      PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='数据源SQL配置';

CALL INSERTI18N('T_LIMS_DBEXTRACT.SERVICE_NAME', 'DB数据源抽取规则', 'DB数据源抽取规则', 'zh-CN', 'DB数据源抽取规则');
CALL INSERTI18N('T_LIMS_DBEXTRACT.ID', 'DB数据源抽取规则的主键', '主键', 'zh-CN', '主键');
CALL INSERTI18N('T_LIMS_DBEXTRACT.NAME', 'DB数据源抽取规则的名称', '名称', 'zh-CN', '名称');
CALL INSERTI18N('T_LIMS_DBEXTRACT.REMARK', 'DB数据源抽取规则的备注', '备注', 'zh-CN', '备注');
CALL INSERTI18N('T_LIMS_DBEXTRACT_CONFIG.SERVICE_NAME', '数据源SQL配置', '数据源SQL配置', 'zh-CN', '数据源SQL配置');
CALL INSERTI18N('T_LIMS_DBEXTRACT_CONFIG.ID', '数据源SQL配置的主键', '主键', 'zh-CN', '主键');
CALL INSERTI18N('T_LIMS_DBEXTRACT_CONFIG.EXTRACTID', '数据源SQL配置的规则ID', '规则ID', 'zh-CN', '规则ID');
CALL INSERTI18N('T_LIMS_DBEXTRACT_CONFIG.SQL', '数据源SQL配置的sql', 'sql', 'zh-CN', 'sql');
CALL INSERTI18N('T_LIMS_DBEXTRACT_CONFIG.ARGS', '数据源SQL配置的参数', '参数', 'zh-CN', '参数');
CALL INSERTI18N('T_LIMS_DBEXTRACT_CONFIG.ENABLE', '数据源SQL配置的停启用', '停启用', 'zh-CN', '停启用');
CALL INSERTI18N('T_LIMS_DBEXTRACT_CONFIG.RESOLVEFUNCTION', '数据源SQL配置的数据再处理Service', '数据再处理Service', 'zh-CN', '数据再处理Service');
CALL INSERTI18N('BASELINE.MODULE.DBEXTRACTS.MODAL.ADD', '新增', '新增', 'zh-CN', '新增');
CALL INSERTI18N('BASELINE.MODULE.DBEXTRACTS.TAB.BASE_INFO', '基本信息', '基本信息', 'zh-CN', '基本信息');
CALL INSERTI18N('BASELINE.MODULE.DBEXTRACTS.BUTTON.BUTTON', '按钮', '按钮', 'zh-CN', '按钮');
CALL INSERTI18N('BASELINE.MODULE.DBEXTRACTS.TIP.TIP', '提示框', '提示框', 'zh-CN', '提示框');
CALL INSERTI18N('BASELINE.MODULE.DBEXTRACTS.MODAL.MODAL', '对话框', '对话框', 'zh-CN', '对话框');
CALL INSERTI18N('T_LIMS_DBCONN.URL', '数据库链接配置的连接字符串', '连接字符串', 'zh-CN', '连接字符串');

CREATE TABLE IF NOT EXISTS `T_LIMS_DBEXTRACT`(
     `ID` BIGINT NOT NULL COMMENT '主键',
     `NAME` VARCHAR(120)  DEFAULT NULL COMMENT '名称',
     `REMARK` VARCHAR(240)  DEFAULT NULL COMMENT '备注',
      PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='DB数据源抽取规则';
INSERT INTO T_CORE_ADMIN_CHOOSE_CONFIG
(ID, NAME, TITLE, CATEGORY, URL, WIDTH)
VALUES(2022011818122, '抽取规则选择', '抽取规则选择', 'dbExtractConfig', '/secure/basemodule/common/eptstorage/dbextract-configs/page/choose-list', '60%');
CALL INSERTI18N('T_LIMS_DBEXTRACT_CONFIG.NAME', '数据源SQL配置的名称', '名称', 'zh-CN', '名称');
CALL INSERTI18N('T_LIMS_DBEXTRACT_CONFIG.REMARK', '数据源SQL配置的备注', '备注', 'zh-CN', '备注');
alter table T_LIMS_DBEXTRACT_CONFIG add REMARK VARCHAR(240);
alter table T_LIMS_DBEXTRACT_CONFIG add NAME VARCHAR(120);
ALTER TABLE t_lims_folder ADD MOMSIMPLINGINSPECTIONGID bigint NULL COMMENT 'mom系统取样任务单ID';
INSERT INTO t_core_schedule_task (ID,TASKNAME,SERVICENAME,METHODNAME,REMARK,CREATEDBYID,CREATEDBYNAME,CREATEDTIME,CREATEDBYORGID,CREATEDBYORGNAME,`TYPE`,IFEXECUTABLESERVICENAME,IFEXECUTABLEMETHODNAME) VALUES
('folderCreateByMomSys','MOM系统建单','com.sunwayworld.basemodule.business.test.folder.service.LimsFolderService','folderCreateByMomSys',NULL,NULL,NULL,NULL,NULL,NULL,'service',NULL,NULL);

-- MOM系统执行开始
ALTER TABLE d_qa_simpling_inspection ADD folderId bigint NULL COMMENT 'LIMS委托单ID';
-- MOM系统执行结束
-- ----------------------------- 2023-12-27 add by zhangs------------end

-- ----------------------------- 2023-12-27 add by zhangs------------begin
ALTER TABLE t_lims_task ADD SIMPLINGITEMGID bigint NULL COMMENT 'MOM系统取样任务明细ID';
ALTER TABLE t_lims_test ADD MOMITEMCODE varchar(100) NULL COMMENT 'mom系统中的项目编号';

ALTER TABLE t_lims_task MODIFY COLUMN SIMPLINGITEMGID bigint(20) unsigned NULL COMMENT 'MOM系统取样任务明细ID';

ALTER TABLE t_lims_folder MODIFY MOMSIMPLINGINSPECTIONGID bigint(20) unsigned NULL COMMENT 'mom系统取样任务单ID';
-- ----------------------------- 2023-12-27 add by zhangs------------end

-- ----------------------------- 2023-12-28 add by zhangs------------begin
ALTER TABLE t_lims_test ADD CONSTRAINT t_lims_test_un_mom UNIQUE KEY (MOMITEMCODE);
INSERT INTO t_lims_dbconn (ID,URL,USERNAME,PASSWORD,REMARK,ORGID,ORGNAME,CREATEDBYID,CREATEDBYNAME,CREATEDTIME,CREATEDBYORGID,CREATEDBYORGNAME,SOURCENAME) VALUES
	 (1,'jdbc:mysql://172.16.156.24:3306/mom?serverTimezone=GMT%2B8&useSSL=false','root','sunway',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'mom');
INSERT INTO t_lims_dbextract (ID,NAME,REMARK) VALUES
	 (1289770010698624,'mom',NULL);
INSERT INTO t_lims_dbextract_config (ID,EXTRACTID,`SQL`,ARGS,ENABLE,RESOLVEFUNCTION,REMARK,NAME) VALUES
	 (1289772339544960,1289770010698624,'select * from d_qa_simpling_inspection
where status = ''FINISHED'' and receviveuserid is not null and inspectType in(''IQC'', ''IPQC'', ''FQC'') and folderId is null limit 5',NULL,'1',NULL,NULL,'查询取样单'),
	 (1289776796818560,1289770010698624,'select
	sitem.*
from
	d_qa_simpling_item sitem,
	d_qa_simpling_inspection sim
where
	sim.gid = sitem.simplingGid
	and sim.code = ''#{code}''','code','1',NULL,NULL,'查询取样任务明细'),
	 (1289778111249536,1289770010698624,'SELECT d.* from d_qa_incoming_inspection d, d_qa_simpling_inspection sim
 where d.simplingcode=sim.code and  sim.code= ''#{code}''','code','1',NULL,NULL,'IQC检验任务'),
	 (1289780926962816,1289770010698624,'SELECT d.* from d_qa_process_inspection d, d_qa_simpling_inspection sim
 where d.gid =sim.inspectTaskGid
 and sim.code=''#{code}''','code','1',NULL,NULL,'IPQC检验任务'),
	 (1289782090775680,1289770010698624,'SELECT d.* from d_qa_finalized_inspection d, d_qa_simpling_inspection sim
 where d.gid =sim.inspectTaskGid
 and sim.code=''#{code}''','code','1',NULL,NULL,'FQC检验任务');

update t_core_audit_config set AUDITABLE=0;
-- ----------------------------- 2023-12-28 add by zhangs------------end
-- ----------------------------- 2023-12-28 add by gaozq------------begin
CALL INSERTI18N('CORE.MODULE.SCRIPT.TESTS.TIP.SCRIPT_ERROR', '脚本错误', '脚本错误', 'zh-CN', '脚本错误');
alter table t_lims_material
    modify MODEL varchar(120) null comment '规格型号';
-- ----------------------------- 2023-12-28 add by gaozq------------end
