diff --git a/op-modules/op-wms/src/main/java/com/op/wms/controller/BaseEquipmentController.java b/op-modules/op-wms/src/main/java/com/op/wms/controller/BaseEquipmentController.java index 54c29ff6..30f9c1ff 100644 --- a/op-modules/op-wms/src/main/java/com/op/wms/controller/BaseEquipmentController.java +++ b/op-modules/op-wms/src/main/java/com/op/wms/controller/BaseEquipmentController.java @@ -11,9 +11,7 @@ import com.op.common.core.utils.DateUtils; import com.op.common.core.utils.poi.ExcelMapUtil; import com.op.common.security.utils.SecurityUtils; import com.op.system.api.domain.SysUser; -import com.op.wms.domain.BaseTeamUser; -import com.op.wms.domain.EquSpareEquipment; -import com.op.wms.domain.WmsSparePartsLedger; +import com.op.wms.domain.*; import com.op.wms.service.IBaseEquipmentService; import org.apache.poi.xssf.streaming.SXSSFWorkbook; import org.springframework.beans.factory.annotation.Autowired; @@ -28,7 +26,6 @@ import org.springframework.web.bind.annotation.RestController; import com.op.common.log.annotation.Log; import com.op.common.log.enums.BusinessType; import com.op.common.security.annotation.RequiresPermissions; -import com.op.wms.domain.BaseEquipment; import com.op.common.core.web.controller.BaseController; import com.op.common.core.web.domain.AjaxResult; import com.op.common.core.utils.poi.ExcelUtil; @@ -241,4 +238,14 @@ public class BaseEquipmentController extends BaseController { return getDataTable(list); } + /** + * 查询组线/辅助设备 + */ + @GetMapping("/getAuxiliaryEquipmentList") + public TableDataInfo getAuxiliaryEquipmentList(EquBindAuxiliaryEquipment equBindAuxiliaryEquipment) { + startPage(); + List list = baseEquipmentService.selectAuxiliaryEquipmentList(equBindAuxiliaryEquipment); + return getDataTable(list); + } + } diff --git a/op-modules/op-wms/src/main/java/com/op/wms/mapper/BaseEquipmentMapper.java b/op-modules/op-wms/src/main/java/com/op/wms/mapper/BaseEquipmentMapper.java index bd505a4e..d77bd129 100644 --- a/op-modules/op-wms/src/main/java/com/op/wms/mapper/BaseEquipmentMapper.java +++ b/op-modules/op-wms/src/main/java/com/op/wms/mapper/BaseEquipmentMapper.java @@ -117,4 +117,7 @@ public interface BaseEquipmentMapper { //删除 void deleteAuxiliaryEquipmentByCode(String equipmentCode); + + //查询组线/辅助设备 + List selectAuxiliaryEquipmentList(EquBindAuxiliaryEquipment equBindAuxiliaryEquipment); } diff --git a/op-modules/op-wms/src/main/java/com/op/wms/service/IBaseEquipmentService.java b/op-modules/op-wms/src/main/java/com/op/wms/service/IBaseEquipmentService.java index a8180e81..2c786021 100644 --- a/op-modules/op-wms/src/main/java/com/op/wms/service/IBaseEquipmentService.java +++ b/op-modules/op-wms/src/main/java/com/op/wms/service/IBaseEquipmentService.java @@ -3,10 +3,7 @@ package com.op.wms.service; import java.util.List; import com.op.common.core.web.domain.AjaxResult; -import com.op.wms.domain.BaseEquipment; -import com.op.wms.domain.BaseTeamUser; -import com.op.wms.domain.EquSpareEquipment; -import com.op.wms.domain.WmsSparePartsLedger; +import com.op.wms.domain.*; /** * 设备管理Service接口 @@ -83,4 +80,7 @@ public interface IBaseEquipmentService { //查询人员列表 List getPersonList(BaseTeamUser baseTeamUser); + + //查询组线/辅助设备 + List selectAuxiliaryEquipmentList(EquBindAuxiliaryEquipment equBindAuxiliaryEquipment); } diff --git a/op-modules/op-wms/src/main/java/com/op/wms/service/impl/BaseEquipmentServiceImpl.java b/op-modules/op-wms/src/main/java/com/op/wms/service/impl/BaseEquipmentServiceImpl.java index 47942426..e699f36a 100644 --- a/op-modules/op-wms/src/main/java/com/op/wms/service/impl/BaseEquipmentServiceImpl.java +++ b/op-modules/op-wms/src/main/java/com/op/wms/service/impl/BaseEquipmentServiceImpl.java @@ -335,10 +335,14 @@ public class BaseEquipmentServiceImpl implements IBaseEquipmentService { EquBindAuxiliaryEquipment equBindAuxiliaryEquipment = new EquBindAuxiliaryEquipment(); equBindAuxiliaryEquipment.setAuxiliaryEquipmentCode(code); equBindAuxiliaryEquipment.setEquipmentCode(baseEquipment.getEquipmentCode()); + equBindAuxiliaryEquipment.setEquipmentName(baseEquipment.getEquipmentName()); equBindAuxiliaryEquipment.setCreateBy(SecurityUtils.getUsername()); equBindAuxiliaryEquipment.setCreateTime(DateUtils.getNowDate()); equBindAuxiliaryEquipment.setId(IdUtils.fastSimpleUUID()); - equBindAuxiliaryEquipment.setAuxiliaryEquipmentName(baseEquipment.getEquipmentName()); + //工厂号 + HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest(); + String key = "#header.poolName"; + equBindAuxiliaryEquipment.setFactoryCode(request.getHeader(key.substring(8)).replace("ds_","")); baseEquipmentMapper.bindAuxiliaryEquipment(equBindAuxiliaryEquipment); } } @@ -552,4 +556,16 @@ public class BaseEquipmentServiceImpl implements IBaseEquipmentService { return baseTeamUserMapper.getPersonList(baseTeamUser); } + /** + * 查询设备管理列表 + * + * @param equBindAuxiliaryEquipment 设备管理 + * @return 设备管理 + */ + @Override + @DS("#header.poolName") + public List selectAuxiliaryEquipmentList(EquBindAuxiliaryEquipment equBindAuxiliaryEquipment) { + return baseEquipmentMapper.selectAuxiliaryEquipmentList(equBindAuxiliaryEquipment); + } + } diff --git a/op-modules/op-wms/src/main/resources/mapper/wms/BaseEquipmentMapper.xml b/op-modules/op-wms/src/main/resources/mapper/wms/BaseEquipmentMapper.xml index c120ca67..6615e765 100644 --- a/op-modules/op-wms/src/main/resources/mapper/wms/BaseEquipmentMapper.xml +++ b/op-modules/op-wms/src/main/resources/mapper/wms/BaseEquipmentMapper.xml @@ -581,4 +581,15 @@ where equipment_id = #{equipmentId} + + + \ No newline at end of file