修复0730测试问题
java(修改): 1点检汇总、工单汇总接口同步更新子表 2.故障知识库查询接口处理
web(修改): 1点检汇总、工单汇总页面显示字段 2故障知识库页面显示 3部分搜索字段更新
mobile(修改): 1点检汇总、工单汇总页面状态更新
| | |
| | | <z-paging ref="paging" v-model="dataList" @query="queryList" show-refresher-update-time> |
| | | <template #top> |
| | | <!-- å¢å ä¸ä¸ªæç´¢æ --> |
| | | <wd-search v-model="searchValue" @search="handleSearch"> |
| | | </wd-search> |
| | | <wd-search v-model="searchValue" @search="handleSearch"></wd-search> |
| | | <wd-tabs v-model="activeTab" @change="handleTabChange"> |
| | | <wd-tab title="å¾
ç¹æ£"></wd-tab> |
| | | <wd-tab title="å¾
确认"></wd-tab> |
| | |
| | | <view class="text-color-gray text-sm mt-1 flex"> |
| | | <text class="mr-3">æ»æ°: {{ item.recordCount }}</text> |
| | | | |
| | | <template v-if="activeTab === 0"> |
| | | <text class="mx-3">æªç¹æ£: {{ item.unCheckCount }}</text> |
| | | | |
| | | </template> |
| | | <template v-else> |
| | | <text class="mx-3">å¾
确认: {{ item.dqrCount }}</text> |
| | | | |
| | | </template> |
| | | <text class="mx-3">å·²ç¹æ£: {{ item.checkCount }}</text> |
| | | | |
| | | <text class="ml-3">æªç¹æ£: {{ item.unCheckCount }}</text> |
| | | </view> |
| | | <view class="text-color-gray text-sm mt-2 flex"> |
| | | <text class="mr-3">æ£å¸¸: {{ item.normalNum }}</text> |
| | |
| | | import { getInspStList } from '@/service/inspect' |
| | | import dayjs from 'dayjs' |
| | | import { useUserStore, useAccessStore, useSystemConfigStore } from '@/store' |
| | | import { isLeader, isLineOrRepair, isOperator } from "@/utils/RoleUtils"; |
| | | import { isLeader, isLineOrRepair, isOperator } from '@/utils/RoleUtils' |
| | | // æ ç¾é¡µç¸å
³ |
| | | const activeTab = ref(0) // é»è®¤éä¸ç¬¬ä¸ä¸ªæ ç¾é¡µï¼å¾
ç¹æ£ï¼ |
| | | |
| | |
| | | <view class="text-color-gray text-sm mt-1 flex"> |
| | | <text class="mr-3">æ»æ°: {{ item.orderCount }}</text> |
| | | | |
| | | <text class="mx-3">已宿: {{ item.dyzCount }}</text> |
| | | | |
| | | <text class="mx-3">å¾
ä¿å
»: {{ item.dbyCount }}</text> |
| | | <template v-if="activeTab === 0"> |
| | | <text class="mx-3">å¾
ä¿å
»: {{ item.dbyCount }}</text> |
| | | | |
| | | </template> |
| | | <template v-else> |
| | | <text class="mx-3">å¾
éªè¯: {{ item.dyzCount }}</text> |
| | | | |
| | | </template> |
| | | <text class="mx-3">已宿: {{ item.wcCount }}</text> |
| | | </view> |
| | | <!-- <view class="text-color-gray text-sm mt-2 flex">--> |
| | | <!-- <text class="mr-3">å¾
ä¿å
»: {{ item.dbyCount }}</text>--> |
| | |
| | | import { type FormSchemaGetter } from '#/adapter/form'; |
| | | import { getDictOptions } from '#/utils/dict'; |
| | | import { renderDict } from '#/utils/render'; |
| | | import type { DescItem } from '#/components/description'; |
| | | |
| | | export const querySchema: FormSchemaGetter = () => [ |
| | | // { |
| | | // component: 'Input', |
| | | // fieldName: 'faultCode', |
| | | // label: 'ç¥è¯ç¼å·' |
| | | // }, |
| | | // { |
| | | // component: 'Input', |
| | | // fieldName: 'equName', |
| | | // label: '设å¤åç§°' |
| | | // }, |
| | | // { |
| | | // component: 'Input', |
| | | // fieldName: 'assetNo', |
| | | // label: 'èµäº§ç¼å·' |
| | | // }, |
| | | // { |
| | | // component: 'Select', |
| | | // componentProps: { |
| | | // options: getDictOptions(DictEnum.EIMS_EQU_PART) |
| | | // }, |
| | | // fieldName: 'equPart', |
| | | // label: '设å¤é¨ä½' |
| | | // }, |
| | | // { |
| | | // component: 'Select', |
| | | // componentProps: { |
| | | // options: getDictOptions(DictEnum.REPAIR_FAULT_TYPE) |
| | | // }, |
| | | // fieldName: 'faultType', |
| | | // label: 'æ
éç±»å«' |
| | | // }, |
| | | { |
| | | component: 'Input', |
| | | fieldName: 'faultCode', |
| | | label: 'ç¥è¯ç¼å·' |
| | | }, |
| | | { |
| | | component: 'Input', |
| | | fieldName: 'equName', |
| | | label: '设å¤åç§°' |
| | | }, |
| | | { |
| | | component: 'Input', |
| | | fieldName: 'assetNo', |
| | | label: 'èµäº§ç¼å·' |
| | | }, |
| | | { |
| | | component: 'Select', |
| | | fieldName: 'params.searchValue', |
| | | componentProps: { |
| | | options: getDictOptions(DictEnum.EIMS_EQU_PART) |
| | | placeholder: '请è¾å
¥è®¾å¤åç§°æèµäº§ç¼å·' |
| | | }, |
| | | fieldName: 'equPart', |
| | | label: '设å¤é¨ä½' |
| | | label: 'å
³é®å' |
| | | }, |
| | | { |
| | | component: 'Select', |
| | | componentProps: { |
| | | options: getDictOptions(DictEnum.REPAIR_FAULT_TYPE) |
| | | }, |
| | | fieldName: 'faultType', |
| | | label: 'æ
éç±»å«' |
| | | }, |
| | | { |
| | | component: 'Select', |
| | | componentProps: { |
| | | options: getDictOptions(DictEnum.EIMS_FAULT_REASON) |
| | | }, |
| | | fieldName: 'faultReason', |
| | | label: 'æ
éåå ' |
| | | }, |
| | | // { |
| | | // component: 'Select', |
| | | // componentProps: { |
| | | // options: getDictOptions(DictEnum.EIMS_FAULT_REASON) |
| | | // }, |
| | | // fieldName: 'faultReason', |
| | | // label: 'æ
éåå ' |
| | | // }, |
| | | { |
| | | component: 'Input', |
| | | fieldName: 'reqDesc', |
| | |
| | | |
| | | export const columns: VxeGridProps['columns'] = [ |
| | | { type: 'checkbox', width: 60, fixed: 'left' }, |
| | | { |
| | | title: 'ç¥è¯ç¼ç ', |
| | | field: 'faultCode', |
| | | minWidth: 200 |
| | | }, |
| | | |
| | | { |
| | | title: '设å¤åç§°', |
| | | field: 'equName', |
| | | minWidth: 140, |
| | | fixed: 'left', |
| | | slots: { default: 'equName' } |
| | | fixed: 'left' |
| | | }, |
| | | |
| | | { |
| | | title: 'èµäº§ç¼å·', |
| | | field: 'assetNo', |
| | | sortable: true, |
| | | minWidth: 140, |
| | | fixed: 'left' |
| | | }, |
| | | { |
| | | title: 'ç¥è¯ç¼ç ', |
| | | field: 'faultCode', |
| | | minWidth: 200 |
| | | }, |
| | | { |
| | | title: '设å¤ç±»å', |
| | |
| | | }, |
| | | minWidth: 120 |
| | | }, |
| | | { |
| | | title: 'æ
éåå ', |
| | | field: 'faultReason', |
| | | sortable: true, |
| | | slots: { |
| | | default: ({ row }) => { |
| | | if (row.faultReason === null || row.faultReason === '') { |
| | | return ''; |
| | | } |
| | | return renderDict(row.faultReason, DictEnum.EIMS_FAULT_REASON); |
| | | } |
| | | }, |
| | | minWidth: 120 |
| | | }, |
| | | // { |
| | | // title: 'æ
éåå ', |
| | | // field: 'faultReason', |
| | | // sortable: true, |
| | | // slots: { |
| | | // default: ({ row }) => { |
| | | // if (row.faultReason === null || row.faultReason === '') { |
| | | // return ''; |
| | | // } |
| | | // return renderDict(row.faultReason, DictEnum.EIMS_FAULT_REASON); |
| | | // } |
| | | // }, |
| | | // minWidth: 120 |
| | | // }, |
| | | { |
| | | title: 'æ¥ä¿®æè¿°', |
| | | field: 'reqDesc', |
| | |
| | | fixed: 'right', |
| | | slots: { default: 'action' }, |
| | | title: 'æä½', |
| | | width: 200 |
| | | width: 80 |
| | | } |
| | | ]; |
| | | |
| | |
| | | label: 'å¤çæªæ½' |
| | | } |
| | | ]; |
| | | |
| | | |
| | | export const descSchema: DescItem[] = [ |
| | | { |
| | | field: 'equName', |
| | | label: '设å¤åç§°' |
| | | }, |
| | | { |
| | | field: 'assetNo', |
| | | label: 'èµäº§ç¼å·' |
| | | }, |
| | | { |
| | | field: 'resCode', |
| | | label: '维修工å' |
| | | }, |
| | | { |
| | | field: 'faultCode', |
| | | label: 'ç¥è¯ç¼ç ' |
| | | }, |
| | | { |
| | | field: 'reqDesc', |
| | | label: 'æ¥ä¿®æè¿°' |
| | | }, |
| | | { |
| | | field: 'resHandle', |
| | | label: 'å¤çæªæ½' |
| | | } |
| | | ]; |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <script setup lang="ts"> |
| | | import type { Recordable } from '@vben/types'; |
| | | |
| | | import { useVbenDrawer } from '@vben/common-ui'; |
| | | |
| | | import { Description, useDescription } from '#/components/description'; |
| | | |
| | | import { descSchema } from './data'; |
| | | |
| | | const [BasicDrawer, drawerApi] = useVbenDrawer({ |
| | | onOpenChange: handleOpenChange, |
| | | }); |
| | | |
| | | const [registerDescription, { setDescProps }] = useDescription({ |
| | | column: 1, |
| | | schema: descSchema, |
| | | }); |
| | | |
| | | function handleOpenChange(open: boolean) { |
| | | if (!open) { |
| | | return null; |
| | | } |
| | | const { record } = drawerApi.getData() as { record: Recordable<any> }; |
| | | setDescProps({ data: record }, true); |
| | | } |
| | | </script> |
| | | |
| | | <template> |
| | | <BasicDrawer :footer="false" class="w-[600px]" title="æ
éæç»"> |
| | | <Description @register="registerDescription" /> |
| | | </BasicDrawer> |
| | | </template> |
| | |
| | | import type { Recordable } from '@vben/types'; |
| | | |
| | | import { ref } from 'vue'; |
| | | import { useRouter } from 'vue-router'; |
| | | |
| | | |
| | | import { Page, useVbenDrawer, type VbenFormProps } from '@vben/common-ui'; |
| | | import { $t } from '@vben/locales'; |
| | |
| | | import { columns, querySchema } from './data'; |
| | | import EquTypeTree from './equ-type-tree.vue'; |
| | | import faultKnowDrawer from './fault-know-drawer.vue'; |
| | | import faultPreviewDrawer from './fault-preview-drawer.vue'; |
| | | import trialPreviewDrawer from '#/views/eims/equ-trial/trial-preview-drawer.vue'; |
| | | |
| | | // 左边é¨é¨ç¨ |
| | | const selectDeptId = ref<string[]>([]); |
| | |
| | | const [FaultKnowDrawer, faultKnowDrawerApi] = useVbenDrawer({ |
| | | connectedComponent: faultKnowDrawer |
| | | }); |
| | | const [FaultPreviewDrawer, faultPreviewDrawerApi] = useVbenDrawer({ |
| | | connectedComponent: faultPreviewDrawer |
| | | }); |
| | | |
| | | /** |
| | | * é¢è§ |
| | | * @param record |
| | | */ |
| | | function handlePreview(record: Recordable<any>) { |
| | | faultPreviewDrawerApi.setData({ record }); |
| | | faultPreviewDrawerApi.open(); |
| | | } |
| | | |
| | | |
| | | function handleAdd() { |
| | | faultKnowDrawerApi.setData({}); |
| | |
| | | <Page :auto-content-height="true"> |
| | | <div class="flex h-full gap-[8px]"> |
| | | <EquTypeTree v-model:select-dept-id="selectDeptId" class="w-[260px]" @reload="() => tableApi.reload()" @select="() => tableApi.reload()" /> |
| | | <BasicTable class="flex-1 overflow-hidden" table-title="设å¤å表"> |
| | | <BasicTable class="flex-1 overflow-hidden" table-title="æ
éå表"> |
| | | <template #toolbar-tools> |
| | | <Space> |
| | | <a-button v-access:code="['eims:faultKnow:export']" @click="handleDownloadExcel"> |
| | | {{ $t('pages.common.export') }} |
| | | </a-button> |
| | | <a-button |
| | | :disabled="!vxeCheckboxChecked(tableApi)" |
| | | danger |
| | | type="primary" |
| | | v-access:code="['eims:faultKnow:remove']" |
| | | @click="handleMultiDelete" |
| | | > |
| | | {{ $t('pages.common.delete') }} |
| | | </a-button> |
| | | <a-button type="primary" v-access:code="['eims:faultKnow:add']" @click="handleAdd"> |
| | | {{ $t('pages.common.add') }} |
| | | </a-button> |
| | | <!-- <a-button v-access:code="['eims:faultKnow:export']" @click="handleDownloadExcel">--> |
| | | <!-- {{ $t('pages.common.export') }}--> |
| | | <!-- </a-button>--> |
| | | <!-- <a-button--> |
| | | <!-- :disabled="!vxeCheckboxChecked(tableApi)"--> |
| | | <!-- danger--> |
| | | <!-- type="primary"--> |
| | | <!-- v-access:code="['eims:faultKnow:remove']"--> |
| | | <!-- @click="handleMultiDelete"--> |
| | | <!-- >--> |
| | | <!-- {{ $t('pages.common.delete') }}--> |
| | | <!-- </a-button>--> |
| | | <!-- <a-button type="primary" v-access:code="['eims:faultKnow:add']" @click="handleAdd">--> |
| | | <!-- {{ $t('pages.common.add') }}--> |
| | | <!-- </a-button>--> |
| | | </Space> |
| | | </template> |
| | | |
| | |
| | | |
| | | <template #action="{ row }"> |
| | | <Space> |
| | | <ghost-button v-access:code="['eims:faultKnow:edit']" @click.stop="handleEdit(row)"> |
| | | {{ $t('pages.common.edit') }} |
| | | <ghost-button class="btn-success" v-access:code="['eims:faultKnow:list']" @click.stop="handlePreview(row)"> |
| | | {{ $t('pages.common.preview') }} |
| | | </ghost-button> |
| | | <Popconfirm :get-popup-container="getVxePopupContainer" placement="left" title="确认å é¤ï¼" @confirm="handleDelete(row)"> |
| | | <ghost-button danger v-access:code="['eims:faultKnow:remove']" @click.stop=""> |
| | | {{ $t('pages.common.delete') }} |
| | | </ghost-button> |
| | | </Popconfirm> |
| | | <!-- <ghost-button v-access:code="['eims:faultKnow:edit']" @click.stop="handleEdit(row)">--> |
| | | <!-- {{ $t('pages.common.edit') }}--> |
| | | <!-- </ghost-button>--> |
| | | <!-- <Popconfirm :get-popup-container="getVxePopupContainer" placement="left" title="确认å é¤ï¼" @confirm="handleDelete(row)">--> |
| | | <!-- <ghost-button danger v-access:code="['eims:faultKnow:remove']" @click.stop="">--> |
| | | <!-- {{ $t('pages.common.delete') }}--> |
| | | <!-- </ghost-button>--> |
| | | <!-- </Popconfirm>--> |
| | | </Space> |
| | | </template> |
| | | </BasicTable> |
| | | </div> |
| | | <FaultKnowDrawer @reload="tableApi.query()" /> |
| | | <FaultPreviewDrawer /> |
| | | </Page> |
| | | </template> |
| | |
| | | import { renderDict } from '#/utils/render'; |
| | | |
| | | export const querySchema: FormSchemaGetter = () => [ |
| | | // { |
| | | // component: 'Input', |
| | | // fieldName: 'equName', |
| | | // label: '设å¤åç§°' |
| | | // }, |
| | | { |
| | | component: 'Input', |
| | | fieldName: 'equName', |
| | | label: '设å¤åç§°' |
| | | fieldName: 'params.searchValue', |
| | | componentProps: { |
| | | placeholder: '请è¾å
¥æ 颿èµäº§ç¼å·' |
| | | }, |
| | | label: 'å
³é®å' |
| | | }, |
| | | { |
| | | component: 'RangePicker', |
| | | fieldName: 'planTime', |
| | | label: 'ä¿å
»æ¥æ' |
| | | }, |
| | | { |
| | | component: 'Select', |
| | | componentProps: { |
| | | options: getDictOptions(DictEnum.MAINT_ORDER_STATUS) |
| | | }, |
| | | fieldName: 'status', |
| | | label: 'ç¶æ' |
| | | }, |
| | | { |
| | | component: 'Input', |
| | |
| | | }, |
| | | fieldName: 'maintRule', |
| | | label: '计ç®è§å' |
| | | }, |
| | | { |
| | | component: 'Select', |
| | | componentProps: { |
| | | options: getDictOptions(DictEnum.MAINT_ORDER_STATUS) |
| | | }, |
| | | fieldName: 'status', |
| | | label: 'ç¶æ' |
| | | } |
| | | ]; |
| | | |
| | |
| | | }, |
| | | collapsed: true, |
| | | schema: querySchema(), |
| | | wrapperClass: 'grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4' |
| | | wrapperClass: 'grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4', |
| | | // æ¥æéæ©æ ¼å¼å |
| | | fieldMappingTime: [['planTime', ['params[beginPlanTime]', 'params[endPlanTime]'], ['YYYY-MM-DD 00:00:00', 'YYYY-MM-DD 23:59:59']]] |
| | | }; |
| | | |
| | | const gridOptions: VxeGridProps = { |
| | |
| | | import { renderDict } from '#/utils/render'; |
| | | |
| | | export const querySchema: FormSchemaGetter = () => [ |
| | | // { |
| | | // component: 'Input', |
| | | // fieldName: 'title', |
| | | // label: 'æ é¢' |
| | | // }, |
| | | // { |
| | | // component: 'Input', |
| | | // fieldName: 'assetno', |
| | | // label: 'èµäº§ç¼å·' |
| | | // }, |
| | | { |
| | | component: 'Input', |
| | | fieldName: 'title', |
| | | label: 'æ é¢' |
| | | }, |
| | | { |
| | | component: 'Input', |
| | | fieldName: 'assetno', |
| | | label: 'èµäº§ç¼å·' |
| | | fieldName: 'params.searchValue', |
| | | componentProps: { |
| | | placeholder: '请è¾å
¥æ 颿èµäº§ç¼å·' |
| | | }, |
| | | label: 'å
³é®å' |
| | | }, |
| | | { |
| | | component: 'RangePicker', |
| | |
| | | } |
| | | } |
| | | }, |
| | | { |
| | | title: 'ä¿å
»ä¸', |
| | | field: 'byCount', |
| | | minWidth: 80, |
| | | slots: { |
| | | default: ({ row }) => { |
| | | return <Tag color="blue">{row.byCount}</Tag>; |
| | | } |
| | | } |
| | | }, |
| | | // { |
| | | // title: 'ä¿å
»ä¸', |
| | | // field: 'byCount', |
| | | // minWidth: 80, |
| | | // slots: { |
| | | // default: ({ row }) => { |
| | | // return <Tag color="blue">{row.byCount}</Tag>; |
| | | // } |
| | | // } |
| | | // }, |
| | | { |
| | | title: 'å¾
éªè¯', |
| | | field: 'dyzCount', |
| | |
| | | package org.dromara.eims.controller; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | import lombok.RequiredArgsConstructor; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import jakarta.validation.constraints.*; |
| | | import cn.dev33.satoken.annotation.SaCheckPermission; |
| | | import org.dromara.eims.domain.bo.EimsRepairResBo; |
| | | import org.dromara.eims.domain.vo.EimsEquVo; |
| | | import org.dromara.eims.domain.vo.EimsRepairReqVo; |
| | | import org.dromara.eims.domain.vo.EimsRepairResVo; |
| | | import org.dromara.eims.service.IEimsEquService; |
| | | import org.dromara.eims.service.IEimsRepairReqService; |
| | | import org.dromara.eims.service.IEimsRepairResService; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.dromara.common.idempotent.annotation.RepeatSubmit; |
| | |
| | | public class EimsFaultKnowController extends BaseController { |
| | | |
| | | private final IEimsFaultKnowService eimsFaultKnowService; |
| | | private final IEimsRepairResService repairResService; |
| | | private final IEimsRepairReqService repairReqService; |
| | | private final IEimsEquService equService; |
| | | |
| | | /** |
| | | * æ¥è¯¢æ
éç¥è¯å表 |
| | |
| | | @SaCheckPermission("eims:faultKnow:list") |
| | | @GetMapping("/list") |
| | | public TableDataInfo<EimsFaultKnowVo> list(EimsFaultKnowBo bo, PageQuery pageQuery) { |
| | | return eimsFaultKnowService.queryPageList(bo, pageQuery); |
| | | |
| | | // return eimsFaultKnowService.queryPageList(bo, pageQuery); |
| | | return comp(bo, pageQuery); |
| | | } |
| | | |
| | | private TableDataInfo<EimsFaultKnowVo> comp(EimsFaultKnowBo bo,PageQuery pageQuery){ |
| | | EimsRepairResBo b = new EimsRepairResBo(); |
| | | PageQuery pQuery = new PageQuery(); |
| | | pQuery.setPageNum(pageQuery.getPageNum()); |
| | | pQuery.setPageSize(pageQuery.getPageSize()); |
| | | b.setParams(bo.getParams()); |
| | | b.setResHandle(bo.getResHandle()); |
| | | b.setReqDesc(bo.getReqDesc()); |
| | | TableDataInfo<EimsRepairResVo> tableDataInfo = repairResService.queryPageListCustom(b, pQuery); |
| | | |
| | | return getEimsFaultKnowVoTableDataInfo(tableDataInfo); |
| | | } |
| | | |
| | | private TableDataInfo<EimsFaultKnowVo> getEimsFaultKnowVoTableDataInfo(TableDataInfo<EimsRepairResVo> tableDataInfo) { |
| | | TableDataInfo<EimsFaultKnowVo> resTableData = new TableDataInfo<>(); |
| | | resTableData.setCode(tableDataInfo.getCode()); |
| | | resTableData.setMsg(tableDataInfo.getMsg()); |
| | | resTableData.setTotal(tableDataInfo.getTotal()); |
| | | List<EimsFaultKnowVo> rows= new ArrayList<>(); |
| | | int size = tableDataInfo.getRows().size(); |
| | | for (int i = 0; i < size; i++) { |
| | | EimsFaultKnowVo vo = new EimsFaultKnowVo(); |
| | | EimsRepairResVo res = tableDataInfo.getRows().get(i); |
| | | vo.setFaultCode("GZZS"+ String.valueOf(res.getId()).substring(0,10)); |
| | | vo.setFaultReason(res.getResReason()); |
| | | vo.setResHandle(res.getResHandle()); |
| | | EimsRepairReqVo reqVo = repairReqService.queryById(res.getReqId()); |
| | | if(reqVo!=null){ |
| | | vo.setReqDesc(reqVo.getReqDesc()); |
| | | Long equId = reqVo.getEquId(); |
| | | if(equId!=null){ |
| | | EimsEquVo equVo = equService.queryById(equId); |
| | | if(equVo!=null){ |
| | | vo.setAssetNo(equVo.getAssetNo()); |
| | | vo.setEquId(equVo.getEquId()); |
| | | } |
| | | |
| | | } |
| | | } |
| | | rows.add(vo); |
| | | } |
| | | resTableData.setRows(rows); |
| | | return resTableData; |
| | | } |
| | | |
| | | /** |
| | |
| | | import jakarta.validation.constraints.*; |
| | | import cn.dev33.satoken.annotation.SaCheckPermission; |
| | | import org.dromara.eims.domain.bo.EimsMaintStBo; |
| | | import org.dromara.eims.domain.bo.EimsMultipleMaintStBo; |
| | | import org.dromara.eims.domain.vo.EimsMaintStVo; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.validation.annotation.Validated; |
| | |
| | | } |
| | | |
| | | /** |
| | | * æ¹éä¿®æ¹ä¿å
»å·¥åæ±æ» |
| | | */ |
| | | @SaCheckPermission("eims:maintSt:edit") |
| | | @Log(title = "æ¹éä¿®æ¹ä¿å
»å·¥åæ±æ»", businessType = BusinessType.UPDATE) |
| | | @RepeatSubmit() |
| | | @PutMapping("/batch") |
| | | public R<Void> editBatch(@Validated(EditGroup.class) @RequestBody EimsMultipleMaintStBo bo) { |
| | | return toAjax(eimsMaintStService.updateBatchByBo(bo)); |
| | | } |
| | | |
| | | /** |
| | | * å é¤ä¿å
»å·¥åæ±æ» |
| | | * |
| | | * @param ids 主é®ä¸² |
| | |
| | | */ |
| | | private String remark; |
| | | |
| | | /** |
| | | * æ¥è¯¢æ±æ»ä¸åå·¥åéè¦æ¤å段 |
| | | * equId + pian_time æ¼æ¥ |
| | | */ |
| | | private String maintCode; |
| | | |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.dromara.eims.domain.bo; |
| | | |
| | | import lombok.Data; |
| | | import org.dromara.common.mybatis.core.domain.BaseEntity; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * æ¹éä¿å
»å·¥åæ±æ»ä¸å¡å¯¹è±¡ eims_maint_st |
| | | */ |
| | | @Data |
| | | public class EimsMultipleMaintStBo extends BaseEntity { |
| | | private List<EimsMaintStBo> multipleMaintStBoList; |
| | | } |
| | |
| | | private String reqCode;//æ¥ä¿®åç¼ç |
| | | private String reqType;//æ¥ä¿®åç±»å |
| | | private String assetNo;//设å¤èµäº§ç¼å· |
| | | private String reqDesc;//æ
éæè¿° |
| | | |
| | | |
| | | private Long equId; |
| | |
| | | */ |
| | | private Integer unCheckCount; |
| | | /** |
| | | * å¾
ç¡®è®¤ç¹æ£è®°å½ |
| | | */ |
| | | private Integer dqrCount; |
| | | /** |
| | | * ç»æ-æ£å¸¸æ° |
| | | */ |
| | | private Integer normalNum; |
| | |
| | | |
| | | import org.dromara.common.core.domain.R; |
| | | import org.dromara.eims.domain.bo.EimsMaintStBo; |
| | | import org.dromara.eims.domain.bo.EimsMultipleMaintStBo; |
| | | import org.dromara.eims.domain.vo.EimsMaintStVo; |
| | | import org.dromara.common.mybatis.core.page.TableDataInfo; |
| | | import org.dromara.common.mybatis.core.page.PageQuery; |
| | |
| | | * @return æ¯å¦ä¿®æ¹æå |
| | | */ |
| | | Boolean updateByBo(EimsMaintStBo bo); |
| | | Boolean updateBatchByBo(EimsMultipleMaintStBo bo); |
| | | |
| | | /** |
| | | * æ ¡éªå¹¶æ¹éå é¤ä¿å
»å·¥åæ±æ»ä¿¡æ¯ |
| | |
| | | |
| | | @Override |
| | | public Boolean updateBatchByBo(InspectRecordBo bo) { |
| | | // LoginUser loginUser = LoginHelper.getLoginUser(); |
| | | LoginUser loginUser = LoginHelper.getLoginUser(); |
| | | List<EimsInspectRecord> inspRecordList = MapstructUtils.convert(bo.getInspRecordList(), EimsInspectRecord.class); |
| | | inspRecordList.forEach(item->{ |
| | | // æ´æ°ä¸ºå·²ç¹æ£ |
| | | item.setStatus(DictConstants.EIMS_INSPECT_STATUS_DETAIL.Y); |
| | | // åç«¯ä¼ å
¥ç¶æ |
| | | // item.setStatus(DictConstants.EIMS_INSPECT_STATUS_DETAIL.Y); |
| | | // item.setInspTime(new Date()); |
| | | // item.setInspUser(loginUser.getUserId()); |
| | | // ç¹æ£(0)-> å¾
确认(1) |
| | | if(item.getInspUser()==null && (item.getStatus()!=null && item.getStatus().equals("1"))){ |
| | | item.setInspUser(loginUser.getUserId()); |
| | | } |
| | | // å¾
确认(1)-> 宿(2) |
| | | if(item.getVerifyUser()==null&& (item.getStatus()!=null && item.getStatus().equals("2"))){ |
| | | item.setVerifyUser(loginUser.getUserId()); |
| | | } |
| | | |
| | | }); |
| | | return baseMapper.updateBatchById(inspRecordList); |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.dromara.common.satoken.utils.LoginHelper; |
| | | import org.dromara.eims.domain.EimsEqu; |
| | | import org.dromara.eims.domain.EimsInspectRecord; |
| | | import org.dromara.eims.domain.EimsMaintOrder; |
| | | import org.dromara.eims.domain.vo.EimsInspectRecordVo; |
| | | import org.dromara.eims.domain.vo.EimsMaintStVo; |
| | | import org.dromara.eims.mapper.EimsEquMapper; |
| | | import org.dromara.eims.mapper.EimsInspectRecordMapper; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | List<EimsInspectRecordVo> recordList = recordMapper.selectVoList(recordLqw); |
| | | // TODO æ ¹æ®åå
¸eims_inspect_status |
| | | Map<String, Long> cMap = recordList.stream() |
| | | .filter(order -> List.of("0", "1").contains(order.getStatus())) |
| | | .filter(order -> List.of("0","1", "2").contains(order.getStatus())) |
| | | .collect(Collectors.groupingBy(EimsInspectRecordVo::getStatus, Collectors.counting())); |
| | | // TODO æ ¹æ®åå
¸eims_inspect_result |
| | | Map<String, Long> rMap = recordList.stream() |
| | |
| | | |
| | | stVo.setRecordCount(recordList.size()); |
| | | stVo.setUnCheckCount(cMap.getOrDefault("0", 0L).intValue()); |
| | | stVo.setCheckCount(cMap.getOrDefault("1", 0L).intValue()); |
| | | stVo.setDqrCount(cMap.getOrDefault("1", 0L).intValue()); |
| | | stVo.setCheckCount(cMap.getOrDefault("2", 0L).intValue()); |
| | | |
| | | stVo.setNormalNum(rMap.getOrDefault("1", 0L).intValue()); |
| | | stVo.setAbNormalNum(rMap.getOrDefault("2", 0L).intValue()); |
| | |
| | | // if(update.getVerifyTime()==null) update.setVerifyTime(new Date()); |
| | | // } |
| | | // } |
| | | |
| | | |
| | | //ç¹æ£æ±æ»å®æéåæ¥æ´æ°stä¸åå·¥å |
| | | |
| | | EimsInspectStVo st = baseMapper.selectVoById(bo.getId()); |
| | | |
| | | Long equId = st.getEquId(); |
| | | String planTime = DateUtils.dateTime(st.getPlanTime()); |
| | | LambdaQueryWrapper<EimsInspectRecord> wrapper = Wrappers.lambdaQuery(); |
| | | wrapper.eq(EimsInspectRecord::getEquId,equId); |
| | | wrapper.eq(EimsInspectRecord::getPlanTime,planTime); |
| | | List<EimsInspectRecord> recordList = recordMapper.selectList(wrapper); |
| | | // stä¸åå·¥åææç¶æè®¾ç½®ä¸º3-已宿 |
| | | recordList.forEach(order -> { |
| | | order.setStatus(bo.getStatus()); |
| | | if(order.getStatus().equals("1")){ |
| | | order.setInspUser(LoginHelper.getUserId()); |
| | | }else if(order.getStatus().equals("2")){ |
| | | order.setVerifyUser(LoginHelper.getUserId()); |
| | | } |
| | | }); |
| | | recordMapper.updateBatchById(recordList); |
| | | |
| | | |
| | | validEntityBeforeSave(update); |
| | | return baseMapper.updateById(update) > 0; |
| | | } |
| | |
| | | import lombok.RequiredArgsConstructor; |
| | | |
| | | import org.dromara.common.satoken.utils.LoginHelper; |
| | | import org.dromara.eims.domain.EimsEquStatu; |
| | | import org.dromara.eims.domain.EimsMaintPlan; |
| | | import org.dromara.eims.domain.EimsSpareInout; |
| | | import org.dromara.eims.domain.bo.EimsSpareBo; |
| | |
| | | qw.like(StringUtils.isNotBlank(bo.getMaintCode()),"mo.maint_code", bo.getMaintCode()); |
| | | qw.like(bo.getEquName() != null, "equ.equ_name", bo.getEquName()); |
| | | qw.like(bo.getEquId() != null, "equ.equ_id", bo.getEquId()); |
| | | if (params.get("searchValue") != null && StringUtils.isNotBlank(params.get("searchValue").toString())) { |
| | | qw.and( wq ->wq.like("equ.equ_name", params.get("searchValue")) |
| | | .or().like("equ.asset_no", params.get("searchValue")) |
| | | ); |
| | | } |
| | | qw.eq(StringUtils.isNotBlank(bo.getMaintType()), "mo.maint_type", bo.getMaintType()); |
| | | qw.eq(StringUtils.isNotBlank(bo.getMaintCycleUnit()), "mo.maint_cycle_unit", bo.getMaintCycleUnit()); |
| | | qw.eq(StringUtils.isNotBlank(bo.getMaintRule()), "mo.maint_rule", bo.getMaintRule()); |
| | |
| | | lqw.eq(bo.getMaintDept() != null, EimsMaintOrder::getMaintDept, bo.getMaintDept()); |
| | | lqw.eq(StringUtils.isNotBlank(bo.getMaintCode()), EimsMaintOrder::getMaintCode, bo.getMaintCode()); |
| | | lqw.eq(StringUtils.isNotBlank(bo.getStatus()), EimsMaintOrder::getStatus, bo.getStatus()); |
| | | lqw.eq(bo.getPlanTime() != null, EimsMaintOrder::getPlanTime, bo.getPlanTime()); |
| | | lqw.between(params.get("beginPlanTime") != null && params.get("endPlanTime") != null,EimsMaintOrder::getPlanTime,params.get("beginPlanTime"), params.get("endPlanTime")); |
| | | lqw.eq(bo.getPlanId() != null, EimsMaintOrder::getPlanId, bo.getPlanId()); |
| | | // æå建æ¶é´ååº |
| | | lqw.orderByDesc(EimsMaintOrder::getCreateTime); |
| | |
| | | LoginUser loginUser = LoginHelper.getLoginUser(); |
| | | List<EimsMaintOrder> list = MapstructUtils.convert(bo.getMaintOrderList(), EimsMaintOrder.class); |
| | | list.forEach(e -> { |
| | | e.setStatus(DictConstants.MAINT_ORDER_STATUS_DETAIL.DAIYANZHENG); |
| | | // ç¶æç±åç«¯ä¼ è¿æ¥ |
| | | // e.setStatus(DictConstants.MAINT_ORDER_STATUS_DETAIL.DAIYANZHENG); |
| | | e.setEndTime(new Date()); |
| | | e.setMaintUser(loginUser.getUserId()); |
| | | // ä¿å
»(1)-> å¾
éªè¯(2) |
| | | if(e.getMaintUser()==null && (e.getStatus()!=null && e.getStatus().equals("2"))){ |
| | | e.setMaintUser(loginUser.getUserId()); |
| | | } |
| | | // å¾
确认(2)-> 宿(3) |
| | | if(e.getVerifyUser()==null && (e.getStatus()!=null && e.getStatus().equals("3"))){ |
| | | e.setVerifyUser(loginUser.getUserId()); |
| | | } |
| | | |
| | | e.setUpdateTime(new Date()); |
| | | }); |
| | | bo.getMaintOrderList().forEach(item -> { |
| | |
| | | import lombok.SneakyThrows; |
| | | import org.dromara.common.core.constant.DictConstants; |
| | | import org.dromara.common.core.domain.R; |
| | | import org.dromara.common.core.utils.DateUtils; |
| | | import org.dromara.common.core.utils.MapstructUtils; |
| | | import org.dromara.common.core.utils.StringUtils; |
| | | import org.dromara.common.mybatis.core.page.TableDataInfo; |
| | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.dromara.common.satoken.utils.LoginHelper; |
| | | import org.dromara.eims.domain.EimsEqu; |
| | | import org.dromara.eims.domain.EimsMaintOrder; |
| | | import org.dromara.eims.domain.EimsMaintSt; |
| | | import org.dromara.eims.domain.bo.EimsMaintStBo; |
| | | import org.dromara.eims.domain.bo.EimsMultipleMaintStBo; |
| | | import org.dromara.eims.domain.vo.EimsMaintOrderVo; |
| | | import org.dromara.eims.domain.vo.EimsMaintStVo; |
| | | import org.dromara.eims.mapper.EimsEquMapper; |
| | |
| | | List<EimsMaintOrderVo> orderList = orderMapper.selectVoList(orderLqw); |
| | | // TODO æ ¹æ®åå
¸maint_order_status |
| | | Map<String, Long> cMap = orderList.stream() |
| | | .filter(order -> List.of("0", "1", "2", "3").contains(order.getStatus())) |
| | | .filter(order -> List.of("0", "1", "2").contains(order.getStatus())) |
| | | .collect(Collectors.groupingBy(EimsMaintOrderVo::getStatus, Collectors.counting())); |
| | | stVo.setOrderCount(orderList.size()); |
| | | stVo.setDbyCount(cMap.getOrDefault("0", 0L).intValue()); |
| | | stVo.setByCount(cMap.getOrDefault("1", 0L).intValue()); |
| | | stVo.setDyzCount(cMap.getOrDefault("2", 0L).intValue()); |
| | | stVo.setWcCount(cMap.getOrDefault("3", 0L).intValue()); |
| | | stVo.setDyzCount(cMap.getOrDefault("1", 0L).intValue()); |
| | | stVo.setWcCount(cMap.getOrDefault("2", 0L).intValue()); |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | List<EimsMaintOrderVo> orderList = orderMapper.selectVoList(orderLqw); |
| | | // TODO æ ¹æ®åå
¸maint_order_status |
| | | Map<String, Long> cMap = orderList.stream() |
| | | .filter(order -> List.of("0", "1", "2", "3").contains(order.getStatus())) |
| | | .filter(order -> List.of("0", "1", "2").contains(order.getStatus())) |
| | | .collect(Collectors.groupingBy(EimsMaintOrderVo::getStatus, Collectors.counting())); |
| | | stVo.setOrderCount(orderList.size()); |
| | | stVo.setDbyCount(cMap.getOrDefault("0", 0L).intValue()); |
| | | stVo.setByCount(cMap.getOrDefault("1", 0L).intValue()); |
| | | stVo.setDyzCount(cMap.getOrDefault("2", 0L).intValue()); |
| | | stVo.setWcCount(cMap.getOrDefault("3", 0L).intValue()); |
| | | stVo.setDyzCount(cMap.getOrDefault("1", 0L).intValue()); |
| | | stVo.setWcCount(cMap.getOrDefault("2", 0L).intValue()); |
| | | |
| | | } |
| | | |
| | |
| | | * @return æ¯å¦ä¿®æ¹æå |
| | | */ |
| | | @Override |
| | | @Transactional |
| | | public Boolean updateByBo(EimsMaintStBo bo) { |
| | | EimsMaintSt update = MapstructUtils.convert(bo, EimsMaintSt.class); |
| | | |
| | | if(bo.getVerifyUser()!=null){ |
| | | EimsMaintSt eimsMaintSt = baseMapper.selectById(bo.getId()); |
| | | String status = eimsMaintSt.getStatus(); |
| | | if(status==null || status.equals(DictConstants.MAINT_ORDER_ST_STATUS_DETAIL.N)){ |
| | | if(update.getVerifyTime()==null) update.setStatus(DictConstants.MAINT_ORDER_ST_STATUS_DETAIL.Y); |
| | | if(update.getVerifyTime()==null) update.setVerifyTime(new Date()); |
| | | } |
| | | } |
| | | // if(bo.getVerifyUser()!=null){ |
| | | // EimsMaintSt eimsMaintSt = baseMapper.selectById(bo.getId()); |
| | | // String status = eimsMaintSt.getStatus(); |
| | | // if(status==null || status.equals(DictConstants.MAINT_ORDER_ST_STATUS_DETAIL.N)){ |
| | | // if(update.getVerifyTime()==null) update.setStatus(DictConstants.MAINT_ORDER_ST_STATUS_DETAIL.Y); |
| | | // if(update.getVerifyTime()==null) update.setVerifyTime(new Date()); |
| | | // } |
| | | // } |
| | | |
| | | if(update.getVerifyTime()==null) update.setVerifyTime(new Date()); |
| | | //工忱æ»å®æéåæ¥æ´æ°stä¸åå·¥å |
| | | |
| | | EimsMaintStVo st = baseMapper.selectVoById(bo.getId()); |
| | | |
| | | Long equId = st.getEquId(); |
| | | LambdaQueryWrapper<EimsMaintOrder> wrapper = Wrappers.lambdaQuery(); |
| | | wrapper.eq(EimsMaintOrder::getEquId,equId); |
| | | wrapper.eq(EimsMaintOrder::getPlanTime,st.getPlanTime()); |
| | | List<EimsMaintOrder> eimsMaintOrderList = orderMapper.selectList(wrapper); |
| | | // stä¸åå·¥åææç¶æè®¾ç½®ä¸º3-已宿 |
| | | eimsMaintOrderList.forEach(order -> { |
| | | order.setStatus(bo.getStatus()); |
| | | if(order.getStatus().equals("1")){ |
| | | order.setMaintUser(LoginHelper.getUserId()); |
| | | }else if(order.getStatus().equals("2")){ |
| | | order.setVerifyUser(LoginHelper.getUserId()); |
| | | } |
| | | }); |
| | | orderMapper.updateBatchById(eimsMaintOrderList); |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | validEntityBeforeSave(update); |
| | | return baseMapper.updateById(update) > 0; |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public Boolean updateBatchByBo(EimsMultipleMaintStBo bo) { |
| | | List<EimsMaintStBo> maintStBoList = bo.getMultipleMaintStBoList(); |
| | | if(maintStBoList==null || maintStBoList.isEmpty())return true; |
| | | List<EimsMaintSt> maintStList = MapstructUtils.convert(maintStBoList, EimsMaintSt.class); |
| | | baseMapper.updateBatchById(maintStList); |
| | | // æ´æ°æ±æ»ä¸åå·¥å |
| | | List<String> maintCodeList = maintStBoList.stream() |
| | | .map(EimsMaintStBo::getMaintCode) |
| | | .toList(); |
| | | |
| | | for (int i = 0; i < maintCodeList.size(); i++) { |
| | | String maintCode = maintCodeList.get(i); |
| | | String[] split = maintCode.split("_"); |
| | | LambdaQueryWrapper<EimsMaintOrder> wrapper = Wrappers.lambdaQuery(); |
| | | wrapper.eq(EimsMaintOrder::getEquId,split[0]); |
| | | wrapper.eq(EimsMaintOrder::getPlanTime,split[1]); |
| | | List<EimsMaintOrder> eimsMaintOrderList = orderMapper.selectList(wrapper); |
| | | // stä¸åå·¥åææç¶æè®¾ç½®ä¸º3-已宿 |
| | | eimsMaintOrderList.forEach(order -> { |
| | | order.setStatus("2"); |
| | | order.setVerifyUser(LoginHelper.getUserId()); |
| | | }); |
| | | orderMapper.updateBatchById(eimsMaintOrderList); |
| | | } |
| | | |
| | | return true; |
| | | } |
| | | |
| | | /** |
| | | * ä¿ååçæ°æ®æ ¡éª |
| | | */ |
| | |
| | | qw.eq(bo.getReqUser() != null, "res.req_user", bo.getReqUser()); |
| | | qw.eq(bo.getAssetNo() != null, "equ.asset_no", bo.getAssetNo()); |
| | | qw.eq(bo.getEquId() != null, "req.equ_id", bo.getEquId()); |
| | | |
| | | qw.between(params.get("beginReqTime") != null && params.get("endReqTime") != null, |
| | | "req.req_time", params.get("beginReqTime"), params.get("endReqTime")); |
| | | |
| | |
| | | ); |
| | | } |
| | | |
| | | /** |
| | | * ******************* |
| | | */ |
| | | qw.like(StringUtils.isNotBlank(bo.getReqDesc()), "req.req_desc", bo.getReqDesc()); |
| | | qw.like(StringUtils.isNotBlank(bo.getResHandle()), "res.res_handle", bo.getResHandle()); |
| | | /** |
| | | * ******************* |
| | | */ |
| | | |
| | | qw.eq(StringUtils.isNotBlank(bo.getStatus()), "res.status", bo.getStatus()); |
| | | String s = params.get("status") == null ? "" : params.get("status").toString(); |
| | | String[] status = s.split(","); |