|
|
@ -4,6 +4,7 @@ import java.util.List;
|
|
|
|
|
|
|
|
|
|
|
|
import com.baomidou.dynamic.datasource.annotation.DS;
|
|
|
|
import com.baomidou.dynamic.datasource.annotation.DS;
|
|
|
|
import com.op.common.core.utils.DateUtils;
|
|
|
|
import com.op.common.core.utils.DateUtils;
|
|
|
|
|
|
|
|
import com.op.wms.domain.BaseArea;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
import com.op.wms.mapper.BaseEquipmentMapper;
|
|
|
|
import com.op.wms.mapper.BaseEquipmentMapper;
|
|
|
@ -55,6 +56,8 @@ public class BaseEquipmentServiceImpl implements IBaseEquipmentService {
|
|
|
|
@DS("#header.poolName")
|
|
|
|
@DS("#header.poolName")
|
|
|
|
public int insertBaseEquipment(BaseEquipment baseEquipment) {
|
|
|
|
public int insertBaseEquipment(BaseEquipment baseEquipment) {
|
|
|
|
baseEquipment.setCreateTime(DateUtils.getNowDate());
|
|
|
|
baseEquipment.setCreateTime(DateUtils.getNowDate());
|
|
|
|
|
|
|
|
String equipmentTypeName = baseEquipmentMapper.getEquipmentTypeName(baseEquipment);
|
|
|
|
|
|
|
|
baseEquipment.setEquipmentTypeName(equipmentTypeName);
|
|
|
|
return baseEquipmentMapper.insertBaseEquipment(baseEquipment);
|
|
|
|
return baseEquipmentMapper.insertBaseEquipment(baseEquipment);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -68,6 +71,8 @@ public class BaseEquipmentServiceImpl implements IBaseEquipmentService {
|
|
|
|
@DS("#header.poolName")
|
|
|
|
@DS("#header.poolName")
|
|
|
|
public int updateBaseEquipment(BaseEquipment baseEquipment) {
|
|
|
|
public int updateBaseEquipment(BaseEquipment baseEquipment) {
|
|
|
|
baseEquipment.setUpdateTime(DateUtils.getNowDate());
|
|
|
|
baseEquipment.setUpdateTime(DateUtils.getNowDate());
|
|
|
|
|
|
|
|
String equipmentTypeName = baseEquipmentMapper.getEquipmentTypeName(baseEquipment);
|
|
|
|
|
|
|
|
baseEquipment.setEquipmentTypeName(equipmentTypeName);
|
|
|
|
return baseEquipmentMapper.updateBaseEquipment(baseEquipment);
|
|
|
|
return baseEquipmentMapper.updateBaseEquipment(baseEquipment);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -94,4 +99,36 @@ public class BaseEquipmentServiceImpl implements IBaseEquipmentService {
|
|
|
|
public int deleteBaseEquipmentByEquipmentId(Long equipmentId) {
|
|
|
|
public int deleteBaseEquipmentByEquipmentId(Long equipmentId) {
|
|
|
|
return baseEquipmentMapper.deleteBaseEquipmentByEquipmentId(equipmentId);
|
|
|
|
return baseEquipmentMapper.deleteBaseEquipmentByEquipmentId(equipmentId);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* 判断设备信息
|
|
|
|
|
|
|
|
*
|
|
|
|
|
|
|
|
* @return 结果
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
@DS("#header.poolName")
|
|
|
|
|
|
|
|
public boolean checkEquipmentCodeUnique(BaseEquipment baseEquipment){
|
|
|
|
|
|
|
|
String equipment = baseEquipmentMapper.checkEquipmentCodeUnique(baseEquipment);
|
|
|
|
|
|
|
|
if(equipment == null){
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* 判断设备信息
|
|
|
|
|
|
|
|
*
|
|
|
|
|
|
|
|
* @return 结果
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
@DS("#header.poolName")
|
|
|
|
|
|
|
|
public boolean checkEquipmentNameUnique(BaseEquipment baseEquipment){
|
|
|
|
|
|
|
|
String equipment = baseEquipmentMapper.checkEquipmentNameUnique(baseEquipment);
|
|
|
|
|
|
|
|
if(equipment == null){
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|