Compare commits

...

10 Commits

@ -5,7 +5,7 @@
<parent>
<artifactId>i3plus-pojo</artifactId>
<groupId>i3plus.pojo</groupId>
<version>1.0-TEST-SNAPSHOT</version>
<version>OPTIMIZATION-1.0-TEST-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>

@ -5,7 +5,7 @@
<parent>
<artifactId>i3plus-pojo</artifactId>
<groupId>i3plus.pojo</groupId>
<version>1.0-TEST-SNAPSHOT</version>
<version>OPTIMIZATION-1.0-TEST-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>

@ -5,7 +5,7 @@
<parent>
<artifactId>i3plus-pojo</artifactId>
<groupId>i3plus.pojo</groupId>
<version>1.0-TEST-SNAPSHOT</version>
<version>OPTIMIZATION-1.0-TEST-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>

@ -3,7 +3,9 @@ package cn.estsh.i3plus.pojo.base.bean;
import cn.estsh.i3plus.pojo.base.enumutil.CommonEnumUtil;
import cn.estsh.i3plus.pojo.base.tool.DdlPreparedPack;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
/**
* @Description : hql
@ -25,6 +27,19 @@ public class DdlPackBean {
*/
private HashMap<String,Object> hqlPreparedMap;
public List<String> getHqlColumns() {
return hqlColumns;
}
public void setHqlColumns(List<String> hqlColumns) {
this.hqlColumns = hqlColumns;
}
/**
* select column1,column2 from
*/
private List<String> hqlColumns;
//是否是hql
private boolean isHql;
@ -44,15 +59,43 @@ public class DdlPackBean {
this.isHql = true;
whereAppend = new StringBuilder();
hqlPreparedMap = new HashMap<>();
hqlColumns = new ArrayList<>();
}
public DdlPackBean(boolean isHql){
this.isHql = isHql;
whereAppend = new StringBuilder();
hqlPreparedMap = new HashMap<>();
hqlColumns = new ArrayList<>();
}
/**
*
* @param hqlColumns
* @return
*/
public static DdlPackBean getDdlPackBean(List<String> hqlColumns){
DdlPackBean result = new DdlPackBean();
result.setHqlColumns(hqlColumns);
DdlPreparedPack.getNumEqualPack(CommonEnumUtil.TRUE_OR_FALSE.FALSE.getValue(),"isDeleted",result);
DdlPreparedPack.getNumEqualPack(CommonEnumUtil.TRUE_OR_FALSE.TRUE.getValue(),"isValid",result);
return result;
}
/**
*
* @param hqlColumns
* @return
*/
public static DdlPackBean getDdlPackBean(List<String> hqlColumns,String organizeCode){
DdlPackBean result = new DdlPackBean();
result.setHqlColumns(hqlColumns);
DdlPreparedPack.getNumEqualPack(CommonEnumUtil.TRUE_OR_FALSE.FALSE.getValue(),"isDeleted",result);
DdlPreparedPack.getNumEqualPack(CommonEnumUtil.TRUE_OR_FALSE.TRUE.getValue(),"isValid",result);
DdlPreparedPack.getStringEqualPack(organizeCode,"organizeCode",result);
return result;
}
/**
*
* @param organizeCode
* @return

@ -32,6 +32,26 @@ public class SnowflakeIdMaker {
private long datacenterId;
private long sequence = 0L;
private volatile static SnowflakeIdMaker snowflakeIdMaker = null;
/**
*
* @return
*/
public static SnowflakeIdMaker getSingleton(){
if (snowflakeIdMaker == null){
synchronized (SnowflakeIdMaker.class){
if (snowflakeIdMaker == null) {
snowflakeIdMaker = new SnowflakeIdMaker();
}
}
}
return snowflakeIdMaker;
}
/**
* ,ID
*/
@ -42,6 +62,8 @@ public class SnowflakeIdMaker {
this.sequence = 0L;
}
/**
* ID
* @param workerId ID
@ -104,12 +126,12 @@ public class SnowflakeIdMaker {
private long lastTimestamp = -1L;
private long getWorkerId(){
return workerId;
public long getWorkerId(){
return this.workerId;
}
private long getDatacenterId(){
return datacenterId;
public long getDatacenterId(){
return this.datacenterId;
}
public synchronized long nextId() {

@ -131,6 +131,7 @@ public class BlockSoftSwitchEnumUtil {
CLIENT_WEB_SERVICE_PARAM_OBJECT(SUIT_MODE.CLIENT,CASE_TYPE.WEB_SERVICE,140004,"Client Param Object"),
CLIENT_WEB_SERVICE_HUAYU(SUIT_MODE.CLIENT,CASE_TYPE.WEB_SERVICE,140005,"Client 华域的设置"),
CLIENT_WEB_SERVICE_HTTP(SUIT_MODE.CLIENT,CASE_TYPE.WEB_SERVICE,140006,"WebService转Http请求客户端"),
CLIENT_WEB_SERVICE_HTTP_XIAOMI(SUIT_MODE.CLIENT,CASE_TYPE.WEB_SERVICE,140007,"WebService转Http请求客户端-小米"),
/* 数据源 */
CLIENT_DATA_SOURCE_IMPP(SUIT_MODE.CLIENT,CASE_TYPE.DATASOURCE,130001,"Client 数据库适配服务"),

@ -94,6 +94,7 @@ public interface BaseRepository <T, ID extends Serializable> extends JpaReposito
/**
*
*/
@Override
void deleteById(ID id);
int deleteByProperty(String propName, Object propValue);
int deleteByPropertyIn(String propName, Object[] propValues);
@ -239,6 +240,14 @@ public interface BaseRepository <T, ID extends Serializable> extends JpaReposito
T getByProperty(DdlPackBean packBean);
/**
*
* @param ddlPackBean
* @param queryColumns
* @return
*/
List<T> getByProperty(DdlPackBean ddlPackBean, boolean queryColumns);
T getByProperty(String propertyName, Object value);
T getByProperty(String[] propertyNames, Object[] values);
@ -266,6 +275,14 @@ public interface BaseRepository <T, ID extends Serializable> extends JpaReposito
List<T> findByHqlWhere(DdlPackBean packBean);
/**
*
* @param packBean
* @param queryColumns
* @return
*/
List<T> findByHqlWhere(DdlPackBean packBean, boolean queryColumns);
List<T> findByHqlWhere(String hqlWhere,String[] propertyNames, Object[] values,String orderByStuff);
int findByHqlWhereCount(String hqlWhere,String[] propertyNames, Object[] values);
@ -277,6 +294,8 @@ public interface BaseRepository <T, ID extends Serializable> extends JpaReposito
List<T> findByHqlWherePage(DdlPackBean packBean, Pager pager);
List<T> findByHqlWherePage(DdlPackBean packBean, Pager pager,Boolean queryColumns);
@Deprecated
int findByHqlWhereCount(String hqlWhere);

@ -57,10 +57,12 @@ public class BaseRepositoryImpl<T, ID extends Serializable> extends SimpleJpaRep
this.snowflakeIdMaker = snowflakeIdMaker;
}
@Override
public void clearSession(){
entityManager.clear();
}
@Override
public void detachObject(T t){
if (t == null) {
return;
@ -69,6 +71,7 @@ public class BaseRepositoryImpl<T, ID extends Serializable> extends SimpleJpaRep
}
//集合设置为游离态
@Override
public void detachList(List<T> list){
if(list != null){
for(T t : list) {
@ -525,6 +528,24 @@ public class BaseRepositoryImpl<T, ID extends Serializable> extends SimpleJpaRep
}
@Override
public List<T> getByProperty(DdlPackBean ddlPackBean, boolean queryColumns) {
StringBuilder hqlStr = new StringBuilder();
if (queryColumns && ddlPackBean.getHqlColumns().size() > 0){
hqlStr.append("select ");
List<String> hqlColumns = ddlPackBean.getHqlColumns();
hqlColumns.forEach(column ->{ hqlStr.append(column).append(" ");});
}
Query query = entityManager.createQuery(hqlStr.toString() + " from " + persistentClass.getSimpleName()
+ " as model where 1=1 " + ddlPackBean.getPackedHql());
for (String key : ddlPackBean.getHqlPreparedMap().keySet()) {
query.setParameter("m_" + key,ddlPackBean.getHqlPreparedMap().get(key));
}
return query.getResultList();
}
@Override
public T getByProperty(String propertyName, Object value) {
return getByPropertyPager(new String[]{propertyName}, new Object[]{value}, GETBYPROPERTY_PAGER);
}
@ -758,6 +779,26 @@ public class BaseRepositoryImpl<T, ID extends Serializable> extends SimpleJpaRep
}
@Override
public List<T> findByHqlWhere(DdlPackBean packBean, boolean queryColumns) {
StringBuilder hqlStr = new StringBuilder();
if (queryColumns && packBean.getHqlColumns().size() > 0){
hqlStr.append("select ");
List<String> hqlColumns = packBean.getHqlColumns();
hqlColumns.forEach(column ->{ hqlStr.append(column).append(" ");});
}
Query query = entityManager.createQuery(hqlStr.toString() + " from " + persistentClass.getSimpleName()
+ " as model where 1=1 " + packBean.getPackedHql());
for (String key : packBean.getHqlPreparedMap().keySet()) {
query.setParameter("m_" + key,packBean.getHqlPreparedMap().get(key));
}
return query.getResultList();
}
@Override
public List<T> findByHqlWhere(String hqlWhere, String[] propertyNames, Object[] values, String orderByStuff) {
if(propertyNames.length != values.length){
throw new IllegalArgumentException("参数名的数量和参数值不匹配!propertyNames:"
@ -894,6 +935,31 @@ public class BaseRepositoryImpl<T, ID extends Serializable> extends SimpleJpaRep
}
}
@Override
public List<T> findByHqlWherePage(DdlPackBean packBean, Pager pager, Boolean queryColumns) {
if(pager != null) {
StringBuilder hqlStr = new StringBuilder();
if (queryColumns && packBean.getHqlColumns().size() > 0){
hqlStr.append("select ");
List<String> hqlColumns = packBean.getHqlColumns();
hqlColumns.forEach(column ->{ hqlStr.append(column).append(" ");});
}
Query query = entityManager.createQuery(hqlStr.toString() +" from " + persistentClass.getSimpleName()
+ " as model where 1=1 " + packBean.getPackedHql());
for (String key : packBean.getHqlPreparedMap().keySet()) {
query.setParameter("m_" + key,packBean.getHqlPreparedMap().get(key));
}
return query.setFirstResult(pager.getStartRow())
.setMaxResults(pager.getPageSize())
.getResultList();
}else{
return new ArrayList<T>();
}
}
@Deprecated
@Override
public int findByHqlWhereCount(String hqlWhere) {

@ -5,7 +5,7 @@
<parent>
<artifactId>i3plus-pojo</artifactId>
<groupId>i3plus.pojo</groupId>
<version>1.0-TEST-SNAPSHOT</version>
<version>OPTIMIZATION-1.0-TEST-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>

@ -5,7 +5,7 @@
<parent>
<artifactId>i3plus-pojo</artifactId>
<groupId>i3plus.pojo</groupId>
<version>1.0-TEST-SNAPSHOT</version>
<version>OPTIMIZATION-1.0-TEST-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>

@ -159,4 +159,8 @@ public class BfDataObjectProperty extends BaseBean {
@ApiParam(value ="元素值集合")
private transient List<Object> propertyFormValueList;
@Transient
@ApiParam(value = "控件类型")
private Integer propertyControlType;
}

@ -206,6 +206,10 @@ public class BfElement extends BaseBean {
@ApiParam(value = "脚本No")
private String scriptNo;
@Column(name = "IS_SUPPORT_NULL_QUERY")
@ApiParam(value = "是否支持查询为空时,进行查询")
private Integer isSupportNullQuery;
@Transient
@ApiParam(value = "数据对象")
private BfDataObject dataObject;

@ -5,7 +5,7 @@
<parent>
<artifactId>i3plus-pojo</artifactId>
<groupId>i3plus.pojo</groupId>
<version>1.0-TEST-SNAPSHOT</version>
<version>OPTIMIZATION-1.0-TEST-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>

@ -5,7 +5,7 @@
<parent>
<artifactId>i3plus-pojo</artifactId>
<groupId>i3plus.pojo</groupId>
<version>1.0-TEST-SNAPSHOT</version>
<version>OPTIMIZATION-1.0-TEST-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>

@ -5,7 +5,7 @@
<parent>
<artifactId>i3plus-pojo</artifactId>
<groupId>i3plus.pojo</groupId>
<version>1.0-TEST-SNAPSHOT</version>
<version>OPTIMIZATION-1.0-TEST-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>

@ -5,7 +5,7 @@
<parent>
<artifactId>i3plus-pojo</artifactId>
<groupId>i3plus.pojo</groupId>
<version>1.0-TEST-SNAPSHOT</version>
<version>OPTIMIZATION-1.0-TEST-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>

@ -5,7 +5,7 @@
<parent>
<artifactId>i3plus-pojo</artifactId>
<groupId>i3plus.pojo</groupId>
<version>1.0-TEST-SNAPSHOT</version>
<version>OPTIMIZATION-1.0-TEST-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>

@ -5,7 +5,7 @@
<parent>
<artifactId>i3plus-pojo</artifactId>
<groupId>i3plus.pojo</groupId>
<version>1.0-TEST-SNAPSHOT</version>
<version>OPTIMIZATION-1.0-TEST-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>

@ -85,6 +85,10 @@ public class MesStateMachineStatus extends BaseBean implements Serializable {
@ApiParam("是否初始化")
private Integer isInit = 1;
@Column(name = "TRIGGER_GUIDE_STEP")
@ApiParam("默认触发引导工步")
private String triggerGuideStep;
@Transient
@ApiParam("流程代码")
private String routeCode;
@ -139,4 +143,27 @@ public class MesStateMachineStatus extends BaseBean implements Serializable {
this.processCode = processCode;
}
public MesStateMachineStatus(Long id, String smCode, String statusCode, String nextStatus, String statusName, String nextStatusName, Integer triggerType,
String triggerEvent, String triggerWhere, String triggerGuideStep, Long triggerAmgId, Long inAmgId, Long outAmgId, Integer statusType, Integer seq,
Integer isInit, String routeCode, String processCode) {
this.id = id;
this.smCode = smCode;
this.statusCode = statusCode;
this.nextStatus = nextStatus;
this.statusName = statusName;
this.nextStatusName = nextStatusName;
this.triggerType = triggerType;
this.triggerEvent = triggerEvent;
this.triggerWhere = triggerWhere;
this.triggerGuideStep = triggerGuideStep;
this.triggerAmgId = triggerAmgId;
this.inAmgId = inAmgId;
this.outAmgId = outAmgId;
this.statusType = statusType;
this.seq = seq;
this.isInit = isInit;
this.routeCode = routeCode;
this.processCode = processCode;
}
}

@ -3,9 +3,11 @@ package cn.estsh.i3plus.pojo.mes.model;
import cn.estsh.i3plus.pojo.base.enumutil.MesPcnEnumUtil;
import cn.estsh.i3plus.pojo.mes.bean.MesStateMachineStatus;
import com.alibaba.fastjson.JSONObject;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiParam;
import lombok.Data;
import org.springframework.util.CollectionUtils;
import java.io.Serializable;
import java.util.HashMap;
@ -135,6 +137,12 @@ public class StationRequestBean implements Serializable {
@ApiParam("工位参数")
private Map<String, String> wcpcMap;
@ApiParam("fsm参数")
private Map<String, String> fsmCfgMap;
@ApiParam("fsm参数key")
private String prodRouteOptParamKey;
@ApiParam("生产主队列编号")
private String orderNo;
@ -238,24 +246,28 @@ public class StationRequestBean implements Serializable {
return "StationRequestBean{" +
"scanInfo='" + scanInfo + '\'' +
", serialNumber='" + serialNumber + '\'' +
", productSn='" + productSn + '\'' +
", partNo='" + partNo + '\'' +
", pptCode='" + pptCode + '\'' +
", organizeCode='" + organizeCode + '\'' +
", organizeName='" + organizeName + '\'' +
", workCenterCode='" + workCenterCode + '\'' +
", workCellCode='" + workCellCode + '\'' +
", routeCode='" + routeCode + '\'' +
", processCode='" + processCode + '\'' +
", smCode='" + smCode + '\'' +
", prodRouteOptParamKey='" + prodRouteOptParamKey + '\'' +
", clientInfo='" + clientInfo + '\'' +
", userInfo='" + userInfo + '\'' +
", buttonCode='" + buttonCode + '\'' +
", stepCode='" + stepCode + '\'' +
", busiType='" + busiType + '\'' +
", forceJumpProcess='" + forceJumpProcess + '\'' +
", workOrderNo='" + workOrderNo + '\'' +
", tray='" + tray + '\'' +
", finishCount=" + finishCount +
", packageNo=" + packageNo +
", createDatetime=" + createDatetime +
", cacheSourceClass=" + cacheSourceClass +
", packageNo='" + packageNo + '\'' +
", cacheSourceClass='" + cacheSourceClass + '\'' +
", dataMap=" + (!CollectionUtils.isEmpty(dataMap) ? JSONObject.toJSONString(dataMap) : "[]") +
", curFsmState=" + (null != curFsmState ? JSONObject.toJSONString(curFsmState) : "[]") +
'}';
}
}

@ -27,6 +27,8 @@ public class StepResult<T> {
private String nextTriggerEvent;
private Object obj;
public static StepResult getNonComplete() {
return new StepResult(false, "");
}
@ -154,4 +156,31 @@ public class StepResult<T> {
this.msg = msg;
this.stationRequestBean = stationRequestBean;
}
public StepResult isCompleted(boolean isCompleted) {
this.isCompleted = isCompleted;
return this;
}
public StepResult msg(String msg) {
this.msg = msg;
return this;
}
public StepResult nextTriggerEvent(String nextTriggerEvent) {
this.nextTriggerEvent = nextTriggerEvent;
return this;
}
public StepResult data(T t) {
this.data = t;
return this;
}
public StepResult obj(Object obj) {
this.obj = obj;
return this;
}
}

@ -10,6 +10,7 @@ import cn.estsh.i3plus.pojo.mes.bean.template.BasImportTemplate;
import cn.estsh.i3plus.pojo.mes.bean.template.BasImportTemplateDetails;
import cn.estsh.i3plus.pojo.mes.dbinterface.MesInterfaceDataMapper;
import cn.estsh.i3plus.pojo.mes.engine.script.EngineScriptPersistence;
import cn.estsh.i3plus.pojo.mes.engine.script.EngineScriptPersistenceHistory;
import cn.estsh.i3plus.pojo.mes.model.MgnPaintPolishingReportModel;
import org.springframework.util.CollectionUtils;
import org.springframework.util.StringUtils;
@ -24,20 +25,30 @@ import java.util.List;
* @Modify:
**/
public class MesHqlPack {
/**
*
*
* @param organizeCode
* @return
*/
public static DdlPackBean packHqlScriptHistory(EngineScriptPersistenceHistory history) {
DdlPackBean packBean = new DdlPackBean();
DdlPreparedPack.getStringEqualPack(history.getScriptNo(), "scriptNo", packBean);
getStringBuilderPack(history, packBean);
return packBean;
}
public static DdlPackBean getAllBaseData(String organizeCode) {
DdlPackBean packBean = new DdlPackBean();
DdlPreparedPack.getStringEqualPack(organizeCode, "organizeCode", packBean);
DdlPreparedPack.getNumEqualPack(CommonEnumUtil.IS_DEAL.NO.getValue(), "isDeleted", packBean);
return packBean;
}
public static DdlPackBean packEngineScriptPersistence(EngineScriptPersistence scriptPersistence) {
DdlPackBean packBean = new DdlPackBean();
DdlPreparedPack.getStringLikerPack(scriptPersistence.getScriptNo(), "scriptNo", packBean);
DdlPreparedPack.getStringRightLikerPack(scriptPersistence.getScriptName(), "scriptName", packBean);
DdlPreparedPack.getNumEqualPack(scriptPersistence.getScriptType(), "scriptType", packBean);
DdlPreparedPack.getNumEqualPack(scriptPersistence.getLanguageType(), "languageType", packBean);
getStringBuilderPack(scriptPersistence, packBean);
DdlPreparedPack.getOrderByPack(new Object[]{2}, new String[]{"createDatetime"}, packBean);
return packBean;
}
public static DdlPackBean getMesPcnByCondition(MesPcn mesPcn, String organizeCode) {
DdlPackBean packBean = getAllBaseData(organizeCode);
if (!StringUtils.isEmpty(mesPcn.getConnectIp())) {
@ -3847,17 +3858,4 @@ public class MesHqlPack {
DdlPreparedPack.getNumEqualPack(mesFailureModeParts.getIsValid(), "isValid", packBean);
return packBean;
}
public static DdlPackBean packEngineScriptPersistence(EngineScriptPersistence scriptPersistence) {
DdlPackBean packBean = new DdlPackBean();
DdlPreparedPack.getStringLikerPack(scriptPersistence.getScriptNo(), "scriptNo", packBean);
DdlPreparedPack.getStringRightLikerPack(scriptPersistence.getScriptName(), "scriptName", packBean);
DdlPreparedPack.getNumEqualPack(scriptPersistence.getScriptType(), "scriptType", packBean);
DdlPreparedPack.getNumEqualPack(scriptPersistence.getLanguageType(), "languageType", packBean);
getStringBuilderPack(scriptPersistence, packBean);
DdlPreparedPack.getOrderByPack(new Object[]{2}, new String[]{"createDatetime"}, packBean);
return packBean;
}
}

@ -0,0 +1,71 @@
package cn.estsh.i3plus.pojo.mes.util;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
public class DateTimeUtil {
public static final String DATETIME_FORMATOR = "yyyy-MM-dd HH:mm:ss";
public static final String DATE_FORMATOR = "yyyy-MM-dd";
public static final String TIME_FORMATOR = "HH:mm:ss";
public static final String SHORT_EN_FORMAT = "yyyyMMdd";
public static String formatDate(Date date) {
SimpleDateFormat format = new SimpleDateFormat(DATETIME_FORMATOR);
return format.format(date);
}
public static Date parse(String dateStr) {
if (dateStr.length() == 16) {
return parse(dateStr, DATETIME_FORMATOR);
}
if (dateStr.length() == 10) {
return parse(dateStr, DATE_FORMATOR);
}
return parse(dateStr, DATETIME_FORMATOR);
}
public static Date parse(String dateStr, String formatStr) {
return parse(dateStr, formatStr, null);
}
public static Date parse(String dateStr, String formatStr, Date defaultDate) {
SimpleDateFormat format = new SimpleDateFormat(formatStr);
try {
return format.parse(dateStr);
} catch (ParseException e) {
return defaultDate;
}
}
public static boolean isValidDate(String dateStr) {
//判断结果 默认为true
boolean judgeresult = true;
//1、首先使用SimpleDateFormat初步进行判断过滤掉注入 yyyy-01-32 或yyyy-00-0x等格式
//此处可根据实际需求进行调整如需判断yyyy/MM/dd格式将参数改掉即可
SimpleDateFormat format = new SimpleDateFormat(DATETIME_FORMATOR);
try {
//增加强判断条件,否则 诸如2022-02-29也可判断出去
format.setLenient(false);
Date date = parse(formatDate(DATETIME_FORMATOR, parse(dateStr)));
;
System.out.println(date);
} catch (Exception e) {
judgeresult = false;
}
//由于上述方法只能验证正常的日期格式,像诸如 0001-01-01、11-01-0110001-01-01等无法校验此处再添加校验年费是否合法
String yearStr = dateStr.split("-")[0];
if (yearStr.startsWith("0") || yearStr.length() != 4) {
judgeresult = false;
}
return judgeresult;
}
public static String formatDate(String formatter, Date date) {
if (date == null) {
return null;
}
SimpleDateFormat format = new SimpleDateFormat(formatter);
return format.format(date);
}
}

@ -5,7 +5,7 @@
<parent>
<artifactId>i3plus-pojo</artifactId>
<groupId>i3plus.pojo</groupId>
<version>1.0-TEST-SNAPSHOT</version>
<version>OPTIMIZATION-1.0-TEST-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>

@ -5,7 +5,7 @@
<parent>
<artifactId>i3plus-pojo</artifactId>
<groupId>i3plus.pojo</groupId>
<version>1.0-TEST-SNAPSHOT</version>
<version>OPTIMIZATION-1.0-TEST-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>

@ -39,12 +39,10 @@ public class SysLabelTemplate extends BaseBean {
@ApiParam(value ="模板名称")
private String templateName;
//枚举 CommonEnumUtil.SOFT_TYPE
@Column(name="TEMPLATE_SOFT_TYPE")
@ApiParam(value ="模板所属模块")
private Integer templateSoftType;
//枚举 CommonEnumUtil.SOFT_TYPE
@Column(name="TEMPLATE_GROUP_ID")
@ApiParam(value ="模板分组")
private Integer templateGroupId;
@ -59,7 +57,11 @@ public class SysLabelTemplate extends BaseBean {
@ApiParam(value ="其他模板内容")
private String otherTemplateContent;
// 参数拼接,多参数都好分隔,后台在做处理
@Column(name = "LABEL_TYPE",columnDefinition = " int default 10 ")
@ApiParam(value = "模本类型,10 lodop, 20 zebra")
private Integer labelType;
@Transient
@ApiParam(value ="模板参数拼接")
private String paramsPack;

@ -1,17 +1,17 @@
package cn.estsh.i3plus.pojo.platform.repository;
import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository;
import cn.estsh.i3plus.pojo.platform.bean.SysRoleLoginStrategy;
import cn.estsh.i3plus.pojo.platform.bean.SysTask;
import org.springframework.stereotype.Repository;
/**
* @Description :
* @Reference :
* @Author : wei.peng
* @Date : 2018-10-22 12:03:01.372
* @Modify :
**/
@Repository
public interface SysRoleLoginRepository extends BaseRepository<SysRoleLoginStrategy, Long> {
}
//package cn.estsh.i3plus.pojo.platform.repository;
//
//import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository;
//import cn.estsh.i3plus.pojo.platform.bean.SysRoleLoginStrategy;
//import cn.estsh.i3plus.pojo.platform.bean.SysTask;
//import org.springframework.stereotype.Repository;
//
///**
// * @Description : 任务
// * @Reference :
// * @Author : wei.peng
// * @Date : 2018-10-22 12:03:01.372
// * @Modify :
// **/
//@Repository
//public interface SysRoleLoginRepository extends BaseRepository<SysRoleLoginStrategy, Long> {
//}

@ -5,7 +5,7 @@
<parent>
<artifactId>i3plus-pojo</artifactId>
<groupId>i3plus.pojo</groupId>
<version>1.0-TEST-SNAPSHOT</version>
<version>OPTIMIZATION-1.0-TEST-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>

@ -5,7 +5,7 @@
<parent>
<artifactId>i3plus-pojo</artifactId>
<groupId>i3plus.pojo</groupId>
<version>1.0-TEST-SNAPSHOT</version>
<version>OPTIMIZATION-1.0-TEST-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>

@ -5,7 +5,7 @@
<parent>
<artifactId>i3plus-pojo</artifactId>
<groupId>i3plus.pojo</groupId>
<version>1.0-TEST-SNAPSHOT</version>
<version>OPTIMIZATION-1.0-TEST-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>

@ -5,7 +5,7 @@
<parent>
<artifactId>i3plus-pojo</artifactId>
<groupId>i3plus.pojo</groupId>
<version>1.0-TEST-SNAPSHOT</version>
<version>OPTIMIZATION-1.0-TEST-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>

@ -5,7 +5,7 @@
<parent>
<artifactId>i3plus-pojo</artifactId>
<groupId>i3plus.pojo</groupId>
<version>1.0-TEST-SNAPSHOT</version>
<version>OPTIMIZATION-1.0-TEST-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>

@ -5,7 +5,7 @@
<parent>
<artifactId>i3plus-pojo</artifactId>
<groupId>i3plus.pojo</groupId>
<version>1.0-TEST-SNAPSHOT</version>
<version>OPTIMIZATION-1.0-TEST-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>

@ -5,7 +5,7 @@
<parent>
<artifactId>i3plus-pojo</artifactId>
<groupId>i3plus.pojo</groupId>
<version>1.0-TEST-SNAPSHOT</version>
<version>OPTIMIZATION-1.0-TEST-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>

@ -15,7 +15,7 @@
<groupId>i3plus.pojo</groupId>
<artifactId>i3plus-pojo</artifactId>
<packaging>pom</packaging>
<version>1.0-TEST-SNAPSHOT</version>
<version>OPTIMIZATION-1.0-TEST-SNAPSHOT</version>
<modules>
<module>modules/i3plus-pojo-base</module>
@ -38,9 +38,9 @@
<module>modules/i3plus-pojo-mdm</module>
<module>modules/i3plus-pojo-screen</module>
<module>modules/i3plus-pojo-bsp</module>
<module>modules/i3plus-pojo-cdm</module>
<module>modules/i3plus-pojo-qms</module>
<module>modules/i3plus-pojo-eam</module>
<!-- <module>modules/i3plus-pojo-cdm</module>-->
<!-- <module>modules/i3plus-pojo-qms</module>-->
<!-- <module>modules/i3plus-pojo-eam</module>-->
</modules>
<dependencyManagement>

Loading…
Cancel
Save