
ALTER TABLE `p_projecttask` CHANGE COLUMN `tasktype` `tasktype` VARCHAR(255) NULL DEFAULT NULL COMMENT '工作类型' ;

#人事类其他签报
CREATE TABLE `t_b_activiti_user_other` (
  `id` varchar(36) NOT NULL,
  `create_name` varchar(50) DEFAULT NULL COMMENT '创建人名称',
  `create_by` varchar(50) DEFAULT NULL COMMENT '创建人登录名称',
  `create_date` datetime DEFAULT NULL COMMENT '创建日期',
  `update_name` varchar(50) DEFAULT NULL COMMENT '更新人名称',
  `update_by` varchar(50) DEFAULT NULL COMMENT '更新人登录名称',
  `update_date` datetime DEFAULT NULL COMMENT '更新日期',
  `sys_org_code` varchar(50) DEFAULT NULL COMMENT '所属部门',
  `sys_company_code` varchar(50) DEFAULT NULL COMMENT '所属公司',
  `bpm_status` varchar(32) DEFAULT '1' COMMENT '流程状态',
  `proc_inst_id` varchar(50) DEFAULT NULL COMMENT '流程id',
  `step_name` varchar(32) DEFAULT NULL COMMENT '流程名',
  `depart_id` varchar(32) DEFAULT NULL COMMENT '部门id',
  `dep_name` varchar(32) DEFAULT NULL COMMENT '组织结构',
  `userid` varchar(32) DEFAULT NULL COMMENT '用户id',
  `real_name` varchar(32) DEFAULT NULL COMMENT '员工姓名',
  `descn` longtext COMMENT '情况说明',
  PRIMARY KEY (`id`),
  KEY `create_by` (`create_by`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='人事类其他签报';

INSERT INTO `t_s_typegroup` (`ID`, `typegroupcode`, `typegroupname`, `create_date`, `create_name`) VALUES ('402880ed70ae82a40170aedda45f0031','jiaojin_type','缴金分类','2020-03-06 16:02:06','管理员'),('402880ed70ae82a40170aee02533003c','social_insurance_items','社保公积金具体事宜','2020-03-06 16:04:50','管理员'),('402880ed70c231d50170c23aac370001','user_appoint_type','任免类别','2020-03-10 10:16:30','管理员'),('402880ed70cc19590170cd8f71710035','user_activiti_post_type','新增岗位签报类型','2020-03-12 15:04:55','管理员');

INSERT INTO `t_s_type` (`ID`, `typecode`, `typename`, `typepid`, `typegroupid`, `create_date`, `create_name`) VALUES ('402880ed70b93f840170b943da0d0004','user_other','人事类其他签报',NULL,'402889fe47eddd340147ede15c070001','2020-03-08 16:29:57','管理员'),('402880ed70b93f840170b944ae8c0006','user_social_insurance','社保公积金签报',NULL,'402889fe47eddd340147ede15c070001','2020-03-08 16:30:51','管理员'),('402880ed70b93f840170b9456e9b0008','user_appoint','任免签报',NULL,'402889fe47eddd340147ede15c070001','2020-03-08 16:31:40','管理员'),('402880ed70b93f840170b945f0c4000a','user_post','新增岗位签报',NULL,'402889fe47eddd340147ede15c070001','2020-03-08 16:32:14','管理员'),('402880ed70bd42030170bd9f175e000f','user_social_insurance','社保公积金签报',NULL,'4028819b65a8b81c0165a9182bee0015','2020-03-09 12:48:05','管理员'),('402880ed70bd42030170bd9fb9c20011','user_appoint','任免签报',NULL,'4028819b65a8b81c0165a9182bee0015','2020-03-09 12:48:47','管理员'),('402880ed70bd42030170bda018540013','user_post','新增岗位签报',NULL,'4028819b65a8b81c0165a9182bee0015','2020-03-09 12:49:11','管理员'),('402880ed70c231d50170c23b3c720003','appoint','人事任命',NULL,'402880ed70c231d50170c23aac370001','2020-03-10 10:17:07','管理员'),('402880ed70c231d50170c23bcb1b0005','promotion','晋升',NULL,'402880ed70c231d50170c23aac370001','2020-03-10 10:17:43','管理员'),('402880ed70c231d50170c23d2c270007','dismiss','辞退',NULL,'402880ed70c231d50170c23aac370001','2020-03-10 10:19:14','管理员'),('402880ed70c231d50170c23da9e60009','demotion','降职',NULL,'402880ed70c231d50170c23aac370001','2020-03-10 10:19:46','管理员'),('402880ed70cc19590170cd8ff30b003a','new','新增岗位',NULL,'402880ed70cc19590170cd8f71710035','2020-03-12 15:05:28','管理员');

INSERT INTO `t_s_function` (`ID`, `functioniframe`, `functionlevel`, `functionname`, `functionorder`, `functionurl`, `parentfunctionid`, `iconid`, `desk_iconid`, `functiontype`, `function_icon_style`, `create_by`, `create_name`, `update_by`, `update_date`, `create_date`, `update_name`, `remark`) VALUES ('402880ed70b3f55a0170b4a73b480001',NULL,1,'人事类其他签报','50','tBActivitiUserOtherController.do?list','402881e56dc9460b016dc94749800001','8a8ab0b246dc81120146dc8180460000','8a8ab0b246dc81120146dc8180dd001e',0,'','admin','管理员','admin','2020-03-07 19:00:43','2020-03-07 19:00:23','管理员','人事类其他签报'),('402880ed70b3f55a0170b4a834cf0004',NULL,1,'社保公积金签报','52','tBActivitiUserSocialInsuranceController.do?list','402881e56dc9460b016dc94749800001','8a8ab0b246dc81120146dc8180460000','8a8ab0b246dc81120146dc8180dd001e',0,'','admin','管理员',NULL,NULL,'2020-03-07 19:01:27',NULL,'社保公积金签报'),('402880ed70b3f55a0170b4a8b5bd0006',NULL,1,'任免签报','54','tBActivitiUserAppointController.do?list','402881e56dc9460b016dc94749800001','8a8ab0b246dc81120146dc8180460000','8a8ab0b246dc81120146dc8180dd001e',0,'','admin','管理员',NULL,NULL,'2020-03-07 19:02:00',NULL,'任免签报'),('402880ed70b3f55a0170b4a94f380008',NULL,1,'新增岗位签报','56','tBActivitiUserPostController.do?list','402881e56dc9460b016dc94749800001','8a8ab0b246dc81120146dc8180460000','8a8ab0b246dc81120146dc8180dd001e',0,'','admin','管理员',NULL,NULL,'2020-03-07 19:02:40',NULL,'新增岗位签报');

INSERT INTO `p_activiti_task` (`id`, `create_name`, `create_by`, `create_date`, `update_name`, `update_by`, `update_date`, `sys_org_code`, `sys_company_code`, `bpm_status`, `name`, `process_id`, `process_name`, `task_cost_time`, `task_cost_time_type`, `execute_type`, `execute_way`, `form`, `owner_role`, `owner_role_name`, `important`, `execute_class`, `task_delay`, `task_type`, `check_result`) VALUES ('402880ed70bd42030170bda3a7360015','管理员','admin','2020-03-09 12:53:04',NULL,NULL,NULL,'A06A01','A06','1','${real_name}社保公积金签报完成，请办理相关业务','402880ed70bd07840170bd24a2550007','社保公积金签报',15,'day','offline','pc','#','ff8080816f2193a4016f2277c65f0200','人事缴金专员',99,'com.xcgl.activititask.util.impl.UserActivitiTaskHandler',0,'user_social_insurance','not_check'),('402880ed70c44b650170c47c2afd0005','管理员','admin','2020-03-10 20:47:17',NULL,NULL,NULL,'A06A01','A06','1','${real_name}有新的人事变动，请核对该员工人事信息及工资策略','402880ed70be5e8a0170bf015d74000d','任免签报',15,'day','offline','pc','#','ff8080815fdeab1f015ffb95145a00b9','人事薪资专员',99,'com.xcgl.activititask.util.impl.AppointActivitiTaskHandler',0,'user_appoint','not_check'),('402880ed70ce07cd0170ce15de7a0002','管理员','admin','2020-03-12 17:31:45','管理员','admin','2020-03-12 19:42:02','A06A01','A06','1','组织机构：${dep_name}，新增岗位：${new_post_name}，编制数：${num}，请注意相关事项。','402880ed70cdb3830170cde3637d000d','新增岗位签报',15,'day','offline','pc','#','ff8080816f2193a4016f2277255001fd','人事岗位编制专员',99,'com.xcgl.activititask.util.impl.UserPostActivitiTaskHandler',0,'user_post','not_check');

INSERT INTO `t_s_timetask` (`ID`, `CREATE_BY`, `CREATE_DATE`, `CREATE_NAME`, `CRON_EXPRESSION`, `IS_EFFECT`, `IS_START`, `TASK_DESCRIBE`, `TASK_ID`, `UPDATE_BY`, `UPDATE_DATE`, `UPDATE_NAME`, `CLASS_NAME`, `RUN_SERVER_IP`, `RUN_SERVER`) VALUES ('402880ed70c9ca950170c9cd3c950001','admin','2020-03-11 21:33:56','管理员','0 0 3 * * ?','1','0','每天3点处理任免签报','AppointTimeTask','admin','2020-03-11 21:36:23','管理员','cn.com.lzt.useractiviti.workflow.task.AppointTimeTask','本地','本地');

INSERT INTO `t_p_flowcondition` (`id`, `create_name`, `create_by`, `create_date`, `update_name`, `update_by`, `update_date`, `sys_org_code`, `sys_company_code`, `process_type`, `flow_text`, `flow_condition`) VALUES ('402880ed70b93f840170b9417e1e0002','管理员','admin','2020-03-08 16:27:22',NULL,NULL,NULL,'A06A01','A06',NULL,'人事部门申请','${flowconditionUtil.isHr(BPM_FORM_KEY,id,1)}'),('402880ed70b93f840170b99a7664001f','管理员','admin','2020-03-08 18:04:33',NULL,NULL,NULL,'A06A01','A06',NULL,'非人事部门申请','${!flowconditionUtil.isHr(BPM_FORM_KEY,id,1)}'),('402880ed70c786830170c889657d0002','管理员','admin','2020-03-11 15:40:13','管理员','admin','2020-03-11 16:29:40','A06A01','A06','user_appoint','直接任命','${type==\'appoint\'}'),('402880ed70c786830170c889c2480004','管理员','admin','2020-03-11 15:40:36','管理员','admin','2020-03-11 16:28:50','A06A01','A06','user_appoint','非直接任命','${type!=\'appoint\'}');


INSERT INTO `t_p_process` VALUES ('402880ed70b93f840170b9469a8f000c','user_other',NULL,'人事类其他签报',NULL,'<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<definitions  xmlns=\"http://www.omg.org/spec/BPMN/20100524/MODEL\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:activiti=\"http://activiti.org/bpmn\" xmlns:bpmndi=\"http://www.omg.org/spec/BPMN/20100524/DI\" xmlns:omgdc=\"http://www.omg.org/spec/DD/20100524/DC\" xmlns:omgdi=\"http://www.omg.org/spec/DD/20100524/DI\" typeLanguage=\"http://www.w3.org/2001/XMLSchema\" expressionLanguage=\"http://www.w3.org/1999/XPath\" targetNamespace=\"http://www.lzt.com.cn\">\r\n    <process  id=\"process1583656354659\" name=\"人事类其他签报\">\r\n        <documentation>流程描述</documentation>\r\n        <extensionElements>\r\n            <activiti:executionListener id=\"402880e54803a496014805e5d9190012\" event=\"end\" class=\"org.jeecgframework.workflow.listener.execution.ProcessEndListener\" >\r\n            </activiti:executionListener>\r\n        </extensionElements>\r\n        <startEvent  id=\"start1\" name=\"开始节点\" activiti:initiator=\"applyUserId\">\r\n        </startEvent>\r\n        <endEvent  id=\"end\" name=\"结束节点\">\r\n        </endEvent>\r\n        <userTask  id=\"task1583656381520\" name=\"人事经理\" activiti:candidateUsers=\"${flowUtil.getUserInproject(BPM_FORM_KEY,BPM_DATA_ID,\'A_HRJL\')}\" >\r\n        </userTask>\r\n        <userTask  id=\"task1583657254610\" name=\"组织机构负责人\" activiti:candidateUsers=\"${flowUtil.customerUserSelect(BPM_FORM_KEY,BPM_DATA_ID,\'DEPART_MANAGER\')}\" >\r\n        </userTask>\r\n        <userTask  id=\"task1583657396882\" name=\"制单人重填\" activiti:assignee=\"${applyUserId}\" >\r\n        </userTask>\r\n        <exclusiveGateway  id=\"exclusiveGateway1583657220042\" name=\"exclusiveGateway1583657220042\">\r\n        </exclusiveGateway>\r\n        <sequenceFlow  id=\"flow1583656384222\" name=\"\" sourceRef=\"start1\" targetRef=\"exclusiveGateway1583657220042\">\r\n        </sequenceFlow>\r\n        <sequenceFlow  id=\"flow1583656387773\" name=\"通过\" sourceRef=\"task1583656381520\" targetRef=\"end\">\r\n        </sequenceFlow>\r\n        <sequenceFlow  id=\"flow1583657296505\" name=\"非人事\" sourceRef=\"exclusiveGateway1583657220042\" targetRef=\"task1583657254610\">\r\n            <conditionExpression  xsi:type=\"tFormalExpression\">\r\n                <![CDATA[${!flowconditionUtil.isHr(BPM_FORM_KEY,id,1)}]]>\r\n            </conditionExpression>\r\n        </sequenceFlow>\r\n        <sequenceFlow  id=\"flow1583657303296\" name=\"通过\" sourceRef=\"task1583657254610\" targetRef=\"task1583656381520\">\r\n        </sequenceFlow>\r\n        <sequenceFlow  id=\"flow1583657305281\" name=\"人事\" sourceRef=\"exclusiveGateway1583657220042\" targetRef=\"task1583656381520\">\r\n            <conditionExpression  xsi:type=\"tFormalExpression\">\r\n                <![CDATA[${flowconditionUtil.isHr(BPM_FORM_KEY,id,1)}]]>\r\n            </conditionExpression>\r\n        </sequenceFlow>\r\n        <sequenceFlow  id=\"flow1583657442464\" name=\"驳回\" sourceRef=\"task1583657254610\" targetRef=\"task1583657396882\">\r\n        </sequenceFlow>\r\n        <sequenceFlow  id=\"flow1583657444464\" name=\"驳回\" sourceRef=\"task1583656381520\" targetRef=\"task1583657396882\">\r\n        </sequenceFlow>\r\n        <sequenceFlow  id=\"flow1583657449231\" name=\"提交\" sourceRef=\"task1583657396882\" targetRef=\"exclusiveGateway1583657220042\">\r\n        </sequenceFlow>\r\n    </process>\r\n    <bpmndi:BPMNDiagram id=\"BPMNDiagram_process1583656354659\">\r\n        <bpmndi:BPMNPlane bpmnElement=\"process1583656354659\" id=\"BPMNPlane_process1583656354659\">\r\n            <bpmndi:BPMNShape bpmnElement=\"start1\" id=\"BPMNShape_start1\">\r\n                <omgdc:Bounds height=\"30\" width=\"30\" x=\"200\" y=\"50\"/>\r\n            </bpmndi:BPMNShape>\r\n            <bpmndi:BPMNShape bpmnElement=\"end\" id=\"BPMNShape_end\">\r\n                <omgdc:Bounds height=\"30\" width=\"30\" x=\"201\" y=\"483\"/>\r\n            </bpmndi:BPMNShape>\r\n            <bpmndi:BPMNShape bpmnElement=\"task1583656381520\" id=\"BPMNShape_task1583656381520\">\r\n                <omgdc:Bounds height=\"50\" width=\"90\" x=\"170\" y=\"338\"/>\r\n            </bpmndi:BPMNShape>\r\n            <bpmndi:BPMNShape bpmnElement=\"task1583657254610\" id=\"BPMNShape_task1583657254610\">\r\n                <omgdc:Bounds height=\"50\" width=\"90\" x=\"346\" y=\"133\"/>\r\n            </bpmndi:BPMNShape>\r\n            <bpmndi:BPMNShape bpmnElement=\"task1583657396882\" id=\"BPMNShape_task1583657396882\">\r\n                <omgdc:Bounds height=\"50\" width=\"90\" x=\"432\" y=\"337\"/>\r\n            </bpmndi:BPMNShape>\r\n            <bpmndi:BPMNShape bpmnElement=\"exclusiveGateway1583657220042\" id=\"BPMNShape_exclusiveGateway1583657220042\">\r\n                <omgdc:Bounds height=\"40\" width=\"40\" x=\"195\" y=\"138\"/>\r\n            </bpmndi:BPMNShape>\r\n            <bpmndi:BPMNEdge bpmnElement=\"flow1583656384222\" id=\"BPMNEdge_flow1583656384222\">\r\n                <omgdi:waypoint x=\"215\" y=\"80\" />\r\n                <omgdi:waypoint x=\"215\" y=\"138\" />\r\n            </bpmndi:BPMNEdge>\r\n            <bpmndi:BPMNEdge bpmnElement=\"flow1583656387773\" id=\"BPMNEdge_flow1583656387773\">\r\n                <omgdi:waypoint x=\"215\" y=\"393\" />\r\n                <omgdi:waypoint x=\"215\" y=\"438\" />\r\n                <omgdi:waypoint x=\"216\" y=\"438\" />\r\n                <omgdi:waypoint x=\"216\" y=\"483\" />\r\n            </bpmndi:BPMNEdge>\r\n            <bpmndi:BPMNEdge bpmnElement=\"flow1583657296505\" id=\"BPMNEdge_flow1583657296505\">\r\n                <omgdi:waypoint x=\"235\" y=\"158\" />\r\n                <omgdi:waypoint x=\"341\" y=\"158\" />\r\n            </bpmndi:BPMNEdge>\r\n            <bpmndi:BPMNEdge bpmnElement=\"flow1583657303296\" id=\"BPMNEdge_flow1583657303296\">\r\n                <omgdi:waypoint x=\"391\" y=\"188\" />\r\n                <omgdi:waypoint x=\"391\" y=\"260\" />\r\n                <omgdi:waypoint x=\"215\" y=\"260\" />\r\n                <omgdi:waypoint x=\"215\" y=\"333\" />\r\n            </bpmndi:BPMNEdge>\r\n            <bpmndi:BPMNEdge bpmnElement=\"flow1583657305281\" id=\"BPMNEdge_flow1583657305281\">\r\n                <omgdi:waypoint x=\"215\" y=\"178\" />\r\n                <omgdi:waypoint x=\"215\" y=\"333\" />\r\n            </bpmndi:BPMNEdge>\r\n            <bpmndi:BPMNEdge bpmnElement=\"flow1583657442464\" id=\"BPMNEdge_flow1583657442464\">\r\n                <omgdi:waypoint x=\"441\" y=\"158\" />\r\n                <omgdi:waypoint x=\"477\" y=\"158\" />\r\n                <omgdi:waypoint x=\"477\" y=\"332\" />\r\n            </bpmndi:BPMNEdge>\r\n            <bpmndi:BPMNEdge bpmnElement=\"flow1583657444464\" id=\"BPMNEdge_flow1583657444464\">\r\n                <omgdi:waypoint x=\"265\" y=\"363\" />\r\n                <omgdi:waypoint x=\"346\" y=\"363\" />\r\n                <omgdi:waypoint x=\"346\" y=\"362\" />\r\n                <omgdi:waypoint x=\"427\" y=\"362\" />\r\n            </bpmndi:BPMNEdge>\r\n            <bpmndi:BPMNEdge bpmnElement=\"flow1583657449231\" id=\"BPMNEdge_flow1583657449231\">\r\n                <omgdi:waypoint x=\"527\" y=\"362\" />\r\n                <omgdi:waypoint x=\"547\" y=\"362\" />\r\n                <omgdi:waypoint x=\"547\" y=\"118\" />\r\n                <omgdi:waypoint x=\"215\" y=\"118\" />\r\n                <omgdi:waypoint x=\"215\" y=\"138\" />\r\n            </bpmndi:BPMNEdge>\r\n        </bpmndi:BPMNPlane>\r\n    </bpmndi:BPMNDiagram>\r\n</definitions>',NULL,NULL,'管理员','2020-03-08 18:05:06','admin','管理员','2020-03-08 16:32:57','admin','process1583656354659',1,'0',NULL);

INSERT INTO `t_p_processnode` VALUES ('402880ed70b93f840170b947faf5000d',NULL,'402880ed70b93f840170b9469a8f000c','task1583656381520','人事经理','tBActivitiUserOtherController.do?goView','tBActivitiUserOtherController.do?goViewMobile',NULL,'402880ed70b93f840170b9494a7b000e','no','0'),('402880ed70b93f840170b957a89e0017',NULL,'402880ed70b93f840170b9469a8f000c','task1583657254610','组织机构负责人','tBActivitiUserOtherController.do?goView','tBActivitiUserOtherController.do?goViewMobile',NULL,'402880ed70b93f840170b9494a7b000e','no','0'),('402880ed70b93f840170b957a8a80018',NULL,'402880ed70b93f840170b9469a8f000c','task1583657396882','制单人重填','tBActivitiUserOtherController.do?goView&flag=1','tBActivitiUserOtherController.do?goViewMobile&flag=1',NULL,'402880ed70b93f840170b9994f29001c','no','0');
INSERT INTO `t_p_processnode_config` VALUES ('402880ed70b93f840170b9494a7b000e','user_other','审批','tBActivitiUserOtherController.do?goView','tBActivitiUserOtherController.do?goViewMobile'),('402880ed70b93f840170b9994f29001c','user_other','制单人重填','tBActivitiUserOtherController.do?goView&flag=1','tBActivitiUserOtherController.do?goViewMobile&flag=1');

INSERT INTO `t_s_busconfig` VALUES ('402880ed70b93f840170b94b801a0012',NULL,'online','','t_b_activiti_user_other','402880ed70b93f840170b9469a8f000c','人事类其他签报','formdeal','人事类其他签报','人事类其他签报','402880ed70b93f840170b94b5af20010');
INSERT INTO `t_process_busconfig` VALUES ('402880ed70b93f840170b94b5af20010','人事类其他签报','人事类其他签报','人事类其他签报','t_b_activiti_user_other','user_other','');

#社保公积金签报
CREATE TABLE `t_b_activiti_user_social_insurance` (
  `id` varchar(36) NOT NULL,
  `create_name` varchar(50) DEFAULT NULL COMMENT '创建人名称',
  `create_by` varchar(50) DEFAULT NULL COMMENT '创建人登录名称',
  `create_date` datetime DEFAULT NULL COMMENT '创建日期',
  `update_name` varchar(50) DEFAULT NULL COMMENT '更新人名称',
  `update_by` varchar(50) DEFAULT NULL COMMENT '更新人登录名称',
  `update_date` datetime DEFAULT NULL COMMENT '更新日期',
  `sys_org_code` varchar(50) DEFAULT NULL COMMENT '所属部门',
  `sys_company_code` varchar(50) DEFAULT NULL COMMENT '所属公司',
  `bpm_status` varchar(32) DEFAULT '1' COMMENT '流程状态',
  `proc_inst_id` varchar(50) DEFAULT NULL COMMENT '流程id',
  `step_name` varchar(50) DEFAULT NULL COMMENT '流程步骤',
  `depart_id` varchar(32) DEFAULT NULL COMMENT '部门id',
  `dep_name` varchar(255) DEFAULT NULL COMMENT '组织机构',
  `userid` varchar(32) DEFAULT NULL COMMENT '员工id',
  `real_name` varchar(255) DEFAULT NULL COMMENT '员工姓名',
  `jiaojin` varchar(255) DEFAULT NULL COMMENT '缴金分类',
  `items` varchar(255) DEFAULT NULL COMMENT '具体事宜',
  `company` varchar(255) DEFAULT NULL COMMENT '缴纳单位',
  `descn` longtext COMMENT '情况说明',
  PRIMARY KEY (`id`),
  KEY `create_by` (`create_by`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='社保公积金签报';

INSERT INTO `t_p_process` VALUES ('402880ed70bd07840170bd24a2550007','user_social_insurance',NULL,'社保公积金签报',NULL,'<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<definitions  xmlns=\"http://www.omg.org/spec/BPMN/20100524/MODEL\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:activiti=\"http://activiti.org/bpmn\" xmlns:bpmndi=\"http://www.omg.org/spec/BPMN/20100524/DI\" xmlns:omgdc=\"http://www.omg.org/spec/DD/20100524/DC\" xmlns:omgdi=\"http://www.omg.org/spec/DD/20100524/DI\" typeLanguage=\"http://www.w3.org/2001/XMLSchema\" expressionLanguage=\"http://www.w3.org/1999/XPath\" targetNamespace=\"http://www.lzt.com.cn\">\r\n    <process  id=\"process1583721047674\" name=\"社保公积金签报\">\r\n        <documentation>流程描述</documentation>\r\n        <extensionElements>\r\n            <activiti:executionListener id=\"402880e54803a496014805e5d9190012\" event=\"end\" class=\"org.jeecgframework.workflow.listener.execution.ProcessEndListener\" >\r\n            </activiti:executionListener>\r\n            <activiti:executionListener id=\"402881e56c035875016c03a921af0032\" event=\"end\" class=\"cn.com.lzt.workflow.listener.task.ActivitiTaskListener\" >\r\n            </activiti:executionListener>\r\n        </extensionElements>\r\n        <startEvent  id=\"start1\" name=\"开始节点\" activiti:initiator=\"applyUserId\">\r\n        </startEvent>\r\n        <endEvent  id=\"end\" name=\"结束节点\">\r\n        </endEvent>\r\n        <userTask  id=\"task1583721066087\" name=\"人事经理\" activiti:candidateUsers=\"${flowUtil.getUserInproject(BPM_FORM_KEY,BPM_DATA_ID,\'A_HRJL\')}\" >\r\n        </userTask>\r\n        <userTask  id=\"task1583721287093\" name=\"组织机构负责人\" activiti:candidateUsers=\"${flowUtil.customerUserSelect(BPM_FORM_KEY,BPM_DATA_ID,\'DEPART_MANAGER\')}\" >\r\n        </userTask>\r\n        <userTask  id=\"task1583721337535\" name=\"制单人重填\" activiti:assignee=\"${applyUserId}\" >\r\n        </userTask>\r\n        <exclusiveGateway  id=\"exclusiveGateway1583721263565\" name=\"exclusiveGateway1583721263565\">\r\n        </exclusiveGateway>\r\n        <sequenceFlow  id=\"flow1583721270126\" name=\"\" sourceRef=\"start1\" targetRef=\"exclusiveGateway1583721263565\">\r\n        </sequenceFlow>\r\n        <sequenceFlow  id=\"flow1583721273493\" name=\"人事\" sourceRef=\"exclusiveGateway1583721263565\" targetRef=\"task1583721066087\">\r\n            <conditionExpression  xsi:type=\"tFormalExpression\">\r\n                <![CDATA[${flowconditionUtil.isHr(BPM_FORM_KEY,id,1)}]]>\r\n            </conditionExpression>\r\n        </sequenceFlow>\r\n        <sequenceFlow  id=\"flow1583721302763\" name=\"非人事\" sourceRef=\"exclusiveGateway1583721263565\" targetRef=\"task1583721287093\">\r\n            <conditionExpression  xsi:type=\"tFormalExpression\">\r\n                <![CDATA[${!flowconditionUtil.isHr(BPM_FORM_KEY,id,1)}]]>\r\n            </conditionExpression>\r\n        </sequenceFlow>\r\n        <sequenceFlow  id=\"flow1583721332899\" name=\"通过\" sourceRef=\"task1583721287093\" targetRef=\"task1583721066087\">\r\n        </sequenceFlow>\r\n        <sequenceFlow  id=\"flow1583721348715\" name=\"驳回\" sourceRef=\"task1583721066087\" targetRef=\"task1583721337535\">\r\n        </sequenceFlow>\r\n        <sequenceFlow  id=\"flow1583721351024\" name=\"驳回\" sourceRef=\"task1583721287093\" targetRef=\"task1583721337535\">\r\n        </sequenceFlow>\r\n        <sequenceFlow  id=\"flow1583721353963\" name=\"提交\" sourceRef=\"task1583721337535\" targetRef=\"exclusiveGateway1583721263565\">\r\n        </sequenceFlow>\r\n        <sequenceFlow  id=\"flow1583721357889\" name=\"通过\" sourceRef=\"task1583721066087\" targetRef=\"end\">\r\n        </sequenceFlow>\r\n    </process>\r\n    <bpmndi:BPMNDiagram id=\"BPMNDiagram_process1583721047674\">\r\n        <bpmndi:BPMNPlane bpmnElement=\"process1583721047674\" id=\"BPMNPlane_process1583721047674\">\r\n            <bpmndi:BPMNShape bpmnElement=\"start1\" id=\"BPMNShape_start1\">\r\n                <omgdc:Bounds height=\"30\" width=\"30\" x=\"200\" y=\"50\"/>\r\n            </bpmndi:BPMNShape>\r\n            <bpmndi:BPMNShape bpmnElement=\"end\" id=\"BPMNShape_end\">\r\n                <omgdc:Bounds height=\"30\" width=\"30\" x=\"200\" y=\"400\"/>\r\n            </bpmndi:BPMNShape>\r\n            <bpmndi:BPMNShape bpmnElement=\"task1583721066087\" id=\"BPMNShape_task1583721066087\">\r\n                <omgdc:Bounds height=\"50\" width=\"90\" x=\"170\" y=\"290\"/>\r\n            </bpmndi:BPMNShape>\r\n            <bpmndi:BPMNShape bpmnElement=\"task1583721287093\" id=\"BPMNShape_task1583721287093\">\r\n                <omgdc:Bounds height=\"50\" width=\"90\" x=\"362\" y=\"147\"/>\r\n            </bpmndi:BPMNShape>\r\n            <bpmndi:BPMNShape bpmnElement=\"task1583721337535\" id=\"BPMNShape_task1583721337535\">\r\n                <omgdc:Bounds height=\"50\" width=\"90\" x=\"522\" y=\"147\"/>\r\n            </bpmndi:BPMNShape>\r\n            <bpmndi:BPMNShape bpmnElement=\"exclusiveGateway1583721263565\" id=\"BPMNShape_exclusiveGateway1583721263565\">\r\n                <omgdc:Bounds height=\"40\" width=\"40\" x=\"195\" y=\"152\"/>\r\n            </bpmndi:BPMNShape>\r\n            <bpmndi:BPMNEdge bpmnElement=\"flow1583721270126\" id=\"BPMNEdge_flow1583721270126\">\r\n                <omgdi:waypoint x=\"215\" y=\"80\" />\r\n                <omgdi:waypoint x=\"215\" y=\"152\" />\r\n            </bpmndi:BPMNEdge>\r\n            <bpmndi:BPMNEdge bpmnElement=\"flow1583721273493\" id=\"BPMNEdge_flow1583721273493\">\r\n                <omgdi:waypoint x=\"215\" y=\"192\" />\r\n                <omgdi:waypoint x=\"215\" y=\"285\" />\r\n            </bpmndi:BPMNEdge>\r\n            <bpmndi:BPMNEdge bpmnElement=\"flow1583721302763\" id=\"BPMNEdge_flow1583721302763\">\r\n                <omgdi:waypoint x=\"235\" y=\"172\" />\r\n                <omgdi:waypoint x=\"357\" y=\"172\" />\r\n            </bpmndi:BPMNEdge>\r\n            <bpmndi:BPMNEdge bpmnElement=\"flow1583721332899\" id=\"BPMNEdge_flow1583721332899\">\r\n                <omgdi:waypoint x=\"407\" y=\"202\" />\r\n                <omgdi:waypoint x=\"407\" y=\"243\" />\r\n                <omgdi:waypoint x=\"215\" y=\"243\" />\r\n                <omgdi:waypoint x=\"215\" y=\"285\" />\r\n            </bpmndi:BPMNEdge>\r\n            <bpmndi:BPMNEdge bpmnElement=\"flow1583721348715\" id=\"BPMNEdge_flow1583721348715\">\r\n                <omgdi:waypoint x=\"265\" y=\"315\" />\r\n                <omgdi:waypoint x=\"567\" y=\"315\" />\r\n                <omgdi:waypoint x=\"567\" y=\"202\" />\r\n            </bpmndi:BPMNEdge>\r\n            <bpmndi:BPMNEdge bpmnElement=\"flow1583721351024\" id=\"BPMNEdge_flow1583721351024\">\r\n                <omgdi:waypoint x=\"457\" y=\"172\" />\r\n                <omgdi:waypoint x=\"517\" y=\"172\" />\r\n            </bpmndi:BPMNEdge>\r\n            <bpmndi:BPMNEdge bpmnElement=\"flow1583721353963\" id=\"BPMNEdge_flow1583721353963\">\r\n                <omgdi:waypoint x=\"567\" y=\"142\" />\r\n                <omgdi:waypoint x=\"567\" y=\"122\" />\r\n                <omgdi:waypoint x=\"215\" y=\"122\" />\r\n                <omgdi:waypoint x=\"215\" y=\"152\" />\r\n            </bpmndi:BPMNEdge>\r\n            <bpmndi:BPMNEdge bpmnElement=\"flow1583721357889\" id=\"BPMNEdge_flow1583721357889\">\r\n                <omgdi:waypoint x=\"215\" y=\"345\" />\r\n                <omgdi:waypoint x=\"215\" y=\"400\" />\r\n            </bpmndi:BPMNEdge>\r\n        </bpmndi:BPMNPlane>\r\n    </bpmndi:BPMNDiagram>\r\n</definitions>',NULL,NULL,'管理员','2020-03-09 12:56:07','admin','管理员','2020-03-09 10:34:20','admin','process1583721047674',1,'0',NULL);
INSERT INTO `t_p_processnode` VALUES ('402880ed70bd07840170bd24a2660008',NULL,'402880ed70bd07840170bd24a2550007','task1583721066087','人事经理','tBActivitiUserSocialInsuranceController.do?goView','tBActivitiUserSocialInsuranceController.do?goViewMobile',NULL,'402880ed70bd07840170bd20d99b0003','no','0'),('402880ed70bd07840170bd26492d0009',NULL,'402880ed70bd07840170bd24a2550007','task1583721287093','组织机构负责人','tBActivitiUserSocialInsuranceController.do?goView','tBActivitiUserSocialInsuranceController.do?goViewMobile',NULL,'402880ed70bd07840170bd20d99b0003','no','0'),('402880ed70bd07840170bd264935000a',NULL,'402880ed70bd07840170bd24a2550007','task1583721337535','制单人重填','tBActivitiUserSocialInsuranceController.do?goView&flag=1','tBActivitiUserSocialInsuranceController.do?goViewMobile&flag=1',NULL,'402880ed70bd07840170bd214b430005','no','0');
INSERT INTO `t_p_processnode_config` VALUES ('402880ed70bd07840170bd20d99b0003','user_social_insurance','审批','tBActivitiUserSocialInsuranceController.do?goView','tBActivitiUserSocialInsuranceController.do?goViewMobile'),('402880ed70bd07840170bd214b430005','user_social_insurance','制单人重填','tBActivitiUserSocialInsuranceController.do?goView&flag=1','tBActivitiUserSocialInsuranceController.do?goViewMobile&flag=1');
INSERT INTO `t_s_busconfig` VALUES ('402880ed70bd07840170bd2864f9000b',NULL,'online','','t_b_activiti_user_social_insurance','402880ed70bd07840170bd24a2550007','社保公积金签报','formdeal','社保公积金签报','社保公积金签报','402880ed70bd07840170bd1f9bba0001');
INSERT INTO `t_process_busconfig` VALUES ('402880ed70bd07840170bd1f9bba0001','社保公积金签报','社保公积金签报','社保公积金签报','t_b_activiti_user_social_insurance','user_social_insurance','');

#任免签报
CREATE TABLE `t_b_activiti_user_appoint` (
  `id` varchar(36) NOT NULL,
  `create_name` varchar(50) DEFAULT NULL COMMENT '创建人名称',
  `create_by` varchar(50) DEFAULT NULL COMMENT '创建人登录名称',
  `create_date` datetime DEFAULT NULL COMMENT '创建日期',
  `update_name` varchar(50) DEFAULT NULL COMMENT '更新人名称',
  `update_by` varchar(50) DEFAULT NULL COMMENT '更新人登录名称',
  `update_date` datetime DEFAULT NULL COMMENT '更新日期',
  `sys_org_code` varchar(50) DEFAULT NULL COMMENT '所属部门',
  `sys_company_code` varchar(50) DEFAULT NULL COMMENT '所属公司',
  `bpm_status` varchar(32) DEFAULT '1' COMMENT '流程状态',
  `proc_inst_id` varchar(50) DEFAULT NULL COMMENT '流程id',
  `step_name` varchar(50) DEFAULT NULL COMMENT '流程名',
  `type` varchar(32) DEFAULT NULL COMMENT '类型',
  `userid` varchar(32) DEFAULT NULL COMMENT '员工id',
  `real_name` varchar(255) DEFAULT NULL COMMENT '用户姓名',
  `depart_id` varchar(32) DEFAULT NULL COMMENT '部门id',
  `dep_name` varchar(255) DEFAULT NULL COMMENT '组织机构',
  `new_duty_id` varchar(32) DEFAULT NULL COMMENT '新职务id',
  `new_duty_name` varchar(255) DEFAULT NULL COMMENT '新职务',
  `apply_time` datetime DEFAULT NULL COMMENT '生效日期',
  `descn` longtext COMMENT '情况说明',
  `is_handle` int(11) DEFAULT NULL COMMENT '是否处理',
  `handle_time` datetime DEFAULT NULL COMMENT '处理时间',
  `old_depart_id` varchar(45) DEFAULT NULL,
  `old_dep_name` varchar(255) DEFAULT NULL,
  `old_duty_id` varchar(45) DEFAULT NULL,
  `old_duty_name` varchar(255) DEFAULT NULL,
  `last_month_wage` decimal(10,2) DEFAULT NULL COMMENT '最后一次实发工资',
  PRIMARY KEY (`id`),
  KEY `create_by` (`create_by`),
  KEY `apply_time` (`apply_time`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='任免签报';

INSERT INTO `t_p_process` VALUES ('402880ed70be5e8a0170bf015d74000d','user_appoint',NULL,'任免签报',NULL,'<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<definitions  xmlns=\"http://www.omg.org/spec/BPMN/20100524/MODEL\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:activiti=\"http://activiti.org/bpmn\" xmlns:bpmndi=\"http://www.omg.org/spec/BPMN/20100524/DI\" xmlns:omgdc=\"http://www.omg.org/spec/DD/20100524/DC\" xmlns:omgdi=\"http://www.omg.org/spec/DD/20100524/DI\" typeLanguage=\"http://www.w3.org/2001/XMLSchema\" expressionLanguage=\"http://www.w3.org/1999/XPath\" targetNamespace=\"http://www.lzt.com.cn\">\r\n    <process  id=\"process1583752462687\" name=\"任免签报\">\r\n        <documentation>流程描述</documentation>\r\n        <extensionElements>\r\n            <activiti:executionListener id=\"402880e54803a496014805e5d9190012\" event=\"end\" class=\"org.jeecgframework.workflow.listener.execution.ProcessEndListener\" >\r\n            </activiti:executionListener>\r\n            <activiti:executionListener id=\"402880ed6ded2240016dedd28f5d001f\" event=\"end\" class=\"cn.com.lzt.workflow.listener.task.BusinessProcessEndListener\" >\r\n            </activiti:executionListener>\r\n            <activiti:executionListener id=\"402881e56c035875016c03a921af0032\" event=\"end\" class=\"cn.com.lzt.workflow.listener.task.ActivitiTaskListener\" >\r\n            </activiti:executionListener>\r\n        </extensionElements>\r\n        <startEvent  id=\"start1\" name=\"开始节点\" activiti:initiator=\"applyUserId\">\r\n        </startEvent>\r\n        <endEvent  id=\"end\" name=\"结束节点\">\r\n        </endEvent>\r\n        <userTask  id=\"task1583752480017\" name=\"人事经理\" activiti:candidateUsers=\"${flowUtil.getUserInproject(BPM_FORM_KEY,BPM_DATA_ID,\'A_HRJL\')}\" >\r\n        </userTask>\r\n        <userTask  id=\"task1583914423107\" name=\"人事经理\" activiti:candidateUsers=\"${flowUtil.getUserInproject(BPM_FORM_KEY,BPM_DATA_ID,\'A_HRJL\')}\" >\r\n        </userTask>\r\n        <userTask  id=\"task1583914490672\" name=\"项目管理部负责人\" activiti:candidateUsers=\"${flowUtil.getUserInproject(BPM_FORM_KEY,BPM_DATA_ID,\'A_PZBJL\')}\" >\r\n        </userTask>\r\n        <userTask  id=\"task1583914573327\" name=\"分管副总\" activiti:candidateUsers=\"${flowUtil.getUserInproject(BPM_FORM_KEY,BPM_DATA_ID,\'M_RSFZ\')}\" >\r\n        </userTask>\r\n        <userTask  id=\"task1583914576190\" name=\"总经理\" activiti:candidateUsers=\"${flowUtil.customerUserSelect(BPM_FORM_KEY,BPM_DATA_ID,\'BOSS\')}\" >\r\n        </userTask>\r\n        <userTask  id=\"task1583914579382\" name=\"人事经理\" activiti:candidateUsers=\"${flowUtil.getUserInproject(BPM_FORM_KEY,BPM_DATA_ID,\'A_HRJL\')}\" >\r\n        </userTask>\r\n        <userTask  id=\"task1583914971156\" name=\"制单人重填\" activiti:assignee=\"${applyUserId}\" >\r\n        </userTask>\r\n        <exclusiveGateway  id=\"exclusiveGateway1583912458116\" name=\"exclusiveGateway1583912458116\">\r\n        </exclusiveGateway>\r\n        <exclusiveGateway  id=\"exclusiveGateway1583912583310\" name=\"exclusiveGateway1583912583310\">\r\n        </exclusiveGateway>\r\n        <sequenceFlow  id=\"flow1583752482578\" name=\"\" sourceRef=\"start1\" targetRef=\"exclusiveGateway1583912458116\">\r\n        </sequenceFlow>\r\n        <sequenceFlow  id=\"flow1583752485033\" name=\"通过\" sourceRef=\"task1583752480017\" targetRef=\"end\">\r\n        </sequenceFlow>\r\n        <sequenceFlow  id=\"flow1583912473098\" name=\"直接任命\" sourceRef=\"exclusiveGateway1583912458116\" targetRef=\"task1583752480017\">\r\n            <conditionExpression  xsi:type=\"tFormalExpression\">\r\n                <![CDATA[${type==\'appoint\'}]]>\r\n            </conditionExpression>\r\n        </sequenceFlow>\r\n        <sequenceFlow  id=\"flow1583912505786\" name=\"非直接任命\" sourceRef=\"exclusiveGateway1583912458116\" targetRef=\"exclusiveGateway1583912583310\">\r\n            <conditionExpression  xsi:type=\"tFormalExpression\">\r\n                <![CDATA[${type!=\'appoint\'}]]>\r\n            </conditionExpression>\r\n        </sequenceFlow>\r\n        <sequenceFlow  id=\"flow1583914424438\" name=\"经理\" sourceRef=\"exclusiveGateway1583912583310\" targetRef=\"task1583914423107\">\r\n            <conditionExpression  xsi:type=\"tFormalExpression\">\r\n                <![CDATA[${flowconditionUtil.deutiesType(BPM_FORM_KEY,id) == 4}]]>\r\n            </conditionExpression>\r\n        </sequenceFlow>\r\n        <sequenceFlow  id=\"flow1583914492693\" name=\"非经理\" sourceRef=\"exclusiveGateway1583912583310\" targetRef=\"task1583914490672\">\r\n            <conditionExpression  xsi:type=\"tFormalExpression\">\r\n                <![CDATA[${flowconditionUtil.deutiesType(BPM_FORM_KEY,id) != 4}]]>\r\n            </conditionExpression>\r\n        </sequenceFlow>\r\n        <sequenceFlow  id=\"flow1583914652028\" name=\"通过\" sourceRef=\"task1583914490672\" targetRef=\"task1583914579382\">\r\n        </sequenceFlow>\r\n        <sequenceFlow  id=\"flow1583914779811\" name=\"通过\" sourceRef=\"task1583914423107\" targetRef=\"task1583914573327\">\r\n        </sequenceFlow>\r\n        <sequenceFlow  id=\"flow1583914781228\" name=\"通过\" sourceRef=\"task1583914573327\" targetRef=\"task1583914576190\">\r\n        </sequenceFlow>\r\n        <sequenceFlow  id=\"flow1583914785499\" name=\"通过\" sourceRef=\"task1583914579382\" targetRef=\"end\">\r\n        </sequenceFlow>\r\n        <sequenceFlow  id=\"flow1583914788115\" name=\"通过\" sourceRef=\"task1583914576190\" targetRef=\"end\">\r\n        </sequenceFlow>\r\n        <sequenceFlow  id=\"flow1583914987067\" name=\"驳回\" sourceRef=\"task1583914490672\" targetRef=\"task1583914971156\">\r\n        </sequenceFlow>\r\n        <sequenceFlow  id=\"flow1583914999122\" name=\"驳回\" sourceRef=\"task1583914579382\" targetRef=\"task1583914971156\">\r\n        </sequenceFlow>\r\n        <sequenceFlow  id=\"flow1583915005801\" name=\"驳回\" sourceRef=\"task1583914423107\" targetRef=\"task1583914971156\">\r\n        </sequenceFlow>\r\n        <sequenceFlow  id=\"flow1583915010265\" name=\"驳回\" sourceRef=\"task1583914573327\" targetRef=\"task1583914971156\">\r\n        </sequenceFlow>\r\n        <sequenceFlow  id=\"flow1583915015281\" name=\"驳回\" sourceRef=\"task1583914576190\" targetRef=\"task1583914971156\">\r\n        </sequenceFlow>\r\n        <sequenceFlow  id=\"flow1583915057121\" name=\"驳回\" sourceRef=\"task1583752480017\" targetRef=\"task1583914971156\">\r\n        </sequenceFlow>\r\n        <sequenceFlow  id=\"flow1583976817681\" name=\"提交\" sourceRef=\"task1583914971156\" targetRef=\"exclusiveGateway1583912458116\">\r\n        </sequenceFlow>\r\n    </process>\r\n    <bpmndi:BPMNDiagram id=\"BPMNDiagram_process1583752462687\">\r\n        <bpmndi:BPMNPlane bpmnElement=\"process1583752462687\" id=\"BPMNPlane_process1583752462687\">\r\n            <bpmndi:BPMNShape bpmnElement=\"start1\" id=\"BPMNShape_start1\">\r\n                <omgdc:Bounds height=\"30\" width=\"30\" x=\"272\" y=\"48\"/>\r\n            </bpmndi:BPMNShape>\r\n            <bpmndi:BPMNShape bpmnElement=\"end\" id=\"BPMNShape_end\">\r\n                <omgdc:Bounds height=\"30\" width=\"30\" x=\"259\" y=\"548\"/>\r\n            </bpmndi:BPMNShape>\r\n            <bpmndi:BPMNShape bpmnElement=\"task1583752480017\" id=\"BPMNShape_task1583752480017\">\r\n                <omgdc:Bounds height=\"50\" width=\"90\" x=\"44\" y=\"339\"/>\r\n            </bpmndi:BPMNShape>\r\n            <bpmndi:BPMNShape bpmnElement=\"task1583914423107\" id=\"BPMNShape_task1583914423107\">\r\n                <omgdc:Bounds height=\"50\" width=\"90\" x=\"592\" y=\"266\"/>\r\n            </bpmndi:BPMNShape>\r\n            <bpmndi:BPMNShape bpmnElement=\"task1583914490672\" id=\"BPMNShape_task1583914490672\">\r\n                <omgdc:Bounds height=\"50\" width=\"90\" x=\"347\" y=\"290\"/>\r\n            </bpmndi:BPMNShape>\r\n            <bpmndi:BPMNShape bpmnElement=\"task1583914573327\" id=\"BPMNShape_task1583914573327\">\r\n                <omgdc:Bounds height=\"50\" width=\"90\" x=\"592\" y=\"385\"/>\r\n            </bpmndi:BPMNShape>\r\n            <bpmndi:BPMNShape bpmnElement=\"task1583914576190\" id=\"BPMNShape_task1583914576190\">\r\n                <omgdc:Bounds height=\"50\" width=\"90\" x=\"592\" y=\"493\"/>\r\n            </bpmndi:BPMNShape>\r\n            <bpmndi:BPMNShape bpmnElement=\"task1583914579382\" id=\"BPMNShape_task1583914579382\">\r\n                <omgdc:Bounds height=\"50\" width=\"90\" x=\"347\" y=\"413\"/>\r\n            </bpmndi:BPMNShape>\r\n            <bpmndi:BPMNShape bpmnElement=\"task1583914971156\" id=\"BPMNShape_task1583914971156\">\r\n                <omgdc:Bounds height=\"50\" width=\"90\" x=\"214\" y=\"339\"/>\r\n            </bpmndi:BPMNShape>\r\n            <bpmndi:BPMNShape bpmnElement=\"exclusiveGateway1583912458116\" id=\"BPMNShape_exclusiveGateway1583912458116\">\r\n                <omgdc:Bounds height=\"40\" width=\"40\" x=\"267\" y=\"136\"/>\r\n            </bpmndi:BPMNShape>\r\n            <bpmndi:BPMNShape bpmnElement=\"exclusiveGateway1583912583310\" id=\"BPMNShape_exclusiveGateway1583912583310\">\r\n                <omgdc:Bounds height=\"40\" width=\"40\" x=\"459\" y=\"170\"/>\r\n            </bpmndi:BPMNShape>\r\n            <bpmndi:BPMNEdge bpmnElement=\"flow1583752482578\" id=\"BPMNEdge_flow1583752482578\">\r\n                <omgdi:waypoint x=\"287\" y=\"78\" />\r\n                <omgdi:waypoint x=\"287\" y=\"136\" />\r\n            </bpmndi:BPMNEdge>\r\n            <bpmndi:BPMNEdge bpmnElement=\"flow1583752485033\" id=\"BPMNEdge_flow1583752485033\">\r\n                <omgdi:waypoint x=\"89\" y=\"394\" />\r\n                <omgdi:waypoint x=\"89\" y=\"563\" />\r\n                <omgdi:waypoint x=\"259\" y=\"563\" />\r\n            </bpmndi:BPMNEdge>\r\n            <bpmndi:BPMNEdge bpmnElement=\"flow1583912473098\" id=\"BPMNEdge_flow1583912473098\">\r\n                <omgdi:waypoint x=\"267\" y=\"156\" />\r\n                <omgdi:waypoint x=\"89\" y=\"156\" />\r\n                <omgdi:waypoint x=\"89\" y=\"334\" />\r\n            </bpmndi:BPMNEdge>\r\n            <bpmndi:BPMNEdge bpmnElement=\"flow1583912505786\" id=\"BPMNEdge_flow1583912505786\">\r\n                <omgdi:waypoint x=\"307\" y=\"156\" />\r\n                <omgdi:waypoint x=\"479\" y=\"156\" />\r\n                <omgdi:waypoint x=\"479\" y=\"170\" />\r\n            </bpmndi:BPMNEdge>\r\n            <bpmndi:BPMNEdge bpmnElement=\"flow1583914424438\" id=\"BPMNEdge_flow1583914424438\">\r\n                <omgdi:waypoint x=\"499\" y=\"190\" />\r\n                <omgdi:waypoint x=\"637\" y=\"190\" />\r\n                <omgdi:waypoint x=\"637\" y=\"261\" />\r\n            </bpmndi:BPMNEdge>\r\n            <bpmndi:BPMNEdge bpmnElement=\"flow1583914492693\" id=\"BPMNEdge_flow1583914492693\">\r\n                <omgdi:waypoint x=\"459\" y=\"190\" />\r\n                <omgdi:waypoint x=\"392\" y=\"190\" />\r\n                <omgdi:waypoint x=\"392\" y=\"285\" />\r\n            </bpmndi:BPMNEdge>\r\n            <bpmndi:BPMNEdge bpmnElement=\"flow1583914652028\" id=\"BPMNEdge_flow1583914652028\">\r\n                <omgdi:waypoint x=\"392\" y=\"345\" />\r\n                <omgdi:waypoint x=\"392\" y=\"408\" />\r\n            </bpmndi:BPMNEdge>\r\n            <bpmndi:BPMNEdge bpmnElement=\"flow1583914779811\" id=\"BPMNEdge_flow1583914779811\">\r\n                <omgdi:waypoint x=\"637\" y=\"321\" />\r\n                <omgdi:waypoint x=\"637\" y=\"380\" />\r\n            </bpmndi:BPMNEdge>\r\n            <bpmndi:BPMNEdge bpmnElement=\"flow1583914781228\" id=\"BPMNEdge_flow1583914781228\">\r\n                <omgdi:waypoint x=\"637\" y=\"440\" />\r\n                <omgdi:waypoint x=\"637\" y=\"488\" />\r\n            </bpmndi:BPMNEdge>\r\n            <bpmndi:BPMNEdge bpmnElement=\"flow1583914785499\" id=\"BPMNEdge_flow1583914785499\">\r\n                <omgdi:waypoint x=\"392\" y=\"468\" />\r\n                <omgdi:waypoint x=\"392\" y=\"563\" />\r\n                <omgdi:waypoint x=\"289\" y=\"563\" />\r\n            </bpmndi:BPMNEdge>\r\n            <bpmndi:BPMNEdge bpmnElement=\"flow1583914788115\" id=\"BPMNEdge_flow1583914788115\">\r\n                <omgdi:waypoint x=\"637\" y=\"548\" />\r\n                <omgdi:waypoint x=\"637\" y=\"563\" />\r\n                <omgdi:waypoint x=\"289\" y=\"563\" />\r\n            </bpmndi:BPMNEdge>\r\n            <bpmndi:BPMNEdge bpmnElement=\"flow1583914987067\" id=\"BPMNEdge_flow1583914987067\">\r\n                <omgdi:waypoint x=\"342\" y=\"315\" />\r\n                <omgdi:waypoint x=\"325\" y=\"315\" />\r\n                <omgdi:waypoint x=\"325\" y=\"364\" />\r\n                <omgdi:waypoint x=\"309\" y=\"364\" />\r\n            </bpmndi:BPMNEdge>\r\n            <bpmndi:BPMNEdge bpmnElement=\"flow1583914999122\" id=\"BPMNEdge_flow1583914999122\">\r\n                <omgdi:waypoint x=\"342\" y=\"438\" />\r\n                <omgdi:waypoint x=\"325\" y=\"438\" />\r\n                <omgdi:waypoint x=\"325\" y=\"364\" />\r\n                <omgdi:waypoint x=\"309\" y=\"364\" />\r\n            </bpmndi:BPMNEdge>\r\n            <bpmndi:BPMNEdge bpmnElement=\"flow1583915005801\" id=\"BPMNEdge_flow1583915005801\">\r\n                <omgdi:waypoint x=\"587\" y=\"291\" />\r\n                <omgdi:waypoint x=\"448\" y=\"291\" />\r\n                <omgdi:waypoint x=\"448\" y=\"364\" />\r\n                <omgdi:waypoint x=\"309\" y=\"364\" />\r\n            </bpmndi:BPMNEdge>\r\n            <bpmndi:BPMNEdge bpmnElement=\"flow1583915010265\" id=\"BPMNEdge_flow1583915010265\">\r\n                <omgdi:waypoint x=\"587\" y=\"410\" />\r\n                <omgdi:waypoint x=\"448\" y=\"410\" />\r\n                <omgdi:waypoint x=\"448\" y=\"364\" />\r\n                <omgdi:waypoint x=\"309\" y=\"364\" />\r\n            </bpmndi:BPMNEdge>\r\n            <bpmndi:BPMNEdge bpmnElement=\"flow1583915015281\" id=\"BPMNEdge_flow1583915015281\">\r\n                <omgdi:waypoint x=\"587\" y=\"518\" />\r\n                <omgdi:waypoint x=\"448\" y=\"518\" />\r\n                <omgdi:waypoint x=\"448\" y=\"364\" />\r\n                <omgdi:waypoint x=\"309\" y=\"364\" />\r\n            </bpmndi:BPMNEdge>\r\n            <bpmndi:BPMNEdge bpmnElement=\"flow1583915057121\" id=\"BPMNEdge_flow1583915057121\">\r\n                <omgdi:waypoint x=\"139\" y=\"364\" />\r\n                <omgdi:waypoint x=\"209\" y=\"364\" />\r\n            </bpmndi:BPMNEdge>\r\n            <bpmndi:BPMNEdge bpmnElement=\"flow1583976817681\" id=\"BPMNEdge_flow1583976817681\">\r\n                <omgdi:waypoint x=\"259\" y=\"334\" />\r\n                <omgdi:waypoint x=\"259\" y=\"255\" />\r\n                <omgdi:waypoint x=\"287\" y=\"255\" />\r\n                <omgdi:waypoint x=\"287\" y=\"176\" />\r\n            </bpmndi:BPMNEdge>\r\n        </bpmndi:BPMNPlane>\r\n    </bpmndi:BPMNDiagram>\r\n</definitions>',NULL,NULL,'管理员','2020-03-12 10:46:25','admin','管理员','2020-03-09 19:15:03','admin','process1583752462687',1,'0',NULL);
INSERT INTO `t_p_processnode` VALUES ('402880ed70be5e8a0170bf015d93000e',NULL,'402880ed70be5e8a0170bf015d74000d','task1583752480017','人事经理','tBActivitiUserAppointController.do?goView','tBActivitiUserAppointController.do?goViewMobile',NULL,'402880ed70be5e8a0170bf004b050009','no','0'),('402880ed70c786830170c8a97d5b0009',NULL,'402880ed70be5e8a0170bf015d74000d','task1583914423107','人事经理','tBActivitiUserAppointController.do?goView','tBActivitiUserAppointController.do?goViewMobile',NULL,'402880ed70be5e8a0170bf004b050009','no','0'),('402880ed70c786830170c8a97d65000a',NULL,'402880ed70be5e8a0170bf015d74000d','task1583914490672','项目管理部负责人','tBActivitiUserAppointController.do?goView','tBActivitiUserAppointController.do?goViewMobile',NULL,'402880ed70be5e8a0170bf004b050009','no','0'),('402880ed70c786830170c8ac179b000c',NULL,'402880ed70be5e8a0170bf015d74000d','task1583914573327','分管副总','tBActivitiUserAppointController.do?goView','tBActivitiUserAppointController.do?goViewMobile',NULL,'402880ed70be5e8a0170bf004b050009','no','0'),('402880ed70c786830170c8ac17a1000d',NULL,'402880ed70be5e8a0170bf015d74000d','task1583914576190','总经理','tBActivitiUserAppointController.do?goView','tBActivitiUserAppointController.do?goViewMobile',NULL,'402880ed70be5e8a0170bf004b050009','no','0'),('402880ed70c786830170c8ac17a8000e',NULL,'402880ed70be5e8a0170bf015d74000d','task1583914579382','人事经理','tBActivitiUserAppointController.do?goView','tBActivitiUserAppointController.do?goViewMobile',NULL,'402880ed70be5e8a0170bf004b050009','no','0'),('402880ed70c786830170c8b268890010',NULL,'402880ed70be5e8a0170bf015d74000d','task1583914971156','制单人重填','tBActivitiUserAppointController.do?goView&flag=1','tBActivitiUserAppointController.do?goViewMobile&flag=1',NULL,'402880ed70be5e8a0170bf009ce4000b','no','0');
INSERT INTO `t_p_processnode_config` VALUES ('402880ed70be5e8a0170bf004b050009','user_appoint','审批','tBActivitiUserAppointController.do?goView','tBActivitiUserAppointController.do?goViewMobile'),('402880ed70be5e8a0170bf009ce4000b','user_appoint','制单人重填','tBActivitiUserAppointController.do?goView&flag=1','tBActivitiUserAppointController.do?goViewMobile&flag=1');
INSERT INTO `t_s_busconfig` VALUES ('402880ed70be5e8a0170bf01888c000f',NULL,'online','','t_b_activiti_user_appoint','402880ed70be5e8a0170bf015d74000d','任免签报','formdeal','任免签报','任免签报','402880ed70be5e8a0170beffb6aa0007');
INSERT INTO `t_process_busconfig` VALUES ('402880ed70be5e8a0170beffb6aa0007','任免签报','任免签报','任免签报','t_b_activiti_user_appoint','user_appoint','');

#新增岗位签报
CREATE TABLE `t_b_activiti_user_post` (
  `id` varchar(36) NOT NULL,
  `create_name` varchar(50) DEFAULT NULL COMMENT '创建人名称',
  `create_by` varchar(50) DEFAULT NULL COMMENT '创建人登录名称',
  `create_date` datetime DEFAULT NULL COMMENT '创建日期',
  `update_name` varchar(50) DEFAULT NULL COMMENT '更新人名称',
  `update_by` varchar(50) DEFAULT NULL COMMENT '更新人登录名称',
  `update_date` datetime DEFAULT NULL COMMENT '更新日期',
  `sys_org_code` varchar(50) DEFAULT NULL COMMENT '所属部门',
  `sys_company_code` varchar(50) DEFAULT NULL COMMENT '所属公司',
  `bpm_status` varchar(32) DEFAULT '1' COMMENT '流程状态',
  `proc_inst_id` varchar(50) DEFAULT NULL COMMENT '流程id',
  `step_name` varchar(50) DEFAULT NULL COMMENT '流程名',
  `depart_id` varchar(32) DEFAULT NULL COMMENT '部门id',
  `dep_name` varchar(255) DEFAULT NULL COMMENT '组织机构',
  `type` varchar(50) DEFAULT NULL COMMENT '分类',
  `post_id` varchar(32) DEFAULT NULL COMMENT '岗位id',
  `post_name` varchar(255) DEFAULT NULL COMMENT '岗位名称',
  `post_need_num` int(11) DEFAULT NULL COMMENT '岗位需求人数',
  `num` int(11) DEFAULT NULL COMMENT '新增岗位',
  `descn` longtext COMMENT '情况说明',
  `new_post_name` varchar(255) DEFAULT NULL COMMENT '新增岗位名称',
  PRIMARY KEY (`id`),
  KEY `create_by` (`create_by`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='新增岗位签报';

INSERT INTO `t_p_process` (`id`, `typeid`, `userid`, `processname`, `processxmlpath`, `processxml`, `processxmname`, `note`, `update_name`, `update_date`, `update_by`, `create_name`, `create_date`, `create_by`, `processkey`, `processstate`, `processtype`, `ccmode`) VALUES ('402880ed70cdb3830170cde3637d000d','user_post',NULL,'新增岗位签报',NULL,'<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<definitions  xmlns=\"http://www.omg.org/spec/BPMN/20100524/MODEL\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:activiti=\"http://activiti.org/bpmn\" xmlns:bpmndi=\"http://www.omg.org/spec/BPMN/20100524/DI\" xmlns:omgdc=\"http://www.omg.org/spec/DD/20100524/DC\" xmlns:omgdi=\"http://www.omg.org/spec/DD/20100524/DI\" typeLanguage=\"http://www.w3.org/2001/XMLSchema\" expressionLanguage=\"http://www.w3.org/1999/XPath\" targetNamespace=\"http://www.lzt.com.cn\">\r\n    <process  id=\"process1584002181279\" name=\"新增岗位签报\">\r\n        <documentation>流程描述</documentation>\r\n        <extensionElements>\r\n            <activiti:executionListener id=\"402880e54803a496014805e5d9190012\" event=\"end\" class=\"org.jeecgframework.workflow.listener.execution.ProcessEndListener\" >\r\n            </activiti:executionListener>\r\n            <activiti:executionListener id=\"402881e56c035875016c03a921af0032\" event=\"end\" class=\"cn.com.lzt.workflow.listener.task.ActivitiTaskListener\" >\r\n            </activiti:executionListener>\r\n            <activiti:executionListener id=\"402880ed6ded2240016dedd28f5d001f\" event=\"end\" class=\"cn.com.lzt.workflow.listener.task.BusinessProcessEndListener\" >\r\n            </activiti:executionListener>\r\n        </extensionElements>\r\n        <startEvent  id=\"start1\" name=\"开始节点\" activiti:initiator=\"applyUserId\">\r\n        </startEvent>\r\n        <endEvent  id=\"end\" name=\"结束节点\">\r\n        </endEvent>\r\n        <userTask  id=\"task1584002198600\" name=\"组织机构负责人\" activiti:candidateUsers=\"${flowUtil.customerUserSelect(BPM_FORM_KEY,BPM_DATA_ID,\'DEPART_MANAGER\')}\" >\r\n        </userTask>\r\n        <userTask  id=\"task1584002480505\" name=\"项目管理部编制负责人\" activiti:candidateUsers=\"${flowUtil.getUserInproject(BPM_FORM_KEY,BPM_DATA_ID,\'P_YYBGW\')}\" >\r\n        </userTask>\r\n        <userTask  id=\"task1584002543899\" name=\"项目管理部经理\" activiti:candidateUsers=\"${flowUtil.getUserInproject(BPM_FORM_KEY,BPM_DATA_ID,\'A_PZBJL\')}\" >\r\n        </userTask>\r\n        <userTask  id=\"task1584002579787\" name=\"人事经理\" activiti:candidateUsers=\"${flowUtil.getUserInproject(BPM_FORM_KEY,BPM_DATA_ID,\'A_HRJL\')}\" >\r\n        </userTask>\r\n        <userTask  id=\"task1584002609482\" name=\"总经理\" activiti:candidateUsers=\"${flowUtil.customerUserSelect(BPM_FORM_KEY,BPM_DATA_ID,\'BOSS\')}\" >\r\n        </userTask>\r\n        <userTask  id=\"task1584002808718\" name=\"制单人重填\" activiti:assignee=\"${applyUserId}\" >\r\n        </userTask>\r\n        <exclusiveGateway  id=\"exclusiveGateway1584002893729\" name=\"exclusiveGateway1584002893729\">\r\n        </exclusiveGateway>\r\n        <sequenceFlow  id=\"flow1584002528378\" name=\"项目\" sourceRef=\"exclusiveGateway1584002893729\" targetRef=\"task1584002480505\">\r\n            <conditionExpression  xsi:type=\"tFormalExpression\">\r\n                <![CDATA[${flowconditionUtil.departType(BPM_FORM_KEY,id) ==1 }]]>\r\n            </conditionExpression>\r\n        </sequenceFlow>\r\n        <sequenceFlow  id=\"flow1584002550922\" name=\"通过\" sourceRef=\"task1584002480505\" targetRef=\"task1584002543899\">\r\n        </sequenceFlow>\r\n        <sequenceFlow  id=\"flow1584002674745\" name=\"职能部门\" sourceRef=\"exclusiveGateway1584002893729\" targetRef=\"task1584002543899\">\r\n            <conditionExpression  xsi:type=\"tFormalExpression\">\r\n                <![CDATA[${flowconditionUtil.departType(BPM_FORM_KEY,id) ==2 }]]>\r\n            </conditionExpression>\r\n        </sequenceFlow>\r\n        <sequenceFlow  id=\"flow1584002700265\" name=\"通过\" sourceRef=\"task1584002543899\" targetRef=\"task1584002579787\">\r\n        </sequenceFlow>\r\n        <sequenceFlow  id=\"flow1584002701928\" name=\"通过\" sourceRef=\"task1584002579787\" targetRef=\"task1584002609482\">\r\n        </sequenceFlow>\r\n        <sequenceFlow  id=\"flow1584002710265\" name=\"通过\" sourceRef=\"task1584002609482\" targetRef=\"end\">\r\n        </sequenceFlow>\r\n        <sequenceFlow  id=\"flow1584002823248\" name=\"\" sourceRef=\"start1\" targetRef=\"task1584002198600\">\r\n        </sequenceFlow>\r\n        <sequenceFlow  id=\"flow1584002877064\" name=\"驳回\" sourceRef=\"task1584002198600\" targetRef=\"task1584002808718\">\r\n        </sequenceFlow>\r\n        <sequenceFlow  id=\"flow1584002932593\" name=\"通过\" sourceRef=\"task1584002198600\" targetRef=\"exclusiveGateway1584002893729\">\r\n        </sequenceFlow>\r\n        <sequenceFlow  id=\"flow1584003211414\" name=\"驳回\" sourceRef=\"task1584002480505\" targetRef=\"task1584002808718\">\r\n        </sequenceFlow>\r\n        <sequenceFlow  id=\"flow1584003219639\" name=\"驳回\" sourceRef=\"task1584002543899\" targetRef=\"task1584002808718\">\r\n        </sequenceFlow>\r\n        <sequenceFlow  id=\"flow1584003224678\" name=\"驳回\" sourceRef=\"task1584002579787\" targetRef=\"task1584002808718\">\r\n        </sequenceFlow>\r\n        <sequenceFlow  id=\"flow1584003230551\" name=\"驳回\" sourceRef=\"task1584002609482\" targetRef=\"task1584002808718\">\r\n        </sequenceFlow>\r\n        <sequenceFlow  id=\"flow1584003258190\" name=\"提交\" sourceRef=\"task1584002808718\" targetRef=\"task1584002198600\">\r\n        </sequenceFlow>\r\n    </process>\r\n    <bpmndi:BPMNDiagram id=\"BPMNDiagram_process1584002181279\">\r\n        <bpmndi:BPMNPlane bpmnElement=\"process1584002181279\" id=\"BPMNPlane_process1584002181279\">\r\n            <bpmndi:BPMNShape bpmnElement=\"start1\" id=\"BPMNShape_start1\">\r\n                <omgdc:Bounds height=\"30\" width=\"30\" x=\"191\" y=\"58\"/>\r\n            </bpmndi:BPMNShape>\r\n            <bpmndi:BPMNShape bpmnElement=\"end\" id=\"BPMNShape_end\">\r\n                <omgdc:Bounds height=\"30\" width=\"30\" x=\"193\" y=\"397\"/>\r\n            </bpmndi:BPMNShape>\r\n            <bpmndi:BPMNShape bpmnElement=\"task1584002198600\" id=\"BPMNShape_task1584002198600\">\r\n                <omgdc:Bounds height=\"50\" width=\"90\" x=\"329\" y=\"48\"/>\r\n            </bpmndi:BPMNShape>\r\n            <bpmndi:BPMNShape bpmnElement=\"task1584002480505\" id=\"BPMNShape_task1584002480505\">\r\n                <omgdc:Bounds height=\"50\" width=\"90\" x=\"539\" y=\"152\"/>\r\n            </bpmndi:BPMNShape>\r\n            <bpmndi:BPMNShape bpmnElement=\"task1584002543899\" id=\"BPMNShape_task1584002543899\">\r\n                <omgdc:Bounds height=\"50\" width=\"90\" x=\"539\" y=\"270\"/>\r\n            </bpmndi:BPMNShape>\r\n            <bpmndi:BPMNShape bpmnElement=\"task1584002579787\" id=\"BPMNShape_task1584002579787\">\r\n                <omgdc:Bounds height=\"50\" width=\"90\" x=\"539\" y=\"387\"/>\r\n            </bpmndi:BPMNShape>\r\n            <bpmndi:BPMNShape bpmnElement=\"task1584002609482\" id=\"BPMNShape_task1584002609482\">\r\n                <omgdc:Bounds height=\"50\" width=\"90\" x=\"329\" y=\"387\"/>\r\n            </bpmndi:BPMNShape>\r\n            <bpmndi:BPMNShape bpmnElement=\"task1584002808718\" id=\"BPMNShape_task1584002808718\">\r\n                <omgdc:Bounds height=\"50\" width=\"90\" x=\"329\" y=\"174\"/>\r\n            </bpmndi:BPMNShape>\r\n            <bpmndi:BPMNShape bpmnElement=\"exclusiveGateway1584002893729\" id=\"BPMNShape_exclusiveGateway1584002893729\">\r\n                <omgdc:Bounds height=\"40\" width=\"40\" x=\"564\" y=\"53\"/>\r\n            </bpmndi:BPMNShape>\r\n            <bpmndi:BPMNEdge bpmnElement=\"flow1584002528378\" id=\"BPMNEdge_flow1584002528378\">\r\n                <omgdi:waypoint x=\"584\" y=\"93\" />\r\n                <omgdi:waypoint x=\"584\" y=\"147\" />\r\n            </bpmndi:BPMNEdge>\r\n            <bpmndi:BPMNEdge bpmnElement=\"flow1584002550922\" id=\"BPMNEdge_flow1584002550922\">\r\n                <omgdi:waypoint x=\"584\" y=\"207\" />\r\n                <omgdi:waypoint x=\"584\" y=\"265\" />\r\n            </bpmndi:BPMNEdge>\r\n            <bpmndi:BPMNEdge bpmnElement=\"flow1584002674745\" id=\"BPMNEdge_flow1584002674745\">\r\n                <omgdi:waypoint x=\"604\" y=\"73\" />\r\n                <omgdi:waypoint x=\"654\" y=\"73\" />\r\n                <omgdi:waypoint x=\"654\" y=\"295\" />\r\n                <omgdi:waypoint x=\"634\" y=\"295\" />\r\n            </bpmndi:BPMNEdge>\r\n            <bpmndi:BPMNEdge bpmnElement=\"flow1584002700265\" id=\"BPMNEdge_flow1584002700265\">\r\n                <omgdi:waypoint x=\"584\" y=\"325\" />\r\n                <omgdi:waypoint x=\"584\" y=\"382\" />\r\n            </bpmndi:BPMNEdge>\r\n            <bpmndi:BPMNEdge bpmnElement=\"flow1584002701928\" id=\"BPMNEdge_flow1584002701928\">\r\n                <omgdi:waypoint x=\"534\" y=\"412\" />\r\n                <omgdi:waypoint x=\"424\" y=\"412\" />\r\n            </bpmndi:BPMNEdge>\r\n            <bpmndi:BPMNEdge bpmnElement=\"flow1584002710265\" id=\"BPMNEdge_flow1584002710265\">\r\n                <omgdi:waypoint x=\"324\" y=\"412\" />\r\n                <omgdi:waypoint x=\"223\" y=\"412\" />\r\n            </bpmndi:BPMNEdge>\r\n            <bpmndi:BPMNEdge bpmnElement=\"flow1584002823248\" id=\"BPMNEdge_flow1584002823248\">\r\n                <omgdi:waypoint x=\"221\" y=\"73\" />\r\n                <omgdi:waypoint x=\"324\" y=\"73\" />\r\n            </bpmndi:BPMNEdge>\r\n            <bpmndi:BPMNEdge bpmnElement=\"flow1584002877064\" id=\"BPMNEdge_flow1584002877064\">\r\n                <omgdi:waypoint x=\"374\" y=\"103\" />\r\n                <omgdi:waypoint x=\"374\" y=\"169\" />\r\n            </bpmndi:BPMNEdge>\r\n            <bpmndi:BPMNEdge bpmnElement=\"flow1584002932593\" id=\"BPMNEdge_flow1584002932593\">\r\n                <omgdi:waypoint x=\"424\" y=\"73\" />\r\n                <omgdi:waypoint x=\"564\" y=\"73\" />\r\n            </bpmndi:BPMNEdge>\r\n            <bpmndi:BPMNEdge bpmnElement=\"flow1584003211414\" id=\"BPMNEdge_flow1584003211414\">\r\n                <omgdi:waypoint x=\"534\" y=\"177\" />\r\n                <omgdi:waypoint x=\"479\" y=\"177\" />\r\n                <omgdi:waypoint x=\"479\" y=\"199\" />\r\n                <omgdi:waypoint x=\"424\" y=\"199\" />\r\n            </bpmndi:BPMNEdge>\r\n            <bpmndi:BPMNEdge bpmnElement=\"flow1584003219639\" id=\"BPMNEdge_flow1584003219639\">\r\n                <omgdi:waypoint x=\"534\" y=\"295\" />\r\n                <omgdi:waypoint x=\"479\" y=\"295\" />\r\n                <omgdi:waypoint x=\"479\" y=\"199\" />\r\n                <omgdi:waypoint x=\"424\" y=\"199\" />\r\n            </bpmndi:BPMNEdge>\r\n            <bpmndi:BPMNEdge bpmnElement=\"flow1584003224678\" id=\"BPMNEdge_flow1584003224678\">\r\n                <omgdi:waypoint x=\"534\" y=\"412\" />\r\n                <omgdi:waypoint x=\"479\" y=\"412\" />\r\n                <omgdi:waypoint x=\"479\" y=\"199\" />\r\n                <omgdi:waypoint x=\"424\" y=\"199\" />\r\n            </bpmndi:BPMNEdge>\r\n            <bpmndi:BPMNEdge bpmnElement=\"flow1584003230551\" id=\"BPMNEdge_flow1584003230551\">\r\n                <omgdi:waypoint x=\"374\" y=\"382\" />\r\n                <omgdi:waypoint x=\"374\" y=\"229\" />\r\n            </bpmndi:BPMNEdge>\r\n            <bpmndi:BPMNEdge bpmnElement=\"flow1584003258190\" id=\"BPMNEdge_flow1584003258190\">\r\n                <omgdi:waypoint x=\"324\" y=\"199\" />\r\n                <omgdi:waypoint x=\"304\" y=\"199\" />\r\n                <omgdi:waypoint x=\"304\" y=\"73\" />\r\n                <omgdi:waypoint x=\"324\" y=\"73\" />\r\n            </bpmndi:BPMNEdge>\r\n        </bpmndi:BPMNPlane>\r\n    </bpmndi:BPMNDiagram>\r\n</definitions>',NULL,NULL,'管理员','2020-03-13 08:09:29','admin','管理员','2020-03-12 16:36:36','admin','process1584002181279',1,'0',NULL);
INSERT INTO `t_p_processnode` (`id`, `formid`, `processid`, `processnodecode`, `processnodename`, `modelandview`, `modelandview_mobile`, `node_timeout`, `pnodecofigid`, `pushmode`, `delete_flag`) VALUES ('402880ed70cdb3830170cde5e127000e',NULL,'402880ed70cdb3830170cde3637d000d','task1584002198600','组织机构负责人','tBActivitiUserPostController.do?goView','tBActivitiUserPostController.do?goViewMobile',NULL,'402880ed70be5e8a0170bf1086f10013','no','0'),('402880ed70cdb3830170cdeadaa7000f',NULL,'402880ed70cdb3830170cde3637d000d','task1584002480505','项目管理部编制负责人','tBActivitiUserPostController.do?goView','tBActivitiUserPostController.do?goViewMobile',NULL,'402880ed70be5e8a0170bf1086f10013','no','0'),('402880ed70cdb3830170cdeadaaf0010',NULL,'402880ed70cdb3830170cde3637d000d','task1584002543899','项目管理部经理','tBActivitiUserPostController.do?goView','tBActivitiUserPostController.do?goViewMobile',NULL,'402880ed70be5e8a0170bf1086f10013','no','0'),('402880ed70cdb3830170cdeadab50011',NULL,'402880ed70cdb3830170cde3637d000d','task1584002579787','人事经理','tBActivitiUserPostController.do?goView','tBActivitiUserPostController.do?goViewMobile',NULL,'402880ed70be5e8a0170bf1086f10013','no','0'),('402880ed70cdb3830170cdeadacf0012',NULL,'402880ed70cdb3830170cde3637d000d','task1584002609482','总经理','tBActivitiUserPostController.do?goView','tBActivitiUserPostController.do?goViewMobile',NULL,'402880ed70be5e8a0170bf1086f10013','no','0'),('402880ed70cdb3830170cdf0db820013',NULL,'402880ed70cdb3830170cde3637d000d','task1584002808718','制单人重填','tBActivitiUserPostController.do?goView&flag=1','tBActivitiUserPostController.do?goViewMobile&flag=1',NULL,'402880ed70be5e8a0170bf10cb220015','no','0');
INSERT INTO `t_p_processnode_config` (`id`, `process_type`, `url_title`, `pc_url`, `mobile_url`) VALUES ('402880ed70be5e8a0170bf1086f10013','user_post','审批','tBActivitiUserPostController.do?goView','tBActivitiUserPostController.do?goViewMobile'),('402880ed70be5e8a0170bf10cb220015','user_post','制单人重填','tBActivitiUserPostController.do?goView&flag=1','tBActivitiUserPostController.do?goViewMobile&flag=1');
INSERT INTO `t_s_busconfig` (`id`, `busname`, `form_type`, `tableid`, `online_id`, `processid`, `bus_title_exp`, `process_deal_style`, `show_title`, `show_table`, `config_id`) VALUES ('402880ed70cdb3830170cdf16ed60014',NULL,'online','','t_b_activiti_user_post','402880ed70cdb3830170cde3637d000d','新增岗位签报','formdeal','新增岗位签报','新增岗位签报','402880ed70be5e8a0170bf0fa7320011');
INSERT INTO `t_process_busconfig` (`id`, `show_title`, `real_title`, `show_tablename`, `real_tablename`, `process_type`, `activiti_config_class`) VALUES ('402880ed70be5e8a0170bf0fa7320011','新增岗位签报','新增岗位签报','新增岗位签报','t_b_activiti_user_post','user_post','');



INSERT INTO `t_s_type` (`ID`,`typecode`,`typename`,`typepid`,`typegroupid`,`create_date`,`create_name`) VALUES ('402880ed70ae82a40170aee09f31003e','first','初次缴纳',NULL,'402880ed70ae82a40170aee02533003c',NULL,NULL);
INSERT INTO `t_s_type` (`ID`,`typecode`,`typename`,`typepid`,`typegroupid`,`create_date`,`create_name`) VALUES ('402880ed70ae82a40170aee182430040','supplement','补充缴纳',NULL,'402880ed70ae82a40170aee02533003c',NULL,NULL);
INSERT INTO `t_s_type` (`ID`,`typecode`,`typename`,`typepid`,`typegroupid`,`create_date`,`create_name`) VALUES ('402880ed70ae82a40170aee1ac700042','change_base','基数调整',NULL,'402880ed70ae82a40170aee02533003c',NULL,NULL);
INSERT INTO `t_s_type` (`ID`,`typecode`,`typename`,`typepid`,`typegroupid`,`create_date`,`create_name`) VALUES ('402880ed70ae82a40170aee1d9840044','change_company','缴纳单位变更',NULL,'402880ed70ae82a40170aee02533003c',NULL,NULL);
INSERT INTO `t_s_type` (`ID`,`typecode`,`typename`,`typepid`,`typegroupid`,`create_date`,`create_name`) VALUES ('402880ed70ae82a40170aee205fb0046','exit','退出缴纳',NULL,'402880ed70ae82a40170aee02533003c',NULL,NULL);
INSERT INTO `t_s_type` (`ID`,`typecode`,`typename`,`typepid`,`typegroupid`,`create_date`,`create_name`) VALUES ('402880ed70ae82a40170aee36a930048','difficulty','缴金转就困',NULL,'402880ed70ae82a40170aee02533003c',NULL,NULL);
INSERT INTO `t_s_type` (`ID`,`typecode`,`typename`,`typepid`,`typegroupid`,`create_date`,`create_name`) VALUES ('402880ed70ae82a40170aee3832d004a','auto','自费续交',NULL,'402880ed70ae82a40170aee02533003c',NULL,NULL);
INSERT INTO `t_s_type` (`ID`,`typecode`,`typename`,`typepid`,`typegroupid`,`create_date`,`create_name`) VALUES ('402880ed70ae82a40170aee39ba8004c','company','公司代缴',NULL,'402880ed70ae82a40170aee02533003c',NULL,NULL);
INSERT INTO `t_s_type` (`ID`,`typecode`,`typename`,`typepid`,`typegroupid`,`create_date`,`create_name`) VALUES ('402880ed70ae82a40170aee3bf0f004e','subsidy','员工补贴',NULL,'402880ed70ae82a40170aee02533003c',NULL,NULL);
INSERT INTO `t_s_type` (`ID`,`typecode`,`typename`,`typepid`,`typegroupid`,`create_date`,`create_name`) VALUES ('402880ed70ae82a40170aee3d5580050','other','其他',NULL,'402880ed70ae82a40170aee02533003c',NULL,NULL);
INSERT INTO `t_s_type` (`ID`,`typecode`,`typename`,`typepid`,`typegroupid`,`create_date`,`create_name`) VALUES ('402880ed70ae82a40170aede13020033','social_insurance','社保',NULL,'402880ed70ae82a40170aedda45f0031',NULL,NULL);
INSERT INTO `t_s_type` (`ID`,`typecode`,`typename`,`typepid`,`typegroupid`,`create_date`,`create_name`) VALUES ('402880ed70ae82a40170aede3cdc0035','fund','公积金',NULL,'402880ed70ae82a40170aedda45f0031',NULL,NULL);
INSERT INTO `t_s_type` (`ID`,`typecode`,`typename`,`typepid`,`typegroupid`,`create_date`,`create_name`) VALUES ('402880ed70ae82a40170aede7fbb0037','both','社保和公积金',NULL,'402880ed70ae82a40170aedda45f0031',NULL,NULL);
INSERT INTO `t_s_type` (`ID`,`typecode`,`typename`,`typepid`,`typegroupid`,`create_date`,`create_name`) VALUES ('402880ed70cc19590170cd8f9a4c0037','add','原有岗位增加人数',NULL,'402880ed70cc19590170cd8f71710035',NULL,NULL);

#签报工作台菜单
INSERT INTO `t_s_function`(`ID`, `functioniframe`, `functionlevel`, `functionname`, `functionorder`, `functionurl`, `parentfunctionid`, `iconid`, `desk_iconid`, `functiontype`, `function_icon_style`, `create_by`, `create_name`, `update_by`, `update_date`, `create_date`, `update_name`, `remark`) VALUES ('2c9358ad70d337420170d35d88900014', NULL, 1, '新增岗位签报', '22', 'tBActivitiUserPostController.do?list', 'ff8080816e687d71016e688eee2f0010', '8a8ab0b246dc81120146dc8180460000', '8a8ab0b246dc81120146dc8180dd001e', 1, 'fa fa-user-plus', 'admin', '管理员', NULL, NULL, '2020-03-13 18:08:07', NULL, '新增岗位或增加编制数量');
INSERT INTO `t_s_function`(`ID`, `functioniframe`, `functionlevel`, `functionname`, `functionorder`, `functionurl`, `parentfunctionid`, `iconid`, `desk_iconid`, `functiontype`, `function_icon_style`, `create_by`, `create_name`, `update_by`, `update_date`, `create_date`, `update_name`, `remark`) VALUES ('2c9358ad70d337420170d35c87120012', NULL, 1, '任免签报', '21', 'tBActivitiUserAppointController.do?list', 'ff8080816e687d71016e688eee2f0010', '8a8ab0b246dc81120146dc8180460000', '8a8ab0b246dc81120146dc8180dd001e', 1, 'fa fa-info', 'admin', '管理员', 'admin', '2020-03-13 18:15:29', '2020-03-13 18:07:01', '管理员', '人事任免');
INSERT INTO `t_s_function`(`ID`, `functioniframe`, `functionlevel`, `functionname`, `functionorder`, `functionurl`, `parentfunctionid`, `iconid`, `desk_iconid`, `functiontype`, `function_icon_style`, `create_by`, `create_name`, `update_by`, `update_date`, `create_date`, `update_name`, `remark`) VALUES ('2c9358ad70d337420170d35896c40010', NULL, 1, '社保公积金签报', '20', 'tBActivitiUserSocialInsuranceController.do?list', 'ff8080816e687d71016e688eee2f0010', '8a8ab0b246dc81120146dc8180460000', '8a8ab0b246dc81120146dc8180dd001e', 1, 'fa fa-street-view', 'admin', '管理员', 'admin', '2020-03-13 18:08:26', '2020-03-13 18:02:43', '管理员', '社保公积金签报');
INSERT INTO `t_s_function`(`ID`, `functioniframe`, `functionlevel`, `functionname`, `functionorder`, `functionurl`, `parentfunctionid`, `iconid`, `desk_iconid`, `functiontype`, `function_icon_style`, `create_by`, `create_name`, `update_by`, `update_date`, `create_date`, `update_name`, `remark`) VALUES ('2c9358ad70d337420170d356c875000e', NULL, 1, '人事类其他签报', '99', 'tBActivitiUserOtherController.do?list', 'ff8080816e687d71016e688eee2f0010', '8a8ab0b246dc81120146dc8180460000', '8a8ab0b246dc81120146dc8180dd001e', 1, 'fa fa-pencil-square-o', 'admin', '管理员', NULL, NULL, '2020-03-13 18:00:45', NULL, '其他签报');
#货品分类档案数据新增
INSERT INTO `t_b_goods_category`(`id`, `category_name`, `category_code`, `parent_categoryid`, `status`, `delete_flag`, `create_by`, `create_name`, `create_date`, `update_by`, `update_name`, `update_date`) VALUES ('ff80808170db868e0170db8751dd0001', '固定资产', 'rootA04', 'root', '0', '0', 'admin', '管理员', '2020-03-15 08:10:44', '', '', NULL);
INSERT INTO `t_b_goods_category`(`id`, `category_name`, `category_code`, `parent_categoryid`, `status`, `delete_flag`, `create_by`, `create_name`, `create_date`, `update_by`, `update_name`, `update_date`) VALUES ('ff80808170db868e0170db87b7650003', '应急采购', 'rootA05', 'root', '0', '0', 'admin', '管理员', '2020-03-15 08:11:10', '', '', NULL);
INSERT INTO `t_b_goods_category`(`id`, `category_name`, `category_code`, `parent_categoryid`, `status`, `delete_flag`, `create_by`, `create_name`, `create_date`, `update_by`, `update_name`, `update_date`) VALUES ('ff80808170db868e0170db87d5c30005', '其他', 'rootA06', 'root', '0', '0', 'admin', '管理员', '2020-03-15 08:11:17', '', '', NULL);
#货品大类字典
INSERT INTO `t_s_type`(`ID`, `typecode`, `typename`, `typepid`, `typegroupid`, `create_date`, `create_name`) VALUES ('ff80808170db868e0170dbe12428000e', 'rootA06', '其他', NULL, 'ff80808166106df501661372e9310184', '2020-03-15 09:48:50', '管理员');
INSERT INTO `t_s_type`(`ID`, `typecode`, `typename`, `typepid`, `typegroupid`, `create_date`, `create_name`) VALUES ('ff80808170db868e0170dbe0d796000c', 'rootA05', '应急采购', NULL, 'ff80808166106df501661372e9310184', '2020-03-15 09:48:30', '管理员');
INSERT INTO `t_s_type`(`ID`, `typecode`, `typename`, `typepid`, `typegroupid`, `create_date`, `create_name`) VALUES ('ff80808170db868e0170dbe09e9c000a', 'rootA04', '固定资产', NULL, 'ff80808166106df501661372e9310184', '2020-03-15 09:48:16', '管理员');
#任务来源类型：增加签报
INSERT INTO `t_s_type`(`ID`, `typecode`, `typename`, `typepid`, `typegroupid`, `create_date`, `create_name`) VALUES ('ff80808170e12b5f0170e1547041000a', 'activititask', '签报', NULL, '2c9358a865ef71b50165ef7724330001', '2020-03-16 11:12:52', '管理员');

#费用申请增加特殊说明
ALTER TABLE `t_b_activiti_cost_request` ADD COLUMN `special` VARCHAR(255) NULL COMMENT '特殊说明';

#修复执行流中任务名错误
update	p_activiti_task set name='${realname}平级调动，完成档案调动工作' where id='402881e56c4d997d016c4da4f3710012';


#物料类其他签报 开始
#采购单修改
ALTER TABLE `t_b_porders`
ADD COLUMN `source_type` VARCHAR(45) NULL COMMENT '来源类型' ,
ADD COLUMN `source_id` VARCHAR(45) NULL COMMENT '来源id' ,
ADD COLUMN `auto` INT NULL COMMENT '自动生成的订单\n0 否 1是' default 0;
ALTER TABLE `t_b_porder_details` ADD COLUMN `source_type` VARCHAR(45) NULL COMMENT '来源类型' ;

update t_b_porder_details set source_type='normal' where source_b_id is null and id <>'';
update t_b_porder_details set source_type='orders' where source_b_id is not null and id <>'';
update t_b_porders orders set orders.source_id = (select distinct source_id from t_b_porder_details detail where detail.fk_id=orders.id) where orders.id<>'';
update t_b_porders set source_type='normal' where source_id is null and id <>'';
update t_b_porders set source_type='orders' where source_id is not null and id <>'';

INSERT INTO `t_s_type` (`ID`, `typecode`, `typename`, `typepid`, `typegroupid`, `create_date`, `create_name`) VALUES ('402881e570eb5e200170eb829f720013','orders_fix_asset','物料类其他签报',NULL,'402889fe47eddd340147ede15c070001','2020-03-18 10:39:31','管理员');
INSERT INTO `t_s_function` (`ID`, `functioniframe`, `functionlevel`, `functionname`, `functionorder`, `functionurl`, `parentfunctionid`, `iconid`, `desk_iconid`, `functiontype`, `function_icon_style`, `create_by`, `create_name`, `update_by`, `update_date`, `create_date`, `update_name`, `remark`) VALUES ('402881e570e746c10170e750348b0004',NULL,1,'物料类其他签报','70','ordersFixAssetController.do?listByWarehouse','ff80808166106df50166137f135205c0','8a8ab0b246dc81120146dc8180460000','8a8ab0b246dc81120146dc8180dd001e',0,'','admin','管理员','admin','2020-03-17 15:08:13','2020-03-17 15:05:58','管理员','');

CREATE TABLE `t_b_orders_fix_asset` (
  `id` varchar(36) NOT NULL,
  `order_date` datetime DEFAULT NULL COMMENT '单据日期',
  `order_onumber` varchar(20) DEFAULT NULL COMMENT '单据编码',
  `order_type` varchar(20) DEFAULT NULL COMMENT '申购类型',
  `order_months` varchar(150) DEFAULT NULL COMMENT '申购月份',
  `supplier_id` varchar(36) DEFAULT NULL COMMENT '供应商ID',
  `supplier_name` varchar(50) DEFAULT NULL COMMENT '供应商名称',
  `pay_account` varchar(32) DEFAULT NULL COMMENT '付款账户',
  `warehouse_id` varchar(36) DEFAULT NULL COMMENT '仓库ID',
  `warehouse_name` varchar(50) DEFAULT NULL COMMENT '仓库名称',
  `prepaid_money` double DEFAULT NULL COMMENT '预付定金',
  `handler_person_id` varchar(36) DEFAULT NULL COMMENT '经手人ID',
  `handler_person` varchar(36) DEFAULT NULL COMMENT '经手人名称',
  `total_money` double DEFAULT NULL COMMENT '总金额',
  `discount_money` double DEFAULT NULL COMMENT '整单优惠',
  `amount_payable` double DEFAULT NULL COMMENT '优惠后金额',
  `order_status` varchar(2) DEFAULT NULL COMMENT '单据状态',
  `order_auditor` varchar(32) DEFAULT NULL COMMENT '审核人',
  `audit_date` datetime DEFAULT NULL COMMENT '审核日期',
  `create_name` varchar(50) DEFAULT NULL COMMENT '',
  `create_by` varchar(50) DEFAULT NULL COMMENT '',
  `create_date` datetime DEFAULT NULL COMMENT '',
  `update_name` varchar(50) DEFAULT NULL COMMENT '',
  `update_by` varchar(50) DEFAULT NULL COMMENT '',
  `update_date` datetime DEFAULT NULL COMMENT '',
  `bpm_status` varchar(32) DEFAULT '1' COMMENT '',
  `proc_inst_id` varchar(64) DEFAULT NULL,
  `step_name` varchar(50) DEFAULT NULL,
  `guding_sum` double DEFAULT NULL COMMENT '固定资产类合计',
  `yingji_sum` double DEFAULT NULL COMMENT '应急采购类合计',
  `qita_sum` double DEFAULT NULL COMMENT '其他类合计',
  `description` varchar(255) DEFAULT NULL,
  `order_for` varchar(45) DEFAULT NULL COMMENT '0公司采购\n1自行采购',
  `depart_id` varchar(45) DEFAULT NULL,
  `dep_name` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE `t_b_order_fix_asset_products` (
  `id` varchar(36) NOT NULL COMMENT '',
  `pnumber` varchar(16) DEFAULT NULL COMMENT '产品编码',
  `pname` varchar(32) DEFAULT NULL COMMENT '产品名称',
  `spec_type` varchar(50) DEFAULT NULL COMMENT '规格型号',
  `measure_unit` varchar(10) DEFAULT NULL COMMENT '计量单位',
  `quantity` double DEFAULT NULL COMMENT '数量',
  `purchase_price` double DEFAULT NULL COMMENT '采购单价',
  `money` double DEFAULT NULL COMMENT '金额',
  `quantity_arrived` double DEFAULT NULL COMMENT '已到货数量',
  `quantity_not_arrived` double DEFAULT NULL,
  `quantity_returned` double DEFAULT NULL,
  `remark` varchar(100) DEFAULT NULL COMMENT '',
  `fk_id` varchar(36) DEFAULT NULL,
  `goods_id` varchar(36) DEFAULT NULL COMMENT '货品主键ID',
  `create_name` varchar(50) DEFAULT NULL COMMENT '',
  `create_by` varchar(50) DEFAULT NULL COMMENT '',
  `create_date` datetime DEFAULT NULL COMMENT '',
  `update_name` varchar(50) DEFAULT NULL COMMENT '',
  `update_by` varchar(50) DEFAULT NULL COMMENT '',
  `update_date` datetime DEFAULT NULL COMMENT '',
  `bpm_status` varchar(32) DEFAULT '1' COMMENT '',
  `belong_category_code` varchar(255) DEFAULT NULL COMMENT '分类code',
  `belong_category_name` varchar(255) DEFAULT NULL COMMENT '分类名',
  `supplier_id` varchar(45) DEFAULT NULL COMMENT '供应商id',
  `supplier_name` varchar(255) DEFAULT NULL COMMENT '供应商名称',
  `pay_type` varchar(45) DEFAULT NULL COMMENT '报销类型',
  `pay_id` varchar(45) DEFAULT NULL COMMENT '报销id',
  `pay_time` timestamp NULL DEFAULT NULL COMMENT '报销时间',
  `pay_process_end_time` timestamp NULL DEFAULT NULL COMMENT '报销审核通过时间',
  `pay_status` int(11) DEFAULT NULL COMMENT '是否报销\n0 没报销 1已报销',
  PRIMARY KEY (`id`),
  KEY `FK_t_b_ordcts_fk_id8AB5` (`fk_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

INSERT INTO `t_p_process` (`id`, `typeid`, `userid`, `processname`, `processxmlpath`, `processxml`, `processxmname`, `note`, `update_name`, `update_date`, `update_by`, `create_name`, `create_date`, `create_by`, `processkey`, `processstate`, `processtype`, `ccmode`) VALUES ('402881e570eb5e200170eb86b60f0015','orders_fix_asset',NULL,'物料类其他签报',NULL,'<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<definitions  xmlns=\"http://www.omg.org/spec/BPMN/20100524/MODEL\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:activiti=\"http://activiti.org/bpmn\" xmlns:bpmndi=\"http://www.omg.org/spec/BPMN/20100524/DI\" xmlns:omgdc=\"http://www.omg.org/spec/DD/20100524/DC\" xmlns:omgdi=\"http://www.omg.org/spec/DD/20100524/DI\" typeLanguage=\"http://www.w3.org/2001/XMLSchema\" expressionLanguage=\"http://www.w3.org/1999/XPath\" targetNamespace=\"http://www.lzt.com.cn\">\r\n    <process  id=\"process1584499183877\" name=\"物料类其他签报\">\r\n        <documentation>流程描述</documentation>\r\n        <extensionElements>\r\n            <activiti:executionListener id=\"402880e54803a496014805e5d9190012\" event=\"end\" class=\"org.jeecgframework.workflow.listener.execution.ProcessEndListener\" >\r\n            </activiti:executionListener>\r\n            <activiti:executionListener id=\"402880ed6ded2240016dedd28f5d001f\" event=\"end\" class=\"cn.com.lzt.workflow.listener.task.BusinessProcessEndListener\" >\r\n            </activiti:executionListener>\r\n        </extensionElements>\r\n        <startEvent  id=\"start1\" name=\"开始节点\" activiti:initiator=\"applyUserId\">\r\n        </startEvent>\r\n        <endEvent  id=\"end\" name=\"结束节点\">\r\n        </endEvent>\r\n        <userTask  id=\"task1584499205742\" name=\"组织机构负责人\" activiti:candidateUsers=\"${flowUtil.customerUserSelect(BPM_FORM_KEY,BPM_DATA_ID,\'DEPART_MANAGER\')}\" >\r\n        </userTask>\r\n        <userTask  id=\"task1584499252533\" name=\"制单人重填\" activiti:assignee=\"${applyUserId}\" >\r\n        </userTask>\r\n        <userTask  id=\"task1584499333299\" name=\"采购副经理\" activiti:candidateUsers=\"${flowUtil.getUserInproject(BPM_FORM_KEY,BPM_DATA_ID,\'A_XZBFJL\')}\" >\r\n        </userTask>\r\n        <userTask  id=\"task1584499374143\" name=\"采购经理\" activiti:candidateUsers=\"${flowUtil.getUserInproject(BPM_FORM_KEY,BPM_DATA_ID,\'A_XZBJL\')}\" >\r\n        </userTask>\r\n        <userTask  id=\"task1584693358922\" name=\"总经理\" activiti:candidateUsers=\"${flowUtil.getUserInproject(BPM_FORM_KEY,BPM_DATA_ID,\'M_ZJL\')}\" >\r\n        </userTask>\r\n        <sequenceFlow  id=\"flow1584499251017\" name=\"\" sourceRef=\"start1\" targetRef=\"task1584499205742\">\r\n        </sequenceFlow>\r\n        <sequenceFlow  id=\"flow1584499270146\" name=\"驳回\" sourceRef=\"task1584499205742\" targetRef=\"task1584499252533\">\r\n        </sequenceFlow>\r\n        <sequenceFlow  id=\"flow1584499359405\" name=\"通过\" sourceRef=\"task1584499205742\" targetRef=\"task1584499333299\">\r\n        </sequenceFlow>\r\n        <sequenceFlow  id=\"flow1584499367583\" name=\"通过\" sourceRef=\"task1584499333299\" targetRef=\"task1584499374143\">\r\n        </sequenceFlow>\r\n        <sequenceFlow  id=\"flow1584499397307\" name=\"通过\" sourceRef=\"task1584499374143\" targetRef=\"task1584693358922\">\r\n        </sequenceFlow>\r\n        <sequenceFlow  id=\"flow1584499417284\" name=\"提交\" sourceRef=\"task1584499252533\" targetRef=\"task1584499205742\">\r\n        </sequenceFlow>\r\n        <sequenceFlow  id=\"flow1584499429560\" name=\"驳回\" sourceRef=\"task1584499333299\" targetRef=\"task1584499252533\">\r\n        </sequenceFlow>\r\n        <sequenceFlow  id=\"flow1584499434953\" name=\"驳回\" sourceRef=\"task1584499374143\" targetRef=\"task1584499252533\">\r\n        </sequenceFlow>\r\n        <sequenceFlow  id=\"flow1584693437074\" name=\"通过\" sourceRef=\"task1584693358922\" targetRef=\"end\">\r\n        </sequenceFlow>\r\n        <sequenceFlow  id=\"flow1584693447323\" name=\"驳回\" sourceRef=\"task1584693358922\" targetRef=\"task1584499252533\">\r\n        </sequenceFlow>\r\n    </process>\r\n    <bpmndi:BPMNDiagram id=\"BPMNDiagram_process1584499183877\">\r\n        <bpmndi:BPMNPlane bpmnElement=\"process1584499183877\" id=\"BPMNPlane_process1584499183877\">\r\n            <bpmndi:BPMNShape bpmnElement=\"start1\" id=\"BPMNShape_start1\">\r\n                <omgdc:Bounds height=\"30\" width=\"30\" x=\"200\" y=\"50\"/>\r\n            </bpmndi:BPMNShape>\r\n            <bpmndi:BPMNShape bpmnElement=\"end\" id=\"BPMNShape_end\">\r\n                <omgdc:Bounds height=\"30\" width=\"30\" x=\"200\" y=\"604\"/>\r\n            </bpmndi:BPMNShape>\r\n            <bpmndi:BPMNShape bpmnElement=\"task1584499205742\" id=\"BPMNShape_task1584499205742\">\r\n                <omgdc:Bounds height=\"50\" width=\"90\" x=\"170\" y=\"165\"/>\r\n            </bpmndi:BPMNShape>\r\n            <bpmndi:BPMNShape bpmnElement=\"task1584499252533\" id=\"BPMNShape_task1584499252533\">\r\n                <omgdc:Bounds height=\"50\" width=\"90\" x=\"362\" y=\"164\"/>\r\n            </bpmndi:BPMNShape>\r\n            <bpmndi:BPMNShape bpmnElement=\"task1584499333299\" id=\"BPMNShape_task1584499333299\">\r\n                <omgdc:Bounds height=\"50\" width=\"90\" x=\"170\" y=\"270\"/>\r\n            </bpmndi:BPMNShape>\r\n            <bpmndi:BPMNShape bpmnElement=\"task1584499374143\" id=\"BPMNShape_task1584499374143\">\r\n                <omgdc:Bounds height=\"50\" width=\"90\" x=\"170\" y=\"382\"/>\r\n            </bpmndi:BPMNShape>\r\n            <bpmndi:BPMNShape bpmnElement=\"task1584693358922\" id=\"BPMNShape_task1584693358922\">\r\n                <omgdc:Bounds height=\"50\" width=\"90\" x=\"170\" y=\"493\"/>\r\n            </bpmndi:BPMNShape>\r\n            <bpmndi:BPMNEdge bpmnElement=\"flow1584499251017\" id=\"BPMNEdge_flow1584499251017\">\r\n                <omgdi:waypoint x=\"215\" y=\"80\" />\r\n                <omgdi:waypoint x=\"215\" y=\"160\" />\r\n            </bpmndi:BPMNEdge>\r\n            <bpmndi:BPMNEdge bpmnElement=\"flow1584499270146\" id=\"BPMNEdge_flow1584499270146\">\r\n                <omgdi:waypoint x=\"265\" y=\"190\" />\r\n                <omgdi:waypoint x=\"311\" y=\"190\" />\r\n                <omgdi:waypoint x=\"311\" y=\"189\" />\r\n                <omgdi:waypoint x=\"357\" y=\"189\" />\r\n            </bpmndi:BPMNEdge>\r\n            <bpmndi:BPMNEdge bpmnElement=\"flow1584499359405\" id=\"BPMNEdge_flow1584499359405\">\r\n                <omgdi:waypoint x=\"215\" y=\"220\" />\r\n                <omgdi:waypoint x=\"215\" y=\"265\" />\r\n            </bpmndi:BPMNEdge>\r\n            <bpmndi:BPMNEdge bpmnElement=\"flow1584499367583\" id=\"BPMNEdge_flow1584499367583\">\r\n                <omgdi:waypoint x=\"215\" y=\"325\" />\r\n                <omgdi:waypoint x=\"215\" y=\"377\" />\r\n            </bpmndi:BPMNEdge>\r\n            <bpmndi:BPMNEdge bpmnElement=\"flow1584499397307\" id=\"BPMNEdge_flow1584499397307\">\r\n                <omgdi:waypoint x=\"215\" y=\"437\" />\r\n                <omgdi:waypoint x=\"215\" y=\"488\" />\r\n            </bpmndi:BPMNEdge>\r\n            <bpmndi:BPMNEdge bpmnElement=\"flow1584499417284\" id=\"BPMNEdge_flow1584499417284\">\r\n                <omgdi:waypoint x=\"407\" y=\"159\" />\r\n                <omgdi:waypoint x=\"407\" y=\"139\" />\r\n                <omgdi:waypoint x=\"215\" y=\"139\" />\r\n                <omgdi:waypoint x=\"215\" y=\"160\" />\r\n            </bpmndi:BPMNEdge>\r\n            <bpmndi:BPMNEdge bpmnElement=\"flow1584499429560\" id=\"BPMNEdge_flow1584499429560\">\r\n                <omgdi:waypoint x=\"265\" y=\"295\" />\r\n                <omgdi:waypoint x=\"407\" y=\"295\" />\r\n                <omgdi:waypoint x=\"407\" y=\"219\" />\r\n            </bpmndi:BPMNEdge>\r\n            <bpmndi:BPMNEdge bpmnElement=\"flow1584499434953\" id=\"BPMNEdge_flow1584499434953\">\r\n                <omgdi:waypoint x=\"265\" y=\"407\" />\r\n                <omgdi:waypoint x=\"407\" y=\"407\" />\r\n                <omgdi:waypoint x=\"407\" y=\"219\" />\r\n            </bpmndi:BPMNEdge>\r\n            <bpmndi:BPMNEdge bpmnElement=\"flow1584693437074\" id=\"BPMNEdge_flow1584693437074\">\r\n                <omgdi:waypoint x=\"215\" y=\"548\" />\r\n                <omgdi:waypoint x=\"215\" y=\"604\" />\r\n            </bpmndi:BPMNEdge>\r\n            <bpmndi:BPMNEdge bpmnElement=\"flow1584693447323\" id=\"BPMNEdge_flow1584693447323\">\r\n                <omgdi:waypoint x=\"265\" y=\"518\" />\r\n                <omgdi:waypoint x=\"407\" y=\"518\" />\r\n                <omgdi:waypoint x=\"407\" y=\"219\" />\r\n            </bpmndi:BPMNEdge>\r\n        </bpmndi:BPMNPlane>\r\n    </bpmndi:BPMNDiagram>\r\n</definitions>',NULL,NULL,'管理员','2020-03-20 19:00:53','admin','管理员','2020-03-18 10:43:59','admin','process1584499183877',1,'0',NULL);

INSERT INTO `t_p_processnode` (`id`, `formid`, `processid`, `processnodecode`, `processnodename`, `modelandview`, `modelandview_mobile`, `node_timeout`, `pnodecofigid`, `pushmode`, `delete_flag`) VALUES ('402881e570eb5e200170eb86b66c0016',NULL,'402881e570eb5e200170eb86b60f0015','task1584499205742','组织机构负责人','ordersFixAssetController.do?goView&flag=2','ordersFixAssetController.do?goViewMobile&flag=2',NULL,'402881e570eb5e200170eb8a3565001c','no','0'),('402881e570eb5e200170eb86b6b10017',NULL,'402881e570eb5e200170eb86b60f0015','task1584499252533','制单人重填','ordersFixAssetController.do?goView&flag=1','ordersFixAssetController.do?goViewMobile&flag=1',NULL,'402881e570eb5e200170eb8aa30d001e','no','0'),('402881e570eb5e200170eb86b6b90018',NULL,'402881e570eb5e200170eb86b60f0015','task1584499333299','采购副经理','ordersFixAssetController.do?goView&flag=3','ordersFixAssetController.do?goViewMobile&flag=3',NULL,'402881e570eb5e200170eb8b75a70020','no','0'),('402881e570eb5e200170eb86b6c10019',NULL,'402881e570eb5e200170eb86b60f0015','task1584499374143','采购经理','ordersFixAssetController.do?goView&flag=4','ordersFixAssetController.do?goViewMobile&flag=4',NULL,'402881e570eb5e200170eb8dcb660024','no','0'),('402881e570f6e3a60170f71723840036',NULL,'402881e570eb5e200170eb86b60f0015','task1584693358922','总经理','ordersFixAssetController.do?goView&flag=4','ordersFixAssetController.do?goViewMobile&flag=4',NULL,'402881e570eb5e200170eb8dcb660024','no','0');
INSERT INTO `t_p_processnode_config` (`id`, `process_type`, `url_title`, `pc_url`, `mobile_url`) VALUES ('402881e570eb5e200170eb8a3565001c','orders_fix_asset','审批（金额不可查看）','ordersFixAssetController.do?goView&flag=2','ordersFixAssetController.do?goViewMobile&flag=2'),('402881e570eb5e200170eb8aa30d001e','orders_fix_asset','制单人重填','ordersFixAssetController.do?goView&flag=1','ordersFixAssetController.do?goViewMobile&flag=1'),('402881e570eb5e200170eb8b75a70020','orders_fix_asset','审批(金额可查看可修改)','ordersFixAssetController.do?goView&flag=3','ordersFixAssetController.do?goViewMobile&flag=3'),('402881e570eb5e200170eb8dcb660024','orders_fix_asset','审批（金额可查看不可修改）','ordersFixAssetController.do?goView&flag=4','ordersFixAssetController.do?goViewMobile&flag=4');
INSERT INTO `t_s_busconfig` (`id`, `busname`, `form_type`, `tableid`, `online_id`, `processid`, `bus_title_exp`, `process_deal_style`, `show_title`, `show_table`, `config_id`) VALUES ('402881e570eb5e200170eb8ec7560029',NULL,'online','','t_b_orders_fix_asset','402881e570eb5e200170eb86b60f0015','物料类其他签报','formdeal','物料类其他签报','物料类其他签报','402881e570eb5e200170eb87800e001a');
INSERT INTO `t_process_busconfig` (`id`, `show_title`, `real_title`, `show_tablename`, `real_tablename`, `process_type`, `activiti_config_class`) VALUES ('402881e570eb5e200170eb87800e001a','物料类其他签报','物料类其他签报','物料类其他签报','t_b_orders_fix_asset','orders_fix_asset','');
#物料类其他签报 结束


#报销增加物料签报来源
ALTER TABLE `t_b_activiti_cost_pay_inner_user`
ADD COLUMN `source_type` VARCHAR(255) NULL COMMENT '报销来源类型 :cost_request 费用申请,fix_asset 物料签报';
update t_b_activiti_cost_pay_inner_user set source_type='cost_request';

ALTER TABLE `t_b_activiti_cost_pay_inner_user_detail`
ADD COLUMN `source_type` VARCHAR(255) NULL COMMENT '报销来源类型 :cost_request 费用申请,fix_asset 物料签报';
update t_b_activiti_cost_pay_inner_user_detail set source_type='cost_request';
update t_b_activiti_cost_pay_inner_user_detail d
set d.finance_subject =(select req.cost_type from t_b_activiti_cost_request req where req.id=d.request_id)
where d.source_type='cost_request';

ALTER TABLE `t_b_activiti_cost_pay_tmp_company`
ADD COLUMN `cost_type_id` VARCHAR(45) NULL COMMENT '费用类型id',
ADD COLUMN `expect_money` DECIMAL(10,2) NULL COMMENT '预计金额' ,
ADD COLUMN `request_summary` VARCHAR(255) NULL COMMENT '摘要',
ADD COLUMN `source_type` VARCHAR(45) NULL COMMENT '报销来源类型 :cost_request 费用申请,fix_asset 物料签报';
update t_b_activiti_cost_pay_tmp_company set source_type='cost_request';
update t_b_activiti_cost_pay_tmp_company com
set com.expect_money =(select expect_money from t_b_activiti_cost_request req where req.id=com.request_id)
,com.cost_type_id = (select cost_type from t_b_activiti_cost_request req where req.id=com.request_id)
,com.request_summary = (select summary from t_b_activiti_cost_request req where req.id=com.request_id)
where com.source_type='cost_request';

update t_b_activiti_cost_request set status=1 where status=2;

alter table `t_b_orders_fix_asset`
 ADD COLUMN  `pay_type` varchar(45) DEFAULT NULL COMMENT '报销类型',
  ADD COLUMN  `pay_id` varchar(45) DEFAULT NULL COMMENT '报销id',
  ADD COLUMN  `pay_time` timestamp NULL DEFAULT NULL COMMENT '报销时间',
  ADD COLUMN  `pay_process_end_time` timestamp NULL DEFAULT NULL COMMENT '报销审核通过时间',
  ADD COLUMN  `pay_status` int(11) DEFAULT 0 COMMENT '是否报销\n0 没报销 1已报销';

INSERT ignore INTO `t_s_type`(`ID`, `typecode`, `typename`, `typepid`, `typegroupid`, `create_date`, `create_name`) VALUES ('ff80808170f809360171055ea7420391', '550109', '固定资产折旧', NULL, '402880ed6df1ef0e016df2f5d35a0040', NULL, NULL);
INSERT INTO `t_b_cost_type` (`id`,`create_name`,`create_by`,`create_date`,`update_name`,`update_by`,`update_date`,`sys_org_code`,`sys_company_code`,`bpm_status`,`code`,`name`,`finance_subject`,`paytype`,`examine_type`) VALUES ('402880ed7114ba6d017114be9acb0001','管理员','admin','2020-03-26 10:49:28','管理员','admin','2020-03-26 10:49:35','A06A01','A06','1','CT202003260001','固定资产折旧','550109','cash','需要总经理审批');

#工伤签报开始

CREATE TABLE `t_b_activiti_user_injury` (
  `id` varchar(36) NOT NULL,
  `create_name` varchar(50) DEFAULT NULL COMMENT '创建人名称',
  `create_by` varchar(50) DEFAULT NULL COMMENT '创建人登录名称',
  `create_date` datetime DEFAULT NULL COMMENT '创建日期',
  `update_name` varchar(50) DEFAULT NULL COMMENT '更新人名称',
  `update_by` varchar(50) DEFAULT NULL COMMENT '更新人登录名称',
  `update_date` datetime DEFAULT NULL COMMENT '更新日期',
  `sys_org_code` varchar(50) DEFAULT NULL COMMENT '所属部门',
  `sys_company_code` varchar(50) DEFAULT NULL COMMENT '所属公司',
  `bpm_status` varchar(32) DEFAULT '1' COMMENT '流程状态',
  `proc_inst_id` varchar(50) DEFAULT NULL COMMENT '流程id',
  `step_name` varchar(255) DEFAULT NULL COMMENT '流程步骤',
  `depart_id` varchar(32) DEFAULT NULL COMMENT '组织机构id',
  `dep_name` varchar(255) DEFAULT NULL COMMENT '组织机构',
  `userid` varchar(32) DEFAULT NULL COMMENT '员工id',
  `real_name` varchar(32) DEFAULT NULL COMMENT '员工姓名',
  `user_type` varchar(255) DEFAULT NULL COMMENT '员工类型',
  `injury_date` date DEFAULT NULL COMMENT '事故日期',
  `descn` longtext COMMENT '情况说明',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

INSERT INTO `t_s_type` (`ID`, `typecode`, `typename`, `typepid`, `typegroupid`, `create_date`, `create_name`) VALUES ('402880ed712ab6ab01712ab856df0001','user_injury','工伤签报',NULL,'402889fe47eddd340147ede15c070001','2020-03-30 17:14:16','管理员'),('402880ed712ab6ab01712ab8a8350003','user_injury','工伤签报',NULL,'4028819b65a8b81c0165a9182bee0015','2020-03-30 17:14:37','管理员');

INSERT INTO `t_s_function` (`ID`, `functioniframe`, `functionlevel`, `functionname`, `functionorder`, `functionurl`, `parentfunctionid`, `iconid`, `desk_iconid`, `functiontype`, `function_icon_style`, `create_by`, `create_name`, `update_by`, `update_date`, `create_date`, `update_name`, `remark`) VALUES ('402880ed712ab6ab01712adb8ec40010',NULL,1,'工伤签报','58','tBActivitiUserInjuryController.do?list','402881e56dc9460b016dc94749800001','8a8ab0b246dc81120146dc8180460000','8a8ab0b246dc81120146dc8180dd001e',0,'','admin','管理员',NULL,NULL,'2020-03-30 17:52:44',NULL,'工伤签报');
INSERT INTO `p_activiti_task` (`id`, `create_name`, `create_by`, `create_date`, `update_name`, `update_by`, `update_date`, `sys_org_code`, `sys_company_code`, `bpm_status`, `name`, `process_id`, `process_name`, `task_cost_time`, `task_cost_time_type`, `execute_type`, `execute_way`, `form`, `owner_role`, `owner_role_name`, `important`, `execute_class`, `task_delay`, `task_type`, `check_result`) VALUES ('402880ed712d887301712e911289000e','管理员','admin','2020-03-31 11:09:52',NULL,NULL,NULL,'A06A01','A06','1','${real_name}工伤签报已通过，请及时处理','402880ed712ab6ab01712abcf4aa000b','工伤签报',15,'day','offline','pc','#','ff80808170a0a8b80170a99d1ebd00d1','人事工伤处理专员',99,'com.xcgl.activititask.util.impl.UserActivitiTaskHandler',0,'user_injury','not_check');
INSERT INTO `t_p_process` (`id`, `typeid`, `userid`, `processname`, `processxmlpath`, `processxml`, `processxmname`, `note`, `update_name`, `update_date`, `update_by`, `create_name`, `create_date`, `create_by`, `processkey`, `processstate`, `processtype`, `ccmode`) VALUES ('402880ed712ab6ab01712abcf4aa000b','user_injury',NULL,'工伤签报',NULL,'<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<definitions  xmlns=\"http://www.omg.org/spec/BPMN/20100524/MODEL\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:activiti=\"http://activiti.org/bpmn\" xmlns:bpmndi=\"http://www.omg.org/spec/BPMN/20100524/DI\" xmlns:omgdc=\"http://www.omg.org/spec/DD/20100524/DC\" xmlns:omgdi=\"http://www.omg.org/spec/DD/20100524/DI\" typeLanguage=\"http://www.w3.org/2001/XMLSchema\" expressionLanguage=\"http://www.w3.org/1999/XPath\" targetNamespace=\"http://www.lzt.com.cn\">\r\n    <process  id=\"process1585559860499\" name=\"工伤签报\">\r\n        <documentation>流程描述</documentation>\r\n        <extensionElements>\r\n            <activiti:executionListener id=\"402880e54803a496014805e5d9190012\" event=\"end\" class=\"org.jeecgframework.workflow.listener.execution.ProcessEndListener\" >\r\n            </activiti:executionListener>\r\n            <activiti:executionListener id=\"402881e56c035875016c03a921af0032\" event=\"end\" class=\"cn.com.lzt.workflow.listener.task.ActivitiTaskListener\" >\r\n            </activiti:executionListener>\r\n        </extensionElements>\r\n        <startEvent  id=\"start1\" name=\"开始节点\" activiti:initiator=\"applyUserId\">\r\n        </startEvent>\r\n        <endEvent  id=\"end\" name=\"结束节点\">\r\n        </endEvent>\r\n        <userTask  id=\"task1585559900371\" name=\"组织机构负责人\" activiti:candidateUsers=\"${flowUtil.customerUserSelect(BPM_FORM_KEY,BPM_DATA_ID,\'DEPART_MANAGER\')}\" >\r\n        </userTask>\r\n        <userTask  id=\"task1585559923112\" name=\"制单人重填\" activiti:assignee=\"${applyUserId}\" >\r\n        </userTask>\r\n        <userTask  id=\"task1585623201082\" name=\"人事经理\" activiti:candidateUsers=\"${flowUtil.getUserInproject(BPM_FORM_KEY,BPM_DATA_ID,\'A_HRJL\')}\" >\r\n        </userTask>\r\n        <sequenceFlow  id=\"flow1585559910937\" name=\"\" sourceRef=\"start1\" targetRef=\"task1585559900371\">\r\n        </sequenceFlow>\r\n        <sequenceFlow  id=\"flow1585559912723\" name=\"通过\" sourceRef=\"task1585559900371\" targetRef=\"task1585623201082\">\r\n        </sequenceFlow>\r\n        <sequenceFlow  id=\"flow1585559937225\" name=\"驳回\" sourceRef=\"task1585559900371\" targetRef=\"task1585559923112\">\r\n        </sequenceFlow>\r\n        <sequenceFlow  id=\"flow1585559952682\" name=\"提交\" sourceRef=\"task1585559923112\" targetRef=\"task1585559900371\">\r\n        </sequenceFlow>\r\n        <sequenceFlow  id=\"flow1585623243361\" name=\"通过\" sourceRef=\"task1585623201082\" targetRef=\"end\">\r\n        </sequenceFlow>\r\n        <sequenceFlow  id=\"flow1585623411383\" name=\"驳回\" sourceRef=\"task1585623201082\" targetRef=\"task1585559923112\">\r\n        </sequenceFlow>\r\n    </process>\r\n    <bpmndi:BPMNDiagram id=\"BPMNDiagram_process1585559860499\">\r\n        <bpmndi:BPMNPlane bpmnElement=\"process1585559860499\" id=\"BPMNPlane_process1585559860499\">\r\n            <bpmndi:BPMNShape bpmnElement=\"start1\" id=\"BPMNShape_start1\">\r\n                <omgdc:Bounds height=\"30\" width=\"30\" x=\"200\" y=\"50\"/>\r\n            </bpmndi:BPMNShape>\r\n            <bpmndi:BPMNShape bpmnElement=\"end\" id=\"BPMNShape_end\">\r\n                <omgdc:Bounds height=\"30\" width=\"30\" x=\"200\" y=\"400\"/>\r\n            </bpmndi:BPMNShape>\r\n            <bpmndi:BPMNShape bpmnElement=\"task1585559900371\" id=\"BPMNShape_task1585559900371\">\r\n                <omgdc:Bounds height=\"50\" width=\"90\" x=\"170\" y=\"152\"/>\r\n            </bpmndi:BPMNShape>\r\n            <bpmndi:BPMNShape bpmnElement=\"task1585559923112\" id=\"BPMNShape_task1585559923112\">\r\n                <omgdc:Bounds height=\"50\" width=\"90\" x=\"368\" y=\"152\"/>\r\n            </bpmndi:BPMNShape>\r\n            <bpmndi:BPMNShape bpmnElement=\"task1585623201082\" id=\"BPMNShape_task1585623201082\">\r\n                <omgdc:Bounds height=\"50\" width=\"90\" x=\"170\" y=\"257\"/>\r\n            </bpmndi:BPMNShape>\r\n            <bpmndi:BPMNEdge bpmnElement=\"flow1585559910937\" id=\"BPMNEdge_flow1585559910937\">\r\n                <omgdi:waypoint x=\"215\" y=\"80\" />\r\n                <omgdi:waypoint x=\"215\" y=\"147\" />\r\n            </bpmndi:BPMNEdge>\r\n            <bpmndi:BPMNEdge bpmnElement=\"flow1585559912723\" id=\"BPMNEdge_flow1585559912723\">\r\n                <omgdi:waypoint x=\"215\" y=\"207\" />\r\n                <omgdi:waypoint x=\"215\" y=\"252\" />\r\n            </bpmndi:BPMNEdge>\r\n            <bpmndi:BPMNEdge bpmnElement=\"flow1585559937225\" id=\"BPMNEdge_flow1585559937225\">\r\n                <omgdi:waypoint x=\"265\" y=\"177\" />\r\n                <omgdi:waypoint x=\"363\" y=\"177\" />\r\n            </bpmndi:BPMNEdge>\r\n            <bpmndi:BPMNEdge bpmnElement=\"flow1585559952682\" id=\"BPMNEdge_flow1585559952682\">\r\n                <omgdi:waypoint x=\"413\" y=\"147\" />\r\n                <omgdi:waypoint x=\"413\" y=\"127\" />\r\n                <omgdi:waypoint x=\"215\" y=\"127\" />\r\n                <omgdi:waypoint x=\"215\" y=\"147\" />\r\n            </bpmndi:BPMNEdge>\r\n            <bpmndi:BPMNEdge bpmnElement=\"flow1585623243361\" id=\"BPMNEdge_flow1585623243361\">\r\n                <omgdi:waypoint x=\"215\" y=\"312\" />\r\n                <omgdi:waypoint x=\"215\" y=\"400\" />\r\n            </bpmndi:BPMNEdge>\r\n            <bpmndi:BPMNEdge bpmnElement=\"flow1585623411383\" id=\"BPMNEdge_flow1585623411383\">\r\n                <omgdi:waypoint x=\"265\" y=\"282\" />\r\n                <omgdi:waypoint x=\"413\" y=\"282\" />\r\n                <omgdi:waypoint x=\"413\" y=\"207\" />\r\n            </bpmndi:BPMNEdge>\r\n        </bpmndi:BPMNPlane>\r\n    </bpmndi:BPMNDiagram>\r\n</definitions>',NULL,NULL,'管理员','2020-03-31 10:57:23','admin','管理员','2020-03-30 17:19:19','admin','process1585559860499',1,'0',NULL);
INSERT INTO `t_p_processnode` (`id`, `formid`, `processid`, `processnodecode`, `processnodename`, `modelandview`, `modelandview_mobile`, `node_timeout`, `pnodecofigid`, `pushmode`, `delete_flag`) VALUES ('402880ed712ab6ab01712abcf4bb000c',NULL,'402880ed712ab6ab01712abcf4aa000b','task1585559900371','组织机构负责人','tBActivitiUserInjuryController.do?goView&flag=2','tBActivitiUserInjuryController.do?goViewMobile&flag=2',NULL,'402880ed712ab6ab01712abaf81e0007','no','0'),('402880ed712ab6ab01712abcf4c5000d',NULL,'402880ed712ab6ab01712abcf4aa000b','task1585559923112','制单人重填','tBActivitiUserInjuryController.do?goView&flag=1','tBActivitiUserInjuryController.do?goViewMobile&flag=1',NULL,'402880ed712ab6ab01712abb55bb0009','no','0'),('402880ed712d887301712e85a4ca000d',NULL,'402880ed712ab6ab01712abcf4aa000b','task1585623201082','人事经理','tBActivitiUserInjuryController.do?goView&flag=2','tBActivitiUserInjuryController.do?goViewMobile&flag=2',NULL,'402880ed712ab6ab01712abaf81e0007','no','0');
INSERT INTO `t_p_processnode_config` (`id`, `process_type`, `url_title`, `pc_url`, `mobile_url`) VALUES ('402880ed712ab6ab01712abaf81e0007','user_injury','审批','tBActivitiUserInjuryController.do?goView&flag=2','tBActivitiUserInjuryController.do?goViewMobile&flag=2'),('402880ed712ab6ab01712abb55bb0009','user_injury','制单人重填','tBActivitiUserInjuryController.do?goView&flag=1','tBActivitiUserInjuryController.do?goViewMobile&flag=1');
INSERT INTO `t_s_busconfig` (`id`, `busname`, `form_type`, `tableid`, `online_id`, `processid`, `bus_title_exp`, `process_deal_style`, `show_title`, `show_table`, `config_id`) VALUES ('402880ed712ab6ab01712abd64d6000e',NULL,'online','','t_b_activiti_user_injury','402880ed712ab6ab01712abcf4aa000b','工伤签报','formdeal','工伤签报','工伤签报','402880ed712ab6ab01712ab965db0005');
INSERT INTO `t_process_busconfig` (`id`, `show_title`, `real_title`, `show_tablename`, `real_tablename`, `process_type`, `activiti_config_class`) VALUES ('402880ed712ab6ab01712ab965db0005','工伤签报','工伤签报','工伤签报','t_b_activiti_user_injury','user_injury','');

#工伤签报结束
#调动记录修改
INSERT INTO t_s_type (ID, typecode, typename, typepid, typegroupid, create_date, create_name) VALUES ('402880ed71338ee0017133d837ee0018', 'appoint', '任免(人事任命)', null, '4028e4a55fa3d295015fa40b378d002a', '2020-04-01 11:45:40', '管理员');
INSERT INTO t_s_type (ID, typecode, typename, typepid, typegroupid, create_date, create_name) VALUES ('402880ed71338ee0017133d89899001a', 'promotion', '任免(晋升)', null, '4028e4a55fa3d295015fa40b378d002a', '2020-04-01 11:46:05', '管理员');
INSERT INTO t_s_type (ID, typecode, typename, typepid, typegroupid, create_date, create_name) VALUES ('402880ed71338ee0017133d8cd33001c', 'dismiss', '任免(辞退)', null, '4028e4a55fa3d295015fa40b378d002a', '2020-04-01 11:46:19', '管理员');
INSERT INTO t_s_type (ID, typecode, typename, typepid, typegroupid, create_date, create_name) VALUES ('402880ed71338ee0017133d927e0001e', 'demotion', '任免(降职)', null, '4028e4a55fa3d295015fa40b378d002a', '2020-04-01 11:46:42', '管理员');

#人事其他签报增加指派任务开始

CREATE TABLE `t_b_activiti_user_other_assign_task` (
  `id` varchar(36) NOT NULL,
  `create_name` varchar(50) DEFAULT NULL COMMENT '创建人名称',
  `create_by` varchar(50) DEFAULT NULL COMMENT '创建人登录名称',
  `create_date` datetime DEFAULT NULL COMMENT '创建日期',
  `update_name` varchar(50) DEFAULT NULL COMMENT '更新人名称',
  `update_by` varchar(50) DEFAULT NULL COMMENT '更新人登录名称',
  `update_date` datetime DEFAULT NULL COMMENT '更新日期',
  `sys_org_code` varchar(50) DEFAULT NULL COMMENT '所属部门',
  `sys_company_code` varchar(50) DEFAULT NULL COMMENT '所属公司',
  `bpm_status` varchar(32) DEFAULT '1' COMMENT '流程状态',
  `fk_id` varchar(32) DEFAULT NULL COMMENT '主表id',
  `userid` varchar(32) DEFAULT NULL COMMENT '处理人id',
  `real_name` varchar(255) DEFAULT NULL COMMENT '处理人',
  `descn` longtext COMMENT '任务说明',
  `end_time` datetime DEFAULT NULL COMMENT '截止时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
INSERT INTO `t_s_type` (`ID`, `typecode`, `typename`, `typepid`, `typegroupid`, `create_date`, `create_name`) VALUES ('402880ed713fc8c90171400852920032','user_other','人事类其他签报',NULL,'4028819b65a8b81c0165a9182bee0015','2020-04-03 20:33:39','管理员');

INSERT INTO `p_activiti_task` (`id`, `create_name`, `create_by`, `create_date`, `update_name`, `update_by`, `update_date`, `sys_org_code`, `sys_company_code`, `bpm_status`, `name`, `process_id`, `process_name`, `task_cost_time`, `task_cost_time_type`, `execute_type`, `execute_way`, `form`, `owner_role`, `owner_role_name`, `important`, `execute_class`, `task_delay`, `task_type`, `check_result`) VALUES ('402880ed713d499f01713d73dff60019','管理员','admin','2020-04-03 08:32:16','管理员','admin','2020-04-03 21:20:47','A06A01','A06','1','【${dep_name}】人事类其他签报已通过，请及时处理。','402880ed70b93f840170b9469a8f000c','人事类其他签报',7,'day','offline','pc','#','4028867966c7e8f10166c7ea402e0001','微管理内勤',99,'com.xcgl.activititask.util.impl.UserOtherActivitiTaskHandler',0,'user_other','not_check');

delete from `t_p_processnode` where id='402880ed70b93f840170b947faf5000d';
INSERT INTO `t_p_processnode` (`id`, `formid`, `processid`, `processnodecode`, `processnodename`, `modelandview`, `modelandview_mobile`, `node_timeout`, `pnodecofigid`, `pushmode`, `delete_flag`) VALUES ('402880ed70b93f840170b947faf5000d',NULL,'402880ed70b93f840170b9469a8f000c','task1583656381520','人事经理','tBActivitiUserOtherController.do?goView&flag=2','tBActivitiUserOtherController.do?goViewMobile&flag=2',NULL,'402880ed713f9bb801713fb36fe10002','no','0');

delete from `t_p_processnode_config` where id ='402880ed713f9bb801713fb36fe10002';
INSERT INTO `t_p_processnode_config` (`id`, `process_type`, `url_title`, `pc_url`, `mobile_url`) VALUES ('402880ed713f9bb801713fb36fe10002','user_other','指派任务','tBActivitiUserOtherController.do?goView&flag=2','tBActivitiUserOtherController.do?goViewMobile&flag=2');

UPDATE t_p_process SET typeid = 'user_other', userid = null, processname = '人事类其他签报', processxmlpath = null, processxml = 0x3C3F786D6C2076657273696F6E3D22312E302220656E636F64696E673D225554462D38223F3E0D0A3C646566696E6974696F6E732020786D6C6E733D22687474703A2F2F7777772E6F6D672E6F72672F737065632F42504D4E2F32303130303532342F4D4F44454C2220786D6C6E733A7873693D22687474703A2F2F7777772E77332E6F72672F323030312F584D4C536368656D612D696E7374616E63652220786D6C6E733A61637469766974693D22687474703A2F2F61637469766974692E6F72672F62706D6E2220786D6C6E733A62706D6E64693D22687474703A2F2F7777772E6F6D672E6F72672F737065632F42504D4E2F32303130303532342F44492220786D6C6E733A6F6D6764633D22687474703A2F2F7777772E6F6D672E6F72672F737065632F44442F32303130303532342F44432220786D6C6E733A6F6D6764693D22687474703A2F2F7777772E6F6D672E6F72672F737065632F44442F32303130303532342F44492220747970654C616E67756167653D22687474703A2F2F7777772E77332E6F72672F323030312F584D4C536368656D61222065787072657373696F6E4C616E67756167653D22687474703A2F2F7777772E77332E6F72672F313939392F585061746822207461726765744E616D6573706163653D22687474703A2F2F7777772E6C7A742E636F6D2E636E223E0D0A202020203C70726F63657373202069643D2270726F636573733135383336353633353436353922206E616D653D22E4BABAE4BA8BE7B1BBE585B6E4BB96E7ADBEE68AA5223E0D0A20202020202020203C646F63756D656E746174696F6E3EE6B581E7A88BE68F8FE8BFB03C2F646F63756D656E746174696F6E3E0D0A20202020202020203C657874656E73696F6E456C656D656E74733E0D0A2020202020202020202020203C61637469766974693A657865637574696F6E4C697374656E65722069643D22343032383830653534383033613439363031343830356535643931393030313222206576656E743D22656E642220636C6173733D226F72672E6A656563676672616D65776F726B2E776F726B666C6F772E6C697374656E65722E657865637574696F6E2E50726F63657373456E644C697374656E657222203E0D0A2020202020202020202020203C2F61637469766974693A657865637574696F6E4C697374656E65723E0D0A2020202020202020202020203C61637469766974693A657865637574696F6E4C697374656E65722069643D22343032383831653536633033353837353031366330336139323161663030333222206576656E743D22656E642220636C6173733D22636E2E636F6D2E6C7A742E776F726B666C6F772E6C697374656E65722E7461736B2E41637469766974695461736B4C697374656E657222203E0D0A2020202020202020202020203C2F61637469766974693A657865637574696F6E4C697374656E65723E0D0A2020202020202020202020203C61637469766974693A657865637574696F6E4C697374656E65722069643D22343032383830656436646564323234303031366465646432386635643030316622206576656E743D22656E642220636C6173733D22636E2E636F6D2E6C7A742E776F726B666C6F772E6C697374656E65722E7461736B2E427573696E65737350726F63657373456E644C697374656E657222203E0D0A2020202020202020202020203C2F61637469766974693A657865637574696F6E4C697374656E65723E0D0A20202020202020203C2F657874656E73696F6E456C656D656E74733E0D0A20202020202020203C73746172744576656E74202069643D2273746172743122206E616D653D22E5BC80E5A78BE88A82E782B9222061637469766974693A696E69746961746F723D226170706C79557365724964223E0D0A20202020202020203C2F73746172744576656E743E0D0A20202020202020203C656E644576656E74202069643D22656E6422206E616D653D22E7BB93E69D9FE88A82E782B9223E0D0A20202020202020203C2F656E644576656E743E0D0A20202020202020203C757365725461736B202069643D227461736B3135383336353633383135323022206E616D653D22E4BABAE4BA8BE7BB8FE79086222061637469766974693A63616E64696461746555736572733D22247B666C6F775574696C2E67657455736572496E70726F6A6563742842504D5F464F524D5F4B45592C42504D5F444154415F49442C27415F48524A4C27297D22203E0D0A20202020202020203C2F757365725461736B3E0D0A20202020202020203C757365725461736B202069643D227461736B3135383336353732353436313022206E616D653D22E78EB0E59CBAE8B49FE8B4A3E4BABA222061637469766974693A63616E64696461746555736572733D22247B666C6F775574696C2E637573746F6D65725573657253656C6563742842504D5F464F524D5F4B45592C42504D5F444154415F49442C274445504152545F4D414E4147455227297D22203E0D0A20202020202020203C2F757365725461736B3E0D0A20202020202020203C757365725461736B202069643D227461736B3135383336353733393638383222206E616D653D22E588B6E58D95E4BABAE9878DE5A1AB222061637469766974693A61737369676E65653D22247B6170706C795573657249647D22203E0D0A20202020202020203C2F757365725461736B3E0D0A20202020202020203C6578636C757369766547617465776179202069643D226578636C7573697665476174657761793135383336353732323030343222206E616D653D226578636C75736976654761746577617931353833363537323230303432223E0D0A20202020202020203C2F6578636C7573697665476174657761793E0D0A20202020202020203C73657175656E6365466C6F77202069643D22666C6F773135383336353633383432323222206E616D653D222220736F757263655265663D2273746172743122207461726765745265663D226578636C75736976654761746577617931353833363537323230303432223E0D0A20202020202020203C2F73657175656E6365466C6F773E0D0A20202020202020203C73657175656E6365466C6F77202069643D22666C6F773135383336353633383737373322206E616D653D22E9809AE8BF872220736F757263655265663D227461736B3135383336353633383135323022207461726765745265663D22656E64223E0D0A20202020202020203C2F73657175656E6365466C6F773E0D0A20202020202020203C73657175656E6365466C6F77202069643D22666C6F773135383336353732393635303522206E616D653D22E99D9EE4BABAE4BA8B2220736F757263655265663D226578636C7573697665476174657761793135383336353732323030343222207461726765745265663D227461736B31353833363537323534363130223E0D0A2020202020202020202020203C636F6E646974696F6E45787072657373696F6E20207873693A747970653D2274466F726D616C45787072657373696F6E223E0D0A202020202020202020202020202020203C215B43444154415B247B21666C6F77636F6E646974696F6E5574696C2E697348722842504D5F464F524D5F4B45592C69642C31297D5D5D3E0D0A2020202020202020202020203C2F636F6E646974696F6E45787072657373696F6E3E0D0A20202020202020203C2F73657175656E6365466C6F773E0D0A20202020202020203C73657175656E6365466C6F77202069643D22666C6F773135383336353733303332393622206E616D653D22E9809AE8BF872220736F757263655265663D227461736B3135383336353732353436313022207461726765745265663D227461736B31353833363536333831353230223E0D0A20202020202020203C2F73657175656E6365466C6F773E0D0A20202020202020203C73657175656E6365466C6F77202069643D22666C6F773135383336353733303532383122206E616D653D22E4BABAE4BA8B2220736F757263655265663D226578636C7573697665476174657761793135383336353732323030343222207461726765745265663D227461736B31353833363536333831353230223E0D0A2020202020202020202020203C636F6E646974696F6E45787072657373696F6E20207873693A747970653D2274466F726D616C45787072657373696F6E223E0D0A202020202020202020202020202020203C215B43444154415B247B666C6F77636F6E646974696F6E5574696C2E697348722842504D5F464F524D5F4B45592C69642C31297D5D5D3E0D0A2020202020202020202020203C2F636F6E646974696F6E45787072657373696F6E3E0D0A20202020202020203C2F73657175656E6365466C6F773E0D0A20202020202020203C73657175656E6365466C6F77202069643D22666C6F773135383336353734343234363422206E616D653D22E9A9B3E59B9E2220736F757263655265663D227461736B3135383336353732353436313022207461726765745265663D227461736B31353833363537333936383832223E0D0A20202020202020203C2F73657175656E6365466C6F773E0D0A20202020202020203C73657175656E6365466C6F77202069643D22666C6F773135383336353734343434363422206E616D653D22E9A9B3E59B9E2220736F757263655265663D227461736B3135383336353633383135323022207461726765745265663D227461736B31353833363537333936383832223E0D0A20202020202020203C2F73657175656E6365466C6F773E0D0A20202020202020203C73657175656E6365466C6F77202069643D22666C6F773135383336353734343932333122206E616D653D22E68F90E4BAA42220736F757263655265663D227461736B3135383336353733393638383222207461726765745265663D226578636C75736976654761746577617931353833363537323230303432223E0D0A20202020202020203C2F73657175656E6365466C6F773E0D0A202020203C2F70726F636573733E0D0A202020203C62706D6E64693A42504D4E4469616772616D2069643D2242504D4E4469616772616D5F70726F6365737331353833363536333534363539223E0D0A20202020202020203C62706D6E64693A42504D4E506C616E652062706D6E456C656D656E743D2270726F6365737331353833363536333534363539222069643D2242504D4E506C616E655F70726F6365737331353833363536333534363539223E0D0A2020202020202020202020203C62706D6E64693A42504D4E53686170652062706D6E456C656D656E743D22737461727431222069643D2242504D4E53686170655F737461727431223E0D0A202020202020202020202020202020203C6F6D6764633A426F756E6473206865696768743D223330222077696474683D2233302220783D223230302220793D223530222F3E0D0A2020202020202020202020203C2F62706D6E64693A42504D4E53686170653E0D0A2020202020202020202020203C62706D6E64693A42504D4E53686170652062706D6E456C656D656E743D22656E64222069643D2242504D4E53686170655F656E64223E0D0A202020202020202020202020202020203C6F6D6764633A426F756E6473206865696768743D223330222077696474683D2233302220783D223230312220793D22343833222F3E0D0A2020202020202020202020203C2F62706D6E64693A42504D4E53686170653E0D0A2020202020202020202020203C62706D6E64693A42504D4E53686170652062706D6E456C656D656E743D227461736B31353833363536333831353230222069643D2242504D4E53686170655F7461736B31353833363536333831353230223E0D0A202020202020202020202020202020203C6F6D6764633A426F756E6473206865696768743D223530222077696474683D2239302220783D223137302220793D22333338222F3E0D0A2020202020202020202020203C2F62706D6E64693A42504D4E53686170653E0D0A2020202020202020202020203C62706D6E64693A42504D4E53686170652062706D6E456C656D656E743D227461736B31353833363537323534363130222069643D2242504D4E53686170655F7461736B31353833363537323534363130223E0D0A202020202020202020202020202020203C6F6D6764633A426F756E6473206865696768743D223530222077696474683D2239302220783D223334362220793D22313333222F3E0D0A2020202020202020202020203C2F62706D6E64693A42504D4E53686170653E0D0A2020202020202020202020203C62706D6E64693A42504D4E53686170652062706D6E456C656D656E743D227461736B31353833363537333936383832222069643D2242504D4E53686170655F7461736B31353833363537333936383832223E0D0A202020202020202020202020202020203C6F6D6764633A426F756E6473206865696768743D223530222077696474683D2239302220783D223433322220793D22333337222F3E0D0A2020202020202020202020203C2F62706D6E64693A42504D4E53686170653E0D0A2020202020202020202020203C62706D6E64693A42504D4E53686170652062706D6E456C656D656E743D226578636C75736976654761746577617931353833363537323230303432222069643D2242504D4E53686170655F6578636C75736976654761746577617931353833363537323230303432223E0D0A202020202020202020202020202020203C6F6D6764633A426F756E6473206865696768743D223430222077696474683D2234302220783D223139352220793D22313338222F3E0D0A2020202020202020202020203C2F62706D6E64693A42504D4E53686170653E0D0A2020202020202020202020203C62706D6E64693A42504D4E456467652062706D6E456C656D656E743D22666C6F7731353833363536333834323232222069643D2242504D4E456467655F666C6F7731353833363536333834323232223E0D0A202020202020202020202020202020203C6F6D6764693A776179706F696E7420783D223231352220793D22383022202F3E0D0A202020202020202020202020202020203C6F6D6764693A776179706F696E7420783D223231352220793D2231333822202F3E0D0A2020202020202020202020203C2F62706D6E64693A42504D4E456467653E0D0A2020202020202020202020203C62706D6E64693A42504D4E456467652062706D6E456C656D656E743D22666C6F7731353833363536333837373733222069643D2242504D4E456467655F666C6F7731353833363536333837373733223E0D0A202020202020202020202020202020203C6F6D6764693A776179706F696E7420783D223231352220793D2233393322202F3E0D0A202020202020202020202020202020203C6F6D6764693A776179706F696E7420783D223231352220793D2234333822202F3E0D0A202020202020202020202020202020203C6F6D6764693A776179706F696E7420783D223231362220793D2234333822202F3E0D0A202020202020202020202020202020203C6F6D6764693A776179706F696E7420783D223231362220793D2234383322202F3E0D0A2020202020202020202020203C2F62706D6E64693A42504D4E456467653E0D0A2020202020202020202020203C62706D6E64693A42504D4E456467652062706D6E456C656D656E743D22666C6F7731353833363537323936353035222069643D2242504D4E456467655F666C6F7731353833363537323936353035223E0D0A202020202020202020202020202020203C6F6D6764693A776179706F696E7420783D223233352220793D2231353822202F3E0D0A202020202020202020202020202020203C6F6D6764693A776179706F696E7420783D223334312220793D2231353822202F3E0D0A2020202020202020202020203C2F62706D6E64693A42504D4E456467653E0D0A2020202020202020202020203C62706D6E64693A42504D4E456467652062706D6E456C656D656E743D22666C6F7731353833363537333033323936222069643D2242504D4E456467655F666C6F7731353833363537333033323936223E0D0A202020202020202020202020202020203C6F6D6764693A776179706F696E7420783D223339312220793D2231383822202F3E0D0A202020202020202020202020202020203C6F6D6764693A776179706F696E7420783D223339312220793D2232363022202F3E0D0A202020202020202020202020202020203C6F6D6764693A776179706F696E7420783D223231352220793D2232363022202F3E0D0A202020202020202020202020202020203C6F6D6764693A776179706F696E7420783D223231352220793D2233333322202F3E0D0A2020202020202020202020203C2F62706D6E64693A42504D4E456467653E0D0A2020202020202020202020203C62706D6E64693A42504D4E456467652062706D6E456C656D656E743D22666C6F7731353833363537333035323831222069643D2242504D4E456467655F666C6F7731353833363537333035323831223E0D0A202020202020202020202020202020203C6F6D6764693A776179706F696E7420783D223231352220793D2231373822202F3E0D0A202020202020202020202020202020203C6F6D6764693A776179706F696E7420783D223231352220793D2233333322202F3E0D0A2020202020202020202020203C2F62706D6E64693A42504D4E456467653E0D0A2020202020202020202020203C62706D6E64693A42504D4E456467652062706D6E456C656D656E743D22666C6F7731353833363537343432343634222069643D2242504D4E456467655F666C6F7731353833363537343432343634223E0D0A202020202020202020202020202020203C6F6D6764693A776179706F696E7420783D223434312220793D2231353822202F3E0D0A202020202020202020202020202020203C6F6D6764693A776179706F696E7420783D223437372220793D2231353822202F3E0D0A202020202020202020202020202020203C6F6D6764693A776179706F696E7420783D223437372220793D2233333222202F3E0D0A2020202020202020202020203C2F62706D6E64693A42504D4E456467653E0D0A2020202020202020202020203C62706D6E64693A42504D4E456467652062706D6E456C656D656E743D22666C6F7731353833363537343434343634222069643D2242504D4E456467655F666C6F7731353833363537343434343634223E0D0A202020202020202020202020202020203C6F6D6764693A776179706F696E7420783D223236352220793D2233363322202F3E0D0A202020202020202020202020202020203C6F6D6764693A776179706F696E7420783D223334362220793D2233363322202F3E0D0A202020202020202020202020202020203C6F6D6764693A776179706F696E7420783D223334362220793D2233363222202F3E0D0A202020202020202020202020202020203C6F6D6764693A776179706F696E7420783D223432372220793D2233363222202F3E0D0A2020202020202020202020203C2F62706D6E64693A42504D4E456467653E0D0A2020202020202020202020203C62706D6E64693A42504D4E456467652062706D6E456C656D656E743D22666C6F7731353833363537343439323331222069643D2242504D4E456467655F666C6F7731353833363537343439323331223E0D0A202020202020202020202020202020203C6F6D6764693A776179706F696E7420783D223532372220793D2233363222202F3E0D0A202020202020202020202020202020203C6F6D6764693A776179706F696E7420783D223534372220793D2233363222202F3E0D0A202020202020202020202020202020203C6F6D6764693A776179706F696E7420783D223534372220793D2231313822202F3E0D0A202020202020202020202020202020203C6F6D6764693A776179706F696E7420783D223231352220793D2231313822202F3E0D0A202020202020202020202020202020203C6F6D6764693A776179706F696E7420783D223231352220793D2231333822202F3E0D0A2020202020202020202020203C2F62706D6E64693A42504D4E456467653E0D0A20202020202020203C2F62706D6E64693A42504D4E506C616E653E0D0A202020203C2F62706D6E64693A42504D4E4469616772616D3E0D0A3C2F646566696E6974696F6E733E, processxmname = null, note = null, update_name = '管理员', update_date = '2020-04-04 07:23:34', update_by = 'admin', create_name = '管理员', create_date = '2020-03-08 16:32:57', create_by = 'admin', processkey = 'process1583656354659', processstate = 1, processtype = '0', ccmode = null WHERE id = '402880ed70b93f840170b9469a8f000c';
#人事其他签报增加指派任务结束

#物料到货增加累计到货
ALTER TABLE `t_b_storage_in_detail` ADD COLUMN `quantity_arrived` DOUBLE NULL COMMENT '累计到货量';
update t_b_storage_in_detail set quantity_arrived=0 ,quantity_not_arrived=quantity_order-quantity_in;

#费用申请增加排序时间
ALTER TABLE `t_b_activiti_cost_request`
ADD COLUMN `operate_time` TIMESTAMP NULL DEFAULT current_timestamp on update current_timestamp COMMENT '操作时间，排序用';
update t_b_activiti_cost_request set operate_time = ifnull(update_date,create_date);

#所有消息菜单
INSERT INTO `t_s_function` (`ID`, `functioniframe`, `functionlevel`, `functionname`, `functionorder`, `functionurl`, `parentfunctionid`, `iconid`, `desk_iconid`, `functiontype`, `function_icon_style`, `create_by`, `create_name`, `update_by`, `update_date`, `create_date`, `update_name`, `remark`) VALUES ('402881e571712ac90171712eb3610001',NULL,1,'所有消息','13','mMessageController.do?list4all','402881e56ae3e7b8016ae3e970730002','8a8ab0b246dc81120146dc8180460000','8a8ab0b246dc81120146dc8180dd001e',0,'','admin','管理员',NULL,NULL,'2020-04-13 09:36:58',NULL,'所有消息');

#加班申请明细查看菜单
INSERT INTO `t_s_function` (`ID`, `functioniframe`, `functionlevel`, `functionname`, `functionorder`, `functionurl`, `parentfunctionid`, `iconid`, `desk_iconid`, `functiontype`, `function_icon_style`, `create_by`, `create_name`, `update_by`, `update_date`, `create_date`, `update_name`, `remark`) VALUES ('402881e571728db40171729103170002',NULL,1,'加班申请明细查看','15','tBusActivitiOvertimeController.do?list4all','4028e4a55ec173a1015ec1b44f270036','8a8ab0b246dc81120146dc8180460000','8a8ab0b246dc81120146dc8180dd001e',0,'','admin','管理员',NULL,NULL,'2020-04-13 16:03:58',NULL,'加班申请明细查看');

#来源类型增加值
INSERT INTO t_s_type (ID, typecode, typename, typepid, typegroupid, create_date, create_name) VALUES ('402881e57178af8d017178b6414a0002', 'activititask', '签报', null, '2c9358a865ef71b50165ef7724330001', '2020-04-14 20:42:22', '管理员');

#立项签报增加续签
INSERT INTO `t_s_typegroup` (`ID`, `typegroupcode`, `typegroupname`, `create_date`, `create_name`) VALUES ('402881e5717684da0171769e4c91001d','activiti_project_type','立项签报类型','2020-04-14 10:56:58','管理员');
INSERT INTO `t_s_type` (`ID`, `typecode`, `typename`, `typepid`, `typegroupid`, `create_date`, `create_name`) VALUES ('402881e5717684da0171769eb33b001f','add','立项',NULL,'402881e5717684da0171769e4c91001d','2020-04-14 10:57:24','管理员'),('402881e5717684da0171769fc1700021','renew','续签',NULL,'402881e5717684da0171769e4c91001d','2020-04-14 10:58:33','管理员');

ALTER TABLE `t_b_activiti_project` ADD COLUMN `type` VARCHAR(64) default 'add'
,ADD COLUMN `renew_start_time` date NULL
,ADD COLUMN `project_id` VARCHAR(45) null;

ALTER TABLE `t_b_project`
ADD COLUMN `floor_space` VARCHAR(255) NULL COMMENT '建筑面积',
ADD COLUMN `services` VARCHAR(255) NULL COMMENT '服务内容',
ADD COLUMN `project_kind` VARCHAR(45) NULL COMMENT '项目类型',
CHANGE COLUMN `type` `type` VARCHAR(32) NULL DEFAULT NULL COMMENT '项目属性' ;

CREATE TABLE `t_b_project_activiti_log` (
  `id` VARCHAR(45) NOT NULL,
  `project_id` VARCHAR(45) NULL,
  `activiti_id` VARCHAR(45) NULL,
  `activiti_type` VARCHAR(45) NULL,
  `create_date` DATETIME NULL,
  PRIMARY KEY (`id`))
COMMENT = '项目流程记录';

#修正离职数据
update t_bus_user_personnel set leave_date =null where leave_date>curtime();
#离职审批增加定时执行
ALTER TABLE `t_bus_activiti_leave`
ADD COLUMN `is_handle` VARCHAR(32) NULL DEFAULT '0' COMMENT '0 没执行，1已执行';
update t_bus_activiti_leave set is_handle ='1' where leave_date<curtime();

#费用类型增加预审流程
ALTER TABLE `t_b_cost_type`
ADD COLUMN `pre_proc` VARCHAR(255) NULL default '无预审' COMMENT '预审流程';
INSERT INTO `t_p_flowcondition` (`id`, `create_name`, `create_by`, `create_date`, `update_name`, `update_by`, `update_date`, `sys_org_code`, `sys_company_code`, `process_type`, `flow_text`, `flow_condition`) VALUES ('402880ed719abcde01719ac59dac0005','管理员','admin','2020-04-21 11:26:14',NULL,NULL,NULL,'A06A01','A06','cost_request','预审流程','${flowconditionUtil.getCostRequestInfo(BPM_FORM_KEY,id,\'pre_proc\')==\'d\'}');


#物料其他签报增加执行流
INSERT INTO `t_s_type` (`ID`, `typecode`, `typename`, `typepid`, `typegroupid`, `create_date`, `create_name`) VALUES ('402880ed71b98ab80171b99b87eb0001','orders_fix_asset','物料类其他签报',NULL,'4028819b65a8b81c0165a9182bee0015','2020-04-27 11:08:30','管理员');

INSERT INTO `p_activiti_task` (`id`, `create_name`, `create_by`, `create_date`, `update_name`, `update_by`, `update_date`, `sys_org_code`, `sys_company_code`, `bpm_status`, `name`, `process_id`, `process_name`, `task_cost_time`, `task_cost_time_type`, `execute_type`, `execute_way`, `form`, `owner_role`, `owner_role_name`, `important`, `execute_class`, `task_delay`, `task_type`, `check_result`) VALUES ('402880ed71b98ab80171b99db8bd0003','管理员','admin','2020-04-27 11:10:54','管理员','admin','2020-04-27 11:38:28','A06A01','A06','1','${create_name}应急采购审批已通过，请及时处理','402881e570eb5e200170eb86b60f0015','物料类其他签报',7,'day','offline','pc','#','ff808081600fe6e901601021f6ff001c','采购副经理',99,'com.xcgl.activititask.util.impl.NonUserActivitiTaskHandler',0,'orders_fix_asset','not_check');

#用户表增加索引
ALTER TABLE `t_s_base_user` ADD INDEX `username` (`username` ASC);

#对外付款签报增加字段长度
ALTER TABLE `t_b_activiti_cost_pay_tmp_company` CHANGE COLUMN `request_id` `request_id` VARCHAR(1000) NULL DEFAULT NULL COMMENT '申请单' ,DROP INDEX `requestid` ;


#维保任务计划
ALTER TABLE `t_b_maintain_plan`
ADD COLUMN `project_service_id` VARCHAR(500) NULL COMMENT '服务项目id',
ADD COLUMN `project_service_name` VARCHAR(500) NULL COMMENT '服务描述',
ADD COLUMN `contract_id` VARCHAR(45) NULL COMMENT '合同id' ,
ADD COLUMN `contract_name` VARCHAR(255) NULL COMMENT '合同名称',
ADD COLUMN `contract_start_date` DATE NULL COMMENT '合同开始日期',
ADD COLUMN `contract_end_date` DATE NULL COMMENT '合同结束日期',
ADD COLUMN `is_notice` VARCHAR(32)  NULL DEFAULT 0 COMMENT '是否已通知项目经理' ,
ADD COLUMN `maintain_year` VARCHAR(255) NULL COMMENT '维保年份',
ADD COLUMN `maintain_month` VARCHAR(500) NULL COMMENT '维保月份',
ADD COLUMN `maintain_day` VARCHAR(500) NULL COMMENT '维保日期',
CHANGE COLUMN `projectid` `depart_id` VARCHAR(32) NULL DEFAULT NULL COMMENT '项目' ,
CHANGE COLUMN `projectname` `dep_name` VARCHAR(128) NULL DEFAULT NULL COMMENT '项目名称' ;


ALTER TABLE `t_b_maintain_plan_times` ADD COLUMN `is_gen_task` VARCHAR(45) NULL DEFAULT 0 COMMENT '0 未生成任务\n1 已生成任务';

ALTER TABLE `t_b_maintain_bill`
ADD COLUMN `maintain_plan_id` VARCHAR(45) NULL COMMENT '维保计划id' ,
ADD COLUMN `maintain_plan_time_id` VARCHAR(45) NULL COMMENT '维保计划时间id',
ADD COLUMN `plan_code` VARCHAR(45) NULL COMMENT '计划编码',
ADD COLUMN `maintain_month` VARCHAR(255) NULL COMMENT '维保月度',
ADD COLUMN `maintain_year` VARCHAR(255) NULL COMMENT '维保年份',
ADD COLUMN `task_id` VARCHAR(45) NULL COMMENT 'projecttask id',
CHANGE COLUMN `projectservcieid` `projectservcieid` VARCHAR(500) NULL DEFAULT NULL COMMENT '项目服务' ,
CHANGE COLUMN `projectservicename` `projectservicename` VARCHAR(500) NULL DEFAULT NULL COMMENT '项目服务描述' ;

ALTER TABLE `t_b_contract_payment`
ADD COLUMN `maintainids` VARCHAR(500) NULL COMMENT '维保单id';

INSERT INTO `t_s_type` (`ID`, `typecode`, `typename`, `typepid`, `typegroupid`, `create_date`, `create_name`) VALUES ('402880ed71f97a380171f9c12e270007','maintainPlan','维保任务计划',NULL,'402889fe47eddd340147ede15c070001','2020-05-09 22:05:19','管理员'),('402880ed71f97a380171f9c17c9d0009','maintainPlan','维保任务计划',NULL,'4028819b65a8b81c0165a9182bee0015','2020-05-09 22:05:39','管理员'),('402880ed721614ac0172161dcd320006','maintainbill','维保服务记录单',NULL,'4028819b65a8b81c0165a9182bee0015','2020-05-15 10:15:51','管理员');

INSERT INTO `t_s_timetask` (`ID`, `CREATE_BY`, `CREATE_DATE`, `CREATE_NAME`, `CRON_EXPRESSION`, `IS_EFFECT`, `IS_START`, `TASK_DESCRIBE`, `TASK_ID`, `UPDATE_BY`, `UPDATE_DATE`, `UPDATE_NAME`, `CLASS_NAME`, `RUN_SERVER_IP`, `RUN_SERVER`) VALUES ('402880ed720cae2a01720cb5a0470002','admin','2020-05-13 14:25:29','管理员','0 5 10 ? * 2','0','0','每周一早上10点检查上周是否有匹配合同','maintainBillMatchContractTask','admin','2020-05-13 21:22:01','管理员','cn.com.lzt.maintainbill.timer.MaintainBillMatchContractTask','127.0.0.1','127.0.0.1:8080/hgl'),('402880ed720cae2a01720cb659c10005','admin','2020-05-13 14:26:17','管理员','0 10 10 1 * ? *','0','0','每月1日查询未来3个月之内的未关联合同的计划','maintainBillNoContractTask','admin','2020-05-13 21:21:54','管理员','cn.com.lzt.maintainbill.timer.MaintainBillNoContractTask','127.0.0.1','127.0.0.1:8080/hgl');
UPDATE t_s_timetask SET CREATE_BY = 'admin', CREATE_DATE = '2018-07-16 13:05:21', CREATE_NAME = '管理员', CRON_EXPRESSION = '0 0 10 * * ? *', IS_EFFECT = '0', IS_START = '0', TASK_DESCRIBE = '每天10点根据计划，生成供方服务单', TASK_ID = 'autoCreateMaintainBillTask', UPDATE_BY = 'admin', UPDATE_DATE = '2020-05-13 14:56:18', UPDATE_NAME = '管理员', CLASS_NAME = 'cn.com.lzt.maintainbill.timer.AutoCreateMaintainBillTask', RUN_SERVER_IP = '127.0.0.1', RUN_SERVER = '127.0.0.1:8080/hgl' WHERE ID = '31222222641238170164a17a11171116';
INSERT INTO `t_p_process` (`id`, `typeid`, `userid`, `processname`, `processxmlpath`, `processxml`, `processxmname`, `note`, `update_name`, `update_date`, `update_by`, `create_name`, `create_date`, `create_by`, `processkey`, `processstate`, `processtype`, `ccmode`) VALUES ('402880ed71f97a380171f9c48fae0011','maintainPlan',NULL,'维保任务计划',NULL,'<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<definitions  xmlns=\"http://www.omg.org/spec/BPMN/20100524/MODEL\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:activiti=\"http://activiti.org/bpmn\" xmlns:bpmndi=\"http://www.omg.org/spec/BPMN/20100524/DI\" xmlns:omgdc=\"http://www.omg.org/spec/DD/20100524/DC\" xmlns:omgdi=\"http://www.omg.org/spec/DD/20100524/DI\" typeLanguage=\"http://www.w3.org/2001/XMLSchema\" expressionLanguage=\"http://www.w3.org/1999/XPath\" targetNamespace=\"http://www.lzt.com.cn\">\r\n    <process  id=\"process1589033316555\" name=\"维保任务计划\">\r\n        <documentation>流程描述</documentation>\r\n        <extensionElements>\r\n            <activiti:executionListener id=\"402880e54803a496014805e5d9190012\" event=\"end\" class=\"org.jeecgframework.workflow.listener.execution.ProcessEndListener\" >\r\n            </activiti:executionListener>\r\n            <activiti:executionListener id=\"402880ed6ded2240016dedd28f5d001f\" event=\"end\" class=\"cn.com.lzt.workflow.listener.task.BusinessProcessEndListener\" >\r\n            </activiti:executionListener>\r\n            <activiti:executionListener id=\"402881e56c035875016c03a921af0032\" event=\"end\" class=\"cn.com.lzt.workflow.listener.task.ActivitiTaskListener\" >\r\n            </activiti:executionListener>\r\n        </extensionElements>\r\n        <startEvent  id=\"start1\" name=\"开始节点\" activiti:initiator=\"applyUserId\">\r\n        </startEvent>\r\n        <endEvent  id=\"end\" name=\"结束节点\">\r\n        </endEvent>\r\n        <userTask  id=\"task1589033371146\" name=\"项目管理部副经理\" activiti:candidateUsers=\"${flowUtil.getUserInproject(BPM_FORM_KEY,BPM_DATA_ID,\'A_PZBFJL\')}\" >\r\n        </userTask>\r\n        <userTask  id=\"task1589033414634\" name=\"制单人重填\" activiti:assignee=\"${applyUserId}\" >\r\n        </userTask>\r\n        <userTask  id=\"task1589762932932\" name=\"项目管理部专员\" activiti:candidateUsers=\"${flowUtil.getUserInproject(BPM_FORM_KEY,BPM_DATA_ID,\'A_PZBZY\')}\" >\r\n        </userTask>\r\n        <userTask  id=\"task1589763016478\" name=\"项目管理部经理\" activiti:candidateUsers=\"${flowUtil.getUserInproject(BPM_FORM_KEY,BPM_DATA_ID,\'A_PZBJL\')}\" >\r\n        </userTask>\r\n        <exclusiveGateway  id=\"exclusiveGateway1589762880605\" name=\"exclusiveGateway1589762880605\">\r\n        </exclusiveGateway>\r\n        <sequenceFlow  id=\"flow1589033401938\" name=\"\" sourceRef=\"start1\" targetRef=\"exclusiveGateway1589762880605\">\r\n        </sequenceFlow>\r\n        <sequenceFlow  id=\"flow1589033404153\" name=\"通过\" sourceRef=\"task1589033371146\" targetRef=\"task1589763016478\">\r\n        </sequenceFlow>\r\n        <sequenceFlow  id=\"flow1589033430369\" name=\"驳回\" sourceRef=\"task1589033371146\" targetRef=\"task1589033414634\">\r\n        </sequenceFlow>\r\n        <sequenceFlow  id=\"flow1589033436889\" name=\"提交\" sourceRef=\"task1589033414634\" targetRef=\"exclusiveGateway1589762880605\">\r\n        </sequenceFlow>\r\n        <sequenceFlow  id=\"flow1589762938948\" name=\"无合同\" sourceRef=\"exclusiveGateway1589762880605\" targetRef=\"task1589033371146\">\r\n            <conditionExpression  xsi:type=\"tFormalExpression\">\r\n                <![CDATA[${contract_id==null}]]>\r\n            </conditionExpression>\r\n        </sequenceFlow>\r\n        <sequenceFlow  id=\"flow1589762940723\" name=\"有合同\" sourceRef=\"exclusiveGateway1589762880605\" targetRef=\"task1589762932932\">\r\n            <conditionExpression  xsi:type=\"tFormalExpression\">\r\n                <![CDATA[${contract_id!=null}]]>\r\n            </conditionExpression>\r\n        </sequenceFlow>\r\n        <sequenceFlow  id=\"flow1589763027043\" name=\"通过\" sourceRef=\"task1589762932932\" targetRef=\"task1589763016478\">\r\n        </sequenceFlow>\r\n        <sequenceFlow  id=\"flow1589763028595\" name=\"驳回\" sourceRef=\"task1589762932932\" targetRef=\"task1589033414634\">\r\n        </sequenceFlow>\r\n        <sequenceFlow  id=\"flow1589763069260\" name=\"通过\" sourceRef=\"task1589763016478\" targetRef=\"end\">\r\n        </sequenceFlow>\r\n        <sequenceFlow  id=\"flow1589763111668\" name=\"驳回\" sourceRef=\"task1589763016478\" targetRef=\"task1589033414634\">\r\n        </sequenceFlow>\r\n    </process>\r\n    <bpmndi:BPMNDiagram id=\"BPMNDiagram_process1589033316555\">\r\n        <bpmndi:BPMNPlane bpmnElement=\"process1589033316555\" id=\"BPMNPlane_process1589033316555\">\r\n            <bpmndi:BPMNShape bpmnElement=\"start1\" id=\"BPMNShape_start1\">\r\n                <omgdc:Bounds height=\"30\" width=\"30\" x=\"254\" y=\"43\"/>\r\n            </bpmndi:BPMNShape>\r\n            <bpmndi:BPMNShape bpmnElement=\"end\" id=\"BPMNShape_end\">\r\n                <omgdc:Bounds height=\"30\" width=\"30\" x=\"254\" y=\"473\"/>\r\n            </bpmndi:BPMNShape>\r\n            <bpmndi:BPMNShape bpmnElement=\"task1589033371146\" id=\"BPMNShape_task1589033371146\">\r\n                <omgdc:Bounds height=\"50\" width=\"90\" x=\"64\" y=\"231\"/>\r\n            </bpmndi:BPMNShape>\r\n            <bpmndi:BPMNShape bpmnElement=\"task1589033414634\" id=\"BPMNShape_task1589033414634\">\r\n                <omgdc:Bounds height=\"50\" width=\"90\" x=\"224\" y=\"232\"/>\r\n            </bpmndi:BPMNShape>\r\n            <bpmndi:BPMNShape bpmnElement=\"task1589762932932\" id=\"BPMNShape_task1589762932932\">\r\n                <omgdc:Bounds height=\"50\" width=\"90\" x=\"402\" y=\"232\"/>\r\n            </bpmndi:BPMNShape>\r\n            <bpmndi:BPMNShape bpmnElement=\"task1589763016478\" id=\"BPMNShape_task1589763016478\">\r\n                <omgdc:Bounds height=\"50\" width=\"90\" x=\"224\" y=\"355\"/>\r\n            </bpmndi:BPMNShape>\r\n            <bpmndi:BPMNShape bpmnElement=\"exclusiveGateway1589762880605\" id=\"BPMNShape_exclusiveGateway1589762880605\">\r\n                <omgdc:Bounds height=\"40\" width=\"40\" x=\"249\" y=\"120\"/>\r\n            </bpmndi:BPMNShape>\r\n            <bpmndi:BPMNEdge bpmnElement=\"flow1589033401938\" id=\"BPMNEdge_flow1589033401938\">\r\n                <omgdi:waypoint x=\"269\" y=\"73\" />\r\n                <omgdi:waypoint x=\"269\" y=\"120\" />\r\n            </bpmndi:BPMNEdge>\r\n            <bpmndi:BPMNEdge bpmnElement=\"flow1589033404153\" id=\"BPMNEdge_flow1589033404153\">\r\n                <omgdi:waypoint x=\"109\" y=\"286\" />\r\n                <omgdi:waypoint x=\"109\" y=\"380\" />\r\n                <omgdi:waypoint x=\"219\" y=\"380\" />\r\n            </bpmndi:BPMNEdge>\r\n            <bpmndi:BPMNEdge bpmnElement=\"flow1589033430369\" id=\"BPMNEdge_flow1589033430369\">\r\n                <omgdi:waypoint x=\"159\" y=\"256\" />\r\n                <omgdi:waypoint x=\"189\" y=\"256\" />\r\n                <omgdi:waypoint x=\"189\" y=\"257\" />\r\n                <omgdi:waypoint x=\"219\" y=\"257\" />\r\n            </bpmndi:BPMNEdge>\r\n            <bpmndi:BPMNEdge bpmnElement=\"flow1589033436889\" id=\"BPMNEdge_flow1589033436889\">\r\n                <omgdi:waypoint x=\"269\" y=\"227\" />\r\n                <omgdi:waypoint x=\"269\" y=\"160\" />\r\n            </bpmndi:BPMNEdge>\r\n            <bpmndi:BPMNEdge bpmnElement=\"flow1589762938948\" id=\"BPMNEdge_flow1589762938948\">\r\n                <omgdi:waypoint x=\"249\" y=\"140\" />\r\n                <omgdi:waypoint x=\"109\" y=\"140\" />\r\n                <omgdi:waypoint x=\"109\" y=\"226\" />\r\n            </bpmndi:BPMNEdge>\r\n            <bpmndi:BPMNEdge bpmnElement=\"flow1589762940723\" id=\"BPMNEdge_flow1589762940723\">\r\n                <omgdi:waypoint x=\"289\" y=\"140\" />\r\n                <omgdi:waypoint x=\"447\" y=\"140\" />\r\n                <omgdi:waypoint x=\"447\" y=\"227\" />\r\n            </bpmndi:BPMNEdge>\r\n            <bpmndi:BPMNEdge bpmnElement=\"flow1589763027043\" id=\"BPMNEdge_flow1589763027043\">\r\n                <omgdi:waypoint x=\"447\" y=\"287\" />\r\n                <omgdi:waypoint x=\"447\" y=\"380\" />\r\n                <omgdi:waypoint x=\"319\" y=\"380\" />\r\n            </bpmndi:BPMNEdge>\r\n            <bpmndi:BPMNEdge bpmnElement=\"flow1589763028595\" id=\"BPMNEdge_flow1589763028595\">\r\n                <omgdi:waypoint x=\"397\" y=\"257\" />\r\n                <omgdi:waypoint x=\"319\" y=\"257\" />\r\n            </bpmndi:BPMNEdge>\r\n            <bpmndi:BPMNEdge bpmnElement=\"flow1589763069260\" id=\"BPMNEdge_flow1589763069260\">\r\n                <omgdi:waypoint x=\"269\" y=\"410\" />\r\n                <omgdi:waypoint x=\"269\" y=\"473\" />\r\n            </bpmndi:BPMNEdge>\r\n            <bpmndi:BPMNEdge bpmnElement=\"flow1589763111668\" id=\"BPMNEdge_flow1589763111668\">\r\n                <omgdi:waypoint x=\"269\" y=\"350\" />\r\n                <omgdi:waypoint x=\"269\" y=\"287\" />\r\n            </bpmndi:BPMNEdge>\r\n        </bpmndi:BPMNPlane>\r\n    </bpmndi:BPMNDiagram>\r\n</definitions>',NULL,NULL,'管理员','2020-05-18 08:54:04','admin','管理员','2020-05-09 22:09:01','admin','process1589033316555',1,'0',NULL);
INSERT INTO `t_p_processnode` (`id`, `formid`, `processid`, `processnodecode`, `processnodename`, `modelandview`, `modelandview_mobile`, `node_timeout`, `pnodecofigid`, `pushmode`, `delete_flag`) VALUES ('402880ed71f97a380171f9c61cd10012',NULL,'402880ed71f97a380171f9c48fae0011','task1589033371146','项目管理部副经理','maintainPlanController.do?goView&flag=2','maintainPlanController.do?goViewMobile&flag=2',NULL,'402880ed71f97a380171f9c2b4f1000b','no','0'),('402880ed71f97a380171f9c61cdb0013',NULL,'402880ed71f97a380171f9c48fae0011','task1589033414634','制单人重填','maintainPlanController.do?goView&flag=1','maintainPlanController.do?goViewMobile&flag=1',NULL,'402880ed71f97a380171f9c31f1e000d','no','0'),('402880ed722526b1017225435f4c0005',NULL,'402880ed71f97a380171f9c48fae0011','task1589762932932','项目管理部专员','maintainPlanController.do?goView&flag=2','maintainPlanController.do?goViewMobile&flag=2',NULL,'402880ed71f97a380171f9c2b4f1000b','no','0'),('402880ed722526b1017225435f5b0006',NULL,'402880ed71f97a380171f9c48fae0011','task1589763016478','项目管理部经理','maintainPlanController.do?goView&flag=2','maintainPlanController.do?goViewMobile&flag=2',NULL,'402880ed71f97a380171f9c2b4f1000b','no','0');
INSERT INTO `t_p_processnode_config` (`id`, `process_type`, `url_title`, `pc_url`, `mobile_url`) VALUES ('402880ed71f97a380171f9c2b4f1000b','maintainPlan','审批','maintainPlanController.do?goView&flag=2','maintainPlanController.do?goViewMobile&flag=2'),('402880ed71f97a380171f9c31f1e000d','maintainPlan','制单人重填','maintainPlanController.do?goView&flag=1','maintainPlanController.do?goViewMobile&flag=1');
INSERT INTO `t_s_busconfig` (`id`, `busname`, `form_type`, `tableid`, `online_id`, `processid`, `bus_title_exp`, `process_deal_style`, `show_title`, `show_table`, `config_id`) VALUES ('402880ed71f97a380171f9c697ae0014',NULL,'online','','t_b_maintain_plan','402880ed71f97a380171f9c48fae0011','维保任务计划','formdeal','维保任务计划','维保任务计划','402880ed71f97a380171f9c39645000f');
INSERT INTO `t_process_busconfig` (`id`, `show_title`, `real_title`, `show_tablename`, `real_tablename`, `process_type`, `activiti_config_class`) VALUES ('402880ed71f97a380171f9c39645000f','维保任务计划','维保任务计划','维保任务计划','t_b_maintain_plan','maintainPlan','');
INSERT INTO `t_p_flowcondition` (`id`, `create_name`, `create_by`, `create_date`, `update_name`, `update_by`, `update_date`, `sys_org_code`, `sys_company_code`, `process_type`, `flow_text`, `flow_condition`) VALUES ('402880ed722526b10172253feb4f0001','管理员','admin','2020-05-18 08:47:26',NULL,NULL,NULL,'A06A01','A06','maintainPlan','有合同','${contract_id!=null}'),('402880ed722526b1017225401cc30003','管理员','admin','2020-05-18 08:47:38',NULL,NULL,NULL,'A06A01','A06','maintainPlan','无合同','${contract_id==null}');

#维保任务计划

#增加自定义审批人：领料点负责人
INSERT INTO `t_p_process_handlemode` (`id`, `create_name`, `create_by`, `create_date`, `update_name`, `update_by`, `update_date`, `sys_org_code`, `sys_company_code`, `process_type`, `handle_text`, `handle_code`, `handle_exp`) VALUES ('402880ed722526b1017226f468ce0010','管理员','admin','2020-05-18 16:44:11',NULL,NULL,NULL,'A06A01','A06','clothingapply','领料点负责人','WAREHOUSE',NULL);


#服装申领项目经理修改为领料点负责人
UPDATE t_p_process SET typeid = 'clothingapply', userid = null, processname = '服装申领流程', processxmlpath = null, processxml = 0x3C3F786D6C2076657273696F6E3D22312E302220656E636F64696E673D225554462D38223F3E0D0A3C646566696E6974696F6E732020786D6C6E733D22687474703A2F2F7777772E6F6D672E6F72672F737065632F42504D4E2F32303130303532342F4D4F44454C2220786D6C6E733A7873693D22687474703A2F2F7777772E77332E6F72672F323030312F584D4C536368656D612D696E7374616E63652220786D6C6E733A61637469766974693D22687474703A2F2F61637469766974692E6F72672F62706D6E2220786D6C6E733A62706D6E64693D22687474703A2F2F7777772E6F6D672E6F72672F737065632F42504D4E2F32303130303532342F44492220786D6C6E733A6F6D6764633D22687474703A2F2F7777772E6F6D672E6F72672F737065632F44442F32303130303532342F44432220786D6C6E733A6F6D6764693D22687474703A2F2F7777772E6F6D672E6F72672F737065632F44442F32303130303532342F44492220747970654C616E67756167653D22687474703A2F2F7777772E77332E6F72672F323030312F584D4C536368656D61222065787072657373696F6E4C616E67756167653D22687474703A2F2F7777772E77332E6F72672F313939392F585061746822207461726765744E616D6573706163653D22687474703A2F2F7777772E6C7A742E636F6D2E636E223E0D0A202020203C70726F63657373202069643D2270726F636573733135373037353737333031303622206E616D653D22E69C8DE8A385E794B3E9A286E6B581E7A88B223E0D0A20202020202020203C646F63756D656E746174696F6E3EE6B581E7A88BE68F8FE8BFB03C2F646F63756D656E746174696F6E3E0D0A20202020202020203C657874656E73696F6E456C656D656E74733E0D0A2020202020202020202020203C61637469766974693A657865637574696F6E4C697374656E65722069643D22343032383830653534383033613439363031343830356535643931393030313222206576656E743D22656E642220636C6173733D226F72672E6A656563676672616D65776F726B2E776F726B666C6F772E6C697374656E65722E657865637574696F6E2E50726F63657373456E644C697374656E657222203E0D0A2020202020202020202020203C2F61637469766974693A657865637574696F6E4C697374656E65723E0D0A2020202020202020202020203C61637469766974693A657865637574696F6E4C697374656E65722069643D22343032383836306236646238356261353031366462383639313938363030303422206576656E743D22656E642220636C6173733D22636E2E636F6D2E6C7A742E636F6D6D6F6E2E6C697374656E65722E657865637574696F6E2E436C6F7468696E674170706C794175646974456E644C697374656E657222203E0D0A2020202020202020202020203C2F61637469766974693A657865637574696F6E4C697374656E65723E0D0A20202020202020203C2F657874656E73696F6E456C656D656E74733E0D0A20202020202020203C73746172744576656E74202069643D2273746172743122206E616D653D22E5BC80E5A78BE88A82E782B9222061637469766974693A696E69746961746F723D226170706C79557365724964223E0D0A20202020202020203C2F73746172744576656E743E0D0A20202020202020203C656E644576656E74202069643D22656E6422206E616D653D22E7BB93E69D9FE88A82E782B9223E0D0A20202020202020203C2F656E644576656E743E0D0A20202020202020203C757365725461736B202069643D227461736B3135373037353737333631353222206E616D653D22E680BBE983A8E69C8DE8A385E7AEA1E79086E59198E5AEA1E689B9222061637469766974693A63616E64696461746555736572733D22313336303137363234303222203E0D0A20202020202020203C2F757365725461736B3E0D0A20202020202020203C757365725461736B202069643D227461736B3135373037363033363239313222206E616D653D22E588B6E58D95E4BABAE4BFAEE694B9222061637469766974693A61737369676E65653D22247B6170706C795573657249647D22203E0D0A20202020202020203C2F757365725461736B3E0D0A20202020202020203C757365725461736B202069643D227461736B3135373232343731383239333922206E616D653D22E9A1B9E79BAEE7BB8FE79086E5AEA1E689B9222061637469766974693A63616E64696461746555736572733D22247B666C6F775574696C2E637573746F6D65725573657253656C6563742842504D5F464F524D5F4B45592C42504D5F444154415F49442C2757415245484F55534527297D22203E0D0A20202020202020203C2F757365725461736B3E0D0A20202020202020203C73657175656E6365466C6F77202069643D22666C6F773135373037353737383533323422206E616D653D22E9809AE8BF872220736F757263655265663D227461736B3135373037353737333631353222207461726765745265663D22656E64223E0D0A20202020202020203C2F73657175656E6365466C6F773E0D0A20202020202020203C73657175656E6365466C6F77202069643D22666C6F773135373037353737383739363822206E616D653D222220736F757263655265663D2273746172743122207461726765745265663D227461736B31353732323437313832393339223E0D0A20202020202020203C2F73657175656E6365466C6F773E0D0A20202020202020203C73657175656E6365466C6F77202069643D22666C6F773135373037363033373031373622206E616D653D22E9A9B3E59B9E2220736F757263655265663D227461736B3135373037353737333631353222207461726765745265663D227461736B31353730373630333632393132223E0D0A20202020202020203C2F73657175656E6365466C6F773E0D0A20202020202020203C73657175656E6365466C6F77202069643D22666C6F773135373037363034303532323022206E616D653D22E68F90E4BAA42220736F757263655265663D227461736B3135373037363033363239313222207461726765745265663D227461736B31353732323437313832393339223E0D0A20202020202020203C2F73657175656E6365466C6F773E0D0A20202020202020203C73657175656E6365466C6F77202069643D22666C6F773135373232343732313235333022206E616D653D22E9809AE8BF872220736F757263655265663D227461736B3135373232343731383239333922207461726765745265663D227461736B31353730373537373336313532223E0D0A20202020202020203C2F73657175656E6365466C6F773E0D0A20202020202020203C73657175656E6365466C6F77202069643D22666C6F773135373232343732313738323722206E616D653D22E9A9B3E59B9E2220736F757263655265663D227461736B3135373232343731383239333922207461726765745265663D227461736B31353730373630333632393132223E0D0A20202020202020203C2F73657175656E6365466C6F773E0D0A202020203C2F70726F636573733E0D0A202020203C62706D6E64693A42504D4E4469616772616D2069643D2242504D4E4469616772616D5F70726F6365737331353730373537373330313036223E0D0A20202020202020203C62706D6E64693A42504D4E506C616E652062706D6E456C656D656E743D2270726F6365737331353730373537373330313036222069643D2242504D4E506C616E655F70726F6365737331353730373537373330313036223E0D0A2020202020202020202020203C62706D6E64693A42504D4E53686170652062706D6E456C656D656E743D22737461727431222069643D2242504D4E53686170655F737461727431223E0D0A202020202020202020202020202020203C6F6D6764633A426F756E6473206865696768743D223330222077696474683D2233302220783D223230302220793D223530222F3E0D0A2020202020202020202020203C2F62706D6E64693A42504D4E53686170653E0D0A2020202020202020202020203C62706D6E64693A42504D4E53686170652062706D6E456C656D656E743D22656E64222069643D2242504D4E53686170655F656E64223E0D0A202020202020202020202020202020203C6F6D6764633A426F756E6473206865696768743D223330222077696474683D2233302220783D223230302220793D22333332222F3E0D0A2020202020202020202020203C2F62706D6E64693A42504D4E53686170653E0D0A2020202020202020202020203C62706D6E64693A42504D4E53686170652062706D6E456C656D656E743D227461736B31353730373537373336313532222069643D2242504D4E53686170655F7461736B31353730373537373336313532223E0D0A202020202020202020202020202020203C6F6D6764633A426F756E6473206865696768743D223530222077696474683D2239302220783D223137302220793D22323333222F3E0D0A2020202020202020202020203C2F62706D6E64693A42504D4E53686170653E0D0A2020202020202020202020203C62706D6E64693A42504D4E53686170652062706D6E456C656D656E743D227461736B31353730373630333632393132222069643D2242504D4E53686170655F7461736B31353730373630333632393132223E0D0A202020202020202020202020202020203C6F6D6764633A426F756E6473206865696768743D223530222077696474683D2239302220783D223336382220793D22313831222F3E0D0A2020202020202020202020203C2F62706D6E64693A42504D4E53686170653E0D0A2020202020202020202020203C62706D6E64693A42504D4E53686170652062706D6E456C656D656E743D227461736B31353732323437313832393339222069643D2242504D4E53686170655F7461736B31353732323437313832393339223E0D0A202020202020202020202020202020203C6F6D6764633A426F756E6473206865696768743D223530222077696474683D2239302220783D223137302220793D22313232222F3E0D0A2020202020202020202020203C2F62706D6E64693A42504D4E53686170653E0D0A2020202020202020202020203C62706D6E64693A42504D4E456467652062706D6E456C656D656E743D22666C6F7731353730373537373835333234222069643D2242504D4E456467655F666C6F7731353730373537373835333234223E0D0A202020202020202020202020202020203C6F6D6764693A776179706F696E7420783D223231352220793D2232383822202F3E0D0A202020202020202020202020202020203C6F6D6764693A776179706F696E7420783D223231352220793D2233333222202F3E0D0A2020202020202020202020203C2F62706D6E64693A42504D4E456467653E0D0A2020202020202020202020203C62706D6E64693A42504D4E456467652062706D6E456C656D656E743D22666C6F7731353730373537373837393638222069643D2242504D4E456467655F666C6F7731353730373537373837393638223E0D0A202020202020202020202020202020203C6F6D6764693A776179706F696E7420783D223231352220793D22383022202F3E0D0A202020202020202020202020202020203C6F6D6764693A776179706F696E7420783D223231352220793D2231313722202F3E0D0A2020202020202020202020203C2F62706D6E64693A42504D4E456467653E0D0A2020202020202020202020203C62706D6E64693A42504D4E456467652062706D6E456C656D656E743D22666C6F7731353730373630333730313736222069643D2242504D4E456467655F666C6F7731353730373630333730313736223E0D0A202020202020202020202020202020203C6F6D6764693A776179706F696E7420783D223236352220793D2232353822202F3E0D0A202020202020202020202020202020203C6F6D6764693A776179706F696E7420783D223331342220793D2232353822202F3E0D0A202020202020202020202020202020203C6F6D6764693A776179706F696E7420783D223331342220793D2232303622202F3E0D0A202020202020202020202020202020203C6F6D6764693A776179706F696E7420783D223336332220793D2232303622202F3E0D0A2020202020202020202020203C2F62706D6E64693A42504D4E456467653E0D0A2020202020202020202020203C62706D6E64693A42504D4E456467652062706D6E456C656D656E743D22666C6F7731353730373630343035323230222069643D2242504D4E456467655F666C6F7731353730373630343035323230223E0D0A202020202020202020202020202020203C6F6D6764693A776179706F696E7420783D223431332220793D2231373622202F3E0D0A202020202020202020202020202020203C6F6D6764693A776179706F696E7420783D223431332220793D22393722202F3E0D0A202020202020202020202020202020203C6F6D6764693A776179706F696E7420783D223231352220793D22393722202F3E0D0A202020202020202020202020202020203C6F6D6764693A776179706F696E7420783D223231352220793D2231313722202F3E0D0A2020202020202020202020203C2F62706D6E64693A42504D4E456467653E0D0A2020202020202020202020203C62706D6E64693A42504D4E456467652062706D6E456C656D656E743D22666C6F7731353732323437323132353330222069643D2242504D4E456467655F666C6F7731353732323437323132353330223E0D0A202020202020202020202020202020203C6F6D6764693A776179706F696E7420783D223231352220793D2231373722202F3E0D0A202020202020202020202020202020203C6F6D6764693A776179706F696E7420783D223231352220793D2232323822202F3E0D0A2020202020202020202020203C2F62706D6E64693A42504D4E456467653E0D0A2020202020202020202020203C62706D6E64693A42504D4E456467652062706D6E456C656D656E743D22666C6F7731353732323437323137383237222069643D2242504D4E456467655F666C6F7731353732323437323137383237223E0D0A202020202020202020202020202020203C6F6D6764693A776179706F696E7420783D223236352220793D2231343722202F3E0D0A202020202020202020202020202020203C6F6D6764693A776179706F696E7420783D223331342220793D2231343722202F3E0D0A202020202020202020202020202020203C6F6D6764693A776179706F696E7420783D223331342220793D2232303622202F3E0D0A202020202020202020202020202020203C6F6D6764693A776179706F696E7420783D223336332220793D2232303622202F3E0D0A2020202020202020202020203C2F62706D6E64693A42504D4E456467653E0D0A20202020202020203C2F62706D6E64693A42504D4E506C616E653E0D0A202020203C2F62706D6E64693A42504D4E4469616772616D3E0D0A3C2F646566696E6974696F6E733E, processxmname = null, note = null, update_name = '管理员', update_date = '2020-05-18 18:24:36', update_by = 'admin', create_name = '管理员', create_date = '2019-10-11 10:16:17', create_by = 'admin', processkey = 'process1570757730106', processstate = 1, processtype = '0', ccmode = null WHERE id = '4028860b6db85ba5016db89a3526000b';

#增加自定义角色创建者组织机构负责人
INSERT INTO `t_p_process_handlemode` (`id`, `create_name`, `create_by`, `create_date`, `update_name`, `update_by`, `update_date`, `sys_org_code`, `sys_company_code`, `process_type`, `handle_text`, `handle_code`, `handle_exp`) VALUES ('402881e5724b6dc001724b70c6390001','管理员','admin','2020-05-25 18:46:21',NULL,NULL,NULL,'A06A01','A06',NULL,'创建者组织机构负责人','CRE_DEP_MANAGER',NULL);

#修改维保任务执行菜单地址
UPDATE t_s_function SET functionurl = 'maintainBillController.do?list4Task' WHERE ID = '402880eb6c2ce171016c2ce6a04f0001';

#立项签报增加备注
ALTER TABLE `t_b_activiti_project` ADD COLUMN `remark` VARCHAR(500) NULL COMMENT '备注';

#项目密钥管理
CREATE TABLE `t_b_projectkey`  (
  `id` varchar(36) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `name` longtext CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '描述',
  `username` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '用户名',
  `password` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '密码',
  `deptid` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '组织机构id',
  `deptname` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '项目名称',
  `create_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建人名称',
  `create_by` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建人登录名称',
  `create_date` datetime(0) NULL DEFAULT NULL COMMENT '创建日期',
  `update_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '更新人名称',
  `update_by` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '更新人登录名称',
  `update_date` datetime(0) NULL DEFAULT NULL COMMENT '更新日期',
  `sys_org_code` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '所属部门',
  `sys_company_code` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '所属公司',
  `bpm_status` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '1' COMMENT '流程状态',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
INSERT INTO `t_s_function`(`ID`, `functioniframe`, `functionlevel`, `functionname`, `functionorder`, `functionurl`, `parentfunctionid`, `iconid`, `desk_iconid`, `functiontype`, `function_icon_style`, `create_by`, `create_name`, `update_by`, `update_date`, `create_date`, `update_name`, `remark`) VALUES ('ff80808172e0289a0172e02cbf020002', NULL, 1, '项目密钥管理', '99', 'projectkeyController.do?list', 'ff8080816ae2c23c016ae2c32f110001', '8a8ab0b246dc81120146dc8180460000', '8a8ab0b246dc81120146dc8180dd001e', 0, '', 'admin', '管理员', NULL, NULL, '2020-06-23 15:55:28', NULL, '');


ALTER TABLE t_b_projectkey ADD COLUMN `description` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL;
ALTER TABLE t_b_projectkey ADD COLUMN `type` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL;


#任务平台-项目管理部任务
INSERT INTO `t_s_function`(`ID`, `functioniframe`, `functionlevel`, `functionname`, `functionorder`, `functionurl`, `parentfunctionid`, `iconid`, `desk_iconid`, `functiontype`, `function_icon_style`, `create_by`, `create_name`, `update_by`, `update_date`, `create_date`, `update_name`, `remark`) VALUES ('ff808081731f0fa001731f1ac8f10007', NULL, 1, '项目任务计划', '0', 'projectTaskPlanController.do?list&type=pmdept', '4028819b65adcefa0165add2446f0001', '8a8ab0b246dc81120146dc8180460000', '8a8ab0b246dc81120146dc8180dd001e', 0, '', 'admin', '管理员', NULL, NULL, '2020-07-05 21:11:56', NULL, '');

INSERT INTO `t_s_typegroup`(`ID`, `typegroupcode`, `typegroupname`, `create_date`, `create_name`) VALUES ('ff808081731375c301731376f0d10001', 'planperiodtype', '工作计划周期类型', '2020-07-03 14:57:09', '管理员');
INSERT INTO `t_s_typegroup`(`ID`, `typegroupcode`, `typegroupname`, `create_date`, `create_name`) VALUES ('ff8080817303418e017303f098390006', 'tasktimetype', '工作时间类型', '2020-06-30 14:36:06', '管理员');
INSERT INTO `t_s_type`(`ID`, `typecode`, `typename`, `typepid`, `typegroupid`, `create_date`, `create_name`) VALUES ('ff808081731375c3017313777a780005', 'week', '星期', NULL, 'ff808081731375c301731376f0d10001', '2020-07-03 14:57:44', '管理员');
INSERT INTO `t_s_type`(`ID`, `typecode`, `typename`, `typepid`, `typegroupid`, `create_date`, `create_name`) VALUES ('ff808081731375c3017313771d140003', 'month', '月', NULL, 'ff808081731375c301731376f0d10001', '2020-07-03 14:57:20', '管理员');
INSERT INTO `t_s_type`(`ID`, `typecode`, `typename`, `typepid`, `typegroupid`, `create_date`, `create_name`) VALUES ('ff8080817303418e017303f10acf000a', 'periodtime', '周期性工作', NULL, 'ff8080817303418e017303f098390006', '2020-06-30 14:36:35', '管理员');
INSERT INTO `t_s_type`(`ID`, `typecode`, `typename`, `typepid`, `typegroupid`, `create_date`, `create_name`) VALUES ('ff8080817303418e017303f0d8ad0008', 'onetime', '临时工作', NULL, 'ff8080817303418e017303f098390006', '2020-06-30 14:36:23', '管理员');

alter table p_projecttaskplan add column
  `sendTimeType` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '时间类型';
alter table p_projecttaskplan add column
  `endTime` datetime(0) NULL DEFAULT NULL COMMENT '截止时间';
alter table p_projecttaskplan add column
  `planperiodtype` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL;
alter table p_projecttaskplan add column
  `periodnum` int(11) NULL DEFAULT NULL;

INSERT INTO  `t_s_function`(`ID`, `functioniframe`, `functionlevel`, `functionname`, `functionorder`, `functionurl`, `parentfunctionid`, `iconid`, `desk_iconid`, `functiontype`, `function_icon_style`, `create_by`, `create_name`, `update_by`, `update_date`, `create_date`, `update_name`, `remark`) VALUES ('ff80808173279d20017327a3eae40001', NULL, 1, '任务平台角色管理', '99', 'roleController.do?role-t-type', '4028819b65adcefa0165add2446f0001', '8a8ab0b246dc81120146dc8180460000', '8a8ab0b246dc81120146dc8180dd001e', 0, '', 'admin', '管理员', NULL, NULL, '2020-07-07 12:58:41', NULL, '');

#项目位置信息
CREATE TABLE t_b_project_location  (
  `id` varchar(36) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `projectid` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '项目id',
  `lng` double NULL DEFAULT NULL COMMENT '经度',
  `lat` double NULL DEFAULT NULL COMMENT '纬度',
  `create_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建人名称',
  `create_by` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建人登录名称',
  `create_date` datetime(0) NULL DEFAULT NULL COMMENT '创建日期',
  `update_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '更新人名称',
  `update_by` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '更新人登录名称',
  `update_date` datetime(0) NULL DEFAULT NULL COMMENT '更新日期',
  `sys_org_code` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '所属部门',
  `sys_company_code` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '所属公司',
  `name` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '点位名称',
  `intensiveProjectType` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '点位分类',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
INSERT INTO `t_s_typegroup`(`ID`, `typegroupcode`, `typegroupname`, `create_date`, `create_name`) VALUES ('ff8080817327f2c6017327f8a86d0001', 'intensiveProjectType', '集约化项目分类', '2020-07-07 14:31:14', '管理员');
INSERT INTO `t_s_type`(`ID`, `typecode`, `typename`, `typepid`, `typegroupid`, `create_date`, `create_name`) VALUES ('ff8080817327f2c6017327f9de200007', 'qpgonganju', '青浦公安系统', NULL, 'ff8080817327f2c6017327f8a86d0001', '2020-07-07 14:32:34', '管理员');
INSERT INTO `t_s_type`(`ID`, `typecode`, `typename`, `typepid`, `typegroupid`, `create_date`, `create_name`) VALUES ('ff8080817327f2c6017327f977340005', 'qpshuiwuxitong', '青浦水务系统', NULL, 'ff8080817327f2c6017327f8a86d0001', '2020-07-07 14:32:07', '管理员');
INSERT INTO `t_s_type`(`ID`, `typecode`, `typename`, `typepid`, `typegroupid`, `create_date`, `create_name`) VALUES ('ff8080817327f2c6017327f91e580003', 'qpshuiwusuo', '青浦税务所', NULL, 'ff8080817327f2c6017327f8a86d0001', '2020-07-07 14:31:44', '管理员');
#休假签报增加分支
INSERT INTO `t_p_flowcondition` (`id`, `create_name`, `create_by`, `create_date`, `update_name`, `update_by`, `update_date`, `sys_org_code`, `sys_company_code`, `process_type`, `flow_text`, `flow_condition`) VALUES ('402880ed732da6db01732da825740001','管理员','admin','2020-07-08 17:01:01',NULL,NULL,NULL,'A06A01','A06','holiday','一线人员','${flowconditionUtil.holidayUserType(BPM_FORM_KEY,id) == 1}'),('402880ed732da6db01732da8b0b60003','管理员','admin','2020-07-08 17:01:37',NULL,NULL,NULL,'A06A01','A06','holiday','部门专员','${flowconditionUtil.holidayUserType(BPM_FORM_KEY,id) == 2}'),('402880ed732da6db01732da938180005','管理员','admin','2020-07-08 17:02:11',NULL,NULL,NULL,'A06A01','A06','holiday','部门经理','${flowconditionUtil.holidayUserType(BPM_FORM_KEY,id) == 3}'),('402880ed732da6db01732da9d9490007','管理员','admin','2020-07-08 17:02:53',NULL,NULL,NULL,'A06A01','A06','holiday','项目经理','${flowconditionUtil.holidayUserType(BPM_FORM_KEY,id) == 4}');

#无指派人任务定时警报
INSERT INTO `t_s_timetask` (`ID`, `CREATE_BY`, `CREATE_DATE`, `CREATE_NAME`, `CRON_EXPRESSION`, `IS_EFFECT`, `IS_START`, `TASK_DESCRIBE`, `TASK_ID`, `UPDATE_BY`, `UPDATE_DATE`, `UPDATE_NAME`, `CLASS_NAME`, `RUN_SERVER_IP`, `RUN_SERVER`) VALUES ('40281d8173b7e4b00173b7f50bd10003','admin','2020-08-04 13:32:37','管理员','0 15/30 * * * ?','0','0','每30分钟提示无明确指派人的任务','AlertNoAssignee','admin','2020-08-04 13:41:00','管理员','cn.com.lzt.workflow.task.AlertNoAssignee','本地','本地');

#预算管理
drop table if exists `t_b_budget_goals`;
CREATE TABLE `t_b_budget_goals` (
  `id` varchar(36) NOT NULL COMMENT '主键',
  `create_by` varchar(50) DEFAULT NULL COMMENT '创建人登录名称',
  `create_name` varchar(50) DEFAULT NULL COMMENT '创建人名称',
  `sys_company_code` varchar(50) DEFAULT NULL COMMENT '所属公司',
  `update_by` varchar(50) DEFAULT NULL COMMENT '更新人登录名称',
  `sys_org_code` varchar(50) DEFAULT NULL COMMENT '所属部门',
  `bpm_status` varchar(32) DEFAULT '1' COMMENT '流程状态',
  `create_date` datetime DEFAULT NULL COMMENT '创建日期',
  `update_name` varchar(50) DEFAULT NULL COMMENT '更新人名称',
  `update_date` datetime DEFAULT NULL COMMENT '更新日期',
  `code` varchar(64) DEFAULT NULL COMMENT '编码',
  `name` varchar(255) DEFAULT NULL COMMENT '名称',
  `datatype` varchar(32) DEFAULT NULL COMMENT '指标类型',
  `tooltype` varchar(32) DEFAULT NULL COMMENT '编制工具类型',
  `texrate` double(32,0) DEFAULT NULL COMMENT '税率',
  `control_budget` int(32) DEFAULT NULL COMMENT '是否控制预算',
  `parent_id` varchar(32) DEFAULT NULL COMMENT '父id',
  `is_leaf` int(32) DEFAULT NULL COMMENT '是否叶子节点',
  `label` varchar(255) DEFAULT NULL COMMENT '标签',
  `remark` varchar(500) DEFAULT NULL COMMENT '备注',
  `unit` varchar(45) DEFAULT NULL COMMENT '单位',
  `finance_subject` varchar(45) DEFAULT NULL COMMENT '会计科目',
  `seq_no` int(11) DEFAULT NULL COMMENT '序号',
  `category` varchar(45) DEFAULT NULL COMMENT '分类',
  `fraction_num` int(11) DEFAULT NULL COMMENT '小数位数',
  `currency_symbol` varchar(45) DEFAULT NULL COMMENT '货币符号',
  `show_type` varchar(45) DEFAULT NULL COMMENT '显示方式',
  `thousandth` int(11) DEFAULT NULL COMMENT '千分位',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='预算指标库';

drop table if exists `t_b_budget_dept`;
CREATE TABLE `t_b_budget_dept` (
  `id` varchar(36) NOT NULL COMMENT '主键',
  `depart_id` varchar(32) DEFAULT NULL COMMENT '部门id',
  `create_by` varchar(50) DEFAULT NULL COMMENT '创建人登录名称',
  `create_name` varchar(50) DEFAULT NULL COMMENT '创建人名称',
  `sys_company_code` varchar(50) DEFAULT NULL COMMENT '所属公司',
  `budget_user_realname` varchar(255) DEFAULT NULL COMMENT '负责人姓名',
  `update_by` varchar(50) DEFAULT NULL COMMENT '更新人登录名称',
  `dep_name` varchar(255) DEFAULT NULL COMMENT '部门名称',
  `budget_dep_name` varchar(255) DEFAULT NULL COMMENT '预算主体名',
  `sys_org_code` varchar(50) DEFAULT NULL COMMENT '所属部门',
  `bpm_status` varchar(32) DEFAULT '1' COMMENT '流程状态',
  `create_date` datetime DEFAULT NULL COMMENT '创建日期',
  `update_name` varchar(50) DEFAULT NULL COMMENT '更新人名称',
  `update_date` datetime DEFAULT NULL COMMENT '更新日期',
  `budget_user_id` varchar(32) DEFAULT NULL COMMENT '负责人id',
  `parent_id` varchar(32) DEFAULT NULL COMMENT '上级预算主体'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='预算主体库';

drop table if exists `t_b_budget_period`;
CREATE TABLE `t_b_budget_period` (
  `id` varchar(36) NOT NULL,
  `create_name` varchar(50) DEFAULT NULL COMMENT '创建人名称',
  `create_by` varchar(50) DEFAULT NULL COMMENT '创建人登录名称',
  `create_date` datetime DEFAULT NULL COMMENT '创建日期',
  `update_name` varchar(50) DEFAULT NULL COMMENT '更新人名称',
  `update_by` varchar(50) DEFAULT NULL COMMENT '更新人登录名称',
  `update_date` datetime DEFAULT NULL COMMENT '更新日期',
  `sys_org_code` varchar(50) DEFAULT NULL COMMENT '所属部门',
  `sys_company_code` varchar(50) DEFAULT NULL COMMENT '所属公司',
  `bpm_status` varchar(32) DEFAULT '1' COMMENT '流程状态',
  `period_year` varchar(32) DEFAULT NULL COMMENT '周期年份',
  `period_type` varchar(32) DEFAULT NULL COMMENT '周期类型',
  `name` varchar(255) DEFAULT NULL COMMENT '周期名称',
  `start` datetime DEFAULT NULL COMMENT '起始日期',
  `end` datetime DEFAULT NULL COMMENT '截止日期',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

drop table if exists `t_b_budget_period_detail`;
CREATE TABLE `t_b_budget_period_detail` (
  `id` varchar(36) NOT NULL,
  `create_name` varchar(50) DEFAULT NULL COMMENT '创建人名称',
  `create_by` varchar(50) DEFAULT NULL COMMENT '创建人登录名称',
  `create_date` datetime DEFAULT NULL COMMENT '创建日期',
  `update_name` varchar(50) DEFAULT NULL COMMENT '更新人名称',
  `update_by` varchar(50) DEFAULT NULL COMMENT '更新人登录名称',
  `update_date` datetime DEFAULT NULL COMMENT '更新日期',
  `sys_org_code` varchar(50) DEFAULT NULL COMMENT '所属部门',
  `sys_company_code` varchar(50) DEFAULT NULL COMMENT '所属公司',
  `bpm_status` varchar(32) DEFAULT '1' COMMENT '流程状态',
  `start` datetime DEFAULT NULL COMMENT '起始日期',
  `end` datetime DEFAULT NULL COMMENT '截止日期',
  `period_id` varchar(32) DEFAULT NULL COMMENT '周期id',
  `period_year` varchar(32) DEFAULT NULL COMMENT '预算年度',
  `name` varchar(45) DEFAULT NULL COMMENT '名称',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='预算周期详情';

drop table if exists `t_b_budget_demo`;
CREATE TABLE `t_b_budget_demo` (
  `id` varchar(36) NOT NULL,
  `create_name` varchar(50) DEFAULT NULL COMMENT '创建人名称',
  `create_by` varchar(50) DEFAULT NULL COMMENT '创建人登录名称',
  `create_date` datetime DEFAULT NULL COMMENT '创建日期',
  `update_name` varchar(50) DEFAULT NULL COMMENT '更新人名称',
  `update_by` varchar(50) DEFAULT NULL COMMENT '更新人登录名称',
  `update_date` datetime DEFAULT NULL COMMENT '更新日期',
  `sys_org_code` varchar(50) DEFAULT NULL COMMENT '所属部门',
  `sys_company_code` varchar(50) DEFAULT NULL COMMENT '所属公司',
  `bpm_status` varchar(32) DEFAULT '1' COMMENT '流程状态',
  `period_id` varchar(32) DEFAULT NULL COMMENT '周期id',
  `period_year` varchar(32) DEFAULT NULL COMMENT '周期年份',
  `period_type` varchar(32) DEFAULT NULL COMMENT '周期类型',
  `demo_name` varchar(255) DEFAULT NULL COMMENT '样表名称',
  `json` longtext COMMENT '全局json',
  `status` int(11) DEFAULT NULL COMMENT '0 未下发\n1 已下发',
  `demo_type` varchar(45) DEFAULT NULL COMMENT '样表类型\nnormal 通用 orders 物料成本 人力成本',
  `verify_user_id` varchar(45) DEFAULT NULL,
  `reply_user_id` varchar(45) DEFAULT NULL,
  `verify_user_name` varchar(255) DEFAULT NULL,
  `reply_user_name` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='预算样表';

drop table if exists `t_b_budget_demo_dept`;
CREATE TABLE `t_b_budget_demo_dept` (
  `id` varchar(36) NOT NULL,
  `create_name` varchar(50) DEFAULT NULL COMMENT '创建人名称',
  `create_by` varchar(50) DEFAULT NULL COMMENT '创建人登录名称',
  `create_date` datetime DEFAULT NULL COMMENT '创建日期',
  `update_name` varchar(50) DEFAULT NULL COMMENT '更新人名称',
  `update_by` varchar(50) DEFAULT NULL COMMENT '更新人登录名称',
  `update_date` datetime DEFAULT NULL COMMENT '更新日期',
  `sys_org_code` varchar(50) DEFAULT NULL COMMENT '所属部门',
  `sys_company_code` varchar(50) DEFAULT NULL COMMENT '所属公司',
  `bpm_status` varchar(32) DEFAULT '1' COMMENT '流程状态',
  `demo_id` varchar(32) DEFAULT NULL COMMENT '样表id',
  `budget_dep_id` varchar(32) DEFAULT NULL COMMENT '主体id',
  `period_year` varchar(45) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `depyear` (`budget_dep_id`,`period_year`,`demo_id`),
  KEY `demoid` (`demo_id`,`period_year`,`budget_dep_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='样表实体关联';

drop table if exists `t_b_budget_demo_goals`;
CREATE TABLE `t_b_budget_demo_goals` (
  `id` varchar(36) NOT NULL,
  `create_name` varchar(50) DEFAULT NULL COMMENT '创建人名称',
  `create_by` varchar(50) DEFAULT NULL COMMENT '创建人登录名称',
  `create_date` datetime DEFAULT NULL COMMENT '创建日期',
  `update_name` varchar(50) DEFAULT NULL COMMENT '更新人名称',
  `update_by` varchar(50) DEFAULT NULL COMMENT '更新人登录名称',
  `update_date` datetime DEFAULT NULL COMMENT '更新日期',
  `sys_org_code` varchar(50) DEFAULT NULL COMMENT '所属部门',
  `sys_company_code` varchar(50) DEFAULT NULL COMMENT '所属公司',
  `bpm_status` varchar(32) DEFAULT '1' COMMENT '流程状态',
  `demo_id` varchar(32) DEFAULT NULL COMMENT '样表id',
  `period_id` varchar(32) DEFAULT NULL COMMENT '周期id',
  `period_year` varchar(32) DEFAULT NULL COMMENT '预算年份',
  `period_type` varchar(32) DEFAULT NULL COMMENT '预算类型',
  `period_detail_id` varchar(32) DEFAULT NULL COMMENT '预算周期明细id',
  `period_detail_name` varchar(255) DEFAULT NULL,
  `period_detail_start` datetime DEFAULT NULL COMMENT '预算周期开始',
  `period_detail_end` datetime DEFAULT NULL COMMENT '预算周期结束',
  `goals_id` varchar(32) DEFAULT NULL COMMENT '指标id',
  `goals_name` varchar(255) DEFAULT NULL COMMENT '指标名称',
  `include_tax` int(11) DEFAULT NULL COMMENT '是否含税',
  `data_type` varchar(32) DEFAULT NULL COMMENT '数据类型',
  `data_rules` varchar(512) DEFAULT NULL COMMENT '数据规则',
  `data_formula` varchar(255) DEFAULT NULL COMMENT '公式',
  `data_value` decimal(30,8) DEFAULT NULL COMMENT '数字值',
  `control_flag` int(11) DEFAULT NULL COMMENT '控制预算',
  `ui_style` varchar(512) DEFAULT NULL COMMENT '样式json',
  `memo` varchar(512) DEFAULT NULL COMMENT '备注',
  `row` int(11) DEFAULT NULL COMMENT '行',
  `col` int(11) DEFAULT NULL COMMENT '列',
  `demo_type` varchar(45) DEFAULT NULL COMMENT '类型：normal 普通 ,orders 物料, hr 人力',
  `data_txt` varchar(512) DEFAULT NULL COMMENT '文本值',
  PRIMARY KEY (`id`),
  KEY `demoid` (`demo_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='预算样表指标';

drop table if exists `t_b_budget_inst`;
CREATE TABLE `t_b_budget_inst` (
  `id` varchar(36) NOT NULL,
  `create_name` varchar(50) DEFAULT NULL COMMENT '创建人名称',
  `create_by` varchar(50) DEFAULT NULL COMMENT '创建人登录名称',
  `create_date` datetime DEFAULT NULL COMMENT '创建日期',
  `update_name` varchar(50) DEFAULT NULL COMMENT '更新人名称',
  `update_by` varchar(50) DEFAULT NULL COMMENT '更新人登录名称',
  `update_date` datetime DEFAULT NULL COMMENT '更新日期',
  `sys_org_code` varchar(50) DEFAULT NULL COMMENT '所属部门',
  `sys_company_code` varchar(50) DEFAULT NULL COMMENT '所属公司',
  `bpm_status` varchar(32) DEFAULT '1' COMMENT '流程状态',
  `demo_id` varchar(32) DEFAULT NULL COMMENT '样表id',
  `period_id` varchar(32) DEFAULT NULL COMMENT '周期id',
  `period_year` varchar(32) DEFAULT NULL COMMENT '周期年份',
  `json` longtext COMMENT '数据',
  `bugdet_dep_id` varchar(32) DEFAULT NULL COMMENT '预算主体id',
  `bugdet_dep_name` varchar(255) DEFAULT NULL COMMENT '预算主体',
  `demo_type` varchar(32) DEFAULT NULL COMMENT '样表类型',
  `bugdet_dep_user_id` varchar(45) DEFAULT NULL COMMENT '预算主体负责人',
  `inst_name` varchar(255) DEFAULT NULL,
  `reply` varchar(512) DEFAULT NULL COMMENT '批复',
  `verify` varchar(512) DEFAULT NULL COMMENT '审核意见',
  `refuse` varchar(512) DEFAULT NULL COMMENT '拒绝描述',
  `status` int(11) DEFAULT NULL COMMENT '0未上报、1已上报、2已审核、3已批复、-1已驳回',
  `reply_time` datetime DEFAULT NULL,
  `verify_time` datetime DEFAULT NULL,
  `refuse_time` datetime DEFAULT NULL,
   `verify_user_id` varchar(45) DEFAULT NULL,
  `reply_user_id` varchar(45) DEFAULT NULL,
   `verify_user_name` varchar(255) DEFAULT NULL,
  `reply_user_name` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='预算主表';

drop table if exists `t_b_budget_inst_goals`;
CREATE TABLE `t_b_budget_inst_goals` (
  `id` varchar(36) NOT NULL,
  `create_name` varchar(50) DEFAULT NULL COMMENT '创建人名称',
  `create_by` varchar(50) DEFAULT NULL COMMENT '创建人登录名称',
  `create_date` datetime DEFAULT NULL COMMENT '创建日期',
  `update_name` varchar(50) DEFAULT NULL COMMENT '更新人名称',
  `update_by` varchar(50) DEFAULT NULL COMMENT '更新人登录名称',
  `update_date` datetime DEFAULT NULL COMMENT '更新日期',
  `sys_org_code` varchar(50) DEFAULT NULL COMMENT '所属部门',
  `sys_company_code` varchar(50) DEFAULT NULL COMMENT '所属公司',
  `bpm_status` varchar(32) DEFAULT '1' COMMENT '流程状态',
  `inst_id` varchar(32) DEFAULT NULL COMMENT '预算表id',
  `demo_goals_id` varchar(45) DEFAULT NULL,
  `period_id` varchar(32) DEFAULT NULL COMMENT '周期id',
  `period_year` varchar(32) DEFAULT NULL COMMENT '预算年份',
  `period_type` varchar(32) DEFAULT NULL COMMENT '预算类型',
  `period_detail_id` varchar(32) DEFAULT NULL COMMENT '预算周期明细id',
  `period_detail_name` varchar(255) DEFAULT NULL,
  `period_detail_start` datetime DEFAULT NULL COMMENT '预算周期开始',
  `period_detail_end` datetime DEFAULT NULL COMMENT '预算周期结束',
  `goals_id` varchar(32) DEFAULT NULL COMMENT '指标id',
  `goals_name` varchar(255) DEFAULT NULL COMMENT '指标名称',
  `include_tax` int(11) DEFAULT NULL COMMENT '是否含税',
  `data_type` varchar(32) DEFAULT NULL COMMENT '数据类型',
  `data_rules` varchar(512) DEFAULT NULL COMMENT '数据规则',
  `data_formula` varchar(255) DEFAULT NULL COMMENT '公式',
  `data_value` decimal(30,8) DEFAULT NULL COMMENT '值',
  `control_flag` int(11) DEFAULT NULL COMMENT '控制预算',
  `ui_style` varchar(512) DEFAULT NULL COMMENT '样式json',
  `memo` varchar(512) DEFAULT NULL COMMENT '备注',
  `row` int(11) DEFAULT NULL COMMENT '行',
  `col` int(11) DEFAULT NULL COMMENT '列',
  `expect` int(11) DEFAULT NULL COMMENT '0 预计，1实际',
  `demo_type` varchar(45) DEFAULT NULL COMMENT '类型：normal 普通 ,orders 物料, hr 人力',
  `data_txt` varchar(512) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `inst_id` (`inst_id`,`row`,`col`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='预算指标';

INSERT INTO `t_s_typegroup` (`ID`, `typegroupcode`, `typegroupname`, `create_date`, `create_name`) VALUES ('402881e57307f46c017308014440000b','budget_period_type','预算周期类型','2020-07-01 09:32:48','管理员'),('402881e5730d7a8901730d847abb0004','budget_goals_datatype','预算指标数据类型','2020-07-02 11:14:13','管理员'),('402881e5730d887201730d8a26ca0001','budget_goals_tool','预算指标工具','2020-07-02 11:20:25','管理员'),('402881e5731d4e1b01731f062f000004','budget_demo_goals_datatype','预算样表成本计算方式','2020-07-05 20:49:26','管理员');
INSERT INTO t_s_typegroup (ID, typegroupcode, typegroupname, create_date, create_name) VALUES ('402881e5730d1a2101730d75cf7b0003', 'budget_goals_category', '预算指标类型', null, null);
INSERT INTO `t_s_type` (`ID`, `typecode`, `typename`, `typepid`, `typegroupid`, `create_date`, `create_name`) VALUES ('402881e57307f46c017308016e81000d','year','年度',NULL,'402881e57307f46c017308014440000b','2020-07-01 09:32:58','管理员'),('402881e57307f46c01730801bb0a000f','month','月度',NULL,'402881e57307f46c017308014440000b','2020-07-01 09:33:18','管理员'),('402881e5730d1a2101730d76eeba0005','business','经营指标',NULL,'402881e5730d1a2101730d75cf7b0003','2020-07-02 10:59:25','管理员'),('402881e5730d1a2101730d776afb0007','manage','管理指标',NULL,'402881e5730d1a2101730d75cf7b0003','2020-07-02 10:59:57','管理员'),('402881e5730d7a8901730d84e8da0006','num','数量',NULL,'402881e5730d7a8901730d847abb0004','2020-07-02 11:14:41','管理员'),('402881e5730d7a8901730d854b9b0008','amount','金额',NULL,'402881e5730d7a8901730d847abb0004','2020-07-02 11:15:06','管理员'),('402881e5730d7a8901730d85d4a3000a','percent','百分比',NULL,'402881e5730d7a8901730d847abb0004','2020-07-02 11:15:41','管理员'),('402881e5730d887201730d8ad8e50003','project_member','项目人员成本预算工具',NULL,'402881e5730d887201730d8a26ca0001','2020-07-02 11:21:10','管理员'),('402881e5730d887201730d8b235b0005','orders','物料预算工具',NULL,'402881e5730d887201730d8a26ca0001','2020-07-02 11:21:29','管理员'),('402881e5731d4e1b01731f06efd40006','formula','公式计算',NULL,'402881e5731d4e1b01731f062f000004','2020-07-05 20:50:15','管理员'),('402881e5731d4e1b01731f071c170008','amount','金额',NULL,'402881e5731d4e1b01731f062f000004','2020-07-05 20:50:26','管理员'),('402881e5731d4e1b01731f0746e8000a','num','数量',NULL,'402881e5731d4e1b01731f062f000004','2020-07-05 20:50:37','管理员');
INSERT INTO `t_s_function` (`ID`, `functioniframe`, `functionlevel`, `functionname`, `functionorder`, `functionurl`, `parentfunctionid`, `iconid`, `desk_iconid`, `functiontype`, `function_icon_style`, `create_by`, `create_name`, `update_by`, `update_date`, `create_date`, `update_name`, `remark`) VALUES ('402881e57307f46c017307f7e7990001',NULL,0,'预算管理','90','',NULL,'8a8ab0b246dc81120146dc8180460000','8a8ab0b246dc81120146dc8180dd001e',0,'','admin','管理员',NULL,NULL,'2020-07-01 09:22:34',NULL,''),('402881e57307f46c017307f8efc50003',NULL,1,'预算主体设置','1','budgetEntityController.do?list','402881e57307f46c017307f7e7990001','8a8ab0b246dc81120146dc8180460000','8a8ab0b246dc81120146dc8180dd001e',0,'','admin','管理员',NULL,NULL,'2020-07-01 09:23:42',NULL,''),('402881e57307f46c017307f98fab0005',NULL,1,'预算周期设置','5','budgetPeriodController.do?list','402881e57307f46c017307f7e7990001','8a8ab0b246dc81120146dc8180460000','8a8ab0b246dc81120146dc8180dd001e',0,'','admin','管理员','admin','2020-07-01 10:03:53','2020-07-01 09:24:23','管理员',''),('402881e57307f46c017307fa29480007',NULL,1,'预算指标设置','10','budgetMeasureController.do?list','402881e57307f46c017307f7e7990001','8a8ab0b246dc81120146dc8180460000','8a8ab0b246dc81120146dc8180dd001e',0,'','admin','管理员',NULL,NULL,'2020-07-01 09:25:02',NULL,''),('402881e57307f46c017307fabafb0009',NULL,1,'预算样表设置','15','budgetTempSheetController.do?list','402881e57307f46c017307f7e7990001','8a8ab0b246dc81120146dc8180460000','8a8ab0b246dc81120146dc8180dd001e',0,'','admin','管理员','admin','2020-07-04 14:21:18','2020-07-01 09:25:39','管理员','');
INSERT INTO `t_s_function` (`ID`, `functioniframe`, `functionlevel`, `functionname`, `functionorder`, `functionurl`, `parentfunctionid`, `iconid`, `desk_iconid`, `functiontype`, `function_icon_style`, `create_by`, `create_name`, `update_by`, `update_date`, `create_date`, `update_name`, `remark`) VALUES ('40281281735bb7f601735be9d4a1006d',NULL,1,'预算填报','20','budgetInstController.do?list','402881e57307f46c017307f7e7990001','8a8ab0b246dc81120146dc8180460000','8a8ab0b246dc81120146dc8180dd001e',0,'','admin','管理员',NULL,NULL,'2020-07-17 16:35:18',NULL,'');
INSERT INTO t_s_type (ID, typecode, typename, typepid, typegroupid, create_date, create_name) VALUES ('40281281739402b70173940d43360007', 'txt', '文本说明', null, '402881e5730d7a8901730d847abb0004', '2020-07-28 14:12:44', '管理员');
INSERT INTO t_s_typegroup (ID, typegroupcode, typegroupname, create_date, create_name) VALUES ('40281281739402b70173940f8ab10009', 'budget_goals_showtype', '预算指标显示方式', '2020-07-28 14:15:13', '管理员');
INSERT INTO t_s_type (ID, typecode, typename, typepid, typegroupid, create_date, create_name) VALUES ('40281281739402b7017394104386000b', 'ten_thousand', '万元', null, '40281281739402b70173940f8ab10009', '2020-07-28 14:16:01', '管理员');
INSERT INTO t_s_type (ID, typecode, typename, typepid, typegroupid, create_date, create_name) VALUES ('40281281739402b70173941154b1000d', 'hundred_million', '亿元', null, '40281281739402b70173940f8ab10009', '2020-07-28 14:17:11', '管理员');
INSERT INTO `t_s_typegroup` (`ID`, `typegroupcode`, `typegroupname`, `create_date`, `create_name`) VALUES ('40281d81739edb1901739efad109000a','budget_inst_status','预算表状态','2020-07-30 17:08:24','管理员');
INSERT INTO `t_s_type` (`ID`, `typecode`, `typename`, `typepid`, `typegroupid`, `create_date`, `create_name`) VALUES ('40281d81739edb1901739efb36fb000c','0','未上报',NULL,'40281d81739edb1901739efad109000a','2020-07-30 17:08:51','管理员'),('40281d81739edb1901739efb5f4a000e','1','已上报',NULL,'40281d81739edb1901739efad109000a','2020-07-30 17:09:01','管理员'),('40281d81739edb1901739efb8b730010','2','已审核',NULL,'40281d81739edb1901739efad109000a','2020-07-30 17:09:12','管理员'),('40281d81739edb1901739efbb43e0012','3','已批复',NULL,'40281d81739edb1901739efad109000a','2020-07-30 17:09:23','管理员'),('40281d81739edb1901739efc9f770014','-1','已驳回',NULL,'40281d81739edb1901739efad109000a','2020-07-30 17:10:23','管理员');
INSERT INTO `t_s_function` (`ID`, `functioniframe`, `functionlevel`, `functionname`, `functionorder`, `functionurl`, `parentfunctionid`, `iconid`, `desk_iconid`, `functiontype`, `function_icon_style`, `create_by`, `create_name`, `update_by`, `update_date`, `create_date`, `update_name`, `remark`) VALUES ('40281d81739edb1901739edfe6e00002',NULL,1,'预算审核','25','budgetInstController.do?list4auth&status=1','402881e57307f46c017307f7e7990001','8a8ab0b246dc81120146dc8180460000','8a8ab0b246dc81120146dc8180dd001e',0,'','admin','管理员',NULL,NULL,'2020-07-30 16:39:01',NULL,'');


CREATE TABLE `t_b_budget_inst_version` (
  `id` varchar(36) NOT NULL,
  `create_name` varchar(50) DEFAULT NULL COMMENT '创建人名称',
  `create_by` varchar(50) DEFAULT NULL COMMENT '创建人登录名称',
  `create_date` datetime DEFAULT NULL COMMENT '创建日期',
  `update_name` varchar(50) DEFAULT NULL COMMENT '更新人名称',
  `update_by` varchar(50) DEFAULT NULL COMMENT '更新人登录名称',
  `update_date` datetime DEFAULT NULL COMMENT '更新日期',
  `sys_org_code` varchar(50) DEFAULT NULL COMMENT '所属部门',
  `sys_company_code` varchar(50) DEFAULT NULL COMMENT '所属公司',
  `bpm_status` varchar(32) DEFAULT '1' COMMENT '流程状态',
  `name` varchar(255) DEFAULT NULL COMMENT '版本名',
  `version` int(11) DEFAULT NULL COMMENT '版本号',
  `inst_id` varchar(32) DEFAULT NULL COMMENT '实例id',
  `json` longtext COMMENT '数据',
  PRIMARY KEY (`id`),
  KEY `inst_id` (`inst_id`,`version`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='预算实例版本';

CREATE TABLE `t_b_budget_inst_goals_version` (
  `id` varchar(36) NOT NULL,
  `create_name` varchar(50) DEFAULT NULL COMMENT '创建人名称',
  `create_by` varchar(50) DEFAULT NULL COMMENT '创建人登录名称',
  `create_date` datetime DEFAULT NULL COMMENT '创建日期',
  `update_name` varchar(50) DEFAULT NULL COMMENT '更新人名称',
  `update_by` varchar(50) DEFAULT NULL COMMENT '更新人登录名称',
  `update_date` datetime DEFAULT NULL COMMENT '更新日期',
  `sys_org_code` varchar(50) DEFAULT NULL COMMENT '所属部门',
  `sys_company_code` varchar(50) DEFAULT NULL COMMENT '所属公司',
  `bpm_status` varchar(32) DEFAULT '1' COMMENT '流程状态',
  `inst_version_id` varchar(32) DEFAULT NULL COMMENT '版本id',
  `period_id` varchar(32) DEFAULT NULL COMMENT '周期id',
  `period_detail_id` varchar(32) DEFAULT NULL COMMENT '预算周期明细id',
  `goals_id` varchar(32) DEFAULT NULL COMMENT '指标id',
  `include_tax` int(11) DEFAULT NULL COMMENT '是否含税',
  `data_formula` varchar(255) DEFAULT NULL COMMENT '公式',
  `data_value` decimal(30,8) DEFAULT NULL COMMENT '值',
  `ui_style` varchar(512) DEFAULT NULL COMMENT '样式json',
  `memo` varchar(512) DEFAULT NULL COMMENT '备注',
  `row` int(11) DEFAULT NULL COMMENT '行',
  `col` int(11) DEFAULT NULL COMMENT '列',
  `expect` int(11) DEFAULT NULL COMMENT '0 预计，1实际',
  `data_txt` varchar(512) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `inst_version_id` (`inst_version_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='预算指标实例版本';

CREATE TABLE `t_b_budget_demo_function` (
  `id` varchar(36) NOT NULL,
  `create_name` varchar(50) DEFAULT NULL COMMENT '创建人名称',
  `create_by` varchar(50) DEFAULT NULL COMMENT '创建人登录名称',
  `create_date` datetime DEFAULT NULL COMMENT '创建日期',
  `update_name` varchar(50) DEFAULT NULL COMMENT '更新人名称',
  `update_by` varchar(50) DEFAULT NULL COMMENT '更新人登录名称',
  `update_date` datetime DEFAULT NULL COMMENT '更新日期',
  `sys_org_code` varchar(50) DEFAULT NULL COMMENT '所属部门',
  `sys_company_code` varchar(50) DEFAULT NULL COMMENT '所属公司',
  `bpm_status` varchar(32) DEFAULT '1' COMMENT '流程状态',
  `name` varchar(255) DEFAULT NULL COMMENT '名称',
  `expression` longtext COMMENT '表达式',
  `expression_txt` longtext COMMENT '文本显示',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='维度公式';

CREATE TABLE `t_b_budget_demo_function_detail` (
  `id` varchar(36) NOT NULL,
  `create_name` varchar(50) DEFAULT NULL COMMENT '创建人名称',
  `create_by` varchar(50) DEFAULT NULL COMMENT '创建人登录名称',
  `create_date` datetime DEFAULT NULL COMMENT '创建日期',
  `update_name` varchar(50) DEFAULT NULL COMMENT '更新人名称',
  `update_by` varchar(50) DEFAULT NULL COMMENT '更新人登录名称',
  `update_date` datetime DEFAULT NULL COMMENT '更新日期',
  `sys_org_code` varchar(50) DEFAULT NULL COMMENT '所属部门',
  `sys_company_code` varchar(50) DEFAULT NULL COMMENT '所属公司',
  `bpm_status` varchar(32) DEFAULT '1' COMMENT '流程状态',
  `fk_id` varchar(32) DEFAULT NULL COMMENT '维度公式id',
  `name` varchar(255) DEFAULT NULL,
  `demo_id` varchar(45) DEFAULT NULL COMMENT '样表id',
  `demo_name` varchar(255) DEFAULT NULL,
  `dep_id` varchar(32) DEFAULT NULL COMMENT '预算主体',
  `dep_name` varchar(255) DEFAULT NULL,
  `goals_id` varchar(255) DEFAULT NULL COMMENT '维度指标',
  `goals_name` varchar(255) DEFAULT NULL,
  `period_id` varchar(512) DEFAULT NULL COMMENT '时间维度',
  `period_name` varchar(512) DEFAULT NULL,
  `include_tax` varchar(32) DEFAULT NULL COMMENT '含税维度',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='维度公式详情';

ALTER TABLE `t_b_budget_demo_goals` ADD COLUMN `function_id` VARCHAR(45) NULL;
ALTER TABLE `t_b_budget_inst_goals` ADD COLUMN `function_id` VARCHAR(45) NULL;

#改名部分开始
ALTER TABLE `t_b_budget_dept` RENAME TO `t_b_budget_entity` ;
ALTER TABLE `t_b_budget_entity`
CHANGE COLUMN `budget_dep_name` `entity_name` VARCHAR(255) NULL DEFAULT NULL COMMENT '预算主体名' ,
CHANGE COLUMN `budget_user_id` `entity_user_id` VARCHAR(32) NULL DEFAULT NULL COMMENT '负责人id' ;

ALTER TABLE `t_b_budget_goals` RENAME TO `t_b_budget_measure`;
ALTER TABLE `t_b_budget_demo` RENAME TO  `t_b_budget_tempsheet` ;
ALTER TABLE `t_b_budget_tempsheet`
CHANGE COLUMN `demo_name` `name` VARCHAR(255) NULL DEFAULT NULL COMMENT '样表名称',
CHANGE COLUMN `demo_type` `type` VARCHAR(45) NULL DEFAULT NULL COMMENT '样表类型\\nnormal 通用 orders 物料成本 人力成本' ;
;

ALTER TABLE `t_b_budget_demo_dept`
CHANGE COLUMN `demo_id` `tempsheet_id` VARCHAR(32) NULL DEFAULT NULL COMMENT '样表id' ,
CHANGE COLUMN `budget_dep_id` `entity_id` VARCHAR(32) NULL DEFAULT NULL COMMENT '主体id' ,
RENAME TO  `t_b_budget_tempsheet_entity` ;

ALTER TABLE `t_b_budget_demo_goals`
CHANGE COLUMN `demo_id` `tempsheet_id` VARCHAR(32) NULL DEFAULT NULL COMMENT '样表id' ,
CHANGE COLUMN `goals_id` `measure_id` VARCHAR(32) NULL DEFAULT NULL COMMENT '指标id' ,
CHANGE COLUMN `goals_name` `measure_name` VARCHAR(255) NULL DEFAULT NULL COMMENT '指标名称' ,
 RENAME TO  `t_b_budget_tempsheet_measure` ;

ALTER TABLE `t_b_budget_inst_goals`
CHANGE COLUMN `demo_goals_id` `tempsheet_measure_id` VARCHAR(45) NULL DEFAULT NULL ,
CHANGE COLUMN `goals_id` `measure_id` VARCHAR(32) NULL DEFAULT NULL COMMENT '指标id' ,
CHANGE COLUMN `goals_name` `measure_name` VARCHAR(255) NULL DEFAULT NULL COMMENT '指标名称' ,
 RENAME TO  `t_b_budget_inst_measure` ;

ALTER TABLE `t_b_budget_inst_goals_version`
CHANGE COLUMN `goals_id` `measure_id` VARCHAR(32) NULL DEFAULT NULL COMMENT '指标id' ,
 RENAME TO  `t_b_budget_inst_measure_version` ;

ALTER TABLE `t_b_budget_demo_function` RENAME TO  `t_b_budget_dim_function` ;

ALTER TABLE `t_b_budget_demo_function_detail`
CHANGE COLUMN `demo_id` `tempsheet_id` VARCHAR(45) NULL DEFAULT NULL COMMENT '样表id' ,
CHANGE COLUMN `demo_name` `tempsheet_name` VARCHAR(255) NULL DEFAULT NULL ,
CHANGE COLUMN `dep_id` `entity_id` VARCHAR(32) NULL DEFAULT NULL COMMENT '预算主体' ,
CHANGE COLUMN `dep_name` `entity_name` VARCHAR(255) NULL DEFAULT NULL ,
CHANGE COLUMN `goals_id` `measure_id` VARCHAR(255) NULL DEFAULT NULL COMMENT '维度指标' ,
CHANGE COLUMN `goals_name` `measure_name` VARCHAR(255) NULL DEFAULT NULL ,
RENAME TO  `t_b_budget_dim_function_detail` ;

ALTER TABLE `t_b_budget_inst`
CHANGE COLUMN `bugdet_dep_id` `entity_id` VARCHAR(32) NULL DEFAULT NULL COMMENT '预算主体id' ,
CHANGE COLUMN `bugdet_dep_name` `entity_name` VARCHAR(255) NULL DEFAULT NULL COMMENT '预算主体' ,
CHANGE COLUMN `bugdet_dep_user_id` `entity_user_id` VARCHAR(45) NULL DEFAULT NULL COMMENT '预算主体负责人',
CHANGE COLUMN `demo_id` `tempsheet_id` VARCHAR(32) NULL DEFAULT NULL COMMENT '样表id' ,
CHANGE COLUMN `demo_type` `type` VARCHAR(32) NULL DEFAULT NULL COMMENT '样表类型' ;

update t_s_function set functionurl='budgetEntityController.do?list' where id='402881e57307f46c017307f8efc50003';
update t_s_function set functionurl='budgetMeasureController.do?list' where id='402881e57307f46c017307fa29480007';
update t_s_function set functionurl='budgetTempSheetController.do?list' where id='402881e57307f46c017307fabafb0009';

ALTER TABLE `t_b_budget_inst_measure_version` ADD COLUMN `function_id` VARCHAR(45) NULL;
ALTER TABLE `t_b_budget_tempsheet_measure` DROP COLUMN `demo_type`;
ALTER TABLE `t_b_budget_inst_measure` DROP COLUMN `demo_type`;

UPDATE `t_s_typegroup` SET `typegroupcode`='budget_measure_showtype' WHERE `ID`='40281281739402b70173940f8ab10009';
UPDATE `t_s_typegroup` SET `typegroupcode`='budget_measure_category' WHERE `ID`='402881e5730d1a2101730d75cf7b0003';
UPDATE `t_s_typegroup` SET `typegroupcode`='budget_measure_datatype' WHERE `ID`='402881e5730d7a8901730d847abb0004';
UPDATE `t_s_typegroup` SET `typegroupcode`='budget_measure_tool' WHERE `ID`='402881e5730d887201730d8a26ca0001';
delete from t_s_type where typegroupid='402881e5731d4e1b01731f062f000004';
delete from t_s_typegroup where id='402881e5731d4e1b01731f062f000004';

#改名部分结束

delete from t_s_type where typegroupid='40281281739402b70173940f8ab10009';
ALTER TABLE `t_b_budget_measure`
ADD COLUMN `custom_code` VARCHAR(255) NULL COMMENT '用户输入编码',
ADD COLUMN `used` TINYINT NULL COMMENT '是否使用过';

ALTER TABLE `t_b_budget_tempsheet_measure`
ADD COLUMN `expect` INT NULL COMMENT '0 预计，1实际',
ADD COLUMN `sheet_index` INT NULL,
ADD COLUMN `show_type` VARCHAR(45) NULL;

ALTER TABLE `t_b_budget_tempsheet`
DROP COLUMN `reply_user_name`,
DROP COLUMN `reply_user_id`,
DROP COLUMN `verify_user_name`,
DROP COLUMN `verify_user_id`,
ADD COLUMN `tempsheet_measure_table` VARCHAR(255) NULL COMMENT '样表指标表名',
ADD COLUMN `joint_group_id` VARCHAR(45) NULL COMMENT '会审组id',
ADD COLUMN `final_group_id` VARCHAR(45) NULL COMMENT '终审组id',
ADD COLUMN `office_id` VARCHAR(45) NULL COMMENT '归口部门id',
ADD COLUMN `direction` VARCHAR(45) NULL COMMENT '编制方向 up down',
ADD COLUMN `office_name` VARCHAR(255) NULL COMMENT '归口部门名称',
ADD COLUMN `joint_group_name` VARCHAR(255) NULL COMMENT '会审组名称',
ADD COLUMN `final_group_name` VARCHAR(255) NULL COMMENT '终审组名称';



ALTER TABLE `t_b_budget_entity`
ADD COLUMN `type` VARCHAR(45) NULL COMMENT '类型',
ADD COLUMN `is_leaf` INT NULL;

ALTER TABLE `t_b_budget_inst`
DROP COLUMN `reply_user_name`,
DROP COLUMN `verify_user_name`,
DROP COLUMN `reply_user_id`,
DROP COLUMN `verify_user_id`,
DROP COLUMN `refuse_time`,
DROP COLUMN `verify_time`,
DROP COLUMN `reply_time`,
DROP COLUMN `refuse`,
DROP COLUMN `verify`,
DROP COLUMN `reply`,
DROP COLUMN `entity_user_id`,
CHANGE COLUMN `status` `status` INT(11) NULL DEFAULT NULL COMMENT '-2冻结、-1驳回、0未上报、1已上报、2已审核、3已会审、4已终审',
ADD COLUMN `edit_by` VARCHAR(45) NULL COMMENT '填报人',
ADD COLUMN `edit_name` VARCHAR(255) NULL,
ADD COLUMN `inst_measure_table_name` VARCHAR(255) NULL,
ADD COLUMN `proc_id` VARCHAR(45) NULL COMMENT '当前审批流程id',
ADD INDEX `proc_id` (`proc_id` ASC),
ADD UNIQUE INDEX `tempsheetid` (`tempsheet_id` ASC, `entity_id` ASC);

ALTER TABLE `t_b_budget_inst_measure`
ADD COLUMN `sheet_index` INT NULL,
ADD COLUMN `show_type` VARCHAR(45) NULL;

ALTER TABLE `t_b_budget_inst_measure_version`
ADD COLUMN `inst_measure_id` VARCHAR(45) NULL COMMENT '对应inst_measure id',
ADD COLUMN `sheet_index` INT NULL,
ADD COLUMN `show_type` VARCHAR(45) NULL,
ADD COLUMN `data_type` VARCHAR(45) NULL;


UPDATE `t_s_function` t SET t.`functionurl` = 'budgetInstController.do?list4task' WHERE t.`ID` = '40281d81739edb1901739edfe6e00002';
delete from t_s_type where id='40281d81739edb1901739efc9f770014';
delete from t_s_type where id='40281d81739edb1901739efbb43e0012';

INSERT INTO `t_s_typegroup` (`ID`, `typegroupcode`, `typegroupname`, `create_date`, `create_name`) VALUES ('402812817432efc6017433e7c6cc0017','budget_entity_type','预算主体类型','2020-08-28 15:11:02','管理员'),('402812817432efc60174341ea80a004d','budget_tempsheet_direction','预算样表审核方向','2020-08-28 09:43:26',NULL);
INSERT INTO `t_s_type` (`ID`, `typecode`, `typename`, `typepid`, `typegroupid`, `create_date`, `create_name`) VALUES ('4028128174327f28017432984523000d','one','一倍记',NULL,'40281281739402b70173940f8ab10009','2020-08-28 09:04:34','管理员'),('4028128174327f28017432987303000f','ten_thousand','以万记',NULL,'40281281739402b70173940f8ab10009','2020-08-28 09:04:46','管理员'),('4028128174327f2801743298d4fa0011','hundred_million','以亿记',NULL,'40281281739402b70173940f8ab10009','2020-08-28 09:05:11','管理员'),('402812817432efc6017433e84dd90019','manage','管理类主体',NULL,'402812817432efc6017433e7c6cc0017','2020-08-28 15:11:36','管理员'),('402812817432efc6017433eae454001b','operate','经营类主体',NULL,'402812817432efc6017433e7c6cc0017','2020-08-28 15:14:26','管理员'),('402812817432efc60174341ff3f80051','up','自下而上',NULL,'402812817432efc60174341ea80a004d','2020-08-28 16:12:23','管理员'),('402812817432efc601743420341b0053','down','自上而下',NULL,'402812817432efc60174341ea80a004d','2020-08-28 16:12:40','管理员'),('40281281744d9ff401744da1e95b0001','-2','已冻结',NULL,'40281d81739edb1901739efad109000a','2020-09-02 15:04:51','管理员'),('40281281745b6b4501745b75676a0003','4','已结束',NULL,'40281d81739edb1901739efad109000a','2020-09-05 07:30:55','管理员'),('40281d81739edb1901739efbb43e0012','3','已会审',NULL,'40281d81739edb1901739efad109000a','2020-09-02 17:09:23','管理员'),('40281d81739edb1901739efc9f770014','-1','已驳回',NULL,'40281d81739edb1901739efad109000a','2020-09-02 15:04:51','管理员');
INSERT INTO `t_s_function` (`ID`, `functioniframe`, `functionlevel`, `functionname`, `functionorder`, `functionurl`, `parentfunctionid`, `iconid`, `desk_iconid`, `functiontype`, `function_icon_style`, `create_by`, `create_name`, `update_by`, `update_date`, `create_date`, `update_name`, `remark`) VALUES ('40281281743eafbd01743f4377600195',NULL,1,'预算审批组设置','35','budgetVerifyGroupController.do?list&type=joint','402881e57307f46c017307f7e7990001','8a8ab0b246dc81120146dc8180460000','8a8ab0b246dc81120146dc8180dd001e',0,'','admin','管理员',NULL,NULL,'2020-08-30 20:07:00',NULL,'预算审批组'),('402812817441d409017441d5e03a0003',NULL,1,'业务归口部门','33','budgetOfficeController.do?list','402881e57307f46c017307f7e7990001','8a8ab0b246dc81120146dc8180460000','8a8ab0b246dc81120146dc8180dd001e',0,'','admin','管理员',NULL,NULL,'2020-08-31 08:06:10',NULL,'');

UPDATE `t_s_function` SET `functionurl`='budgetInstController.do?goTaskListTab' WHERE `ID`='40281d81739edb1901739edfe6e00002';

CREATE TABLE `t_b_budget_office` (
  `id` varchar(36) NOT NULL,
  `create_name` varchar(50) DEFAULT NULL COMMENT '创建人名称',
  `create_by` varchar(50) DEFAULT NULL COMMENT '创建人登录名称',
  `create_date` datetime DEFAULT NULL COMMENT '创建日期',
  `update_name` varchar(50) DEFAULT NULL COMMENT '更新人名称',
  `update_by` varchar(50) DEFAULT NULL COMMENT '更新人登录名称',
  `update_date` datetime DEFAULT NULL COMMENT '更新日期',
  `sys_org_code` varchar(50) DEFAULT NULL COMMENT '所属部门',
  `sys_company_code` varchar(50) DEFAULT NULL COMMENT '所属公司',
  `bpm_status` varchar(32) DEFAULT '1' COMMENT '流程状态',
  `edited_by` varchar(32) DEFAULT NULL COMMENT '编制人',
  `verify_by` varchar(32) DEFAULT NULL COMMENT '审核人',
  `edited_name` varchar(32) DEFAULT NULL COMMENT '编制人姓名',
  `verify_name` varchar(32) DEFAULT NULL COMMENT '审核人姓名',
  `descn` longtext COMMENT '说明',
  `name` varchar(255) DEFAULT NULL COMMENT '名称',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE `t_b_budget_verify_group` (
  `id` varchar(36) NOT NULL,
  `create_name` varchar(50) DEFAULT NULL COMMENT '创建人名称',
  `create_by` varchar(50) DEFAULT NULL COMMENT '创建人登录名称',
  `create_date` datetime DEFAULT NULL COMMENT '创建日期',
  `update_name` varchar(50) DEFAULT NULL COMMENT '更新人名称',
  `update_by` varchar(50) DEFAULT NULL COMMENT '更新人登录名称',
  `update_date` datetime DEFAULT NULL COMMENT '更新日期',
  `sys_org_code` varchar(50) DEFAULT NULL COMMENT '所属部门',
  `sys_company_code` varchar(50) DEFAULT NULL COMMENT '所属公司',
  `bpm_status` varchar(32) DEFAULT '1' COMMENT '流程状态',
  `type` varchar(32) DEFAULT NULL COMMENT '类型',
  `name` varchar(255) DEFAULT NULL COMMENT '名称',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `t_b_budget_verify_group_member` (
  `id` varchar(36) NOT NULL,
  `create_name` varchar(50) DEFAULT NULL COMMENT '创建人名称',
  `create_by` varchar(50) DEFAULT NULL COMMENT '创建人登录名称',
  `create_date` datetime DEFAULT NULL COMMENT '创建日期',
  `update_name` varchar(50) DEFAULT NULL COMMENT '更新人名称',
  `update_by` varchar(50) DEFAULT NULL COMMENT '更新人登录名称',
  `update_date` datetime DEFAULT NULL COMMENT '更新日期',
  `sys_org_code` varchar(50) DEFAULT NULL COMMENT '所属部门',
  `sys_company_code` varchar(50) DEFAULT NULL COMMENT '所属公司',
  `bpm_status` varchar(32) DEFAULT '1' COMMENT '流程状态',
  `group_id` varchar(32) DEFAULT NULL COMMENT '分组id',
  `user_id` varchar(32) DEFAULT NULL COMMENT '审核人id',
  `real_name` varchar(255) DEFAULT NULL COMMENT '审核人姓名',
  `seq_no` int(11) DEFAULT NULL COMMENT '排序号',
  PRIMARY KEY (`id`),
  KEY `group_id` (`group_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE `t_b_budget_proc` (
  `id` varchar(36) NOT NULL,
  `create_name` varchar(50) DEFAULT NULL COMMENT '创建人名称',
  `create_by` varchar(50) DEFAULT NULL COMMENT '创建人登录名称',
  `create_date` datetime DEFAULT NULL COMMENT '创建日期',
  `update_name` varchar(50) DEFAULT NULL COMMENT '更新人名称',
  `update_by` varchar(50) DEFAULT NULL COMMENT '更新人登录名称',
  `update_date` datetime DEFAULT NULL COMMENT '更新日期',
  `sys_org_code` varchar(50) DEFAULT NULL COMMENT '所属部门',
  `sys_company_code` varchar(50) DEFAULT NULL COMMENT '所属公司',
  `bpm_status` varchar(32) DEFAULT '1' COMMENT '流程状态',
  `inst_id` varchar(32) DEFAULT NULL COMMENT '实例id',
  `start_time` datetime DEFAULT NULL COMMENT '开始时间',
  `end_time` datetime DEFAULT NULL COMMENT '结束时间',
  `duration` int(11) DEFAULT NULL COMMENT '持续时间',
  `proc_status` int(11) DEFAULT NULL COMMENT '流程状态',
  `verify_status` int(11) DEFAULT NULL COMMENT '审批状态',
  PRIMARY KEY (`id`),
  KEY `inst_id` (`inst_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE `t_b_budget_task` (
  `id` varchar(36) NOT NULL,
  `create_name` varchar(50) DEFAULT NULL COMMENT '创建人名称',
  `create_by` varchar(50) DEFAULT NULL COMMENT '创建人登录名称',
  `create_date` datetime DEFAULT NULL COMMENT '创建日期',
  `update_name` varchar(50) DEFAULT NULL COMMENT '更新人名称',
  `update_by` varchar(50) DEFAULT NULL COMMENT '更新人登录名称',
  `update_date` datetime DEFAULT NULL COMMENT '更新日期',
  `sys_org_code` varchar(50) DEFAULT NULL COMMENT '所属部门',
  `sys_company_code` varchar(50) DEFAULT NULL COMMENT '所属公司',
  `bpm_status` varchar(32) DEFAULT '1' COMMENT '流程状态',
  `proc_id` varchar(32) DEFAULT NULL COMMENT '流程id',
  `inst_id` varchar(32) DEFAULT NULL COMMENT '实例id',
  `start_time` datetime DEFAULT NULL COMMENT '开始时间',
  `end_time` datetime DEFAULT NULL COMMENT '结束时间',
  `duration` int(11) DEFAULT NULL COMMENT '持续时间',
  `user_id` varchar(32) DEFAULT NULL COMMENT '执行人',
  `real_name` varchar(255) DEFAULT NULL COMMENT '姓名',
  `proc_status` int(11) DEFAULT NULL COMMENT '流程状态',
  `verify_status` int(11) DEFAULT NULL COMMENT '审批状态',
  `descn` longtext COMMENT '说明',
  `task_status` int(11) DEFAULT NULL,
  `group_member_id` varchar(45) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `proc_id` (`proc_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

ALTER TABLE `t_b_budget_inst_version`
ADD COLUMN `inst_status` INT NULL COMMENT '版本阶段';

#版本比对菜单
INSERT INTO `t_s_function` (`ID`, `functioniframe`, `functionlevel`, `functionname`, `functionorder`, `functionurl`, `parentfunctionid`, `iconid`, `desk_iconid`, `functiontype`, `function_icon_style`, `create_by`, `create_name`, `update_by`, `update_date`, `create_date`, `update_name`, `remark`) VALUES ('4028128174823fce01748250601c0001',NULL,1,'版本对比','40','budgetInstVersionController.do?goDiff','402881e57307f46c017307f7e7990001','8a8ab0b246dc81120146dc8180460000','8a8ab0b246dc81120146dc8180dd001e',0,'','admin','管理员',NULL,NULL,'2020-09-12 20:35:40',NULL,'');

ALTER TABLE `t_b_budget_dim_function` ADD COLUMN `measure_id` VARCHAR(45) NULL;
ALTER TABLE `t_b_budget_dim_function_detail` ADD COLUMN `expect` VARCHAR(45) NULL;
ALTER TABLE `t_b_budget_tempsheet_measure` CHANGE COLUMN `control_flag` `control_flag` VARCHAR(255) NULL DEFAULT NULL COMMENT '控制预算' ;
ALTER TABLE `t_b_budget_inst_measure` CHANGE COLUMN `control_flag` `control_flag` VARCHAR(255) NULL DEFAULT NULL COMMENT '控制预算' ;
ALTER TABLE `t_b_budget_measure`
DROP COLUMN `used`,
ADD COLUMN `control_flag` VARCHAR(255) NULL;

INSERT INTO `t_s_typegroup` (`ID`, `typegroupcode`, `typegroupname`, `create_date`, `create_name`) VALUES ('4028128174961a1d0174961cef260003','budget_control_flag','预算控制','2020-09-16 16:51:53','管理员');
INSERT INTO `t_s_type` (`ID`, `typecode`, `typename`, `typepid`, `typegroupid`, `create_date`, `create_name`) VALUES ('4028128174961a1d0174961d32c00005','control','控制',NULL,'4028128174961a1d0174961cef260003','2020-09-16 16:52:10','管理员');

ALTER TABLE `t_b_budget_tempsheet` ADD COLUMN `orders_code` VARCHAR(255) NULL COMMENT '物料所属分类';
ALTER TABLE `t_b_budget_inst` ADD COLUMN `orders_code` VARCHAR(255) NULL COMMENT '物料所属分类' ;

#物料样表新增种类
ALTER TABLE `t_b_budget_tempsheet`
CHANGE COLUMN `orders_code` `orders_kind` VARCHAR(255) NULL DEFAULT NULL COMMENT '物料样表对应种类' ,
ADD COLUMN `ref_year` VARCHAR(45) NULL COMMENT '参考年份';

ALTER TABLE `t_b_budget_inst`
CHANGE COLUMN `orders_code` `orders_kind` VARCHAR(255) NULL DEFAULT NULL COMMENT '物料样表对应种类' ,
ADD COLUMN `ref_year` VARCHAR(45) NULL ;
INSERT INTO `t_s_typegroup` (`ID`, `typegroupcode`, `typegroupname`, `create_date`, `create_name`) VALUES ('4028128174b89d200174ba8ed4040004','budget_orders_kind','物料样表种类','2020-09-23 18:42:37','管理员');

INSERT INTO `t_s_type` (`ID`, `typecode`, `typename`, `typepid`, `typegroupid`, `create_date`, `create_name`) VALUES ('4028128174b89d200174ba8fbd680006','rootA02','保洁耗材',NULL,'4028128174b89d200174ba8ed4040004','2020-09-23 18:43:36','管理员'),('4028128174b89d200174ba9017200008','rootA03','办公用品',NULL,'4028128174b89d200174ba8ed4040004','2020-09-23 18:43:59','管理员'),('4028128174b89d200174ba906c76000a','rootA01','工程耗材',NULL,'4028128174b89d200174ba8ed4040004','2020-09-23 18:44:21','管理员'),('4028128174b89d200174ba90b479000c','rootA10','保安耗材',NULL,'4028128174b89d200174ba8ed4040004','2020-09-23 18:44:40','管理员'),('4028128174b89d200174ba98d74c000e','rootA08','会务耗材',NULL,'4028128174b89d200174ba8ed4040004','2020-09-23 18:53:33','管理员'),('4028128174b89d200174ba9b1de70010','gzf','工作服',NULL,'4028128174b89d200174ba8ed4040004','2020-09-23 18:56:02','管理员'),('4028128174b89d200174ba9b79400012','R003','低值易耗',NULL,'4028128174b89d200174ba8ed4040004','2020-09-23 18:56:25','管理员'),('4028128174b89d200174ba9bdda10014','rootA04','固定资产',NULL,'4028128174b89d200174ba8ed4040004','2020-09-23 18:56:51','管理员'),('4028128174b89d200174ba9c28800016','dcg','代采购',NULL,'4028128174b89d200174ba8ed4040004','2020-09-23 18:57:10','管理员');

#预算管理
#考勤增加值班餐补
alter table t_bus_user_attendance_total add column
  `dutyshift` int(3) NULL DEFAULT NULL;
#绿色签报改为软件技术类签报
UPDATE t_s_function SET functionname = '软件技术签报', remark = '技术类问题的上报，非业务签报' WHERE ID = 'ff8080816e68be5d016e68c43f870004';
ALTER TABLE `t_bus_activiti_green`
CHANGE COLUMN `content` `current` LONGTEXT NULL DEFAULT NULL COMMENT '当前效果' ,
ADD COLUMN `expect` LONGTEXT NULL COMMENT '期望效果';

update t_s_type set typename='软件技术类签报' where id='402881e56d3effb1016d3f4d7dc80003';
update t_s_type set typename='软件技术类签报' where id='402881e56d48765f016d48789c8c0002';
update t_p_process set processname='软件技术类签报' where id='402881e56d3effb1016d3f548a990005';
UPDATE t_process_busconfig SET show_title = '软件技术类签报', real_title = '软件技术类签报【${dep_name}】', show_tablename = '软件技术类签报' WHERE id = '402881e56d3effb1016d3f5c44910013';
UPDATE `t_s_busconfig` t SET t.`bus_title_exp` = '软件技术类签报【${dep_name}】', t.`show_title` = '软件技术类签报', t.`show_table` = '软件技术类签报' WHERE t.`id`='402881e56d3f7094016d3fa9bf9c000b';
UPDATE `p_activiti_task` t SET t.`name` = '软件技术类签报', t.`process_name` = '软件技术类签报' WHERE t.`id` = '402881e56d48765f016d487992410004';

#软件技术类签报修改任务分配
ALTER TABLE `t_bus_activiti_green_detail`
ADD COLUMN `user_id` VARCHAR(45) NULL,
ADD COLUMN `real_name` VARCHAR(255) NULL;


##预算涉及到物料、服装基础库修改 begin
update t_b_goods_category set parent_categoryid = null where id = 'ff80808170db868e0170db8751dd0001';
update t_b_goods_category set category_name = '物料耗材' where id = 'root';

INSERT INTO `t_b_goods_category`(`id`, `category_name`, `category_code`, `parent_categoryid`, `status`, `delete_flag`, `create_by`, `create_name`, `create_date`, `update_by`, `update_name`, `update_date`) VALUES ('ff80808174b4f3a90174b89647820002', '低值易耗', 'R003A01', NULL, '0', '0', 'admin', '管理员', '2020-09-23 09:31:31', '', '', NULL);
INSERT INTO `t_b_goods_category`(`id`, `category_name`, `category_code`, `parent_categoryid`, `status`, `delete_flag`, `create_by`, `create_name`, `create_date`, `update_by`, `update_name`, `update_date`) VALUES ('ff80808174b4f3a90174b898681d0006', '办公', 'rootA04A01', 'ff80808170db868e0170db8751dd0001', '0', '0', 'admin', '管理员', '2020-09-23 09:33:50', '', '', NULL);
INSERT INTO `t_b_goods_category`(`id`, `category_name`, `category_code`, `parent_categoryid`, `status`, `delete_flag`, `create_by`, `create_name`, `create_date`, `update_by`, `update_name`, `update_date`) VALUES ('ff80808174b4f3a90174b89aac2f0008', '保安', 'rootA04A02', 'ff80808170db868e0170db8751dd0001', '0', '0', 'admin', '管理员', '2020-09-23 09:36:18', '', '', NULL);
INSERT INTO `t_b_goods_category`(`id`, `category_name`, `category_code`, `parent_categoryid`, `status`, `delete_flag`, `create_by`, `create_name`, `create_date`, `update_by`, `update_name`, `update_date`) VALUES ('ff80808174b4f3a90174b89ac8bd000a', '工程', 'rootA04A03', 'ff80808170db868e0170db8751dd0001', '0', '0', 'admin', '管理员', '2020-09-23 09:36:26', '', '', NULL);
INSERT INTO `t_b_goods_category`(`id`, `category_name`, `category_code`, `parent_categoryid`, `status`, `delete_flag`, `create_by`, `create_name`, `create_date`, `update_by`, `update_name`, `update_date`) VALUES ('ff80808174b4f3a90174b89addcd000c', '会务', 'rootA04A04', 'ff80808170db868e0170db8751dd0001', '0', '0', 'admin', '管理员', '2020-09-23 09:36:31', '', '', NULL);
INSERT INTO `t_b_goods_category`(`id`, `category_name`, `category_code`, `parent_categoryid`, `status`, `delete_flag`, `create_by`, `create_name`, `create_date`, `update_by`, `update_name`, `update_date`) VALUES ('ff80808174b4f3a90174b89af198000e', '保洁', 'rootA04A05', 'ff80808170db868e0170db8751dd0001', '0', '0', 'admin', '管理员', '2020-09-23 09:36:36', '', '', NULL);
INSERT INTO `t_b_goods_category`(`id`, `category_name`, `category_code`, `parent_categoryid`, `status`, `delete_flag`, `create_by`, `create_name`, `create_date`, `update_by`, `update_name`, `update_date`) VALUES ('ff80808174b4f3a90174b89b0bfc0010', '办公', 'R003A01A01', 'ff80808174b4f3a90174b89647820002', '0', '0', 'admin', '管理员', '2020-09-23 09:36:43', '', '', NULL);
INSERT INTO `t_b_goods_category`(`id`, `category_name`, `category_code`, `parent_categoryid`, `status`, `delete_flag`, `create_by`, `create_name`, `create_date`, `update_by`, `update_name`, `update_date`) VALUES ('ff80808174b4f3a90174b89b2ca40012', '保安', 'R003A01A02', 'ff80808174b4f3a90174b89647820002', '0', '0', 'admin', '管理员', '2020-09-23 09:36:51', '', '', NULL);
INSERT INTO `t_b_goods_category`(`id`, `category_name`, `category_code`, `parent_categoryid`, `status`, `delete_flag`, `create_by`, `create_name`, `create_date`, `update_by`, `update_name`, `update_date`) VALUES ('ff80808174b4f3a90174b89b433c0014', '工程', 'R003A01A03', 'ff80808174b4f3a90174b89647820002', '0', '0', 'admin', '管理员', '2020-09-23 09:36:57', '', '', NULL);
INSERT INTO `t_b_goods_category`(`id`, `category_name`, `category_code`, `parent_categoryid`, `status`, `delete_flag`, `create_by`, `create_name`, `create_date`, `update_by`, `update_name`, `update_date`) VALUES ('ff80808174b4f3a90174b89b682a0016', '会务', 'R003A01A04', 'ff80808174b4f3a90174b89647820002', '0', '0', 'admin', '管理员', '2020-09-23 09:37:07', '', '', NULL);
INSERT INTO `t_b_goods_category`(`id`, `category_name`, `category_code`, `parent_categoryid`, `status`, `delete_flag`, `create_by`, `create_name`, `create_date`, `update_by`, `update_name`, `update_date`) VALUES ('ff80808174b4f3a90174b89b824c0018', '保洁', 'R003A01A05', 'ff80808174b4f3a90174b89647820002', '0', '0', 'admin', '管理员', '2020-09-23 09:37:13', '', '', NULL);
INSERT INTO `t_b_goods_category`(`id`, `category_name`, `category_code`, `parent_categoryid`, `status`, `delete_flag`, `create_by`, `create_name`, `create_date`, `update_by`, `update_name`, `update_date`) VALUES ('ff80808174b9305f0174b93dbbb70001', '保安', 'rootA10', 'root', '0', '0', 'admin', '管理员', '2020-09-23 12:34:25', '', '', NULL);


alter table t_b_goods_info add COLUMN `propertytype` VARCHAR(128) NULL COMMENT '资产类别'; 

alter table t_b_clothing add COLUMN `clothingusertype` VARCHAR(128) NULL COMMENT '人员类别';

alter table t_b_clothing add COLUMN `price` decimal(10,2) NULL COMMENT '单价';
#服装人员类别
INSERT INTO `t_s_typegroup`(`ID`, `typegroupcode`, `typegroupname`, `create_date`, `create_name`) VALUES ('ff80808174b4f3a90174b89e97ab001a', 'clothingusertype', '服装人员类别', '2020-09-23 09:40:35', '管理员');
INSERT INTO `t_s_type`(`ID`, `typecode`, `typename`, `typepid`, `typegroupid`, `create_date`, `create_name`) VALUES ('ff80808174b4f3a90174b89eefc3001c', 'manager', '管理人员', NULL, 'ff80808174b4f3a90174b89e97ab001a', '2020-09-23 09:40:58', '管理员');
INSERT INTO `t_s_type`(`ID`, `typecode`, `typename`, `typepid`, `typegroupid`, `create_date`, `create_name`) VALUES ('ff80808174b4f3a90174b8a1061a001e', 'security', '保安', NULL, 'ff80808174b4f3a90174b89e97ab001a', '2020-09-23 09:43:15', '管理员');
INSERT INTO `t_s_type`(`ID`, `typecode`, `typename`, `typepid`, `typegroupid`, `create_date`, `create_name`) VALUES ('ff80808174b4f3a90174b8a132590020', 'device', '工程', NULL, 'ff80808174b4f3a90174b89e97ab001a', '2020-09-23 09:43:26', '管理员');
INSERT INTO `t_s_type`(`ID`, `typecode`, `typename`, `typepid`, `typegroupid`, `create_date`, `create_name`) VALUES ('ff80808174b4f3a90174b8a15efa0022', 'meeting', '会务', NULL, 'ff80808174b4f3a90174b89e97ab001a', '2020-09-23 09:43:37', '管理员');
INSERT INTO `t_s_type`(`ID`, `typecode`, `typename`, `typepid`, `typegroupid`, `create_date`, `create_name`) VALUES ('ff80808174b4f3a90174b8a189090024', 'cleaning', '保洁', NULL, 'ff80808174b4f3a90174b89e97ab001a', '2020-09-23 09:43:48', '管理员');
INSERT INTO `t_s_type`(`ID`, `typecode`, `typename`, `typepid`, `typegroupid`, `create_date`, `create_name`) VALUES ('ff80808174b4f3a90174b8a1b9080026', 'other', '其他', NULL, 'ff80808174b4f3a90174b89e97ab001a', '2020-09-23 09:44:01', '管理员');
#固定资产类别
INSERT INTO `t_s_typegroup`(`ID`, `typegroupcode`, `typegroupname`, `create_date`, `create_name`) VALUES ('ff80808174b4f3a90174b8a4b7150028', 'propertytype', '固定资产类别', '2020-09-23 09:47:17', '管理员');
INSERT INTO `t_s_type`(`ID`, `typecode`, `typename`, `typepid`, `typegroupid`, `create_date`, `create_name`) VALUES ('ff80808174b4f3a90174b8a6987f002a', 'eequipment', '电子设备', NULL, 'ff80808174b4f3a90174b8a4b7150028', '2020-09-23 09:49:20', '管理员');
INSERT INTO `t_s_type`(`ID`, `typecode`, `typename`, `typepid`, `typegroupid`, `create_date`, `create_name`) VALUES ('ff80808174b4f3a90174b8a6c9ce002c', 'homeequipment', '家用电器', NULL, 'ff80808174b4f3a90174b8a4b7150028', NULL, NULL);
INSERT INTO `t_s_type`(`ID`, `typecode`, `typename`, `typepid`, `typegroupid`, `create_date`, `create_name`) VALUES ('ff80808174b4f3a90174b8a767bf002e', 'proequipment', '专业设备', NULL, 'ff80808174b4f3a90174b8a4b7150028', '2020-09-23 09:50:13', '管理员');
INSERT INTO `t_s_type`(`ID`, `typecode`, `typename`, `typepid`, `typegroupid`, `create_date`, `create_name`) VALUES ('ff80808174b4f3a90174b8a811420031', 'transportmachine', '运输工具', NULL, 'ff80808174b4f3a90174b8a4b7150028', '2020-09-23 09:50:56', '管理员');
INSERT INTO `t_s_type`(`ID`, `typecode`, `typename`, `typepid`, `typegroupid`, `create_date`, `create_name`) VALUES ('ff80808174b4f3a90174b8a868b90033', 'other', '其他', NULL, 'ff80808174b4f3a90174b8a4b7150028', '2020-09-23 09:51:19', '管理员');



delete from t_s_type where typegroupid = 'ff80808166106df501661372e9310184';
 
 INSERT INTO `t_s_type`(`ID`, `typecode`, `typename`, `typepid`, `typegroupid`, `create_date`, `create_name`) VALUES ('4028839174bf35400174bf3ff46b0003', 'rootA03', '物料耗材-办公类', NULL, 'ff80808166106df501661372e9310184', NULL, NULL);
INSERT INTO `t_s_type`(`ID`, `typecode`, `typename`, `typepid`, `typegroupid`, `create_date`, `create_name`) VALUES ('4028839174bf35400174bf3ff46b0004', 'rootA02', '物料耗材-保洁类', NULL, 'ff80808166106df501661372e9310184', NULL, NULL);
INSERT INTO `t_s_type`(`ID`, `typecode`, `typename`, `typepid`, `typegroupid`, `create_date`, `create_name`) VALUES ('4028839174bf35400174bf3ff46b0005', 'rootA01', '物料耗材-工程类', NULL, 'ff80808166106df501661372e9310184', NULL, NULL);
INSERT INTO `t_s_type`(`ID`, `typecode`, `typename`, `typepid`, `typegroupid`, `create_date`, `create_name`) VALUES ('4028839174bf35400174bf3ff46b0007', 'rootA05', '物料耗材-应急采购', NULL, 'ff80808166106df501661372e9310184', NULL, NULL);
INSERT INTO `t_s_type`(`ID`, `typecode`, `typename`, `typepid`, `typegroupid`, `create_date`, `create_name`) VALUES ('4028839174bf35400174bf3ff46b0009', 'rootA08', '物料耗材-会务', NULL, 'ff80808166106df501661372e9310184', NULL, NULL);
INSERT INTO `t_s_type`(`ID`, `typecode`, `typename`, `typepid`, `typegroupid`, `create_date`, `create_name`) VALUES ('4028839174bf35400174bf4060700009', 'rootA10', '物料耗材-保安', NULL, 'ff80808166106df501661372e9310184', '2020-09-24 16:35:01', '管理员');
INSERT INTO `t_s_type`(`ID`, `typecode`, `typename`, `typepid`, `typegroupid`, `create_date`, `create_name`) VALUES ('4028839174bf35400174bf4060700010', 'rootA06', '物料耗材-其他', NULL, 'ff80808166106df501661372e9310184', NULL, NULL);
INSERT INTO `t_s_type`(`ID`, `typecode`, `typename`, `typepid`, `typegroupid`, `create_date`, `create_name`) VALUES ('4028839174bf35400174bf40e63a000b', 'R003A01A01', '低值易耗-办公', NULL, 'ff80808166106df501661372e9310184', NULL, NULL);
INSERT INTO `t_s_type`(`ID`, `typecode`, `typename`, `typepid`, `typegroupid`, `create_date`, `create_name`) VALUES ('4028839174bf35400174bf41cd1d000e', 'R003A01A02', '低值易耗-保安', NULL, 'ff80808166106df501661372e9310184', '2020-09-24 16:36:35', '管理员');
INSERT INTO `t_s_type`(`ID`, `typecode`, `typename`, `typepid`, `typegroupid`, `create_date`, `create_name`) VALUES ('4028839174bf35400174bf4200430010', 'R003A01A03', '低值易耗-工程', NULL, 'ff80808166106df501661372e9310184', '2020-09-24 16:36:48', '管理员');
INSERT INTO `t_s_type`(`ID`, `typecode`, `typename`, `typepid`, `typegroupid`, `create_date`, `create_name`) VALUES ('4028839174bf35400174bf4232870012', 'R003A01A04', '低值易耗-会务', NULL, 'ff80808166106df501661372e9310184', '2020-09-24 16:37:01', '管理员');
INSERT INTO `t_s_type`(`ID`, `typecode`, `typename`, `typepid`, `typegroupid`, `create_date`, `create_name`) VALUES ('4028839174bf35400174bf4266b40014', 'R003A01A05', '低值易耗-保洁', NULL, 'ff80808166106df501661372e9310184', '2020-09-24 16:37:14', '管理员');
INSERT INTO `t_s_type`(`ID`, `typecode`, `typename`, `typepid`, `typegroupid`, `create_date`, `create_name`) VALUES ('4028839174bf35400174bf42f9c30017', 'rootA04A02', '固定资产-保安', NULL, 'ff80808166106df501661372e9310184', '2020-09-24 16:37:52', '管理员');
INSERT INTO `t_s_type`(`ID`, `typecode`, `typename`, `typepid`, `typegroupid`, `create_date`, `create_name`) VALUES ('4028839174bf35400174bf432d790019', 'rootA04A03', '固定资产-工程', NULL, 'ff80808166106df501661372e9310184', '2020-09-24 16:38:05', '管理员');
INSERT INTO `t_s_type`(`ID`, `typecode`, `typename`, `typepid`, `typegroupid`, `create_date`, `create_name`) VALUES ('4028839174bf35400174bf432d790020', 'rootA04A01', '固定资产-办公', NULL, 'ff80808166106df501661372e9310184', NULL, NULL);
INSERT INTO `t_s_type`(`ID`, `typecode`, `typename`, `typepid`, `typegroupid`, `create_date`, `create_name`) VALUES ('4028839174bf35400174bf43660b001b', 'rootA04A04', '固定资产-会务', NULL, 'ff80808166106df501661372e9310184', '2020-09-24 16:38:19', '管理员');
INSERT INTO `t_s_type`(`ID`, `typecode`, `typename`, `typepid`, `typegroupid`, `create_date`, `create_name`) VALUES ('4028839174bf35400174bf439302001d', 'rootA04A05', '固定资产-保洁', NULL, 'ff80808166106df501661372e9310184', '2020-09-24 16:38:31', '管理员');


alter table t_b_clothing add COLUMN `providerid` varchar(36) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '供应商id';
alter table t_b_clothing add COLUMN `providername` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '供应商名称';

##预算-涉及到物料、服装基础库修改 end

#预算版本
ALTER TABLE `t_b_budget_inst_version`
CHANGE COLUMN `inst_status` `inst_status_before` INT(11) NULL DEFAULT NULL COMMENT '版本阶段' ,
ADD COLUMN `inst_status_after` INT(11) NULL,
ADD COLUMN `user_save` INT NULL COMMENT '1 用户保存 0系统保存';

#预算成本分解

INSERT INTO t_b_budget_measure (id, create_by, create_name, sys_company_code, update_by, sys_org_code, bpm_status, create_date, update_name, update_date, code, custom_code, name, datatype, tooltype, texrate, control_budget, parent_id, is_leaf, label, remark, unit, finance_subject, seq_no, category, fraction_num, currency_symbol, show_type, thousandth, control_flag) VALUES ('4028128175391fa401753926c4aa0003', '1698', '朱浩军', 'A06', '1698', 'A06A05', '1', '2020-10-18 08:40:43', '朱浩军', '2020-10-18 22:00:06', 'A02A01', 'A02A01', '合同额', 'amount', '', 0, null, '40281281753a857e01753b2bcec80004', null, '', '', '', '', null, 'business', 2, '', 'one', 0, '');
INSERT INTO t_b_budget_measure (id, create_by, create_name, sys_company_code, update_by, sys_org_code, bpm_status, create_date, update_name, update_date, code, custom_code, name, datatype, tooltype, texrate, control_budget, parent_id, is_leaf, label, remark, unit, finance_subject, seq_no, category, fraction_num, currency_symbol, show_type, thousandth, control_flag) VALUES ('4028128175391fa40175392712ef0005', '1698', '朱浩军', 'A06', null, 'A06A05', '1', '2020-10-18 08:41:03', null, null, 'A02A02', 'A02A02', '成本预算上限', 'amount', '', 0, null, '40281281753a857e01753b2bcec80004', null, '', '', '', '', null, 'business', 2, '', 'one', 0, '');
INSERT INTO t_b_budget_measure (id, create_by, create_name, sys_company_code, update_by, sys_org_code, bpm_status, create_date, update_name, update_date, code, custom_code, name, datatype, tooltype, texrate, control_budget, parent_id, is_leaf, label, remark, unit, finance_subject, seq_no, category, fraction_num, currency_symbol, show_type, thousandth, control_flag) VALUES ('4028128175391fa40175392765d00007', '1698', '朱浩军', 'A06', '1698', 'A06A05', '1', '2020-10-18 08:41:25', '朱浩军', '2020-10-18 09:00:39', 'A02A03', 'A02A03', '办公室', 'amount', '', 0, null, '40281281753a857e01753b2bcec80004', 0, '', '', '', '', null, 'business', 2, '￥', 'one', 1, '');
INSERT INTO t_b_budget_measure (id, create_by, create_name, sys_company_code, update_by, sys_org_code, bpm_status, create_date, update_name, update_date, code, custom_code, name, datatype, tooltype, texrate, control_budget, parent_id, is_leaf, label, remark, unit, finance_subject, seq_no, category, fraction_num, currency_symbol, show_type, thousandth, control_flag) VALUES ('4028128175391fa401753939031c0009', '1698', '朱浩军', 'A06', '1698', 'A06A05', '1', '2020-10-18 09:00:39', '朱浩军', '2020-10-18 09:02:27', 'A02A03A01', 'A02A03A01', '费用（市场配置）', 'amount', '', 0, null, '4028128175391fa40175392765d00007', null, '', '', '', '', null, 'business', 2, '￥', 'one', 1, '');
INSERT INTO t_b_budget_measure (id, create_by, create_name, sys_company_code, update_by, sys_org_code, bpm_status, create_date, update_name, update_date, code, custom_code, name, datatype, tooltype, texrate, control_budget, parent_id, is_leaf, label, remark, unit, finance_subject, seq_no, category, fraction_num, currency_symbol, show_type, thousandth, control_flag) VALUES ('4028128175391fa40175393a0a44000b', '1698', '朱浩军', 'A06', '1698', 'A06A05', '1', '2020-10-18 09:01:46', '朱浩军', '2020-10-18 09:02:40', 'A02A03A02', 'A02A03A02', '员工总数量（市场配置）', 'amount', '', 0, null, '4028128175391fa40175392765d00007', null, '', '', '', '', null, 'business', 2, '', 'one', 0, '');
INSERT INTO t_b_budget_measure (id, create_by, create_name, sys_company_code, update_by, sys_org_code, bpm_status, create_date, update_name, update_date, code, custom_code, name, datatype, tooltype, texrate, control_budget, parent_id, is_leaf, label, remark, unit, finance_subject, seq_no, category, fraction_num, currency_symbol, show_type, thousandth, control_flag) VALUES ('4028128175391fa40175393a77d4000d', '1698', '朱浩军', 'A06', null, 'A06A05', '1', '2020-10-18 09:02:14', null, null, 'A02A03A03', 'A02A03A03', '外包员工数量（运营配置）', 'amount', '', 0, null, '4028128175391fa40175392765d00007', null, '', '', '', '', null, 'business', 2, '', 'one', 0, '');
INSERT INTO t_b_budget_measure (id, create_by, create_name, sys_company_code, update_by, sys_org_code, bpm_status, create_date, update_name, update_date, code, custom_code, name, datatype, tooltype, texrate, control_budget, parent_id, is_leaf, label, remark, unit, finance_subject, seq_no, category, fraction_num, currency_symbol, show_type, thousandth, control_flag) VALUES ('4028128175391fa40175393c846b0012', '1698', '朱浩军', 'A06', '1698', 'A06A05', '1', '2020-10-18 09:04:29', '朱浩军', '2020-10-18 09:06:04', 'A02A03A04', 'A02A03A04', '外包员工费用（运营配置）', 'amount', '', 0, null, '4028128175391fa40175392765d00007', null, '', '', '', '', null, 'business', 2, '￥', 'one', 1, '');
INSERT INTO t_b_budget_measure (id, create_by, create_name, sys_company_code, update_by, sys_org_code, bpm_status, create_date, update_name, update_date, code, custom_code, name, datatype, tooltype, texrate, control_budget, parent_id, is_leaf, label, remark, unit, finance_subject, seq_no, category, fraction_num, currency_symbol, show_type, thousandth, control_flag) VALUES ('4028128175391fa40175393cb2930014', '1698', '朱浩军', 'A06', null, 'A06A05', '1', '2020-10-18 09:04:41', null, null, 'A02A03A05', 'A02A03A05', '自有员工数量（运营配置）', 'amount', '', 0, null, '4028128175391fa40175392765d00007', null, '', '', '', '', null, 'business', 2, '', 'one', 0, '');
INSERT INTO t_b_budget_measure (id, create_by, create_name, sys_company_code, update_by, sys_org_code, bpm_status, create_date, update_name, update_date, code, custom_code, name, datatype, tooltype, texrate, control_budget, parent_id, is_leaf, label, remark, unit, finance_subject, seq_no, category, fraction_num, currency_symbol, show_type, thousandth, control_flag) VALUES ('4028128175391fa40175393cf5ad0016', '1698', '朱浩军', 'A06', null, 'A06A05', '1', '2020-10-18 09:04:58', null, null, 'A02A03A06', 'A02A03A06', '自有员工费用（人资配置）', 'amount', '', 0, null, '4028128175391fa40175392765d00007', null, '', '', '', '', null, 'business', 2, '￥', 'one', 1, '');
INSERT INTO t_b_budget_measure (id, create_by, create_name, sys_company_code, update_by, sys_org_code, bpm_status, create_date, update_name, update_date, code, custom_code, name, datatype, tooltype, texrate, control_budget, parent_id, is_leaf, label, remark, unit, finance_subject, seq_no, category, fraction_num, currency_symbol, show_type, thousandth, control_flag) VALUES ('4028128175391fa40175393e6eb50019', '1698', '朱浩军', 'A06', null, 'A06A05', '1', '2020-10-18 09:06:34', null, null, 'A02A03A07', 'A02A03A07', '物料费用（采购配置）', 'amount', '', 0, null, '4028128175391fa40175392765d00007', null, '', '', '', '', null, 'business', 2, '￥', 'one', 1, '');
INSERT INTO t_b_budget_measure (id, create_by, create_name, sys_company_code, update_by, sys_org_code, bpm_status, create_date, update_name, update_date, code, custom_code, name, datatype, tooltype, texrate, control_budget, parent_id, is_leaf, label, remark, unit, finance_subject, seq_no, category, fraction_num, currency_symbol, show_type, thousandth, control_flag) VALUES ('4028128175391fa40175393f526a001b', '1698', '朱浩军', 'A06', '1698', 'A06A05', '1', '2020-10-18 09:07:33', '朱浩军', '2020-10-18 09:34:41', 'A02A04', 'A02A04', '客服', 'amount', '', 0, null, '40281281753a857e01753b2bcec80004', 0, '', '', '', '', null, 'business', 2, '', 'one', 0, '');
INSERT INTO t_b_budget_measure (id, create_by, create_name, sys_company_code, update_by, sys_org_code, bpm_status, create_date, update_name, update_date, code, custom_code, name, datatype, tooltype, texrate, control_budget, parent_id, is_leaf, label, remark, unit, finance_subject, seq_no, category, fraction_num, currency_symbol, show_type, thousandth, control_flag) VALUES ('4028128175391fa4017539582af2001d', '1698', '朱浩军', 'A06', null, 'A06A05', '1', '2020-10-18 09:34:41', null, null, 'A02A04A01', 'A02A04A01', '费用（市场配置）', 'amount', '', 0, null, '4028128175391fa40175393f526a001b', null, '', '', '', '', null, 'business', 2, '￥', 'one', 1, '');
INSERT INTO t_b_budget_measure (id, create_by, create_name, sys_company_code, update_by, sys_org_code, bpm_status, create_date, update_name, update_date, code, custom_code, name, datatype, tooltype, texrate, control_budget, parent_id, is_leaf, label, remark, unit, finance_subject, seq_no, category, fraction_num, currency_symbol, show_type, thousandth, control_flag) VALUES ('4028128175391fa4017539586e58001f', '1698', '朱浩军', 'A06', null, 'A06A05', '1', '2020-10-18 09:34:58', null, null, 'A02A04A02', 'A02A04A02', '员工总数量（市场配置）', 'amount', '', 0, null, '4028128175391fa40175393f526a001b', null, '', '', '', '', null, 'business', 2, '', 'one', 0, '');
INSERT INTO t_b_budget_measure (id, create_by, create_name, sys_company_code, update_by, sys_org_code, bpm_status, create_date, update_name, update_date, code, custom_code, name, datatype, tooltype, texrate, control_budget, parent_id, is_leaf, label, remark, unit, finance_subject, seq_no, category, fraction_num, currency_symbol, show_type, thousandth, control_flag) VALUES ('4028128175391fa4017539589df10021', '1698', '朱浩军', 'A06', null, 'A06A05', '1', '2020-10-18 09:35:10', null, null, 'A02A04A03', 'A02A04A03', '外包员工数量（运营配置）', 'amount', '', 0, null, '4028128175391fa40175393f526a001b', null, '', '', '', '', null, 'business', 2, '', 'one', 0, '');
INSERT INTO t_b_budget_measure (id, create_by, create_name, sys_company_code, update_by, sys_org_code, bpm_status, create_date, update_name, update_date, code, custom_code, name, datatype, tooltype, texrate, control_budget, parent_id, is_leaf, label, remark, unit, finance_subject, seq_no, category, fraction_num, currency_symbol, show_type, thousandth, control_flag) VALUES ('4028128175391fa401753958c4da0023', '1698', '朱浩军', 'A06', null, 'A06A05', '1', '2020-10-18 09:35:20', null, null, 'A02A04A04', 'A02A04A04', '外包员工费用（运营配置）', 'amount', '', 0, null, '4028128175391fa40175393f526a001b', null, '', '', '', '', null, 'business', 2, '￥', 'one', 1, '');
INSERT INTO t_b_budget_measure (id, create_by, create_name, sys_company_code, update_by, sys_org_code, bpm_status, create_date, update_name, update_date, code, custom_code, name, datatype, tooltype, texrate, control_budget, parent_id, is_leaf, label, remark, unit, finance_subject, seq_no, category, fraction_num, currency_symbol, show_type, thousandth, control_flag) VALUES ('4028128175391fa401753958fd290025', '1698', '朱浩军', 'A06', null, 'A06A05', '1', '2020-10-18 09:35:35', null, null, 'A02A04A05', 'A02A04A05', '自有员工数量（运营配置）', 'amount', '', 0, null, '4028128175391fa40175393f526a001b', null, '', '', '', '', null, 'business', 2, '', 'one', 0, '');
INSERT INTO t_b_budget_measure (id, create_by, create_name, sys_company_code, update_by, sys_org_code, bpm_status, create_date, update_name, update_date, code, custom_code, name, datatype, tooltype, texrate, control_budget, parent_id, is_leaf, label, remark, unit, finance_subject, seq_no, category, fraction_num, currency_symbol, show_type, thousandth, control_flag) VALUES ('4028128175391fa4017539592ab80027', '1698', '朱浩军', 'A06', null, 'A06A05', '1', '2020-10-18 09:35:46', null, null, 'A02A04A06', 'A02A04A06', '自有员工费用（人资配置）', 'amount', '', 0, null, '4028128175391fa40175393f526a001b', null, '', '', '', '', null, 'business', 2, '￥', 'one', 1, '');
INSERT INTO t_b_budget_measure (id, create_by, create_name, sys_company_code, update_by, sys_org_code, bpm_status, create_date, update_name, update_date, code, custom_code, name, datatype, tooltype, texrate, control_budget, parent_id, is_leaf, label, remark, unit, finance_subject, seq_no, category, fraction_num, currency_symbol, show_type, thousandth, control_flag) VALUES ('4028128175391fa401753959571d0029', '1698', '朱浩军', 'A06', null, 'A06A05', '1', '2020-10-18 09:35:58', null, null, 'A02A04A07', 'A02A04A07', '物料费用（采购配置）', 'amount', '', 0, null, '4028128175391fa40175393f526a001b', null, '', '', '', '', null, 'business', 2, '￥', 'one', 1, '');
INSERT INTO t_b_budget_measure (id, create_by, create_name, sys_company_code, update_by, sys_org_code, bpm_status, create_date, update_name, update_date, code, custom_code, name, datatype, tooltype, texrate, control_budget, parent_id, is_leaf, label, remark, unit, finance_subject, seq_no, category, fraction_num, currency_symbol, show_type, thousandth, control_flag) VALUES ('4028128175391fa4017539599c3d002b', '1698', '朱浩军', 'A06', '1698', 'A06A05', '1', '2020-10-18 09:36:15', '朱浩军', '2020-10-18 09:36:26', 'A02A05', 'A02A05', '保安', 'amount', '', 0, null, '40281281753a857e01753b2bcec80004', 0, '', '', '', '', null, 'business', 2, '', 'one', 0, '');
INSERT INTO t_b_budget_measure (id, create_by, create_name, sys_company_code, update_by, sys_org_code, bpm_status, create_date, update_name, update_date, code, custom_code, name, datatype, tooltype, texrate, control_budget, parent_id, is_leaf, label, remark, unit, finance_subject, seq_no, category, fraction_num, currency_symbol, show_type, thousandth, control_flag) VALUES ('4028128175391fa401753959c453002d', '1698', '朱浩军', 'A06', null, 'A06A05', '1', '2020-10-18 09:36:26', null, null, 'A02A05A01', 'A02A05A01', '费用（市场配置）', 'amount', '', 0, null, '4028128175391fa4017539599c3d002b', null, '', '', '', '', null, 'business', 2, '￥', 'one', 1, '');
INSERT INTO t_b_budget_measure (id, create_by, create_name, sys_company_code, update_by, sys_org_code, bpm_status, create_date, update_name, update_date, code, custom_code, name, datatype, tooltype, texrate, control_budget, parent_id, is_leaf, label, remark, unit, finance_subject, seq_no, category, fraction_num, currency_symbol, show_type, thousandth, control_flag) VALUES ('4028128175391fa401753959f870002f', '1698', '朱浩军', 'A06', null, 'A06A05', '1', '2020-10-18 09:36:39', null, null, 'A02A05A02', 'A02A05A02', '员工总数量（市场配置）', 'amount', '', 0, null, '4028128175391fa4017539599c3d002b', null, '', '', '', '', null, 'business', 2, '', 'one', 0, '');
INSERT INTO t_b_budget_measure (id, create_by, create_name, sys_company_code, update_by, sys_org_code, bpm_status, create_date, update_name, update_date, code, custom_code, name, datatype, tooltype, texrate, control_budget, parent_id, is_leaf, label, remark, unit, finance_subject, seq_no, category, fraction_num, currency_symbol, show_type, thousandth, control_flag) VALUES ('4028128175391fa40175395a87a20034', '1698', '朱浩军', 'A06', null, 'A06A05', '1', '2020-10-18 09:37:16', null, null, 'A02A05A03', 'A02A05A03', '外包员工数量（运营配置）', 'amount', '', 0, null, '4028128175391fa4017539599c3d002b', null, '', '', '', '', null, 'business', 2, '', 'one', 0, '');
INSERT INTO t_b_budget_measure (id, create_by, create_name, sys_company_code, update_by, sys_org_code, bpm_status, create_date, update_name, update_date, code, custom_code, name, datatype, tooltype, texrate, control_budget, parent_id, is_leaf, label, remark, unit, finance_subject, seq_no, category, fraction_num, currency_symbol, show_type, thousandth, control_flag) VALUES ('4028128175391fa40175395aad5f0036', '1698', '朱浩军', 'A06', null, 'A06A05', '1', '2020-10-18 09:37:25', null, null, 'A02A05A04', 'A02A05A04', '外包员工费用（运营配置）', 'amount', '', 0, null, '4028128175391fa4017539599c3d002b', null, '', '', '', '', null, 'business', 2, '￥', 'one', 1, '');
INSERT INTO t_b_budget_measure (id, create_by, create_name, sys_company_code, update_by, sys_org_code, bpm_status, create_date, update_name, update_date, code, custom_code, name, datatype, tooltype, texrate, control_budget, parent_id, is_leaf, label, remark, unit, finance_subject, seq_no, category, fraction_num, currency_symbol, show_type, thousandth, control_flag) VALUES ('4028128175391fa40175395add960038', '1698', '朱浩军', 'A06', null, 'A06A05', '1', '2020-10-18 09:37:38', null, null, 'A02A05A05', 'A02A05A05', '自有员工数量（运营配置）', 'amount', '', 0, null, '4028128175391fa4017539599c3d002b', null, '', '', '', '', null, 'business', 2, '', 'one', 0, '');
INSERT INTO t_b_budget_measure (id, create_by, create_name, sys_company_code, update_by, sys_org_code, bpm_status, create_date, update_name, update_date, code, custom_code, name, datatype, tooltype, texrate, control_budget, parent_id, is_leaf, label, remark, unit, finance_subject, seq_no, category, fraction_num, currency_symbol, show_type, thousandth, control_flag) VALUES ('4028128175391fa40175395b167f003a', '1698', '朱浩军', 'A06', null, 'A06A05', '1', '2020-10-18 09:37:52', null, null, 'A02A05A06', 'A02A05A06', '自有员工费用（人资配置）', 'amount', '', 0, null, '4028128175391fa4017539599c3d002b', null, '', '', '', '', null, 'business', 2, '￥', 'one', 1, '');
INSERT INTO t_b_budget_measure (id, create_by, create_name, sys_company_code, update_by, sys_org_code, bpm_status, create_date, update_name, update_date, code, custom_code, name, datatype, tooltype, texrate, control_budget, parent_id, is_leaf, label, remark, unit, finance_subject, seq_no, category, fraction_num, currency_symbol, show_type, thousandth, control_flag) VALUES ('4028128175391fa40175395b582e003c', '1698', '朱浩军', 'A06', null, 'A06A05', '1', '2020-10-18 09:38:09', null, null, 'A02A05A07', 'A02A05A07', '物料费用（采购配置）', 'amount', '', 0, null, '4028128175391fa4017539599c3d002b', null, '', '', '', '', null, 'business', 2, '￥', 'one', 1, '');
INSERT INTO t_b_budget_measure (id, create_by, create_name, sys_company_code, update_by, sys_org_code, bpm_status, create_date, update_name, update_date, code, custom_code, name, datatype, tooltype, texrate, control_budget, parent_id, is_leaf, label, remark, unit, finance_subject, seq_no, category, fraction_num, currency_symbol, show_type, thousandth, control_flag) VALUES ('4028128175391fa40175395ba139003e', '1698', '朱浩军', 'A06', '1698', 'A06A05', '1', '2020-10-18 09:38:28', '朱浩军', '2020-10-18 09:41:12', 'A02A06', 'A02A06', '保洁', 'amount', '', 0, null, '40281281753a857e01753b2bcec80004', 0, '', '', '', '', null, 'business', 2, '￥', 'one', 1, '');
INSERT INTO t_b_budget_measure (id, create_by, create_name, sys_company_code, update_by, sys_org_code, bpm_status, create_date, update_name, update_date, code, custom_code, name, datatype, tooltype, texrate, control_budget, parent_id, is_leaf, label, remark, unit, finance_subject, seq_no, category, fraction_num, currency_symbol, show_type, thousandth, control_flag) VALUES ('4028128175391fa40175395e23840040', '1698', '朱浩军', 'A06', null, 'A06A05', '1', '2020-10-18 09:41:12', null, null, 'A02A06A01', 'A02A06A01', '费用（市场配置）', 'amount', '', 0, null, '4028128175391fa40175395ba139003e', null, '', '', '', '', null, 'business', 2, '￥', 'one', 1, '');
INSERT INTO t_b_budget_measure (id, create_by, create_name, sys_company_code, update_by, sys_org_code, bpm_status, create_date, update_name, update_date, code, custom_code, name, datatype, tooltype, texrate, control_budget, parent_id, is_leaf, label, remark, unit, finance_subject, seq_no, category, fraction_num, currency_symbol, show_type, thousandth, control_flag) VALUES ('4028128175391fa40175395e518a0042', '1698', '朱浩军', 'A06', null, 'A06A05', '1', '2020-10-18 09:41:24', null, null, 'A02A06A02', 'A02A06A02', '员工总数量（市场配置）', 'amount', '', 0, null, '4028128175391fa40175395ba139003e', null, '', '', '', '', null, 'business', 2, '', 'one', 0, '');
INSERT INTO t_b_budget_measure (id, create_by, create_name, sys_company_code, update_by, sys_org_code, bpm_status, create_date, update_name, update_date, code, custom_code, name, datatype, tooltype, texrate, control_budget, parent_id, is_leaf, label, remark, unit, finance_subject, seq_no, category, fraction_num, currency_symbol, show_type, thousandth, control_flag) VALUES ('4028128175391fa40175395e7d860044', '1698', '朱浩军', 'A06', null, 'A06A05', '1', '2020-10-18 09:41:35', null, null, 'A02A06A03', 'A02A06A03', '外包员工数量（运营配置）', 'amount', '', 0, null, '4028128175391fa40175395ba139003e', null, '', '', '', '', null, 'business', 2, '', 'one', 0, '');
INSERT INTO t_b_budget_measure (id, create_by, create_name, sys_company_code, update_by, sys_org_code, bpm_status, create_date, update_name, update_date, code, custom_code, name, datatype, tooltype, texrate, control_budget, parent_id, is_leaf, label, remark, unit, finance_subject, seq_no, category, fraction_num, currency_symbol, show_type, thousandth, control_flag) VALUES ('4028128175391fa40175395ed60e0046', '1698', '朱浩军', 'A06', null, 'A06A05', '1', '2020-10-18 09:41:58', null, null, 'A02A06A04', 'A02A06A04', '外包员工费用（运营配置）', 'amount', '', 0, null, '4028128175391fa40175395ba139003e', null, '', '', '', '', null, 'business', 2, '￥', 'one', 1, '');
INSERT INTO t_b_budget_measure (id, create_by, create_name, sys_company_code, update_by, sys_org_code, bpm_status, create_date, update_name, update_date, code, custom_code, name, datatype, tooltype, texrate, control_budget, parent_id, is_leaf, label, remark, unit, finance_subject, seq_no, category, fraction_num, currency_symbol, show_type, thousandth, control_flag) VALUES ('4028128175391fa40175395f1ef30048', '1698', '朱浩军', 'A06', null, 'A06A05', '1', '2020-10-18 09:42:17', null, null, 'A02A06A05', 'A02A06A05', '自有员工数量（运营配置）', 'amount', '', 0, null, '4028128175391fa40175395ba139003e', null, '', '', '', '', null, 'business', 2, '', 'one', 0, '');
INSERT INTO t_b_budget_measure (id, create_by, create_name, sys_company_code, update_by, sys_org_code, bpm_status, create_date, update_name, update_date, code, custom_code, name, datatype, tooltype, texrate, control_budget, parent_id, is_leaf, label, remark, unit, finance_subject, seq_no, category, fraction_num, currency_symbol, show_type, thousandth, control_flag) VALUES ('4028128175391fa40175395f493c004a', '1698', '朱浩军', 'A06', null, 'A06A05', '1', '2020-10-18 09:42:27', null, null, 'A02A06A06', 'A02A06A06', '自有员工费用（人资配置）', 'amount', '', 0, null, '4028128175391fa40175395ba139003e', null, '', '', '', '', null, 'business', 2, '￥', 'one', 1, '');
INSERT INTO t_b_budget_measure (id, create_by, create_name, sys_company_code, update_by, sys_org_code, bpm_status, create_date, update_name, update_date, code, custom_code, name, datatype, tooltype, texrate, control_budget, parent_id, is_leaf, label, remark, unit, finance_subject, seq_no, category, fraction_num, currency_symbol, show_type, thousandth, control_flag) VALUES ('4028128175391fa40175395f7602004c', '1698', '朱浩军', 'A06', null, 'A06A05', '1', '2020-10-18 09:42:39', null, null, 'A02A06A07', 'A02A06A07', '物料费用（采购配置）', 'amount', '', 0, null, '4028128175391fa40175395ba139003e', null, '', '', '', '', null, 'business', 2, '￥', 'one', 1, '');
INSERT INTO t_b_budget_measure (id, create_by, create_name, sys_company_code, update_by, sys_org_code, bpm_status, create_date, update_name, update_date, code, custom_code, name, datatype, tooltype, texrate, control_budget, parent_id, is_leaf, label, remark, unit, finance_subject, seq_no, category, fraction_num, currency_symbol, show_type, thousandth, control_flag) VALUES ('4028128175391fa40175395f9ded004e', '1698', '朱浩军', 'A06', '1698', 'A06A05', '1', '2020-10-18 09:42:49', '朱浩军', '2020-10-18 09:43:28', 'A02A07', 'A02A07', '工程', 'amount', '', 0, null, '40281281753a857e01753b2bcec80004', 0, '', '', '', '', null, 'business', 2, '', 'one', 0, '');
INSERT INTO t_b_budget_measure (id, create_by, create_name, sys_company_code, update_by, sys_org_code, bpm_status, create_date, update_name, update_date, code, custom_code, name, datatype, tooltype, texrate, control_budget, parent_id, is_leaf, label, remark, unit, finance_subject, seq_no, category, fraction_num, currency_symbol, show_type, thousandth, control_flag) VALUES ('4028128175391fa40175396036490050', '1698', '朱浩军', 'A06', null, 'A06A05', '1', '2020-10-18 09:43:28', null, null, 'A02A07A01', 'A02A07A01', '费用（市场配置）', 'amount', '', 0, null, '4028128175391fa40175395f9ded004e', null, '', '', '', '', null, 'business', 2, '￥', 'one', 1, '');
INSERT INTO t_b_budget_measure (id, create_by, create_name, sys_company_code, update_by, sys_org_code, bpm_status, create_date, update_name, update_date, code, custom_code, name, datatype, tooltype, texrate, control_budget, parent_id, is_leaf, label, remark, unit, finance_subject, seq_no, category, fraction_num, currency_symbol, show_type, thousandth, control_flag) VALUES ('4028128175391fa4017539606b880052', '1698', '朱浩军', 'A06', null, 'A06A05', '1', '2020-10-18 09:43:42', null, null, 'A02A07A02', 'A02A07A02', '员工总数量（市场配置）', 'amount', '', 0, null, '4028128175391fa40175395f9ded004e', null, '', '', '', '', null, 'business', 2, '', 'one', 0, '');
INSERT INTO t_b_budget_measure (id, create_by, create_name, sys_company_code, update_by, sys_org_code, bpm_status, create_date, update_name, update_date, code, custom_code, name, datatype, tooltype, texrate, control_budget, parent_id, is_leaf, label, remark, unit, finance_subject, seq_no, category, fraction_num, currency_symbol, show_type, thousandth, control_flag) VALUES ('4028128175391fa40175396099670054', '1698', '朱浩军', 'A06', null, 'A06A05', '1', '2020-10-18 09:43:53', null, null, 'A02A07A03', 'A02A07A03', '外包员工数量（运营配置）', 'amount', '', 0, null, '4028128175391fa40175395f9ded004e', null, '', '', '', '', null, 'business', 2, '', 'one', 0, '');
INSERT INTO t_b_budget_measure (id, create_by, create_name, sys_company_code, update_by, sys_org_code, bpm_status, create_date, update_name, update_date, code, custom_code, name, datatype, tooltype, texrate, control_budget, parent_id, is_leaf, label, remark, unit, finance_subject, seq_no, category, fraction_num, currency_symbol, show_type, thousandth, control_flag) VALUES ('4028128175391fa401753960c2a10056', '1698', '朱浩军', 'A06', null, 'A06A05', '1', '2020-10-18 09:44:04', null, null, 'A02A07A04', 'A02A07A04', '外包员工费用（运营配置）', 'amount', '', 0, null, '4028128175391fa40175395f9ded004e', null, '', '', '', '', null, 'business', 2, '￥', 'one', 1, '');
INSERT INTO t_b_budget_measure (id, create_by, create_name, sys_company_code, update_by, sys_org_code, bpm_status, create_date, update_name, update_date, code, custom_code, name, datatype, tooltype, texrate, control_budget, parent_id, is_leaf, label, remark, unit, finance_subject, seq_no, category, fraction_num, currency_symbol, show_type, thousandth, control_flag) VALUES ('4028128175391fa401753960f1860058', '1698', '朱浩军', 'A06', null, 'A06A05', '1', '2020-10-18 09:44:16', null, null, 'A02A07A05', 'A02A07A05', '自有员工数量（运营配置）', 'amount', '', 0, null, '4028128175391fa40175395f9ded004e', null, '', '', '', '', null, 'business', 2, '', 'one', 0, '');
INSERT INTO t_b_budget_measure (id, create_by, create_name, sys_company_code, update_by, sys_org_code, bpm_status, create_date, update_name, update_date, code, custom_code, name, datatype, tooltype, texrate, control_budget, parent_id, is_leaf, label, remark, unit, finance_subject, seq_no, category, fraction_num, currency_symbol, show_type, thousandth, control_flag) VALUES ('4028128175391fa401753961128a005a', '1698', '朱浩军', 'A06', null, 'A06A05', '1', '2020-10-18 09:44:24', null, null, 'A02A07A06', 'A02A07A06', '自有员工费用（人资配置）', 'amount', '', 0, null, '4028128175391fa40175395f9ded004e', null, '', '', '', '', null, 'business', 2, '￥', 'one', 1, '');
INSERT INTO t_b_budget_measure (id, create_by, create_name, sys_company_code, update_by, sys_org_code, bpm_status, create_date, update_name, update_date, code, custom_code, name, datatype, tooltype, texrate, control_budget, parent_id, is_leaf, label, remark, unit, finance_subject, seq_no, category, fraction_num, currency_symbol, show_type, thousandth, control_flag) VALUES ('4028128175391fa4017539613889005c', '1698', '朱浩军', 'A06', null, 'A06A05', '1', '2020-10-18 09:44:34', null, null, 'A02A07A07', 'A02A07A07', '物料费用（采购配置）', 'amount', '', 0, null, '4028128175391fa40175395f9ded004e', null, '', '', '', '', null, 'business', 2, '￥', 'one', 1, '');
INSERT INTO t_b_budget_measure (id, create_by, create_name, sys_company_code, update_by, sys_org_code, bpm_status, create_date, update_name, update_date, code, custom_code, name, datatype, tooltype, texrate, control_budget, parent_id, is_leaf, label, remark, unit, finance_subject, seq_no, category, fraction_num, currency_symbol, show_type, thousandth, control_flag) VALUES ('4028128175391fa401753961624d005e', '1698', '朱浩军', 'A06', '1698', 'A06A05', '1', '2020-10-18 09:44:45', '朱浩军', '2020-10-18 09:45:09', 'A02A08', 'A02A08', '会务', 'amount', '', 0, null, '40281281753a857e01753b2bcec80004', 0, '', '', '', '', null, 'business', 2, '', 'one', 0, '');
INSERT INTO t_b_budget_measure (id, create_by, create_name, sys_company_code, update_by, sys_org_code, bpm_status, create_date, update_name, update_date, code, custom_code, name, datatype, tooltype, texrate, control_budget, parent_id, is_leaf, label, remark, unit, finance_subject, seq_no, category, fraction_num, currency_symbol, show_type, thousandth, control_flag) VALUES ('4028128175391fa401753961c20f0061', '1698', '朱浩军', 'A06', null, 'A06A05', '1', '2020-10-18 09:45:09', null, null, 'A02A08A01', 'A02A08A01', '费用（市场配置）', 'amount', '', 0, null, '4028128175391fa401753961624d005e', null, '', '', '', '', null, 'business', 2, '￥', 'one', 1, '');
INSERT INTO t_b_budget_measure (id, create_by, create_name, sys_company_code, update_by, sys_org_code, bpm_status, create_date, update_name, update_date, code, custom_code, name, datatype, tooltype, texrate, control_budget, parent_id, is_leaf, label, remark, unit, finance_subject, seq_no, category, fraction_num, currency_symbol, show_type, thousandth, control_flag) VALUES ('4028128175391fa401753961eb830063', '1698', '朱浩军', 'A06', null, 'A06A05', '1', '2020-10-18 09:45:20', null, null, 'A02A08A02', 'A02A08A02', '员工总数量（市场配置）', 'amount', '', 0, null, '4028128175391fa401753961624d005e', null, '', '', '', '', null, 'business', 2, '', 'one', 0, '');
INSERT INTO t_b_budget_measure (id, create_by, create_name, sys_company_code, update_by, sys_org_code, bpm_status, create_date, update_name, update_date, code, custom_code, name, datatype, tooltype, texrate, control_budget, parent_id, is_leaf, label, remark, unit, finance_subject, seq_no, category, fraction_num, currency_symbol, show_type, thousandth, control_flag) VALUES ('4028128175391fa401753962194b0065', '1698', '朱浩军', 'A06', null, 'A06A05', '1', '2020-10-18 09:45:32', null, null, 'A02A08A03', 'A02A08A03', '外包员工数量（运营配置）', 'amount', '', 0, null, '4028128175391fa401753961624d005e', null, '', '', '', '', null, 'business', 2, '', 'one', 0, '');
INSERT INTO t_b_budget_measure (id, create_by, create_name, sys_company_code, update_by, sys_org_code, bpm_status, create_date, update_name, update_date, code, custom_code, name, datatype, tooltype, texrate, control_budget, parent_id, is_leaf, label, remark, unit, finance_subject, seq_no, category, fraction_num, currency_symbol, show_type, thousandth, control_flag) VALUES ('4028128175391fa4017539623edb0067', '1698', '朱浩军', 'A06', null, 'A06A05', '1', '2020-10-18 09:45:41', null, null, 'A02A08A04', 'A02A08A04', '外包员工费用（运营配置）', 'amount', '', 0, null, '4028128175391fa401753961624d005e', null, '', '', '', '', null, 'business', 2, '￥', 'one', 1, '');
INSERT INTO t_b_budget_measure (id, create_by, create_name, sys_company_code, update_by, sys_org_code, bpm_status, create_date, update_name, update_date, code, custom_code, name, datatype, tooltype, texrate, control_budget, parent_id, is_leaf, label, remark, unit, finance_subject, seq_no, category, fraction_num, currency_symbol, show_type, thousandth, control_flag) VALUES ('4028128175391fa40175396266f50069', '1698', '朱浩军', 'A06', null, 'A06A05', '1', '2020-10-18 09:45:52', null, null, 'A02A08A05', 'A02A08A05', '自有员工数量（运营配置）', 'amount', '', 0, null, '4028128175391fa401753961624d005e', null, '', '', '', '', null, 'business', 2, '', 'one', 0, '');
INSERT INTO t_b_budget_measure (id, create_by, create_name, sys_company_code, update_by, sys_org_code, bpm_status, create_date, update_name, update_date, code, custom_code, name, datatype, tooltype, texrate, control_budget, parent_id, is_leaf, label, remark, unit, finance_subject, seq_no, category, fraction_num, currency_symbol, show_type, thousandth, control_flag) VALUES ('4028128175391fa40175396298e7006b', '1698', '朱浩军', 'A06', null, 'A06A05', '1', '2020-10-18 09:46:04', null, null, 'A02A08A06', 'A02A08A06', '自有员工费用（人资配置）', 'amount', '', 0, null, '4028128175391fa401753961624d005e', null, '', '', '', '', null, 'business', 2, '￥', 'one', 1, '');
INSERT INTO t_b_budget_measure (id, create_by, create_name, sys_company_code, update_by, sys_org_code, bpm_status, create_date, update_name, update_date, code, custom_code, name, datatype, tooltype, texrate, control_budget, parent_id, is_leaf, label, remark, unit, finance_subject, seq_no, category, fraction_num, currency_symbol, show_type, thousandth, control_flag) VALUES ('4028128175391fa401753962c367006d', '1698', '朱浩军', 'A06', null, 'A06A05', '1', '2020-10-18 09:46:15', null, null, 'A02A08A07', 'A02A08A07', '物料费用（采购配置）', 'amount', '', 0, null, '4028128175391fa401753961624d005e', null, '', '', '', '', null, 'business', 2, '￥', 'one', 1, '');
INSERT INTO t_b_budget_measure (id, create_by, create_name, sys_company_code, update_by, sys_org_code, bpm_status, create_date, update_name, update_date, code, custom_code, name, datatype, tooltype, texrate, control_budget, parent_id, is_leaf, label, remark, unit, finance_subject, seq_no, category, fraction_num, currency_symbol, show_type, thousandth, control_flag) VALUES ('4028128175391fa401753962e6e6006f', '1698', '朱浩军', 'A06', '1698', 'A06A05', '1', '2020-10-18 09:46:24', '朱浩军', '2020-10-18 09:46:43', 'A02A09', 'A02A09', '宿管', 'amount', '', 0, null, '40281281753a857e01753b2bcec80004', 0, '', '', '', '', null, 'business', 2, '', 'one', 0, '');
INSERT INTO t_b_budget_measure (id, create_by, create_name, sys_company_code, update_by, sys_org_code, bpm_status, create_date, update_name, update_date, code, custom_code, name, datatype, tooltype, texrate, control_budget, parent_id, is_leaf, label, remark, unit, finance_subject, seq_no, category, fraction_num, currency_symbol, show_type, thousandth, control_flag) VALUES ('4028128175391fa40175396331480071', '1698', '朱浩军', 'A06', null, 'A06A05', '1', '2020-10-18 09:46:43', null, null, 'A02A09A01', 'A02A09A01', '费用（市场配置）', 'amount', '', 0, null, '4028128175391fa401753962e6e6006f', null, '', '', '', '', null, 'business', 2, '￥', 'one', 1, '');
INSERT INTO t_b_budget_measure (id, create_by, create_name, sys_company_code, update_by, sys_org_code, bpm_status, create_date, update_name, update_date, code, custom_code, name, datatype, tooltype, texrate, control_budget, parent_id, is_leaf, label, remark, unit, finance_subject, seq_no, category, fraction_num, currency_symbol, show_type, thousandth, control_flag) VALUES ('4028128175391fa401753963567a0073', '1698', '朱浩军', 'A06', null, 'A06A05', '1', '2020-10-18 09:46:53', null, null, 'A02A09A02', 'A02A09A02', '员工总数量（市场配置）', 'amount', '', 0, null, '4028128175391fa401753962e6e6006f', null, '', '', '', '', null, 'business', 2, '', 'one', 0, '');
INSERT INTO t_b_budget_measure (id, create_by, create_name, sys_company_code, update_by, sys_org_code, bpm_status, create_date, update_name, update_date, code, custom_code, name, datatype, tooltype, texrate, control_budget, parent_id, is_leaf, label, remark, unit, finance_subject, seq_no, category, fraction_num, currency_symbol, show_type, thousandth, control_flag) VALUES ('4028128175391fa40175396397140075', '1698', '朱浩军', 'A06', null, 'A06A05', '1', '2020-10-18 09:47:09', null, null, 'A02A09A03', 'A02A09A03', '外包员工数量（运营配置）', 'amount', '', 0, null, '4028128175391fa401753962e6e6006f', null, '', '', '', '', null, 'business', 2, '', 'one', 0, '');
INSERT INTO t_b_budget_measure (id, create_by, create_name, sys_company_code, update_by, sys_org_code, bpm_status, create_date, update_name, update_date, code, custom_code, name, datatype, tooltype, texrate, control_budget, parent_id, is_leaf, label, remark, unit, finance_subject, seq_no, category, fraction_num, currency_symbol, show_type, thousandth, control_flag) VALUES ('4028128175391fa401753963c42d0077', '1698', '朱浩军', 'A06', null, 'A06A05', '1', '2020-10-18 09:47:21', null, null, 'A02A09A04', 'A02A09A04', '外包员工费用（运营配置）', 'amount', '', 0, null, '4028128175391fa401753962e6e6006f', null, '', '', '', '', null, 'business', 2, '￥', 'one', 1, '');
INSERT INTO t_b_budget_measure (id, create_by, create_name, sys_company_code, update_by, sys_org_code, bpm_status, create_date, update_name, update_date, code, custom_code, name, datatype, tooltype, texrate, control_budget, parent_id, is_leaf, label, remark, unit, finance_subject, seq_no, category, fraction_num, currency_symbol, show_type, thousandth, control_flag) VALUES ('4028128175391fa401753964306b0079', '1698', '朱浩军', 'A06', null, 'A06A05', '1', '2020-10-18 09:47:49', null, null, 'A02A09A05', 'A02A09A05', '自有员工数量（运营配置）', 'amount', '', 0, null, '4028128175391fa401753962e6e6006f', null, '', '', '', '', null, 'business', 2, '', 'one', 0, '');
INSERT INTO t_b_budget_measure (id, create_by, create_name, sys_company_code, update_by, sys_org_code, bpm_status, create_date, update_name, update_date, code, custom_code, name, datatype, tooltype, texrate, control_budget, parent_id, is_leaf, label, remark, unit, finance_subject, seq_no, category, fraction_num, currency_symbol, show_type, thousandth, control_flag) VALUES ('4028128175391fa40175396456a4007b', '1698', '朱浩军', 'A06', null, 'A06A05', '1', '2020-10-18 09:47:59', null, null, 'A02A09A06', 'A02A09A06', '自有员工费用（人资配置）', 'amount', '', 0, null, '4028128175391fa401753962e6e6006f', null, '', '', '', '', null, 'business', 2, '￥', 'one', 1, '');
INSERT INTO t_b_budget_measure (id, create_by, create_name, sys_company_code, update_by, sys_org_code, bpm_status, create_date, update_name, update_date, code, custom_code, name, datatype, tooltype, texrate, control_budget, parent_id, is_leaf, label, remark, unit, finance_subject, seq_no, category, fraction_num, currency_symbol, show_type, thousandth, control_flag) VALUES ('4028128175391fa4017539648068007d', '1698', '朱浩军', 'A06', null, 'A06A05', '1', '2020-10-18 09:48:09', null, null, 'A02A09A07', 'A02A09A07', '物料费用（采购配置）', 'amount', '', 0, null, '4028128175391fa401753962e6e6006f', null, '', '', '', '', null, 'business', 2, '￥', 'one', 1, '');
INSERT INTO t_b_budget_measure (id, create_by, create_name, sys_company_code, update_by, sys_org_code, bpm_status, create_date, update_name, update_date, code, custom_code, name, datatype, tooltype, texrate, control_budget, parent_id, is_leaf, label, remark, unit, finance_subject, seq_no, category, fraction_num, currency_symbol, show_type, thousandth, control_flag) VALUES ('4028128175391fa401753964b9d8007f', '1698', '朱浩军', 'A06', '1698', 'A06A05', '1', '2020-10-18 09:48:24', '朱浩军', '2020-10-18 09:48:39', 'A02A10', 'A02A10', '其他', 'amount', '', 0, null, '40281281753a857e01753b2bcec80004', 0, '', '', '', '', null, 'business', 2, '', 'one', 0, '');
INSERT INTO t_b_budget_measure (id, create_by, create_name, sys_company_code, update_by, sys_org_code, bpm_status, create_date, update_name, update_date, code, custom_code, name, datatype, tooltype, texrate, control_budget, parent_id, is_leaf, label, remark, unit, finance_subject, seq_no, category, fraction_num, currency_symbol, show_type, thousandth, control_flag) VALUES ('4028128175391fa401753964f2fa0081', '1698', '朱浩军', 'A06', null, 'A06A05', '1', '2020-10-18 09:48:39', null, null, 'A02A10A01', 'A02A10A01', '费用（市场配置）', 'amount', '', 0, null, '4028128175391fa401753964b9d8007f', null, '', '', '', '', null, 'business', 2, '￥', 'one', 1, '');
INSERT INTO t_b_budget_measure (id, create_by, create_name, sys_company_code, update_by, sys_org_code, bpm_status, create_date, update_name, update_date, code, custom_code, name, datatype, tooltype, texrate, control_budget, parent_id, is_leaf, label, remark, unit, finance_subject, seq_no, category, fraction_num, currency_symbol, show_type, thousandth, control_flag) VALUES ('4028128175391fa4017539651a840083', '1698', '朱浩军', 'A06', null, 'A06A05', '1', '2020-10-18 09:48:49', null, null, 'A02A10A02', 'A02A10A02', '员工总数量（市场配置）', 'amount', '', 0, null, '4028128175391fa401753964b9d8007f', null, '', '', '', '', null, 'business', 2, '', 'one', 0, '');
INSERT INTO t_b_budget_measure (id, create_by, create_name, sys_company_code, update_by, sys_org_code, bpm_status, create_date, update_name, update_date, code, custom_code, name, datatype, tooltype, texrate, control_budget, parent_id, is_leaf, label, remark, unit, finance_subject, seq_no, category, fraction_num, currency_symbol, show_type, thousandth, control_flag) VALUES ('4028128175391fa4017539653e7d0085', '1698', '朱浩军', 'A06', null, 'A06A05', '1', '2020-10-18 09:48:58', null, null, 'A02A10A03', 'A02A10A03', '外包员工数量（运营配置）', 'amount', '', 0, null, '4028128175391fa401753964b9d8007f', null, '', '', '', '', null, 'business', 2, '', 'one', 0, '');
INSERT INTO t_b_budget_measure (id, create_by, create_name, sys_company_code, update_by, sys_org_code, bpm_status, create_date, update_name, update_date, code, custom_code, name, datatype, tooltype, texrate, control_budget, parent_id, is_leaf, label, remark, unit, finance_subject, seq_no, category, fraction_num, currency_symbol, show_type, thousandth, control_flag) VALUES ('4028128175391fa401753965653c0087', '1698', '朱浩军', 'A06', null, 'A06A05', '1', '2020-10-18 09:49:08', null, null, 'A02A10A04', 'A02A10A04', '外包员工费用（运营配置）', 'amount', '', 0, null, '4028128175391fa401753964b9d8007f', null, '', '', '', '', null, 'business', 2, '￥', 'one', 1, '');
INSERT INTO t_b_budget_measure (id, create_by, create_name, sys_company_code, update_by, sys_org_code, bpm_status, create_date, update_name, update_date, code, custom_code, name, datatype, tooltype, texrate, control_budget, parent_id, is_leaf, label, remark, unit, finance_subject, seq_no, category, fraction_num, currency_symbol, show_type, thousandth, control_flag) VALUES ('4028128175391fa4017539658f540089', '1698', '朱浩军', 'A06', null, 'A06A05', '1', '2020-10-18 09:49:19', null, null, 'A02A10A05', 'A02A10A05', '自有员工数量（运营配置）', 'amount', '', 0, null, '4028128175391fa401753964b9d8007f', null, '', '', '', '', null, 'business', 2, '', 'one', 0, '');
INSERT INTO t_b_budget_measure (id, create_by, create_name, sys_company_code, update_by, sys_org_code, bpm_status, create_date, update_name, update_date, code, custom_code, name, datatype, tooltype, texrate, control_budget, parent_id, is_leaf, label, remark, unit, finance_subject, seq_no, category, fraction_num, currency_symbol, show_type, thousandth, control_flag) VALUES ('4028128175391fa401753965b481008b', '1698', '朱浩军', 'A06', null, 'A06A05', '1', '2020-10-18 09:49:28', null, null, 'A02A10A06', 'A02A10A06', '自有员工费用（人资配置）', 'amount', '', 0, null, '4028128175391fa401753964b9d8007f', null, '', '', '', '', null, 'business', 2, '￥', 'one', 1, '');
INSERT INTO t_b_budget_measure (id, create_by, create_name, sys_company_code, update_by, sys_org_code, bpm_status, create_date, update_name, update_date, code, custom_code, name, datatype, tooltype, texrate, control_budget, parent_id, is_leaf, label, remark, unit, finance_subject, seq_no, category, fraction_num, currency_symbol, show_type, thousandth, control_flag) VALUES ('4028128175391fa401753965d512008d', '1698', '朱浩军', 'A06', null, 'A06A05', '1', '2020-10-18 09:49:36', null, null, 'A02A10A07', 'A02A10A07', '物料费用（采购配置）', 'amount', '', 0, null, '4028128175391fa401753964b9d8007f', null, '', '', '', '', null, 'business', 2, '￥', 'one', 1, '');
INSERT INTO t_b_budget_measure (id, create_by, create_name, sys_company_code, update_by, sys_org_code, bpm_status, create_date, update_name, update_date, code, custom_code, name, datatype, tooltype, texrate, control_budget, parent_id, is_leaf, label, remark, unit, finance_subject, seq_no, category, fraction_num, currency_symbol, show_type, thousandth, control_flag) VALUES ('4028128175391fa40175396626db008f', '1698', '朱浩军', 'A06', null, 'A06A05', '1', '2020-10-18 09:49:57', null, null, 'A02A11', 'A02A11', '物料采购', 'amount', '', 0, null, '40281281753a857e01753b2bcec80004', null, '', '', '', '', null, 'business', 2, '￥', 'one', 1, '');
INSERT INTO t_b_budget_measure (id, create_by, create_name, sys_company_code, update_by, sys_org_code, bpm_status, create_date, update_name, update_date, code, custom_code, name, datatype, tooltype, texrate, control_budget, parent_id, is_leaf, label, remark, unit, finance_subject, seq_no, category, fraction_num, currency_symbol, show_type, thousandth, control_flag) VALUES ('4028128175391fa40175396661750091', '1698', '朱浩军', 'A06', null, 'A06A05', '1', '2020-10-18 09:50:12', null, null, 'A02A12', 'A02A12', '维保采购', 'amount', '', 0, null, '40281281753a857e01753b2bcec80004', null, '', '', '', '', null, 'business', 2, '￥', 'one', 1, '');
INSERT INTO t_b_budget_measure (id, create_by, create_name, sys_company_code, update_by, sys_org_code, bpm_status, create_date, update_name, update_date, code, custom_code, name, datatype, tooltype, texrate, control_budget, parent_id, is_leaf, label, remark, unit, finance_subject, seq_no, category, fraction_num, currency_symbol, show_type, thousandth, control_flag) VALUES ('4028128175391fa401753966826c0093', '1698', '朱浩军', 'A06', null, 'A06A05', '1', '2020-10-18 09:50:21', null, null, 'A02A13', 'A02A13', '管理费', 'amount', '', 0, null, '40281281753a857e01753b2bcec80004', null, '', '', '', '', null, 'business', 2, '￥', 'one', 1, '');
INSERT INTO t_b_budget_measure (id, create_by, create_name, sys_company_code, update_by, sys_org_code, bpm_status, create_date, update_name, update_date, code, custom_code, name, datatype, tooltype, texrate, control_budget, parent_id, is_leaf, label, remark, unit, finance_subject, seq_no, category, fraction_num, currency_symbol, show_type, thousandth, control_flag) VALUES ('4028128175391fa401753966a2d20095', '1698', '朱浩军', 'A06', null, 'A06A05', '1', '2020-10-18 09:50:29', null, null, 'A02A14', 'A02A14', '税金', 'amount', '', 0, null, '40281281753a857e01753b2bcec80004', null, '', '', '', '', null, 'business', 2, '￥', 'one', 1, '');
INSERT INTO t_b_budget_measure (id, create_by, create_name, sys_company_code, update_by, sys_org_code, bpm_status, create_date, update_name, update_date, code, custom_code, name, datatype, tooltype, texrate, control_budget, parent_id, is_leaf, label, remark, unit, finance_subject, seq_no, category, fraction_num, currency_symbol, show_type, thousandth, control_flag) VALUES ('4028128175391fa401753966e7b30097', '1698', '朱浩军', 'A06', null, 'A06A05', '1', '2020-10-18 09:50:47', null, null, 'A02A15', 'A02A15', '运营费', 'amount', '', 0, null, '40281281753a857e01753b2bcec80004', null, '', '', '', '', null, 'business', 2, '￥', 'one', 1, '');
INSERT INTO t_b_budget_measure (id, create_by, create_name, sys_company_code, update_by, sys_org_code, bpm_status, create_date, update_name, update_date, code, custom_code, name, datatype, tooltype, texrate, control_budget, parent_id, is_leaf, label, remark, unit, finance_subject, seq_no, category, fraction_num, currency_symbol, show_type, thousandth, control_flag) VALUES ('40281281753a857e01753b2bcec80004', '1698', '朱浩军', 'A06', '1698', 'A06A05', '1', '2020-10-18 18:05:28', '朱浩军', '2020-10-18 21:54:23', 'A02', 'A02', '成本分摊指标', 'amount', '', 0, null, null, 0, '', '', '', '', null, 'business', 2, '', 'one', 0, '');

INSERT INTO t_b_budget_measure (id, create_by, create_name, sys_company_code, update_by, sys_org_code, bpm_status, create_date, update_name, update_date, code, custom_code, name, datatype, tooltype, texrate, control_budget, parent_id, is_leaf, label, remark, unit, finance_subject, seq_no, category, fraction_num, currency_symbol, show_type, thousandth, control_flag) VALUES ('402812817548a59f017549e787b10066', '1698', '朱浩军', 'A06', null, 'A06A05', '1', '2020-10-21 14:45:12', null, null, 'A02A12A01', 'A02A12A01', '维保费（市场配置）', 'amount', '', 0, null, '4028128175391fa40175396661750091', null, '', '', '', '', null, 'business', 2, '￥', 'one', 1, '');
INSERT INTO t_b_budget_measure (id, create_by, create_name, sys_company_code, update_by, sys_org_code, bpm_status, create_date, update_name, update_date, code, custom_code, name, datatype, tooltype, texrate, control_budget, parent_id, is_leaf, label, remark, unit, finance_subject, seq_no, category, fraction_num, currency_symbol, show_type, thousandth, control_flag) VALUES ('402812817548a59f017549e7cf800068', '1698', '朱浩军', 'A06', null, 'A06A05', '1', '2020-10-21 14:45:30', null, null, 'A02A12A02', 'A02A12A02', '维保费（采购配置）', 'amount', '', 0, null, '4028128175391fa40175396661750091', null, '', '', '', '', null, 'business', 2, '￥', 'one', 1, '');
INSERT INTO t_b_budget_measure (id, create_by, create_name, sys_company_code, update_by, sys_org_code, bpm_status, create_date, update_name, update_date, code, custom_code, name, datatype, tooltype, texrate, control_budget, parent_id, is_leaf, label, remark, unit, finance_subject, seq_no, category, fraction_num, currency_symbol, show_type, thousandth, control_flag) VALUES ('402812817548a59f017549e889ce006b', '1698', '朱浩军', 'A06', null, 'A06A05', '1', '2020-10-21 14:46:18', null, null, 'A02A15A01', 'A02A15A01', '运营费（业务配置）', 'amount', '', 0, null, '4028128175391fa401753966e7b30097', null, '', '', '', '', null, 'business', 2, '￥', 'one', 1, '');
INSERT INTO t_b_budget_measure (id, create_by, create_name, sys_company_code, update_by, sys_org_code, bpm_status, create_date, update_name, update_date, code, custom_code, name, datatype, tooltype, texrate, control_budget, parent_id, is_leaf, label, remark, unit, finance_subject, seq_no, category, fraction_num, currency_symbol, show_type, thousandth, control_flag) VALUES ('402812817548a59f017549e8b368006d', '1698', '朱浩军', 'A06', null, 'A06A05', '1', '2020-10-21 14:46:28', null, null, 'A02A15A02', 'A02A15A02', '运营费 （市场配置）', 'amount', '', 0, null, '4028128175391fa401753966e7b30097', null, '', '', '', '', null, 'business', 2, '￥', 'one', 1, '');
INSERT INTO t_b_budget_measure (id, create_by, create_name, sys_company_code, update_by, sys_org_code, bpm_status, create_date, update_name, update_date, code, custom_code, name, datatype, tooltype, texrate, control_budget, parent_id, is_leaf, label, remark, unit, finance_subject, seq_no, category, fraction_num, currency_symbol, show_type, thousandth, control_flag) VALUES ('402812817548a59f017549eac36d0073', '1698', '朱浩军', 'A06', null, 'A06A05', '1', '2020-10-21 14:48:44', null, null, 'A02A11A01', 'A02A11A01', '物料费用（市场配置）', 'amount', '', 0, null, '4028128175391fa40175396626db008f', null, '', '', '', '', null, 'business', 2, '￥', 'one', 1, '');
INSERT INTO t_b_budget_measure (id, create_by, create_name, sys_company_code, update_by, sys_org_code, bpm_status, create_date, update_name, update_date, code, custom_code, name, datatype, tooltype, texrate, control_budget, parent_id, is_leaf, label, remark, unit, finance_subject, seq_no, category, fraction_num, currency_symbol, show_type, thousandth, control_flag) VALUES ('402812817548a59f017549eb00eb0075', '1698', '朱浩军', 'A06', null, 'A06A05', '1', '2020-10-21 14:48:59', null, null, 'A02A11A02', 'A02A11A02', '物料费用（采购配置）', 'amount', '', 0, null, '4028128175391fa40175396626db008f', null, '', '', '', '', null, 'business', 2, '￥', 'one', 1, '');

INSERT INTO `t_s_typegroup` (`ID`, `typegroupcode`, `typegroupname`, `create_date`, `create_name`) VALUES ('4028128175437dd3017545ea31120002','budget_cost_post_type','预算岗位类型','2020-10-20 21:09:01',''),('4028128175437dd30175461f6467001e','budget_cost_post_user_type','预算岗位人员类型','2020-10-20 21:07:44','管理员');
INSERT INTO `t_s_type` (`ID`, `typecode`, `typename`, `typepid`, `typegroupid`, `create_date`, `create_name`) VALUES ('4028128175437dd3017545eae8ac0004','bgs','办公室',NULL,'4028128175437dd3017545ea31120002','2020-10-20 20:10:24','管理员'),('4028128175437dd30175462204800020','glry','管理人员',NULL,'4028128175437dd30175461f6467001e','2020-10-20 21:10:36','管理员'),('4028128175437dd30175462240ff0022','yxng','一线内岗',NULL,'4028128175437dd30175461f6467001e','2020-10-20 21:10:51','管理员'),('4028128175437dd301754622b5430024','yxwg','一线外岗',NULL,'4028128175437dd30175461f6467001e','2020-10-20 21:11:21','管理员');
INSERT INTO `t_s_type` (`ID`,`typecode`,`typename`,`typepid`,`typegroupid`,`create_date`,`create_name`) VALUES ('4028128175437dd3017545eb21ca0006','kf','客服部',NULL,'4028128175437dd3017545ea31120002','2020-10-20 20:10:24',NULL);
INSERT INTO `t_s_type` (`ID`,`typecode`,`typename`,`typepid`,`typegroupid`,`create_date`,`create_name`) VALUES ('4028128175437dd3017545eb48380008','ba','保安部',NULL,'4028128175437dd3017545ea31120002','2020-10-20 20:10:24',NULL);
INSERT INTO `t_s_type` (`ID`,`typecode`,`typename`,`typepid`,`typegroupid`,`create_date`,`create_name`) VALUES ('4028128175437dd3017545eb64a7000a','bj','保洁部',NULL,'4028128175437dd3017545ea31120002','2020-10-20 20:10:24',NULL);
INSERT INTO `t_s_type` (`ID`,`typecode`,`typename`,`typepid`,`typegroupid`,`create_date`,`create_name`) VALUES ('4028128175437dd3017545eb7f50000c','gc','工程部',NULL,'4028128175437dd3017545ea31120002','2020-10-20 20:10:24',NULL);
INSERT INTO `t_s_type` (`ID`,`typecode`,`typename`,`typepid`,`typegroupid`,`create_date`,`create_name`) VALUES ('4028128175437dd3017545eb9d9e000e','hw','会务部',NULL,'4028128175437dd3017545ea31120002','2020-10-20 20:10:24',NULL);
INSERT INTO `t_s_type` (`ID`,`typecode`,`typename`,`typepid`,`typegroupid`,`create_date`,`create_name`) VALUES ('4028128175437dd3017545ebb82d0010','sg','宿管部',NULL,'4028128175437dd3017545ea31120002','2020-10-20 20:10:24',NULL);
INSERT INTO `t_s_type` (`ID`,`typecode`,`typename`,`typepid`,`typegroupid`,`create_date`,`create_name`) VALUES ('4028128175437dd3017545ebd0080012','qt','其他部',NULL,'4028128175437dd3017545ea31120002','2020-10-20 20:10:24',NULL);

INSERT INTO `t_s_function` (`ID`, `functioniframe`, `functionlevel`, `functionname`, `functionorder`, `functionurl`, `parentfunctionid`, `iconid`, `desk_iconid`, `functiontype`, `function_icon_style`, `create_by`, `create_name`, `update_by`, `update_date`, `create_date`, `update_name`, `remark`) VALUES ('4028128175391fa40175397450a1009b',NULL,1,'预算成本总表','45','budgetCostBreakdownController.do?list&editAuth=shichang','402881e57307f46c017307f7e7990001','8a8ab0b246dc81120146dc8180460000','8a8ab0b246dc81120146dc8180dd001e',0,'','admin','管理员','admin','2020-10-24 18:13:49','2020-10-18 10:05:26','管理员',''),('402812817559ff1f01755a1a67260004',NULL,1,'预算成本总表-运营','46','budgetCostBreakdownController.do?list&editAuth=yunying','402881e57307f46c017307f7e7990001','8a8ab0b246dc81120146dc8180460000','8a8ab0b246dc81120146dc8180dd001e',0,'','admin','管理员',NULL,NULL,'2020-10-24 18:14:41',NULL,''),('402812817559ff1f01755a1b3e000006',NULL,1,'预算成本总表-人资','47','budgetCostBreakdownController.do?list&editAuth=renzi','402881e57307f46c017307f7e7990001','8a8ab0b246dc81120146dc8180460000','8a8ab0b246dc81120146dc8180dd001e',0,'','admin','管理员',NULL,NULL,'2020-10-24 18:15:36',NULL,''),('402812817559ff1f01755a1bdc190008',NULL,1,'预算成本总表-采购','48','budgetCostBreakdownController.do?list&editAuth=caigou','402881e57307f46c017307f7e7990001','8a8ab0b246dc81120146dc8180460000','8a8ab0b246dc81120146dc8180dd001e',0,'','admin','管理员',NULL,NULL,'2020-10-24 18:16:17',NULL,''),('40281281755f898801755f8b4efe0001',NULL,1,'人工费用预算方案','50','budgetCostHrSchemeController.do?list','402881e57307f46c017307f7e7990001','8a8ab0b246dc81120146dc8180460000','8a8ab0b246dc81120146dc8180dd001e',0,'','admin','管理员',NULL,NULL,'2020-10-25 19:36:07',NULL,'');

ALTER TABLE `t_b_budget_tempsheet_measure` ADD COLUMN `find_key` VARCHAR(255) NULL;
ALTER TABLE `t_b_budget_inst_measure` ADD COLUMN `find_key` VARCHAR(255) NULL;

CREATE TABLE `t_b_budget_cost_breakdown` (
  `id` varchar(36) NOT NULL,
  `create_name` varchar(50) DEFAULT NULL COMMENT '创建人名称',
  `create_by` varchar(50) DEFAULT NULL COMMENT '创建人登录名称',
  `create_date` datetime DEFAULT NULL COMMENT '创建日期',
  `update_name` varchar(50) DEFAULT NULL COMMENT '更新人名称',
  `update_by` varchar(50) DEFAULT NULL COMMENT '更新人登录名称',
  `update_date` datetime DEFAULT NULL COMMENT '更新日期',
  `sys_org_code` varchar(50) DEFAULT NULL COMMENT '所属部门',
  `sys_company_code` varchar(50) DEFAULT NULL COMMENT '所属公司',
  `bpm_status` varchar(32) DEFAULT '1' COMMENT '流程状态',
  `period_year` varchar(32) DEFAULT NULL COMMENT '周期年份',
  `name` varchar(255) DEFAULT NULL COMMENT '名称',
  `json` longtext COMMENT '全局json',
  `status` int(11) DEFAULT NULL COMMENT '0 市场配置\n1 运营配置\n2人资配置 ，采购配置',
  `version` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='成本分解总表';

CREATE TABLE `t_b_budget_cost_breakdown_measure` (
  `id` varchar(36) NOT NULL,
  `create_name` varchar(50) DEFAULT NULL COMMENT '创建人名称',
  `create_by` varchar(50) DEFAULT NULL COMMENT '创建人登录名称',
  `create_date` datetime DEFAULT NULL COMMENT '创建日期',
  `update_name` varchar(50) DEFAULT NULL COMMENT '更新人名称',
  `update_by` varchar(50) DEFAULT NULL COMMENT '更新人登录名称',
  `update_date` datetime DEFAULT NULL COMMENT '更新日期',
  `sys_org_code` varchar(50) DEFAULT NULL COMMENT '所属部门',
  `sys_company_code` varchar(50) DEFAULT NULL COMMENT '所属公司',
  `bpm_status` varchar(32) DEFAULT '1' COMMENT '流程状态',
  `cost_breakdown_id` varchar(32) DEFAULT NULL COMMENT '主表id',
  `period_year` varchar(32) DEFAULT NULL COMMENT '预算年份',
  `measure_id` varchar(32) DEFAULT NULL COMMENT '指标id',
  `measure_name` varchar(255) DEFAULT NULL COMMENT '指标名称',
  `include_tax` int(11) DEFAULT NULL COMMENT '是否含税',
  `data_type` varchar(32) DEFAULT NULL COMMENT '数据类型',
  `data_rules` varchar(512) DEFAULT NULL COMMENT '数据规则',
  `data_formula` varchar(255) DEFAULT NULL COMMENT '公式',
  `data_value` decimal(30,8) DEFAULT NULL COMMENT '数字值',
  `control_flag` varchar(255) DEFAULT NULL COMMENT '控制预算',
  `ui_style` varchar(512) DEFAULT NULL COMMENT '样式json',
  `memo` varchar(512) DEFAULT NULL COMMENT '备注',
  `row` int(11) DEFAULT NULL COMMENT '行',
  `col` int(11) DEFAULT NULL COMMENT '列',
  `data_txt` varchar(512) DEFAULT NULL COMMENT '文本值',
  `function_id` varchar(45) DEFAULT NULL,
  `expect` int(11) DEFAULT NULL COMMENT '0 预计，1实际',
  `show_type` varchar(45) DEFAULT NULL,
  `sheet_index` int(11) DEFAULT NULL,
  `entity_id` varchar(45) DEFAULT NULL COMMENT '预算主体',
  `entity_name` varchar(255) DEFAULT NULL,
  `find_key` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `pos` (`row`,`col`),
  KEY `find` (`find_key`,`period_year`,`entity_id`),
  KEY `breakdownid` (`cost_breakdown_id`,`find_key`,`entity_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='成本分解指标表';

CREATE TABLE `t_b_budget_post` (
  `id` varchar(36) COLLATE utf8_bin NOT NULL COMMENT 'id',
  `create_name` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '创建人名称',
  `create_by` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '创建人登录名称',
  `create_date` datetime DEFAULT NULL COMMENT '创建日期',
  `update_name` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '更新人名称',
  `update_by` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '更新人登录名称',
  `update_date` datetime DEFAULT NULL COMMENT '更新日期',
  `sys_org_code` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '所属部门',
  `sys_company_code` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '所属公司',
  `post_code` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '岗位编码',
  `post_name` varchar(50) COLLATE utf8_bin NOT NULL COMMENT '岗位名称',
  `parent_postid` varchar(36) COLLATE utf8_bin DEFAULT NULL COMMENT '上级岗位ID',
  `post_desc` varchar(255) COLLATE utf8_bin DEFAULT NULL COMMENT '岗位描述',
  `status` varchar(1) COLLATE utf8_bin NOT NULL COMMENT '状态',
  `delete_flag` varchar(1) COLLATE utf8_bin NOT NULL COMMENT '逻辑删除标识',
  `money` double(16,2) DEFAULT NULL COMMENT '岗位津贴',
  `type` varchar(45) COLLATE utf8_bin DEFAULT NULL COMMENT '岗位类型',
  `user_type` varchar(45) COLLATE utf8_bin DEFAULT NULL COMMENT '人员类型',
  `sort_num` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='预算岗位表';
INSERT INTO `t_b_budget_post` (`id`,`create_name`,`create_by`,`create_date`,`update_name`,`update_by`,`update_date`,`sys_org_code`,`sys_company_code`,`post_code`,`post_name`,`parent_postid`,`post_desc`,`status`,`delete_flag`,`money`,`type`,`user_type`,`sort_num`) VALUES ('1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'大区经理',NULL,NULL,'0','0',0.00,'bgs','glry',1);
INSERT INTO `t_b_budget_post` (`id`,`create_name`,`create_by`,`create_date`,`update_name`,`update_by`,`update_date`,`sys_org_code`,`sys_company_code`,`post_code`,`post_name`,`parent_postid`,`post_desc`,`status`,`delete_flag`,`money`,`type`,`user_type`,`sort_num`) VALUES ('10',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'客服主管',NULL,NULL,'0','0',0.00,'kf','glry',21);
INSERT INTO `t_b_budget_post` (`id`,`create_name`,`create_by`,`create_date`,`update_name`,`update_by`,`update_date`,`sys_org_code`,`sys_company_code`,`post_code`,`post_name`,`parent_postid`,`post_desc`,`status`,`delete_flag`,`money`,`type`,`user_type`,`sort_num`) VALUES ('11',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'客服领班',NULL,NULL,'0','0',0.00,'kf','yxng',22);
INSERT INTO `t_b_budget_post` (`id`,`create_name`,`create_by`,`create_date`,`update_name`,`update_by`,`update_date`,`sys_org_code`,`sys_company_code`,`post_code`,`post_name`,`parent_postid`,`post_desc`,`status`,`delete_flag`,`money`,`type`,`user_type`,`sort_num`) VALUES ('12',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'客服专员',NULL,NULL,'0','0',0.00,'kf','yxng',23);
INSERT INTO `t_b_budget_post` (`id`,`create_name`,`create_by`,`create_date`,`update_name`,`update_by`,`update_date`,`sys_org_code`,`sys_company_code`,`post_code`,`post_name`,`parent_postid`,`post_desc`,`status`,`delete_flag`,`money`,`type`,`user_type`,`sort_num`) VALUES ('13',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'工程主管',NULL,NULL,'0','0',0.00,'gc','yxwg',31);
INSERT INTO `t_b_budget_post` (`id`,`create_name`,`create_by`,`create_date`,`update_name`,`update_by`,`update_date`,`sys_org_code`,`sys_company_code`,`post_code`,`post_name`,`parent_postid`,`post_desc`,`status`,`delete_flag`,`money`,`type`,`user_type`,`sort_num`) VALUES ('14',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'工程领班',NULL,NULL,'0','0',0.00,'gc','yxwg',32);
INSERT INTO `t_b_budget_post` (`id`,`create_name`,`create_by`,`create_date`,`update_name`,`update_by`,`update_date`,`sys_org_code`,`sys_company_code`,`post_code`,`post_name`,`parent_postid`,`post_desc`,`status`,`delete_flag`,`money`,`type`,`user_type`,`sort_num`) VALUES ('15',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'工程技工-高压电工',NULL,NULL,'0','0',0.00,'gc','yxng',33);
INSERT INTO `t_b_budget_post` (`id`,`create_name`,`create_by`,`create_date`,`update_name`,`update_by`,`update_date`,`sys_org_code`,`sys_company_code`,`post_code`,`post_name`,`parent_postid`,`post_desc`,`status`,`delete_flag`,`money`,`type`,`user_type`,`sort_num`) VALUES ('16',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'工程技工-低压电工',NULL,NULL,'0','0',0.00,'gc','yxwg',34);
INSERT INTO `t_b_budget_post` (`id`,`create_name`,`create_by`,`create_date`,`update_name`,`update_by`,`update_date`,`sys_org_code`,`sys_company_code`,`post_code`,`post_name`,`parent_postid`,`post_desc`,`status`,`delete_flag`,`money`,`type`,`user_type`,`sort_num`) VALUES ('17',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'工程技工-空调工',NULL,NULL,'0','0',0.00,'gc','yxng',35);
INSERT INTO `t_b_budget_post` (`id`,`create_name`,`create_by`,`create_date`,`update_name`,`update_by`,`update_date`,`sys_org_code`,`sys_company_code`,`post_code`,`post_name`,`parent_postid`,`post_desc`,`status`,`delete_flag`,`money`,`type`,`user_type`,`sort_num`) VALUES ('18',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'工程技工-锅炉工',NULL,NULL,'0','0',0.00,'gc','yxng',36);
INSERT INTO `t_b_budget_post` (`id`,`create_name`,`create_by`,`create_date`,`update_name`,`update_by`,`update_date`,`sys_org_code`,`sys_company_code`,`post_code`,`post_name`,`parent_postid`,`post_desc`,`status`,`delete_flag`,`money`,`type`,`user_type`,`sort_num`) VALUES ('19',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'保安主管',NULL,NULL,'0','0',0.00,'ba','yxng',41);
INSERT INTO `t_b_budget_post` (`id`,`create_name`,`create_by`,`create_date`,`update_name`,`update_by`,`update_date`,`sys_org_code`,`sys_company_code`,`post_code`,`post_name`,`parent_postid`,`post_desc`,`status`,`delete_flag`,`money`,`type`,`user_type`,`sort_num`) VALUES ('2',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'项目经理',NULL,NULL,'0','0',0.00,'bgs','glry',2);
INSERT INTO `t_b_budget_post` (`id`,`create_name`,`create_by`,`create_date`,`update_name`,`update_by`,`update_date`,`sys_org_code`,`sys_company_code`,`post_code`,`post_name`,`parent_postid`,`post_desc`,`status`,`delete_flag`,`money`,`type`,`user_type`,`sort_num`) VALUES ('20',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'保安领班',NULL,NULL,'0','0',0.00,'ba','yxng',42);
INSERT INTO `t_b_budget_post` (`id`,`create_name`,`create_by`,`create_date`,`update_name`,`update_by`,`update_date`,`sys_org_code`,`sys_company_code`,`post_code`,`post_name`,`parent_postid`,`post_desc`,`status`,`delete_flag`,`money`,`type`,`user_type`,`sort_num`) VALUES ('21',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'保安员-门岗',NULL,NULL,'0','0',0.00,'ba','yxng',43);
INSERT INTO `t_b_budget_post` (`id`,`create_name`,`create_by`,`create_date`,`update_name`,`update_by`,`update_date`,`sys_org_code`,`sys_company_code`,`post_code`,`post_name`,`parent_postid`,`post_desc`,`status`,`delete_flag`,`money`,`type`,`user_type`,`sort_num`) VALUES ('22',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'保安员-礼仪岗',NULL,NULL,'0','0',0.00,'ba','yxwg',44);
INSERT INTO `t_b_budget_post` (`id`,`create_name`,`create_by`,`create_date`,`update_name`,`update_by`,`update_date`,`sys_org_code`,`sys_company_code`,`post_code`,`post_name`,`parent_postid`,`post_desc`,`status`,`delete_flag`,`money`,`type`,`user_type`,`sort_num`) VALUES ('23',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'保安员-安检岗',NULL,NULL,'0','0',0.00,'ba','yxwg',45);
INSERT INTO `t_b_budget_post` (`id`,`create_name`,`create_by`,`create_date`,`update_name`,`update_by`,`update_date`,`sys_org_code`,`sys_company_code`,`post_code`,`post_name`,`parent_postid`,`post_desc`,`status`,`delete_flag`,`money`,`type`,`user_type`,`sort_num`) VALUES ('24',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'保安员-车管岗',NULL,NULL,'0','0',0.00,'ba','yxwg',46);
INSERT INTO `t_b_budget_post` (`id`,`create_name`,`create_by`,`create_date`,`update_name`,`update_by`,`update_date`,`sys_org_code`,`sys_company_code`,`post_code`,`post_name`,`parent_postid`,`post_desc`,`status`,`delete_flag`,`money`,`type`,`user_type`,`sort_num`) VALUES ('25',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'保安员-巡逻岗',NULL,NULL,'0','0',0.00,'ba','yxwg',47);
INSERT INTO `t_b_budget_post` (`id`,`create_name`,`create_by`,`create_date`,`update_name`,`update_by`,`update_date`,`sys_org_code`,`sys_company_code`,`post_code`,`post_name`,`parent_postid`,`post_desc`,`status`,`delete_flag`,`money`,`type`,`user_type`,`sort_num`) VALUES ('26',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'保安员-大厅岗',NULL,NULL,'0','0',0.00,'ba','yxng',48);
INSERT INTO `t_b_budget_post` (`id`,`create_name`,`create_by`,`create_date`,`update_name`,`update_by`,`update_date`,`sys_org_code`,`sys_company_code`,`post_code`,`post_name`,`parent_postid`,`post_desc`,`status`,`delete_flag`,`money`,`type`,`user_type`,`sort_num`) VALUES ('27',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'保安员-消控岗',NULL,NULL,'0','0',0.00,'ba','yxng',49);
INSERT INTO `t_b_budget_post` (`id`,`create_name`,`create_by`,`create_date`,`update_name`,`update_by`,`update_date`,`sys_org_code`,`sys_company_code`,`post_code`,`post_name`,`parent_postid`,`post_desc`,`status`,`delete_flag`,`money`,`type`,`user_type`,`sort_num`) VALUES ('28',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'保安员-监控岗',NULL,NULL,'0','0',0.00,'ba','yxng',50);
INSERT INTO `t_b_budget_post` (`id`,`create_name`,`create_by`,`create_date`,`update_name`,`update_by`,`update_date`,`sys_org_code`,`sys_company_code`,`post_code`,`post_name`,`parent_postid`,`post_desc`,`status`,`delete_flag`,`money`,`type`,`user_type`,`sort_num`) VALUES ('29',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'保洁主管',NULL,NULL,'0','0',0.00,'bj','glry',61);
INSERT INTO `t_b_budget_post` (`id`,`create_name`,`create_by`,`create_date`,`update_name`,`update_by`,`update_date`,`sys_org_code`,`sys_company_code`,`post_code`,`post_name`,`parent_postid`,`post_desc`,`status`,`delete_flag`,`money`,`type`,`user_type`,`sort_num`) VALUES ('3',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'项目副经理',NULL,NULL,'0','0',0.00,'bgs','glry',3);
INSERT INTO `t_b_budget_post` (`id`,`create_name`,`create_by`,`create_date`,`update_name`,`update_by`,`update_date`,`sys_org_code`,`sys_company_code`,`post_code`,`post_name`,`parent_postid`,`post_desc`,`status`,`delete_flag`,`money`,`type`,`user_type`,`sort_num`) VALUES ('30',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'保洁领班',NULL,NULL,'0','0',0.00,'bj','yxng',62);
INSERT INTO `t_b_budget_post` (`id`,`create_name`,`create_by`,`create_date`,`update_name`,`update_by`,`update_date`,`sys_org_code`,`sys_company_code`,`post_code`,`post_name`,`parent_postid`,`post_desc`,`status`,`delete_flag`,`money`,`type`,`user_type`,`sort_num`) VALUES ('31',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'内场保洁 ',NULL,NULL,'0','0',0.00,'bj','yxng',63);
INSERT INTO `t_b_budget_post` (`id`,`create_name`,`create_by`,`create_date`,`update_name`,`update_by`,`update_date`,`sys_org_code`,`sys_company_code`,`post_code`,`post_name`,`parent_postid`,`post_desc`,`status`,`delete_flag`,`money`,`type`,`user_type`,`sort_num`) VALUES ('32',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'外场保洁',NULL,NULL,'0','0',0.00,'bj','yxwg',64);
INSERT INTO `t_b_budget_post` (`id`,`create_name`,`create_by`,`create_date`,`update_name`,`update_by`,`update_date`,`sys_org_code`,`sys_company_code`,`post_code`,`post_name`,`parent_postid`,`post_desc`,`status`,`delete_flag`,`money`,`type`,`user_type`,`sort_num`) VALUES ('33',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'宿管主管',NULL,NULL,'0','0',0.00,'sg','glry',71);
INSERT INTO `t_b_budget_post` (`id`,`create_name`,`create_by`,`create_date`,`update_name`,`update_by`,`update_date`,`sys_org_code`,`sys_company_code`,`post_code`,`post_name`,`parent_postid`,`post_desc`,`status`,`delete_flag`,`money`,`type`,`user_type`,`sort_num`) VALUES ('34',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'宿管领班',NULL,NULL,'0','0',0.00,'sg','yxng',72);
INSERT INTO `t_b_budget_post` (`id`,`create_name`,`create_by`,`create_date`,`update_name`,`update_by`,`update_date`,`sys_org_code`,`sys_company_code`,`post_code`,`post_name`,`parent_postid`,`post_desc`,`status`,`delete_flag`,`money`,`type`,`user_type`,`sort_num`) VALUES ('35',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'宿管员',NULL,NULL,'0','0',0.00,'sg','yxng',73);
INSERT INTO `t_b_budget_post` (`id`,`create_name`,`create_by`,`create_date`,`update_name`,`update_by`,`update_date`,`sys_org_code`,`sys_company_code`,`post_code`,`post_name`,`parent_postid`,`post_desc`,`status`,`delete_flag`,`money`,`type`,`user_type`,`sort_num`) VALUES ('36',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'厨师',NULL,NULL,'0','0',0.00,'qt','yxng',81);
INSERT INTO `t_b_budget_post` (`id`,`create_name`,`create_by`,`create_date`,`update_name`,`update_by`,`update_date`,`sys_org_code`,`sys_company_code`,`post_code`,`post_name`,`parent_postid`,`post_desc`,`status`,`delete_flag`,`money`,`type`,`user_type`,`sort_num`) VALUES ('37',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'帮厨',NULL,NULL,'0','0',0.00,'qt','yxng',82);
INSERT INTO `t_b_budget_post` (`id`,`create_name`,`create_by`,`create_date`,`update_name`,`update_by`,`update_date`,`sys_org_code`,`sys_company_code`,`post_code`,`post_name`,`parent_postid`,`post_desc`,`status`,`delete_flag`,`money`,`type`,`user_type`,`sort_num`) VALUES ('38',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'理发师',NULL,NULL,'0','0',0.00,'qt','yxng',83);
INSERT INTO `t_b_budget_post` (`id`,`create_name`,`create_by`,`create_date`,`update_name`,`update_by`,`update_date`,`sys_org_code`,`sys_company_code`,`post_code`,`post_name`,`parent_postid`,`post_desc`,`status`,`delete_flag`,`money`,`type`,`user_type`,`sort_num`) VALUES ('39',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'洗衣工',NULL,NULL,'0','0',0.00,'qt','yxng',84);
INSERT INTO `t_b_budget_post` (`id`,`create_name`,`create_by`,`create_date`,`update_name`,`update_by`,`update_date`,`sys_org_code`,`sys_company_code`,`post_code`,`post_name`,`parent_postid`,`post_desc`,`status`,`delete_flag`,`money`,`type`,`user_type`,`sort_num`) VALUES ('4',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'项目经理助理',NULL,NULL,'0','0',0.00,'bgs','glry',4);
INSERT INTO `t_b_budget_post` (`id`,`create_name`,`create_by`,`create_date`,`update_name`,`update_by`,`update_date`,`sys_org_code`,`sys_company_code`,`post_code`,`post_name`,`parent_postid`,`post_desc`,`status`,`delete_flag`,`money`,`type`,`user_type`,`sort_num`) VALUES ('40',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'驾驶员',NULL,NULL,'0','0',NULL,'qt','yxng',85);
INSERT INTO `t_b_budget_post` (`id`,`create_name`,`create_by`,`create_date`,`update_name`,`update_by`,`update_date`,`sys_org_code`,`sys_company_code`,`post_code`,`post_name`,`parent_postid`,`post_desc`,`status`,`delete_flag`,`money`,`type`,`user_type`,`sort_num`) VALUES ('5',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'内勤',NULL,NULL,'0','0',0.00,'bgs','glry',5);
INSERT INTO `t_b_budget_post` (`id`,`create_name`,`create_by`,`create_date`,`update_name`,`update_by`,`update_date`,`sys_org_code`,`sys_company_code`,`post_code`,`post_name`,`parent_postid`,`post_desc`,`status`,`delete_flag`,`money`,`type`,`user_type`,`sort_num`) VALUES ('6',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'仓库管理员',NULL,NULL,'0','0',0.00,'bgs','yxng',6);
INSERT INTO `t_b_budget_post` (`id`,`create_name`,`create_by`,`create_date`,`update_name`,`update_by`,`update_date`,`sys_org_code`,`sys_company_code`,`post_code`,`post_name`,`parent_postid`,`post_desc`,`status`,`delete_flag`,`money`,`type`,`user_type`,`sort_num`) VALUES ('7',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'会务主管',NULL,NULL,'0','0',0.00,'hw','yxng',11);
INSERT INTO `t_b_budget_post` (`id`,`create_name`,`create_by`,`create_date`,`update_name`,`update_by`,`update_date`,`sys_org_code`,`sys_company_code`,`post_code`,`post_name`,`parent_postid`,`post_desc`,`status`,`delete_flag`,`money`,`type`,`user_type`,`sort_num`) VALUES ('8',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'会务领班',NULL,NULL,'0','0',0.00,'hw','yxng',12);
INSERT INTO `t_b_budget_post` (`id`,`create_name`,`create_by`,`create_date`,`update_name`,`update_by`,`update_date`,`sys_org_code`,`sys_company_code`,`post_code`,`post_name`,`parent_postid`,`post_desc`,`status`,`delete_flag`,`money`,`type`,`user_type`,`sort_num`) VALUES ('9',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'会务专员',NULL,NULL,'0','0',0.00,'hw','yxng',13);

CREATE TABLE `t_b_budget_post_num` (
  `id` varchar(36) NOT NULL,
  `create_name` varchar(50) DEFAULT NULL COMMENT '创建人名称',
  `create_by` varchar(50) DEFAULT NULL COMMENT '创建人登录名称',
  `create_date` datetime DEFAULT NULL COMMENT '创建日期',
  `update_name` varchar(50) DEFAULT NULL COMMENT '更新人名称',
  `update_by` varchar(50) DEFAULT NULL COMMENT '更新人登录名称',
  `update_date` datetime DEFAULT NULL COMMENT '更新日期',
  `sys_org_code` varchar(50) DEFAULT NULL COMMENT '所属部门',
  `sys_company_code` varchar(50) DEFAULT NULL COMMENT '所属公司',
  `bpm_status` varchar(32) DEFAULT '1' COMMENT '流程状态',
  `total_num` int(11) DEFAULT NULL COMMENT '总人数',
  `descn` longtext COMMENT '描述',
  `entity_id` varchar(45) DEFAULT NULL,
  `type` int(11) DEFAULT NULL COMMENT '0 自有 1外包',
  `period_year` varchar(45) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='预算岗位员工数量';

CREATE TABLE `t_b_budget_post_num_detail` (
  `id` varchar(36) NOT NULL,
  `create_name` varchar(50) DEFAULT NULL COMMENT '创建人名称',
  `create_by` varchar(50) DEFAULT NULL COMMENT '创建人登录名称',
  `create_date` datetime DEFAULT NULL COMMENT '创建日期',
  `update_name` varchar(50) DEFAULT NULL COMMENT '更新人名称',
  `update_by` varchar(50) DEFAULT NULL COMMENT '更新人登录名称',
  `update_date` datetime DEFAULT NULL COMMENT '更新日期',
  `sys_org_code` varchar(50) DEFAULT NULL COMMENT '所属部门',
  `sys_company_code` varchar(50) DEFAULT NULL COMMENT '所属公司',
  `bpm_status` varchar(32) DEFAULT '1' COMMENT '流程状态',
  `post_id` varchar(32) DEFAULT NULL COMMENT '岗位id',
  `post_name` varchar(32) DEFAULT NULL COMMENT '岗位名称',
  `num` int(11) DEFAULT NULL COMMENT '岗位人数',
  `post_num_id` varchar(45) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `post_num_id` (`post_num_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='岗位员工数量详情\n';

CREATE TABLE `t_b_budget_cost_hr_scheme` (
  `id` varchar(36) NOT NULL,
  `create_name` varchar(50) DEFAULT NULL COMMENT '创建人名称',
  `create_by` varchar(50) DEFAULT NULL COMMENT '创建人登录名称',
  `create_date` datetime DEFAULT NULL COMMENT '创建日期',
  `update_name` varchar(50) DEFAULT NULL COMMENT '更新人名称',
  `update_by` varchar(50) DEFAULT NULL COMMENT '更新人登录名称',
  `update_date` datetime DEFAULT NULL COMMENT '更新日期',
  `sys_org_code` varchar(50) DEFAULT NULL COMMENT '所属部门',
  `sys_company_code` varchar(50) DEFAULT NULL COMMENT '所属公司',
  `bpm_status` varchar(32) DEFAULT '1' COMMENT '流程状态',
  `name` varchar(255) DEFAULT NULL COMMENT '名称',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE `t_b_budget_cost_hr_scheme_detail` (
  `id` varchar(36) NOT NULL,
  `create_name` varchar(50) DEFAULT NULL COMMENT '创建人名称',
  `create_by` varchar(50) DEFAULT NULL COMMENT '创建人登录名称',
  `create_date` datetime DEFAULT NULL COMMENT '创建日期',
  `update_name` varchar(50) DEFAULT NULL COMMENT '更新人名称',
  `update_by` varchar(50) DEFAULT NULL COMMENT '更新人登录名称',
  `update_date` datetime DEFAULT NULL COMMENT '更新日期',
  `sys_org_code` varchar(50) DEFAULT NULL COMMENT '所属部门',
  `sys_company_code` varchar(50) DEFAULT NULL COMMENT '所属公司',
  `bpm_status` varchar(32) DEFAULT '1' COMMENT '流程状态',
  `scheme_id` varchar(32) DEFAULT NULL COMMENT '方案id',
  `mothly` double DEFAULT NULL COMMENT '月度工资',
  `social_base` double DEFAULT NULL COMMENT '社保缴纳基数',
  `social_per` double DEFAULT NULL COMMENT '社保缴纳比例',
  `provident_fund_base` double DEFAULT NULL COMMENT '公积金缴纳基数',
  `provident_fund_per` double DEFAULT NULL COMMENT '公积金缴纳比例',
  `meal_overtime` double DEFAULT NULL COMMENT '工作餐补及中夜班津贴',
  `post_id` varchar(45) DEFAULT NULL,
  `post_name` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

#预算成本分解

#行政事务类签报开始

CREATE TABLE `t_b_activiti_office_others` (
  `id` varchar(36) NOT NULL,
  `create_name` varchar(50) DEFAULT NULL COMMENT '创建人名称',
  `create_by` varchar(50) DEFAULT NULL COMMENT '创建人登录名称',
  `create_date` datetime DEFAULT NULL COMMENT '创建日期',
  `update_name` varchar(50) DEFAULT NULL COMMENT '更新人名称',
  `update_by` varchar(50) DEFAULT NULL COMMENT '更新人登录名称',
  `update_date` datetime DEFAULT NULL COMMENT '更新日期',
  `sys_org_code` varchar(50) DEFAULT NULL COMMENT '所属部门',
  `sys_company_code` varchar(50) DEFAULT NULL COMMENT '所属公司',
  `bpm_status` varchar(32) DEFAULT '1' COMMENT '流程状态',
  `depart_id` varchar(32) DEFAULT NULL COMMENT '部门id',
  `dep_name` varchar(255) DEFAULT NULL COMMENT '组织结构',
  `user_id` varchar(32) DEFAULT NULL COMMENT '用户id',
  `real_name` varchar(255) DEFAULT NULL COMMENT '员工姓名',
  `descn` longtext COMMENT '情况说明',
  `proc_inst_id` varchar(45) DEFAULT NULL,
  `step_name` varchar(45) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

INSERT INTO `t_s_type` (`ID`, `typecode`, `typename`, `typepid`, `typegroupid`, `create_date`, `create_name`) VALUES ('4028128175786336017579237dbc0f4f','office_others','行政事务类签报',NULL,'402889fe47eddd340147ede15c070001','2020-10-30 18:52:50','管理员'),('40281281757863360175792446600f51','office_others','行政事务类签报',NULL,'4028819b65a8b81c0165a9182bee0015','2020-10-30 18:53:42','管理员');

INSERT INTO `t_s_function` (`ID`, `functioniframe`, `functionlevel`, `functionname`, `functionorder`, `functionurl`, `parentfunctionid`, `iconid`, `desk_iconid`, `functiontype`, `function_icon_style`, `create_by`, `create_name`, `update_by`, `update_date`, `create_date`, `update_name`, `remark`) VALUES ('4028128175793fc8017579436cf70001',NULL,1,'行政事务类签报','4','activitiOfficeOthersController.do?list','ff8080816e68be5d016e68bfe4e20002','8a8ab0b246dc81120146dc8180460000','8a8ab0b246dc81120146dc8180dd001e',0,'fa fa-pencil-square-o','admin','管理员',NULL,NULL,'2020-10-30 19:27:43',NULL,'');
INSERT INTO `t_s_function` (`ID`, `functioniframe`, `functionlevel`, `functionname`, `functionorder`, `functionurl`, `parentfunctionid`, `iconid`, `desk_iconid`, `functiontype`, `function_icon_style`, `create_by`, `create_name`, `update_by`, `update_date`, `create_date`, `update_name`, `remark`) VALUES ('4028128175882da2017588329e0b0003',NULL,1,'行政事务类签报查看','5','activitiOfficeOthersController.do?list4view','ff8080816e68be5d016e68bfe4e20002','8a8ab0b246dc81120146dc8180460000','8a8ab0b246dc81120146dc8180dd001e',0,'fa fa-pencil-square-o','admin','管理员',NULL,NULL,'2020-11-02 17:03:40',NULL,'');

INSERT INTO `t_p_process` (`id`, `typeid`, `userid`, `processname`, `processxmlpath`, `processxml`, `processxmname`, `note`, `update_name`, `update_date`, `update_by`, `create_name`, `create_date`, `create_by`, `processkey`, `processstate`, `processtype`, `ccmode`) VALUES ('40281281757863360175792537f50f53','office_others',NULL,'行政事务类签报',NULL,'<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<definitions  xmlns=\"http://www.omg.org/spec/BPMN/20100524/MODEL\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:activiti=\"http://activiti.org/bpmn\" xmlns:bpmndi=\"http://www.omg.org/spec/BPMN/20100524/DI\" xmlns:omgdc=\"http://www.omg.org/spec/DD/20100524/DC\" xmlns:omgdi=\"http://www.omg.org/spec/DD/20100524/DI\" typeLanguage=\"http://www.w3.org/2001/XMLSchema\" expressionLanguage=\"http://www.w3.org/1999/XPath\" targetNamespace=\"http://www.lzt.com.cn\">\r\n    <process  id=\"process1604055266672\" name=\"行政事务类签报\">\r\n        <documentation>流程描述</documentation>\r\n        <extensionElements>\r\n            <activiti:executionListener id=\"402880e54803a496014805e5d9190012\" event=\"end\" class=\"org.jeecgframework.workflow.listener.execution.ProcessEndListener\" >\r\n            </activiti:executionListener>\r\n        </extensionElements>\r\n        <startEvent  id=\"start1\" name=\"开始节点\" activiti:initiator=\"applyUserId\">\r\n        </startEvent>\r\n        <endEvent  id=\"end\" name=\"结束节点\">\r\n        </endEvent>\r\n        <userTask  id=\"task1604055285084\" name=\"组织机构负责人\" activiti:candidateUsers=\"${flowUtil.customerUserSelect(BPM_FORM_KEY,BPM_DATA_ID,\'DEPART_MANAGER\')}\" >\r\n        </userTask>\r\n        <userTask  id=\"task1604055288635\" name=\"总经理助理\" activiti:candidateUsers=\"${flowUtil.getUserInproject(BPM_FORM_KEY,BPM_DATA_ID,\'M_ZJLZL\')}\" >\r\n        </userTask>\r\n        <userTask  id=\"task1604055342295\" name=\"制单人重填\" activiti:assignee=\"${applyUserId}\" >\r\n        </userTask>\r\n        <sequenceFlow  id=\"flow1604055315735\" name=\"\" sourceRef=\"start1\" targetRef=\"task1604055285084\">\r\n        </sequenceFlow>\r\n        <sequenceFlow  id=\"flow1604055317555\" name=\"通过\" sourceRef=\"task1604055285084\" targetRef=\"task1604055288635\">\r\n        </sequenceFlow>\r\n        <sequenceFlow  id=\"flow1604055331328\" name=\"通过\" sourceRef=\"task1604055288635\" targetRef=\"end\">\r\n        </sequenceFlow>\r\n        <sequenceFlow  id=\"flow1604055367070\" name=\"驳回\" sourceRef=\"task1604055288635\" targetRef=\"task1604055342295\">\r\n        </sequenceFlow>\r\n        <sequenceFlow  id=\"flow1604055369079\" name=\"驳回\" sourceRef=\"task1604055285084\" targetRef=\"task1604055342295\">\r\n        </sequenceFlow>\r\n        <sequenceFlow  id=\"flow1604055380955\" name=\"提交\" sourceRef=\"task1604055342295\" targetRef=\"task1604055285084\">\r\n        </sequenceFlow>\r\n    </process>\r\n    <bpmndi:BPMNDiagram id=\"BPMNDiagram_process1604055266672\">\r\n        <bpmndi:BPMNPlane bpmnElement=\"process1604055266672\" id=\"BPMNPlane_process1604055266672\">\r\n            <bpmndi:BPMNShape bpmnElement=\"start1\" id=\"BPMNShape_start1\">\r\n                <omgdc:Bounds height=\"30\" width=\"30\" x=\"200\" y=\"50\"/>\r\n            </bpmndi:BPMNShape>\r\n            <bpmndi:BPMNShape bpmnElement=\"end\" id=\"BPMNShape_end\">\r\n                <omgdc:Bounds height=\"30\" width=\"30\" x=\"200\" y=\"400\"/>\r\n            </bpmndi:BPMNShape>\r\n            <bpmndi:BPMNShape bpmnElement=\"task1604055285084\" id=\"BPMNShape_task1604055285084\">\r\n                <omgdc:Bounds height=\"50\" width=\"90\" x=\"168\" y=\"148\"/>\r\n            </bpmndi:BPMNShape>\r\n            <bpmndi:BPMNShape bpmnElement=\"task1604055288635\" id=\"BPMNShape_task1604055288635\">\r\n                <omgdc:Bounds height=\"50\" width=\"90\" x=\"170\" y=\"274\"/>\r\n            </bpmndi:BPMNShape>\r\n            <bpmndi:BPMNShape bpmnElement=\"task1604055342295\" id=\"BPMNShape_task1604055342295\">\r\n                <omgdc:Bounds height=\"50\" width=\"90\" x=\"367\" y=\"213\"/>\r\n            </bpmndi:BPMNShape>\r\n            <bpmndi:BPMNEdge bpmnElement=\"flow1604055315735\" id=\"BPMNEdge_flow1604055315735\">\r\n                <omgdi:waypoint x=\"215\" y=\"80\" />\r\n                <omgdi:waypoint x=\"215\" y=\"111\" />\r\n                <omgdi:waypoint x=\"213\" y=\"111\" />\r\n                <omgdi:waypoint x=\"213\" y=\"143\" />\r\n            </bpmndi:BPMNEdge>\r\n            <bpmndi:BPMNEdge bpmnElement=\"flow1604055317555\" id=\"BPMNEdge_flow1604055317555\">\r\n                <omgdi:waypoint x=\"213\" y=\"203\" />\r\n                <omgdi:waypoint x=\"213\" y=\"236\" />\r\n                <omgdi:waypoint x=\"215\" y=\"236\" />\r\n                <omgdi:waypoint x=\"215\" y=\"269\" />\r\n            </bpmndi:BPMNEdge>\r\n            <bpmndi:BPMNEdge bpmnElement=\"flow1604055331328\" id=\"BPMNEdge_flow1604055331328\">\r\n                <omgdi:waypoint x=\"215\" y=\"329\" />\r\n                <omgdi:waypoint x=\"215\" y=\"400\" />\r\n            </bpmndi:BPMNEdge>\r\n            <bpmndi:BPMNEdge bpmnElement=\"flow1604055367070\" id=\"BPMNEdge_flow1604055367070\">\r\n                <omgdi:waypoint x=\"265\" y=\"299\" />\r\n                <omgdi:waypoint x=\"313\" y=\"299\" />\r\n                <omgdi:waypoint x=\"313\" y=\"238\" />\r\n                <omgdi:waypoint x=\"362\" y=\"238\" />\r\n            </bpmndi:BPMNEdge>\r\n            <bpmndi:BPMNEdge bpmnElement=\"flow1604055369079\" id=\"BPMNEdge_flow1604055369079\">\r\n                <omgdi:waypoint x=\"263\" y=\"173\" />\r\n                <omgdi:waypoint x=\"312\" y=\"173\" />\r\n                <omgdi:waypoint x=\"312\" y=\"238\" />\r\n                <omgdi:waypoint x=\"362\" y=\"238\" />\r\n            </bpmndi:BPMNEdge>\r\n            <bpmndi:BPMNEdge bpmnElement=\"flow1604055380955\" id=\"BPMNEdge_flow1604055380955\">\r\n                <omgdi:waypoint x=\"412\" y=\"208\" />\r\n                <omgdi:waypoint x=\"412\" y=\"123\" />\r\n                <omgdi:waypoint x=\"213\" y=\"123\" />\r\n                <omgdi:waypoint x=\"213\" y=\"143\" />\r\n            </bpmndi:BPMNEdge>\r\n        </bpmndi:BPMNPlane>\r\n    </bpmndi:BPMNDiagram>\r\n</definitions>',NULL,NULL,'管理员','2020-11-02 16:21:34','admin','管理员','2020-10-30 18:54:44','admin','process1604055266672',1,'0',NULL);
INSERT INTO `t_p_processnode` (`id`, `formid`, `processid`, `processnodecode`, `processnodename`, `modelandview`, `modelandview_mobile`, `node_timeout`, `pnodecofigid`, `pushmode`, `delete_flag`) VALUES ('402812817578633601757926c7580f54',NULL,'40281281757863360175792537f50f53','task1604055285084','组织机构负责人','activitiOfficeOthersController.do?goView&flag=2','activitiOfficeOthersController.do?goViewMobile&flag=2',NULL,'402812817578633601757929957f0f59','no','0'),('402812817578633601757926c77b0f55',NULL,'40281281757863360175792537f50f53','task1604055288635','总经理助理','activitiOfficeOthersController.do?goView&flag=2','activitiOfficeOthersController.do?goViewMobile&flag=2',NULL,'402812817578633601757929957f0f59','no','0'),('402812817578633601757926c7820f56',NULL,'40281281757863360175792537f50f53','task1604055342295','制单人重填','activitiOfficeOthersController.do?goView&flag=1','activitiOfficeOthersController.do?goViewMobile&flag=1',NULL,'402812817578633601757929d67d0f5b','no','0');
INSERT INTO `t_s_busconfig` (`id`, `busname`, `form_type`, `tableid`, `online_id`, `processid`, `bus_title_exp`, `process_deal_style`, `show_title`, `show_table`, `config_id`) VALUES ('40281281757863360175793bdbab0f5d',NULL,'online','','t_b_activiti_office_others','40281281757863360175792537f50f53','行政事务类签报','formdeal','行政事务类签报','行政事务类签报','4028128175786336017579276fad0f57');
INSERT INTO `t_process_busconfig` (`id`, `show_title`, `real_title`, `show_tablename`, `real_tablename`, `process_type`, `activiti_config_class`) VALUES ('4028128175786336017579276fad0f57','行政事务类签报','行政事务类签报','行政事务类签报','t_b_activiti_office_others','office_others','');
INSERT INTO `t_p_processnode_config` (`id`, `process_type`, `url_title`, `pc_url`, `mobile_url`) VALUES ('402812817578633601757929957f0f59','office_others','审批','activitiOfficeOthersController.do?goView&flag=2','activitiOfficeOthersController.do?goViewMobile&flag=2'),('402812817578633601757929d67d0f5b','office_others','制单人重填','activitiOfficeOthersController.do?goView&flag=1','activitiOfficeOthersController.do?goViewMobile&flag=1');
#行政事务类签报结束

#物料优化 

INSERT INTO `t_s_typegroup`(`ID`, `typegroupcode`, `typegroupname`, `create_date`, `create_name`) VALUES ('ff80808175491b4a0175491ef6470001', 'cppaytype', '公私支付类型', '2020-10-21 11:06:07', '管理员');
INSERT INTO `t_s_type`(`ID`, `typecode`, `typename`, `typepid`, `typegroupid`, `create_date`, `create_name`) VALUES ('ff80808175491b4a0175491f618a0003', 'company', '对公支付', NULL, 'ff80808175491b4a0175491ef6470001', '2020-10-21 11:06:35', '管理员');
INSERT INTO `t_s_type`(`ID`, `typecode`, `typename`, `typepid`, `typegroupid`, `create_date`, `create_name`) VALUES ('ff80808175491b4a017549214f990005', 'personal', '对私支付', NULL, 'ff80808175491b4a0175491ef6470001', '2020-10-21 11:08:41', '管理员');

#供应商档案增加支付类型
ALTER TABLE `t_b_related_units` ADD COLUMN `paytype` VARCHAR(20) NULL COMMENT '支付类型';
#物料供应商价格档案
CREATE TABLE `t_b_goods_relatedunit_price`  (
  `id` varchar(36) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '主键',
  `relatedunitid` varchar(36) CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT '供应商id',
  `relatedunitname` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT '供应商名称',
  `metering_unit` varchar(36) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '计量单位',
  `retail_price` double NULL DEFAULT NULL COMMENT '采购价',
  `set_price1` double NULL DEFAULT NULL COMMENT '对外价格',
  `set_price2` double NULL DEFAULT NULL COMMENT '预设价格二',
  `set_price3` double NULL DEFAULT NULL COMMENT '预设价格三',
  `set_discount1` double NULL DEFAULT NULL COMMENT '预设折扣一',
  `set_price4` double NULL DEFAULT NULL COMMENT '预设价格四',
  `set_discount3` double NULL DEFAULT NULL COMMENT '预设折扣三',
  `set_discount2` double NULL DEFAULT NULL COMMENT '预设折扣二',
  `set_discount4` double NULL DEFAULT NULL COMMENT '预设折扣四',
  `goods_id` varchar(36) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '货品ID',
  `create_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建人名称',
  `create_by` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建人登录名称',
  `create_date` datetime(0) NULL DEFAULT NULL COMMENT '创建日期',
  `update_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '更新人名称',
  `update_by` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '更新人登录名称',
  `update_date` datetime(0) NULL DEFAULT NULL COMMENT '更新日期',
  `delete_flag` varchar(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '删除标识',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;

#服装供应商价格档案
CREATE TABLE `t_b_clothing_relatedunit_price`  (
  `id` varchar(36) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '主键',
  `relatedunitid` varchar(36) CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT '供应商id',
  `relatedunitname` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT '供应商名称',
  `metering_unit` varchar(36) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '计量单位',
  `retail_price` double NULL DEFAULT NULL COMMENT '采购价',
  `set_price1` double NULL DEFAULT NULL COMMENT '对外价格',
  `set_price2` double NULL DEFAULT NULL COMMENT '预设价格二',
  `set_price3` double NULL DEFAULT NULL COMMENT '预设价格三',
  `set_discount1` double NULL DEFAULT NULL COMMENT '预设折扣一',
  `set_price4` double NULL DEFAULT NULL COMMENT '预设价格四',
  `set_discount3` double NULL DEFAULT NULL COMMENT '预设折扣三',
  `set_discount2` double NULL DEFAULT NULL COMMENT '预设折扣二',
  `set_discount4` double NULL DEFAULT NULL COMMENT '预设折扣四',
  `clothingid` varchar(36) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '货品ID',
  `create_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建人名称',
  `create_by` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建人登录名称',
  `create_date` datetime(0) NULL DEFAULT NULL COMMENT '创建日期',
  `update_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '更新人名称',
  `update_by` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '更新人登录名称',
  `update_date` datetime(0) NULL DEFAULT NULL COMMENT '更新日期',
  `delete_flag` varchar(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '删除标识',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
#物料优化

#预算人员物资配置方案
ALTER TABLE `t_b_budget_post_num_detail` ADD COLUMN `cost_post_material_scheme_id` VARCHAR(45) NULL COMMENT '人员物资配置方案id';

CREATE TABLE `t_b_budget_cost_post_material_scheme` (
  `id` varchar(36) NOT NULL,
  `create_name` varchar(50) DEFAULT NULL COMMENT '创建人名称',
  `create_by` varchar(50) DEFAULT NULL COMMENT '创建人登录名称',
  `create_date` datetime DEFAULT NULL COMMENT '创建日期',
  `update_name` varchar(50) DEFAULT NULL COMMENT '更新人名称',
  `update_by` varchar(50) DEFAULT NULL COMMENT '更新人登录名称',
  `update_date` datetime DEFAULT NULL COMMENT '更新日期',
  `sys_org_code` varchar(50) DEFAULT NULL COMMENT '所属部门',
  `sys_company_code` varchar(50) DEFAULT NULL COMMENT '所属公司',
  `bpm_status` varchar(32) DEFAULT '1' COMMENT '流程状态',
  `name` varchar(255) NOT NULL COMMENT '名称',
  `total_amount` double DEFAULT NULL COMMENT '总金额',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='人员物资配置方案';

CREATE TABLE `t_b_budget_cost_post_material_scheme_detail` (
  `id` varchar(36) NOT NULL,
  `create_name` varchar(50) DEFAULT NULL COMMENT '创建人名称',
  `create_by` varchar(50) DEFAULT NULL COMMENT '创建人登录名称',
  `create_date` datetime DEFAULT NULL COMMENT '创建日期',
  `update_name` varchar(50) DEFAULT NULL COMMENT '更新人名称',
  `update_by` varchar(50) DEFAULT NULL COMMENT '更新人登录名称',
  `update_date` datetime DEFAULT NULL COMMENT '更新日期',
  `sys_org_code` varchar(50) DEFAULT NULL COMMENT '所属部门',
  `sys_company_code` varchar(50) DEFAULT NULL COMMENT '所属公司',
  `bpm_status` varchar(32) DEFAULT '1' COMMENT '流程状态',
  `scheme_id` varchar(32) DEFAULT NULL COMMENT '方案id',
  `material_id` varchar(32) DEFAULT NULL COMMENT '物资id',
  `material_name` varchar(255) DEFAULT NULL COMMENT '物资名称',
  `price` double DEFAULT NULL COMMENT '价格',
  `num` int(11) DEFAULT NULL COMMENT '数量',
  `amount` double DEFAULT NULL COMMENT '金额',
  `type` int(11) DEFAULT NULL COMMENT '物资类型',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='人员物资配置方案详情';

INSERT INTO `t_s_function` (`ID`, `functioniframe`, `functionlevel`, `functionname`, `functionorder`, `functionurl`, `parentfunctionid`, `iconid`, `desk_iconid`, `functiontype`, `function_icon_style`, `create_by`, `create_name`, `update_by`, `update_date`, `create_date`, `update_name`, `remark`) VALUES ('4028128175ab01b90175ab041c470001',NULL,1,'人员物资配置方案','53','budgetCostPostMaterialSchemeController.do?list','402881e57307f46c017307f7e7990001','8a8ab0b246dc81120146dc8180460000','8a8ab0b246dc81120146dc8180dd001e',0,'','admin','管理员','admin','2020-11-09 13:22:51','2020-11-09 11:19:35','管理员','');

INSERT INTO `t_b_budget_measure` (`id`,`create_by`,`create_name`,`sys_company_code`,`update_by`,`sys_org_code`,`bpm_status`,`create_date`,`update_name`,`update_date`,`code`,`custom_code`,`name`,`datatype`,`tooltype`,`texrate`,`control_budget`,`parent_id`,`is_leaf`,`label`,`remark`,`unit`,`finance_subject`,`seq_no`,`category`,`fraction_num`,`currency_symbol`,`show_type`,`thousandth`,`control_flag`) VALUES ('4028128175ab75e70175acef29e4000c','1698','朱浩军','A06',NULL,'A06A05','1','2020-11-09 20:15:56',NULL,NULL,'A02A03A08','A02A03A08','人员物资费用（运营配置）','amount','',0,NULL,'4028128175391fa40175392765d00007',NULL,'','','','',NULL,'business',2,'￥','one',1,'');
INSERT INTO `t_b_budget_measure` (`id`,`create_by`,`create_name`,`sys_company_code`,`update_by`,`sys_org_code`,`bpm_status`,`create_date`,`update_name`,`update_date`,`code`,`custom_code`,`name`,`datatype`,`tooltype`,`texrate`,`control_budget`,`parent_id`,`is_leaf`,`label`,`remark`,`unit`,`finance_subject`,`seq_no`,`category`,`fraction_num`,`currency_symbol`,`show_type`,`thousandth`,`control_flag`) VALUES ('4028128175ab75e70175acf4c95e000e','1698','朱浩军','A06',NULL,'A06A05','1','2020-11-09 20:22:05',NULL,NULL,'A02A04A08','A02A04A08','人员物资费用（运营配置）','amount','',0,NULL,'4028128175391fa40175393f526a001b',NULL,'','','','',NULL,'business',2,'￥','one',1,'');
INSERT INTO `t_b_budget_measure` (`id`,`create_by`,`create_name`,`sys_company_code`,`update_by`,`sys_org_code`,`bpm_status`,`create_date`,`update_name`,`update_date`,`code`,`custom_code`,`name`,`datatype`,`tooltype`,`texrate`,`control_budget`,`parent_id`,`is_leaf`,`label`,`remark`,`unit`,`finance_subject`,`seq_no`,`category`,`fraction_num`,`currency_symbol`,`show_type`,`thousandth`,`control_flag`) VALUES ('4028128175ab75e70175acf59ea20010','1698','朱浩军','A06',NULL,'A06A05','1','2020-11-09 20:22:59',NULL,NULL,'A02A05A08','A02A05A08','人员物资费用（运营配置）','amount','',0,NULL,'4028128175391fa4017539599c3d002b',NULL,'','','','',NULL,'business',2,'￥','one',1,'');
INSERT INTO `t_b_budget_measure` (`id`,`create_by`,`create_name`,`sys_company_code`,`update_by`,`sys_org_code`,`bpm_status`,`create_date`,`update_name`,`update_date`,`code`,`custom_code`,`name`,`datatype`,`tooltype`,`texrate`,`control_budget`,`parent_id`,`is_leaf`,`label`,`remark`,`unit`,`finance_subject`,`seq_no`,`category`,`fraction_num`,`currency_symbol`,`show_type`,`thousandth`,`control_flag`) VALUES ('4028128175ab75e70175acf697f10012','1698','朱浩军','A06',NULL,'A06A05','1','2020-11-09 20:24:03',NULL,NULL,'A02A06A08','A02A06A08','人员物资费用（运营配置）','amount','',0,NULL,'4028128175391fa40175395ba139003e',NULL,'','','','',NULL,'business',2,'￥','one',1,'');
INSERT INTO `t_b_budget_measure` (`id`,`create_by`,`create_name`,`sys_company_code`,`update_by`,`sys_org_code`,`bpm_status`,`create_date`,`update_name`,`update_date`,`code`,`custom_code`,`name`,`datatype`,`tooltype`,`texrate`,`control_budget`,`parent_id`,`is_leaf`,`label`,`remark`,`unit`,`finance_subject`,`seq_no`,`category`,`fraction_num`,`currency_symbol`,`show_type`,`thousandth`,`control_flag`) VALUES ('4028128175ab75e70175acf772f70014','1698','朱浩军','A06',NULL,'A06A05','1','2020-11-09 20:24:59',NULL,NULL,'A02A07A08','A02A07A08','人员物资费用（运营配置）','amount','',0,NULL,'4028128175391fa40175395f9ded004e',NULL,'','','','',NULL,'business',2,'￥','one',1,'');
INSERT INTO `t_b_budget_measure` (`id`,`create_by`,`create_name`,`sys_company_code`,`update_by`,`sys_org_code`,`bpm_status`,`create_date`,`update_name`,`update_date`,`code`,`custom_code`,`name`,`datatype`,`tooltype`,`texrate`,`control_budget`,`parent_id`,`is_leaf`,`label`,`remark`,`unit`,`finance_subject`,`seq_no`,`category`,`fraction_num`,`currency_symbol`,`show_type`,`thousandth`,`control_flag`) VALUES ('4028128175ab75e70175acf8110c0016','1698','朱浩军','A06',NULL,'A06A05','1','2020-11-09 20:25:40',NULL,NULL,'A02A08A08','A02A08A08','人员物资费用（运营配置）','amount','',0,NULL,'4028128175391fa401753961624d005e',NULL,'','','','',NULL,'business',2,'￥','one',1,'');
INSERT INTO `t_b_budget_measure` (`id`,`create_by`,`create_name`,`sys_company_code`,`update_by`,`sys_org_code`,`bpm_status`,`create_date`,`update_name`,`update_date`,`code`,`custom_code`,`name`,`datatype`,`tooltype`,`texrate`,`control_budget`,`parent_id`,`is_leaf`,`label`,`remark`,`unit`,`finance_subject`,`seq_no`,`category`,`fraction_num`,`currency_symbol`,`show_type`,`thousandth`,`control_flag`) VALUES ('4028128175ab75e70175acf887330018','1698','朱浩军','A06',NULL,'A06A05','1','2020-11-09 20:26:10',NULL,NULL,'A02A09A08','A02A09A08','人员物资费用（运营配置）','amount','',0,NULL,'4028128175391fa401753962e6e6006f',NULL,'','','','',NULL,'business',2,'￥','one',1,'');
INSERT INTO `t_b_budget_measure` (`id`,`create_by`,`create_name`,`sys_company_code`,`update_by`,`sys_org_code`,`bpm_status`,`create_date`,`update_name`,`update_date`,`code`,`custom_code`,`name`,`datatype`,`tooltype`,`texrate`,`control_budget`,`parent_id`,`is_leaf`,`label`,`remark`,`unit`,`finance_subject`,`seq_no`,`category`,`fraction_num`,`currency_symbol`,`show_type`,`thousandth`,`control_flag`) VALUES ('4028128175ab75e70175acf8eeea001a','1698','朱浩军','A06',NULL,'A06A05','1','2020-11-09 20:26:37',NULL,NULL,'A02A10A08','A02A10A08','人员物资费用（运营配置）','amount','',0,NULL,'4028128175391fa401753964b9d8007f',NULL,'','','','',NULL,'business',2,'￥','one',1,'');

ALTER TABLE `t_b_budget_dim_function_detail`
ADD COLUMN `type` VARCHAR(45) NULL COMMENT 'tempsheet 样表 cost 成本总表' ,
ADD COLUMN `cost_breakdown_id` VARCHAR(45) NULL COMMENT '成本总表id' ,
ADD COLUMN `cost_breakdown_name` VARCHAR(255) NULL ;

update t_b_budget_dim_function_detail  set type='tempsheet';

#预算人员物资配置方案

ALTER TABLE `t_b_project` ADD COLUMN `lnglat` VARCHAR(64) NULL COMMENT '经纬度';
ALTER TABLE `t_b_budget_post_num` CHANGE COLUMN `total_num` `total_num` DOUBLE NULL DEFAULT NULL COMMENT '总人数' ;
ALTER TABLE `t_b_budget_post_num_detail` CHANGE COLUMN `num` `num` DOUBLE NULL DEFAULT NULL COMMENT '岗位人数' ;


ALTER TABLE `t_b_budget_dim_function`
ADD COLUMN `function_from` VARCHAR(45) NULL COMMENT '来源 tempsheet ,cost',
ADD COLUMN `tempsheet_id` VARCHAR(45) NULL,
ADD COLUMN `cost_breakdown_id` VARCHAR(45) NULL,
ADD COLUMN `row` INT NULL,
ADD COLUMN `col` INT NULL,
ADD COLUMN `current_measure_id` VARCHAR(45) NULL COMMENT '当前指标id',
ADD COLUMN `current_period_detail_id` VARCHAR(45) NULL COMMENT '当前时间周期id',
ADD COLUMN `current_entity_id` VARCHAR(45) NULL COMMENT '当前预算主体id';

INSERT INTO `t_b_budget_measure` (`id`,`create_by`,`create_name`,`sys_company_code`,`update_by`,`sys_org_code`,`bpm_status`,`create_date`,`update_name`,`update_date`,`code`,`custom_code`,`name`,`datatype`,`tooltype`,`texrate`,`control_budget`,`parent_id`,`is_leaf`,`label`,`remark`,`unit`,`finance_subject`,`seq_no`,`category`,`fraction_num`,`currency_symbol`,`show_type`,`thousandth`,`control_flag`) VALUES ('4028128175ba0d990175ba2e291e0001','1698','朱浩军','A06',NULL,'A06A05','1','2020-11-12 09:59:49',NULL,NULL,'A02A16','A02A16','费用合计（市场配置）','amount','',0,NULL,'40281281753a857e01753b2bcec80004',NULL,'','','','',NULL,'business',2,'￥','one',1,'');
INSERT INTO `t_b_budget_measure` (`id`,`create_by`,`create_name`,`sys_company_code`,`update_by`,`sys_org_code`,`bpm_status`,`create_date`,`update_name`,`update_date`,`code`,`custom_code`,`name`,`datatype`,`tooltype`,`texrate`,`control_budget`,`parent_id`,`is_leaf`,`label`,`remark`,`unit`,`finance_subject`,`seq_no`,`category`,`fraction_num`,`currency_symbol`,`show_type`,`thousandth`,`control_flag`) VALUES ('4028128175ba0d990175ba2e73e00003','1698','朱浩军','A06',NULL,'A06A05','1','2020-11-12 10:00:08',NULL,NULL,'A02A17','A02A17','员工总数合计（市场配置）','amount','',0,NULL,'40281281753a857e01753b2bcec80004',NULL,'','','','',NULL,'business',2,'￥','one',1,'');
INSERT INTO `t_b_budget_measure` (`id`,`create_by`,`create_name`,`sys_company_code`,`update_by`,`sys_org_code`,`bpm_status`,`create_date`,`update_name`,`update_date`,`code`,`custom_code`,`name`,`datatype`,`tooltype`,`texrate`,`control_budget`,`parent_id`,`is_leaf`,`label`,`remark`,`unit`,`finance_subject`,`seq_no`,`category`,`fraction_num`,`currency_symbol`,`show_type`,`thousandth`,`control_flag`) VALUES ('4028128175ba0d990175ba2ecae10005','1698','朱浩军','A06',NULL,'A06A05','1','2020-11-12 10:00:30',NULL,NULL,'A02A18','A02A18','外包员工数合计（运营配置）','amount','',0,NULL,'40281281753a857e01753b2bcec80004',NULL,'','','','',NULL,'business',2,'￥','one',1,'');
INSERT INTO `t_b_budget_measure` (`id`,`create_by`,`create_name`,`sys_company_code`,`update_by`,`sys_org_code`,`bpm_status`,`create_date`,`update_name`,`update_date`,`code`,`custom_code`,`name`,`datatype`,`tooltype`,`texrate`,`control_budget`,`parent_id`,`is_leaf`,`label`,`remark`,`unit`,`finance_subject`,`seq_no`,`category`,`fraction_num`,`currency_symbol`,`show_type`,`thousandth`,`control_flag`) VALUES ('4028128175ba0d990175ba2f18dd0007','1698','朱浩军','A06',NULL,'A06A05','1','2020-11-12 10:00:50',NULL,NULL,'A02A19','A02A19','外包员工费用合计（运营配置）','amount','',0,NULL,'40281281753a857e01753b2bcec80004',NULL,'','','','',NULL,'business',2,'￥','one',1,'');
INSERT INTO `t_b_budget_measure` (`id`,`create_by`,`create_name`,`sys_company_code`,`update_by`,`sys_org_code`,`bpm_status`,`create_date`,`update_name`,`update_date`,`code`,`custom_code`,`name`,`datatype`,`tooltype`,`texrate`,`control_budget`,`parent_id`,`is_leaf`,`label`,`remark`,`unit`,`finance_subject`,`seq_no`,`category`,`fraction_num`,`currency_symbol`,`show_type`,`thousandth`,`control_flag`) VALUES ('4028128175ba0d990175ba2fa32e0009','1698','朱浩军','A06',NULL,'A06A05','1','2020-11-12 10:01:26',NULL,NULL,'A02A20','A02A20','自有员工数量合计（运营配置）','amount','',0,NULL,'40281281753a857e01753b2bcec80004',NULL,'','','','',NULL,'business',2,'￥','one',1,'');
INSERT INTO `t_b_budget_measure` (`id`,`create_by`,`create_name`,`sys_company_code`,`update_by`,`sys_org_code`,`bpm_status`,`create_date`,`update_name`,`update_date`,`code`,`custom_code`,`name`,`datatype`,`tooltype`,`texrate`,`control_budget`,`parent_id`,`is_leaf`,`label`,`remark`,`unit`,`finance_subject`,`seq_no`,`category`,`fraction_num`,`currency_symbol`,`show_type`,`thousandth`,`control_flag`) VALUES ('4028128175ba0d990175ba300745000b','1698','朱浩军','A06',NULL,'A06A05','1','2020-11-12 10:01:51',NULL,NULL,'A02A21','A02A21','人员物资费用合计（运营配置）','amount','',0,NULL,'40281281753a857e01753b2bcec80004',NULL,'','','','',NULL,'business',2,'￥','one',1,'');
INSERT INTO `t_b_budget_measure` (`id`,`create_by`,`create_name`,`sys_company_code`,`update_by`,`sys_org_code`,`bpm_status`,`create_date`,`update_name`,`update_date`,`code`,`custom_code`,`name`,`datatype`,`tooltype`,`texrate`,`control_budget`,`parent_id`,`is_leaf`,`label`,`remark`,`unit`,`finance_subject`,`seq_no`,`category`,`fraction_num`,`currency_symbol`,`show_type`,`thousandth`,`control_flag`) VALUES ('4028128175ba0d990175ba30490d000d','1698','朱浩军','A06',NULL,'A06A05','1','2020-11-12 10:02:08',NULL,NULL,'A02A22','A02A22','自有员工费用合计（人资配置）','amount','',0,NULL,'40281281753a857e01753b2bcec80004',NULL,'','','','',NULL,'business',2,'￥','one',1,'');
INSERT INTO `t_b_budget_measure` (`id`,`create_by`,`create_name`,`sys_company_code`,`update_by`,`sys_org_code`,`bpm_status`,`create_date`,`update_name`,`update_date`,`code`,`custom_code`,`name`,`datatype`,`tooltype`,`texrate`,`control_budget`,`parent_id`,`is_leaf`,`label`,`remark`,`unit`,`finance_subject`,`seq_no`,`category`,`fraction_num`,`currency_symbol`,`show_type`,`thousandth`,`control_flag`) VALUES ('4028128175ba0d990175ba30e409000f','1698','朱浩军','A06',NULL,'A06A05','1','2020-11-12 10:02:48',NULL,NULL,'A02A23','A02A23','员工费用合计（业务配置）','amount','',0,NULL,'40281281753a857e01753b2bcec80004',NULL,'','','','',NULL,'business',2,'￥','one',1,'');


INSERT INTO t_b_budget_measure (id, create_by, create_name, sys_company_code, update_by, sys_org_code, bpm_status, create_date, update_name, update_date, code, custom_code, name, datatype, tooltype, texrate, control_budget, parent_id, is_leaf, label, remark, unit, finance_subject, seq_no, category, fraction_num, currency_symbol, show_type, thousandth, control_flag) VALUES ('4028128175ce979d0175d11792d40001', '1698', '朱浩军', 'A06', null, 'A06A05', '1', '2020-11-16 20:46:24', null, null, 'A01A01A06A01', 'A01A01A06A01', '奖金（办公室）', 'amount', '', 0, null, '2c9358ad74ae69160174b3c18a8b0064', null, '', '', '', '', null, 'business', 2, '￥', 'one', 1, '');
INSERT INTO t_b_budget_measure (id, create_by, create_name, sys_company_code, update_by, sys_org_code, bpm_status, create_date, update_name, update_date, code, custom_code, name, datatype, tooltype, texrate, control_budget, parent_id, is_leaf, label, remark, unit, finance_subject, seq_no, category, fraction_num, currency_symbol, show_type, thousandth, control_flag) VALUES ('4028128175ce979d0175d117d25d0003', '1698', '朱浩军', 'A06', null, 'A06A05', '1', '2020-11-16 20:46:41', null, null, 'A01A01A06A02', 'A01A01A06A02', '奖金（客服部）', 'amount', '', 0, null, '2c9358ad74ae69160174b3c18a8b0064', null, '', '', '', '', null, 'business', 2, '￥', 'one', 1, '');
INSERT INTO t_b_budget_measure (id, create_by, create_name, sys_company_code, update_by, sys_org_code, bpm_status, create_date, update_name, update_date, code, custom_code, name, datatype, tooltype, texrate, control_budget, parent_id, is_leaf, label, remark, unit, finance_subject, seq_no, category, fraction_num, currency_symbol, show_type, thousandth, control_flag) VALUES ('4028128175ce979d0175d118281a0005', '1698', '朱浩军', 'A06', null, 'A06A05', '1', '2020-11-16 20:47:03', null, null, 'A01A01A06A03', 'A01A01A06A03', '奖金（保安部）', 'amount', '', 0, null, '2c9358ad74ae69160174b3c18a8b0064', null, '', '', '', '', null, 'business', 2, '￥', 'one', 1, '');
INSERT INTO t_b_budget_measure (id, create_by, create_name, sys_company_code, update_by, sys_org_code, bpm_status, create_date, update_name, update_date, code, custom_code, name, datatype, tooltype, texrate, control_budget, parent_id, is_leaf, label, remark, unit, finance_subject, seq_no, category, fraction_num, currency_symbol, show_type, thousandth, control_flag) VALUES ('4028128175ce979d0175d1186acc0007', '1698', '朱浩军', 'A06', null, 'A06A05', '1', '2020-11-16 20:47:20', null, null, 'A01A01A06A04', 'A01A01A06A04', '奖金（保洁部）', 'amount', '', 0, null, '2c9358ad74ae69160174b3c18a8b0064', null, '', '', '', '', null, 'business', 2, '￥', 'one', 1, '');
INSERT INTO t_b_budget_measure (id, create_by, create_name, sys_company_code, update_by, sys_org_code, bpm_status, create_date, update_name, update_date, code, custom_code, name, datatype, tooltype, texrate, control_budget, parent_id, is_leaf, label, remark, unit, finance_subject, seq_no, category, fraction_num, currency_symbol, show_type, thousandth, control_flag) VALUES ('4028128175ce979d0175d118a9b50009', '1698', '朱浩军', 'A06', null, 'A06A05', '1', '2020-11-16 20:47:36', null, null, 'A01A01A06A05', 'A01A01A06A05', '奖金（工程部）', 'amount', '', 0, null, '2c9358ad74ae69160174b3c18a8b0064', null, '', '', '', '', null, 'business', 2, '￥', 'one', 1, '');
INSERT INTO t_b_budget_measure (id, create_by, create_name, sys_company_code, update_by, sys_org_code, bpm_status, create_date, update_name, update_date, code, custom_code, name, datatype, tooltype, texrate, control_budget, parent_id, is_leaf, label, remark, unit, finance_subject, seq_no, category, fraction_num, currency_symbol, show_type, thousandth, control_flag) VALUES ('4028128175ce979d0175d118e961000b', '1698', '朱浩军', 'A06', null, 'A06A05', '1', '2020-11-16 20:47:52', null, null, 'A01A01A06A06', 'A01A01A06A06', '奖金（会务部）', 'amount', '', 0, null, '2c9358ad74ae69160174b3c18a8b0064', null, '', '', '', '', null, 'business', 2, '￥', 'one', 1, '');
INSERT INTO t_b_budget_measure (id, create_by, create_name, sys_company_code, update_by, sys_org_code, bpm_status, create_date, update_name, update_date, code, custom_code, name, datatype, tooltype, texrate, control_budget, parent_id, is_leaf, label, remark, unit, finance_subject, seq_no, category, fraction_num, currency_symbol, show_type, thousandth, control_flag) VALUES ('4028128175ce979d0175d1192836000d', '1698', '朱浩军', 'A06', null, 'A06A05', '1', '2020-11-16 20:48:08', null, null, 'A01A01A06A07', 'A01A01A06A07', '奖金（宿管部）', 'amount', '', 0, null, '2c9358ad74ae69160174b3c18a8b0064', null, '', '', '', '', null, 'business', 2, '￥', 'one', 1, '');
INSERT INTO t_b_budget_measure (id, create_by, create_name, sys_company_code, update_by, sys_org_code, bpm_status, create_date, update_name, update_date, code, custom_code, name, datatype, tooltype, texrate, control_budget, parent_id, is_leaf, label, remark, unit, finance_subject, seq_no, category, fraction_num, currency_symbol, show_type, thousandth, control_flag) VALUES ('4028128175ce979d0175d119711b000f', '1698', '朱浩军', 'A06', null, 'A06A05', '1', '2020-11-16 20:48:27', null, null, 'A01A01A06A08', 'A01A01A06A08', '奖金（其他部）', 'amount', '', 0, null, '2c9358ad74ae69160174b3c18a8b0064', null, '', '', '', '', null, 'business', 2, '￥', 'one', 1, '');
INSERT INTO t_b_budget_measure (id, create_by, create_name, sys_company_code, update_by, sys_org_code, bpm_status, create_date, update_name, update_date, code, custom_code, name, datatype, tooltype, texrate, control_budget, parent_id, is_leaf, label, remark, unit, finance_subject, seq_no, category, fraction_num, currency_symbol, show_type, thousandth, control_flag) VALUES ('4028128175ce979d0175d11bacae0011', '1698', '朱浩军', 'A06', null, 'A06A05', '1', '2020-11-16 20:50:53', null, null, 'A01A01A05A01A01', 'A01A01A05A01A01', '福利费（节日实物）-办公室', 'amount', '', 0, null, '2c9358ad74ae69160174b3cb256900a6', null, '', '', '', '', null, 'business', 2, '￥', 'one', 1, '');
INSERT INTO t_b_budget_measure (id, create_by, create_name, sys_company_code, update_by, sys_org_code, bpm_status, create_date, update_name, update_date, code, custom_code, name, datatype, tooltype, texrate, control_budget, parent_id, is_leaf, label, remark, unit, finance_subject, seq_no, category, fraction_num, currency_symbol, show_type, thousandth, control_flag) VALUES ('4028128175ce979d0175d11c15af0013', '1698', '朱浩军', 'A06', null, 'A06A05', '1', '2020-11-16 20:51:20', null, null, 'A01A01A05A01A02', 'A01A01A05A01A02', '福利费（节日实物）-客服部', 'amount', '', 0, null, '2c9358ad74ae69160174b3cb256900a6', null, '', '', '', '', null, 'business', 2, '￥', 'one', 1, '');
INSERT INTO t_b_budget_measure (id, create_by, create_name, sys_company_code, update_by, sys_org_code, bpm_status, create_date, update_name, update_date, code, custom_code, name, datatype, tooltype, texrate, control_budget, parent_id, is_leaf, label, remark, unit, finance_subject, seq_no, category, fraction_num, currency_symbol, show_type, thousandth, control_flag) VALUES ('4028128175ce979d0175d11c7c640015', '1698', '朱浩军', 'A06', null, 'A06A05', '1', '2020-11-16 20:51:46', null, null, 'A01A01A05A01A03', 'A01A01A05A01A03', '福利费（节日实物）-保安部', 'amount', '', 0, null, '2c9358ad74ae69160174b3cb256900a6', null, '', '', '', '', null, 'business', 2, '￥', 'one', 1, '');
INSERT INTO t_b_budget_measure (id, create_by, create_name, sys_company_code, update_by, sys_org_code, bpm_status, create_date, update_name, update_date, code, custom_code, name, datatype, tooltype, texrate, control_budget, parent_id, is_leaf, label, remark, unit, finance_subject, seq_no, category, fraction_num, currency_symbol, show_type, thousandth, control_flag) VALUES ('4028128175ce979d0175d11ccc150017', '1698', '朱浩军', 'A06', null, 'A06A05', '1', '2020-11-16 20:52:07', null, null, 'A01A01A05A01A04', 'A01A01A05A01A04', '福利费（节日实物）-保洁部', 'amount', '', 0, null, '2c9358ad74ae69160174b3cb256900a6', null, '', '', '', '', null, 'business', 2, '￥', 'one', 1, '');
INSERT INTO t_b_budget_measure (id, create_by, create_name, sys_company_code, update_by, sys_org_code, bpm_status, create_date, update_name, update_date, code, custom_code, name, datatype, tooltype, texrate, control_budget, parent_id, is_leaf, label, remark, unit, finance_subject, seq_no, category, fraction_num, currency_symbol, show_type, thousandth, control_flag) VALUES ('4028128175ce979d0175d11d2db30019', '1698', '朱浩军', 'A06', null, 'A06A05', '1', '2020-11-16 20:52:32', null, null, 'A01A01A05A01A05', 'A01A01A05A01A05', '福利费（节日实物）-工程部', 'amount', '', 0, null, '2c9358ad74ae69160174b3cb256900a6', null, '', '', '', '', null, 'business', 2, '￥', 'one', 1, '');
INSERT INTO t_b_budget_measure (id, create_by, create_name, sys_company_code, update_by, sys_org_code, bpm_status, create_date, update_name, update_date, code, custom_code, name, datatype, tooltype, texrate, control_budget, parent_id, is_leaf, label, remark, unit, finance_subject, seq_no, category, fraction_num, currency_symbol, show_type, thousandth, control_flag) VALUES ('4028128175ce979d0175d11d8055001b', '1698', '朱浩军', 'A06', null, 'A06A05', '1', '2020-11-16 20:52:53', null, null, 'A01A01A05A01A06', 'A01A01A05A01A06', '福利费（节日实物）-会务部', 'amount', '', 0, null, '2c9358ad74ae69160174b3cb256900a6', null, '', '', '', '', null, 'business', 2, '￥', 'one', 1, '');
INSERT INTO t_b_budget_measure (id, create_by, create_name, sys_company_code, update_by, sys_org_code, bpm_status, create_date, update_name, update_date, code, custom_code, name, datatype, tooltype, texrate, control_budget, parent_id, is_leaf, label, remark, unit, finance_subject, seq_no, category, fraction_num, currency_symbol, show_type, thousandth, control_flag) VALUES ('4028128175ce979d0175d11e04d5001d', '1698', '朱浩军', 'A06', null, 'A06A05', '1', '2020-11-16 20:53:27', null, null, 'A01A01A05A01A07', 'A01A01A05A01A07', '福利费（节日实物）-宿管部', 'amount', '', 0, null, '2c9358ad74ae69160174b3cb256900a6', null, '', '', '', '', null, 'business', 2, '￥', 'one', 1, '');
INSERT INTO t_b_budget_measure (id, create_by, create_name, sys_company_code, update_by, sys_org_code, bpm_status, create_date, update_name, update_date, code, custom_code, name, datatype, tooltype, texrate, control_budget, parent_id, is_leaf, label, remark, unit, finance_subject, seq_no, category, fraction_num, currency_symbol, show_type, thousandth, control_flag) VALUES ('4028128175ce979d0175d11e5c11001f', '1698', '朱浩军', 'A06', null, 'A06A05', '1', '2020-11-16 20:53:49', null, null, 'A01A01A05A01A08', 'A01A01A05A01A08', '福利费（节日实物）-其他部', 'amount', '', 0, null, '2c9358ad74ae69160174b3cb256900a6', null, '', '', '', '', null, 'business', 2, '￥', 'one', 1, '');
INSERT INTO t_b_budget_measure (id, create_by, create_name, sys_company_code, update_by, sys_org_code, bpm_status, create_date, update_name, update_date, code, custom_code, name, datatype, tooltype, texrate, control_budget, parent_id, is_leaf, label, remark, unit, finance_subject, seq_no, category, fraction_num, currency_symbol, show_type, thousandth, control_flag) VALUES ('4028128175ce979d0175d11f28e30021', '1698', '朱浩军', 'A06', null, 'A06A05', '1', '2020-11-16 20:54:42', null, null, 'A01A01A05A02A01', 'A01A01A05A02A01', '福利费（年夜饭）-办公室', 'amount', '', 0, null, '2c9358ad74ae69160174b3cb590700a8', null, '', '', '', '', null, 'business', 2, '￥', 'one', 1, '');
INSERT INTO t_b_budget_measure (id, create_by, create_name, sys_company_code, update_by, sys_org_code, bpm_status, create_date, update_name, update_date, code, custom_code, name, datatype, tooltype, texrate, control_budget, parent_id, is_leaf, label, remark, unit, finance_subject, seq_no, category, fraction_num, currency_symbol, show_type, thousandth, control_flag) VALUES ('4028128175ce979d0175d11f81ba0023', '1698', '朱浩军', 'A06', null, 'A06A05', '1', '2020-11-16 20:55:04', null, null, 'A01A01A05A02A02', 'A01A01A05A02A02', '福利费（年夜饭）-客服部', 'amount', '', 0, null, '2c9358ad74ae69160174b3cb590700a8', null, '', '', '', '', null, 'business', 2, '￥', 'one', 1, '');
INSERT INTO t_b_budget_measure (id, create_by, create_name, sys_company_code, update_by, sys_org_code, bpm_status, create_date, update_name, update_date, code, custom_code, name, datatype, tooltype, texrate, control_budget, parent_id, is_leaf, label, remark, unit, finance_subject, seq_no, category, fraction_num, currency_symbol, show_type, thousandth, control_flag) VALUES ('4028128175ce979d0175d11fe5200025', '1698', '朱浩军', 'A06', null, 'A06A05', '1', '2020-11-16 20:55:30', null, null, 'A01A01A05A02A03', 'A01A01A05A02A03', '福利费（年夜饭）-保安部', 'amount', '', 0, null, '2c9358ad74ae69160174b3cb590700a8', null, '', '', '', '', null, 'business', 2, '￥', 'one', 1, '');
INSERT INTO t_b_budget_measure (id, create_by, create_name, sys_company_code, update_by, sys_org_code, bpm_status, create_date, update_name, update_date, code, custom_code, name, datatype, tooltype, texrate, control_budget, parent_id, is_leaf, label, remark, unit, finance_subject, seq_no, category, fraction_num, currency_symbol, show_type, thousandth, control_flag) VALUES ('4028128175ce979d0175d12038260027', '1698', '朱浩军', 'A06', null, 'A06A05', '1', '2020-11-16 20:55:51', null, null, 'A01A01A05A02A04', 'A01A01A05A02A04', '福利费（年夜饭）-保洁部', 'amount', '', 0, null, '2c9358ad74ae69160174b3cb590700a8', null, '', '', '', '', null, 'business', 2, '￥', 'one', 1, '');
INSERT INTO t_b_budget_measure (id, create_by, create_name, sys_company_code, update_by, sys_org_code, bpm_status, create_date, update_name, update_date, code, custom_code, name, datatype, tooltype, texrate, control_budget, parent_id, is_leaf, label, remark, unit, finance_subject, seq_no, category, fraction_num, currency_symbol, show_type, thousandth, control_flag) VALUES ('4028128175ce979d0175d1208fac0029', '1698', '朱浩军', 'A06', null, 'A06A05', '1', '2020-11-16 20:56:13', null, null, 'A01A01A05A02A05', 'A01A01A05A02A05', '福利费（年夜饭）-工程部', 'amount', '', 0, null, '2c9358ad74ae69160174b3cb590700a8', null, '', '', '', '', null, 'business', 2, '￥', 'one', 1, '');
INSERT INTO t_b_budget_measure (id, create_by, create_name, sys_company_code, update_by, sys_org_code, bpm_status, create_date, update_name, update_date, code, custom_code, name, datatype, tooltype, texrate, control_budget, parent_id, is_leaf, label, remark, unit, finance_subject, seq_no, category, fraction_num, currency_symbol, show_type, thousandth, control_flag) VALUES ('4028128175ce979d0175d120e2b4002b', '1698', '朱浩军', 'A06', null, 'A06A05', '1', '2020-11-16 20:56:35', null, null, 'A01A01A05A02A06', 'A01A01A05A02A06', '福利费（年夜饭）-会务部', 'amount', '', 0, null, '2c9358ad74ae69160174b3cb590700a8', null, '', '', '', '', null, 'business', 2, '￥', 'one', 1, '');
INSERT INTO t_b_budget_measure (id, create_by, create_name, sys_company_code, update_by, sys_org_code, bpm_status, create_date, update_name, update_date, code, custom_code, name, datatype, tooltype, texrate, control_budget, parent_id, is_leaf, label, remark, unit, finance_subject, seq_no, category, fraction_num, currency_symbol, show_type, thousandth, control_flag) VALUES ('4028128175ce979d0175d12135db002d', '1698', '朱浩军', 'A06', null, 'A06A05', '1', '2020-11-16 20:56:56', null, null, 'A01A01A05A02A07', 'A01A01A05A02A07', '福利费（年夜饭）-宿管部', 'amount', '', 0, null, '2c9358ad74ae69160174b3cb590700a8', null, '', '', '', '', null, 'business', 2, '￥', 'one', 1, '');
INSERT INTO t_b_budget_measure (id, create_by, create_name, sys_company_code, update_by, sys_org_code, bpm_status, create_date, update_name, update_date, code, custom_code, name, datatype, tooltype, texrate, control_budget, parent_id, is_leaf, label, remark, unit, finance_subject, seq_no, category, fraction_num, currency_symbol, show_type, thousandth, control_flag) VALUES ('4028128175ce979d0175d1218954002f', '1698', '朱浩军', 'A06', null, 'A06A05', '1', '2020-11-16 20:57:17', null, null, 'A01A01A05A02A08', 'A01A01A05A02A08', '福利费（年夜饭）-其他部', 'amount', '', 0, null, '2c9358ad74ae69160174b3cb590700a8', null, '', '', '', '', null, 'business', 2, '￥', 'one', 1, '');
INSERT INTO t_b_budget_measure (id, create_by, create_name, sys_company_code, update_by, sys_org_code, bpm_status, create_date, update_name, update_date, code, custom_code, name, datatype, tooltype, texrate, control_budget, parent_id, is_leaf, label, remark, unit, finance_subject, seq_no, category, fraction_num, currency_symbol, show_type, thousandth, control_flag) VALUES ('4028128175ce979d0175d12220960031', '1698', '朱浩军', 'A06', null, 'A06A05', '1', '2020-11-16 20:57:56', null, null, 'A01A01A05A03A01', 'A01A01A05A03A01', '福利费（健康体检）-办公室', 'amount', '', 0, null, '2c9358ad74ae69160174b3cb8e0e00aa', null, '', '', '', '', null, 'business', 2, '￥', 'one', 1, '');
INSERT INTO t_b_budget_measure (id, create_by, create_name, sys_company_code, update_by, sys_org_code, bpm_status, create_date, update_name, update_date, code, custom_code, name, datatype, tooltype, texrate, control_budget, parent_id, is_leaf, label, remark, unit, finance_subject, seq_no, category, fraction_num, currency_symbol, show_type, thousandth, control_flag) VALUES ('4028128175ce979d0175d12279ea0033', '1698', '朱浩军', 'A06', null, 'A06A05', '1', '2020-11-16 20:58:19', null, null, 'A01A01A05A03A02', 'A01A01A05A03A02', '福利费（健康体检）-客服部', 'amount', '', 0, null, '2c9358ad74ae69160174b3cb8e0e00aa', null, '', '', '', '', null, 'business', 2, '￥', 'one', 1, '');
INSERT INTO t_b_budget_measure (id, create_by, create_name, sys_company_code, update_by, sys_org_code, bpm_status, create_date, update_name, update_date, code, custom_code, name, datatype, tooltype, texrate, control_budget, parent_id, is_leaf, label, remark, unit, finance_subject, seq_no, category, fraction_num, currency_symbol, show_type, thousandth, control_flag) VALUES ('4028128175ce979d0175d122cdb90035', '1698', '朱浩军', 'A06', null, 'A06A05', '1', '2020-11-16 20:58:40', null, null, 'A01A01A05A03A03', 'A01A01A05A03A03', '福利费（健康体检）-保安部', 'amount', '', 0, null, '2c9358ad74ae69160174b3cb8e0e00aa', null, '', '', '', '', null, 'business', 2, '￥', 'one', 1, '');
INSERT INTO t_b_budget_measure (id, create_by, create_name, sys_company_code, update_by, sys_org_code, bpm_status, create_date, update_name, update_date, code, custom_code, name, datatype, tooltype, texrate, control_budget, parent_id, is_leaf, label, remark, unit, finance_subject, seq_no, category, fraction_num, currency_symbol, show_type, thousandth, control_flag) VALUES ('4028128175ce979d0175d12322cf0037', '1698', '朱浩军', 'A06', null, 'A06A05', '1', '2020-11-16 20:59:02', null, null, 'A01A01A05A03A04', 'A01A01A05A03A04', '福利费（健康体检）-保洁部', 'amount', '', 0, null, '2c9358ad74ae69160174b3cb8e0e00aa', null, '', '', '', '', null, 'business', 2, '￥', 'one', 1, '');
INSERT INTO t_b_budget_measure (id, create_by, create_name, sys_company_code, update_by, sys_org_code, bpm_status, create_date, update_name, update_date, code, custom_code, name, datatype, tooltype, texrate, control_budget, parent_id, is_leaf, label, remark, unit, finance_subject, seq_no, category, fraction_num, currency_symbol, show_type, thousandth, control_flag) VALUES ('4028128175ce979d0175d1237d0f0039', '1698', '朱浩军', 'A06', null, 'A06A05', '1', '2020-11-16 20:59:25', null, null, 'A01A01A05A03A05', 'A01A01A05A03A05', '福利费（健康体检）-工程部', 'amount', '', 0, null, '2c9358ad74ae69160174b3cb8e0e00aa', null, '', '', '', '', null, 'business', 2, '￥', 'one', 1, '');
INSERT INTO t_b_budget_measure (id, create_by, create_name, sys_company_code, update_by, sys_org_code, bpm_status, create_date, update_name, update_date, code, custom_code, name, datatype, tooltype, texrate, control_budget, parent_id, is_leaf, label, remark, unit, finance_subject, seq_no, category, fraction_num, currency_symbol, show_type, thousandth, control_flag) VALUES ('4028128175ce979d0175d123d984003b', '1698', '朱浩军', 'A06', null, 'A06A05', '1', '2020-11-16 20:59:49', null, null, 'A01A01A05A03A06', 'A01A01A05A03A06', '福利费（健康体检）-会务部', 'amount', '', 0, null, '2c9358ad74ae69160174b3cb8e0e00aa', null, '', '', '', '', null, 'business', 2, '￥', 'one', 1, '');
INSERT INTO t_b_budget_measure (id, create_by, create_name, sys_company_code, update_by, sys_org_code, bpm_status, create_date, update_name, update_date, code, custom_code, name, datatype, tooltype, texrate, control_budget, parent_id, is_leaf, label, remark, unit, finance_subject, seq_no, category, fraction_num, currency_symbol, show_type, thousandth, control_flag) VALUES ('4028128175ce979d0175d1243535003d', '1698', '朱浩军', 'A06', null, 'A06A05', '1', '2020-11-16 21:00:12', null, null, 'A01A01A05A03A07', 'A01A01A05A03A07', '福利费（健康体检）-宿管部', 'amount', '', 0, null, '2c9358ad74ae69160174b3cb8e0e00aa', null, '', '', '', '', null, 'business', 2, '￥', 'one', 1, '');
INSERT INTO t_b_budget_measure (id, create_by, create_name, sys_company_code, update_by, sys_org_code, bpm_status, create_date, update_name, update_date, code, custom_code, name, datatype, tooltype, texrate, control_budget, parent_id, is_leaf, label, remark, unit, finance_subject, seq_no, category, fraction_num, currency_symbol, show_type, thousandth, control_flag) VALUES ('4028128175ce979d0175d1248df9003f', '1698', '朱浩军', 'A06', null, 'A06A05', '1', '2020-11-16 21:00:35', null, null, 'A01A01A05A03A08', 'A01A01A05A03A08', '福利费（健康体检）-其他部', 'amount', '', 0, null, '2c9358ad74ae69160174b3cb8e0e00aa', null, '', '', '', '', null, 'business', 2, '￥', 'one', 1, '');

ALTER TABLE `t_b_budget_cost_hr_scheme_detail` ADD COLUMN `jiaojin_per` DOUBLE NULL COMMENT '缴金人数比例';
ALTER TABLE `t_b_budget_cost_hr_scheme_detail` ADD COLUMN `cert` DOUBLE NULL COMMENT '证书补贴';
ALTER TABLE `t_b_budget_cost_post_material_scheme_detail` CHANGE COLUMN `num` `num` DOUBLE NULL DEFAULT NULL COMMENT '数量' ;

#预算维度公式后台计算定时器
INSERT INTO `t_s_timetask` (`ID`, `CREATE_BY`, `CREATE_DATE`, `CREATE_NAME`, `CRON_EXPRESSION`, `IS_EFFECT`, `IS_START`, `TASK_DESCRIBE`, `TASK_ID`, `UPDATE_BY`, `UPDATE_DATE`, `UPDATE_NAME`, `CLASS_NAME`, `RUN_SERVER_IP`, `RUN_SERVER`) VALUES ('40281281760eaf1f01760eb1e1f60002','admin','2020-11-28 19:51:47','管理员','0 0 3 * * ?','0','0','预算后台计算维度公式','BudgetTimeTask',NULL,NULL,NULL,'cn.com.lzt.budget.data.service.BudgetTimeTask','本地','本地');

#物料系统优化
update t_b_porders set bpm_status='3';

ALTER TABLE `t_b_porder_details`
ADD COLUMN `pay_type` VARCHAR(45) NULL COMMENT '报销类型',
ADD COLUMN `pay_id` VARCHAR(45) NULL COMMENT '报销id',
ADD COLUMN `pay_time` TIMESTAMP NULL COMMENT '报销时间' ,
ADD COLUMN `pay_process_end_time` TIMESTAMP NULL,
ADD COLUMN `pay_status` INT(11) NULL COMMENT '是否报销\n0 没报销 1已报销';

update t_b_porder_details set pay_status=0;

update t_s_function set functionname = '资产类申购' where id = '402881e570e746c10170e750348b0004';
update t_s_function set functionurl= 'ordersFixAssetController.do?listByWarehouse&orderFor=0' where id = '402881e570e746c10170e750348b0004';
INSERT INTO `t_s_function`(`ID`, `functioniframe`, `functionlevel`, `functionname`, `functionorder`, `functionurl`, `parentfunctionid`, `iconid`, `desk_iconid`, `functiontype`, `function_icon_style`, `create_by`, `create_name`, `update_by`, `update_date`, `create_date`, `update_name`, `remark`)
VALUES ('402881e570e746c10170ebbbb48b0004', NULL, 1, '自行采购签报', '80', 'ordersFixAssetController.do?listByWarehouse&orderFor=1', 'ff8080816f46dcf7016f476fe1fd0004', '8a8ab0b246dc81120146dc8180460000', '8a8ab0b246dc81120146dc8180dd001e', 1, 'fas fa-gears', 'admin', '管理员', 'admin', '2020-04-07 10:34:39', '2020-03-17 15:05:58', '管理员', '');

CREATE TABLE `t_b_activiti_cost_pay_tmp_company_detail` (
  `id` varchar(36) NOT NULL,
  `create_name` varchar(50) DEFAULT NULL COMMENT '创建人名称',
  `create_by` varchar(50) DEFAULT NULL COMMENT '创建人登录名称',
  `create_date` datetime DEFAULT NULL COMMENT '创建日期',
  `update_name` varchar(50) DEFAULT NULL COMMENT '更新人名称',
  `update_by` varchar(50) DEFAULT NULL COMMENT '更新人登录名称',
  `update_date` datetime DEFAULT NULL COMMENT '更新日期',
  `sys_org_code` varchar(50) DEFAULT NULL COMMENT '所属部门',
  `sys_company_code` varchar(50) DEFAULT NULL COMMENT '所属公司',
  `bpm_status` varchar(32) DEFAULT '1' COMMENT '流程状态',
  `fk_id` varchar(32) DEFAULT NULL COMMENT '主表id',
  `source_type` varchar(255) DEFAULT NULL COMMENT '来源类型',
  `source_id` varchar(32) DEFAULT NULL COMMENT '来源id',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

INSERT INTO `t_s_type` (`ID`, `typecode`, `typename`, `typepid`, `typegroupid`, `create_date`, `create_name`) VALUES ('40281281763be9aa01763bebc7f00001','porders','直接采购',NULL,'402889fe47eddd340147ede15c070001','2020-12-07 14:37:57','管理员'),('40281281763be9aa01763bec290a0003','porders','直接采购',NULL,'4028819b65a8b81c0165a9182bee0015','2020-12-07 14:38:21','管理员');
INSERT INTO `t_s_function` (`ID`, `functioniframe`, `functionlevel`, `functionname`, `functionorder`, `functionurl`, `parentfunctionid`, `iconid`, `desk_iconid`, `functiontype`, `function_icon_style`, `create_by`, `create_name`, `update_by`, `update_date`, `create_date`, `update_name`, `remark`) VALUES ('40281281763d011a01763d1ef25a0002',NULL,1,'自行采购签报','71','ordersFixAssetController.do?listByWarehouse&orderFor=1','ff80808166106df50166137f135205c0','8a8ab0b246dc81120146dc8180460000','8a8ab0b246dc81120146dc8180dd001e',0,'','admin','管理员',NULL,NULL,'2020-12-07 20:13:27',NULL,''),('40281281763d011a01763d21019e0004',NULL,1,'临时申购','72','ordersController.do?listByWarehouse&orderType=2','ff80808166106df50166137f135205c0','8a8ab0b246dc81120146dc8180460000','8a8ab0b246dc81120146dc8180dd001e',0,'','admin','管理员',NULL,NULL,'2020-12-07 20:15:42',NULL,''),('40281281763d011a01763d214fb30006',NULL,1,'代业主申购','73','ordersController.do?listByWarehouse&orderType=3','ff80808166106df50166137f135205c0','8a8ab0b246dc81120146dc8180460000','8a8ab0b246dc81120146dc8180dd001e',0,'','admin','管理员',NULL,NULL,'2020-12-07 20:16:02',NULL,'');
INSERT INTO `t_p_process` (`id`, `typeid`, `userid`, `processname`, `processxmlpath`, `processxml`, `processxmname`, `note`, `update_name`, `update_date`, `update_by`, `create_name`, `create_date`, `create_by`, `processkey`, `processstate`, `processtype`, `ccmode`) VALUES ('40281281763be9aa01763bf3233b000b','porders',NULL,'直接采购',NULL,'<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<definitions  xmlns=\"http://www.omg.org/spec/BPMN/20100524/MODEL\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:activiti=\"http://activiti.org/bpmn\" xmlns:bpmndi=\"http://www.omg.org/spec/BPMN/20100524/DI\" xmlns:omgdc=\"http://www.omg.org/spec/DD/20100524/DC\" xmlns:omgdi=\"http://www.omg.org/spec/DD/20100524/DI\" typeLanguage=\"http://www.w3.org/2001/XMLSchema\" expressionLanguage=\"http://www.w3.org/1999/XPath\" targetNamespace=\"http://www.lzt.com.cn\">\r\n    <process  id=\"process1607323509587\" name=\"直接采购\">\r\n        <documentation>流程描述</documentation>\r\n        <extensionElements>\r\n            <activiti:executionListener id=\"402880e54803a496014805e5d9190012\" event=\"end\" class=\"org.jeecgframework.workflow.listener.execution.ProcessEndListener\" >\r\n            </activiti:executionListener>\r\n        </extensionElements>\r\n        <startEvent  id=\"start1\" name=\"开始节点\" activiti:initiator=\"applyUserId\">\r\n        </startEvent>\r\n        <endEvent  id=\"end\" name=\"结束节点\">\r\n        </endEvent>\r\n        <userTask  id=\"task1607323520927\" name=\"采购部经理\" activiti:candidateUsers=\"${flowUtil.getUserInproject(BPM_FORM_KEY,BPM_DATA_ID,\'A_XZBJL\')}\" >\r\n        </userTask>\r\n        <userTask  id=\"task1607323571397\" name=\"制单人重填\" activiti:assignee=\"${applyUserId}\" >\r\n        </userTask>\r\n        <userTask  id=\"task1607420422557\" name=\"常务副总\" activiti:candidateUsers=\"${flowUtil.getUserInproject(BPM_FORM_KEY,BPM_DATA_ID,\'M_JBQBFZ\')}\" >\r\n        </userTask>\r\n        <sequenceFlow  id=\"flow1607323550420\" name=\"\" sourceRef=\"start1\" targetRef=\"task1607323520927\">\r\n        </sequenceFlow>\r\n        <sequenceFlow  id=\"flow1607323551886\" name=\"通过\" sourceRef=\"task1607323520927\" targetRef=\"task1607420422557\">\r\n        </sequenceFlow>\r\n        <sequenceFlow  id=\"flow1607323584098\" name=\"驳回\" sourceRef=\"task1607323520927\" targetRef=\"task1607323571397\">\r\n        </sequenceFlow>\r\n        <sequenceFlow  id=\"flow1607323603823\" name=\"提交\" sourceRef=\"task1607323571397\" targetRef=\"task1607323520927\">\r\n        </sequenceFlow>\r\n        <sequenceFlow  id=\"flow1607420478281\" name=\"通过\" sourceRef=\"task1607420422557\" targetRef=\"end\">\r\n        </sequenceFlow>\r\n        <sequenceFlow  id=\"flow1607420499766\" name=\"驳回\" sourceRef=\"task1607420422557\" targetRef=\"task1607323571397\">\r\n        </sequenceFlow>\r\n    </process>\r\n    <bpmndi:BPMNDiagram id=\"BPMNDiagram_process1607323509587\">\r\n        <bpmndi:BPMNPlane bpmnElement=\"process1607323509587\" id=\"BPMNPlane_process1607323509587\">\r\n            <bpmndi:BPMNShape bpmnElement=\"start1\" id=\"BPMNShape_start1\">\r\n                <omgdc:Bounds height=\"30\" width=\"30\" x=\"200\" y=\"50\"/>\r\n            </bpmndi:BPMNShape>\r\n            <bpmndi:BPMNShape bpmnElement=\"end\" id=\"BPMNShape_end\">\r\n                <omgdc:Bounds height=\"30\" width=\"30\" x=\"201\" y=\"530\"/>\r\n            </bpmndi:BPMNShape>\r\n            <bpmndi:BPMNShape bpmnElement=\"task1607323520927\" id=\"BPMNShape_task1607323520927\">\r\n                <omgdc:Bounds height=\"50\" width=\"90\" x=\"170\" y=\"195\"/>\r\n            </bpmndi:BPMNShape>\r\n            <bpmndi:BPMNShape bpmnElement=\"task1607323571397\" id=\"BPMNShape_task1607323571397\">\r\n                <omgdc:Bounds height=\"50\" width=\"90\" x=\"346\" y=\"195\"/>\r\n            </bpmndi:BPMNShape>\r\n            <bpmndi:BPMNShape bpmnElement=\"task1607420422557\" id=\"BPMNShape_task1607420422557\">\r\n                <omgdc:Bounds height=\"50\" width=\"90\" x=\"170\" y=\"346\"/>\r\n            </bpmndi:BPMNShape>\r\n            <bpmndi:BPMNEdge bpmnElement=\"flow1607323550420\" id=\"BPMNEdge_flow1607323550420\">\r\n                <omgdi:waypoint x=\"215\" y=\"80\" />\r\n                <omgdi:waypoint x=\"215\" y=\"190\" />\r\n            </bpmndi:BPMNEdge>\r\n            <bpmndi:BPMNEdge bpmnElement=\"flow1607323551886\" id=\"BPMNEdge_flow1607323551886\">\r\n                <omgdi:waypoint x=\"215\" y=\"250\" />\r\n                <omgdi:waypoint x=\"215\" y=\"341\" />\r\n            </bpmndi:BPMNEdge>\r\n            <bpmndi:BPMNEdge bpmnElement=\"flow1607323584098\" id=\"BPMNEdge_flow1607323584098\">\r\n                <omgdi:waypoint x=\"265\" y=\"220\" />\r\n                <omgdi:waypoint x=\"341\" y=\"220\" />\r\n            </bpmndi:BPMNEdge>\r\n            <bpmndi:BPMNEdge bpmnElement=\"flow1607323603823\" id=\"BPMNEdge_flow1607323603823\">\r\n                <omgdi:waypoint x=\"391\" y=\"190\" />\r\n                <omgdi:waypoint x=\"391\" y=\"170\" />\r\n                <omgdi:waypoint x=\"215\" y=\"170\" />\r\n                <omgdi:waypoint x=\"215\" y=\"190\" />\r\n            </bpmndi:BPMNEdge>\r\n            <bpmndi:BPMNEdge bpmnElement=\"flow1607420478281\" id=\"BPMNEdge_flow1607420478281\">\r\n                <omgdi:waypoint x=\"215\" y=\"401\" />\r\n                <omgdi:waypoint x=\"215\" y=\"465\" />\r\n                <omgdi:waypoint x=\"216\" y=\"465\" />\r\n                <omgdi:waypoint x=\"216\" y=\"530\" />\r\n            </bpmndi:BPMNEdge>\r\n            <bpmndi:BPMNEdge bpmnElement=\"flow1607420499766\" id=\"BPMNEdge_flow1607420499766\">\r\n                <omgdi:waypoint x=\"265\" y=\"371\" />\r\n                <omgdi:waypoint x=\"391\" y=\"371\" />\r\n                <omgdi:waypoint x=\"391\" y=\"250\" />\r\n            </bpmndi:BPMNEdge>\r\n        </bpmndi:BPMNPlane>\r\n    </bpmndi:BPMNDiagram>\r\n</definitions>',NULL,NULL,'朱浩军','2020-12-08 17:41:47','1698','管理员','2020-12-07 14:45:59','admin','process1607323509587',1,'0',NULL);
INSERT INTO `t_p_processnode` (`id`, `formid`, `processid`, `processnodecode`, `processnodename`, `modelandview`, `modelandview_mobile`, `node_timeout`, `pnodecofigid`, `pushmode`, `delete_flag`) VALUES ('40281281763be9aa01763bf32355000c',NULL,'40281281763be9aa01763bf3233b000b','task1607323520927','采购部经理','pOrdersController.do?goView&flag=2','pOrdersController.do?goViewMobile&flag=2',NULL,'40281281763be9aa01763bf1a3700007','no','0'),('40281281763be9aa01763bf3e989000d',NULL,'40281281763be9aa01763bf3233b000b','task1607323571397','制单人重填','pOrdersController.do?goView&flag=1','pOrdersController.do?goViewMobile&flag=1',NULL,'40281281763be9aa01763bf227cb0009','no','0'),('402812817641aa7e017641ba760d000c',NULL,'40281281763be9aa01763bf3233b000b','task1607420422557','常务副总',NULL,NULL,NULL,NULL,NULL,'0');

INSERT INTO `t_p_processnode_config` (`id`, `process_type`, `url_title`, `pc_url`, `mobile_url`) VALUES ('40281281763be9aa01763bf1a3700007','porders','审核','pOrdersController.do?goView&flag=2','pOrdersController.do?goViewMobile&flag=2'),('40281281763be9aa01763bf227cb0009','porders','制单人重填','pOrdersController.do?goView&flag=1','pOrdersController.do?goViewMobile&flag=1');
INSERT INTO `t_s_busconfig` (`id`, `busname`, `form_type`, `tableid`, `online_id`, `processid`, `bus_title_exp`, `process_deal_style`, `show_title`, `show_table`, `config_id`) VALUES ('40281281763be9aa01763bf45578000e',NULL,'online','','t_b_porders','40281281763be9aa01763bf3233b000b','直接采购','formdeal','直接采购','直接采购','40281281763be9aa01763bf0443e0005');
INSERT INTO `t_process_busconfig` (`id`, `show_title`, `real_title`, `show_tablename`, `real_tablename`, `process_type`, `activiti_config_class`) VALUES ('40281281763be9aa01763bf0443e0005','直接采购','直接采购','直接采购','t_b_porders','porders','cn.com.lzt.purchase.util.POrdersActivitiTools');

update t_b_porders set source_type ='orders-monthly' where source_type='orders';
ALTER TABLE `t_b_activiti_cost_pay_tmp_company` ADD COLUMN `show_dep` VARCHAR(4000) NULL COMMENT '展示关联部门';
ALTER TABLE `t_b_activiti_cost_pay_inner_user_detail` DROP INDEX `requestid` ;
ALTER TABLE `t_b_activiti_cost_pay_inner_user_detail` CHANGE COLUMN `request_id` `request_id` VARCHAR(4000) NULL DEFAULT NULL COMMENT '费用申请id' ;
ALTER TABLE `t_b_activiti_cost_pay_tmp_company_detail` ADD COLUMN `pay_status` INT NULL;
ALTER TABLE `t_b_activiti_cost_pay_inner_user_detail` ADD COLUMN `pay_status` INT NULL;
update t_b_activiti_cost_pay_inner_user_detail d set d.pay_status= (select u.paystatus from t_b_activiti_cost_pay_inner_user u where u.id=d.cost_pay_inner_user_id);
update t_b_activiti_cost_pay_tmp_company_detail d set d.pay_status= (select u.paystatus from t_b_activiti_cost_pay_tmp_company u where u.id=d.fk_id);
update t_b_porder_details set pay_status=1 where source_b_id in(
  select d.id from t_b_order_fix_asset_products d
  where
    d.fk_id  in(SELECT request_id FROM t_b_activiti_cost_pay_inner_user_detail where source_type='fix_asset')
    or find_in_set(d.id,(SELECT ifnull(group_concat(request_id),'') FROM t_b_activiti_cost_pay_tmp_company tmp where tmp.source_type='fix_asset')) >0);

ALTER TABLE `t_b_related_units_extrainfo` ADD INDEX `related_units_id` (`related_units_id` ASC);
ALTER TABLE `t_s_depart` ADD INDEX `projectid` (`projectid` ASC);

#采购费用申请，人事费用申请，其他费用申请

CREATE TABLE `t_b_activiti_cost_request_hr` (
  `id` varchar(36) NOT NULL COMMENT 'id',
  `create_name` varchar(50) DEFAULT NULL COMMENT '创建人名称',
  `create_by` varchar(50) DEFAULT NULL COMMENT '创建人登录名称',
  `create_date` datetime DEFAULT NULL COMMENT '创建日期',
  `update_name` varchar(50) DEFAULT NULL COMMENT '更新人名称',
  `update_by` varchar(50) DEFAULT NULL COMMENT '更新人登录名称',
  `update_date` datetime DEFAULT NULL COMMENT '更新日期',
  `sys_org_code` varchar(50) DEFAULT NULL COMMENT '所属部门',
  `sys_company_code` varchar(50) DEFAULT NULL COMMENT '所属公司',
  `bpm_status` varchar(32) DEFAULT NULL COMMENT '流程状态',
  `proc_inst_id` varchar(32) DEFAULT NULL COMMENT '审批流id',
  `step_name` varchar(32) DEFAULT NULL COMMENT '审批流步骤',
  `userid` varchar(32) DEFAULT NULL COMMENT '用户id',
  `real_name` varchar(255) DEFAULT NULL COMMENT '员工名',
  `depart_id` varchar(32) DEFAULT NULL COMMENT '组织结构id',
  `dep_name` varchar(255) DEFAULT NULL COMMENT '组织机构名称',
  `code` varchar(255) DEFAULT NULL COMMENT '编码',
  `cost_type` varchar(32) DEFAULT NULL COMMENT '费用类型',
  `cost_type_name` varchar(255) DEFAULT NULL COMMENT '费用类型名称',
  `expect_money` decimal(10,2) DEFAULT NULL COMMENT '预计费用',
  `summary` varchar(255) DEFAULT NULL COMMENT '用途摘要',
  `remark` text COMMENT '备注',
  `pay_status` int(10) DEFAULT NULL COMMENT '支付状态',
  `pay_type` varchar(45) DEFAULT NULL COMMENT '报销类型',
  `pay_id` varchar(45) DEFAULT NULL COMMENT '报销id',
  `pay_time` datetime DEFAULT NULL COMMENT '报销时间',
  `pay_operator` varchar(45) DEFAULT NULL COMMENT '支付操作人',
  `pay_process_end_time` datetime DEFAULT NULL COMMENT '报销审核通过时间',
  `actual_money` decimal(10,2) DEFAULT NULL COMMENT '实际产生金额',
  `special` varchar(255) DEFAULT NULL COMMENT '特殊说明',
  `operate_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '操作时间',
  `budget_month` varchar(45) DEFAULT NULL COMMENT '计入预算月份',
  PRIMARY KEY (`id`),
  KEY `create_name` (`create_name`),
  KEY `create_date` (`create_date`),
  KEY `user` (`userid`,`depart_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='人事费用签报';

CREATE TABLE `t_b_activiti_cost_request_pu` (
  `id` varchar(36) NOT NULL COMMENT 'id',
  `create_name` varchar(50) DEFAULT NULL COMMENT '创建人名称',
  `create_by` varchar(50) DEFAULT NULL COMMENT '创建人登录名称',
  `create_date` datetime DEFAULT NULL COMMENT '创建日期',
  `update_name` varchar(50) DEFAULT NULL COMMENT '更新人名称',
  `update_by` varchar(50) DEFAULT NULL COMMENT '更新人登录名称',
  `update_date` datetime DEFAULT NULL COMMENT '更新日期',
  `sys_org_code` varchar(50) DEFAULT NULL COMMENT '所属部门',
  `sys_company_code` varchar(50) DEFAULT NULL COMMENT '所属公司',
  `bpm_status` varchar(32) DEFAULT NULL COMMENT '流程状态',
  `proc_inst_id` varchar(32) DEFAULT NULL COMMENT '审批流id',
  `step_name` varchar(32) DEFAULT NULL COMMENT '审批流步骤',
  `userid` varchar(32) DEFAULT NULL COMMENT '用户id',
  `real_name` varchar(255) DEFAULT NULL COMMENT '员工名',
  `depart_id` varchar(32) DEFAULT NULL COMMENT '组织结构id',
  `dep_name` varchar(255) DEFAULT NULL COMMENT '组织机构名称',
  `code` varchar(255) DEFAULT NULL COMMENT '编码',
  `cost_type` varchar(32) DEFAULT NULL COMMENT '费用类型',
  `cost_type_name` varchar(255) DEFAULT NULL COMMENT '费用类型名称',
  `expect_money` decimal(10,2) DEFAULT NULL COMMENT '预计费用',
  `summary` varchar(255) DEFAULT NULL COMMENT '用途摘要',
  `remark` text COMMENT '备注',
  `pay_status` int(10) DEFAULT NULL COMMENT '支付状态',
  `pay_type` varchar(45) DEFAULT NULL COMMENT ' 报销类型',
  `pay_id` varchar(45) DEFAULT NULL COMMENT '报销id',
  `pay_time` datetime DEFAULT NULL COMMENT '报销时间',
  `pay_operator` varchar(45) DEFAULT NULL COMMENT '支付操作人',
  `pay_process_end_time` datetime DEFAULT NULL COMMENT '报销审核通过时间',
  `actual_money` decimal(10,2) DEFAULT NULL COMMENT '实际产生金额',
  `special` varchar(255) DEFAULT NULL COMMENT '特殊说明',
  `operate_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '操作时间',
  `budget_month` varchar(45) DEFAULT NULL COMMENT '计入预算月份',
  PRIMARY KEY (`id`),
  KEY `create_name` (`create_name`),
  KEY `create_date` (`create_date`),
  KEY `user` (`userid`,`depart_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='采购费用签报';

CREATE TABLE `t_b_activiti_cost_request_other` (
  `id` varchar(36) NOT NULL COMMENT 'id',
  `create_name` varchar(50) DEFAULT NULL COMMENT '创建人名称',
  `create_by` varchar(50) DEFAULT NULL COMMENT '创建人登录名称',
  `create_date` datetime DEFAULT NULL COMMENT '创建日期',
  `update_name` varchar(50) DEFAULT NULL COMMENT '更新人名称',
  `update_by` varchar(50) DEFAULT NULL COMMENT '更新人登录名称',
  `update_date` datetime DEFAULT NULL COMMENT '更新日期',
  `sys_org_code` varchar(50) DEFAULT NULL COMMENT '所属部门',
  `sys_company_code` varchar(50) DEFAULT NULL COMMENT '所属公司',
  `bpm_status` varchar(32) DEFAULT NULL COMMENT '流程状态',
  `proc_inst_id` varchar(32) DEFAULT NULL COMMENT '审批流id',
  `step_name` varchar(32) DEFAULT NULL COMMENT '审批流步骤',
  `userid` varchar(32) DEFAULT NULL COMMENT '用户id',
  `real_name` varchar(255) DEFAULT NULL COMMENT '员工名',
  `depart_id` varchar(32) DEFAULT NULL COMMENT '组织结构id',
  `dep_name` varchar(255) DEFAULT NULL COMMENT '组织机构名称',
  `code` varchar(255) DEFAULT NULL COMMENT '编码',
  `cost_type` varchar(32) DEFAULT NULL COMMENT '费用类型',
  `cost_type_name` varchar(255) DEFAULT NULL COMMENT '费用类型名称',
  `expect_money` decimal(10,2) DEFAULT NULL COMMENT '预计费用',
  `summary` varchar(255) DEFAULT NULL COMMENT '用途摘要',
  `remark` text COMMENT '备注',
  `pay_status` int(10) DEFAULT NULL COMMENT '支付状态',
  `pay_type` varchar(45) DEFAULT NULL COMMENT ' 报销类型',
  `pay_id` varchar(45) DEFAULT NULL COMMENT '报销id',
  `pay_time` datetime DEFAULT NULL COMMENT '报销时间',
  `pay_operator` varchar(45) DEFAULT NULL COMMENT '支付操作人',
  `pay_process_end_time` datetime DEFAULT NULL COMMENT '报销审核通过时间',
  `actual_money` decimal(10,2) DEFAULT NULL COMMENT '实际产生金额',
  `special` varchar(255) DEFAULT NULL COMMENT '特殊说明',
  `operate_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '操作时间',
  `budget_month` varchar(45) DEFAULT NULL COMMENT '计入预算月份',
  PRIMARY KEY (`id`),
  KEY `create_name` (`create_name`),
  KEY `create_date` (`create_date`),
  KEY `user` (`userid`,`depart_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='其他费用签报';

INSERT INTO `t_s_type` (`ID`, `typecode`, `typename`, `typepid`, `typegroupid`, `create_date`, `create_name`) VALUES ('40281281766e43ff01766e6133a30002','cost_request_hr','人事费用申请',NULL,'402889fe47eddd340147ede15c070001','2020-12-17 09:47:13','管理员'),('40281281766e43ff01766e62092f0004','cost_request_pu','采购费用申请',NULL,'402889fe47eddd340147ede15c070001','2020-12-17 09:48:07','管理员'),('40281281766e43ff01766e622a140006','cost_request_other','其他费用申请',NULL,'402889fe47eddd340147ede15c070001','2020-12-17 09:48:16','管理员'),('40281281766e43ff01766e69ea720008','cost_request_hr','人事费用申请',NULL,'4028819b65a8b81c0165a9182bee0015','2020-12-17 09:56:44','管理员'),('40281281766e43ff01766e6a0a53000a','cost_request_pu','采购费用申请',NULL,'4028819b65a8b81c0165a9182bee0015','2020-12-17 09:56:52','管理员'),('40281281766e43ff01766e6a2832000c','cost_request_other','其他费用申请',NULL,'4028819b65a8b81c0165a9182bee0015','2020-12-17 09:57:00','管理员');
INSERT INTO `t_s_function` (`ID`, `functioniframe`, `functionlevel`, `functionname`, `functionorder`, `functionurl`, `parentfunctionid`, `iconid`, `desk_iconid`, `functiontype`, `function_icon_style`, `create_by`, `create_name`, `update_by`, `update_date`, `create_date`, `update_name`, `remark`) VALUES ('40281281766e873301766f34115c0002',NULL,1,'人事费用申请签报','35','activitiCostRequestHrController.do?list','ff8080816e687d71016e68822fbe0002','8a8ab0b246dc81120146dc8180460000','8a8ab0b246dc81120146dc8180dd001e',0,'','admin','管理员',NULL,NULL,'2020-12-17 13:37:32',NULL,''),('40281281766e873301766f346e3a0004',NULL,1,'采购费用申请签报','40','activitiCostRequestPuController.do?list','ff8080816e687d71016e68822fbe0002','8a8ab0b246dc81120146dc8180460000','8a8ab0b246dc81120146dc8180dd001e',0,'','admin','管理员','admin','2020-12-17 13:38:18','2020-12-17 13:37:56','管理员',''),('40281281766e873301766f38c5d50007',NULL,1,'其他费用申请签报','45','activitiCostRequestOtherController.do?list','ff8080816e687d71016e68822fbe0002','8a8ab0b246dc81120146dc8180460000','8a8ab0b246dc81120146dc8180dd001e',0,'','admin','管理员',NULL,NULL,'2020-12-17 13:42:40',NULL,''),('40281281767adc2c01767afcd1400014',NULL,1,'业务预算指标配置','55','budgetBusMeasureConfigController.do?list','402881e57307f46c017307f7e7990001','8a8ab0b246dc81120146dc8180460000','8a8ab0b246dc81120146dc8180dd001e',0,'','admin','管理员',NULL,NULL,'2020-12-19 20:32:38',NULL,''),('40281281767adc2c01767afd89330016',NULL,1,'预算执行样表','60','budgetTempSheetController.do?list&actual=1','402881e57307f46c017307f7e7990001','8a8ab0b246dc81120146dc8180460000','8a8ab0b246dc81120146dc8180dd001e',0,'','admin','管理员','admin','2020-12-20 15:56:58','2020-12-19 20:33:25','管理员',''),('40281281767f0f0a01767f1f2b730001',NULL,1,'预算执行表查看','65','budgetInstController.do?list4actualview','402881e57307f46c017307f7e7990001','8a8ab0b246dc81120146dc8180460000','8a8ab0b246dc81120146dc8180dd001e',0,'','admin','管理员','admin','2020-12-22 10:59:27','2020-12-20 15:48:38','管理员',''),('4028128176885f820176886252450001',NULL,1,'预算查看','75','budgetInstController.do?list4expectview','402881e57307f46c017307f7e7990001','8a8ab0b246dc81120146dc8180460000','8a8ab0b246dc81120146dc8180dd001e',0,'','admin','管理员','admin','2020-12-22 10:59:38','2020-12-22 10:58:34','管理员',''),('4028128176899353017689b80dac0025',NULL,1,'预算控制','80','budgetControlController.do?list','402881e57307f46c017307f7e7990001','8a8ab0b246dc81120146dc8180460000','8a8ab0b246dc81120146dc8180dd001e',0,'','admin','管理员',NULL,NULL,'2020-12-22 17:11:49',NULL,'');
INSERT INTO `t_p_process` (`id`, `typeid`, `userid`, `processname`, `processxmlpath`, `processxml`, `processxmname`, `note`, `update_name`, `update_date`, `update_by`, `create_name`, `create_date`, `create_by`, `processkey`, `processstate`, `processtype`, `ccmode`) VALUES ('40281281766e43ff01766e835a3a0022','cost_request_hr',NULL,'人事费用申请',NULL,'<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<definitions  xmlns=\"http://www.omg.org/spec/BPMN/20100524/MODEL\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:activiti=\"http://activiti.org/bpmn\" xmlns:bpmndi=\"http://www.omg.org/spec/BPMN/20100524/DI\" xmlns:omgdc=\"http://www.omg.org/spec/DD/20100524/DC\" xmlns:omgdi=\"http://www.omg.org/spec/DD/20100524/DI\" typeLanguage=\"http://www.w3.org/2001/XMLSchema\" expressionLanguage=\"http://www.w3.org/1999/XPath\" targetNamespace=\"http://www.lzt.com.cn\">\r\n    <process  id=\"process1608171781250\" name=\"人事费用申请\">\r\n        <documentation>流程描述</documentation>\r\n        <extensionElements>\r\n            <activiti:executionListener id=\"402880e54803a496014805e5d9190012\" event=\"end\" class=\"org.jeecgframework.workflow.listener.execution.ProcessEndListener\" >\r\n            </activiti:executionListener>\r\n            <activiti:executionListener id=\"402880ed6ded2240016dedd28f5d001f\" event=\"end\" class=\"cn.com.lzt.workflow.listener.task.BusinessProcessEndListener\" >\r\n            </activiti:executionListener>\r\n        </extensionElements>\r\n        <startEvent  id=\"start1\" name=\"开始节点\" activiti:initiator=\"applyUserId\">\r\n        </startEvent>\r\n        <endEvent  id=\"end\" name=\"结束节点\">\r\n        </endEvent>\r\n        <userTask  id=\"task1608171802748\" name=\"审批\" activiti:assignee=\"${applyUserId}\" >\r\n        </userTask>\r\n        <userTask  id=\"task1608171834590\" name=\"制单人重填\" activiti:assignee=\"${applyUserId}\" >\r\n        </userTask>\r\n        <sequenceFlow  id=\"flow1608171805104\" name=\"\" sourceRef=\"start1\" targetRef=\"task1608171802748\">\r\n        </sequenceFlow>\r\n        <sequenceFlow  id=\"flow1608171821470\" name=\"通过\" sourceRef=\"task1608171802748\" targetRef=\"end\">\r\n        </sequenceFlow>\r\n        <sequenceFlow  id=\"flow1608171848174\" name=\"驳回\" sourceRef=\"task1608171802748\" targetRef=\"task1608171834590\">\r\n        </sequenceFlow>\r\n        <sequenceFlow  id=\"flow1608171864234\" name=\"提交\" sourceRef=\"task1608171834590\" targetRef=\"task1608171802748\">\r\n        </sequenceFlow>\r\n    </process>\r\n    <bpmndi:BPMNDiagram id=\"BPMNDiagram_process1608171781250\">\r\n        <bpmndi:BPMNPlane bpmnElement=\"process1608171781250\" id=\"BPMNPlane_process1608171781250\">\r\n            <bpmndi:BPMNShape bpmnElement=\"start1\" id=\"BPMNShape_start1\">\r\n                <omgdc:Bounds height=\"30\" width=\"30\" x=\"200\" y=\"50\"/>\r\n            </bpmndi:BPMNShape>\r\n            <bpmndi:BPMNShape bpmnElement=\"end\" id=\"BPMNShape_end\">\r\n                <omgdc:Bounds height=\"30\" width=\"30\" x=\"200\" y=\"400\"/>\r\n            </bpmndi:BPMNShape>\r\n            <bpmndi:BPMNShape bpmnElement=\"task1608171802748\" id=\"BPMNShape_task1608171802748\">\r\n                <omgdc:Bounds height=\"50\" width=\"90\" x=\"170\" y=\"176\"/>\r\n            </bpmndi:BPMNShape>\r\n            <bpmndi:BPMNShape bpmnElement=\"task1608171834590\" id=\"BPMNShape_task1608171834590\">\r\n                <omgdc:Bounds height=\"50\" width=\"90\" x=\"316\" y=\"183\"/>\r\n            </bpmndi:BPMNShape>\r\n            <bpmndi:BPMNEdge bpmnElement=\"flow1608171805104\" id=\"BPMNEdge_flow1608171805104\">\r\n                <omgdi:waypoint x=\"215\" y=\"80\" />\r\n                <omgdi:waypoint x=\"215\" y=\"171\" />\r\n            </bpmndi:BPMNEdge>\r\n            <bpmndi:BPMNEdge bpmnElement=\"flow1608171821470\" id=\"BPMNEdge_flow1608171821470\">\r\n                <omgdi:waypoint x=\"215\" y=\"231\" />\r\n                <omgdi:waypoint x=\"215\" y=\"400\" />\r\n            </bpmndi:BPMNEdge>\r\n            <bpmndi:BPMNEdge bpmnElement=\"flow1608171848174\" id=\"BPMNEdge_flow1608171848174\">\r\n                <omgdi:waypoint x=\"265\" y=\"201\" />\r\n                <omgdi:waypoint x=\"288\" y=\"201\" />\r\n                <omgdi:waypoint x=\"288\" y=\"208\" />\r\n                <omgdi:waypoint x=\"311\" y=\"208\" />\r\n            </bpmndi:BPMNEdge>\r\n            <bpmndi:BPMNEdge bpmnElement=\"flow1608171864234\" id=\"BPMNEdge_flow1608171864234\">\r\n                <omgdi:waypoint x=\"361\" y=\"178\" />\r\n                <omgdi:waypoint x=\"361\" y=\"151\" />\r\n                <omgdi:waypoint x=\"215\" y=\"151\" />\r\n                <omgdi:waypoint x=\"215\" y=\"171\" />\r\n            </bpmndi:BPMNEdge>\r\n        </bpmndi:BPMNPlane>\r\n    </bpmndi:BPMNDiagram>\r\n</definitions>',NULL,NULL,'管理员','2020-12-17 18:32:36','admin','管理员','2020-12-17 10:24:31','admin','process1608171781250',1,'0',NULL),('40281281766e43ff01766e846d790025','cost_request_pu',NULL,'采购费用申请',NULL,'<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<definitions  xmlns=\"http://www.omg.org/spec/BPMN/20100524/MODEL\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:activiti=\"http://activiti.org/bpmn\" xmlns:bpmndi=\"http://www.omg.org/spec/BPMN/20100524/DI\" xmlns:omgdc=\"http://www.omg.org/spec/DD/20100524/DC\" xmlns:omgdi=\"http://www.omg.org/spec/DD/20100524/DI\" typeLanguage=\"http://www.w3.org/2001/XMLSchema\" expressionLanguage=\"http://www.w3.org/1999/XPath\" targetNamespace=\"http://www.lzt.com.cn\">\r\n    <process  id=\"process1608171875385\" name=\"采购费用申请\">\r\n        <documentation>流程描述</documentation>\r\n        <extensionElements>\r\n            <activiti:executionListener id=\"402880e54803a496014805e5d9190012\" event=\"end\" class=\"org.jeecgframework.workflow.listener.execution.ProcessEndListener\" >\r\n            </activiti:executionListener>\r\n            <activiti:executionListener id=\"402880ed6ded2240016dedd28f5d001f\" event=\"end\" class=\"cn.com.lzt.workflow.listener.task.BusinessProcessEndListener\" >\r\n            </activiti:executionListener>\r\n        </extensionElements>\r\n        <startEvent  id=\"start1\" name=\"开始节点\" activiti:initiator=\"applyUserId\">\r\n        </startEvent>\r\n        <endEvent  id=\"end\" name=\"结束节点\">\r\n        </endEvent>\r\n        <userTask  id=\"task1608171889211\" name=\"审批\" activiti:assignee=\"${applyUserId}\" >\r\n        </userTask>\r\n        <userTask  id=\"task1608171901721\" name=\"制单人重填\" activiti:assignee=\"${applyUserId}\" >\r\n        </userTask>\r\n        <sequenceFlow  id=\"flow1608171917714\" name=\"通过\" sourceRef=\"task1608171889211\" targetRef=\"end\">\r\n        </sequenceFlow>\r\n        <sequenceFlow  id=\"flow1608171926739\" name=\"驳回\" sourceRef=\"task1608171889211\" targetRef=\"task1608171901721\">\r\n        </sequenceFlow>\r\n        <sequenceFlow  id=\"flow1608171934064\" name=\"提交\" sourceRef=\"task1608171901721\" targetRef=\"task1608171889211\">\r\n        </sequenceFlow>\r\n        <sequenceFlow  id=\"flow1608171936138\" name=\"\" sourceRef=\"start1\" targetRef=\"task1608171889211\">\r\n        </sequenceFlow>\r\n    </process>\r\n    <bpmndi:BPMNDiagram id=\"BPMNDiagram_process1608171875385\">\r\n        <bpmndi:BPMNPlane bpmnElement=\"process1608171875385\" id=\"BPMNPlane_process1608171875385\">\r\n            <bpmndi:BPMNShape bpmnElement=\"start1\" id=\"BPMNShape_start1\">\r\n                <omgdc:Bounds height=\"30\" width=\"30\" x=\"200\" y=\"50\"/>\r\n            </bpmndi:BPMNShape>\r\n            <bpmndi:BPMNShape bpmnElement=\"end\" id=\"BPMNShape_end\">\r\n                <omgdc:Bounds height=\"30\" width=\"30\" x=\"200\" y=\"400\"/>\r\n            </bpmndi:BPMNShape>\r\n            <bpmndi:BPMNShape bpmnElement=\"task1608171889211\" id=\"BPMNShape_task1608171889211\">\r\n                <omgdc:Bounds height=\"50\" width=\"90\" x=\"173\" y=\"165\"/>\r\n            </bpmndi:BPMNShape>\r\n            <bpmndi:BPMNShape bpmnElement=\"task1608171901721\" id=\"BPMNShape_task1608171901721\">\r\n                <omgdc:Bounds height=\"50\" width=\"90\" x=\"318\" y=\"163\"/>\r\n            </bpmndi:BPMNShape>\r\n            <bpmndi:BPMNEdge bpmnElement=\"flow1608171917714\" id=\"BPMNEdge_flow1608171917714\">\r\n                <omgdi:waypoint x=\"218\" y=\"220\" />\r\n                <omgdi:waypoint x=\"218\" y=\"310\" />\r\n                <omgdi:waypoint x=\"215\" y=\"310\" />\r\n                <omgdi:waypoint x=\"215\" y=\"400\" />\r\n            </bpmndi:BPMNEdge>\r\n            <bpmndi:BPMNEdge bpmnElement=\"flow1608171926739\" id=\"BPMNEdge_flow1608171926739\">\r\n                <omgdi:waypoint x=\"268\" y=\"190\" />\r\n                <omgdi:waypoint x=\"290\" y=\"190\" />\r\n                <omgdi:waypoint x=\"290\" y=\"188\" />\r\n                <omgdi:waypoint x=\"313\" y=\"188\" />\r\n            </bpmndi:BPMNEdge>\r\n            <bpmndi:BPMNEdge bpmnElement=\"flow1608171934064\" id=\"BPMNEdge_flow1608171934064\">\r\n                <omgdi:waypoint x=\"363\" y=\"158\" />\r\n                <omgdi:waypoint x=\"363\" y=\"138\" />\r\n                <omgdi:waypoint x=\"218\" y=\"138\" />\r\n                <omgdi:waypoint x=\"218\" y=\"160\" />\r\n            </bpmndi:BPMNEdge>\r\n            <bpmndi:BPMNEdge bpmnElement=\"flow1608171936138\" id=\"BPMNEdge_flow1608171936138\">\r\n                <omgdi:waypoint x=\"215\" y=\"80\" />\r\n                <omgdi:waypoint x=\"215\" y=\"120\" />\r\n                <omgdi:waypoint x=\"218\" y=\"120\" />\r\n                <omgdi:waypoint x=\"218\" y=\"160\" />\r\n            </bpmndi:BPMNEdge>\r\n        </bpmndi:BPMNPlane>\r\n    </bpmndi:BPMNDiagram>\r\n</definitions>',NULL,NULL,'管理员','2020-12-17 18:32:37','admin','管理员','2020-12-17 10:25:41','admin','process1608171875385',1,'0',NULL),('40281281766e43ff01766e8566190028','cost_request_other',NULL,'其他费用申请',NULL,'<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<definitions  xmlns=\"http://www.omg.org/spec/BPMN/20100524/MODEL\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:activiti=\"http://activiti.org/bpmn\" xmlns:bpmndi=\"http://www.omg.org/spec/BPMN/20100524/DI\" xmlns:omgdc=\"http://www.omg.org/spec/DD/20100524/DC\" xmlns:omgdi=\"http://www.omg.org/spec/DD/20100524/DI\" typeLanguage=\"http://www.w3.org/2001/XMLSchema\" expressionLanguage=\"http://www.w3.org/1999/XPath\" targetNamespace=\"http://www.lzt.com.cn\">\r\n    <process  id=\"process1608171945264\" name=\"其他费用申请\">\r\n        <documentation>流程描述</documentation>\r\n        <extensionElements>\r\n            <activiti:executionListener id=\"402880e54803a496014805e5d9190012\" event=\"end\" class=\"org.jeecgframework.workflow.listener.execution.ProcessEndListener\" >\r\n            </activiti:executionListener>\r\n            <activiti:executionListener id=\"402880ed6ded2240016dedd28f5d001f\" event=\"end\" class=\"cn.com.lzt.workflow.listener.task.BusinessProcessEndListener\" >\r\n            </activiti:executionListener>\r\n        </extensionElements>\r\n        <startEvent  id=\"start1\" name=\"开始节点\" activiti:initiator=\"applyUserId\">\r\n        </startEvent>\r\n        <endEvent  id=\"end\" name=\"结束节点\">\r\n        </endEvent>\r\n        <userTask  id=\"task1608171957551\" name=\"审批\" activiti:assignee=\"${applyUserId}\" >\r\n        </userTask>\r\n        <userTask  id=\"task1608171976230\" name=\"制单人重填\" activiti:assignee=\"${applyUserId}\" >\r\n        </userTask>\r\n        <sequenceFlow  id=\"flow1608171959153\" name=\"\" sourceRef=\"start1\" targetRef=\"task1608171957551\">\r\n        </sequenceFlow>\r\n        <sequenceFlow  id=\"flow1608171960842\" name=\"通过\" sourceRef=\"task1608171957551\" targetRef=\"end\">\r\n        </sequenceFlow>\r\n        <sequenceFlow  id=\"flow1608171987316\" name=\"驳回\" sourceRef=\"task1608171957551\" targetRef=\"task1608171976230\">\r\n        </sequenceFlow>\r\n        <sequenceFlow  id=\"flow1608171999352\" name=\"提交\" sourceRef=\"task1608171976230\" targetRef=\"task1608171957551\">\r\n        </sequenceFlow>\r\n    </process>\r\n    <bpmndi:BPMNDiagram id=\"BPMNDiagram_process1608171945264\">\r\n        <bpmndi:BPMNPlane bpmnElement=\"process1608171945264\" id=\"BPMNPlane_process1608171945264\">\r\n            <bpmndi:BPMNShape bpmnElement=\"start1\" id=\"BPMNShape_start1\">\r\n                <omgdc:Bounds height=\"30\" width=\"30\" x=\"200\" y=\"50\"/>\r\n            </bpmndi:BPMNShape>\r\n            <bpmndi:BPMNShape bpmnElement=\"end\" id=\"BPMNShape_end\">\r\n                <omgdc:Bounds height=\"30\" width=\"30\" x=\"200\" y=\"400\"/>\r\n            </bpmndi:BPMNShape>\r\n            <bpmndi:BPMNShape bpmnElement=\"task1608171957551\" id=\"BPMNShape_task1608171957551\">\r\n                <omgdc:Bounds height=\"50\" width=\"90\" x=\"174\" y=\"180\"/>\r\n            </bpmndi:BPMNShape>\r\n            <bpmndi:BPMNShape bpmnElement=\"task1608171976230\" id=\"BPMNShape_task1608171976230\">\r\n                <omgdc:Bounds height=\"50\" width=\"90\" x=\"334\" y=\"189\"/>\r\n            </bpmndi:BPMNShape>\r\n            <bpmndi:BPMNEdge bpmnElement=\"flow1608171959153\" id=\"BPMNEdge_flow1608171959153\">\r\n                <omgdi:waypoint x=\"215\" y=\"80\" />\r\n                <omgdi:waypoint x=\"215\" y=\"127\" />\r\n                <omgdi:waypoint x=\"219\" y=\"127\" />\r\n                <omgdi:waypoint x=\"219\" y=\"175\" />\r\n            </bpmndi:BPMNEdge>\r\n            <bpmndi:BPMNEdge bpmnElement=\"flow1608171960842\" id=\"BPMNEdge_flow1608171960842\">\r\n                <omgdi:waypoint x=\"219\" y=\"235\" />\r\n                <omgdi:waypoint x=\"219\" y=\"317\" />\r\n                <omgdi:waypoint x=\"215\" y=\"317\" />\r\n                <omgdi:waypoint x=\"215\" y=\"400\" />\r\n            </bpmndi:BPMNEdge>\r\n            <bpmndi:BPMNEdge bpmnElement=\"flow1608171987316\" id=\"BPMNEdge_flow1608171987316\">\r\n                <omgdi:waypoint x=\"269\" y=\"205\" />\r\n                <omgdi:waypoint x=\"299\" y=\"205\" />\r\n                <omgdi:waypoint x=\"299\" y=\"214\" />\r\n                <omgdi:waypoint x=\"329\" y=\"214\" />\r\n            </bpmndi:BPMNEdge>\r\n            <bpmndi:BPMNEdge bpmnElement=\"flow1608171999352\" id=\"BPMNEdge_flow1608171999352\">\r\n                <omgdi:waypoint x=\"379\" y=\"184\" />\r\n                <omgdi:waypoint x=\"379\" y=\"155\" />\r\n                <omgdi:waypoint x=\"219\" y=\"155\" />\r\n                <omgdi:waypoint x=\"219\" y=\"175\" />\r\n            </bpmndi:BPMNEdge>\r\n        </bpmndi:BPMNPlane>\r\n    </bpmndi:BPMNDiagram>\r\n</definitions>',NULL,NULL,'管理员','2020-12-17 18:32:39','admin','管理员','2020-12-17 10:26:45','admin','process1608171945264',1,'0',NULL);

INSERT INTO `t_p_processnode` (`id`, `formid`, `processid`, `processnodecode`, `processnodename`, `modelandview`, `modelandview_mobile`, `node_timeout`, `pnodecofigid`, `pushmode`, `delete_flag`) VALUES ('40281281766e43ff01766e835a870023',NULL,'40281281766e43ff01766e835a3a0022','task1608171802748','审批','activitiCostRequestHrController.do?goView&flag=2','activitiCostRequestHrController.do?goViewMobile&flag=2',NULL,'40281281766e43ff01766e805aaf0016','no','0'),('40281281766e43ff01766e835abf0024',NULL,'40281281766e43ff01766e835a3a0022','task1608171834590','制单人重填','activitiCostRequestHrController.do?goView&flag=1','activitiCostRequestHrController.do?goViewMobile&flag=1',NULL,'40281281766e43ff01766e809b5f0018','no','0'),('40281281766e43ff01766e846da00026',NULL,'40281281766e43ff01766e846d790025','task1608171889211','审批','activitiCostRequestPuController.do?goView&flag=2','activitiCostRequestPuController.do?goViewMobile&flag=2',NULL,'40281281766e43ff01766e80fd43001a','no','0'),('40281281766e43ff01766e846daa0027',NULL,'40281281766e43ff01766e846d790025','task1608171901721','制单人重填','activitiCostRequestPuController.do?goView&flag=1','activitiCostRequestPuController.do?goViewMobile&flag=1',NULL,'40281281766e43ff01766e8139ba001c','no','0'),('40281281766e43ff01766e8566370029',NULL,'40281281766e43ff01766e8566190028','task1608171957551','审批','activitiCostRequestOtherController.do?goView&flag=2','activitiCostRequestOtherController.do?goViewMobile&flag=2',NULL,'40281281766e43ff01766e819557001e','no','0'),('40281281766e43ff01766e856654002a',NULL,'40281281766e43ff01766e8566190028','task1608171976230','制单人重填','activitiCostRequestOtherController.do?goView&flag=1','activitiCostRequestOtherController.do?goViewMobile&flag=1',NULL,'40281281766e43ff01766e81ca480020','no','0');
INSERT INTO `t_p_processnode_config` (`id`, `process_type`, `url_title`, `pc_url`, `mobile_url`) VALUES ('40281281766e43ff01766e805aaf0016','cost_request_hr','审核','activitiCostRequestHrController.do?goView&flag=2','activitiCostRequestHrController.do?goViewMobile&flag=2'),('40281281766e43ff01766e809b5f0018','cost_request_hr','制单人重填','activitiCostRequestHrController.do?goView&flag=1','activitiCostRequestHrController.do?goViewMobile&flag=1'),('40281281766e43ff01766e80fd43001a','cost_request_pu','审核','activitiCostRequestPuController.do?goView&flag=2','activitiCostRequestPuController.do?goViewMobile&flag=2'),('40281281766e43ff01766e8139ba001c','cost_request_pu','制单人重填','activitiCostRequestPuController.do?goView&flag=1','activitiCostRequestPuController.do?goViewMobile&flag=1'),('40281281766e43ff01766e819557001e','cost_request_other','审核','activitiCostRequestOtherController.do?goView&flag=2','activitiCostRequestOtherController.do?goViewMobile&flag=2'),('40281281766e43ff01766e81ca480020','cost_request_other','制单人重填','activitiCostRequestOtherController.do?goView&flag=1','activitiCostRequestOtherController.do?goViewMobile&flag=1');
INSERT INTO `t_s_busconfig` (`id`, `busname`, `form_type`, `tableid`, `online_id`, `processid`, `bus_title_exp`, `process_deal_style`, `show_title`, `show_table`, `config_id`) VALUES ('40281281766e43ff01766e859e2e002b',NULL,'online','','t_b_activiti_cost_request_hr','40281281766e43ff01766e835a3a0022','人事费用申请','formdeal','人事费用申请','人事费用申请','40281281766e43ff01766e7c2b6b000e'),('40281281766e43ff01766e85ce20002d',NULL,'online','','t_b_activiti_cost_request_pu','40281281766e43ff01766e846d790025','采购费用申请','formdeal','采购费用申请','采购费用申请','40281281766e43ff01766e7e85e10012'),('40281281766e43ff01766e862fff002f',NULL,'online','','t_b_activiti_cost_request_other','40281281766e43ff01766e8566190028','其他费用申请','formdeal','其他费用申请','其他费用申请','40281281766e43ff01766e7f553d0014');
INSERT INTO `t_process_busconfig` (`id`, `show_title`, `real_title`, `show_tablename`, `real_tablename`, `process_type`, `activiti_config_class`) VALUES ('40281281766e43ff01766e7c2b6b000e','人事费用申请','人事费用申请','人事费用申请','t_b_activiti_cost_request_hr','cost_request_hr','cn.com.lzt.useractiviti.data.util.tools.CostRequestActivitiHrTools'),('40281281766e43ff01766e7e85e10012','采购费用申请','采购费用申请','采购费用申请','t_b_activiti_cost_request_pu','cost_request_pu','cn.com.lzt.useractiviti.data.util.tools.CostRequestActivitiPuTools'),('40281281766e43ff01766e7f553d0014','其他费用申请','其他费用申请','其他费用申请','t_b_activiti_cost_request_other','cost_request_other','cn.com.lzt.useractiviti.data.util.tools.CostRequestActivitiOtherTools');

#预算回写
ALTER TABLE `t_b_budget_tempsheet`
ADD COLUMN `actual` INT NULL COMMENT '0 预算表 1 实际表',
ADD COLUMN `write_back` INT NULL COMMENT '0不能回写 1能回写';
update t_b_budget_tempsheet set `actual`=0;


ALTER TABLE `t_b_budget_inst`
ADD COLUMN `actual` INT NULL COMMENT '0 预算表 1 实际表',
ADD COLUMN `write_back` INT NULL COMMENT '0不能回写 1能回写';
update t_b_budget_inst set `actual`=0;

ALTER TABLE `t_b_contract` ADD COLUMN `budget_measure_id` VARCHAR(45) NULL COMMENT '预算回写指标' ;

CREATE TABLE `t_b_budget_bus_measure_config` (
  `id` varchar(36) NOT NULL COMMENT 'id',
  `create_name` varchar(50) DEFAULT NULL COMMENT '创建人名称',
  `create_by` varchar(50) DEFAULT NULL COMMENT '创建人登录名称',
  `create_date` datetime DEFAULT NULL COMMENT '创建日期',
  `update_name` varchar(50) DEFAULT NULL COMMENT '更新人名称',
  `update_by` varchar(50) DEFAULT NULL COMMENT '更新人登录名称',
  `update_date` datetime DEFAULT NULL COMMENT '更新日期',
  `sys_org_code` varchar(50) DEFAULT NULL COMMENT '所属部门',
  `sys_company_code` varchar(50) DEFAULT NULL COMMENT '所属公司',
  `bpm_status` varchar(32) DEFAULT NULL COMMENT '流程状态',
  `bus_type` varchar(255) DEFAULT NULL COMMENT '业务类型',
  `bus_name` varchar(255) DEFAULT NULL COMMENT '业务名称',
  `config_item` varchar(255) DEFAULT NULL COMMENT '配置项',
  `config_item_name` varchar(255) DEFAULT NULL COMMENT '配置项名称',
  `measure_id` varchar(32) DEFAULT NULL COMMENT '指标id',
  `measure_name` varchar(255) DEFAULT NULL COMMENT '指标名',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='预算业务指标配置';

CREATE TABLE `t_b_budget_write_back_log` (
  `id` varchar(36) NOT NULL,
  `create_name` varchar(50) DEFAULT NULL COMMENT '创建人名称',
  `create_by` varchar(50) DEFAULT NULL COMMENT '创建人登录名称',
  `create_date` datetime DEFAULT NULL COMMENT '创建日期',
  `update_name` varchar(50) DEFAULT NULL COMMENT '更新人名称',
  `update_by` varchar(50) DEFAULT NULL COMMENT '更新人登录名称',
  `update_date` datetime DEFAULT NULL COMMENT '更新日期',
  `sys_org_code` varchar(50) DEFAULT NULL COMMENT '所属部门',
  `sys_company_code` varchar(50) DEFAULT NULL COMMENT '所属公司',
  `bpm_status` varchar(32) DEFAULT '1' COMMENT '流程状态',
  `bus_type` varchar(255) DEFAULT NULL COMMENT '业务类型',
  `bus_table_name` varchar(255) DEFAULT NULL COMMENT '业务表',
  `bus_id` varchar(32) DEFAULT NULL COMMENT '业务id',
  `bus_value` double DEFAULT NULL COMMENT '业务值',
  `entity_id` varchar(45) DEFAULT NULL COMMENT '预算主体',
  `measure_id` varchar(32) DEFAULT NULL COMMENT '回写指标',
  `period_detail_id` varchar(32) DEFAULT NULL COMMENT '回写时间指标',
  `include_tax` int(11) DEFAULT NULL COMMENT '含税指标',
  `old_value` double DEFAULT NULL COMMENT '写前值',
  `new_value` double DEFAULT NULL COMMENT '写后值',
  `status` int(11) DEFAULT NULL COMMENT '状态',
  `inst_id` varchar(32) DEFAULT NULL COMMENT '回写实例id',
  `inst_measure_table_name` varchar(255) DEFAULT NULL COMMENT '回写table',
  `inst_measure_id` varchar(32) DEFAULT NULL COMMENT '回写id',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='预算回写日志';

CREATE TABLE `t_b_budget_actual_measure_inst_map` (
  `id` varchar(36) NOT NULL,
  `create_name` varchar(50) DEFAULT NULL COMMENT '创建人名称',
  `create_by` varchar(50) DEFAULT NULL COMMENT '创建人登录名称',
  `create_date` datetime DEFAULT NULL COMMENT '创建日期',
  `update_name` varchar(50) DEFAULT NULL COMMENT '更新人名称',
  `update_by` varchar(50) DEFAULT NULL COMMENT '更新人登录名称',
  `update_date` datetime DEFAULT NULL COMMENT '更新日期',
  `sys_org_code` varchar(50) DEFAULT NULL COMMENT '所属部门',
  `sys_company_code` varchar(50) DEFAULT NULL COMMENT '所属公司',
  `bpm_status` varchar(32) DEFAULT '1' COMMENT '流程状态',
  `entity_id` varchar(32) DEFAULT NULL COMMENT '预算实体',
  `measure_id` varchar(32) DEFAULT NULL COMMENT '指标id',
  `period_detail_id` varchar(32) DEFAULT NULL COMMENT '时间指标',
  `include_tax` int(11) DEFAULT NULL COMMENT '含税指标',
  `expect` int(11) DEFAULT NULL COMMENT '预实指标',
  `inst_id` varchar(32) DEFAULT NULL COMMENT '实例id',
  `inst_measure_table_name` varchar(255) DEFAULT NULL COMMENT '实例详情表',
  `inst_measure_id` varchar(32) DEFAULT NULL COMMENT '详情id',
  PRIMARY KEY (`id`),
  KEY `emp` (`entity_id`,`measure_id`,`period_detail_id`),
  KEY `inst_id` (`inst_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='预算执行表指标实例对应关系';
CREATE TABLE `t_b_budget_tempsheet_view_user` (
  `id` varchar(36) NOT NULL,
  `create_name` varchar(50) DEFAULT NULL COMMENT '创建人名称',
  `create_by` varchar(50) DEFAULT NULL COMMENT '创建人登录名称',
  `create_date` datetime DEFAULT NULL COMMENT '创建日期',
  `update_name` varchar(50) DEFAULT NULL COMMENT '更新人名称',
  `update_by` varchar(50) DEFAULT NULL COMMENT '更新人登录名称',
  `update_date` datetime DEFAULT NULL COMMENT '更新日期',
  `sys_org_code` varchar(50) DEFAULT NULL COMMENT '所属部门',
  `sys_company_code` varchar(50) DEFAULT NULL COMMENT '所属公司',
  `bpm_status` varchar(32) DEFAULT '1' COMMENT '流程状态',
  `user_id` varchar(32) DEFAULT NULL COMMENT '用户id',
  `user_name` varchar(32) DEFAULT NULL COMMENT '用户名',
  `type` varchar(32) DEFAULT NULL COMMENT '类型',
  `tempsheet_id` varchar(45) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `tempsheet_id` (`tempsheet_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='样表查看权限';
CREATE TABLE `t_b_budget_control` (
  `id` varchar(36) NOT NULL,
  `create_name` varchar(50) DEFAULT NULL COMMENT '创建人名称',
  `create_by` varchar(50) DEFAULT NULL COMMENT '创建人登录名称',
  `create_date` datetime DEFAULT NULL COMMENT '创建日期',
  `update_name` varchar(50) DEFAULT NULL COMMENT '更新人名称',
  `update_by` varchar(50) DEFAULT NULL COMMENT '更新人登录名称',
  `update_date` datetime DEFAULT NULL COMMENT '更新日期',
  `sys_org_code` varchar(50) DEFAULT NULL COMMENT '所属部门',
  `sys_company_code` varchar(50) DEFAULT NULL COMMENT '所属公司',
  `bpm_status` varchar(32) DEFAULT '1' COMMENT '流程状态',
  `name` varchar(255) DEFAULT NULL COMMENT '名称',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='预算控制';

INSERT INTO `t_b_budget_bus_measure_config` (`id`,`create_name`,`create_by`,`create_date`,`update_name`,`update_by`,`update_date`,`sys_org_code`,`sys_company_code`,`bpm_status`,`bus_type`,`bus_name`,`config_item`,`config_item_name`,`measure_id`,`measure_name`) VALUES ('1','朱浩军','1698','2020-12-21 11:41:15','朱浩军','1698','2020-12-24 22:19:29','A06A05','A06','1','inner_user','员工报销','rootA04A01','固定资产（办公类）','2c9358ad74ae69160174b3de2dac014a','固定资产（办公类）');
INSERT INTO `t_b_budget_bus_measure_config` (`id`,`create_name`,`create_by`,`create_date`,`update_name`,`update_by`,`update_date`,`sys_org_code`,`sys_company_code`,`bpm_status`,`bus_type`,`bus_name`,`config_item`,`config_item_name`,`measure_id`,`measure_name`) VALUES ('10','朱浩军','1698','2020-12-24 22:29:15',NULL,NULL,NULL,'A06A05','A06','1','inner_user','员工报销','R003A01A02','低值易耗品（保安类）','2c9358ad74ae69160174b3e4ea4e018a','低值易耗品（保安类）');
INSERT INTO `t_b_budget_bus_measure_config` (`id`,`create_name`,`create_by`,`create_date`,`update_name`,`update_by`,`update_date`,`sys_org_code`,`sys_company_code`,`bpm_status`,`bus_type`,`bus_name`,`config_item`,`config_item_name`,`measure_id`,`measure_name`) VALUES ('11','朱浩军','1698','2020-12-24 22:30:19',NULL,NULL,NULL,'A06A05','A06','1','inner_user','员工报销','R003A01A03','低值易耗品（工程类）','2c9358ad74ae69160174b3e514c9018c','低值易耗品（工程类）');
INSERT INTO `t_b_budget_bus_measure_config` (`id`,`create_name`,`create_by`,`create_date`,`update_name`,`update_by`,`update_date`,`sys_org_code`,`sys_company_code`,`bpm_status`,`bus_type`,`bus_name`,`config_item`,`config_item_name`,`measure_id`,`measure_name`) VALUES ('12','朱浩军','1698','2020-12-24 22:30:49',NULL,NULL,NULL,'A06A05','A06','1','inner_user','员工报销','R003A01A04','低值易耗品（会务类）','2c9358ad74ae69160174b3e53f01018e','低值易耗品（会务类）');
INSERT INTO `t_b_budget_bus_measure_config` (`id`,`create_name`,`create_by`,`create_date`,`update_name`,`update_by`,`update_date`,`sys_org_code`,`sys_company_code`,`bpm_status`,`bus_type`,`bus_name`,`config_item`,`config_item_name`,`measure_id`,`measure_name`) VALUES ('13','朱浩军','1698','2020-12-24 22:34:15',NULL,NULL,NULL,'A06A05','A06','1','inner_user','员工报销','rootA10','物料耗材（保安类）','2c9358ad74ae69160174b3e5ab210192','物料耗材（保安类）');
INSERT INTO `t_b_budget_bus_measure_config` (`id`,`create_name`,`create_by`,`create_date`,`update_name`,`update_by`,`update_date`,`sys_org_code`,`sys_company_code`,`bpm_status`,`bus_type`,`bus_name`,`config_item`,`config_item_name`,`measure_id`,`measure_name`) VALUES ('14','朱浩军','1698','2020-12-24 22:34:53',NULL,NULL,NULL,'A06A05','A06','1','inner_user','员工报销','rootA01','物料耗材（工程类）','2c9358ad74ae69160174b3e5d3370194','物料耗材（工程类）');
INSERT INTO `t_b_budget_bus_measure_config` (`id`,`create_name`,`create_by`,`create_date`,`update_name`,`update_by`,`update_date`,`sys_org_code`,`sys_company_code`,`bpm_status`,`bus_type`,`bus_name`,`config_item`,`config_item_name`,`measure_id`,`measure_name`) VALUES ('15','朱浩军','1698','2020-12-24 22:35:24',NULL,NULL,NULL,'A06A05','A06','1','inner_user','员工报销','rootA03','物料耗材（办公类）','2c9358ad74ae69160174b3e5ffbb0196','物料耗材（办公类）');
INSERT INTO `t_b_budget_bus_measure_config` (`id`,`create_name`,`create_by`,`create_date`,`update_name`,`update_by`,`update_date`,`sys_org_code`,`sys_company_code`,`bpm_status`,`bus_type`,`bus_name`,`config_item`,`config_item_name`,`measure_id`,`measure_name`) VALUES ('16','朱浩军','1698','2020-12-24 22:36:00',NULL,NULL,NULL,'A06A05','A06','1','inner_user','员工报销','rootA08','物料耗材（会务类）','2c9358ad74ae69160174b3e6251c0198','物料耗材（会务类）');
INSERT INTO `t_b_budget_bus_measure_config` (`id`,`create_name`,`create_by`,`create_date`,`update_name`,`update_by`,`update_date`,`sys_org_code`,`sys_company_code`,`bpm_status`,`bus_type`,`bus_name`,`config_item`,`config_item_name`,`measure_id`,`measure_name`) VALUES ('3','朱浩军','1698','2020-12-21 11:42:12','朱浩军','1698','2020-12-24 22:33:26','A06A05','A06','1','inner_user','员工报销','rootA02','物料耗材（保洁类）','2c9358ad74ae69160174b3e57b770190','物料耗材（保洁类）');
INSERT INTO `t_b_budget_bus_measure_config` (`id`,`create_name`,`create_by`,`create_date`,`update_name`,`update_by`,`update_date`,`sys_org_code`,`sys_company_code`,`bpm_status`,`bus_type`,`bus_name`,`config_item`,`config_item_name`,`measure_id`,`measure_name`) VALUES ('4','朱浩军','1698','2020-12-24 22:23:01','朱浩军','1698','2020-12-24 22:24:05','A06A05','A06','1','inner_user','员工报销','rootA04A05','固定资产（保洁类）','2c9358ad74ae69160174b3de5486014c','固定资产（保洁类）');
INSERT INTO `t_b_budget_bus_measure_config` (`id`,`create_name`,`create_by`,`create_date`,`update_name`,`update_by`,`update_date`,`sys_org_code`,`sys_company_code`,`bpm_status`,`bus_type`,`bus_name`,`config_item`,`config_item_name`,`measure_id`,`measure_name`) VALUES ('40281281768353f4017683630a39000c','朱浩军','1698','2020-12-21 11:41:15','朱浩军','1698','2020-12-24 22:19:29','A06A05','A06','1','tmp_company','对外付款','rootA04A01','固定资产（办公类）','2c9358ad74ae69160174b3de2dac014a','固定资产（办公类）');
INSERT INTO `t_b_budget_bus_measure_config` (`id`,`create_name`,`create_by`,`create_date`,`update_name`,`update_by`,`update_date`,`sys_org_code`,`sys_company_code`,`bpm_status`,`bus_type`,`bus_name`,`config_item`,`config_item_name`,`measure_id`,`measure_name`) VALUES ('40281281768353f401768363eaa60010','朱浩军','1698','2020-12-21 11:42:12','朱浩军','1698','2020-12-24 22:33:26','A06A05','A06','1','tmp_company','对外付款','rootA02','物料耗材（保洁类）','2c9358ad74ae69160174b3e57b770190','物料耗材（保洁类）');
INSERT INTO `t_b_budget_bus_measure_config` (`id`,`create_name`,`create_by`,`create_date`,`update_name`,`update_by`,`update_date`,`sys_org_code`,`sys_company_code`,`bpm_status`,`bus_type`,`bus_name`,`config_item`,`config_item_name`,`measure_id`,`measure_name`) VALUES ('40281281768d59f001768d659be60001','朱浩军','1698','2020-12-23 10:20:15','朱浩军','1698','2020-12-25 08:52:02','A06A05','A06','1','cloth','服装管理','cloth','服装申领','2c9358ad74ae69160174afac2722001c','经营指标');
INSERT INTO `t_b_budget_bus_measure_config` (`id`,`create_name`,`create_by`,`create_date`,`update_name`,`update_by`,`update_date`,`sys_org_code`,`sys_company_code`,`bpm_status`,`bus_type`,`bus_name`,`config_item`,`config_item_name`,`measure_id`,`measure_name`) VALUES ('4028128176950b9e01769521af4c0019','朱浩军','1698','2020-12-24 22:23:01','朱浩军','1698','2020-12-24 22:24:05','A06A05','A06','1','tmp_company','对外付款','rootA04A05','固定资产（保洁类）','2c9358ad74ae69160174b3de5486014c','固定资产（保洁类）');
INSERT INTO `t_b_budget_bus_measure_config` (`id`,`create_name`,`create_by`,`create_date`,`update_name`,`update_by`,`update_date`,`sys_org_code`,`sys_company_code`,`bpm_status`,`bus_type`,`bus_name`,`config_item`,`config_item_name`,`measure_id`,`measure_name`) VALUES ('4028128176950b9e017695240369001c','朱浩军','1698','2020-12-24 22:25:34',NULL,NULL,NULL,'A06A05','A06','1','tmp_company','对外付款','rootA04A02','固定资产（保安类）','2c9358ad74ae69160174b3de8229014e','固定资产（保安类）');
INSERT INTO `t_b_budget_bus_measure_config` (`id`,`create_name`,`create_by`,`create_date`,`update_name`,`update_by`,`update_date`,`sys_org_code`,`sys_company_code`,`bpm_status`,`bus_type`,`bus_name`,`config_item`,`config_item_name`,`measure_id`,`measure_name`) VALUES ('4028128176950b9e017695249c85001e','朱浩军','1698','2020-12-24 22:26:13',NULL,NULL,NULL,'A06A05','A06','1','tmp_company','对外付款','rootA04A03','固定资产（工程类）','2c9358ad74ae69160174b3deafbe0150','固定资产（工程类）');
INSERT INTO `t_b_budget_bus_measure_config` (`id`,`create_name`,`create_by`,`create_date`,`update_name`,`update_by`,`update_date`,`sys_org_code`,`sys_company_code`,`bpm_status`,`bus_type`,`bus_name`,`config_item`,`config_item_name`,`measure_id`,`measure_name`) VALUES ('4028128176950b9e017695254d240020','朱浩军','1698','2020-12-24 22:26:58',NULL,NULL,NULL,'A06A05','A06','1','tmp_company','对外付款','rootA04A04','固定资产（会务类）','2c9358ad74ae69160174b3dedc010152','固定资产（会务类）');
INSERT INTO `t_b_budget_bus_measure_config` (`id`,`create_name`,`create_by`,`create_date`,`update_name`,`update_by`,`update_date`,`sys_org_code`,`sys_company_code`,`bpm_status`,`bus_type`,`bus_name`,`config_item`,`config_item_name`,`measure_id`,`measure_name`) VALUES ('4028128176950b9e017695261d450022','朱浩军','1698','2020-12-24 22:27:52',NULL,NULL,NULL,'A06A05','A06','1','tmp_company','对外付款','R003A01A01','低值易耗品（办公类）','2c9358ad74ae69160174b3e492620186','低值易耗品（办公类）');
INSERT INTO `t_b_budget_bus_measure_config` (`id`,`create_name`,`create_by`,`create_date`,`update_name`,`update_by`,`update_date`,`sys_org_code`,`sys_company_code`,`bpm_status`,`bus_type`,`bus_name`,`config_item`,`config_item_name`,`measure_id`,`measure_name`) VALUES ('4028128176950b9e01769526c6520024','朱浩军','1698','2020-12-24 22:28:35',NULL,NULL,NULL,'A06A05','A06','1','tmp_company','对外付款','R003A01A05','低值易耗品（保洁类）','2c9358ad74ae69160174b3e4be580188','低值易耗品（保洁类）');
INSERT INTO `t_b_budget_bus_measure_config` (`id`,`create_name`,`create_by`,`create_date`,`update_name`,`update_by`,`update_date`,`sys_org_code`,`sys_company_code`,`bpm_status`,`bus_type`,`bus_name`,`config_item`,`config_item_name`,`measure_id`,`measure_name`) VALUES ('4028128176950b9e01769527622b0026','朱浩军','1698','2020-12-24 22:29:15',NULL,NULL,NULL,'A06A05','A06','1','tmp_company','对外付款','R003A01A02','低值易耗品（保安类）','2c9358ad74ae69160174b3e4ea4e018a','低值易耗品（保安类）');
INSERT INTO `t_b_budget_bus_measure_config` (`id`,`create_name`,`create_by`,`create_date`,`update_name`,`update_by`,`update_date`,`sys_org_code`,`sys_company_code`,`bpm_status`,`bus_type`,`bus_name`,`config_item`,`config_item_name`,`measure_id`,`measure_name`) VALUES ('4028128176950b9e017695285cc40028','朱浩军','1698','2020-12-24 22:30:19',NULL,NULL,NULL,'A06A05','A06','1','tmp_company','对外付款','R003A01A03','低值易耗品（工程类）','2c9358ad74ae69160174b3e514c9018c','低值易耗品（工程类）');
INSERT INTO `t_b_budget_bus_measure_config` (`id`,`create_name`,`create_by`,`create_date`,`update_name`,`update_by`,`update_date`,`sys_org_code`,`sys_company_code`,`bpm_status`,`bus_type`,`bus_name`,`config_item`,`config_item_name`,`measure_id`,`measure_name`) VALUES ('4028128176950b9e01769528d268002a','朱浩军','1698','2020-12-24 22:30:49',NULL,NULL,NULL,'A06A05','A06','1','tmp_company','对外付款','R003A01A04','低值易耗品（会务类）','2c9358ad74ae69160174b3e53f01018e','低值易耗品（会务类）');
INSERT INTO `t_b_budget_bus_measure_config` (`id`,`create_name`,`create_by`,`create_date`,`update_name`,`update_by`,`update_date`,`sys_org_code`,`sys_company_code`,`bpm_status`,`bus_type`,`bus_name`,`config_item`,`config_item_name`,`measure_id`,`measure_name`) VALUES ('4028128176950b9e0176952bf617002e','朱浩军','1698','2020-12-24 22:34:15',NULL,NULL,NULL,'A06A05','A06','1','tmp_company','对外付款','rootA10','物料耗材（保安类）','2c9358ad74ae69160174b3e5ab210192','物料耗材（保安类）');
INSERT INTO `t_b_budget_bus_measure_config` (`id`,`create_name`,`create_by`,`create_date`,`update_name`,`update_by`,`update_date`,`sys_org_code`,`sys_company_code`,`bpm_status`,`bus_type`,`bus_name`,`config_item`,`config_item_name`,`measure_id`,`measure_name`) VALUES ('4028128176950b9e0176952c8b160030','朱浩军','1698','2020-12-24 22:34:53',NULL,NULL,NULL,'A06A05','A06','1','tmp_company','对外付款','rootA01','物料耗材（工程类）','2c9358ad74ae69160174b3e5d3370194','物料耗材（工程类）');
INSERT INTO `t_b_budget_bus_measure_config` (`id`,`create_name`,`create_by`,`create_date`,`update_name`,`update_by`,`update_date`,`sys_org_code`,`sys_company_code`,`bpm_status`,`bus_type`,`bus_name`,`config_item`,`config_item_name`,`measure_id`,`measure_name`) VALUES ('4028128176950b9e0176952d03530032','朱浩军','1698','2020-12-24 22:35:24',NULL,NULL,NULL,'A06A05','A06','1','tmp_company','对外付款','rootA03','物料耗材（办公类）','2c9358ad74ae69160174b3e5ffbb0196','物料耗材（办公类）');
INSERT INTO `t_b_budget_bus_measure_config` (`id`,`create_name`,`create_by`,`create_date`,`update_name`,`update_by`,`update_date`,`sys_org_code`,`sys_company_code`,`bpm_status`,`bus_type`,`bus_name`,`config_item`,`config_item_name`,`measure_id`,`measure_name`) VALUES ('4028128176950b9e0176952d90de0034','朱浩军','1698','2020-12-24 22:36:00',NULL,NULL,NULL,'A06A05','A06','1','tmp_company','对外付款','rootA08','物料耗材（会务类）','2c9358ad74ae69160174b3e6251c0198','物料耗材（会务类）');
INSERT INTO `t_b_budget_bus_measure_config` (`id`,`create_name`,`create_by`,`create_date`,`update_name`,`update_by`,`update_date`,`sys_org_code`,`sys_company_code`,`bpm_status`,`bus_type`,`bus_name`,`config_item`,`config_item_name`,`measure_id`,`measure_name`) VALUES ('5','朱浩军','1698','2020-12-24 22:25:34',NULL,NULL,NULL,'A06A05','A06','1','inner_user','员工报销','rootA04A02','固定资产（保安类）','2c9358ad74ae69160174b3de8229014e','固定资产（保安类）');
INSERT INTO `t_b_budget_bus_measure_config` (`id`,`create_name`,`create_by`,`create_date`,`update_name`,`update_by`,`update_date`,`sys_org_code`,`sys_company_code`,`bpm_status`,`bus_type`,`bus_name`,`config_item`,`config_item_name`,`measure_id`,`measure_name`) VALUES ('6','朱浩军','1698','2020-12-24 22:26:13',NULL,NULL,NULL,'A06A05','A06','1','inner_user','员工报销','rootA04A03','固定资产（工程类）','2c9358ad74ae69160174b3deafbe0150','固定资产（工程类）');
INSERT INTO `t_b_budget_bus_measure_config` (`id`,`create_name`,`create_by`,`create_date`,`update_name`,`update_by`,`update_date`,`sys_org_code`,`sys_company_code`,`bpm_status`,`bus_type`,`bus_name`,`config_item`,`config_item_name`,`measure_id`,`measure_name`) VALUES ('7','朱浩军','1698','2020-12-24 22:26:58',NULL,NULL,NULL,'A06A05','A06','1','inner_user','员工报销','rootA04A04','固定资产（会务类）','2c9358ad74ae69160174b3dedc010152','固定资产（会务类）');
INSERT INTO `t_b_budget_bus_measure_config` (`id`,`create_name`,`create_by`,`create_date`,`update_name`,`update_by`,`update_date`,`sys_org_code`,`sys_company_code`,`bpm_status`,`bus_type`,`bus_name`,`config_item`,`config_item_name`,`measure_id`,`measure_name`) VALUES ('8','朱浩军','1698','2020-12-24 22:27:52',NULL,NULL,NULL,'A06A05','A06','1','inner_user','员工报销','R003A01A01','低值易耗品（办公类）','2c9358ad74ae69160174b3e492620186','低值易耗品（办公类）');
INSERT INTO `t_b_budget_bus_measure_config` (`id`,`create_name`,`create_by`,`create_date`,`update_name`,`update_by`,`update_date`,`sys_org_code`,`sys_company_code`,`bpm_status`,`bus_type`,`bus_name`,`config_item`,`config_item_name`,`measure_id`,`measure_name`) VALUES ('9','朱浩军','1698','2020-12-24 22:28:35',NULL,NULL,NULL,'A06A05','A06','1','inner_user','员工报销','R003A01A05','低值易耗品（保洁类）','2c9358ad74ae69160174b3e4be580188','低值易耗品（保洁类）');
INSERT INTO `t_b_budget_bus_measure_config` (`id`,`create_name`,`create_by`,`create_date`,`update_name`,`update_by`,`update_date`,`sys_org_code`,`sys_company_code`,`bpm_status`,`bus_type`,`bus_name`,`config_item`,`config_item_name`,`measure_id`,`measure_name`) VALUES ('40281281769719890176978a06c00024','朱浩军','1698','2020-12-25 09:36:14',NULL,NULL,NULL,'A06A05','A06','1','inner_user','员工报销','A01A11A07','物料耗材（代采购）','2c9358ad74ae69160174b4974ed601f4','物料耗材（代采购）');
INSERT INTO `t_b_budget_bus_measure_config` (`id`,`create_name`,`create_by`,`create_date`,`update_name`,`update_by`,`update_date`,`sys_org_code`,`sys_company_code`,`bpm_status`,`bus_type`,`bus_name`,`config_item`,`config_item_name`,`measure_id`,`measure_name`) VALUES ('40281281769719890176978a8ecf0026','朱浩军','1698','2020-12-25 09:36:49',NULL,NULL,NULL,'A06A05','A06','1','tmp_company','对外付款','A01A11A07','物料耗材（代采购）','2c9358ad74ae69160174b4974ed601f4','物料耗材（代采购）');

#服装申请增加金额
ALTER TABLE `t_b_clothing_apply_detail`
ADD COLUMN `price` DECIMAL(10,2) NULL COMMENT '单价' ,
ADD COLUMN `money` DECIMAL(10,2) NULL COMMENT '金额' ;

ALTER TABLE `t_b_clothing_apply` ADD COLUMN `total_money` DECIMAL(10,2) NULL;

ALTER TABLE `t_b_activiti_cost_request_hr`
CHANGE COLUMN `cost_type` `measure_id` VARCHAR(32) NULL DEFAULT NULL COMMENT '指标id' ,
CHANGE COLUMN `cost_type_name` `measure_name` VARCHAR(255) NULL DEFAULT NULL COMMENT '指标名称' ;

ALTER TABLE `t_b_activiti_cost_request_other`
CHANGE COLUMN `cost_type` `measure_id` VARCHAR(32) NULL DEFAULT NULL COMMENT '指标id' ,
CHANGE COLUMN `cost_type_name` `measure_name` VARCHAR(255) NULL DEFAULT NULL COMMENT '指标名称' ;

ALTER TABLE `t_b_activiti_cost_request_pu`
CHANGE COLUMN `cost_type` `measure_id` VARCHAR(32) NULL DEFAULT NULL COMMENT '指标id' ,
CHANGE COLUMN `cost_type_name` `measure_name` VARCHAR(255) NULL DEFAULT NULL COMMENT '指标名称' ;

ALTER TABLE `t_b_budget_write_back_log`
ADD COLUMN `config_item` VARCHAR(255) NULL COMMENT '业务配置项' AFTER `bus_type`,
ADD COLUMN `depart_id` VARCHAR(45) NULL COMMENT '组织机构id' AFTER `config_item`,
ADD COLUMN `budget_month` VARCHAR(45) NULL COMMENT '计入预算月份' AFTER `depart_id`;

INSERT INTO `t_s_timetask` (`ID`,`CREATE_BY`,`CREATE_DATE`,`CREATE_NAME`,`CRON_EXPRESSION`,`IS_EFFECT`,`IS_START`,`TASK_DESCRIBE`,`TASK_ID`,`UPDATE_BY`,`UPDATE_DATE`,`UPDATE_NAME`,`CLASS_NAME`,`RUN_SERVER_IP`,`RUN_SERVER`) VALUES ('402812817698be17017698c2a2790001','admin','2020-12-25 15:17:41','管理员','0 0 3 * * ?','1','0','预算执行表维度公式计算','BudgetActualTimeTask',NULL,NULL,NULL,'cn.com.lzt.budget.data.service.BudgetActualTimeTask','本地','本地');

ALTER TABLE `t_b_budget_tempsheet_measure` ADD COLUMN `entity_id` VARCHAR(45) NULL;
ALTER TABLE `t_b_budget_tempsheet_measure` ADD COLUMN `dependents` VARCHAR(500) NULL COMMENT '依赖该单元的单元格,格式row#col,'
ALTER TABLE `t_b_budget_inst_measure` ADD COLUMN `entity_id` VARCHAR(45) NULL;
ALTER TABLE `t_b_budget_inst_measure` ADD COLUMN `dependents` VARCHAR(500) NULL COMMENT '依赖该单元的单元格,格式row#col,';

CREATE DEFINER=`root`@`localhost` PROCEDURE `budget_tempsheet_add_column`(in columnName varchar(255),in columnType varchar(255))
BEGIN
 DECLARE _tableName varchar(255) default '';
 DECLARE _done INT DEFAULT 0;
 DECLARE _cur CURSOR FOR (select tempsheet_measure_table from t_b_budget_tempsheet);
 DECLARE CONTINUE HANDLER FOR NOT FOUND SET _done=1;	#声明当游标遍历完后将标志变量置成某个值
 OPEN _cur;

		FETCH _cur INTO _tableName;
        	while _done<>1 do
					SET @STMT := CONCAT("ALTER TABLE ",_tableName," ADD COLUMN ",columnName," ",columnType," ;");
					PREPARE STMT FROM @STMT;
					EXECUTE STMT;
                    FETCH _cur INTO _tableName;
			end while;
	close _cur;
    #call budget_tempsheet_add_column('entity_id','varchar(255)');
END;
CREATE DEFINER=`root`@`localhost` PROCEDURE `budget_inst_add_column`(in columnName varchar(255),in columnType varchar(255))
BEGIN
 DECLARE _tableName varchar(255) default '';
 DECLARE _done INT DEFAULT 0;
 DECLARE _cur CURSOR FOR (select inst_measure_table_name from t_b_budget_inst);
 DECLARE CONTINUE HANDLER FOR NOT FOUND SET _done=1;	#声明当游标遍历完后将标志变量置成某个值
 OPEN _cur;

		FETCH _cur INTO _tableName;
        	while _done<>1 do
					SET @STMT := CONCAT("ALTER TABLE ",_tableName," ADD COLUMN ",columnName," ",columnType," ;");
					PREPARE STMT FROM @STMT;
					EXECUTE STMT;
                    FETCH _cur INTO _tableName;
			end while;
	close _cur;
    #call budget_inst_add_column('entity_id','varchar(255)');
END;

call budget_tempsheet_add_column('entity_id','varchar(255)');
call budget_tempsheet_add_column('effect_cell','varchar(255)');
call budget_inst_add_column('entity_id','varchar(255)');
call budget_inst_add_column('effect_cell','varchar(255)');

UPDATE `t_b_budget_measure` SET `custom_code`='A01A16A06', code = 'A01A16A06',`parent_id`='2c9358ad74ae69160174b3bf79ac0054' WHERE `id`='2c9358ad74ae69160174b3eef4c901ea';
UPDATE `t_b_budget_measure` SET `custom_code`='A01A16A01A05', code='A01A16A01A05',`parent_id`='2c9358ad74ae69160174b3ed672b01da' WHERE `id`='2c9358ad758842bf0175abdc45c800cd';
UPDATE `t_b_budget_measure` SET `code`='A01A16A02', `custom_code`='A01A16A02', `parent_id`='2c9358ad74ae69160174b3bf79ac0054' WHERE `id`='2c9358ad74ae69160174b3ee33dd01e2';
UPDATE `t_b_budget_measure` SET `code`='A01A16A01A01', `custom_code`='A01A16A01A01', `parent_id`='2c9358ad74ae69160174b3ed672b01da' WHERE `id`='2c9358ad758842bf0175abdb2ed300c5';

ALTER TABLE `t_b_activiti_cost_pay_inner_user_detail` ADD COLUMN `show_dep` VARCHAR(4000) NULL;

#外包合同付款回写
ALTER TABLE `t_b_contract_payment` ADD COLUMN `budget_month` VARCHAR(45) NULL COMMENT '预算月份';

ALTER TABLE `t_b_budget_inst_measure_version` ADD COLUMN `entity_id` VARCHAR(45) NULL;

#预算表查看控制
CREATE TABLE `t_b_budget_control_entity` (
  `id` VARCHAR(32) NOT NULL,
  `name` VARCHAR(45) NULL,
  `period_year` VARCHAR(45) NULL COMMENT '年份',
  `entity_id` VARCHAR(45) NULL COMMENT '预算主体',
  `control` VARCHAR(45) NULL COMMENT '0不控制 1 控制 ',
  PRIMARY KEY (`id`))
COMMENT = '预算主体控制';
INSERT INTO `t_b_budget_control_entity` (`id`,`name`,`period_year`,`entity_id`,`control`) VALUES ('1',NULL,'2021','ff80808175cbdf550175cc05fd2b0019','1');
INSERT INTO `t_b_budget_control_entity` (`id`,`name`,`period_year`,`entity_id`,`control`) VALUES ('2',NULL,'2021','ff80808175cbdf550175cc05fd2c0028','1');
INSERT INTO `t_b_budget_control_entity` (`id`,`name`,`period_year`,`entity_id`,`control`) VALUES ('3',NULL,'2021','ff80808175cbdf550175cc05fd2d0029','1');
INSERT INTO `t_b_budget_control_entity` (`id`,`name`,`period_year`,`entity_id`,`control`) VALUES ('4',NULL,'2021','ff80808175cbdf550175cc05fd2e0031','1');
INSERT INTO `t_b_budget_control_entity` (`id`,`name`,`period_year`,`entity_id`,`control`) VALUES ('5',NULL,'2021','ff80808175cbdf550175cc05fd2b001e','1');
INSERT INTO `t_b_budget_control_entity` (`id`,`name`,`period_year`,`entity_id`,`control`) VALUES ('6',NULL,'2021','ff80808175cbdf550175cc05fd320054','1');


ALTER TABLE `t_b_budget_tempsheet` ADD COLUMN `actual_sta_kind` VARCHAR(45) NULL COMMENT '执行统计表类型';
ALTER TABLE `t_b_budget_inst` ADD COLUMN `actual_sta_kind` VARCHAR(45) NULL;
INSERT INTO `t_b_budget_entity` (`id`,`depart_id`,`create_by`,`create_name`,`sys_company_code`,`budget_user_realname`,`update_by`,`dep_name`,`entity_name`,`sys_org_code`,`bpm_status`,`create_date`,`update_name`,`update_date`,`entity_user_id`,`parent_id`,`type`,`is_leaf`) VALUES ('4028e4a55f6c84ec015f6ca5c6ab0001','4028e4a55f6c84ec015f6ca5c6ab0001',NULL,NULL,NULL,NULL,NULL,'上海美都环卫物业管理有限公司','上海美都环卫物业管理有限公司','A00','1','2020-09-08 15:51:42',NULL,NULL,NULL,NULL,NULL,1);
INSERT INTO `t_s_typegroup` (`ID`, `typegroupcode`, `typegroupname`, `create_date`, `create_name`) VALUES ('4028128176b11dfb0176b1486f0c000a','budget_actual_sta_kind','预算执行统计表类型','2020-12-30 09:34:43','管理员');
INSERT INTO `t_s_type` (`ID`, `typecode`, `typename`, `typepid`, `typegroupid`, `create_date`, `create_name`) VALUES ('4028128176b11dfb0176b1491f7b000c','main','预算执行总表',NULL,'4028128176b11dfb0176b1486f0c000a','2020-12-30 09:35:28','管理员'),('4028128176b11dfb0176b14997d4000e','labor','预算执行表-人工',NULL,'4028128176b11dfb0176b1486f0c000a','2020-12-30 09:35:59','管理员'),('4028128176b11dfb0176b149d5780010','pu','预算执行表-采购',NULL,'4028128176b11dfb0176b1486f0c000a','2020-12-30 09:36:15','管理员'),('4028128176b11dfb0176b14a8bc90012','maintain','预算执行表-维保',NULL,'4028128176b11dfb0176b1486f0c000a','2020-12-30 09:37:01','管理员'),('4028128176b11dfb0176b14ac03a0014','other','预算执行表-其他费用',NULL,'4028128176b11dfb0176b1486f0c000a','2020-12-30 09:37:15','管理员'),('4028128176b11dfb0176b14bc6a30016','manage','预算执行表-管理费用',NULL,'4028128176b11dfb0176b1486f0c000a','2020-12-30 09:38:22','管理员');

update t_b_activiti_cost_pay_tmp_company set source_type = 'pOrder' where source_type='pOrders';

#月度申购审批时可修改供应商
ALTER TABLE `t_b_order_products`
ADD COLUMN `supplier_id` VARCHAR(45) NULL COMMENT '供应商',
ADD COLUMN `supplier_name` VARCHAR(255) NULL;
update t_b_order_products p set p.supplier_id = (select g.default_provider from t_b_goods_info g  where g.id = p.goods_id);
update t_b_order_products p set p.supplier_name = (select unit.unit_name from t_b_related_units unit where p.supplier_id = unit.id);

ALTER TABLE `t_b_activiti_cost_pay_tmp_company` ADD COLUMN `show_measure_name` VARCHAR(255) NULL COMMENT '展示指标';
ALTER TABLE `t_b_activiti_cost_pay_inner_user_detail` ADD COLUMN `show_measure_name` VARCHAR(255) NULL;

update t_b_activiti_cost_pay_tmp_company tmp set tmp.show_measure_name = (
  select t.name from t_b_activiti_cost_request h,t_b_cost_type t where h.id = tmp.request_id and h.cost_type=t.id
) where source_type='cost_request';

update t_b_activiti_cost_pay_tmp_company tmp set tmp.show_measure_name = (
  select m.name from t_b_budget_measure m,t_b_activiti_cost_request_hr h where h.id = tmp.request_id and m.id = h.measure_id
) where source_type='cost_request_hr';
update t_b_activiti_cost_pay_tmp_company tmp set tmp.show_measure_name = (
  select m.name from t_b_budget_measure m,t_b_activiti_cost_request_pu h where h.id = tmp.request_id and m.id = h.measure_id
) where source_type='cost_request_pu';
update t_b_activiti_cost_pay_tmp_company tmp set tmp.show_measure_name = (
  select m.name from t_b_budget_measure m,t_b_activiti_cost_request_other h where h.id = tmp.request_id and m.id = h.measure_id
) where source_type='cost_request_other';

update t_b_activiti_cost_pay_inner_user_detail tmp set tmp.show_measure_name = (
  select t.name from t_b_activiti_cost_request h,t_b_cost_type t where h.id = tmp.request_id and h.cost_type=t.id
) where source_type='cost_request';

update t_b_activiti_cost_pay_inner_user_detail tmp set tmp.show_measure_name = (
  select m.name from t_b_budget_measure m,t_b_activiti_cost_request_hr h where h.id = tmp.request_id and m.id = h.measure_id
) where source_type='cost_request_hr';
update t_b_activiti_cost_pay_inner_user_detail tmp set tmp.show_measure_name = (
  select m.name from t_b_budget_measure m,t_b_activiti_cost_request_pu h where h.id = tmp.request_id and m.id = h.measure_id
) where source_type='cost_request_pu';
update t_b_activiti_cost_pay_inner_user_detail tmp set tmp.show_measure_name = (
  select m.name from t_b_budget_measure m,t_b_activiti_cost_request_other h where h.id = tmp.request_id and m.id = h.measure_id
) where source_type='cost_request_other';

#每月16日回写上月确认工资
INSERT INTO t_s_timetask(ID, CREATE_BY, CREATE_DATE, CREATE_NAME, CRON_EXPRESSION, IS_EFFECT, IS_START, TASK_DESCRIBE, TASK_ID, UPDATE_BY, UPDATE_DATE, UPDATE_NAME, CLASS_NAME, RUN_SERVER_IP, RUN_SERVER) VALUES ('4028d68177183d620177183fc1470001', 'admin', '2021-01-19 09:26:07', '管理员', '0 0 0 16 * ?', '0', '0', '每月16日回写上月确认工资', 'BudgetUserWageConfirmWritebackTask', null, null, null, 'cn.com.lzt.budget.data.timetask.BudgetUserWageConfirmWritebackTask', '127.0.0.1', '127.0.0.1');
ALTER TABLE `t_b_budget_write_back_log`
ADD INDEX `bustype` (`bus_type` ASC),
ADD INDEX `create_date` (`create_date` ASC);

#财务补录
CREATE TABLE `t_b_budget_finance_write_back` (
  `id` varchar(36) NOT NULL,
  `create_name` varchar(50) DEFAULT NULL COMMENT '创建人名称',
  `create_by` varchar(50) DEFAULT NULL COMMENT '创建人登录名称',
  `create_date` datetime DEFAULT NULL COMMENT '创建日期',
  `update_name` varchar(50) DEFAULT NULL COMMENT '更新人名称',
  `update_by` varchar(50) DEFAULT NULL COMMENT '更新人登录名称',
  `update_date` datetime DEFAULT NULL COMMENT '更新日期',
  `sys_org_code` varchar(50) DEFAULT NULL COMMENT '所属部门',
  `sys_company_code` varchar(50) DEFAULT NULL COMMENT '所属公司',
  `bpm_status` varchar(32) DEFAULT '1' COMMENT '流程状态',
  `code` varchar(32) DEFAULT NULL COMMENT '编码',
  `total_money` double DEFAULT NULL COMMENT '总金额',
  `budget_month` varchar(32) DEFAULT NULL COMMENT '计入月度',
  `status` int(11) DEFAULT NULL COMMENT '状态',
  `remark` longtext COMMENT '备注',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='预算财务补录';

CREATE TABLE `t_b_budget_finance_write_back_detail` (
  `id` varchar(36) NOT NULL,
  `create_name` varchar(50) DEFAULT NULL COMMENT '创建人名称',
  `create_by` varchar(50) DEFAULT NULL COMMENT '创建人登录名称',
  `create_date` datetime DEFAULT NULL COMMENT '创建日期',
  `update_name` varchar(50) DEFAULT NULL COMMENT '更新人名称',
  `update_by` varchar(50) DEFAULT NULL COMMENT '更新人登录名称',
  `update_date` datetime DEFAULT NULL COMMENT '更新日期',
  `sys_org_code` varchar(50) DEFAULT NULL COMMENT '所属部门',
  `sys_company_code` varchar(50) DEFAULT NULL COMMENT '所属公司',
  `bpm_status` varchar(32) DEFAULT '1' COMMENT '流程状态',
  `fk_id` varchar(32) DEFAULT NULL COMMENT '主表id',
  `entity_id` varchar(32) DEFAULT NULL COMMENT '预算主体id',
  `entity_name` varchar(32) DEFAULT NULL COMMENT '预算主体',
  `measure_id` varchar(32) DEFAULT NULL COMMENT '预算指标id',
  `measure_name` varchar(32) DEFAULT NULL COMMENT '预算指标',
  `money` double DEFAULT NULL COMMENT '金额',
  `remark` longtext COMMENT '明细',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='预算财务补录详情';

INSERT INTO `t_s_function` (`ID`, `functioniframe`, `functionlevel`, `functionname`, `functionorder`, `functionurl`, `parentfunctionid`, `iconid`, `desk_iconid`, `functiontype`, `function_icon_style`, `create_by`, `create_name`, `update_by`, `update_date`, `create_date`, `update_name`, `remark`) VALUES ('4028d681771d4ec501771d538ce70001',NULL,1,'财务补录','85','budgetFinanceWriteBackController.do?list','402881e57307f46c017307f7e7990001','8a8ab0b246dc81120146dc8180460000','8a8ab0b246dc81120146dc8180dd001e',0,'','admin','管理员',NULL,NULL,'2021-01-20 09:05:51',NULL,'财务补录');

UPDATE t_process_busconfig SET `activiti_config_class`='cn.com.lzt.useractiviti.data.util.tools.OrdersActivitiTools' WHERE `id`='ff80808166106df501661396fd6e08a9';
UPDATE `t_process_busconfig` SET `activiti_config_class`='cn.com.lzt.useractiviti.data.util.tools.OrdersFixassetActivitiTools' WHERE `id`='402881e570eb5e200170eb87800e001a';
