设备增加附属属性

highway
A0010407 1 year ago
parent a6198c787d
commit 4257e67ade

@ -93,10 +93,65 @@ public class BaseEquipment extends BaseEntity {
@Excel(name = "工时单价")
private String hourlyUnitPrice;
//附属字段
/** 成型机存料状态 */
@Excel(name = "成型机存料状态")
private String starving;
/** 该成型机存放的物料 */
@Excel(name = "该成型机存放的物料")
private String material;
/** 烘房是否开门 */
@Excel(name = "烘房是否开门")
private String isOpen;
/** 烘房2门前小车数量 */
@Excel(name = "烘房2门前小车数量")
private String dollyNumber;
/** 烘房温度 */
@Excel(name = "烘房温度")
private String temperature;
/** 烘房压强 */
@Excel(name = "烘房压强")
private String intensityOfPressure;
/** 烘房湿度 */
@Excel(name = "烘房湿度")
private String humidity;
/** 烘房状态 */
@Excel(name = "烘房状态")
private String state;
/** 删除标志 */
@Excel(name = "删除标志")
private String delFlag;
/** 属性 */
@Excel(name = "属性")
private String property;
/** 说明 */
@Excel(name = "说明")
private String explain;
public void setExplain(String explain) {
this.explain = explain;
}
public String getExplain() {
return explain;
}
public void setProperty(String property) {
this.property = property;
}
public String getProperty() {
return property;
}
public void setDelFlag(String delFlag) {
this.delFlag = delFlag;
}
@ -104,6 +159,62 @@ public class BaseEquipment extends BaseEntity {
return delFlag;
}
public void setStarving(String starving) {
this.starving = starving;
}
public String getStarving() {
return starving;
}
public void setMaterial(String material) {
this.material = material;
}
public String getMaterial() {
return material;
}
public void setIsOpen(String isOpen) {
this.isOpen = isOpen;
}
public String getIsOpen() {
return isOpen;
}
public void setDollyNumber(String dollyNumber) {
this.dollyNumber = dollyNumber;
}
public String getDollyNumber() {
return dollyNumber;
}
public void setTemperature(String temperature) {
this.temperature = temperature;
}
public String getTemperature() {
return temperature;
}
public void setIntensityOfPressure(String intensityOfPressure) {
this.intensityOfPressure = intensityOfPressure;
}
public String getIntensityOfPressure() {
return intensityOfPressure;
}
public void setHumidity(String humidity) {
this.humidity = humidity;
}
public String getHumidity() {
return humidity;
}
public void setState(String state) {
this.state = state;
}
public String getState() {
return state;
}
public void setEquipmentId(Long equipmentId) {
this.equipmentId = equipmentId;
}
@ -274,6 +385,17 @@ public class BaseEquipment extends BaseEntity {
.append("equipmentLocation", getEquipmentLocation())
.append("hourlyUnitPrice", getHourlyUnitPrice())
.append("delFlag", getDelFlag())
.append("humidity", getHumidity())
.append("intensityOfPressure", getIntensityOfPressure())
.append("starving", getStarving())
.append("humidity", getHumidity())
.append("temperature", getTemperature())
.append("starving", getStarving())
.append("material", getMaterial())
.append("isOpen", getIsOpen())
.append("property", getProperty())
.append("explain", getExplain())
.toString();
}
}

@ -67,4 +67,7 @@ public interface BaseEquipmentMapper {
String checkEquipmentNameUnique(BaseEquipment baseEquipment);
String getWorkCenterName(BaseEquipment baseEquipment);
//查询机器编码关联附属信息
List<BaseEquipment> getEquipmentAttachedList(String equipmentCode);
}

@ -31,7 +31,40 @@ public class BaseEquipmentServiceImpl implements IBaseEquipmentService {
@Override
@DS("#header.poolName")
public BaseEquipment selectBaseEquipmentByEquipmentId(Long equipmentId) {
return baseEquipmentMapper.selectBaseEquipmentByEquipmentId(equipmentId);
BaseEquipment list = baseEquipmentMapper.selectBaseEquipmentByEquipmentId(equipmentId);
List<BaseEquipment> attachedList = baseEquipmentMapper.getEquipmentAttachedList(list.getEquipmentCode());
// if(list.getEquipmentTypeCode().equals("equ_type_cxj") || list.getEquipmentTypeCode().equals("equ_type_hf")){
for(BaseEquipment example:attachedList){
if(list.getEquipmentTypeCode().equals("equ_type_cxj")){
if(example.getProperty().equals("material")){
list.setMaterial(example.getExplain());
}else{
list.setStarving(example.getExplain());
}
}else if(list.getEquipmentTypeCode().equals("equ_type_hf")){
if(example.getProperty().equals("isopen")){
//烘房是否开门
list.setIsOpen(example.getExplain());
}else if(example.getProperty().equals("dollyNumber")){
//烘房前小车数量
list.setDollyNumber(example.getExplain());
}else if(example.getProperty().equals("temperature")){
//烘房温度
list.setTemperature(example.getExplain());
}else if(example.getProperty().equals("intensityofpressure")){
//烘房压强
list.setIntensityOfPressure(example.getExplain());
}else if(example.getProperty().equals("State")){
//烘房状态
list.setState(example.getExplain());
}else{
//烘房湿度
list.setHumidity(example.getExplain());
}
}
}
// }
return list;
}
/**

@ -198,4 +198,12 @@
and del_flag = '0'
</select>
<select id="getEquipmentAttachedList" parameterType="BaseEquipment" resultType="com.op.wms.domain.BaseEquipment">
SELECT *
FROM base_equipment,base_equipment_attached
where base_equipment_attached.device_code = #{equipmentCode}
and base_equipment.equipment_code = #{equipmentCode}
and base_equipment.del_flag = '0'
</select>
</mapper>
Loading…
Cancel
Save