Browse Source

贴片机接口上传

callm 2 years ago
parent
commit
bf48374f6b
1 changed files with 24 additions and 1 deletions
  1. 24 1
      src/main/java/com/uas/eis/serviceImpl/MESHelperServiceImpl.java

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

@@ -296,20 +296,43 @@ public class MESHelperServiceImpl implements MESHelperService {
 				String VerifiedDate=PackagingUnitDetail.getString("VerifiedDate");
 				JSONObject LockInfoList=PackagingUnitDetail.getJSONObject("LockInfoList");
 				JSONObject SplicedPackagingUnitList=PackagingUnitDetail.getJSONObject("SplicedPackagingUnitList");
+				int sr_id=baseDao.getSeqId("SETUPRESULTDETAIL_seq");
 				baseDao.execute("insert into SETUPRESULTDETAIL(pu_id,ACTIONTYPE,LINENAME,ORDERNUMBER,MACHINENAME," +
-						"TABLEID,DOCKINGSTATIONID,OPERATOR,TableLocation,FeederTypeName,FeederID)values(SETUPRESULTDETAIL_seq.nextval," +
+						"TABLEID,DOCKINGSTATIONID,OPERATOR,TableLocation,FeederTypeName,FeederID)values('"+sr_id+"'," +
 						"'"+ActionType+"','"+LineName+"','"+ORDERNUMBER+"','"+MachineName+"','"+TableId+"','"+DockingStationID+"'," +
 						"'"+Operator+"','"+TableLocation+"','"+FeederTypeName+"','"+FeederID+"')");
+				int pu_id=baseDao.getSeqId("PACKAGINGUNIT_seq");
+				baseDao.execute("insert into PACKAGINGUNIT(PU_ID,PU_SRID,ComponentBarcode,OriginalQuantity,Quantity,CreateDate," +
+						"DateCode,Batch2,MsdLevel)values('"+pu_id+"','"+sr_id+"','"+ComponentBarcode+"','"+OriginalQuantity+"','"+Quantity+"','to_char('"+CreateDate+"','yyyy-mm-dd hh24:mi:ss')" +
+						"'"+DateCode+"','"+Batch2+"','"+MsdLevel+"')");
 				if(LockInfoList!=null){
 					JSONArray LockInfoItem=LockInfoList.getJSONArray("LockInfoItem");
 					for(int i=0;i<=LockInfoItem.size();i++){
 						JSONObject map=LockInfoItem.getJSONObject(i);
+						String Date=map.getString("Date");
+						String Message=map.getString("Message");
+						String Reason=map.getString("Reason");
+						String Source=map.getString("Source");
+						baseDao.execute("insert into LOCKINFOLIST(LF_ID,lf_puid,INDATE,MESSAGE,REASON,SOURCE)" +
+								"values(LOCKINFOLIST_seq.nextval,'"+pu_id+"','to_date('"+Date+"','yyyy-mm-dd hh24:mi:ss'),'"+Message+"'," +
+								"'"+Reason+"','"+Source+"')");
 					}
 				}
 				if(SplicedPackagingUnitList!=null){
 					JSONArray SplicedPackagingUnitItem=LockInfoList.getJSONArray("SplicedPackagingUnitItem");
 					for(int i=0;i<=SplicedPackagingUnitItem.size();i++){
 						JSONObject map=SplicedPackagingUnitItem.getJSONObject(i);
+						String UID1=map.getString("UID");
+						String ComponentBarcode1=map.getString("ComponentBarcode");
+						String ComponentBarcodeFragment=map.getString("ComponentBarcodeFragment");
+						String ComponentName=map.getString("ComponentName");
+						String OriginalQuantity1=map.getString("OriginalQuantity");
+						String Quantity1=map.getString("Quantity");
+						String ManufacturePartNumber=map.getString("ManufacturePartNumber");
+						String Manufacturer=map.getString("Manufacturer");
+						String Supplier=map.getString("Supplier");
+						baseDao.execute("insert into SPLICEDPACKAGING (SP_ID,SP_PUID,COMPONENTBARCODE,ORIGINALQUANTITY,QUANTITY)" +
+								"value(SPLICEDPACKAGING_seq.nextval,'"+pu_id+"','"+ComponentBarcode1+"','"+OriginalQuantity1+"','"+Quantity1+"')");
 					}
 				}
 			}