diff --git a/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/controller/admin/headno/HeadNoController.java b/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/controller/admin/headno/HeadNoController.java new file mode 100644 index 0000000..a839028 --- /dev/null +++ b/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/controller/admin/headno/HeadNoController.java @@ -0,0 +1,98 @@ +package com.ningxia.yunxi.chemmes.module.biz.controller.admin.headno; + +import com.ningxia.yunxi.chemmes.module.biz.controller.admin.headno.vo.HeadNoPageReqVO; +import com.ningxia.yunxi.chemmes.module.biz.controller.admin.headno.vo.HeadNoRespVO; +import com.ningxia.yunxi.chemmes.module.biz.controller.admin.headno.vo.HeadNoSaveReqVO; +import com.ningxia.yunxi.chemmes.module.biz.dal.dataobject.headno.HeadNoDO; +import com.ningxia.yunxi.chemmes.module.biz.service.headno.HeadNoService; +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.ningxia.yunxi.chemmes.framework.common.pojo.PageParam; +import com.ningxia.yunxi.chemmes.framework.common.pojo.PageResult; +import com.ningxia.yunxi.chemmes.framework.common.pojo.CommonResult; +import com.ningxia.yunxi.chemmes.framework.common.util.object.BeanUtils; +import static com.ningxia.yunxi.chemmes.framework.common.pojo.CommonResult.success; + +import com.ningxia.yunxi.chemmes.framework.excel.core.util.ExcelUtils; + +import com.ningxia.yunxi.chemmes.framework.operatelog.core.annotations.OperateLog; +import static com.ningxia.yunxi.chemmes.framework.operatelog.core.enums.OperateTypeEnum.*; + + + +@Tag(name = "管理后台 - 工序抬头单") +@RestController +@RequestMapping("/tpo/head-no") +@Validated +public class HeadNoController { + + @Resource + private HeadNoService headNoService; + + @PostMapping("/create") + @Operation(summary = "创建工序抬头单") + @PreAuthorize("@ss.hasPermission('tpo:head-no:create')") + public CommonResult createHeadNo(@Valid @RequestBody HeadNoSaveReqVO createReqVO) { + return success(headNoService.createHeadNo(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新工序抬头单") + @PreAuthorize("@ss.hasPermission('tpo:head-no:update')") + public CommonResult updateHeadNo(@Valid @RequestBody HeadNoSaveReqVO updateReqVO) { + headNoService.updateHeadNo(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除工序抬头单") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('tpo:head-no:delete')") + public CommonResult deleteHeadNo(@RequestParam("id") Integer id) { + headNoService.deleteHeadNo(id); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得工序抬头单") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('tpo:head-no:query')") + public CommonResult getHeadNo(@RequestParam("id") Integer id) { + HeadNoDO headNo = headNoService.getHeadNo(id); + return success(BeanUtils.toBean(headNo, HeadNoRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得工序抬头单分页") + @PreAuthorize("@ss.hasPermission('tpo:head-no:query')") + public CommonResult> getHeadNoPage(@Valid HeadNoPageReqVO pageReqVO) { + PageResult pageResult = headNoService.getHeadNoPage(pageReqVO); + return success(BeanUtils.toBean(pageResult, HeadNoRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出工序抬头单 Excel") + @PreAuthorize("@ss.hasPermission('tpo:head-no:export')") + @OperateLog(type = EXPORT) + public void exportHeadNoExcel(@Valid HeadNoPageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = headNoService.getHeadNoPage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "工序抬头单.xls", "数据", HeadNoRespVO.class, + BeanUtils.toBean(list, HeadNoRespVO.class)); + } + +} diff --git a/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/controller/admin/headno/vo/HeadNoPageReqVO.java b/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/controller/admin/headno/vo/HeadNoPageReqVO.java new file mode 100644 index 0000000..566d88d --- /dev/null +++ b/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/controller/admin/headno/vo/HeadNoPageReqVO.java @@ -0,0 +1,67 @@ +package com.ningxia.yunxi.chemmes.module.biz.controller.admin.headno.vo; + +import lombok.*; + +import java.time.LocalDate; +import java.util.*; +import io.swagger.v3.oas.annotations.media.Schema; +import com.ningxia.yunxi.chemmes.framework.common.pojo.PageParam; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; + +import static com.ningxia.yunxi.chemmes.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@Schema(description = "管理后台 - 工序抬头单分页 Request VO") +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +public class HeadNoPageReqVO extends PageParam { + + @Schema(description = "创建时间") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] createTime; + + @Schema(description = "抬头单号(H+年份+月份+ 日 +2位流水号)") + private String headNo; + + @Schema(description = "生产日期") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDate[] proDate; + + @Schema(description = "生产班组") + private String groupCd; + + @Schema(description = "生产班次") + private String shiftCd; + + @Schema(description = "生产计划id", example = "8302") + private Integer planId; + + @Schema(description = "生产计划号") + private String planNo; + + @Schema(description = "备注", example = "你猜") + private String remark; + + @Schema(description = "机台编码") + private String machineCd; + + @Schema(description = "机台名称", example = "芋艿") + private String machineName; + + @Schema(description = "机台id", example = "2201") + private Integer machineId; + + @Schema(description = "产线编码") + private String lineCd; + + @Schema(description = "产线名称", example = "李四") + private String lineName; + + @Schema(description = "产线id", example = "5923") + private Integer lineId; + + @Schema(description = "计划状态(2 执行中 3 已完成 4 暂停)", example = "2") + private String proStatus; + +} \ No newline at end of file diff --git a/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/controller/admin/headno/vo/HeadNoRespVO.java b/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/controller/admin/headno/vo/HeadNoRespVO.java new file mode 100644 index 0000000..3d1fb43 --- /dev/null +++ b/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/controller/admin/headno/vo/HeadNoRespVO.java @@ -0,0 +1,82 @@ +package com.ningxia.yunxi.chemmes.module.biz.controller.admin.headno.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; + +import java.time.LocalDate; +import java.util.*; +import java.util.*; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; +import com.alibaba.excel.annotation.*; + +@Schema(description = "管理后台 - 工序抬头单 Response VO") +@Data +@ExcelIgnoreUnannotated +public class HeadNoRespVO { + + @Schema(description = "自增字段", requiredMode = Schema.RequiredMode.REQUIRED, example = "6312") + @ExcelProperty("自增字段") + private Integer id; + + @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("创建时间") + private LocalDateTime createTime; + + @Schema(description = "抬头单号(H+年份+月份+ 日 +2位流水号)") + @ExcelProperty("抬头单号(H+年份+月份+ 日 +2位流水号)") + private String headNo; + + @Schema(description = "生产日期") + @ExcelProperty("生产日期") + private LocalDate proDate; + + @Schema(description = "生产班组") + @ExcelProperty("生产班组") + private String groupCd; + + @Schema(description = "生产班次") + @ExcelProperty("生产班次") + private String shiftCd; + + @Schema(description = "生产计划id", example = "8302") + @ExcelProperty("生产计划id") + private Integer planId; + + @Schema(description = "生产计划号") + @ExcelProperty("生产计划号") + private String planNo; + + @Schema(description = "备注", example = "你猜") + @ExcelProperty("备注") + private String remark; + + @Schema(description = "机台编码") + @ExcelProperty("机台编码") + private String machineCd; + + @Schema(description = "机台名称", example = "芋艿") + @ExcelProperty("机台名称") + private String machineName; + + @Schema(description = "机台id", example = "2201") + @ExcelProperty("机台id") + private Integer machineId; + + @Schema(description = "产线编码") + @ExcelProperty("产线编码") + private String lineCd; + + @Schema(description = "产线名称", example = "李四") + @ExcelProperty("产线名称") + private String lineName; + + @Schema(description = "产线id", example = "5923") + @ExcelProperty("产线id") + private Integer lineId; + + @Schema(description = "计划状态(2 执行中 3 已完成 4 暂停)", example = "2") + @ExcelProperty("计划状态(2 执行中 3 已完成 4 暂停)") + private String proStatus; + +} \ No newline at end of file diff --git a/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/controller/admin/headno/vo/HeadNoSaveReqVO.java b/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/controller/admin/headno/vo/HeadNoSaveReqVO.java new file mode 100644 index 0000000..ed20276 --- /dev/null +++ b/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/controller/admin/headno/vo/HeadNoSaveReqVO.java @@ -0,0 +1,60 @@ +package com.ningxia.yunxi.chemmes.module.biz.controller.admin.headno.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; + +import java.time.LocalDate; +import java.util.*; +import javax.validation.constraints.*; +import java.util.*; + +@Schema(description = "管理后台 - 工序抬头单新增/修改 Request VO") +@Data +public class HeadNoSaveReqVO { + + @Schema(description = "自增字段", requiredMode = Schema.RequiredMode.REQUIRED, example = "6312") + private Integer id; + + @Schema(description = "抬头单号(H+年份+月份+ 日 +2位流水号)") + private String headNo; + + @Schema(description = "生产日期") + private LocalDate proDate; + + @Schema(description = "生产班组") + private String groupCd; + + @Schema(description = "生产班次") + private String shiftCd; + + @Schema(description = "生产计划id", example = "8302") + private Integer planId; + + @Schema(description = "生产计划号") + private String planNo; + + @Schema(description = "备注", example = "你猜") + private String remark; + + @Schema(description = "机台编码") + private String machineCd; + + @Schema(description = "机台名称", example = "芋艿") + private String machineName; + + @Schema(description = "机台id", example = "2201") + private Integer machineId; + + @Schema(description = "产线编码") + private String lineCd; + + @Schema(description = "产线名称", example = "李四") + private String lineName; + + @Schema(description = "产线id", example = "5923") + private Integer lineId; + + @Schema(description = "计划状态(2 执行中 3 已完成 4 暂停)", example = "2") + private String proStatus; + +} diff --git a/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/controller/admin/inspplanitem/InspPlanItemController.java b/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/controller/admin/inspplanitem/InspPlanItemController.java index 14f1630..6e36ef3 100644 --- a/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/controller/admin/inspplanitem/InspPlanItemController.java +++ b/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/controller/admin/inspplanitem/InspPlanItemController.java @@ -104,8 +104,9 @@ public class InspPlanItemController { @GetMapping("/selectMaterialId") @Operation(summary = "获得检验项目") @Parameter(name = "id", description = "编号", required = true, example = "1024") - public CommonResult> selectMaterialId(@RequestParam("id") Integer id) { - return success(inspPlanItemService.selectMaterialId(id)); + @Parameter(name = "schemeType", description = "方案类型", required = true, example = "1") + public CommonResult> selectMaterialId(@RequestParam("id") Integer id, @RequestParam("schemeType") String schemeType) { + return success(inspPlanItemService.selectMaterialId(id, schemeType)); } } diff --git a/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/controller/admin/matout/MatOutController.java b/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/controller/admin/matout/MatOutController.java new file mode 100644 index 0000000..fa728bb --- /dev/null +++ b/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/controller/admin/matout/MatOutController.java @@ -0,0 +1,98 @@ +package com.ningxia.yunxi.chemmes.module.biz.controller.admin.matout; + +import com.ningxia.yunxi.chemmes.module.biz.controller.admin.matout.vo.MatOutPageReqVO; +import com.ningxia.yunxi.chemmes.module.biz.controller.admin.matout.vo.MatOutRespVO; +import com.ningxia.yunxi.chemmes.module.biz.controller.admin.matout.vo.MatOutSaveReqVO; +import com.ningxia.yunxi.chemmes.module.biz.dal.dataobject.matout.MatOutDO; +import com.ningxia.yunxi.chemmes.module.biz.service.matout.MatOutService; +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.ningxia.yunxi.chemmes.framework.common.pojo.PageParam; +import com.ningxia.yunxi.chemmes.framework.common.pojo.PageResult; +import com.ningxia.yunxi.chemmes.framework.common.pojo.CommonResult; +import com.ningxia.yunxi.chemmes.framework.common.util.object.BeanUtils; +import static com.ningxia.yunxi.chemmes.framework.common.pojo.CommonResult.success; + +import com.ningxia.yunxi.chemmes.framework.excel.core.util.ExcelUtils; + +import com.ningxia.yunxi.chemmes.framework.operatelog.core.annotations.OperateLog; +import static com.ningxia.yunxi.chemmes.framework.operatelog.core.enums.OperateTypeEnum.*; + + + +@Tag(name = "管理后台 - 产出主") +@RestController +@RequestMapping("/tpo/mat-out") +@Validated +public class MatOutController { + + @Resource + private MatOutService matOutService; + + @PostMapping("/create") + @Operation(summary = "创建产出主") + @PreAuthorize("@ss.hasPermission('tpo:mat-out:create')") + public CommonResult createMatOut(@Valid @RequestBody MatOutSaveReqVO createReqVO) { + return success(matOutService.createMatOut(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新产出主") + @PreAuthorize("@ss.hasPermission('tpo:mat-out:update')") + public CommonResult updateMatOut(@Valid @RequestBody MatOutSaveReqVO updateReqVO) { + matOutService.updateMatOut(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除产出主") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('tpo:mat-out:delete')") + public CommonResult deleteMatOut(@RequestParam("id") Integer id) { + matOutService.deleteMatOut(id); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得产出主") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('tpo:mat-out:query')") + public CommonResult getMatOut(@RequestParam("id") Integer id) { + MatOutDO matOut = matOutService.getMatOut(id); + return success(BeanUtils.toBean(matOut, MatOutRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得产出主分页") + @PreAuthorize("@ss.hasPermission('tpo:mat-out:query')") + public CommonResult> getMatOutPage(@Valid MatOutPageReqVO pageReqVO) { + PageResult pageResult = matOutService.getMatOutPage(pageReqVO); + return success(BeanUtils.toBean(pageResult, MatOutRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出产出主 Excel") + @PreAuthorize("@ss.hasPermission('tpo:mat-out:export')") + @OperateLog(type = EXPORT) + public void exportMatOutExcel(@Valid MatOutPageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = matOutService.getMatOutPage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "产出主.xls", "数据", MatOutRespVO.class, + BeanUtils.toBean(list, MatOutRespVO.class)); + } + +} diff --git a/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/controller/admin/matout/vo/MatOutPageReqVO.java b/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/controller/admin/matout/vo/MatOutPageReqVO.java new file mode 100644 index 0000000..9d7f4fc --- /dev/null +++ b/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/controller/admin/matout/vo/MatOutPageReqVO.java @@ -0,0 +1,49 @@ +package com.ningxia.yunxi.chemmes.module.biz.controller.admin.matout.vo; + +import lombok.*; +import java.util.*; +import io.swagger.v3.oas.annotations.media.Schema; +import com.ningxia.yunxi.chemmes.framework.common.pojo.PageParam; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; + +import static com.ningxia.yunxi.chemmes.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@Schema(description = "管理后台 - 产出主分页 Request VO") +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +public class MatOutPageReqVO extends PageParam { + + @Schema(description = "创建时间") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] createTime; + + @Schema(description = "产出单号(O+年份+月份+ 日 +2位流水号)") + private String outNo; + + @Schema(description = "生产计划id", example = "10045") + private Integer planId; + + @Schema(description = "生产计划号") + private String planNo; + + @Schema(description = "入库id", example = "7307") + private Integer whInId; + + @Schema(description = "备注", example = "随便") + private String remark; + + @Schema(description = "产出人id", example = "19477") + private Integer outEmpId; + + @Schema(description = "产出人名称", example = "赵六") + private String outEmpName; + + @Schema(description = "抬头单号") + private String headNo; + + @Schema(description = "抬头单id", example = "3863") + private Integer headId; + +} \ No newline at end of file diff --git a/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/controller/admin/matout/vo/MatOutRespVO.java b/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/controller/admin/matout/vo/MatOutRespVO.java new file mode 100644 index 0000000..f01c984 --- /dev/null +++ b/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/controller/admin/matout/vo/MatOutRespVO.java @@ -0,0 +1,62 @@ +package com.ningxia.yunxi.chemmes.module.biz.controller.admin.matout.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import java.util.*; +import java.util.*; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; +import com.alibaba.excel.annotation.*; + +@Schema(description = "管理后台 - 产出主 Response VO") +@Data +@ExcelIgnoreUnannotated +public class MatOutRespVO { + + @Schema(description = "自增字段", requiredMode = Schema.RequiredMode.REQUIRED, example = "8054") + @ExcelProperty("自增字段") + private Integer id; + + @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("创建时间") + private LocalDateTime createTime; + + @Schema(description = "产出单号(O+年份+月份+ 日 +2位流水号)") + @ExcelProperty("产出单号(O+年份+月份+ 日 +2位流水号)") + private String outNo; + + @Schema(description = "生产计划id", example = "10045") + @ExcelProperty("生产计划id") + private Integer planId; + + @Schema(description = "生产计划号") + @ExcelProperty("生产计划号") + private String planNo; + + @Schema(description = "入库id", example = "7307") + @ExcelProperty("入库id") + private Integer whInId; + + @Schema(description = "备注", example = "随便") + @ExcelProperty("备注") + private String remark; + + @Schema(description = "产出人id", example = "19477") + @ExcelProperty("产出人id") + private Integer outEmpId; + + @Schema(description = "产出人名称", example = "赵六") + @ExcelProperty("产出人名称") + private String outEmpName; + + @Schema(description = "抬头单号") + @ExcelProperty("抬头单号") + private String headNo; + + @Schema(description = "抬头单id", example = "3863") + @ExcelProperty("抬头单id") + private Integer headId; + private LocalDateTime outDate; + + +} \ No newline at end of file diff --git a/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/controller/admin/matout/vo/MatOutSaveReqVO.java b/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/controller/admin/matout/vo/MatOutSaveReqVO.java new file mode 100644 index 0000000..c3abcb3 --- /dev/null +++ b/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/controller/admin/matout/vo/MatOutSaveReqVO.java @@ -0,0 +1,43 @@ +package com.ningxia.yunxi.chemmes.module.biz.controller.admin.matout.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import java.util.*; +import javax.validation.constraints.*; +import java.util.*; + +@Schema(description = "管理后台 - 产出主新增/修改 Request VO") +@Data +public class MatOutSaveReqVO { + + @Schema(description = "自增字段", requiredMode = Schema.RequiredMode.REQUIRED, example = "8054") + private Integer id; + + @Schema(description = "产出单号(O+年份+月份+ 日 +2位流水号)") + private String outNo; + + @Schema(description = "生产计划id", example = "10045") + private Integer planId; + + @Schema(description = "生产计划号") + private String planNo; + + @Schema(description = "入库id", example = "7307") + private Integer whInId; + + @Schema(description = "备注", example = "随便") + private String remark; + + @Schema(description = "产出人id", example = "19477") + private Integer outEmpId; + + @Schema(description = "产出人名称", example = "赵六") + private String outEmpName; + + @Schema(description = "抬头单号") + private String headNo; + + @Schema(description = "抬头单id", example = "3863") + private Integer headId; + +} diff --git a/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/controller/admin/matoutdetail/MatOutDetailController.java b/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/controller/admin/matoutdetail/MatOutDetailController.java new file mode 100644 index 0000000..6f3ba05 --- /dev/null +++ b/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/controller/admin/matoutdetail/MatOutDetailController.java @@ -0,0 +1,98 @@ +package com.ningxia.yunxi.chemmes.module.biz.controller.admin.matoutdetail; + +import com.ningxia.yunxi.chemmes.module.biz.controller.admin.matoutdetail.vo.MatOutDetailPageReqVO; +import com.ningxia.yunxi.chemmes.module.biz.controller.admin.matoutdetail.vo.MatOutDetailRespVO; +import com.ningxia.yunxi.chemmes.module.biz.controller.admin.matoutdetail.vo.MatOutDetailSaveReqVO; +import com.ningxia.yunxi.chemmes.module.biz.dal.dataobject.matoutdetail.MatOutDetailDO; +import com.ningxia.yunxi.chemmes.module.biz.service.matoutdetail.MatOutDetailService; +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.ningxia.yunxi.chemmes.framework.common.pojo.PageParam; +import com.ningxia.yunxi.chemmes.framework.common.pojo.PageResult; +import com.ningxia.yunxi.chemmes.framework.common.pojo.CommonResult; +import com.ningxia.yunxi.chemmes.framework.common.util.object.BeanUtils; +import static com.ningxia.yunxi.chemmes.framework.common.pojo.CommonResult.success; + +import com.ningxia.yunxi.chemmes.framework.excel.core.util.ExcelUtils; + +import com.ningxia.yunxi.chemmes.framework.operatelog.core.annotations.OperateLog; +import static com.ningxia.yunxi.chemmes.framework.operatelog.core.enums.OperateTypeEnum.*; + + + +@Tag(name = "管理后台 - 工序产出子") +@RestController +@RequestMapping("/tpo/mat-out-detail") +@Validated +public class MatOutDetailController { + + @Resource + private MatOutDetailService matOutDetailService; + + @PostMapping("/create") + @Operation(summary = "创建工序产出子") + @PreAuthorize("@ss.hasPermission('tpo:mat-out-detail:create')") + public CommonResult createMatOutDetail(@Valid @RequestBody MatOutDetailSaveReqVO createReqVO) { + return success(matOutDetailService.createMatOutDetail(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新工序产出子") + @PreAuthorize("@ss.hasPermission('tpo:mat-out-detail:update')") + public CommonResult updateMatOutDetail(@Valid @RequestBody MatOutDetailSaveReqVO updateReqVO) { + matOutDetailService.updateMatOutDetail(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除工序产出子") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('tpo:mat-out-detail:delete')") + public CommonResult deleteMatOutDetail(@RequestParam("id") Integer id) { + matOutDetailService.deleteMatOutDetail(id); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得工序产出子") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('tpo:mat-out-detail:query')") + public CommonResult getMatOutDetail(@RequestParam("id") Integer id) { + MatOutDetailDO matOutDetail = matOutDetailService.getMatOutDetail(id); + return success(BeanUtils.toBean(matOutDetail, MatOutDetailRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得工序产出子分页") + @PreAuthorize("@ss.hasPermission('tpo:mat-out-detail:query')") + public CommonResult> getMatOutDetailPage(@Valid MatOutDetailPageReqVO pageReqVO) { + PageResult pageResult = matOutDetailService.getMatOutDetailPage(pageReqVO); + return success(BeanUtils.toBean(pageResult, MatOutDetailRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出工序产出子 Excel") + @PreAuthorize("@ss.hasPermission('tpo:mat-out-detail:export')") + @OperateLog(type = EXPORT) + public void exportMatOutDetailExcel(@Valid MatOutDetailPageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = matOutDetailService.getMatOutDetailPage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "工序产出子.xls", "数据", MatOutDetailRespVO.class, + BeanUtils.toBean(list, MatOutDetailRespVO.class)); + } + +} diff --git a/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/controller/admin/matoutdetail/vo/MatOutDetailPageReqVO.java b/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/controller/admin/matoutdetail/vo/MatOutDetailPageReqVO.java new file mode 100644 index 0000000..453c565 --- /dev/null +++ b/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/controller/admin/matoutdetail/vo/MatOutDetailPageReqVO.java @@ -0,0 +1,95 @@ +package com.ningxia.yunxi.chemmes.module.biz.controller.admin.matoutdetail.vo; + +import lombok.*; + +import java.time.LocalDate; +import java.util.*; +import io.swagger.v3.oas.annotations.media.Schema; +import com.ningxia.yunxi.chemmes.framework.common.pojo.PageParam; +import java.math.BigDecimal; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; + +import static com.ningxia.yunxi.chemmes.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY; +import static com.ningxia.yunxi.chemmes.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@Schema(description = "管理后台 - 工序产出子分页 Request VO") +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +public class MatOutDetailPageReqVO extends PageParam { + + @Schema(description = "创建时间") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] createTime; + + @Schema(description = "产出单号") + private String outNo; + + @Schema(description = "备注", example = "你猜") + private String remark; + + @Schema(description = "产出主表id", example = "16062") + private Integer outId; + + @Schema(description = "物料id", example = "31382") + private Integer materialId; + + @Schema(description = "物料编码") + private String materialCode; + + @Schema(description = "物料名称", example = "芋艿") + private String materialName; + + @Schema(description = "规格型号") + private String spec; + + @Schema(description = "单位") + private String unit; + + @Schema(description = "产出数量") + private BigDecimal outQty; + + @Schema(description = "入库子表id", example = "10874") + private Integer whInDetailId; + + @Schema(description = "物料批次号") + private String lotNo; + + @Schema(description = "判定结果(1 合格 2 不合格)") + private String judgResult; + + @Schema(description = "物料类型(1 原材料 2 半成品 3 成品 4 联产品 )", example = "2") + private String matType; + + @Schema(description = "是否需要检验(0-是 1 否)") + private String isInsp; + + @Schema(description = "检验状态(0-未检验 1已检验)", example = "2") + private String inspStatus; + + @Schema(description = "采集数量") + private BigDecimal atoQty; + + @Schema(description = "仓储id", example = "8377") + private Integer storeHouseId; + + @Schema(description = "库区id", example = "4590") + private Integer storeAreaId; + + @Schema(description = "仓储编码") + private String storeHouseCd; + + @Schema(description = "仓储名称", example = "王五") + private String storeHouseName; + + @Schema(description = "库区编码") + private String storeAreCd; + + @Schema(description = "库区名称", example = "王五") + private String storeAreaName; + @Schema(description = "检验日期") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY) + private LocalDate[] outDate; + +} \ No newline at end of file diff --git a/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/controller/admin/matoutdetail/vo/MatOutDetailRespVO.java b/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/controller/admin/matoutdetail/vo/MatOutDetailRespVO.java new file mode 100644 index 0000000..f256e31 --- /dev/null +++ b/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/controller/admin/matoutdetail/vo/MatOutDetailRespVO.java @@ -0,0 +1,119 @@ +package com.ningxia.yunxi.chemmes.module.biz.controller.admin.matoutdetail.vo; + +import com.baomidou.mybatisplus.annotation.TableField; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import java.util.*; +import java.util.*; +import java.math.BigDecimal; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; +import com.alibaba.excel.annotation.*; + +@Schema(description = "管理后台 - 工序产出子 Response VO") +@Data +@ExcelIgnoreUnannotated +public class MatOutDetailRespVO { + + @Schema(description = "自增字段", requiredMode = Schema.RequiredMode.REQUIRED, example = "31581") + @ExcelProperty("自增字段") + private Integer id; + + @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("创建时间") + private LocalDateTime createTime; + + @Schema(description = "产出单号") + @ExcelProperty("产出单号") + private String outNo; + + @Schema(description = "备注", example = "你猜") + @ExcelProperty("备注") + private String remark; + + @Schema(description = "产出主表id", example = "16062") + @ExcelProperty("产出主表id") + private Integer outId; + + @Schema(description = "物料id", example = "31382") + @ExcelProperty("物料id") + private Integer materialId; + + @Schema(description = "物料编码") + @ExcelProperty("物料编码") + private String materialCode; + + @Schema(description = "物料名称", example = "芋艿") + @ExcelProperty("物料名称") + private String materialName; + + @Schema(description = "规格型号") + @ExcelProperty("规格型号") + private String spec; + + @Schema(description = "单位") + @ExcelProperty("单位") + private String unit; + + @Schema(description = "产出数量") + @ExcelProperty("产出数量") + private BigDecimal outQty; + + @Schema(description = "入库子表id", example = "10874") + @ExcelProperty("入库子表id") + private Integer whInDetailId; + + @Schema(description = "物料批次号") + @ExcelProperty("物料批次号") + private String lotNo; + + @Schema(description = "判定结果(1 合格 2 不合格)") + @ExcelProperty("判定结果(1 合格 2 不合格)") + private String judgResult; + + @Schema(description = "物料类型(1 原材料 2 半成品 3 成品 4 联产品 )", example = "2") + @ExcelProperty("物料类型(1 原材料 2 半成品 3 成品 4 联产品 )") + private String matType; + + @Schema(description = "是否需要检验(0-是 1 否)") + @ExcelProperty("是否需要检验(0-是 1 否)") + private String isInsp; + + @Schema(description = "检验状态(0-未检验 1已检验)", example = "2") + @ExcelProperty("检验状态(0-未检验 1已检验)") + private String inspStatus; + + @Schema(description = "采集数量") + @ExcelProperty("采集数量") + private BigDecimal atoQty; + + @Schema(description = "仓储id", example = "8377") + @ExcelProperty("仓储id") + private Integer storeHouseId; + + @Schema(description = "库区id", example = "4590") + @ExcelProperty("库区id") + private Integer storeAreaId; + + @Schema(description = "仓储编码") + @ExcelProperty("仓储编码") + private String storeHouseCd; + + @Schema(description = "仓储名称", example = "王五") + @ExcelProperty("仓储名称") + private String storeHouseName; + + @Schema(description = "库区编码") + @ExcelProperty("库区编码") + private String storeAreCd; + + @Schema(description = "库区名称", example = "王五") + @ExcelProperty("库区名称") + private String storeAreaName; + private Integer planId; + private String planNo; + private LocalDateTime outDate; + private String shiftCd; + private String machineName; + +} \ No newline at end of file diff --git a/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/controller/admin/matoutdetail/vo/MatOutDetailSaveReqVO.java b/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/controller/admin/matoutdetail/vo/MatOutDetailSaveReqVO.java new file mode 100644 index 0000000..32fdde7 --- /dev/null +++ b/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/controller/admin/matoutdetail/vo/MatOutDetailSaveReqVO.java @@ -0,0 +1,83 @@ +package com.ningxia.yunxi.chemmes.module.biz.controller.admin.matoutdetail.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import java.util.*; +import javax.validation.constraints.*; +import java.util.*; +import java.math.BigDecimal; + +@Schema(description = "管理后台 - 工序产出子新增/修改 Request VO") +@Data +public class MatOutDetailSaveReqVO { + + @Schema(description = "自增字段", requiredMode = Schema.RequiredMode.REQUIRED, example = "31581") + private Integer id; + + @Schema(description = "产出单号") + private String outNo; + + @Schema(description = "备注", example = "你猜") + private String remark; + + @Schema(description = "产出主表id", example = "16062") + private Integer outId; + + @Schema(description = "物料id", example = "31382") + private Integer materialId; + + @Schema(description = "物料编码") + private String materialCode; + + @Schema(description = "物料名称", example = "芋艿") + private String materialName; + + @Schema(description = "规格型号") + private String spec; + + @Schema(description = "单位") + private String unit; + + @Schema(description = "产出数量") + private BigDecimal outQty; + + @Schema(description = "入库子表id", example = "10874") + private Integer whInDetailId; + + @Schema(description = "物料批次号") + private String lotNo; + + @Schema(description = "判定结果(1 合格 2 不合格)") + private String judgResult; + + @Schema(description = "物料类型(1 原材料 2 半成品 3 成品 4 联产品 )", example = "2") + private String matType; + + @Schema(description = "是否需要检验(0-是 1 否)") + private String isInsp; + + @Schema(description = "检验状态(0-未检验 1已检验)", example = "2") + private String inspStatus; + + @Schema(description = "采集数量") + private BigDecimal atoQty; + + @Schema(description = "仓储id", example = "8377") + private Integer storeHouseId; + + @Schema(description = "库区id", example = "4590") + private Integer storeAreaId; + + @Schema(description = "仓储编码") + private String storeHouseCd; + + @Schema(description = "仓储名称", example = "王五") + private String storeHouseName; + + @Schema(description = "库区编码") + private String storeAreCd; + + @Schema(description = "库区名称", example = "王五") + private String storeAreaName; + +} diff --git a/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/controller/admin/millparamact/MillParamActController.java b/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/controller/admin/millparamact/MillParamActController.java new file mode 100644 index 0000000..28af3b9 --- /dev/null +++ b/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/controller/admin/millparamact/MillParamActController.java @@ -0,0 +1,98 @@ +package com.ningxia.yunxi.chemmes.module.biz.controller.admin.millparamact; + +import com.ningxia.yunxi.chemmes.module.biz.controller.admin.millparamact.vo.MillParamActPageReqVO; +import com.ningxia.yunxi.chemmes.module.biz.controller.admin.millparamact.vo.MillParamActRespVO; +import com.ningxia.yunxi.chemmes.module.biz.controller.admin.millparamact.vo.MillParamActSaveReqVO; +import com.ningxia.yunxi.chemmes.module.biz.dal.dataobject.millparamact.MillParamActDO; +import com.ningxia.yunxi.chemmes.module.biz.service.millparamact.MillParamActService; +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.ningxia.yunxi.chemmes.framework.common.pojo.PageParam; +import com.ningxia.yunxi.chemmes.framework.common.pojo.PageResult; +import com.ningxia.yunxi.chemmes.framework.common.pojo.CommonResult; +import com.ningxia.yunxi.chemmes.framework.common.util.object.BeanUtils; +import static com.ningxia.yunxi.chemmes.framework.common.pojo.CommonResult.success; + +import com.ningxia.yunxi.chemmes.framework.excel.core.util.ExcelUtils; + +import com.ningxia.yunxi.chemmes.framework.operatelog.core.annotations.OperateLog; +import static com.ningxia.yunxi.chemmes.framework.operatelog.core.enums.OperateTypeEnum.*; + + + +@Tag(name = "管理后台 - 制粉工序参数实绩") +@RestController +@RequestMapping("/tpo/mill-param-act") +@Validated +public class MillParamActController { + + @Resource + private MillParamActService millParamActService; + + @PostMapping("/create") + @Operation(summary = "创建制粉工序参数实绩") + @PreAuthorize("@ss.hasPermission('tpo:mill-param-act:create')") + public CommonResult createMillParamAct(@Valid @RequestBody MillParamActSaveReqVO createReqVO) { + return success(millParamActService.createMillParamAct(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新制粉工序参数实绩") + @PreAuthorize("@ss.hasPermission('tpo:mill-param-act:update')") + public CommonResult updateMillParamAct(@Valid @RequestBody MillParamActSaveReqVO updateReqVO) { + millParamActService.updateMillParamAct(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除制粉工序参数实绩") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('tpo:mill-param-act:delete')") + public CommonResult deleteMillParamAct(@RequestParam("id") Integer id) { + millParamActService.deleteMillParamAct(id); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得制粉工序参数实绩") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('tpo:mill-param-act:query')") + public CommonResult getMillParamAct(@RequestParam("id") Integer id) { + MillParamActDO millParamAct = millParamActService.getMillParamAct(id); + return success(BeanUtils.toBean(millParamAct, MillParamActRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得制粉工序参数实绩分页") + @PreAuthorize("@ss.hasPermission('tpo:mill-param-act:query')") + public CommonResult> getMillParamActPage(@Valid MillParamActPageReqVO pageReqVO) { + PageResult pageResult = millParamActService.getMillParamActPage(pageReqVO); + return success(BeanUtils.toBean(pageResult, MillParamActRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出制粉工序参数实绩 Excel") + @PreAuthorize("@ss.hasPermission('tpo:mill-param-act:export')") + @OperateLog(type = EXPORT) + public void exportMillParamActExcel(@Valid MillParamActPageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = millParamActService.getMillParamActPage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "制粉工序参数实绩.xls", "数据", MillParamActRespVO.class, + BeanUtils.toBean(list, MillParamActRespVO.class)); + } + +} diff --git a/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/controller/admin/millparamact/vo/MillParamActPageReqVO.java b/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/controller/admin/millparamact/vo/MillParamActPageReqVO.java new file mode 100644 index 0000000..a7879d3 --- /dev/null +++ b/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/controller/admin/millparamact/vo/MillParamActPageReqVO.java @@ -0,0 +1,77 @@ +package com.ningxia.yunxi.chemmes.module.biz.controller.admin.millparamact.vo; + +import lombok.*; + +import java.time.LocalDate; +import java.util.*; +import io.swagger.v3.oas.annotations.media.Schema; +import com.ningxia.yunxi.chemmes.framework.common.pojo.PageParam; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; + +import static com.ningxia.yunxi.chemmes.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@Schema(description = "管理后台 - 制粉工序参数实绩分页 Request VO") +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +public class MillParamActPageReqVO extends PageParam { + + @Schema(description = "创建时间") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] createTime; + + @Schema(description = "备注", example = "你说的对") + private String remark; + + @Schema(description = "采集时间") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] collectTime; + + @Schema(description = "采集班次") + private String shiftCd; + + @Schema(description = "生产计划id", example = "6299") + private Integer planId; + + @Schema(description = "生产计划号") + private String planNo; + + @Schema(description = "工序id", example = "3190") + private Integer procCdId; + + @Schema(description = "工序编码") + private String procCd; + + @Schema(description = "工序名称", example = "赵六") + private String procName; + + @Schema(description = "机台id", example = "22303") + private Integer machineId; + + @Schema(description = "机台编码") + private String machineNo; + + @Schema(description = "磨机电流") + private String grndMacCurr; + + @Schema(description = "数据来源(1 自动采集 2 人工录入)") + private String dataSource; + + @Schema(description = "磨机速度") + private String grndMacSpeed; + + @Schema(description = "出粉温度") + private String outPowTemp; + + @Schema(description = "进风温度") + private String inAirTemp; + + @Schema(description = "磨机出口负压") + private String grndOutPress; + + @Schema(description = "采集日期") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDate[] collectDate; + +} \ No newline at end of file diff --git a/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/controller/admin/millparamact/vo/MillParamActRespVO.java b/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/controller/admin/millparamact/vo/MillParamActRespVO.java new file mode 100644 index 0000000..fbd4f80 --- /dev/null +++ b/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/controller/admin/millparamact/vo/MillParamActRespVO.java @@ -0,0 +1,92 @@ +package com.ningxia.yunxi.chemmes.module.biz.controller.admin.millparamact.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import java.util.*; +import java.util.*; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; +import com.alibaba.excel.annotation.*; + +@Schema(description = "管理后台 - 制粉工序参数实绩 Response VO") +@Data +@ExcelIgnoreUnannotated +public class MillParamActRespVO { + + @Schema(description = "自增字段", requiredMode = Schema.RequiredMode.REQUIRED, example = "7478") + @ExcelProperty("自增字段") + private Integer id; + + @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("创建时间") + private LocalDateTime createTime; + + @Schema(description = "备注", example = "你说的对") + @ExcelProperty("备注") + private String remark; + + @Schema(description = "采集时间") + @ExcelProperty("采集时间") + private LocalDateTime collectTime; + + @Schema(description = "采集班次") + @ExcelProperty("采集班次") + private String shiftCd; + + @Schema(description = "生产计划id", example = "6299") + @ExcelProperty("生产计划id") + private Integer planId; + + @Schema(description = "生产计划号") + @ExcelProperty("生产计划号") + private String planNo; + + @Schema(description = "工序id", example = "3190") + @ExcelProperty("工序id") + private Integer procCdId; + + @Schema(description = "工序编码") + @ExcelProperty("工序编码") + private String procCd; + + @Schema(description = "工序名称", example = "赵六") + @ExcelProperty("工序名称") + private String procName; + + @Schema(description = "机台id", example = "22303") + @ExcelProperty("机台id") + private Integer machineId; + + @Schema(description = "机台编码") + @ExcelProperty("机台编码") + private String machineNo; + + @Schema(description = "磨机电流") + @ExcelProperty("磨机电流") + private String grndMacCurr; + + @Schema(description = "数据来源(1 自动采集 2 人工录入)") + @ExcelProperty("数据来源(1 自动采集 2 人工录入)") + private String dataSource; + + @Schema(description = "磨机速度") + @ExcelProperty("磨机速度") + private String grndMacSpeed; + + @Schema(description = "出粉温度") + @ExcelProperty("出粉温度") + private String outPowTemp; + + @Schema(description = "进风温度") + @ExcelProperty("进风温度") + private String inAirTemp; + + @Schema(description = "磨机出口负压") + @ExcelProperty("磨机出口负压") + private String grndOutPress; + + @Schema(description = "采集日期") + @ExcelProperty("采集日期") + private LocalDate collectDate; + +} \ No newline at end of file diff --git a/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/controller/admin/millparamact/vo/MillParamActSaveReqVO.java b/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/controller/admin/millparamact/vo/MillParamActSaveReqVO.java new file mode 100644 index 0000000..aeeac4d --- /dev/null +++ b/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/controller/admin/millparamact/vo/MillParamActSaveReqVO.java @@ -0,0 +1,69 @@ +package com.ningxia.yunxi.chemmes.module.biz.controller.admin.millparamact.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import java.util.*; +import javax.validation.constraints.*; +import java.util.*; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; + +@Schema(description = "管理后台 - 制粉工序参数实绩新增/修改 Request VO") +@Data +public class MillParamActSaveReqVO { + + @Schema(description = "自增字段", requiredMode = Schema.RequiredMode.REQUIRED, example = "7478") + private Integer id; + + @Schema(description = "备注", example = "你说的对") + private String remark; + + @Schema(description = "采集时间") + private LocalDateTime collectTime; + + @Schema(description = "采集班次") + private String shiftCd; + + @Schema(description = "生产计划id", example = "6299") + private Integer planId; + + @Schema(description = "生产计划号") + private String planNo; + + @Schema(description = "工序id", example = "3190") + private Integer procCdId; + + @Schema(description = "工序编码") + private String procCd; + + @Schema(description = "工序名称", example = "赵六") + private String procName; + + @Schema(description = "机台id", example = "22303") + private Integer machineId; + + @Schema(description = "机台编码") + private String machineNo; + + @Schema(description = "磨机电流") + private String grndMacCurr; + + @Schema(description = "数据来源(1 自动采集 2 人工录入)") + private String dataSource; + + @Schema(description = "磨机速度") + private String grndMacSpeed; + + @Schema(description = "出粉温度") + private String outPowTemp; + + @Schema(description = "进风温度") + private String inAirTemp; + + @Schema(description = "磨机出口负压") + private String grndOutPress; + + @Schema(description = "采集日期") + private LocalDate collectDate; + +} diff --git a/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/controller/admin/proctioninspdetail/ProctionInspDetailController.java b/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/controller/admin/proctioninspdetail/ProctionInspDetailController.java new file mode 100644 index 0000000..2cd036e --- /dev/null +++ b/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/controller/admin/proctioninspdetail/ProctionInspDetailController.java @@ -0,0 +1,98 @@ +package com.ningxia.yunxi.chemmes.module.biz.controller.admin.proctioninspdetail; + +import com.ningxia.yunxi.chemmes.module.biz.controller.admin.proctioninspdetail.vo.ProctionInspDetailPageReqVO; +import com.ningxia.yunxi.chemmes.module.biz.controller.admin.proctioninspdetail.vo.ProctionInspDetailRespVO; +import com.ningxia.yunxi.chemmes.module.biz.controller.admin.proctioninspdetail.vo.ProctionInspDetailSaveReqVO; +import com.ningxia.yunxi.chemmes.module.biz.dal.dataobject.proctioninspdetail.ProctionInspDetailDO; +import com.ningxia.yunxi.chemmes.module.biz.service.proctioninspdetail.ProctionInspDetailService; +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.ningxia.yunxi.chemmes.framework.common.pojo.PageParam; +import com.ningxia.yunxi.chemmes.framework.common.pojo.PageResult; +import com.ningxia.yunxi.chemmes.framework.common.pojo.CommonResult; +import com.ningxia.yunxi.chemmes.framework.common.util.object.BeanUtils; +import static com.ningxia.yunxi.chemmes.framework.common.pojo.CommonResult.success; + +import com.ningxia.yunxi.chemmes.framework.excel.core.util.ExcelUtils; + +import com.ningxia.yunxi.chemmes.framework.operatelog.core.annotations.OperateLog; +import static com.ningxia.yunxi.chemmes.framework.operatelog.core.enums.OperateTypeEnum.*; + + + +@Tag(name = "管理后台 - 产品料检验值明细") +@RestController +@RequestMapping("/tqm/proction-insp-detail") +@Validated +public class ProctionInspDetailController { + + @Resource + private ProctionInspDetailService proctionInspDetailService; + + @PostMapping("/create") + @Operation(summary = "创建产品料检验值明细") + @PreAuthorize("@ss.hasPermission('tqm:proction-insp-detail:create')") + public CommonResult createProctionInspDetail(@Valid @RequestBody ProctionInspDetailSaveReqVO createReqVO) { + return success(proctionInspDetailService.createProctionInspDetail(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新产品料检验值明细") + @PreAuthorize("@ss.hasPermission('tqm:proction-insp-detail:update')") + public CommonResult updateProctionInspDetail(@Valid @RequestBody ProctionInspDetailSaveReqVO updateReqVO) { + proctionInspDetailService.updateProctionInspDetail(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除产品料检验值明细") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('tqm:proction-insp-detail:delete')") + public CommonResult deleteProctionInspDetail(@RequestParam("id") Integer id) { + proctionInspDetailService.deleteProctionInspDetail(id); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得产品料检验值明细") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('tqm:proction-insp-detail:query')") + public CommonResult getProctionInspDetail(@RequestParam("id") Integer id) { + ProctionInspDetailDO proctionInspDetail = proctionInspDetailService.getProctionInspDetail(id); + return success(BeanUtils.toBean(proctionInspDetail, ProctionInspDetailRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得产品料检验值明细分页") + @PreAuthorize("@ss.hasPermission('tqm:proction-insp-detail:query')") + public CommonResult> getProctionInspDetailPage(@Valid ProctionInspDetailPageReqVO pageReqVO) { + PageResult pageResult = proctionInspDetailService.getProctionInspDetailPage(pageReqVO); + return success(BeanUtils.toBean(pageResult, ProctionInspDetailRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出产品料检验值明细 Excel") + @PreAuthorize("@ss.hasPermission('tqm:proction-insp-detail:export')") + @OperateLog(type = EXPORT) + public void exportProctionInspDetailExcel(@Valid ProctionInspDetailPageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = proctionInspDetailService.getProctionInspDetailPage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "产品料检验值明细.xls", "数据", ProctionInspDetailRespVO.class, + BeanUtils.toBean(list, ProctionInspDetailRespVO.class)); + } + +} diff --git a/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/controller/admin/proctioninspdetail/vo/ProctionInspDetailPageReqVO.java b/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/controller/admin/proctioninspdetail/vo/ProctionInspDetailPageReqVO.java new file mode 100644 index 0000000..077e327 --- /dev/null +++ b/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/controller/admin/proctioninspdetail/vo/ProctionInspDetailPageReqVO.java @@ -0,0 +1,48 @@ +package com.ningxia.yunxi.chemmes.module.biz.controller.admin.proctioninspdetail.vo; + +import lombok.*; +import java.util.*; +import io.swagger.v3.oas.annotations.media.Schema; +import com.ningxia.yunxi.chemmes.framework.common.pojo.PageParam; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; + +import static com.ningxia.yunxi.chemmes.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@Schema(description = "管理后台 - 产品料检验值明细分页 Request VO") +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +public class ProctionInspDetailPageReqVO extends PageParam { + + @Schema(description = "检测值") + private String actValue; + + @Schema(description = "备注", example = "随便") + private String remark; + + @Schema(description = "创建时间") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] createTime; + + @Schema(description = "质检方案id", example = "19535") + private Integer inspPlanId; + + @Schema(description = "质检方案明细id", example = "24580") + private Integer inspPlanItemId; + + @Schema(description = "主表id", example = "18343") + private Integer proctionInspId; + + @Schema(description = "界面展示顺序") + private Integer seqNo; + + @Schema(description = "检验编码") + private String checkCode; + + @Schema(description = "成品检验值汇总表id", example = "26147") + private Integer inspTotalId; + + + +} \ No newline at end of file diff --git a/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/controller/admin/proctioninspdetail/vo/ProctionInspDetailRespVO.java b/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/controller/admin/proctioninspdetail/vo/ProctionInspDetailRespVO.java new file mode 100644 index 0000000..6fa955c --- /dev/null +++ b/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/controller/admin/proctioninspdetail/vo/ProctionInspDetailRespVO.java @@ -0,0 +1,58 @@ +package com.ningxia.yunxi.chemmes.module.biz.controller.admin.proctioninspdetail.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import java.util.*; +import java.util.*; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; +import com.alibaba.excel.annotation.*; + +@Schema(description = "管理后台 - 产品料检验值明细 Response VO") +@Data +@ExcelIgnoreUnannotated +public class ProctionInspDetailRespVO { + + @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "8908") + @ExcelProperty("主键") + private Integer id; + + @Schema(description = "检测值") + @ExcelProperty("检测值") + private String actValue; + + @Schema(description = "备注", example = "随便") + @ExcelProperty("备注") + private String remark; + + @Schema(description = "创建时间") + @ExcelProperty("创建时间") + private LocalDateTime createTime; + + @Schema(description = "质检方案id", example = "19535") + @ExcelProperty("质检方案id") + private Integer inspPlanId; + + @Schema(description = "质检方案明细id", example = "24580") + @ExcelProperty("质检方案明细id") + private Integer inspPlanItemId; + + @Schema(description = "主表id", example = "18343") + @ExcelProperty("主表id") + private Integer proctionInspId; + + @Schema(description = "界面展示顺序") + @ExcelProperty("界面展示顺序") + private Integer seqNo; + + @Schema(description = "检验编码") + @ExcelProperty("检验编码") + private String checkCode; + + @Schema(description = "成品检验值汇总表id", requiredMode = Schema.RequiredMode.REQUIRED, example = "26147") + @ExcelProperty("成品检验值汇总表id") + private Integer inspTotalId; + + + +} \ No newline at end of file diff --git a/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/controller/admin/proctioninspdetail/vo/ProctionInspDetailSaveReqVO.java b/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/controller/admin/proctioninspdetail/vo/ProctionInspDetailSaveReqVO.java new file mode 100644 index 0000000..006e12c --- /dev/null +++ b/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/controller/admin/proctioninspdetail/vo/ProctionInspDetailSaveReqVO.java @@ -0,0 +1,44 @@ +package com.ningxia.yunxi.chemmes.module.biz.controller.admin.proctioninspdetail.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import java.util.*; +import javax.validation.constraints.*; +import java.util.*; + +@Schema(description = "管理后台 - 产品料检验值明细新增/修改 Request VO") +@Data +public class ProctionInspDetailSaveReqVO { + + @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "8908") + private Integer id; + + @Schema(description = "检测值") + private String actValue; + + @Schema(description = "备注", example = "随便") + private String remark; + + @Schema(description = "质检方案id", example = "19535") + private Integer inspPlanId; + + @Schema(description = "质检方案明细id", example = "24580") + private Integer inspPlanItemId; + + @Schema(description = "主表id", example = "18343") + private Integer proctionInspId; + + @Schema(description = "界面展示顺序") + private Integer seqNo; + + @Schema(description = "检验编码") + private String checkCode; + + @Schema(description = "成品检验值汇总表id", requiredMode = Schema.RequiredMode.REQUIRED, example = "26147") + @NotNull(message = "成品检验值汇总表id不能为空") + private Integer inspTotalId; + + @Schema(description = "流程id", example = "22124") + private String fFlowId; + +} diff --git a/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/controller/admin/proctioninsptotal/ProctionInspTotalController.java b/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/controller/admin/proctioninsptotal/ProctionInspTotalController.java new file mode 100644 index 0000000..8396a82 --- /dev/null +++ b/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/controller/admin/proctioninsptotal/ProctionInspTotalController.java @@ -0,0 +1,98 @@ +package com.ningxia.yunxi.chemmes.module.biz.controller.admin.proctioninsptotal; + +import com.ningxia.yunxi.chemmes.module.biz.controller.admin.proctioninsptotal.vo.ProctionInspTotalPageReqVO; +import com.ningxia.yunxi.chemmes.module.biz.controller.admin.proctioninsptotal.vo.ProctionInspTotalRespVO; +import com.ningxia.yunxi.chemmes.module.biz.controller.admin.proctioninsptotal.vo.ProctionInspTotalSaveReqVO; +import com.ningxia.yunxi.chemmes.module.biz.dal.dataobject.proctioninsptotal.ProctionInspTotalDO; +import com.ningxia.yunxi.chemmes.module.biz.service.proctioninsptotal.ProctionInspTotalService; +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.ningxia.yunxi.chemmes.framework.common.pojo.PageParam; +import com.ningxia.yunxi.chemmes.framework.common.pojo.PageResult; +import com.ningxia.yunxi.chemmes.framework.common.pojo.CommonResult; +import com.ningxia.yunxi.chemmes.framework.common.util.object.BeanUtils; +import static com.ningxia.yunxi.chemmes.framework.common.pojo.CommonResult.success; + +import com.ningxia.yunxi.chemmes.framework.excel.core.util.ExcelUtils; + +import com.ningxia.yunxi.chemmes.framework.operatelog.core.annotations.OperateLog; +import static com.ningxia.yunxi.chemmes.framework.operatelog.core.enums.OperateTypeEnum.*; + + + +@Tag(name = "管理后台 - 产品检验值汇总") +@RestController +@RequestMapping("/tqm/proction-insp-total") +@Validated +public class ProctionInspTotalController { + + @Resource + private ProctionInspTotalService proctionInspTotalService; + + @PostMapping("/create") + @Operation(summary = "创建产品检验值汇总") + @PreAuthorize("@ss.hasPermission('tqm:proction-insp-total:create')") + public CommonResult createProctionInspTotal(@Valid @RequestBody ProctionInspTotalSaveReqVO createReqVO) { + return success(proctionInspTotalService.createProctionInspTotal(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新产品检验值汇总") + @PreAuthorize("@ss.hasPermission('tqm:proction-insp-total:update')") + public CommonResult updateProctionInspTotal(@Valid @RequestBody ProctionInspTotalSaveReqVO updateReqVO) { + proctionInspTotalService.updateProctionInspTotal(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除产品检验值汇总") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('tqm:proction-insp-total:delete')") + public CommonResult deleteProctionInspTotal(@RequestParam("id") Integer id) { + proctionInspTotalService.deleteProctionInspTotal(id); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得产品检验值汇总") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('tqm:proction-insp-total:query')") + public CommonResult getProctionInspTotal(@RequestParam("id") Integer id) { + ProctionInspTotalDO proctionInspTotal = proctionInspTotalService.getProctionInspTotal(id); + return success(BeanUtils.toBean(proctionInspTotal, ProctionInspTotalRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得产品检验值汇总分页") + @PreAuthorize("@ss.hasPermission('tqm:proction-insp-total:query')") + public CommonResult> getProctionInspTotalPage(@Valid ProctionInspTotalPageReqVO pageReqVO) { + PageResult pageResult = proctionInspTotalService.getProctionInspTotalPage(pageReqVO); + return success(BeanUtils.toBean(pageResult, ProctionInspTotalRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出产品检验值汇总 Excel") + @PreAuthorize("@ss.hasPermission('tqm:proction-insp-total:export')") + @OperateLog(type = EXPORT) + public void exportProctionInspTotalExcel(@Valid ProctionInspTotalPageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = proctionInspTotalService.getProctionInspTotalPage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "产品检验值汇总.xls", "数据", ProctionInspTotalRespVO.class, + BeanUtils.toBean(list, ProctionInspTotalRespVO.class)); + } + +} diff --git a/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/controller/admin/proctioninsptotal/vo/ProctionInspTotalPageReqVO.java b/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/controller/admin/proctioninsptotal/vo/ProctionInspTotalPageReqVO.java new file mode 100644 index 0000000..5041668 --- /dev/null +++ b/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/controller/admin/proctioninsptotal/vo/ProctionInspTotalPageReqVO.java @@ -0,0 +1,67 @@ +package com.ningxia.yunxi.chemmes.module.biz.controller.admin.proctioninsptotal.vo; + +import lombok.*; +import java.util.*; +import io.swagger.v3.oas.annotations.media.Schema; +import com.ningxia.yunxi.chemmes.framework.common.pojo.PageParam; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; + +import static com.ningxia.yunxi.chemmes.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@Schema(description = "管理后台 - 产品检验值汇总分页 Request VO") +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +public class ProctionInspTotalPageReqVO extends PageParam { + + @Schema(description = "平均值") + private String actValue; + + @Schema(description = "备注", example = "随便") + private String remark; + + @Schema(description = "创建时间") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] createTime; + + @Schema(description = "质检方案id", example = "28139") + private Integer inspPlanId; + + @Schema(description = "质检方案明细id", example = "13406") + private Integer inspPlanItemId; + + @Schema(description = "主表id", example = "8955") + private String proctionInspId; + + @Schema(description = "界面展示顺序") + private Integer seqNo; + + @Schema(description = "检验编码") + private String checkCode; + + @Schema(description = "判定结果,0表示合格,1表示不合格") + private String checkResult; + + @Schema(description = "检验项目id", example = "20233") + private Integer itemId; + + @Schema(description = "检验项名称", example = "李四") + private String itemName; + + @Schema(description = "标准值") + private String standardValue; + + @Schema(description = "上限值") + private String upperLimit; + + @Schema(description = "下限值") + private String lowerLimit; + + @Schema(description = "检验方法") + private String checkMethod; + + @Schema(description = "标准值类型(1、不变 2、区间 3大于等于 4、小于等于)") + private String printItem; + +} \ No newline at end of file diff --git a/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/controller/admin/proctioninsptotal/vo/ProctionInspTotalRespVO.java b/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/controller/admin/proctioninsptotal/vo/ProctionInspTotalRespVO.java new file mode 100644 index 0000000..ed1efb3 --- /dev/null +++ b/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/controller/admin/proctioninsptotal/vo/ProctionInspTotalRespVO.java @@ -0,0 +1,84 @@ +package com.ningxia.yunxi.chemmes.module.biz.controller.admin.proctioninsptotal.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import java.util.*; +import java.util.*; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; +import com.alibaba.excel.annotation.*; + +@Schema(description = "管理后台 - 产品检验值汇总 Response VO") +@Data +@ExcelIgnoreUnannotated +public class ProctionInspTotalRespVO { + + @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "14835") + @ExcelProperty("主键") + private Integer id; + + @Schema(description = "平均值") + @ExcelProperty("平均值") + private String actValue; + + @Schema(description = "备注", example = "随便") + @ExcelProperty("备注") + private String remark; + + @Schema(description = "创建时间") + @ExcelProperty("创建时间") + private LocalDateTime createTime; + + @Schema(description = "质检方案id", example = "28139") + @ExcelProperty("质检方案id") + private Integer inspPlanId; + + @Schema(description = "质检方案明细id", example = "13406") + @ExcelProperty("质检方案明细id") + private Integer inspPlanItemId; + + @Schema(description = "主表id", example = "8955") + @ExcelProperty("主表id") + private String proctionInspId; + + @Schema(description = "界面展示顺序") + @ExcelProperty("界面展示顺序") + private Integer seqNo; + + @Schema(description = "检验编码") + @ExcelProperty("检验编码") + private String checkCode; + + @Schema(description = "判定结果,0表示合格,1表示不合格") + @ExcelProperty("判定结果,0表示合格,1表示不合格") + private String checkResult; + + @Schema(description = "检验项目id", example = "20233") + @ExcelProperty("检验项目id") + private Integer itemId; + + @Schema(description = "检验项名称", example = "李四") + @ExcelProperty("检验项名称") + private String itemName; + + @Schema(description = "标准值") + @ExcelProperty("标准值") + private String standardValue; + + @Schema(description = "上限值") + @ExcelProperty("上限值") + private String upperLimit; + + @Schema(description = "下限值") + @ExcelProperty("下限值") + private String lowerLimit; + + @Schema(description = "检验方法") + @ExcelProperty("检验方法") + private String checkMethod; + + @Schema(description = "标准值类型(1、不变 2、区间 3大于等于 4、小于等于)") + @ExcelProperty("标准值类型(1、不变 2、区间 3大于等于 4、小于等于)") + private String printItem; + +} \ No newline at end of file diff --git a/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/controller/admin/proctioninsptotal/vo/ProctionInspTotalSaveReqVO.java b/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/controller/admin/proctioninsptotal/vo/ProctionInspTotalSaveReqVO.java new file mode 100644 index 0000000..8fe529c --- /dev/null +++ b/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/controller/admin/proctioninsptotal/vo/ProctionInspTotalSaveReqVO.java @@ -0,0 +1,61 @@ +package com.ningxia.yunxi.chemmes.module.biz.controller.admin.proctioninsptotal.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import java.util.*; +import javax.validation.constraints.*; +import java.util.*; + +@Schema(description = "管理后台 - 产品检验值汇总新增/修改 Request VO") +@Data +public class ProctionInspTotalSaveReqVO { + + @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "14835") + private Integer id; + + @Schema(description = "平均值") + private String actValue; + + @Schema(description = "备注", example = "随便") + private String remark; + + @Schema(description = "质检方案id", example = "28139") + private Integer inspPlanId; + + @Schema(description = "质检方案明细id", example = "13406") + private Integer inspPlanItemId; + + @Schema(description = "主表id", example = "8955") + private String proctionInspId; + + @Schema(description = "界面展示顺序") + private Integer seqNo; + + @Schema(description = "检验编码") + private String checkCode; + + @Schema(description = "判定结果,0表示合格,1表示不合格") + private String checkResult; + + @Schema(description = "检验项目id", example = "20233") + private Integer itemId; + + @Schema(description = "检验项名称", example = "李四") + private String itemName; + + @Schema(description = "标准值") + private String standardValue; + + @Schema(description = "上限值") + private String upperLimit; + + @Schema(description = "下限值") + private String lowerLimit; + + @Schema(description = "检验方法") + private String checkMethod; + + @Schema(description = "标准值类型(1、不变 2、区间 3大于等于 4、小于等于)") + private String printItem; + +} diff --git a/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/controller/admin/productioninsp/ProductionInspController.java b/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/controller/admin/productioninsp/ProductionInspController.java new file mode 100644 index 0000000..0e49eb3 --- /dev/null +++ b/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/controller/admin/productioninsp/ProductionInspController.java @@ -0,0 +1,98 @@ +package com.ningxia.yunxi.chemmes.module.biz.controller.admin.productioninsp; + +import com.ningxia.yunxi.chemmes.module.biz.controller.admin.productioninsp.vo.ProductionInspPageReqVO; +import com.ningxia.yunxi.chemmes.module.biz.controller.admin.productioninsp.vo.ProductionInspRespVO; +import com.ningxia.yunxi.chemmes.module.biz.controller.admin.productioninsp.vo.ProductionInspSaveReqVO; +import com.ningxia.yunxi.chemmes.module.biz.dal.dataobject.productioninsp.ProductionInspDO; +import com.ningxia.yunxi.chemmes.module.biz.service.productioninsp.ProductionInspService; +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.ningxia.yunxi.chemmes.framework.common.pojo.PageParam; +import com.ningxia.yunxi.chemmes.framework.common.pojo.PageResult; +import com.ningxia.yunxi.chemmes.framework.common.pojo.CommonResult; +import com.ningxia.yunxi.chemmes.framework.common.util.object.BeanUtils; +import static com.ningxia.yunxi.chemmes.framework.common.pojo.CommonResult.success; + +import com.ningxia.yunxi.chemmes.framework.excel.core.util.ExcelUtils; + +import com.ningxia.yunxi.chemmes.framework.operatelog.core.annotations.OperateLog; +import static com.ningxia.yunxi.chemmes.framework.operatelog.core.enums.OperateTypeEnum.*; + + + +@Tag(name = "管理后台 - 产品检验主") +@RestController +@RequestMapping("/tqm/production-insp") +@Validated +public class ProductionInspController { + + @Resource + private ProductionInspService productionInspService; + + @PostMapping("/create") + @Operation(summary = "创建产品检验主") + @PreAuthorize("@ss.hasPermission('tqm:production-insp:create')") + public CommonResult createProductionInsp(@Valid @RequestBody ProductionInspSaveReqVO createReqVO) { + return success(productionInspService.createProductionInsp(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新产品检验主") + @PreAuthorize("@ss.hasPermission('tqm:production-insp:update')") + public CommonResult updateProductionInsp(@Valid @RequestBody ProductionInspSaveReqVO updateReqVO) { + productionInspService.updateProductionInsp(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除产品检验主") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('tqm:production-insp:delete')") + public CommonResult deleteProductionInsp(@RequestParam("id") String id) { + productionInspService.deleteProductionInsp(id); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得产品检验主") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('tqm:production-insp:query')") + public CommonResult getProductionInsp(@RequestParam("id") String id) { + ProductionInspDO productionInsp = productionInspService.getProductionInsp(id); + return success(BeanUtils.toBean(productionInsp, ProductionInspRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得产品检验主分页") + @PreAuthorize("@ss.hasPermission('tqm:production-insp:query')") + public CommonResult> getProductionInspPage(@Valid ProductionInspPageReqVO pageReqVO) { + PageResult pageResult = productionInspService.getProductionInspPage(pageReqVO); + return success(BeanUtils.toBean(pageResult, ProductionInspRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出产品检验主 Excel") + @PreAuthorize("@ss.hasPermission('tqm:production-insp:export')") + @OperateLog(type = EXPORT) + public void exportProductionInspExcel(@Valid ProductionInspPageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = productionInspService.getProductionInspPage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "产品检验主.xls", "数据", ProductionInspRespVO.class, + BeanUtils.toBean(list, ProductionInspRespVO.class)); + } + +} diff --git a/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/controller/admin/productioninsp/vo/ProductionInspPageReqVO.java b/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/controller/admin/productioninsp/vo/ProductionInspPageReqVO.java new file mode 100644 index 0000000..4f89fe0 --- /dev/null +++ b/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/controller/admin/productioninsp/vo/ProductionInspPageReqVO.java @@ -0,0 +1,100 @@ +package com.ningxia.yunxi.chemmes.module.biz.controller.admin.productioninsp.vo; + +import lombok.*; + +import java.time.LocalDate; +import java.util.*; +import io.swagger.v3.oas.annotations.media.Schema; +import com.ningxia.yunxi.chemmes.framework.common.pojo.PageParam; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; + +import static com.ningxia.yunxi.chemmes.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY; +import static com.ningxia.yunxi.chemmes.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@Schema(description = "管理后台 - 产品检验主分页 Request VO") +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +public class ProductionInspPageReqVO extends PageParam { + + @Schema(description = "检验单号,CP+年月日+两位流水号") + private String checkCode; + + @Schema(description = "计划id", example = "14853") + private Integer planId; + + @Schema(description = "生产计划号") + private String proNo; + + @Schema(description = "产品id", example = "18345") + private Integer materialId; + + @Schema(description = "产品编码") + private String matCode; + + @Schema(description = "产品名称", example = "张三") + private String matName; + + @Schema(description = "规格型号") + private String spec; + + @Schema(description = "批次号") + private String lotNo; + + @Schema(description = "生产日期") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDate[] outDate; + + @Schema(description = "检验日期") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY) + private LocalDate[] checkDate; + + @Schema(description = "检验结果(0 合格 1 不合格 2让步接收)") + private String checkResult; + + @Schema(description = "备注", example = "随便") + private String remark; + + @Schema(description = "创建时间") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] createTime; + + @Schema(description = "表单编号") + private String formCode; + + @Schema(description = "质检方案id", example = "17121") + private String qaSchemeBaseId; + + @Schema(description = "检验值数量") + private Integer testNum; + + @Schema(description = "检验人员id", example = "5837") + private Integer checkUserId; + + @Schema(description = "审核人员id", example = "5536") + private Integer checkExUserId; + + @Schema(description = "审核日期") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDate[] checkExDate; + + @Schema(description = "单据状态( 0-已创建 1-已确认 2- 已审核 3-已驳回 )", example = "1") + private String checkStatus; + + @Schema(description = "审核原因", example = "随便") + private String checkRemark; + + @Schema(description = "检验人员名称", example = "王五") + private String checkUserName; + + @Schema(description = "审核人员名称", example = "王五") + private String checkExUserName; + + @Schema(description = "产出单id", example = "5341") + private Integer outId; + + @Schema(description = "产出明细id", example = "24259") + private Integer outMatId; + +} \ No newline at end of file diff --git a/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/controller/admin/productioninsp/vo/ProductionInspRespVO.java b/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/controller/admin/productioninsp/vo/ProductionInspRespVO.java new file mode 100644 index 0000000..05d0e08 --- /dev/null +++ b/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/controller/admin/productioninsp/vo/ProductionInspRespVO.java @@ -0,0 +1,123 @@ +package com.ningxia.yunxi.chemmes.module.biz.controller.admin.productioninsp.vo; + +import com.ningxia.yunxi.chemmes.module.biz.dal.dataobject.proctioninsptotal.ProctionInspTotalDO; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; + +import java.time.LocalDate; +import java.util.*; +import java.util.*; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; +import com.alibaba.excel.annotation.*; + +@Schema(description = "管理后台 - 产品检验主 Response VO") +@Data +@ExcelIgnoreUnannotated +public class ProductionInspRespVO { + + @Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED, example = "1410") + @ExcelProperty("id") + private String id; + + @Schema(description = "检验单号,CP+年月日+两位流水号", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("检验单号,CP+年月日+两位流水号") + private String checkCode; + + @Schema(description = "计划id", example = "14853") + @ExcelProperty("计划id") + private Integer planId; + + @Schema(description = "生产计划号") + @ExcelProperty("生产计划号") + private String proNo; + + @Schema(description = "产品id", requiredMode = Schema.RequiredMode.REQUIRED, example = "18345") + @ExcelProperty("产品id") + private Integer materialId; + + @Schema(description = "产品编码") + @ExcelProperty("产品编码") + private String matCode; + + @Schema(description = "产品名称", example = "张三") + @ExcelProperty("产品名称") + private String matName; + + @Schema(description = "规格型号") + @ExcelProperty("规格型号") + private String spec; + + @Schema(description = "批次号") + @ExcelProperty("批次号") + private String lotNo; + + @Schema(description = "生产日期") + @ExcelProperty("生产日期") + private LocalDate outDate; + + @Schema(description = "检验日期", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("检验日期") + private LocalDate checkDate; + + @Schema(description = "检验结果(0 合格 1 不合格 2让步接收)") + @ExcelProperty("检验结果(0 合格 1 不合格 2让步接收)") + private String checkResult; + + @Schema(description = "备注", example = "随便") + @ExcelProperty("备注") + private String remark; + + @Schema(description = "创建时间") + @ExcelProperty("创建时间") + private LocalDateTime createTime; + + @Schema(description = "表单编号") + @ExcelProperty("表单编号") + private String formCode; + + @Schema(description = "质检方案id", example = "17121") + @ExcelProperty("质检方案id") + private String qaSchemeBaseId; + + @Schema(description = "检验值数量") + @ExcelProperty("检验值数量") + private Integer testNum; + + @Schema(description = "检验人员id", example = "5837") + @ExcelProperty("检验人员id") + private Integer checkUserId; + + @Schema(description = "审核人员id", example = "5536") + @ExcelProperty("审核人员id") + private Integer checkExUserId; + + @Schema(description = "审核日期") + @ExcelProperty("审核日期") + private LocalDate checkExDate; + + @Schema(description = "单据状态( 0-已创建 1-已确认 2- 已审核 3-已驳回 )", example = "1") + @ExcelProperty("单据状态( 0-已创建 1-已确认 2- 已审核 3-已驳回 )") + private String checkStatus; + + @Schema(description = "审核原因", example = "随便") + @ExcelProperty("审核原因") + private String checkRemark; + + @Schema(description = "检验人员名称", example = "王五") + @ExcelProperty("检验人员名称") + private String checkUserName; + + @Schema(description = "审核人员名称", example = "王五") + @ExcelProperty("审核人员名称") + private String checkExUserName; + + @Schema(description = "产出单id", example = "5341") + @ExcelProperty("产出单id") + private Integer outId; + + @Schema(description = "产出明细id", example = "24259") + @ExcelProperty("产出明细id") + private Integer outMatId; + private List proctionInspTotalList; +} \ No newline at end of file diff --git a/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/controller/admin/productioninsp/vo/ProductionInspSaveReqVO.java b/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/controller/admin/productioninsp/vo/ProductionInspSaveReqVO.java new file mode 100644 index 0000000..16f6c6f --- /dev/null +++ b/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/controller/admin/productioninsp/vo/ProductionInspSaveReqVO.java @@ -0,0 +1,94 @@ +package com.ningxia.yunxi.chemmes.module.biz.controller.admin.productioninsp.vo; + +import com.ningxia.yunxi.chemmes.module.biz.dal.dataobject.proctioninsptotal.ProctionInspTotalDO; +import com.ningxia.yunxi.chemmes.module.biz.dal.dataobject.rawmaterialinsptotal.RawMaterialInspTotalDO; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; + +import java.time.LocalDate; +import java.util.*; +import javax.validation.constraints.*; +import java.util.*; + +@Schema(description = "管理后台 - 产品检验主新增/修改 Request VO") +@Data +public class ProductionInspSaveReqVO { + + @Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED, example = "1410") + private String id; + + @Schema(description = "检验单号,CP+年月日+两位流水号", requiredMode = Schema.RequiredMode.REQUIRED) + private String checkCode; + + @Schema(description = "计划id", example = "14853") + private Integer planId; + + @Schema(description = "生产计划号") + private String proNo; + + @Schema(description = "产品id", requiredMode = Schema.RequiredMode.REQUIRED, example = "18345") + private Integer materialId; + + @Schema(description = "产品编码") + private String matCode; + + @Schema(description = "产品名称", example = "张三") + private String matName; + + @Schema(description = "规格型号") + private String spec; + + @Schema(description = "批次号") + private String lotNo; + + @Schema(description = "生产日期") + private LocalDate outDate; + + @Schema(description = "检验日期", requiredMode = Schema.RequiredMode.REQUIRED) + private LocalDate checkDate; + + @Schema(description = "检验结果(0 合格 1 不合格 2让步接收)") + private String checkResult; + + @Schema(description = "备注", example = "随便") + private String remark; + + @Schema(description = "表单编号") + private String formCode; + + @Schema(description = "质检方案id", example = "17121") + private String qaSchemeBaseId; + + @Schema(description = "检验值数量") + private Integer testNum; + + @Schema(description = "检验人员id", example = "5837") + private Integer checkUserId; + + @Schema(description = "审核人员id", example = "5536") + private Integer checkExUserId; + + @Schema(description = "审核日期") + private LocalDate checkExDate; + + @Schema(description = "单据状态( 0-已创建 1-已确认 2- 已审核 3-已驳回 )", example = "1") + private String checkStatus; + + @Schema(description = "审核原因", example = "随便") + private String checkRemark; + + @Schema(description = "检验人员名称", example = "王五") + private String checkUserName; + + @Schema(description = "审核人员名称", example = "王五") + private String checkExUserName; + + @Schema(description = "产出单id", example = "5341") + private Integer outId; + + @Schema(description = "产出明细id", example = "24259") + private Integer outMatId; + + private List proctionInspTotalList; + +} diff --git a/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/controller/admin/rawmaterialinsp/vo/RawMaterialInspSaveReqVO.java b/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/controller/admin/rawmaterialinsp/vo/RawMaterialInspSaveReqVO.java index 6b7d17c..1da62a7 100644 --- a/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/controller/admin/rawmaterialinsp/vo/RawMaterialInspSaveReqVO.java +++ b/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/controller/admin/rawmaterialinsp/vo/RawMaterialInspSaveReqVO.java @@ -100,6 +100,6 @@ public class RawMaterialInspSaveReqVO { @Schema(description = "采购订单号") private String purOrdNo; - @Schema(description = "采购订单号") + private List rawMaterialInspTotalList; } diff --git a/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/dal/dataobject/headno/HeadNoDO.java b/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/dal/dataobject/headno/HeadNoDO.java new file mode 100644 index 0000000..8742bc1 --- /dev/null +++ b/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/dal/dataobject/headno/HeadNoDO.java @@ -0,0 +1,89 @@ +package com.ningxia.yunxi.chemmes.module.biz.dal.dataobject.headno; + +import lombok.*; + +import java.time.LocalDate; +import java.util.*; +import java.time.LocalDateTime; +import java.time.LocalDateTime; +import com.baomidou.mybatisplus.annotation.*; +import com.ningxia.yunxi.chemmes.framework.mybatis.core.dataobject.BaseDO; + +/** + * 工序抬头单 DO + * + * @author 管理员 + */ +@TableName("tpo_head_no") +@KeySequence("tpo_head_no_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class HeadNoDO extends BaseDO { + + /** + * 自增字段 + */ + @TableId + private Integer id; + /** + * 抬头单号(H+年份+月份+ 日 +2位流水号) + */ + private String headNo; + /** + * 生产日期 + */ + private LocalDate proDate; + /** + * 生产班组 + */ + private String groupCd; + /** + * 生产班次 + */ + private String shiftCd; + /** + * 生产计划id + */ + private Integer planId; + /** + * 生产计划号 + */ + private String planNo; + /** + * 备注 + */ + private String remark; + /** + * 机台编码 + */ + private String machineCd; + /** + * 机台名称 + */ + private String machineName; + /** + * 机台id + */ + private Integer machineId; + /** + * 产线编码 + */ + private String lineCd; + /** + * 产线名称 + */ + private String lineName; + /** + * 产线id + */ + private Integer lineId; + /** + * 计划状态(2 执行中 3 已完成 4 暂停) + */ + private String proStatus; + +} \ No newline at end of file diff --git a/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/dal/dataobject/matout/MatOutDO.java b/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/dal/dataobject/matout/MatOutDO.java new file mode 100644 index 0000000..0f0c1a6 --- /dev/null +++ b/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/dal/dataobject/matout/MatOutDO.java @@ -0,0 +1,71 @@ +package com.ningxia.yunxi.chemmes.module.biz.dal.dataobject.matout; + +import lombok.*; +import java.util.*; +import java.time.LocalDateTime; +import java.time.LocalDateTime; +import com.baomidou.mybatisplus.annotation.*; +import com.ningxia.yunxi.chemmes.framework.mybatis.core.dataobject.BaseDO; + +/** + * 产出主 DO + * + * @author 管理员 + */ +@TableName("tpo_mat_out") +@KeySequence("tpo_mat_out_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class MatOutDO extends BaseDO { + + /** + * 自增字段 + */ + @TableId + private Integer id; + /** + * 产出单号(O+年份+月份+ 日 +2位流水号) + */ + private String outNo; + /** + * 生产计划id + */ + private Integer planId; + /** + * 生产计划号 + */ + private String planNo; + /** + * 入库id + */ + private Integer whInId; + /** + * 备注 + */ + private String remark; + /** + * 产出人id + */ + private Integer outEmpId; + /** + * 产出人名称 + */ + private String outEmpName; + /** + * 抬头单号 + */ + private String headNo; + /** + * 抬头单id + */ + private Integer headId; + /** + * 生产日期 + */ + private LocalDateTime outDate; + +} \ No newline at end of file diff --git a/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/dal/dataobject/matoutdetail/MatOutDetailDO.java b/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/dal/dataobject/matoutdetail/MatOutDetailDO.java new file mode 100644 index 0000000..21373d7 --- /dev/null +++ b/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/dal/dataobject/matoutdetail/MatOutDetailDO.java @@ -0,0 +1,130 @@ +package com.ningxia.yunxi.chemmes.module.biz.dal.dataobject.matoutdetail; + +import lombok.*; +import java.util.*; +import java.time.LocalDateTime; +import java.time.LocalDateTime; +import java.math.BigDecimal; +import java.math.BigDecimal; +import com.baomidou.mybatisplus.annotation.*; +import com.ningxia.yunxi.chemmes.framework.mybatis.core.dataobject.BaseDO; + +/** + * 工序产出子 DO + * + * @author 管理员 + */ +@TableName("tpo_mat_out_detail") +@KeySequence("tpo_mat_out_detail_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class MatOutDetailDO extends BaseDO { + + /** + * 自增字段 + */ + @TableId + private Integer id; + /** + * 产出单号 + */ + private String outNo; + /** + * 备注 + */ + private String remark; + /** + * 产出主表id + */ + private Integer outId; + /** + * 物料id + */ + private Integer materialId; + /** + * 物料编码 + */ + private String materialCode; + /** + * 物料名称 + */ + private String materialName; + /** + * 规格型号 + */ + private String spec; + /** + * 单位 + */ + private String unit; + /** + * 产出数量 + */ + private BigDecimal outQty; + /** + * 入库子表id + */ + private Integer whInDetailId; + /** + * 物料批次号 + */ + private String lotNo; + /** + * 判定结果(1 合格 2 不合格) + */ + private String judgResult; + /** + * 物料类型(1 原材料 2 半成品 3 成品 4 联产品 ) + */ + private String matType; + /** + * 是否需要检验(0-是 1 否) + */ + private String isInsp; + /** + * 检验状态(0-未检验 1已检验) + */ + private String inspStatus; + /** + * 采集数量 + */ + private BigDecimal atoQty; + /** + * 仓储id + */ + private Integer storeHouseId; + /** + * 库区id + */ + private Integer storeAreaId; + /** + * 仓储编码 + */ + private String storeHouseCd; + /** + * 仓储名称 + */ + private String storeHouseName; + /** + * 库区编码 + */ + private String storeAreCd; + /** + * 库区名称 + */ + private String storeAreaName; + @TableField(exist = false) + private Integer planId; + @TableField(exist = false) + private String planNo; + @TableField(exist = false) + private LocalDateTime outDate; + @TableField(exist = false) + private String shiftCd; + @TableField(exist = false) + private String machineName; +} \ No newline at end of file diff --git a/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/dal/dataobject/millparamact/MillParamActDO.java b/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/dal/dataobject/millparamact/MillParamActDO.java new file mode 100644 index 0000000..4de08f2 --- /dev/null +++ b/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/dal/dataobject/millparamact/MillParamActDO.java @@ -0,0 +1,102 @@ +package com.ningxia.yunxi.chemmes.module.biz.dal.dataobject.millparamact; + +import lombok.*; + +import java.time.LocalDate; +import java.util.*; +import java.time.LocalDateTime; +import java.time.LocalDateTime; +import java.time.LocalDateTime; +import com.baomidou.mybatisplus.annotation.*; +import com.ningxia.yunxi.chemmes.framework.mybatis.core.dataobject.BaseDO; + +/** + * 制粉工序参数实绩 DO + * + * @author 管理员 + */ +@TableName("tpo_mill_param_act") +@KeySequence("tpo_mill_param_act_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class MillParamActDO extends BaseDO { + + /** + * 自增字段 + */ + @TableId + private Integer id; + /** + * 备注 + */ + private String remark; + /** + * 采集时间 + */ + private LocalDateTime collectTime; + /** + * 采集班次 + */ + private String shiftCd; + /** + * 生产计划id + */ + private Integer planId; + /** + * 生产计划号 + */ + private String planNo; + /** + * 工序id + */ + private Integer procCdId; + /** + * 工序编码 + */ + private String procCd; + /** + * 工序名称 + */ + private String procName; + /** + * 机台id + */ + private Integer machineId; + /** + * 机台编码 + */ + private String machineNo; + /** + * 磨机电流 + */ + private String grndMacCurr; + /** + * 数据来源(1 自动采集 2 人工录入) + */ + private String dataSource; + /** + * 磨机速度 + */ + private String grndMacSpeed; + /** + * 出粉温度 + */ + private String outPowTemp; + /** + * 进风温度 + */ + private String inAirTemp; + /** + * 磨机出口负压 + */ + private String grndOutPress; + /** + * 采集日期 + */ + private LocalDate collectDate; + +} \ No newline at end of file diff --git a/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/dal/dataobject/proctioninspdetail/ProctionInspDetailDO.java b/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/dal/dataobject/proctioninspdetail/ProctionInspDetailDO.java new file mode 100644 index 0000000..7d59745 --- /dev/null +++ b/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/dal/dataobject/proctioninspdetail/ProctionInspDetailDO.java @@ -0,0 +1,65 @@ +package com.ningxia.yunxi.chemmes.module.biz.dal.dataobject.proctioninspdetail; + +import com.ningxia.yunxi.chemmes.framework.mybatis.core.dataobject.BaseDOWithoutLogic; +import lombok.*; +import java.util.*; +import java.time.LocalDateTime; +import java.time.LocalDateTime; +import com.baomidou.mybatisplus.annotation.*; +import com.ningxia.yunxi.chemmes.framework.mybatis.core.dataobject.BaseDO; + +/** + * 产品料检验值明细 DO + * + * @author 管理员 + */ +@TableName("tqm_proction_insp_detail") +@KeySequence("tqm_proction_insp_detail_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class ProctionInspDetailDO extends BaseDOWithoutLogic { + + /** + * 主键 + */ + @TableId + private Integer id; + /** + * 检测值 + */ + private String actValue; + /** + * 备注 + */ + private String remark; + /** + * 质检方案id + */ + private Integer inspPlanId; + /** + * 质检方案明细id + */ + private Integer inspPlanItemId; + /** + * 主表id + */ + private Integer proctionInspId; + /** + * 界面展示顺序 + */ + private Integer seqNo; + /** + * 检验编码 + */ + private String checkCode; + /** + * 成品检验值汇总表id + */ + private Integer inspTotalId; + + +} \ No newline at end of file diff --git a/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/dal/dataobject/proctioninsptotal/ProctionInspTotalDO.java b/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/dal/dataobject/proctioninsptotal/ProctionInspTotalDO.java new file mode 100644 index 0000000..cf1a949 --- /dev/null +++ b/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/dal/dataobject/proctioninsptotal/ProctionInspTotalDO.java @@ -0,0 +1,103 @@ +package com.ningxia.yunxi.chemmes.module.biz.dal.dataobject.proctioninsptotal; + +import com.ningxia.yunxi.chemmes.framework.mybatis.core.dataobject.BaseDOWithoutLogic; +import com.ningxia.yunxi.chemmes.module.biz.dal.dataobject.proctioninspdetail.ProctionInspDetailDO; +import lombok.*; +import java.util.*; +import java.time.LocalDateTime; +import java.time.LocalDateTime; +import com.baomidou.mybatisplus.annotation.*; +import com.ningxia.yunxi.chemmes.framework.mybatis.core.dataobject.BaseDO; + +/** + * 产品检验值汇总 DO + * + * @author 管理员 + */ +@TableName("tqm_proction_insp_total") +@KeySequence("tqm_proction_insp_total_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class ProctionInspTotalDO extends BaseDOWithoutLogic { + + /** + * 主键 + */ + @TableId + private Integer id; + /** + * 平均值 + */ + private String actValue; + /** + * 备注 + */ + private String remark; + /** + * 质检方案id + */ + private Integer inspPlanId; + /** + * 质检方案明细id + */ + private Integer inspPlanItemId; + /** + * 主表id + */ + private String proctionInspId; + /** + * 界面展示顺序 + */ + private Integer seqNo; + /** + * 检验编码 + */ + private String checkCode; + /** + * 判定结果,0表示合格,1表示不合格 + */ + private String checkResult; + /** + * 检验项目id + */ + private Integer itemId; + /** + * 检验项名称 + */ + private String itemName; + /** + * 标准值 + */ + private String standardValue; + /** + * 上限值 + */ + private String upperLimit; + /** + * 下限值 + */ + private String lowerLimit; + /** + * 检验方法 + */ + private String checkMethod; + /** + * 标准值类型(1、不变 2、区间 3大于等于 4、小于等于) + */ + private String printItem; + @TableField(exist = false) + private List proctionInspDetailList; + @TableField(exist = false) + private String itemValueType; + @TableField(exist = false) + private String itemContent; + @TableField(exist = false) + private Integer testNum; + @TableField(exist = false) + private Integer floatNum; + +} \ No newline at end of file diff --git a/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/dal/dataobject/productioninsp/ProductionInspDO.java b/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/dal/dataobject/productioninsp/ProductionInspDO.java new file mode 100644 index 0000000..07a044a --- /dev/null +++ b/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/dal/dataobject/productioninsp/ProductionInspDO.java @@ -0,0 +1,134 @@ +package com.ningxia.yunxi.chemmes.module.biz.dal.dataobject.productioninsp; + +import com.ningxia.yunxi.chemmes.framework.mybatis.core.dataobject.BaseDOWithoutLogic; +import com.ningxia.yunxi.chemmes.module.biz.dal.dataobject.proctioninsptotal.ProctionInspTotalDO; +import lombok.*; + +import java.time.LocalDate; +import java.util.*; +import java.time.LocalDateTime; +import java.time.LocalDateTime; +import com.baomidou.mybatisplus.annotation.*; +import com.ningxia.yunxi.chemmes.framework.mybatis.core.dataobject.BaseDO; + +/** + * 产品检验主 DO + * + * @author 管理员 + */ +@TableName("tqm_production_insp") +@KeySequence("tqm_production_insp_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class ProductionInspDO extends BaseDOWithoutLogic { + + /** + * id + */ + @TableId + private Integer id; + /** + * 检验单号,CP+年月日+两位流水号 + */ + private String checkCode; + /** + * 计划id + */ + private Integer planId; + /** + * 生产计划号 + */ + private String proNo; + /** + * 产品id + */ + private Integer materialId; + /** + * 产品编码 + */ + private String matCode; + /** + * 产品名称 + */ + private String matName; + /** + * 规格型号 + */ + private String spec; + /** + * 批次号 + */ + private String lotNo; + /** + * 生产日期 + */ + private LocalDate outDate; + /** + * 检验日期 + */ + private LocalDate checkDate; + /** + * 检验结果(0 合格 1 不合格 2让步接收) + */ + private String checkResult; + /** + * 备注 + */ + private String remark; + /** + * 表单编号 + */ + private String formCode; + /** + * 质检方案id + */ + private String qaSchemeBaseId; + /** + * 检验值数量 + */ + private Integer testNum; + /** + * 检验人员id + */ + private Integer checkUserId; + /** + * 审核人员id + */ + private Integer checkExUserId; + /** + * 审核日期 + */ + private LocalDate checkExDate; + /** + * 单据状态( 0-已创建 1-已确认 2- 已审核 3-已驳回 ) + */ + private String checkStatus; + /** + * 审核原因 + */ + private String checkRemark; + /** + * 检验人员名称 + */ + private String checkUserName; + /** + * 审核人员名称 + */ + private String checkExUserName; + /** + * 产出单id + */ + private Integer outId; + /** + * 产出明细id + */ + private Integer outMatId; + @TableField(exist = false) + private List proctionInspTotalList; + + +} \ No newline at end of file diff --git a/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/dal/mysql/headno/HeadNoMapper.java b/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/dal/mysql/headno/HeadNoMapper.java new file mode 100644 index 0000000..c84c178 --- /dev/null +++ b/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/dal/mysql/headno/HeadNoMapper.java @@ -0,0 +1,40 @@ +package com.ningxia.yunxi.chemmes.module.biz.dal.mysql.headno; + +import java.util.*; + +import com.ningxia.yunxi.chemmes.framework.common.pojo.PageResult; +import com.ningxia.yunxi.chemmes.framework.mybatis.core.query.LambdaQueryWrapperX; +import com.ningxia.yunxi.chemmes.framework.mybatis.core.mapper.BaseMapperX; +import com.ningxia.yunxi.chemmes.module.biz.controller.admin.headno.vo.HeadNoPageReqVO; +import com.ningxia.yunxi.chemmes.module.biz.dal.dataobject.headno.HeadNoDO; +import org.apache.ibatis.annotations.Mapper; + +/** + * 工序抬头单 Mapper + * + * @author 管理员 + */ +@Mapper +public interface HeadNoMapper extends BaseMapperX { + + default PageResult selectPage(HeadNoPageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .betweenIfPresent(HeadNoDO::getCreateTime, reqVO.getCreateTime()) + .eqIfPresent(HeadNoDO::getHeadNo, reqVO.getHeadNo()) + .betweenIfPresent(HeadNoDO::getProDate, reqVO.getProDate()) + .eqIfPresent(HeadNoDO::getGroupCd, reqVO.getGroupCd()) + .eqIfPresent(HeadNoDO::getShiftCd, reqVO.getShiftCd()) + .eqIfPresent(HeadNoDO::getPlanId, reqVO.getPlanId()) + .eqIfPresent(HeadNoDO::getPlanNo, reqVO.getPlanNo()) + .eqIfPresent(HeadNoDO::getRemark, reqVO.getRemark()) + .eqIfPresent(HeadNoDO::getMachineCd, reqVO.getMachineCd()) + .likeIfPresent(HeadNoDO::getMachineName, reqVO.getMachineName()) + .eqIfPresent(HeadNoDO::getMachineId, reqVO.getMachineId()) + .eqIfPresent(HeadNoDO::getLineCd, reqVO.getLineCd()) + .likeIfPresent(HeadNoDO::getLineName, reqVO.getLineName()) + .eqIfPresent(HeadNoDO::getLineId, reqVO.getLineId()) + .eqIfPresent(HeadNoDO::getProStatus, reqVO.getProStatus()) + .orderByDesc(HeadNoDO::getId)); + } + +} \ No newline at end of file diff --git a/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/dal/mysql/inspplanitem/InspPlanItemMapper.java b/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/dal/mysql/inspplanitem/InspPlanItemMapper.java index f23ace9..9a3b364 100644 --- a/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/dal/mysql/inspplanitem/InspPlanItemMapper.java +++ b/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/dal/mysql/inspplanitem/InspPlanItemMapper.java @@ -61,7 +61,7 @@ public interface InspPlanItemMapper extends BaseMapperX { .eq(InspPlanItemDO::getSchemeId, schemeId)); } - default List selectMaterialId(Integer id){ + default List selectMaterialId(Integer id, String schemeType){ MPJLambdaWrapperX query = new MPJLambdaWrapperX<>(); query.selectAll(InspPlanItemDO.class) .select("p.test_Num as tolNum") @@ -72,7 +72,7 @@ public interface InspPlanItemMapper extends BaseMapperX { .leftJoin(InspPlanDO.class,"p",InspPlanDO::getId,InspPlanItemDO::getSchemeId) .leftJoin(MaterialDO.class,"m",MaterialDO::getSchemeId,InspPlanDO::getId) .disableSubLogicDel().orderByAsc(InspPlanItemDO::getSeqNo); - query.eq(MaterialDO::getId,id).eq(InspPlanDO::getSchemeType,"1"); + query.eq(MaterialDO::getId,id).eq(InspPlanDO::getSchemeType,schemeType); return selectList(query); } } diff --git a/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/dal/mysql/matout/MatOutMapper.java b/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/dal/mysql/matout/MatOutMapper.java new file mode 100644 index 0000000..24b3484 --- /dev/null +++ b/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/dal/mysql/matout/MatOutMapper.java @@ -0,0 +1,35 @@ +package com.ningxia.yunxi.chemmes.module.biz.dal.mysql.matout; + +import java.util.*; + +import com.ningxia.yunxi.chemmes.framework.common.pojo.PageResult; +import com.ningxia.yunxi.chemmes.framework.mybatis.core.query.LambdaQueryWrapperX; +import com.ningxia.yunxi.chemmes.framework.mybatis.core.mapper.BaseMapperX; +import com.ningxia.yunxi.chemmes.module.biz.controller.admin.matout.vo.MatOutPageReqVO; +import com.ningxia.yunxi.chemmes.module.biz.dal.dataobject.matout.MatOutDO; +import org.apache.ibatis.annotations.Mapper; + +/** + * 产出主 Mapper + * + * @author 管理员 + */ +@Mapper +public interface MatOutMapper extends BaseMapperX { + + default PageResult selectPage(MatOutPageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .betweenIfPresent(MatOutDO::getCreateTime, reqVO.getCreateTime()) + .eqIfPresent(MatOutDO::getOutNo, reqVO.getOutNo()) + .eqIfPresent(MatOutDO::getPlanId, reqVO.getPlanId()) + .eqIfPresent(MatOutDO::getPlanNo, reqVO.getPlanNo()) + .eqIfPresent(MatOutDO::getWhInId, reqVO.getWhInId()) + .eqIfPresent(MatOutDO::getRemark, reqVO.getRemark()) + .eqIfPresent(MatOutDO::getOutEmpId, reqVO.getOutEmpId()) + .likeIfPresent(MatOutDO::getOutEmpName, reqVO.getOutEmpName()) + .eqIfPresent(MatOutDO::getHeadNo, reqVO.getHeadNo()) + .eqIfPresent(MatOutDO::getHeadId, reqVO.getHeadId()) + .orderByDesc(MatOutDO::getId)); + } + +} \ No newline at end of file diff --git a/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/dal/mysql/matoutdetail/MatOutDetailMapper.java b/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/dal/mysql/matoutdetail/MatOutDetailMapper.java new file mode 100644 index 0000000..7d8cf51 --- /dev/null +++ b/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/dal/mysql/matoutdetail/MatOutDetailMapper.java @@ -0,0 +1,42 @@ +package com.ningxia.yunxi.chemmes.module.biz.dal.mysql.matoutdetail; + +import java.util.*; + +import cn.hutool.core.date.DateUtil; +import cn.hutool.core.util.ObjectUtil; +import com.ningxia.yunxi.chemmes.framework.common.pojo.PageResult; +import com.ningxia.yunxi.chemmes.framework.mybatis.core.query.LambdaQueryWrapperX; +import com.ningxia.yunxi.chemmes.framework.mybatis.core.mapper.BaseMapperX; +import com.ningxia.yunxi.chemmes.framework.mybatis.core.query.MPJLambdaWrapperX; +import com.ningxia.yunxi.chemmes.module.biz.controller.admin.matoutdetail.vo.MatOutDetailPageReqVO; +import com.ningxia.yunxi.chemmes.module.biz.dal.dataobject.headno.HeadNoDO; +import com.ningxia.yunxi.chemmes.module.biz.dal.dataobject.matout.MatOutDO; +import com.ningxia.yunxi.chemmes.module.biz.dal.dataobject.matoutdetail.MatOutDetailDO; +import org.apache.ibatis.annotations.Mapper; + +/** + * 工序产出子 Mapper + * + * @author 管理员 + */ +@Mapper +public interface MatOutDetailMapper extends BaseMapperX { + + default PageResult selectPage(MatOutDetailPageReqVO reqVO) { + MPJLambdaWrapperX query = new MPJLambdaWrapperX<>(); + query.selectAll(MatOutDetailDO.class) + .select("m.plan_id as planId","m.plan_no as planNo","m.out_date as outDate") + .select("h.shift_cd as shiftCd","h.machine_name as machineName") + .leftJoin(MatOutDO.class,"m",MatOutDO::getId,MatOutDetailDO::getOutId) + .leftJoin(HeadNoDO.class,"h",HeadNoDO::getId,MatOutDO::getHeadId) + .disableSubLogicDel() + .orderByDesc(MatOutDO::getOutDate); + query.between(ObjectUtil.isNotEmpty(reqVO.getOutDate()),MatOutDO::getOutDate, reqVO.getOutDate()[0].atStartOfDay(), reqVO.getOutDate()[1].atTime(23, 59, 59)) + .like(ObjectUtil.isNotEmpty(reqVO.getLotNo()),MatOutDetailDO::getLotNo,reqVO.getLotNo()) + .eq(ObjectUtil.isNotEmpty(reqVO.getMatType()),MatOutDetailDO::getMatType,reqVO.getMatType()) + .eq(ObjectUtil.isNotEmpty(reqVO.getInspStatus()),MatOutDetailDO::getInspStatus,reqVO.getInspStatus()); + + return selectPage(reqVO, query); + } + +} \ No newline at end of file diff --git a/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/dal/mysql/millparamact/MillParamActMapper.java b/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/dal/mysql/millparamact/MillParamActMapper.java new file mode 100644 index 0000000..5b49d8e --- /dev/null +++ b/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/dal/mysql/millparamact/MillParamActMapper.java @@ -0,0 +1,43 @@ +package com.ningxia.yunxi.chemmes.module.biz.dal.mysql.millparamact; + +import java.util.*; + +import com.ningxia.yunxi.chemmes.framework.common.pojo.PageResult; +import com.ningxia.yunxi.chemmes.framework.mybatis.core.query.LambdaQueryWrapperX; +import com.ningxia.yunxi.chemmes.framework.mybatis.core.mapper.BaseMapperX; +import com.ningxia.yunxi.chemmes.module.biz.controller.admin.millparamact.vo.MillParamActPageReqVO; +import com.ningxia.yunxi.chemmes.module.biz.dal.dataobject.millparamact.MillParamActDO; +import org.apache.ibatis.annotations.Mapper; + +/** + * 制粉工序参数实绩 Mapper + * + * @author 管理员 + */ +@Mapper +public interface MillParamActMapper extends BaseMapperX { + + default PageResult selectPage(MillParamActPageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .betweenIfPresent(MillParamActDO::getCreateTime, reqVO.getCreateTime()) + .eqIfPresent(MillParamActDO::getRemark, reqVO.getRemark()) + .betweenIfPresent(MillParamActDO::getCollectTime, reqVO.getCollectTime()) + .eqIfPresent(MillParamActDO::getShiftCd, reqVO.getShiftCd()) + .eqIfPresent(MillParamActDO::getPlanId, reqVO.getPlanId()) + .eqIfPresent(MillParamActDO::getPlanNo, reqVO.getPlanNo()) + .eqIfPresent(MillParamActDO::getProcCdId, reqVO.getProcCdId()) + .eqIfPresent(MillParamActDO::getProcCd, reqVO.getProcCd()) + .likeIfPresent(MillParamActDO::getProcName, reqVO.getProcName()) + .eqIfPresent(MillParamActDO::getMachineId, reqVO.getMachineId()) + .eqIfPresent(MillParamActDO::getMachineNo, reqVO.getMachineNo()) + .eqIfPresent(MillParamActDO::getGrndMacCurr, reqVO.getGrndMacCurr()) + .eqIfPresent(MillParamActDO::getDataSource, reqVO.getDataSource()) + .eqIfPresent(MillParamActDO::getGrndMacSpeed, reqVO.getGrndMacSpeed()) + .eqIfPresent(MillParamActDO::getOutPowTemp, reqVO.getOutPowTemp()) + .eqIfPresent(MillParamActDO::getInAirTemp, reqVO.getInAirTemp()) + .eqIfPresent(MillParamActDO::getGrndOutPress, reqVO.getGrndOutPress()) + .betweenIfPresent(MillParamActDO::getCollectDate, reqVO.getCollectDate()) + .orderByDesc(MillParamActDO::getId)); + } + +} \ No newline at end of file diff --git a/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/dal/mysql/plan/PlanMapper.java b/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/dal/mysql/plan/PlanMapper.java index ca7dcc2..b58f64d 100644 --- a/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/dal/mysql/plan/PlanMapper.java +++ b/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/dal/mysql/plan/PlanMapper.java @@ -28,7 +28,7 @@ public interface PlanMapper extends BaseMapperX { .leftJoin(TechProcDO.class, "e",TechProcDO::getId,PlanDO::getProcessFlow) .disableSubLogicDel() .orderByDesc(PlanDO::getCreateTime); - query.between(ObjectUtil.isNotEmpty(reqVO.getProDate()), PlanDO::getProDate, reqVO.getProDate()[0], reqVO.getProDate()[1]) + query.between(ObjectUtil.isNotEmpty(reqVO.getProDate()), PlanDO::getProDate, reqVO.getProDate()[0], reqVO.getProDate()[1].atTime(23, 59, 59)) .like(ObjectUtil.isNotEmpty(reqVO.getProNo()),PlanDO::getProNo, reqVO.getProNo()) .like(ObjectUtil.isNotEmpty(reqVO.getSpec()),PlanDO::getSpec, reqVO.getSpec()) .eq(ObjectUtil.isNotEmpty(reqVO.getPlanStatus()),PlanDO::getPlanStatus, reqVO.getPlanStatus()) diff --git a/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/dal/mysql/proctioninspdetail/ProctionInspDetailMapper.java b/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/dal/mysql/proctioninspdetail/ProctionInspDetailMapper.java new file mode 100644 index 0000000..4d186cc --- /dev/null +++ b/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/dal/mysql/proctioninspdetail/ProctionInspDetailMapper.java @@ -0,0 +1,44 @@ +package com.ningxia.yunxi.chemmes.module.biz.dal.mysql.proctioninspdetail; + +import java.util.*; + +import com.ningxia.yunxi.chemmes.framework.common.pojo.PageResult; +import com.ningxia.yunxi.chemmes.framework.mybatis.core.query.LambdaQueryWrapperX; +import com.ningxia.yunxi.chemmes.framework.mybatis.core.mapper.BaseMapperX; +import com.ningxia.yunxi.chemmes.module.biz.controller.admin.proctioninspdetail.vo.ProctionInspDetailPageReqVO; +import com.ningxia.yunxi.chemmes.module.biz.dal.dataobject.proctioninspdetail.ProctionInspDetailDO; +import org.apache.ibatis.annotations.Mapper; + +/** + * 产品料检验值明细 Mapper + * + * @author 管理员 + */ +@Mapper +public interface ProctionInspDetailMapper extends BaseMapperX { + + default PageResult selectPage(ProctionInspDetailPageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .eqIfPresent(ProctionInspDetailDO::getActValue, reqVO.getActValue()) + .eqIfPresent(ProctionInspDetailDO::getRemark, reqVO.getRemark()) + .betweenIfPresent(ProctionInspDetailDO::getCreateTime, reqVO.getCreateTime()) + .eqIfPresent(ProctionInspDetailDO::getInspPlanId, reqVO.getInspPlanId()) + .eqIfPresent(ProctionInspDetailDO::getInspPlanItemId, reqVO.getInspPlanItemId()) + .eqIfPresent(ProctionInspDetailDO::getProctionInspId, reqVO.getProctionInspId()) + .eqIfPresent(ProctionInspDetailDO::getSeqNo, reqVO.getSeqNo()) + .eqIfPresent(ProctionInspDetailDO::getCheckCode, reqVO.getCheckCode()) + .eqIfPresent(ProctionInspDetailDO::getInspTotalId, reqVO.getInspTotalId()) + .orderByDesc(ProctionInspDetailDO::getId)); + } + + /** + * 根据主表id删除 + */ + default void deleteByProctionInspId(Integer proctionInspId) { + delete(new LambdaQueryWrapperX() + .eq(ProctionInspDetailDO::getProctionInspId, proctionInspId)); + } + + + +} \ No newline at end of file diff --git a/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/dal/mysql/proctioninsptotal/ProctionInspTotalMapper.java b/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/dal/mysql/proctioninsptotal/ProctionInspTotalMapper.java new file mode 100644 index 0000000..fe95dd4 --- /dev/null +++ b/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/dal/mysql/proctioninsptotal/ProctionInspTotalMapper.java @@ -0,0 +1,67 @@ +package com.ningxia.yunxi.chemmes.module.biz.dal.mysql.proctioninsptotal; + +import java.util.*; + +import com.ningxia.yunxi.chemmes.framework.common.pojo.PageResult; +import com.ningxia.yunxi.chemmes.framework.mybatis.core.query.LambdaQueryWrapperX; +import com.ningxia.yunxi.chemmes.framework.mybatis.core.mapper.BaseMapperX; +import com.ningxia.yunxi.chemmes.framework.mybatis.core.query.MPJLambdaWrapperX; +import com.ningxia.yunxi.chemmes.module.biz.controller.admin.proctioninsptotal.vo.ProctionInspTotalPageReqVO; +import com.ningxia.yunxi.chemmes.module.biz.dal.dataobject.checkitem.CheckItemDO; +import com.ningxia.yunxi.chemmes.module.biz.dal.dataobject.proctioninsptotal.ProctionInspTotalDO; +import com.ningxia.yunxi.chemmes.module.biz.dal.dataobject.rawmaterialinsptotal.RawMaterialInspTotalDO; +import org.apache.ibatis.annotations.Mapper; + +/** + * 产品检验值汇总 Mapper + * + * @author 管理员 + */ +@Mapper +public interface ProctionInspTotalMapper extends BaseMapperX { + + default PageResult selectPage(ProctionInspTotalPageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .eqIfPresent(ProctionInspTotalDO::getActValue, reqVO.getActValue()) + .eqIfPresent(ProctionInspTotalDO::getRemark, reqVO.getRemark()) + .betweenIfPresent(ProctionInspTotalDO::getCreateTime, reqVO.getCreateTime()) + .eqIfPresent(ProctionInspTotalDO::getInspPlanId, reqVO.getInspPlanId()) + .eqIfPresent(ProctionInspTotalDO::getInspPlanItemId, reqVO.getInspPlanItemId()) + .eqIfPresent(ProctionInspTotalDO::getProctionInspId, reqVO.getProctionInspId()) + .eqIfPresent(ProctionInspTotalDO::getSeqNo, reqVO.getSeqNo()) + .eqIfPresent(ProctionInspTotalDO::getCheckCode, reqVO.getCheckCode()) + .eqIfPresent(ProctionInspTotalDO::getCheckResult, reqVO.getCheckResult()) + .eqIfPresent(ProctionInspTotalDO::getItemId, reqVO.getItemId()) + .likeIfPresent(ProctionInspTotalDO::getItemName, reqVO.getItemName()) + .eqIfPresent(ProctionInspTotalDO::getStandardValue, reqVO.getStandardValue()) + .eqIfPresent(ProctionInspTotalDO::getUpperLimit, reqVO.getUpperLimit()) + .eqIfPresent(ProctionInspTotalDO::getLowerLimit, reqVO.getLowerLimit()) + .eqIfPresent(ProctionInspTotalDO::getCheckMethod, reqVO.getCheckMethod()) + .eqIfPresent(ProctionInspTotalDO::getPrintItem, reqVO.getPrintItem()) + .orderByDesc(ProctionInspTotalDO::getId)); + } + + /** + * 根据主表id删除 + */ + default void deleteByProctionInspId(String proctionInspId) { + delete(new LambdaQueryWrapperX() + .eq(ProctionInspTotalDO::getProctionInspId, proctionInspId)); + } + + /** + * 根据主表id查询汇总列表 + */ + default List selectByProctionInspId(Integer proctionInspId) { + MPJLambdaWrapperX query = new MPJLambdaWrapperX<>(); + query.selectAll(ProctionInspTotalDO.class) + .select("c.item_value_type as itemValueType","c.item_content as itemContent") + .select("c.test_num as testNum","c.float_num as floatNum") + .leftJoin(CheckItemDO.class,"c",CheckItemDO::getId,ProctionInspTotalDO::getItemId) + .disableSubLogicDel() + .orderByAsc(ProctionInspTotalDO::getSeqNo); + query.eq(ProctionInspTotalDO::getProctionInspId, proctionInspId); + return selectList(query); + } + +} \ No newline at end of file diff --git a/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/dal/mysql/productioninsp/ProductionInspMapper.java b/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/dal/mysql/productioninsp/ProductionInspMapper.java new file mode 100644 index 0000000..d47ad47 --- /dev/null +++ b/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/dal/mysql/productioninsp/ProductionInspMapper.java @@ -0,0 +1,60 @@ +package com.ningxia.yunxi.chemmes.module.biz.dal.mysql.productioninsp; + +import java.util.*; + +import com.ningxia.yunxi.chemmes.framework.common.pojo.PageResult; +import com.ningxia.yunxi.chemmes.framework.mybatis.core.query.LambdaQueryWrapperX; +import com.ningxia.yunxi.chemmes.framework.mybatis.core.mapper.BaseMapperX; +import com.ningxia.yunxi.chemmes.module.biz.controller.admin.productioninsp.vo.ProductionInspPageReqVO; +import com.ningxia.yunxi.chemmes.module.biz.dal.dataobject.productioninsp.ProductionInspDO; +import org.apache.ibatis.annotations.Mapper; + +/** + * 产品检验主 Mapper + * + * @author 管理员 + */ +@Mapper +public interface ProductionInspMapper extends BaseMapperX { + + default PageResult selectPage(ProductionInspPageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .eqIfPresent(ProductionInspDO::getCheckCode, reqVO.getCheckCode()) + .eqIfPresent(ProductionInspDO::getPlanId, reqVO.getPlanId()) + .eqIfPresent(ProductionInspDO::getProNo, reqVO.getProNo()) + .eqIfPresent(ProductionInspDO::getMaterialId, reqVO.getMaterialId()) + .eqIfPresent(ProductionInspDO::getMatCode, reqVO.getMatCode()) + .likeIfPresent(ProductionInspDO::getMatName, reqVO.getMatName()) + .eqIfPresent(ProductionInspDO::getSpec, reqVO.getSpec()) + .eqIfPresent(ProductionInspDO::getLotNo, reqVO.getLotNo()) + .betweenIfPresent(ProductionInspDO::getOutDate, reqVO.getOutDate()) + .betweenIfPresent(ProductionInspDO::getCheckDate, reqVO.getCheckDate()) + .eqIfPresent(ProductionInspDO::getCheckResult, reqVO.getCheckResult()) + .eqIfPresent(ProductionInspDO::getRemark, reqVO.getRemark()) + .betweenIfPresent(ProductionInspDO::getCreateTime, reqVO.getCreateTime()) + .eqIfPresent(ProductionInspDO::getFormCode, reqVO.getFormCode()) + .eqIfPresent(ProductionInspDO::getQaSchemeBaseId, reqVO.getQaSchemeBaseId()) + .eqIfPresent(ProductionInspDO::getTestNum, reqVO.getTestNum()) + .eqIfPresent(ProductionInspDO::getCheckUserId, reqVO.getCheckUserId()) + .eqIfPresent(ProductionInspDO::getCheckExUserId, reqVO.getCheckExUserId()) + .betweenIfPresent(ProductionInspDO::getCheckExDate, reqVO.getCheckExDate()) + .eqIfPresent(ProductionInspDO::getCheckStatus, reqVO.getCheckStatus()) + .eqIfPresent(ProductionInspDO::getCheckRemark, reqVO.getCheckRemark()) + .likeIfPresent(ProductionInspDO::getCheckUserName, reqVO.getCheckUserName()) + .likeIfPresent(ProductionInspDO::getCheckExUserName, reqVO.getCheckExUserName()) + .eqIfPresent(ProductionInspDO::getOutId, reqVO.getOutId()) + .eqIfPresent(ProductionInspDO::getOutMatId, reqVO.getOutMatId()) + .orderByDesc(ProductionInspDO::getId)); + } + + /** + * 查询最大检验单号 + */ + default String selectMaxCheckCode() { + ProductionInspDO result = selectOne(new LambdaQueryWrapperX() + .orderByDesc(ProductionInspDO::getCheckCode) + .last("LIMIT 1")); + return result == null ? null : result.getCheckCode(); + } + +} \ No newline at end of file diff --git a/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/dal/mysql/rawmaterialinsp/RawMaterialInspMapper.java b/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/dal/mysql/rawmaterialinsp/RawMaterialInspMapper.java index 357e684..bb6cb95 100644 --- a/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/dal/mysql/rawmaterialinsp/RawMaterialInspMapper.java +++ b/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/dal/mysql/rawmaterialinsp/RawMaterialInspMapper.java @@ -58,7 +58,7 @@ public interface RawMaterialInspMapper extends BaseMapperX { .likeIfPresent(RawMaterialInspDO::getCheckExUserName, reqVO.getCheckExUserName()) .eqIfPresent(RawMaterialInspDO::getPurOrdId, reqVO.getPurOrdId()) .eqIfPresent(RawMaterialInspDO::getPurOrdNo, reqVO.getPurOrdNo()) - .orderByDesc(RawMaterialInspDO::getId)); + .orderByDesc(RawMaterialInspDO::getCheckDate)); } } \ No newline at end of file diff --git a/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/service/headno/HeadNoService.java b/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/service/headno/HeadNoService.java new file mode 100644 index 0000000..9dc7fcd --- /dev/null +++ b/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/service/headno/HeadNoService.java @@ -0,0 +1,56 @@ +package com.ningxia.yunxi.chemmes.module.biz.service.headno; + +import java.util.*; +import javax.validation.*; +import com.ningxia.yunxi.chemmes.framework.common.pojo.PageResult; +import com.ningxia.yunxi.chemmes.framework.common.pojo.PageParam; +import com.ningxia.yunxi.chemmes.module.biz.controller.admin.headno.vo.HeadNoPageReqVO; +import com.ningxia.yunxi.chemmes.module.biz.controller.admin.headno.vo.HeadNoSaveReqVO; +import com.ningxia.yunxi.chemmes.module.biz.dal.dataobject.headno.HeadNoDO; + +/** + * 工序抬头单 Service 接口 + * + * @author 管理员 + */ +public interface HeadNoService { + + /** + * 创建工序抬头单 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + Integer createHeadNo(@Valid HeadNoSaveReqVO createReqVO); + + /** + * 更新工序抬头单 + * + * @param updateReqVO 更新信息 + */ + void updateHeadNo(@Valid HeadNoSaveReqVO updateReqVO); + + /** + * 删除工序抬头单 + * + * @param id 编号 + */ + void deleteHeadNo(Integer id); + + /** + * 获得工序抬头单 + * + * @param id 编号 + * @return 工序抬头单 + */ + HeadNoDO getHeadNo(Integer id); + + /** + * 获得工序抬头单分页 + * + * @param pageReqVO 分页查询 + * @return 工序抬头单分页 + */ + PageResult getHeadNoPage(HeadNoPageReqVO pageReqVO); + +} diff --git a/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/service/headno/HeadNoServiceImpl.java b/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/service/headno/HeadNoServiceImpl.java new file mode 100644 index 0000000..31f6a9b --- /dev/null +++ b/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/service/headno/HeadNoServiceImpl.java @@ -0,0 +1,75 @@ +package com.ningxia.yunxi.chemmes.module.biz.service.headno; + +import com.ningxia.yunxi.chemmes.module.biz.controller.admin.headno.vo.HeadNoPageReqVO; +import com.ningxia.yunxi.chemmes.module.biz.controller.admin.headno.vo.HeadNoSaveReqVO; +import com.ningxia.yunxi.chemmes.module.biz.dal.dataobject.headno.HeadNoDO; +import com.ningxia.yunxi.chemmes.module.biz.dal.mysql.headno.HeadNoMapper; +import org.springframework.stereotype.Service; +import javax.annotation.Resource; +import org.springframework.validation.annotation.Validated; +import org.springframework.transaction.annotation.Transactional; +import static com.ningxia.yunxi.chemmes.module.infra.enums.ErrorCodeConstants.*; + +import java.util.*; +import com.ningxia.yunxi.chemmes.framework.common.pojo.PageResult; +import com.ningxia.yunxi.chemmes.framework.common.pojo.PageParam; +import com.ningxia.yunxi.chemmes.framework.common.util.object.BeanUtils; + + +import static com.ningxia.yunxi.chemmes.framework.common.exception.util.ServiceExceptionUtil.exception; + +/** + * 工序抬头单 Service 实现类 + * + * @author 管理员 + */ +@Service +@Validated +public class HeadNoServiceImpl implements HeadNoService { + + @Resource + private HeadNoMapper headNoMapper; + + @Override + public Integer createHeadNo(HeadNoSaveReqVO createReqVO) { + // 插入 + HeadNoDO headNo = BeanUtils.toBean(createReqVO, HeadNoDO.class); + headNoMapper.insert(headNo); + // 返回 + return headNo.getId(); + } + + @Override + public void updateHeadNo(HeadNoSaveReqVO updateReqVO) { + // 校验存在 + validateHeadNoExists(updateReqVO.getId()); + // 更新 + HeadNoDO updateObj = BeanUtils.toBean(updateReqVO, HeadNoDO.class); + headNoMapper.updateById(updateObj); + } + + @Override + public void deleteHeadNo(Integer id) { + // 校验存在 + validateHeadNoExists(id); + // 删除 + headNoMapper.deleteById(id); + } + + private void validateHeadNoExists(Integer id) { + if (headNoMapper.selectById(id) == null) { + throw exception("数据不存在"); + } + } + + @Override + public HeadNoDO getHeadNo(Integer id) { + return headNoMapper.selectById(id); + } + + @Override + public PageResult getHeadNoPage(HeadNoPageReqVO pageReqVO) { + return headNoMapper.selectPage(pageReqVO); + } + +} diff --git a/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/service/inspplanitem/InspPlanItemService.java b/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/service/inspplanitem/InspPlanItemService.java index c7c6b2f..4e8f3ae 100644 --- a/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/service/inspplanitem/InspPlanItemService.java +++ b/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/service/inspplanitem/InspPlanItemService.java @@ -55,5 +55,5 @@ public interface InspPlanItemService { PageResult getInspPlanItemPage(InspPlanItemPageReqVO pageReqVO); List getInspPlanItemByPlanId(Integer planId); - List selectMaterialId(Integer id); + List selectMaterialId(Integer id, String schemeType); } diff --git a/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/service/inspplanitem/InspPlanItemServiceImpl.java b/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/service/inspplanitem/InspPlanItemServiceImpl.java index a9f3bd6..eff693d 100644 --- a/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/service/inspplanitem/InspPlanItemServiceImpl.java +++ b/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/service/inspplanitem/InspPlanItemServiceImpl.java @@ -74,7 +74,7 @@ public class InspPlanItemServiceImpl implements InspPlanItemService { return inspPlanItemMapper.getInspPlanItemByPlanId(planId); } @Override - public List selectMaterialId(Integer id) { - return inspPlanItemMapper.selectMaterialId(id); + public List selectMaterialId(Integer id, String schemeType) { + return inspPlanItemMapper.selectMaterialId(id, schemeType); } } diff --git a/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/service/matout/MatOutService.java b/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/service/matout/MatOutService.java new file mode 100644 index 0000000..3f2beee --- /dev/null +++ b/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/service/matout/MatOutService.java @@ -0,0 +1,56 @@ +package com.ningxia.yunxi.chemmes.module.biz.service.matout; + +import java.util.*; +import javax.validation.*; +import com.ningxia.yunxi.chemmes.framework.common.pojo.PageResult; +import com.ningxia.yunxi.chemmes.framework.common.pojo.PageParam; +import com.ningxia.yunxi.chemmes.module.biz.controller.admin.matout.vo.MatOutPageReqVO; +import com.ningxia.yunxi.chemmes.module.biz.controller.admin.matout.vo.MatOutSaveReqVO; +import com.ningxia.yunxi.chemmes.module.biz.dal.dataobject.matout.MatOutDO; + +/** + * 产出主 Service 接口 + * + * @author 管理员 + */ +public interface MatOutService { + + /** + * 创建产出主 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + Integer createMatOut(@Valid MatOutSaveReqVO createReqVO); + + /** + * 更新产出主 + * + * @param updateReqVO 更新信息 + */ + void updateMatOut(@Valid MatOutSaveReqVO updateReqVO); + + /** + * 删除产出主 + * + * @param id 编号 + */ + void deleteMatOut(Integer id); + + /** + * 获得产出主 + * + * @param id 编号 + * @return 产出主 + */ + MatOutDO getMatOut(Integer id); + + /** + * 获得产出主分页 + * + * @param pageReqVO 分页查询 + * @return 产出主分页 + */ + PageResult getMatOutPage(MatOutPageReqVO pageReqVO); + +} diff --git a/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/service/matout/MatOutServiceImpl.java b/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/service/matout/MatOutServiceImpl.java new file mode 100644 index 0000000..1bc8e4f --- /dev/null +++ b/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/service/matout/MatOutServiceImpl.java @@ -0,0 +1,75 @@ +package com.ningxia.yunxi.chemmes.module.biz.service.matout; + +import com.ningxia.yunxi.chemmes.module.biz.controller.admin.matout.vo.MatOutPageReqVO; +import com.ningxia.yunxi.chemmes.module.biz.controller.admin.matout.vo.MatOutSaveReqVO; +import com.ningxia.yunxi.chemmes.module.biz.dal.dataobject.matout.MatOutDO; +import com.ningxia.yunxi.chemmes.module.biz.dal.mysql.matout.MatOutMapper; +import org.springframework.stereotype.Service; +import javax.annotation.Resource; +import org.springframework.validation.annotation.Validated; +import org.springframework.transaction.annotation.Transactional; +import static com.ningxia.yunxi.chemmes.module.infra.enums.ErrorCodeConstants.*; + +import java.util.*; +import com.ningxia.yunxi.chemmes.framework.common.pojo.PageResult; +import com.ningxia.yunxi.chemmes.framework.common.pojo.PageParam; +import com.ningxia.yunxi.chemmes.framework.common.util.object.BeanUtils; + + +import static com.ningxia.yunxi.chemmes.framework.common.exception.util.ServiceExceptionUtil.exception; + +/** + * 产出主 Service 实现类 + * + * @author 管理员 + */ +@Service +@Validated +public class MatOutServiceImpl implements MatOutService { + + @Resource + private MatOutMapper matOutMapper; + + @Override + public Integer createMatOut(MatOutSaveReqVO createReqVO) { + // 插入 + MatOutDO matOut = BeanUtils.toBean(createReqVO, MatOutDO.class); + matOutMapper.insert(matOut); + // 返回 + return matOut.getId(); + } + + @Override + public void updateMatOut(MatOutSaveReqVO updateReqVO) { + // 校验存在 + validateMatOutExists(updateReqVO.getId()); + // 更新 + MatOutDO updateObj = BeanUtils.toBean(updateReqVO, MatOutDO.class); + matOutMapper.updateById(updateObj); + } + + @Override + public void deleteMatOut(Integer id) { + // 校验存在 + validateMatOutExists(id); + // 删除 + matOutMapper.deleteById(id); + } + + private void validateMatOutExists(Integer id) { + if (matOutMapper.selectById(id) == null) { + throw exception("数据不存在"); + } + } + + @Override + public MatOutDO getMatOut(Integer id) { + return matOutMapper.selectById(id); + } + + @Override + public PageResult getMatOutPage(MatOutPageReqVO pageReqVO) { + return matOutMapper.selectPage(pageReqVO); + } + +} diff --git a/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/service/matoutdetail/MatOutDetailService.java b/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/service/matoutdetail/MatOutDetailService.java new file mode 100644 index 0000000..e286623 --- /dev/null +++ b/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/service/matoutdetail/MatOutDetailService.java @@ -0,0 +1,56 @@ +package com.ningxia.yunxi.chemmes.module.biz.service.matoutdetail; + +import java.util.*; +import javax.validation.*; +import com.ningxia.yunxi.chemmes.framework.common.pojo.PageResult; +import com.ningxia.yunxi.chemmes.framework.common.pojo.PageParam; +import com.ningxia.yunxi.chemmes.module.biz.controller.admin.matoutdetail.vo.MatOutDetailPageReqVO; +import com.ningxia.yunxi.chemmes.module.biz.controller.admin.matoutdetail.vo.MatOutDetailSaveReqVO; +import com.ningxia.yunxi.chemmes.module.biz.dal.dataobject.matoutdetail.MatOutDetailDO; + +/** + * 工序产出子 Service 接口 + * + * @author 管理员 + */ +public interface MatOutDetailService { + + /** + * 创建工序产出子 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + Integer createMatOutDetail(@Valid MatOutDetailSaveReqVO createReqVO); + + /** + * 更新工序产出子 + * + * @param updateReqVO 更新信息 + */ + void updateMatOutDetail(@Valid MatOutDetailSaveReqVO updateReqVO); + + /** + * 删除工序产出子 + * + * @param id 编号 + */ + void deleteMatOutDetail(Integer id); + + /** + * 获得工序产出子 + * + * @param id 编号 + * @return 工序产出子 + */ + MatOutDetailDO getMatOutDetail(Integer id); + + /** + * 获得工序产出子分页 + * + * @param pageReqVO 分页查询 + * @return 工序产出子分页 + */ + PageResult getMatOutDetailPage(MatOutDetailPageReqVO pageReqVO); + +} diff --git a/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/service/matoutdetail/MatOutDetailServiceImpl.java b/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/service/matoutdetail/MatOutDetailServiceImpl.java new file mode 100644 index 0000000..e2a3b5a --- /dev/null +++ b/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/service/matoutdetail/MatOutDetailServiceImpl.java @@ -0,0 +1,75 @@ +package com.ningxia.yunxi.chemmes.module.biz.service.matoutdetail; + +import com.ningxia.yunxi.chemmes.module.biz.controller.admin.matoutdetail.vo.MatOutDetailPageReqVO; +import com.ningxia.yunxi.chemmes.module.biz.controller.admin.matoutdetail.vo.MatOutDetailSaveReqVO; +import com.ningxia.yunxi.chemmes.module.biz.dal.dataobject.matoutdetail.MatOutDetailDO; +import com.ningxia.yunxi.chemmes.module.biz.dal.mysql.matoutdetail.MatOutDetailMapper; +import org.springframework.stereotype.Service; +import javax.annotation.Resource; +import org.springframework.validation.annotation.Validated; +import org.springframework.transaction.annotation.Transactional; +import static com.ningxia.yunxi.chemmes.module.infra.enums.ErrorCodeConstants.*; + +import java.util.*; +import com.ningxia.yunxi.chemmes.framework.common.pojo.PageResult; +import com.ningxia.yunxi.chemmes.framework.common.pojo.PageParam; +import com.ningxia.yunxi.chemmes.framework.common.util.object.BeanUtils; + + +import static com.ningxia.yunxi.chemmes.framework.common.exception.util.ServiceExceptionUtil.exception; + +/** + * 工序产出子 Service 实现类 + * + * @author 管理员 + */ +@Service +@Validated +public class MatOutDetailServiceImpl implements MatOutDetailService { + + @Resource + private MatOutDetailMapper matOutDetailMapper; + + @Override + public Integer createMatOutDetail(MatOutDetailSaveReqVO createReqVO) { + // 插入 + MatOutDetailDO matOutDetail = BeanUtils.toBean(createReqVO, MatOutDetailDO.class); + matOutDetailMapper.insert(matOutDetail); + // 返回 + return matOutDetail.getId(); + } + + @Override + public void updateMatOutDetail(MatOutDetailSaveReqVO updateReqVO) { + // 校验存在 + validateMatOutDetailExists(updateReqVO.getId()); + // 更新 + MatOutDetailDO updateObj = BeanUtils.toBean(updateReqVO, MatOutDetailDO.class); + matOutDetailMapper.updateById(updateObj); + } + + @Override + public void deleteMatOutDetail(Integer id) { + // 校验存在 + validateMatOutDetailExists(id); + // 删除 + matOutDetailMapper.deleteById(id); + } + + private void validateMatOutDetailExists(Integer id) { + if (matOutDetailMapper.selectById(id) == null) { + throw exception("数据不存在"); + } + } + + @Override + public MatOutDetailDO getMatOutDetail(Integer id) { + return matOutDetailMapper.selectById(id); + } + + @Override + public PageResult getMatOutDetailPage(MatOutDetailPageReqVO pageReqVO) { + return matOutDetailMapper.selectPage(pageReqVO); + } + +} diff --git a/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/service/millparamact/MillParamActService.java b/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/service/millparamact/MillParamActService.java new file mode 100644 index 0000000..1a9f2d2 --- /dev/null +++ b/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/service/millparamact/MillParamActService.java @@ -0,0 +1,56 @@ +package com.ningxia.yunxi.chemmes.module.biz.service.millparamact; + +import java.util.*; +import javax.validation.*; +import com.ningxia.yunxi.chemmes.framework.common.pojo.PageResult; +import com.ningxia.yunxi.chemmes.framework.common.pojo.PageParam; +import com.ningxia.yunxi.chemmes.module.biz.controller.admin.millparamact.vo.MillParamActPageReqVO; +import com.ningxia.yunxi.chemmes.module.biz.controller.admin.millparamact.vo.MillParamActSaveReqVO; +import com.ningxia.yunxi.chemmes.module.biz.dal.dataobject.millparamact.MillParamActDO; + +/** + * 制粉工序参数实绩 Service 接口 + * + * @author 管理员 + */ +public interface MillParamActService { + + /** + * 创建制粉工序参数实绩 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + Integer createMillParamAct(@Valid MillParamActSaveReqVO createReqVO); + + /** + * 更新制粉工序参数实绩 + * + * @param updateReqVO 更新信息 + */ + void updateMillParamAct(@Valid MillParamActSaveReqVO updateReqVO); + + /** + * 删除制粉工序参数实绩 + * + * @param id 编号 + */ + void deleteMillParamAct(Integer id); + + /** + * 获得制粉工序参数实绩 + * + * @param id 编号 + * @return 制粉工序参数实绩 + */ + MillParamActDO getMillParamAct(Integer id); + + /** + * 获得制粉工序参数实绩分页 + * + * @param pageReqVO 分页查询 + * @return 制粉工序参数实绩分页 + */ + PageResult getMillParamActPage(MillParamActPageReqVO pageReqVO); + +} diff --git a/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/service/millparamact/MillParamActServiceImpl.java b/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/service/millparamact/MillParamActServiceImpl.java new file mode 100644 index 0000000..819f27b --- /dev/null +++ b/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/service/millparamact/MillParamActServiceImpl.java @@ -0,0 +1,75 @@ +package com.ningxia.yunxi.chemmes.module.biz.service.millparamact; + +import com.ningxia.yunxi.chemmes.module.biz.controller.admin.millparamact.vo.MillParamActPageReqVO; +import com.ningxia.yunxi.chemmes.module.biz.controller.admin.millparamact.vo.MillParamActSaveReqVO; +import com.ningxia.yunxi.chemmes.module.biz.dal.dataobject.millparamact.MillParamActDO; +import com.ningxia.yunxi.chemmes.module.biz.dal.mysql.millparamact.MillParamActMapper; +import org.springframework.stereotype.Service; +import javax.annotation.Resource; +import org.springframework.validation.annotation.Validated; +import org.springframework.transaction.annotation.Transactional; +import static com.ningxia.yunxi.chemmes.module.infra.enums.ErrorCodeConstants.*; + +import java.util.*; +import com.ningxia.yunxi.chemmes.framework.common.pojo.PageResult; +import com.ningxia.yunxi.chemmes.framework.common.pojo.PageParam; +import com.ningxia.yunxi.chemmes.framework.common.util.object.BeanUtils; + + +import static com.ningxia.yunxi.chemmes.framework.common.exception.util.ServiceExceptionUtil.exception; + +/** + * 制粉工序参数实绩 Service 实现类 + * + * @author 管理员 + */ +@Service +@Validated +public class MillParamActServiceImpl implements MillParamActService { + + @Resource + private MillParamActMapper millParamActMapper; + + @Override + public Integer createMillParamAct(MillParamActSaveReqVO createReqVO) { + // 插入 + MillParamActDO millParamAct = BeanUtils.toBean(createReqVO, MillParamActDO.class); + millParamActMapper.insert(millParamAct); + // 返回 + return millParamAct.getId(); + } + + @Override + public void updateMillParamAct(MillParamActSaveReqVO updateReqVO) { + // 校验存在 + validateMillParamActExists(updateReqVO.getId()); + // 更新 + MillParamActDO updateObj = BeanUtils.toBean(updateReqVO, MillParamActDO.class); + millParamActMapper.updateById(updateObj); + } + + @Override + public void deleteMillParamAct(Integer id) { + // 校验存在 + validateMillParamActExists(id); + // 删除 + millParamActMapper.deleteById(id); + } + + private void validateMillParamActExists(Integer id) { + if (millParamActMapper.selectById(id) == null) { + throw exception("数据不存在"); + } + } + + @Override + public MillParamActDO getMillParamAct(Integer id) { + return millParamActMapper.selectById(id); + } + + @Override + public PageResult getMillParamActPage(MillParamActPageReqVO pageReqVO) { + return millParamActMapper.selectPage(pageReqVO); + } + +} diff --git a/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/service/proctioninspdetail/ProctionInspDetailService.java b/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/service/proctioninspdetail/ProctionInspDetailService.java new file mode 100644 index 0000000..bd30fda --- /dev/null +++ b/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/service/proctioninspdetail/ProctionInspDetailService.java @@ -0,0 +1,56 @@ +package com.ningxia.yunxi.chemmes.module.biz.service.proctioninspdetail; + +import java.util.*; +import javax.validation.*; +import com.ningxia.yunxi.chemmes.framework.common.pojo.PageResult; +import com.ningxia.yunxi.chemmes.framework.common.pojo.PageParam; +import com.ningxia.yunxi.chemmes.module.biz.controller.admin.proctioninspdetail.vo.ProctionInspDetailPageReqVO; +import com.ningxia.yunxi.chemmes.module.biz.controller.admin.proctioninspdetail.vo.ProctionInspDetailSaveReqVO; +import com.ningxia.yunxi.chemmes.module.biz.dal.dataobject.proctioninspdetail.ProctionInspDetailDO; + +/** + * 产品料检验值明细 Service 接口 + * + * @author 管理员 + */ +public interface ProctionInspDetailService { + + /** + * 创建产品料检验值明细 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + Integer createProctionInspDetail(@Valid ProctionInspDetailSaveReqVO createReqVO); + + /** + * 更新产品料检验值明细 + * + * @param updateReqVO 更新信息 + */ + void updateProctionInspDetail(@Valid ProctionInspDetailSaveReqVO updateReqVO); + + /** + * 删除产品料检验值明细 + * + * @param id 编号 + */ + void deleteProctionInspDetail(Integer id); + + /** + * 获得产品料检验值明细 + * + * @param id 编号 + * @return 产品料检验值明细 + */ + ProctionInspDetailDO getProctionInspDetail(Integer id); + + /** + * 获得产品料检验值明细分页 + * + * @param pageReqVO 分页查询 + * @return 产品料检验值明细分页 + */ + PageResult getProctionInspDetailPage(ProctionInspDetailPageReqVO pageReqVO); + +} diff --git a/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/service/proctioninspdetail/ProctionInspDetailServiceImpl.java b/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/service/proctioninspdetail/ProctionInspDetailServiceImpl.java new file mode 100644 index 0000000..af100e8 --- /dev/null +++ b/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/service/proctioninspdetail/ProctionInspDetailServiceImpl.java @@ -0,0 +1,75 @@ +package com.ningxia.yunxi.chemmes.module.biz.service.proctioninspdetail; + +import com.ningxia.yunxi.chemmes.module.biz.controller.admin.proctioninspdetail.vo.ProctionInspDetailPageReqVO; +import com.ningxia.yunxi.chemmes.module.biz.controller.admin.proctioninspdetail.vo.ProctionInspDetailSaveReqVO; +import com.ningxia.yunxi.chemmes.module.biz.dal.dataobject.proctioninspdetail.ProctionInspDetailDO; +import com.ningxia.yunxi.chemmes.module.biz.dal.mysql.proctioninspdetail.ProctionInspDetailMapper; +import org.springframework.stereotype.Service; +import javax.annotation.Resource; +import org.springframework.validation.annotation.Validated; +import org.springframework.transaction.annotation.Transactional; +import static com.ningxia.yunxi.chemmes.module.infra.enums.ErrorCodeConstants.*; + +import java.util.*; +import com.ningxia.yunxi.chemmes.framework.common.pojo.PageResult; +import com.ningxia.yunxi.chemmes.framework.common.pojo.PageParam; +import com.ningxia.yunxi.chemmes.framework.common.util.object.BeanUtils; + + +import static com.ningxia.yunxi.chemmes.framework.common.exception.util.ServiceExceptionUtil.exception; + +/** + * 产品料检验值明细 Service 实现类 + * + * @author 管理员 + */ +@Service +@Validated +public class ProctionInspDetailServiceImpl implements ProctionInspDetailService { + + @Resource + private ProctionInspDetailMapper proctionInspDetailMapper; + + @Override + public Integer createProctionInspDetail(ProctionInspDetailSaveReqVO createReqVO) { + // 插入 + ProctionInspDetailDO proctionInspDetail = BeanUtils.toBean(createReqVO, ProctionInspDetailDO.class); + proctionInspDetailMapper.insert(proctionInspDetail); + // 返回 + return proctionInspDetail.getId(); + } + + @Override + public void updateProctionInspDetail(ProctionInspDetailSaveReqVO updateReqVO) { + // 校验存在 + validateProctionInspDetailExists(updateReqVO.getId()); + // 更新 + ProctionInspDetailDO updateObj = BeanUtils.toBean(updateReqVO, ProctionInspDetailDO.class); + proctionInspDetailMapper.updateById(updateObj); + } + + @Override + public void deleteProctionInspDetail(Integer id) { + // 校验存在 + validateProctionInspDetailExists(id); + // 删除 + proctionInspDetailMapper.deleteById(id); + } + + private void validateProctionInspDetailExists(Integer id) { + if (proctionInspDetailMapper.selectById(id) == null) { + throw exception("数据不存在"); + } + } + + @Override + public ProctionInspDetailDO getProctionInspDetail(Integer id) { + return proctionInspDetailMapper.selectById(id); + } + + @Override + public PageResult getProctionInspDetailPage(ProctionInspDetailPageReqVO pageReqVO) { + return proctionInspDetailMapper.selectPage(pageReqVO); + } + +} diff --git a/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/service/proctioninsptotal/ProctionInspTotalService.java b/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/service/proctioninsptotal/ProctionInspTotalService.java new file mode 100644 index 0000000..661b425 --- /dev/null +++ b/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/service/proctioninsptotal/ProctionInspTotalService.java @@ -0,0 +1,56 @@ +package com.ningxia.yunxi.chemmes.module.biz.service.proctioninsptotal; + +import java.util.*; +import javax.validation.*; +import com.ningxia.yunxi.chemmes.framework.common.pojo.PageResult; +import com.ningxia.yunxi.chemmes.framework.common.pojo.PageParam; +import com.ningxia.yunxi.chemmes.module.biz.controller.admin.proctioninsptotal.vo.ProctionInspTotalPageReqVO; +import com.ningxia.yunxi.chemmes.module.biz.controller.admin.proctioninsptotal.vo.ProctionInspTotalSaveReqVO; +import com.ningxia.yunxi.chemmes.module.biz.dal.dataobject.proctioninsptotal.ProctionInspTotalDO; + +/** + * 产品检验值汇总 Service 接口 + * + * @author 管理员 + */ +public interface ProctionInspTotalService { + + /** + * 创建产品检验值汇总 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + Integer createProctionInspTotal(@Valid ProctionInspTotalSaveReqVO createReqVO); + + /** + * 更新产品检验值汇总 + * + * @param updateReqVO 更新信息 + */ + void updateProctionInspTotal(@Valid ProctionInspTotalSaveReqVO updateReqVO); + + /** + * 删除产品检验值汇总 + * + * @param id 编号 + */ + void deleteProctionInspTotal(Integer id); + + /** + * 获得产品检验值汇总 + * + * @param id 编号 + * @return 产品检验值汇总 + */ + ProctionInspTotalDO getProctionInspTotal(Integer id); + + /** + * 获得产品检验值汇总分页 + * + * @param pageReqVO 分页查询 + * @return 产品检验值汇总分页 + */ + PageResult getProctionInspTotalPage(ProctionInspTotalPageReqVO pageReqVO); + +} diff --git a/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/service/proctioninsptotal/ProctionInspTotalServiceImpl.java b/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/service/proctioninsptotal/ProctionInspTotalServiceImpl.java new file mode 100644 index 0000000..5f87010 --- /dev/null +++ b/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/service/proctioninsptotal/ProctionInspTotalServiceImpl.java @@ -0,0 +1,75 @@ +package com.ningxia.yunxi.chemmes.module.biz.service.proctioninsptotal; + +import com.ningxia.yunxi.chemmes.module.biz.controller.admin.proctioninsptotal.vo.ProctionInspTotalPageReqVO; +import com.ningxia.yunxi.chemmes.module.biz.controller.admin.proctioninsptotal.vo.ProctionInspTotalSaveReqVO; +import com.ningxia.yunxi.chemmes.module.biz.dal.dataobject.proctioninsptotal.ProctionInspTotalDO; +import com.ningxia.yunxi.chemmes.module.biz.dal.mysql.proctioninsptotal.ProctionInspTotalMapper; +import org.springframework.stereotype.Service; +import javax.annotation.Resource; +import org.springframework.validation.annotation.Validated; +import org.springframework.transaction.annotation.Transactional; +import static com.ningxia.yunxi.chemmes.module.infra.enums.ErrorCodeConstants.*; + +import java.util.*; +import com.ningxia.yunxi.chemmes.framework.common.pojo.PageResult; +import com.ningxia.yunxi.chemmes.framework.common.pojo.PageParam; +import com.ningxia.yunxi.chemmes.framework.common.util.object.BeanUtils; + + +import static com.ningxia.yunxi.chemmes.framework.common.exception.util.ServiceExceptionUtil.exception; + +/** + * 产品检验值汇总 Service 实现类 + * + * @author 管理员 + */ +@Service +@Validated +public class ProctionInspTotalServiceImpl implements ProctionInspTotalService { + + @Resource + private ProctionInspTotalMapper proctionInspTotalMapper; + + @Override + public Integer createProctionInspTotal(ProctionInspTotalSaveReqVO createReqVO) { + // 插入 + ProctionInspTotalDO proctionInspTotal = BeanUtils.toBean(createReqVO, ProctionInspTotalDO.class); + proctionInspTotalMapper.insert(proctionInspTotal); + // 返回 + return proctionInspTotal.getId(); + } + + @Override + public void updateProctionInspTotal(ProctionInspTotalSaveReqVO updateReqVO) { + // 校验存在 + validateProctionInspTotalExists(updateReqVO.getId()); + // 更新 + ProctionInspTotalDO updateObj = BeanUtils.toBean(updateReqVO, ProctionInspTotalDO.class); + proctionInspTotalMapper.updateById(updateObj); + } + + @Override + public void deleteProctionInspTotal(Integer id) { + // 校验存在 + validateProctionInspTotalExists(id); + // 删除 + proctionInspTotalMapper.deleteById(id); + } + + private void validateProctionInspTotalExists(Integer id) { + if (proctionInspTotalMapper.selectById(id) == null) { + throw exception("数据不存在"); + } + } + + @Override + public ProctionInspTotalDO getProctionInspTotal(Integer id) { + return proctionInspTotalMapper.selectById(id); + } + + @Override + public PageResult getProctionInspTotalPage(ProctionInspTotalPageReqVO pageReqVO) { + return proctionInspTotalMapper.selectPage(pageReqVO); + } + +} diff --git a/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/service/productioninsp/ProductionInspService.java b/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/service/productioninsp/ProductionInspService.java new file mode 100644 index 0000000..6d4bc16 --- /dev/null +++ b/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/service/productioninsp/ProductionInspService.java @@ -0,0 +1,56 @@ +package com.ningxia.yunxi.chemmes.module.biz.service.productioninsp; + +import java.util.*; +import javax.validation.*; +import com.ningxia.yunxi.chemmes.framework.common.pojo.PageResult; +import com.ningxia.yunxi.chemmes.framework.common.pojo.PageParam; +import com.ningxia.yunxi.chemmes.module.biz.controller.admin.productioninsp.vo.ProductionInspPageReqVO; +import com.ningxia.yunxi.chemmes.module.biz.controller.admin.productioninsp.vo.ProductionInspSaveReqVO; +import com.ningxia.yunxi.chemmes.module.biz.dal.dataobject.productioninsp.ProductionInspDO; + +/** + * 产品检验主 Service 接口 + * + * @author 管理员 + */ +public interface ProductionInspService { + + /** + * 创建产品检验主 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + String createProductionInsp(@Valid ProductionInspSaveReqVO createReqVO); + + /** + * 更新产品检验主 + * + * @param updateReqVO 更新信息 + */ + void updateProductionInsp(@Valid ProductionInspSaveReqVO updateReqVO); + + /** + * 删除产品检验主 + * + * @param id 编号 + */ + void deleteProductionInsp(String id); + + /** + * 获得产品检验主 + * + * @param id 编号 + * @return 产品检验主 + */ + ProductionInspDO getProductionInsp(String id); + + /** + * 获得产品检验主分页 + * + * @param pageReqVO 分页查询 + * @return 产品检验主分页 + */ + PageResult getProductionInspPage(ProductionInspPageReqVO pageReqVO); + +} diff --git a/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/service/productioninsp/ProductionInspServiceImpl.java b/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/service/productioninsp/ProductionInspServiceImpl.java new file mode 100644 index 0000000..c422b21 --- /dev/null +++ b/mes-module-chemmes/mes-module-chemmes-biz/src/main/java/com/ningxia/yunxi/chemmes/module/biz/service/productioninsp/ProductionInspServiceImpl.java @@ -0,0 +1,281 @@ +package com.ningxia.yunxi.chemmes.module.biz.service.productioninsp; + +import cn.hutool.core.util.ObjectUtil; +import cn.hutool.core.util.StrUtil; +import com.ningxia.yunxi.chemmes.module.biz.controller.admin.productioninsp.vo.ProductionInspPageReqVO; +import com.ningxia.yunxi.chemmes.module.biz.controller.admin.productioninsp.vo.ProductionInspSaveReqVO; +import com.ningxia.yunxi.chemmes.module.biz.dal.dataobject.proctioninspdetail.ProctionInspDetailDO; +import com.ningxia.yunxi.chemmes.module.biz.dal.dataobject.proctioninsptotal.ProctionInspTotalDO; +import com.ningxia.yunxi.chemmes.module.biz.dal.dataobject.productioninsp.ProductionInspDO; +import com.ningxia.yunxi.chemmes.module.biz.dal.dataobject.rawmaterialinsp.RawMaterialInspDO; +import com.ningxia.yunxi.chemmes.module.biz.dal.dataobject.rawmaterialinspdetail.RawMaterialInspDetailDO; +import com.ningxia.yunxi.chemmes.module.biz.dal.dataobject.rawmaterialinsptotal.RawMaterialInspTotalDO; +import com.ningxia.yunxi.chemmes.module.biz.dal.mysql.proctioninspdetail.ProctionInspDetailMapper; +import com.ningxia.yunxi.chemmes.module.biz.dal.mysql.proctioninsptotal.ProctionInspTotalMapper; +import com.ningxia.yunxi.chemmes.module.biz.dal.mysql.productioninsp.ProductionInspMapper; +import com.ningxia.yunxi.chemmes.module.biz.dal.mysql.rawmaterialinsp.RawMaterialInspMapper; +import com.ningxia.yunxi.chemmes.module.biz.dal.mysql.rawmaterialinspdetail.RawMaterialInspDetailMapper; +import com.ningxia.yunxi.chemmes.module.biz.dal.mysql.rawmaterialinsptotal.RawMaterialInspTotalMapper; +import com.ningxia.yunxi.chemmes.module.system.dal.dataobject.user.AdminUserDO; +import com.ningxia.yunxi.chemmes.module.system.dal.mysql.user.AdminUserMapper; +import org.springframework.stereotype.Service; +import javax.annotation.Resource; +import org.springframework.validation.annotation.Validated; +import org.springframework.transaction.annotation.Transactional; + +import static com.ningxia.yunxi.chemmes.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId; +import static com.ningxia.yunxi.chemmes.module.infra.enums.ErrorCodeConstants.*; + +import java.time.LocalDate; +import java.time.format.DateTimeFormatter; +import java.util.*; +import com.ningxia.yunxi.chemmes.framework.common.pojo.PageResult; +import com.ningxia.yunxi.chemmes.framework.common.pojo.PageParam; +import com.ningxia.yunxi.chemmes.framework.common.util.object.BeanUtils; +import com.ningxia.yunxi.chemmes.framework.mybatis.core.query.LambdaQueryWrapperX; + + +import static com.ningxia.yunxi.chemmes.framework.common.exception.util.ServiceExceptionUtil.exception; + +/** + * 产品检验主 Service 实现类 + * + * @author 管理员 + */ +@Service +@Validated +public class ProductionInspServiceImpl implements ProductionInspService { + + @Resource + private ProductionInspMapper productionInspMapper; + @Resource + private AdminUserMapper adminUserMapper; + @Resource + private ProctionInspTotalMapper proctionInspTotalMapper; + + @Resource + private ProctionInspDetailMapper proctionInspDetailMapper; + + @Override + @Transactional(rollbackFor = Exception.class) + public String createProductionInsp(ProductionInspSaveReqVO createReqVO) { + // 生成检验单号 + String checkCode = generateCheckCode(); + // 设置检验人信息为当前登录用户 + Long userId = getLoginUserId(); + AdminUserDO adminUserDO = adminUserMapper.selectById(userId); + createReqVO.setCheckUserId(Integer.parseInt(String.valueOf(userId))); + createReqVO.setCheckUserName(adminUserDO.getNickname()); + // 1. 插入主表 tqm_raw_material_insp + ProductionInspDO productionInsp = BeanUtils.toBean(createReqVO, ProductionInspDO.class); + productionInsp.setCheckCode(checkCode); + productionInspMapper.insert(productionInsp); + Integer proctionInspId = productionInsp.getId(); + + + // 2. 循环插入汇总表 tqm_proction_insp_total(顺序号由后台生成) + List totalList = createReqVO.getProctionInspTotalList(); + if (totalList != null && !totalList.isEmpty()) { + int totalSeq = 0; + for (ProctionInspTotalDO totalDO : totalList) { + totalSeq++; + // 插入汇总表 + ProctionInspTotalDO total = ProctionInspTotalDO.builder() + .proctionInspId(String.valueOf(proctionInspId)) + .checkCode(checkCode) + .itemId(totalDO.getItemId()) + .itemName(totalDO.getItemName()) + .standardValue(totalDO.getStandardValue()) + .upperLimit(totalDO.getUpperLimit()) + .lowerLimit(totalDO.getLowerLimit()) + .checkMethod(totalDO.getCheckMethod()) + .actValue(totalDO.getActValue()) + .checkResult(totalDO.getCheckResult()) + .seqNo(totalSeq) + .inspPlanId(totalDO.getInspPlanId()) + .inspPlanItemId(totalDO.getInspPlanItemId()) + .remark(totalDO.getRemark()) + .build(); + proctionInspTotalMapper.insert(total); + Integer totalId = total.getId(); + + // 3. 如果实测值有数据,批量插入明细表 tqm_proction_insp_detail + List detailList = totalDO.getProctionInspDetailList(); + if (detailList != null && !detailList.isEmpty()) { + int detailSeq = 0; + for (ProctionInspDetailDO detailDO : detailList) { + // 只有实测值有数据才插入 + if (StrUtil.isEmpty(detailDO.getActValue())) { + continue; + } + detailSeq++; + ProctionInspDetailDO detail = ProctionInspDetailDO.builder() + .proctionInspId(proctionInspId) + .inspTotalId(totalId) + .checkCode(checkCode) + .actValue(detailDO.getActValue()) + .seqNo(detailSeq) + .inspPlanId(totalDO.getInspPlanId()) + .inspPlanItemId(totalDO.getInspPlanItemId()) + .build(); + proctionInspDetailMapper.insert(detail); + } + } + } + } + + // 返回检验单号 + return checkCode; + } + + @Override + public void updateProductionInsp(ProductionInspSaveReqVO updateReqVO) { + // 校验存在 + validateProductionInspExists(updateReqVO.getId()); + String checkCode = updateReqVO.getCheckCode(); + + // 设置检验人信息为当前登录用户 + Long userId = getLoginUserId(); + AdminUserDO adminUserDO = adminUserMapper.selectById(userId); + updateReqVO.setCheckUserId(Integer.parseInt(String.valueOf(userId))); + updateReqVO.setCheckUserName(adminUserDO.getNickname()); + // 1. 插入主表 tqm_raw_material_insp + ProductionInspDO productionInsp = BeanUtils.toBean(updateReqVO, ProductionInspDO.class); + productionInspMapper.updateById(productionInsp); + Integer proctionInspId = productionInsp.getId(); + + // 2. 先删除旧的子表数据 + proctionInspDetailMapper.deleteByProctionInspId(Integer.parseInt(updateReqVO.getId())); + proctionInspTotalMapper.deleteByProctionInspId(updateReqVO.getId()); + + // 3. 循环插入汇总表 tqm_proction_insp_total(顺序号由后台生成) + List totalList = updateReqVO.getProctionInspTotalList(); + if (totalList != null && !totalList.isEmpty()) { + int totalSeq = 0; + for (ProctionInspTotalDO totalDO : totalList) { + totalSeq++; + // 插入汇总表 + ProctionInspTotalDO total = ProctionInspTotalDO.builder() + .proctionInspId(String.valueOf(proctionInspId)) + .checkCode(checkCode) + .itemId(totalDO.getItemId()) + .itemName(totalDO.getItemName()) + .standardValue(totalDO.getStandardValue()) + .upperLimit(totalDO.getUpperLimit()) + .lowerLimit(totalDO.getLowerLimit()) + .checkMethod(totalDO.getCheckMethod()) + .actValue(totalDO.getActValue()) + .checkResult(totalDO.getCheckResult()) + .seqNo(totalSeq) + .inspPlanId(totalDO.getInspPlanId()) + .inspPlanItemId(totalDO.getInspPlanItemId()) + .remark(totalDO.getRemark()) + .build(); + proctionInspTotalMapper.insert(total); + Integer totalId = total.getId(); + + // 4. 如果实测值有数据,批量插入明细表 tqm_proction_insp_detail + List detailList = totalDO.getProctionInspDetailList(); + if (detailList != null && !detailList.isEmpty()) { + int detailSeq = 0; + for (ProctionInspDetailDO detailDO : detailList) { + // 只有实测值有数据才插入 + if (StrUtil.isEmpty(detailDO.getActValue())) { + continue; + } + detailSeq++; + ProctionInspDetailDO detail = ProctionInspDetailDO.builder() + .proctionInspId(proctionInspId) + .inspTotalId(totalId) + .checkCode(checkCode) + .actValue(detailDO.getActValue()) + .seqNo(detailSeq) + .inspPlanId(totalDO.getInspPlanId()) + .inspPlanItemId(totalDO.getInspPlanItemId()) + .build(); + proctionInspDetailMapper.insert(detail); + } + } + } + } + + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void deleteProductionInsp(String id) { + // 校验存在 + ProductionInspDO productionInspDO = productionInspMapper.selectById(id); + if (ObjectUtil.isEmpty(productionInspDO)) { + throw exception("该检验单不存在,请刷新界面!"); + } + // 校验状态(已确认或已审核的不允许删除) + if ("1".equals(productionInspDO.getCheckStatus())) { + throw exception("该单据已确认不允许删除,请刷新界面!"); + } + + + // 删除明细表 + proctionInspDetailMapper.deleteByProctionInspId(Integer.parseInt(id)); + + // 删除汇总表 + proctionInspTotalMapper.deleteByProctionInspId(id); + + // 删除主表 + productionInspMapper.deleteById(id); + } + + private void validateProductionInspExists(String id) { + if (productionInspMapper.selectById(id) == null) { + throw exception("数据不存在"); + } + } + /** + * 生成检验单号 + * 格式: CP + 年月日(YYYYMMDD) + 两位流水号 + */ + private String generateCheckCode() { + LocalDate now = LocalDate.now(); + String ym = now.format(DateTimeFormatter.ofPattern("yyyyMMdd")); + + String maxCheckCode = productionInspMapper.selectMaxCheckCode(); + + if (maxCheckCode == null || !maxCheckCode.substring(2, 10).equals(ym)) { + // 查不到数据 或 年月不同,从01开始 + return "CP" + ym + "01"; + } else { + // 年月相同,流水号+1 + String prefix = maxCheckCode.substring(0, 10); + int seq = Integer.parseInt(maxCheckCode.substring(10)) + 1; + return prefix + String.format("%02d", seq); + } + } + @Override + public ProductionInspDO getProductionInsp(String id) { + ProductionInspDO productionInspDO = productionInspMapper.selectById(id); + if (productionInspDO == null) { + return null; + } + // 查询汇总表数据 + List totalList = proctionInspTotalMapper.selectByProctionInspId(productionInspDO.getId()); + // 填充明细数据到汇总表的 proctionInspDetailList + if (totalList != null && !totalList.isEmpty()) { + for (ProctionInspTotalDO total : totalList) { + List detailList = proctionInspDetailMapper.selectList( + new LambdaQueryWrapperX() + .eq(ProctionInspDetailDO::getInspTotalId, total.getId()) + .orderByAsc(ProctionInspDetailDO::getSeqNo) + ); + total.setProctionInspDetailList(detailList); + } + } + productionInspDO.setProctionInspTotalList(totalList); + return productionInspDO; + } + + @Override + public PageResult getProductionInspPage(ProductionInspPageReqVO pageReqVO) { + return productionInspMapper.selectPage(pageReqVO); + } + +} diff --git a/mes-ui/mes-ui-admin-vue3/src/api/biz/inspplanitem/index.ts b/mes-ui/mes-ui-admin-vue3/src/api/biz/inspplanitem/index.ts index 54cd827..0e6f446 100644 --- a/mes-ui/mes-ui-admin-vue3/src/api/biz/inspplanitem/index.ts +++ b/mes-ui/mes-ui-admin-vue3/src/api/biz/inspplanitem/index.ts @@ -51,6 +51,6 @@ export const getInspPlanItemByPlanId = async (id: number) => { return await request.get({ url: `/tba/insp-plan-item/getInspPlanItemByPlanId?planId=` + id }) } -export const selectMaterialId = async (id: number) => { - return await request.get({ url: `/tba/insp-plan-item/selectMaterialId?id=` + id }) +export const selectMaterialId = async (id: number, schemeType: string) => { + return await request.get({ url: `/tba/insp-plan-item/selectMaterialId?id=` + id + `&schemeType=` + schemeType }) } diff --git a/mes-ui/mes-ui-admin-vue3/src/api/biz/matout/index.ts b/mes-ui/mes-ui-admin-vue3/src/api/biz/matout/index.ts new file mode 100644 index 0000000..9350acd --- /dev/null +++ b/mes-ui/mes-ui-admin-vue3/src/api/biz/matout/index.ts @@ -0,0 +1,44 @@ +import request from '@/config/axios' + +export interface MatOutVO { + id: number + outNo: string + planId: number + planNo: string + whInId: number + remark: string + outEmpId: number + outEmpName: string + headNo: string + headId: number +} + +// 查询产出主分页 +export const getMatOutPage = async (params) => { + return await request.get({ url: `/tpo/mat-out/page`, params }) +} + +// 查询产出主详情 +export const getMatOut = async (id: number) => { + return await request.get({ url: `/tpo/mat-out/get?id=` + id }) +} + +// 新增产出主 +export const createMatOut = async (data: MatOutVO) => { + return await request.post({ url: `/tpo/mat-out/create`, data }) +} + +// 修改产出主 +export const updateMatOut = async (data: MatOutVO) => { + return await request.put({ url: `/tpo/mat-out/update`, data }) +} + +// 删除产出主 +export const deleteMatOut = async (id: number) => { + return await request.delete({ url: `/tpo/mat-out/delete?id=` + id }) +} + +// 导出产出主 Excel +export const exportMatOut = async (params) => { + return await request.download({ url: `/tpo/mat-out/export-excel`, params }) +} diff --git a/mes-ui/mes-ui-admin-vue3/src/api/biz/matoutdetail/index.ts b/mes-ui/mes-ui-admin-vue3/src/api/biz/matoutdetail/index.ts new file mode 100644 index 0000000..1b2dbbd --- /dev/null +++ b/mes-ui/mes-ui-admin-vue3/src/api/biz/matoutdetail/index.ts @@ -0,0 +1,57 @@ +import request from '@/config/axios' + +export interface MatOutDetailVO { + id: number + outNo: string + remark: string + outId: number + materialId: number + materialCode: string + materialName: string + spec: string + unit: string + outQty: number + whInDetailId: number + lotNo: string + judgResult: string + matType: string + isInsp: string + inspStatus: string + atoQty: number + storeHouseId: number + storeAreaId: number + storeHouseCd: string + storeHouseName: string + storeAreCd: string + storeAreaName: string +} + +// 查询工序产出子分页 +export const getMatOutDetailPage = async (params) => { + return await request.get({ url: `/tpo/mat-out-detail/page`, params }) +} + +// 查询工序产出子详情 +export const getMatOutDetail = async (id: number) => { + return await request.get({ url: `/tpo/mat-out-detail/get?id=` + id }) +} + +// 新增工序产出子 +export const createMatOutDetail = async (data: MatOutDetailVO) => { + return await request.post({ url: `/tpo/mat-out-detail/create`, data }) +} + +// 修改工序产出子 +export const updateMatOutDetail = async (data: MatOutDetailVO) => { + return await request.put({ url: `/tpo/mat-out-detail/update`, data }) +} + +// 删除工序产出子 +export const deleteMatOutDetail = async (id: number) => { + return await request.delete({ url: `/tpo/mat-out-detail/delete?id=` + id }) +} + +// 导出工序产出子 Excel +export const exportMatOutDetail = async (params) => { + return await request.download({ url: `/tpo/mat-out-detail/export-excel`, params }) +} diff --git a/mes-ui/mes-ui-admin-vue3/src/api/biz/millparamact/index.ts b/mes-ui/mes-ui-admin-vue3/src/api/biz/millparamact/index.ts new file mode 100644 index 0000000..d49a6a8 --- /dev/null +++ b/mes-ui/mes-ui-admin-vue3/src/api/biz/millparamact/index.ts @@ -0,0 +1,52 @@ +import request from '@/config/axios' + +export interface MillParamActVO { + id: number + remark: string + collectTime: Date + shiftCd: string + planId: number + planNo: string + procCdId: number + procCd: string + procName: string + machineId: number + machineNo: string + grndMacCurr: string + dataSource: string + grndMacSpeed: string + outPowTemp: string + inAirTemp: string + grndOutPress: string + collectDate: localdate +} + +// 查询制粉工序参数实绩分页 +export const getMillParamActPage = async (params) => { + return await request.get({ url: `/tpo/mill-param-act/page`, params }) +} + +// 查询制粉工序参数实绩详情 +export const getMillParamAct = async (id: number) => { + return await request.get({ url: `/tpo/mill-param-act/get?id=` + id }) +} + +// 新增制粉工序参数实绩 +export const createMillParamAct = async (data: MillParamActVO) => { + return await request.post({ url: `/tpo/mill-param-act/create`, data }) +} + +// 修改制粉工序参数实绩 +export const updateMillParamAct = async (data: MillParamActVO) => { + return await request.put({ url: `/tpo/mill-param-act/update`, data }) +} + +// 删除制粉工序参数实绩 +export const deleteMillParamAct = async (id: number) => { + return await request.delete({ url: `/tpo/mill-param-act/delete?id=` + id }) +} + +// 导出制粉工序参数实绩 Excel +export const exportMillParamAct = async (params) => { + return await request.download({ url: `/tpo/mill-param-act/export-excel`, params }) +} \ No newline at end of file diff --git a/mes-ui/mes-ui-admin-vue3/src/api/biz/proctioninspdetail/index.ts b/mes-ui/mes-ui-admin-vue3/src/api/biz/proctioninspdetail/index.ts new file mode 100644 index 0000000..d86985b --- /dev/null +++ b/mes-ui/mes-ui-admin-vue3/src/api/biz/proctioninspdetail/index.ts @@ -0,0 +1,44 @@ +import request from '@/config/axios' + +export interface ProctionInspDetailVO { + id: number + actValue: string + remark: string + inspPlanId: number + inspPlanItemId: number + proctionInspId: number + seqNo: number + checkCode: string + inspTotalId: number + fFlowId: string +} + +// 查询产品料检验值明细分页 +export const getProctionInspDetailPage = async (params) => { + return await request.get({ url: `/tqm/proction-insp-detail/page`, params }) +} + +// 查询产品料检验值明细详情 +export const getProctionInspDetail = async (id: number) => { + return await request.get({ url: `/tqm/proction-insp-detail/get?id=` + id }) +} + +// 新增产品料检验值明细 +export const createProctionInspDetail = async (data: ProctionInspDetailVO) => { + return await request.post({ url: `/tqm/proction-insp-detail/create`, data }) +} + +// 修改产品料检验值明细 +export const updateProctionInspDetail = async (data: ProctionInspDetailVO) => { + return await request.put({ url: `/tqm/proction-insp-detail/update`, data }) +} + +// 删除产品料检验值明细 +export const deleteProctionInspDetail = async (id: number) => { + return await request.delete({ url: `/tqm/proction-insp-detail/delete?id=` + id }) +} + +// 导出产品料检验值明细 Excel +export const exportProctionInspDetail = async (params) => { + return await request.download({ url: `/tqm/proction-insp-detail/export-excel`, params }) +} diff --git a/mes-ui/mes-ui-admin-vue3/src/api/biz/proctioninsptotal/index.ts b/mes-ui/mes-ui-admin-vue3/src/api/biz/proctioninsptotal/index.ts new file mode 100644 index 0000000..2285a13 --- /dev/null +++ b/mes-ui/mes-ui-admin-vue3/src/api/biz/proctioninsptotal/index.ts @@ -0,0 +1,50 @@ +import request from '@/config/axios' + +export interface ProctionInspTotalVO { + id: number + actValue: string + remark: string + inspPlanId: number + inspPlanItemId: number + proctionInspId: string + seqNo: number + checkCode: string + checkResult: string + itemId: number + itemName: string + standardValue: string + upperLimit: string + lowerLimit: string + checkMethod: string + printItem: string +} + +// 查询产品检验值汇总分页 +export const getProctionInspTotalPage = async (params) => { + return await request.get({ url: `/tqm/proction-insp-total/page`, params }) +} + +// 查询产品检验值汇总详情 +export const getProctionInspTotal = async (id: number) => { + return await request.get({ url: `/tqm/proction-insp-total/get?id=` + id }) +} + +// 新增产品检验值汇总 +export const createProctionInspTotal = async (data: ProctionInspTotalVO) => { + return await request.post({ url: `/tqm/proction-insp-total/create`, data }) +} + +// 修改产品检验值汇总 +export const updateProctionInspTotal = async (data: ProctionInspTotalVO) => { + return await request.put({ url: `/tqm/proction-insp-total/update`, data }) +} + +// 删除产品检验值汇总 +export const deleteProctionInspTotal = async (id: number) => { + return await request.delete({ url: `/tqm/proction-insp-total/delete?id=` + id }) +} + +// 导出产品检验值汇总 Excel +export const exportProctionInspTotal = async (params) => { + return await request.download({ url: `/tqm/proction-insp-total/export-excel`, params }) +} diff --git a/mes-ui/mes-ui-admin-vue3/src/api/biz/productioninsp/index.ts b/mes-ui/mes-ui-admin-vue3/src/api/biz/productioninsp/index.ts new file mode 100644 index 0000000..eb705ce --- /dev/null +++ b/mes-ui/mes-ui-admin-vue3/src/api/biz/productioninsp/index.ts @@ -0,0 +1,59 @@ +import request from '@/config/axios' + +export interface ProductionInspVO { + id: string + checkCode: string + planId: number + proNo: string + materialId: number + matCode: string + matName: string + spec: string + lotNo: string + outDate: Date + checkDate: Date + checkResult: string + remark: string + formCode: string + qaSchemeBaseId: string + testNum: number + checkUserId: number + checkExUserId: number + checkExDate: Date + checkStatus: string + checkRemark: string + checkUserName: string + checkExUserName: string + outId: number + outMatId: number +} + +// 查询产品检验主分页 +export const getProductionInspPage = async (params) => { + return await request.get({ url: `/tqm/production-insp/page`, params }) +} + +// 查询产品检验主详情 +export const getProductionInsp = async (id: number) => { + return await request.get({ url: `/tqm/production-insp/get?id=` + id }) +} + +// 新增产品检验主 +export const createProductionInsp = async (data: ProductionInspVO) => { + return await request.post({ url: `/tqm/production-insp/create`, data }) +} + +// 修改产品检验主 +export const updateProductionInsp = async (data: ProductionInspVO) => { + return await request.put({ url: `/tqm/production-insp/update`, data }) +} + +// 删除产品检验主 +export const deleteProductionInsp = async (id: number) => { + return await request.delete({ url: `/tqm/production-insp/delete?id=` + id }) +} + +// 导出产品检验主 Excel +export const exportProductionInsp = async (params) => { + return await request.download({ url: `/tqm/production-insp/export-excel`, params }) +} diff --git a/mes-ui/mes-ui-admin-vue3/src/types/auto-components.d.ts b/mes-ui/mes-ui-admin-vue3/src/types/auto-components.d.ts index ec8df3d..11a8628 100644 --- a/mes-ui/mes-ui-admin-vue3/src/types/auto-components.d.ts +++ b/mes-ui/mes-ui-admin-vue3/src/types/auto-components.d.ts @@ -11,7 +11,6 @@ declare module 'vue' { AppLinkSelectDialog: typeof import('./../components/AppLinkInput/AppLinkSelectDialog.vue')['default'] Backtop: typeof import('./../components/Backtop/src/Backtop.vue')['default'] CardTitle: typeof import('./../components/Card/src/CardTitle.vue')['default'] - 'CheckstyleIdea.xml': typeof import('./../../.idea/checkstyle-idea.xml.tmp')['default'] ColorInput: typeof import('./../components/ColorInput/index.vue')['default'] ComponentContainer: typeof import('./../components/DiyEditor/components/ComponentContainer.vue')['default'] ComponentContainerProperty: typeof import('./../components/DiyEditor/components/ComponentContainerProperty.vue')['default'] @@ -33,13 +32,27 @@ declare module 'vue' { Echart: typeof import('./../components/Echart/src/Echart.vue')['default'] Editor: typeof import('./../components/Editor/src/Editor.vue')['default'] ElAlert: typeof import('element-plus/es')['ElAlert'] + ElAside: typeof import('element-plus/es')['ElAside'] + ElAutoResizer: typeof import('element-plus/es')['ElAutoResizer'] ElAvatar: typeof import('element-plus/es')['ElAvatar'] + ElBadge: typeof import('element-plus/es')['ElBadge'] ElButton: typeof import('element-plus/es')['ElButton'] + ElButtonGroup: typeof import('element-plus/es')['ElButtonGroup'] ElCard: typeof import('element-plus/es')['ElCard'] + ElCarousel: typeof import('element-plus/es')['ElCarousel'] + ElCarouselItem: typeof import('element-plus/es')['ElCarouselItem'] + ElCascader: typeof import('element-plus/es')['ElCascader'] ElCheckbox: typeof import('element-plus/es')['ElCheckbox'] ElCheckboxGroup: typeof import('element-plus/es')['ElCheckboxGroup'] ElCol: typeof import('element-plus/es')['ElCol'] + ElCollapse: typeof import('element-plus/es')['ElCollapse'] + ElCollapseItem: typeof import('element-plus/es')['ElCollapseItem'] + ElCollapseTransition: typeof import('element-plus/es')['ElCollapseTransition'] + ElColorPicker: typeof import('element-plus/es')['ElColorPicker'] + ElContainer: typeof import('element-plus/es')['ElContainer'] ElDatePicker: typeof import('element-plus/es')['ElDatePicker'] + ElDescriptions: typeof import('element-plus/es')['ElDescriptions'] + ElDescriptionsItem: typeof import('element-plus/es')['ElDescriptionsItem'] ElDialog: typeof import('element-plus/es')['ElDialog'] ElDivider: typeof import('element-plus/es')['ElDivider'] ElDrawer: typeof import('element-plus/es')['ElDrawer'] @@ -55,27 +68,41 @@ declare module 'vue' { ElementTask: typeof import('./../components/bpmnProcessDesigner/package/penal/task/ElementTask.vue')['default'] ElForm: typeof import('element-plus/es')['ElForm'] ElFormItem: typeof import('element-plus/es')['ElFormItem'] + ElHeader: typeof import('element-plus/es')['ElHeader'] ElIcon: typeof import('element-plus/es')['ElIcon'] + ElImage: typeof import('element-plus/es')['ElImage'] ElImageViewer: typeof import('element-plus/es')['ElImageViewer'] ElInput: typeof import('element-plus/es')['ElInput'] ElInputNumber: typeof import('element-plus/es')['ElInputNumber'] + ElLink: typeof import('element-plus/es')['ElLink'] + ElMain: typeof import('element-plus/es')['ElMain'] ElOption: typeof import('element-plus/es')['ElOption'] ElPagination: typeof import('element-plus/es')['ElPagination'] ElPopover: typeof import('element-plus/es')['ElPopover'] ElRadio: typeof import('element-plus/es')['ElRadio'] ElRadioButton: typeof import('element-plus/es')['ElRadioButton'] ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup'] + ElRate: typeof import('element-plus/es')['ElRate'] ElRow: typeof import('element-plus/es')['ElRow'] ElScrollbar: typeof import('element-plus/es')['ElScrollbar'] ElSelect: typeof import('element-plus/es')['ElSelect'] ElSkeleton: typeof import('element-plus/es')['ElSkeleton'] + ElSlider: typeof import('element-plus/es')['ElSlider'] + ElSpace: typeof import('element-plus/es')['ElSpace'] ElSwitch: typeof import('element-plus/es')['ElSwitch'] ElTable: typeof import('element-plus/es')['ElTable'] ElTableColumn: typeof import('element-plus/es')['ElTableColumn'] + ElTableV2: typeof import('element-plus/es')['ElTableV2'] ElTabPane: typeof import('element-plus/es')['ElTabPane'] ElTabs: typeof import('element-plus/es')['ElTabs'] ElTag: typeof import('element-plus/es')['ElTag'] + ElText: typeof import('element-plus/es')['ElText'] + ElTimeline: typeof import('element-plus/es')['ElTimeline'] + ElTimelineItem: typeof import('element-plus/es')['ElTimelineItem'] + ElTimePicker: typeof import('element-plus/es')['ElTimePicker'] + ElTimeSelect: typeof import('element-plus/es')['ElTimeSelect'] ElTooltip: typeof import('element-plus/es')['ElTooltip'] + ElTransfer: typeof import('element-plus/es')['ElTransfer'] ElTree: typeof import('element-plus/es')['ElTree'] ElTreeSelect: typeof import('element-plus/es')['ElTreeSelect'] ElUpload: typeof import('element-plus/es')['ElUpload'] @@ -91,23 +118,16 @@ declare module 'vue' { InputPassword: typeof import('./../components/InputPassword/src/InputPassword.vue')['default'] InputWithColor: typeof import('./../components/InputWithColor/index.vue')['default'] MagicCubeEditor: typeof import('./../components/MagicCubeEditor/index.vue')['default'] - MaterialSelectDialog: typeof import('./../views/biz/material/MaterialSelectDialog.vue')['default'] Pagination: typeof import('./../components/Pagination/index.vue')['default'] ProcessDesigner: typeof import('./../components/bpmnProcessDesigner/package/designer/ProcessDesigner.vue')['default'] ProcessPalette: typeof import('./../components/bpmnProcessDesigner/package/palette/ProcessPalette.vue')['default'] ProcessViewer: typeof import('./../components/bpmnProcessDesigner/package/designer/ProcessViewer.vue')['default'] PropertiesPanel: typeof import('./../components/bpmnProcessDesigner/package/penal/PropertiesPanel.vue')['default'] - Purorder: typeof import('./../views/biz/purorder/index.vue')['default'] - PurOrderDetail: typeof import('./../views/biz/purorder/PurOrderDetail.vue')['default'] - PurOrderForm: typeof import('./../views/biz/purorder/PurOrderForm.vue')['default'] - Purorderitem: typeof import('./../views/biz/purorderitem/index.vue')['default'] - PurOrderItemForm: typeof import('./../views/biz/purorderitem/PurOrderItemForm.vue')['default'] Qrcode: typeof import('./../components/Qrcode/src/Qrcode.vue')['default'] ReceiveTask: typeof import('./../components/bpmnProcessDesigner/package/penal/task/task-components/ReceiveTask.vue')['default'] RouterLink: typeof import('vue-router')['RouterLink'] RouterSearch: typeof import('./../components/RouterSearch/index.vue')['default'] RouterView: typeof import('vue-router')['RouterView'] - SaleDeliveryDetail: typeof import('./../views/biz/saledelivery/SaleDeliveryDetail.vue')['default'] ScriptTask: typeof import('./../components/bpmnProcessDesigner/package/penal/task/task-components/ScriptTask.vue')['default'] Search: typeof import('./../components/Search/src/Search.vue')['default'] ShortcutDateRangePicker: typeof import('./../components/ShortcutDateRangePicker/index.vue')['default'] @@ -126,7 +146,6 @@ declare module 'vue' { VerifyPoints: typeof import('./../components/Verifition/src/Verify/VerifyPoints.vue')['default'] VerifySlide: typeof import('./../components/Verifition/src/Verify/VerifySlide.vue')['default'] VerticalButtonGroup: typeof import('./../components/VerticalButtonGroup/index.vue')['default'] - 'Workspace.xml': typeof import('./../../.idea/workspace.xml.tmp')['default'] XButton: typeof import('./../components/XButton/src/XButton.vue')['default'] XTextButton: typeof import('./../components/XButton/src/XTextButton.vue')['default'] } diff --git a/mes-ui/mes-ui-admin-vue3/src/types/auto-imports.d.ts b/mes-ui/mes-ui-admin-vue3/src/types/auto-imports.d.ts index f525c74..66aeaec 100644 --- a/mes-ui/mes-ui-admin-vue3/src/types/auto-imports.d.ts +++ b/mes-ui/mes-ui-admin-vue3/src/types/auto-imports.d.ts @@ -7,6 +7,8 @@ export {} declare global { const DICT_TYPE: typeof import('@/utils/dict')['DICT_TYPE'] const EffectScope: typeof import('vue')['EffectScope'] + const ElMessage: typeof import('element-plus/es')['ElMessage'] + const ElMessageBox: typeof import('element-plus/es')['ElMessageBox'] const computed: typeof import('vue')['computed'] const createApp: typeof import('vue')['createApp'] const customRef: typeof import('vue')['customRef'] diff --git a/mes-ui/mes-ui-admin-vue3/src/utils/dict.ts b/mes-ui/mes-ui-admin-vue3/src/utils/dict.ts index 0a9f501..ae36e57 100644 --- a/mes-ui/mes-ui-admin-vue3/src/utils/dict.ts +++ b/mes-ui/mes-ui-admin-vue3/src/utils/dict.ts @@ -228,7 +228,7 @@ export enum DICT_TYPE { MAT_TYPE='mat_type', // 物料类型 MAT_UNIT='mat_unit', // 物料单位 SHIFT_WORK_TYPE='shift_work_type', // 倒班类型 - SHIFT_SCHEDULE='shift_schedule', // 班组 + SHIFT_SCHEDULE='shift_schedule', // 班次 TEAM_OR_GROUP='team_or_group', // 班组 DEVICE_TYPE='device_type', // 设备类型 DEVICE_STATUS='device_status', // 设备状态 @@ -258,6 +258,9 @@ export enum DICT_TYPE { STOCK_OUT_STATUS='stock_out_status', // 出库状态 DELIVERY_METHOD='delivery_method', // 配送方式 BILL_STATUS='bill_status', // 单据状态 + PROCTION_CHECK_STATUS='proction_check_status', // 成品检验单据状态 + INSP_STATUS='insp_status', //检验状态 + diff --git a/mes-ui/mes-ui-admin-vue3/src/views/biz/checkitem/index.vue b/mes-ui/mes-ui-admin-vue3/src/views/biz/checkitem/index.vue index 425664a..48f6c03 100644 --- a/mes-ui/mes-ui-admin-vue3/src/views/biz/checkitem/index.vue +++ b/mes-ui/mes-ui-admin-vue3/src/views/biz/checkitem/index.vue @@ -69,8 +69,8 @@ diff --git a/mes-ui/mes-ui-admin-vue3/src/views/biz/inspplan/index.vue b/mes-ui/mes-ui-admin-vue3/src/views/biz/inspplan/index.vue index 257f110..ce3de9b 100644 --- a/mes-ui/mes-ui-admin-vue3/src/views/biz/inspplan/index.vue +++ b/mes-ui/mes-ui-admin-vue3/src/views/biz/inspplan/index.vue @@ -54,11 +54,14 @@ diff --git a/mes-ui/mes-ui-admin-vue3/src/views/biz/matout/MatOutForm.vue b/mes-ui/mes-ui-admin-vue3/src/views/biz/matout/MatOutForm.vue new file mode 100644 index 0000000..61a92b7 --- /dev/null +++ b/mes-ui/mes-ui-admin-vue3/src/views/biz/matout/MatOutForm.vue @@ -0,0 +1,136 @@ + + diff --git a/mes-ui/mes-ui-admin-vue3/src/views/biz/matout/index.vue b/mes-ui/mes-ui-admin-vue3/src/views/biz/matout/index.vue new file mode 100644 index 0000000..a58f4dc --- /dev/null +++ b/mes-ui/mes-ui-admin-vue3/src/views/biz/matout/index.vue @@ -0,0 +1,274 @@ + + + diff --git a/mes-ui/mes-ui-admin-vue3/src/views/biz/productioninsp/LotNoDialog.vue b/mes-ui/mes-ui-admin-vue3/src/views/biz/productioninsp/LotNoDialog.vue new file mode 100644 index 0000000..0d79f5d --- /dev/null +++ b/mes-ui/mes-ui-admin-vue3/src/views/biz/productioninsp/LotNoDialog.vue @@ -0,0 +1,180 @@ + + + diff --git a/mes-ui/mes-ui-admin-vue3/src/views/biz/productioninsp/ProductionInspForm.vue b/mes-ui/mes-ui-admin-vue3/src/views/biz/productioninsp/ProductionInspForm.vue new file mode 100644 index 0000000..4ae59be --- /dev/null +++ b/mes-ui/mes-ui-admin-vue3/src/views/biz/productioninsp/ProductionInspForm.vue @@ -0,0 +1,787 @@ + + + + diff --git a/mes-ui/mes-ui-admin-vue3/src/views/biz/productioninsp/index.vue b/mes-ui/mes-ui-admin-vue3/src/views/biz/productioninsp/index.vue new file mode 100644 index 0000000..d8d778b --- /dev/null +++ b/mes-ui/mes-ui-admin-vue3/src/views/biz/productioninsp/index.vue @@ -0,0 +1,238 @@ + + + diff --git a/mes-ui/mes-ui-admin-vue3/src/views/biz/rawmaterialinsp/RawMaterialInspForm.vue b/mes-ui/mes-ui-admin-vue3/src/views/biz/rawmaterialinsp/RawMaterialInspForm.vue index f39274d..d64f23a 100644 --- a/mes-ui/mes-ui-admin-vue3/src/views/biz/rawmaterialinsp/RawMaterialInspForm.vue +++ b/mes-ui/mes-ui-admin-vue3/src/views/biz/rawmaterialinsp/RawMaterialInspForm.vue @@ -142,7 +142,7 @@ - +