zhanghe hai 2 semanas
pai
achega
3219dcec30

+ 7 - 0
src/main/java/com/jeesite/modules/mes/service/MesProductRecordService.java

@@ -1195,4 +1195,11 @@ public class MesProductRecordService extends CrudService<MesProductRecordDao, Me
 	public void updateResultByCheckFirst(MesProductRecord mesProductRecord){
 		mesProductRecordDao.updateResultByCheckFirst(mesProductRecord);
 	}
+	public List<MesProductRecord> findBySnAndOprnoLike(String sn, String fOprno) {
+		MesProductRecord query = new MesProductRecord();
+		query.setSn(sn);
+		query.setOprno(fOprno);
+		query.getSqlMap().getWhere().and("oprno", QueryType.LIKE, fOprno);
+		return findList(query);
+	}
 }

+ 12 - 7
src/main/java/com/jeesite/modules/mes/service/MesProductService.java

@@ -46,7 +46,7 @@ public class MesProductService extends CrudService<MesProductDao, MesProduct> {
 	public List<MesProduct> findByCount(MesProduct mesProduct) {
 		return  dao.findByCount(mesProduct);
 	}
-	
+
 	/**
 	 * 查询分页数据
 	 * @param mesProduct 查询条件
@@ -57,7 +57,7 @@ public class MesProductService extends CrudService<MesProductDao, MesProduct> {
 	public Page<MesProduct> findPage(MesProduct mesProduct) {
 		return super.findPage(mesProduct);
 	}
-	
+
 	/**
 	 * 查询列表数据
 	 * @param mesProduct
@@ -67,7 +67,7 @@ public class MesProductService extends CrudService<MesProductDao, MesProduct> {
 	public List<MesProduct> findList(MesProduct mesProduct) {
 		return super.findList(mesProduct);
 	}
-	
+
 	/**
 	 * 保存数据(插入或更新)
 	 * @param mesProduct
@@ -77,7 +77,7 @@ public class MesProductService extends CrudService<MesProductDao, MesProduct> {
 	public void save(MesProduct mesProduct) {
 		super.save(mesProduct);
 	}
-	
+
 	/**
 	 * 更新状态
 	 * @param mesProduct
@@ -87,7 +87,7 @@ public class MesProductService extends CrudService<MesProductDao, MesProduct> {
 	public void updateStatus(MesProduct mesProduct) {
 		super.updateStatus(mesProduct);
 	}
-	
+
 	/**
 	 * 删除数据
 	 * @param mesProduct
@@ -99,6 +99,11 @@ public class MesProductService extends CrudService<MesProductDao, MesProduct> {
 	}
 
 
+	// 根据sn查询
+	public MesProduct findBySn(String sn){
+		MesProduct m1 = new MesProduct();
+		m1.setSn(sn);
+		return dao.findInfo(m1);
+	}
 
-	
-}
+}

+ 15 - 5
src/main/java/com/jeesite/modules/mes/service/MesTemplateItemsService.java

@@ -51,7 +51,7 @@ public class MesTemplateItemsService extends CrudService<MesTemplateItemsDao, Me
 	public Page<MesTemplateItems> findPage(MesTemplateItems mesTemplateItems) {
 		return super.findPage(mesTemplateItems);
 	}
-	
+
 	/**
 	 * 查询列表数据
 	 * @param mesTemplateItems
@@ -132,7 +132,7 @@ public class MesTemplateItemsService extends CrudService<MesTemplateItemsDao, Me
 		CacheUtils.put("product","templateId"+mesTemplateItems.getTemplateId(),"");
 		super.save(mesTemplateItems);
 	}
-	
+
 	/**
 	 * 更新状态
 	 * @param mesTemplateItems
@@ -142,7 +142,7 @@ public class MesTemplateItemsService extends CrudService<MesTemplateItemsDao, Me
 	public void updateStatus(MesTemplateItems mesTemplateItems) {
 		super.updateStatus(mesTemplateItems);
 	}
-	
+
 	/**
 	 * 删除数据
 	 * @param mesTemplateItems
@@ -152,5 +152,15 @@ public class MesTemplateItemsService extends CrudService<MesTemplateItemsDao, Me
 	public void delete(MesTemplateItems mesTemplateItems) {
 		super.delete(mesTemplateItems);
 	}
-	
-}
+
+
+	// 根据工位号查询相关工位模板清单
+	public List<MesTemplateItems> findListByOprno(String oprno){
+		MesTemplateItems m1 = new MesTemplateItems();
+		m1.setStatus("0");
+		m1.setOprno(oprno);
+		String orderBy = "a.rank asc, a.craft asc";
+		m1.getSqlMap().getOrder().setOrderBy(orderBy);
+		return findList(m1);
+	}
+}