设备查询bug

highway
A0010407 1 year ago
parent 8c66896294
commit ede0a00c67

@ -131,6 +131,8 @@ public class ProProcessController extends BaseController {
@RequiresPermissions("mes:pro:process:equipmentList")
@GetMapping("/selectEquipmentList")
public TableDataInfo selectEquipmentList(Equipment equipment) {
equipment.setEquipmentName(equipment.getItemName());
equipment.setEquipmentCode(equipment.getItemCode());
startPage();
List<Equipment> list = proProcessService.selectEquipmentList(equipment);
return getDataTable(list);

@ -93,6 +93,26 @@ public class Equipment extends BaseEntity {
@Excel(name = "工时单价")
private String hourlyUnitPrice;
//虚拟字段
private String itemCode;
private String itemName;
public void setItemCode(String itemCode) {
this.itemCode = itemCode;
}
public String getItemCode() {
return itemCode;
}
public void setItemName(String itemName) {
this.itemName = itemName;
}
public String getItemName() {
return itemName;
}
public void setEquipmentId(Long equipmentId) {
this.equipmentId = equipmentId;
}
@ -262,6 +282,8 @@ public class Equipment extends BaseEntity {
.append("workshopSection", getWorkshopSection())
.append("equipmentLocation", getEquipmentLocation())
.append("hourlyUnitPrice", getHourlyUnitPrice())
.append("itemCode",getItemCode())
.append("itemName",getItemName())
.toString();
}
}

@ -262,23 +262,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<where>
<if test="equipmentCode != null and equipmentCode != ''"> and equipment_code = #{equipmentCode}</if>
<if test="equipmentName != null and equipmentName != ''"> and equipment_name like concat('%', #{equipmentName}, '%')</if>
<if test="equipmentBrand != null and equipmentBrand != ''"> and equipment_brand = #{equipmentBrand}</if>
<if test="equipmentSpec != null and equipmentSpec != ''"> and equipment_spec = #{equipmentSpec}</if>
<if test="equipmentTypeId != null "> and equipment_type_id = #{equipmentTypeId}</if>
<if test="equipmentTypeCode != null and equipmentTypeCode != ''"> and equipment_type_code = #{equipmentTypeCode}</if>
<if test="equipmentTypeName != null and equipmentTypeName != ''"> and equipment_type_name like concat('%', #{equipmentTypeName}, '%')</if>
<if test="workshopId != null "> and workshop_id = #{workshopId}</if>
<if test="workshopCode != null and workshopCode != ''"> and workshop_code = #{workshopCode}</if>
<if test="workshopName != null and workshopName != ''"> and workshop_name like concat('%', #{workshopName}, '%')</if>
<if test="status != null and status != ''"> and status = #{status}</if>
<if test="attr1 != null and attr1 != ''"> and attr1 = #{attr1}</if>
<if test="attr2 != null and attr2 != ''"> and attr2 = #{attr2}</if>
<if test="attr3 != null "> and attr3 = #{attr3}</if>
<if test="attr4 != null "> and attr4 = #{attr4}</if>
<!-- <if test="unitWorkingHours != null and unitWorkingHours != ''"> and unit_working_hours = #{unitWorkingHours}</if>-->
<if test="workshopSection != null and workshopSection != ''"> and workshop_section = #{workshopSection}</if>
<if test="equipmentLocation != null and equipmentLocation != ''"> and equipment_location = #{equipmentLocation}</if>
<if test="hourlyUnitPrice != null and hourlyUnitPrice != ''"> and hourly_unit_price = #{hourlyUnitPrice}</if>
</where>
</select>

Loading…
Cancel
Save