From 17d2ececa758ae591789697cef2c827469259c0a Mon Sep 17 00:00:00 2001 From: think <1787994136@qq.com> Date: Wed, 15 Jan 2025 13:54:18 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BA=86uni-app=E5=8F=91?= =?UTF-8?q?=E5=B8=83=E5=B0=8F=E7=A8=8B=E5=BA=8F=E5=90=8E=EF=BC=8C=E8=BF=87?= =?UTF-8?q?=E7=A8=8B=E6=A3=80=E9=AA=8C=E5=92=8C=E7=BB=88=E6=A3=80=E6=97=A0?= =?UTF-8?q?=E6=B3=95=E6=9F=A5=E8=AF=A2=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/pgmaster/PgMasterController.java | 9 + .../pgmaster/vo/PgMasterLinePageReqVO.java | 13 + .../mysql/pgmaster/PgMasterLineMapper.java | 83 +++- .../processdesign/ProcessDesignMapper.java | 4 +- .../zjpgmaster/ZjPgMasterLineMapper.java | 2 +- .../service/pgmaster/PgMasterService.java | 2 + .../service/pgmaster/PgMasterServiceImpl.java | 5 + .../src/api/heli/pgmaster/index.ts | 7 + .../heli/pgmasterline/PgMasterLineForm.vue | 244 ++++++++++++ .../src/views/heli/pgmasterline/index.vue | 357 ++++++++++++++++++ .../pages/pgMaster/components/dataItem.vue | 2 +- .../pages/zjPgMaster/components/dataItem.vue | 4 +- 12 files changed, 724 insertions(+), 8 deletions(-) create mode 100644 mes-ui/mes-ui-admin-vue3/src/views/heli/pgmasterline/PgMasterLineForm.vue create mode 100644 mes-ui/mes-ui-admin-vue3/src/views/heli/pgmasterline/index.vue diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/controller/admin/pgmaster/PgMasterController.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/controller/admin/pgmaster/PgMasterController.java index 933728e..46c19f2 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/controller/admin/pgmaster/PgMasterController.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/controller/admin/pgmaster/PgMasterController.java @@ -1,5 +1,6 @@ package com.chanko.yunxi.mes.module.heli.controller.admin.pgmaster; + import com.chanko.yunxi.mes.module.heli.controller.admin.plansub.vo.PlanSubRespVO; import com.chanko.yunxi.mes.module.heli.controller.admin.taskdispatch.vo.TaskDispatchDetailPageReqVO; import com.chanko.yunxi.mes.module.heli.controller.admin.zjpgmaster.vo.ZjPgMasterSaveReqVO; @@ -126,6 +127,14 @@ public class PgMasterController { PageResult pageResult = pgMasterService.getTaskDispatchDetailPage(pageReqVO); return success(pageResult); } + @GetMapping("/task-dispatch-detail/pages") + @Operation(summary = "获得质量派工单过程检验行分页") + @PreAuthorize("@ss.hasPermission('heli:pg-master-line:query')") + public CommonResult> getPgMasterLinePages(@Valid PgMasterLinePageReqVO pageReqVO) { + PageResult pageResult = pgMasterService.getPgMasterLinePages(pageReqVO); + return success(BeanUtils.toBean(pageResult, PgMasterLineDO.class)); + } + @GetMapping("/task-dispatch-detail/get") @Operation(summary = "获得派工明细分页") @PreAuthorize("@ss.hasPermission('heli:task-dispatch:query')") diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/controller/admin/pgmaster/vo/PgMasterLinePageReqVO.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/controller/admin/pgmaster/vo/PgMasterLinePageReqVO.java index 42ba4d0..a5d7992 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/controller/admin/pgmaster/vo/PgMasterLinePageReqVO.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/controller/admin/pgmaster/vo/PgMasterLinePageReqVO.java @@ -107,4 +107,17 @@ public class PgMasterLinePageReqVO extends PageParam { @Schema(description = "派工状态") private Integer dispatchStatus; + @Schema(description = "生产计划单号") + private String taskNo; + + @Schema(description = "生产计划id", example = "25586") + private Long taskId; + + @Schema(description = "项目id", example = "20270") + private Long projectId; + + @Schema(description = "报工状态") + private String active; + + } \ No newline at end of file diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/pgmaster/PgMasterLineMapper.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/pgmaster/PgMasterLineMapper.java index a32c13b..0476817 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/pgmaster/PgMasterLineMapper.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/pgmaster/PgMasterLineMapper.java @@ -62,7 +62,7 @@ public interface PgMasterLineMapper extends BaseMapperX { .orderByAsc(PgMasterLineDO::getTaskNo,PgMasterLineDO::getPgNumber) .disableSubLogicDel(); - query.eq(reqVO.getDetilUser() != null, PgMasterLineDO::getDetilUser, reqVO.getDetilUser()) + query.eq(reqVO.getDetilUser() != null&&reqVO.getDetilUser() != 0, PgMasterLineDO::getDetilUser, reqVO.getDetilUser()) .eq(reqVO.getPgType() != null, PgMasterLineDO::getPgType, reqVO.getPgType()) .eq(reqVO.getDispatchStatus() != null, PgMasterLineDO::getDispatchStatus, reqVO.getDispatchStatus()) @@ -72,4 +72,85 @@ public interface PgMasterLineMapper extends BaseMapperX { return selectPage(reqVO, query); } + + + default PageResult selectPages(PgMasterLinePageReqVO reqVO) { + MPJLambdaWrapper query = new MPJLambdaWrapper<>(); + query.select("t.id,t.task_no as taskNo,t.project_name as projectName,t.project_sub_name as projectSubName, " + + "t.material_name as materialName, t.blueprint_no as blueprintNo, t.amount, t.spec ,t.unit, t.detil_user as detilUser, " + + "t.pg_number as pgNumber ,t.start_time as startTime ,t.ent_time as entTime ,t.dispatch_status as dispatchStatus,t.pg_type as pgType ") + + .orderByAsc(PgMasterLineDO::getTaskNo,PgMasterLineDO::getPgNumber) + ; + + query.eq(reqVO.getCreateTime()!= null, PgMasterLineDO::getCreateTime, reqVO.getCreateTime()) + .eq(reqVO.getBomId()!= null, PgMasterLineDO::getBomId, reqVO.getBomId()) + .eq(reqVO.getBomNumber()!= null, PgMasterLineDO::getBomNumber, reqVO.getBomNumber()) + .like(reqVO.getBomName()!= null, PgMasterLineDO::getBomName, reqVO.getBomName()) + .eq(reqVO.getBomNo()!= null, PgMasterLineDO::getBomNo, reqVO.getBomNo()) + .eq(reqVO.getProjectSubId()!= null, PgMasterLineDO::getProjectSubId, reqVO.getProjectSubId()) + .like(reqVO.getProjectSubName()!= null, PgMasterLineDO::getProjectSubName, reqVO.getProjectSubName()) + .eq(reqVO.getProjectSubNumber()!= null, PgMasterLineDO::getProjectSubNumber, reqVO.getProjectSubNumber()) + .eq(reqVO.getType()!= null, PgMasterLineDO::getType, reqVO.getType()) + .eq(reqVO.getMaterialId()!= null, PgMasterLineDO::getMaterialId, reqVO.getMaterialId()) + .eq(reqVO.getMaterialCode()!= null, PgMasterLineDO::getMaterialCode, reqVO.getMaterialCode()) + .like(reqVO.getMaterialName()!= null, PgMasterLineDO::getMaterialName, reqVO.getMaterialName()) + .eq(reqVO.getCompositionId()!= null, PgMasterLineDO::getCompositionId, reqVO.getCompositionId()) + .eq(reqVO.getSpec()!= null, PgMasterLineDO::getSpec, reqVO.getSpec()) + .eq(reqVO.getUnit()!= null, PgMasterLineDO::getUnit, reqVO.getUnit()) + .eq(reqVO.getBlueprintNo()!= null, PgMasterLineDO::getBlueprintNo, reqVO.getBlueprintNo()) + .eq(reqVO.getAmount()!= null, PgMasterLineDO::getAmount, reqVO.getAmount()) + .eq(reqVO.getDetilUser()!= null, PgMasterLineDO::getDetilUser, reqVO.getDetilUser()) + .eq(reqVO.getGongShi()!= null, PgMasterLineDO::getGongShi, reqVO.getGongShi()) + .eq(reqVO.getZlPgId()!= null, PgMasterLineDO::getZlPgId, reqVO.getZlPgId()) + .eq(reqVO.getPgType()!= null, PgMasterLineDO::getPgType, reqVO.getPgType()) + .eq(reqVO.getStartTime()!= null, PgMasterLineDO::getStartTime, reqVO.getStartTime()) + .eq(reqVO.getEntTime()!= null, PgMasterLineDO::getEntTime, reqVO.getEntTime()) + .eq(reqVO.getDispatchStatus()!= null, PgMasterLineDO::getDispatchStatus, reqVO.getDispatchStatus()) + .eq(reqVO.getTaskNo()!= null, PgMasterLineDO::getTaskNo, reqVO.getTaskNo()) + .eq(reqVO.getTaskId()!= null, PgMasterLineDO::getTaskId, reqVO.getTaskId()) + .eq(reqVO.getProjectId()!= null, PgMasterLineDO::getProjectId, reqVO.getProjectId()) + .like(reqVO.getProjectName()!= null, PgMasterLineDO::getProjectName, reqVO.getProjectName()) + .eq(reqVO.getPgNumber()!= null, PgMasterLineDO::getPgNumber, reqVO.getPgNumber()) + .eq(reqVO.getActive()!= null, PgMasterLineDO::getActive, reqVO.getActive()) + .orderByDesc(PgMasterLineDO::getId) + + + ; + + return selectPage(reqVO, query); + /*return selectPage(reqVO, new LambdaQueryWrapperX() + .betweenIfPresent(PgMasterLineDO::getCreateTime, reqVO.getCreateTime()) + .eqIfPresent(PgMasterLineDO::getBomId, reqVO.getBomId()) + .eqIfPresent(PgMasterLineDO::getBomNumber, reqVO.getBomNumber()) + .likeIfPresent(PgMasterLineDO::getBomName, reqVO.getBomName()) + .eqIfPresent(PgMasterLineDO::getBomNo, reqVO.getBomNo()) + .eqIfPresent(PgMasterLineDO::getProjectSubId, reqVO.getProjectSubId()) + .likeIfPresent(PgMasterLineDO::getProjectSubName, reqVO.getProjectSubName()) + .eqIfPresent(PgMasterLineDO::getProjectSubNumber, reqVO.getProjectSubNumber()) + .eqIfPresent(PgMasterLineDO::getType, reqVO.getType()) + .eqIfPresent(PgMasterLineDO::getMaterialId, reqVO.getMaterialId()) + .eqIfPresent(PgMasterLineDO::getMaterialCode, reqVO.getMaterialCode()) + .likeIfPresent(PgMasterLineDO::getMaterialName, reqVO.getMaterialName()) + .eqIfPresent(PgMasterLineDO::getCompositionId, reqVO.getCompositionId()) + .eqIfPresent(PgMasterLineDO::getSpec, reqVO.getSpec()) + .eqIfPresent(PgMasterLineDO::getUnit, reqVO.getUnit()) + .eqIfPresent(PgMasterLineDO::getBlueprintNo, reqVO.getBlueprintNo()) + .eqIfPresent(PgMasterLineDO::getAmount, reqVO.getAmount()) + .eqIfPresent(PgMasterLineDO::getDetilUser, reqVO.getDetilUser()) + .eqIfPresent(PgMasterLineDO::getGongShi, reqVO.getGongShi()) + .eqIfPresent(PgMasterLineDO::getZlPgId, reqVO.getZlPgId()) + .eqIfPresent(PgMasterLineDO::getPgType, reqVO.getPgType()) + .betweenIfPresent(PgMasterLineDO::getStartTime, reqVO.getStartTime()) + .betweenIfPresent(PgMasterLineDO::getEntTime, reqVO.getEntTime()) + .eqIfPresent(PgMasterLineDO::getDispatchStatus, reqVO.getDispatchStatus()) + .eqIfPresent(PgMasterLineDO::getTaskNo, reqVO.getTaskNo()) + .eqIfPresent(PgMasterLineDO::getTaskId, reqVO.getTaskId()) + .eqIfPresent(PgMasterLineDO::getProjectId, reqVO.getProjectId()) + .likeIfPresent(PgMasterLineDO::getProjectName, reqVO.getProjectName()) + .eqIfPresent(PgMasterLineDO::getPgNumber, reqVO.getPgNumber()) + .eqIfPresent(PgMasterLineDO::getActive, reqVO.getActive()) + .orderByDesc(PgMasterLineDO::getId));*/ + } + } \ No newline at end of file diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/processdesign/ProcessDesignMapper.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/processdesign/ProcessDesignMapper.java index 00d1e64..298ae71 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/processdesign/ProcessDesignMapper.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/processdesign/ProcessDesignMapper.java @@ -74,9 +74,9 @@ public interface ProcessDesignMapper extends BaseMapperX { .or() .apply("u5.id = {0} and t.process_design_type = {1}", reqVO.getOwner(), ProcessDesignTypeEnum.BLUEPRINT_3D.name())); } - /*if(reqVO.getUncompletedDesign() != null && reqVO.getUncompletedDesign()){ + if(reqVO.getUncompletedDesign() != null && reqVO.getUncompletedDesign()){ query.and(QueryWrapper -> QueryWrapper.apply("COALESCE(z.progress, 0) < {0}", 100).ne(PlanDO::getStatus, ProjectPlanStatusEnum.TERMINATE.getCode())); - }*/ + } if(reqVO.getPgType() != null){ if(reqVO.getPgType()==0){ query.and(QueryWrapper -> QueryWrapper.apply("z.progress < {0}" , 100).or().apply("z.progress is null")); diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/zjpgmaster/ZjPgMasterLineMapper.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/zjpgmaster/ZjPgMasterLineMapper.java index b4fcf1b..8ef220e 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/zjpgmaster/ZjPgMasterLineMapper.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/zjpgmaster/ZjPgMasterLineMapper.java @@ -57,7 +57,7 @@ public interface ZjPgMasterLineMapper extends BaseMapperX { .orderByDesc(ZjPgMasterLineDO::getId) .disableSubLogicDel(); - query.eq(reqVO.getDetilUser() != null, ZjPgMasterLineDO::getDetilUser, reqVO.getDetilUser()) + query.eq(reqVO.getDetilUser() != null&&reqVO.getDetilUser() != 0, ZjPgMasterLineDO::getDetilUser, reqVO.getDetilUser()) .eq(reqVO.getPgType() != null, ZjPgMasterLineDO::getPgType, reqVO.getPgType()) .eq(reqVO.getDispatchStatus()!=null,ZjPgMasterLineDO::getDispatchStatus, reqVO.getDispatchStatus()) diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/pgmaster/PgMasterService.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/pgmaster/PgMasterService.java index f71de2d..9ca5a21 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/pgmaster/PgMasterService.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/pgmaster/PgMasterService.java @@ -66,6 +66,8 @@ public interface PgMasterService { PageResult getTaskDispatchDetailPage(PgMasterLinePageReqVO pageReqVO); + PageResult getPgMasterLinePages(PgMasterLinePageReqVO pageReqVO); + PgMasterLineDO getTaskDispatchDetail(PgMasterLinePageReqVO pageReqVO); /** * 获得质量派工单过程检验行列表 diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/pgmaster/PgMasterServiceImpl.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/pgmaster/PgMasterServiceImpl.java index e41fafa..4e6c87a 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/pgmaster/PgMasterServiceImpl.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/pgmaster/PgMasterServiceImpl.java @@ -233,6 +233,11 @@ public class PgMasterServiceImpl implements PgMasterService { // ==================== 子表(质量派工单过程检验行) ==================== + + @Override + public PageResult getPgMasterLinePages(PgMasterLinePageReqVO pageReqVO) { + return pgMasterLineMapper.selectPages(pageReqVO); + } @Override public PageResult getTaskDispatchDetailPage(PgMasterLinePageReqVO pageReqVO) { return pgMasterLineMapper.selectPage(pageReqVO); diff --git a/mes-ui/mes-ui-admin-vue3/src/api/heli/pgmaster/index.ts b/mes-ui/mes-ui-admin-vue3/src/api/heli/pgmaster/index.ts index a5e9dff..fee668b 100644 --- a/mes-ui/mes-ui-admin-vue3/src/api/heli/pgmaster/index.ts +++ b/mes-ui/mes-ui-admin-vue3/src/api/heli/pgmaster/index.ts @@ -18,6 +18,13 @@ export const getSearchBomMx = async (task_id: number,project_id: number) => { } +// 查询质量派工单过程检验行分页 +export const getPgMasterLinePage = async (params) => { + return await request.get({ url: `/heli/pg-master/task-dispatch-detail/pages`, params }) +} + + + // 查询质量过程检派工单主分页 export const getPgMasterPage = async (params) => { return await request.get({ url: `/heli/pg-master/page`, params }) diff --git a/mes-ui/mes-ui-admin-vue3/src/views/heli/pgmasterline/PgMasterLineForm.vue b/mes-ui/mes-ui-admin-vue3/src/views/heli/pgmasterline/PgMasterLineForm.vue new file mode 100644 index 0000000..cc7f195 --- /dev/null +++ b/mes-ui/mes-ui-admin-vue3/src/views/heli/pgmasterline/PgMasterLineForm.vue @@ -0,0 +1,244 @@ + + \ No newline at end of file diff --git a/mes-ui/mes-ui-admin-vue3/src/views/heli/pgmasterline/index.vue b/mes-ui/mes-ui-admin-vue3/src/views/heli/pgmasterline/index.vue new file mode 100644 index 0000000..c6f98aa --- /dev/null +++ b/mes-ui/mes-ui-admin-vue3/src/views/heli/pgmasterline/index.vue @@ -0,0 +1,357 @@ + + + \ No newline at end of file diff --git a/mes-ui/mini-app/src/pages/pgMaster/components/dataItem.vue b/mes-ui/mini-app/src/pages/pgMaster/components/dataItem.vue index 4b314e9..2494aaf 100644 --- a/mes-ui/mini-app/src/pages/pgMaster/components/dataItem.vue +++ b/mes-ui/mini-app/src/pages/pgMaster/components/dataItem.vue @@ -27,7 +27,7 @@ const isLoading = ref(false) const queryParams: Required = { pageNo: 1, pageSize: 5, - detilUser: null, + detilUser: 0, // pgType: 0, // 工序完成状态列表 diff --git a/mes-ui/mini-app/src/pages/zjPgMaster/components/dataItem.vue b/mes-ui/mini-app/src/pages/zjPgMaster/components/dataItem.vue index 14198fd..3c72553 100644 --- a/mes-ui/mini-app/src/pages/zjPgMaster/components/dataItem.vue +++ b/mes-ui/mini-app/src/pages/zjPgMaster/components/dataItem.vue @@ -27,7 +27,7 @@ const isLoading = ref(false) const queryParams: Required = { pageNo: 1, pageSize: 5, - detilUser: null, + detilUser: 0, // pgType: 0, // 工序完成状态列表 @@ -39,8 +39,6 @@ dispatchStatus:2 } const dataList = ref([]) const getListData = async () => { - console.log("props.orderState"); - console.log(props.orderState); queryParams.pgType = props.orderState; // 如果数据出于加载中,退出函数 if (isLoading.value) return