Merge branch 'master' into test

yun-zuoyi
钮海涛 5 years ago
commit 9d64793a5f

@ -46,6 +46,8 @@ public class BaseRepositoryImpl<T, ID extends Serializable> extends SimpleJpaRep
private Class<T> persistentClass;
private SnowflakeIdMaker snowflakeIdMaker;
/* 默认查询数据条数 */
private static final Pager DEFAULT_PAGER = new Pager(10,10);
public BaseRepositoryImpl(Class<T> clz, EntityManager em, SnowflakeIdMaker snowflakeIdMaker) {
super(clz, em);
@ -507,7 +509,7 @@ public class BaseRepositoryImpl<T, ID extends Serializable> extends SimpleJpaRep
@Override
public T getByProperty(DdlPackBean packBean) {
try {
List<T> list = findByHqlWherePage(packBean,Pager.defaultMinPager());
List<T> list = findByHqlWherePage(packBean,DEFAULT_PAGER);
return list != null && list.size() != 0 ? list.get(0) : null;
}catch(NoResultException ne){
LOGGER.error("数据不存在DdlPackBean{}",packBean);
@ -520,17 +522,17 @@ public class BaseRepositoryImpl<T, ID extends Serializable> extends SimpleJpaRep
@Override
public T getByProperty(String propertyName, Object value) {
return getByPropertyPager(new String[]{propertyName}, new Object[]{value}, Pager.defaultMinPager());
return getByPropertyPager(new String[]{propertyName}, new Object[]{value}, DEFAULT_PAGER);
}
@Override
public T getByProperty(String[] propertyNames, Object[] values) {
return getByPropertyPager(propertyNames, values, Pager.defaultMinPager());
return getByPropertyPager(propertyNames, values, DEFAULT_PAGER);
}
@Override
public T getByPropertyPager(String[] propertyNames, Object[] values, Pager pager) {
pager = pager == null ? Pager.defaultMinPager(): pager;
pager = pager == null ? DEFAULT_PAGER: pager;
if(propertyNames.length != values.length){
throw new IllegalArgumentException("参数名的数量和参数值不匹配!propertyNames:" + propertyNames.length + ",values:" + values.length);
@ -601,7 +603,7 @@ public class BaseRepositoryImpl<T, ID extends Serializable> extends SimpleJpaRep
try {
if(!StringUtil.isEmpty(vendorNoStr)){
String queryString = "from " + persistentClass.getSimpleName() + " as model where model.vendorNo= :vendorNo";
list=entityManager.createQuery(queryString)
list=entityManager.createQuery(queryString)
.setParameter("vendorNo", vendorNoStr)
.getResultList();
}

@ -0,0 +1,74 @@
package cn.estsh.i3plus.pojo.mes.pcn.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 : siliter.yuan
* @CreateDate : 2020-06-17
* @Modify:
**/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name = "MES_CELL_FEED_RECORD")
@Api("工位投料履历信息")
public class MesCellFeedRecord extends BaseBean implements Serializable {
private static final long serialVersionUID = 1947971379489107783L;
@Column(name = "WORK_CENTER_CODE")
@ApiParam("工作中心")
private String workCenterCode;
@Column(name = "WORK_CELL_CODE")
@ApiParam("工作单元")
private String workCellCode;
@Column(name = "PART_NO")
@ApiParam("物料号")
private String partNo;
@Column(name = "PART_NAME")
@ApiParam("物料名称")
private String partName;
@Column(name = "RAW_TYPE")
@ApiParam("原料类型")
private String rawType;
@Column(name = "RAW_SN")
@ApiParam("原材料条码")
private String rawSn;
@Column(name = "RAW_QTY")
@ApiParam("原材料数量")
private Double rawQty;
@Column(name = "LOT_NO")
@ApiParam("关联批次")
private String lotNo;
@Column(name = "SUPPLIER_CODE")
@ApiParam("供应商代码")
private String supplierCode;
public double getRawQtyVal() {
return this.rawQty == null ? 0l : this.rawQty;
}
}

@ -0,0 +1,14 @@
package cn.estsh.i3plus.pojo.mes.pcn.repository;
import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository;
import cn.estsh.i3plus.pojo.mes.pcn.bean.MesCellFeedRecord;
/**
* @Description :
* @Reference :
* @Author : siliter.yuan
* @CreateDate : 2020-06-17 09:53
* @Modify:
**/
public interface MesCellFeedRecordRepository extends BaseRepository<MesCellFeedRecord, Long> {
}

@ -40,9 +40,13 @@ public class IfPackageDetail extends BaseBean implements Serializable {
private String partName;
@Column(name = "SERIAL_NUMBER")
@ApiParam("产品条码")
@ApiParam("过程条码")
private String serialNumber;
@Column(name = "PRODUCT_SN")
@ApiParam("产品条码")
private String productSn;
@Column(name = "PACKAGE_NO")
@ApiParam("包装条码")
private String packageNo;
@ -101,7 +105,7 @@ public class IfPackageDetail extends BaseBean implements Serializable {
private String ctNo;
@Column(name = "SAMPLE_TYPE")
@ApiParam("样本类型")
@ApiParam("条码类型")
private String sampleType;
@Column(name = "CUST_DELIVERY_LOCATION")

@ -0,0 +1,74 @@
package cn.estsh.i3plus.pojo.mes.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 : siliter.yuan
* @CreateDate : 2020-06-17
* @Modify:
**/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name = "MES_CELL_FEED_RECORD")
@Api("工位投料履历信息")
public class MesCellFeedRecord extends BaseBean implements Serializable {
private static final long serialVersionUID = 1947971369489107783L;
@Column(name = "WORK_CENTER_CODE")
@ApiParam("工作中心")
private String workCenterCode;
@Column(name = "WORK_CELL_CODE")
@ApiParam("工作单元")
private String workCellCode;
@Column(name = "PART_NO")
@ApiParam("物料号")
private String partNo;
@Column(name = "PART_NAME")
@ApiParam("物料名称")
private String partName;
@Column(name = "RAW_TYPE")
@ApiParam("原料类型")
private String rawType;
@Column(name = "RAW_SN")
@ApiParam("原材料条码")
private String rawSn;
@Column(name = "RAW_QTY")
@ApiParam("原材料数量")
private Double rawQty;
@Column(name = "LOT_NO")
@ApiParam("关联批次")
private String lotNo;
@Column(name = "SUPPLIER_CODE")
@ApiParam("供应商代码")
private String supplierCode;
public double getRawQtyVal() {
return this.rawQty == null ? 0l : this.rawQty;
}
}

@ -44,4 +44,8 @@ public class MesFiCfg extends BaseBean implements Serializable {
@Column(name = "FI_QTY")
@ApiParam("首检数量")
private Double fiQty;
@Column(name = "CHECK_ITEM_TYPE")
@ApiParam("检测项类型")
private String checkItemType;
}

@ -112,7 +112,7 @@ public class MesPackage extends BaseBean implements Serializable {
@Column(name = "SAMPLE_TYPE")
@ApiParam("条码类型")
private String sampleType;
private String sampleType = "10";
@Transient
@ApiParam("客户发往地")

@ -0,0 +1,44 @@
package cn.estsh.i3plus.pojo.mes.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;
/**
* @Author: Wynne.Lu
* @CreateDate: 2019/7/30 9:30 AM
* @Description:
**/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name = "MES_PART_SAMPLE")
@Api("产品样本配置")
public class MesPartSample extends BaseBean implements Serializable {
private static final long serialVersionUID = -9190123981329081945L;
@Column(name = "WORK_CENTER_CODE")
@ApiParam("工作中心代码")
private String workCenterCode;
@Column(name = "PART_NO")
@ApiParam("物料号")
private String partNo;
@Column(name = "QTY")
@ApiParam("数量")
private Double qty;
}

@ -104,6 +104,10 @@ public class MesQcOrder extends BaseBean implements Serializable {
@ApiParam("客户发运地")
private String custDelieryLocation;
@Column(name = "WORK_CENTER_CODE")
@ApiParam("产线")
private String workCenterCode;
@ApiParam(value = "检测结果")
@Transient
private String reulstStatus;
@ -112,10 +116,6 @@ public class MesQcOrder extends BaseBean implements Serializable {
@Transient
private String serialNumber;
@ApiParam(value = "产线")
@Transient
private String workCenterCode;
@ApiParam(value = "工单号")
@Transient
private String mesWorkNo;

@ -24,7 +24,7 @@ import java.io.Serializable;
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name = "MES_SUB_PART")
@Api("数据同步死信")
@Api("替代料")
public class MesSubPart extends BaseBean implements Serializable {
private static final long serialVersionUID = 4636507477301700549L;

@ -37,20 +37,27 @@ public class ButtonDynamicModel {
private String paramValue;
public ButtonDynamicModel(Long id, String buttonCode, String buttonName){
public ButtonDynamicModel(Long id, String buttonCode, String buttonName) {
this.id = id;
this.buttonCode = buttonCode;
this.buttonName = buttonName;
}
public ButtonDynamicModel(String buttonCode, String buttonName, String paramCode){
public ButtonDynamicModel(String buttonCode, String buttonName, String paramCode) {
this.buttonCode = buttonCode;
this.buttonName = buttonName;
this.paramCode = paramCode;
}
public ButtonDynamicModel(Long id, String buttonCode, String windowNo, String windowModuleBack, String paramCode, String paramValue){
public ButtonDynamicModel(String buttonCode, String buttonName, String paramCode, String paramValue) {
this.buttonCode = buttonCode;
this.buttonName = buttonName;
this.paramCode = paramCode;
this.paramValue = paramValue;
}
public ButtonDynamicModel(Long id, String buttonCode, String windowNo, String windowModuleBack, String paramCode, String paramValue) {
this.id = id;
this.buttonCode = buttonCode;
this.windowNo = windowNo;

@ -30,4 +30,6 @@ public class CellFeedModel {
private String scanQty;
private String LineRemainQty;
}

@ -0,0 +1,49 @@
package cn.estsh.i3plus.pojo.mes.model;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.Map;
/**
* @author Wynne.Lu
* @date 2020/6/16 14:21
* @desc
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
@Api("打包样本")
public class PackageSampleModel {
@ApiParam(name = "已打包数量")
private Double alreadyPackageCount;
@ApiParam(name = "标准打包数量")
private Double standardPackageCount;
@ApiParam(name = "样本类型")
private Map<String, String> sampleTypeMap;
@ApiParam(name = "样本类型代码")
private String lastSampleTypeCode;
@ApiParam(name = "选择的样本类型")
private String chooseSampleTypeCode;
@ApiParam(name = "强制执行工步")
private String forceStepCode;
@ApiParam(name = "强制打包密码")
private String password;
@ApiParam(name = "工厂")
private String organizeCode;
@ApiParam(name = "工单号")
private String workOrderNo;
}

@ -0,0 +1,14 @@
package cn.estsh.i3plus.pojo.mes.repository;
import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository;
import cn.estsh.i3plus.pojo.mes.bean.MesCellFeedRecord;
/**
* @Description :
* @Reference :
* @Author : siliter.yuan
* @CreateDate : 2020-06-17 09:53
* @Modify:
**/
public interface MesCellFeedRecordRepository extends BaseRepository<MesCellFeedRecord, Long> {
}

@ -0,0 +1,17 @@
package cn.estsh.i3plus.pojo.mes.repository;
import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository;
import cn.estsh.i3plus.pojo.mes.bean.MesPartSample;
import org.springframework.stereotype.Repository;
/**
* @Description :
* @Reference :
* @Author : jack.jia
* @CreateDate : 2019-04-02
* @Modify:
**/
@Repository
public interface MesPartSampleRepository extends BaseRepository<MesPartSample, Long> {
}

@ -111,6 +111,22 @@ public class MesPcnHqlPack {
return packBean;
}
/**
*
*
* @param mesCellFeedRecord
* @param org
* @return
*/
public static DdlPackBean getMesCellFeedRecord(MesCellFeedRecord mesCellFeedRecord, String org) {
DdlPackBean packBean = getAllBaseData(org);
DdlPreparedPack.getStringEqualPack(mesCellFeedRecord.getWorkCenterCode(), "workCenterCode", packBean);
DdlPreparedPack.getNumberBiggerPack(0, "rawQty", packBean);
DdlPreparedPack.getNumEqualPack(CommonEnumUtil.IS_VAILD.VAILD.getValue(), "isValid", packBean);
DdlPreparedPack.getNumEqualPack(CommonEnumUtil.TRUE_OR_FALSE.FALSE.getValue(), "isDeleted", packBean);
return packBean;
}
/**
* BOM

Loading…
Cancel
Save