Browse Source

接料数据接口更新

callm 11 months ago
parent
commit
4fe6a18bd6
1 changed files with 22 additions and 2 deletions
  1. 22 2
      src/main/java/com/uas/eis/serviceImpl/MESHelperServiceImpl.java

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

@@ -298,6 +298,26 @@ public class MESHelperServiceImpl implements MESHelperService {
 				}catch (Exception e){
 				}catch (Exception e){
 
 
 				}
 				}
+				String smt_line="";
+				if(LineName.equals("Line1")){
+					smt_line="SMT-1";
+				}
+				if(LineName.equals("Line2")){
+					smt_line="SMT-2";
+				}
+				if(LineName.equals("Line3")){
+					smt_line="SMT-3";
+				}
+				if(LineName.equals("Line4")){
+					smt_line="SMT-4";
+				}
+				if(LineName.equals("Line5")){
+					smt_line="SMT-5";
+				}
+				if(LineName.equals("Line6")){
+					smt_line="SMT-6";
+				}
+				Object makecode=baseDao.getFieldDataByCondition("Line","li_makecode","li_code='"+smt_line+"'");
 				int sr_id=baseDao.getSeqId("SETUPRESULTDETAIL_seq");
 				int sr_id=baseDao.getSeqId("SETUPRESULTDETAIL_seq");
 				baseDao.execute("insert into SETUPRESULTDETAIL(sr_id,ACTIONTYPE,LINENAME,SetupName,ORDERNUMBER,MACHINENAME," +
 				baseDao.execute("insert into SETUPRESULTDETAIL(sr_id,ACTIONTYPE,LINENAME,SetupName,ORDERNUMBER,MACHINENAME," +
 						"TABLEID,DOCKINGSTATIONID,OPERATOR,TableLocation,FeederTypeName,FeederID,MessageSendTime)values('"+sr_id+"'," +
 						"TABLEID,DOCKINGSTATIONID,OPERATOR,TableLocation,FeederTypeName,FeederID,MessageSendTime)values('"+sr_id+"'," +
@@ -305,8 +325,8 @@ public class MESHelperServiceImpl implements MESHelperService {
 						"'"+Operator+"','"+TableLocation+"','"+FeederTypeName+"','"+FeederID+"',to_date('"+MessageSendTime+"','yyyy-mm-dd hh24:mi:ss'))");
 						"'"+Operator+"','"+TableLocation+"','"+FeederTypeName+"','"+FeederID+"',to_date('"+MessageSendTime+"','yyyy-mm-dd hh24:mi:ss'))");
 				int pu_id=baseDao.getSeqId("PACKAGINGUNIT_seq");
 				int pu_id=baseDao.getSeqId("PACKAGINGUNIT_seq");
 				baseDao.execute("insert into PACKAGINGUNIT(PU_ID,PUID,PU_SRID,ComponentBarcodeFragment,ComponentBarcode,OriginalQuantity,Quantity,CreateDate," +
 				baseDao.execute("insert into PACKAGINGUNIT(PU_ID,PUID,PU_SRID,ComponentBarcodeFragment,ComponentBarcode,OriginalQuantity,Quantity,CreateDate," +
-						"DateCode,BatchId,MsdLevel)values('"+pu_id+"','"+PUID+"','"+sr_id+"','"+ComponentBarcodeFragment+"','"+ComponentBarcode+"','"+OriginalQuantity+"','"+Quantity+"',to_date('"+CreateDate+"','yyyy-mm-dd hh24:mi:ss')," +
-						"'"+DateCode+"','"+BatchId+"','"+MsdLevel+"')");
+						"DateCode,BatchId,MsdLevel,makecode)values('"+pu_id+"','"+PUID+"','"+sr_id+"','"+ComponentBarcodeFragment+"','"+ComponentBarcode+"','"+OriginalQuantity+"','"+Quantity+"',to_date('"+CreateDate+"','yyyy-mm-dd hh24:mi:ss')," +
+						"'"+DateCode+"','"+BatchId+"','"+MsdLevel+"','"+makecode!=null?makecode.toString():""+"')");
 				if(LockInfoList!=null){
 				if(LockInfoList!=null){
 					JSONArray LockInfoItem=LockInfoList.getJSONArray("LockInfoItem");
 					JSONArray LockInfoItem=LockInfoList.getJSONArray("LockInfoItem");
 					for(int i=0;i<LockInfoItem.size();i++){
 					for(int i=0;i<LockInfoItem.size();i++){