Merge remote-tracking branch 'remotes/origin/dev' into test
commit
cc655f9741
@ -0,0 +1,58 @@
|
||||
package cn.estsh.i3plus.pojo.ptl.bean;
|
||||
|
||||
|
||||
import cn.estsh.i3plus.pojo.base.bean.BaseBean;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.hibernate.annotations.DynamicInsert;
|
||||
import org.hibernate.annotations.DynamicUpdate;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Table;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @Description :配置表
|
||||
* @Reference :
|
||||
* @Author : wangjie
|
||||
* @CreateDate : 2019-06-04
|
||||
* @Modify:
|
||||
**/
|
||||
@Data
|
||||
@Entity
|
||||
@DynamicInsert
|
||||
@DynamicUpdate
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Table(name = "PTL_CONFIG")
|
||||
@Api("PTL配置表")
|
||||
public class PtlConfig extends BaseBean implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = -8720461903130735342L;
|
||||
|
||||
@Column(name = "CFG_CODE")
|
||||
@ApiParam("配置代码")
|
||||
private String cfgCode;
|
||||
|
||||
@Column(name = "CFG_NAME")
|
||||
@ApiParam("配置名称")
|
||||
private String cfgName;
|
||||
|
||||
@Column(name = "CFG_TYPE")
|
||||
@ApiParam("配置类型")
|
||||
private String cfgType;
|
||||
|
||||
@Column(name = "CFG_KEY")
|
||||
@ApiParam("配置key")
|
||||
private String cfgKey;
|
||||
|
||||
@Column(name = "CFG_VALUE")
|
||||
@ApiParam("配置value")
|
||||
private String cfgValue;
|
||||
|
||||
@Column(name = "CFG_VAULE_DESC")
|
||||
@ApiParam("配置value描述")
|
||||
private String cfgValueDesc;
|
||||
}
|
@ -0,0 +1,52 @@
|
||||
package cn.estsh.i3plus.pojo.ptl.model;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.ToString;
|
||||
|
||||
/**
|
||||
* @Description :
|
||||
* @Reference :
|
||||
* @Author : joke
|
||||
* @CreateDate : 2020-02-27 5:32 下午
|
||||
* @Modify:
|
||||
**/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@ToString
|
||||
@ApiModel("actor消息类型及属性")
|
||||
public class AreaSectionTaskDetailModel {
|
||||
|
||||
private Long id;
|
||||
|
||||
@ApiParam("ip地址")
|
||||
private String ip;
|
||||
|
||||
@ApiParam("端口")
|
||||
private String port;
|
||||
|
||||
@ApiParam("亮灯方式")
|
||||
private Integer lightMode;
|
||||
|
||||
@ApiParam("亮灯颜色")
|
||||
private Integer lightColor;
|
||||
|
||||
@ApiParam("标签编号")
|
||||
private Integer tagNo;
|
||||
|
||||
@ApiParam("是否蜂鸣")
|
||||
private Integer isBuzzing;
|
||||
|
||||
@ApiParam("音乐类型")
|
||||
private Integer musicType;
|
||||
|
||||
@ApiParam("显示内容")
|
||||
private String displayContent;
|
||||
|
||||
@ApiParam("任务状态")
|
||||
private Integer status;
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
package cn.estsh.i3plus.pojo.ptl.repository;
|
||||
|
||||
|
||||
import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository;
|
||||
import cn.estsh.i3plus.pojo.ptl.bean.PtlConfig;
|
||||
|
||||
/**
|
||||
* @author Wynne.Lu
|
||||
* @date 2020/2/12 17:41
|
||||
* @desc
|
||||
*/
|
||||
|
||||
public interface PtlConfigRepository extends BaseRepository<PtlConfig, Long> {
|
||||
|
||||
}
|
@ -0,0 +1,121 @@
|
||||
package cn.estsh.i3plus.pojo.ptl.sqlpack;
|
||||
|
||||
import cn.estsh.i3plus.pojo.base.bean.BaseBean;
|
||||
import cn.estsh.i3plus.pojo.base.bean.DdlPackBean;
|
||||
import cn.estsh.i3plus.pojo.base.enumutil.CommonEnumUtil;
|
||||
import cn.estsh.i3plus.pojo.base.enumutil.WmsEnumUtil;
|
||||
import cn.estsh.i3plus.pojo.base.tool.DdlPreparedPack;
|
||||
import cn.estsh.i3plus.pojo.base.tool.HqlPack;
|
||||
import cn.estsh.i3plus.pojo.ptl.bean.PtlConfig;
|
||||
import cn.estsh.i3plus.pojo.ptl.bean.PtlPrinterConfigure;
|
||||
import cn.estsh.i3plus.pojo.ptl.bean.PtlPrintingQueue;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.google.common.base.Strings;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @Description : PTL对象封装
|
||||
* @Reference :
|
||||
* @Author : silliter.yuan
|
||||
* @CreateDate : 2020-02-28 10:45
|
||||
* @Modify:
|
||||
**/
|
||||
public class PtlHqlPack {
|
||||
|
||||
/**
|
||||
* 封装公用查询参数
|
||||
*
|
||||
* @param bean 实体对象
|
||||
* @param hqlStr 查询语句
|
||||
* @return 封装完成的查询语句
|
||||
*/
|
||||
public static DdlPackBean getStringBuilderPack(BaseBean bean, DdlPackBean hqlStr) {
|
||||
|
||||
// 判断工厂代码是否为空
|
||||
if (!StringUtils.isEmpty(bean.getOrganizeCode())) {
|
||||
DdlPreparedPack.getStringEqualPack(bean.getOrganizeCode(), "organizeCode", hqlStr);
|
||||
}
|
||||
|
||||
|
||||
DdlPreparedPack.getStringEqualPack(bean.getCreateUser(), "createUser", hqlStr);
|
||||
if (!StringUtils.isEmpty(bean.getCreateDateTimeStart()) && !StringUtils.isEmpty(bean.getCreateDateTimeEnd())) {
|
||||
DdlPreparedPack.timeBuilder(bean.getCreateDateTimeStart(), bean.getCreateDateTimeEnd(), "createDatetime", hqlStr, true);
|
||||
}
|
||||
// 封装有效状态、删除状态、创建人和创建时间
|
||||
DdlPreparedPack.getNumEqualPack(bean.getIsValid(), "isValid", hqlStr);
|
||||
DdlPreparedPack.getNumEqualPack(CommonEnumUtil.TRUE_OR_FALSE.FALSE.getValue(), "isDeleted", hqlStr);
|
||||
|
||||
return hqlStr;
|
||||
}
|
||||
|
||||
/**
|
||||
* 通用查询条件
|
||||
*
|
||||
* @param organizeCode
|
||||
* @return
|
||||
*/
|
||||
public static DdlPackBean getAllBaseDataByNormalPro(BaseBean baseBean, String organizeCode) {
|
||||
DdlPackBean packBean = new DdlPackBean();
|
||||
DdlPreparedPack.getStringEqualPack(organizeCode, "organizeCode", packBean);
|
||||
DdlPreparedPack.getNumEqualPack(baseBean.getIsValid(), "isValid", packBean);
|
||||
DdlPreparedPack.getNumEqualPack(CommonEnumUtil.IS_DEAL.NO.getValue(), "isDeleted", packBean);
|
||||
return packBean;
|
||||
}
|
||||
|
||||
/**
|
||||
* 打印机管理信息分页查询条件
|
||||
*
|
||||
* @param ptlPrinterConfigure
|
||||
* @return
|
||||
*/
|
||||
public static DdlPackBean packHqlPtlPrinterConfigure(PtlPrinterConfigure ptlPrinterConfigure) {
|
||||
DdlPackBean result = new DdlPackBean();
|
||||
|
||||
DdlPreparedPack.getStringLikerPack(ptlPrinterConfigure.getPrinterNo(), "printerNo", result);
|
||||
DdlPreparedPack.getStringLikerPack(ptlPrinterConfigure.getIp(), "ip", result);
|
||||
|
||||
getStringBuilderPack(ptlPrinterConfigure, result);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 待打印队列信息分页查询条件
|
||||
*
|
||||
* @param ptlPrintingQueue
|
||||
* @return
|
||||
*/
|
||||
public static DdlPackBean packHqlPtlPrintingQueueByPrintNo(PtlPrintingQueue ptlPrintingQueue) {
|
||||
DdlPackBean result = new DdlPackBean();
|
||||
|
||||
DdlPreparedPack.getNumEqualPack(WmsEnumUtil.ETC_PRINT_STATUS.NOT_HIT.getValue(), "printStatus", result);
|
||||
DdlPreparedPack.getStringLikerPack(ptlPrintingQueue.getPrintNo(), "printNo", result);
|
||||
DdlPreparedPack.getNumEqualPack(WmsEnumUtil.PRINT_TYPE.SN.getValue(), "printType", result);
|
||||
|
||||
getStringBuilderPack(ptlPrintingQueue, result);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 配置信息
|
||||
* @param ptlConfig
|
||||
* @return
|
||||
*/
|
||||
public static DdlPackBean getPtlConfig(PtlConfig ptlConfig) {
|
||||
DdlPackBean packBean = getAllBaseDataByNormalPro(ptlConfig, ptlConfig.getOrganizeCode());
|
||||
if (!StringUtils.isEmpty(ptlConfig.getCfgCode())) {
|
||||
DdlPreparedPack.getStringEqualPack(ptlConfig.getCfgCode(), "cfgCode", packBean);
|
||||
}
|
||||
if (!StringUtils.isEmpty(ptlConfig.getCfgType())) {
|
||||
DdlPreparedPack.getStringEqualPack(ptlConfig.getCfgType(), "cfgType", packBean);
|
||||
}
|
||||
if (!StringUtils.isEmpty(ptlConfig.getCfgKey())) {
|
||||
DdlPreparedPack.getStringEqualPack(ptlConfig.getCfgKey(), "cfgKey", packBean);
|
||||
}
|
||||
return packBean;
|
||||
}
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
# must be unique in a given SonarQube instance
|
||||
sonar.projectKey=i3plus.pojo:i3plus-pojo
|
||||
|
||||
# --- optional properties ---
|
||||
|
||||
# defaults to project key
|
||||
sonar.projectName=i3plus-pojo
|
||||
# defaults to 'not provided'
|
||||
sonar.projectVersion=1.0-DEV-SNAPSHOT
|
||||
|
||||
# Path is relative to the sonar-project.properties file. Defaults to .
|
||||
#sonar.sources=./
|
||||
#sonar.java.binaries=target
|
||||
|
||||
# Encoding of the source code. Default is default system encoding
|
||||
sonar.sourceEncoding=UTF-8
|
Loading…
Reference in New Issue