Pārlūkot izejas kodu

获取外部SN接口修改

callm 2 mēneši atpakaļ
vecāks
revīzija
b801621f85

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

@@ -897,7 +897,7 @@ 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+"')");
+		SqlRowList rs=baseDao.queryForRowSet("select li_upperline,ms_firstsn,ms_sncode 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")){
@@ -905,7 +905,7 @@ public class MESHelperServiceImpl implements MESHelperService {
 				return rmap;
 			}
 		}
-		Object iMakecode=baseDao.getFieldDataByCondition(""+Master+".makeserial","ms_makecode","ms_id=(select max(ms_id) from "+Master+".makeserial where ms_sncode='"+iSN+"')");
+		Object iMakecode=baseDao.getFieldDataByCondition(""+Master+".makeserial","ms_makecode","ms_id=(select max(ms_id) from "+Master+".makeserial where ms_sncode='"+iSN+"' or ms_firstsn='"+iSN+"')");
 		if(iMakecode==null){
 			oErrMessage = iSN+"无关联工单";
 			rmap.put("oErrMessage",oErrMessage);