ebc1aa34d68daf29c96248b19f37ee9a68222dc7.svn-base 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. package xin.glue.ui.B.common;
  2. import com.posdata.glue.biz.activity.PosActivity;
  3. import com.posdata.glue.biz.activity.PosSubBizControlActivity;
  4. import com.posdata.glue.biz.constants.PosBizControlConstants;
  5. import com.posdata.glue.context.PosContext;
  6. import com.posdata.glue.dao.PosGenericDao;
  7. import com.posdata.glue.dao.vo.PosParameter;
  8. import com.posdata.glue.dao.vo.PosRowSet;
  9. /**
  10. *
  11. * @Description {界面ID:UIB030203}
  12. * @author 梅贵平{meiguiping}
  13. * @date 2009-8-31 下午05:10:20
  14. * @JDK Version jdk1.4.2
  15. */
  16. public class SaveShiftGroup extends PosActivity
  17. {
  18. public String runActivity(PosContext context)
  19. {
  20. PosGenericDao dao = this.getDao("mesdao");
  21. PosParameter param = null;
  22. String[]OPE_ID = (String[])context.get("OPE_ID");//登录人
  23. String[]GR_GROUP = (String[])context.get("GR_GROUP");//组
  24. String[]GR_TEL = (String[])context.get("GR_TEL");//
  25. String[]GR_SHIFT = (String[])context.get("GR_SHIFT");//班次
  26. String[]XX = (String[])context.get("XX");
  27. String[]REG_ID = (String[])context.get("REG_ID");
  28. param = new PosParameter();
  29. param.setWhereClauseParameter(0, REG_ID[0]);
  30. PosRowSet rowset1 = dao.find("UIB030203_01.SELECT", param);
  31. if(rowset1.count()==0)
  32. {
  33. param = new PosParameter();
  34. param.setValueParamter(0, REG_ID[0]);
  35. dao.insert("UIB030203_01.INSERT", param);
  36. }
  37. if(XX != null)
  38. {
  39. param = new PosParameter();
  40. param.setWhereClauseParameter(0, GR_GROUP[0]);
  41. param.setWhereClauseParameter(1, GR_SHIFT[0]);
  42. param.setWhereClauseParameter(2, OPE_ID[0]);
  43. dao.update("UIB030203_01.UPDATE" , param);
  44. }
  45. param = new PosParameter();
  46. param.setWhereClauseParameter(0, REG_ID[0]);
  47. PosRowSet rowset3 = dao.find("UIB030203_01.SELECT", param);
  48. context.put("ShiftGroup", rowset3);
  49. return PosBizControlConstants.SUCCESS;
  50. }
  51. }