From 52e80f273932f4ac78aa34b179bb3c117819950d Mon Sep 17 00:00:00 2001 From: think <1787994136@qq.com> Date: Sun, 12 Jan 2025 17:37:58 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BF=87=E7=A8=8B=E6=A3=80app=E6=8A=A5?= =?UTF-8?q?=E5=B7=A5=E7=95=8C=E9=9D=A2=E5=A2=9E=E5=8A=A0=EF=BC=9B=E8=BF=87?= =?UTF-8?q?=E7=A8=8B=E6=A3=80=E6=8A=A5=E5=B7=A5=E5=92=8C=E7=BB=88=E6=A3=80?= =?UTF-8?q?=E6=8A=A5=E5=B7=A5=E4=BD=9C=E5=BA=9F=E5=8A=9F=E8=83=BD=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../module/heli/enums/ErrorCodeConstants.java | 3 +- .../admin/pgmaster/PgMasterController.java | 10 + .../pgmaster/vo/PgMasterLinePageReqVO.java | 3 + .../ZjBgMasterLineController.java | 193 +++--- .../vo/ZjBgMasterLinePageReqVO.java | 2 + .../zjpgmaster/ZjPgMasterController.java | 7 + .../vo/ZjPgMasterLinePageReqVO.java | 4 + .../dataobject/pgmaster/PgMasterLineDO.java | 5 + .../zjpgmaster/ZjPgMasterLineDO.java | 5 + .../mysql/pgmaster/PgMasterLineMapper.java | 2 + .../zjbgmasterline/ZjBgMasterLineMapper.java | 2 + .../zjpgmaster/ZjPgMasterLineMapper.java | 1 + .../service/pgmaster/PgMasterService.java | 7 + .../service/pgmaster/PgMasterServiceImpl.java | 28 + .../zjbgmasterline/ZjBgMasterLineService.java | 112 ++-- .../ZjBgMasterLineServiceImpl.java | 2 + .../service/zjpgmaster/ZjPgMasterService.java | 7 + .../zjpgmaster/ZjPgMasterServiceImpl.java | 28 + mes-ui/mini-app/src/pages.json | 12 + mes-ui/mini-app/src/pages/index/index.vue | 2 +- .../pages/pgMaster/components/dataItem.vue | 448 ++++++++++++++ .../src/pages/pgMaster/pgMaster-detail.vue | 570 ++++++++++++++++++ .../mini-app/src/pages/pgMaster/pgMaster.vue | 151 +++++ .../pages/zjPgMaster/components/dataItem.vue | 60 +- .../pages/zjPgMaster/zjPgMaster-detail.vue | 18 +- mes-ui/mini-app/src/services/pgMaster.ts | 72 +++ mes-ui/mini-app/src/services/zjPgMaster.ts | 11 + 27 files changed, 1597 insertions(+), 168 deletions(-) create mode 100644 mes-ui/mini-app/src/pages/pgMaster/components/dataItem.vue create mode 100644 mes-ui/mini-app/src/pages/pgMaster/pgMaster-detail.vue create mode 100644 mes-ui/mini-app/src/pages/pgMaster/pgMaster.vue create mode 100644 mes-ui/mini-app/src/services/pgMaster.ts diff --git a/mes-module-heli/mes-module-heli-api/src/main/java/com/chanko/yunxi/mes/module/heli/enums/ErrorCodeConstants.java b/mes-module-heli/mes-module-heli-api/src/main/java/com/chanko/yunxi/mes/module/heli/enums/ErrorCodeConstants.java index eb6be4a..3946eaf 100644 --- a/mes-module-heli/mes-module-heli-api/src/main/java/com/chanko/yunxi/mes/module/heli/enums/ErrorCodeConstants.java +++ b/mes-module-heli/mes-module-heli-api/src/main/java/com/chanko/yunxi/mes/module/heli/enums/ErrorCodeConstants.java @@ -98,7 +98,8 @@ public interface ErrorCodeConstants { ErrorCode TASK_DISPATCH_NOT_EXISTS = new ErrorCode(1_009_001, "派工单不存在"); ErrorCode TASK_REPORT_NOT_EXISTS = new ErrorCode(1_009_002, "任务报工不存在"); ErrorCode TASK_REPORT_PARAMS_ERROR = new ErrorCode(1_009_003, "报工数量或报工工时不能为空"); - ErrorCode TASK_REPORT_PARAMS_ERRORS = new ErrorCode(1_009_003, "报工数量超出派工数量"); + ErrorCode TASK_REPORT_PARAMS_ERRORS = new ErrorCode(1_009_007, "报工数量超出派工数量"); + ErrorCode TASK_REPORT_PARAMS_ERRORSZF = new ErrorCode(1_009_008, "已经报工不允许作废"); ErrorCode TASK_DISPATCH_TASK_NOT_EXISTS = new ErrorCode(1_009_004, "任务不存在或已完成"); ErrorCode TASK_DISPATCH_TASK_NO_PERMISSION_FOR_OPERATE = new ErrorCode(1_009_005, "任务不满足操作条件"); ErrorCode TASK_DISPATCH_TASK_REPORT_AMOUNT_EXCESS = new ErrorCode(1_009_006, "无法超额报工"); 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 7eaf81e..933728e 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 @@ -2,6 +2,7 @@ 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; import com.chanko.yunxi.mes.module.heli.dal.dataobject.pgmaster.PgMasterLineDO; import com.chanko.yunxi.mes.module.heli.dal.dataobject.plansub.PlanSubDO; import com.chanko.yunxi.mes.module.heli.dal.dataobject.taskdispatch.TaskDispatchDetailDO; @@ -45,6 +46,8 @@ public class PgMasterController { private PgMasterService pgMasterService; + + @GetMapping("/getBomMx") @Operation(summary = "查询BOM明细") @Parameter(name = "names", description = "负责人", required = true) @@ -55,6 +58,13 @@ public class PgMasterController { } + @PostMapping("/zfPgMaster") + @Operation(summary = "作废过程检验派工单") + @PreAuthorize("@ss.hasPermission('heli:pg-master:create')") + public CommonResult zfPgMaster(@Valid @RequestBody PgMasterSaveReqVO createReqVO) { + return success(pgMasterService.zfPgMaster(createReqVO)); + } + @PostMapping("/create") @Operation(summary = "创建质量过程检派工单主") @PreAuthorize("@ss.hasPermission('heli:pg-master:create')") 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 ef4e34c..42ba4d0 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 @@ -104,4 +104,7 @@ public class PgMasterLinePageReqVO extends PageParam { @Schema(description = "总报工工时") private BigDecimal workTime; + @Schema(description = "派工状态") + private Integer dispatchStatus; + } \ 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/controller/admin/zjbgmasterline/ZjBgMasterLineController.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/controller/admin/zjbgmasterline/ZjBgMasterLineController.java index efde6bf..6fed78c 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/controller/admin/zjbgmasterline/ZjBgMasterLineController.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/controller/admin/zjbgmasterline/ZjBgMasterLineController.java @@ -1,95 +1,98 @@ -package com.chanko.yunxi.mes.module.heli.controller.admin.zjbgmasterline; - -import org.springframework.web.bind.annotation.*; -import javax.annotation.Resource; -import org.springframework.validation.annotation.Validated; -import org.springframework.security.access.prepost.PreAuthorize; -import io.swagger.v3.oas.annotations.tags.Tag; -import io.swagger.v3.oas.annotations.Parameter; -import io.swagger.v3.oas.annotations.Operation; - -import javax.validation.constraints.*; -import javax.validation.*; -import javax.servlet.http.*; -import java.util.*; -import java.io.IOException; - -import com.chanko.yunxi.mes.framework.common.pojo.PageParam; -import com.chanko.yunxi.mes.framework.common.pojo.PageResult; -import com.chanko.yunxi.mes.framework.common.pojo.CommonResult; -import com.chanko.yunxi.mes.framework.common.util.object.BeanUtils; -import static com.chanko.yunxi.mes.framework.common.pojo.CommonResult.success; - -import com.chanko.yunxi.mes.framework.excel.core.util.ExcelUtils; - -import com.chanko.yunxi.mes.framework.operatelog.core.annotations.OperateLog; -import static com.chanko.yunxi.mes.framework.operatelog.core.enums.OperateTypeEnum.*; - -import com.chanko.yunxi.mes.module.heli.controller.admin.zjbgmasterline.vo.*; -import com.chanko.yunxi.mes.module.heli.dal.dataobject.zjbgmasterline.ZjBgMasterLineDO; -import com.chanko.yunxi.mes.module.heli.service.zjbgmasterline.ZjBgMasterLineService; - -@Tag(name = "管理后台 - 终检报工") -@RestController -@RequestMapping("/heli/zj-bg-master-line") -@Validated -public class ZjBgMasterLineController { - - @Resource - private ZjBgMasterLineService zjBgMasterLineService; - - @PostMapping("/create") - @Operation(summary = "创建终检报工") - @PreAuthorize("@ss.hasPermission('heli:zj-bg-master-line:create')") - public CommonResult createZjBgMasterLine(@Valid @RequestBody ZjBgMasterLineSaveReqVO createReqVO) { - return success(zjBgMasterLineService.createZjBgMasterLine(createReqVO)); - } - - @PutMapping("/update") - @Operation(summary = "更新终检报工") - @PreAuthorize("@ss.hasPermission('heli:zj-bg-master-line:update')") - public CommonResult updateZjBgMasterLine(@Valid @RequestBody ZjBgMasterLineSaveReqVO updateReqVO) { - zjBgMasterLineService.updateZjBgMasterLine(updateReqVO); - return success(true); - } - - @DeleteMapping("/delete") - @Operation(summary = "删除终检报工") - @Parameter(name = "id", description = "编号", required = true) - @PreAuthorize("@ss.hasPermission('heli:zj-bg-master-line:delete')") - public CommonResult deleteZjBgMasterLine(@RequestParam("id") Integer id) { - zjBgMasterLineService.deleteZjBgMasterLine(id); - return success(true); - } - - @GetMapping("/get") - @Operation(summary = "获得终检报工") - @Parameter(name = "id", description = "编号", required = true, example = "1024") - @PreAuthorize("@ss.hasPermission('heli:zj-bg-master-line:query')") - public CommonResult getZjBgMasterLine(@RequestParam("id") Integer id) { - ZjBgMasterLineDO zjBgMasterLine = zjBgMasterLineService.getZjBgMasterLine(id); - return success(BeanUtils.toBean(zjBgMasterLine, ZjBgMasterLineRespVO.class)); - } - - @GetMapping("/page") - @Operation(summary = "获得终检报工分页") - @PreAuthorize("@ss.hasPermission('heli:zj-bg-master-line:query')") - public CommonResult> getZjBgMasterLinePage(@Valid ZjBgMasterLinePageReqVO pageReqVO) { - PageResult pageResult = zjBgMasterLineService.getZjBgMasterLinePage(pageReqVO); - return success(BeanUtils.toBean(pageResult, ZjBgMasterLineRespVO.class)); - } - - @GetMapping("/export-excel") - @Operation(summary = "导出终检报工 Excel") - @PreAuthorize("@ss.hasPermission('heli:zj-bg-master-line:export')") - @OperateLog(type = EXPORT) - public void exportZjBgMasterLineExcel(@Valid ZjBgMasterLinePageReqVO pageReqVO, - HttpServletResponse response) throws IOException { - pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); - List list = zjBgMasterLineService.getZjBgMasterLinePage(pageReqVO).getList(); - // 导出 Excel - ExcelUtils.write(response, "终检报工.xls", "数据", ZjBgMasterLineRespVO.class, - BeanUtils.toBean(list, ZjBgMasterLineRespVO.class)); - } - -} \ No newline at end of file +package com.chanko.yunxi.mes.module.heli.controller.admin.zjbgmasterline; + +import org.springframework.web.bind.annotation.*; +import javax.annotation.Resource; +import org.springframework.validation.annotation.Validated; +import org.springframework.security.access.prepost.PreAuthorize; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Operation; + +import javax.validation.constraints.*; +import javax.validation.*; +import javax.servlet.http.*; +import java.util.*; +import java.io.IOException; + +import com.chanko.yunxi.mes.framework.common.pojo.PageParam; +import com.chanko.yunxi.mes.framework.common.pojo.PageResult; +import com.chanko.yunxi.mes.framework.common.pojo.CommonResult; +import com.chanko.yunxi.mes.framework.common.util.object.BeanUtils; +import static com.chanko.yunxi.mes.framework.common.pojo.CommonResult.success; + +import com.chanko.yunxi.mes.framework.excel.core.util.ExcelUtils; + +import com.chanko.yunxi.mes.framework.operatelog.core.annotations.OperateLog; +import static com.chanko.yunxi.mes.framework.operatelog.core.enums.OperateTypeEnum.*; + +import com.chanko.yunxi.mes.module.heli.controller.admin.zjbgmasterline.vo.*; +import com.chanko.yunxi.mes.module.heli.dal.dataobject.zjbgmasterline.ZjBgMasterLineDO; +import com.chanko.yunxi.mes.module.heli.service.zjbgmasterline.ZjBgMasterLineService; + +@Tag(name = "管理后台 - 终检报工") +@RestController +@RequestMapping("/heli/zj-bg-master-line") +@Validated +public class ZjBgMasterLineController { + + @Resource + private ZjBgMasterLineService zjBgMasterLineService; + + @PostMapping("/create") + @Operation(summary = "创建终检报工") + @PreAuthorize("@ss.hasPermission('heli:zj-bg-master-line:create')") + public CommonResult createZjBgMasterLine(@Valid @RequestBody ZjBgMasterLineSaveReqVO createReqVO) { + return success(zjBgMasterLineService.createZjBgMasterLine(createReqVO)); + } + + + + + @PutMapping("/update") + @Operation(summary = "更新终检报工") + @PreAuthorize("@ss.hasPermission('heli:zj-bg-master-line:update')") + public CommonResult updateZjBgMasterLine(@Valid @RequestBody ZjBgMasterLineSaveReqVO updateReqVO) { + zjBgMasterLineService.updateZjBgMasterLine(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除终检报工") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('heli:zj-bg-master-line:delete')") + public CommonResult deleteZjBgMasterLine(@RequestParam("id") Integer id) { + zjBgMasterLineService.deleteZjBgMasterLine(id); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得终检报工") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('heli:zj-bg-master-line:query')") + public CommonResult getZjBgMasterLine(@RequestParam("id") Integer id) { + ZjBgMasterLineDO zjBgMasterLine = zjBgMasterLineService.getZjBgMasterLine(id); + return success(BeanUtils.toBean(zjBgMasterLine, ZjBgMasterLineRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得终检报工分页") + @PreAuthorize("@ss.hasPermission('heli:zj-bg-master-line:query')") + public CommonResult> getZjBgMasterLinePage(@Valid ZjBgMasterLinePageReqVO pageReqVO) { + PageResult pageResult = zjBgMasterLineService.getZjBgMasterLinePage(pageReqVO); + return success(BeanUtils.toBean(pageResult, ZjBgMasterLineRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出终检报工 Excel") + @PreAuthorize("@ss.hasPermission('heli:zj-bg-master-line:export')") + @OperateLog(type = EXPORT) + public void exportZjBgMasterLineExcel(@Valid ZjBgMasterLinePageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = zjBgMasterLineService.getZjBgMasterLinePage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "终检报工.xls", "数据", ZjBgMasterLineRespVO.class, + BeanUtils.toBean(list, ZjBgMasterLineRespVO.class)); + } + +} diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/controller/admin/zjbgmasterline/vo/ZjBgMasterLinePageReqVO.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/controller/admin/zjbgmasterline/vo/ZjBgMasterLinePageReqVO.java index bbbe948..c971628 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/controller/admin/zjbgmasterline/vo/ZjBgMasterLinePageReqVO.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/controller/admin/zjbgmasterline/vo/ZjBgMasterLinePageReqVO.java @@ -40,4 +40,6 @@ public class ZjBgMasterLinePageReqVO extends PageParam { @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) private BigDecimal[] workTime; + + } \ 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/controller/admin/zjpgmaster/ZjPgMasterController.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/controller/admin/zjpgmaster/ZjPgMasterController.java index aa780d0..c807237 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/controller/admin/zjpgmaster/ZjPgMasterController.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/controller/admin/zjpgmaster/ZjPgMasterController.java @@ -52,6 +52,13 @@ public class ZjPgMasterController { } + @PostMapping("/zfZjPgMaster") + @Operation(summary = "作废终检派工单") + @PreAuthorize("@ss.hasPermission('heli:zj-pg-master:create')") + public CommonResult zfZjPgMaster(@Valid @RequestBody ZjPgMasterSaveReqVO createReqVO) { + return success(zjPgMasterService.zfZjPgMaster(createReqVO)); + } + @PostMapping("/create") @Operation(summary = "创建质量终检派工单主") @PreAuthorize("@ss.hasPermission('heli:zj-pg-master:create')") diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/controller/admin/zjpgmaster/vo/ZjPgMasterLinePageReqVO.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/controller/admin/zjpgmaster/vo/ZjPgMasterLinePageReqVO.java index 98072d3..2d63e04 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/controller/admin/zjpgmaster/vo/ZjPgMasterLinePageReqVO.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/controller/admin/zjpgmaster/vo/ZjPgMasterLinePageReqVO.java @@ -70,4 +70,8 @@ public class ZjPgMasterLinePageReqVO extends PageParam { @Schema(description = "模具名称", example = "芋艿") private String mouldName; + + @Schema(description = "派工状态", example = "1-2-3") + private Integer dispatchStatus; + } \ 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/dataobject/pgmaster/PgMasterLineDO.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/dataobject/pgmaster/PgMasterLineDO.java index 1e39c35..9e84419 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/dataobject/pgmaster/PgMasterLineDO.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/dataobject/pgmaster/PgMasterLineDO.java @@ -119,6 +119,11 @@ public class PgMasterLineDO extends BaseDO { */ private Integer pgType; + /** + * 是否完成 0未完成 1已完成 + */ + private Integer dispatchStatus; + @TableField(exist = false) private String pgNumber; diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/dataobject/zjpgmaster/ZjPgMasterLineDO.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/dataobject/zjpgmaster/ZjPgMasterLineDO.java index fe277d7..ec70a3b 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/dataobject/zjpgmaster/ZjPgMasterLineDO.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/dataobject/zjpgmaster/ZjPgMasterLineDO.java @@ -91,6 +91,11 @@ public class ZjPgMasterLineDO extends BaseDO { */ private String mouldName; + /** + * 派工状态 已保存|已提交|已终止 1|2|3 + */ + private Integer dispatchStatus; + @TableField(exist = false) private String pgNumber; 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 4390467..f50035c 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 @@ -68,6 +68,8 @@ public interface PgMasterLineMapper extends BaseMapperX { query.eq(reqVO.getDetilUser() != null, PgMasterLineDO::getDetilUser, reqVO.getDetilUser()) .eq(reqVO.getPgType() != null, PgMasterLineDO::getPgType, reqVO.getPgType()) + .eq(reqVO.getDispatchStatus() != null, PgMasterLineDO::getDispatchStatus, reqVO.getDispatchStatus()) + ; diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/zjbgmasterline/ZjBgMasterLineMapper.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/zjbgmasterline/ZjBgMasterLineMapper.java index da38adc..a42c5f5 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/zjbgmasterline/ZjBgMasterLineMapper.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/zjbgmasterline/ZjBgMasterLineMapper.java @@ -19,6 +19,8 @@ import com.chanko.yunxi.mes.module.heli.controller.admin.zjbgmasterline.vo.*; @Mapper public interface ZjBgMasterLineMapper extends BaseMapperX { + + default PageResult selectPage(ZjBgMasterLinePageReqVO reqVO) { return selectPage(reqVO, new LambdaQueryWrapperX() .betweenIfPresent(ZjBgMasterLineDO::getCreateTime, reqVO.getCreateTime()) 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 e8b5026..d58a789 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 @@ -61,6 +61,7 @@ public interface ZjPgMasterLineMapper extends BaseMapperX { query.eq(reqVO.getDetilUser() != null, 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 ce19d1e..e2ce1fb 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 @@ -17,6 +17,13 @@ import com.chanko.yunxi.mes.module.heli.dal.dataobject.taskdispatch.TaskDispatch */ public interface PgMasterService { + /** + * 创建质量过程检派工单主 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + Integer zfPgMaster(@Valid PgMasterSaveReqVO createReqVO); /** * 创建质量过程检派工单主 * 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 eaf0f5a..84e8956 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 @@ -1,9 +1,13 @@ package com.chanko.yunxi.mes.module.heli.service.pgmaster; import com.chanko.yunxi.mes.module.heli.controller.admin.taskdispatch.vo.TaskDispatchDetailPageReqVO; +import com.chanko.yunxi.mes.module.heli.dal.dataobject.bgmasterline.BgMasterLineDO; import com.chanko.yunxi.mes.module.heli.dal.dataobject.processbom.ProcessBomDO; import com.chanko.yunxi.mes.module.heli.dal.dataobject.serialnumber.SerialNumberDO; import com.chanko.yunxi.mes.module.heli.dal.dataobject.taskdispatch.TaskDispatchDetailDO; +import com.chanko.yunxi.mes.module.heli.dal.dataobject.zjbgmasterline.ZjBgMasterLineDO; +import com.chanko.yunxi.mes.module.heli.dal.dataobject.zjpgmaster.ZjPgMasterLineDO; +import com.chanko.yunxi.mes.module.heli.dal.mysql.bgmasterline.BgMasterLineMapper; import com.chanko.yunxi.mes.module.heli.dal.mysql.pgmaster.PgMasterLineMapper; import com.chanko.yunxi.mes.module.heli.dal.mysql.processbom.ProcessBomMapper; import com.chanko.yunxi.mes.module.heli.enums.TaskDispatchTypeEnum; @@ -37,6 +41,9 @@ import static com.chanko.yunxi.mes.module.heli.enums.ErrorCodeConstants.*; @Validated public class PgMasterServiceImpl implements PgMasterService { + @Resource + private BgMasterLineMapper bgMasterLineMapper; + @Resource private PgMasterMapper pgMasterMapper; @Resource @@ -78,6 +85,27 @@ public class PgMasterServiceImpl implements PgMasterService { return pgMasterLineDOList; } + + @Override + public Integer zfPgMaster(PgMasterSaveReqVO createReqVO) { + + //作废先判断是否已经报工 + BgMasterLineDO bgMasterLineDO = bgMasterLineMapper.selectSum(createReqVO.getId()); + + //判断是否有报工数量 + if(bgMasterLineDO != null){ + //已报工的情况下返回,不允许作废 + throw exception(TASK_REPORT_PARAMS_ERRORSZF); + }else{ + //没有报工的情况下执行作废 + PgMasterLineDO pgMasterLineDO = pgMasterLineMapper.selectById(createReqVO.getId()); + pgMasterLineDO.setDispatchStatus(3); + int a = pgMasterLineMapper.updateById(pgMasterLineDO); + // 返回 + return a; + } + + } @Override @Transactional(rollbackFor = Exception.class) public Integer createPgMaster(PgMasterSaveReqVO createReqVO) { diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/zjbgmasterline/ZjBgMasterLineService.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/zjbgmasterline/ZjBgMasterLineService.java index fad7989..32e58db 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/zjbgmasterline/ZjBgMasterLineService.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/zjbgmasterline/ZjBgMasterLineService.java @@ -1,55 +1,57 @@ -package com.chanko.yunxi.mes.module.heli.service.zjbgmasterline; - -import java.util.*; -import javax.validation.*; -import com.chanko.yunxi.mes.module.heli.controller.admin.zjbgmasterline.vo.*; -import com.chanko.yunxi.mes.module.heli.dal.dataobject.zjbgmasterline.ZjBgMasterLineDO; -import com.chanko.yunxi.mes.framework.common.pojo.PageResult; -import com.chanko.yunxi.mes.framework.common.pojo.PageParam; - -/** - * 终检报工 Service 接口 - * - * @author 管理员 - */ -public interface ZjBgMasterLineService { - - /** - * 创建终检报工 - * - * @param createReqVO 创建信息 - * @return 编号 - */ - Integer createZjBgMasterLine(@Valid ZjBgMasterLineSaveReqVO createReqVO); - - /** - * 更新终检报工 - * - * @param updateReqVO 更新信息 - */ - void updateZjBgMasterLine(@Valid ZjBgMasterLineSaveReqVO updateReqVO); - - /** - * 删除终检报工 - * - * @param id 编号 - */ - void deleteZjBgMasterLine(Integer id); - - /** - * 获得终检报工 - * - * @param id 编号 - * @return 终检报工 - */ - ZjBgMasterLineDO getZjBgMasterLine(Integer id); - - /** - * 获得终检报工分页 - * - * @param pageReqVO 分页查询 - * @return 终检报工分页 - */ - PageResult getZjBgMasterLinePage(ZjBgMasterLinePageReqVO pageReqVO); - -} \ No newline at end of file +package com.chanko.yunxi.mes.module.heli.service.zjbgmasterline; + +import java.util.*; +import javax.validation.*; +import com.chanko.yunxi.mes.module.heli.controller.admin.zjbgmasterline.vo.*; +import com.chanko.yunxi.mes.module.heli.dal.dataobject.zjbgmasterline.ZjBgMasterLineDO; +import com.chanko.yunxi.mes.framework.common.pojo.PageResult; +import com.chanko.yunxi.mes.framework.common.pojo.PageParam; + +/** + * 终检报工 Service 接口 + * + * @author 管理员 + */ +public interface ZjBgMasterLineService { + + + + /** + * 创建终检报工 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + Integer createZjBgMasterLine(@Valid ZjBgMasterLineSaveReqVO createReqVO); + + /** + * 更新终检报工 + * + * @param updateReqVO 更新信息 + */ + void updateZjBgMasterLine(@Valid ZjBgMasterLineSaveReqVO updateReqVO); + + /** + * 删除终检报工 + * + * @param id 编号 + */ + void deleteZjBgMasterLine(Integer id); + + /** + * 获得终检报工 + * + * @param id 编号 + * @return 终检报工 + */ + ZjBgMasterLineDO getZjBgMasterLine(Integer id); + + /** + * 获得终检报工分页 + * + * @param pageReqVO 分页查询 + * @return 终检报工分页 + */ + PageResult getZjBgMasterLinePage(ZjBgMasterLinePageReqVO pageReqVO); + +} diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/zjbgmasterline/ZjBgMasterLineServiceImpl.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/zjbgmasterline/ZjBgMasterLineServiceImpl.java index bb11444..ebfcf60 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/zjbgmasterline/ZjBgMasterLineServiceImpl.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/zjbgmasterline/ZjBgMasterLineServiceImpl.java @@ -43,6 +43,8 @@ public class ZjBgMasterLineServiceImpl implements ZjBgMasterLineService { private ZjPgMasterLineMapper zjPgMasterLineMapper; + + @Override public Integer createZjBgMasterLine(ZjBgMasterLineSaveReqVO createReqVO) { diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/zjpgmaster/ZjPgMasterService.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/zjpgmaster/ZjPgMasterService.java index 29ef413..dafab8d 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/zjpgmaster/ZjPgMasterService.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/zjpgmaster/ZjPgMasterService.java @@ -19,6 +19,13 @@ import com.chanko.yunxi.mes.framework.common.pojo.PageParam; */ public interface ZjPgMasterService { + /** + * 作废 + * + * @param createReqVO 作废 + * @return 编号 + */ + Integer zfZjPgMaster(@Valid ZjPgMasterSaveReqVO createReqVO); /** * 创建质量终检派工单主 * diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/zjpgmaster/ZjPgMasterServiceImpl.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/zjpgmaster/ZjPgMasterServiceImpl.java index d5b200c..89b6e39 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/zjpgmaster/ZjPgMasterServiceImpl.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/zjpgmaster/ZjPgMasterServiceImpl.java @@ -6,8 +6,10 @@ import com.chanko.yunxi.mes.module.heli.dal.dataobject.pgmaster.PgMasterLineDO; import com.chanko.yunxi.mes.module.heli.dal.dataobject.plan.PlanDO; import com.chanko.yunxi.mes.module.heli.dal.dataobject.processbom.ProcessBomDO; import com.chanko.yunxi.mes.module.heli.dal.dataobject.serialnumber.SerialNumberDO; +import com.chanko.yunxi.mes.module.heli.dal.dataobject.zjbgmasterline.ZjBgMasterLineDO; import com.chanko.yunxi.mes.module.heli.dal.mysql.mouldtype.MouldTypeMapper; import com.chanko.yunxi.mes.module.heli.dal.mysql.plan.PlanMapper; +import com.chanko.yunxi.mes.module.heli.dal.mysql.zjbgmasterline.ZjBgMasterLineMapper; import com.chanko.yunxi.mes.module.heli.enums.TaskDispatchTypeEnum; import com.chanko.yunxi.mes.module.heli.service.serialnumber.SerialNumberService; import org.springframework.stereotype.Service; @@ -39,6 +41,9 @@ import static com.chanko.yunxi.mes.module.heli.enums.ErrorCodeConstants.*; @Validated public class ZjPgMasterServiceImpl implements ZjPgMasterService { + @Resource + private ZjBgMasterLineMapper zjBgMasterLineMapper; + @Resource private ZjPgMasterMapper zjPgMasterMapper; @Resource @@ -93,6 +98,29 @@ public class ZjPgMasterServiceImpl implements ZjPgMasterService { return zjPgMasterLineDOList; } + + @Override + public Integer zfZjPgMaster(ZjPgMasterSaveReqVO createReqVO) { + //作废先判断是否已经报工 + ZjBgMasterLineDO zjBgMasterLineDOS = zjBgMasterLineMapper.selectSum(createReqVO.getId()); + + //判断是否有报工数量 + if(zjBgMasterLineDOS != null){ + //已报工的情况下返回,不允许作废 + throw exception(TASK_REPORT_PARAMS_ERRORSZF); + }else{ + //没有报工的情况下执行作废 + ZjPgMasterLineDO zjPgMasterLineDO = zjPgMasterLineMapper.selectById(createReqVO.getId()); + zjPgMasterLineDO.setDispatchStatus(3); + int a = zjPgMasterLineMapper.updateById(zjPgMasterLineDO); + // 返回 + return a; + } + + + + } + @Override @Transactional(rollbackFor = Exception.class) public Integer createZjPgMaster(ZjPgMasterSaveReqVO createReqVO) { diff --git a/mes-ui/mini-app/src/pages.json b/mes-ui/mini-app/src/pages.json index 973428a..82f237f 100644 --- a/mes-ui/mini-app/src/pages.json +++ b/mes-ui/mini-app/src/pages.json @@ -78,6 +78,18 @@ "navigationBarTitleText": "报工详情" } }, + { + "path": "pages/pgMaster/pgMaster", + "style": { + "navigationBarTitleText": "过程检报工" + } + }, + { + "path": "pages/pgMaster/pgMaster-detail", + "style": { + "navigationBarTitleText": "报工详情" + } + }, { "path": "pages/my/my", diff --git a/mes-ui/mini-app/src/pages/index/index.vue b/mes-ui/mini-app/src/pages/index/index.vue index 48fb23f..c4c029a 100644 --- a/mes-ui/mini-app/src/pages/index/index.vue +++ b/mes-ui/mini-app/src/pages/index/index.vue @@ -51,7 +51,7 @@ const categoryList = ref([ imgUrl: "/static/images/zhongjian.png", defaultImgUrl: "/static/images/assembleReport-default.png" }, -]) +]) const loginStore = useLoginStore() const isLogin = computed(() => { const accessToken = loginStore.userInfo?.accessToken diff --git a/mes-ui/mini-app/src/pages/pgMaster/components/dataItem.vue b/mes-ui/mini-app/src/pages/pgMaster/components/dataItem.vue new file mode 100644 index 0000000..f426745 --- /dev/null +++ b/mes-ui/mini-app/src/pages/pgMaster/components/dataItem.vue @@ -0,0 +1,448 @@ + + + +import type { stringify } from 'querystring'; diff --git a/mes-ui/mini-app/src/pages/pgMaster/pgMaster-detail.vue b/mes-ui/mini-app/src/pages/pgMaster/pgMaster-detail.vue new file mode 100644 index 0000000..af59849 --- /dev/null +++ b/mes-ui/mini-app/src/pages/pgMaster/pgMaster-detail.vue @@ -0,0 +1,570 @@ + + + diff --git a/mes-ui/mini-app/src/pages/pgMaster/pgMaster.vue b/mes-ui/mini-app/src/pages/pgMaster/pgMaster.vue new file mode 100644 index 0000000..b645b52 --- /dev/null +++ b/mes-ui/mini-app/src/pages/pgMaster/pgMaster.vue @@ -0,0 +1,151 @@ + + + + + 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 0ffebb1..f50f8ad 100644 --- a/mes-ui/mini-app/src/pages/zjPgMaster/components/dataItem.vue +++ b/mes-ui/mini-app/src/pages/zjPgMaster/components/dataItem.vue @@ -1,7 +1,7 @@