SELECT COUNT(1) FROM T_PORTAL_RPA_SCENE;
CREATE OR REPLACE FUNCTION getName() RETURN char(50)
as
declare
firstName varchar2(300) default '艺博捷诚辉华润耀邦远万晟诺顿启明丰缘捷飞驰阳浩美永利怡润财务员工报表资金智能物联互联机器设备公车人员游戏产品培训呼叫质量机械';
gongneng varchar2(265) default '管控监控审计报账中心汇总管理风险控制运营监管监督制度筹集准备生产销售分配转移质检旋吉皇源啸创鸿泰格力美的利晟尼佳能源国网南网电商佳洲';
projectName varchar2(10) default '';
begin
set projectName := '';
set projectName := concat(projectName,SUBSTR( firstName, floor( 0+ rand( ) * 62 ), 2 ),SUBSTR( gongneng, floor( 0+ rand( ) * 64 ), 2 ));
RETURN trim(projectName);
END;
CREATE OR REPLACE PROCEDURE INSERT_T_PORTAL_RPA_SCENE(tempn IN INT)
AS
declare
Introduction varchar2(1000) DEFAULT '通过发票交收终端实现对物资发票、销货清单的自动收取,并在交收过程中对物资发票的查验及业务数据校验';
maindesc varchar2(1000) DEFAULT '保证金到款认领制证机器人';
Mainintroduce varchar2(200) DEFAULT '通过RPA机器人自动完成保证金凭证审批。';
news varchar2(1000) DEFAULT '1. 机器人登录ERP,进入SAP业务工作台;';
TEMPSIZE varchar2(36) DEFAULT '';
SORT varchar2(36) DEFAULT '其他类';
SUPPLIER varchar2(50) DEFAULT 'XXXXXX有限公司';
VERSION varchar2(10) DEFAULT 'V1.0.1';
SORTNUM NUMBER(8,0) DEFAULT 0;
APPSIZE varchar2(36) DEFAULT '100KB';
UPLOADCOMP varchar2(100) DEFAULT 'XXXXX有限公司';
UPLOADER varchar2(50) DEFAULT 'WANGKUI';
VERSIONDESCRIPTION varchar2(1000) DEFAULT '生日信息收集机器人4';
UPLOADCOMPID varchar2(50) DEFAULT '';
SIZENUM varchar2(36) DEFAULT '';
APPSCHEME varchar2(1000) DEFAULT '三个字段的查询是联动关系,查询出来的结果需同时满足三个字段的查询内容。';
MAINCLASS varchar2(500) DEFAULT '三个字段的查询是联动关系,查询出来的结果需同时满足三个字段的查询内容。';
XSMC varchar2(50) DEFAULT 'wangkui';
YHDM NUMBER(8,0) DEFAULT 123;
YHMC varchar2(100) DEFAULT '13413123';
APPPREMISE NUMBER(8,0) DEFAULT 245;
numTemp NUMBER(8,0) DEFAULT 0;
STOPED NUMBER(8,0) DEFAULT 0;
REGISTERTYPE varchar2(2) DEFAULT '01';
scenecode varchar2(50) DEFAULT '';
SCENENAME varchar2(50) DEFAULT '';
GID varchar2(36) DEFAULT '';
tempb varchar2(20) DEFAULT '';
tempa varchar2(25) DEFAULT '';
ORGNAME varchar2(255) DEFAULT '';
ownCustomer varchar2(100) DEFAULT '';
BEGIN
set numTemp := SUBSTR(FLOOR(1 + (RAND() * (2))),0,1);
SET STOPED := SUBSTR(FLOOR(0 + (RAND() * (2))),0,1);
SET REGISTERTYPE := concat('0',SUBSTR(FLOOR(0 + (RAND() * (3))),0,1));
set tempb := concat('RGZN-RGZN-R-0',numTemp);
set tempa := concat(tempb, '-00');
SET scenecode := concat(tempa,tempn);
SET SCENENAME := concat('测试测试测试', trim(getName()),'机器人');
INSERT INTO T_PORTAL_RPA_SCENE(GID, STIME, UGID, INTRODUCTION, LASTTIME, MAINDESC, MAININTRODUCE, NEWS, SCENECODE, SCENENAME, VSIZE,
SORT, STOPED, SUPPLIER, VERSION, SORTNUM,
STATUS, APPSIZE, UPLOADCOMP, UPLOADER, VERSIONDESCRIPTION, UPLOADCOMPID, AUDITED, SIZENUM, REGISTERTYPE,
APPSCHEME, MAINCLASS, XSMC, YHDM, YHMC, APPPREMISE, ORGNAME, ownCustomer) VALUES
(newid(), now(), '000101', Introduction, now(), maindesc, Mainintroduce, news, scenecode, SCENENAME, TEMPSIZE, SORT, STOPED, SUPPLIER, VERSION, SORTNUM,
STOPED, APPSIZE, UPLOADCOMP, UPLOADER, VERSIONDESCRIPTION, UPLOADCOMPID, 1, SIZENUM, REGISTERTYPE, APPSCHEME, MAINCLASS, XSMC, YHDM, YHMC,APPPREMISE,
ORGNAME, ownCustomer);
END;
CREATE OR REPLACE PROCEDURE main_fuc(tempn IN INT)
as
BEGIN
for i in 1..100 LOOP
CALL INSERT_T_PORTAL_RPA_SCENE(tempn);
set tempn := tempn + 1;
end LOOP;
END;
CALL main_fuc(1000);
COMMIT;
CREATE OR REPLACE FUNCTION GETNAME() RETURN CHAR(50)
AS
DECLARE
FIRSTNAME VARCHAR(265) DEFAULT '艺博捷诚辉华润耀邦远万晟诺顿启明丰缘捷飞驰阳浩美永利怡润财务员工报表资金智能物联互联机器设备公车人员游戏产品培训呼叫质量机械';
GONGNENG VARCHAR(265) DEFAULT '管控监控审计报账中心汇总管理风险控制运营监管监督制度筹集准备生产销售分配转移质检旋吉皇源啸创鸿泰格力美的利晟尼佳能源国网南网电商佳洲';
PROJECTNAME VARCHAR(265) DEFAULT '';
BEGIN
SET PROJECTNAME = CONCAT(PROJECTNAME,SUBSTR( FIRSTNAME, FLOOR( 0+ RAND( ) * 64 ), 2 ),SUBSTR( GONGNENG, FLOOR( 0+ RAND( ) * 66 ), 2 ));
RETURN PROJECTNAME;
END;
CREATE OR REPLACE PROCEDURE INSERT_RPADOWNLOADMANAGE()
AS
DECLARE
GID VARCHAR(36) DEFAULT '';
COMPID VARCHAR(8) DEFAULT '';
COMPNAME VARCHAR(36) DEFAULT '';
CUSTID VARCHAR(50) DEFAULT '';
CUSTNAME VARCHAR(150) DEFAULT '';
DOWNPERSON VARCHAR(100) DEFAULT '';
LESSEEID VARCHAR(36) DEFAULT '-1';
PACKAGETYPE VARCHAR(2) DEFAULT '';
BEGIN
SET DOWNPERSON = TRIM(GETNAME());
SET COMPID = '0121122';
SET CUSTID = '12045';
SET COMPNAME = TRIM(GETNAME());
SET CUSTNAME = TRIM(GETNAME());
SET GID = NEWID();
FOR SCENE IN (SELECT SCENECODE,SCENENAME,VERSION, UGID, YHDM, XSMC, ORGNAME FROM T_PORTAL_RPA_SCENE WHERE SCENENAME LIKE '测试测试测试%') LOOP
INSERT INTO RPADOWNLOADMANAGE(GID, COMPID, COMPNAME, CUSTID, CUSTNAME, DOWNTIME, DOWNPERSON,
LESSEEID, ROBOTID, ROBOTNAME, PACKAGETYPE, VERSION, UGID, UNAME, YHDM, ENUMID, ENUMNAME, XSMC, ORGNAME) VALUES
(GID, COMPID, COMPNAME, CUSTID, CUSTNAME, NOW(), DOWNPERSON, LESSEEID, SCENE.SCENECODE, SCENE.SCENENAME,
PACKAGETYPE, SCENE.VERSION,SCENE.UGID, 'ceshi', SCENE.YHDM, '1016', 'ceshi', SCENE.XSMC, SCENE.ORGNAME);
END LOOP;
END;
CREATE OR REPLACE PROCEDURE RPADOWNLOADMANAGE_MAIN()
AS
DECLARE
ROBOTNUM INT DEFAULT 200;
I INT DEFAULT 0;
BEGIN
WHILE I < ROBOTNUM LOOP
CALL INSERT_RPADOWNLOADMANAGE();
SET I = I + 1;
END LOOP;
END;
CALL RPADOWNLOADMANAGE_MAIN();
COMMIT;
CREATE OR REPLACE FUNCTION GETNAME() RETURN CHAR(50)
AS
DECLARE
FIRSTNAME VARCHAR(265) DEFAULT '艺博捷诚辉华润耀邦远万晟诺顿启明丰缘捷飞驰阳浩美永利怡润财务员工报表资金智能物联互联机器设备公车人员游戏产品培训呼叫质量机械';
GONGNENG VARCHAR(265) DEFAULT '管控监控审计报账中心汇总管理风险控制运营监管监督制度筹集准备生产销售分配转移质检旋吉皇源啸创鸿泰格力美的利晟尼佳能源国网南网电商佳洲';
PROJECTNAME VARCHAR(265) DEFAULT '';
BEGIN
SET PROJECTNAME = CONCAT(PROJECTNAME,SUBSTR( FIRSTNAME, FLOOR( 0+ RAND( ) * 64 ), 2 ),SUBSTR( GONGNENG, FLOOR( 0+ RAND( ) * 66 ), 2 ));
RETURN PROJECTNAME;
END;
CREATE OR REPLACE PROCEDURE INERT_T_RPA_TASK_INFO(tempn IN INT)
AS
declare
SCENENAME varchar2(50) DEFAULT '';
INDEXNUM NUMBER(8,0) DEFAULT 0;
TOTALNUM NUMBER(8,0) DEFAULT 0;
BEGIN
SELECT COUNT(*) INTO TOTALNUM FROM T_RPA_TASK_INFO;
IF TOTALNUM > 0 THEN
SELECT MAX(TASKID) INTO INDEXNUM FROM T_RPA_TASK_INFO;
ELSE
SET INDEXNUM = 0;
END IF;
SET SCENENAME := concat('测试测试测试试', trim(getName()), '机器人');
FOR YHXX IN (SELECT YHDM,XSMC FROM NECP_UMC_XTYHXX WHERE YHMC LIKE 'cszy_%') LOOP
INSERT INTO T_RPA_TASK_INFO(GID, TASKID, TASK_NAME, TASK_DESCRIBE, RUN_PERIOD, TASK_EXECUTOR, COMP_ID, STIME, CREATER,
CREATE_DATE, enable, TIMEOUT, IS_RETRY, RETRY_COUNT, PRIORITY, SCHEDULE, CREATERNAME, RUNNER_CODE, HAVEUPDATE, COMP_NAME)
VALUES (newid(), INDEXNUM+1, SCENENAME, NULL, 0, YHXX.YHDM, '9006', to_char(sysdate,'yyyy-mm-dd hh24:mi:ss'), YHXX.YHDM, to_char(sysdate,'yyyy-mm-dd hh24:mi:ss'), 0, 600, 0, 0, 1, '{\"scheduleState\":\"Once\",\"start\":\"2022-03-25 18:35:49\",\"repeatCount\":1}',
YHXX.XSMC, NULL, NULL, 'XXXXXX');
SET INDEXNUM = INDEXNUM+1;
END LOOP;
END;
CREATE OR REPLACE PROCEDURE T_RPA_TASK_INFO_MAIN()
AS
DECLARE
ROBOTNUM INT DEFAULT 10;
I INT DEFAULT 0;
BEGIN
WHILE I < ROBOTNUM LOOP
CALL INERT_T_RPA_TASK_INFO(I);
SET I = I + 1;
END LOOP;
END;
CALL T_RPA_TASK_INFO_MAIN();
INSERT INTO T_RPA_RUNNER_INFO(GID, RUNNER_CODE, RUNNER_IP, RUNNER_PORT, RUNNER_NAME, RUNNER_DESC, RUN_STATE, enable, CREATER, CREATE_TIME, RUNNER_MAC, MC_CODE, MC_NAME)
VALUES ('87e40ff76e714f4d8969bcbfe3f6df41', '20211102110754OHAMCR', '10.52.6.21', '12347', 'CESHI', 'S4测试', 0, 0, NULL, '2021-11-02 11:07:54', '2C:F0:5D:CB:2F:0A', '02', '共享中心2');
COMMIT;
CREATE OR REPLACE PROCEDURE INSERT_T_RPA_TASK_RUN_HIS_INFO()
AS
declare
TASK_JSON VARCHAR2(4000) DEFAULT '';
RUNNER_JSON VARCHAR2(4000) DEFAULT '';
BEGIN
FOR TASKINFO IN (SELECT * FROM T_RPA_TASK_INFO WHERE TASK_NAME LIKE '测试测试测试试%') LOOP
SET TASK_JSON = concat('{"companyId":"',TASKINFO.COMP_ID,'","companyName":"',TASKINFO.COMP_NAME,'","createDate":"',TASKINFO.CREATE_DATE,'","creater":"',
TASKINFO.creater,'","createrName":"',TASKINFO.createrName,'","enable":1,"gid":"',TASKINFO.GID,'","isRetry":0,"modelState":0,"priority":',TASKINFO.PRIORITY,
',"retryCount":0,"runPeriod":',TASKINFO.RUN_PERIOD,',"schedule":"',TASKINFO.SCHEDULE,'","stime":"',TASKINFO.STIME,'","taskExecutor":"',TASKINFO.CREATER,'","taskName":"','"打开网页"',
'","taskId":',TASKINFO.TASKID,',"taskDesc":"','sfsfdasdfas','","timeOut":600,"":"','"}');
SET RUNNER_JSON = '{\"createTime\":\"2021-11-02 11:07:54\",\"enable\":1,\"gid\":\"87e40ff76e714f4d8969bcbfe3f6df41\",\"modelState\":0,\"runState\":0,\"runnerCode\":\"20211102110754OHAMCR\",
\"runnerDesc\":\"CESHI\",\"runnerIp\":\"10.52.6.21\",\"runnerMac\":\"2C:F0:5D:CB:2F:0A\",\"runnerName\":\"CESHI\",\"runnerPort\":\"12347\"}';
INSERT INTO T_RPA_TASK_RUN_HIS_INFO(GID, TASK_ID, TASK_INFO, TASK_EXECUTE_ID, READY_TIME, START_EXECUTE_TIME, RUN_STATE,
TASK_END_TIME, EXECUTE_RESULT, EXECUTE_RESPONSE_MSG, RUNNER_ID, RUNNER_NAME, RUNNER_INFO, CREATER, CREATE_TIME, PRIORITY,
REPEAT_INDEX, REPEAT_ID, RESULT_STATE, COMP_ID)
VALUES (newid(), TASKINFO.GID,
TASK_JSON,
'a11c0d712694405493c3db99a7d97b4c@20220209093535', to_char(sysdate,'yyyy-mm-dd hh24:mi:ss'), to_char(sysdate,'yyyy-mm-dd hh24:mi:ss'), 3, to_char(sysdate,'yyyy-mm-dd hh24:mi:ss'), '',
'[任务]执行完成,', '20211102110754OHAMCR', 'CESHI',
RUNNER_JSON,
TASKINFO.CREATER, to_char(sysdate,'yyyy-mm-dd hh24:mi:ss'), 0, 1, newid(), 1, '9006');
END LOOP;
END;
CREATE OR REPLACE PROCEDURE T_RPA_TASK_RUN_HIS_INFO_MAIN()
AS
DECLARE
ROBOTNUM INT DEFAULT 10;
I INT DEFAULT 0;
BEGIN
WHILE I < ROBOTNUM LOOP
CALL INSERT_T_RPA_TASK_RUN_HIS_INFO();
SET I = I + 1;
END LOOP;
END;
CALL T_RPA_TASK_RUN_HIS_INFO_MAIN();
COMMIT;