yun-zuoyi
wei.peng 6 years ago
commit bf3c1898fc

@ -0,0 +1,42 @@
package cn.estsh.i3plus.pojo.andon.bean;
import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
/**
* @Description :
* @Reference :
* @Author : silliter.yuan
* @CreateDate : 2019-05-10 17:16
* @Modify:
**/
@Data
@Entity
@Table(name="ANDON_ALARM_DETAIL_TYPE")
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Api("安灯子类型")
public class AndonAlarmDetailType extends BaseBean {
@Column(name = "ALARM_DETAIL_CODE")
@ApiParam(value = "安灯类型代码")
private String alarmDetailCode;
@Column(name = "ALARM_DETAIL_NAME")
@ApiParam(value = "安灯类型名称")
private String alarmDetailName;
@Column(name = "ALARM_CODE")
@ApiParam(value = "安灯类型代码")
private String alarmCode;
}

@ -51,4 +51,12 @@ public class AndonAlarmResponseCfg extends BaseBean {
@Column(name = "RP_LEVEL")
@ApiParam(value = "通知级别")
private String rpLevel;
@Column(name = "WORK_CENTER_CODE")
@ApiParam(value = "工作中心代码")
private String workCenterCode;
@Column(name = "WORK_CENTER_NAME_RDD")
@ApiParam(value = "工作中心名称")
private String workCenterNameRdd;
}

@ -22,7 +22,7 @@ import javax.persistence.Table;
**/
@Data
@Entity
@Table(name="ANDON_STOP_LINE_CFG", indexes = {
@Table(name="ANDON_HALT_CFG", indexes = {
@Index(columnList = "WORK_CENTER_CODE", name = "ANDON_INDEX_WORK_CENTER_CODE"),
@Index(columnList = "WORK_CELL_CODE", name = "ANDON_INDEX_WORK_CELL_CODE"),
@Index(columnList = "ORGANIZE_CODE", name = "ANDON_INDEX_ORGANIZE_CODE"),
@ -32,7 +32,7 @@ import javax.persistence.Table;
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Api("安灯队列")
public class AndonStopLineConfig extends BaseBean {
public class AndonHaltCfg extends BaseBean {
@Column(name = "ALARM_CODE")
@ApiParam(value = "安灯类型")

@ -256,6 +256,33 @@ public class AndonManageQueue extends BaseBean {
@ApiParam(value = "发送标志")
private String sendFlag;
/**
* 10=20=
*/
@Column(name = "DISPOSAL_TYPE")
@ApiParam(value = "处理类型")
private String disposalType;
@Column(name = "ALARM_DETAIL_CODE")
@ApiParam(value = "安灯子类型代码")
private String alarmDetailCode;
@Column(name = "EPM_CODE")
@ApiParam(value = "事件现象代码")
private String epmCode;
@Column(name = "EPM_NAME_RDD")
@ApiParam(value = "事件现象描述")
private String epmNameRdd;
@Column(name = "IMPORTANCE_CODE")
@ApiParam(value = "重要等级代码")
private String importanceCode;
@Column(name = "IMPORTANCE_NAME_RDD")
@ApiParam(value = "重要等级名称")
private String importanceNameRdd;
// 是否转呼
public Integer getIsShiftCall() {
return this.isShiftCall == null ? 0 : this.isShiftCall;

@ -225,6 +225,37 @@ public class AndonManageRecord extends BaseBean {
@ApiParam(value = "停机具体原因")
private String haltDesc;
@Column(name = "SEND_FLAG")
@ApiParam(value = "发送标志")
private String sendFlag;
/**
* 10=20=
*/
@Column(name = "DISPOSAL_TYPE")
@ApiParam(value = "处理类型")
private String disposalType;
@Column(name = "ALARM_DETAIL_CODE")
@ApiParam(value = "安灯子类型代码")
private String alarmDetailCode;
@Column(name = "EPM_CODE")
@ApiParam(value = "事件现象代码")
private String epmCode;
@Column(name = "EPM_NAME_RDD")
@ApiParam(value = "事件现象描述")
private String epmNameRdd;
@Column(name = "IMPORTANCE_CODE")
@ApiParam(value = "重要等级代码")
private String importanceCode;
@Column(name = "IMPORTANCE_NAME_RDD")
@ApiParam(value = "重要等级名称")
private String importanceNameRdd;
// 是否转呼
public Integer getIsShiftCall() {
return this.isShiftCall == null ? 0 : this.isShiftCall;

@ -32,18 +32,10 @@ public class AndonPLC extends BaseBean {
@ApiParam(value = "工作中心代码")
private String workCenterCode;
@Column(name = "WORK_CENTER_NAME")
@ApiParam(value = "工作中心名称")
private String workCenterName;
@Column(name = "WORK_CELL_CODE")
@ApiParam(value = "工作单元代码")
private String workCellCode;
@Column(name = "WORK_CELL_NAME")
@ApiParam(value = "工作单元名称")
private String workCellName;
@Column(name = "NODE_CODE")
@ApiParam(value = "控制节点代码")
private String nodeCode;

@ -0,0 +1,16 @@
package cn.estsh.i3plus.pojo.andon.repository;
import cn.estsh.i3plus.pojo.andon.bean.AndonAlarmDetailType;
import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository;
import org.springframework.stereotype.Repository;
/**
* @Description : ANDON_
* @Reference :
* @Author : sililter.yuan
* @CreateDate : 2019-05-30 11:05
* @Modify:
**/
@Repository
public interface IAndonAlarmDetailTypeRepository extends BaseRepository<AndonAlarmDetailType, Long> {
}

@ -1,6 +1,6 @@
package cn.estsh.i3plus.pojo.andon.repository;
import cn.estsh.i3plus.pojo.andon.bean.AndonStopLineConfig;
import cn.estsh.i3plus.pojo.andon.bean.AndonHaltCfg;
import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository;
import org.springframework.stereotype.Repository;
@ -12,5 +12,5 @@ import org.springframework.stereotype.Repository;
* @Modify:
**/
@Repository
public interface IAndonStopLineCfgRepository extends BaseRepository<AndonStopLineConfig, Long> {
public interface IAndonHaltCfgRepository extends BaseRepository<AndonHaltCfg, Long> {
}

@ -3,7 +3,6 @@ package cn.estsh.i3plus.pojo.andon.sqlpack;
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.AndonEnumUtil;
import cn.estsh.i3plus.pojo.base.enumutil.CommonEnumUtil;
import cn.estsh.i3plus.pojo.base.tool.DdlPreparedPack;
import org.apache.commons.lang3.StringUtils;
@ -70,6 +69,7 @@ public class AndonHqlPack {
public static DdlPackBean packHqlMesWorkCenter(MesWorkCenter mesWorkCenter){
DdlPackBean result = new DdlPackBean();
DdlPreparedPack.getStringEqualPack(mesWorkCenter.getWorkCenterCode(), "workCenterCode", result);
getStringBuilderPack(mesWorkCenter, result);
return result;
@ -341,8 +341,9 @@ public class AndonHqlPack {
DdlPreparedPack.getStringEqualPack(responseCfg.getAlarmCode(), "alarmCode", result);
DdlPreparedPack.getStringEqualPack(responseCfg.getAndonStatus(), "andonStatus", result);
DdlPreparedPack.getNumNOEqualPack(String.valueOf(AndonEnumUtil.ALARM_PRIORITY.FIRST.getValue()),
"rpLevel", result);
DdlPreparedPack.getStringEqualPack(responseCfg.getRpLevel(), "rpLevel", result);
DdlPreparedPack.getStringEqualPack(responseCfg.getWorkCenterCode(), "workCenterCode", result);
DdlPreparedPack.getStringEqualPack(responseCfg.getRpObjectCode(), "rpObjectCode", result);
getStringBuilderPack(responseCfg, result);
@ -354,7 +355,7 @@ public class AndonHqlPack {
* @param stopLineConfig
* @return
*/
public static DdlPackBean packAndonStopLineCfg(AndonStopLineConfig stopLineConfig) {
public static DdlPackBean packAndonHaltCfg(AndonHaltCfg stopLineConfig) {
DdlPackBean result = new DdlPackBean();
DdlPreparedPack.getStringEqualPack(stopLineConfig.getAlarmCode(), "alarmCode", result);
@ -365,4 +366,20 @@ public class AndonHqlPack {
return result;
}
/**
*
* @param andonAlarmDetailType
* @return
*/
public static DdlPackBean packAndonAlarmDetailType(AndonAlarmDetailType andonAlarmDetailType) {
DdlPackBean result = new DdlPackBean();
DdlPreparedPack.getStringEqualPack(andonAlarmDetailType.getAlarmCode(), "alarmCode", result);
DdlPreparedPack.getStringEqualPack(andonAlarmDetailType.getAlarmDetailCode(), "alarmDetailCode", result);
getStringBuilderPack(andonAlarmDetailType, result);
return result;
}
}

@ -1,6 +1,7 @@
package cn.estsh.i3plus.pojo.base.enumutil;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.StringUtils;
/**
* @Description :
@ -49,7 +50,7 @@ public class AndonEnumUtil {
/**
*
* =10 =20 =30, 线=40
* =10 =20 =30, 线=40, =50, =60
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum ALARM_BUSI_FLAG{
@ -57,7 +58,9 @@ public class AndonEnumUtil {
ALARM_FLAG("10","安灯呼叫标识"),
USER_CODE("20","用户工号"),
READ_FLAG("30", "安灯读取状态"),
STOP_FLAG("40", "停线状态");
STOP_FLAG("40", "停线状态"),
DETAIL_TYPE("50", "安灯子类型"),
AC_CODE("60", "原因代码");
private String value;
private String description;
@ -214,6 +217,16 @@ public class AndonEnumUtil {
public String getDescription() {
return description;
}
public static String valueOfDescription(String val) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (StringUtils.equalsIgnoreCase(values()[i].value, val)) {
tmp = values()[i].description;
}
}
return tmp;
}
}
/**

@ -681,4 +681,33 @@ public class MesEnumUtil {
return tmp;
}
}
/**
*
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum COMMON_SN {
QUEUE_SN("QUEUE_SN", "队列条码");
private String code;
private String description;
int value;
COMMON_SN(String code, String description) {
this.code = code;
this.description = description;
}
public int getValue() {
return value;
}
public String getCode() {
return code;
}
public String getDescription() {
return description;
}
}
}

@ -1464,7 +1464,7 @@ public class WmsEnumUtil {
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum COMPONENT_TYPE {
PROCESS_HANDLING(10, "流程处理组件,"),
PROCESS_HANDLING(10, "流程处理组件"),
PROCESS_INITIALIZATION(20, "流程初始化组件"),
PROCESS_COMMIT(30, "流程提交组件"),
DETAIL_PROCESS(40, "明细处理组件"),

@ -1415,12 +1415,7 @@ public class BaseRepositoryImpl<T, ID extends Serializable> extends SimpleJpaRep
Query query = entityManager.createQuery(sb.toString());
setParameter(query,paramName,paramValue);
double sumResult = 0.0;
List<?> objList = query.getResultList();
if(objList.size() > 0){
sumResult = Double.parseDouble(objList.iterator().next().toString());
}
return sumResult;
return getNumberByResultList(query.getResultList());
}else{
throw new IllegalArgumentException("sum查询错误!paramName:" + paramName + ",paramValue:" + paramValue);
}
@ -1444,12 +1439,7 @@ public class BaseRepositoryImpl<T, ID extends Serializable> extends SimpleJpaRep
Query query = entityManager.createQuery(sb.toString());
setParameter(query,paramName,paramValue);
double sumResult = 0.0;
List<?> objList = query.getResultList();
if(objList.size() > 0){
sumResult = Double.parseDouble(objList.iterator().next().toString());
}
return sumResult;
return getNumberByResultList(query.getResultList());
}else{
throw new IllegalArgumentException("sum查询错误!paramName:" + paramName + ",paramValue:" + paramValue);
}
@ -1472,12 +1462,7 @@ public class BaseRepositoryImpl<T, ID extends Serializable> extends SimpleJpaRep
Query query = entityManager.createQuery(sb.toString());
setParameter(query,paramName,paramValue);
double sumResult = 0.0;
List<?> objList = query.getResultList();
if(objList.size() > 0){
sumResult = Double.parseDouble(objList.iterator().next().toString());
}
return sumResult;
return getNumberByResultList(query.getResultList());
}else{
throw new IllegalArgumentException("sum查询错误!paramName:" + paramName + ",paramValue:" + paramValue);
}
@ -1501,14 +1486,24 @@ public class BaseRepositoryImpl<T, ID extends Serializable> extends SimpleJpaRep
Query query = entityManager.createQuery(sb.toString());
setParameter(query,paramName,paramValue);
double sumResult = 0.0;
List<?> objList = query.getResultList();
if(objList.size() > 0){
sumResult = Double.parseDouble(objList.iterator().next().toString());
}
return sumResult;
return getNumberByResultList(query.getResultList());
}else{
throw new IllegalArgumentException("sum查询错误!paramName:" + paramName + ",paramValue:" + paramValue);
}
}
//从结果集中获取数字转换
public double getNumberByResultList(List objList){
double num = 0.0;
if(objList != null && objList.size() > 0){
if(objList.get(0) != null){
try {
num = Double.parseDouble(objList.get(0).toString());
}catch(NumberFormatException ne){
LOGGER.error("数字转换出错!",ne);
}
}
}
return num;
}
}

@ -45,7 +45,7 @@ public class BfElementPropertyVirtual extends BaseBean {
private Long dataObjectId;
@Column(name="PROPERTY_CODE")
@ApiParam(value ="类属性名称")
@ApiParam(value ="类属性代码")
private String propertyCode;
@Column(name="PROPERTY_NAME")

@ -32,6 +32,17 @@ public class WmsBsonPack {
bson = BsonPackTool.getStringEqualPack(actionLog.getOrganizeCode(), "organizeCode", bson);
bson = BsonPackTool.getNumEqualPack(actionLog.getIsValid(), "isValid", bson);
bson = BsonPackTool.getNumEqualPack(actionLog.getIsDeleted(), "isDeleted", bson);
if((actionLog.getStartTimeStart() != null&&actionLog.getStartTimeStart() !="")
|| (actionLog.getStartTimeEnd() != null&&actionLog.getStartTimeEnd() != "")){
bson = BsonPackTool.timeBuilder(actionLog.getStartTimeStart(), actionLog.getStartTimeEnd(), "startTime", bson, true);
}
if((actionLog.getEndTimeStart() != null&&actionLog.getEndTimeStart() != "")
|| (actionLog.getEndTimeEnd() != null&&actionLog.getEndTimeEnd() != "")){
bson = BsonPackTool.timeBuilder(actionLog.getEndTimeStart(), actionLog.getEndTimeEnd(), "endTime", bson, true);
}
return bson;
}

@ -170,10 +170,25 @@ public class WmsHqlPack {
/**
* 线
* @param wmsRoutingDetail
* @return
*/
public static DdlPackBean packHqlWmsRoutingDetail(WmsRoutingDetail wmsRoutingDetail) {
DdlPackBean result = new DdlPackBean();
DdlPreparedPack.getStringEqualPack(wmsRoutingDetail.getRoutingCode(), "routingCode", result);
getStringBuilderPack(wmsRoutingDetail, result);
return result;
}
/**
* 线
*
* @param routingCode
* @return
*/
@Deprecated
public static DdlPackBean packHqlWmsRoutingChildren(String routingCode) {
DdlPackBean result = new DdlPackBean();
@ -184,6 +199,19 @@ public class WmsHqlPack {
return result;
}
/**
* 线
* @param wmsRoutingAssign
* @return
*/
public static DdlPackBean packHqlWmsRoutingAssign(WmsRoutingAssign wmsRoutingAssign) {
DdlPackBean result = new DdlPackBean();
DdlPreparedPack.getStringEqualPack(wmsRoutingAssign.getRoutingCode(), "routingCode", result);
getStringBuilderPack(wmsRoutingAssign, result);
return result;
}
/**
* 线
@ -540,6 +568,10 @@ public class WmsHqlPack {
DdlPreparedPack.getStringEqualPack(wmsCheckFactRecord.getPartNo(), "partNo", result);
//供应商编号
DdlPreparedPack.getStringEqualPack(wmsCheckFactRecord.getVendorNo(), "vendorNo", result);
//关联单号
DdlPreparedPack.getStringLikerPack(wmsCheckFactRecord.getRefSrc(), "refSrc", result);
//关联单单据类型
DdlPreparedPack.getStringEqualPack(wmsCheckFactRecord.getRefType(), "refType", result);
getStringBuilderPack(wmsCheckFactRecord, result);

Loading…
Cancel
Save