Browse Source

fix 工单-保存待发顶部提交时间筛选无结果,清空无结果

dev
巴林闲侠 2 years ago
parent
commit
8e599e4d3e
  1. 98
      script/0.26/schema/1.create_maintenance.sql
  2. 2
      web/client/src/sections/workOrder/containers/aboutMe.jsx
  3. 2
      web/client/src/sections/workOrder/containers/initiated.jsx
  4. 4
      web/client/src/sections/workOrder/containers/preserve.jsx
  5. 2
      web/client/src/sections/workOrder/containers/receipt.jsx
  6. 2
      web/client/src/sections/workOrder/containers/stayDoWorkOrder.jsx

98
script/0.26/schema/1.create_maintenance.sql

@ -0,0 +1,98 @@
create table if not exists maintenance_plan
(
id serial not null
constraint maintenance_plan_pk
primary key,
mission_name varchar(1024) not null,
remark varchar(1024),
reason varchar(1024),
plan_finish_time timestamp with time zone,
actual_finish_time timestamp with time zone,
type varchar(32) not null,
state varchar(32) not null
);
comment on table maintenance_plan is '维护计划';
comment on column maintenance_plan.mission_name is '任务名称';
comment on column maintenance_plan.remark is '备注';
comment on column maintenance_plan.reason is '操作/故障原因';
comment on column maintenance_plan.plan_finish_time is '计划完成时间';
comment on column maintenance_plan.actual_finish_time is '实际完成时间
';
comment on column maintenance_plan.type is '分类 period 周期 / temp 临时';
comment on column maintenance_plan.state is '完成状态 unfinished 未完成 / underway 进行中 / completed 已完成 / suspend 挂起暂停 / inspected 已检查';
create unique index if not exists maintenance_plan_id_uindex
on maintenance_plan (id);
create table if not exists maintenance_plan_execute_user
(
id serial not null
constraint maintenance_plan_execute_user_pk
primary key,
maintenance_plan_id integer not null
constraint maintenance_plan_execute_user_maintenance_plan_id_fk
references maintenance_plan,
pep_user_id integer not null
);
comment on table maintenance_plan_execute_user is '维护计划执行人';
comment on column maintenance_plan_execute_user.pep_user_id is '项企用户id';
create unique index if not exists maintenance_plan_execute_user_id_uindex
on maintenance_plan_execute_user (id);
create table if not exists maintenance_record
(
id serial not null
constraint maintenance_record_pk
primary key,
sketch varchar(512) not null,
occurrence_time timestamp with time zone,
solving_time timestamp with time zone,
interrupt_duration integer,
type varchar(32),
record varchar(1024)
);
comment on table maintenance_record is '运维服务记录';
comment on column maintenance_record.sketch is '简述';
comment on column maintenance_record.occurrence_time is '发生时间';
comment on column maintenance_record.solving_time is '解决时间';
comment on column maintenance_record.interrupt_duration is '中断时长 / 秒';
comment on column maintenance_record.type is '故障类型';
comment on column maintenance_record.record is '故障记录';
create unique index if not exists maintenance_record_id_uindex
on maintenance_record (id);
create table if not exists maintenance_record_execute_user
(
id serial not null
constraint maintenance_record_execute_user_pk
primary key,
maintenance_record_id integer not null
constraint maintenance_record_execute_user_maintenance_record_id_fk
references maintenance_record,
pep_user_id integer not null
);
comment on table maintenance_record_execute_user is '运维服务记录解决者';
create unique index if not exists maintenance_record_execute_user_id_uindex
on maintenance_record_execute_user (id);

2
web/client/src/sections/workOrder/containers/aboutMe.jsx

@ -131,7 +131,7 @@ const Rest = (props) => {
layout="horizontal"
style={{ position: "relative", width: "100%", flex: 1 }}
onSubmit={(values) => {
if (values?.applyTimes) {
if (values?.applyTimes?.length) {
values.applyTimes = [moment(values?.applyTimes[0]).format('YYYY-MM-DD HH:mm:ss'), moment(values?.applyTimes[1]).format('YYYY-MM-DD HH:mm:ss')]
}
backlogData({ ...values, limit: 10, page: 0 })

2
web/client/src/sections/workOrder/containers/initiated.jsx

@ -187,7 +187,7 @@ const Rest = (props) => {
layout="horizontal"
style={{ position: "relative", width: "100%", flex: 1 }}
onSubmit={(values) => {
if (values?.applyTimes) {
if (values?.applyTimes?.length) {
values.applyTimes = [moment(values?.applyTimes[0]).format('YYYY-MM-DD HH:mm:ss'), moment(values?.applyTimes[1]).format('YYYY-MM-DD HH:mm:ss')]
}
backlogData({ ...values, limit: 10, page: 0 })

4
web/client/src/sections/workOrder/containers/preserve.jsx

@ -146,7 +146,7 @@ const Rest = (props) => {
layout="horizontal"
style={{ position: "relative", width: "100%", flex: 1 }}
onSubmit={(values) => {
if (values?.applyTimes) {
if (values?.applyTimes?.length) {
values.applyTimes = [moment(values?.applyTimes[0]).format('YYYY-MM-DD HH:mm:ss'), moment(values?.applyTimes[1]).format('YYYY-MM-DD HH:mm:ss')]
}
backlogData({ ...values, limit: 10, page: 0 })
@ -227,7 +227,7 @@ const Rest = (props) => {
onCancel={() => { setWorkflowModalVisible(false) }}
successCallBack={({ refresh }) => {
if (refresh) {
backlogData()
backlogData(query)
}
setWorkflowModalVisible(false)
}}

2
web/client/src/sections/workOrder/containers/receipt.jsx

@ -134,7 +134,7 @@ const Rest = (props) => {
layout="horizontal"
style={{ position: "relative", width: "100%", flex: 1 }}
onSubmit={(values) => {
if (values?.applyTimes) {
if (values?.applyTimes?.length) {
values.applyTimes = [moment(values?.applyTimes[0]).format('YYYY-MM-DD HH:mm:ss'), moment(values?.applyTimes[1]).format('YYYY-MM-DD HH:mm:ss')]
}
backlogData({ ...values, limit: 10, page: 0 })

2
web/client/src/sections/workOrder/containers/stayDoWorkOrder.jsx

@ -117,7 +117,7 @@ const Rest = (props) => {
layout="horizontal"
style={{ position: "relative", width: "100%", flex: 1 }}
onSubmit={(values) => {
if (values?.applyTimes) {
if (values?.applyTimes?.length) {
values.applyTimes = [moment(values?.applyTimes[0]).format('YYYY-MM-DD HH:mm:ss'), moment(values?.applyTimes[1]).format('YYYY-MM-DD HH:mm:ss')]
}
backlogData(values)

Loading…
Cancel
Save