076c3dc49f5fbc42f53c332d63c65cce2cbb10fc.svn-base 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. package xin.glue.ui.G.G04;
  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 XinAddYardAddr extends PosActivity {
  7. public String runActivity(PosContext context) {
  8. String[] yardAddr = (String[])context.get("YARD_ADDR");
  9. String[] storelay = (String[])context.get("STORELAY");
  10. String[] addrService = (String[])context.get("ADDR_SERVICE");
  11. int storelayCount = Integer.parseInt(storelay[0]);
  12. PosParameter param = new PosParameter();
  13. if(storelayCount > 0){
  14. for(int i = 1 ; i <= storelayCount ; i++){
  15. param = new PosParameter();
  16. String spStorelay = null;
  17. if(i < 10) spStorelay = "0" + i;
  18. else spStorelay = i + "";
  19. param.setValueParamter(0, yardAddr[0]);
  20. param.setValueParamter(1, spStorelay);
  21. this.getDao("mesdao").insert("UIG040022_SLAB_YARD.insert", param);
  22. }
  23. param = new PosParameter();
  24. param.setValueParamter(0, yardAddr[0]);
  25. param.setValueParamter(1, addrService[0]);
  26. this.getDao("mesdao").insert("UIG040022_ST_SLAB_YARD.insert",param);
  27. }
  28. return PosBizControlConstants.SUCCESS;
  29. }
  30. }