平台功能优化

yun-zuoyi
alwaysfrin 7 years ago
parent c9ce9035e5
commit 40a7ef7e31

@ -1,5 +1,6 @@
package cn.estsh.i3plus.pojo.base.bean;
import cn.estsh.i3plus.pojo.base.enumutil.CommonEnumUtil;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
@ -86,4 +87,25 @@ public abstract class BaseBean implements Serializable {
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@ApiParam(value = "修改日期查询用,查询结束日期",example = "用于前台查询")
public transient String modifyDateTimeEnd;
@ApiParam(value = "排序属性")
public transient String orderByParam;
@ApiParam(value = "排序属性")
//CommonEnumUtil.ASC_OR_DESC 1 asc,2 desc
public transient int ascOrDesc;
//排序方式
public String orderBy(){
String result = "";
if (orderByParam!=null&&orderByParam.trim().length()>0) {
result = " order by " + orderByParam;
if(ascOrDesc == CommonEnumUtil.ASC_OR_DESC.ASC.getValue()) {
result += " asc";
}else{
result += " desc";
}
}
return result;
}
}

@ -0,0 +1,333 @@
package cn.estsh.i3plus.pojo.base.enumutil;
/**
* @Description :
* @Reference :
* @Author : alwaysfrin
* @CreateDate : 2018-09-12 14:32
* @Modify:
**/
public class CommonEnumUtil {
/**
*
*/
public enum SOFT_TYPE {
IMPP(1,"IMPP", "IMPP平台"),CORE(2,"CORE", "i3业务平台"), WMS(3,"WMS", "仓库管理软件"), MES(4,"MES", "生产管理软件");
private int value;
private String code;
private String description;
private SOFT_TYPE(int value,String code, String description) {
this.value = value;
this.code = code;
this.description = description;
}
public int getValue() {
return value;
}
public String getCode() {
return code;
}
public String getDescription() {
return description;
}
public static String valueOfCode(int val) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].value == val) {
tmp = values()[i].code;
}
}
return tmp;
}
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;
}
public static String codeOfDescription(String code) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].code.equals(code)) {
tmp = values()[i].description;
}
}
return tmp;
}
}
/**
*
*/
public enum TRUE_OR_FALSE {
TRUE(1, "是"), FALSE(2, "否");
private int value;
private String description;
private TRUE_OR_FALSE(int value, String description) {
this.value = value;
this.description = description;
}
public int getValue() {
return value;
}
public String getDescription() {
return description;
}
public static String valueOf(int val) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].value == val) {
tmp = values()[i].description;
}
}
return tmp;
}
}
/**
*
*/
public enum IS_DEAL {
YES(1, "已处理"), NO(2, "未处理");
private int value;
private String description;
private IS_DEAL(int value, String description) {
this.value = value;
this.description = description;
}
public int getValue() {
return value;
}
public String getDescription() {
return description;
}
public static String valueOf(int val) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].value == val) {
tmp = values()[i].description;
}
}
return tmp;
}
}
/**
*
*/
public enum SYS_LOCALE_RESOURCE_TYPE {
COMMON(1,"通用"),
MODULE(10, "模块"),METHOD(11, "功能"),BUTTON(12, "按钮");
private int value;
private String description;
private SYS_LOCALE_RESOURCE_TYPE(int value, String description) {
this.value = value;
this.description = description;
}
public int getValue() {
return value;
}
public String getDescription() {
return description;
}
public static String valueOf(int val) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].value == val) {
tmp = values()[i].description;
}
}
return tmp;
}
}
/**
*
* user
* admin
* sa admin
*/
public enum USER_TYPE {
USER(1,"user", "普通用户"), ADMIN(2,"admin", "系统管理员"), SA(3,"sa", "超级管理员");
private int value;
private String code;
private String description;
private USER_TYPE(int value,String code, String description) {
this.value = value;
this.code = code;
this.description = description;
}
public int getValue() {
return value;
}
public String getDescription() {
return description;
}
public String getCode(){
return code;
}
public static String valueOf(int val) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].value == val) {
tmp = values()[i].description;
}
}
return tmp;
}
public static int descOf(String desc) {
int tmp = 1;
for (int i = 0; i < values().length; i++) {
if (values()[i].description.equals(desc)) {
tmp = values()[i].value;
}
}
return tmp;
}
}
/**
*
*/
public enum METHOD_LEVEL {
MODULE(1, "模块"), METHOD(2, "功能"), BUTTON(3, "按钮");
private int value;
private String description;
private METHOD_LEVEL(int value, String description) {
this.value = value;
this.description = description;
}
public int getValue() {
return value;
}
public String getDescription() {
return description;
}
public static String valueOf(int val) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].value == val) {
tmp = values()[i].description;
}
}
return tmp;
}
public static int descOf(String desc) {
int tmp = 1;
for (int i = 0; i < values().length; i++) {
if (values()[i].description.equals(desc)) {
tmp = values()[i].value;
}
}
return tmp;
}
}
/**
*
*/
public enum IS_VAILD {
VAILD(1, "有效"), INVAILD(2, "无效");
private int value = 0;
private String description = null;
public int getValue() {
return value;
}
public String getDescription() {
return description;
}
private IS_VAILD(int value, String description) {
this.value = value;
this.description = description;
}
public static String valueOf(int val) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].value == val) {
tmp = values()[i].description;
}
}
return tmp;
}
}
/**
*
*/
public enum ASC_OR_DESC {
ASC(1, "正序"), DESC(2, "倒序");
private int value = 0;
private String description = null;
public int getValue() {
return value;
}
public String getDescription() {
return description;
}
private ASC_OR_DESC(int value, String description) {
this.value = value;
this.description = description;
}
public static String valueOf(int val) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].value == val) {
tmp = values()[i].description;
}
}
return tmp;
}
}
}

@ -0,0 +1,11 @@
package cn.estsh.i3plus.pojo.base.enumutil;
/**
* @Description :
* @Reference :
* @Author : alwaysfrin
* @CreateDate : 2018-10-23 15:53
* @Modify:
**/
public class MesEnumUtil {
}

@ -0,0 +1,88 @@
package cn.estsh.i3plus.pojo.base.enumutil;
/**
* @Description :
* @Reference :
* @Author : alwaysfrin
* @CreateDate : 2018-09-12 14:32
* @Modify:
**/
public class ResourceEnumUtil {
/**
*
*/
public enum EXCEPTION {
NOT_NULL("10001", "不为空"),
NEED_NULL("10002", "需要为空"),
NEED_TRUE("10003", "需要为True"),
NEED_FALSE("10004", "需要为False"),
LOWER_NUM("10005", "小于最小值"),
OVER_NUM("10006", "大于最大值"),
NUM_NOT_EQUAL("10007", "字符值不相同"),
STRING_NOT_EQUAL("10008", "数字值不相同"),
OVER_SIZE("10009", "长度超出"),
NOT_ZERO("10010", "不能为0");
private String code;
private String description;
EXCEPTION(String code, String description) {
this.code = code;
this.description = description;
}
public String getCode() {
return code;
}
public String getDescription() {
return description;
}
public static String codeOfDescription(String code) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].code.equals(code)) {
tmp = values()[i].description;
}
}
return tmp;
}
}
/**
*
*/
public enum MESSAGE {
SUCCESS("20001", "成功"),
FAIL("20002", "失败");
private String code;
private String description;
MESSAGE(String code, String description) {
this.code = code;
this.description = description;
}
public String getCode() {
return code;
}
public String getDescription() {
return description;
}
public static String codeOfDescription(String code) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].code.equals(code)) {
tmp = values()[i].description;
}
}
return tmp;
}
}
}

@ -0,0 +1,11 @@
package cn.estsh.i3plus.pojo.base.enumutil;
/**
* @Description :
* @Reference :
* @Author : alwaysfrin
* @CreateDate : 2018-10-23 15:53
* @Modify:
**/
public class WmsEnumUtil {
}

@ -525,7 +525,14 @@ public class BaseRepositoryImpl<T, ID extends Serializable> extends SimpleJpaRep
@Override
public List<T> findByHqlWherePage(String hqlWhere, Pager pager) {
return entityManager.createQuery(hqlWhere)
StringBuffer queryString = new StringBuffer();
queryString.append("from " + persistentClass.getSimpleName() + " as model where 1=1 ");
if (hqlWhere != null && hqlWhere.length() > 0) {
queryString.append(hqlWhere);
}
return entityManager.createQuery(queryString.toString())
.setFirstResult(pager.getStartRow())
.setMaxResults(pager.getPageSize())
.getResultList();

@ -0,0 +1,413 @@
package cn.estsh.i3plus.pojo.base.tool;
import cn.estsh.i3plus.pojo.base.enumutil.CommonEnumUtil;
import java.text.SimpleDateFormat;
import java.util.Date;
public class HqlPack {
/**
* sql
* @param data
* @return
*/
public static String getSafeParam(Object data){
return data.toString().replaceAll(";","")
.replaceAll("'","")
.replaceAll("\"","")
.replaceAll("delete","")
.replaceAll("update","")
.replaceAll("insert","");
}
/**
*
* @param startDate
* @param endDate
* @param columnName HQL
* @param result HQL
* @param isShowTime
*/
public static void timeBuilder( String startDate,String endDate, String columnName, StringBuffer result, boolean isShowTime) {
startDate = getSafeParam(startDate);
endDate = getSafeParam(endDate);
if (startDate == null || startDate.trim().length() == 0) {
startDate = "1900-01-01";
} else {
startDate = startDate.trim();
}
if (isShowTime && startDate.trim().length()<=11) {
startDate+= " 00:00:00";
}
if (endDate == null || endDate.trim().length() == 0) {
endDate = "2100-01-01";
} else {
endDate = endDate.trim();
}
if (isShowTime&& endDate.trim().length()<=11) {
endDate+= " 23:59:59";
}
result.append(" and model." + columnName + " between '" + startDate + "' and '" + endDate + "'");
}
/**
*
* @param date
* @param columnName HQL
* @param result HQL
* @param showTaday true:false:
* @param isShowTime
*/
public static void timeBuilder( String date, String columnName, StringBuffer result, Boolean showTaday,boolean isShowTime) {
date = getSafeParam(date);
String today = (new SimpleDateFormat("yyyy-MM-dd")).format(new Date());
if(date != null && date.trim().length() > 0 && (date.length() == 1 || ",".equals(date))){
//只有一个逗号
date = "";
}
if(date != null && date.trim().length() > 0){
String[] time = date.split(",");
if(time.length == 1){
//只有开始日期,没有结束日期
result.append(" and model." + columnName + " like '%" + time[0] + "%'");
}else if (time.length == 2 && ((time[0] != null && time[0].trim().length() > 0) || (time[1] != null & time[1].trim().length() > 0))) {
if (time[0] == null || time[0].trim().length() == 0) {
time[0] = "1900-01-01";
} else {
time[0] = time[0].trim();
}
if (isShowTime && time[0].trim().length()<=11) {
time[0]+= " 00:00:00";
}
if (time[1] == null || time[1].trim().length() == 0) {
time[1] = "2100-01-01";
} else {
time[1] = time[1].trim();
}
if (isShowTime&& time[1].trim().length()<=11) {
time[1]+= " 23:59:59";
}
result.append(" and model." + columnName + " between '" + time[0] + "' and '" + time[1] + "'");
} else {
if (showTaday) {
if (isShowTime) {
result.append(" and model." + columnName + " between '" + today + " 00:00:00' and '" + today + " 23:59:59'");
}else{
result.append(" and model." + columnName + " between '" + today + "' and '" + today + "'");
}
}
}
}
}
/**
* Stringorder by
* @param columnName
* @param result
*/
public static void getOrderByPack(Object order[],String[] columnName, StringBuffer result) {
String sqlStr = "";
String orderByStr = "";
for(int i=0;i < order.length;i++){
if (order[i] != null && order[i].toString().trim().length() > 0) {
if(Integer.parseInt(order[i].toString()) == 1){
order[i] = "asc";
}else{
order[i] = "desc";
}
sqlStr += " model."+columnName[i]+" " + order[i].toString() + ",";
}
}
if(sqlStr.length() > 0 && sqlStr.lastIndexOf(",") == sqlStr.length() -1){
sqlStr = sqlStr.substring(0,sqlStr.length()-1);
orderByStr = " order by " + sqlStr;
}
result.append(orderByStr);
}
/**
* Stringlike
* @param str
* @param columnName
* @param result
*/
public static void getStringLikerPack(String str,String columnName, StringBuffer result) {
if (str != null && str.trim().length() > 0) {
str = getSafeParam(str);
result.append(" and model."+columnName+" like '%" + str + "%'");
}
}
/**
* Stringlike
* @param str
* @param columnName
* @param result
*/
public static void getStringLikerPackOr(String str,String columnName, StringBuffer result) {
if (str != null && str.trim().length() > 0) {
str = getSafeParam(str);
result.append(" or model."+columnName+" like '%" + str + "%'");
}
}
/**
* Stringlike()
* @param str
* @param columnName
* @param result
*/
public static void getStringRightLikerPack(String str,String columnName, StringBuffer result) {
if (str != null && str.trim().length() > 0) {
str = getSafeParam(str);
result.append(" and model."+columnName+" like '" + str + "%'");
}
}
/**
* Stringlike()
* @param str
* @param columnName
* @param result
*/
public static void getStringLeftLikerPack(String str,String columnName, StringBuffer result) {
if (str != null && str.trim().length() > 0) {
str = getSafeParam(str);
result.append(" and model."+columnName+" like '%" + str + "'");
}
}
/**
* Stringequal
* @param columnName
* @param result
*/
public static void getStringEqualPack(String data,String columnName, StringBuffer result) {
if(data != null && data.trim().length() > 0){
data = getSafeParam(data);
result.append(" and model."+columnName+" = '" + data + "'");
}
}
/**
* longintequal
* @param columnName
* @param result
*/
public static void getNumEqualPack(Object data,String columnName, StringBuffer result) {
if(data!=null&&Long.parseLong(data.toString()) > 0){
data = getSafeParam(data);
result.append(" and model."+columnName+" = " + data + "");
}
}
/**
* longintequal
* @param columnName
* @param result
*/
public static void getNumEqualPackForZero(Object data,String columnName, StringBuffer result) {
if(data!=null&&Long.parseLong(data.toString()) >= 0){
data = getSafeParam(data);
result.append(" and model."+columnName+" = " + data + "");
}
}
/**
* longintequal
* @param columnName
* @param result
*/
public static void getNumWithZeroEqualPack(Object data,String columnName, StringBuffer result) {
if(data!=null&&Long.parseLong(data.toString()) >= 0){
data = getSafeParam(data);
result.append(" and model."+columnName+" = " + data + "");
}
}
/**
* longint
* @param columnName
* @param result
*/
public static void getNumBiggerPack(Object data,String columnName, StringBuffer result) {
if(data!=null&&Long.parseLong(data.toString()) > 0){
data = getSafeParam(data);
result.append(" and model."+columnName+" > " + data + "");
}
}
/**
* longint
* @param columnName
* @param result
*/
public static void getNumSmallerPack(Object data,String columnName, StringBuffer result) {
if(data!=null&&Long.parseLong(data.toString()) > 0){
data = getSafeParam(data);
result.append(" and model."+columnName+" < " + data + "");
}
}
/**
* double
* @param columnName
* @param result
*/
public static void getDoubleBiggerPack(Object data,String columnName, StringBuffer result) {
if(data!=null&&Double.parseDouble(data.toString()) > 0){
data = getSafeParam(data);
result.append(" and model."+columnName+" > " + data + "");
}
}
/**
* double
* @param columnName
* @param result
*/
public static void getDoubleSmallerPack(Object data,String columnName, StringBuffer result) {
if(data!=null&&Double.parseDouble(data.toString()) > 0){
data = getSafeParam(data);
result.append(" and model."+columnName+" < " + data + "");
}
}
/**
* longintequal
* @param columnName
* @param result
*/
public static void getNumEqualPack(Object data,String columnName, StringBuffer result,Integer expvalue) {
if(data!=null&&Long.parseLong(data.toString()) > (long)expvalue){
data = getSafeParam(data);
result.append(" and model."+columnName+" = " + data + "");
}
}
/**
* doubleequal
* @param columnName
* @param result
*/
public static void getNumEqualPackDouble(Object data,String columnName, StringBuffer result) {
if(data!=null&&Double.parseDouble(data.toString()) > 0){
data = getSafeParam(data);
result.append(" and model."+columnName+" = " + data + "");
}
}
/**
* longintequal
* @param columnName
* @param result
*/
public static void getNumEqualPackDouble(Object data,String columnName, StringBuffer result,Integer expvalue) {
if(data!=null&&Double.parseDouble(data.toString()) > (double)expvalue){
data = getSafeParam(data);
result.append(" and model."+columnName+" = " + data + "");
}
}
/**
* longintequal()
* @param columnName
* @param result
*/
public static void getNumNOEqualPack(Object data,String columnName, StringBuffer result) {
if(data!=null){
data = getSafeParam(data);
result.append(" and model."+columnName+" <> " + data + "");
}
}
/**
* in
* @param data
* @param columnName
* @param result
*/
public static void getInPack(String data,String columnName, StringBuffer result){
if (data!=null&&data.trim().length()>0) {
data = getSafeParam(data);
result.append(" and model."+columnName+" in ( "+ data+ " )");
}
}
/**
* in String
* @param data
* @param columnName
* @param result
*/
public static void getInPackString(String data,String columnName, StringBuffer result){
if (data != null && data.trim().length()>0) {
data = getSafeParam(data);
//判断最后一位是不是逗号
if(data.lastIndexOf(",") != (data.length()-1)){
data += ",";
}
String[] dataArray = data.substring(0, data.length()-1).split(",");
data = "";
for (int i = 0 ; i < dataArray.length ;i++) {
if(i == dataArray.length -1){
data += "'" + dataArray[i] + "'";
}else{
data += "'" + dataArray[i] + "',";
}
}
result.append(" and model."+columnName+" in ( "+ data+ " )");
}
}
/**
* in String
* @param data
* @param columnName
* @param result
*/
public static void getNotInPackString(String data,String columnName, StringBuffer result){
if (data != null && data.trim().length()>0) {
data = getSafeParam(data);
//判断最后一位是不是逗号
if(data.lastIndexOf(",") != (data.length()-1)){
data += ",";
}
String[] dataArray = data.substring(0, data.length()-1).split(",");
data = "";
for (int i = 0 ; i < dataArray.length ;i++) {
if(i == dataArray.length -1){
data += "'" + dataArray[i] + "'";
}else{
data += "'" + dataArray[i] + "',";
}
}
result.append(" and model."+columnName+" not in ( "+ data+ " )");
}
}
/**
* not in
* @param data
* @param columnName
* @param result
*/
public static void getNotInPack(String data,String columnName, StringBuffer result){
if (data!=null&&data.trim().length()>0) {
data = getSafeParam(data);
result.append(" and model."+columnName+" not in ( "+ data+ " )");
}
}
public static void getCheckStrInArr(String data,String columnName,StringBuffer result){
if (data!=null&&data.trim().length()>0) {
data = getSafeParam(data);
result.append(" and dbo.CheckStrInArr('"+data+"',model."+columnName+")>0 ");
}
}
}

@ -0,0 +1,163 @@
package cn.estsh.i3plus.pojo.base.tool;
import java.text.SimpleDateFormat;
import java.util.Date;
public class SqlPack {
/**
*
* @param date
* @param columnName HQL
* @param result HQL
* @param showTaday true:false:
*/
public static void timeBuilder( String date, String columnName, StringBuffer result, Boolean showTaday,Boolean isshowTime) {
String today = (new SimpleDateFormat("yyyy-MM-dd")).format(new Date());
if(date != null && date.trim().length() > 0){
String[] time = date.split(",");
if(time.length == 1){
//只有开始日期,没有结束日期
result.append(" and " + columnName + " like '%" + time[0] + "%'");
}else if (time.length == 2 && ((time[0] != null && time[0].trim().length() > 0) || (time[1] != null & time[1].trim().length() > 0))) {
if (time[0] == null || time[0].trim().length() == 0) {
time[0] = "1900-01-01";
} else{
time[0] = time[0].trim();
}
if (isshowTime && time[0].trim().length()<=11) {
time[0]+=" 00:00:00";
}
if (time[1] == null || time[1].trim().length() == 0) {
time[1] = "2100-01-01";
} else {
time[1] = time[1].trim();
}
if (isshowTime && time[1].trim().length()<=11) {
time[1]+=" 23:59:59";
}
result.append(" and " + columnName + " between '" + time[0] + "' and '" + time[1] + "'");
} else {
if (showTaday) {
if (isshowTime) {
result.append(" and " + columnName + " between '" + today + " 00:00:00' and '" + today + " 23:59:59'");
}else{
result.append(" and " + columnName + " between '" + today + "' and '" + today + "'");
}
}
}
}
}
/**
* Stringlike
* @param str
* @param columnName
* @param result
*/
public static void getStringLikerPack(String str,String columnName, StringBuffer result) {
if (str != null && str.trim().length() > 0) {
result.append(" and "+columnName+" like '%" + str + "%'");
}
}
public static void getStringLikerPack(String str,String columnName, StringBuffer result,String andor) {
if (str != null && str.trim().length() > 0) {
result.append(" "+andor+" "+columnName+" like '%" + str + "%'");
}
}
/**
* Stringlike()
* @param str
* @param columnName
* @param result
*/
public static void getStringRightLikerPack(String str,String columnName, StringBuffer result) {
if (str != null && str.trim().length() > 0) {
result.append(" and "+columnName+" like '" + str + "%'");
}
}
/**
* Stringlike()
* @param str
* @param columnName
* @param result
*/
public static void getStringLeftLikerPack(String str,String columnName, StringBuffer result) {
if (str != null && str.trim().length() > 0) {
result.append(" and "+columnName+" like '%" + str + "'");
}
}
/**
* Stringequal
* @param columnName
* @param result
*/
public static void getStringEqualPack(String data,String columnName, StringBuffer result) {
if(data != null && data.trim().length() > 0){
result.append(" and "+columnName+" = '" + data + "'");
}
}
/**
* longintequal
* @param columnName
* @param result
*/
public static void getNumEqualPack(Object data,String columnName, StringBuffer result) {
if(data!=null&&Long.parseLong(data.toString()) > 0){
result.append(" and "+columnName+" = " + data + "");
}
}
/**
* longintequal
* @param columnName
* @param result
*/
public static void getNumEqualPack(Object data,String columnName, StringBuffer result,Integer expvalue) {
if(data!=null&&Long.parseLong(data.toString()) > (long)expvalue){
result.append(" and "+columnName+" = " + data + "");
}
}
/**
* longintequal()
* @param columnName
* @param result
*/
public static void getNumNOEqualPack(Object data,String columnName, StringBuffer result) {
if(data!=null){
result.append(" and "+columnName+" <> " + data + "");
}
}
/**
* in
* @param data
* @param columnName
* @param result
*/
public static void getInPack(String data,String columnName, StringBuffer result){
if (data!=null&&data.trim().length()>0) {
result.append(" and "+columnName+" in ( "+ data+ " )");
}
}
/**
* not in
* @param data
* @param columnName
* @param result
*/
public static void getNotInPack(String data,String columnName, StringBuffer result){
if (data!=null&&data.trim().length()>0) {
result.append(" and "+columnName+" not in ( "+ data+ " )");
}
}
public static void getCheckStrInArr(String data,String columnName,StringBuffer result){
if (data!=null&&data.trim().length()>0) {
result.append(" and dbo.CheckStrInArr('"+data+"',"+columnName+")>0 ");
}
}
}

@ -1,6 +1,6 @@
package cn.estsh.i3plus.pojo.platform.bean;
import cn.estsh.i3plus.pojo.model.base.BaseBean;
import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;

@ -1,6 +1,6 @@
package cn.estsh.i3plus.pojo.platform.bean;
import cn.estsh.i3plus.pojo.model.base.BaseBean;
import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;

@ -1,6 +1,6 @@
package cn.estsh.i3plus.pojo.platform.bean;
import cn.estsh.i3plus.pojo.model.base.BaseBean;
import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;

@ -1,6 +1,6 @@
package cn.estsh.i3plus.pojo.platform.bean;
import cn.estsh.i3plus.pojo.model.base.BaseBean;
import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;

@ -1,6 +1,6 @@
package cn.estsh.i3plus.pojo.platform.bean;
import cn.estsh.i3plus.pojo.model.base.BaseBean;
import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;

@ -1,6 +1,6 @@
package cn.estsh.i3plus.pojo.platform.bean;
import cn.estsh.i3plus.pojo.model.base.BaseBean;
import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;

@ -1,6 +1,6 @@
package cn.estsh.i3plus.pojo.platform.bean;
import cn.estsh.i3plus.pojo.model.base.BaseBean;
import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;

@ -1,6 +1,6 @@
package cn.estsh.i3plus.pojo.platform.bean;
import cn.estsh.i3plus.pojo.model.base.BaseBean;
import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;

@ -1,6 +1,6 @@
package cn.estsh.i3plus.pojo.platform.bean;
import cn.estsh.i3plus.pojo.model.base.BaseBean;
import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;

@ -1,6 +1,6 @@
package cn.estsh.i3plus.pojo.platform.bean;
import cn.estsh.i3plus.pojo.model.base.BaseBean;
import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;

@ -1,6 +1,6 @@
package cn.estsh.i3plus.pojo.platform.bean;
import cn.estsh.i3plus.pojo.model.base.BaseBean;
import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;

@ -1,6 +1,6 @@
package cn.estsh.i3plus.pojo.platform.bean;
import cn.estsh.i3plus.pojo.model.base.BaseBean;
import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;

@ -1,6 +1,6 @@
package cn.estsh.i3plus.pojo.platform.bean;
import cn.estsh.i3plus.pojo.model.base.BaseBean;
import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;

@ -1,6 +1,6 @@
package cn.estsh.i3plus.pojo.platform.bean;
import cn.estsh.i3plus.pojo.model.base.BaseBean;
import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;

@ -1,6 +1,6 @@
package cn.estsh.i3plus.pojo.platform.bean;
import cn.estsh.i3plus.pojo.model.base.BaseBean;
import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;

@ -1,6 +1,6 @@
package cn.estsh.i3plus.pojo.platform.bean;
import cn.estsh.i3plus.pojo.model.base.BaseBean;
import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;

@ -1,6 +1,6 @@
package cn.estsh.i3plus.pojo.platform.bean;
import cn.estsh.i3plus.pojo.model.base.BaseBean;
import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;

@ -1,6 +1,6 @@
package cn.estsh.i3plus.pojo.platform.bean;
import cn.estsh.i3plus.pojo.model.base.BaseBean;
import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;

@ -1,6 +1,6 @@
package cn.estsh.i3plus.pojo.platform.bean;
import cn.estsh.i3plus.pojo.model.base.BaseBean;
import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;

@ -1,6 +1,6 @@
package cn.estsh.i3plus.pojo.platform.bean;
import cn.estsh.i3plus.pojo.model.base.BaseBean;
import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;

@ -1,6 +1,6 @@
package cn.estsh.i3plus.pojo.platform.bean;
import cn.estsh.i3plus.pojo.model.base.BaseBean;
import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;

@ -1,6 +1,6 @@
package cn.estsh.i3plus.pojo.platform.bean;
import cn.estsh.i3plus.pojo.model.base.BaseBean;
import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;

@ -1,6 +1,6 @@
package cn.estsh.i3plus.pojo.platform.bean;
import cn.estsh.i3plus.pojo.model.base.BaseBean;
import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;

@ -0,0 +1,53 @@
package cn.estsh.i3plus.pojo.platform.sqlpack;
import cn.estsh.i3plus.pojo.base.tool.HqlPack;
import cn.estsh.i3plus.pojo.platform.bean.SysLocaleLanguage;
import cn.estsh.i3plus.pojo.platform.bean.SysLocaleResource;
/**
* @Description :
* @Reference :
* @Author : alwaysfrin
* @CreateDate : 2018-10-23 21:15
* @Modify:
**/
public class CoreHqlPack {
/**
*
* @param sysLocaleResource
* @return
*/
public static String packHqlSysLocaleResource(SysLocaleResource sysLocaleResource){
StringBuffer result = new StringBuffer();
//查询日期
HqlPack.timeBuilder(sysLocaleResource.getCreateDateTimeStart(),sysLocaleResource.getCreateDateTimeEnd(),
"createDateTime", result, false);
//数字类型封装
HqlPack.getNumEqualPack(sysLocaleResource.getResourceType(),"resourceType",result);
//字符串类型封装
HqlPack.getStringEqualPack(sysLocaleResource.getLanguageCode(),"languageCode",result);
return result.toString();
}
/**
*
* @param lang
* @return
*/
public static String packHqlSysLocaleLanguage(SysLocaleLanguage lang) {
StringBuffer result = new StringBuffer();
//查询日期
HqlPack.timeBuilder(lang.getCreateDateTimeStart(),lang.getCreateDateTimeEnd(),
"createDateTime", result, false);
//数字类型封装
HqlPack.getNumEqualPack(lang.getLanguageCode(),"languageCode",result);
//字符串类型封装
HqlPack.getStringEqualPack(lang.getLanguageName(),"languageName",result);
return result.toString();
}
}
Loading…
Cancel
Save