成品检验
This commit is contained in:
parent
b39f2aba0b
commit
2eef93f948
@ -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<Integer> createHeadNo(@Valid @RequestBody HeadNoSaveReqVO createReqVO) {
|
||||
return success(headNoService.createHeadNo(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新工序抬头单")
|
||||
@PreAuthorize("@ss.hasPermission('tpo:head-no:update')")
|
||||
public CommonResult<Boolean> 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<Boolean> 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<HeadNoRespVO> 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<PageResult<HeadNoRespVO>> getHeadNoPage(@Valid HeadNoPageReqVO pageReqVO) {
|
||||
PageResult<HeadNoDO> 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<HeadNoDO> list = headNoService.getHeadNoPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "工序抬头单.xls", "数据", HeadNoRespVO.class,
|
||||
BeanUtils.toBean(list, HeadNoRespVO.class));
|
||||
}
|
||||
|
||||
}
|
||||
@ -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;
|
||||
|
||||
}
|
||||
@ -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;
|
||||
|
||||
}
|
||||
@ -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;
|
||||
|
||||
}
|
||||
@ -104,8 +104,9 @@ public class InspPlanItemController {
|
||||
@GetMapping("/selectMaterialId")
|
||||
@Operation(summary = "获得检验项目")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
public CommonResult<List<InspPlanItemDO>> selectMaterialId(@RequestParam("id") Integer id) {
|
||||
return success(inspPlanItemService.selectMaterialId(id));
|
||||
@Parameter(name = "schemeType", description = "方案类型", required = true, example = "1")
|
||||
public CommonResult<List<InspPlanItemDO>> selectMaterialId(@RequestParam("id") Integer id, @RequestParam("schemeType") String schemeType) {
|
||||
return success(inspPlanItemService.selectMaterialId(id, schemeType));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -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<Integer> createMatOut(@Valid @RequestBody MatOutSaveReqVO createReqVO) {
|
||||
return success(matOutService.createMatOut(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新产出主")
|
||||
@PreAuthorize("@ss.hasPermission('tpo:mat-out:update')")
|
||||
public CommonResult<Boolean> 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<Boolean> 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<MatOutRespVO> 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<PageResult<MatOutRespVO>> getMatOutPage(@Valid MatOutPageReqVO pageReqVO) {
|
||||
PageResult<MatOutDO> 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<MatOutDO> list = matOutService.getMatOutPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "产出主.xls", "数据", MatOutRespVO.class,
|
||||
BeanUtils.toBean(list, MatOutRespVO.class));
|
||||
}
|
||||
|
||||
}
|
||||
@ -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;
|
||||
|
||||
}
|
||||
@ -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;
|
||||
|
||||
|
||||
}
|
||||
@ -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;
|
||||
|
||||
}
|
||||
@ -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<Integer> createMatOutDetail(@Valid @RequestBody MatOutDetailSaveReqVO createReqVO) {
|
||||
return success(matOutDetailService.createMatOutDetail(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新工序产出子")
|
||||
@PreAuthorize("@ss.hasPermission('tpo:mat-out-detail:update')")
|
||||
public CommonResult<Boolean> 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<Boolean> 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<MatOutDetailRespVO> 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<PageResult<MatOutDetailRespVO>> getMatOutDetailPage(@Valid MatOutDetailPageReqVO pageReqVO) {
|
||||
PageResult<MatOutDetailDO> 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<MatOutDetailDO> list = matOutDetailService.getMatOutDetailPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "工序产出子.xls", "数据", MatOutDetailRespVO.class,
|
||||
BeanUtils.toBean(list, MatOutDetailRespVO.class));
|
||||
}
|
||||
|
||||
}
|
||||
@ -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;
|
||||
|
||||
}
|
||||
@ -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;
|
||||
|
||||
}
|
||||
@ -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;
|
||||
|
||||
}
|
||||
@ -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<Integer> createMillParamAct(@Valid @RequestBody MillParamActSaveReqVO createReqVO) {
|
||||
return success(millParamActService.createMillParamAct(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新制粉工序参数实绩")
|
||||
@PreAuthorize("@ss.hasPermission('tpo:mill-param-act:update')")
|
||||
public CommonResult<Boolean> 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<Boolean> 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<MillParamActRespVO> 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<PageResult<MillParamActRespVO>> getMillParamActPage(@Valid MillParamActPageReqVO pageReqVO) {
|
||||
PageResult<MillParamActDO> 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<MillParamActDO> list = millParamActService.getMillParamActPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "制粉工序参数实绩.xls", "数据", MillParamActRespVO.class,
|
||||
BeanUtils.toBean(list, MillParamActRespVO.class));
|
||||
}
|
||||
|
||||
}
|
||||
@ -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;
|
||||
|
||||
}
|
||||
@ -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;
|
||||
|
||||
}
|
||||
@ -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;
|
||||
|
||||
}
|
||||
@ -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<Integer> createProctionInspDetail(@Valid @RequestBody ProctionInspDetailSaveReqVO createReqVO) {
|
||||
return success(proctionInspDetailService.createProctionInspDetail(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新产品料检验值明细")
|
||||
@PreAuthorize("@ss.hasPermission('tqm:proction-insp-detail:update')")
|
||||
public CommonResult<Boolean> 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<Boolean> 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<ProctionInspDetailRespVO> 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<PageResult<ProctionInspDetailRespVO>> getProctionInspDetailPage(@Valid ProctionInspDetailPageReqVO pageReqVO) {
|
||||
PageResult<ProctionInspDetailDO> 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<ProctionInspDetailDO> list = proctionInspDetailService.getProctionInspDetailPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "产品料检验值明细.xls", "数据", ProctionInspDetailRespVO.class,
|
||||
BeanUtils.toBean(list, ProctionInspDetailRespVO.class));
|
||||
}
|
||||
|
||||
}
|
||||
@ -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;
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -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;
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -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;
|
||||
|
||||
}
|
||||
@ -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<Integer> createProctionInspTotal(@Valid @RequestBody ProctionInspTotalSaveReqVO createReqVO) {
|
||||
return success(proctionInspTotalService.createProctionInspTotal(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新产品检验值汇总")
|
||||
@PreAuthorize("@ss.hasPermission('tqm:proction-insp-total:update')")
|
||||
public CommonResult<Boolean> 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<Boolean> 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<ProctionInspTotalRespVO> 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<PageResult<ProctionInspTotalRespVO>> getProctionInspTotalPage(@Valid ProctionInspTotalPageReqVO pageReqVO) {
|
||||
PageResult<ProctionInspTotalDO> 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<ProctionInspTotalDO> list = proctionInspTotalService.getProctionInspTotalPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "产品检验值汇总.xls", "数据", ProctionInspTotalRespVO.class,
|
||||
BeanUtils.toBean(list, ProctionInspTotalRespVO.class));
|
||||
}
|
||||
|
||||
}
|
||||
@ -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;
|
||||
|
||||
}
|
||||
@ -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;
|
||||
|
||||
}
|
||||
@ -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;
|
||||
|
||||
}
|
||||
@ -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<String> createProductionInsp(@Valid @RequestBody ProductionInspSaveReqVO createReqVO) {
|
||||
return success(productionInspService.createProductionInsp(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新产品检验主")
|
||||
@PreAuthorize("@ss.hasPermission('tqm:production-insp:update')")
|
||||
public CommonResult<Boolean> 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<Boolean> 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<ProductionInspRespVO> 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<PageResult<ProductionInspRespVO>> getProductionInspPage(@Valid ProductionInspPageReqVO pageReqVO) {
|
||||
PageResult<ProductionInspDO> 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<ProductionInspDO> list = productionInspService.getProductionInspPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "产品检验主.xls", "数据", ProductionInspRespVO.class,
|
||||
BeanUtils.toBean(list, ProductionInspRespVO.class));
|
||||
}
|
||||
|
||||
}
|
||||
@ -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;
|
||||
|
||||
}
|
||||
@ -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<ProctionInspTotalDO> proctionInspTotalList;
|
||||
}
|
||||
@ -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<ProctionInspTotalDO> proctionInspTotalList;
|
||||
|
||||
}
|
||||
@ -100,6 +100,6 @@ public class RawMaterialInspSaveReqVO {
|
||||
|
||||
@Schema(description = "采购订单号")
|
||||
private String purOrdNo;
|
||||
@Schema(description = "采购订单号")
|
||||
|
||||
private List<RawMaterialInspTotalDO> rawMaterialInspTotalList;
|
||||
}
|
||||
|
||||
@ -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;
|
||||
|
||||
}
|
||||
@ -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;
|
||||
|
||||
}
|
||||
@ -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;
|
||||
}
|
||||
@ -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;
|
||||
|
||||
}
|
||||
@ -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;
|
||||
|
||||
|
||||
}
|
||||
@ -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<ProctionInspDetailDO> 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;
|
||||
|
||||
}
|
||||
@ -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<ProctionInspTotalDO> proctionInspTotalList;
|
||||
|
||||
|
||||
}
|
||||
@ -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<HeadNoDO> {
|
||||
|
||||
default PageResult<HeadNoDO> selectPage(HeadNoPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<HeadNoDO>()
|
||||
.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));
|
||||
}
|
||||
|
||||
}
|
||||
@ -61,7 +61,7 @@ public interface InspPlanItemMapper extends BaseMapperX<InspPlanItemDO> {
|
||||
.eq(InspPlanItemDO::getSchemeId, schemeId));
|
||||
}
|
||||
|
||||
default List<InspPlanItemDO> selectMaterialId(Integer id){
|
||||
default List<InspPlanItemDO> selectMaterialId(Integer id, String schemeType){
|
||||
MPJLambdaWrapperX<InspPlanItemDO> query = new MPJLambdaWrapperX<>();
|
||||
query.selectAll(InspPlanItemDO.class)
|
||||
.select("p.test_Num as tolNum")
|
||||
@ -72,7 +72,7 @@ public interface InspPlanItemMapper extends BaseMapperX<InspPlanItemDO> {
|
||||
.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);
|
||||
}
|
||||
}
|
||||
|
||||
@ -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<MatOutDO> {
|
||||
|
||||
default PageResult<MatOutDO> selectPage(MatOutPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<MatOutDO>()
|
||||
.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));
|
||||
}
|
||||
|
||||
}
|
||||
@ -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<MatOutDetailDO> {
|
||||
|
||||
default PageResult<MatOutDetailDO> selectPage(MatOutDetailPageReqVO reqVO) {
|
||||
MPJLambdaWrapperX<MatOutDetailDO> 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);
|
||||
}
|
||||
|
||||
}
|
||||
@ -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<MillParamActDO> {
|
||||
|
||||
default PageResult<MillParamActDO> selectPage(MillParamActPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<MillParamActDO>()
|
||||
.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));
|
||||
}
|
||||
|
||||
}
|
||||
@ -28,7 +28,7 @@ public interface PlanMapper extends BaseMapperX<PlanDO> {
|
||||
.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())
|
||||
|
||||
@ -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<ProctionInspDetailDO> {
|
||||
|
||||
default PageResult<ProctionInspDetailDO> selectPage(ProctionInspDetailPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<ProctionInspDetailDO>()
|
||||
.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<ProctionInspDetailDO>()
|
||||
.eq(ProctionInspDetailDO::getProctionInspId, proctionInspId));
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -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<ProctionInspTotalDO> {
|
||||
|
||||
default PageResult<ProctionInspTotalDO> selectPage(ProctionInspTotalPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<ProctionInspTotalDO>()
|
||||
.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<ProctionInspTotalDO>()
|
||||
.eq(ProctionInspTotalDO::getProctionInspId, proctionInspId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据主表id查询汇总列表
|
||||
*/
|
||||
default List<ProctionInspTotalDO> selectByProctionInspId(Integer proctionInspId) {
|
||||
MPJLambdaWrapperX<ProctionInspTotalDO> 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);
|
||||
}
|
||||
|
||||
}
|
||||
@ -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<ProductionInspDO> {
|
||||
|
||||
default PageResult<ProductionInspDO> selectPage(ProductionInspPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<ProductionInspDO>()
|
||||
.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<ProductionInspDO>()
|
||||
.orderByDesc(ProductionInspDO::getCheckCode)
|
||||
.last("LIMIT 1"));
|
||||
return result == null ? null : result.getCheckCode();
|
||||
}
|
||||
|
||||
}
|
||||
@ -58,7 +58,7 @@ public interface RawMaterialInspMapper extends BaseMapperX<RawMaterialInspDO> {
|
||||
.likeIfPresent(RawMaterialInspDO::getCheckExUserName, reqVO.getCheckExUserName())
|
||||
.eqIfPresent(RawMaterialInspDO::getPurOrdId, reqVO.getPurOrdId())
|
||||
.eqIfPresent(RawMaterialInspDO::getPurOrdNo, reqVO.getPurOrdNo())
|
||||
.orderByDesc(RawMaterialInspDO::getId));
|
||||
.orderByDesc(RawMaterialInspDO::getCheckDate));
|
||||
}
|
||||
|
||||
}
|
||||
@ -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<HeadNoDO> getHeadNoPage(HeadNoPageReqVO pageReqVO);
|
||||
|
||||
}
|
||||
@ -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<HeadNoDO> getHeadNoPage(HeadNoPageReqVO pageReqVO) {
|
||||
return headNoMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
}
|
||||
@ -55,5 +55,5 @@ public interface InspPlanItemService {
|
||||
PageResult<InspPlanItemDO> getInspPlanItemPage(InspPlanItemPageReqVO pageReqVO);
|
||||
|
||||
List<InspPlanItemDO> getInspPlanItemByPlanId(Integer planId);
|
||||
List<InspPlanItemDO> selectMaterialId(Integer id);
|
||||
List<InspPlanItemDO> selectMaterialId(Integer id, String schemeType);
|
||||
}
|
||||
|
||||
@ -74,7 +74,7 @@ public class InspPlanItemServiceImpl implements InspPlanItemService {
|
||||
return inspPlanItemMapper.getInspPlanItemByPlanId(planId);
|
||||
}
|
||||
@Override
|
||||
public List<InspPlanItemDO> selectMaterialId(Integer id) {
|
||||
return inspPlanItemMapper.selectMaterialId(id);
|
||||
public List<InspPlanItemDO> selectMaterialId(Integer id, String schemeType) {
|
||||
return inspPlanItemMapper.selectMaterialId(id, schemeType);
|
||||
}
|
||||
}
|
||||
|
||||
@ -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<MatOutDO> getMatOutPage(MatOutPageReqVO pageReqVO);
|
||||
|
||||
}
|
||||
@ -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<MatOutDO> getMatOutPage(MatOutPageReqVO pageReqVO) {
|
||||
return matOutMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
}
|
||||
@ -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<MatOutDetailDO> getMatOutDetailPage(MatOutDetailPageReqVO pageReqVO);
|
||||
|
||||
}
|
||||
@ -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<MatOutDetailDO> getMatOutDetailPage(MatOutDetailPageReqVO pageReqVO) {
|
||||
return matOutDetailMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
}
|
||||
@ -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<MillParamActDO> getMillParamActPage(MillParamActPageReqVO pageReqVO);
|
||||
|
||||
}
|
||||
@ -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<MillParamActDO> getMillParamActPage(MillParamActPageReqVO pageReqVO) {
|
||||
return millParamActMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
}
|
||||
@ -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<ProctionInspDetailDO> getProctionInspDetailPage(ProctionInspDetailPageReqVO pageReqVO);
|
||||
|
||||
}
|
||||
@ -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<ProctionInspDetailDO> getProctionInspDetailPage(ProctionInspDetailPageReqVO pageReqVO) {
|
||||
return proctionInspDetailMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
}
|
||||
@ -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<ProctionInspTotalDO> getProctionInspTotalPage(ProctionInspTotalPageReqVO pageReqVO);
|
||||
|
||||
}
|
||||
@ -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<ProctionInspTotalDO> getProctionInspTotalPage(ProctionInspTotalPageReqVO pageReqVO) {
|
||||
return proctionInspTotalMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
}
|
||||
@ -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<ProductionInspDO> getProductionInspPage(ProductionInspPageReqVO pageReqVO);
|
||||
|
||||
}
|
||||
@ -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<ProctionInspTotalDO> 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<ProctionInspDetailDO> 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<ProctionInspTotalDO> 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<ProctionInspDetailDO> 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<ProctionInspTotalDO> totalList = proctionInspTotalMapper.selectByProctionInspId(productionInspDO.getId());
|
||||
// 填充明细数据到汇总表的 proctionInspDetailList
|
||||
if (totalList != null && !totalList.isEmpty()) {
|
||||
for (ProctionInspTotalDO total : totalList) {
|
||||
List<ProctionInspDetailDO> detailList = proctionInspDetailMapper.selectList(
|
||||
new LambdaQueryWrapperX<ProctionInspDetailDO>()
|
||||
.eq(ProctionInspDetailDO::getInspTotalId, total.getId())
|
||||
.orderByAsc(ProctionInspDetailDO::getSeqNo)
|
||||
);
|
||||
total.setProctionInspDetailList(detailList);
|
||||
}
|
||||
}
|
||||
productionInspDO.setProctionInspTotalList(totalList);
|
||||
return productionInspDO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<ProductionInspDO> getProductionInspPage(ProductionInspPageReqVO pageReqVO) {
|
||||
return productionInspMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
}
|
||||
@ -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 })
|
||||
}
|
||||
|
||||
44
mes-ui/mes-ui-admin-vue3/src/api/biz/matout/index.ts
Normal file
44
mes-ui/mes-ui-admin-vue3/src/api/biz/matout/index.ts
Normal file
@ -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 })
|
||||
}
|
||||
57
mes-ui/mes-ui-admin-vue3/src/api/biz/matoutdetail/index.ts
Normal file
57
mes-ui/mes-ui-admin-vue3/src/api/biz/matoutdetail/index.ts
Normal file
@ -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 })
|
||||
}
|
||||
52
mes-ui/mes-ui-admin-vue3/src/api/biz/millparamact/index.ts
Normal file
52
mes-ui/mes-ui-admin-vue3/src/api/biz/millparamact/index.ts
Normal file
@ -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 })
|
||||
}
|
||||
@ -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 })
|
||||
}
|
||||
@ -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 })
|
||||
}
|
||||
59
mes-ui/mes-ui-admin-vue3/src/api/biz/productioninsp/index.ts
Normal file
59
mes-ui/mes-ui-admin-vue3/src/api/biz/productioninsp/index.ts
Normal file
@ -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 })
|
||||
}
|
||||
@ -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']
|
||||
}
|
||||
|
||||
@ -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']
|
||||
|
||||
@ -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', //检验状态
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -69,8 +69,8 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="检验大类" align="center" prop="itemClass" width="120">
|
||||
<template #default="scope">
|
||||
<dict-tag :type="DICT_TYPE.RAW_MATERIALS_TYPE" :value="scope.row.itemType" v-if="scope.row.itemType==1"/>
|
||||
<dict-tag :type="DICT_TYPE.FINISHED_PRODUCT_TYPE" :value="scope.row.itemType" v-if="scope.row.itemType==3"/>
|
||||
<dict-tag :type="DICT_TYPE.RAW_MATERIALS_TYPE" :value="scope.row.itemClass" v-if="scope.row.itemType==1"/>
|
||||
<dict-tag :type="DICT_TYPE.FINISHED_PRODUCT_TYPE" :value="scope.row.itemClass" v-if="scope.row.itemType==3"/>
|
||||
<span v-if="scope.row.itemType!=1 && scope.row.itemType!=3"></span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
@ -54,11 +54,14 @@
|
||||
<el-table-column label="适用类型" align="center" prop="schemeType">
|
||||
<template #default="scope">
|
||||
<dict-tag :type="DICT_TYPE.MAT_TYPE" :value="scope.row.schemeType" />
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="产品大类" align="center" prop="tiemClass" >
|
||||
<template #default="scope">
|
||||
<dict-tag :type="DICT_TYPE.CLASSIFICATION_CODE" :value="scope.row.tiemClass" />
|
||||
<dict-tag :type="DICT_TYPE.CLASSIFICATION_CODE" :value="scope.row.tiemClass" v-if="scope.row.schemeType==1" />
|
||||
<span v-if="scope.row.schemeType!=1"></span>
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="表单编号" align="center" prop="formCode" />
|
||||
|
||||
136
mes-ui/mes-ui-admin-vue3/src/views/biz/matout/MatOutForm.vue
Normal file
136
mes-ui/mes-ui-admin-vue3/src/views/biz/matout/MatOutForm.vue
Normal file
@ -0,0 +1,136 @@
|
||||
<template>
|
||||
<Dialog :title="dialogTitle" v-model="dialogVisible" width="800px">
|
||||
<el-form
|
||||
ref="formRef"
|
||||
:model="formData"
|
||||
:rules="formRules"
|
||||
label-width="110px"
|
||||
v-loading="formLoading"
|
||||
>
|
||||
<el-form-item label="产出单号(O+年份+月份+ 日 +2位流水号)" prop="outNo">
|
||||
<el-input v-model="formData.outNo" placeholder="请输入产出单号(O+年份+月份+ 日 +2位流水号)" />
|
||||
</el-form-item>
|
||||
<el-form-item label="生产计划id" prop="planId">
|
||||
<el-input v-model="formData.planId" placeholder="请输入生产计划id" />
|
||||
</el-form-item>
|
||||
<el-form-item label="生产计划号" prop="planNo">
|
||||
<el-input v-model="formData.planNo" placeholder="请输入生产计划号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="入库id" prop="whInId">
|
||||
<el-input v-model="formData.whInId" placeholder="请输入入库id" />
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="formData.remark" placeholder="请输入备注" />
|
||||
</el-form-item>
|
||||
<el-form-item label="产出人id" prop="outEmpId">
|
||||
<el-input v-model="formData.outEmpId" placeholder="请输入产出人id" />
|
||||
</el-form-item>
|
||||
<el-form-item label="产出人名称" prop="outEmpName">
|
||||
<el-input v-model="formData.outEmpName" placeholder="请输入产出人名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="抬头单号" prop="headNo">
|
||||
<el-input v-model="formData.headNo" placeholder="请输入抬头单号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="抬头单id" prop="headId">
|
||||
<el-input v-model="formData.headId" placeholder="请输入抬头单id" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<el-button @click="submitForm" type="primary" :disabled="formLoading">确 定</el-button>
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
</template>
|
||||
</Dialog>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import * as MatOutApi from '@/api/biz/matout'
|
||||
import { watch } from 'vue'
|
||||
|
||||
const { t } = useI18n() // 国际化
|
||||
const message = useMessage() // 消息弹窗
|
||||
|
||||
const dialogVisible = ref(false) // 弹窗的是否展示
|
||||
const dialogTitle = ref('') // 弹窗的标题
|
||||
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
||||
const formType = ref('') // 表单的类型:create - 新增;update - 修改
|
||||
const formData = ref({
|
||||
id: undefined,
|
||||
outNo: undefined,
|
||||
planId: undefined,
|
||||
planNo: undefined,
|
||||
whInId: undefined,
|
||||
remark: undefined,
|
||||
outEmpId: undefined,
|
||||
outEmpName: undefined,
|
||||
headNo: undefined,
|
||||
headId: undefined,
|
||||
})
|
||||
/** 弹窗关闭时通知父组件 */
|
||||
watch(dialogVisible, (val) => {
|
||||
if (!val) {
|
||||
emit('close')
|
||||
}
|
||||
})
|
||||
|
||||
const formRules = reactive({
|
||||
})
|
||||
const formRef = ref() // 表单 Ref
|
||||
|
||||
/** 打开弹窗 */
|
||||
const open = async (type: string, id?: number) => {
|
||||
dialogVisible.value = true
|
||||
dialogTitle.value = t('action.' + type)
|
||||
formType.value = type
|
||||
resetForm()
|
||||
// 修改时,设置数据
|
||||
if (id) {
|
||||
formLoading.value = true
|
||||
try {
|
||||
formData.value = await MatOutApi.getMatOut(id)
|
||||
} finally {
|
||||
formLoading.value = false
|
||||
}
|
||||
}
|
||||
}
|
||||
defineExpose({ open }) // 提供 open 方法,用于打开弹窗
|
||||
|
||||
/** 提交表单 */
|
||||
const emit = defineEmits(['success', 'close']) // 定义 success 事件,用于操作成功后的回调
|
||||
const submitForm = async () => {
|
||||
// 校验表单
|
||||
await formRef.value.validate()
|
||||
// 提交请求
|
||||
formLoading.value = true
|
||||
try {
|
||||
const data = formData.value as unknown as MatOutApi.MatOutVO
|
||||
if (formType.value === 'create') {
|
||||
await MatOutApi.createMatOut(data)
|
||||
message.success(t('common.createSuccess'))
|
||||
} else {
|
||||
await MatOutApi.updateMatOut(data)
|
||||
message.success(t('common.updateSuccess'))
|
||||
}
|
||||
dialogVisible.value = false
|
||||
// 发送操作成功的事件
|
||||
emit('success')
|
||||
} finally {
|
||||
formLoading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
/** 重置表单 */
|
||||
const resetForm = () => {
|
||||
formData.value = {
|
||||
id: undefined,
|
||||
outNo: undefined,
|
||||
planId: undefined,
|
||||
planNo: undefined,
|
||||
whInId: undefined,
|
||||
remark: undefined,
|
||||
outEmpId: undefined,
|
||||
outEmpName: undefined,
|
||||
headNo: undefined,
|
||||
headId: undefined,
|
||||
}
|
||||
formRef.value?.resetFields()
|
||||
}
|
||||
</script>
|
||||
274
mes-ui/mes-ui-admin-vue3/src/views/biz/matout/index.vue
Normal file
274
mes-ui/mes-ui-admin-vue3/src/views/biz/matout/index.vue
Normal file
@ -0,0 +1,274 @@
|
||||
<template>
|
||||
<ContentWrap>
|
||||
<!-- 搜索工作栏 -->
|
||||
<el-form
|
||||
class="-mb-15px"
|
||||
:model="queryParams"
|
||||
ref="queryFormRef"
|
||||
:inline="true"
|
||||
label-width="80px"
|
||||
>
|
||||
<el-form-item label="创建时间" prop="createTime">
|
||||
<el-date-picker
|
||||
v-model="queryParams.createTime"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
type="daterange"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
:default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="产出单号(O+年份+月份+ 日 +2位流水号)" prop="outNo">
|
||||
<el-input
|
||||
v-model="queryParams.outNo"
|
||||
placeholder="请输入产出单号(O+年份+月份+ 日 +2位流水号)"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="生产计划id" prop="planId">
|
||||
<el-input
|
||||
v-model="queryParams.planId"
|
||||
placeholder="请输入生产计划id"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="生产计划号" prop="planNo">
|
||||
<el-input
|
||||
v-model="queryParams.planNo"
|
||||
placeholder="请输入生产计划号"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="入库id" prop="whInId">
|
||||
<el-input
|
||||
v-model="queryParams.whInId"
|
||||
placeholder="请输入入库id"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input
|
||||
v-model="queryParams.remark"
|
||||
placeholder="请输入备注"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="产出人id" prop="outEmpId">
|
||||
<el-input
|
||||
v-model="queryParams.outEmpId"
|
||||
placeholder="请输入产出人id"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="产出人名称" prop="outEmpName">
|
||||
<el-input
|
||||
v-model="queryParams.outEmpName"
|
||||
placeholder="请输入产出人名称"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="抬头单号" prop="headNo">
|
||||
<el-input
|
||||
v-model="queryParams.headNo"
|
||||
placeholder="请输入抬头单号"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="抬头单id" prop="headId">
|
||||
<el-input
|
||||
v-model="queryParams.headId"
|
||||
placeholder="请输入抬头单id"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="handleQuery"><Icon icon="ep:search" class="mr-5px" /> 搜索</el-button>
|
||||
<el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
@click="openForm('create')"
|
||||
v-hasPermi="['tpo:mat-out:create']"
|
||||
>
|
||||
<Icon icon="ep:plus" class="mr-5px" /> 新增
|
||||
</el-button>
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
@click="handleExport"
|
||||
:loading="exportLoading"
|
||||
v-hasPermi="['tpo:mat-out:export']"
|
||||
>
|
||||
<Icon icon="ep:download" class="mr-5px" /> 导出
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</ContentWrap>
|
||||
|
||||
<!-- 列表 -->
|
||||
<ContentWrap>
|
||||
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
|
||||
<el-table-column label="序号" align="center" type="index" width="60px"/>
|
||||
<el-table-column
|
||||
label="创建时间"
|
||||
align="center"
|
||||
prop="createTime"
|
||||
:formatter="dateFormatter"
|
||||
width="180px"
|
||||
/>
|
||||
<el-table-column label="产出单号(O+年份+月份+ 日 +2位流水号)" align="center" prop="outNo" />
|
||||
<el-table-column label="生产计划id" align="center" prop="planId" />
|
||||
<el-table-column label="生产计划号" align="center" prop="planNo" />
|
||||
<el-table-column label="入库id" align="center" prop="whInId" />
|
||||
<el-table-column label="备注" align="center" prop="remark" />
|
||||
<el-table-column label="产出人id" align="center" prop="outEmpId" />
|
||||
<el-table-column label="产出人名称" align="center" prop="outEmpName" />
|
||||
<el-table-column label="抬头单号" align="center" prop="headNo" />
|
||||
<el-table-column label="抬头单id" align="center" prop="headId" />
|
||||
<el-table-column label="操作" align="center">
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
@click="openForm('update', scope.row.id)"
|
||||
v-hasPermi="['tpo:mat-out:update']"
|
||||
>
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button
|
||||
link
|
||||
type="danger"
|
||||
@click="handleDelete(scope.row.id)"
|
||||
v-hasPermi="['tpo:mat-out:delete']"
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- 分页 -->
|
||||
<Pagination
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNo"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</ContentWrap>
|
||||
|
||||
<!-- 表单弹窗:添加/修改 -->
|
||||
<MatOutForm ref="formRef" @success="getList" @close="handleQuery"/>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { dateFormatter } from '@/utils/formatTime'
|
||||
import download from '@/utils/download'
|
||||
import * as MatOutApi from '@/api/biz/matout'
|
||||
import MatOutForm from './MatOutForm.vue'
|
||||
|
||||
defineOptions({ name: 'MatOut' })
|
||||
|
||||
const message = useMessage() // 消息弹窗
|
||||
const { t } = useI18n() // 国际化
|
||||
|
||||
const loading = ref(false) // 列表的加载中(默认不加载)
|
||||
const list = ref([]) // 列表的数据
|
||||
const total = ref(0) // 列表的总页数
|
||||
const queryParams = reactive({
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
createTime: [],
|
||||
outNo: undefined,
|
||||
planId: undefined,
|
||||
planNo: undefined,
|
||||
whInId: undefined,
|
||||
remark: undefined,
|
||||
outEmpId: undefined,
|
||||
outEmpName: undefined,
|
||||
headNo: undefined,
|
||||
headId: undefined,
|
||||
})
|
||||
const queryFormRef = ref() // 搜索的表单
|
||||
const exportLoading = ref(false) // 导出的加载中
|
||||
|
||||
/** 查询列表 */
|
||||
const getList = async () => {
|
||||
loading.value = true
|
||||
try {
|
||||
const data = await MatOutApi.getMatOutPage(queryParams)
|
||||
list.value = data.list
|
||||
total.value = data.total
|
||||
} finally {
|
||||
loading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
const handleQuery = () => {
|
||||
queryParams.pageNo = 1
|
||||
getList()
|
||||
}
|
||||
|
||||
/** 重置按钮操作 */
|
||||
const resetQuery = () => {
|
||||
queryFormRef.value.resetFields()
|
||||
handleQuery()
|
||||
}
|
||||
|
||||
/** 添加/修改操作 */
|
||||
const formRef = ref()
|
||||
const openForm = (type: string, id?: number) => {
|
||||
formRef.value.open(type, id)
|
||||
}
|
||||
|
||||
/** 删除按钮操作 */
|
||||
const handleDelete = async (id: number) => {
|
||||
try {
|
||||
// 删除的二次确认
|
||||
await message.delConfirm()
|
||||
// 发起删除
|
||||
await MatOutApi.deleteMatOut(id)
|
||||
message.success(t('common.delSuccess'))
|
||||
// 刷新列表
|
||||
await getList()
|
||||
} catch {}
|
||||
}
|
||||
|
||||
/** 导出按钮操作 */
|
||||
const handleExport = async () => {
|
||||
try {
|
||||
// 导出的二次确认
|
||||
await message.exportConfirm()
|
||||
// 发起导出
|
||||
exportLoading.value = true
|
||||
const data = await MatOutApi.exportMatOut(queryParams)
|
||||
download.excel(data, '产出主.xls')
|
||||
} catch {
|
||||
} finally {
|
||||
exportLoading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
/** 初始化 **/
|
||||
onMounted(() => {
|
||||
// 默认不自动查询,需手动点击搜索按钮
|
||||
})
|
||||
</script>
|
||||
@ -0,0 +1,180 @@
|
||||
<template>
|
||||
<Dialog :title="'产品信息'" v-model="dialogVisible" width="1000px">
|
||||
<!-- 搜索栏 -->
|
||||
<el-form :model="queryParams" ref="queryFormRef" :inline="true" class="-mb-15px">
|
||||
<el-form-item label="生产日期" prop="checkDate">
|
||||
<el-date-picker
|
||||
v-model="queryParams.outDate"
|
||||
value-format="YYYY-MM-DD"
|
||||
type="daterange"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
class="!w-240px"
|
||||
:clearable="false"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="批次号" prop="lotNo">
|
||||
<el-input v-model="queryParams.lotNo" placeholder="请输入批次号" clearable class="!w-240px" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="handleQuery">
|
||||
<Icon icon="ep:search" class="mr-5px" /> 搜索
|
||||
</el-button>
|
||||
<el-button @click="resetQuery">
|
||||
<Icon icon="ep:refresh" class="mr-5px" /> 重置
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<!-- 表格 -->
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="list"
|
||||
:stripe="true"
|
||||
ref="tableRef"
|
||||
@row-dblclick="handleRowDblclick"
|
||||
border
|
||||
>
|
||||
<el-table-column width="60" align="center">
|
||||
<template #default="scope">
|
||||
<el-radio
|
||||
:model-value="selectedRow?.id"
|
||||
:label="scope.row.id"
|
||||
@change="handleRadioChange(scope.row)"
|
||||
>
|
||||
<span></span>
|
||||
</el-radio>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column type="index" label="序号" width="60" align="center" />
|
||||
<el-table-column label="批次号" prop="lotNo" align="center" min-width="120" />
|
||||
<el-table-column label="物料名称" prop="materialName" align="center" min-width="150" />
|
||||
<el-table-column label="生产日期" prop="outDate" align="center" min-width="120" :formatter="dateFormatter2"/>
|
||||
<el-table-column label="生产班次" prop="shiftCd" align="center" min-width="100" >
|
||||
<template #default="scope">
|
||||
<dict-tag :type="DICT_TYPE.SHIFT_SCHEDULE" :value="scope.row.shiftCd" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料类型" prop="matType" align="center" width="100">
|
||||
<template #default="scope">
|
||||
<dict-tag :type="DICT_TYPE.MAT_TYPE" :value="scope.row.matType" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="检验状态" prop="inspStatus" align="center" width="100" >
|
||||
<template #default="scope">
|
||||
<dict-tag :type="DICT_TYPE.INSP_STATUS" :value="scope.row.inspStatus"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="机台名称" prop="machineName" align="center" min-width="150" />
|
||||
</el-table>
|
||||
|
||||
<template #footer>
|
||||
<div style="display: flex; justify-content: flex-end; align-items: center; padding: 10px 0;">
|
||||
<Pagination
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNo"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
style="margin-right: auto;"
|
||||
/>
|
||||
<div style="display: flex; gap: 10px; flex-shrink: 0;">
|
||||
<el-button @click="handleConfirm" :disabled="!selectedRow" type="primary">确 定</el-button>
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</Dialog>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import * as MatoutDetailApi from '@/api/biz/matoutdetail'
|
||||
import { DICT_TYPE } from '@/utils/dict'
|
||||
import {dateFormatter2} from "@/utils/formatTime";
|
||||
|
||||
const dialogVisible = ref(false)
|
||||
const loading = ref(false)
|
||||
const list = ref<MatoutDetailApi.MatOutDetailVO[]>([])
|
||||
const total = ref(0)
|
||||
const selectedRow = ref<MatoutDetailApi.MatOutDetailVO | null>(null)
|
||||
const tableRef = ref()
|
||||
const queryFormRef = ref()
|
||||
/** 获取当月第一天到今天的日期范围(格式:YYYY-MM-DD) */
|
||||
const getDefaultDateRange = (): [string, string] => {
|
||||
const now = new Date()
|
||||
const firstDay = new Date(now.getFullYear(), now.getMonth(), 1)
|
||||
const pad = (n: number) => String(n).padStart(2, '0')
|
||||
const fmt = (d: Date) =>
|
||||
`${d.getFullYear()}-${pad(d.getMonth() + 1)}-${pad(d.getDate())}`
|
||||
return [fmt(firstDay), fmt(now)]
|
||||
}
|
||||
const queryParams = reactive({
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
outDate: getDefaultDateRange(),
|
||||
matType: 3,
|
||||
inspStatus:0,
|
||||
lotNo:undefined
|
||||
})
|
||||
|
||||
const emit = defineEmits(['confirm'])
|
||||
|
||||
// 打开弹窗,支持传入已选中的物料进行回显
|
||||
const open = (selected?: MatoutDetailApi.MatOutDetailVO) => {
|
||||
dialogVisible.value = true
|
||||
selectedRow.value = selected || null
|
||||
queryParams.lotNo=undefined
|
||||
queryParams.pageNo=1
|
||||
queryParams.outDate=getDefaultDateRange()
|
||||
list.value=[]
|
||||
total.value=0
|
||||
// resetQuery()
|
||||
}
|
||||
|
||||
defineExpose({ open })
|
||||
|
||||
// 查询列表
|
||||
const getList = async () => {
|
||||
loading.value = true
|
||||
try {
|
||||
const data = await MatoutDetailApi.getMatOutDetailPage(queryParams)
|
||||
list.value = data.list
|
||||
total.value = data.total
|
||||
} finally {
|
||||
loading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
// 搜索
|
||||
const handleQuery = () => {
|
||||
queryParams.pageNo = 1
|
||||
getList()
|
||||
}
|
||||
|
||||
// 重置
|
||||
const resetQuery = () => {
|
||||
queryFormRef.value?.resetFields()
|
||||
queryParams.pageNo = 1
|
||||
getList()
|
||||
}
|
||||
|
||||
// 单选框选中变化 - 仅记录选中行,点击确定按钮再传给父组件
|
||||
const handleRadioChange = (row: MatoutDetailApi.MatOutDetailVO) => {
|
||||
selectedRow.value = row
|
||||
}
|
||||
|
||||
// 双击行 - 选中并关闭弹窗
|
||||
const handleRowDblclick = (row: MatoutDetailApi.MatOutDetailVO) => {
|
||||
selectedRow.value = row
|
||||
emit('confirm', row)
|
||||
dialogVisible.value = false
|
||||
}
|
||||
|
||||
// 确认选择
|
||||
const handleConfirm = () => {
|
||||
if (selectedRow.value) {
|
||||
emit('confirm', selectedRow.value)
|
||||
dialogVisible.value = false
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@ -0,0 +1,787 @@
|
||||
<template>
|
||||
<el-card class="hl-card" style="position: relative">
|
||||
<template #header>
|
||||
<span><span v-html="dialogTitle"></span>页</span>
|
||||
</template>
|
||||
<el-form
|
||||
ref="formRef"
|
||||
:model="formData"
|
||||
:rules="formRules"
|
||||
label-width="120px"
|
||||
v-loading="formLoading"
|
||||
:disabled="formType === 'details'"
|
||||
>
|
||||
|
||||
<!-- 单据信息 -->
|
||||
<el-card class="hl-card-info">
|
||||
<template #header>
|
||||
<div class="hl-card-info-icona"></div>
|
||||
<span class="hl-card-info-text">单据信息</span>
|
||||
</template>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="6">
|
||||
<el-form-item label="批次号" prop="lotNo" >
|
||||
<el-select
|
||||
v-model="formData.lotNo"
|
||||
placeholder="请选择批次号"
|
||||
class="!w-full"
|
||||
clearable
|
||||
@click="openLotNoDialog"
|
||||
@clear="handleClearLotNo"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="产品名称" prop="matName" >
|
||||
<el-select
|
||||
v-model="formData.matName"
|
||||
placeholder="请选择产品名称"
|
||||
class="!w-full"
|
||||
clearable
|
||||
disabled
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="规格型号" prop="spec">
|
||||
<el-input v-model="formData.spec" placeholder="请输入规格型号" disabled clearable/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="6">
|
||||
<el-form-item label="检验单号" prop="checkCode">
|
||||
<el-input v-model="formData.checkCode" placeholder="自动生成" disabled class="!w-full"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="6">
|
||||
<el-form-item label="计划号" prop="proNo">
|
||||
<el-input v-model="formData.proNo" placeholder="请输入计划号" disabled clearable/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="生产日期" prop="outDate" >
|
||||
<el-date-picker
|
||||
v-model="formData.outDate"
|
||||
type="date"
|
||||
value-format="YYYY-MM-DD"
|
||||
placeholder="选择生产日期"
|
||||
class="!w-full"
|
||||
clearable
|
||||
disabled
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="单据状态" prop="checkStatus" >
|
||||
<el-select v-model="formData.checkStatus" placeholder="请选择单据状态" class="!w-full"
|
||||
disabled clearable>
|
||||
<el-option
|
||||
v-for="dict in getStrDictOptions(DICT_TYPE.PROCTION_CHECK_STATUS)"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="实测数量" prop="testNum">
|
||||
<el-input v-model="formData.testNum" placeholder="请输入实测数量" disabled class="!w-full"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="6">
|
||||
<el-form-item label="检验日期" prop="checkDate" >
|
||||
<el-date-picker
|
||||
v-model="formData.checkDate"
|
||||
type="date"
|
||||
value-format="YYYY-MM-DD"
|
||||
placeholder="选择检验日期"
|
||||
class="!w-full"
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="检验结果" prop="checkResult" >
|
||||
<el-select v-model="formData.checkResult" placeholder="请选择检验结果" class="!w-full"
|
||||
clearable filterable>
|
||||
<el-option
|
||||
v-for="dict in getStrDictOptions(DICT_TYPE.CHECK_RESULT)"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input
|
||||
v-model="formData.remark"
|
||||
type="textarea"
|
||||
:rows="4"
|
||||
placeholder="请输入备注"
|
||||
class="!w-full"
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<!-- 项目信息 -->
|
||||
<el-card class="hl-card-info" style="margin-top: 20px;">
|
||||
<template #header>
|
||||
<div style="display: flex; justify-content: space-between; align-items: center;">
|
||||
<div>
|
||||
<div class="hl-card-info-icona"></div>
|
||||
<span class="hl-card-info-text">项目信息</span>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<el-table :data="formData.proctionInspTotalList" border style="width: 100%" row-key="id" :row-class-name="getRowClassName">
|
||||
<el-table-column type="expand" width="50" align="center">
|
||||
<template #default="scope">
|
||||
<div style="padding: 10px 20px;">
|
||||
<el-row :gutter="4">
|
||||
<el-col v-for="item in getExtraDetails(scope.row)" :key="item.index" :span="3" style="margin-bottom: 8px;">
|
||||
<div style="text-align: center; margin-bottom: 4px; font-size: 12px;">实测值{{ item.index }}</div>
|
||||
<!-- 数字类型 -->
|
||||
<el-input-number
|
||||
v-if="scope.row.itemValueType === 'I'"
|
||||
v-model="item.item.actValue"
|
||||
:precision="scope.row.floatNum ?? 2"
|
||||
:controls="false"
|
||||
placeholder="请输入"
|
||||
class="!w-full"
|
||||
clearable
|
||||
@change="calcAverage(scope.row); autoJudge(scope.row)"
|
||||
|
||||
/>
|
||||
<!-- 文本类型:有绑定值则下拉,无则手动录入 -->
|
||||
<el-select
|
||||
v-else-if="getItemContentOptions(scope.row.itemContent).length > 0"
|
||||
v-model="item.item.actValue"
|
||||
placeholder="请选择"
|
||||
clearable
|
||||
filterable
|
||||
class="!w-full"
|
||||
>
|
||||
<el-option
|
||||
v-for="opt in getItemContentOptions(scope.row.itemContent)"
|
||||
:key="opt"
|
||||
:label="opt"
|
||||
:value="opt"
|
||||
/>
|
||||
</el-select>
|
||||
<el-input
|
||||
v-else
|
||||
v-model="item.item.actValue"
|
||||
placeholder="请输入"
|
||||
class="!w-full"
|
||||
clearable
|
||||
/>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column type="index" label="序号" width="60" align="center"/>
|
||||
<el-table-column label="项目名称" prop="itemName" align="center" width="200px"/>
|
||||
<el-table-column label="检验标准" prop="checkMethod" align="center" width="200px"/>
|
||||
<!-- 前5个实测值 -->
|
||||
<el-table-column
|
||||
v-for="index in formData.testNum"
|
||||
:key="index"
|
||||
label="实测值"
|
||||
align="center"
|
||||
width="120"
|
||||
>
|
||||
<template #default="scope">
|
||||
<template v-if=" scope.row.proctionInspDetailList && scope.row.proctionInspDetailList[index - 1]">
|
||||
<!-- 数字类型 -->
|
||||
<el-input-number
|
||||
v-if="scope.row.itemValueType === 'I'"
|
||||
v-model.number="scope.row.proctionInspDetailList[index - 1].actValue"
|
||||
:precision="scope.row.floatNum ?? 2"
|
||||
:controls="false"
|
||||
placeholder="请输入"
|
||||
class="!w-full"
|
||||
clearable
|
||||
@change="calcAverage(scope.row); autoJudge(scope.row)"
|
||||
/>
|
||||
<!-- 文本类型:有绑定值则下拉 -->
|
||||
<el-select
|
||||
v-else-if="getItemContentOptions(scope.row.itemContent).length > 0"
|
||||
v-model="scope.row.proctionInspDetailList[index - 1].actValue"
|
||||
placeholder="请选择"
|
||||
clearable
|
||||
filterable
|
||||
class="!w-full"
|
||||
>
|
||||
<el-option
|
||||
v-for="opt in getItemContentOptions(scope.row.itemContent)"
|
||||
:key="opt"
|
||||
:label="opt"
|
||||
:value="opt"
|
||||
/>
|
||||
</el-select>
|
||||
<!-- 文本类型:无绑定值则手动录入 -->
|
||||
<el-input
|
||||
v-else
|
||||
v-model="scope.row.proctionInspDetailList[index - 1].actValue"
|
||||
placeholder="请输入"
|
||||
class="!w-full"
|
||||
clearable
|
||||
/>
|
||||
</template>
|
||||
<span v-else></span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- 平均值:数字类型自动计算(只读),文本类型手动录入 -->
|
||||
<el-table-column label="平均值" align="center" width="120">
|
||||
<template #default="scope">
|
||||
<el-input
|
||||
v-if="scope.row.itemValueType === 'T'"
|
||||
v-model="scope.row.actValue"
|
||||
placeholder="请输入"
|
||||
clearable
|
||||
/>
|
||||
<span v-else>{{ scope.row.actValue != null ? scope.row.actValue : '' }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- 单项判定:数字类型自动判定,文本类型手动选择 -->
|
||||
<el-table-column label="单项判定" align="center" width="120">
|
||||
<template #default="scope">
|
||||
<el-select
|
||||
v-if="scope.row.itemValueType "
|
||||
v-model="scope.row.checkResult"
|
||||
placeholder="请选择"
|
||||
clearable
|
||||
filterable
|
||||
@change="handleSingleJudgmentChange()"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in getCheckResultOptions()"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="标准值" prop="standardValue" align="center" width="120">
|
||||
<template #default="scope">
|
||||
<el-input v-model="scope.row.standardValue" placeholder="请输入" clearable/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="上限值" prop="upperLimit" align="center" width="120">
|
||||
<template #default="scope">
|
||||
<el-input v-model="scope.row.upperLimit" placeholder="请输入" clearable/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="下限值" prop="lowerLimit" align="center" width="120">
|
||||
<template #default="scope">
|
||||
<el-input v-model="scope.row.lowerLimit" placeholder="请输入" clearable/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="备注" prop="remark" align="center" width="180">
|
||||
<template #default="scope">
|
||||
<el-input v-model="scope.row.remark" placeholder="请输入" clearable/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="展示顺序" prop="seqNo" align="center" width="100" />
|
||||
|
||||
</el-table>
|
||||
|
||||
</el-card>
|
||||
</el-card>
|
||||
</el-form>
|
||||
<!-- 底部按钮 -->
|
||||
<div style="display: flex; justify-content: center; gap: 16px; margin-top: 24px;">
|
||||
<template v-if="formType !== 'details'">
|
||||
<el-button type="primary" @click="handleSave" :loading="formLoading">保存</el-button>
|
||||
<el-button type="primary" @click="handleIssue" :loading="formLoading">确认</el-button>
|
||||
</template>
|
||||
<el-button @click="goBack()">取消</el-button>
|
||||
</div>
|
||||
|
||||
</el-card>
|
||||
<LotNoDialog ref="LotNoDialogRef" @confirm="handleLotNoConfirm"/>
|
||||
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import * as productionInspApi from '@/api/biz/productioninsp'
|
||||
import * as InspplanitemApi from '@/api/biz/inspplanitem'
|
||||
import {nextTick, watch} from 'vue'
|
||||
import {DICT_TYPE, getStrDictOptions} from "@/utils/dict";
|
||||
import { useTagsViewStore } from '@/store/modules/tagsView'
|
||||
|
||||
import dayjs from "dayjs";
|
||||
import LotNoDialog from "./LotNoDialog.vue";
|
||||
|
||||
const {query} = useRoute()
|
||||
|
||||
const { t } = useI18n() // 国际化
|
||||
const message = useMessage() // 消息弹窗
|
||||
const router = useRouter()
|
||||
const LotNoDialogRef = ref()
|
||||
|
||||
const dialogVisible = ref(false) // 弹窗的是否展示
|
||||
const dialogTitle = ref('') // 弹窗的标题
|
||||
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
||||
const formType = ref('') // 表单的类型:create - 新增;update - 修改
|
||||
const formData = ref({
|
||||
id: undefined,
|
||||
checkCode: undefined,
|
||||
planId: undefined,
|
||||
proNo: undefined,
|
||||
materialId: undefined,
|
||||
matCode: undefined,
|
||||
matName: undefined,
|
||||
spec: undefined,
|
||||
lotNo: undefined,
|
||||
outDate: undefined as string | undefined,
|
||||
checkDate: undefined as string | undefined,
|
||||
checkResult: '0',
|
||||
remark: undefined,
|
||||
formCode: undefined,
|
||||
qaSchemeBaseId: undefined,
|
||||
testNum: undefined,
|
||||
checkUserId: undefined,
|
||||
checkExUserId: undefined,
|
||||
checkExDate: undefined,
|
||||
checkStatus: '0',
|
||||
checkRemark: undefined,
|
||||
checkUserName: undefined,
|
||||
checkExUserName: undefined,
|
||||
outId: undefined,
|
||||
outMatId: undefined,
|
||||
proctionInspTotalList: [] as any
|
||||
})
|
||||
/** 弹窗关闭时通知父组件 */
|
||||
watch(dialogVisible, (val) => {
|
||||
if (!val) {
|
||||
emit('close')
|
||||
}
|
||||
})
|
||||
|
||||
// 监听检测值变化,自动计算平均值和判定(兼容 clearable 和删除操作)
|
||||
watch(
|
||||
() => formData.value.proctionInspTotalList,
|
||||
(list) => {
|
||||
if (!list || list.length === 0) return
|
||||
list.forEach((item: any) => {
|
||||
if (item.itemValueType === 'I') {
|
||||
// 只在有实际输入值时触发计算
|
||||
const hasValue = (item.proctionInspDetailList || []).some(
|
||||
(d: any) => d.actValue != null && d.actValue !== ''
|
||||
)
|
||||
if (hasValue || item.actValue != null) {
|
||||
calcAverage(item)
|
||||
autoJudge(item)
|
||||
}
|
||||
}
|
||||
})
|
||||
updateOverallCheckResult()
|
||||
},
|
||||
{ deep: true }
|
||||
)
|
||||
|
||||
const formRules = reactive({
|
||||
lotNo: [{ required: true, message: '批次号不能为空', trigger: 'chang' }],
|
||||
matName: [{ required: true, message: '产品名称不能为空', trigger: 'chang' }],
|
||||
checkDate: [{ required: true, message: '检验日期不能为空', trigger: 'chang' }],
|
||||
outDate: [{ required: true, message: '生产日期不能为空', trigger: 'chang' }],
|
||||
checkStatus: [{ required: true, message: '单据状态不能为空', trigger: 'chang' }],
|
||||
checkResult: [{ required: true, message: '检验结果不能为空', trigger: 'chang' }],
|
||||
})
|
||||
const formRef = ref() // 表单 Ref
|
||||
|
||||
// 行 class 名称,用于隐藏无需展开行的箭头
|
||||
const getRowClassName = ({ row }: { row: any }) => {
|
||||
if (!row.testNum || row.testNum <= 0) {
|
||||
return 'hl-row-no-expand'
|
||||
}
|
||||
return ''
|
||||
}
|
||||
|
||||
|
||||
const getExtraDetails = (row: any) => {
|
||||
const details = row.proctionInspDetailList || []
|
||||
return details
|
||||
.map((item: any, i: number) => ({ index: i + 1, item }))
|
||||
.filter(item => item.index <= (row.testNum || 0))
|
||||
}
|
||||
// 解析itemContent逗号分隔的选项列表
|
||||
const getItemContentOptions = (itemContent?: string) => {
|
||||
if (!itemContent) return []
|
||||
return itemContent.split(',').map(s => s.trim()).filter(Boolean)
|
||||
}
|
||||
|
||||
// 获取检验结果字典选项,过滤掉值等于3的
|
||||
const getCheckResultOptions = () => {
|
||||
return getStrDictOptions(DICT_TYPE.CHECK_RESULT).filter(d => d.value != '2')
|
||||
}
|
||||
|
||||
// 计算平均值(数字类型)
|
||||
const calcAverage = (row: any) => {
|
||||
if (row.itemValueType !== 'I') return
|
||||
const values = (row.proctionInspDetailList || [])
|
||||
.filter((d: any) => d.actValue != null && d.actValue !== '')
|
||||
.map((d: any) => Number(d.actValue))
|
||||
.filter((v: number) => !isNaN(v))
|
||||
if (values.length === 0) {
|
||||
// 没有检测值时清空平均值并继续执行 autoJudge 清空单项判定
|
||||
row.actValue = undefined
|
||||
autoJudge(row)
|
||||
return
|
||||
}
|
||||
const sum = values.reduce((a: number, b: number) => a + b, 0)
|
||||
const avg = sum / values.length
|
||||
const floatNum = row.floatNum ?? 2
|
||||
row.actValue = avg.toFixed(floatNum)
|
||||
}
|
||||
|
||||
// 自动判定(数字类型)
|
||||
const autoJudge = (row: any) => {
|
||||
if (row.itemValueType !== 'I') return
|
||||
const values = (row.proctionInspDetailList || [])
|
||||
.filter((d: any) => d.actValue != null && d.actValue !== '')
|
||||
.map((d: any) => Number(d.actValue))
|
||||
.filter((v: number) => !isNaN(v))
|
||||
// 没有检测值时清空单项判定
|
||||
if (values.length === 0 || row.actValue == null) {
|
||||
row.checkResult = undefined
|
||||
updateOverallCheckResult()
|
||||
return
|
||||
}
|
||||
const val = Number(row.actValue)
|
||||
const upper = row.upperLimit != null ? Number(row.upperLimit) : undefined
|
||||
const lower = row.lowerLimit != null ? Number(row.lowerLimit) : undefined
|
||||
|
||||
if (upper != null && lower != null) {
|
||||
row.checkResult = (val >= lower && val <= upper) ? '0' : '1'
|
||||
} else if (upper != null) {
|
||||
row.checkResult = val <= upper ? '0' : '1'
|
||||
} else if (lower != null) {
|
||||
row.checkResult = val >= lower ? '0' : '1'
|
||||
}
|
||||
updateOverallCheckResult()
|
||||
}
|
||||
|
||||
|
||||
// 单项判定变更时更新整体检验结果
|
||||
const handleSingleJudgmentChange = () => {
|
||||
updateOverallCheckResult()
|
||||
}
|
||||
|
||||
// 更新整体检验结果
|
||||
const updateOverallCheckResult = () => {
|
||||
const list = formData.value.proctionInspTotalList
|
||||
if (!list || list.length === 0) {
|
||||
formData.value.checkResult = '0'
|
||||
return
|
||||
}
|
||||
|
||||
// 只考虑有值的项目(非空)
|
||||
const valuedItems = list.filter((item: any) => item.checkResult != null && item.checkResult !== '')
|
||||
if (valuedItems.length === 0) {
|
||||
formData.value.checkResult = '0'
|
||||
return
|
||||
}
|
||||
|
||||
// 有任何一个不合格 → 整体不合格('1'=不合格)
|
||||
const hasUnqualified = valuedItems.some((item: any) => item.checkResult === '1')
|
||||
// 所有有值的都合格 → 整体合格('0'=合格)
|
||||
const allQualified = valuedItems.every((item: any) => item.checkResult === '0')
|
||||
|
||||
if (hasUnqualified) {
|
||||
formData.value.checkResult = '1'
|
||||
} else if (allQualified) {
|
||||
formData.value.checkResult = '0'
|
||||
}
|
||||
// 既有合格又有空值时,保持原值不变
|
||||
}
|
||||
|
||||
|
||||
let initialized = false
|
||||
onMounted(() => {
|
||||
if (initialized) return
|
||||
initialized = true
|
||||
queryData(query.active as string, query.id ? Number(query.id) : undefined).catch((error) => {
|
||||
console.error('初始化失败:', error)
|
||||
})
|
||||
})
|
||||
/** 打开弹窗 */
|
||||
const queryData = async (type: string, id ?: number) => {
|
||||
dialogTitle.value = t('action.' + type)
|
||||
formType.value = type
|
||||
resetForm()
|
||||
formLoading.value = true
|
||||
try {
|
||||
if (id) {
|
||||
formData.value = await productionInspApi.getProductionInsp(id)
|
||||
formData.value.checkDate = formData.value.checkDate ? dayjs(formData.value.checkDate).format('YYYY-MM-DD') : undefined
|
||||
formData.value.outDate = formData.value.outDate ? dayjs(formData.value.outDate).format('YYYY-MM-DD') : undefined
|
||||
// 确保 proctionInspDetailList 已初始化
|
||||
const totalList = formData.value.proctionInspTotalList || []
|
||||
totalList.forEach((item: any) => {
|
||||
if (!item.proctionInspDetailList) {
|
||||
item.proctionInspDetailList = []
|
||||
}
|
||||
const num = (item.testNum || 0) > (formData.value.testNum || 0) ? (item.testNum || 0) : (formData.value.testNum || 0)
|
||||
for (let i = item.proctionInspDetailList.length; i < num; i++) {
|
||||
item.proctionInspDetailList.push({ actValue: undefined })
|
||||
}
|
||||
})
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('加载数据失败:', error)
|
||||
message.error('数据加载失败')
|
||||
} finally {
|
||||
formLoading.value = false
|
||||
await nextTick(() => formRef.value?.clearValidate())
|
||||
}
|
||||
}
|
||||
// 返回上一级(列表页),兼容动态路由未加载的情况
|
||||
const goBack = async () => {
|
||||
// 关闭当前页面页签,然后返回上一页
|
||||
const currentRoute = router.currentRoute.value
|
||||
const tagsViewStore = useTagsViewStore()
|
||||
tagsViewStore.delView(currentRoute)
|
||||
sessionStorage.setItem('NEED_REFRESH_LIST', 'true')
|
||||
router.replace({ name: 'ProductionInsp' })
|
||||
}
|
||||
// 保存
|
||||
const handleSave = async () => {
|
||||
formData.value.checkStatus = '0' as any
|
||||
await doSave('保存成功')
|
||||
}
|
||||
|
||||
// 下发
|
||||
const handleIssue = async () => {
|
||||
formData.value.checkStatus = '1' as any
|
||||
await doSave('确认成功')
|
||||
}
|
||||
// 通用的保存操作
|
||||
const doSave = async (successMsg: string) => {
|
||||
if (formLoading.value) return
|
||||
formLoading.value = true
|
||||
|
||||
try {
|
||||
await formRef.value.validate()
|
||||
// 自定义业务校验
|
||||
validateBizRules()
|
||||
const data = formData.value as unknown as productionInspApi.ProductionInspVO
|
||||
if (formType.value === 'create') {
|
||||
await productionInspApi.createProductionInsp(data)
|
||||
} else {
|
||||
await productionInspApi.updateProductionInsp(data)
|
||||
}
|
||||
message.success(successMsg)
|
||||
// 返回列表页
|
||||
await goBack()
|
||||
} catch (e: any) {
|
||||
// validate 校验失败时会 reject,Element Plus 会自动显示红色提示,
|
||||
// API 异常已被 catch 捕获,此处无需额外处理
|
||||
if (typeof e === 'string') {
|
||||
message.warning(e)
|
||||
}
|
||||
} finally {
|
||||
formLoading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
// 业务规则校验
|
||||
const validateBizRules = () => {
|
||||
// 2. 实测数量
|
||||
const testNum = formData.value.testNum
|
||||
if (testNum == null || Number(testNum) === 0) {
|
||||
throw '该原料没有维护质检方案,请先维护质检方案!'
|
||||
}
|
||||
|
||||
// 3. 检验结果
|
||||
if (formData.value.checkResult == null || formData.value.checkResult === '') {
|
||||
throw '检验结果不能为空,请确认!'
|
||||
}
|
||||
|
||||
// 4. 项目信息列表循环校验
|
||||
const list = formData.value.proctionInspTotalList || []
|
||||
for (const item of list) {
|
||||
const itemName = item.itemName || '未知项目'
|
||||
|
||||
// 4c. 数值类型字段校验
|
||||
if (item.itemValueType === 'I') {
|
||||
// 校验实测值是否为有效数字
|
||||
const details = item.proctionInspDetailList || []
|
||||
for (let i = 0; i < details.length; i++) {
|
||||
const val = details[i].actValue
|
||||
if (val != null && val !== '' && isNaN(Number(val))) {
|
||||
throw `检验项目(${itemName})第${i + 1}个实测值请输入有效数字`
|
||||
}
|
||||
}
|
||||
// 校验标准值、上限值、下限值
|
||||
;['standardValue', 'upperLimit', 'lowerLimit'].forEach((field) => {
|
||||
const fv = item[field]
|
||||
if (fv != null && fv !== '' && isNaN(Number(fv))) {
|
||||
const fieldLabel = field === 'standardValue' ? '标准值' : field === 'upperLimit' ? '上限值' : '下限值'
|
||||
throw `检验项目(${itemName})${fieldLabel}请输入有效数字`
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 4b. 实测值必须按顺序录入
|
||||
const details = item.proctionInspDetailList || []
|
||||
let foundEmpty = false
|
||||
for (let i = 0; i < details.length; i++) {
|
||||
const val = details[i].actValue
|
||||
if (val == null || val === '') {
|
||||
foundEmpty = true
|
||||
} else if (foundEmpty) {
|
||||
// 当前有值但前面存在空值 → 未按顺序
|
||||
throw `检验项目(${itemName})实测值必须按顺序录入,请确认!`
|
||||
}
|
||||
}
|
||||
|
||||
// 4a. 实测值有值但单项判定为空
|
||||
const hasDetailValue = details.some((d: any) => d.actValue != null && d.actValue !== '')
|
||||
if (hasDetailValue && (item.checkResult == null || item.checkResult === '')) {
|
||||
throw `检验项目(${itemName}),实测值已录入,单项判定不能为空!`
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// 批次号弹窗确认回调
|
||||
const handleLotNoConfirm = async (row: any) => {
|
||||
console.log(row)
|
||||
formData.value.materialId = row.materialId
|
||||
formData.value.matCode = row.materialCode
|
||||
formData.value.matName = row.materialName
|
||||
formData.value.spec = row.spec
|
||||
formData.value.lotNo = row.lotNo
|
||||
formData.value.outDate = row.outDate ? dayjs(row.outDate).format('YYYY-MM-DD') : undefined
|
||||
formData.value.planId = row.planId
|
||||
formData.value.proNo = row.planNo
|
||||
formData.value.outId = row.outId
|
||||
formData.value.outMatId = row.id
|
||||
|
||||
const list = await InspplanitemApi.selectMaterialId(row.materialId, '3')
|
||||
if (list && list.length > 0) {
|
||||
// 初始化每行的实测值明细列表
|
||||
list.forEach((item: any) => {
|
||||
if (!item.proctionInspDetailList) {
|
||||
item.proctionInspDetailList = []
|
||||
}
|
||||
const num = (item.testNum || 0) > (item.tolNum || 0) ? (item.testNum || 0) : (item.tolNum || 0)
|
||||
for (let i = item.proctionInspDetailList.length; i < num; i++) {
|
||||
item.proctionInspDetailList.push({ actValue: undefined })
|
||||
}
|
||||
})
|
||||
// 映射字段
|
||||
list.forEach((item: any) => {
|
||||
item.inspPlanItemId = item.id
|
||||
item.inspPlanId = item.schemeId
|
||||
})
|
||||
formData.value.proctionInspTotalList = list
|
||||
formData.value.testNum = list[0].tolNum
|
||||
formData.value.formCode = list[0].formCode
|
||||
formData.value.qaSchemeBaseId = list[0].schemeId
|
||||
// 初始化时自动计算数字类型的平均值和判定
|
||||
list.forEach((item: any) => {
|
||||
if (item.itemValueType === 'I') {
|
||||
calcAverage(item)
|
||||
autoJudge(item)
|
||||
}
|
||||
})
|
||||
updateOverallCheckResult()
|
||||
} else {
|
||||
formData.value.proctionInspTotalList = []
|
||||
formData.value.testNum = undefined
|
||||
}
|
||||
}
|
||||
|
||||
// 打开批次号选择弹窗
|
||||
const openLotNoDialog = () => {
|
||||
if (formData.value.lotNo) {
|
||||
LotNoDialogRef.value?.open({
|
||||
id: formData.value.outMatId
|
||||
})
|
||||
} else {
|
||||
LotNoDialogRef.value?.open()
|
||||
}
|
||||
}
|
||||
// 清除批次号
|
||||
const handleClearLotNo = () => {
|
||||
formData.value.materialId = undefined
|
||||
formData.value.matCode = undefined
|
||||
formData.value.matName = undefined
|
||||
formData.value.spec = undefined
|
||||
formData.value.lotNo = undefined
|
||||
formData.value.outDate =undefined
|
||||
formData.value.planId = undefined
|
||||
formData.value.proNo = undefined
|
||||
formData.value.outId = undefined
|
||||
formData.value.outMatId = undefined
|
||||
formData.value.testNum = undefined
|
||||
formData.value.formCode = undefined
|
||||
formData.value.qaSchemeBaseId = undefined
|
||||
}
|
||||
|
||||
/** 提交表单 */
|
||||
const emit = defineEmits(['success', 'close']) // 定义 success 事件,用于操作成功后的回调
|
||||
/** 重置表单 */
|
||||
const resetForm = () => {
|
||||
formData.value = {
|
||||
id: undefined,
|
||||
checkCode: undefined,
|
||||
planId: undefined,
|
||||
proNo: undefined,
|
||||
materialId: undefined,
|
||||
matCode: undefined,
|
||||
matName: undefined,
|
||||
spec: undefined,
|
||||
lotNo: undefined,
|
||||
outDate: undefined as string | undefined,
|
||||
checkDate: undefined as string | undefined,
|
||||
checkResult: '0',
|
||||
remark: undefined,
|
||||
formCode: undefined,
|
||||
qaSchemeBaseId: undefined,
|
||||
testNum: undefined,
|
||||
checkUserId: undefined,
|
||||
checkExUserId: undefined,
|
||||
checkExDate: undefined,
|
||||
checkStatus: '0',
|
||||
checkRemark: undefined,
|
||||
checkUserName: undefined,
|
||||
checkExUserName: undefined,
|
||||
outId: undefined,
|
||||
outMatId: undefined,
|
||||
proctionInspTotalList: [],
|
||||
}
|
||||
formRef.value?.resetFields()
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
/* el-input-number 输入框文本左对齐 */
|
||||
.el-input-number :deep(.el-input__inner) {
|
||||
text-align: left !important;
|
||||
}
|
||||
|
||||
/* testNum <= 5 时隐藏展开箭头 */
|
||||
:deep(.hl-row-no-expand .el-table__expand-icon) {
|
||||
visibility: hidden;
|
||||
pointer-events: none;
|
||||
}
|
||||
</style>
|
||||
238
mes-ui/mes-ui-admin-vue3/src/views/biz/productioninsp/index.vue
Normal file
238
mes-ui/mes-ui-admin-vue3/src/views/biz/productioninsp/index.vue
Normal file
@ -0,0 +1,238 @@
|
||||
<template>
|
||||
<ContentWrap>
|
||||
<!-- 搜索工作栏 -->
|
||||
<el-form
|
||||
class="-mb-15px"
|
||||
:model="queryParams"
|
||||
ref="queryFormRef"
|
||||
:inline="true"
|
||||
label-width="80px"
|
||||
>
|
||||
<el-form-item label="检验日期" prop="checkDate">
|
||||
<el-date-picker
|
||||
v-model="queryParams.checkDate"
|
||||
value-format="YYYY-MM-DD"
|
||||
type="daterange"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
class="!w-240px"
|
||||
:clearable="false"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="物料名称" prop="matName">
|
||||
<el-input
|
||||
v-model="queryParams.matName"
|
||||
placeholder="请输入物料名称"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
class="!w-200px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="单据状态" prop="checkStatus">
|
||||
<el-select
|
||||
v-model="queryParams.checkStatus"
|
||||
placeholder="请选择单据状态"
|
||||
clearable
|
||||
class="!w-240px"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in getStrDictOptions(DICT_TYPE.PROCTION_CHECK_STATUS)"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/> </el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="handleQuery"><Icon icon="ep:search" class="mr-5px" /> 搜索</el-button>
|
||||
<el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
@click="openForm('create')"
|
||||
>
|
||||
<Icon icon="ep:plus" class="mr-5px" /> 新增
|
||||
</el-button>
|
||||
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</ContentWrap>
|
||||
|
||||
<!-- 列表 -->
|
||||
<ContentWrap>
|
||||
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true" border>
|
||||
<el-table-column label="序号" align="center" type="index" width="60px"/>
|
||||
<el-table-column label="检验单号" align="center" prop="checkCode" width="150" />
|
||||
<el-table-column label="产品名称" align="center" prop="matName" width="150"/>
|
||||
<el-table-column label="规格型号" align="center" prop="spec" width="150" />
|
||||
<el-table-column label="检验结果" align="center" prop="checkResult" width="120">
|
||||
<template #default="scope">
|
||||
<dict-tag :type="DICT_TYPE.CHECK_RESULT" :value="scope.row.checkResult"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="检验人员" align="center" prop="checkUserName" width="120"/>
|
||||
<el-table-column label="生产日期" align="center" prop="outDate" :formatter="dateFormatter2" width="120"/>
|
||||
<el-table-column label="批次号" align="center" prop="lotNo" width="150"/>
|
||||
<el-table-column label="检验日期" align="center" prop="checkDate" :formatter="dateFormatter2" width="120"/>
|
||||
<el-table-column label="生产计划号" align="center" prop="proNo" width="150"/>
|
||||
<el-table-column label="单据状态" align="center" prop="checkStatus" fixed="right" width="120">
|
||||
<template #default="scope">
|
||||
<dict-tag :type="DICT_TYPE.PROCTION_CHECK_STATUS" :value="scope.row.checkStatus"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
|
||||
<el-table-column label="操作" align="center" fixed="right" width="180">
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
@click="openForm('update', scope.row.id)"
|
||||
v-if="scope.row.checkStatus === '0'"
|
||||
>
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button
|
||||
link
|
||||
type="danger"
|
||||
@click="handleDelete(scope.row.id)"
|
||||
v-if="scope.row.checkStatus === '0'"
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
@click="openForm('details', scope.row.id)"
|
||||
v-if="scope.row.checkStatus === '1'"
|
||||
>
|
||||
详情
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- 分页 -->
|
||||
<Pagination
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNo"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</ContentWrap>
|
||||
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { dateFormatter2} from '@/utils/formatTime'
|
||||
import * as ProductionInspApi from '@/api/biz/productioninsp'
|
||||
import {getStrDictOptions,DICT_TYPE} from "@/utils/dict";
|
||||
import router from "@/router";
|
||||
|
||||
defineOptions({ name: 'ProductionInsp' })
|
||||
|
||||
const message = useMessage() // 消息弹窗
|
||||
const { t } = useI18n() // 国际化
|
||||
|
||||
const loading = ref(false) // 列表的加载中(默认不加载)
|
||||
const list = ref([]) // 列表的数据
|
||||
const total = ref(0) // 列表的总页数
|
||||
/** 获取当月第一天到今天的日期范围(格式:YYYY-MM-DD) */
|
||||
const getDefaultDateRange = (): [string, string] => {
|
||||
const now = new Date()
|
||||
const firstDay = new Date(now.getFullYear(), now.getMonth(), 1)
|
||||
const pad = (n: number) => String(n).padStart(2, '0')
|
||||
const fmt = (d: Date) =>
|
||||
`${d.getFullYear()}-${pad(d.getMonth() + 1)}-${pad(d.getDate())}`
|
||||
return [fmt(firstDay), fmt(now)]
|
||||
}
|
||||
const queryParams = reactive({
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
checkCode: undefined,
|
||||
planId: undefined,
|
||||
proNo: undefined,
|
||||
materialId: undefined,
|
||||
matCode: undefined,
|
||||
matName: undefined,
|
||||
spec: undefined,
|
||||
lotNo: undefined,
|
||||
outDate: [],
|
||||
checkDate: getDefaultDateRange(),
|
||||
checkResult: undefined,
|
||||
remark: undefined,
|
||||
createTime: [],
|
||||
formCode: undefined,
|
||||
qaSchemeBaseId: undefined,
|
||||
testNum: undefined,
|
||||
checkUserId: undefined,
|
||||
checkExUserId: undefined,
|
||||
checkExDate: [],
|
||||
checkStatus: undefined,
|
||||
checkRemark: undefined,
|
||||
checkUserName: undefined,
|
||||
checkExUserName: undefined,
|
||||
outId: undefined,
|
||||
outMatId: undefined,
|
||||
})
|
||||
const queryFormRef = ref() // 搜索的表单
|
||||
|
||||
/** 查询列表 */
|
||||
const getList = async () => {
|
||||
loading.value = true
|
||||
try {
|
||||
const data = await ProductionInspApi.getProductionInspPage(queryParams)
|
||||
list.value = data.list
|
||||
total.value = data.total
|
||||
} finally {
|
||||
loading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
const handleQuery = () => {
|
||||
queryParams.pageNo = 1
|
||||
getList()
|
||||
}
|
||||
|
||||
/** 重置按钮操作 */
|
||||
const resetQuery = () => {
|
||||
queryFormRef.value.resetFields()
|
||||
handleQuery()
|
||||
}
|
||||
|
||||
/** 添加/修改操作 */
|
||||
|
||||
const openForm = (type: string, id?: number) => {
|
||||
sessionStorage.setItem('NEED_REFRESH_LIST', 'true')
|
||||
router.push({
|
||||
name: 'ProductionInspForm',
|
||||
query: {
|
||||
active: type,
|
||||
id: id
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/** 删除按钮操作 */
|
||||
const handleDelete = async (id: number) => {
|
||||
try {
|
||||
// 删除的二次确认
|
||||
await message.delConfirm()
|
||||
// 发起删除
|
||||
await ProductionInspApi.deleteProductionInsp(id)
|
||||
message.success(t('common.delSuccess'))
|
||||
// 刷新列表
|
||||
await getList()
|
||||
} catch {}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/** 初始化与缓存激活 **/
|
||||
onActivated(() => {
|
||||
// 只有在从表单页面返回时才自动查询
|
||||
if (sessionStorage.getItem('NEED_REFRESH_LIST') === 'true') {
|
||||
sessionStorage.removeItem('NEED_REFRESH_LIST')
|
||||
getList()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
@ -142,7 +142,7 @@
|
||||
<el-select v-model="formData.checkResult" placeholder="请选择检验结果" class="!w-full"
|
||||
clearable filterable>
|
||||
<el-option
|
||||
v-for="dict in getCheckResultOptions()"
|
||||
v-for="dict in getStrDictOptions(DICT_TYPE.CHECK_RESULT)"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
@ -238,16 +238,16 @@
|
||||
<el-table-column type="index" label="序号" width="60" align="center"/>
|
||||
<el-table-column label="项目名称" prop="itemName" align="center" width="200px"/>
|
||||
<el-table-column label="检验标准" prop="checkMethod" align="center" width="200px"/>
|
||||
<!-- 前5个实测值 -->
|
||||
|
||||
<el-table-column
|
||||
v-for="index in 5"
|
||||
v-for="index in formData.testNum"
|
||||
:key="index"
|
||||
label="实测值"
|
||||
align="center"
|
||||
width="120"
|
||||
>
|
||||
<template #default="scope">
|
||||
<template v-if="index <= scope.row.testNum && scope.row.rawMaterialInspDetailList && scope.row.rawMaterialInspDetailList[index - 1]">
|
||||
<template v-if="scope.row.rawMaterialInspDetailList && scope.row.rawMaterialInspDetailList[index - 1]">
|
||||
<!-- 数字类型 -->
|
||||
<el-input-number
|
||||
v-if="scope.row.itemValueType === 'I'"
|
||||
@ -473,7 +473,7 @@ const formRef = ref() // 表单 Ref
|
||||
// if (!item.rawMaterialInspDetailList) {
|
||||
// item.rawMaterialInspDetailList = []
|
||||
// }
|
||||
// const num = item.testNum || 0
|
||||
// const num = list[0].tolNum || 0
|
||||
// for (let i = item.rawMaterialInspDetailList.length; i < num; i++) {
|
||||
// item.rawMaterialInspDetailList.push({ actValue: undefined })
|
||||
// }
|
||||
@ -488,16 +488,18 @@ const formRef = ref() // 表单 Ref
|
||||
|
||||
// 行 class 名称,用于隐藏无需展开行的箭头
|
||||
const getRowClassName = ({ row }: { row: any }) => {
|
||||
if (!row.testNum || row.testNum <= 5) {
|
||||
if (!row.testNum ||row.testNum <= 0 ) {
|
||||
return 'hl-row-no-expand'
|
||||
}
|
||||
return ''
|
||||
}
|
||||
|
||||
// 获取展开行中所有实测值的数据(从1开始)
|
||||
// 获取展开行中所有实测值的数据(从1开始,到当前项目的testNum值)
|
||||
const getExtraDetails = (row: any) => {
|
||||
const details = row.rawMaterialInspDetailList || []
|
||||
return details.map((item: any, i: number) => ({ index: i + 1, item }))
|
||||
return details
|
||||
.map((item: any, i: number) => ({ index: i + 1, item }))
|
||||
.filter(item => item.index <= (row.testNum || 0))
|
||||
}
|
||||
|
||||
// 解析itemContent逗号分隔的选项列表
|
||||
@ -610,14 +612,15 @@ const handleMaterialConfirm = async (row: any) => {
|
||||
formData.value.spec = row.spec
|
||||
|
||||
|
||||
const list = await InspplanitemApi.selectMaterialId(row.id)
|
||||
const list = await InspplanitemApi.selectMaterialId(row.id, '1')
|
||||
if (list && list.length > 0) {
|
||||
// 初始化每行的实测值明细列表
|
||||
list.forEach((item: any) => {
|
||||
if (!item.rawMaterialInspDetailList) {
|
||||
item.rawMaterialInspDetailList = []
|
||||
}
|
||||
const num = item.testNum || 0
|
||||
const num = list[0].tolNum || 0
|
||||
|
||||
for (let i = item.rawMaterialInspDetailList.length; i < num; i++) {
|
||||
item.rawMaterialInspDetailList.push({ actValue: undefined })
|
||||
}
|
||||
@ -670,7 +673,7 @@ const queryData = async (type: string, id ?: number) => {
|
||||
if (!item.rawMaterialInspDetailList) {
|
||||
item.rawMaterialInspDetailList = []
|
||||
}
|
||||
const num = item.testNum || 0
|
||||
const num = (item.testNum || 0) > (formData.value.testNum || 0) ? (item.testNum || 0) : (formData.value.testNum || 0)
|
||||
for (let i = item.rawMaterialInspDetailList.length; i < num; i++) {
|
||||
item.rawMaterialInspDetailList.push({ actValue: undefined })
|
||||
}
|
||||
|
||||
@ -89,6 +89,7 @@
|
||||
link
|
||||
type="primary"
|
||||
@click="openForm('update', scope.row.id)"
|
||||
v-if="scope.row.checkStatus === '1'"
|
||||
>
|
||||
编辑
|
||||
</el-button>
|
||||
@ -96,6 +97,7 @@
|
||||
link
|
||||
type="danger"
|
||||
@click="handleDelete(scope.row.id)"
|
||||
v-if="scope.row.checkStatus === '1'"
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
@ -103,6 +105,7 @@
|
||||
link
|
||||
type="primary"
|
||||
@click="openForm('details', scope.row.id)"
|
||||
v-if="scope.row.checkStatus === '2'"
|
||||
>
|
||||
详情
|
||||
</el-button>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user