38469141d1fe174ad295b9279cd05e4f2e1ca5c3.svn-base 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. package xin.glue.ui.J.J02;
  2. import com.posdata.glue.biz.activity.PosActivity;
  3. import com.posdata.glue.biz.constants.PosBizControlConstants;
  4. import com.posdata.glue.context.PosContext;
  5. import com.posdata.glue.dao.vo.PosParameter;
  6. public class ModifyInvoiceInfoOfDelivery extends PosActivity {
  7. public String runActivity(PosContext context) {
  8. String[] pCoilNo = (String[]) context.get("COIL_NO" ); //UPDATE TBJ01_DLIV_DIR
  9. //这里取发货清单号,来做相应的处理
  10. String[] pInvNo = (String[]) context.get("SHIP_INVNO" ); //SET INV_NO = :1
  11. // , INV_DTIME = TO_CHAR(SYSDATE,'YYYYMMDDHH24MISS')
  12. // , INV_PRNCNT = NVL(INV_PRNCNT,0) + 1
  13. String[] pDlivDirNo = (String[]) context.get("DLIV_DIRNO" ); //WHERE DLIV_DIRNO = :2
  14. //车辆号
  15. String[] TRANS_CAR_NO = (String[]) context.get("TRANS_CAR_NO" );
  16. int iCnt = 0;
  17. if( pCoilNo != null ) {
  18. iCnt = pCoilNo.length;
  19. }
  20. PosParameter param = null;
  21. for( int i = 0; i < iCnt; i++ ) {
  22. param = new PosParameter();
  23. //发货清单号由排车确定的时候生成,不能多次改变。唯一标识发货明细。质保书使用
  24. param.setValueParamter( 0, TRANS_CAR_NO[i] );
  25. param.setValueParamter( 1, pDlivDirNo[i] );
  26. if( i == 0 ) {
  27. getDao("mesdao").update("UIJ020400.InvoiceInfo.DeliverDir.Save", param);
  28. } else {
  29. if( pDlivDirNo[i-1].equals(pDlivDirNo[i]) )
  30. continue;
  31. else
  32. getDao("mesdao").update("UIJ020400.InvoiceInfo.DeliverDir.Save", param);
  33. }
  34. }
  35. return PosBizControlConstants.SUCCESS;
  36. }
  37. }