9deeebc601b6424e983237fa353e4d10fc4daeef.svn-base 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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. import com.posdata.glue.dao.vo.PosRowSet;
  7. public class XinDeleteYardAddr extends PosActivity {
  8. public String runActivity(PosContext context) {
  9. String[] yardAddr = (String[])context.get("YARD_ADDR");
  10. String[] storelay = (String[])context.get("YARD_COUNT");
  11. String[] chk = (String[])context.get("CHK");
  12. int storelayCount = Integer.parseInt(storelay[0]);
  13. PosParameter param = new PosParameter();
  14. PosRowSet rowset = null;
  15. if(storelayCount > 0){
  16. for(int i = 0 ; i < yardAddr.length ; i++){
  17. if(chk[i].equals("Y")){
  18. param = new PosParameter();
  19. param.setWhereClauseParameter(0, yardAddr[i]);
  20. rowset = this.getDao("mesdao").find("UIG040022_SELECT_YARD_02.select",param);
  21. if(rowset.hasNext()){
  22. continue;
  23. }
  24. param = new PosParameter();
  25. param.setValueParamter(0, yardAddr[i]);
  26. this.getDao("mesdao").update("UIG040022_SLAB_YARD.delete", param);
  27. param = new PosParameter();
  28. param.setValueParamter(0, yardAddr[i]);
  29. this.getDao("mesdao").update("UIG040022_ST_SLAB_YARD.delete",param);
  30. }
  31. }
  32. }
  33. return PosBizControlConstants.SUCCESS;
  34. }
  35. }