From a832e6550c2ca5b4e513b00ef87d1fbeea2eb5ea Mon Sep 17 00:00:00 2001 From: xs Date: Sat, 13 Jul 2024 13:56:24 +0800 Subject: [PATCH] =?UTF-8?q?2.6.1=20=E8=BD=A6=E9=97=B4mes:=20=E7=99=BB?= =?UTF-8?q?=E5=BD=95=EF=BC=9A=E6=8C=89=E7=85=A7=E5=B7=A5=E5=BA=8F=E7=99=BB?= =?UTF-8?q?=E5=BD=95=20=E6=B4=BE=E5=B7=A5=E4=BF=A1=E6=81=AF=EF=BC=9A?= =?UTF-8?q?=E6=A0=B9=E6=8D=AE=E5=B7=A5=E5=BA=8F=E5=92=8C=E7=99=BB=E5=BD=95?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E8=8E=B7=E5=8F=96=E6=B4=BE=E5=B7=A5=E4=BF=A1?= =?UTF-8?q?=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/hw/mes/api/RemoteMesService.java | 10 + .../hw/mes/api/domain/MesBaseProcessInfo.java | 167 ++++++++++ .../api/domain/MesBaseProcessProdline.java | 51 +++ .../hw/mes/api/domain/MesBaseProcessUser.java | 77 +++++ .../mes/api/domain/MesBaseProdlineInfo.java | 124 +++++++ .../hw/mes/api/domain/MesBaseStationInfo.java | 10 + .../api/factory/RemoteMesFallbackFactory.java | 6 + .../com/hw/system/api/model/LoginUser.java | 24 +- .../hw/auth/controller/TokenController.java | 17 +- .../main/java/com/hw/auth/form/LoginBody.java | 25 +- .../core/constant/SecurityConstants.java | 4 +- .../core/context/SecurityContextHolder.java | 16 +- .../com/hw/common/core/utils/JwtUtils.java | 12 +- .../interceptor/HeaderInterceptor.java | 4 +- .../common/security/service/TokenService.java | 4 +- .../common/security/utils/SecurityUtils.java | 12 +- .../com/hw/gateway/filter/AuthFilter.java | 8 +- .../MesBaseProcessInfoController.java | 17 +- .../MesBaseProdlineInfoController.java | 2 +- .../com/hw/mes/domain/MesBaseProcessInfo.java | 306 +++++++++--------- .../hw/mes/domain/MesBaseProcessProdline.java | 104 +++--- .../com/hw/mes/domain/MesBaseProcessUser.java | 154 ++++----- .../hw/mes/domain/MesBaseProdlineInfo.java | 248 +++++++------- .../mes/mapper/MesBaseProcessInfoMapper.java | 8 +- .../mes/mapper/MesBaseProcessUserMapper.java | 3 +- .../mes/mapper/MesBaseProdlineInfoMapper.java | 3 +- .../mes/mapper/MesBaseStationInfoMapper.java | 11 + .../service/IMesBaseProcessInfoService.java | 5 +- .../service/IMesBaseProdlineInfoService.java | 3 +- .../impl/MesBaseProcessInfoServiceImpl.java | 4 +- .../impl/MesBaseProdlineInfoServiceImpl.java | 2 +- .../impl/MesProductPlanServiceImpl.java | 16 +- .../mapper/mes/MesBaseProcessInfoMapper.xml | 7 + .../mapper/mes/MesBaseStationInfoMapper.xml | 8 + .../mapper/mes/MesProductPlanMapper.xml | 5 +- hw-ui/src/api/login.js | 18 +- hw-ui/src/store/modules/user.js | 6 +- hw-ui/src/utils/serial.js | 127 ++++---- hw-ui/src/views/login.vue | 39 ++- 39 files changed, 1103 insertions(+), 564 deletions(-) create mode 100644 hw-api/hw-api-mes/src/main/java/com/hw/mes/api/domain/MesBaseProcessInfo.java create mode 100644 hw-api/hw-api-mes/src/main/java/com/hw/mes/api/domain/MesBaseProcessProdline.java create mode 100644 hw-api/hw-api-mes/src/main/java/com/hw/mes/api/domain/MesBaseProcessUser.java create mode 100644 hw-api/hw-api-mes/src/main/java/com/hw/mes/api/domain/MesBaseProdlineInfo.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 60eea7c..0f85818 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.MesBaseProcessInfo; import com.hw.mes.api.domain.MesBaseStationInfo; import com.hw.mes.api.domain.vo.MesBaseMaterialInfoVo; import com.hw.mes.api.factory.RemoteMesFallbackFactory; @@ -59,4 +60,13 @@ public interface RemoteMesService { @GetMapping("/barcode/getBarcodeByBindBarcode/{bindBarcode}") public R getBarcodeByBindBarcode(@PathVariable("bindBarcode") String bindBarcode, @RequestHeader(SecurityConstants.FROM_SOURCE) String source); + + /** + * 查询工位信息列表 + * + * @param source 请求来源 + * @return 结果 + */ + @GetMapping("/processInfo/getProcesses") + public R> getProcesses(@RequestHeader(SecurityConstants.FROM_SOURCE) String source); } diff --git a/hw-api/hw-api-mes/src/main/java/com/hw/mes/api/domain/MesBaseProcessInfo.java b/hw-api/hw-api-mes/src/main/java/com/hw/mes/api/domain/MesBaseProcessInfo.java new file mode 100644 index 0000000..898353c --- /dev/null +++ b/hw-api/hw-api-mes/src/main/java/com/hw/mes/api/domain/MesBaseProcessInfo.java @@ -0,0 +1,167 @@ +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; + +import java.util.List; + +/** + * 工序信息对象 mes_base_process_info + * + * @author Yinq + * @date 2024-01-24 + */ +public class MesBaseProcessInfo extends BaseEntity { + private static final long serialVersionUID = 1L; + + /** + * 主键标识 + */ + private Long processId; + + /** + * 工序编号 + */ + @Excel(name = "工序编号") + private String processCode; + + /** + * 工序名称 + */ + @Excel(name = "工序名称") + private String processName; + + /** + * 工序类别(1-生产工序;2-质检工序) + */ + @Excel(name = "工序类别" , readConverterExp = "1=生产工序,2=质检工序") + private String processType; + + /** + * 标准工时(分钟) + */ + @Excel(name = "标准工时(分钟)") + private Long productionTime; + + /** + * 工序所在楼层 + */ + @Excel(name = "标准工时(分钟)工序所在楼层") + private Integer processFloor; + + /** + * 激活标识 + */ + @Excel(name = "激活标识") + private String activeFlag; + + private Long processOrder; + + /** + * 工序关联产线信息 + */ + private List mesBaseProcessProdlineList; + + /** 工序关联人员信息 */ + private List mesBaseProcessUserList; + + public List getMesBaseProcessUserList() { + return mesBaseProcessUserList; + } + + public void setMesBaseProcessUserList(List mesBaseProcessUserList) { + this.mesBaseProcessUserList = mesBaseProcessUserList; + } + + public void setProcessId(Long processId) { + this.processId = processId; + } + + public Long getProcessId() { + return processId; + } + + public void setProcessCode(String processCode) { + this.processCode = processCode; + } + + public String getProcessCode() { + return processCode; + } + + public void setProcessName(String processName) { + this.processName = processName; + } + + public String getProcessName() { + return processName; + } + + public void setProcessType(String processType) { + this.processType = processType; + } + + public String getProcessType() { + return processType; + } + + public void setProductionTime(Long productionTime) { + this.productionTime = productionTime; + } + + public Long getProductionTime() { + return productionTime; + } + + public Integer getProcessFloor() { + return processFloor; + } + + public void setProcessFloor(Integer processFloor) { + this.processFloor = processFloor; + } + + public void setActiveFlag(String activeFlag) { + this.activeFlag = activeFlag; + } + + public String getActiveFlag() { + return activeFlag; + } + + public List getMesBaseProcessProdlineList() { + return mesBaseProcessProdlineList; + } + + public void setMesBaseProcessProdlineList(List mesBaseProcessProdlineList) { + this.mesBaseProcessProdlineList = mesBaseProcessProdlineList; + } + + public Long getProcessOrder() { + return processOrder; + } + + public void setProcessOrder(Long processOrder) { + this.processOrder = processOrder; + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) + .append("processId" , getProcessId()) + .append("processCode" , getProcessCode()) + .append("processName" , getProcessName()) + .append("processType" , getProcessType()) + .append("productionTime" , getProductionTime()) + .append("activeFlag" , getActiveFlag()) + .append("remark" , getRemark()) + .append("createBy" , getCreateBy()) + .append("createTime" , getCreateTime()) + .append("updateBy" , getUpdateBy()) + .append("updateTime" , getUpdateTime()) + .append("mesBaseProcessProdlineList" , getMesBaseProcessProdlineList()) + .toString(); + } +} diff --git a/hw-api/hw-api-mes/src/main/java/com/hw/mes/api/domain/MesBaseProcessProdline.java b/hw-api/hw-api-mes/src/main/java/com/hw/mes/api/domain/MesBaseProcessProdline.java new file mode 100644 index 0000000..3329fc9 --- /dev/null +++ b/hw-api/hw-api-mes/src/main/java/com/hw/mes/api/domain/MesBaseProcessProdline.java @@ -0,0 +1,51 @@ +package com.hw.mes.api.domain; + +import com.hw.common.core.web.domain.BaseEntity; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + * 工序关联产线对象 mes_base_process_prodline + * + * @author Yinq + * @date 2024-01-24 + */ +public class MesBaseProcessProdline extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 工序ID,关联工序信息主键 */ + private Long processId; + + /** 所属产线ID,关联产线主键 */ + private Long prodlineId; + + public void setProcessId(Long processId) + { + this.processId = processId; + } + + public Long getProcessId() + { + return processId; + } + public void setProdlineId(Long prodlineId) + { + this.prodlineId = prodlineId; + } + + public Long getProdlineId() + { + return prodlineId; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("processId", getProcessId()) + .append("prodlineId", getProdlineId()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .toString(); + } +} diff --git a/hw-api/hw-api-mes/src/main/java/com/hw/mes/api/domain/MesBaseProcessUser.java b/hw-api/hw-api-mes/src/main/java/com/hw/mes/api/domain/MesBaseProcessUser.java new file mode 100644 index 0000000..99f626b --- /dev/null +++ b/hw-api/hw-api-mes/src/main/java/com/hw/mes/api/domain/MesBaseProcessUser.java @@ -0,0 +1,77 @@ +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_process_user + * + * @author Yinq + * @date 2024-01-29 + */ +public class MesBaseProcessUser extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 工序ID,关联工序主键 */ + private Long processId; + + /** 用户ID,关联用户主键 */ + private Long userId; + + /** 用户名称,关联sys_user的user_name */ + @Excel(name = "用户名称") + private String userName; + + private Long routeId; + + + public void setProcessId(Long processId) + { + this.processId = processId; + } + + public Long getProcessId() + { + return processId; + } + public void setUserId(Long userId) + { + this.userId = userId; + } + + public Long getUserId() + { + return userId; + } + public void setUserName(String userName) + { + this.userName = userName; + } + + public String getUserName() + { + return userName; + } + + public Long getRouteId() { + return routeId; + } + + public void setRouteId(Long routeId) { + this.routeId = routeId; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("processId", getProcessId()) + .append("userId", getUserId()) + .append("userName", getUserName()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .toString(); + } +} diff --git a/hw-api/hw-api-mes/src/main/java/com/hw/mes/api/domain/MesBaseProdlineInfo.java b/hw-api/hw-api-mes/src/main/java/com/hw/mes/api/domain/MesBaseProdlineInfo.java new file mode 100644 index 0000000..3b20fdc --- /dev/null +++ b/hw-api/hw-api-mes/src/main/java/com/hw/mes/api/domain/MesBaseProdlineInfo.java @@ -0,0 +1,124 @@ +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_prodline_info + * + * @author Yinq + * @date 2024-01-24 + */ +public class MesBaseProdlineInfo extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 主键标识 */ + private Long prodlineId; + + /** 产线编号 */ + @Excel(name = "产线编号") + private String prodlineCode; + + /** 产线名称 */ + @Excel(name = "产线名称") + private String prodlineName; + + /** 产线类型 */ + @Excel(name = "产线类型") + private String prodlineType; + + /** 所属工厂ID */ + @Excel(name = "所属工厂ID") + private Long factoryId; + + /** 所属工厂名称 */ + @Excel(name = "所属工厂名称") + private String factoryName; + + /** 是否标识 */ + @Excel(name = "是否标识") + private String isFlag; + + public String getFactoryName() { + return factoryName; + } + + public void setFactoryName(String factoryName) { + this.factoryName = factoryName; + } + + public void setProdlineId(Long prodlineId) + { + this.prodlineId = prodlineId; + } + + public Long getProdlineId() + { + return prodlineId; + } + public void setProdlineCode(String prodlineCode) + { + this.prodlineCode = prodlineCode; + } + + public String getProdlineCode() + { + return prodlineCode; + } + public void setProdlineName(String prodlineName) + { + this.prodlineName = prodlineName; + } + + public String getProdlineName() + { + return prodlineName; + } + public void setProdlineType(String prodlineType) + { + this.prodlineType = prodlineType; + } + + public String getProdlineType() + { + return prodlineType; + } + public void setFactoryId(Long factoryId) + { + this.factoryId = factoryId; + } + + public Long getFactoryId() + { + return factoryId; + } + public void setIsFlag(String isFlag) + { + this.isFlag = isFlag; + } + + public String getIsFlag() + { + return isFlag; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("prodlineId", getProdlineId()) + .append("prodlineCode", getProdlineCode()) + .append("prodlineName", getProdlineName()) + .append("prodlineType", getProdlineType()) + .append("factoryId", getFactoryId()) + .append("isFlag", getIsFlag()) + .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/domain/MesBaseStationInfo.java b/hw-api/hw-api-mes/src/main/java/com/hw/mes/api/domain/MesBaseStationInfo.java index 5364140..9ae275b 100644 --- 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 @@ -61,6 +61,8 @@ public class MesBaseStationInfo extends BaseEntity { @Excel(name = "激活标识") private String activeFlag; + private String ipAddress; + public String getProcessName() { return processName; } @@ -125,6 +127,14 @@ public class MesBaseStationInfo extends BaseEntity { return activeFlag; } + public String getIpAddress() { + return ipAddress; + } + + public void setIpAddress(String ipAddress) { + this.ipAddress = ipAddress; + } + @Override public String toString() { return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) 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 cef592f..5b9c3aa 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.MesBaseProcessInfo; import com.hw.mes.api.domain.MesBaseStationInfo; import com.hw.mes.api.domain.vo.MesBaseMaterialInfoVo; import org.slf4j.Logger; @@ -45,6 +46,11 @@ public class RemoteMesFallbackFactory implements FallbackFactory getBarcodeByBindBarcode(String bindBarcode, String source) { return R.fail("获取绑定条码信息失败:" + throwable.getMessage()); } + + @Override + public R> getProcesses(String source) { + return R.fail("获取工序列表信息失败:" + throwable.getMessage()); + } }; } } diff --git a/hw-api/hw-api-system/src/main/java/com/hw/system/api/model/LoginUser.java b/hw-api/hw-api-system/src/main/java/com/hw/system/api/model/LoginUser.java index d1c9c90..58b4dfc 100644 --- a/hw-api/hw-api-system/src/main/java/com/hw/system/api/model/LoginUser.java +++ b/hw-api/hw-api-system/src/main/java/com/hw/system/api/model/LoginUser.java @@ -59,14 +59,14 @@ public class LoginUser implements Serializable private SysUser sysUser; /** - * 工位ID + * 工序ID */ - private Long stationId; + private Long processId; /** - * 工位编号 + * 工序所在楼层 */ - private String stationCode; + private Integer processFloor; public String getToken() { @@ -158,19 +158,19 @@ public class LoginUser implements Serializable this.sysUser = sysUser; } - public Long getStationId() { - return stationId; + public Long getProcessId() { + return processId; } - public void setStationId(Long stationId) { - this.stationId = stationId; + public void setProcessId(Long processId) { + this.processId = processId; } - public String getStationCode() { - return stationCode; + public Integer getProcessFloor() { + return processFloor; } - public void setStationCode(String stationCode) { - this.stationCode = stationCode; + public void setProcessFloor(Integer processFloor) { + this.processFloor = processFloor; } } 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 3651588..7397ece 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 @@ -5,6 +5,7 @@ import javax.servlet.http.HttpServletRequest; import com.hw.common.core.constant.SecurityConstants; import com.hw.mes.api.RemoteMesService; +import com.hw.mes.api.domain.MesBaseProcessInfo; import com.hw.mes.api.domain.MesBaseStationInfo; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -43,8 +44,8 @@ public class TokenController { // 用户登录 LoginUser userInfo = sysLoginService.login(form.getUsername(), form.getPassword()); - userInfo.setStationId(form.getStationId()); - userInfo.setStationCode(form.getStationCode()); + userInfo.setProcessId(form.getProcessId()); + userInfo.setProcessFloor(form.getProcessFloor()); // 获取登录token return R.ok(tokenService.createToken(userInfo)); } @@ -107,4 +108,16 @@ public class TokenController return R.ok(resultR.getData()); } + + /** + * 获取工序信息列表 + * @return + */ + @GetMapping("getProcesses") + public R getProcesses() + { + R> resultR = remoteMesService.getProcesses(SecurityConstants.INNER); + return R.ok(resultR.getData()); + } + } diff --git a/hw-auth/src/main/java/com/hw/auth/form/LoginBody.java b/hw-auth/src/main/java/com/hw/auth/form/LoginBody.java index ac8c72a..e24f7b5 100644 --- a/hw-auth/src/main/java/com/hw/auth/form/LoginBody.java +++ b/hw-auth/src/main/java/com/hw/auth/form/LoginBody.java @@ -19,14 +19,14 @@ public class LoginBody /** - * 工位ID + * 工序ID */ - private Long stationId; + private Long processId; /** - * 工位编号 + * 工序所在楼层 */ - private String stationCode; + private Integer processFloor; public String getUsername() { @@ -48,19 +48,20 @@ public class LoginBody this.password = password; } - public Long getStationId() { - return stationId; + + public Long getProcessId() { + return processId; } - public void setStationId(Long stationId) { - this.stationId = stationId; + public void setProcessId(Long processId) { + this.processId = processId; } - public String getStationCode() { - return stationCode; + public Integer getProcessFloor() { + return processFloor; } - public void setStationCode(String stationCode) { - this.stationCode = stationCode; + public void setProcessFloor(Integer processFloor) { + this.processFloor = processFloor; } } diff --git a/hw-common/hw-common-core/src/main/java/com/hw/common/core/constant/SecurityConstants.java b/hw-common/hw-common-core/src/main/java/com/hw/common/core/constant/SecurityConstants.java index baf312c..dadfb03 100644 --- a/hw-common/hw-common-core/src/main/java/com/hw/common/core/constant/SecurityConstants.java +++ b/hw-common/hw-common-core/src/main/java/com/hw/common/core/constant/SecurityConstants.java @@ -51,10 +51,10 @@ public class SecurityConstants /** * 工位ID字段 */ - public static final String DETAILS_STATION_ID = "station_id"; + public static final String DETAILS_PROCESS_ID = "process_id"; /** * 工位编码字段 */ - public static final String DETAILS_STATION_CODE = "station_code"; + public static final String DETAILS_PROCESS_FLOOR = "process_floor"; } diff --git a/hw-common/hw-common-core/src/main/java/com/hw/common/core/context/SecurityContextHolder.java b/hw-common/hw-common-core/src/main/java/com/hw/common/core/context/SecurityContextHolder.java index 664e38c..77f4846 100644 --- a/hw-common/hw-common-core/src/main/java/com/hw/common/core/context/SecurityContextHolder.java +++ b/hw-common/hw-common-core/src/main/java/com/hw/common/core/context/SecurityContextHolder.java @@ -97,24 +97,24 @@ public class SecurityContextHolder } - public static Long getStationId() + public static Long getProcessId() { - return Convert.toLong(get(SecurityConstants.DETAILS_STATION_ID), 0L); + return Convert.toLong(get(SecurityConstants.DETAILS_PROCESS_ID), 0L); } - public static void setStationId(String stationId) + public static void setProcessId(String processId) { - set(SecurityConstants.DETAILS_STATION_ID, stationId); + set(SecurityConstants.DETAILS_PROCESS_ID, processId); } - public static String getStationCode() + public static Integer getProcessFloor() { - return get(SecurityConstants.DETAILS_STATION_CODE); + return Convert.toInt(get(SecurityConstants.DETAILS_PROCESS_FLOOR),0); } - public static void setStationCode(String stationCode) + public static void setProcessFloor(String processFloor) { - set(SecurityConstants.DETAILS_STATION_CODE, stationCode); + set(SecurityConstants.DETAILS_PROCESS_FLOOR, processFloor); } } diff --git a/hw-common/hw-common-core/src/main/java/com/hw/common/core/utils/JwtUtils.java b/hw-common/hw-common-core/src/main/java/com/hw/common/core/utils/JwtUtils.java index 00b4e85..42e3240 100644 --- a/hw-common/hw-common-core/src/main/java/com/hw/common/core/utils/JwtUtils.java +++ b/hw-common/hw-common-core/src/main/java/com/hw/common/core/utils/JwtUtils.java @@ -123,24 +123,24 @@ public class JwtUtils /** - * 根据身份信息获取工位ID + * 根据身份信息获取工序ID * * @param claims 身份信息 * @return 工位ID */ - public static String getStationId(Claims claims) + public static String getProcessId(Claims claims) { - return getValue(claims, SecurityConstants.DETAILS_STATION_ID); + return getValue(claims, SecurityConstants.DETAILS_PROCESS_ID); } /** - * 根据身份信息获取工位编号 + * 根据身份信息获取工序所在楼层 * * @param claims 身份信息 * @return 工位编号 */ - public static String getStationCode(Claims claims) + public static String getProcessFloor(Claims claims) { - return getValue(claims, SecurityConstants.DETAILS_STATION_CODE); + return getValue(claims, SecurityConstants.DETAILS_PROCESS_FLOOR); } } diff --git a/hw-common/hw-common-security/src/main/java/com/hw/common/security/interceptor/HeaderInterceptor.java b/hw-common/hw-common-security/src/main/java/com/hw/common/security/interceptor/HeaderInterceptor.java index 48c8d2b..c280de3 100644 --- a/hw-common/hw-common-security/src/main/java/com/hw/common/security/interceptor/HeaderInterceptor.java +++ b/hw-common/hw-common-security/src/main/java/com/hw/common/security/interceptor/HeaderInterceptor.java @@ -31,8 +31,8 @@ public class HeaderInterceptor implements AsyncHandlerInterceptor SecurityContextHolder.setUserId(ServletUtils.getHeader(request, SecurityConstants.DETAILS_USER_ID)); SecurityContextHolder.setUserName(ServletUtils.getHeader(request, SecurityConstants.DETAILS_USERNAME)); SecurityContextHolder.setUserKey(ServletUtils.getHeader(request, SecurityConstants.USER_KEY)); - SecurityContextHolder.setStationId(ServletUtils.getHeader(request, SecurityConstants.DETAILS_STATION_ID)); - SecurityContextHolder.setStationCode(ServletUtils.getHeader(request, SecurityConstants.DETAILS_STATION_CODE)); + SecurityContextHolder.setProcessId(ServletUtils.getHeader(request, SecurityConstants.DETAILS_PROCESS_ID)); + SecurityContextHolder.setProcessFloor(ServletUtils.getHeader(request, SecurityConstants.DETAILS_PROCESS_FLOOR)); String token = SecurityUtils.getToken(); if (StringUtils.isNotEmpty(token)) diff --git a/hw-common/hw-common-security/src/main/java/com/hw/common/security/service/TokenService.java b/hw-common/hw-common-security/src/main/java/com/hw/common/security/service/TokenService.java index 899605d..2577dae 100644 --- a/hw-common/hw-common-security/src/main/java/com/hw/common/security/service/TokenService.java +++ b/hw-common/hw-common-security/src/main/java/com/hw/common/security/service/TokenService.java @@ -61,8 +61,8 @@ public class TokenService claimsMap.put(SecurityConstants.USER_KEY, token); claimsMap.put(SecurityConstants.DETAILS_USER_ID, userId); claimsMap.put(SecurityConstants.DETAILS_USERNAME, userName); - claimsMap.put(SecurityConstants.DETAILS_STATION_ID, loginUser.getStationId()); - claimsMap.put(SecurityConstants.DETAILS_STATION_CODE, loginUser.getStationCode()); + claimsMap.put(SecurityConstants.DETAILS_PROCESS_ID, loginUser.getProcessId()); + claimsMap.put(SecurityConstants.DETAILS_PROCESS_FLOOR, loginUser.getProcessFloor()); // 接口返回信息 Map rspMap = new HashMap(); diff --git a/hw-common/hw-common-security/src/main/java/com/hw/common/security/utils/SecurityUtils.java b/hw-common/hw-common-security/src/main/java/com/hw/common/security/utils/SecurityUtils.java index bd78504..3c5d532 100644 --- a/hw-common/hw-common-security/src/main/java/com/hw/common/security/utils/SecurityUtils.java +++ b/hw-common/hw-common-security/src/main/java/com/hw/common/security/utils/SecurityUtils.java @@ -41,19 +41,19 @@ public class SecurityUtils } /** - * 获取工位ID + * 获工序ID */ - public static Long getStationId() + public static Long getProcessId() { - return SecurityContextHolder.getStationId(); + return SecurityContextHolder.getProcessId(); } /** - * 获取工位编号 + * 获取工序所在楼层 */ - public static String getStationCode() + public static Integer getProcessFloor() { - return SecurityContextHolder.getStationCode(); + return SecurityContextHolder.getProcessFloor(); } /** diff --git a/hw-gateway/src/main/java/com/hw/gateway/filter/AuthFilter.java b/hw-gateway/src/main/java/com/hw/gateway/filter/AuthFilter.java index 4348468..1981338 100644 --- a/hw-gateway/src/main/java/com/hw/gateway/filter/AuthFilter.java +++ b/hw-gateway/src/main/java/com/hw/gateway/filter/AuthFilter.java @@ -69,8 +69,8 @@ public class AuthFilter implements GlobalFilter, Ordered } String userid = JwtUtils.getUserId(claims); String username = JwtUtils.getUserName(claims); - String stationId = JwtUtils.getStationId(claims); - String stationCode = JwtUtils.getStationCode(claims); + String processId = JwtUtils.getProcessId(claims); + String processFloor = JwtUtils.getProcessFloor(claims); if (StringUtils.isEmpty(userid) || StringUtils.isEmpty(username)) { return unauthorizedResponse(exchange, "令牌验证失败"); @@ -80,8 +80,8 @@ public class AuthFilter implements GlobalFilter, Ordered addHeader(mutate, SecurityConstants.USER_KEY, userkey); addHeader(mutate, SecurityConstants.DETAILS_USER_ID, userid); addHeader(mutate, SecurityConstants.DETAILS_USERNAME, username); - addHeader(mutate, SecurityConstants.DETAILS_STATION_ID, stationId); - addHeader(mutate, SecurityConstants.DETAILS_STATION_CODE, stationCode); + addHeader(mutate, SecurityConstants.DETAILS_PROCESS_ID, processId); + addHeader(mutate, SecurityConstants.DETAILS_PROCESS_FLOOR, processFloor); // 内部请求来源参数清除 removeHeader(mutate, SecurityConstants.FROM_SOURCE); return chain.filter(exchange.mutate().request(mutate.build()).build()); diff --git a/hw-modules/hw-mes/src/main/java/com/hw/mes/controller/MesBaseProcessInfoController.java b/hw-modules/hw-mes/src/main/java/com/hw/mes/controller/MesBaseProcessInfoController.java index cdcd5fc..215b966 100644 --- a/hw-modules/hw-mes/src/main/java/com/hw/mes/controller/MesBaseProcessInfoController.java +++ b/hw-modules/hw-mes/src/main/java/com/hw/mes/controller/MesBaseProcessInfoController.java @@ -4,7 +4,10 @@ import java.util.List; import java.io.IOException; 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.MesBaseProcessInfo; +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; @@ -17,7 +20,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.MesBaseProcessInfo; import com.hw.mes.service.IMesBaseProcessInfoService; import com.hw.common.core.web.controller.BaseController; import com.hw.common.core.web.domain.AjaxResult; @@ -137,4 +139,17 @@ public class MesBaseProcessInfoController extends BaseController { return toAjax(mesBaseProcessInfoService.deleteMesBaseProcessInfoByProcessIds(processIds)); } + + + + /** + * 查询工序信息列表 + */ + @InnerAuth + @GetMapping("/getProcesses") + public AjaxResult getProcesses(MesBaseProcessInfo mesBaseProcessInfo) + { + List list = mesBaseProcessInfoService.selectMesBaseProcessInfoList(mesBaseProcessInfo); + return success(list); + } } diff --git a/hw-modules/hw-mes/src/main/java/com/hw/mes/controller/MesBaseProdlineInfoController.java b/hw-modules/hw-mes/src/main/java/com/hw/mes/controller/MesBaseProdlineInfoController.java index b75940d..457d87f 100644 --- a/hw-modules/hw-mes/src/main/java/com/hw/mes/controller/MesBaseProdlineInfoController.java +++ b/hw-modules/hw-mes/src/main/java/com/hw/mes/controller/MesBaseProdlineInfoController.java @@ -5,6 +5,7 @@ import java.io.IOException; import javax.servlet.http.HttpServletResponse; import com.hw.common.security.utils.SecurityUtils; +import com.hw.mes.api.domain.MesBaseProdlineInfo; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; @@ -17,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.MesBaseProdlineInfo; import com.hw.mes.service.IMesBaseProdlineInfoService; import com.hw.common.core.web.controller.BaseController; import com.hw.common.core.web.domain.AjaxResult; diff --git a/hw-modules/hw-mes/src/main/java/com/hw/mes/domain/MesBaseProcessInfo.java b/hw-modules/hw-mes/src/main/java/com/hw/mes/domain/MesBaseProcessInfo.java index 6b0de3a..e6b330d 100644 --- a/hw-modules/hw-mes/src/main/java/com/hw/mes/domain/MesBaseProcessInfo.java +++ b/hw-modules/hw-mes/src/main/java/com/hw/mes/domain/MesBaseProcessInfo.java @@ -1,153 +1,153 @@ -package com.hw.mes.domain; - -import java.util.List; - -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_process_info - * - * @author Yinq - * @date 2024-01-24 - */ -public class MesBaseProcessInfo extends BaseEntity { - private static final long serialVersionUID = 1L; - - /** - * 主键标识 - */ - private Long processId; - - /** - * 工序编号 - */ - @Excel(name = "工序编号") - private String processCode; - - /** - * 工序名称 - */ - @Excel(name = "工序名称") - private String processName; - - /** - * 工序类别(1-生产工序;2-质检工序) - */ - @Excel(name = "工序类别" , readConverterExp = "1=生产工序,2=质检工序") - private String processType; - - /** - * 标准工时(分钟) - */ - @Excel(name = "标准工时(分钟)") - private Long productionTime; - - /** - * 激活标识 - */ - @Excel(name = "激活标识") - private String activeFlag; - - private Long processOrder; - - /** - * 工序关联产线信息 - */ - private List mesBaseProcessProdlineList; - - /** 工序关联人员信息 */ - private List mesBaseProcessUserList; - - public List getMesBaseProcessUserList() { - return mesBaseProcessUserList; - } - - public void setMesBaseProcessUserList(List mesBaseProcessUserList) { - this.mesBaseProcessUserList = mesBaseProcessUserList; - } - - public void setProcessId(Long processId) { - this.processId = processId; - } - - public Long getProcessId() { - return processId; - } - - public void setProcessCode(String processCode) { - this.processCode = processCode; - } - - public String getProcessCode() { - return processCode; - } - - public void setProcessName(String processName) { - this.processName = processName; - } - - public String getProcessName() { - return processName; - } - - public void setProcessType(String processType) { - this.processType = processType; - } - - public String getProcessType() { - return processType; - } - - 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; - } - - public List getMesBaseProcessProdlineList() { - return mesBaseProcessProdlineList; - } - - public void setMesBaseProcessProdlineList(List mesBaseProcessProdlineList) { - this.mesBaseProcessProdlineList = mesBaseProcessProdlineList; - } - - public Long getProcessOrder() { - return processOrder; - } - - public void setProcessOrder(Long processOrder) { - this.processOrder = processOrder; - } - - @Override - public String toString() { - return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) - .append("processId" , getProcessId()) - .append("processCode" , getProcessCode()) - .append("processName" , getProcessName()) - .append("processType" , getProcessType()) - .append("productionTime" , getProductionTime()) - .append("activeFlag" , getActiveFlag()) - .append("remark" , getRemark()) - .append("createBy" , getCreateBy()) - .append("createTime" , getCreateTime()) - .append("updateBy" , getUpdateBy()) - .append("updateTime" , getUpdateTime()) - .append("mesBaseProcessProdlineList" , getMesBaseProcessProdlineList()) - .toString(); - } -} +//package com.hw.mes.domain; +// +//import java.util.List; +// +//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_process_info +// * +// * @author Yinq +// * @date 2024-01-24 +// */ +//public class MesBaseProcessInfo extends BaseEntity { +// private static final long serialVersionUID = 1L; +// +// /** +// * 主键标识 +// */ +// private Long processId; +// +// /** +// * 工序编号 +// */ +// @Excel(name = "工序编号") +// private String processCode; +// +// /** +// * 工序名称 +// */ +// @Excel(name = "工序名称") +// private String processName; +// +// /** +// * 工序类别(1-生产工序;2-质检工序) +// */ +// @Excel(name = "工序类别" , readConverterExp = "1=生产工序,2=质检工序") +// private String processType; +// +// /** +// * 标准工时(分钟) +// */ +// @Excel(name = "标准工时(分钟)") +// private Long productionTime; +// +// /** +// * 激活标识 +// */ +// @Excel(name = "激活标识") +// private String activeFlag; +// +// private Long processOrder; +// +// /** +// * 工序关联产线信息 +// */ +// private List mesBaseProcessProdlineList; +// +// /** 工序关联人员信息 */ +// private List mesBaseProcessUserList; +// +// public List getMesBaseProcessUserList() { +// return mesBaseProcessUserList; +// } +// +// public void setMesBaseProcessUserList(List mesBaseProcessUserList) { +// this.mesBaseProcessUserList = mesBaseProcessUserList; +// } +// +// public void setProcessId(Long processId) { +// this.processId = processId; +// } +// +// public Long getProcessId() { +// return processId; +// } +// +// public void setProcessCode(String processCode) { +// this.processCode = processCode; +// } +// +// public String getProcessCode() { +// return processCode; +// } +// +// public void setProcessName(String processName) { +// this.processName = processName; +// } +// +// public String getProcessName() { +// return processName; +// } +// +// public void setProcessType(String processType) { +// this.processType = processType; +// } +// +// public String getProcessType() { +// return processType; +// } +// +// 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; +// } +// +// public List getMesBaseProcessProdlineList() { +// return mesBaseProcessProdlineList; +// } +// +// public void setMesBaseProcessProdlineList(List mesBaseProcessProdlineList) { +// this.mesBaseProcessProdlineList = mesBaseProcessProdlineList; +// } +// +// public Long getProcessOrder() { +// return processOrder; +// } +// +// public void setProcessOrder(Long processOrder) { +// this.processOrder = processOrder; +// } +// +// @Override +// public String toString() { +// return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) +// .append("processId" , getProcessId()) +// .append("processCode" , getProcessCode()) +// .append("processName" , getProcessName()) +// .append("processType" , getProcessType()) +// .append("productionTime" , getProductionTime()) +// .append("activeFlag" , getActiveFlag()) +// .append("remark" , getRemark()) +// .append("createBy" , getCreateBy()) +// .append("createTime" , getCreateTime()) +// .append("updateBy" , getUpdateBy()) +// .append("updateTime" , getUpdateTime()) +// .append("mesBaseProcessProdlineList" , getMesBaseProcessProdlineList()) +// .toString(); +// } +//} diff --git a/hw-modules/hw-mes/src/main/java/com/hw/mes/domain/MesBaseProcessProdline.java b/hw-modules/hw-mes/src/main/java/com/hw/mes/domain/MesBaseProcessProdline.java index effac36..c04add9 100644 --- a/hw-modules/hw-mes/src/main/java/com/hw/mes/domain/MesBaseProcessProdline.java +++ b/hw-modules/hw-mes/src/main/java/com/hw/mes/domain/MesBaseProcessProdline.java @@ -1,52 +1,52 @@ -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_process_prodline - * - * @author Yinq - * @date 2024-01-24 - */ -public class MesBaseProcessProdline extends BaseEntity -{ - private static final long serialVersionUID = 1L; - - /** 工序ID,关联工序信息主键 */ - private Long processId; - - /** 所属产线ID,关联产线主键 */ - private Long prodlineId; - - public void setProcessId(Long processId) - { - this.processId = processId; - } - - public Long getProcessId() - { - return processId; - } - public void setProdlineId(Long prodlineId) - { - this.prodlineId = prodlineId; - } - - public Long getProdlineId() - { - return prodlineId; - } - - @Override - public String toString() { - return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) - .append("processId", getProcessId()) - .append("prodlineId", getProdlineId()) - .append("createBy", getCreateBy()) - .append("createTime", getCreateTime()) - .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_process_prodline +// * +// * @author Yinq +// * @date 2024-01-24 +// */ +//public class MesBaseProcessProdline extends BaseEntity +//{ +// private static final long serialVersionUID = 1L; +// +// /** 工序ID,关联工序信息主键 */ +// private Long processId; +// +// /** 所属产线ID,关联产线主键 */ +// private Long prodlineId; +// +// public void setProcessId(Long processId) +// { +// this.processId = processId; +// } +// +// public Long getProcessId() +// { +// return processId; +// } +// public void setProdlineId(Long prodlineId) +// { +// this.prodlineId = prodlineId; +// } +// +// public Long getProdlineId() +// { +// return prodlineId; +// } +// +// @Override +// public String toString() { +// return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) +// .append("processId", getProcessId()) +// .append("prodlineId", getProdlineId()) +// .append("createBy", getCreateBy()) +// .append("createTime", getCreateTime()) +// .toString(); +// } +//} diff --git a/hw-modules/hw-mes/src/main/java/com/hw/mes/domain/MesBaseProcessUser.java b/hw-modules/hw-mes/src/main/java/com/hw/mes/domain/MesBaseProcessUser.java index 23576ad..b442b8b 100644 --- a/hw-modules/hw-mes/src/main/java/com/hw/mes/domain/MesBaseProcessUser.java +++ b/hw-modules/hw-mes/src/main/java/com/hw/mes/domain/MesBaseProcessUser.java @@ -1,77 +1,77 @@ -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_process_user - * - * @author Yinq - * @date 2024-01-29 - */ -public class MesBaseProcessUser extends BaseEntity -{ - private static final long serialVersionUID = 1L; - - /** 工序ID,关联工序主键 */ - private Long processId; - - /** 用户ID,关联用户主键 */ - private Long userId; - - /** 用户名称,关联sys_user的user_name */ - @Excel(name = "用户名称") - private String userName; - - private Long routeId; - - - public void setProcessId(Long processId) - { - this.processId = processId; - } - - public Long getProcessId() - { - return processId; - } - public void setUserId(Long userId) - { - this.userId = userId; - } - - public Long getUserId() - { - return userId; - } - public void setUserName(String userName) - { - this.userName = userName; - } - - public String getUserName() - { - return userName; - } - - public Long getRouteId() { - return routeId; - } - - public void setRouteId(Long routeId) { - this.routeId = routeId; - } - - @Override - public String toString() { - return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) - .append("processId", getProcessId()) - .append("userId", getUserId()) - .append("userName", getUserName()) - .append("createBy", getCreateBy()) - .append("createTime", getCreateTime()) - .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_process_user +// * +// * @author Yinq +// * @date 2024-01-29 +// */ +//public class MesBaseProcessUser extends BaseEntity +//{ +// private static final long serialVersionUID = 1L; +// +// /** 工序ID,关联工序主键 */ +// private Long processId; +// +// /** 用户ID,关联用户主键 */ +// private Long userId; +// +// /** 用户名称,关联sys_user的user_name */ +// @Excel(name = "用户名称") +// private String userName; +// +// private Long routeId; +// +// +// public void setProcessId(Long processId) +// { +// this.processId = processId; +// } +// +// public Long getProcessId() +// { +// return processId; +// } +// public void setUserId(Long userId) +// { +// this.userId = userId; +// } +// +// public Long getUserId() +// { +// return userId; +// } +// public void setUserName(String userName) +// { +// this.userName = userName; +// } +// +// public String getUserName() +// { +// return userName; +// } +// +// public Long getRouteId() { +// return routeId; +// } +// +// public void setRouteId(Long routeId) { +// this.routeId = routeId; +// } +// +// @Override +// public String toString() { +// return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) +// .append("processId", getProcessId()) +// .append("userId", getUserId()) +// .append("userName", getUserName()) +// .append("createBy", getCreateBy()) +// .append("createTime", getCreateTime()) +// .toString(); +// } +//} diff --git a/hw-modules/hw-mes/src/main/java/com/hw/mes/domain/MesBaseProdlineInfo.java b/hw-modules/hw-mes/src/main/java/com/hw/mes/domain/MesBaseProdlineInfo.java index 5a282c1..9421630 100644 --- a/hw-modules/hw-mes/src/main/java/com/hw/mes/domain/MesBaseProdlineInfo.java +++ b/hw-modules/hw-mes/src/main/java/com/hw/mes/domain/MesBaseProdlineInfo.java @@ -1,124 +1,124 @@ -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_prodline_info - * - * @author Yinq - * @date 2024-01-24 - */ -public class MesBaseProdlineInfo extends BaseEntity -{ - private static final long serialVersionUID = 1L; - - /** 主键标识 */ - private Long prodlineId; - - /** 产线编号 */ - @Excel(name = "产线编号") - private String prodlineCode; - - /** 产线名称 */ - @Excel(name = "产线名称") - private String prodlineName; - - /** 产线类型 */ - @Excel(name = "产线类型") - private String prodlineType; - - /** 所属工厂ID */ - @Excel(name = "所属工厂ID") - private Long factoryId; - - /** 所属工厂名称 */ - @Excel(name = "所属工厂名称") - private String factoryName; - - /** 是否标识 */ - @Excel(name = "是否标识") - private String isFlag; - - public String getFactoryName() { - return factoryName; - } - - public void setFactoryName(String factoryName) { - this.factoryName = factoryName; - } - - public void setProdlineId(Long prodlineId) - { - this.prodlineId = prodlineId; - } - - public Long getProdlineId() - { - return prodlineId; - } - public void setProdlineCode(String prodlineCode) - { - this.prodlineCode = prodlineCode; - } - - public String getProdlineCode() - { - return prodlineCode; - } - public void setProdlineName(String prodlineName) - { - this.prodlineName = prodlineName; - } - - public String getProdlineName() - { - return prodlineName; - } - public void setProdlineType(String prodlineType) - { - this.prodlineType = prodlineType; - } - - public String getProdlineType() - { - return prodlineType; - } - public void setFactoryId(Long factoryId) - { - this.factoryId = factoryId; - } - - public Long getFactoryId() - { - return factoryId; - } - public void setIsFlag(String isFlag) - { - this.isFlag = isFlag; - } - - public String getIsFlag() - { - return isFlag; - } - - @Override - public String toString() { - return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) - .append("prodlineId", getProdlineId()) - .append("prodlineCode", getProdlineCode()) - .append("prodlineName", getProdlineName()) - .append("prodlineType", getProdlineType()) - .append("factoryId", getFactoryId()) - .append("isFlag", getIsFlag()) - .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_prodline_info +// * +// * @author Yinq +// * @date 2024-01-24 +// */ +//public class MesBaseProdlineInfo extends BaseEntity +//{ +// private static final long serialVersionUID = 1L; +// +// /** 主键标识 */ +// private Long prodlineId; +// +// /** 产线编号 */ +// @Excel(name = "产线编号") +// private String prodlineCode; +// +// /** 产线名称 */ +// @Excel(name = "产线名称") +// private String prodlineName; +// +// /** 产线类型 */ +// @Excel(name = "产线类型") +// private String prodlineType; +// +// /** 所属工厂ID */ +// @Excel(name = "所属工厂ID") +// private Long factoryId; +// +// /** 所属工厂名称 */ +// @Excel(name = "所属工厂名称") +// private String factoryName; +// +// /** 是否标识 */ +// @Excel(name = "是否标识") +// private String isFlag; +// +// public String getFactoryName() { +// return factoryName; +// } +// +// public void setFactoryName(String factoryName) { +// this.factoryName = factoryName; +// } +// +// public void setProdlineId(Long prodlineId) +// { +// this.prodlineId = prodlineId; +// } +// +// public Long getProdlineId() +// { +// return prodlineId; +// } +// public void setProdlineCode(String prodlineCode) +// { +// this.prodlineCode = prodlineCode; +// } +// +// public String getProdlineCode() +// { +// return prodlineCode; +// } +// public void setProdlineName(String prodlineName) +// { +// this.prodlineName = prodlineName; +// } +// +// public String getProdlineName() +// { +// return prodlineName; +// } +// public void setProdlineType(String prodlineType) +// { +// this.prodlineType = prodlineType; +// } +// +// public String getProdlineType() +// { +// return prodlineType; +// } +// public void setFactoryId(Long factoryId) +// { +// this.factoryId = factoryId; +// } +// +// public Long getFactoryId() +// { +// return factoryId; +// } +// public void setIsFlag(String isFlag) +// { +// this.isFlag = isFlag; +// } +// +// public String getIsFlag() +// { +// return isFlag; +// } +// +// @Override +// public String toString() { +// return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) +// .append("prodlineId", getProdlineId()) +// .append("prodlineCode", getProdlineCode()) +// .append("prodlineName", getProdlineName()) +// .append("prodlineType", getProdlineType()) +// .append("factoryId", getFactoryId()) +// .append("isFlag", getIsFlag()) +// .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/MesBaseProcessInfoMapper.java b/hw-modules/hw-mes/src/main/java/com/hw/mes/mapper/MesBaseProcessInfoMapper.java index 4d419ac..f6b01be 100644 --- a/hw-modules/hw-mes/src/main/java/com/hw/mes/mapper/MesBaseProcessInfoMapper.java +++ b/hw-modules/hw-mes/src/main/java/com/hw/mes/mapper/MesBaseProcessInfoMapper.java @@ -1,9 +1,11 @@ package com.hw.mes.mapper; + +import com.hw.mes.api.domain.MesBaseProcessInfo; +import com.hw.mes.api.domain.MesBaseProcessProdline; +import com.hw.mes.api.domain.MesBaseProcessUser; + import java.util.List; -import com.hw.mes.domain.MesBaseProcessInfo; -import com.hw.mes.domain.MesBaseProcessProdline; -import com.hw.mes.domain.MesBaseProcessUser; /** * 工序信息Mapper接口 diff --git a/hw-modules/hw-mes/src/main/java/com/hw/mes/mapper/MesBaseProcessUserMapper.java b/hw-modules/hw-mes/src/main/java/com/hw/mes/mapper/MesBaseProcessUserMapper.java index 8e79678..b2c5621 100644 --- a/hw-modules/hw-mes/src/main/java/com/hw/mes/mapper/MesBaseProcessUserMapper.java +++ b/hw-modules/hw-mes/src/main/java/com/hw/mes/mapper/MesBaseProcessUserMapper.java @@ -1,7 +1,8 @@ package com.hw.mes.mapper; +import com.hw.mes.api.domain.MesBaseProcessUser; + import java.util.List; -import com.hw.mes.domain.MesBaseProcessUser; /** * 工序关联人员Mapper接口 diff --git a/hw-modules/hw-mes/src/main/java/com/hw/mes/mapper/MesBaseProdlineInfoMapper.java b/hw-modules/hw-mes/src/main/java/com/hw/mes/mapper/MesBaseProdlineInfoMapper.java index 8baec00..45dbb7c 100644 --- a/hw-modules/hw-mes/src/main/java/com/hw/mes/mapper/MesBaseProdlineInfoMapper.java +++ b/hw-modules/hw-mes/src/main/java/com/hw/mes/mapper/MesBaseProdlineInfoMapper.java @@ -1,7 +1,8 @@ package com.hw.mes.mapper; +import com.hw.mes.api.domain.MesBaseProdlineInfo; + import java.util.List; -import com.hw.mes.domain.MesBaseProdlineInfo; /** * 产线信息Mapper接口 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 004fdc5..01418c4 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 @@ -59,4 +59,15 @@ public interface MesBaseStationInfoMapper * @return 结果 */ public int deleteMesBaseStationInfoByStationIds(Long[] stationIds); + + + + /** + * 查询工位信息 + * + * @param ipAddress IP地址 + * @return 工位信息 + */ + public MesBaseStationInfo selectMesBaseStationInfoByStationIp(String ipAddress); + } diff --git a/hw-modules/hw-mes/src/main/java/com/hw/mes/service/IMesBaseProcessInfoService.java b/hw-modules/hw-mes/src/main/java/com/hw/mes/service/IMesBaseProcessInfoService.java index dfd324c..98b996b 100644 --- a/hw-modules/hw-mes/src/main/java/com/hw/mes/service/IMesBaseProcessInfoService.java +++ b/hw-modules/hw-mes/src/main/java/com/hw/mes/service/IMesBaseProcessInfoService.java @@ -1,8 +1,9 @@ package com.hw.mes.service; import java.util.List; -import com.hw.mes.domain.MesBaseProcessInfo; -import com.hw.mes.domain.MesBaseProcessUser; + +import com.hw.mes.api.domain.MesBaseProcessInfo; +import com.hw.mes.api.domain.MesBaseProcessUser; import org.springframework.transaction.annotation.Transactional; /** diff --git a/hw-modules/hw-mes/src/main/java/com/hw/mes/service/IMesBaseProdlineInfoService.java b/hw-modules/hw-mes/src/main/java/com/hw/mes/service/IMesBaseProdlineInfoService.java index 63ec08e..9597276 100644 --- a/hw-modules/hw-mes/src/main/java/com/hw/mes/service/IMesBaseProdlineInfoService.java +++ b/hw-modules/hw-mes/src/main/java/com/hw/mes/service/IMesBaseProdlineInfoService.java @@ -1,7 +1,8 @@ package com.hw.mes.service; +import com.hw.mes.api.domain.MesBaseProdlineInfo; + import java.util.List; -import com.hw.mes.domain.MesBaseProdlineInfo; /** * 产线信息Service接口 diff --git a/hw-modules/hw-mes/src/main/java/com/hw/mes/service/impl/MesBaseProcessInfoServiceImpl.java b/hw-modules/hw-mes/src/main/java/com/hw/mes/service/impl/MesBaseProcessInfoServiceImpl.java index c8ce662..64f284a 100644 --- a/hw-modules/hw-mes/src/main/java/com/hw/mes/service/impl/MesBaseProcessInfoServiceImpl.java +++ b/hw-modules/hw-mes/src/main/java/com/hw/mes/service/impl/MesBaseProcessInfoServiceImpl.java @@ -5,7 +5,9 @@ import java.util.List; import com.hw.common.core.exception.ServiceException; import com.hw.common.core.utils.DateUtils; import com.hw.common.security.utils.SecurityUtils; -import com.hw.mes.domain.*; +import com.hw.mes.api.domain.MesBaseProcessInfo; +import com.hw.mes.api.domain.MesBaseProcessProdline; +import com.hw.mes.api.domain.MesBaseProcessUser; import com.hw.mes.mapper.MesBaseProcessUserMapper; import com.hw.mes.mapper.MesBaseRouteProcessMapper; import org.springframework.beans.factory.annotation.Autowired; diff --git a/hw-modules/hw-mes/src/main/java/com/hw/mes/service/impl/MesBaseProdlineInfoServiceImpl.java b/hw-modules/hw-mes/src/main/java/com/hw/mes/service/impl/MesBaseProdlineInfoServiceImpl.java index 7b59893..0672930 100644 --- a/hw-modules/hw-mes/src/main/java/com/hw/mes/service/impl/MesBaseProdlineInfoServiceImpl.java +++ b/hw-modules/hw-mes/src/main/java/com/hw/mes/service/impl/MesBaseProdlineInfoServiceImpl.java @@ -2,10 +2,10 @@ package com.hw.mes.service.impl; import java.util.List; import com.hw.common.core.utils.DateUtils; +import com.hw.mes.api.domain.MesBaseProdlineInfo; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.hw.mes.mapper.MesBaseProdlineInfoMapper; -import com.hw.mes.domain.MesBaseProdlineInfo; import com.hw.mes.service.IMesBaseProdlineInfoService; /** diff --git a/hw-modules/hw-mes/src/main/java/com/hw/mes/service/impl/MesProductPlanServiceImpl.java b/hw-modules/hw-mes/src/main/java/com/hw/mes/service/impl/MesProductPlanServiceImpl.java index 7f79c2c..3dd21a5 100644 --- a/hw-modules/hw-mes/src/main/java/com/hw/mes/service/impl/MesProductPlanServiceImpl.java +++ b/hw-modules/hw-mes/src/main/java/com/hw/mes/service/impl/MesProductPlanServiceImpl.java @@ -9,10 +9,12 @@ import com.hw.common.core.constant.MesConstants; import com.hw.common.core.exception.ServiceException; import com.hw.common.core.utils.DateUtils; import com.hw.common.core.utils.SocketUtils; +import com.hw.common.core.utils.ip.IpUtils; import com.hw.common.core.utils.uuid.Seq; import com.hw.common.security.utils.SecurityUtils; import com.hw.mes.api.domain.MesBaseBarcodeInfo; +import com.hw.mes.api.domain.MesBaseStationInfo; import com.hw.mes.config.MesConfig; import com.hw.mes.domain.*; import com.hw.mes.domain.vo.MesAssignTaskVo; @@ -337,11 +339,17 @@ public class MesProductPlanServiceImpl implements IMesProductPlanService { */ @Override public List selectMesProductPlanJoinList(MesProductPlan mesProductPlan) { - Long stationId = SecurityUtils.getStationId(); - mesProductPlan.setStationId(stationId); + Long processId = SecurityUtils.getProcessId(); + Long userId = SecurityUtils.getUserId(); + if(!SecurityUtils.isAdmin(userId)) { + mesProductPlan.setUserId(userId); + } + mesProductPlan.setProcessId(processId); +// String ipAddress = IpUtils.getIpAddr(); +// MesBaseStationInfo mesBaseStationInfo = mesBase +// queryBaseStation.set - List mesProductPlans = mesProductPlanMapper.selectMesProductPlanJoinList(mesProductPlan); - return mesProductPlans; + return mesProductPlanMapper.selectMesProductPlanJoinList(mesProductPlan); // return mesProductPlans.stream(). // filter(e -> e.getPlanStatus().equals(MesConstants.MES_PRODUCT_PLAN_STATUS_DISPATCHED) || // e.getPlanStatus().equals(MesConstants.MES_PRODUCT_PLAN_STATUS_STARTED)).collect(Collectors.toList()); diff --git a/hw-modules/hw-mes/src/main/resources/mapper/mes/MesBaseProcessInfoMapper.xml b/hw-modules/hw-mes/src/main/resources/mapper/mes/MesBaseProcessInfoMapper.xml index f8ad194..8a80d59 100644 --- a/hw-modules/hw-mes/src/main/resources/mapper/mes/MesBaseProcessInfoMapper.xml +++ b/hw-modules/hw-mes/src/main/resources/mapper/mes/MesBaseProcessInfoMapper.xml @@ -9,6 +9,7 @@ + @@ -50,6 +51,7 @@ process_code, process_name, process_type, + process_floor, production_time, active_flag, remark, @@ -80,6 +82,7 @@ a.process_code, a.process_name, a.process_type, + a.process_floor, a.production_time, a.active_flag, a.remark, @@ -102,6 +105,7 @@ a.process_code, a.process_name, a.process_type, + a.process_floor, a.production_time, a.active_flag, a.remark, @@ -126,6 +130,7 @@ process_code, process_name, process_type, + process_floor, production_time, active_flag, remark, @@ -138,6 +143,7 @@ #{processCode}, #{processName}, #{processType}, + #{processFloor}, #{productionTime}, #{activeFlag}, #{remark}, @@ -154,6 +160,7 @@ process_code = #{processCode}, process_name = #{processName}, process_type = #{processType}, + process_floor = #{processFloor}, production_time = #{productionTime}, active_flag = #{activeFlag}, remark = #{remark}, diff --git a/hw-modules/hw-mes/src/main/resources/mapper/mes/MesBaseStationInfoMapper.xml b/hw-modules/hw-mes/src/main/resources/mapper/mes/MesBaseStationInfoMapper.xml index 8917326..f1e4e09 100644 --- a/hw-modules/hw-mes/src/main/resources/mapper/mes/MesBaseStationInfoMapper.xml +++ b/hw-modules/hw-mes/src/main/resources/mapper/mes/MesBaseStationInfoMapper.xml @@ -13,6 +13,7 @@ + @@ -29,6 +30,7 @@ mbsi.floor, mbsi.production_time, mbsi.active_flag, + mbsi.ip_address, mbsi.remark, mbsi.create_by, mbsi.create_time, @@ -123,4 +125,10 @@ #{stationId} + + + \ No newline at end of file diff --git a/hw-modules/hw-mes/src/main/resources/mapper/mes/MesProductPlanMapper.xml b/hw-modules/hw-mes/src/main/resources/mapper/mes/MesProductPlanMapper.xml index ac357dc..3cd7b2e 100644 --- a/hw-modules/hw-mes/src/main/resources/mapper/mes/MesProductPlanMapper.xml +++ b/hw-modules/hw-mes/src/main/resources/mapper/mes/MesProductPlanMapper.xml @@ -333,14 +333,15 @@