动态获取设备类别

highway
A0010407 1 year ago
parent 8f803da334
commit 14a5fa293c

@ -172,11 +172,22 @@ public class ProProcessController extends BaseController {
/** /**
* *
*/ */
@RequiresPermissions("wms:factory:getWorkCenterList") @RequiresPermissions("mes:pro:process:getWorkCenterList")
@GetMapping("/getWorkCenterList") @GetMapping("/getWorkCenterList")
public TableDataInfo getWorkCenterList(SysFactory sysFactory) { public TableDataInfo getWorkCenterList(SysFactory sysFactory) {
startPage(); startPage();
List<SysFactory> list = proProcessService.getWorkCenterList(sysFactory); List<SysFactory> list = proProcessService.getWorkCenterList(sysFactory);
return getDataTable(list); return getDataTable(list);
} }
/**
*
*/
@RequiresPermissions("mes:pro:process:getEquipmentTypeList")
@GetMapping("/getEquipmentTypeList")
public TableDataInfo getEquipmentTypeList(Equipment equipment) {
startPage();
List<Equipment> list = proProcessService.getEquipmentTypeList(equipment);
return getDataTable(list);
}
} }

@ -76,4 +76,7 @@ public interface ProProcessMapper
//查询下拉式工作中心 //查询下拉式工作中心
public List<SysFactory> getWorkCenterList(SysFactory sysFactory); public List<SysFactory> getWorkCenterList(SysFactory sysFactory);
//查询设备类型
List<Equipment> getEquipmentTypeList(Equipment equipment);
} }

@ -77,4 +77,7 @@ public interface IProProcessService
//查询下拉式工作中心 //查询下拉式工作中心
List<SysFactory> getWorkCenterList(SysFactory sysFactory); List<SysFactory> getWorkCenterList(SysFactory sysFactory);
//查询设备类型
List<Equipment> getEquipmentTypeList(Equipment equipment);
} }

@ -245,4 +245,16 @@ public class ProProcessServiceImpl implements IProProcessService {
public List<SysFactory> getWorkCenterList(SysFactory sysFactory) { public List<SysFactory> getWorkCenterList(SysFactory sysFactory) {
return proProcessMapper.getWorkCenterList(sysFactory); return proProcessMapper.getWorkCenterList(sysFactory);
} }
/**
*
*
* @param equipment
* @return
*/
@Override
@DS("#header.poolName")
public List<Equipment> getEquipmentTypeList(Equipment equipment) {
return proProcessMapper.getEquipmentTypeList(equipment);
}
} }

@ -297,9 +297,9 @@
<select id="selectEquipmentList" parameterType="Equipment" resultMap="EquipmentResult"> <select id="selectEquipmentList" parameterType="Equipment" resultMap="EquipmentResult">
<include refid="selectEquipmentVo"/> <include refid="selectEquipmentVo"/>
<where> <where>
<if test="equipmentCode != null and equipmentCode != ''"> and equipment_code = #{equipmentCode}</if> <if test="equipmentCode != null and equipmentCode != ''"> and equipment_code like concat('%', #{equipmentCode}, '%')</if>
<if test="equipmentName != null and equipmentName != ''"> and equipment_name like concat('%', #{equipmentName}, '%')</if> <if test="equipmentName != null and equipmentName != ''"> and equipment_name like concat('%', #{equipmentName}, '%')</if>
<if test="equipmentTypeCode != null and equipmentTypeCode != ''"> and equipment_type_code = #{equipmentTypeCode}</if> <if test="equipmentTypeCode != null and equipmentTypeCode != ''"> and equipment_type_code like concat('%', #{equipmentTypeCode}, '%')</if>
<if test="equipmentTypeName != null and equipmentTypeName != ''"> and equipment_type_name like concat('%', #{equipmentTypeName}, '%')</if> <if test="equipmentTypeName != null and equipmentTypeName != ''"> and equipment_type_name like concat('%', #{equipmentTypeName}, '%')</if>
</where> </where>
</select> </select>
@ -323,4 +323,10 @@
from sys_factory from sys_factory
</select> </select>
<select id="getEquipmentTypeList" parameterType="Equipment" resultMap="EquipmentResult">
select equipment_type_code,equipment_type_name
from base_equipment
group by equipment_type_code,equipment_type_name
</select>
</mapper> </mapper>

@ -113,7 +113,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</foreach> </foreach>
</delete> </delete>
<select id="getWorkCenterList" parameterType="SysFactory" resultType="SysFactoryResult"> <select id="getWorkCenterList" parameterType="SysFactory" resultMap="SysFactoryResult">
select factory_code,factory_name select factory_code,factory_name
from sys_factory from sys_factory
</select> </select>

Loading…
Cancel
Save