package xin.glue.ui.K.K01; import java.sql.CallableStatement; import xin.glue.ui.common.ProduceFactory; import com.posdata.glue.biz.activity.PosActivity; import com.posdata.glue.biz.constants.PosBizControlConstants; import com.posdata.glue.context.PosContext; import com.posdata.glue.dao.PosGenericDao; import com.posdata.glue.dao.vo.PosParameter; import com.posdata.glue.dao.vo.PosRowSet; public class FJHSaveBJBack extends PosActivity { public String runActivity(PosContext context) { String[] rowStatus = (String[]) context.get("rowStatus"); //发运指示号 String[] DLIV_DIRNO = (String[]) context.get("DLIV_DIRNO"); //录入人 String[] REG_ID = (String[]) context.get("REG_ID"); String[] OLD_SAMPL_NO = (String[]) context.get("OLD_SAMPL_NO"); PosParameter param1 = new PosParameter(); PosParameter param2 = new PosParameter(); param1.setWhereClauseParameter(0, REG_ID[0]); param1.setWhereClauseParameter(1, DLIV_DIRNO[0]); getDao("mesdao").update("UIH052201_01.update", param1); param2.setWhereClauseParameter(0, DLIV_DIRNO[0]); getDao("mesdao").update("UIH052201_01.delete", param2); //调用存货异动点存储过程 //SENDERP(OLD_SAMPL_NO,REG_ID[0]); 20220513由于开平板不发送发货信息,所以取消此处的取消发货异动点 return PosBizControlConstants.SUCCESS; } public void SENDERP(String[] OLD_SAMPL_NO,String REGID) { int iCnt = 0; if (OLD_SAMPL_NO != null) { iCnt = OLD_SAMPL_NO.length; } CallableStatement cstm = null; for (int i = 0; i < iCnt; i++) { try { //调用存货异动点存储过程 ProduceFactory PD= new ProduceFactory(); PD.ErpDataCover("HCOIL",OLD_SAMPL_NO[i],"69A","1","N",REGID,"热轧非计划退货"); PD.ErpDataCover("HCOIL",OLD_SAMPL_NO[i],"11AC","0","N",REGID ,"非计划退货取消判定"); } catch (Exception ex) { ex.printStackTrace(); System.out.println("明细数据发送到一体化失败*******"); } finally { if (cstm != null) try { cstm.close(); System.out.println("明细数据发送到一体化成功*------------------"); } catch (Exception e) { e.printStackTrace(); } } } } }