Merge remote-tracking branch 'origin/ext-dev' into ext-dev

yun-zuoyi
钮海涛 4 years ago
commit ffa0aa94f8

@ -1978,6 +1978,21 @@ public class CommonEnumUtil {
return null;
}
public String getJDBCUrlToMysql(String database, String host, Integer port) {
if (this.getValue() == SOURCE_MARIA_DB.getValue()) {
return getJDBCUrlMySQLBy8x(database, host, port);
} else if (this.getValue() == SOURCE_ORACLE.getValue()) {
return getJDBCUrlOracle(database, host, port);
} else if (this.getValue() == SOURCE_POSTGRE_SQL.getValue()) {
return getJDBCUrlPostgreSQL(database, host, port);
} else if (this.getValue() == SOURCE_SQL_SERVER.getValue()) {
return getJDBCUrlSQLServer(database, host, port);
} else if (this.getValue() == SOURCE_SAP_HANA.getValue()) {
return getJDBCUrlSapHana(database, host, port);
}
return null;
}
public String getJDBCUrl(String database, String host, Integer port, String instanceName) {
if (this.getValue() == SOURCE_MARIA_DB.getValue()) {
return getJDBCUrlMySQL(database, host, port);
@ -2020,6 +2035,16 @@ public class CommonEnumUtil {
"&serverTimezone=CST";
}
//MySQL8.x时区设置
private String getJDBCUrlMySQLBy8x(String database, String host, Integer port) {
return "jdbc:mysql://" + host + ":" + port + "/" + database +
"?autoReconnect=true" +
"&useSSL=false" +
"&characterEncoding=utf-8" +
"&allowPublicKeyRetrieval=true" +
"&serverTimezone=Asia/Shanghai";
}
private String getJDBCUrlOracle(String database, String host, Integer port) {
return "jdbc:oracle:thin:@" + host + ":" + port + ":" + database;
}

@ -170,6 +170,10 @@ public class MesStationBom extends BaseBean implements Serializable {
@ApiParam("客户零件号")
private String custPartNo;
@Transient
@ApiParam("配方项")
private String recipeItem;
public double getQtyVal() {
return this.qty == null ? 0.0d : this.qty;
}

@ -93,6 +93,10 @@ public class StepResult<T> {
return new StepResult<>(true, data, "");
}
public static <T> StepResult<T> getNewSuccessData(T data, String nextTriggerEvent) {
return new StepResult<>(true, data, "", nextTriggerEvent);
}
public static <T> StepResult<T> getSuccessData(Collection<T> data, String msg) {
return new StepResult<T>(true, data, msg);
}
@ -126,6 +130,13 @@ public class StepResult<T> {
this.msg = msg;
}
public StepResult(boolean isCompleted, T data, String msg, String nextTriggerEvent) {
this.isCompleted = isCompleted;
this.data = data;
this.msg = msg;
this.nextTriggerEvent = nextTriggerEvent;
}
public StepResult(boolean isCompleted, Collection<T> dataCollection, String msg) {
this.isCompleted = isCompleted;
this.dataCollection = dataCollection;

@ -2,6 +2,7 @@ package cn.estsh.i3plus.pojo.mes.repository;
import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository;
import cn.estsh.i3plus.pojo.mes.bean.MesPlc;
import org.springframework.stereotype.Repository;
/**
* @Description:
@ -10,5 +11,6 @@ import cn.estsh.i3plus.pojo.mes.bean.MesPlc;
* @CreateDate:2019\10\9 0009 11:16
* @Modify:
**/
@Repository
public interface MesPlcRepository extends BaseRepository<MesPlc, Long> {
}

Loading…
Cancel
Save