|
@@ -372,6 +372,63 @@ public class MESHelperServiceImpl implements MESHelperService {
|
|
|
return rmap;
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public Map<Object,Object> StateEventDetail(String data) {
|
|
|
+ Map<Object, Object> rmap = new HashMap<Object, Object>();
|
|
|
+ JSONObject object = JSONObject.fromObject(data);
|
|
|
+ Object object1 = object.get("data");
|
|
|
+ JSONObject obj = JSONObject.fromObject(object1);
|
|
|
+ JSONObject StateEventDetail=obj.getJSONObject("StateEventDetail");
|
|
|
+ if(StateEventDetail!=null){
|
|
|
+ int st_id=baseDao.getSeqId("StateEventDetail_seq");
|
|
|
+ String MessageSendTime=Time(StateEventDetail.getString("MessageSendTime"));
|
|
|
+ String CompletionStatusType=StateEventDetail.getString("CompletionStatusType");
|
|
|
+ String LineFullPath=StateEventDetail.getString("LineFullPath");
|
|
|
+ String LineName=StateEventDetail.getString("LineName");
|
|
|
+ String MachineFullPath=StateEventDetail.getString("MachineFullPath");
|
|
|
+ String MachineName=StateEventDetail.getString("MachineName");
|
|
|
+ String JobFullPath=StateEventDetail.getString("JobFullPath");
|
|
|
+ String JobName=StateEventDetail.getString("JobName");
|
|
|
+ String RecipeFullPath=StateEventDetail.getString("RecipeFullPath");
|
|
|
+ String RecipeName=StateEventDetail.getString("RecipeName");
|
|
|
+ String SetupFullPath=StateEventDetail.getString("SetupFullPath");
|
|
|
+ String SetupName=StateEventDetail.getString("SetupName");
|
|
|
+ String BoardFullPath=StateEventDetail.getString("BoardFullPath");
|
|
|
+ String BoardName=StateEventDetail.getString("BoardName");
|
|
|
+ String OrderNumber=StateEventDetail.getString("OrderNumber");
|
|
|
+ String ConveyorMode=StateEventDetail.getString("ConveyorMode");
|
|
|
+ String DownloadMode=StateEventDetail.getString("DownloadMode");
|
|
|
+ String FactoryLayoutPath=StateEventDetail.getString("FactoryLayoutPath");
|
|
|
+ String MachineId=StateEventDetail.getString("MachineId");
|
|
|
+ String MachineType=StateEventDetail.getString("MachineType");
|
|
|
+ String TypeName=StateEventDetail.getString("TypeName");
|
|
|
+ String ProcessingAreaCount=StateEventDetail.getString("ProcessingAreaCount");
|
|
|
+ String StationSoftwareVersion=StateEventDetail.getString("StationSoftwareVersion");
|
|
|
+ String MonitoringServiceVersion=StateEventDetail.getString("MonitoringServiceVersion");
|
|
|
+ String ComputerAddress=StateEventDetail.getString("ComputerAddress");
|
|
|
+ baseDao.execute("insert into StateEventDetail(ST_ID, MESSAGESENDTIME, COMPLETIONSTATUSTYPE, LINEFULLPATH, LINENAME, MACHINEFULLPATH, MACHINENAME, JOBFULLPATH, JOBNAME, RECIPEFULLPATH, RECIPENAME, SETUPFULLPATH, SETUPNAME, BOARDFULLPATH, BOARDNAME, ORDERNUMBER, CONVEYORMODE, DOWNLOADMODE, FACTORYLAYOUTPATH, MACHINEID, MACHINETYPE, TYPENAME, PROCESSINGAREACOUNT, STATIONSOFTWAREVERSION, MONITORINGSERVICEVERSION, COMPUTERADDRESS)" +
|
|
|
+ "values("+st_id+", to_date('"+MessageSendTime+"','yyyy-mm-dd hh24:mi:ss'), '"+CompletionStatusType+"', '"+LineFullPath+"', '"+LineName+"', '"+MachineFullPath+"', '"+MachineName+"', '"+JobFullPath+"', '"+JobName+"', '"+RecipeFullPath+"', '"+RecipeName+"', '"+SetupFullPath+"', '"+SetupName+"', '"+BoardFullPath+"', '"+BoardName+"', '"+OrderNumber+"', '"+ConveyorMode+"', '"+DownloadMode+"', '"+FactoryLayoutPath+"', '"+MachineId+"', '"+MachineType+"', '"+TypeName+"', '"+ProcessingAreaCount+"', '"+StationSoftwareVersion+"', '"+MonitoringServiceVersion+"', '"+ComputerAddress+"')");
|
|
|
+ JSONArray ProcessingAreaStateList=StateEventDetail.getJSONArray("ProcessingAreaStateList");
|
|
|
+ for (int i=0;i<ProcessingAreaStateList.size();i++){
|
|
|
+ JSONObject map1=ProcessingAreaStateList.getJSONObject(i);
|
|
|
+ String ProcessingArea=map1.getString("ProcessingArea");
|
|
|
+ String Conveyor=map1.getString("Conveyor");
|
|
|
+ String CurrentStateBegin=map1.getString("CurrentStateBegin");
|
|
|
+ String CurrentStateCode=map1.getString("CurrentStateCode");
|
|
|
+ String CurrentStateDescription=map1.getString("CurrentStateDescription");
|
|
|
+ String PreviousStateCode=map1.getString("PreviousStateCode");
|
|
|
+ String PreviousStateDescription=map1.getString("PreviousStateDescription");
|
|
|
+ baseDao.execute("insert into ProcessingAreaStateList(RAS_ID, RAS_STID, PROCESSINGAREA, CONVEYOR, CURRENTSTATEBEGIN, CURRENTSTATECODE, CURRENTSTATEDESCRIPTION, PREVIOUSSTATECODE, PREVIOUSSTATEDESCRIPTION)" +
|
|
|
+ "values(ProcessingAreaStateList_seq.nextval,'"+st_id+"','"+ProcessingArea+"','"+Conveyor+"','"+CurrentStateBegin+"'," +
|
|
|
+ "'"+CurrentStateCode+"','"+CurrentStateDescription+"','"+PreviousStateCode+"','"+PreviousStateDescription+"')");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ rmap.put("code","0");
|
|
|
+ rmap.put("result","OK");
|
|
|
+ rmap.put("ServerMessage","MES:贴片机数据记录成功");
|
|
|
+ return rmap;
|
|
|
+ }
|
|
|
+
|
|
|
@Override
|
|
|
public Map<Object,Object> SendPlaceData(String data) {
|
|
|
Map<Object, Object> rmap = new HashMap<Object, Object>();
|