From f5ba828efff157973af99a28cbb831859a617962 Mon Sep 17 00:00:00 2001 From: chenx <1366659369@qq.com> Date: Tue, 12 May 2026 14:09:41 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=9F=E6=9D=90=E6=96=99=E6=A3=80=E9=AA=8C?= =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E5=8A=9F=E8=83=BD=E3=80=81=E5=8E=9F=E6=9D=90?= =?UTF-8?q?=E6=96=99=E6=A3=80=E9=AA=8C=E6=A0=87=E5=87=86=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../db/mes-raw-material-inspect-item.sql | 21 +++ .../db/mes-raw-material-inspect-std.sql | 45 +++++ .../MesRawMaterialInspectItemController.java | 96 +++++++++++ .../MesRawMaterialInspectStdController.java | 128 ++++++++++++++ .../entity/MesRawMaterialInspectItem.java | 56 ++++++ .../entity/MesRawMaterialInspectStd.java | 74 ++++++++ .../entity/MesRawMaterialInspectStdLine.java | 54 ++++++ .../MesRawMaterialInspectItemMapper.java | 6 + .../MesRawMaterialInspectStdLineMapper.java | 6 + .../MesRawMaterialInspectStdMapper.java | 6 + .../IMesRawMaterialInspectItemService.java | 6 + .../IMesRawMaterialInspectStdService.java | 23 +++ .../MesRawMaterialInspectItemServiceImpl.java | 12 ++ .../MesRawMaterialInspectStdServiceImpl.java | 121 +++++++++++++ .../vo/MesRawMaterialInspectStdPage.java | 14 ++ .../mes/material/MesMixerMaterial.api.ts | 2 + .../material/MesRawMaterialInspectItem.api.ts | 25 +++ .../MesRawMaterialInspectItem.data.ts | 24 +++ .../MesRawMaterialInspectItemList.vue | 58 +++++++ .../material/MesRawMaterialInspectStd.api.ts | 39 +++++ .../material/MesRawMaterialInspectStd.data.ts | 126 ++++++++++++++ .../material/MesRawMaterialInspectStdList.vue | 90 ++++++++++ .../modules/MesMixerMaterialSelectModal.vue | 93 ++++++++++ .../MesRawMaterialInspectItemModal.vue | 38 +++++ .../modules/MesRawMaterialInspectStdModal.vue | 161 ++++++++++++++++++ .../mes/rawmaterialinspectitem/index.vue | 7 + .../views/mes/rawmaterialinspectstd/index.vue | 7 + 27 files changed, 1338 insertions(+) create mode 100644 jeecg-boot/db/mes-raw-material-inspect-item.sql create mode 100644 jeecg-boot/db/mes-raw-material-inspect-std.sql create mode 100644 jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/mes/material/controller/MesRawMaterialInspectItemController.java create mode 100644 jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/mes/material/controller/MesRawMaterialInspectStdController.java create mode 100644 jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/mes/material/entity/MesRawMaterialInspectItem.java create mode 100644 jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/mes/material/entity/MesRawMaterialInspectStd.java create mode 100644 jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/mes/material/entity/MesRawMaterialInspectStdLine.java create mode 100644 jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/mes/material/mapper/MesRawMaterialInspectItemMapper.java create mode 100644 jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/mes/material/mapper/MesRawMaterialInspectStdLineMapper.java create mode 100644 jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/mes/material/mapper/MesRawMaterialInspectStdMapper.java create mode 100644 jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/mes/material/service/IMesRawMaterialInspectItemService.java create mode 100644 jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/mes/material/service/IMesRawMaterialInspectStdService.java create mode 100644 jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/mes/material/service/impl/MesRawMaterialInspectItemServiceImpl.java create mode 100644 jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/mes/material/service/impl/MesRawMaterialInspectStdServiceImpl.java create mode 100644 jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/mes/material/vo/MesRawMaterialInspectStdPage.java create mode 100644 jeecgboot-vue3/src/views/mes/material/MesRawMaterialInspectItem.api.ts create mode 100644 jeecgboot-vue3/src/views/mes/material/MesRawMaterialInspectItem.data.ts create mode 100644 jeecgboot-vue3/src/views/mes/material/MesRawMaterialInspectItemList.vue create mode 100644 jeecgboot-vue3/src/views/mes/material/MesRawMaterialInspectStd.api.ts create mode 100644 jeecgboot-vue3/src/views/mes/material/MesRawMaterialInspectStd.data.ts create mode 100644 jeecgboot-vue3/src/views/mes/material/MesRawMaterialInspectStdList.vue create mode 100644 jeecgboot-vue3/src/views/mes/material/modules/MesMixerMaterialSelectModal.vue create mode 100644 jeecgboot-vue3/src/views/mes/material/modules/MesRawMaterialInspectItemModal.vue create mode 100644 jeecgboot-vue3/src/views/mes/material/modules/MesRawMaterialInspectStdModal.vue create mode 100644 jeecgboot-vue3/src/views/mes/rawmaterialinspectitem/index.vue create mode 100644 jeecgboot-vue3/src/views/mes/rawmaterialinspectstd/index.vue diff --git a/jeecg-boot/db/mes-raw-material-inspect-item.sql b/jeecg-boot/db/mes-raw-material-inspect-item.sql new file mode 100644 index 00000000..ad415698 --- /dev/null +++ b/jeecg-boot/db/mes-raw-material-inspect-item.sql @@ -0,0 +1,21 @@ +-- 原材料检验项目(菜单与权限合并进 db/mes-material-menu.sql) +SET NAMES utf8mb4; + +CREATE TABLE IF NOT EXISTS `mes_raw_material_inspect_item` ( + `id` varchar(32) NOT NULL COMMENT '主键', + `inspect_item_name` varchar(200) NOT NULL COMMENT '检验项目名称', + `inspect_item_name_en` varchar(200) DEFAULT NULL COMMENT '英文名称', + `unit_name` varchar(64) DEFAULT NULL COMMENT '单位', + `item_mark` varchar(100) DEFAULT NULL COMMENT '标记', + `test_standard_no` varchar(128) DEFAULT NULL COMMENT '试验标准编号', + `remark` varchar(500) DEFAULT NULL COMMENT '备注', + `tenant_id` int DEFAULT NULL COMMENT '租户', + `sys_org_code` varchar(64) DEFAULT NULL COMMENT '部门', + `create_by` varchar(32) DEFAULT NULL COMMENT '创建人', + `create_time` datetime DEFAULT NULL COMMENT '创建时间', + `update_by` varchar(32) DEFAULT NULL COMMENT '更新人', + `update_time` datetime DEFAULT NULL COMMENT '更新时间', + `del_flag` int DEFAULT '0' COMMENT '删除标记', + PRIMARY KEY (`id`), + KEY `idx_rmii_name` (`inspect_item_name`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='MES原材料检验项目'; diff --git a/jeecg-boot/db/mes-raw-material-inspect-std.sql b/jeecg-boot/db/mes-raw-material-inspect-std.sql new file mode 100644 index 00000000..a721f6b5 --- /dev/null +++ b/jeecg-boot/db/mes-raw-material-inspect-std.sql @@ -0,0 +1,45 @@ +-- 原材料检验标准(主表 + 子表) +SET NAMES utf8mb4; + +CREATE TABLE IF NOT EXISTS `mes_raw_material_inspect_std` ( + `id` varchar(32) NOT NULL COMMENT '主键', + `standard_no` varchar(64) NOT NULL COMMENT '标准编号', + `mixer_material_id` varchar(32) NOT NULL COMMENT '密炼物料ID', + `material_name` varchar(200) DEFAULT NULL COMMENT '物料名称', + `material_desc` varchar(500) DEFAULT NULL COMMENT '物料描述', + `material_kind` varchar(200) DEFAULT NULL COMMENT '种类', + `version_no` varchar(64) DEFAULT NULL COMMENT '版本', + `issue_no` varchar(64) DEFAULT NULL COMMENT '发行编号', + `version_status` varchar(64) DEFAULT NULL COMMENT '版本状态', + `enable_flag` int NOT NULL DEFAULT '0' COMMENT '启用标记:1启用 0停用', + `effective_date` datetime DEFAULT NULL COMMENT '生效日期', + `tenant_id` int DEFAULT NULL COMMENT '租户', + `sys_org_code` varchar(64) DEFAULT NULL COMMENT '部门', + `create_by` varchar(32) DEFAULT NULL COMMENT '创建人', + `create_time` datetime DEFAULT NULL COMMENT '创建时间', + `update_by` varchar(32) DEFAULT NULL COMMENT '更新人', + `update_time` datetime DEFAULT NULL COMMENT '更新时间', + `del_flag` int DEFAULT '0' COMMENT '删除标记', + PRIMARY KEY (`id`), + KEY `idx_rmis_std_no` (`standard_no`), + KEY `idx_rmis_mixer` (`mixer_material_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='MES原材料检验标准'; + +CREATE TABLE IF NOT EXISTS `mes_raw_material_inspect_std_line` ( + `id` varchar(32) NOT NULL COMMENT '主键', + `std_id` varchar(32) NOT NULL COMMENT '标准主表ID', + `inspect_item_id` varchar(32) NOT NULL COMMENT '原材料检验项目ID', + `inspect_item_name` varchar(200) DEFAULT NULL COMMENT '检验项目名称', + `allow_min` decimal(24,6) DEFAULT NULL COMMENT '容许最小值', + `include_min_flag` int NOT NULL DEFAULT '0' COMMENT '包含最小值:1是 0否', + `allow_max` decimal(24,6) DEFAULT NULL COMMENT '容许最大值', + `include_max_flag` int NOT NULL DEFAULT '0' COMMENT '包含最大值:1是 0否', + `sort_no` int DEFAULT NULL COMMENT '排序', + `create_by` varchar(32) DEFAULT NULL, + `create_time` datetime DEFAULT NULL, + `update_by` varchar(32) DEFAULT NULL, + `update_time` datetime DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `idx_rmisl_std` (`std_id`), + KEY `idx_rmisl_item` (`inspect_item_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='MES原材料检验标准-检验项明细'; diff --git a/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/mes/material/controller/MesRawMaterialInspectItemController.java b/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/mes/material/controller/MesRawMaterialInspectItemController.java new file mode 100644 index 00000000..65515636 --- /dev/null +++ b/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/mes/material/controller/MesRawMaterialInspectItemController.java @@ -0,0 +1,96 @@ +package org.jeecg.modules.mes.material.controller; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; +import java.util.Arrays; +import lombok.extern.slf4j.Slf4j; +import org.apache.shiro.authz.annotation.RequiresPermissions; +import org.jeecg.common.api.vo.Result; +import org.jeecg.common.aspect.annotation.AutoLog; +import org.jeecg.common.system.base.controller.JeecgController; +import org.jeecg.common.system.query.QueryGenerator; +import org.jeecg.modules.mes.material.entity.MesRawMaterialInspectItem; +import org.jeecg.modules.mes.material.service.IMesRawMaterialInspectItemService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.servlet.ModelAndView; + +@Slf4j +@Tag(name = "MES-原材料检验项目") +@RestController +@RequestMapping("/mes/material/rawMaterialInspectItem") +public class MesRawMaterialInspectItemController + extends JeecgController { + @Autowired private IMesRawMaterialInspectItemService mesRawMaterialInspectItemService; + + @GetMapping("/list") + public Result> queryPageList( + MesRawMaterialInspectItem model, + @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, + @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, + HttpServletRequest req) { + QueryWrapper queryWrapper = + QueryGenerator.initQueryWrapper(model, req.getParameterMap()); + IPage pageList = + mesRawMaterialInspectItemService.page(new Page<>(pageNo, pageSize), queryWrapper); + return Result.OK(pageList); + } + + @AutoLog(value = "MES-原材料检验项目-添加") + @Operation(summary = "MES-原材料检验项目-添加") + @RequiresPermissions("mes:mes_raw_material_inspect_item:add") + @PostMapping("/add") + public Result add(@RequestBody MesRawMaterialInspectItem model) { + mesRawMaterialInspectItemService.save(model); + return Result.OK("添加成功!"); + } + + @AutoLog(value = "MES-原材料检验项目-编辑") + @Operation(summary = "MES-原材料检验项目-编辑") + @RequiresPermissions("mes:mes_raw_material_inspect_item:edit") + @RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST}) + public Result edit(@RequestBody MesRawMaterialInspectItem model) { + mesRawMaterialInspectItemService.updateById(model); + return Result.OK("编辑成功!"); + } + + @AutoLog(value = "MES-原材料检验项目-通过id删除") + @Operation(summary = "MES-原材料检验项目-通过id删除") + @RequiresPermissions("mes:mes_raw_material_inspect_item:delete") + @DeleteMapping("/delete") + public Result delete(@RequestParam(name = "id") String id) { + mesRawMaterialInspectItemService.removeById(id); + return Result.OK("删除成功!"); + } + + @AutoLog(value = "MES-原材料检验项目-批量删除") + @Operation(summary = "MES-原材料检验项目-批量删除") + @RequiresPermissions("mes:mes_raw_material_inspect_item:deleteBatch") + @DeleteMapping("/deleteBatch") + public Result deleteBatch(@RequestParam(name = "ids") String ids) { + mesRawMaterialInspectItemService.removeByIds(Arrays.asList(ids.split(","))); + return Result.OK("批量删除成功!"); + } + + @GetMapping("/queryById") + public Result queryById(@RequestParam(name = "id") String id) { + return Result.OK(mesRawMaterialInspectItemService.getById(id)); + } + + @RequiresPermissions("mes:mes_raw_material_inspect_item:exportXls") + @RequestMapping("/exportXls") + public ModelAndView exportXls(HttpServletRequest request, MesRawMaterialInspectItem model) { + return super.exportXls(request, model, MesRawMaterialInspectItem.class, "MES原材料检验项目"); + } + + @RequiresPermissions("mes:mes_raw_material_inspect_item:importExcel") + @RequestMapping(value = "/importExcel", method = RequestMethod.POST) + public Result importExcel(HttpServletRequest request, HttpServletResponse response) { + return super.importExcel(request, response, MesRawMaterialInspectItem.class); + } +} diff --git a/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/mes/material/controller/MesRawMaterialInspectStdController.java b/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/mes/material/controller/MesRawMaterialInspectStdController.java new file mode 100644 index 00000000..e7e525ff --- /dev/null +++ b/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/mes/material/controller/MesRawMaterialInspectStdController.java @@ -0,0 +1,128 @@ +package org.jeecg.modules.mes.material.controller; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; +import java.util.Arrays; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; +import org.apache.shiro.authz.annotation.RequiresPermissions; +import org.jeecg.common.api.vo.Result; +import org.jeecg.common.aspect.annotation.AutoLog; +import org.jeecg.common.system.base.controller.JeecgController; +import org.jeecg.common.system.query.QueryGenerator; +import org.jeecg.modules.mes.material.entity.MesRawMaterialInspectStd; +import org.jeecg.modules.mes.material.entity.MesRawMaterialInspectStdLine; +import org.jeecg.modules.mes.material.service.IMesRawMaterialInspectStdService; +import org.jeecg.modules.mes.material.vo.MesRawMaterialInspectStdPage; +import org.springframework.beans.BeanUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.servlet.ModelAndView; + +@Slf4j +@Tag(name = "MES-原材料检验标准") +@RestController +@RequestMapping("/mes/material/rawMaterialInspectStd") +public class MesRawMaterialInspectStdController extends JeecgController { + + @Autowired private IMesRawMaterialInspectStdService mesRawMaterialInspectStdService; + + @GetMapping("/list") + public Result> queryPageList( + MesRawMaterialInspectStd model, + @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, + @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, + HttpServletRequest req) { + QueryWrapper queryWrapper = + QueryGenerator.initQueryWrapper(model, req.getParameterMap()); + IPage pageList = + mesRawMaterialInspectStdService.page(new Page<>(pageNo, pageSize), queryWrapper); + return Result.OK(pageList); + } + + @AutoLog(value = "MES-原材料检验标准-添加") + @Operation(summary = "MES-原材料检验标准-添加") + @RequiresPermissions("mes:mes_raw_material_inspect_std:add") + @PostMapping("/add") + public Result add(@RequestBody MesRawMaterialInspectStdPage page) { + MesRawMaterialInspectStd main = new MesRawMaterialInspectStd(); + BeanUtils.copyProperties(page, main); + mesRawMaterialInspectStdService.saveMain(main, page.getLineList()); + return Result.OK("添加成功!"); + } + + @AutoLog(value = "MES-原材料检验标准-编辑") + @Operation(summary = "MES-原材料检验标准-编辑") + @RequiresPermissions("mes:mes_raw_material_inspect_std:edit") + @RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST}) + public Result edit(@RequestBody MesRawMaterialInspectStdPage page) { + MesRawMaterialInspectStd main = new MesRawMaterialInspectStd(); + BeanUtils.copyProperties(page, main); + mesRawMaterialInspectStdService.updateMain(main, page.getLineList()); + return Result.OK("编辑成功!"); + } + + @AutoLog(value = "MES-原材料检验标准-通过id删除") + @Operation(summary = "MES-原材料检验标准-通过id删除") + @RequiresPermissions("mes:mes_raw_material_inspect_std:delete") + @DeleteMapping("/delete") + public Result delete(@RequestParam(name = "id") String id) { + mesRawMaterialInspectStdService.delMain(id); + return Result.OK("删除成功!"); + } + + @AutoLog(value = "MES-原材料检验标准-批量删除") + @Operation(summary = "MES-原材料检验标准-批量删除") + @RequiresPermissions("mes:mes_raw_material_inspect_std:deleteBatch") + @DeleteMapping("/deleteBatch") + public Result deleteBatch(@RequestParam(name = "ids") String ids) { + mesRawMaterialInspectStdService.delBatchMain(Arrays.asList(ids.split(","))); + return Result.OK("批量删除成功!"); + } + + @GetMapping("/queryById") + public Result queryById(@RequestParam(name = "id") String id) { + return Result.OK(mesRawMaterialInspectStdService.getById(id)); + } + + @GetMapping("/queryLineListByStdId") + public Result> queryLineListByStdId( + @RequestParam(name = "id") String id) { + return Result.OK(mesRawMaterialInspectStdService.selectLinesByStdId(id)); + } + + @AutoLog(value = "MES-原材料检验标准-启用停用") + @Operation(summary = "MES-原材料检验标准-启用停用") + @RequiresPermissions("mes:mes_raw_material_inspect_std:enable") + @PostMapping("/setEnable") + public Result setEnable(@RequestBody java.util.Map body) { + String id = body.get("id") == null ? null : body.get("id").toString(); + int flag = body.get("enableFlag") == null ? 0 : Integer.parseInt(body.get("enableFlag").toString()); + if (StringUtils.isBlank(id)) { + return Result.error("id不能为空"); + } + MesRawMaterialInspectStd db = mesRawMaterialInspectStdService.getById(id); + if (db == null) { + return Result.error("记录不存在"); + } + mesRawMaterialInspectStdService.setEnable(id, flag); + return Result.OK(flag == 1 ? "已启用" : "已停用"); + } + + @RequiresPermissions("mes:mes_raw_material_inspect_std:exportXls") + @RequestMapping("/exportXls") + public ModelAndView exportXls(HttpServletRequest request, MesRawMaterialInspectStd model) { + return super.exportXls(request, model, MesRawMaterialInspectStd.class, "MES原材料检验标准"); + } + + @RequiresPermissions("mes:mes_raw_material_inspect_std:importExcel") + @RequestMapping(value = "/importExcel", method = RequestMethod.POST) + public Result importExcel(HttpServletRequest request, HttpServletResponse response) { + return super.importExcel(request, response, MesRawMaterialInspectStd.class); + } +} diff --git a/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/mes/material/entity/MesRawMaterialInspectItem.java b/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/mes/material/entity/MesRawMaterialInspectItem.java new file mode 100644 index 00000000..49dbc1de --- /dev/null +++ b/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/mes/material/entity/MesRawMaterialInspectItem.java @@ -0,0 +1,56 @@ +package org.jeecg.modules.mes.material.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.v3.oas.annotations.media.Schema; +import java.io.Serializable; +import java.util.Date; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; +import org.jeecgframework.poi.excel.annotation.Excel; +import org.springframework.format.annotation.DateTimeFormat; + +@Data +@TableName("mes_raw_material_inspect_item") +@Accessors(chain = true) +@EqualsAndHashCode(callSuper = false) +@Schema(description = "MES原材料检验项目") +public class MesRawMaterialInspectItem implements Serializable { + private static final long serialVersionUID = 1L; + + @TableId(type = IdType.ASSIGN_ID) + private String id; + + @Excel(name = "检验项目名称", width = 22) + private String inspectItemName; + + @Excel(name = "英文名称", width = 22) + private String inspectItemNameEn; + + @Excel(name = "单位", width = 12) + private String unitName; + + @Excel(name = "标记", width = 15) + private String itemMark; + + @Excel(name = "试验标准编号", width = 18) + private String testStandardNo; + + @Excel(name = "备注", width = 25) + private String remark; + + private Integer tenantId; + private String sysOrgCode; + private String createBy; + @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date createTime; + private String updateBy; + @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date updateTime; + private Integer delFlag; +} diff --git a/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/mes/material/entity/MesRawMaterialInspectStd.java b/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/mes/material/entity/MesRawMaterialInspectStd.java new file mode 100644 index 00000000..7d9cae2e --- /dev/null +++ b/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/mes/material/entity/MesRawMaterialInspectStd.java @@ -0,0 +1,74 @@ +package org.jeecg.modules.mes.material.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.v3.oas.annotations.media.Schema; +import java.io.Serializable; +import java.util.Date; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; +import org.jeecgframework.poi.excel.annotation.Excel; +import org.springframework.format.annotation.DateTimeFormat; + +@Data +@TableName("mes_raw_material_inspect_std") +@Accessors(chain = true) +@EqualsAndHashCode(callSuper = false) +@Schema(description = "MES原材料检验标准") +public class MesRawMaterialInspectStd implements Serializable { + + private static final long serialVersionUID = 1L; + + @TableId(type = IdType.ASSIGN_ID) + private String id; + + @Excel(name = "标准编号", width = 18) + private String standardNo; + + private String mixerMaterialId; + + @Excel(name = "物料名称", width = 22) + private String materialName; + + @Excel(name = "物料描述", width = 28) + private String materialDesc; + + @Excel(name = "种类", width = 20) + private String materialKind; + + @Excel(name = "版本", width = 12) + private String versionNo; + + @Excel(name = "发行编号", width = 15) + private String issueNo; + + @Excel(name = "版本状态", width = 12) + private String versionStatus; + + @Excel(name = "启用", width = 8) + private Integer enableFlag; + + @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @Excel(name = "生效日期", width = 20, format = "yyyy-MM-dd HH:mm:ss") + private Date effectiveDate; + + private Integer tenantId; + private String sysOrgCode; + private String createBy; + + @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date createTime; + + private String updateBy; + + @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date updateTime; + + private Integer delFlag; +} diff --git a/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/mes/material/entity/MesRawMaterialInspectStdLine.java b/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/mes/material/entity/MesRawMaterialInspectStdLine.java new file mode 100644 index 00000000..944ed7ba --- /dev/null +++ b/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/mes/material/entity/MesRawMaterialInspectStdLine.java @@ -0,0 +1,54 @@ +package org.jeecg.modules.mes.material.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.v3.oas.annotations.media.Schema; +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; +import org.springframework.format.annotation.DateTimeFormat; + +@Data +@TableName("mes_raw_material_inspect_std_line") +@Accessors(chain = true) +@EqualsAndHashCode(callSuper = false) +@Schema(description = "MES原材料检验标准-检验项明细") +public class MesRawMaterialInspectStdLine implements Serializable { + private static final long serialVersionUID = 1L; + + @TableId(type = IdType.ASSIGN_ID) + private String id; + + private String stdId; + + private String inspectItemId; + + private String inspectItemName; + + private BigDecimal allowMin; + + private Integer includeMinFlag; + + private BigDecimal allowMax; + + private Integer includeMaxFlag; + + private Integer sortNo; + + private String createBy; + + @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date createTime; + + private String updateBy; + + @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date updateTime; +} diff --git a/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/mes/material/mapper/MesRawMaterialInspectItemMapper.java b/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/mes/material/mapper/MesRawMaterialInspectItemMapper.java new file mode 100644 index 00000000..b4839efc --- /dev/null +++ b/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/mes/material/mapper/MesRawMaterialInspectItemMapper.java @@ -0,0 +1,6 @@ +package org.jeecg.modules.mes.material.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.jeecg.modules.mes.material.entity.MesRawMaterialInspectItem; + +public interface MesRawMaterialInspectItemMapper extends BaseMapper {} diff --git a/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/mes/material/mapper/MesRawMaterialInspectStdLineMapper.java b/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/mes/material/mapper/MesRawMaterialInspectStdLineMapper.java new file mode 100644 index 00000000..cb8cc9a1 --- /dev/null +++ b/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/mes/material/mapper/MesRawMaterialInspectStdLineMapper.java @@ -0,0 +1,6 @@ +package org.jeecg.modules.mes.material.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.jeecg.modules.mes.material.entity.MesRawMaterialInspectStdLine; + +public interface MesRawMaterialInspectStdLineMapper extends BaseMapper {} diff --git a/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/mes/material/mapper/MesRawMaterialInspectStdMapper.java b/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/mes/material/mapper/MesRawMaterialInspectStdMapper.java new file mode 100644 index 00000000..b338767b --- /dev/null +++ b/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/mes/material/mapper/MesRawMaterialInspectStdMapper.java @@ -0,0 +1,6 @@ +package org.jeecg.modules.mes.material.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.jeecg.modules.mes.material.entity.MesRawMaterialInspectStd; + +public interface MesRawMaterialInspectStdMapper extends BaseMapper {} diff --git a/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/mes/material/service/IMesRawMaterialInspectItemService.java b/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/mes/material/service/IMesRawMaterialInspectItemService.java new file mode 100644 index 00000000..3a43503b --- /dev/null +++ b/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/mes/material/service/IMesRawMaterialInspectItemService.java @@ -0,0 +1,6 @@ +package org.jeecg.modules.mes.material.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import org.jeecg.modules.mes.material.entity.MesRawMaterialInspectItem; + +public interface IMesRawMaterialInspectItemService extends IService {} diff --git a/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/mes/material/service/IMesRawMaterialInspectStdService.java b/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/mes/material/service/IMesRawMaterialInspectStdService.java new file mode 100644 index 00000000..e33e8e86 --- /dev/null +++ b/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/mes/material/service/IMesRawMaterialInspectStdService.java @@ -0,0 +1,23 @@ +package org.jeecg.modules.mes.material.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import java.io.Serializable; +import java.util.Collection; +import java.util.List; +import org.jeecg.modules.mes.material.entity.MesRawMaterialInspectStd; +import org.jeecg.modules.mes.material.entity.MesRawMaterialInspectStdLine; + +public interface IMesRawMaterialInspectStdService extends IService { + + void saveMain(MesRawMaterialInspectStd main, List lineList); + + void updateMain(MesRawMaterialInspectStd main, List lineList); + + void delMain(String id); + + void delBatchMain(Collection idList); + + List selectLinesByStdId(String stdId); + + void setEnable(String id, int enableFlag); +} diff --git a/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/mes/material/service/impl/MesRawMaterialInspectItemServiceImpl.java b/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/mes/material/service/impl/MesRawMaterialInspectItemServiceImpl.java new file mode 100644 index 00000000..5fcb3024 --- /dev/null +++ b/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/mes/material/service/impl/MesRawMaterialInspectItemServiceImpl.java @@ -0,0 +1,12 @@ +package org.jeecg.modules.mes.material.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.jeecg.modules.mes.material.entity.MesRawMaterialInspectItem; +import org.jeecg.modules.mes.material.mapper.MesRawMaterialInspectItemMapper; +import org.jeecg.modules.mes.material.service.IMesRawMaterialInspectItemService; +import org.springframework.stereotype.Service; + +@Service +public class MesRawMaterialInspectItemServiceImpl + extends ServiceImpl + implements IMesRawMaterialInspectItemService {} diff --git a/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/mes/material/service/impl/MesRawMaterialInspectStdServiceImpl.java b/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/mes/material/service/impl/MesRawMaterialInspectStdServiceImpl.java new file mode 100644 index 00000000..72131d86 --- /dev/null +++ b/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/mes/material/service/impl/MesRawMaterialInspectStdServiceImpl.java @@ -0,0 +1,121 @@ +package org.jeecg.modules.mes.material.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import java.io.Serializable; +import java.util.Collection; +import java.util.Date; +import java.util.List; +import org.apache.commons.lang3.StringUtils; +import org.jeecg.modules.mes.material.entity.MesRawMaterialInspectItem; +import org.jeecg.modules.mes.material.entity.MesRawMaterialInspectStd; +import org.jeecg.modules.mes.material.entity.MesRawMaterialInspectStdLine; +import org.jeecg.modules.mes.material.mapper.MesRawMaterialInspectStdLineMapper; +import org.jeecg.modules.mes.material.mapper.MesRawMaterialInspectStdMapper; +import org.jeecg.modules.mes.material.service.IMesRawMaterialInspectItemService; +import org.jeecg.modules.mes.material.service.IMesRawMaterialInspectStdService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.CollectionUtils; + +@Service +public class MesRawMaterialInspectStdServiceImpl extends ServiceImpl + implements IMesRawMaterialInspectStdService { + + @Autowired private MesRawMaterialInspectStdLineMapper mesRawMaterialInspectStdLineMapper; + @Autowired private IMesRawMaterialInspectItemService mesRawMaterialInspectItemService; + + @Override + @Transactional(rollbackFor = Exception.class) + public void saveMain(MesRawMaterialInspectStd main, List lineList) { + if (main.getEnableFlag() == null) { + main.setEnableFlag(0); + } + this.save(main); + insertLines(main.getId(), lineList); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void updateMain(MesRawMaterialInspectStd main, List lineList) { + this.updateById(main); + mesRawMaterialInspectStdLineMapper.delete( + new LambdaQueryWrapper().eq(MesRawMaterialInspectStdLine::getStdId, main.getId())); + insertLines(main.getId(), lineList); + } + + private void insertLines(String stdId, List lineList) { + if (CollectionUtils.isEmpty(lineList)) { + return; + } + int sort = 0; + for (MesRawMaterialInspectStdLine line : lineList) { + line.setId(null); + line.setStdId(stdId); + if (line.getIncludeMinFlag() == null) { + line.setIncludeMinFlag(0); + } + if (line.getIncludeMaxFlag() == null) { + line.setIncludeMaxFlag(0); + } + line.setSortNo(sort++); + fillInspectItemName(line); + mesRawMaterialInspectStdLineMapper.insert(line); + } + } + + private void fillInspectItemName(MesRawMaterialInspectStdLine line) { + if (StringUtils.isBlank(line.getInspectItemId())) { + return; + } + if (StringUtils.isNotBlank(line.getInspectItemName())) { + return; + } + MesRawMaterialInspectItem item = mesRawMaterialInspectItemService.getById(line.getInspectItemId()); + if (item != null) { + line.setInspectItemName(item.getInspectItemName()); + } + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delMain(String id) { + mesRawMaterialInspectStdLineMapper.delete( + new LambdaQueryWrapper().eq(MesRawMaterialInspectStdLine::getStdId, id)); + this.removeById(id); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delBatchMain(Collection idList) { + for (Serializable id : idList) { + delMain(id.toString()); + } + } + + @Override + public List selectLinesByStdId(String stdId) { + return mesRawMaterialInspectStdLineMapper.selectList( + new LambdaQueryWrapper() + .eq(MesRawMaterialInspectStdLine::getStdId, stdId) + .orderByAsc(MesRawMaterialInspectStdLine::getSortNo)); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void setEnable(String id, int enableFlag) { + MesRawMaterialInspectStd entity = this.getById(id); + if (entity == null) { + return; + } + if (enableFlag == 1) { + entity.setEnableFlag(1); + entity.setEffectiveDate(new Date()); + } else { + entity.setEnableFlag(0); + entity.setEffectiveDate(null); + } + this.updateById(entity); + } +} diff --git a/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/mes/material/vo/MesRawMaterialInspectStdPage.java b/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/mes/material/vo/MesRawMaterialInspectStdPage.java new file mode 100644 index 00000000..b2cfbf50 --- /dev/null +++ b/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/mes/material/vo/MesRawMaterialInspectStdPage.java @@ -0,0 +1,14 @@ +package org.jeecg.modules.mes.material.vo; + +import java.util.List; +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.jeecg.modules.mes.material.entity.MesRawMaterialInspectStd; +import org.jeecg.modules.mes.material.entity.MesRawMaterialInspectStdLine; + +@Data +@EqualsAndHashCode(callSuper = true) +public class MesRawMaterialInspectStdPage extends MesRawMaterialInspectStd { + + private List lineList; +} diff --git a/jeecgboot-vue3/src/views/mes/material/MesMixerMaterial.api.ts b/jeecgboot-vue3/src/views/mes/material/MesMixerMaterial.api.ts index 5b5c1b7e..811931a2 100644 --- a/jeecgboot-vue3/src/views/mes/material/MesMixerMaterial.api.ts +++ b/jeecgboot-vue3/src/views/mes/material/MesMixerMaterial.api.ts @@ -3,6 +3,7 @@ import { Modal } from 'ant-design-vue'; enum Api { list = '/mes/material/mixerMaterial/list', + queryById = '/mes/material/mixerMaterial/queryById', save = '/mes/material/mixerMaterial/add', edit = '/mes/material/mixerMaterial/edit', deleteOne = '/mes/material/mixerMaterial/delete', @@ -14,6 +15,7 @@ enum Api { export const getExportUrl = Api.exportXls; export const getImportUrl = Api.importExcel; export const list = (params) => defHttp.get({ url: Api.list, params }); +export const queryById = (params) => defHttp.get({ url: Api.queryById, params }); export const deleteOne = (params, handleSuccess) => defHttp.delete({ url: Api.deleteOne, params }, { joinParamsToUrl: true }).then(() => handleSuccess()); diff --git a/jeecgboot-vue3/src/views/mes/material/MesRawMaterialInspectItem.api.ts b/jeecgboot-vue3/src/views/mes/material/MesRawMaterialInspectItem.api.ts new file mode 100644 index 00000000..3c35f42f --- /dev/null +++ b/jeecgboot-vue3/src/views/mes/material/MesRawMaterialInspectItem.api.ts @@ -0,0 +1,25 @@ +import { defHttp } from '/@/utils/http/axios'; +import { Modal } from 'ant-design-vue'; + +enum Api { + list = '/mes/material/rawMaterialInspectItem/list', + save = '/mes/material/rawMaterialInspectItem/add', + edit = '/mes/material/rawMaterialInspectItem/edit', + deleteOne = '/mes/material/rawMaterialInspectItem/delete', + deleteBatch = '/mes/material/rawMaterialInspectItem/deleteBatch', + importExcel = '/mes/material/rawMaterialInspectItem/importExcel', + exportXls = '/mes/material/rawMaterialInspectItem/exportXls', +} + +export const getExportUrl = Api.exportXls; +export const getImportUrl = Api.importExcel; +export const list = (params) => defHttp.get({ url: Api.list, params }); +export const deleteOne = (params, handleSuccess) => + defHttp.delete({ url: Api.deleteOne, params }, { joinParamsToUrl: true }).then(() => handleSuccess()); +export const batchDelete = (params, handleSuccess) => + Modal.confirm({ + title: '确认删除', + content: '是否删除选中数据', + onOk: () => defHttp.delete({ url: Api.deleteBatch, data: params }, { joinParamsToUrl: true }).then(() => handleSuccess()), + }); +export const saveOrUpdate = (params, isUpdate) => defHttp.post({ url: isUpdate ? Api.edit : Api.save, params }); diff --git a/jeecgboot-vue3/src/views/mes/material/MesRawMaterialInspectItem.data.ts b/jeecgboot-vue3/src/views/mes/material/MesRawMaterialInspectItem.data.ts new file mode 100644 index 00000000..8da43b05 --- /dev/null +++ b/jeecgboot-vue3/src/views/mes/material/MesRawMaterialInspectItem.data.ts @@ -0,0 +1,24 @@ +import { BasicColumn, FormSchema } from '/@/components/Table'; + +export const columns: BasicColumn[] = [ + { title: '检验项目名称', align: 'center', dataIndex: 'inspectItemName', width: 200 }, + { title: '英文名称', align: 'center', dataIndex: 'inspectItemNameEn', width: 200 }, + { title: '单位', align: 'center', dataIndex: 'unitName', width: 100 }, + { title: '标记', align: 'center', dataIndex: 'itemMark', width: 120 }, + { title: '试验标准编号', align: 'center', dataIndex: 'testStandardNo', width: 160 }, +]; + +export const searchFormSchema: FormSchema[] = [ + { label: '检验项目名称', field: 'inspectItemName', component: 'Input', colProps: { span: 6 } }, + { label: '试验标准编号', field: 'testStandardNo', component: 'Input', colProps: { span: 6 } }, +]; + +export const formSchema: FormSchema[] = [ + { label: '', field: 'id', component: 'Input', show: false }, + { label: '检验项目名称', field: 'inspectItemName', component: 'Input', required: true }, + { label: '英文名称', field: 'inspectItemNameEn', component: 'Input' }, + { label: '单位', field: 'unitName', component: 'Input' }, + { label: '标记', field: 'itemMark', component: 'Input' }, + { label: '试验标准编号', field: 'testStandardNo', component: 'Input' }, + { label: '备注', field: 'remark', component: 'InputTextArea' }, +]; diff --git a/jeecgboot-vue3/src/views/mes/material/MesRawMaterialInspectItemList.vue b/jeecgboot-vue3/src/views/mes/material/MesRawMaterialInspectItemList.vue new file mode 100644 index 00000000..05e74b4d --- /dev/null +++ b/jeecgboot-vue3/src/views/mes/material/MesRawMaterialInspectItemList.vue @@ -0,0 +1,58 @@ + + diff --git a/jeecgboot-vue3/src/views/mes/material/MesRawMaterialInspectStd.api.ts b/jeecgboot-vue3/src/views/mes/material/MesRawMaterialInspectStd.api.ts new file mode 100644 index 00000000..4a684190 --- /dev/null +++ b/jeecgboot-vue3/src/views/mes/material/MesRawMaterialInspectStd.api.ts @@ -0,0 +1,39 @@ +import { defHttp } from '/@/utils/http/axios'; +import { Modal } from 'ant-design-vue'; + +enum Api { + list = '/mes/material/rawMaterialInspectStd/list', + save = '/mes/material/rawMaterialInspectStd/add', + edit = '/mes/material/rawMaterialInspectStd/edit', + deleteOne = '/mes/material/rawMaterialInspectStd/delete', + deleteBatch = '/mes/material/rawMaterialInspectStd/deleteBatch', + importExcel = '/mes/material/rawMaterialInspectStd/importExcel', + exportXls = '/mes/material/rawMaterialInspectStd/exportXls', + queryById = '/mes/material/rawMaterialInspectStd/queryById', + queryLineList = '/mes/material/rawMaterialInspectStd/queryLineListByStdId', + setEnable = '/mes/material/rawMaterialInspectStd/setEnable', +} + +export const getExportUrl = Api.exportXls; +export const getImportUrl = Api.importExcel; +export const list = (params) => defHttp.get({ url: Api.list, params }); +export const queryById = (params) => defHttp.get({ url: Api.queryById, params }); +export const queryLineListByStdId = (params) => defHttp.get({ url: Api.queryLineList, params }); + +export const deleteOne = (params, handleSuccess) => + defHttp.delete({ url: Api.deleteOne, params }, { joinParamsToUrl: true }).then(() => handleSuccess()); + +export const batchDelete = (params, handleSuccess) => { + Modal.confirm({ + title: '确认删除', + content: '是否删除选中数据', + okText: '确认', + cancelText: '取消', + onOk: () => + defHttp.delete({ url: Api.deleteBatch, data: params }, { joinParamsToUrl: true }).then(() => handleSuccess()), + }); +}; + +export const saveOrUpdate = (params, isUpdate) => defHttp.post({ url: isUpdate ? Api.edit : Api.save, params }); + +export const setEnable = (params) => defHttp.post({ url: Api.setEnable, params }); diff --git a/jeecgboot-vue3/src/views/mes/material/MesRawMaterialInspectStd.data.ts b/jeecgboot-vue3/src/views/mes/material/MesRawMaterialInspectStd.data.ts new file mode 100644 index 00000000..00470257 --- /dev/null +++ b/jeecgboot-vue3/src/views/mes/material/MesRawMaterialInspectStd.data.ts @@ -0,0 +1,126 @@ +import { BasicColumn, FormSchema } from '/@/components/Table'; +import { JVxeColumn, JVxeTypes } from '/@/components/jeecg/JVxeTable/types'; + +function enableText(v: unknown) { + if (v === 1) return '启用'; + if (v === 0) return '停用'; + return '-'; +} + +export const columns: BasicColumn[] = [ + { title: '标准编号', align: 'center', dataIndex: 'standardNo', width: 140 }, + { title: '物料名称', align: 'center', dataIndex: 'materialName', width: 160 }, + { title: '种类', align: 'center', dataIndex: 'materialKind', width: 140, ellipsis: true }, + { title: '版本', align: 'center', dataIndex: 'versionNo', width: 100 }, + { title: '发行编号', align: 'center', dataIndex: 'issueNo', width: 120 }, + { title: '版本状态', align: 'center', dataIndex: 'versionStatus', width: 100 }, + { + title: '启用', + align: 'center', + dataIndex: 'enableFlag', + width: 80, + customRender: ({ text }) => enableText(text), + }, + { title: '生效日期', align: 'center', dataIndex: 'effectiveDate', width: 170 }, + { title: '创建人', align: 'center', dataIndex: 'createBy', width: 100 }, + { title: '创建时间', align: 'center', dataIndex: 'createTime', width: 170 }, +]; + +export const searchFormSchema: FormSchema[] = [ + { label: '标准编号', field: 'standardNo', component: 'Input', colProps: { span: 6 } }, + { label: '物料名称', field: 'materialName', component: 'Input', colProps: { span: 6 } }, +]; + +export const formSchema: FormSchema[] = [ + { label: '', field: 'id', component: 'Input', show: false }, + { label: '', field: 'mixerMaterialId', component: 'Input', show: false }, + { + label: '标准编号', + field: 'standardNo', + component: 'Input', + required: true, + colProps: { span: 12 }, + }, + { + label: '密炼物料', + field: 'materialName', + component: 'Input', + slot: 'mixerMaterialPicker', + rules: [{ required: true, message: '请选择密炼物料' }], + colProps: { span: 12 }, + }, + { + label: '物料描述', + field: 'materialDesc', + component: 'Input', + componentProps: { readonly: true }, + colProps: { span: 12 }, + }, + { + label: '种类', + field: 'materialKind', + component: 'Input', + componentProps: { readonly: true }, + colProps: { span: 12 }, + }, + { label: '版本', field: 'versionNo', component: 'Input', colProps: { span: 12 } }, + { label: '发行编号', field: 'issueNo', component: 'Input', colProps: { span: 12 } }, + { label: '版本状态', field: 'versionStatus', component: 'Input', colProps: { span: 12 } }, + { + label: '创建人', + field: 'createBy', + component: 'Input', + componentProps: { readonly: true }, + ifShow: ({ values }) => !!values?.id, + colProps: { span: 12 }, + }, + { + label: '创建时间', + field: 'createTime', + component: 'Input', + componentProps: { readonly: true }, + ifShow: ({ values }) => !!values?.id, + colProps: { span: 12 }, + }, + { + label: '生效日期', + field: 'effectiveDate', + component: 'Input', + componentProps: { readonly: true }, + ifShow: ({ values }) => !!values?.id, + colProps: { span: 12 }, + }, +]; + +export const lineJVxeColumns: JVxeColumn[] = [ + { + title: '检验项目', + key: 'inspectItemId', + type: JVxeTypes.selectDictSearch, + width: 260, + async: true, + dict: 'mes_raw_material_inspect_item,inspect_item_name,id', + tipsContent: '输入关键字搜索检验项目', + validateRules: [{ required: true, message: '${title}必选' }], + }, + { title: '容许最小值', key: 'allowMin', type: JVxeTypes.inputNumber, width: 140 }, + { + title: '包含最小值', + key: 'includeMinFlag', + type: JVxeTypes.checkbox, + width: 120, + align: 'center', + customValue: [1, 0], + defaultValue: 0, + }, + { title: '容许最大值', key: 'allowMax', type: JVxeTypes.inputNumber, width: 140 }, + { + title: '包含最大值', + key: 'includeMaxFlag', + type: JVxeTypes.checkbox, + width: 120, + align: 'center', + customValue: [1, 0], + defaultValue: 0, + }, +]; diff --git a/jeecgboot-vue3/src/views/mes/material/MesRawMaterialInspectStdList.vue b/jeecgboot-vue3/src/views/mes/material/MesRawMaterialInspectStdList.vue new file mode 100644 index 00000000..bbe78513 --- /dev/null +++ b/jeecgboot-vue3/src/views/mes/material/MesRawMaterialInspectStdList.vue @@ -0,0 +1,90 @@ + + diff --git a/jeecgboot-vue3/src/views/mes/material/modules/MesMixerMaterialSelectModal.vue b/jeecgboot-vue3/src/views/mes/material/modules/MesMixerMaterialSelectModal.vue new file mode 100644 index 00000000..312bdc9b --- /dev/null +++ b/jeecgboot-vue3/src/views/mes/material/modules/MesMixerMaterialSelectModal.vue @@ -0,0 +1,93 @@ + + + diff --git a/jeecgboot-vue3/src/views/mes/material/modules/MesRawMaterialInspectItemModal.vue b/jeecgboot-vue3/src/views/mes/material/modules/MesRawMaterialInspectItemModal.vue new file mode 100644 index 00000000..6183d0ea --- /dev/null +++ b/jeecgboot-vue3/src/views/mes/material/modules/MesRawMaterialInspectItemModal.vue @@ -0,0 +1,38 @@ + + diff --git a/jeecgboot-vue3/src/views/mes/material/modules/MesRawMaterialInspectStdModal.vue b/jeecgboot-vue3/src/views/mes/material/modules/MesRawMaterialInspectStdModal.vue new file mode 100644 index 00000000..db06de3f --- /dev/null +++ b/jeecgboot-vue3/src/views/mes/material/modules/MesRawMaterialInspectStdModal.vue @@ -0,0 +1,161 @@ + + + diff --git a/jeecgboot-vue3/src/views/mes/rawmaterialinspectitem/index.vue b/jeecgboot-vue3/src/views/mes/rawmaterialinspectitem/index.vue new file mode 100644 index 00000000..d59020b5 --- /dev/null +++ b/jeecgboot-vue3/src/views/mes/rawmaterialinspectitem/index.vue @@ -0,0 +1,7 @@ + + + diff --git a/jeecgboot-vue3/src/views/mes/rawmaterialinspectstd/index.vue b/jeecgboot-vue3/src/views/mes/rawmaterialinspectstd/index.vue new file mode 100644 index 00000000..cf23005a --- /dev/null +++ b/jeecgboot-vue3/src/views/mes/rawmaterialinspectstd/index.vue @@ -0,0 +1,7 @@ + + +