Merge remote-tracking branch 'origin/master'

master
Yangwl 11 months ago
commit 1a954cf0f5

@ -114,6 +114,12 @@ public class EquRepairOrderController extends BaseController {
@GetMapping("/getEquipmentList")
public TableDataInfo getEquipmentList(EquEquipment equEquipment) {
startPage();
if(equEquipment.getItemCode() != null){
equEquipment.setEquipmentCode(equEquipment.getItemCode());
}
if(equEquipment.getItemName()!= null){
equEquipment.setEquipmentName(equEquipment.getItemName());
}
List<EquEquipment> list = equRepairOrderService.selectEquEquipmentList(equEquipment);
return getDataTable(list);
}
@ -123,7 +129,6 @@ public class EquRepairOrderController extends BaseController {
*/
@GetMapping("/getEquipmentTypeList")
public TableDataInfo getEquipmentTypeList(EquEquipment equEquipment) {
startPage();
List<EquEquipment> list = equRepairOrderService.getEquipmentTypeList(equEquipment);
return getDataTable(list);
}

@ -240,6 +240,24 @@ public class EquEquipment extends BaseEntity {
// 组线名称
private String groupLineName;
//虚拟字段
private String itemCode;
private String itemName;
public String getItemCode() {
return itemCode;
}
public void setItemCode(String itemCode) {
this.itemCode = itemCode;
}
public String getItemName() {
return itemName;
}
public void setItemName(String itemName) {
this.itemName = itemName;
}
public String getGroupLineName() {
return groupLineName;
}

@ -70,4 +70,6 @@ public interface EquEquipmentMapper {
// 查询设备信息
List<EquEquipment> selectEquipmentList(EquEquipment equEquipment);
//查询组线为空的设备列表
List<EquEquipment> selectGroupLineNullList(EquEquipment equEquipment);
}

@ -243,8 +243,15 @@ public class EquPlanServiceImpl implements IEquPlanService {
@Override
@DS("#header.poolName")
public List<EquEquipment> getEquList(EquEquipment equEquipment) {
equEquipment.setEquipmentCategory("0");
return equEquipmentMapper.selectEquipmentList(equEquipment);
//如果组线不为空
if(equEquipment.getGroupLine() != null){
equEquipment.setEquipmentCategory("0");
List<EquEquipment> list = equEquipmentMapper.selectEquipmentList(equEquipment);
return list;
}else{
List<EquEquipment> list = equEquipmentMapper.selectGroupLineNullList(equEquipment);
return list;
}
}
/**

@ -111,12 +111,14 @@
<if test="equipmentCategory != null and equipmentCategory != ''">and equipment_category =
#{equipmentCategory}
</if>
and del_flag = '0'
</where>
</select>
<select id="selectEquEquipmentByEquEquipmentCode" parameterType="String" resultMap="EquEquipmentResult">
<include refid="selectEquEquipmentVo"/>
where equipment_code = #{equipmentCode}
and del_flag = '0'
</select>
<insert id="insertEquEquipment" parameterType="EquEquipment">
@ -272,6 +274,7 @@
from base_equipment
where del_flag = '0'
group by equipment_type_code,equipment_type_name
order by equipment_type_name desc
</select>
<select id="selectEquipmentGroupLine" resultMap="EquEquipmentResult">
@ -282,21 +285,32 @@
</select>
<select id="selectEquipmentList" parameterType="EquEquipment" resultMap="EquEquipmentResult">
select be.equipment_code,be.equipment_name,be.equipment_type_code,be.equipment_type_name,be.workshop_name
select be.equipment_code,be.equipment_name,be.equipment_type_code,be.equipment_type_name,be.workshop_name,be.equipment_category
from base_equipment be
<where>
<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="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="equipmentTypeCode != null and equipmentTypeCode != ''">and equipment_type_code = #{equipmentTypeCode}</if>
and be.del_flag = '0'
and be.equipment_code in (select bae.auxiliary_equipment_code
from equ_bind_auxiliary_equipment bae
where bae.equipment_code = #{groupLine}
and be.equipment_code in
(select bae.auxiliary_equipment_code
from equ_bind_auxiliary_equipment bae
<where>
<if test="groupLine != null and groupLine != ''">and bae.equipment_code like concat('%',#{groupLine}, '%')</if>
</where>
)
</where>
</select>
<select id="selectGroupLineNullList" parameterType="EquEquipment" resultMap="EquEquipmentResult">
select be.equipment_code,be.equipment_name,be.equipment_type_code,be.equipment_type_name,be.workshop_name,be.equipment_category
from base_equipment be
<where>
<if test="equipmentCode != null and equipmentCode != ''">and equipment_code like concat('%',#{equipmentCode}, '%')</if>
<if test="equipmentTypeCode != null and equipmentTypeCode != ''">and equipment_type_code = #{equipmentTypeCode}</if>
<if test="equipmentName != null and equipmentName != ''">and equipment_name like concat('%',#{equipmentName}, '%')</if>
and be.del_flag = '0'
</where>
</select>
</mapper>

Loading…
Cancel
Save