diff --git a/ruoyi-modules/hwmom-mes/src/main/java/org/dromara/mes/domain/ProdBaseRouteProcess.java b/ruoyi-modules/hwmom-mes/src/main/java/org/dromara/mes/domain/ProdBaseRouteProcess.java index 7438391a..4030499f 100644 --- a/ruoyi-modules/hwmom-mes/src/main/java/org/dromara/mes/domain/ProdBaseRouteProcess.java +++ b/ruoyi-modules/hwmom-mes/src/main/java/org/dromara/mes/domain/ProdBaseRouteProcess.java @@ -48,4 +48,18 @@ public class ProdBaseRouteProcess extends BaseEntity { private String remark; + + /** + * 工序名称 + */ + @TableField(exist = false) + private String processName;//映射字段 + + /** + * 工序类别(1生产工序 2质检工序) + */ + @TableField(exist = false) + private String processType;//映射字段 + + } diff --git a/ruoyi-modules/hwmom-mes/src/main/java/org/dromara/mes/mapper/ProdBaseRouteProcessMapper.java b/ruoyi-modules/hwmom-mes/src/main/java/org/dromara/mes/mapper/ProdBaseRouteProcessMapper.java index a036c209..db311874 100644 --- a/ruoyi-modules/hwmom-mes/src/main/java/org/dromara/mes/mapper/ProdBaseRouteProcessMapper.java +++ b/ruoyi-modules/hwmom-mes/src/main/java/org/dromara/mes/mapper/ProdBaseRouteProcessMapper.java @@ -4,6 +4,8 @@ import org.dromara.mes.domain.ProdBaseRouteProcess; import org.dromara.mes.domain.vo.ProdBaseRouteProcessVo; import org.dromara.common.mybatis.core.mapper.BaseMapperPlus; +import java.util.List; + /** * 工艺路线组成信息Mapper接口 * @@ -12,4 +14,13 @@ import org.dromara.common.mybatis.core.mapper.BaseMapperPlus; */ public interface ProdBaseRouteProcessMapper extends BaseMapperPlus { + /** + * 查询工艺路线组成信息列表,Join prod_base_process_info + * + * @param prodBaseRouteProcess 工艺路线组成信息 + * @return 工艺路线组成信息集合 + */ + public List selectProdBaseRouteProcessJoinList(ProdBaseRouteProcess prodBaseRouteProcess); + + } diff --git a/ruoyi-modules/hwmom-mes/src/main/java/org/dromara/mes/service/IProdBaseRouteProcessService.java b/ruoyi-modules/hwmom-mes/src/main/java/org/dromara/mes/service/IProdBaseRouteProcessService.java index 1cc49f7c..95b64704 100644 --- a/ruoyi-modules/hwmom-mes/src/main/java/org/dromara/mes/service/IProdBaseRouteProcessService.java +++ b/ruoyi-modules/hwmom-mes/src/main/java/org/dromara/mes/service/IProdBaseRouteProcessService.java @@ -66,4 +66,13 @@ public interface IProdBaseRouteProcessService { * @return 是否删除成功 */ Boolean deleteWithValidByIds(Collection ids, Boolean isValid); + + + /** + * 查询工艺路线组成信息列表,Join mes_base_process + * + * @param prodBaseRouteProcess 工艺路线组成信息 + * @return 工艺路线组成信息 + */ + public List selectProdBaseRouteProcessJoinList(ProdBaseRouteProcess prodBaseRouteProcess); } diff --git a/ruoyi-modules/hwmom-mes/src/main/java/org/dromara/mes/service/impl/ProdBaseProcessInfoServiceImpl.java b/ruoyi-modules/hwmom-mes/src/main/java/org/dromara/mes/service/impl/ProdBaseProcessInfoServiceImpl.java index 15fe46fd..16456f4b 100644 --- a/ruoyi-modules/hwmom-mes/src/main/java/org/dromara/mes/service/impl/ProdBaseProcessInfoServiceImpl.java +++ b/ruoyi-modules/hwmom-mes/src/main/java/org/dromara/mes/service/impl/ProdBaseProcessInfoServiceImpl.java @@ -1,6 +1,5 @@ package org.dromara.mes.service.impl; -import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.util.ObjectUtil; import org.dromara.common.core.exception.ServiceException; import org.dromara.common.core.utils.DateUtils; @@ -298,11 +297,6 @@ public class ProdBaseProcessInfoServiceImpl implements IProdBaseProcessInfoServi prodBaseProcessUser.setCreateDept(prodBaseProcessInfo.getCreateDept()); prodBaseProcessUser.setTenantId(prodBaseProcessInfo.getTenantId()); - Long userId = prodBaseProcessUser.getUserId(); - - - - list.add(prodBaseProcessUser); } if (!list.isEmpty()) { diff --git a/ruoyi-modules/hwmom-mes/src/main/java/org/dromara/mes/service/impl/ProdBaseRouteProcessServiceImpl.java b/ruoyi-modules/hwmom-mes/src/main/java/org/dromara/mes/service/impl/ProdBaseRouteProcessServiceImpl.java index c99fcd65..cd99740f 100644 --- a/ruoyi-modules/hwmom-mes/src/main/java/org/dromara/mes/service/impl/ProdBaseRouteProcessServiceImpl.java +++ b/ruoyi-modules/hwmom-mes/src/main/java/org/dromara/mes/service/impl/ProdBaseRouteProcessServiceImpl.java @@ -9,6 +9,7 @@ import com.github.yulichang.toolkit.JoinWrappers; import com.github.yulichang.wrapper.MPJLambdaWrapper; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import lombok.RequiredArgsConstructor; +import org.dromara.mes.domain.ProdBaseProcessInfo; import org.springframework.stereotype.Service; import org.dromara.mes.domain.bo.ProdBaseRouteProcessBo; import org.dromara.mes.domain.vo.ProdBaseRouteProcessVo; @@ -32,6 +33,8 @@ public class ProdBaseRouteProcessServiceImpl implements IProdBaseRouteProcessSer private final ProdBaseRouteProcessMapper baseMapper; + private final ProdBaseRouteProcessMapper prodBaseRouteProcessMapper; + /** * 查询工艺路线组成信息 * @@ -73,6 +76,11 @@ public class ProdBaseRouteProcessServiceImpl implements IProdBaseRouteProcessSer Map params = bo.getParams(); MPJLambdaWrapper lqw = JoinWrappers.lambda(ProdBaseRouteProcess.class) .selectAll(ProdBaseRouteProcess.class) + + .select(ProdBaseProcessInfo::getProcessName) + .select(ProdBaseProcessInfo::getProcessType) + .leftJoin(ProdBaseProcessInfo.class, ProdBaseProcessInfo::getProcessId, ProdBaseRouteProcess::getProcessId) + .eq(bo.getRouteProcessId() != null, ProdBaseRouteProcess::getRouteProcessId, bo.getRouteProcessId()) .eq(bo.getRouteId() != null, ProdBaseRouteProcess::getRouteId, bo.getRouteId()) .eq(bo.getProcessId() != null, ProdBaseRouteProcess::getProcessId, bo.getProcessId()) @@ -132,4 +140,17 @@ public class ProdBaseRouteProcessServiceImpl implements IProdBaseRouteProcessSer } return baseMapper.deleteByIds(ids) > 0; } + + /** + * 查询工艺路线组成信息列表,Join mes_base_process + * + * @param prodBaseRouteProcess 工艺路线组成信息 + * @return 工艺路线组成信息 + */ + @Override + public List selectProdBaseRouteProcessJoinList(ProdBaseRouteProcess prodBaseRouteProcess) + { + return prodBaseRouteProcessMapper.selectProdBaseRouteProcessJoinList(prodBaseRouteProcess); + } + } diff --git a/ruoyi-modules/hwmom-mes/src/main/resources/mapper/mes/ProdBaseRouteMapper.xml b/ruoyi-modules/hwmom-mes/src/main/resources/mapper/mes/ProdBaseRouteMapper.xml index d4493af2..8f2d2cf4 100644 --- a/ruoyi-modules/hwmom-mes/src/main/resources/mapper/mes/ProdBaseRouteMapper.xml +++ b/ruoyi-modules/hwmom-mes/src/main/resources/mapper/mes/ProdBaseRouteMapper.xml @@ -196,10 +196,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" mf.multiStationFlag from prod_base_route_process brp left join prod_base_process_info bpi on bpi.process_id = brp.process_id - left join mes_base_station_info bsi on bsi.process_id = bpi.process_id + left join prod_base_station_info bsi on bsi.process_id = bpi.process_id left join (select brp.process_id, count(*) multiStationFlag from prod_base_route_process brp - left join mes_base_station_info bsi on bsi.process_id = brp.process_id + left join prod_base_station_info bsi on bsi.process_id = brp.process_id where brp.route_id = #{routeId} group by brp.process_id) mf on mf.process_id = bsi.process_id where brp.route_id = #{routeId} diff --git a/ruoyi-modules/hwmom-mes/src/main/resources/mapper/mes/ProdBaseRouteProcessMapper.xml b/ruoyi-modules/hwmom-mes/src/main/resources/mapper/mes/ProdBaseRouteProcessMapper.xml index 19a53b9b..bbe748ec 100644 --- a/ruoyi-modules/hwmom-mes/src/main/resources/mapper/mes/ProdBaseRouteProcessMapper.xml +++ b/ruoyi-modules/hwmom-mes/src/main/resources/mapper/mes/ProdBaseRouteProcessMapper.xml @@ -4,4 +4,40 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> + + + + + + + + + + + + + + + + +