d2893bd2678e3a7abb1d85c1929b8a6e6dcdced5.svn-base 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. package xin.glue.nui.E.E03;
  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.PosGenericDao;
  6. import com.posdata.glue.dao.vo.PosRowSet;
  7. public class RepHandled extends PosActivity {
  8. /*
  9. * step:
  10. * 1 - 充当对象订单选取
  11. * 2 - 充当对象物料选取
  12. * 3 - 充当结果录入
  13. */
  14. public String runActivity(PosContext ctx) {
  15. int step = 1;
  16. if (getProperty("step") != null)
  17. step = Integer.parseInt(getProperty("step"));
  18. PosGenericDao dao = getDao();
  19. if (step == 1) {
  20. PosRowSet rowSet = dao.findByQueryStatement("SELECT PRC_STS FROM TBE05_JOB WHERE PLT = 'R' AND MAIN_PGMID = 'NIE031000'");
  21. if ("C".equals(rowSet.next().getAttribute("PRC_STS"))) {
  22. return "F";
  23. }
  24. } else {
  25. PosRowSet rowSet = dao.findByQueryStatement("SELECT PRC_STS FROM TBE05_JOB_DET WHERE PLT = 'R' AND MAIN_PGMID = 'NIE031000' AND SEQ = 2");
  26. if ("A".equals(rowSet.next().getAttribute("PRC_STS"))) {
  27. return "F";
  28. }
  29. }
  30. return PosBizControlConstants.SUCCESS;
  31. }
  32. private PosGenericDao getDao() {
  33. String testdao = getProperty("dao");
  34. if (testdao == null)
  35. testdao = "mesdao";
  36. else
  37. testdao = testdao.trim();
  38. return getDao(testdao);
  39. }
  40. }