From 825295fc08ca988c67af6b895ab0281c96494f55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=9C=E7=AC=99=E6=AD=8C?= <2277317060@qq.com> Date: Sun, 18 Feb 2024 09:10:18 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=94=9F=E4=BA=A7?= =?UTF-8?q?=E7=95=8C=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hw-ui/src/views/board/fifthFloor/index.vue | 834 ++++++++++++++++++ .../src/views/board/fourthFloor/assemble.vue | 660 ++++++++++++++ hw-ui/src/views/board/fourthFloor/weld.vue | 833 +++++++++++++++++ 3 files changed, 2327 insertions(+) create mode 100644 hw-ui/src/views/board/fifthFloor/index.vue create mode 100644 hw-ui/src/views/board/fourthFloor/assemble.vue create mode 100644 hw-ui/src/views/board/fourthFloor/weld.vue diff --git a/hw-ui/src/views/board/fifthFloor/index.vue b/hw-ui/src/views/board/fifthFloor/index.vue new file mode 100644 index 00000000..15b72a78 --- /dev/null +++ b/hw-ui/src/views/board/fifthFloor/index.vue @@ -0,0 +1,834 @@ + + + 京源环保生产管理系统 + + + 工单信息 + + + + + + + + + + + + + + + + + + + + + 图纸下发 + + + + + + + + + + + + + + + + + + + + 库存统计 + + + + + + + 生产派工 + + + + + + + + + + + + + + + + + + + 开始 + + + 退库 + + + 删除 + + + + + + + + + + 当日产量 + + + + + + + + 首页 + 板材领料 + SOP预览 + 退出 + + + + + + + + diff --git a/hw-ui/src/views/board/fourthFloor/assemble.vue b/hw-ui/src/views/board/fourthFloor/assemble.vue new file mode 100644 index 00000000..a03925d6 --- /dev/null +++ b/hw-ui/src/views/board/fourthFloor/assemble.vue @@ -0,0 +1,660 @@ + + + 京源环保生产管理系统 + + + 派工信息 + + + + + + + + + + + + + + + + + + + 条码打印 + + + 开始 + + + + + + + + + + 库存统计 + + + + + + + 计划明细 + + + + + + + + + + + + + + + 装配 + + + 领料 + + + 扫描 + + + 退料 + + + 删除 + + + + + + + + + + 当日产量 + + + + + + + + 首页 + 键盘 + 最小化 + 退出 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 删除 + + + + + + 申请领料 + + + + + + + diff --git a/hw-ui/src/views/board/fourthFloor/weld.vue b/hw-ui/src/views/board/fourthFloor/weld.vue new file mode 100644 index 00000000..836540c5 --- /dev/null +++ b/hw-ui/src/views/board/fourthFloor/weld.vue @@ -0,0 +1,833 @@ + + + 京源环保生产管理系统 + + + 工单信息 + + + + + + + + + + + + + + + + + + + + + 图纸下发 + + + + + + + + + + + + + + + + + + + + 库存统计 + + + + + + + 生产派工 + + + + + + + + + + + + + + + + + + + 开始 + + + 退库 + + + 删除 + + + + + + + + + + 当日产量 + + + + + + + + 首页 + SOP预览 + 退出 + + + + + + + + From 2d52984ba3b83cdd7c016e1b1f58f7e0ddfc32f2 Mon Sep 17 00:00:00 2001 From: xins Date: Wed, 21 Feb 2024 15:36:38 +0800 Subject: [PATCH 2/4] =?UTF-8?q?1.5.1=20=E7=99=BB=E5=BD=95=EF=BC=9A?= =?UTF-8?q?=E5=9C=A8=E7=99=BB=E5=BD=95=E6=97=B6=E5=A2=9E=E5=8A=A0=E8=8E=B7?= =?UTF-8?q?=E5=8F=96=E5=B7=A5=E4=BD=8D=E5=88=97=E8=A1=A8=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E7=9A=84=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/hw/mes/api/RemoteMesService.java | 12 + .../hw/mes/api/domain/MesBaseStationInfo.java | 145 +++++++++ .../api/factory/RemoteMesFallbackFactory.java | 6 + .../hw/auth/controller/TokenController.java | 27 +- .../core/constant/TdEngineConstants.java | 2 +- .../hw/mes/controller/MesApiController.java | 2 +- .../MesBaseStationInfoController.java | 20 +- .../MesProductionLineController.java | 23 ++ .../com/hw/mes/domain/MesBaseStationInfo.java | 290 +++++++++--------- .../mes/mapper/MesBaseStationInfoMapper.java | 19 +- .../service/IMesBaseStationInfoService.java | 19 +- .../impl/MesBaseStationInfoServiceImpl.java | 18 +- 12 files changed, 403 insertions(+), 180 deletions(-) create mode 100644 hw-api/hw-api-mes/src/main/java/com/hw/mes/api/domain/MesBaseStationInfo.java create mode 100644 hw-modules/hw-mes/src/main/java/com/hw/mes/controller/MesProductionLineController.java diff --git a/hw-api/hw-api-mes/src/main/java/com/hw/mes/api/RemoteMesService.java b/hw-api/hw-api-mes/src/main/java/com/hw/mes/api/RemoteMesService.java index 7fd341ab..f2d61aa3 100644 --- a/hw-api/hw-api-mes/src/main/java/com/hw/mes/api/RemoteMesService.java +++ b/hw-api/hw-api-mes/src/main/java/com/hw/mes/api/RemoteMesService.java @@ -5,6 +5,7 @@ import com.hw.common.core.constant.ServiceNameConstants; import com.hw.common.core.domain.R; import com.hw.mes.api.domain.MesBaseBarcodeInfo; import com.hw.mes.api.domain.MesBaseMaterialInfo; +import com.hw.mes.api.domain.MesBaseStationInfo; import com.hw.mes.api.domain.vo.MesBaseMaterialInfoVo; import com.hw.mes.api.factory.RemoteMesFallbackFactory; import org.springframework.cloud.openfeign.FeignClient; @@ -36,4 +37,15 @@ public interface RemoteMesService { @PostMapping("/materialinfo/getMaterialsByMaterialIds") public R> getMaterialsByMaterialIds(@RequestBody MesBaseMaterialInfoVo mesBaseMaterialInfo, @RequestHeader(SecurityConstants.FROM_SOURCE) String source); + + /** + * 查询工位信息列表 + * + * @param source 请求来源 + * @return 结果 + */ + @GetMapping("/baseStationInfo/getStations") + public R> getStations(@RequestHeader(SecurityConstants.FROM_SOURCE) String source); + + } diff --git a/hw-api/hw-api-mes/src/main/java/com/hw/mes/api/domain/MesBaseStationInfo.java b/hw-api/hw-api-mes/src/main/java/com/hw/mes/api/domain/MesBaseStationInfo.java new file mode 100644 index 00000000..53641406 --- /dev/null +++ b/hw-api/hw-api-mes/src/main/java/com/hw/mes/api/domain/MesBaseStationInfo.java @@ -0,0 +1,145 @@ +package com.hw.mes.api.domain; + +import com.hw.common.core.annotation.Excel; +import com.hw.common.core.web.domain.BaseEntity; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + * 工位信息对象 mes_base_station_info + * + * @author Yinq + * @date 2024-01-26 + */ +public class MesBaseStationInfo extends BaseEntity { + private static final long serialVersionUID = 1L; + + /** + * 主键标识 + */ + private Long stationId; + + /** + * 工位编号 + */ + @Excel(name = "工位编号") + private String stationCode; + + /** + * 工位名称 + */ + @Excel(name = "工位名称") + private String stationName; + + /** + * 所属工序编号 + */ + @Excel(name = "所属工序编号") + private Long processId; + + /** + * 所属工序名称 + */ + @Excel(name = "所属工序名称") + private String processName; + + /** + * 楼层 + */ + @Excel(name = "楼层") + private Long floor; + + /** + * 单位生产时间 + */ + @Excel(name = "单位生产时间") + private Long productionTime; + + /** + * 激活标识 + */ + @Excel(name = "激活标识") + private String activeFlag; + + public String getProcessName() { + return processName; + } + + public void setProcessName(String processName) { + this.processName = processName; + } + + public void setStationId(Long stationId) { + this.stationId = stationId; + } + + public Long getStationId() { + return stationId; + } + + public void setStationCode(String stationCode) { + this.stationCode = stationCode; + } + + public String getStationCode() { + return stationCode; + } + + public void setStationName(String stationName) { + this.stationName = stationName; + } + + public String getStationName() { + return stationName; + } + + public void setProcessId(Long processId) { + this.processId = processId; + } + + public Long getProcessId() { + return processId; + } + + public void setFloor(Long floor) { + this.floor = floor; + } + + public Long getFloor() { + return floor; + } + + public void setProductionTime(Long productionTime) { + this.productionTime = productionTime; + } + + public Long getProductionTime() { + return productionTime; + } + + public void setActiveFlag(String activeFlag) { + this.activeFlag = activeFlag; + } + + public String getActiveFlag() { + return activeFlag; + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) + .append("stationId", getStationId()) + .append("stationCode", getStationCode()) + .append("stationName", getStationName()) + .append("processId", getProcessId()) + .append("floor", getFloor()) + .append("productionTime", getProductionTime()) + .append("activeFlag", getActiveFlag()) + .append("remark", getRemark()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .toString(); + } +} diff --git a/hw-api/hw-api-mes/src/main/java/com/hw/mes/api/factory/RemoteMesFallbackFactory.java b/hw-api/hw-api-mes/src/main/java/com/hw/mes/api/factory/RemoteMesFallbackFactory.java index 31a3fdea..8f5d2d17 100644 --- a/hw-api/hw-api-mes/src/main/java/com/hw/mes/api/factory/RemoteMesFallbackFactory.java +++ b/hw-api/hw-api-mes/src/main/java/com/hw/mes/api/factory/RemoteMesFallbackFactory.java @@ -4,6 +4,7 @@ import com.hw.common.core.domain.R; import com.hw.mes.api.RemoteMesService; import com.hw.mes.api.domain.MesBaseBarcodeInfo; import com.hw.mes.api.domain.MesBaseMaterialInfo; +import com.hw.mes.api.domain.MesBaseStationInfo; import com.hw.mes.api.domain.vo.MesBaseMaterialInfoVo; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -34,6 +35,11 @@ public class RemoteMesFallbackFactory implements FallbackFactory> getMaterialsByMaterialIds(MesBaseMaterialInfoVo mesBaseMaterialInfo, String source) { return R.fail("获取物料信息失败:" + throwable.getMessage()); } + + @Override + public R> getStations(String source) { + return R.fail("获取工位列表信息失败:" + throwable.getMessage()); + } }; } } diff --git a/hw-auth/src/main/java/com/hw/auth/controller/TokenController.java b/hw-auth/src/main/java/com/hw/auth/controller/TokenController.java index 008fcb28..680ea497 100644 --- a/hw-auth/src/main/java/com/hw/auth/controller/TokenController.java +++ b/hw-auth/src/main/java/com/hw/auth/controller/TokenController.java @@ -1,11 +1,12 @@ package com.hw.auth.controller; import javax.servlet.http.HttpServletRequest; + +import com.hw.common.core.constant.SecurityConstants; +import com.hw.mes.api.RemoteMesService; +import com.hw.mes.api.domain.MesBaseStationInfo; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.DeleteMapping; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.bind.annotation.*; import com.hw.auth.form.LoginBody; import com.hw.auth.form.RegisterBody; import com.hw.auth.service.SysLoginService; @@ -17,6 +18,8 @@ import com.hw.common.security.service.TokenService; import com.hw.common.security.utils.SecurityUtils; import com.hw.system.api.model.LoginUser; +import java.util.List; + /** * token 控制 * @@ -31,6 +34,9 @@ public class TokenController @Autowired private SysLoginService sysLoginService; + @Autowired + private RemoteMesService remoteMesService; + @PostMapping("login") public R> login(@RequestBody LoginBody form) { @@ -85,4 +91,17 @@ public class TokenController // 获取登录token return R.ok(tokenService.createToken(userInfo)); } + + + /** + * 获取工位信息列表 + * @return + */ + @GetMapping("getStations") + public R> getStations() + { + R> resultR = remoteMesService.getStations(SecurityConstants.INNER); + return R.ok(resultR.getData()); + } + } diff --git a/hw-common/hw-common-core/src/main/java/com/hw/common/core/constant/TdEngineConstants.java b/hw-common/hw-common-core/src/main/java/com/hw/common/core/constant/TdEngineConstants.java index 75ef22a8..68842fdd 100644 --- a/hw-common/hw-common-core/src/main/java/com/hw/common/core/constant/TdEngineConstants.java +++ b/hw-common/hw-common-core/src/main/java/com/hw/common/core/constant/TdEngineConstants.java @@ -146,7 +146,7 @@ public class TdEngineConstants { * @param monitorId 计量设备编号 * @return String */ - public static String getEmsTableName(Long monitorId){ + public static String getEmsTableName(String monitorId){ return EMS_TABLE_NAME_PREFIX + monitorId; } diff --git a/hw-modules/hw-mes/src/main/java/com/hw/mes/controller/MesApiController.java b/hw-modules/hw-mes/src/main/java/com/hw/mes/controller/MesApiController.java index 8d7d8559..af4d49f4 100644 --- a/hw-modules/hw-mes/src/main/java/com/hw/mes/controller/MesApiController.java +++ b/hw-modules/hw-mes/src/main/java/com/hw/mes/controller/MesApiController.java @@ -11,7 +11,7 @@ import org.springframework.web.bind.annotation.*; import java.util.List; /** - * 物料BOM信息Controller + * MES对外提供接口Controller * * @author Yinq * @date 2024-01-30 diff --git a/hw-modules/hw-mes/src/main/java/com/hw/mes/controller/MesBaseStationInfoController.java b/hw-modules/hw-mes/src/main/java/com/hw/mes/controller/MesBaseStationInfoController.java index aafd0c43..08530360 100644 --- a/hw-modules/hw-mes/src/main/java/com/hw/mes/controller/MesBaseStationInfoController.java +++ b/hw-modules/hw-mes/src/main/java/com/hw/mes/controller/MesBaseStationInfoController.java @@ -3,7 +3,9 @@ package com.hw.mes.controller; import java.util.List; import javax.servlet.http.HttpServletResponse; +import com.hw.common.security.annotation.InnerAuth; import com.hw.common.security.utils.SecurityUtils; +import com.hw.mes.api.domain.MesBaseStationInfo; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; @@ -16,7 +18,6 @@ import org.springframework.web.bind.annotation.RestController; import com.hw.common.log.annotation.Log; import com.hw.common.log.enums.BusinessType; import com.hw.common.security.annotation.RequiresPermissions; -import com.hw.mes.domain.MesBaseStationInfo; import com.hw.mes.service.IMesBaseStationInfoService; import com.hw.common.core.web.controller.BaseController; import com.hw.common.core.web.domain.AjaxResult; @@ -25,7 +26,7 @@ import com.hw.common.core.web.page.TableDataInfo; /** * 工位信息Controller - * + * * @author Yinq * @date 2024-01-26 */ @@ -105,4 +106,19 @@ public class MesBaseStationInfoController extends BaseController { return toAjax(mesBaseStationInfoService.deleteMesBaseStationInfoByStationIds(stationIds)); } + + + + + /** + * 查询工位信息列表 + */ + @InnerAuth + @GetMapping("/getStations") + public AjaxResult getStations(MesBaseStationInfo mesBaseStationInfo) + { + List list = mesBaseStationInfoService.selectMesBaseStationInfoList(mesBaseStationInfo); + return success(list); + } + } diff --git a/hw-modules/hw-mes/src/main/java/com/hw/mes/controller/MesProductionLineController.java b/hw-modules/hw-mes/src/main/java/com/hw/mes/controller/MesProductionLineController.java new file mode 100644 index 00000000..9497dc26 --- /dev/null +++ b/hw-modules/hw-mes/src/main/java/com/hw/mes/controller/MesProductionLineController.java @@ -0,0 +1,23 @@ +package com.hw.mes.controller; + +import com.hw.common.core.web.controller.BaseController; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import java.util.List; + +/** + * MES产线接口Controller + * + * @author Yinq + * @date 2024-01-30 + */ +@RestController +@RequestMapping("/pl") +public class MesProductionLineController extends BaseController +{ + + + + +} diff --git a/hw-modules/hw-mes/src/main/java/com/hw/mes/domain/MesBaseStationInfo.java b/hw-modules/hw-mes/src/main/java/com/hw/mes/domain/MesBaseStationInfo.java index 1633116f..5fd5b22d 100644 --- a/hw-modules/hw-mes/src/main/java/com/hw/mes/domain/MesBaseStationInfo.java +++ b/hw-modules/hw-mes/src/main/java/com/hw/mes/domain/MesBaseStationInfo.java @@ -1,145 +1,145 @@ -package com.hw.mes.domain; - -import org.apache.commons.lang3.builder.ToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; -import com.hw.common.core.annotation.Excel; -import com.hw.common.core.web.domain.BaseEntity; - -/** - * 工位信息对象 mes_base_station_info - * - * @author Yinq - * @date 2024-01-26 - */ -public class MesBaseStationInfo extends BaseEntity { - private static final long serialVersionUID = 1L; - - /** - * 主键标识 - */ - private Long stationId; - - /** - * 工位编号 - */ - @Excel(name = "工位编号") - private String stationCode; - - /** - * 工位名称 - */ - @Excel(name = "工位名称") - private String stationName; - - /** - * 所属工序编号 - */ - @Excel(name = "所属工序编号") - private Long processId; - - /** - * 所属工序名称 - */ - @Excel(name = "所属工序名称") - private String processName; - - /** - * 楼层 - */ - @Excel(name = "楼层") - private Long floor; - - /** - * 单位生产时间 - */ - @Excel(name = "单位生产时间") - private Long productionTime; - - /** - * 激活标识 - */ - @Excel(name = "激活标识") - private String activeFlag; - - public String getProcessName() { - return processName; - } - - public void setProcessName(String processName) { - this.processName = processName; - } - - public void setStationId(Long stationId) { - this.stationId = stationId; - } - - public Long getStationId() { - return stationId; - } - - public void setStationCode(String stationCode) { - this.stationCode = stationCode; - } - - public String getStationCode() { - return stationCode; - } - - public void setStationName(String stationName) { - this.stationName = stationName; - } - - public String getStationName() { - return stationName; - } - - public void setProcessId(Long processId) { - this.processId = processId; - } - - public Long getProcessId() { - return processId; - } - - public void setFloor(Long floor) { - this.floor = floor; - } - - public Long getFloor() { - return floor; - } - - public void setProductionTime(Long productionTime) { - this.productionTime = productionTime; - } - - public Long getProductionTime() { - return productionTime; - } - - public void setActiveFlag(String activeFlag) { - this.activeFlag = activeFlag; - } - - public String getActiveFlag() { - return activeFlag; - } - - @Override - public String toString() { - return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) - .append("stationId", getStationId()) - .append("stationCode", getStationCode()) - .append("stationName", getStationName()) - .append("processId", getProcessId()) - .append("floor", getFloor()) - .append("productionTime", getProductionTime()) - .append("activeFlag", getActiveFlag()) - .append("remark", getRemark()) - .append("createBy", getCreateBy()) - .append("createTime", getCreateTime()) - .append("updateBy", getUpdateBy()) - .append("updateTime", getUpdateTime()) - .toString(); - } -} +//package com.hw.mes.domain; +// +//import org.apache.commons.lang3.builder.ToStringBuilder; +//import org.apache.commons.lang3.builder.ToStringStyle; +//import com.hw.common.core.annotation.Excel; +//import com.hw.common.core.web.domain.BaseEntity; +// +///** +// * 工位信息对象 mes_base_station_info +// * +// * @author Yinq +// * @date 2024-01-26 +// */ +//public class MesBaseStationInfo extends BaseEntity { +// private static final long serialVersionUID = 1L; +// +// /** +// * 主键标识 +// */ +// private Long stationId; +// +// /** +// * 工位编号 +// */ +// @Excel(name = "工位编号") +// private String stationCode; +// +// /** +// * 工位名称 +// */ +// @Excel(name = "工位名称") +// private String stationName; +// +// /** +// * 所属工序编号 +// */ +// @Excel(name = "所属工序编号") +// private Long processId; +// +// /** +// * 所属工序名称 +// */ +// @Excel(name = "所属工序名称") +// private String processName; +// +// /** +// * 楼层 +// */ +// @Excel(name = "楼层") +// private Long floor; +// +// /** +// * 单位生产时间 +// */ +// @Excel(name = "单位生产时间") +// private Long productionTime; +// +// /** +// * 激活标识 +// */ +// @Excel(name = "激活标识") +// private String activeFlag; +// +// public String getProcessName() { +// return processName; +// } +// +// public void setProcessName(String processName) { +// this.processName = processName; +// } +// +// public void setStationId(Long stationId) { +// this.stationId = stationId; +// } +// +// public Long getStationId() { +// return stationId; +// } +// +// public void setStationCode(String stationCode) { +// this.stationCode = stationCode; +// } +// +// public String getStationCode() { +// return stationCode; +// } +// +// public void setStationName(String stationName) { +// this.stationName = stationName; +// } +// +// public String getStationName() { +// return stationName; +// } +// +// public void setProcessId(Long processId) { +// this.processId = processId; +// } +// +// public Long getProcessId() { +// return processId; +// } +// +// public void setFloor(Long floor) { +// this.floor = floor; +// } +// +// public Long getFloor() { +// return floor; +// } +// +// public void setProductionTime(Long productionTime) { +// this.productionTime = productionTime; +// } +// +// public Long getProductionTime() { +// return productionTime; +// } +// +// public void setActiveFlag(String activeFlag) { +// this.activeFlag = activeFlag; +// } +// +// public String getActiveFlag() { +// return activeFlag; +// } +// +// @Override +// public String toString() { +// return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) +// .append("stationId", getStationId()) +// .append("stationCode", getStationCode()) +// .append("stationName", getStationName()) +// .append("processId", getProcessId()) +// .append("floor", getFloor()) +// .append("productionTime", getProductionTime()) +// .append("activeFlag", getActiveFlag()) +// .append("remark", getRemark()) +// .append("createBy", getCreateBy()) +// .append("createTime", getCreateTime()) +// .append("updateBy", getUpdateBy()) +// .append("updateTime", getUpdateTime()) +// .toString(); +// } +//} diff --git a/hw-modules/hw-mes/src/main/java/com/hw/mes/mapper/MesBaseStationInfoMapper.java b/hw-modules/hw-mes/src/main/java/com/hw/mes/mapper/MesBaseStationInfoMapper.java index e7e5c1b7..004fdc58 100644 --- a/hw-modules/hw-mes/src/main/java/com/hw/mes/mapper/MesBaseStationInfoMapper.java +++ b/hw-modules/hw-mes/src/main/java/com/hw/mes/mapper/MesBaseStationInfoMapper.java @@ -1,19 +1,20 @@ package com.hw.mes.mapper; +import com.hw.mes.api.domain.MesBaseStationInfo; + import java.util.List; -import com.hw.mes.domain.MesBaseStationInfo; /** * 工位信息Mapper接口 - * + * * @author Yinq * @date 2024-01-26 */ -public interface MesBaseStationInfoMapper +public interface MesBaseStationInfoMapper { /** * 查询工位信息 - * + * * @param stationId 工位信息主键 * @return 工位信息 */ @@ -21,7 +22,7 @@ public interface MesBaseStationInfoMapper /** * 查询工位信息列表 - * + * * @param mesBaseStationInfo 工位信息 * @return 工位信息集合 */ @@ -29,7 +30,7 @@ public interface MesBaseStationInfoMapper /** * 新增工位信息 - * + * * @param mesBaseStationInfo 工位信息 * @return 结果 */ @@ -37,7 +38,7 @@ public interface MesBaseStationInfoMapper /** * 修改工位信息 - * + * * @param mesBaseStationInfo 工位信息 * @return 结果 */ @@ -45,7 +46,7 @@ public interface MesBaseStationInfoMapper /** * 删除工位信息 - * + * * @param stationId 工位信息主键 * @return 结果 */ @@ -53,7 +54,7 @@ public interface MesBaseStationInfoMapper /** * 批量删除工位信息 - * + * * @param stationIds 需要删除的数据主键集合 * @return 结果 */ diff --git a/hw-modules/hw-mes/src/main/java/com/hw/mes/service/IMesBaseStationInfoService.java b/hw-modules/hw-mes/src/main/java/com/hw/mes/service/IMesBaseStationInfoService.java index f474b5c2..2cd16ad1 100644 --- a/hw-modules/hw-mes/src/main/java/com/hw/mes/service/IMesBaseStationInfoService.java +++ b/hw-modules/hw-mes/src/main/java/com/hw/mes/service/IMesBaseStationInfoService.java @@ -1,19 +1,20 @@ package com.hw.mes.service; +import com.hw.mes.api.domain.MesBaseStationInfo; + import java.util.List; -import com.hw.mes.domain.MesBaseStationInfo; /** * 工位信息Service接口 - * + * * @author Yinq * @date 2024-01-26 */ -public interface IMesBaseStationInfoService +public interface IMesBaseStationInfoService { /** * 查询工位信息 - * + * * @param stationId 工位信息主键 * @return 工位信息 */ @@ -21,7 +22,7 @@ public interface IMesBaseStationInfoService /** * 查询工位信息列表 - * + * * @param mesBaseStationInfo 工位信息 * @return 工位信息集合 */ @@ -29,7 +30,7 @@ public interface IMesBaseStationInfoService /** * 新增工位信息 - * + * * @param mesBaseStationInfo 工位信息 * @return 结果 */ @@ -37,7 +38,7 @@ public interface IMesBaseStationInfoService /** * 修改工位信息 - * + * * @param mesBaseStationInfo 工位信息 * @return 结果 */ @@ -45,7 +46,7 @@ public interface IMesBaseStationInfoService /** * 批量删除工位信息 - * + * * @param stationIds 需要删除的工位信息主键集合 * @return 结果 */ @@ -53,7 +54,7 @@ public interface IMesBaseStationInfoService /** * 删除工位信息信息 - * + * * @param stationId 工位信息主键 * @return 结果 */ diff --git a/hw-modules/hw-mes/src/main/java/com/hw/mes/service/impl/MesBaseStationInfoServiceImpl.java b/hw-modules/hw-mes/src/main/java/com/hw/mes/service/impl/MesBaseStationInfoServiceImpl.java index 888af9c2..c6afeafe 100644 --- a/hw-modules/hw-mes/src/main/java/com/hw/mes/service/impl/MesBaseStationInfoServiceImpl.java +++ b/hw-modules/hw-mes/src/main/java/com/hw/mes/service/impl/MesBaseStationInfoServiceImpl.java @@ -3,27 +3,27 @@ package com.hw.mes.service.impl; import java.util.List; import com.hw.common.core.utils.DateUtils; import com.hw.common.security.utils.SecurityUtils; +import com.hw.mes.api.domain.MesBaseStationInfo; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.hw.mes.mapper.MesBaseStationInfoMapper; -import com.hw.mes.domain.MesBaseStationInfo; import com.hw.mes.service.IMesBaseStationInfoService; /** * 工位信息Service业务层处理 - * + * * @author Yinq * @date 2024-01-26 */ @Service -public class MesBaseStationInfoServiceImpl implements IMesBaseStationInfoService +public class MesBaseStationInfoServiceImpl implements IMesBaseStationInfoService { @Autowired private MesBaseStationInfoMapper mesBaseStationInfoMapper; /** * 查询工位信息 - * + * * @param stationId 工位信息主键 * @return 工位信息 */ @@ -35,7 +35,7 @@ public class MesBaseStationInfoServiceImpl implements IMesBaseStationInfoService /** * 查询工位信息列表 - * + * * @param mesBaseStationInfo 工位信息 * @return 工位信息 */ @@ -47,7 +47,7 @@ public class MesBaseStationInfoServiceImpl implements IMesBaseStationInfoService /** * 新增工位信息 - * + * * @param mesBaseStationInfo 工位信息 * @return 结果 */ @@ -61,7 +61,7 @@ public class MesBaseStationInfoServiceImpl implements IMesBaseStationInfoService /** * 修改工位信息 - * + * * @param mesBaseStationInfo 工位信息 * @return 结果 */ @@ -75,7 +75,7 @@ public class MesBaseStationInfoServiceImpl implements IMesBaseStationInfoService /** * 批量删除工位信息 - * + * * @param stationIds 需要删除的工位信息主键 * @return 结果 */ @@ -87,7 +87,7 @@ public class MesBaseStationInfoServiceImpl implements IMesBaseStationInfoService /** * 删除工位信息信息 - * + * * @param stationId 工位信息主键 * @return 结果 */ From 13fa8ee782823e9d6d7b81b77252b664bec7e1a7 Mon Sep 17 00:00:00 2001 From: xins Date: Wed, 21 Feb 2024 15:38:09 +0800 Subject: [PATCH 3/4] =?UTF-8?q?1.5.2=20=E8=B4=A8=E6=A3=80=EF=BC=9A?= =?UTF-8?q?=E8=B4=A8=E6=A3=80resources=E6=96=87=E4=BB=B6=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mapper/qms/MesBaseBarcodeInfoMapper.xml | 187 +++++++++++ .../mapper/qms/MesBaseMaterialInfoMapper.xml | 300 ++++++++++++++++++ .../mapper/qms/QmsCheckProjectMapper.xml | 154 +++++++++ .../mapper/qms/QmsCheckResultDetailMapper.xml | 139 ++++++++ .../mapper/qms/QmsCheckResultMapper.xml | 173 ++++++++++ .../mapper/qms/QmsCheckRuleDetailMapper.xml | 105 ++++++ .../mapper/qms/QmsCheckRuleMapper.xml | 140 ++++++++ .../mapper/qms/QmsCheckRuleProjectMapper.xml | 116 +++++++ 8 files changed, 1314 insertions(+) create mode 100644 hw-modules/hw-qms/src/main/resources/mapper/qms/MesBaseBarcodeInfoMapper.xml create mode 100644 hw-modules/hw-qms/src/main/resources/mapper/qms/MesBaseMaterialInfoMapper.xml create mode 100644 hw-modules/hw-qms/src/main/resources/mapper/qms/QmsCheckProjectMapper.xml create mode 100644 hw-modules/hw-qms/src/main/resources/mapper/qms/QmsCheckResultDetailMapper.xml create mode 100644 hw-modules/hw-qms/src/main/resources/mapper/qms/QmsCheckResultMapper.xml create mode 100644 hw-modules/hw-qms/src/main/resources/mapper/qms/QmsCheckRuleDetailMapper.xml create mode 100644 hw-modules/hw-qms/src/main/resources/mapper/qms/QmsCheckRuleMapper.xml create mode 100644 hw-modules/hw-qms/src/main/resources/mapper/qms/QmsCheckRuleProjectMapper.xml diff --git a/hw-modules/hw-qms/src/main/resources/mapper/qms/MesBaseBarcodeInfoMapper.xml b/hw-modules/hw-qms/src/main/resources/mapper/qms/MesBaseBarcodeInfoMapper.xml new file mode 100644 index 00000000..8724ec67 --- /dev/null +++ b/hw-modules/hw-qms/src/main/resources/mapper/qms/MesBaseBarcodeInfoMapper.xml @@ -0,0 +1,187 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select barcode_id, print_time, print_person, batch_flag, barcode_type, barcode_info, batch_code, pallet_info_code, material_id, manufacturer_id, amount, machine_name, po_no, production_date, accepted_date, last_outstock_date, plan_code, plan_detail_code, saleorder_code, project_no, serial_number, remark, bind_status, bind_by, bind_time, update_by, update_time from mes_base_barcode_info + + + + + + and print_time = #{printTime} + and print_person = #{printPerson} + and batch_flag = #{batchFlag} + and barcode_type = #{barcodeType} + and barcode_info = #{barcodeInfo} + and batch_code = #{batchCode} + and pallet_info_code = #{palletInfoCode} + and material_id = #{materialId} + and manufacturer_id = #{manufacturerId} + and amount = #{amount} + and machine_name like concat('%', #{machineName}, '%') + and po_no = #{poNo} + and production_date = #{productionDate} + and accepted_date = #{acceptedDate} + and last_outstock_date = #{lastOutstockDate} + and plan_code = #{planCode} + and plan_detail_code = #{planDetailCode} + and saleorder_code = #{saleorderCode} + and project_no = #{projectNo} + and serial_number = #{serialNumber} + and bind_status = #{bindStatus} + and bind_by = #{bindBy} + and bind_time = #{bindTime} + + + + + + where barcode_id = #{barcodeId} + + + + insert into mes_base_barcode_info + + print_time, + print_person, + batch_flag, + barcode_type, + barcode_info, + batch_code, + pallet_info_code, + material_id, + manufacturer_id, + amount, + machine_name, + po_no, + production_date, + accepted_date, + last_outstock_date, + plan_code, + plan_detail_code, + saleorder_code, + project_no, + serial_number, + remark, + bind_status, + bind_by, + bind_time, + update_by, + update_time, + + + #{printTime}, + #{printPerson}, + #{batchFlag}, + #{barcodeType}, + #{barcodeInfo}, + #{batchCode}, + #{palletInfoCode}, + #{materialId}, + #{manufacturerId}, + #{amount}, + #{machineName}, + #{poNo}, + #{productionDate}, + #{acceptedDate}, + #{lastOutstockDate}, + #{planCode}, + #{planDetailCode}, + #{saleorderCode}, + #{projectNo}, + #{serialNumber}, + #{remark}, + #{bindStatus}, + #{bindBy}, + #{bindTime}, + #{updateBy}, + #{updateTime}, + + + + + update mes_base_barcode_info + + print_time = #{printTime}, + print_person = #{printPerson}, + batch_flag = #{batchFlag}, + barcode_type = #{barcodeType}, + barcode_info = #{barcodeInfo}, + batch_code = #{batchCode}, + pallet_info_code = #{palletInfoCode}, + material_id = #{materialId}, + manufacturer_id = #{manufacturerId}, + amount = #{amount}, + machine_name = #{machineName}, + po_no = #{poNo}, + production_date = #{productionDate}, + accepted_date = #{acceptedDate}, + last_outstock_date = #{lastOutstockDate}, + plan_code = #{planCode}, + plan_detail_code = #{planDetailCode}, + saleorder_code = #{saleorderCode}, + project_no = #{projectNo}, + serial_number = #{serialNumber}, + remark = #{remark}, + bind_status = #{bindStatus}, + bind_by = #{bindBy}, + bind_time = #{bindTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + + where barcode_id = #{barcodeId} + + + + delete from mes_base_barcode_info where barcode_id = #{barcodeId} + + + + delete from mes_base_barcode_info where barcode_id in + + #{barcodeId} + + + + + + + + where barcode_info = #{barcodeInfo} limit 1 + + + + diff --git a/hw-modules/hw-qms/src/main/resources/mapper/qms/MesBaseMaterialInfoMapper.xml b/hw-modules/hw-qms/src/main/resources/mapper/qms/MesBaseMaterialInfoMapper.xml new file mode 100644 index 00000000..454ad268 --- /dev/null +++ b/hw-modules/hw-qms/src/main/resources/mapper/qms/MesBaseMaterialInfoMapper.xml @@ -0,0 +1,300 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select material_id, + erp_id, + material_code, + old_material_code, + material_name, + material_categories, + material_subclass, + material_type_id, + batch_flag, + material_unit_id, + material_unit, + material_matkl, + material_spec, + net_weight, + gross_weight, + factory_id, + create_org_id, + use_org_id, + prodline_id, + active_flag, + deleted_flag, + remark, + create_by, + create_time, + update_by, + update_time, + approve_date, + erp_modify_date + from mes_base_material_info + + + + + + and erp_id = #{erpId} + and material_code = #{materialCode} + and old_material_code = #{oldMaterialCode} + + and material_name like concat('%', #{materialName}, + '%') + + and material_categories = + #{materialCategories} + + and material_subclass = + #{materialSubclass} + + and material_type_id = #{materialTypeId} + and batch_flag = #{batchFlag} + and material_unit_id = #{materialUnitId} + and material_unit = #{materialUnit} + and material_matkl = #{materialMatkl} + and material_spec = #{materialSpec} + and net_weight = #{netWeight} + and gross_weight = #{grossWeight} + and factory_id = #{factoryId} + and create_org_id = #{createOrgId} + and use_org_id = #{useOrgId} + and prodline_id = #{prodlineId} + and active_flag = #{activeFlag} + and deleted_flag = #{deletedFlag} + and approve_date = #{approveDate} + and erp_modify_date = #{erpModifyDate} + + + + + + where material_id = #{materialId} + + + + insert into mes_base_material_info + + erp_id, + material_code, + old_material_code, + material_name, + material_categories, + material_subclass, + material_type_id, + batch_flag, + material_unit_id, + material_unit, + material_matkl, + material_spec, + net_weight, + gross_weight, + factory_id, + create_org_id, + use_org_id, + prodline_id, + active_flag, + deleted_flag, + remark, + create_by, + create_time, + update_by, + update_time, + approve_date, + erp_modify_date, + + + #{erpId}, + #{materialCode}, + #{oldMaterialCode}, + #{materialName}, + #{materialCategories}, + #{materialSubclass}, + #{materialTypeId}, + #{batchFlag}, + #{materialUnitId}, + #{materialUnit}, + #{materialMatkl}, + #{materialSpec}, + #{netWeight}, + #{grossWeight}, + #{factoryId}, + #{createOrgId}, + #{useOrgId}, + #{prodlineId}, + #{activeFlag}, + #{deletedFlag}, + #{remark}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + #{approveDate}, + #{erpModifyDate}, + + + + + update mes_base_material_info + + erp_id = #{erpId}, + material_code = #{materialCode}, + old_material_code = #{oldMaterialCode}, + material_name = #{materialName}, + material_categories = + #{materialCategories}, + + material_subclass = #{materialSubclass}, + material_type_id = #{materialTypeId}, + batch_flag = #{batchFlag}, + material_unit_id = #{materialUnitId}, + material_unit = #{materialUnit}, + material_matkl = #{materialMatkl}, + material_spec = #{materialSpec}, + net_weight = #{netWeight}, + gross_weight = #{grossWeight}, + factory_id = #{factoryId}, + create_org_id = #{createOrgId}, + use_org_id = #{useOrgId}, + prodline_id = #{prodlineId}, + active_flag = #{activeFlag}, + deleted_flag = #{deletedFlag}, + remark = #{remark}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + approve_date = #{approveDate}, + erp_modify_date = #{erpModifyDate}, + + where material_id = #{materialId} + + + + delete + from mes_base_material_info + where material_id = #{materialId} + + + + delete from mes_base_material_info where material_id in + + #{materialId} + + + + + + + + + + + where material_id in + + #{materialId} + + + + + + + + + + + + select material_id, + erp_id, + material_code, + old_material_code, + material_name, + material_categories, + material_subclass, + material_type_id, + batch_flag, + material_unit_id, + material_unit, + material_matkl, + material_spec, + net_weight, + gross_weight, + factory_id + from mes_base_material_info mbmi + + and not exists (select 1 from qms_check_rule_detail qcrd where mbmi.material_id = qcrd.target_id and qcrd.target_type='1' and qcrd.check_rule_id=#{checkRuleId}) + and erp_id = #{erpId} + and material_code = #{materialCode} + and old_material_code = #{oldMaterialCode} + + and material_name like concat('%', #{materialName}, + '%') + + and material_categories = + #{materialCategories} + + and material_subclass = + #{materialSubclass} + + and material_type_id = #{materialTypeId} + and batch_flag = #{batchFlag} + and material_unit_id = #{materialUnitId} + and material_unit = #{materialUnit} + and material_matkl = #{materialMatkl} + and material_spec = #{materialSpec} + and net_weight = #{netWeight} + and gross_weight = #{grossWeight} + and factory_id = #{factoryId} + and create_org_id = #{createOrgId} + and use_org_id = #{useOrgId} + and prodline_id = #{prodlineId} + and active_flag = #{activeFlag} + and deleted_flag = #{deletedFlag} + and approve_date = #{approveDate} + and erp_modify_date = #{erpModifyDate} + + + + + diff --git a/hw-modules/hw-qms/src/main/resources/mapper/qms/QmsCheckProjectMapper.xml b/hw-modules/hw-qms/src/main/resources/mapper/qms/QmsCheckProjectMapper.xml new file mode 100644 index 00000000..ed2f25b9 --- /dev/null +++ b/hw-modules/hw-qms/src/main/resources/mapper/qms/QmsCheckProjectMapper.xml @@ -0,0 +1,154 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + select check_project_id, check_project_name, check_project_status, check_project_property, check_mode, check_sample, check_tool, unit_code, standard_value, upper_diff, down_diff, defect_severity, remark, create_by, create_time, update_by, update_time from qms_check_project + + + + + + and check_project_name like concat('%', #{checkProjectName}, '%') + and check_project_status = #{checkProjectStatus} + and check_project_property = #{checkProjectProperty} + and check_mode = #{checkMode} + and check_sample = #{checkSample} + and check_tool = #{checkTool} + and unit_code = #{unitCode} + and standard_value = #{standardValue} + and upper_diff = #{upperDiff} + and down_diff = #{downDiff} + and defect_severity = #{defectSeverity} + + + + + + where check_project_id = #{checkProjectId} + + + + insert into qms_check_project + + check_project_name, + check_project_status, + check_project_property, + check_mode, + check_sample, + check_tool, + unit_code, + standard_value, + upper_diff, + down_diff, + defect_severity, + remark, + create_by, + create_time, + update_by, + update_time, + + + #{checkProjectName}, + #{checkProjectStatus}, + #{checkProjectProperty}, + #{checkMode}, + #{checkSample}, + #{checkTool}, + #{unitCode}, + #{standardValue}, + #{upperDiff}, + #{downDiff}, + #{defectSeverity}, + #{remark}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + + + + + update qms_check_project + + check_project_name = #{checkProjectName}, + check_project_status = #{checkProjectStatus}, + check_project_property = #{checkProjectProperty}, + check_mode = #{checkMode}, + check_sample = #{checkSample}, + check_tool = #{checkTool}, + unit_code = #{unitCode}, + standard_value = #{standardValue}, + upper_diff = #{upperDiff}, + down_diff = #{downDiff}, + defect_severity = #{defectSeverity}, + remark = #{remark}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + + where check_project_id = #{checkProjectId} + + + + delete from qms_check_project where check_project_id = #{checkProjectId} + + + + delete from qms_check_project where check_project_id in + + #{checkProjectId} + + + + + + + + + + + + + + select qcp.check_project_id, qcp.check_project_name from qms_check_project qcp + + and not exists (select 1 from qms_check_rule_project qcrp where qcrp.check_project_id = qcp.check_project_id and qcrp.check_rule_id=#{checkRuleId}) + + and check_project_name like concat('%', #{checkProjectName}, '%') + and check_project_status = #{checkProjectStatus} + and check_project_property = #{checkProjectProperty} + and check_mode = #{checkMode} + and check_sample = #{checkSample} + and check_tool = #{checkTool} + and unit_code = #{unitCode} + and standard_value = #{standardValue} + and upper_diff = #{upperDiff} + and down_diff = #{downDiff} + and defect_severity = #{defectSeverity} + + + diff --git a/hw-modules/hw-qms/src/main/resources/mapper/qms/QmsCheckResultDetailMapper.xml b/hw-modules/hw-qms/src/main/resources/mapper/qms/QmsCheckResultDetailMapper.xml new file mode 100644 index 00000000..56805a83 --- /dev/null +++ b/hw-modules/hw-qms/src/main/resources/mapper/qms/QmsCheckResultDetailMapper.xml @@ -0,0 +1,139 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select check_result_detail_id, check_result_id, material_barcode, check_status, remark, create_by, create_time, update_by, update_time from qms_check_result_detail + + + + + + and check_result_id = #{checkResultId} + and material_barcode = #{materialBarcode} + and check_status = #{checkStatus} + + + + + select a.check_result_detail_id, a.check_result_id, a.material_barcode, a.check_status, a.remark, a.create_by, a.create_time, a.update_by, a.update_time, + b.result_detail_project_id as sub_result_detail_project_id, b.check_result_detail_id as sub_check_result_detail_id, b.check_project_id as sub_check_project_id, b.check_project_status as sub_check_project_status, b.check_project_result as sub_check_project_result, b.standard_value as sub_standard_value, b.upper_diff as sub_upper_diff, b.down_diff as sub_down_diff, b.create_by as sub_create_by, b.create_time as sub_create_time, b.update_by as sub_update_by, b.update_time as sub_update_time + from qms_check_result_detail a + left join qms_check_result_detail_project b on b.check_result_detail_id = a.check_result_detail_id + where a.check_result_detail_id = #{checkResultDetailId} + + + + insert into qms_check_result_detail + + check_result_id, + material_barcode, + check_status, + remark, + create_by, + create_time, + update_by, + update_time, + + + #{checkResultId}, + #{materialBarcode}, + #{checkStatus}, + #{remark}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + + + + + update qms_check_result_detail + + check_result_id = #{checkResultId}, + material_barcode = #{materialBarcode}, + check_status = #{checkStatus}, + remark = #{remark}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + + where check_result_detail_id = #{checkResultDetailId} + + + + delete from qms_check_result_detail where check_result_detail_id = #{checkResultDetailId} + + + + delete from qms_check_result_detail where check_result_detail_id in + + #{checkResultDetailId} + + + + + delete from qms_check_result_detail_project where check_result_detail_id in + + #{checkResultDetailId} + + + + + delete from qms_check_result_detail_project where check_result_detail_id = #{checkResultDetailId} + + + + insert into qms_check_result_detail_project( result_detail_project_id, check_result_detail_id, check_project_id, check_project_status, check_project_result, standard_value, upper_diff, down_diff, create_by, create_time, update_by, update_time) values + + ( #{item.resultDetailProjectId}, #{item.checkResultDetailId}, #{item.checkProjectId}, #{item.checkProjectStatus}, #{item.checkProjectResult}, #{item.standardValue}, #{item.upperDiff}, #{item.downDiff}, #{item.createBy}, #{item.createTime}, #{item.updateBy}, #{item.updateTime}) + + + + + + + + + select a.check_result_detail_id, a.check_result_id, a.material_barcode, a.check_status, a.remark, a.create_by, a.create_time, a.update_by, a.update_time, + b.result_detail_project_id as sub_result_detail_project_id, b.check_result_detail_id as sub_check_result_detail_id, b.check_project_id as sub_check_project_id, b.check_project_status as sub_check_project_status, b.check_project_result as sub_check_project_result, b.standard_value as sub_standard_value, b.upper_diff as sub_upper_diff, b.down_diff as sub_down_diff, b.create_by as sub_create_by, b.create_time as sub_create_time, b.update_by as sub_update_by, b.update_time as sub_update_time + from qms_check_result_detail a + left join qms_check_result_detail_project b on b.check_result_detail_id = a.check_result_detail_id + where a.material_barcode = #{materialBarcode} limit 1 + + + diff --git a/hw-modules/hw-qms/src/main/resources/mapper/qms/QmsCheckResultMapper.xml b/hw-modules/hw-qms/src/main/resources/mapper/qms/QmsCheckResultMapper.xml new file mode 100644 index 00000000..a4d6e00c --- /dev/null +++ b/hw-modules/hw-qms/src/main/resources/mapper/qms/QmsCheckResultMapper.xml @@ -0,0 +1,173 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select check_result_id, material_type, material_id, material_batch, check_mode, check_sample, plan_code, plan_detail_code, saleorder_code, po_no, po_line, project_no, check_status, remark, create_by, create_time, update_by, update_time, attr1 from qms_check_result + + + + + + and material_type = #{materialType} + and material_id = #{materialId} + and material_batch = #{materialBatch} + and check_mode = #{checkMode} + and check_sample = #{checkSample} + and plan_code = #{planCode} + and plan_detail_code = #{planDetailCode} + and saleorder_code = #{saleorderCode} + and po_no = #{poNo} + and po_line = #{poLine} + and project_no = #{projectNo} + and check_status = #{checkStatus} + and attr1 = #{attr1} + + + + + select a.check_result_id, a.material_type, a.material_id, a.material_batch, a.check_mode, a.check_sample, a.plan_code, a.plan_detail_code, a.saleorder_code, a.po_no, a.po_line, a.project_no, a.check_status, a.remark, a.create_by, a.create_time, a.update_by, a.update_time, a.attr1, + b.check_result_detail_id as sub_check_result_detail_id, b.check_result_id as sub_check_result_id, b.material_barcode as sub_material_barcode, b.check_status as sub_check_status, b.remark as sub_remark, b.create_by as sub_create_by, b.create_time as sub_create_time, b.update_by as sub_update_by, b.update_time as sub_update_time + from qms_check_result a + left join qms_check_result_detail b on b.check_result_id = a.check_result_id + where a.check_result_id = #{checkResultId} + + + + insert into qms_check_result + + material_type, + material_id, + material_batch, + check_mode, + check_sample, + plan_code, + plan_detail_code, + saleorder_code, + po_no, + po_line, + project_no, + check_status, + remark, + create_by, + create_time, + update_by, + update_time, + attr1, + + + #{materialType}, + #{materialId}, + #{materialBatch}, + #{checkMode}, + #{checkSample}, + #{planCode}, + #{planDetailCode}, + #{saleorderCode}, + #{poNo}, + #{poLine}, + #{projectNo}, + #{checkStatus}, + #{remark}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + #{attr1}, + + + + + update qms_check_result + + material_type = #{materialType}, + material_id = #{materialId}, + material_batch = #{materialBatch}, + check_mode = #{checkMode}, + check_sample = #{checkSample}, + plan_code = #{planCode}, + plan_detail_code = #{planDetailCode}, + saleorder_code = #{saleorderCode}, + po_no = #{poNo}, + po_line = #{poLine}, + project_no = #{projectNo}, + check_status = #{checkStatus}, + remark = #{remark}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + attr1 = #{attr1}, + + where check_result_id = #{checkResultId} + + + + delete from qms_check_result where check_result_id = #{checkResultId} + + + + delete from qms_check_result where check_result_id in + + #{checkResultId} + + + + + delete from qms_check_result_detail where check_result_id in + + #{checkResultId} + + + + + delete from qms_check_result_detail where check_result_id = #{checkResultId} + + + + insert into qms_check_result_detail( check_result_detail_id, check_result_id, material_barcode, check_status, remark, create_by, create_time, update_by, update_time) values + + ( #{item.checkResultDetailId}, #{item.checkResultId}, #{item.materialBarcode}, #{item.checkStatus}, #{item.remark}, #{item.createBy}, #{item.createTime}, #{item.updateBy}, #{item.updateTime}) + + + diff --git a/hw-modules/hw-qms/src/main/resources/mapper/qms/QmsCheckRuleDetailMapper.xml b/hw-modules/hw-qms/src/main/resources/mapper/qms/QmsCheckRuleDetailMapper.xml new file mode 100644 index 00000000..60e6eafc --- /dev/null +++ b/hw-modules/hw-qms/src/main/resources/mapper/qms/QmsCheckRuleDetailMapper.xml @@ -0,0 +1,105 @@ + + + + + + + + + + + + + + select check_rule_id, target_type, target_id from qms_check_rule_detail + + + + + + and check_rule_id = #{checkRuleId} + and target_type = #{targetType} + and target_id = #{targetId} + + + + + + where check_rule_id = #{checkRuleId} + + + + insert into qms_check_rule_detail + + check_rule_id, + target_type, + target_id, + + + #{checkRuleId}, + #{targetType}, + #{targetId}, + + + + + update qms_check_rule_detail + + target_type = #{targetType}, + target_id = #{targetId}, + + where check_rule_id = #{checkRuleId} + + + + delete from qms_check_rule_detail where check_rule_id = #{checkRuleId} + + + + delete from qms_check_rule_detail where check_rule_id in + + #{checkRuleId} + + + + + + + + + + + + + + + + + + + + select qcrd.check_rule_id, qcrd.target_type, qcrd.target_id, + mbmi.material_code,mbmi.material_name + from qms_check_rule_detail qcrd + left join mes_base_material_info mbmi on qcrd.target_id=mbmi.material_id and qcrd.target_type='1' + + and check_rule_id = #{checkRuleId} + and target_type = #{targetType} + and target_id = #{targetId} + and material_code = #{materialCode} + and material_name like concat('%', #{materialName}, '%') + + + + + + delete from qms_check_rule_detail where + + ( check_rule_id = #{item.checkRuleId} and target_id = #{item.targetId} and target_type=#{item.targetType}) + + + + + diff --git a/hw-modules/hw-qms/src/main/resources/mapper/qms/QmsCheckRuleMapper.xml b/hw-modules/hw-qms/src/main/resources/mapper/qms/QmsCheckRuleMapper.xml new file mode 100644 index 00000000..dcef2586 --- /dev/null +++ b/hw-modules/hw-qms/src/main/resources/mapper/qms/QmsCheckRuleMapper.xml @@ -0,0 +1,140 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select check_rule_id, check_rule_name, check_rule_type, check_mode, check_sample, check_rule_status, remark, create_by, create_time, update_by, update_time from qms_check_rule + + + + + + and check_rule_name like concat('%', #{checkRuleName}, '%') + and check_rule_type = #{checkRuleType} + and check_mode = #{checkMode} + and check_sample = #{checkSample} + and check_rule_status = #{checkRuleStatus} + + + + + select a.check_rule_id, a.check_rule_name, a.check_rule_type, a.check_mode, a.check_sample, a.check_rule_status, a.remark, a.create_by, a.create_time, a.update_by, a.update_time, + b.check_rule_id as sub_check_rule_id, b.check_project_id as sub_check_project_id, b.project_step_order as sub_project_step_order + from qms_check_rule a + left join qms_check_rule_project b on b.check_rule_id = a.check_rule_id + where a.check_rule_id = #{checkRuleId} order by b.project_step_order + + + + insert into qms_check_rule + + check_rule_name, + check_rule_type, + check_mode, + check_sample, + check_rule_status, + remark, + create_by, + create_time, + update_by, + update_time, + + + #{checkRuleName}, + #{checkRuleType}, + #{checkMode}, + #{checkSample}, + #{checkRuleStatus}, + #{remark}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + + + + + update qms_check_rule + + check_rule_name = #{checkRuleName}, + check_rule_type = #{checkRuleType}, + check_mode = #{checkMode}, + check_sample = #{checkSample}, + check_rule_status = #{checkRuleStatus}, + remark = #{remark}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + + where check_rule_id = #{checkRuleId} + + + + delete from qms_check_rule where check_rule_id = #{checkRuleId} + + + + delete from qms_check_rule where check_rule_id in + + #{checkRuleId} + + + + + delete from qms_check_rule_project where check_rule_id in + + #{checkRuleId} + + + + + delete from qms_check_rule_project where check_rule_id = #{checkRuleId} + + + + insert into qms_check_rule_detail( check_rule_id, target_type, target_id) values + + ( #{item.checkRuleId}, #{item.targetType}, #{item.targetId}) + + + + + + + + insert into qms_check_rule_project( check_rule_id, check_project_id, project_step_order) values + + ( #{item.checkRuleId}, #{item.checkProjectId}, #{item.projectStepOrder}) + + + + diff --git a/hw-modules/hw-qms/src/main/resources/mapper/qms/QmsCheckRuleProjectMapper.xml b/hw-modules/hw-qms/src/main/resources/mapper/qms/QmsCheckRuleProjectMapper.xml new file mode 100644 index 00000000..475599a5 --- /dev/null +++ b/hw-modules/hw-qms/src/main/resources/mapper/qms/QmsCheckRuleProjectMapper.xml @@ -0,0 +1,116 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select check_rule_id, check_project_id, project_step_order from qms_check_rule_project + + + + + + and project_step_order = #{projectStepOrder} + + + + + + where check_rule_id = #{checkRuleId} + + + + insert into qms_check_rule_project + + check_rule_id, + check_project_id, + project_step_order, + + + #{checkRuleId}, + #{checkProjectId}, + #{projectStepOrder}, + + + + + update qms_check_rule_project + + check_project_id = #{checkProjectId}, + project_step_order = #{projectStepOrder}, + + where check_rule_id = #{checkRuleId} + + + + delete from qms_check_rule_project where check_rule_id = #{checkRuleId} + + + + delete from qms_check_rule_project where check_rule_id in + + #{checkRuleId} + + + + + + + + + + select qcrp.check_rule_id, qcrp.check_project_id, qcrp.project_step_order, + qcp.check_project_name,qcp.check_project_property,qcp.standard_value,qcp.upper_diff,qcp.down_diff + from qms_check_rule_project qcrp left join qms_check_project qcp on qcrp.check_project_id = qcp.check_project_id + + and project_step_order = #{projectStepOrder} + and exists (select 1 from qms_check_rule_detail qcrd where + qcrd.check_rule_id=qcrd.check_rule_id and qcrd.target_type=#{targetType} and qcrd.target_id=#{targetId}) + + + + + + delete from qms_check_rule_project where + + ( check_rule_id = #{item.checkRuleId} and check_project_id = #{item.checkProjectId}) + + + + + + select qcrp.check_rule_id, qcrp.check_project_id, qcrp.project_step_order,qcp.check_project_name + from qms_check_rule_project qcrp left join qms_check_project qcp on qcrp.check_project_id = qcp.check_project_id + + + and project_step_order = #{projectStepOrder} + and check_project_name like concat('%', #{checkProjectName}, + '%') + + + + From df92698251415fda7d6e728fad1ea7d4da3123c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=9C=E7=AC=99=E6=AD=8C?= <2277317060@qq.com> Date: Wed, 21 Feb 2024 17:32:57 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=94=9F=E4=BA=A7?= =?UTF-8?q?=E7=95=8C=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hw-ui/src/api/board/firstFloor.js | 20 +- hw-ui/src/api/login.js | 17 +- hw-ui/src/permission.js | 2 +- hw-ui/src/router/index.js | 5 + hw-ui/src/store/modules/permission.js | 1 - hw-ui/src/store/modules/user.js | 3 +- hw-ui/src/views/board/firstFloor/index.vue | 23 ++- hw-ui/src/views/login.vue | 91 ++++++--- hw-ui/src/views/login2.vue | 219 +++++++++++++++++++++ 9 files changed, 326 insertions(+), 55 deletions(-) create mode 100644 hw-ui/src/views/login2.vue diff --git a/hw-ui/src/api/board/firstFloor.js b/hw-ui/src/api/board/firstFloor.js index 1677d984..e4ca08c3 100644 --- a/hw-ui/src/api/board/firstFloor.js +++ b/hw-ui/src/api/board/firstFloor.js @@ -1,26 +1,10 @@ import request from '@/utils/request' -export function getMaterialBoms(query) { +export function getProductPlans(query) { return request({ - url: '/mes/api/getMaterialBoms', + url: '/mes/api/getProductPlans', method: 'get', params: query }) } - -export function getWarehouses(query) { - return request({ - url: '/wms/api/getWarehouses', - method: 'get', - params: query - }) -} - -export function applyRawOutstock(query) { - return request({ - url: '/wms/api/applyRawOutstock', - method: 'post', - data: query - }) -} diff --git a/hw-ui/src/api/login.js b/hw-ui/src/api/login.js index 2b3e325f..1dd9e9a8 100644 --- a/hw-ui/src/api/login.js +++ b/hw-ui/src/api/login.js @@ -1,7 +1,7 @@ import request from '@/utils/request' // 登录方法 -export function login(username, password, code, uuid) { +export function login(username, password, code, uuid, stationId) { return request({ url: '/auth/login', headers: { @@ -9,7 +9,7 @@ export function login(username, password, code, uuid) { repeatSubmit: false }, method: 'post', - data: { username, password, code, uuid } + data: {username, password, code, uuid, stationId} }) } @@ -59,4 +59,15 @@ export function getCodeImg() { method: 'get', timeout: 20000 }) -} \ No newline at end of file +} + +// 获取验证码 +export function getStations() { + return request({ + headers: { + isToken: false + }, + url: '/auth/getStations', + method: 'get', + }) +} diff --git a/hw-ui/src/permission.js b/hw-ui/src/permission.js index c5689790..459ce6d2 100644 --- a/hw-ui/src/permission.js +++ b/hw-ui/src/permission.js @@ -8,7 +8,7 @@ import { isRelogin } from '@/utils/request' NProgress.configure({ showSpinner: false }) -const whiteList = ['/login', '/register'] +const whiteList = ['/login', '/login2', '/register'] router.beforeEach((to, from, next) => { NProgress.start() diff --git a/hw-ui/src/router/index.js b/hw-ui/src/router/index.js index bf6e92b8..3676c3a9 100644 --- a/hw-ui/src/router/index.js +++ b/hw-ui/src/router/index.js @@ -46,6 +46,11 @@ export const constantRoutes = [ component: () => import('@/views/login'), hidden: true }, + { + path: '/login2', + component: () => import('@/views/login2'), + hidden: true + }, { path: '/register', component: () => import('@/views/register'), diff --git a/hw-ui/src/store/modules/permission.js b/hw-ui/src/store/modules/permission.js index d32a794b..5bfd2cf5 100644 --- a/hw-ui/src/store/modules/permission.js +++ b/hw-ui/src/store/modules/permission.js @@ -72,7 +72,6 @@ function filterAsyncRouter(asyncRouterMap, lastRouter = false, type = false) { } } if(route.name === 'Board'){ - console.log(route) route.component = Layout2 } if (route.children != null && route.children && route.children.length) { diff --git a/hw-ui/src/store/modules/user.js b/hw-ui/src/store/modules/user.js index 909c135a..0f6fbc9b 100644 --- a/hw-ui/src/store/modules/user.js +++ b/hw-ui/src/store/modules/user.js @@ -42,8 +42,9 @@ const user = { const password = userInfo.password const code = userInfo.code const uuid = userInfo.uuid + const stationId = userInfo.stationId || '' return new Promise((resolve, reject) => { - login(username, password, code, uuid).then(res => { + login(username, password, code, uuid,stationId).then(res => { let data = res.data setToken(data.access_token) commit('SET_TOKEN', data.access_token) diff --git a/hw-ui/src/views/board/firstFloor/index.vue b/hw-ui/src/views/board/firstFloor/index.vue index a03925d6..f563e871 100644 --- a/hw-ui/src/views/board/firstFloor/index.vue +++ b/hw-ui/src/views/board/firstFloor/index.vue @@ -20,18 +20,24 @@ > + + @@ -41,9 +47,12 @@ label="差异" width="100" > + + {{scope.row.planAmount -scope.row.completeAmount }} + @@ -261,7 +270,7 @@ -