|
@@ -76,6 +76,12 @@ public class MESHelperServiceImpl implements MESHelperService {
|
|
|
case SetAddressInfo:
|
|
|
remap = SetAddressInfo(json);
|
|
|
break;
|
|
|
+ case SetAddressInfo_IN:
|
|
|
+ remap = SetAddressInfo_IN(json);
|
|
|
+ break;
|
|
|
+ case SetIMEIInfo_IN:
|
|
|
+ remap = SetIMEIInfo_IN(json);
|
|
|
+ break;
|
|
|
case GetMaster:
|
|
|
remap = GetMaster(json);
|
|
|
break;
|
|
@@ -575,6 +581,63 @@ public class MESHelperServiceImpl implements MESHelperService {
|
|
|
return rmap;
|
|
|
}
|
|
|
|
|
|
+ private Map<Object,Object> SetAddressInfo_IN(JSONObject map){
|
|
|
+ //实际业务数据
|
|
|
+ Map<Object, Object> rmap = new HashMap<>();
|
|
|
+ String oErrMessage = null;
|
|
|
+ if(map.get("iSN")==null){
|
|
|
+ oErrMessage = "SN不能为空";
|
|
|
+ rmap.put("oErrMessage",oErrMessage);
|
|
|
+ return rmap;
|
|
|
+ }
|
|
|
+ String iSN=map.get("iSN").toString();
|
|
|
+ String iWIFI = null;
|
|
|
+ String iBT = null;
|
|
|
+ String iCode1 = null;
|
|
|
+ String iCode2 = null;
|
|
|
+ String iCode3 = null;
|
|
|
+ if(map.get("iMAC")!=null){
|
|
|
+ iWIFI=map.get("iMAC").toString();
|
|
|
+ }
|
|
|
+ if(map.get("iWIFI")!=null){
|
|
|
+ iWIFI=map.get("iWIFI").toString();
|
|
|
+ }
|
|
|
+ if(map.get("iBT")!=null){
|
|
|
+ iBT=map.get("iBT").toString();
|
|
|
+ }
|
|
|
+ if(map.get("iCode1")!=null){
|
|
|
+ iCode1=map.get("iCode1").toString();
|
|
|
+ }
|
|
|
+ if(map.get("iCode2")!=null){
|
|
|
+ iCode2=map.get("iCode2").toString();
|
|
|
+ }
|
|
|
+ if(map.get("iCode3")!=null){
|
|
|
+ iCode3=map.get("iCode3").toString();
|
|
|
+ }
|
|
|
+
|
|
|
+ SqlRowList rs=baseDao.queryForRowSet("select ms_makecode from makeserial where ms_sncode='"+iSN+"' order by ms_id desc");
|
|
|
+ if(rs.next()){
|
|
|
+ String makecode=rs.getString("ms_makecode");
|
|
|
+ rs=baseDao.queryForRowSet("select mal_mac from makeaddresslist where mal_makecode='"+makecode+"' and mal_mac='"+iWIFI+"' and mal_bt='"+iBT+"'");
|
|
|
+ if(!rs.next()){
|
|
|
+ rmap.put("oErrMessage","MAC:"+iWIFI+"不在工单"+makecode+"导入清单中,不允许回传");
|
|
|
+ return rmap;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ List<String> list = new ArrayList<String>();
|
|
|
+ list = baseDao.callProcedureWithOut("CS_SETADDRESSINFO", new Object[]{
|
|
|
+ String.valueOf(iSN),
|
|
|
+ String.valueOf(iWIFI),
|
|
|
+ String.valueOf(iBT),
|
|
|
+ String.valueOf(iCode1),
|
|
|
+ String.valueOf(iCode2),
|
|
|
+ String.valueOf(iCode3)
|
|
|
+ }, new Integer[]{1, 2, 3, 4, 5, 6}, new Integer[]{7});
|
|
|
+ oErrMessage = list.get(0);
|
|
|
+ rmap.put("oErrMessage",oErrMessage);
|
|
|
+ return rmap;
|
|
|
+ }
|
|
|
+
|
|
|
private Map<Object,Object> GetMaster(JSONObject map){
|
|
|
//实际业务数据
|
|
|
Map<Object, Object> rmap = new HashMap<>();
|
|
@@ -692,6 +755,76 @@ public class MESHelperServiceImpl implements MESHelperService {
|
|
|
rmap.put("oErrMessage",oErrMessage);
|
|
|
return rmap;
|
|
|
}
|
|
|
+
|
|
|
+ private Map<Object,Object> SetIMEIInfo_IN(JSONObject map){
|
|
|
+ //实际业务数据
|
|
|
+ Map<Object, Object> rmap = new HashMap<>();
|
|
|
+ String oErrMessage = null;
|
|
|
+ if(map.get("iSN")==null){
|
|
|
+ oErrMessage = "SN不能为空";
|
|
|
+ rmap.put("oErrMessage",oErrMessage);
|
|
|
+ return rmap;
|
|
|
+ }
|
|
|
+ String iSN=map.get("iSN").toString();
|
|
|
+ String iIMEI1=null;
|
|
|
+ String iIMEI2 = null;
|
|
|
+ String iIMEI3 = null;
|
|
|
+ String iMEID = null;
|
|
|
+ String iNET = null;
|
|
|
+ String iID1 = null;
|
|
|
+ String iID2 = null;
|
|
|
+ String iID3 = null;
|
|
|
+ if(map.get("iIMEI1")!=null){
|
|
|
+ iIMEI1=map.get("iIMEI1").toString();
|
|
|
+ }
|
|
|
+ if(map.get("iIMEI2")!=null){
|
|
|
+ iIMEI2=map.get("iIMEI2").toString();
|
|
|
+ }
|
|
|
+ if(map.get("iIMEI3")!=null){
|
|
|
+ iIMEI3=map.get("iIMEI3").toString();
|
|
|
+ }
|
|
|
+ if(map.get("iMEID")!=null){
|
|
|
+ iMEID=map.get("iMEID").toString();
|
|
|
+ }
|
|
|
+ if(map.get("iNET")!=null){
|
|
|
+ iNET=map.get("iNET").toString();
|
|
|
+ }
|
|
|
+ if(map.get("iID1")!=null){
|
|
|
+ iID1=map.get("iID1").toString();
|
|
|
+ }
|
|
|
+ if(map.get("iID2")!=null){
|
|
|
+ iID2=map.get("iID2").toString();
|
|
|
+ }
|
|
|
+ if(map.get("iID3")!=null){
|
|
|
+ iID3=map.get("iID3").toString();
|
|
|
+ }
|
|
|
+ SqlRowList rs=baseDao.queryForRowSet("select ms_makecode from makeserial where ms_sncode='"+iSN+"' order by ms_id desc");
|
|
|
+ if(rs.next()){
|
|
|
+ String makecode=rs.getString("ms_makecode");
|
|
|
+ rs=baseDao.queryForRowSet("select mal_mac from makeimeilist where mil_makecode='"+makecode+"' and mil_imei1='"+iIMEI1+"'");
|
|
|
+ if(!rs.next()){
|
|
|
+ rmap.put("oErrMessage","IMEI:"+iIMEI1+"不在工单"+makecode+"导入清单中,不允许回传");
|
|
|
+ return rmap;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ List<String> list = new ArrayList<String>();
|
|
|
+ list = baseDao.callProcedureWithOut("CS_SETIMEIINFO", new Object[]{
|
|
|
+ String.valueOf(iSN),
|
|
|
+ String.valueOf(iIMEI1),
|
|
|
+ String.valueOf(iIMEI2),
|
|
|
+ String.valueOf(iIMEI3),
|
|
|
+ String.valueOf(iMEID),
|
|
|
+ String.valueOf(iNET),
|
|
|
+ String.valueOf(""),
|
|
|
+ String.valueOf(iID1),
|
|
|
+ String.valueOf(iID2),
|
|
|
+ String.valueOf(iID3),
|
|
|
+ }, new Integer[]{1, 2, 3, 4, 5, 6,7,8,9,10}, new Integer[]{11});
|
|
|
+ oErrMessage = list.get(0);
|
|
|
+ rmap.put("oErrMessage",oErrMessage);
|
|
|
+ return rmap;
|
|
|
+ }
|
|
|
+
|
|
|
private Map<Object,Object> SetTestDetail(JSONObject map){
|
|
|
//实际业务数据
|
|
|
Map<Object, Object> rmap = new HashMap<>();
|