From 9796651f30deb9eee38c9d846255b293fbba15eb Mon Sep 17 00:00:00 2001
From: schangxiang@126.com <schangxiang@126.com>
Date: 周五, 16 5月 2025 09:26:55 +0800
Subject: [PATCH] 333
---
PipeLineLems/server/src/CMS.Plugin.PipeLineLems.Application.Contracts/Services/IWorkPlanAppService.cs | 10
PipeLineLems/server/src/CMS.Plugin.PipeLineLems.Application/Implements/SharedService.cs | 15
PipeLineLems/pipelinelems_web/src/widgets/WorkPlan/Views/Pages/WorkPlan/WorkPlan.tsx | 49 +
PipeLineLems/pipelinelems_web/src/widgets/WorkPlan/Controllers/WorkPlanDrawer.tsx | 32 +
PipeLineLems/pipelinelems_web/src/components/DyFormForHighQuery/DyFormForHighQueryOptions.js | 19
PipeLineLems/server/src/CMS.Plugin.PipeLineLems.Domain/CallMaterialOrder/CallMaterialOrder.cs | 5
PipeLineLems/server/src/CMS.Plugin.PipeLineLems.Application.Contracts/Dtos/WorkPlan/WorkPlanExportModel.cs | 18
PipeLineLems/server/src/CMS.Plugin.PipeLineLems.Domain/CallMaterialOrderRecord/CallMaterialOrderRecord.cs | 6
PipeLineLems/server/src/CMS.Plugin.PipeLineLems.Application.Contracts/Dtos/WorkPlan/WorkPlanInput.cs | 46 +
PipeLineLems/server/src/CMS.Plugin.PipeLineLems.Domain/WorkPlan/IWorkPlanRepository.cs | 45 +
PipeLineLems/pipelinelems_web/src/widgets/WorkPlan/Views/Pages/Dialog/WorkPlanQueryDrawer/WorkPlanQueryDrawer.tsx | 6
PipeLineLems/pipelinelems_web/src/components/DyFormForHighQuery/DyFormForHighQuery.module.scss | 41 +
PipeLineLems/pipelinelems_web/src/components/DyFormForHighQuery/DyFormForHighQuery.d.ts | 39 +
PipeLineLems/server/src/CMS.Plugin.PipeLineLems/Controller/WorkPlanController.cs | 56 +
PipeLineLems/pipelinelems_web/src/widgets/WorkPlan/Views/Pages/WorkPlan/Config.ts | 46 +
PipeLineLems/server/src/CMS.Plugin.PipeLineLems.Application.Contracts/Dtos/WorkPlan/WorkPlanDto.cs | 14
PipeLineLems/server/src/CMS.Plugin.PipeLineLems.Application.Contracts/Dtos/WorkPlan/WorkPlanCreateOrUpdateDtoBase.cs | 27
PipeLineLems/server/src/CMS.Plugin.PipeLineLems.Application/Implements/WorkPlanAppService.cs | 17
PipeLineLems/server/src/CMS.Plugin.PipeLineLems.Application.Contracts/Dtos/WorkPlan/GetWorkPlanInput.cs | 38 +
PipeLineLems/pipelinelems_web/src/components/DyFormForHighQuery/DyFormForHighQuery.tsx | 245 +++++++++
PipeLineLems/server/src/CMS.Plugin.PipeLineLems.Application.Contracts/Dtos/WorkPlan/WorkPlanCreateDto.cs | 5
PipeLineLems/pipelinelems_web/src/widgets/WorkPlan/Controllers/WorkPlanQueryDrawer.tsx | 358 +++++++++++++
PipeLineLems/server/src/CMS.Plugin.PipeLineLems/Resources/Templates/WorkPlan导出模板.xlsx | 0
PipeLineLems/pipelinelems_web/src/utils/commonOptionConstants.js | 11
PipeLineLems/server/src/CMS.Plugin.PipeLineLems.Application.Contracts/Dtos/WorkPlan/WorkPlanUpdateDto.cs | 5
PipeLineLems/server/src/CMS.Plugin.PipeLineLems.EntityFrameworkCore/Repositories/EfCoreWorkPlanRepository.cs | 292 ++++++-----
PipeLineLems/server/src/CMS.Plugin.PipeLineLems/ProjectService/PipeLineLemsProjectService.cs | 13
27 files changed, 1,184 insertions(+), 274 deletions(-)
diff --git a/PipeLineLems/pipelinelems_web/src/components/DyFormForHighQuery/DyFormForHighQuery.d.ts b/PipeLineLems/pipelinelems_web/src/components/DyFormForHighQuery/DyFormForHighQuery.d.ts
new file mode 100644
index 0000000..aea115f
--- /dev/null
+++ b/PipeLineLems/pipelinelems_web/src/components/DyFormForHighQuery/DyFormForHighQuery.d.ts
@@ -0,0 +1,39 @@
+import { VNode, Component, DefineComponent } from 'vue'
+
+export interface OptionItemType {
+ label?: string
+ description?: string
+ name?: string
+ value: string | number
+}
+
+export interface FormItemPropType {
+ prop?: string | Ref<string>
+ highSelectProp?: string | Ref<string>
+ label?: String | Ref<string>
+ rules?: any[] | Ref<any[]>
+ disabled?: boolean | Ref<boolean>
+ isDateControl?: boolean | Ref<boolean>
+ placeholder?: string | Ref<string>
+ type?: string | Ref<string>
+ width?: string | Ref<string>
+ el?: string | Component | DefineComponent | Ref<string>
+ options?: OptionItemType[] | any[] | Ref<any>
+ highSelectAttrs?: object | Ref<object>
+ isTitle?: boolean
+ title?:string | Component
+ [key: string]: any | Ref<string>
+}
+
+export interface FormPropsType {
+ formData: { [key: string]: any }
+ formItemProps: FormItemPropType[]
+ [key: string]: any
+}
+
+export interface PropsType {
+ formItemProps: FormItemPropType[]
+ formData: { [key: string]: any }
+ labelWidth: string
+ [key: string]: any
+}
diff --git a/PipeLineLems/pipelinelems_web/src/components/DyFormForHighQuery/DyFormForHighQuery.module.scss b/PipeLineLems/pipelinelems_web/src/components/DyFormForHighQuery/DyFormForHighQuery.module.scss
new file mode 100644
index 0000000..0fff059
--- /dev/null
+++ b/PipeLineLems/pipelinelems_web/src/components/DyFormForHighQuery/DyFormForHighQuery.module.scss
@@ -0,0 +1,41 @@
+.formStyle {
+ .formItem {
+ // 绉婚櫎鍥哄畾瀹藉害闄愬埗
+ width: auto !important;
+ margin-right: 0 !important;
+ }
+
+ .formControl {
+ flex: 1; // 璁╂帶浠跺崰鎹墿浣欑┖闂�
+ min-width: 0; // 鍏佽鎺т欢鏀剁缉
+ }
+
+ .formItemLabel {
+ display: inline-flex;
+ justify-content: flex-end;
+ align-items: center;
+ flex: 0 0 auto;
+ font-size: var(--cs-form-label-font-size);
+ color: var(--cs-text-color-regular);
+ height: 32px;
+ line-height: 32px;
+ padding: 0 12px 0 0;
+ box-sizing: border-box;
+ > img {
+ margin-left: 10px;
+ }
+ }
+
+ :global(.cs-select) {
+ width: 100%;
+ }
+
+ // 绉婚櫎鍥哄畾瀹藉害璁剧疆
+ :global(.cs-form--inline .cs-form-item) {
+ width: auto !important;
+ }
+
+ :global(.cs-form--inline .cs-form-item:nth-last-of-type(2n)) {
+ margin-right: 0 !important;
+ }
+}
\ No newline at end of file
diff --git a/PipeLineLems/pipelinelems_web/src/components/DyFormForHighQuery/DyFormForHighQuery.tsx b/PipeLineLems/pipelinelems_web/src/components/DyFormForHighQuery/DyFormForHighQuery.tsx
new file mode 100644
index 0000000..1d2d888
--- /dev/null
+++ b/PipeLineLems/pipelinelems_web/src/components/DyFormForHighQuery/DyFormForHighQuery.tsx
@@ -0,0 +1,245 @@
+// import { ElInput } from "element-plus";
+import {
+ defineComponent,
+ PropType,
+ ref,
+ Ref,
+ SetupContext,
+ computed,
+ unref,
+ markRaw,
+ DefineComponent,
+} from 'vue'
+import styles from './DyFormForHighQuery.module.scss'
+import ElInput from 'element-plus/es/components/input/index'
+import Option from '@/components/Select/Option'
+import Select from '@/components/Select/Select'
+import SelectInput from '@/components/SelectInput/SelectInput'
+import type { FormInstance } from 'element-plus'
+import Icon from '../Icon/Icon'
+import {
+ FormPropsType,
+ FormItemPropType,
+ PropsType,
+ OptionItemType,
+} from './DyFormForHighQuery.d'
+import Variable from '../Variable/Variable'
+import Title from '../Title/Title'
+import TextareaFlow from '../Flow/Flow'
+import get from 'lodash/get'
+import set from 'lodash/set'
+
+const formItemElementMap = markRaw<Record<string, any>>({
+ input: ElInput,
+ select: Select,
+ selectInput: SelectInput,
+ variable: Variable,
+ textareaFlow: TextareaFlow,
+})
+
+const Type: Record<string, any> = {
+ select: 'select',
+}
+export default defineComponent<FormPropsType>({
+ //@ts-ignore
+ name: '鍔ㄦ�佽〃鍗�',
+ props: {
+ labelWidth: {
+ type: String,
+ default: '100px',
+ },
+ labelPosition: {
+ type: String,
+ default: 'left',
+ },
+ formData: {
+ type: Object as PropType<{ [key: string]: any }>,
+ default: () => ({}),
+ },
+ formItemProps: {
+ type: Array,
+ default: () => [],
+ },
+ inLine: {
+ type: Boolean,
+ default: false,
+ },
+ },
+ setup(props: PropsType, { attrs, emit, expose }: SetupContext) {
+ const formRef = ref<FormInstance>()
+ const form: any = computed({
+ get() {
+ return props.formData
+ },
+ set(v) {
+ emit('update:formData', v)
+ },
+ })
+
+ const currentWidgetModel = computed(() => {
+ return (path: string) => {
+ return get(form.value, path)
+ }
+ })
+
+ const validate = () => {
+ if (!formRef.value) return false
+ return new Promise((resolve, reject) => {
+ formRef.value?.validate((valid: boolean) => {
+ if (valid) {
+ resolve(true)
+ } else {
+ reject(false)
+ }
+ })
+ })
+ }
+
+ const resetForm = () => {
+ if (!formRef.value) return false
+ formRef.value.resetFields()
+ }
+
+ const formItemProps = computed(() => {
+ return props.formItemProps || []
+ })
+
+ expose({ validate, resetForm })
+
+ const FormRender: any = ($props: any) => {
+ const item: FormItemPropType = $props.item
+ const options = $props.item.options || []
+ if (item.el && Type[item.el as string]) {
+ return options.map((el: OptionItemType) => (
+ <Option
+ label={el.label || el.description || el.name}
+ value={el.value}
+ ></Option>
+ ))
+ }
+ return null
+ }
+ const FormRenderForHighSelectOptions: any = ($props: any) => {
+ const item: FormItemPropType = $props.item
+ const options = $props.item.highSelectAttrs?.options || []
+ if (1===1) {
+ return options.map((el: OptionItemType) => (
+ <Option
+ label={el.label || el.description || el.name}
+ value={el.value}
+ ></Option>
+ ))
+ }
+ return null
+ }
+
+ const onUpdateModelValue = (v: string | number, prop: string) => {
+ set(form.value, prop, v)
+ }
+
+ return () => {
+ return (
+ <div class={styles.formStyle}>
+ <el-form
+ labelPosition={props.labelPosition}
+ labelWidth={props.labelWidth}
+ model={form.value}
+ ref={formRef}
+ inline={props.inLine}
+ >
+ {formItemProps.value.map(
+ (item: FormItemPropType, index: number) => {
+ if (item.isTitle) {
+ if (typeof item.title === 'string') {
+ return (
+ <Title style="margin-bottom: 10px">{item.title}</Title>
+ )
+ }
+ return item.title
+ }
+
+ const itemProps: FormItemPropType = {}
+ Object.entries(item).forEach(([key, value]) => {
+ itemProps[key] = unref(value)
+ })
+
+ const el =
+ typeof itemProps.el === 'string'
+ ? formItemElementMap[itemProps.el]
+ : itemProps.el || null
+ const Component = el
+ const el2 =
+ formItemElementMap['select'];
+ const ComponentForHighSelect = el2
+ return Component && !item.isHide ? (
+
+ <el-form-item
+ label={itemProps.label}
+ prop={itemProps.prop}
+ rules={itemProps.rules}
+ key={itemProps.prop}
+ vSlots={
+ itemProps.labelIcon
+ ? {
+ label: () => (
+ <label class={styles.formitemPropsLabel}>
+ {itemProps.label}
+ <Icon icon={itemProps.labelIcon} />
+ </label>
+ ),
+ }
+ : null
+ }
+ >
+ {/* 娣诲姞鐨勬瘮杈冩搷浣滅閫夋嫨鍣� */}
+ {/* 浣跨敤flex甯冨眬璁╀笁涓厓绱犲湪鍚屼竴琛� */}
+ <div class="flex items-center w-full" style="width:100%">
+ {/* <el-select
+ size="small"
+ style="margin-right: 8px; min-width: 10px;"
+ >
+ <el-option label="绛変簬" value="2" />
+ <el-option label="涓嶇瓑浜�" value="8" />
+ </el-select> */}
+ {/* 褰撶粍浠剁被鍨嬩笉鏄棩鏈熸帶浠舵椂鏄剧ずComponentForHighSelect */}
+ {(!itemProps.isDateControl && (
+ // ComponentForHighSelect 鐨勬覆鏌撲唬鐮�
+ <ComponentForHighSelect style="width:150px;"
+ {...itemProps.highSelectAttrs}
+ modelValue={currentWidgetModel.value(itemProps.highSelectAttrs?.prop || '')}
+ onUpdate:modelValue={(val: string | number) =>
+ onUpdateModelValue(val, itemProps.highSelectAttrs?.prop || '')
+ }>
+ <FormRenderForHighSelectOptions item={itemProps} />
+ </ComponentForHighSelect>
+))}
+ {/* 鏃ユ湡鎺т欢鏃剁殑鍗犱綅鍏冪礌 */}
+{itemProps.isDateControl && <span style="width:150px;margin-right:8px;"></span>}
+
+
+ <Component
+ style={{
+ width: itemProps.width, // 榛樿鍗犳弧鍓╀綑瀹藉害
+ // width: itemProps.width , // 榛樿鍗犳弧鍓╀綑瀹藉害
+ height: itemProps.height,
+ }}
+ {...itemProps}
+ // v-model={form.value[itemProps.prop as keyof any]}
+ modelValue={currentWidgetModel.value(itemProps.prop)}
+ onUpdate:modelValue={(val: string | number) =>
+ onUpdateModelValue(val, itemProps.prop)
+ }
+ >
+ <FormRender item={itemProps} />
+ </Component>
+ </div>
+ </el-form-item>
+ ) : null
+ }
+ )}
+ </el-form>
+ </div>
+ )
+ }
+ },
+})
diff --git a/PipeLineLems/pipelinelems_web/src/components/DyFormForHighQuery/DyFormForHighQueryOptions.js b/PipeLineLems/pipelinelems_web/src/components/DyFormForHighQuery/DyFormForHighQueryOptions.js
new file mode 100644
index 0000000..e70f08b
--- /dev/null
+++ b/PipeLineLems/pipelinelems_web/src/components/DyFormForHighQuery/DyFormForHighQueryOptions.js
@@ -0,0 +1,19 @@
+// 瀛楃涓茬被鏌ヨ
+export const FILTER_MODE_OPTIONS_STRING = [
+ { label: '妯$硦鏌ヨ', value: 1 },
+ { label: '绮惧噯鏌ヨ', value: 2 },
+ ];
+ // 鏁板瓧绫绘煡璇�
+export const FILTER_MODE_OPTIONS_NUM = [
+ { label: '绮惧噯鏌ヨ', value: 2 },
+ { label: '澶т簬绛変簬', value: 3 },
+ { label: '灏忎簬绛変簬', value: 4 },
+ { label: '澶т簬', value: 5 },
+ { label: '灏忎簬', value: 6 },
+ { label: '涓嶇瓑浜�', value: 7 },
+ ];
+ // bool鏌ヨ
+export const FILTER_MODE_OPTIONS_BOOL = [
+ { label: '绮惧噯鏌ヨ', value: 2 },
+ { label: '涓嶇瓑浜�', value: 7 },
+ ];
diff --git a/PipeLineLems/pipelinelems_web/src/utils/commonOptionConstants.js b/PipeLineLems/pipelinelems_web/src/utils/commonOptionConstants.js
new file mode 100644
index 0000000..d09c6d6
--- /dev/null
+++ b/PipeLineLems/pipelinelems_web/src/utils/commonOptionConstants.js
@@ -0,0 +1,11 @@
+// 鏄� 鍚�(楂樼骇鏌ヨ鐢�)
+ export const BOOLEAN_OPTIONS = [
+ { label: '鏄�', value: 'true'},
+ { label: '鍚�', value: 'false' },
+ ];
+
+ // 鏄� 鍚�(鏂板銆佷慨鏀圭晫闈笓鐢�)
+ export const BOOLEAN_OPTIONS_AddEdit = [
+ { label: '鏄�', value: true},
+ { label: '鍚�', value: false },
+ ];
\ No newline at end of file
diff --git a/PipeLineLems/pipelinelems_web/src/widgets/WorkPlan/Controllers/WorkPlanDrawer.tsx b/PipeLineLems/pipelinelems_web/src/widgets/WorkPlan/Controllers/WorkPlanDrawer.tsx
index f3fb82f..04e4add 100644
--- a/PipeLineLems/pipelinelems_web/src/widgets/WorkPlan/Controllers/WorkPlanDrawer.tsx
+++ b/PipeLineLems/pipelinelems_web/src/widgets/WorkPlan/Controllers/WorkPlanDrawer.tsx
@@ -14,6 +14,10 @@
import isEqual from 'lodash/isEqual'
import { ConfirmBox } from '@/components/ConfirmBox/ConfirmBox'
import { cloneDeep } from 'lodash'
+// 寮曞叆鍏叡閫夐」閰嶇疆
+import {
+ BOOLEAN_OPTIONS_AddEdit
+} from '@/utils/commonOptionConstants';
export const useWorkPlanDrawer = (props: any, ctx?: any) => {
const workPlanDrawer = injectModel<WorkPlanDrawer>('workPlanDrawer')
@@ -304,11 +308,25 @@
placeholder: '璇疯緭鍏ヨ澶囦唬鐮�',
},
{
- label: '宸ヤ欢鍚嶇О',
- prop: 'workpieceName',
+ label: '浜х嚎缂栫爜',
+ prop: 'prodLineCode',
el: 'input',
//disabled: disabled,
- placeholder: '璇疯緭鍏ュ伐浠跺悕绉�',
+ placeholder: '璇疯緭鍏ヤ骇绾跨紪鐮�',
+ },
+ {
+ label: '鑸瑰彿',
+ prop: 'shipNumber',
+ el: 'input',
+ //disabled: disabled,
+ placeholder: '璇疯緭鍏ヨ埞鍙�',
+ },
+ {
+ label: '椤圭洰鍙�',
+ prop: 'projectNumber',
+ el: 'input',
+ //disabled: disabled,
+ placeholder: '璇疯緭鍏ラ」鐩彿',
},
{
label: '宸ュ簭鍚嶇О',
@@ -497,7 +515,9 @@
productCode: formData.value.productCode,
workstationCode: formData.value.workstationCode,
equipmentCode: formData.value.equipmentCode,
-workpieceName: formData.value.workpieceName,
+prodLineCode: formData.value.prodLineCode,
+shipNumber: formData.value.shipNumber,
+projectNumber: formData.value.projectNumber,
processName: formData.value.processName,
pipeFittingCode: formData.value.pipeFittingCode,
preSerialNumber: formData.value.preSerialNumber,
@@ -582,7 +602,9 @@
productCode: res.productCode,
workstationCode: res.workstationCode,
equipmentCode: res.equipmentCode,
-workpieceName: res.workpieceName,
+prodLineCode: res.prodLineCode,
+shipNumber: res.shipNumber,
+projectNumber: res.projectNumber,
processName: res.processName,
pipeFittingCode: res.pipeFittingCode,
preSerialNumber: res.preSerialNumber,
diff --git a/PipeLineLems/pipelinelems_web/src/widgets/WorkPlan/Controllers/WorkPlanQueryDrawer.tsx b/PipeLineLems/pipelinelems_web/src/widgets/WorkPlan/Controllers/WorkPlanQueryDrawer.tsx
index 99cc7c7..5ba5020 100644
--- a/PipeLineLems/pipelinelems_web/src/widgets/WorkPlan/Controllers/WorkPlanQueryDrawer.tsx
+++ b/PipeLineLems/pipelinelems_web/src/widgets/WorkPlan/Controllers/WorkPlanQueryDrawer.tsx
@@ -14,6 +14,15 @@
import isEqual from 'lodash/isEqual'
import { ConfirmBox } from '@/components/ConfirmBox/ConfirmBox'
import { cloneDeep } from 'lodash'
+// 寮曞叆鍏叡閫夐」閰嶇疆
+import {
+ FILTER_MODE_OPTIONS_STRING,
+ FILTER_MODE_OPTIONS_NUM,
+ FILTER_MODE_OPTIONS_BOOL
+} from '@/components/DyFormForHighQuery/DyFormForHighQueryOptions';
+import {
+ BOOLEAN_OPTIONS
+} from '@/utils/commonOptionConstants';
export const useWorkPlanQueryDrawer = (props: any, ctx?: any) => {
const workPlanDrawer = injectModel<WorkPlanDrawer>('WorkPlanDrawer')
@@ -84,6 +93,12 @@
el: 'input',
//disabled: disabled,
placeholder: '璇疯緭鍏ヤ换鍔$紪鐮�',
+ highSelectAttrs:{
+ prop: 'taskCode_FilterMode',
+ el: 'select',
+ placeholder: '璇烽�夋嫨',
+ options:FILTER_MODE_OPTIONS_STRING
+ }
},
{
label: '璁″垝鐘舵��',
@@ -93,6 +108,12 @@
option: [],
//disabled: disabled,
placeholder: '璇疯緭鍏ヨ鍒掔姸鎬�',
+ highSelectAttrs:{
+ prop: 'workPlanStatus_FilterMode',
+ el: 'select',
+ placeholder: '璇烽�夋嫨',
+ options:FILTER_MODE_OPTIONS_BOOL
+ }
},
{
label: '鍙枡鐘舵��',
@@ -102,6 +123,12 @@
option: [],
//disabled: disabled,
placeholder: '璇疯緭鍏ュ彨鏂欑姸鎬�',
+ highSelectAttrs:{
+ prop: 'callMaterialStatus_FilterMode',
+ el: 'select',
+ placeholder: '璇烽�夋嫨',
+ options:FILTER_MODE_OPTIONS_BOOL
+ }
},
{
label: '鍘熸枡鏍囪瘑',
@@ -109,6 +136,12 @@
el: 'input',
//disabled: disabled,
placeholder: '璇疯緭鍏ュ師鏂欐爣璇�',
+ highSelectAttrs:{
+ prop: 'dataIdentifier_FilterMode',
+ el: 'select',
+ placeholder: '璇烽�夋嫨',
+ options:FILTER_MODE_OPTIONS_STRING
+ }
},
{
label: '鍘熸枡鍨嬪彿',
@@ -116,6 +149,12 @@
el: 'input',
//disabled: disabled,
placeholder: '璇疯緭鍏ュ師鏂欏瀷鍙�',
+ highSelectAttrs:{
+ prop: 'materialMode_FilterMode',
+ el: 'select',
+ placeholder: '璇烽�夋嫨',
+ options:FILTER_MODE_OPTIONS_STRING
+ }
},
{
label: '闀垮害(mm)',
@@ -132,6 +171,12 @@
precision: 2,
//disabled: disabled,
placeholder: '璇疯緭鍏ラ暱搴�(mm)',
+ highSelectAttrs:{
+ prop: 'length_FilterMode',
+ el: 'select',
+ placeholder: '璇烽�夋嫨',
+ options:FILTER_MODE_OPTIONS_NUM
+ }
},
{
label: '鎵撶爜鍐呭',
@@ -139,6 +184,12 @@
el: 'input',
//disabled: disabled,
placeholder: '璇疯緭鍏ユ墦鐮佸唴瀹�',
+ highSelectAttrs:{
+ prop: 'markingContent_FilterMode',
+ el: 'select',
+ placeholder: '璇烽�夋嫨',
+ options:FILTER_MODE_OPTIONS_STRING
+ }
},
{
label: '鎵撶爜浣嶇疆',
@@ -155,6 +206,12 @@
precision: 2,
//disabled: disabled,
placeholder: '璇疯緭鍏ユ墦鐮佷綅缃�',
+ highSelectAttrs:{
+ prop: 'markingPosition_FilterMode',
+ el: 'select',
+ placeholder: '璇烽�夋嫨',
+ options:FILTER_MODE_OPTIONS_NUM
+ }
},
{
label: '鍒囧壊浣嶇疆',
@@ -171,6 +228,12 @@
precision: 2,
//disabled: disabled,
placeholder: '璇疯緭鍏ュ垏鍓蹭綅缃�',
+ highSelectAttrs:{
+ prop: 'cuttingPosition_FilterMode',
+ el: 'select',
+ placeholder: '璇烽�夋嫨',
+ options:FILTER_MODE_OPTIONS_NUM
+ }
},
{
label: '绠℃鏁伴噺',
@@ -187,6 +250,12 @@
precision: 0,
//disabled: disabled,
placeholder: '璇疯緭鍏ョ娈垫暟閲�',
+ highSelectAttrs:{
+ prop: 'quantity_FilterMode',
+ el: 'select',
+ placeholder: '璇烽�夋嫨',
+ options:FILTER_MODE_OPTIONS_NUM
+ }
},
{
label: '娉曞叞鍘氬害(mm)',
@@ -203,6 +272,12 @@
precision: 2,
//disabled: disabled,
placeholder: '璇疯緭鍏ユ硶鍏板帤搴�(mm)',
+ highSelectAttrs:{
+ prop: 'flangeThickness_FilterMode',
+ el: 'select',
+ placeholder: '璇烽�夋嫨',
+ options:FILTER_MODE_OPTIONS_NUM
+ }
},
{
label: '娉曞叞鐩村緞(mm)',
@@ -219,6 +294,12 @@
precision: 2,
//disabled: disabled,
placeholder: '璇疯緭鍏ユ硶鍏扮洿寰�(mm)',
+ highSelectAttrs:{
+ prop: 'flangeInnerDiameter_FilterMode',
+ el: 'select',
+ placeholder: '璇烽�夋嫨',
+ options:FILTER_MODE_OPTIONS_NUM
+ }
},
{
label: '娉曞叞鍏О鍘嬪姏',
@@ -226,6 +307,12 @@
el: 'input',
//disabled: disabled,
placeholder: '璇疯緭鍏ユ硶鍏板叕绉板帇鍔�',
+ highSelectAttrs:{
+ prop: 'weldingHeatInput_FilterMode',
+ el: 'select',
+ placeholder: '璇烽�夋嫨',
+ options:FILTER_MODE_OPTIONS_STRING
+ }
},
{
label: '娉曞叞鍐茬爜鍐呭',
@@ -233,6 +320,12 @@
el: 'input',
//disabled: disabled,
placeholder: '璇疯緭鍏ユ硶鍏板啿鐮佸唴瀹�',
+ highSelectAttrs:{
+ prop: 'pipeAllowableStress_FilterMode',
+ el: 'select',
+ placeholder: '璇烽�夋嫨',
+ options:FILTER_MODE_OPTIONS_STRING
+ }
},
{
label: '濂楃闀垮害(mm)',
@@ -249,6 +342,12 @@
precision: 2,
//disabled: disabled,
placeholder: '璇疯緭鍏ュ绠¢暱搴�(mm)',
+ highSelectAttrs:{
+ prop: 'pipeDiameter_FilterMode',
+ el: 'select',
+ placeholder: '璇烽�夋嫨',
+ options:FILTER_MODE_OPTIONS_NUM
+ }
},
{
label: '濂楃鐩村緞(mm)',
@@ -265,6 +364,12 @@
precision: 2,
//disabled: disabled,
placeholder: '璇疯緭鍏ュ绠$洿寰�(mm)',
+ highSelectAttrs:{
+ prop: 'pipeWallThickness_FilterMode',
+ el: 'select',
+ placeholder: '璇烽�夋嫨',
+ options:FILTER_MODE_OPTIONS_NUM
+ }
},
{
label: '宸ュ巶浠g爜',
@@ -272,6 +377,12 @@
el: 'input',
//disabled: disabled,
placeholder: '璇疯緭鍏ュ伐鍘備唬鐮�',
+ highSelectAttrs:{
+ prop: 'factoryCode_FilterMode',
+ el: 'select',
+ placeholder: '璇烽�夋嫨',
+ options:FILTER_MODE_OPTIONS_STRING
+ }
},
{
label: '浜у搧浠g爜',
@@ -279,6 +390,12 @@
el: 'input',
//disabled: disabled,
placeholder: '璇疯緭鍏ヤ骇鍝佷唬鐮�',
+ highSelectAttrs:{
+ prop: 'productCode_FilterMode',
+ el: 'select',
+ placeholder: '璇烽�夋嫨',
+ options:FILTER_MODE_OPTIONS_STRING
+ }
},
{
label: '宸ヤ綅浠g爜',
@@ -286,6 +403,12 @@
el: 'input',
//disabled: disabled,
placeholder: '璇疯緭鍏ュ伐浣嶄唬鐮�',
+ highSelectAttrs:{
+ prop: 'workstationCode_FilterMode',
+ el: 'select',
+ placeholder: '璇烽�夋嫨',
+ options:FILTER_MODE_OPTIONS_STRING
+ }
},
{
label: '璁惧浠g爜',
@@ -293,13 +416,51 @@
el: 'input',
//disabled: disabled,
placeholder: '璇疯緭鍏ヨ澶囦唬鐮�',
+ highSelectAttrs:{
+ prop: 'equipmentCode_FilterMode',
+ el: 'select',
+ placeholder: '璇烽�夋嫨',
+ options:FILTER_MODE_OPTIONS_STRING
+ }
},
{
- label: '宸ヤ欢鍚嶇О',
- prop: 'workpieceName',
+ label: '浜х嚎缂栫爜',
+ prop: 'prodLineCode',
el: 'input',
//disabled: disabled,
- placeholder: '璇疯緭鍏ュ伐浠跺悕绉�',
+ placeholder: '璇疯緭鍏ヤ骇绾跨紪鐮�',
+ highSelectAttrs:{
+ prop: 'prodLineCode_FilterMode',
+ el: 'select',
+ placeholder: '璇烽�夋嫨',
+ options:FILTER_MODE_OPTIONS_STRING
+ }
+ },
+ {
+ label: '鑸瑰彿',
+ prop: 'shipNumber',
+ el: 'input',
+ //disabled: disabled,
+ placeholder: '璇疯緭鍏ヨ埞鍙�',
+ highSelectAttrs:{
+ prop: 'shipNumber_FilterMode',
+ el: 'select',
+ placeholder: '璇烽�夋嫨',
+ options:FILTER_MODE_OPTIONS_STRING
+ }
+ },
+ {
+ label: '椤圭洰鍙�',
+ prop: 'projectNumber',
+ el: 'input',
+ //disabled: disabled,
+ placeholder: '璇疯緭鍏ラ」鐩彿',
+ highSelectAttrs:{
+ prop: 'projectNumber_FilterMode',
+ el: 'select',
+ placeholder: '璇烽�夋嫨',
+ options:FILTER_MODE_OPTIONS_STRING
+ }
},
{
label: '宸ュ簭鍚嶇О',
@@ -307,6 +468,12 @@
el: 'input',
//disabled: disabled,
placeholder: '璇疯緭鍏ュ伐搴忓悕绉�',
+ highSelectAttrs:{
+ prop: 'processName_FilterMode',
+ el: 'select',
+ placeholder: '璇烽�夋嫨',
+ options:FILTER_MODE_OPTIONS_STRING
+ }
},
{
label: '绠′欢缂栫爜',
@@ -314,6 +481,12 @@
el: 'input',
//disabled: disabled,
placeholder: '璇疯緭鍏ョ浠剁紪鐮�',
+ highSelectAttrs:{
+ prop: 'pipeFittingCode_FilterMode',
+ el: 'select',
+ placeholder: '璇烽�夋嫨',
+ options:FILTER_MODE_OPTIONS_STRING
+ }
},
{
label: '椤哄簭鍙�',
@@ -321,6 +494,12 @@
el: 'input',
//disabled: disabled,
placeholder: '璇疯緭鍏ラ『搴忓彿',
+ highSelectAttrs:{
+ prop: 'preSerialNumber_FilterMode',
+ el: 'select',
+ placeholder: '璇烽�夋嫨',
+ options:FILTER_MODE_OPTIONS_STRING
+ }
},
{
label: '绠℃缂栫爜',
@@ -328,6 +507,12 @@
el: 'input',
//disabled: disabled,
placeholder: '璇疯緭鍏ョ娈电紪鐮�',
+ highSelectAttrs:{
+ prop: 'pipeSpecCode_FilterMode',
+ el: 'select',
+ placeholder: '璇烽�夋嫨',
+ options:FILTER_MODE_OPTIONS_STRING
+ }
},
{
label: '绠℃鍚嶇О',
@@ -335,6 +520,12 @@
el: 'input',
//disabled: disabled,
placeholder: '璇疯緭鍏ョ娈靛悕绉�',
+ highSelectAttrs:{
+ prop: 'pipeSectionName_FilterMode',
+ el: 'select',
+ placeholder: '璇烽�夋嫨',
+ options:FILTER_MODE_OPTIONS_STRING
+ }
},
{
label: '澶栧緞(mm)',
@@ -351,6 +542,12 @@
precision: 2,
//disabled: disabled,
placeholder: '璇疯緭鍏ュ寰�(mm)',
+ highSelectAttrs:{
+ prop: 'outerDiameter_FilterMode',
+ el: 'select',
+ placeholder: '璇烽�夋嫨',
+ options:FILTER_MODE_OPTIONS_NUM
+ }
},
{
label: '澹佸帤(mm)',
@@ -367,6 +564,12 @@
precision: 2,
//disabled: disabled,
placeholder: '璇疯緭鍏ュ鍘�(mm)',
+ highSelectAttrs:{
+ prop: 'thickness_FilterMode',
+ el: 'select',
+ placeholder: '璇烽�夋嫨',
+ options:FILTER_MODE_OPTIONS_NUM
+ }
},
{
label: '鏉愯川',
@@ -374,6 +577,12 @@
el: 'input',
//disabled: disabled,
placeholder: '璇疯緭鍏ユ潗璐�',
+ highSelectAttrs:{
+ prop: 'material_FilterMode',
+ el: 'select',
+ placeholder: '璇烽�夋嫨',
+ options:FILTER_MODE_OPTIONS_STRING
+ }
},
{
label: '宸ヨ壓娴佸悜缂栧彿',
@@ -381,6 +590,12 @@
el: 'input',
//disabled: disabled,
placeholder: '璇疯緭鍏ュ伐鑹烘祦鍚戠紪鍙�',
+ highSelectAttrs:{
+ prop: 'processRouteNumber_FilterMode',
+ el: 'select',
+ placeholder: '璇烽�夋嫨',
+ options:FILTER_MODE_OPTIONS_STRING
+ }
},
{
label: '璁″垝寮�濮嬫椂闂�',
@@ -395,6 +610,7 @@
width: '100%',
//disabled: disabled,
placeholder: '璇疯緭鍏ヨ鍒掑紑濮嬫椂闂�',
+ isDateControl: true, // 鏄惧紡鏍囪涓烘棩鏈熸帶浠�
},
{
label: '璁″垝瀹屾垚鏃堕棿',
@@ -409,6 +625,7 @@
width: '100%',
//disabled: disabled,
placeholder: '璇疯緭鍏ヨ鍒掑畬鎴愭椂闂�',
+ isDateControl: true, // 鏄惧紡鏍囪涓烘棩鏈熸帶浠�
},
{
label: '鐝粍淇℃伅',
@@ -416,6 +633,12 @@
el: 'input',
//disabled: disabled,
placeholder: '璇疯緭鍏ョ彮缁勪俊鎭�',
+ highSelectAttrs:{
+ prop: 'teamInfo_FilterMode',
+ el: 'select',
+ placeholder: '璇烽�夋嫨',
+ options:FILTER_MODE_OPTIONS_STRING
+ }
},
{
label: '鏃堕棿鎴�',
@@ -423,6 +646,12 @@
el: 'input',
//disabled: disabled,
placeholder: '璇疯緭鍏ユ椂闂存埑',
+ highSelectAttrs:{
+ prop: 'timestamp_FilterMode',
+ el: 'select',
+ placeholder: '璇烽�夋嫨',
+ options:FILTER_MODE_OPTIONS_STRING
+ }
},
{
label: '鍒涘缓鏃堕棿',
@@ -437,6 +666,7 @@
width: '100%',
//disabled: disabled,
placeholder: '璇疯緭鍏ュ垱寤烘椂闂�',
+ isDateControl: true, // 鏄惧紡鏍囪涓烘棩鏈熸帶浠�
},
{
label: '淇敼鏃堕棿',
@@ -451,6 +681,7 @@
width: '100%',
//disabled: disabled,
placeholder: '璇疯緭鍏ヤ慨鏀规椂闂�',
+ isDateControl: true, // 鏄惧紡鏍囪涓烘棩鏈熸帶浠�
},
{
label: '鍒涘缓浜�',
@@ -458,6 +689,12 @@
el: 'input',
//disabled: disabled,
placeholder: '璇疯緭鍏ュ垱寤轰汉',
+ highSelectAttrs:{
+ prop: 'creatorName_FilterMode',
+ el: 'select',
+ placeholder: '璇烽�夋嫨',
+ options:FILTER_MODE_OPTIONS_STRING
+ }
},
{
label: '淇敼浜�',
@@ -465,6 +702,12 @@
el: 'input',
//disabled: disabled,
placeholder: '璇疯緭鍏ヤ慨鏀逛汉',
+ highSelectAttrs:{
+ prop: 'lastModifierName_FilterMode',
+ el: 'select',
+ placeholder: '璇烽�夋嫨',
+ options:FILTER_MODE_OPTIONS_STRING
+ }
},
{
label: '澶囨敞',
@@ -472,6 +715,12 @@
el: 'input',
//disabled: disabled,
placeholder: '璇疯緭鍏ュ娉�',
+ highSelectAttrs:{
+ prop: 'remark_FilterMode',
+ el: 'select',
+ placeholder: '璇烽�夋嫨',
+ options:FILTER_MODE_OPTIONS_STRING
+ }
},
])
/**
@@ -487,44 +736,83 @@
const commonGetFormData=()=>{
const data = {
taskCode: formData.value.taskCode || '',
+taskCode_FilterMode: formData.value.taskCode_FilterMode || '',
workPlanStatus: formData.value.workPlanStatus || '',
+workPlanStatus_FilterMode: formData.value.workPlanStatus_FilterMode || '',
callMaterialStatus: formData.value.callMaterialStatus || '',
+callMaterialStatus_FilterMode: formData.value.callMaterialStatus_FilterMode || '',
dataIdentifier: formData.value.dataIdentifier || '',
+dataIdentifier_FilterMode: formData.value.dataIdentifier_FilterMode || '',
materialMode: formData.value.materialMode || '',
+materialMode_FilterMode: formData.value.materialMode_FilterMode || '',
length: formData.value.length || '',
+length_FilterMode: formData.value.length_FilterMode || '',
markingContent: formData.value.markingContent || '',
+markingContent_FilterMode: formData.value.markingContent_FilterMode || '',
markingPosition: formData.value.markingPosition || '',
+markingPosition_FilterMode: formData.value.markingPosition_FilterMode || '',
cuttingPosition: formData.value.cuttingPosition || '',
+cuttingPosition_FilterMode: formData.value.cuttingPosition_FilterMode || '',
quantity: formData.value.quantity || '',
+quantity_FilterMode: formData.value.quantity_FilterMode || '',
flangeThickness: formData.value.flangeThickness || '',
+flangeThickness_FilterMode: formData.value.flangeThickness_FilterMode || '',
flangeInnerDiameter: formData.value.flangeInnerDiameter || '',
+flangeInnerDiameter_FilterMode: formData.value.flangeInnerDiameter_FilterMode || '',
weldingHeatInput: formData.value.weldingHeatInput || '',
+weldingHeatInput_FilterMode: formData.value.weldingHeatInput_FilterMode || '',
pipeAllowableStress: formData.value.pipeAllowableStress || '',
+pipeAllowableStress_FilterMode: formData.value.pipeAllowableStress_FilterMode || '',
pipeDiameter: formData.value.pipeDiameter || '',
+pipeDiameter_FilterMode: formData.value.pipeDiameter_FilterMode || '',
pipeWallThickness: formData.value.pipeWallThickness || '',
+pipeWallThickness_FilterMode: formData.value.pipeWallThickness_FilterMode || '',
factoryCode: formData.value.factoryCode || '',
+factoryCode_FilterMode: formData.value.factoryCode_FilterMode || '',
productCode: formData.value.productCode || '',
+productCode_FilterMode: formData.value.productCode_FilterMode || '',
workstationCode: formData.value.workstationCode || '',
+workstationCode_FilterMode: formData.value.workstationCode_FilterMode || '',
equipmentCode: formData.value.equipmentCode || '',
-workpieceName: formData.value.workpieceName || '',
+equipmentCode_FilterMode: formData.value.equipmentCode_FilterMode || '',
+prodLineCode: formData.value.prodLineCode || '',
+prodLineCode_FilterMode: formData.value.prodLineCode_FilterMode || '',
+shipNumber: formData.value.shipNumber || '',
+shipNumber_FilterMode: formData.value.shipNumber_FilterMode || '',
+projectNumber: formData.value.projectNumber || '',
+projectNumber_FilterMode: formData.value.projectNumber_FilterMode || '',
processName: formData.value.processName || '',
+processName_FilterMode: formData.value.processName_FilterMode || '',
pipeFittingCode: formData.value.pipeFittingCode || '',
+pipeFittingCode_FilterMode: formData.value.pipeFittingCode_FilterMode || '',
preSerialNumber: formData.value.preSerialNumber || '',
+preSerialNumber_FilterMode: formData.value.preSerialNumber_FilterMode || '',
pipeSpecCode: formData.value.pipeSpecCode || '',
+pipeSpecCode_FilterMode: formData.value.pipeSpecCode_FilterMode || '',
pipeSectionName: formData.value.pipeSectionName || '',
+pipeSectionName_FilterMode: formData.value.pipeSectionName_FilterMode || '',
outerDiameter: formData.value.outerDiameter || '',
+outerDiameter_FilterMode: formData.value.outerDiameter_FilterMode || '',
thickness: formData.value.thickness || '',
+thickness_FilterMode: formData.value.thickness_FilterMode || '',
material: formData.value.material || '',
+material_FilterMode: formData.value.material_FilterMode || '',
processRouteNumber: formData.value.processRouteNumber || '',
+processRouteNumber_FilterMode: formData.value.processRouteNumber_FilterMode || '',
plannedStartTime: formData.value.plannedStartTime || '',
plannedEndTime: formData.value.plannedEndTime || '',
teamInfo: formData.value.teamInfo || '',
+teamInfo_FilterMode: formData.value.teamInfo_FilterMode || '',
timestamp: formData.value.timestamp || '',
+timestamp_FilterMode: formData.value.timestamp_FilterMode || '',
creationTime: formData.value.creationTime || '',
lastModificationTime: formData.value.lastModificationTime || '',
creatorName: formData.value.creatorName || '',
+creatorName_FilterMode: formData.value.creatorName_FilterMode || '',
lastModifierName: formData.value.lastModifierName || '',
-remark: formData.value.remark || '',
+lastModifierName_FilterMode: formData.value.lastModifierName_FilterMode || '',
+remark: formData.value.remark || '',
+remark_FilterMode: formData.value.remark_FilterMode || '',
}
return data;
}
@@ -542,11 +830,54 @@
const data =commonGetFormData();
ctx.emit('confirmQuery', data)
}
+ /**
+ * 閲嶇疆鍏叡select鏌ヨ
+ */
+ const onResetForHighSelect = async () => {
+ formData.value.taskCode_FilterMode = 1
+formData.value.workPlanStatus_FilterMode = 2
+formData.value.callMaterialStatus_FilterMode = 2
+formData.value.dataIdentifier_FilterMode = 1
+formData.value.materialMode_FilterMode = 1
+formData.value.length_FilterMode = 2
+formData.value.markingContent_FilterMode = 1
+formData.value.markingPosition_FilterMode = 2
+formData.value.cuttingPosition_FilterMode = 2
+formData.value.quantity_FilterMode = 2
+formData.value.flangeThickness_FilterMode = 2
+formData.value.flangeInnerDiameter_FilterMode = 2
+formData.value.weldingHeatInput_FilterMode = 1
+formData.value.pipeAllowableStress_FilterMode = 1
+formData.value.pipeDiameter_FilterMode = 2
+formData.value.pipeWallThickness_FilterMode = 2
+formData.value.factoryCode_FilterMode = 1
+formData.value.productCode_FilterMode = 1
+formData.value.workstationCode_FilterMode = 1
+formData.value.equipmentCode_FilterMode = 1
+formData.value.prodLineCode_FilterMode = 1
+formData.value.shipNumber_FilterMode = 1
+formData.value.projectNumber_FilterMode = 1
+formData.value.processName_FilterMode = 1
+formData.value.pipeFittingCode_FilterMode = 1
+formData.value.preSerialNumber_FilterMode = 1
+formData.value.pipeSpecCode_FilterMode = 1
+formData.value.pipeSectionName_FilterMode = 1
+formData.value.outerDiameter_FilterMode = 2
+formData.value.thickness_FilterMode = 2
+formData.value.material_FilterMode = 1
+formData.value.processRouteNumber_FilterMode = 1
+formData.value.teamInfo_FilterMode = 1
+formData.value.timestamp_FilterMode = 1
+formData.value.creatorName_FilterMode = 1
+formData.value.lastModifierName_FilterMode = 1
+formData.value.remark_FilterMode = 1
+ }
/**
* 閲嶇疆鏌ヨ
*/
const onReset = async () => {
formData.value = {}
+ onResetForHighSelect();//閲嶇疆鍏叡select鏌ヨ
formData.value.taskCode = ''
formData.value.workPlanStatus = ''
formData.value.callMaterialStatus = ''
@@ -567,7 +898,9 @@
formData.value.productCode = ''
formData.value.workstationCode = ''
formData.value.equipmentCode = ''
-formData.value.workpieceName = ''
+formData.value.prodLineCode = ''
+formData.value.shipNumber = ''
+formData.value.projectNumber = ''
formData.value.processName = ''
formData.value.pipeFittingCode = ''
formData.value.preSerialNumber = ''
@@ -581,13 +914,11 @@
formData.value.plannedEndTime = ''
formData.value.teamInfo = ''
formData.value.timestamp = ''
-formData.value.deletionTime = ''
-formData.value.operationRemark = ''
-formData.value.deleteRemark = ''
-formData.value.remark = ''
-formData.value.extraField1 = ''
-formData.value.extraField2 = ''
-formData.value.extraField3 = ''
+formData.value.creationTime = ''
+formData.value.lastModificationTime = ''
+formData.value.creatorName = ''
+formData.value.lastModifierName = ''
+formData.value.remark = ''
//鍚戠埗缁勪欢鍙戦�佽嚜瀹氫箟浜嬩欢
ctx.emit('restQuery');
}
@@ -623,6 +954,7 @@
}
commonQueryEnumForFrom()
+ onResetForHighSelect();//閲嶇疆鍏叡select鏌ヨ
/**
* 寮圭獥鎵撳紑鑾峰彇璇︽儏
*/
diff --git a/PipeLineLems/pipelinelems_web/src/widgets/WorkPlan/Views/Pages/Dialog/WorkPlanQueryDrawer/WorkPlanQueryDrawer.tsx b/PipeLineLems/pipelinelems_web/src/widgets/WorkPlan/Views/Pages/Dialog/WorkPlanQueryDrawer/WorkPlanQueryDrawer.tsx
index 65eb279..17dcc27 100644
--- a/PipeLineLems/pipelinelems_web/src/widgets/WorkPlan/Views/Pages/Dialog/WorkPlanQueryDrawer/WorkPlanQueryDrawer.tsx
+++ b/PipeLineLems/pipelinelems_web/src/widgets/WorkPlan/Views/Pages/Dialog/WorkPlanQueryDrawer/WorkPlanQueryDrawer.tsx
@@ -5,7 +5,7 @@
import BaseQueryDrawer from '@/components/BaseQueryDrawer/BaseQueryDrawer'
import styles from './WorkPlanQueryDrawer.module.scss'
import { useWorkPlanQueryDrawer } from '../../../../Controllers/WorkPlanQueryDrawer.tsx'
-import DyForm from '@/components/DyForm/DyForm'
+import DyFormForHighQuery from '@/components/DyFormForHighQuery/DyFormForHighQuery'
// @ts-ignore
export default defineComponent<{
@@ -59,12 +59,12 @@
before-close={onClose}
onClose={onClose}
>
- <DyForm
+ <DyFormForHighQuery
ref={formRef}
formData={formData.value}
labelWidth="106px"
formItemProps={formItems}
- ></DyForm>
+ ></DyFormForHighQuery>
</BaseQueryDrawer>
)
},
diff --git a/PipeLineLems/pipelinelems_web/src/widgets/WorkPlan/Views/Pages/WorkPlan/Config.ts b/PipeLineLems/pipelinelems_web/src/widgets/WorkPlan/Views/Pages/WorkPlan/Config.ts
index bb7c427..e051aae 100644
--- a/PipeLineLems/pipelinelems_web/src/widgets/WorkPlan/Views/Pages/WorkPlan/Config.ts
+++ b/PipeLineLems/pipelinelems_web/src/widgets/WorkPlan/Views/Pages/WorkPlan/Config.ts
@@ -10,21 +10,6 @@
width:160,
},
{
- field: 'processName',
- title: '宸ュ簭鍚嶇О',
- width:160,
-},
-{
- field: 'pipeSpecCode',
- title: '绠℃缂栫爜',
- width:160,
-},
-{
- field: 'pipeSectionName',
- title: '绠℃鍚嶇О',
- width:160,
-},
-{
field: 'workPlanStatusDesc',
title: '璁″垝鐘舵��',
width:160,
@@ -120,11 +105,25 @@
width:160,
},
{
- field: 'workpieceName',
- title: '宸ヤ欢鍚嶇О',
+ field: 'prodLineCode',
+ title: '浜х嚎缂栫爜',
width:160,
},
-
+{
+ field: 'shipNumber',
+ title: '鑸瑰彿',
+ width:160,
+},
+{
+ field: 'projectNumber',
+ title: '椤圭洰鍙�',
+ width:160,
+},
+{
+ field: 'processName',
+ title: '宸ュ簭鍚嶇О',
+ width:160,
+},
{
field: 'pipeFittingCode',
title: '绠′欢缂栫爜',
@@ -135,7 +134,16 @@
title: '椤哄簭鍙�',
width:160,
},
-
+{
+ field: 'pipeSpecCode',
+ title: '绠℃缂栫爜',
+ width:160,
+},
+{
+ field: 'pipeSectionName',
+ title: '绠℃鍚嶇О',
+ width:160,
+},
{
field: 'outerDiameter',
title: '澶栧緞(mm)',
diff --git a/PipeLineLems/pipelinelems_web/src/widgets/WorkPlan/Views/Pages/WorkPlan/WorkPlan.tsx b/PipeLineLems/pipelinelems_web/src/widgets/WorkPlan/Views/Pages/WorkPlan/WorkPlan.tsx
index e9598e6..befd88d 100644
--- a/PipeLineLems/pipelinelems_web/src/widgets/WorkPlan/Views/Pages/WorkPlan/WorkPlan.tsx
+++ b/PipeLineLems/pipelinelems_web/src/widgets/WorkPlan/Views/Pages/WorkPlan/WorkPlan.tsx
@@ -23,6 +23,10 @@
ElFormItem,
} from 'element-plus'
import { injectModel } from '@/libs/Provider/Provider'
+// 寮曞叆鍏叡閫夐」閰嶇疆
+import {
+ FILTER_MODE_OPTIONS_STRING
+} from '@/components/DyFormForHighQuery/DyFormForHighQueryOptions';
interface RenderTableType {
url?: string
@@ -68,13 +72,14 @@
// 鏂板鐨勬煡璇㈡潯浠�
const queryForm = ref({
searchVal: '',
- str_searchFormInputAttrs:[]
+ str_searchFormInputAttrs:[],
+ searchVal_FilterMode:''
})
//瀹氫箟鏁翠綋妯$硦鏌ヨ鐨勫垪鏁扮粍(娉ㄦ剰锛氬繀椤诲ぇ灏忓啓璺熷悗绔殑瀹炰綋绫诲睘鎬у悕涓�鑷达紝鍚﹀垯浼氬鑷村尮閰嶄笉瀵圭殑闂)
const _searchFormInputAttrs = ref([
- 'TaskCode','DataIdentifier','MaterialMode','MarkingContent','WeldingHeatInput','PipeAllowableStress','FactoryCode','ProductCode','WorkstationCode','EquipmentCode','WorkpieceName','ProcessName','PipeFittingCode','PreSerialNumber','PipeSpecCode','PipeSectionName','Material','ProcessRouteNumber','TeamInfo','Timestamp','CreatorName','LastModifierName','Remark'
+ 'TaskCode','DataIdentifier','MaterialMode','MarkingContent','WeldingHeatInput','PipeAllowableStress','FactoryCode','ProductCode','WorkstationCode','EquipmentCode','ProdLineCode','ShipNumber','ProjectNumber','ProcessName','PipeFittingCode','PreSerialNumber','PipeSpecCode','PipeSectionName','Material','ProcessRouteNumber','TeamInfo','Timestamp','CreatorName','LastModifierName','Remark'
]);
- const searchFormInputAttrs_Placeholder = ref('璇疯緭鍏ヤ换鍔$紪鐮�/鍘熸枡鏍囪瘑/鍘熸枡鍨嬪彿/鎵撶爜鍐呭/娉曞叞鍏О鍘嬪姏/娉曞叞鍐茬爜鍐呭/宸ュ巶浠g爜/浜у搧浠g爜/宸ヤ綅浠g爜/璁惧浠g爜/宸ヤ欢鍚嶇О/宸ュ簭鍚嶇О/绠′欢缂栫爜/椤哄簭鍙�/绠℃缂栫爜/绠℃鍚嶇О/鏉愯川/宸ヨ壓娴佸悜缂栧彿/鐝粍淇℃伅/鏃堕棿鎴�/鍒涘缓浜�/淇敼浜�/澶囨敞');
+ const searchFormInputAttrs_Placeholder = ref('璇疯緭鍏ヤ换鍔$紪鐮�/鍘熸枡鏍囪瘑/鍘熸枡鍨嬪彿/鎵撶爜鍐呭/娉曞叞鍏О鍘嬪姏/娉曞叞鍐茬爜鍐呭/宸ュ巶浠g爜/浜у搧浠g爜/宸ヤ綅浠g爜/璁惧浠g爜/浜х嚎缂栫爜/鑸瑰彿/椤圭洰鍙�/宸ュ簭鍚嶇О/绠′欢缂栫爜/椤哄簭鍙�/绠℃缂栫爜/绠℃鍚嶇О/鏉愯川/宸ヨ壓娴佸悜缂栧彿/鐝粍淇℃伅/鏃堕棿鎴�/鍒涘缓浜�/淇敼浜�/澶囨敞');
// 鍔ㄦ�佹灇涓鹃�夐」
@@ -106,16 +111,20 @@
}
}
- // 缁勪欢鎸傝浇鏃惰幏鍙栨灇涓炬暟鎹�
- onMounted(() => {
- fetchEnumData()
- })
+ // 瀹氫箟鍝嶅簲寮忔煡璇㈡暟鎹�
+ const _curHighQueryData = ref({ searchVal: '',str_searchFormInputAttrs:[],searchVal_FilterMode:'' });
+ // 缁勪欢鎸傝浇鏃惰幏鍙栨灇涓炬暟鎹�
+ onMounted(() => {
+ fetchEnumData()
+ queryForm.value.searchVal_FilterMode = FILTER_MODE_OPTIONS_STRING[0]?.value || '';
+ _curHighQueryData.value.searchVal_FilterMode = queryForm.value.searchVal_FilterMode;
+ _curHighQueryData.value.str_searchFormInputAttrs = _searchFormInputAttrs.value;
+ })
- // 瀹氫箟鍝嶅簲寮忔煡璇㈡暟鎹�
- const _curHighQueryData = ref({ searchVal: '',str_searchFormInputAttrs:[] });
// 鏂扮増鐨勬煡璇㈡柟娉曪紙涓婚〉闈腑鐨勬寜閽�愭煡璇€�戯級
const handleQueryForMain = async () => {
_curHighQueryData.value.searchVal = queryForm.value.searchVal;
+ _curHighQueryData.value.searchVal_FilterMode = queryForm.value.searchVal_FilterMode;
_curHighQueryData.value.str_searchFormInputAttrs = _searchFormInputAttrs.value;
tableRef.value.getList(_curHighQueryData.value)
}
@@ -128,6 +137,7 @@
// 鏂扮増鐨勬煡璇㈤噸缃�
const resetQuery = () => {
queryForm.value.searchVal = ''
+ queryForm.value.searchVal_FilterMode = FILTER_MODE_OPTIONS_STRING[0]?.value || '';
queryForm.value.str_searchFormInputAttrs=_searchFormInputAttrs.value;
}
//鏂扮増鐨勫鍑烘柟娉�
@@ -145,6 +155,7 @@
const commonSaveCurHighQueryData=(filteredData={})=>{
_curHighQueryData.value = { ..._curHighQueryData.value, ...filteredData };
_curHighQueryData.value.searchVal = queryForm.value.searchVal
+ _curHighQueryData.value.searchVal_FilterMode = queryForm.value.searchVal_FilterMode
_curHighQueryData.value.str_searchFormInputAttrs =_searchFormInputAttrs.value;
}
//鑾峰彇楂樼骇鏌ヨ寮瑰嚭妗嗙殑鏌ヨ鍊�
@@ -158,6 +169,7 @@
)
//缁勫悎妯$硦鏌ヨ
filteredData.searchVal = queryForm.value.searchVal
+ filteredData.searchVal_FilterMode = queryForm.value.searchVal_FilterMode
filteredData.str_searchFormInputAttrs =_searchFormInputAttrs.value;
return filteredData;
}
@@ -304,7 +316,7 @@
<div class={styles.headerContent}>
<div class={styles.header}>
- {/* <IconButton
+ <IconButton
v-permission="workPlan-add"
icon="add-p"
onClick={onAddWorkPlan}
@@ -312,8 +324,8 @@
>
娣诲姞
</IconButton>
+ <el-divider direction="vertical" />
- <el-divider direction="vertical" /> */}
<el-upload
v-permission="workPlan-import"
name="file"
@@ -352,6 +364,21 @@
/>
</el-tooltip>
</ElFormItem>
+ <ElFormItem label="" style="width:100px;">
+ <ElSelect
+ v-model={queryForm.value.searchVal_FilterMode}
+ placeholder="璇烽�夋嫨"
+ class={styles.formItem}
+ >
+ {FILTER_MODE_OPTIONS_STRING.map((option) => (
+ <ElOption
+ key={option.value}
+ label={option.label}
+ value={option.value}
+ />
+ ))}
+ </ElSelect>
+ </ElFormItem>
<IconButton type="primary" icon="search" onClick={handleQueryForMain}>
鏌ヨ
</IconButton>
diff --git a/PipeLineLems/server/src/CMS.Plugin.PipeLineLems.Application.Contracts/Dtos/WorkPlan/GetWorkPlanInput.cs b/PipeLineLems/server/src/CMS.Plugin.PipeLineLems.Application.Contracts/Dtos/WorkPlan/GetWorkPlanInput.cs
index a39d6de..55d440c 100644
--- a/PipeLineLems/server/src/CMS.Plugin.PipeLineLems.Application.Contracts/Dtos/WorkPlan/GetWorkPlanInput.cs
+++ b/PipeLineLems/server/src/CMS.Plugin.PipeLineLems.Application.Contracts/Dtos/WorkPlan/GetWorkPlanInput.cs
@@ -245,14 +245,34 @@
public SearchFilterModeEnum EquipmentCode_FilterMode { get; set; }= SearchFilterModeEnum.妯$硦鏌ヨ;
/// <summary>
- /// 宸ヤ欢鍚嶇О
+ /// 浜х嚎缂栫爜
/// </summary>
- public string WorkpieceName { get; set; }
+ public string ProdLineCode { get; set; }
/// <summary>
- /// 宸ヤ欢鍚嶇О-鏌ヨ鍏崇郴杩愮畻绗�
+ /// 浜х嚎缂栫爜-鏌ヨ鍏崇郴杩愮畻绗�
/// </summary>
- public SearchFilterModeEnum WorkpieceName_FilterMode { get; set; }= SearchFilterModeEnum.妯$硦鏌ヨ;
+ public SearchFilterModeEnum ProdLineCode_FilterMode { get; set; }= SearchFilterModeEnum.妯$硦鏌ヨ;
+
+ /// <summary>
+ /// 鑸瑰彿
+ /// </summary>
+ public string ShipNumber { get; set; }
+
+ /// <summary>
+ /// 鑸瑰彿-鏌ヨ鍏崇郴杩愮畻绗�
+ /// </summary>
+ public SearchFilterModeEnum ShipNumber_FilterMode { get; set; }= SearchFilterModeEnum.妯$硦鏌ヨ;
+
+ /// <summary>
+ /// 椤圭洰鍙�
+ /// </summary>
+ public string ProjectNumber { get; set; }
+
+ /// <summary>
+ /// 椤圭洰鍙�-鏌ヨ鍏崇郴杩愮畻绗�
+ /// </summary>
+ public SearchFilterModeEnum ProjectNumber_FilterMode { get; set; }= SearchFilterModeEnum.妯$硦鏌ヨ;
/// <summary>
/// 宸ュ簭鍚嶇О
@@ -349,7 +369,7 @@
/// </summary>
//琛ㄧず鏄� 楂樼骇鏌ヨ鑼冨洿鏌ヨ鐗规��
[HighSearchRangeAttribute]
- public List<string> PlannedStartTime { get; set; }
+ public string PlannedStartTime { get; set; }
/// <summary>
@@ -357,7 +377,7 @@
/// </summary>
//琛ㄧず鏄� 楂樼骇鏌ヨ鑼冨洿鏌ヨ鐗规��
[HighSearchRangeAttribute]
- public List<string> PlannedEndTime { get; set; }
+ public string PlannedEndTime { get; set; }
/// <summary>
@@ -385,7 +405,7 @@
/// </summary>
//琛ㄧず鏄� 楂樼骇鏌ヨ鑼冨洿鏌ヨ鐗规��
[HighSearchRangeAttribute]
- public List<string> CreationTime { get; set; }
+ public string CreationTime { get; set; }
/// <summary>
@@ -403,7 +423,7 @@
/// </summary>
//琛ㄧず鏄� 楂樼骇鏌ヨ鑼冨洿鏌ヨ鐗规��
[HighSearchRangeAttribute]
- public List<string> LastModificationTime { get; set; }
+ public string LastModificationTime { get; set; }
/// <summary>
@@ -441,7 +461,7 @@
/// </summary>
//琛ㄧず鏄� 楂樼骇鏌ヨ鑼冨洿鏌ヨ鐗规��
[HighSearchRangeAttribute]
- public List<string> DeletionTime { get; set; }
+ public string DeletionTime { get; set; }
/// <summary>
diff --git a/PipeLineLems/server/src/CMS.Plugin.PipeLineLems.Application.Contracts/Dtos/WorkPlan/WorkPlanCreateDto.cs b/PipeLineLems/server/src/CMS.Plugin.PipeLineLems.Application.Contracts/Dtos/WorkPlan/WorkPlanCreateDto.cs
index a467644..dad3365 100644
--- a/PipeLineLems/server/src/CMS.Plugin.PipeLineLems.Application.Contracts/Dtos/WorkPlan/WorkPlanCreateDto.cs
+++ b/PipeLineLems/server/src/CMS.Plugin.PipeLineLems.Application.Contracts/Dtos/WorkPlan/WorkPlanCreateDto.cs
@@ -14,4 +14,9 @@
/// 鏄惁绂佺敤
/// </summary>
public bool? IsDisabled { get; set; } = false;
+
+ /// <summary>
+ /// 鍒涘缓浜�
+ /// </summary>
+ public string CreatorName { get; set; }
}
diff --git a/PipeLineLems/server/src/CMS.Plugin.PipeLineLems.Application.Contracts/Dtos/WorkPlan/WorkPlanCreateOrUpdateDtoBase.cs b/PipeLineLems/server/src/CMS.Plugin.PipeLineLems.Application.Contracts/Dtos/WorkPlan/WorkPlanCreateOrUpdateDtoBase.cs
index 1d6ca30..dfadd18 100644
--- a/PipeLineLems/server/src/CMS.Plugin.PipeLineLems.Application.Contracts/Dtos/WorkPlan/WorkPlanCreateOrUpdateDtoBase.cs
+++ b/PipeLineLems/server/src/CMS.Plugin.PipeLineLems.Application.Contracts/Dtos/WorkPlan/WorkPlanCreateOrUpdateDtoBase.cs
@@ -110,9 +110,19 @@
public string? EquipmentCode { get; set; }
/// <summary>
- /// 宸ヤ欢鍚嶇О
+ /// 浜х嚎缂栫爜
/// </summary>
- public string? WorkpieceName { get; set; }
+ public string? ProdLineCode { get; set; }
+
+ /// <summary>
+ /// 鑸瑰彿
+ /// </summary>
+ public string? ShipNumber { get; set; }
+
+ /// <summary>
+ /// 椤圭洰鍙�
+ /// </summary>
+ public string? ProjectNumber { get; set; }
/// <summary>
/// 宸ュ簭鍚嶇О
@@ -183,16 +193,11 @@
/// 鍒涘缓浜篒D
/// </summary>
public string? CreatorId { get; set; }
- /// <summary>
- /// 鍒涘缓浜�
- /// </summary>
- public string CreatorName { get; set; }
-
- /// <summary>
- /// 淇敼浜篒D
- /// </summary>
- public string? LastModifierId { get; set; }
+ /// <summary>
+ /// 淇敼浜篒D
+ /// </summary>
+ public string? LastModifierId { get; set; }
/// <summary>
/// 鍒犻櫎鏃堕棿
diff --git a/PipeLineLems/server/src/CMS.Plugin.PipeLineLems.Application.Contracts/Dtos/WorkPlan/WorkPlanDto.cs b/PipeLineLems/server/src/CMS.Plugin.PipeLineLems.Application.Contracts/Dtos/WorkPlan/WorkPlanDto.cs
index fc9db94..5e9d63e 100644
--- a/PipeLineLems/server/src/CMS.Plugin.PipeLineLems.Application.Contracts/Dtos/WorkPlan/WorkPlanDto.cs
+++ b/PipeLineLems/server/src/CMS.Plugin.PipeLineLems.Application.Contracts/Dtos/WorkPlan/WorkPlanDto.cs
@@ -133,9 +133,19 @@
public string? EquipmentCode { get; set; }
/// <summary>
- /// 宸ヤ欢鍚嶇О
+ /// 浜х嚎缂栫爜
/// </summary>
- public string? WorkpieceName { get; set; }
+ public string? ProdLineCode { get; set; }
+
+ /// <summary>
+ /// 鑸瑰彿
+ /// </summary>
+ public string? ShipNumber { get; set; }
+
+ /// <summary>
+ /// 椤圭洰鍙�
+ /// </summary>
+ public string? ProjectNumber { get; set; }
/// <summary>
/// 宸ュ簭鍚嶇О
diff --git a/PipeLineLems/server/src/CMS.Plugin.PipeLineLems.Application.Contracts/Dtos/WorkPlan/WorkPlanExportModel.cs b/PipeLineLems/server/src/CMS.Plugin.PipeLineLems.Application.Contracts/Dtos/WorkPlan/WorkPlanExportModel.cs
index f013a63..1e829f4 100644
--- a/PipeLineLems/server/src/CMS.Plugin.PipeLineLems.Application.Contracts/Dtos/WorkPlan/WorkPlanExportModel.cs
+++ b/PipeLineLems/server/src/CMS.Plugin.PipeLineLems.Application.Contracts/Dtos/WorkPlan/WorkPlanExportModel.cs
@@ -131,10 +131,22 @@
public string EquipmentCode { get; set; }
/// <summary>
- /// 宸ヤ欢鍚嶇О
+ /// 浜х嚎缂栫爜
/// </summary>
- [ExcelColumn(Name = "宸ヤ欢鍚嶇О", Width = 25)]
- public string WorkpieceName { get; set; }
+ [ExcelColumn(Name = "浜х嚎缂栫爜", Width = 25)]
+ public string ProdLineCode { get; set; }
+
+ /// <summary>
+ /// 鑸瑰彿
+ /// </summary>
+ [ExcelColumn(Name = "鑸瑰彿", Width = 25)]
+ public string ShipNumber { get; set; }
+
+ /// <summary>
+ /// 椤圭洰鍙�
+ /// </summary>
+ [ExcelColumn(Name = "椤圭洰鍙�", Width = 25)]
+ public string ProjectNumber { get; set; }
/// <summary>
/// 宸ュ簭鍚嶇О
diff --git a/PipeLineLems/server/src/CMS.Plugin.PipeLineLems.Application.Contracts/Dtos/WorkPlan/WorkPlanInput.cs b/PipeLineLems/server/src/CMS.Plugin.PipeLineLems.Application.Contracts/Dtos/WorkPlan/WorkPlanInput.cs
index 347abd5..b8f501b 100644
--- a/PipeLineLems/server/src/CMS.Plugin.PipeLineLems.Application.Contracts/Dtos/WorkPlan/WorkPlanInput.cs
+++ b/PipeLineLems/server/src/CMS.Plugin.PipeLineLems.Application.Contracts/Dtos/WorkPlan/WorkPlanInput.cs
@@ -1,4 +1,5 @@
-锘縰sing System;
+锘縰sing MiniExcelLibs.Attributes;
+using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
@@ -232,9 +233,48 @@
/// </summary>
public DateTime? PlannedEndTime { get; set; }
+
/// <summary>
- /// 鏃堕棿淇℃伅
+ /// 鐝粍淇℃伅
/// </summary>
- public string TimeInfo { get; set; }
+ public string TeamInfo { get; set; }
+
+ /// <summary>
+ /// 鏃堕棿鎴�
+ /// </summary>
+ public string Timestamp { get; set; }
+
+
+ /// <summary>
+ /// 浜х嚎缂栫爜
+ /// </summary>
+ public string ProdLineCode { get; set; }
+
+ /// <summary>
+ /// 鑸瑰彿
+ /// </summary>
+ public string ShipNumber { get; set; }
+
+ /// <summary>
+ /// 椤圭洰鍙�
+ /// </summary>
+ public string ProjectNumber { get; set; }
+
+
+
+ /// <summary>
+ /// 鎵撶爜浣嶇疆
+ /// </summary>
+ public decimal MarkingPosition { get; set; }
+
+ /// <summary>
+ /// 鍒囧壊浣嶇疆
+ /// </summary>
+ public decimal CuttingPosition { get; set; }
+
+ /// <summary>
+ /// 澹佸帤(mm)
+ /// </summary>
+ public decimal Thickness { get; set; }
}
}
\ No newline at end of file
diff --git a/PipeLineLems/server/src/CMS.Plugin.PipeLineLems.Application.Contracts/Dtos/WorkPlan/WorkPlanUpdateDto.cs b/PipeLineLems/server/src/CMS.Plugin.PipeLineLems.Application.Contracts/Dtos/WorkPlan/WorkPlanUpdateDto.cs
index ac940a9..3f4001e 100644
--- a/PipeLineLems/server/src/CMS.Plugin.PipeLineLems.Application.Contracts/Dtos/WorkPlan/WorkPlanUpdateDto.cs
+++ b/PipeLineLems/server/src/CMS.Plugin.PipeLineLems.Application.Contracts/Dtos/WorkPlan/WorkPlanUpdateDto.cs
@@ -10,4 +10,9 @@
/// 骞跺彂鎴�
/// </summary>
public string ConcurrencyStamp { get; set; }
+
+ /// <summary>
+ /// 淇敼浜�
+ /// </summary>
+ public string LastModifierName { get; set; }
}
diff --git a/PipeLineLems/server/src/CMS.Plugin.PipeLineLems.Application.Contracts/Services/IWorkPlanAppService.cs b/PipeLineLems/server/src/CMS.Plugin.PipeLineLems.Application.Contracts/Services/IWorkPlanAppService.cs
index 6a731e7..1910392 100644
--- a/PipeLineLems/server/src/CMS.Plugin.PipeLineLems.Application.Contracts/Services/IWorkPlanAppService.cs
+++ b/PipeLineLems/server/src/CMS.Plugin.PipeLineLems.Application.Contracts/Services/IWorkPlanAppService.cs
@@ -1,5 +1,6 @@
using CMS.Plugin.PipeLineLems.Application.Contracts.Dtos.WorkPlan;
using CMS.Plugin.PipeLineLems.Domain.WorkPlan;
+using CmsQueryExtensions.Entitys;
using System.Linq.Expressions;
using Volo.Abp;
using Volo.Abp.Application.Services;
@@ -20,13 +21,6 @@
Task<List<WorkPlanDto>> CloneAsync(IEnumerable<Guid> ids);
- /// <summary>
- /// 鎸夌収 鍘熸枡鏍囪 鏌ユ壘浣滀笟璁″垝琛�
- /// </summary>
- /// <param name="name"></param>
- /// <param name="cancellationToken"></param>
- /// <returns></returns>
- Task<List<WorkPlan>> FindByDataIdentifierAsync(string dataIdentifier);
/// <summary>
/// 鍒犻櫎浣滀笟璁″垝琛�
@@ -48,7 +42,7 @@
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
- Task ImportAsync(WorkPlansImportModel input, string userId,string userAccount);
+ Task ImportAsync(WorkPlansImportModel input, MyCurrentUser myCurrentUser);
/// <summary>
/// 瀵煎嚭浣滀笟璁″垝琛�
diff --git a/PipeLineLems/server/src/CMS.Plugin.PipeLineLems.Application/Implements/SharedService.cs b/PipeLineLems/server/src/CMS.Plugin.PipeLineLems.Application/Implements/SharedService.cs
index 8183c36..ee97a01 100644
--- a/PipeLineLems/server/src/CMS.Plugin.PipeLineLems.Application/Implements/SharedService.cs
+++ b/PipeLineLems/server/src/CMS.Plugin.PipeLineLems.Application/Implements/SharedService.cs
@@ -463,7 +463,10 @@
throw new UserFriendlyException($"鍘熸枡鏍囪瘑涓� '{callMaterialOrder.DataIdentifier}' 鐨勫彨鏂欒褰曠姸鎬佷负 '{callMaterialOrder.CallMaterialStatus}'锛屼笉鍏佽鍙枡");
}
+ //TODO:杩欓噷璋冪敤wms鐨勫彨鏂欐帴鍙�
+
// 鏇存柊鏁版嵁
+ callMaterialOrder.MaterialBatch = GenerateRandomBatch();//wms杩斿洖鐨勫師鏂欐壒娆�
callMaterialOrder.WmsRetResult = "鎴愬姛";
callMaterialOrder.WmsTaskNo = GenerateRandomTaskNo();
callMaterialOrder.CallMaterialStatus = Domain.Shared.Enums.CallMaterialStatusEnum.鍙枡瀹屾垚;
@@ -472,7 +475,7 @@
await callMaterialOrderRepository.UpdateAsync(callMaterialOrder);
//鏇存柊浣滀笟璁″垝琛�
- var workPlanList = await workPlanRepository.FindByDataIdentifierAsync(callMaterialOrder.DataIdentifier);
+ var workPlanList = await workPlanRepository.GetListByFilterAsync(x => x.DataIdentifier == callMaterialOrder.DataIdentifier);
foreach (var item in workPlanList)
{
item.CallMaterialStatus = Domain.Shared.Enums.CallMaterialStatusEnum.鍙枡瀹屾垚;
@@ -484,6 +487,7 @@
var callMaterialOrderRecord = new CallMaterialOrderRecord()
{
CallMaterialStatus = Domain.Shared.Enums.CallMaterialStatusEnum.鍙枡瀹屾垚,
+ MaterialBatch = callMaterialOrder.MaterialBatch,
MaterialMode = callMaterialOrder.MaterialMode,
DataIdentifier = callMaterialOrder.DataIdentifier,
Quantity = 1,
@@ -529,4 +533,13 @@
// 鐢熸垚鍓嶇紑
return $"WMS{timestamp}";
}
+
+ private string GenerateRandomBatch()
+ {
+ // 鑾峰彇褰撳墠鏃堕棿鎴筹紙浠�1970-01-01 00:00:00 UTC鍒扮幇鍦ㄧ殑绉掓暟锛�
+ long timestamp = new DateTimeOffset(DateTime.UtcNow).ToUnixTimeSeconds();
+
+ // 鐢熸垚鍓嶇紑
+ return $"Batch{timestamp}";
+ }
}
diff --git a/PipeLineLems/server/src/CMS.Plugin.PipeLineLems.Application/Implements/WorkPlanAppService.cs b/PipeLineLems/server/src/CMS.Plugin.PipeLineLems.Application/Implements/WorkPlanAppService.cs
index 1372c83..ce8adc5 100644
--- a/PipeLineLems/server/src/CMS.Plugin.PipeLineLems.Application/Implements/WorkPlanAppService.cs
+++ b/PipeLineLems/server/src/CMS.Plugin.PipeLineLems.Application/Implements/WorkPlanAppService.cs
@@ -11,6 +11,7 @@
using Volo.Abp.ObjectExtending;
using Volo.Abp.ObjectMapping;
using Volo.Abp.Users;
+using CmsQueryExtensions.Entitys;
namespace CMS.Plugin.PipeLineLems.Application.Implements;
@@ -43,16 +44,6 @@
return ObjectMapper.Map<WorkPlan, WorkPlanDto>(await _workPlanRepository.GetAsync(id));
}
- /// <summary>
- /// 鎸夌収 鍘熸枡鏍囪 鏌ユ壘浣滀笟璁″垝琛�
- /// </summary>
- /// <param name="name"></param>
- /// <param name="cancellationToken"></param>
- /// <returns></returns>
- public virtual async Task<List<WorkPlan>> FindByDataIdentifierAsync(string dataIdentifier)
- {
- return await _workPlanRepository.FindByDataIdentifierAsync(dataIdentifier);
- }
/// <summary>
/// 鍒嗛〉鑾峰彇浣滀笟璁″垝琛�
@@ -179,7 +170,7 @@
updateObj.ProductCode = input.ProductCode;
updateObj.WorkstationCode = input.WorkstationCode;
updateObj.EquipmentCode = input.EquipmentCode;
-
+
updateObj.ProcessName = input.ProcessName;
updateObj.PipeFittingCode = input.PipeFittingCode;
updateObj.PreSerialNumber = input.PreSerialNumber;
@@ -308,13 +299,13 @@
/// <param name="input"></param>
/// <returns></returns>
/// <exception cref="UserFriendlyException"></exception>
- public async Task ImportAsync(WorkPlansImportModel input, string userId, string userAccount)
+ public async Task ImportAsync(WorkPlansImportModel input, MyCurrentUser myCurrentUser)
{
//杞崲鏁版嵁
var result = ObjectMapper.Map<List<WorkPlansImportModel.WorkPlanImportModel>, List<WorkPlanInput>>(input.WorkPlans);
//await CreatebyApsAsync(result);
- await _sharedService.CommonCreatebyApsAsync(result, _serviceProvider, this, userId, userAccount);
+ await _sharedService.CommonCreatebyApsAsync(result, _serviceProvider, this, myCurrentUser.UserId, myCurrentUser.UserAccount);
// Check.NotNull(input, nameof(input));
// var workPlanCreateDtos = new List<(int RowIndex, WorkPlanCreateDto Item)>();
diff --git a/PipeLineLems/server/src/CMS.Plugin.PipeLineLems.Domain/CallMaterialOrder/CallMaterialOrder.cs b/PipeLineLems/server/src/CMS.Plugin.PipeLineLems.Domain/CallMaterialOrder/CallMaterialOrder.cs
index a32671b..8decdec 100644
--- a/PipeLineLems/server/src/CMS.Plugin.PipeLineLems.Domain/CallMaterialOrder/CallMaterialOrder.cs
+++ b/PipeLineLems/server/src/CMS.Plugin.PipeLineLems.Domain/CallMaterialOrder/CallMaterialOrder.cs
@@ -22,6 +22,11 @@
public string MaterialMode { get; set; }
/// <summary>
+ /// 鍘熸枡鎵规
+ /// </summary>
+ public string MaterialBatch { get; set; }
+
+ /// <summary>
/// 鍙枡鐘舵��
/// </summary>
public CallMaterialStatusEnum CallMaterialStatus { get; set; }
diff --git a/PipeLineLems/server/src/CMS.Plugin.PipeLineLems.Domain/CallMaterialOrderRecord/CallMaterialOrderRecord.cs b/PipeLineLems/server/src/CMS.Plugin.PipeLineLems.Domain/CallMaterialOrderRecord/CallMaterialOrderRecord.cs
index 94b6a4b..3c5a5c7 100644
--- a/PipeLineLems/server/src/CMS.Plugin.PipeLineLems.Domain/CallMaterialOrderRecord/CallMaterialOrderRecord.cs
+++ b/PipeLineLems/server/src/CMS.Plugin.PipeLineLems.Domain/CallMaterialOrderRecord/CallMaterialOrderRecord.cs
@@ -22,6 +22,12 @@
public string MaterialMode { get; set; }
/// <summary>
+ /// 鍘熸枡鎵规
+ /// </summary>
+ public string MaterialBatch { get; set; }
+
+
+ /// <summary>
/// 鍙枡鐘舵��
/// </summary>
public CallMaterialStatusEnum CallMaterialStatus { get; set; }
diff --git a/PipeLineLems/server/src/CMS.Plugin.PipeLineLems.Domain/WorkPlan/IWorkPlanRepository.cs b/PipeLineLems/server/src/CMS.Plugin.PipeLineLems.Domain/WorkPlan/IWorkPlanRepository.cs
index a97ad25..1d2de8e 100644
--- a/PipeLineLems/server/src/CMS.Plugin.PipeLineLems.Domain/WorkPlan/IWorkPlanRepository.cs
+++ b/PipeLineLems/server/src/CMS.Plugin.PipeLineLems.Domain/WorkPlan/IWorkPlanRepository.cs
@@ -23,23 +23,14 @@
/// <param name="name"></param>
/// <param name="id"></param>
/// <returns></returns>
- Task<bool> NameExistAsync(string name, Guid? id = null);
-
+ Task<bool> NameExistAsync(string name, Guid? id = null);
+
/// <summary>
/// 鑾峰彇鏈�澶ф帓搴忎綔涓氳鍒掕〃
/// </summary>
/// <returns></returns>
- Task<int> GetMaxSortAsync();
-
-
- /// <summary>
- /// 鎸夌収 鍘熸枡鏍囪 鏌ユ壘浣滀笟璁″垝琛�
- /// </summary>
- /// <param name="name"></param>
- /// <param name="cancellationToken"></param>
- /// <returns></returns>
- Task<List<WorkPlan>> FindByDataIdentifierAsync(string dataIdentifier, CancellationToken cancellationToken = default);
-
+ Task<int> GetMaxSortAsync();
+
/// <summary>
/// 鑾峰彇鍒嗛〉鍒楄〃浣滀笟璁″垝琛�
/// </summary>
@@ -58,17 +49,33 @@
/// <param name="whereConditions"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
- Task<long> GetCountAsync(FunReturnResultModel<Expression<Func<WorkPlan, bool>>> whereConditions, CancellationToken cancellationToken = default);
-
-
+ Task<long> GetCountAsync(FunReturnResultModel<Expression<Func<WorkPlan, bool>>> whereConditions, CancellationToken cancellationToken = default);
+
+ /// <summary>
+ /// 鐗╃悊鍒犻櫎浣滀笟璁″垝琛�
+ /// </summary>
+ /// <param name="id">涓婚敭ID</param>
+ /// <param name="cancellationToken"></param>
+ /// <returns></returns>
+ Task DeletePermanentlyAsync(Guid id, CancellationToken cancellationToken = default);
+
+
+ /// <summary>
+ /// 鎵归噺鐗╃悊鍒犻櫎浣滀笟璁″垝琛紙鐩存帴鍒犻櫎锛屼笉杞垹闄わ級
+ /// </summary>
+ /// <param name="ids">瑕佸垹闄ょ殑涓婚敭ID鍒楄〃</param>
+ /// <param name="cancellationToken"></param>
+ /// <returns></returns>
+ Task BatchDeletePermanentlyAsync(IEnumerable<Guid> ids, CancellationToken cancellationToken = default);
+
/// <summary>
/// 鏍规嵁鏉′欢鑾峰彇浣滀笟璁″垝琛ㄥ垪琛�
/// </summary>
/// <param name="whereConditions"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
- Task<List<WorkPlan>> GetListByFilterAsync(Expression<Func<WorkPlan, bool>> whereConditions, CancellationToken cancellationToken = default);
-
+ Task<List<WorkPlan>> GetListByFilterAsync(Expression<Func<WorkPlan, bool>> whereConditions, CancellationToken cancellationToken = default);
+
/// <summary>
/// 鏍规嵁鏉′欢鑾峰彇鍗曚釜浣滀笟璁″垝琛�
/// </summary>
@@ -77,5 +84,5 @@
/// <param name="cancellationToken"></param>
/// <returns></returns>
/// <exception cref="UserFriendlyException"></exception>
- Task<WorkPlan> GetSingleByFilterAsync(Expression<Func<WorkPlan, bool>> whereConditions, bool is鈥婱ultipleThrowException = false, CancellationToken cancellationToken = default);
+ Task<WorkPlan> GetSingleByFilterAsync(Expression<Func<WorkPlan, bool>> whereConditions, bool is鈥婱ultipleThrowException = false, CancellationToken cancellationToken = default);
}
diff --git a/PipeLineLems/server/src/CMS.Plugin.PipeLineLems.EntityFrameworkCore/Repositories/EfCoreWorkPlanRepository.cs b/PipeLineLems/server/src/CMS.Plugin.PipeLineLems.EntityFrameworkCore/Repositories/EfCoreWorkPlanRepository.cs
index bc81213..47f6228 100644
--- a/PipeLineLems/server/src/CMS.Plugin.PipeLineLems.EntityFrameworkCore/Repositories/EfCoreWorkPlanRepository.cs
+++ b/PipeLineLems/server/src/CMS.Plugin.PipeLineLems.EntityFrameworkCore/Repositories/EfCoreWorkPlanRepository.cs
@@ -1,91 +1,74 @@
-using CMS.Plugin.PipeLineLems.Domain.WorkPlan;
-using CMS.Plugin.PipeLineLems.EntityFrameworkCore.Extensions;
-using CmsQueryExtensions.Extension;
-using Microsoft.EntityFrameworkCore;
-using System.Linq.Dynamic.Core;
-using System.Linq.Expressions;
-using Volo.Abp;
-using Volo.Abp.Domain.Repositories.EntityFrameworkCore;
-using Volo.Abp.EntityFrameworkCore;
-
-
-namespace CMS.Plugin.PipeLineLems.EntityFrameworkCore.Repositories;
-
+using CMS.Plugin.PipeLineLems.Domain.WorkPlan;
+using CMS.Plugin.PipeLineLems.EntityFrameworkCore.Extensions;
+using CmsQueryExtensions.Extension;
+using Microsoft.EntityFrameworkCore;
+using System.Linq.Dynamic.Core;
+using System.Linq.Expressions;
+using Volo.Abp;
+using Volo.Abp.Domain.Repositories.EntityFrameworkCore;
+using Volo.Abp.EntityFrameworkCore;
+
+
+namespace CMS.Plugin.PipeLineLems.EntityFrameworkCore.Repositories;
+
/// <summary>
/// 浣滀笟璁″垝琛ㄤ粨鍌ㄥ疄鐜�
/// </summary>
-public class EfCoreWorkPlanRepository : EfCoreRepository<ICMSPluginDbContext, WorkPlan, Guid>, IWorkPlanRepository
-{
+public class EfCoreWorkPlanRepository : EfCoreRepository<ICMSPluginDbContext, WorkPlan, Guid>, IWorkPlanRepository
+{
/// <summary>
/// Initializes a new instance of the <see cref="EfCoreWorkPlanRepository"/> class.
/// </summary>
/// <param name="dbContextProvider">The database context provider.</param>
- public EfCoreWorkPlanRepository(IDbContextProvider<ICMSPluginDbContext> dbContextProvider)
- : base(dbContextProvider)
- {
- }
-
+ public EfCoreWorkPlanRepository(IDbContextProvider<ICMSPluginDbContext> dbContextProvider)
+ : base(dbContextProvider)
+ {
+ }
+
/// <summary>
/// 鎸夌収鍚嶇О鏌ユ壘浣滀笟璁″垝琛�
/// </summary>
/// <param name="name"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
- public virtual async Task<WorkPlan> FindByNameAsync(string name, CancellationToken cancellationToken = default)
- {
- return await (await GetDbSetAsync())
- .IncludeDetails()
- .Where(x => !x.IsDeleted)
- .OrderByDescending(x => x.CreationTime)
- .FirstOrDefaultAsync(t => t.TaskCode == name, GetCancellationToken(cancellationToken));
- }
-
-
- /// <summary>
- /// 鎸夌収 鍘熸枡鏍囪 鏌ユ壘浣滀笟璁″垝琛�
- /// </summary>
- /// <param name="name"></param>
- /// <param name="cancellationToken"></param>
- /// <returns></returns>
- public virtual async Task<List<WorkPlan>> FindByDataIdentifierAsync(string dataIdentifier, CancellationToken cancellationToken = default)
- {
- return await (await GetDbSetAsync())
- .IncludeDetails()
- .Where(x => !x.IsDeleted)
- .Where(t => t.DataIdentifier == dataIdentifier)
- .OrderByDescending(x => x.CreationTime)
- .ToListAsync(GetCancellationToken(cancellationToken));
- }
-
+ public virtual async Task<WorkPlan> FindByNameAsync(string name, CancellationToken cancellationToken = default)
+ {
+ return await (await GetDbSetAsync())
+ .IncludeDetails()
+ .Where(x => !x.IsDeleted)
+ .OrderByDescending(x=>x.CreationTime)
+ .FirstOrDefaultAsync(t => t.TaskCode == name, GetCancellationToken(cancellationToken));
+ }
+
/// <summary>
/// 楠岃瘉鍚嶇О鏄惁瀛樺湪浣滀笟璁″垝琛�
/// </summary>
/// <param name="name">鏍¢獙鍊�</param>
/// <param name="id"></param>
/// <returns></returns>
- public async Task<bool> NameExistAsync(string name, Guid? id = null)
- {
- return await (await GetDbSetAsync()).WhereIf(id.HasValue, p => p.Id != id).Where(x => !x.IsDeleted).AnyAsync(x => x.TaskCode == name);
- }
-
+ public async Task<bool> NameExistAsync(string name, Guid? id = null)
+ {
+ return await (await GetDbSetAsync()).WhereIf(id.HasValue, p => p.Id != id).Where(x => !x.IsDeleted).AnyAsync(x => x.TaskCode == name);
+ }
+
/// <summary>
/// 鑾峰彇鏈�澶ф帓搴忎綔涓氳鍒掕〃
/// </summary>
/// <returns></returns>
- public async Task<int> GetMaxSortAsync()
- {
- var hasAny = await (await GetQueryableAsync())
- .Where(x => !x.IsDeleted).AnyAsync();
- if (!hasAny)
- {
- return 1;
- }
-
- var sort = await (await GetQueryableAsync())
- .Where(x => !x.IsDeleted).MaxAsync(x => x.Sort);
- return sort + 1;
- }
-
+ public async Task<int> GetMaxSortAsync()
+ {
+ var hasAny = await (await GetQueryableAsync())
+ .Where(x => !x.IsDeleted).AnyAsync();
+ if (!hasAny)
+ {
+ return 1;
+ }
+
+ var sort = await (await GetQueryableAsync())
+ .Where(x => !x.IsDeleted).MaxAsync(x => x.Sort);
+ return sort + 1;
+ }
+
/// <summary>
/// 鑾峰彇鍒嗛〉鍒楄〃浣滀笟璁″垝琛�
/// </summary>
@@ -96,55 +79,108 @@
/// <param name="includeDetails"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
- public async Task<List<WorkPlan>> GetListAsync(FunReturnResultModel<Expression<Func<WorkPlan, bool>>> whereConditions, string sorting = null, int maxResultCount = int.MaxValue, int skipCount = 0, bool includeDetails = false, CancellationToken cancellationToken = default)
- {
- return await (await GetDbSetAsync())
- .IncludeDetails(includeDetails)
- .WhereIf(whereConditions != null, whereConditions.data)
- .Where(x => !x.IsDeleted)
- .OrderByDescending(x => x.CreationTime)
- .PageBy(skipCount, maxResultCount)
- .ToListAsync(GetCancellationToken(cancellationToken));
- }
-
+ public async Task<List<WorkPlan>> GetListAsync(FunReturnResultModel<Expression<Func<WorkPlan, bool>>> whereConditions, string sorting = null, int maxResultCount = int.MaxValue, int skipCount = 0, bool includeDetails = false, CancellationToken cancellationToken = default)
+ {
+ return await (await GetDbSetAsync())
+ .IncludeDetails(includeDetails)
+ .WhereIf(whereConditions != null, whereConditions.data)
+ .Where(x => !x.IsDeleted)
+ .OrderByDescending(x=>x.CreationTime)
+ .PageBy(skipCount, maxResultCount)
+ .ToListAsync(GetCancellationToken(cancellationToken));
+ }
+
/// <summary>
/// 鑾峰彇鎬绘暟浣滀笟璁″垝琛�
/// </summary>
/// <param name="whereConditions"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
- public async Task<long> GetCountAsync(FunReturnResultModel<Expression<Func<WorkPlan, bool>>> whereConditions, CancellationToken cancellationToken = default)
- {
- return await (await GetQueryableAsync())
- .WhereIf(whereConditions != null, whereConditions.data)
- .Where(x => !x.IsDeleted)
- .CountAsync(cancellationToken: GetCancellationToken(cancellationToken));
- }
-
-
+ public async Task<long> GetCountAsync(FunReturnResultModel<Expression<Func<WorkPlan, bool>>> whereConditions, CancellationToken cancellationToken = default)
+ {
+ return await (await GetQueryableAsync())
+ .WhereIf(whereConditions != null, whereConditions.data)
+ .Where(x => !x.IsDeleted)
+ .CountAsync(cancellationToken: GetCancellationToken(cancellationToken));
+ }
+
+
/// <inheritdoc />
- public override async Task<IQueryable<WorkPlan>> WithDetailsAsync()
- {
- return (await GetQueryableAsync())
- .Where(x => !x.IsDeleted).IncludeDetails();
- }
-
+ public override async Task<IQueryable<WorkPlan>> WithDetailsAsync()
+ {
+ return (await GetQueryableAsync())
+ .Where(x => !x.IsDeleted).IncludeDetails();
+ }
+
+ /// <summary>
+ /// 鐗╃悊鍒犻櫎浣滀笟璁″垝琛�
+ /// </summary>
+ /// <param name="id">涓婚敭ID</param>
+ /// <param name="cancellationToken"></param>
+ /// <returns></returns>
+ public virtual async Task DeletePermanentlyAsync(Guid id, CancellationToken cancellationToken = default)
+ {
+ var entity = await (await GetDbSetAsync())
+ .FirstOrDefaultAsync(x => x.Id == id && !x.IsDeleted, GetCancellationToken(cancellationToken));
+
+ if (entity == null)
+ {
+ throw new Volo.Abp.Domain.Entities.EntityNotFoundException(typeof(WorkPlan), id);
+ }
+
+ // 2. 鑾峰彇 DbContext 骞舵墽琛屽垹闄�
+ var dbContext = await GetDbContextAsync();
+
+ // 鐩存帴鎵ц SQL 鍒犻櫎
+ var sql = $"DELETE FROM scms_workplans WHERE Id ='{entity.Id.ToString()}'";
+ await dbContext.Database.ExecuteSqlRawAsync(sql, cancellationToken);
+ }
+
+ /// <summary>
+ /// 鎵归噺鐗╃悊鍒犻櫎浣滀笟璁″垝琛紙鐩存帴鍒犻櫎锛屼笉杞垹闄わ級
+ /// </summary>
+ /// <param name="ids">瑕佸垹闄ょ殑涓婚敭ID鍒楄〃</param>
+ /// <param name="cancellationToken"></param>
+ /// <returns></returns>
+ public virtual async Task BatchDeletePermanentlyAsync(IEnumerable<Guid> ids, CancellationToken cancellationToken = default)
+ {
+ // 1. 鏌ヨ绗﹀悎鏉′欢鐨勫疄浣擄紙鏈蒋鍒犻櫎鐨勮褰曪級
+ var entities = await (await GetDbSetAsync())
+ .Where(x => ids.Contains(x.Id) && !x.IsDeleted)
+ .ToListAsync(GetCancellationToken(cancellationToken));
+
+ if (!entities.Any())
+ {
+ // 濡傛灉娌℃湁闇�瑕佸垹闄ょ殑璁板綍锛岀洿鎺ヨ繑鍥烇紙閬垮厤涓嶅繀瑕佺殑鏁版嵁搴撴搷浣滐級
+ return;
+ }
+
+ // 2. 鑾峰彇 DbContext 骞舵墽琛屾壒閲忓垹闄�
+ var dbContext = await GetDbContextAsync();
+
+ var idsToDelete = entities.Select(e => e.Id).ToList();
+
+ // 鐩存帴鎵ц SQL 鍒犻櫎
+ var sql = $"DELETE FROM scms_workplans WHERE Id IN ({string.Join(",", idsToDelete.Select(id => $"'{id}'"))})";
+ await dbContext.Database.ExecuteSqlRawAsync(sql, cancellationToken);
+ }
+
/// <summary>
/// 鏍规嵁鏉′欢鑾峰彇浣滀笟璁″垝琛ㄥ垪琛�
/// </summary>
/// <param name="whereConditions"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
- public async Task<List<WorkPlan>> GetListByFilterAsync(Expression<Func<WorkPlan, bool>> whereConditions, CancellationToken cancellationToken = default)
- {
- return await (await GetDbSetAsync())
- .IncludeDetails()
- .WhereIf(whereConditions != null, whereConditions)
- .Where(x => !x.IsDeleted)
- .OrderByDescending(x => x.CreationTime)
- .ToListAsync(GetCancellationToken(cancellationToken));
- }
-
+ public async Task<List<WorkPlan>> GetListByFilterAsync(Expression<Func<WorkPlan, bool>> whereConditions, CancellationToken cancellationToken = default)
+ {
+ return await (await GetDbSetAsync())
+ .IncludeDetails()
+ .WhereIf(whereConditions != null, whereConditions)
+ .Where(x => !x.IsDeleted)
+ .OrderByDescending(x => x.CreationTime)
+ .ToListAsync(GetCancellationToken(cancellationToken));
+ }
+
/// <summary>
/// 鏍规嵁鏉′欢鑾峰彇鍗曚釜浣滀笟璁″垝琛�
/// </summary>
@@ -153,30 +189,30 @@
/// <param name="cancellationToken"></param>
/// <returns></returns>
/// <exception cref="UserFriendlyException"></exception>
- public async Task<WorkPlan> GetSingleByFilterAsync(Expression<Func<WorkPlan, bool>> whereConditions, bool is鈥婱ultipleThrowException = false, CancellationToken cancellationToken = default)
- {
- if (is鈥婱ultipleThrowException)
- {
- var entitys = await (await GetDbSetAsync())
- .IncludeDetails()
- .WhereIf(whereConditions != null, whereConditions)
- .Where(x => !x.IsDeleted)
- .OrderByDescending(x => x.CreationTime)
- .ToListAsync(GetCancellationToken(cancellationToken));
- if (entitys?.Count > 1)
- {
- throw new UserFriendlyException("鏌ヨ鍒板鏉¤褰�");
- }
- return entitys?.FirstOrDefault();
- }
- else
- {
- return await (await GetDbSetAsync())
- .IncludeDetails()
- .WhereIf(whereConditions != null, whereConditions)
- .Where(x => !x.IsDeleted)
- .OrderByDescending(x => x.CreationTime)
- .FirstOrDefaultAsync(GetCancellationToken(cancellationToken));
- }
- }
-}
+ public async Task<WorkPlan> GetSingleByFilterAsync(Expression<Func<WorkPlan, bool>> whereConditions, bool is鈥婱ultipleThrowException = false, CancellationToken cancellationToken = default)
+ {
+ if (is鈥婱ultipleThrowException)
+ {
+ var entitys = await (await GetDbSetAsync())
+ .IncludeDetails()
+ .WhereIf(whereConditions != null, whereConditions)
+ .Where(x => !x.IsDeleted)
+ .OrderByDescending(x => x.CreationTime)
+ .ToListAsync(GetCancellationToken(cancellationToken));
+ if (entitys?.Count > 1)
+ {
+ throw new UserFriendlyException("鏌ヨ鍒板鏉¤褰�");
+ }
+ return entitys?.FirstOrDefault();
+ }
+ else
+ {
+ return await (await GetDbSetAsync())
+ .IncludeDetails()
+ .WhereIf(whereConditions != null, whereConditions)
+ .Where(x => !x.IsDeleted)
+ .OrderByDescending(x => x.CreationTime)
+ .FirstOrDefaultAsync(GetCancellationToken(cancellationToken));
+ }
+ }
+}
diff --git a/PipeLineLems/server/src/CMS.Plugin.PipeLineLems/Controller/WorkPlanController.cs b/PipeLineLems/server/src/CMS.Plugin.PipeLineLems/Controller/WorkPlanController.cs
index 1ebb01c..7e797c8 100644
--- a/PipeLineLems/server/src/CMS.Plugin.PipeLineLems/Controller/WorkPlanController.cs
+++ b/PipeLineLems/server/src/CMS.Plugin.PipeLineLems/Controller/WorkPlanController.cs
@@ -3,7 +3,6 @@
using CMS.Framework.AspNetCore.Users;
using CMS.Plugin.PipeLineLems.Application.Contracts.Dtos.WorkPlan;
using CMS.Plugin.PipeLineLems.Application.Contracts.Services;
-using CmsQueryExtensions.Entitys;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
@@ -11,6 +10,7 @@
using System.Reflection;
using Volo.Abp;
using Volo.Abp.Application.Dtos;
+using CmsQueryExtensions.Entitys;
namespace CMS.Plugin.PipeLineLems.Controller
{
@@ -41,7 +41,7 @@
/// <summary>
/// 鑾峰彇浣滀笟璁″垝琛�
/// </summary>
- /// <param name="id">鏍囪瘑绗�.</param>
+ /// <param name="id">涓婚敭ID</param>
/// <returns></returns>
[HttpGet]
[Route("{id}")]
@@ -53,7 +53,7 @@
/// <summary>
/// 鍒嗛〉鑾峰彇浣滀笟璁″垝琛ㄧ殑鍒楄〃.
/// </summary>
- /// <param name="input">杈撳叆.</param>
+ /// <param name="input">鏌ヨ鍙傛暟</param>
/// <returns></returns>
[HttpGet]
[Route("Page")]
@@ -65,71 +65,88 @@
/// <summary>
/// 鍒涘缓浣滀笟璁″垝琛�
/// </summary>
- /// <param name="input">杈撳叆.</param>
+ /// <param name="input">鍒涘缓鍙傛暟</param>
/// <returns></returns>
[Authorize]
[HttpPost]
public virtual Task<WorkPlanDto> CreateAsync(WorkPlanCreateDto input)
{
+ input.CreatorName = _currentUser.UserAccount;//鍒涘缓浜�
return _workPlanAppService.CreateAsync(input);
}
/// <summary>
/// 鏇存柊浣滀笟璁″垝琛�
/// </summary>
- /// <param name="id">鏍囪瘑绗�.</param>
- /// <param name="input">杈撳叆.</param>
+ /// <param name="id">涓婚敭ID</param>
+ /// <param name="input">鏇存柊鍙傛暟</param>
/// <returns></returns>
[Authorize]
[HttpPut]
[Route("{id}")]
public virtual Task<WorkPlanDto> UpdateAsync(Guid id, WorkPlanUpdateDto input)
{
+ input.LastModifierName = _currentUser.UserAccount;//淇敼浜�
return _workPlanAppService.UpdateAsync(id, input);
}
/// <summary>
/// 鍏嬮殕浣滀笟璁″垝琛�
/// </summary>
- /// <param name="ids">Id闆嗗悎.</param>
+ /// <param name="ids">Id闆嗗悎</param>
/// <returns></returns>
[Authorize]
[HttpPost]
[Route("Clone")]
public virtual Task<List<WorkPlanDto>> CloneAsync([FromBody] IEnumerable<Guid> ids)
{
+ MyCurrentUser myCurrentUser = new MyCurrentUser()
+ {
+ UserAccount = _currentUser.UserAccount,
+ UserId = _currentUser.UserId
+ };
return _workPlanAppService.CloneAsync(ids);
}
/// <summary>
/// 鍒犻櫎浣滀笟璁″垝琛�
/// </summary>
- /// <param name="id">鏍囪瘑绗�.</param>
+ /// <param name="id">涓婚敭ID</param>
/// <returns></returns>
[Authorize]
[HttpDelete]
[Route("{id}")]
public virtual Task DeleteAsync(Guid id)
{
- return _workPlanAppService.DeleteAsync(id);
+ MyCurrentUser myCurrentUser = new MyCurrentUser()
+ {
+ UserAccount = _currentUser.UserAccount,
+ UserId = _currentUser.UserId
+ };
+ return _workPlanAppService.DeleteAsync(id);//閫昏緫鍒犻櫎
}
/// <summary>
/// 鎵归噺鍒犻櫎浣滀笟璁″垝琛�
/// </summary>
- /// <param name="ids">The ids.</param>
+ /// <param name="ids">涓婚敭ID闆嗗悎</param>
/// <returns></returns>
[Authorize]
[HttpDelete]
public virtual Task DeleteAsync([FromBody] IEnumerable<Guid> ids)
{
- return _workPlanAppService.DeleteManyAsync(ids);
+ MyCurrentUser myCurrentUser = new MyCurrentUser()
+ {
+ UserAccount = _currentUser.UserAccount,
+ UserId = _currentUser.UserId
+ };
+ return _workPlanAppService.DeleteManyAsync(ids);//閫昏緫鍒犻櫎
}
/// <summary>
/// 璋冩暣鎺掑簭浣滀笟璁″垝琛�
/// </summary>
- /// <param name="id">鏍囪瘑绗�.</param>
+ /// <param name="id">涓婚敭ID</param>
/// <returns></returns>
[HttpPut]
[Route("{id}/AdjustSort/{sort}")]
@@ -151,14 +168,6 @@
await file.CopyToAsync(stream);
stream.Seek(0L, SeekOrigin.Begin);
- var userAccount = _currentUser.UserAccount;
- var userId = _currentUser.UserId;
- MyCurrentUser myCurrentUser = new MyCurrentUser()
- {
- UserAccount = _currentUser.UserAccount,
- UserId = _currentUser.UserId
- };
-
var sheetNames = stream.GetSheetNames();
var workPlanRows = sheetNames.Contains("閰嶇疆") ? MiniExcel.Query<WorkPlansImportModel.WorkPlanImportModel>(stream, sheetName: "閰嶇疆").ToList() : new();
@@ -167,10 +176,15 @@
throw new UserFriendlyException("璇锋鏌ュ鍏ョ殑琛ㄦ牸");
}
+ MyCurrentUser myCurrentUser = new MyCurrentUser()
+ {
+ UserAccount = _currentUser.UserAccount,
+ UserId = _currentUser.UserId
+ };
await _workPlanAppService.ImportAsync(new WorkPlansImportModel
{
WorkPlans = workPlanRows,
- }, userId, userAccount);
+ }, myCurrentUser);
return Ok();
}
diff --git a/PipeLineLems/server/src/CMS.Plugin.PipeLineLems/ProjectService/PipeLineLemsProjectService.cs b/PipeLineLems/server/src/CMS.Plugin.PipeLineLems/ProjectService/PipeLineLemsProjectService.cs
index 9755550..d3e1b4e 100644
--- a/PipeLineLems/server/src/CMS.Plugin.PipeLineLems/ProjectService/PipeLineLemsProjectService.cs
+++ b/PipeLineLems/server/src/CMS.Plugin.PipeLineLems/ProjectService/PipeLineLemsProjectService.cs
@@ -332,7 +332,7 @@
//鏍规嵁鍘熸枡鏍囪瘑瀵绘壘 浣滀笟璁″垝
- var workPlanList = await workPlanAppService.FindByDataIdentifierAsync(callMaterialOrder.DataIdentifier);
+ var workPlanList = await workPlanAppService.GetListByFilterAsync(x => x.DataIdentifier == callMaterialOrder.DataIdentifier);
if (workPlanList?.Count == 0) return;//缁撴潫
////TODO:鏆傛椂鐢熸垚浜у搧ID
@@ -377,6 +377,8 @@
pipeSpecCode3 = new_workPlanList[i].PipeSpecCode;
}
}
+ //鑾峰彇 鎵规
+ await callMaterialOrderAppService.wh
Dictionary<string, object?> keyValuePairs = new Dictionary<string, object?>
{
{ "鎵撶爜宸ヤ欢1",code1},
@@ -388,7 +390,8 @@
{ "鎵撶爜绠℃缂栫爜", new_workPlanList.First().PipeSpecCode },
{ "鎵撶爜绠℃鍚嶇О", new_workPlanList.First().PipeSectionName },
{ "鎵撶爜鍘熸枡绠″瀷鍙�", new_workPlanList.First().MaterialMode },
- { "鎵撶爜鍘熸枡鏍囪瘑", new_workPlanList.First().DataIdentifier }
+ { "鎵撶爜鍘熸枡鏍囪瘑", new_workPlanList.First().DataIdentifier },
+ { "鎵撶爜鍘熸枡绠℃壒娆�", new_workPlanList.First() },
};
_variableService.WriteValueAsync(keyValuePairs);
@@ -450,7 +453,7 @@
//鏍规嵁鍘熸枡鏍囪瘑瀵绘壘 浣滀笟璁″垝
- var workPlanList = await workPlanAppService.FindByDataIdentifierAsync(callMaterialOrder.DataIdentifier);
+ var workPlanList = await workPlanAppService.GetListByFilterAsync(x => x.DataIdentifier == callMaterialOrder.DataIdentifier);
if (workPlanList?.Count == 0) return;//缁撴潫
//TODO:鏆傛椂鐢熸垚浜у搧ID
@@ -603,7 +606,7 @@
//鏍规嵁鍘熸枡鏍囪瘑瀵绘壘 浣滀笟璁″垝
- var workPlanList = await workPlanAppService.FindByDataIdentifierAsync(callMaterialOrder.DataIdentifier);
+ var workPlanList = await workPlanAppService.GetListByFilterAsync(x => x.DataIdentifier == callMaterialOrder.DataIdentifier);
if (workPlanList?.Count == 0) return;//缁撴潫
////TODO:鏆傛椂鐢熸垚浜у搧ID
@@ -721,7 +724,7 @@
//鏍规嵁鍘熸枡鏍囪瘑瀵绘壘 浣滀笟璁″垝
- var workPlanList = await workPlanAppService.FindByDataIdentifierAsync(callMaterialOrder.DataIdentifier);
+ var workPlanList = await workPlanAppService.GetListByFilterAsync(x => x.DataIdentifier == callMaterialOrder.DataIdentifier);
if (workPlanList?.Count == 0) return;//缁撴潫
//TODO:鏆傛椂鐢熸垚浜у搧ID
diff --git "a/PipeLineLems/server/src/CMS.Plugin.PipeLineLems/Resources/Templates/WorkPlan\345\257\274\345\207\272\346\250\241\346\235\277.xlsx" "b/PipeLineLems/server/src/CMS.Plugin.PipeLineLems/Resources/Templates/WorkPlan\345\257\274\345\207\272\346\250\241\346\235\277.xlsx"
index 38f4583..827f6f4 100644
--- "a/PipeLineLems/server/src/CMS.Plugin.PipeLineLems/Resources/Templates/WorkPlan\345\257\274\345\207\272\346\250\241\346\235\277.xlsx"
+++ "b/PipeLineLems/server/src/CMS.Plugin.PipeLineLems/Resources/Templates/WorkPlan\345\257\274\345\207\272\346\250\241\346\235\277.xlsx"
Binary files differ
--
Gitblit v1.9.3