diff --git a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/MesEnumUtil.java b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/MesEnumUtil.java index 8769a6c..493b4b1 100644 --- a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/MesEnumUtil.java +++ b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/MesEnumUtil.java @@ -15,10 +15,10 @@ public class MesEnumUtil { * 质量状态 */ @JsonFormat(shape = JsonFormat.Shape.OBJECT) - public enum PASS_FAIL{ + public enum PASS_FAIL { - PASS(1,"合格"), - FAIL(2,"不合格"); + PASS(1, "合格"), + FAIL(2, "不合格"); private int value; private String description; @@ -52,10 +52,10 @@ public class MesEnumUtil { * 10. */ @JsonFormat(shape = JsonFormat.Shape.OBJECT) - public enum METHOD_TYPE{ + public enum METHOD_TYPE { - EXEC(10,"执行方法"), - COMPLETE(20,"完成方法"); + EXEC(10, "执行方法"), + COMPLETE(20, "完成方法"); private int value; private String description; @@ -88,12 +88,12 @@ public class MesEnumUtil { * MesPlanOrder实体对应的status值 计划状态 */ @JsonFormat(shape = JsonFormat.Shape.OBJECT) - public enum PLAN_ORDER_STATUS{ + public enum PLAN_ORDER_STATUS { - CREATE(10,"创建"), - DE_COMPOSE_ING(20,"分解中"), - DE_COMPOSE_ED(30,"分解完成"), - CLOSE(40,"关闭"); + CREATE(10, "创建"), + DE_COMPOSE_ING(20, "分解中"), + DE_COMPOSE_ED(30, "分解完成"), + CLOSE(40, "关闭"); private int value; private String description; @@ -126,14 +126,14 @@ public class MesEnumUtil { * MesWorkOrder实体对应的workOrderStatus值 工单状态 */ @JsonFormat(shape = JsonFormat.Shape.OBJECT) - public enum WORK_ORDER_STATUS{ + public enum WORK_ORDER_STATUS { - CREATE(10,"创建"), - LANDED(20,"下达"), - OPEN(30,"开启"), - PAUSE(40,"暂停"), - CANCEL(50,"撤销"), - CLOSE(60,"关闭"); + CREATE(10, "创建"), + LANDED(20, "下达"), + OPEN(30, "开启"), + PAUSE(40, "暂停"), + CANCEL(50, "撤销"), + CLOSE(60, "关闭"); private int value; private String description; @@ -166,11 +166,11 @@ public class MesEnumUtil { * MesWorkOrder实体对应的workOrderType值 工单类型 */ @JsonFormat(shape = JsonFormat.Shape.OBJECT) - public enum WORK_ORDER_TYPE{ + public enum WORK_ORDER_TYPE { - STANDARD_ORDER(10,"标准工单"), - BTS_ORDER(20,"BTS工单"), - ATTEMPT_ORDER(30,"试制工单"); + STANDARD_ORDER(10, "标准工单"), + BTS_ORDER(20, "BTS工单"), + ATTEMPT_ORDER(30, "试制工单"); private int value; private String description; @@ -203,9 +203,9 @@ public class MesEnumUtil { * MesPlanOrder实体对应的planType值 计划类型 */ @JsonFormat(shape = JsonFormat.Shape.OBJECT) - public enum PLAN_ORDER_TYPE{ + public enum PLAN_ORDER_TYPE { - STANDARD_ORDER(10,"标准"); + STANDARD_ORDER(10, "标准"); private int value; private String description; @@ -238,10 +238,10 @@ public class MesEnumUtil { * MesPlanOrder实体对应的source值 计划来源 */ @JsonFormat(shape = JsonFormat.Shape.OBJECT) - public enum PALN_ORDER_SOURCE{ + public enum PALN_ORDER_SOURCE { - MES("MES","来源于MES"), - SAP("SAP","来源于SAP"); + MES("MES", "来源于MES"), + SAP("SAP", "来源于SAP"); private String value; private String description; @@ -262,7 +262,7 @@ public class MesEnumUtil { public static String valueOfDescription(int val) { String tmp = null; for (int i = 0; i < values().length; i++) { - if (values()[i].value.equals(val) ) { + if (values()[i].value.equals(val)) { tmp = values()[i].description; } } @@ -274,11 +274,11 @@ public class MesEnumUtil { * MesPlanOrder实体对应的source值 计划来源 */ @JsonFormat(shape = JsonFormat.Shape.OBJECT) - public enum WORK_ORDER_SOURCE{ + public enum WORK_ORDER_SOURCE { - MES("MES","来源于MES"), - AMES("AMES","来源于AMES"), - SAP("SAP","来源于SAP"); + MES("MES", "来源于MES"), + AMES("AMES", "来源于AMES"), + SAP("SAP", "来源于SAP"); private String value; private String description; @@ -299,7 +299,7 @@ public class MesEnumUtil { public static String valueOfDescription(int val) { String tmp = null; for (int i = 0; i < values().length; i++) { - if (values()[i].value.equals(val) ) { + if (values()[i].value.equals(val)) { tmp = values()[i].description; } } @@ -311,12 +311,13 @@ public class MesEnumUtil { * MesQueueOrder实体对应的status值 队列主表状态 */ @JsonFormat(shape = JsonFormat.Shape.OBJECT) - public enum QUEUE_ORDER_STATUS{ + public enum QUEUE_ORDER_STATUS { - NORMAL(10,"正常"), - ONLINE(20,"已上线"), - OFFLINE(30,"已下线"), - CLOSE(40,"已关闭"),; + NORMAL(10, "正常"), + ONLINE(20, "已上线"), + OFFLINE(30, "已下线"), + CLOSE(40, "已关闭"), + ; private int value; private String description; @@ -337,7 +338,7 @@ public class MesEnumUtil { public static String valueOfDescription(int val) { String tmp = null; for (int i = 0; i < values().length; i++) { - if (values()[i].value == val ) { + if (values()[i].value == val) { tmp = values()[i].description; } } @@ -349,10 +350,10 @@ public class MesEnumUtil { * MesQueueOrderDetail实体对应的status值 队列详情状态 */ @JsonFormat(shape = JsonFormat.Shape.OBJECT) - public enum QUEUE_ORDER_DETAIL_STATUS{ + public enum QUEUE_ORDER_DETAIL_STATUS { - NORMAL(10,"正常"), - CLOSE(20,"关闭"); + NORMAL(10, "正常"), + CLOSE(20, "关闭"); private int value; private String description; @@ -373,7 +374,7 @@ public class MesEnumUtil { public static String valueOfDescription(int val) { String tmp = null; for (int i = 0; i < values().length; i++) { - if (values()[i].value == val ) { + if (values()[i].value == val) { tmp = values()[i].description; } } @@ -385,14 +386,15 @@ public class MesEnumUtil { * MesProduceSn实体对应的snStatus值 条码表条码状态 */ @JsonFormat(shape = JsonFormat.Shape.OBJECT) - public enum PRODUCE_SN_STATUS{ + public enum PRODUCE_SN_STATUS { - CREATE(10,"创建"), - PROCESS(20,"加工"), - OFFLINE(30,"下线"), - INSTOCKED(40,"入库"), - SHIPING(50,"发运"), - CLOSE(90,"关闭"),; + CREATE(10, "创建"), + PROCESS(20, "加工"), + OFFLINE(30, "下线"), + INSTOCKED(40, "入库"), + SHIPING(50, "发运"), + CLOSE(90, "关闭"), + ; private int value; private String description; @@ -413,7 +415,7 @@ public class MesEnumUtil { public static String valueOfDescription(int val) { String tmp = null; for (int i = 0; i < values().length; i++) { - if (values()[i].value == val ) { + if (values()[i].value == val) { tmp = values()[i].description; } } @@ -425,11 +427,11 @@ public class MesEnumUtil { * MesProduceSn实体对应的printStatus值 条码表条码打印状态 */ @JsonFormat(shape = JsonFormat.Shape.OBJECT) - public enum PRODUCE_SN_PRINT_STATUS{ + public enum PRODUCE_SN_PRINT_STATUS { - CREATE(10,"创建"), - ONLINE(20,"上线打印"), - OFFLINE(30,"下线打印"); + CREATE(10, "创建"), + ONLINE(20, "上线打印"), + OFFLINE(30, "下线打印"); private int value; private String description; @@ -450,7 +452,7 @@ public class MesEnumUtil { public static String valueOfDescription(int val) { String tmp = null; for (int i = 0; i < values().length; i++) { - if (values()[i].value == val ) { + if (values()[i].value == val) { tmp = values()[i].description; } } @@ -462,11 +464,11 @@ public class MesEnumUtil { * MesProduceSn实体对应的qcStatus值 条码表条码质量状态 */ @JsonFormat(shape = JsonFormat.Shape.OBJECT) - public enum PRODUCE_SN_QC_STATUS{ + public enum PRODUCE_SN_QC_STATUS { - QUALIFIED(10,"合格"), - DEFECTED(20,"不合格"), - SCRAPED(30,"报废"); + QUALIFIED(10, "合格"), + DEFECTED(20, "不合格"), + SCRAPED(30, "报废"); private int value; private String description; @@ -487,7 +489,7 @@ public class MesEnumUtil { public static String valueOfDescription(int val) { String tmp = null; for (int i = 0; i < values().length; i++) { - if (values()[i].value == val ) { + if (values()[i].value == val) { tmp = values()[i].description; } } @@ -499,11 +501,11 @@ public class MesEnumUtil { * MesPartCategory实体对应的categoryType值 条码表条码质量状态 */ @JsonFormat(shape = JsonFormat.Shape.OBJECT) - public enum PART_CATEGORY_TYPE{ + public enum PART_CATEGORY_TYPE { - CATEGORY_ONE("Category1","类型1"), - CATEGORY_TWO("Category2","类型2"), - CATEGORY_THREE("Category3","类型3"); + CATEGORY_ONE("Category1", "类型1"), + CATEGORY_TWO("Category2", "类型2"), + CATEGORY_THREE("Category3", "类型3"); private String value; private String description; @@ -524,7 +526,7 @@ public class MesEnumUtil { public static String valueOfDescription(String val) { String tmp = null; for (int i = 0; i < values().length; i++) { - if (val.equals(values()[i].value) ) { + if (val.equals(values()[i].value)) { tmp = values()[i].description; } } @@ -536,12 +538,12 @@ public class MesEnumUtil { * 工位程序交互时的业务类型 */ @JsonFormat(shape = JsonFormat.Shape.OBJECT) - public enum STATION_BUSI_TYPE{ - MESSAGE("message","返回信息"), - STEP_LIST("stepList","工步列表"), - STEP_CONTENT("stepContent","工步内容"), - MODULE_CONTENT("moduleContent","组件内容"), - TASK_COMPLETE("taskComplete","整个扫描完成"); + public enum STATION_BUSI_TYPE { + MESSAGE("message", "返回信息"), + STEP_LIST("stepList", "工步列表"), + STEP_CONTENT("stepContent", "工步内容"), + MODULE_CONTENT("moduleContent", "组件内容"), + TASK_COMPLETE("taskComplete", "整个扫描完成"); private String value; private String description; @@ -562,7 +564,7 @@ public class MesEnumUtil { public static String valueOfDescription(String val) { String tmp = null; for (int i = 0; i < values().length; i++) { - if (val.equals(values()[i].value) ) { + if (val.equals(values()[i].value)) { tmp = values()[i].description; } } @@ -574,12 +576,12 @@ public class MesEnumUtil { * 工位程序交互时的数据类型 */ @JsonFormat(shape = JsonFormat.Shape.OBJECT) - public enum STATION_DATA_TYPE{ - TABLE("table","表格"), - TEXT("text","正常文本"), - EXP_TEXT("exp_text","异常文本"), - IMAGE("image","图片"), - BUTTON("button","按钮"); + public enum STATION_DATA_TYPE { + TABLE("table", "表格"), + TEXT("text", "正常文本"), + EXP_TEXT("exp_text", "异常文本"), + IMAGE("image", "图片"), + BUTTON("button", "按钮"); private String value; private String description; @@ -600,7 +602,7 @@ public class MesEnumUtil { public static String valueOfDescription(String val) { String tmp = null; for (int i = 0; i < values().length; i++) { - if (val.equals(values()[i].value) ) { + if (val.equals(values()[i].value)) { tmp = values()[i].description; } } @@ -612,12 +614,12 @@ public class MesEnumUtil { * 组织模型树形菜单level */ @JsonFormat(shape = JsonFormat.Shape.OBJECT) - public enum PROD_ORG_LEVEL{ + public enum PROD_ORG_LEVEL { - LEVEL_ONE(1,"一级目录"), - LEVEL_TWO(2,"二级目录"), - LEVEL_THREE(3,"三级目录"), - LEVEL_FOUR(4,"四级目录"); + LEVEL_ONE(1, "一级目录"), + LEVEL_TWO(2, "二级目录"), + LEVEL_THREE(3, "三级目录"), + LEVEL_FOUR(4, "四级目录"); private int value; private String description; @@ -638,22 +640,23 @@ public class MesEnumUtil { public static String valueOfDescription(int val) { String tmp = null; for (int i = 0; i < values().length; i++) { - if (values()[i].value == val ) { + if (values()[i].value == val) { tmp = values()[i].description; } } return tmp; } } + /** * 工步参数类型 */ @JsonFormat(shape = JsonFormat.Shape.OBJECT) - public enum STEP_PARAM_TYPE{ + public enum STEP_PARAM_TYPE { - QUALIFIED(10,"数字"), - DEFECTED(20,"字符串"), - SCRAPED(30,"可选值"); + QUALIFIED(10, "数字"), + DEFECTED(20, "字符串"), + SCRAPED(30, "可选值"); private int value; private String description; @@ -674,7 +677,7 @@ public class MesEnumUtil { public static String valueOfDescription(int val) { String tmp = null; for (int i = 0; i < values().length; i++) { - if (values()[i].value == val ) { + if (values()[i].value == val) { tmp = values()[i].description; } } @@ -710,4 +713,80 @@ public class MesEnumUtil { return description; } } + + /** + * 动作类型枚举 + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum ACTION_TYPE { + + SEATS(10, "座椅"), + METAL(20, "金属件"), + FOAMING(30, "发泡"); + + private int value; + private String description; + + ACTION_TYPE(int value, String description) { + this.value = value; + this.description = description; + } + + public int getValue() { + return value; + } + + public String getDescription() { + return description; + } + + public static String valueOfDescription(int val) { + String tmp = null; + for (int i = 0; i < values().length; i++) { + if (values()[i].value == val) { + tmp = values()[i].description; + } + } + return tmp; + } + } + + /** + * 事件类型枚举 + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum EVENT_TYPE { + + SEATS(10, "座椅"), + METAL(20, "金属件"), + FOAMING(30, "发泡"); + + private int value; + private String description; + + EVENT_TYPE(int value, String description) { + this.value = value; + this.description = description; + } + + public int getValue() { + return value; + } + + public String getDescription() { + return description; + } + + public static String valueOfDescription(int val) { + String tmp = null; + for (int i = 0; i < values().length; i++) { + if (values()[i].value == val) { + tmp = values()[i].description; + } + } + return tmp; + } + } + + } diff --git a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/SoftSwitchEnumUtil.java b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/SoftSwitchEnumUtil.java index d0bc317..8d05091 100644 --- a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/SoftSwitchEnumUtil.java +++ b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/SoftSwitchEnumUtil.java @@ -1,5 +1,7 @@ package cn.estsh.i3plus.pojo.base.enumutil; +import com.fasterxml.jackson.annotation.JsonFormat; + /** * @Description : 软适配 枚举接口 * @Reference : @@ -8,4 +10,76 @@ package cn.estsh.i3plus.pojo.base.enumutil; * @Modify: **/ public class SoftSwitchEnumUtil { + + /** + * 套件类型 + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum CASE_TYPE{ + SOCKET(1,"SOCKET"), + RESTFUL(2,"RESTFUL"), + DATASOURCE(3,"数据源"); + + private int value; + private String description; + + CASE_TYPE(int value, String description) { + this.value = value; + this.description = description; + } + + public int getValue() { + return value; + } + + public String getDescription() { + return description; + } + + public static String valueOfDescription(int val) { + String tmp = null; + for (int i = 0; i < values().length; i++) { + if (values()[i].value == val) { + tmp = values()[i].description; + } + } + return tmp; + } + } + + /** + * 请求来源 + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum REQUEST_SOURCE{ + ACTIVE(1,"主动请求"), + SCHEDULE(2,"定时调度"); + + private int value; + private String description; + + REQUEST_SOURCE(int value, String description) { + this.value = value; + this.description = description; + } + + public int getValue() { + return value; + } + + public String getDescription() { + return description; + } + + public static String valueOfDescription(int val) { + String tmp = null; + for (int i = 0; i < values().length; i++) { + if (values()[i].value == val) { + tmp = values()[i].description; + } + } + return tmp; + } + } + } diff --git a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/tool/DdlPreparedPack.java b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/tool/DdlPreparedPack.java index fca7f7d..3d0a639 100644 --- a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/tool/DdlPreparedPack.java +++ b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/tool/DdlPreparedPack.java @@ -271,7 +271,7 @@ public class DdlPreparedPack { } /** - * 封装long或者int的整数对象成equal语句 + * 封装long或者int的正整数对象成equal语句 * * @param columnName 列名 * @param packBean @@ -283,6 +283,18 @@ public class DdlPreparedPack { } /** + * 封装long或者int的负整数对象成equal语句 + * + * @param columnName 列名 + * @param packBean + */ + public static void getNegativeNumEqualPack(Object data, String columnName, DdlPackBean packBean) { + if (data != null) { + packBean.addColumnQuery(columnName," and model." + columnName + " = :m_" + columnName, data); + } + } + + /** * 封装long或者int的整数对象成equal语句 * * @param columnName 列名 diff --git a/modules/i3plus-pojo-form/src/main/java/cn/estsh/i3plus/pojo/form/sqlpack/FormHqlPack.java b/modules/i3plus-pojo-form/src/main/java/cn/estsh/i3plus/pojo/form/sqlpack/FormHqlPack.java index 0e00662..dea5ebf 100644 --- a/modules/i3plus-pojo-form/src/main/java/cn/estsh/i3plus/pojo/form/sqlpack/FormHqlPack.java +++ b/modules/i3plus-pojo-form/src/main/java/cn/estsh/i3plus/pojo/form/sqlpack/FormHqlPack.java @@ -329,4 +329,25 @@ public final class FormHqlPack { return ddlPackBean; } + + + /** + * 菜单树顺序 + * @param bfMenu 菜单目录 + * @return hql + */ + public static DdlPackBean packHqlBfMenuTree(BfMenu bfMenu) { + DdlPackBean result = new DdlPackBean(); + + DdlPreparedPack.getNegativeNumEqualPack(bfMenu.getId(), "parentId", result); + DdlPreparedPack.getNumEqualPack( + CommonEnumUtil.TRUE_OR_FALSE.FALSE.getValue(), "isDeleted", result); + + // 按顺序字段进行排序 + bfMenu.setOrderByParam("menuSort"); + bfMenu.setAscOrDesc(CommonEnumUtil.ASC_OR_DESC.DESC.getValue()); + result.setOrderByStr(bfMenu.orderBy()); + + return result; + } } diff --git a/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/bean/MesStepParam.java b/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/bean/MesStepParam.java index fe7a3f8..fbda6ca 100644 --- a/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/bean/MesStepParam.java +++ b/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/bean/MesStepParam.java @@ -42,7 +42,7 @@ public class MesStepParam extends BaseBean { @Column(name = "PARAM_NAME") @ApiParam("参数名称") private String paramName; - + //text select @Column(name = "PARAM_ATTRIBUTE") @ApiParam("参数属性") private String paramAttribute; diff --git a/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/repository/MesActionRepository.java b/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/repository/MesActionRepository.java index 52fb22c..7de103b 100644 --- a/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/repository/MesActionRepository.java +++ b/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/repository/MesActionRepository.java @@ -16,7 +16,4 @@ import java.util.List; @Repository public interface MesActionRepository extends BaseRepository { - List findByOrganizeCodeAndIsDeleted(String organizeCode,Integer isDeleted); - - List findByActionCodeAndIsValidAndIsDeleted(String actionCode,Integer isValid,Integer isDeleted); } diff --git a/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/repository/MesEventRepository.java b/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/repository/MesEventRepository.java index 83b3c4b..8fe8fc6 100644 --- a/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/repository/MesEventRepository.java +++ b/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/repository/MesEventRepository.java @@ -16,10 +16,4 @@ import java.util.List; @Repository public interface MesEventRepository extends BaseRepository { - List findByOrganizeCodeAndIsDeleted(String organizeCode,Integer isDeleted); - - List findByButtonCodeAndIsValidAndIsDeleted(String buttonCode,Integer isValid,Integer isDeleted); - - List findByEventCodeAndIsValidAndIsDeleted(String eventCode,Integer isValid,Integer isDeleted); - } diff --git a/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/sqlpack/MesHqlPack.java b/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/sqlpack/MesHqlPack.java index eb4687f..eb0f365 100644 --- a/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/sqlpack/MesHqlPack.java +++ b/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/sqlpack/MesHqlPack.java @@ -474,6 +474,26 @@ public class MesHqlPack { return packBean; } + public static DdlPackBean getMesEventByButtonCode(String buttonCode,String org){ + DdlPackBean packBean=getAllBaseData(org); + DdlPreparedPack.getStringEqualPack(buttonCode,"buttonCode",packBean); + DdlPreparedPack.getStringEqualPack(CommonEnumUtil.IS_VAILD.VAILD.getValue()+"","isValid",packBean); + return packBean; + } + public static DdlPackBean getMesEventByEventCode(String eventCode,String org){ + DdlPackBean packBean=getAllBaseData(org); + DdlPreparedPack.getStringEqualPack(eventCode,"eventCode",packBean); + DdlPreparedPack.getStringEqualPack(CommonEnumUtil.IS_VAILD.VAILD.getValue()+"","isValid",packBean); + return packBean; + } + public static DdlPackBean getMesActionByActionCode(MesAction mesAction,String organizeCode){ + DdlPackBean packBean=getAllBaseDataByNormalPro(mesAction,organizeCode); + DdlPreparedPack.getStringEqualPack(mesAction.getActionCode(),"actionCode",packBean); + return packBean; + } + + + /** * 动作分页获取封装 * @@ -521,6 +541,13 @@ public class MesHqlPack { return packBean; } + public static DdlPackBean getMesMethodByMethodCode(MesMethod mesMethod, String organizeCode) { + DdlPackBean packBean = getAllBaseDataByNormalPro(mesMethod, organizeCode); + if (StringUtils.isNotEmpty(mesMethod.getMethodCode())) { + DdlPreparedPack.getStringEqualPack(mesMethod.getMethodCode(), "methodCode", packBean); + } + return packBean; + } /** * 事件动作分页获取封装 * diff --git a/modules/i3plus-pojo-model/src/main/java/cn/estsh/i3plus/pojo/model/softswitch/SuitCoreModel.java b/modules/i3plus-pojo-model/src/main/java/cn/estsh/i3plus/pojo/model/softswitch/SuitCoreModel.java index 38f205f..71ec94e 100644 --- a/modules/i3plus-pojo-model/src/main/java/cn/estsh/i3plus/pojo/model/softswitch/SuitCoreModel.java +++ b/modules/i3plus-pojo-model/src/main/java/cn/estsh/i3plus/pojo/model/softswitch/SuitCoreModel.java @@ -1,10 +1,17 @@ package cn.estsh.i3plus.pojo.model.softswitch; import cn.estsh.i3plus.pojo.base.annotation.XStreamCDATA; +import cn.estsh.i3plus.pojo.base.enumutil.CommonEnumUtil; +import cn.estsh.i3plus.pojo.base.enumutil.ResourceEnumUtil; +import cn.estsh.i3plus.pojo.softswitch.bean.BsSslKey; +import cn.estsh.i3plus.pojo.softswitch.bean.BsSuitCase; import com.thoughtworks.xstream.annotations.XStreamAlias; import com.thoughtworks.xstream.annotations.XStreamAsAttribute; +import com.thoughtworks.xstream.annotations.XStreamOmitField; import lombok.Data; +import javax.persistence.Transient; + /** * @Description : * @Reference : @@ -16,27 +23,88 @@ import lombok.Data; @XStreamAlias("model") public class SuitCoreModel { + /** + * 适配套件代码 + */ @XStreamAsAttribute - private Long id; + private String suitCaseCode;// adapterId + + /** + * 套件类型 + */ @XStreamAsAttribute private Integer caseType; + + /** + * 适配结果信息 + */ + private String suitMessage; + + /** + * 请求来源 + */ + private Integer requestSource; + private String suitCaseStatusCode; - private String suitCaseMessage; - private String key; - private PojoAuth auth; - private Request request; + /** + * 安全证书 + */ + private BsSslKey sslKey; + + /** + * 认证令牌 + */ + private String token; + /** + * 适配器套件 + */ + @XStreamOmitField + private BsSuitCase bsSuitCase; + + /** + * 认证结果 + */ + private Integer suitSslKeyResult; + + /** + * 认证信息 + */ + private String suitSslKeyResultMessage; + + /** + * 适配结果 + */ + private Integer suitResult; + + /** + * 适配报文 + */ @XStreamCDATA - private String responseResult; - - public SuitCoreModel(Long id, Integer caseType, String suitCaseStatusCode, String key, PojoAuth auth, Request request) { - this.id = id; - this.caseType = caseType; - this.suitCaseStatusCode = suitCaseStatusCode; - this.key = key; - this.auth = auth; - this.request = request; + private String suitResultMessage; + + /** + * + * @param requestSource 请求来源 + * @param sslKey 安全证书对象 + * @param bsSuitCase 适配器信息 + */ + public SuitCoreModel(Integer requestSource,BsSslKey sslKey, BsSuitCase bsSuitCase) { + this.sslKey = sslKey; + this.bsSuitCase = bsSuitCase; + this.requestSource = requestSource; + + // 设置套件类型 + this.caseType = bsSuitCase.getCaseTypeId(); + // 设置套件代码 + this.suitCaseCode = bsSuitCase.getSuitCaseCode(); + // 设置默认 + this.suitCaseStatusCode = ResourceEnumUtil.MESSAGE.FAIL.getCode(); + // 设置默认 + this.suitSslKeyResult = CommonEnumUtil.TRUE_OR_FALSE.TRUE.getValue(); + // 设置默认 + this.suitResult = CommonEnumUtil.TRUE_OR_FALSE.TRUE.getValue(); } } diff --git a/modules/i3plus-pojo-softswitch/src/main/java/cn/estsh/i3plus/pojo/softswitch/bean/BsDataSource.java b/modules/i3plus-pojo-softswitch/src/main/java/cn/estsh/i3plus/pojo/softswitch/bean/BsDataSource.java index 58bb4ae..ac58030 100644 --- a/modules/i3plus-pojo-softswitch/src/main/java/cn/estsh/i3plus/pojo/softswitch/bean/BsDataSource.java +++ b/modules/i3plus-pojo-softswitch/src/main/java/cn/estsh/i3plus/pojo/softswitch/bean/BsDataSource.java @@ -41,7 +41,7 @@ public class BsDataSource extends BaseBean { @Column(name = "DATA_SOURCE_TYPE_ID") @ApiParam(value = "数据源类型id") - private int dataSourceTypeId; + private Integer dataSourceTypeId; @Column(name = "DATA_SOURCE_HOST") @ApiParam(value = "数据源主机") @@ -49,7 +49,7 @@ public class BsDataSource extends BaseBean { @Column(name = "DATA_SOURCE_PORT") @ApiParam(value = "数据源端口") - private int dataSourcePort; + private Integer dataSourcePort; @Column(name = "DATA_SOURCE_USER") @ApiParam(value = "用户名") diff --git a/modules/i3plus-pojo-softswitch/src/main/java/cn/estsh/i3plus/pojo/softswitch/bean/BsDataSourceSuitCase.java b/modules/i3plus-pojo-softswitch/src/main/java/cn/estsh/i3plus/pojo/softswitch/bean/BsDataSourceSuitCase.java index 75ed494..738d19a 100644 --- a/modules/i3plus-pojo-softswitch/src/main/java/cn/estsh/i3plus/pojo/softswitch/bean/BsDataSourceSuitCase.java +++ b/modules/i3plus-pojo-softswitch/src/main/java/cn/estsh/i3plus/pojo/softswitch/bean/BsDataSourceSuitCase.java @@ -1,6 +1,8 @@ package cn.estsh.i3plus.pojo.softswitch.bean; import cn.estsh.i3plus.pojo.base.bean.BaseBean; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; import io.swagger.annotations.Api; import io.swagger.annotations.ApiParam; import lombok.Data; @@ -29,11 +31,12 @@ public class BsDataSourceSuitCase extends BaseBean { @Column(name = "SUIT_CASE_ID") @ApiParam(value = "套件id") - private long suitCaseId; + @JsonSerialize(using = ToStringSerializer.class) + private Long suitCaseId; @Column(name = "DATA_SOURCE_MODE_ID") @ApiParam(value = "数据源套件模式(枚举,被动读,主动写)") - private int dataSourceModeId; + private Integer dataSourceModeId; @Column(name = "DATA_SOURCE_CODE") @ApiParam(value = "数据源编码") diff --git a/modules/i3plus-pojo-softswitch/src/main/java/cn/estsh/i3plus/pojo/softswitch/bean/BsDataSourceSuitCaseTable.java b/modules/i3plus-pojo-softswitch/src/main/java/cn/estsh/i3plus/pojo/softswitch/bean/BsDataSourceSuitCaseTable.java index fac9121..d7876d2 100644 --- a/modules/i3plus-pojo-softswitch/src/main/java/cn/estsh/i3plus/pojo/softswitch/bean/BsDataSourceSuitCaseTable.java +++ b/modules/i3plus-pojo-softswitch/src/main/java/cn/estsh/i3plus/pojo/softswitch/bean/BsDataSourceSuitCaseTable.java @@ -1,6 +1,8 @@ package cn.estsh.i3plus.pojo.softswitch.bean; import cn.estsh.i3plus.pojo.base.bean.BaseBean; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; import io.swagger.annotations.Api; import io.swagger.annotations.ApiParam; import lombok.Data; @@ -29,7 +31,8 @@ public class BsDataSourceSuitCaseTable extends BaseBean { @Column(name = "SUIT_CASE_ID") @ApiParam(value = "套件id") - private long suitCaseId; + @JsonSerialize(using = ToStringSerializer.class) + private Long suitCaseId; @Column(name = "TABLE_NAME") @ApiParam(value = "数据库表名") diff --git a/modules/i3plus-pojo-softswitch/src/main/java/cn/estsh/i3plus/pojo/softswitch/bean/BsMessageQueue.java b/modules/i3plus-pojo-softswitch/src/main/java/cn/estsh/i3plus/pojo/softswitch/bean/BsMessageQueue.java index 88c70d5..5dbad2d 100644 --- a/modules/i3plus-pojo-softswitch/src/main/java/cn/estsh/i3plus/pojo/softswitch/bean/BsMessageQueue.java +++ b/modules/i3plus-pojo-softswitch/src/main/java/cn/estsh/i3plus/pojo/softswitch/bean/BsMessageQueue.java @@ -1,6 +1,8 @@ package cn.estsh.i3plus.pojo.softswitch.bean; import cn.estsh.i3plus.pojo.base.bean.BaseBean; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; import io.swagger.annotations.Api; import io.swagger.annotations.ApiParam; import lombok.Data; @@ -33,7 +35,7 @@ public class BsMessageQueue extends BaseBean { @Column(name = "MESSAGE_QUEUE_TYPE") @ApiParam(value = "消息队列类型") - private int messageQueueType; + private Integer messageQueueType; @Column(name = "MESSAGE_QUEUE_HOST") @ApiParam(value = "消息队列主机") @@ -41,11 +43,7 @@ public class BsMessageQueue extends BaseBean { @Column(name = "MESSAGE_QUEUE_PORT") @ApiParam(value = "消息队列端口") - private int messageQueuePort; - - @Column(name = "CERTIFICATE_ID") - @ApiParam(value = "证书id") - private long certificateId; + private Integer messageQueuePort; } diff --git a/modules/i3plus-pojo-softswitch/src/main/java/cn/estsh/i3plus/pojo/softswitch/bean/BsParamAdapter.java b/modules/i3plus-pojo-softswitch/src/main/java/cn/estsh/i3plus/pojo/softswitch/bean/BsParamAdapter.java index 8885ba1..dc12e39 100644 --- a/modules/i3plus-pojo-softswitch/src/main/java/cn/estsh/i3plus/pojo/softswitch/bean/BsParamAdapter.java +++ b/modules/i3plus-pojo-softswitch/src/main/java/cn/estsh/i3plus/pojo/softswitch/bean/BsParamAdapter.java @@ -1,6 +1,8 @@ package cn.estsh.i3plus.pojo.softswitch.bean; import cn.estsh.i3plus.pojo.base.bean.BaseBean; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; import io.swagger.annotations.Api; import io.swagger.annotations.ApiParam; import lombok.Data; @@ -29,7 +31,8 @@ public class BsParamAdapter extends BaseBean { @Column(name = "SUIT_CASE_ID") @ApiParam(value = "适配套件id") - private long suitCaseId; + @JsonSerialize(using = ToStringSerializer.class) + private Long suitCaseId; @Column(name = "SUIT_CASE_NAME") @ApiParam(value = "适配套件名称") @@ -41,11 +44,12 @@ public class BsParamAdapter extends BaseBean { @Column(name = "SUIT_PARAM_TYPE_ID") @ApiParam(value = "参数类型枚举") - private int suitParamTypeId; + private Integer suitParamTypeId; @Column(name = "SUIT_PARAM_ID") @ApiParam(value = "原参数id") - private long suitParamId; + @JsonSerialize(using = ToStringSerializer.class) + private Long suitParamId; @Column(name = "SUIT_PARAM_NAME_RDD") @ApiParam(value = "参数名称") @@ -53,7 +57,7 @@ public class BsParamAdapter extends BaseBean { @Column(name = "SUIT_PARAM_VAL_TYPE_ID") @ApiParam(value = "原参数值类型") - private int suitParamValTypeId; + private Integer suitParamValTypeId; @Column(name = "TRANSFER_PARAM_NAME") @ApiParam(value = "转换参数名称") @@ -61,7 +65,7 @@ public class BsParamAdapter extends BaseBean { @Column(name = "TRANSFER_PARAM_VAL_TYPE_ID") @ApiParam(value = "转换参数类型") - private int transferParamValTypeId; + private Integer transferParamValTypeId; } diff --git a/modules/i3plus-pojo-softswitch/src/main/java/cn/estsh/i3plus/pojo/softswitch/bean/BsSocketSuitCase.java b/modules/i3plus-pojo-softswitch/src/main/java/cn/estsh/i3plus/pojo/softswitch/bean/BsSocketSuitCase.java index f7e0858..417a872 100644 --- a/modules/i3plus-pojo-softswitch/src/main/java/cn/estsh/i3plus/pojo/softswitch/bean/BsSocketSuitCase.java +++ b/modules/i3plus-pojo-softswitch/src/main/java/cn/estsh/i3plus/pojo/softswitch/bean/BsSocketSuitCase.java @@ -29,11 +29,11 @@ public class BsSocketSuitCase extends BaseBean { @Column(name = "SOCKET_TYPE_ID") @ApiParam(value = "socket类型(枚举)") - private int socketTypeId; + private Integer socketTypeId; @Column(name = "SOCKET_MODE_ID") @ApiParam(value = "socket模式(枚举,服务端,客户端)") - private int socketModeId; + private Integer socketModeId; } diff --git a/modules/i3plus-pojo-softswitch/src/main/java/cn/estsh/i3plus/pojo/softswitch/bean/BsSslKey.java b/modules/i3plus-pojo-softswitch/src/main/java/cn/estsh/i3plus/pojo/softswitch/bean/BsSslKey.java index 9a1f66f..232477e 100644 --- a/modules/i3plus-pojo-softswitch/src/main/java/cn/estsh/i3plus/pojo/softswitch/bean/BsSslKey.java +++ b/modules/i3plus-pojo-softswitch/src/main/java/cn/estsh/i3plus/pojo/softswitch/bean/BsSslKey.java @@ -1,6 +1,9 @@ package cn.estsh.i3plus.pojo.softswitch.bean; import cn.estsh.i3plus.pojo.base.bean.BaseBean; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; +import com.thoughtworks.xstream.annotations.XStreamAlias; import io.swagger.annotations.Api; import io.swagger.annotations.ApiParam; import lombok.Data; @@ -10,6 +13,8 @@ import org.hibernate.annotations.DynamicUpdate; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.Table; +import javax.persistence.Transient; +import java.util.List; /** * @Description : 安全证书 @@ -29,7 +34,7 @@ public class BsSslKey extends BaseBean { @Column(name = "VERIFICATION_METHOD_ID") @ApiParam(value = "认证方式(枚举)") - private int verificationMethodId; + private Integer verificationMethodId; @Column(name = "VERIFICATION_URL") @ApiParam(value = "认证url") @@ -37,7 +42,7 @@ public class BsSslKey extends BaseBean { @Column(name = "KEY_TYPE") @ApiParam(value = "证书类型枚举") - private int keyType; + private Integer keyType; @Column(name = "KEY_NAME") @ApiParam(value = "证书名称") @@ -45,7 +50,8 @@ public class BsSslKey extends BaseBean { @Column(name = "KEY_FILE_ID") @ApiParam(value = "证书文件id") - private long keyFileId; + @JsonSerialize(using = ToStringSerializer.class) + private Long keyFileId; @Column(name = "KEY_FILE_PATH") @ApiParam(value = "证书文件路径") @@ -63,5 +69,9 @@ public class BsSslKey extends BaseBean { @ApiParam(value = "证书描述") private String keyDescription; + @Transient + @ApiParam(value = "证书参数集合") + private List bsSslKeyParamList; + } diff --git a/modules/i3plus-pojo-softswitch/src/main/java/cn/estsh/i3plus/pojo/softswitch/bean/BsSslKeyParam.java b/modules/i3plus-pojo-softswitch/src/main/java/cn/estsh/i3plus/pojo/softswitch/bean/BsSslKeyParam.java new file mode 100644 index 0000000..287cfb3 --- /dev/null +++ b/modules/i3plus-pojo-softswitch/src/main/java/cn/estsh/i3plus/pojo/softswitch/bean/BsSslKeyParam.java @@ -0,0 +1,48 @@ +package cn.estsh.i3plus.pojo.softswitch.bean; + +import cn.estsh.i3plus.pojo.base.bean.BaseBean; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; +import com.thoughtworks.xstream.annotations.XStreamAlias; +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 : yunhao + * @CreateDate : 2019-08-13 9:21 + * @Modify: + */ +@Data +@Entity +@DynamicInsert +@DynamicUpdate +@EqualsAndHashCode(callSuper = true) +@Table(name = "BS_SSL_KEY_PARAM") +@Api(value = "安全证书参数", description = "安全证书参数") +@XStreamAlias("BsSslKeyParam") +public class BsSslKeyParam extends BaseBean { + + @Column(name = "SSL_KEY_ID") + @ApiParam(value = "证书id") + @JsonSerialize(using = ToStringSerializer.class) + private Long sslKeyId; + + @Column(name = "PARAM_NAME") + @ApiParam(value = "参数名称") + private String paramName; + + @Column(name = "PARAM_VALUE") + @ApiParam(value = "参数值") + private String paramValue; + +} diff --git a/modules/i3plus-pojo-softswitch/src/main/java/cn/estsh/i3plus/pojo/softswitch/bean/BsSuitCase.java b/modules/i3plus-pojo-softswitch/src/main/java/cn/estsh/i3plus/pojo/softswitch/bean/BsSuitCase.java index 875adb3..8a88131 100644 --- a/modules/i3plus-pojo-softswitch/src/main/java/cn/estsh/i3plus/pojo/softswitch/bean/BsSuitCase.java +++ b/modules/i3plus-pojo-softswitch/src/main/java/cn/estsh/i3plus/pojo/softswitch/bean/BsSuitCase.java @@ -1,6 +1,8 @@ package cn.estsh.i3plus.pojo.softswitch.bean; import cn.estsh.i3plus.pojo.base.bean.BaseBean; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; import io.swagger.annotations.Api; import io.swagger.annotations.ApiParam; import lombok.Data; @@ -10,6 +12,8 @@ import org.hibernate.annotations.DynamicUpdate; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.Table; +import javax.persistence.Transient; +import java.util.List; /** * @Description : 适配套件 @@ -27,17 +31,23 @@ import javax.persistence.Table; @Api(value = "适配套件", description = "适配套件") public class BsSuitCase extends BaseBean { + @Column(name = "SUIT_CASE_NAME") + @ApiParam(value = "套件名称") + private String suitCaseName; + @Column(name = "CASE_TYPE_ID") @ApiParam(value = "套件类型id(枚举)") - private int caseTypeId; + private Integer caseTypeId; @Column(name = "CASE_DETAIL_ID") @ApiParam(value = "适配器明细id") - private long caseDetailId; + @JsonSerialize(using = ToStringSerializer.class) + private Long caseDetailId; @Column(name = "SUIT_TYPE_ID") @ApiParam(value = "适配类型id") - private long suitTypeId; + @JsonSerialize(using = ToStringSerializer.class) + private Long suitTypeId; @Column(name = "SUIT_TYPE_NAME") @ApiParam(value = "适配类型名称") @@ -53,35 +63,43 @@ public class BsSuitCase extends BaseBean { @Column(name = "SUIT_CASE_PORT") @ApiParam(value = "适配端口") - private int suitCasePort; + private Integer suitCasePort; + + @Column(name = "SUIT_CASE_URL") + @ApiParam(value = "适配URL") + private String suitCaseURL; @Column(name = "IS_NEED_CERTIFICATION") @ApiParam(value = "是否需要认证") - private int isNeedCertification; + private Integer isNeedCertification; - @Column(name = "CERTIFICATE_ID") + @Column(name = "SSL_KEY_ID") @ApiParam(value = "证书id") - private long certificateId; + @JsonSerialize(using = ToStringSerializer.class) + private Long sslKeyId; @Column(name = "TIMING_SUIT_NUM") @ApiParam(value = "定时适配次数") - private int timingSuitNum; + private Integer timingSuitNum; @Column(name = "INITIATIVE_SUIT_NUM") @ApiParam(value = "主动适配测试") - private int initiativeSuitNum; + private Integer initiativeSuitNum; @Column(name = "SUCCESS_NUM") @ApiParam(value = "成功次数") - private int successNum; + private Integer successNum; @Column(name = "FAIL_NUM") @ApiParam(value = "失败次数") - private int failNum; + private Integer failNum; @Column(name = "SUIT_CASE_DESCRIPTION") @ApiParam(value = "适配类型描述") private String suitCaseDescription; + @Transient + @ApiParam(value = "适配器参数") + List bsSuitCaseParamList; } diff --git a/modules/i3plus-pojo-softswitch/src/main/java/cn/estsh/i3plus/pojo/softswitch/bean/BsSuitCaseParam.java b/modules/i3plus-pojo-softswitch/src/main/java/cn/estsh/i3plus/pojo/softswitch/bean/BsSuitCaseParam.java index 310bdc5..3c08750 100644 --- a/modules/i3plus-pojo-softswitch/src/main/java/cn/estsh/i3plus/pojo/softswitch/bean/BsSuitCaseParam.java +++ b/modules/i3plus-pojo-softswitch/src/main/java/cn/estsh/i3plus/pojo/softswitch/bean/BsSuitCaseParam.java @@ -1,6 +1,8 @@ package cn.estsh.i3plus.pojo.softswitch.bean; import cn.estsh.i3plus.pojo.base.bean.BaseBean; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; import io.swagger.annotations.Api; import io.swagger.annotations.ApiParam; import lombok.Data; @@ -10,6 +12,7 @@ import org.hibernate.annotations.DynamicUpdate; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.Table; +import javax.persistence.Transient; /** * @Description : 适配器出入参 @@ -29,7 +32,8 @@ public class BsSuitCaseParam extends BaseBean { @Column(name = "SUIT_CASE_ID") @ApiParam(value = "套件id") - private long suitCaseId; + @JsonSerialize(using = ToStringSerializer.class) + private Long suitCaseId; @Column(name = "SUIT_CASE_CODE_RDD") @ApiParam(value = "套件代码") @@ -37,7 +41,7 @@ public class BsSuitCaseParam extends BaseBean { @Column(name = "PARAM_TYPE_ID") @ApiParam(value = "参数类型,枚举(出,入)") - private int paramTypeId; + private Integer paramTypeId; @Column(name = "PARAM_NAME") @ApiParam(value = "参数名称)") @@ -45,7 +49,7 @@ public class BsSuitCaseParam extends BaseBean { @Column(name = "PARAM_VAL_TYPE_ID") @ApiParam(value = "参数值类型") - private int paramValTypeId; + private Integer paramValTypeId; @Column(name = "PARAM_DEFAULT_VAL") @ApiParam(value = "参数默认值") @@ -55,5 +59,9 @@ public class BsSuitCaseParam extends BaseBean { @ApiParam(value = "参数描述") private String paramDescription; + @Transient + @ApiParam(value = "参数值") + private String paramValue; + } diff --git a/modules/i3plus-pojo-softswitch/src/main/java/cn/estsh/i3plus/pojo/softswitch/bean/BsSuitDataDetail.java b/modules/i3plus-pojo-softswitch/src/main/java/cn/estsh/i3plus/pojo/softswitch/bean/BsSuitDataDetail.java index f827b7f..4fa1bd2 100644 --- a/modules/i3plus-pojo-softswitch/src/main/java/cn/estsh/i3plus/pojo/softswitch/bean/BsSuitDataDetail.java +++ b/modules/i3plus-pojo-softswitch/src/main/java/cn/estsh/i3plus/pojo/softswitch/bean/BsSuitDataDetail.java @@ -1,6 +1,8 @@ package cn.estsh.i3plus.pojo.softswitch.bean; import cn.estsh.i3plus.pojo.base.bean.BaseBean; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; import io.swagger.annotations.Api; import io.swagger.annotations.ApiParam; import lombok.Data; @@ -41,7 +43,8 @@ public class BsSuitDataDetail extends BaseBean { @Column(name = "SUIT_RECORD_ID") @ApiParam(value = "适配记录id") - private long suitRecordId; + @JsonSerialize(using = ToStringSerializer.class) + private Long suitRecordId; @Column(name = "GET_DATE_TIME") @ApiParam(value = "获取报文时间") @@ -57,7 +60,7 @@ public class BsSuitDataDetail extends BaseBean { @Column(name = "PROCESS_STATE") @ApiParam(value = "处理状态") - private int processState; + private Integer processState; @Column(name = "PROCESS_TIME") @ApiParam(value = "处理时间") diff --git a/modules/i3plus-pojo-softswitch/src/main/java/cn/estsh/i3plus/pojo/softswitch/bean/BsSuitRecord.java b/modules/i3plus-pojo-softswitch/src/main/java/cn/estsh/i3plus/pojo/softswitch/bean/BsSuitRecord.java index 67d398b..0c61a85 100644 --- a/modules/i3plus-pojo-softswitch/src/main/java/cn/estsh/i3plus/pojo/softswitch/bean/BsSuitRecord.java +++ b/modules/i3plus-pojo-softswitch/src/main/java/cn/estsh/i3plus/pojo/softswitch/bean/BsSuitRecord.java @@ -1,6 +1,8 @@ package cn.estsh.i3plus.pojo.softswitch.bean; import cn.estsh.i3plus.pojo.base.bean.BaseBean; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; import io.swagger.annotations.Api; import io.swagger.annotations.ApiParam; import lombok.Data; @@ -37,23 +39,30 @@ public class BsSuitRecord extends BaseBean { @Column(name = "SUIT_CASE_TYPE") @ApiParam(value = "适配套件类型id枚举") - private int suitCaseType; + private Integer suitCaseType; @Column(name = "SUIT_CASE_ID") @ApiParam(value = "适配器套件id") - private long suitCaseId; + @JsonSerialize(using = ToStringSerializer.class) + private Long suitCaseId; + + @Column(name = "CASE_TYPE_ID") + @ApiParam(value = "套件类型id(枚举)") + private Integer caseTypeId; @Column(name = "SUIT_CASE_DETAIL_ID") @ApiParam(value = "适配套件明细id") - private long suitCaseDetailId; + @JsonSerialize(using = ToStringSerializer.class) + private Long suitCaseDetailId; @Column(name = "SUIT_METHOD_ID") @ApiParam(value = "适配方式id枚举") - private int suitMethodId; + private Integer suitMethodId; @Column(name = "SUIT_TYPE_ID") @ApiParam(value = "适配类型id") - private long suitTypeId; + @JsonSerialize(using = ToStringSerializer.class) + private Long suitTypeId; @Column(name = "SUIT_TYPE_NAME_RDD") @ApiParam(value = "适配类型名称") @@ -61,23 +70,36 @@ public class BsSuitRecord extends BaseBean { @Column(name = "REQUEST_SOURCE") @ApiParam(value = "请求来源(枚举)") - private int requestSource; + private Integer requestSource; - @Column(name = "SUIT_SSL_KEY_ID") + @Column(name = "SSL_KEY_ID") @ApiParam(value = "证书id") - private long suitSslKeyId; + @JsonSerialize(using = ToStringSerializer.class) + private Long sslKeyId; @Column(name = "SUIT_SSL_KEY_NAME_RDD") @ApiParam(value = "证书名称") private String suitSslKeyNameRdd; + @Column(name = "SUIT_SSL_KEY_RESULT") + @ApiParam(value = "认证结果") + private String suitSslKeyResult; + + @Column(name = "SUIT_SSL_KEY_RESULT_MESSAGE") + @ApiParam(value = "认证信息") + private String suitSslKeyResultMessage; + @Column(name = "SUIT_RESULT") @ApiParam(value = "适配结果") - private int suitResult; + private Integer suitResult; + + @Column(name = "SUIT_MESSAGE") + @ApiParam(value = "适配信息") + private String suitMessage; @Column(name = "PROCESS_STATE") @ApiParam(value = "处理状态") - private int processState; + private Integer processState; @Column(name = "PROCESS_TIME") @ApiParam(value = "处理时间") diff --git a/modules/i3plus-pojo-softswitch/src/main/java/cn/estsh/i3plus/pojo/softswitch/bean/BsSuitRequestRecord.java b/modules/i3plus-pojo-softswitch/src/main/java/cn/estsh/i3plus/pojo/softswitch/bean/BsSuitRequestRecord.java index 331c11f..4a63337 100644 --- a/modules/i3plus-pojo-softswitch/src/main/java/cn/estsh/i3plus/pojo/softswitch/bean/BsSuitRequestRecord.java +++ b/modules/i3plus-pojo-softswitch/src/main/java/cn/estsh/i3plus/pojo/softswitch/bean/BsSuitRequestRecord.java @@ -1,6 +1,8 @@ package cn.estsh.i3plus.pojo.softswitch.bean; import cn.estsh.i3plus.pojo.base.bean.BaseBean; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; import io.swagger.annotations.Api; import io.swagger.annotations.ApiParam; import lombok.Data; @@ -29,15 +31,17 @@ public class BsSuitRequestRecord extends BaseBean { @Column(name = "SUIT_RECORD_ID") @ApiParam(value = "适配记录id") - private long suitRecordId; + @JsonSerialize(using = ToStringSerializer.class) + private Long suitRecordId; @Column(name = "SUIT_CASE_ID") @ApiParam(value = "适配器套件id") - private long suitCaseId; + @JsonSerialize(using = ToStringSerializer.class) + private Long suitCaseId; @Column(name = "REQUEST_SOURCE") @ApiParam(value = "请求来源(枚举)") - private int requestSource; + private Integer requestSource; @Column(name = "REQUEST_ORGIN_PARAM") @ApiParam(value = "请求原始参数") diff --git a/modules/i3plus-pojo-softswitch/src/main/java/cn/estsh/i3plus/pojo/softswitch/bean/BsSuitSchedule.java b/modules/i3plus-pojo-softswitch/src/main/java/cn/estsh/i3plus/pojo/softswitch/bean/BsSuitSchedule.java index 4b657d3..f938368 100644 --- a/modules/i3plus-pojo-softswitch/src/main/java/cn/estsh/i3plus/pojo/softswitch/bean/BsSuitSchedule.java +++ b/modules/i3plus-pojo-softswitch/src/main/java/cn/estsh/i3plus/pojo/softswitch/bean/BsSuitSchedule.java @@ -1,6 +1,8 @@ package cn.estsh.i3plus.pojo.softswitch.bean; import cn.estsh.i3plus.pojo.base.bean.BaseBean; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; import io.swagger.annotations.Api; import io.swagger.annotations.ApiParam; import lombok.Data; @@ -29,7 +31,8 @@ public class BsSuitSchedule extends BaseBean { @Column(name = "SUIT_CASE_ID") @ApiParam(value = "适配套件id") - private long suitCaseId; + @JsonSerialize(using = ToStringSerializer.class) + private Long suitCaseId; @Column(name = "SUIT_CASE_NAME_RDD") @ApiParam(value = "适配套件名称") diff --git a/modules/i3plus-pojo-softswitch/src/main/java/cn/estsh/i3plus/pojo/softswitch/bean/BsSuitType.java b/modules/i3plus-pojo-softswitch/src/main/java/cn/estsh/i3plus/pojo/softswitch/bean/BsSuitType.java index 26aa382..1499369 100644 --- a/modules/i3plus-pojo-softswitch/src/main/java/cn/estsh/i3plus/pojo/softswitch/bean/BsSuitType.java +++ b/modules/i3plus-pojo-softswitch/src/main/java/cn/estsh/i3plus/pojo/softswitch/bean/BsSuitType.java @@ -33,7 +33,7 @@ public class BsSuitType extends BaseBean { @Column(name = "SUIT_CASE_NUM") @ApiParam(value = "适配器数量") - private int suitCaseNum = 0; + private Integer suitCaseNum = 0; } diff --git a/modules/i3plus-pojo-softswitch/src/main/java/cn/estsh/i3plus/pojo/softswitch/bean/SuitRecordParam.java b/modules/i3plus-pojo-softswitch/src/main/java/cn/estsh/i3plus/pojo/softswitch/bean/SuitRecordParam.java index 5f0bb46..bb04309f 100644 --- a/modules/i3plus-pojo-softswitch/src/main/java/cn/estsh/i3plus/pojo/softswitch/bean/SuitRecordParam.java +++ b/modules/i3plus-pojo-softswitch/src/main/java/cn/estsh/i3plus/pojo/softswitch/bean/SuitRecordParam.java @@ -29,7 +29,7 @@ public class SuitRecordParam extends BaseBean { @Column(name = "SUIT_RECORD_ID") @ApiParam(value = "适配记录id") - private long suitRecordId; + private Long suitRecordId; @Column(name = "PARAM_NAME") @ApiParam(value = "参数名称") diff --git a/modules/i3plus-pojo-softswitch/src/main/java/cn/estsh/i3plus/pojo/softswitch/sqlpack/SoftSwitchHqlPack.java b/modules/i3plus-pojo-softswitch/src/main/java/cn/estsh/i3plus/pojo/softswitch/sqlpack/SoftSwitchHqlPack.java index c00091f..ccea28f 100644 --- a/modules/i3plus-pojo-softswitch/src/main/java/cn/estsh/i3plus/pojo/softswitch/sqlpack/SoftSwitchHqlPack.java +++ b/modules/i3plus-pojo-softswitch/src/main/java/cn/estsh/i3plus/pojo/softswitch/sqlpack/SoftSwitchHqlPack.java @@ -3,6 +3,7 @@ package cn.estsh.i3plus.pojo.softswitch.sqlpack; import cn.estsh.i3plus.pojo.base.bean.DdlPackBean; import cn.estsh.i3plus.pojo.base.tool.DdlPreparedPack; import cn.estsh.i3plus.pojo.base.tool.HqlPack; +import cn.estsh.i3plus.pojo.softswitch.bean.BsSuitCase; import cn.estsh.i3plus.pojo.softswitch.bean.BsSuitCaseParam; import cn.estsh.i3plus.pojo.softswitch.bean.TestDataBase; import org.apache.commons.lang3.StringUtils; @@ -76,4 +77,37 @@ public class SoftSwitchHqlPack { return ddlPackBean; } + /** + * 适配套件条件封装 + * @param bsSuitCase 查询条件 + * @return + */ + public static DdlPackBean packHqlBsSuitCaseParam(BsSuitCase bsSuitCase){ + DdlPackBean ddlPackBean = new DdlPackBean(); + +// DdlPreparedPack.getStringLikerPack(bsSuitCase.getSuitCaseCode(),"suitCaseCode",ddlPackBean); +// DdlPreparedPack.getStringLikerPack(bsSuitCase.getSuitTypeName(),"suitTypeName",ddlPackBean); +// DdlPreparedPack.getNumEqualPack(bsSuitCase.getParamTypeId(), "paramTypeId", ddlPackBean); +// DdlPreparedPack.getNumEqualPack(bsSuitCase.getSuitCaseId(), "suitCaseId", ddlPackBean); +// DdlPreparedPack.getStringEqualPack(bsSuitCase.getSuitCaseCodeRdd(),"suitCaseCodeRdd",ddlPackBean); + + ddlPackBean.setOrderByStr(bsSuitCase.orderBy()); + + return ddlPackBean; + } + + /** + * 适配套件唯一校验 + * @param bsSuitCase 适配套件信息 + * @return + */ + public static DdlPackBean packHqlCheckBsSuitCaseOnly(BsSuitCase bsSuitCase){ + DdlPackBean ddlPackBean = new DdlPackBean(); + + DdlPreparedPack.getNumNOEqualPack(bsSuitCase.getId(),"id",ddlPackBean); + DdlPreparedPack.getNumEqualPack(bsSuitCase.getSuitCaseCode(), "suitCaseCode", ddlPackBean); + + return ddlPackBean; + } + } diff --git a/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsMoveSn.java b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsMoveSn.java index 43edf65..f8d9e0e 100644 --- a/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsMoveSn.java +++ b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsMoveSn.java @@ -211,7 +211,7 @@ public class WmsMoveSn extends BaseBean { } public WmsMoveSn( String organizeCode,String orderNo,Integer item,String partNo,String partNameRdd, String transTypeCode,String transTypeName,Integer itemStatus,String unit, String srcLocateNo,String destLocateNo,Double srcQty,Double destQty,Integer srcQcStatus,Integer descQcStatus,Integer srcSnStatus, - Integer destSnStatus, String lotNo,String dateCode){ + Integer destSnStatus, String lotNo,String dateCode,String refSrc,String destZoneNo,String destWhNo){ this.organizeCode=organizeCode; this.orderNo=orderNo; this.item=item; @@ -232,6 +232,9 @@ public class WmsMoveSn extends BaseBean { this.destSnStatus=destSnStatus; this.lotNo=lotNo; this.dateCode=dateCode; + this.refSrc = refSrc; + this.destZoneNo = destZoneNo; + this.destWhNo =destWhNo; } } diff --git a/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsTransQuan.java b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsTransQuan.java index 281e113..a7d96c8 100644 --- a/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsTransQuan.java +++ b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsTransQuan.java @@ -167,7 +167,7 @@ public class WmsTransQuan extends BaseBean { public WmsTransQuan(String organizeCode,String partNo,String partNameRdd,String transCode,String unit,String whNo,String zoneNo, Double qty,Double failQty,Double holdQty,Double scrapQty,Double qcQty,Double rinQty, - Double freezeQty,Double consignQty,Double lockQty){ + Double freezeQty,Double consignQty,Double lockQty,String createUser,String createDatetime){ this.organizeCode = organizeCode; this.partNo = partNo; this.partNameRdd = partNameRdd; @@ -184,6 +184,8 @@ public class WmsTransQuan extends BaseBean { this.freezeQty = freezeQty; this.consignQty = consignQty; this.lockQty = lockQty; + this.createUser = createUser; + this.createDatetime = createDatetime; }