| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- package xin.glue.ui.J.J02;
- 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.vo.PosParameter;
- public class ModifyInvoiceInfoOfDelivery extends PosActivity {
- public String runActivity(PosContext context) {
- String[] pCoilNo = (String[]) context.get("COIL_NO" ); //UPDATE TBJ01_DLIV_DIR
- //这里取发货清单号,来做相应的处理
- String[] pInvNo = (String[]) context.get("SHIP_INVNO" ); //SET INV_NO = :1
- // , INV_DTIME = TO_CHAR(SYSDATE,'YYYYMMDDHH24MISS')
- // , INV_PRNCNT = NVL(INV_PRNCNT,0) + 1
- String[] pDlivDirNo = (String[]) context.get("DLIV_DIRNO" ); //WHERE DLIV_DIRNO = :2
-
- //车辆号
- String[] TRANS_CAR_NO = (String[]) context.get("TRANS_CAR_NO" );
-
- int iCnt = 0;
- if( pCoilNo != null ) {
- iCnt = pCoilNo.length;
- }
- PosParameter param = null;
- for( int i = 0; i < iCnt; i++ ) {
- param = new PosParameter();
-
- //发货清单号由排车确定的时候生成,不能多次改变。唯一标识发货明细。质保书使用
- param.setValueParamter( 0, TRANS_CAR_NO[i] );
- param.setValueParamter( 1, pDlivDirNo[i] );
- if( i == 0 ) {
- getDao("mesdao").update("UIJ020400.InvoiceInfo.DeliverDir.Save", param);
- } else {
- if( pDlivDirNo[i-1].equals(pDlivDirNo[i]) )
- continue;
- else
- getDao("mesdao").update("UIJ020400.InvoiceInfo.DeliverDir.Save", param);
- }
- }
- return PosBizControlConstants.SUCCESS;
- }
- }
|