|
|
|
@ -1,9 +1,14 @@
|
|
|
|
|
package cn.estsh.i3plus.pojo.andon.sqlpack;
|
|
|
|
|
|
|
|
|
|
import cn.estsh.i3plus.pojo.andon.bean.AndonAlarmCause;
|
|
|
|
|
import cn.estsh.i3plus.pojo.andon.bean.MesEquipment;
|
|
|
|
|
import cn.estsh.i3plus.pojo.andon.bean.MesWorkCell;
|
|
|
|
|
import cn.estsh.i3plus.pojo.andon.bean.MesWorkCenter;
|
|
|
|
|
import cn.estsh.i3plus.pojo.andon.bean.AndonPLC;
|
|
|
|
|
import cn.estsh.i3plus.pojo.base.bean.BaseBean;
|
|
|
|
|
import cn.estsh.i3plus.pojo.base.bean.DdlPackBean;
|
|
|
|
|
import cn.estsh.i3plus.pojo.base.enumutil.AndonEnumUtil;
|
|
|
|
|
import cn.estsh.i3plus.pojo.base.enumutil.CommonEnumUtil;
|
|
|
|
|
import cn.estsh.i3plus.pojo.base.tool.DdlPreparedPack;
|
|
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
|
|
|
|
|
|
|
import cn.estsh.i3plus.pojo.andon.bean.*;
|
|
|
|
|
import cn.estsh.i3plus.pojo.base.bean.BaseBean;
|
|
|
|
|
import cn.estsh.i3plus.pojo.base.bean.DdlPackBean;
|
|
|
|
|
import cn.estsh.i3plus.pojo.base.enumutil.CommonEnumUtil;
|
|
|
|
@ -40,6 +45,30 @@ public class AndonHqlPack {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 按灯PLC查询条件
|
|
|
|
|
*
|
|
|
|
|
* @param andonPLC plc实体
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
public static DdlPackBean packHqlAndonPLCInfo(AndonPLC andonPLC) {
|
|
|
|
|
DdlPackBean result = new DdlPackBean();
|
|
|
|
|
|
|
|
|
|
//查询参数封装
|
|
|
|
|
DdlPreparedPack.getStringEqualPack(andonPLC.getWorkCenterCode(), "workCenterCode", result);
|
|
|
|
|
DdlPreparedPack.getStringEqualPack(andonPLC.getWorkCellCode(), "workCellCode", result);
|
|
|
|
|
DdlPreparedPack.getStringEqualPack(andonPLC.getNodeIP(), "nodeIP", result);
|
|
|
|
|
DdlPreparedPack.getStringEqualPack(andonPLC.getChannelName(), "channelName", result);
|
|
|
|
|
DdlPreparedPack.getStringEqualPack(andonPLC.getTagName(), "tagName", result);
|
|
|
|
|
DdlPreparedPack.getStringEqualPack(andonPLC.getTagAddress(), "tagAddress", result);
|
|
|
|
|
DdlPreparedPack.getStringEqualPack(andonPLC.getTagType(), "tagType", result);
|
|
|
|
|
DdlPreparedPack.getStringEqualPack(andonPLC.getAlarmCode(), "alarmCode", result);
|
|
|
|
|
DdlPreparedPack.getStringEqualPack(andonPLC.getGroupNo(), "groupNo", result);
|
|
|
|
|
|
|
|
|
|
getStringBuilderPack(andonPLC, result);
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 按条件查询工作中心
|
|
|
|
|
* @param mesWorkCenter
|
|
|
|
|
* @return
|
|
|
|
@ -82,6 +111,20 @@ public class AndonHqlPack {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 按条件查询班次
|
|
|
|
|
* @param mesShift
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
public static DdlPackBean packHqlMesShift(MesShift mesShift){
|
|
|
|
|
DdlPackBean result = new DdlPackBean();
|
|
|
|
|
|
|
|
|
|
DdlPreparedPack.getStringEqualPack(mesShift.getWorkCenterCode(), "workCenterCode", result);
|
|
|
|
|
getStringBuilderPack(mesShift, result);
|
|
|
|
|
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 按条件查询ANDON呼叫原因
|
|
|
|
|
* @param andonAlarmCause
|
|
|
|
|
* @return
|
|
|
|
@ -94,4 +137,51 @@ public class AndonHqlPack {
|
|
|
|
|
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 按条件查询ANDON事件处理方法
|
|
|
|
|
* @param andonEventMethod
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
public static DdlPackBean packHqlAndonAlarmEventMethod(AndonEventMethod andonEventMethod){
|
|
|
|
|
DdlPackBean result = new DdlPackBean();
|
|
|
|
|
|
|
|
|
|
DdlPreparedPack.getStringEqualPack(andonEventMethod.getAlarmCode(), "alarmCode", result);
|
|
|
|
|
getStringBuilderPack(andonEventMethod, result);
|
|
|
|
|
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 按条件查询ANDON事件原因
|
|
|
|
|
* @param andonEventCause
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
public static DdlPackBean packHqlAndonEventCause(AndonEventCause andonEventCause){
|
|
|
|
|
DdlPackBean result = new DdlPackBean();
|
|
|
|
|
|
|
|
|
|
DdlPreparedPack.getStringEqualPack(andonEventCause.getAlarmCode(), "alarmCode", result);
|
|
|
|
|
getStringBuilderPack(andonEventCause, result);
|
|
|
|
|
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 按条件查询按灯队列信息
|
|
|
|
|
* @param andonManageQueue
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
public static DdlPackBean packHqlAndonManageQueue(AndonManageQueue andonManageQueue, Object[] obj){
|
|
|
|
|
DdlPackBean result = new DdlPackBean();
|
|
|
|
|
|
|
|
|
|
DdlPreparedPack.getStringEqualPack(andonManageQueue.getWorkCellCode(), "workCellCode", result);
|
|
|
|
|
DdlPreparedPack.getStringEqualPack(andonManageQueue.getWorkCenterCode(), "workCenterCode", result);
|
|
|
|
|
DdlPreparedPack.getStringEqualPack(andonManageQueue.getEquipmentCode(), "equipmentCode", result);
|
|
|
|
|
DdlPreparedPack.getStringEqualPack(andonManageQueue.getAlarmCode(), "alarmCode", result);
|
|
|
|
|
DdlPreparedPack.getInPackArray(obj, "statusCode", result);
|
|
|
|
|
|
|
|
|
|
getStringBuilderPack(andonManageQueue, result);
|
|
|
|
|
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|