Forráskód Böngészése

如果是6楼和7楼返回SN

callm 2 hónapja
szülő
commit
39029e69a5

+ 9 - 1
src/main/java/com/uas/eis/serviceImpl/MESHelperServiceImpl.java

@@ -892,6 +892,14 @@ public class MESHelperServiceImpl implements MESHelperService {
 			return rmap;
 		}
 		String iSN=map.get("iSN").toString();
+		SqlRowList rs=baseDao.queryForRowSet("select li_upperline from "+Master+".makeserial left join "+Master+".line on ms_linecode=li_code where ms_id=(select max(ms_id) from "+Master+".makeserial where ms_sncode='"+iSN+"')");
+		if(rs.next()){
+			String li_upperline=rs.getString("li_upperline");
+			if(li_upperline.equals("7F")||li_upperline.equals("6F")){
+				rmap.put("msl_sncode",iSN);
+				return rmap;
+			}
+		}
 		Object iMakecode=baseDao.getFieldDataByCondition(""+Master+".makeserial","ms_makecode","ms_id=(select max(ms_id) from "+Master+".makeserial where ms_sncode='"+iSN+"')");
 		if(iMakecode==null){
 			oErrMessage = iSN+"无关联工单";
@@ -899,7 +907,7 @@ public class MESHelperServiceImpl implements MESHelperService {
 			return rmap;
 		}
 		//之前有获取过的
-		SqlRowList rs=baseDao.queryForRowSet("select msl_sncode from "+Master+".makesnlist where msl_beforesn='"+iSN+"'");
+		rs=baseDao.queryForRowSet("select msl_sncode from "+Master+".makesnlist where msl_beforesn='"+iSN+"'");
 		if(rs.next()){
 			rmap.put("msl_sncode",rs.getString("msl_sncode"));
 			return rmap;