ALTER TABLE `t_b_budget_tempsheet` ADD COLUMN `is_total` VARCHAR(45) NULL COMMENT '是否总表';
ALTER TABLE `t_b_budget_write_back_log` ADD COLUMN `expect` INT NULL;
update t_b_budget_write_back_log set expect = 1;

CREATE TABLE `t_b_budget_adjust` (
  `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(32) DEFAULT NULL COMMENT '流程id',
  `step_name` varchar(32) DEFAULT NULL COMMENT '步骤名称',
  `code` varchar(32) DEFAULT NULL COMMENT '编码',
  `entity_ids` varchar(500) DEFAULT NULL COMMENT '预算主体id',
  `entity_names` varchar(500) DEFAULT NULL COMMENT '预算主体名称',
  `period_detail_id` varchar(32) DEFAULT NULL COMMENT '时间周期id',
  `period_detail_name` varchar(255) DEFAULT NULL COMMENT '时间周期名称',
  `total_money` decimal(10,2) DEFAULT NULL COMMENT '总金额',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='预算调整';
CREATE TABLE `t_b_budget_adjust_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 '流程状态',
  `entity_id` varchar(32) DEFAULT NULL COMMENT '预算主体id',
  `entity_name` varchar(255) DEFAULT NULL COMMENT '预算主体名称',
  `measure_id` varchar(32) DEFAULT NULL COMMENT '指标id',
  `measure_name` varchar(255) DEFAULT NULL COMMENT '指标名称',
  `fk_id` varchar(32) DEFAULT NULL COMMENT '主表id',
  `suggest_money` decimal(10,2) DEFAULT NULL COMMENT '建议增加金额',
  `reason` varchar(500) DEFAULT NULL COMMENT '调整理由',
  `measure_value` decimal(10,2) DEFAULT NULL COMMENT '已配置预算',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='预算调整详情';

CREATE TABLE `t_b_activiti_cost_request_special_budget` (
  `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 '编码',
  `measure_id` varchar(32) DEFAULT NULL COMMENT '指标id',
  `measure_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='专项预算费用申请签报';

drop table if exists t_b_budget_control;
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='预算控制';

CREATE TABLE `t_b_budget_control_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 '流程状态',
  `measure_id` varchar(32) DEFAULT NULL COMMENT '预算指标id',
  `measure_name` varchar(255) DEFAULT NULL COMMENT '预算指标',
  `control_period` varchar(32) DEFAULT NULL COMMENT '控制周期',
  `control_nature` varchar(32) DEFAULT NULL COMMENT '控制性质',
  `control_per` double DEFAULT NULL COMMENT '弹性系数',
  `control_way` varchar(32) DEFAULT NULL COMMENT '控制种属',
  `fk_id` varchar(32) DEFAULT NULL COMMENT '主表id',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='预算控制详情';

CREATE TABLE `t_b_budget_control_publish` (
  `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 '流程状态',
  `control_id` varchar(32) DEFAULT NULL COMMENT '控制方案id',
  `control_name` varchar(255) DEFAULT NULL COMMENT '控制方案',
  `entity_id` varchar(32) DEFAULT NULL COMMENT '预算主体id',
  `entity_name` varchar(255) DEFAULT NULL COMMENT '预算主体',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='预算控制发布';

INSERT INTO `t_s_typegroup` (`ID`, `typegroupcode`, `typegroupname`, `create_date`, `create_name`) VALUES ('4028d68177a45da80177a5ba92c2001a','budget_control_period','预算控制周期','2021-02-15 20:46:44','管理员'),('4028d68177a45da80177a5bc0f9d0022','budget_control_nature','预算控制性质','2021-02-15 20:48:21','管理员'),('4028d68177a45da80177a5bd15e00028','budget_control_way','预算控制种属','2021-02-15 20:49:29','管理员');
INSERT INTO `t_s_type` (`ID`, `typecode`, `typename`, `typepid`, `typegroupid`, `create_date`, `create_name`) VALUES ('4028d681779f1d4e01779f30a21a0001','budget_adjust','预算调整',NULL,'402889fe47eddd340147ede15c070001','2021-02-14 14:18:21','管理员'),('4028d681779f1d4e01779f316a7d0003','budget_adjust','预算调整',NULL,'4028819b65a8b81c0165a9182bee0015','2021-02-14 14:19:12','管理员'),('4028d68177a31f670177a43376b50010','cost_request_special_budget','专项预算费用申请',NULL,'402889fe47eddd340147ede15c070001','2021-02-15 13:39:32','管理员'),('4028d68177a31f670177a433ad1d0012','cost_request_special_budget','专项预算费用申请',NULL,'4028819b65a8b81c0165a9182bee0015','2021-02-15 13:39:46','管理员'),('4028d68177a45da80177a5bae087001c','year','年度',NULL,'4028d68177a45da80177a5ba92c2001a','2021-02-15 20:47:04','管理员'),('4028d68177a45da80177a5bb249d001e','quarter','季度',NULL,'4028d68177a45da80177a5ba92c2001a','2021-02-15 20:47:21','管理员'),('4028d68177a45da80177a5bb3f5a0020','month','月度',NULL,'4028d68177a45da80177a5ba92c2001a','2021-02-15 20:47:28','管理员'),('4028d68177a45da80177a5bc62cf0024','gang','刚性',NULL,'4028d68177a45da80177a5bc0f9d0022','2021-02-15 20:48:43','管理员'),('4028d68177a45da80177a5bc87610026','rou','柔性',NULL,'4028d68177a45da80177a5bc0f9d0022','2021-02-15 20:48:52','管理员'),('4028d68177a45da80177a5bdba30002a','total','总额控制',NULL,'4028d68177a45da80177a5bd15e00028','2021-02-15 20:50:11','管理员'),('4028d68177a45da80177a5bdde7d002c','single','单项控制',NULL,'4028d68177a45da80177a5bd15e00028','2021-02-15 20:50:20','管理员'),('4028d68177a45da80177a5be1da6002e','no','不控制',NULL,'4028d68177a45da80177a5bd15e00028','2021-02-15 20:50:36','管理员'),('4040c4c178aaf4a70178ab2767a60006','leader','闵总视图预算执行表',NULL,'4028128176b11dfb0176b1486f0c000a','2021-04-07 15:06:30','管理员');
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 ('4028d681779f1d4e01779f3337a60005',NULL,1,'预算调整','90','budgetAdjustController.do?list','402881e57307f46c017307f7e7990001','8a8ab0b246dc81120146dc8180460000','8a8ab0b246dc81120146dc8180dd001e',0,'','admin','管理员','admin','2021-02-14 14:21:23','2021-02-14 14:21:10','管理员',''),('4028d68177a31f670177a432684e000e',NULL,1,'专项预算费用申请签报','46','activitiCostRequestSpecialBudgetController.do?list','ff8080816e687d71016e68822fbe0002','8a8ab0b246dc81120146dc8180460000','8a8ab0b246dc81120146dc8180dd001e',0,'','admin','管理员',NULL,NULL,'2021-02-15 13:38:23',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 ('4028d681779f1d4e01779f37b0a40009','budget_adjust',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=\"process1613283924266\" 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=\"task1613283943429\" name=\"审批\" activiti:assignee=\"${applyUserId}\" >\r\n        </userTask>\r\n        <sequenceFlow  id=\"flow1613283954783\" name=\"\" sourceRef=\"start1\" targetRef=\"task1613283943429\">\r\n        </sequenceFlow>\r\n        <sequenceFlow  id=\"flow1613283957205\" name=\"通过\" sourceRef=\"task1613283943429\" targetRef=\"end\">\r\n        </sequenceFlow>\r\n    </process>\r\n    <bpmndi:BPMNDiagram id=\"BPMNDiagram_process1613283924266\">\r\n        <bpmndi:BPMNPlane bpmnElement=\"process1613283924266\" id=\"BPMNPlane_process1613283924266\">\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=\"task1613283943429\" id=\"BPMNShape_task1613283943429\">\r\n                <omgdc:Bounds height=\"50\" width=\"90\" x=\"167\" y=\"160\"/>\r\n            </bpmndi:BPMNShape>\r\n            <bpmndi:BPMNEdge bpmnElement=\"flow1613283954783\" id=\"BPMNEdge_flow1613283954783\">\r\n                <omgdi:waypoint x=\"215\" y=\"80\" />\r\n                <omgdi:waypoint x=\"215\" y=\"117\" />\r\n                <omgdi:waypoint x=\"212\" y=\"117\" />\r\n                <omgdi:waypoint x=\"212\" y=\"155\" />\r\n            </bpmndi:BPMNEdge>\r\n            <bpmndi:BPMNEdge bpmnElement=\"flow1613283957205\" id=\"BPMNEdge_flow1613283957205\">\r\n                <omgdi:waypoint x=\"212\" y=\"215\" />\r\n                <omgdi:waypoint x=\"212\" y=\"307\" />\r\n                <omgdi:waypoint x=\"215\" y=\"307\" />\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,'朱浩军','2021-02-14 21:21:04','1698','管理员','2021-02-14 14:26:03','admin','process1613283924266',1,'0',NULL),('4028d68177a31f670177a4379a32001a','cost_request_special_budget',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=\"process1613367732882\" 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=\"task1613367755279\" name=\"审批\" activiti:assignee=\"${applyUserId}\" >\r\n        </userTask>\r\n        <userTask  id=\"task1613367773929\" name=\"制单人重填\" activiti:assignee=\"${applyUserId}\" >\r\n        </userTask>\r\n        <sequenceFlow  id=\"flow1613367797843\" name=\"\" sourceRef=\"start1\" targetRef=\"task1613367755279\">\r\n        </sequenceFlow>\r\n        <sequenceFlow  id=\"flow1613367800694\" name=\"通过\" sourceRef=\"task1613367755279\" targetRef=\"end\">\r\n        </sequenceFlow>\r\n        <sequenceFlow  id=\"flow1613367810173\" name=\"驳回\" sourceRef=\"task1613367755279\" targetRef=\"task1613367773929\">\r\n        </sequenceFlow>\r\n        <sequenceFlow  id=\"flow1613367821143\" name=\"提交\" sourceRef=\"task1613367773929\" targetRef=\"task1613367755279\">\r\n        </sequenceFlow>\r\n    </process>\r\n    <bpmndi:BPMNDiagram id=\"BPMNDiagram_process1613367732882\">\r\n        <bpmndi:BPMNPlane bpmnElement=\"process1613367732882\" id=\"BPMNPlane_process1613367732882\">\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=\"task1613367755279\" id=\"BPMNShape_task1613367755279\">\r\n                <omgdc:Bounds height=\"50\" width=\"90\" x=\"172\" y=\"175\"/>\r\n            </bpmndi:BPMNShape>\r\n            <bpmndi:BPMNShape bpmnElement=\"task1613367773929\" id=\"BPMNShape_task1613367773929\">\r\n                <omgdc:Bounds height=\"50\" width=\"90\" x=\"336\" y=\"175\"/>\r\n            </bpmndi:BPMNShape>\r\n            <bpmndi:BPMNEdge bpmnElement=\"flow1613367797843\" id=\"BPMNEdge_flow1613367797843\">\r\n                <omgdi:waypoint x=\"215\" y=\"80\" />\r\n                <omgdi:waypoint x=\"215\" y=\"125\" />\r\n                <omgdi:waypoint x=\"217\" y=\"125\" />\r\n                <omgdi:waypoint x=\"217\" y=\"170\" />\r\n            </bpmndi:BPMNEdge>\r\n            <bpmndi:BPMNEdge bpmnElement=\"flow1613367800694\" id=\"BPMNEdge_flow1613367800694\">\r\n                <omgdi:waypoint x=\"217\" y=\"230\" />\r\n                <omgdi:waypoint x=\"217\" y=\"315\" />\r\n                <omgdi:waypoint x=\"215\" y=\"315\" />\r\n                <omgdi:waypoint x=\"215\" y=\"400\" />\r\n            </bpmndi:BPMNEdge>\r\n            <bpmndi:BPMNEdge bpmnElement=\"flow1613367810173\" id=\"BPMNEdge_flow1613367810173\">\r\n                <omgdi:waypoint x=\"267\" y=\"200\" />\r\n                <omgdi:waypoint x=\"331\" y=\"200\" />\r\n            </bpmndi:BPMNEdge>\r\n            <bpmndi:BPMNEdge bpmnElement=\"flow1613367821143\" id=\"BPMNEdge_flow1613367821143\">\r\n                <omgdi:waypoint x=\"381\" y=\"170\" />\r\n                <omgdi:waypoint x=\"381\" y=\"150\" />\r\n                <omgdi:waypoint x=\"217\" y=\"150\" />\r\n                <omgdi:waypoint x=\"217\" y=\"170\" />\r\n            </bpmndi:BPMNEdge>\r\n        </bpmndi:BPMNPlane>\r\n    </bpmndi:BPMNDiagram>\r\n</definitions>',NULL,NULL,'管理员','2021-02-15 13:44:28','admin','管理员','2021-02-15 13:44:03','admin','process1613367732882',1,'0',NULL);
INSERT INTO `t_p_processnode` (`id`, `formid`, `processid`, `processnodecode`, `processnodename`, `modelandview`, `modelandview_mobile`, `node_timeout`, `pnodecofigid`, `pushmode`, `delete_flag`) VALUES ('4028d681779f1d4e01779f37b0b8000a',NULL,'4028d681779f1d4e01779f37b0a40009','task1613283943429','审批','budgetAdjustController.do?goView&flag=2','budgetAdjustController.do?goViewMobile&flag=2',NULL,'4028d681779f1d4e01779f3985f9000d','no','0'),('4028d68177a31f670177a4379a41001b',NULL,'4028d68177a31f670177a4379a32001a','task1613367755279','审批','activitiCostRequestSpecialBudgetController.do?goView&flag=2','activitiCostRequestSpecialBudgetController.do?goViewMobile&flag=2',NULL,'4028d68177a31f670177a435dd0e0018','no','0'),('4028d68177a31f670177a4379a4c001c',NULL,'4028d68177a31f670177a4379a32001a','task1613367773929','制单人重填','activitiCostRequestSpecialBudgetController.do?goView&flag=1','activitiCostRequestSpecialBudgetController.do?goViewMobile&flag=1',NULL,'4028d68177a31f670177a4353fb80016','no','0');
INSERT INTO `t_p_processnode_config` (`id`, `process_type`, `url_title`, `pc_url`, `mobile_url`) VALUES ('4028d681779f1d4e01779f3985f9000d','budget_adjust','审批','budgetAdjustController.do?goView&flag=2','budgetAdjustController.do?goViewMobile&flag=2'),('4028d68177a31f670177a435dd0e0018','cost_request_special_budget','审批','activitiCostRequestSpecialBudgetController.do?goView&flag=2','activitiCostRequestSpecialBudgetController.do?goViewMobile&flag=2'),('4028d68177a31f670177a4353fb80016','cost_request_special_budget','制单人重填','activitiCostRequestSpecialBudgetController.do?goView&flag=1','activitiCostRequestSpecialBudgetController.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 ('4028d681779f1d4e01779f3a752d0011',NULL,'online','','t_b_budget_adjust','4028d681779f1d4e01779f37b0a40009','预算调整','formdeal','预算调整','预算调整','4028d681779f1d4e01779f384b53000b'),('4028d68177a31f670177a437e354001d',NULL,'online','','t_b_activiti_cost_request_special_budget','4028d68177a31f670177a4379a32001a','专项预算费用申请','formdeal','专项预算费用申请','专项预算费用申请','4028d68177a31f670177a43423a00014');
INSERT INTO `t_process_busconfig` (`id`, `show_title`, `real_title`, `show_tablename`, `real_tablename`, `process_type`, `activiti_config_class`) VALUES ('4028d681779f1d4e01779f384b53000b','预算调整','预算调整','预算调整','t_b_budget_adjust','budget_adjust',''),('4028d68177a31f670177a43423a00014','专项预算费用申请','专项预算费用申请','专项预算费用申请','t_b_activiti_cost_request_special_budget','cost_request_special_budget','cn.com.lzt.useractiviti.data.util.tools.CostRequestActivitiSpecialBudgetTools');

delete from t_b_budget_measure where id='2c9358ad74ae69160174b3ee619601e4';
delete from t_b_budget_measure where id='2c9358ad758842bf0175abdb2ed300c5';
delete from t_b_budget_measure where id='2c9358ad74ae69160174b3ee8f6b01e6';
delete from t_b_budget_measure where id='2c9358ad74ae69160174b3eebdb301e8';
delete from t_b_budget_measure where id='2c9358ad758842bf0175abdc45c800cd';
delete from t_b_budget_measure where id='2c9358ad74ae69160174b3ef25a301ec';
delete from t_b_budget_measure where id='2c9358ad74ae69160174b3ef518f01ee';

#审批流自定义分管副总角色
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 ('297ece6c78004e4c0178005ff66c0007','朱浩军','1698','2021-03-05 11:13:12','朱浩军','1698','2021-03-05 11:13:25','A06A05','A06',NULL,'分管副总','FGFZ',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 ('297ece6c78004e4c0178005820270001',NULL,1,'副总配置','15','processRoleDepartMapController.do?list','402889fe47edc3280147edce45610001','8a8ab0b246dc81120146dc8180460000','8a8ab0b246dc81120146dc8180dd001e',0,'','admin','管理员',NULL,NULL,'2021-03-05 11:04:39',NULL,'');
CREATE TABLE `t_p_process_role_depart_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 '流程状态',
  `role_id` varchar(32) DEFAULT NULL COMMENT '角色id',
  `role_name` varchar(32) DEFAULT NULL COMMENT '角色名称',
  `depart_id` longtext COMMENT '部门id',
  `dep_name` longtext COMMENT '部门名称',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='审批角色部门关联';
ALTER TABLE `t_b_budget_tempsheet` ADD COLUMN `budget_special_type` VARCHAR(50) NULL COMMENT '预算专项类型';
ALTER TABLE `t_b_activiti_cost_request_special_budget` ADD COLUMN `budget_special_type` VARCHAR(50) NULL COMMENT '预算专项类型';
INSERT INTO `t_s_typegroup` ( `ID`, `typegroupcode`, `typegroupname`, `create_date`, `create_name` )
VALUES
( '4040c4c1781a998c01781a9d85d40001', 'budget_special_type', '预算专项类型', '2021-03-10 13:30:34', '管理员' );
INSERT INTO `t_s_type` ( `ID`, `typecode`, `typename`, `typepid`, `typegroupid`, `create_date`, `create_name` )
VALUES
( '4040c4c1781a998c01781aa0890b0001', 'excellenceProject', '创优专项', NULL, '4040c4c1781a998c01781a9d85d40001', '2021-03-11 13:33:01', '管理员' );
INSERT INTO `t_s_type` ( `ID`, `typecode`, `typename`, `typepid`, `typegroupid`, `create_date`, `create_name` )
VALUES
( '4040c4c1781a998c01781a9fd53b0002', 'implementationProject', '贯标项目', NULL, '4040c4c1781a998c01781a9d85d40001', '2021-03-11 13:33:02', '管理员' );
INSERT INTO `t_s_type` ( `ID`, `typecode`, `typename`, `typepid`, `typegroupid`, `create_date`, `create_name` )
VALUES
( '4040c4c1781a998c01781a9f1b0c0011', 'createTheCityAndTheWhole', '创城创全', NULL, '4040c4c1781a998c01781a9d85d40001', '2021-03-11 13:32:03', '管理员' );
INSERT INTO `t_s_type` ( `ID`, `typecode`, `typename`, `typepid`, `typegroupid`, `create_date`, `create_name` )
VALUES
( '4040c4c1781a998c01781a9f1b0c0004', 'epidemicPrevention', '防疫', NULL, '4040c4c1781a998c01781a9d85d40001', '2021-03-11 13:32:04', '管理员' );
INSERT INTO `t_s_type` ( `ID`, `typecode`, `typename`, `typepid`, `typegroupid`, `create_date`, `create_name` )
VALUES
( '4040c4c1781a998c01781a9f1b0c0005', 'twoSessionsGuarantee', '两会保障', NULL, '4040c4c1781a998c01781a9d85d40001', '2021-03-11 13:32:05', '管理员' );
INSERT INTO `t_s_type` ( `ID`, `typecode`, `typename`, `typepid`, `typegroupid`, `create_date`, `create_name` )
VALUES
( '4040c4c1781a998c01781a9f1b0c0006', 'guaranteeForEnteringTheExpo', '进博会保障', NULL, '4040c4c1781a998c01781a9d85d40001', '2021-03-11 13:32:06', '管理员' );
INSERT INTO `t_s_type` ( `ID`, `typecode`, `typename`, `typepid`, `typegroupid`, `create_date`, `create_name` )
VALUES
( '4040c4c1781a998c01781a9f1b0c0007', 'visitReception', '参观接待', NULL, '4040c4c1781a998c01781a9d85d40001', '2021-03-11 13:32:07', '管理员' );
INSERT INTO `t_s_type` ( `ID`, `typecode`, `typename`, `typepid`, `typegroupid`, `create_date`, `create_name` )
VALUES
( '4040c4c1781a998c01781a9f1b0c0008', 'startUpCosts', '开办费', NULL, '4040c4c1781a998c01781a9d85d40001', '2021-03-11 13:32:08', '管理员' );
INSERT INTO `t_s_type` ( `ID`, `typecode`, `typename`, `typepid`, `typegroupid`, `create_date`, `create_name` )
VALUES
( '4040c4c1781a998c01781a9f1b0c0009', 'upfrontExpenses', '前期费用', NULL, '4040c4c1781a998c01781a9d85d40001', '2021-03-11 13:32:09', '管理员' );
INSERT INTO `t_s_type` ( `ID`, `typecode`, `typename`, `typepid`, `typegroupid`, `create_date`, `create_name` )
VALUES
( '4040c4c1781a998c01781a9f1b0c0010', 'projectWithdrawal', '项目退盘', NULL, '4040c4c1781a998c01781a9d85d40001', '2021-03-11 13:32:10', '管理员' );

ALTER TABLE `t_b_budget_control` ADD COLUMN `type` VARCHAR(45) NULL COMMENT '0成本指标控制,1专项指标控制';
ALTER TABLE `t_b_budget_control_publish` ADD COLUMN `control_type` VARCHAR(45) NULL;

#周例会工作任务
CREATE TABLE `p_weekly_meeting` (
  `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 '流程状态',
  `meeting_time` datetime DEFAULT NULL COMMENT '会议时间',
  `meeting_content` varchar(255) DEFAULT NULL COMMENT '会议内容',
  `urgent` varchar(32) DEFAULT NULL COMMENT '紧急度',
  `importance` varchar(32) DEFAULT NULL COMMENT '重要性',
  `propose_id` varchar(50) DEFAULT NULL COMMENT '提出人ID',
  `propose_name` varchar(50) DEFAULT NULL COMMENT '提出人name',
  `implementation_id` varchar(50) DEFAULT NULL COMMENT '落实人ID',
  `implementation_name` varchar(50) DEFAULT NULL COMMENT '落实人name',
  `expected_completion` datetime DEFAULT NULL COMMENT '预计完成时间',
  `actual_completion` datetime DEFAULT NULL COMMENT '实际完成时间',
  `execution_status` varchar(32) DEFAULT '0' COMMENT '执行状态',
  `issue` varchar(20) DEFAULT '0' COMMENT '下发状态',
  `week_num` varchar(20) DEFAULT NULL COMMENT '周数',
  `project_task_id` varchar(45) DEFAULT NULL COMMENT '任务id',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;

ALTER TABLE `p_projecttask` ADD COLUMN `complete_per` 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 ('297ece6c789a42df01789a4715200001',NULL,1,'周例会工作任务追踪','1','weeklyMeetingController.do?goAdd','ff808081683fe9a30168400b5012000e','8a8ab0b246dc81120146dc8180460000','8a8ab0b246dc81120146dc8180dd001e',0,'','admin','管理员',NULL,NULL,'2021-04-04 08:27:33',NULL,'');
ALTER TABLE `p_weekly_meeting` ADD COLUMN `remind_num` varchar(10) DEFAULT '0' 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
(
    '4040cbf078ab6d6b0178ab6e991d0001',
    'admin',
    '2021-04-07 16:24:15',
    '管理员',
    '0 30 13 ? * 5',
    '0',
    '0',
    '未完成和超时会议提醒(每周五13:30执行)',
    'WeeklyMeetingFridayTimedTask',
    NULL,
    NULL,
    NULL,
    'com.xcgl.weeklyMeeting.timetask.WeeklyMeetingFridayTimedTask',
    '127.0.0.1',
    '127.0.0.1:8080/hgl'
);
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
(
    '4040cbf078aafb280178aaffef460001',
    'admin',
    '2021-04-07 14:23:23',
    '管理员',
    '0 */60 8-17 * * ?',
    '0',
    '0',
    '会议剩余时间提醒(每天8-17,一个小时执行一次)',
    'WeeklyMeetingTimedTask',
    NULL,
    NULL,
    NULL,
    'com.xcgl.weeklyMeeting.timetask.WeeklyMeetingTimedTask',
    '127.0.0.1',
    '127.0.0.1:8080/hgl'
);

alter table p_taskresult add `video` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '视频';
alter table p_taskresult add `progress` int(11) NULL DEFAULT 0 COMMENT '工作进度0-100';
alter table `p_taskresult` add index taskid(`taskid`);
CREATE TABLE `product_specification_limit`  (
                                                `id` varchar(36) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
                                                `goods_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '商品ID',
                                                `specification` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '规格',
                                                PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
CREATE TABLE `t_b_materiel_return_goods`  (
                                              `id` varchar(36) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
                                              `create_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '创建人名称',
                                              `create_by` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '创建人登录名称',
                                              `create_date` datetime(0) DEFAULT NULL COMMENT '创建日期',
                                              `update_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '更新人名称',
                                              `update_by` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '更新人登录名称',
                                              `update_date` datetime(0) DEFAULT NULL COMMENT '更新日期',
                                              `sys_org_code` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '所属部门',
                                              `sys_company_code` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '所属公司',
                                              `return_goods_date` datetime(0) DEFAULT NULL COMMENT '退货日期',
                                              `user` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '核实人',
                                              `porderid` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '采购单',
                                              `warehouseid` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '领料点',
                                              `warehousename` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '领料点',
                                              `porderdate` datetime(0) DEFAULT NULL COMMENT '采购日期',
                                              `status` varchar(1) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT '0' COMMENT '单据状态',
                                              `projectid` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '项目',
                                              `deptid` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '部门',
                                              `proc_inst_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '流程',
                                              `bpm_status` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT '1' COMMENT '流程状态',
                                              `step_name` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '当前审批节点',
                                              `remark` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '备注',
                                              PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
CREATE TABLE `t_b_materiel_return_goods_detail`  (
                                                     `id` varchar(36) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
                                                     `create_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '创建人名称',
                                                     `create_by` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '创建人登录名称',
                                                     `create_date` datetime(0) DEFAULT NULL COMMENT '创建日期',
                                                     `update_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '更新人名称',
                                                     `update_by` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '更新人登录名称',
                                                     `update_date` datetime(0) DEFAULT NULL COMMENT '更新日期',
                                                     `sys_org_code` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '所属部门',
                                                     `sys_company_code` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '所属公司',
                                                     `bpm_status` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT '1' COMMENT '流程状态',
                                                     `return_goods_id` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '退货单id',
                                                     `goods_id` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '货品id',
                                                     `porderid` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '采购单',
                                                     `porderdetailid` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '采购单明细',
                                                     `quantity_order` double DEFAULT NULL COMMENT '采购数量',
                                                     `quantity_arrived` double DEFAULT NULL COMMENT '到货数量',
                                                     `quantity_return_goods` double DEFAULT NULL COMMENT '本次退货数量',
                                                     `measure_unit` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '计量单位',
                                                     `base_unit` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '基本单位',
                                                     `quantity_return_goods_base` double DEFAULT NULL COMMENT '退货基本单位数量',
                                                     `conversion` int(11) DEFAULT NULL COMMENT '换算率',
                                                     `pnumber` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '货品编码',
                                                     `pname` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '货品名称',
                                                     `spec_type` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '规格型号',
                                                     `remark` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '备注',
                                                     `supplier_id` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '供应商',
                                                     `supplier_name` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '供应商',
                                                     `cumulative_return_goods` double DEFAULT NULL COMMENT '累计退货量',
                                                     `surplus_quantity_arrived` double DEFAULT NULL COMMENT '剩余到货数量',
                                                     PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
ALTER TABLE `t_b_porder_details` ADD COLUMN `reference_purchase_price` double NULL COMMENT '参考采购单价';
UPDATE t_b_porder_details SET reference_purchase_price = purchase_price;
ALTER TABLE `t_b_porder_details` ADD COLUMN `reference_money` double NULL COMMENT '参考金额';
UPDATE t_b_porder_details SET reference_money = money;
ALTER TABLE `t_b_porders` ADD COLUMN `reference_total_money` double NULL COMMENT '参考总金额';
UPDATE t_b_porders SET reference_total_money = total_money;
ALTER TABLE `t_b_porder_details` ADD COLUMN `confirm_mark` VARCHAR(40) NULL COMMENT '确认标识';
ALTER TABLE `t_b_porder_details` ADD COLUMN `confirm_mark_remark` VARCHAR(500) 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
(
    '4040cbf078e7f00b0178e7f1f4fd0001',
    NULL,
    1,
    '物料退货',
    '99',
    'materielReturnGoodsController.do?list',
    'ff80808166106df50166137f135205c0',
    '8a8ab0b246dc81120146dc8180460000',
    '8a8ab0b246dc81120146dc8180dd001e',
    0,
    '',
    'admin',
    '管理员',
    NULL,
    NULL,
    '2021-04-19 10:24:57',
    NULL,
    ''
);
alter table t_bus_overtime_financial add `display` int(8) NULL DEFAULT 0 COMMENT '0显示1隐藏';
INSERT INTO `product_specification_limit` VALUES ('1', 'ff8080816614ae0301661897ffca0c90', 'xiang');
INSERT INTO `product_specification_limit` VALUES ('10', 'ff808081661f24c101665671ce715505', 'xiang');
INSERT INTO `product_specification_limit` VALUES ('11', 'ff808081665bfece0166be51bf3b6e02', 'xiang');
INSERT INTO `product_specification_limit` VALUES ('12', 'ff80808166f84f1c01671b74fe5026a5', 'xiang');
INSERT INTO `product_specification_limit` VALUES ('13', 'ff80808166f84f1c01671b77312026a9', 'xiang');
INSERT INTO `product_specification_limit` VALUES ('14', 'ff8080816781e27d0167820e692b004a', 'xiang');
INSERT INTO `product_specification_limit` VALUES ('15', 'ff808081687556a2016883d275b83849', 'xiang');
INSERT INTO `product_specification_limit` VALUES ('16', 'ff80808169d2121b0169e22067e85fbe', 'xiang');
INSERT INTO `product_specification_limit` VALUES ('17', 'ff8080816b1fab1d016b2b3cb8e45e33', 'xiang');
INSERT INTO `product_specification_limit` VALUES ('18', 'ff8080816b1fab1d016b2b3fa9015e3e', 'xiang');
INSERT INTO `product_specification_limit` VALUES ('19', 'ff8080816ed1035d016ee8450067397f', 'xiang');
INSERT INTO `product_specification_limit` VALUES ('2', 'ff8080816614ae030166189c18c70c9a', 'xiang');
INSERT INTO `product_specification_limit` VALUES ('20', 'ff8080817287b69d01729263756d112d', 'xiang');
INSERT INTO `product_specification_limit` VALUES ('21', 'ff8080817287b69d0172926744551134', 'xiang');
INSERT INTO `product_specification_limit` VALUES ('22', 'ff8080817287b69d0172927ca0e216c0', 'xiang');
INSERT INTO `product_specification_limit` VALUES ('23', 'ff8080817287b69d0172927f6c8316c8', 'xiang');
INSERT INTO `product_specification_limit` VALUES ('24', 'ff8080817651c0df0176acfac6436d1b', 'xiang');
INSERT INTO `product_specification_limit` VALUES ('25', 'ff8080817651c0f801767fc5a5a4508f', 'xiang');
INSERT INTO `product_specification_limit` VALUES ('3', 'ff80808166198ddc016619c376d90167', 'xiang');
INSERT INTO `product_specification_limit` VALUES ('4', 'ff80808166198ddc016619ec46420ccc', 'xiang');
INSERT INTO `product_specification_limit` VALUES ('5', 'ff80808166198ddc016619edfedf0cf6', 'xiang');
INSERT INTO `product_specification_limit` VALUES ('6', 'ff80808166198ddc016619ef2db10cfb', 'xiang');
INSERT INTO `product_specification_limit` VALUES ('7', 'ff80808166198ddc016619f0c0270d04', 'xiang');
INSERT INTO `product_specification_limit` VALUES ('8', 'ff808081661f24c10166291e9d412372', 'xiang');
INSERT INTO `product_specification_limit` VALUES ('9', 'ff808081661f24c10166566e1acf5502', 'xiang');
ALTER TABLE `t_bus_activiti_wage_change` ADD COLUMN `adjust_range` VARCHAR(32) NULL COMMENT '调整幅度%';
ALTER TABLE `t_bus_activiti_wage_change` ADD COLUMN `current_position` VARCHAR(32) NULL COMMENT '现岗位(职级)';
ALTER TABLE `t_bus_activiti_wage_change` ADD COLUMN `original_position` VARCHAR(32) NULL COMMENT '原岗位(职级)';
ALTER TABLE `t_bus_activiti_wage_change` ADD COLUMN `original_position_id` VARCHAR(32) NULL COMMENT '原岗位(职级)ID';
ALTER TABLE `t_bus_activiti_wage_change` ADD COLUMN `original_salary` decimal(10,2) NULL COMMENT '调整前薪资(税前)';
ALTER TABLE `t_bus_activiti_wage_change` ADD COLUMN `current_salary` decimal(10,2) NULL COMMENT '调整后薪资(税前)';
ALTER TABLE `t_bus_activiti_wage_change` ADD COLUMN `start_month` VARCHAR(32) NULL COMMENT '调整开始月度';
UPDATE t_bus_activiti_wage_change SET type = 'gangweibiandong' WHERE type IN ('gongzuobiandong', 'shengzhi', 'jiangzhi');
INSERT INTO t_s_type(ID, typecode, typename, typepid, typegroupid, create_date, create_name) VALUES ('402880ed6f235f22016f237478e8asdf', 'gangweibiandong', '岗位变动', NULL, '402880ed6f235f22016f2373ee9e0009', '2021-05-11 00:00:00', '管理员');
DELETE FROM t_s_type WHERE typegroupid = '402880ed6f235f22016f2373ee9e0009' AND typecode IN ('gongzuobiandong', 'shengzhi', 'jiangzhi');