33922f2c7454800272bf044775ae4675995d60f0.svn-base 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. package xin.glue.ui.H.H02;
  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. import com.posdata.glue.util.log.PosLog;
  8. import com.posdata.glue.util.log.PosLogFactory;
  9. public class saveShift extends PosActivity {
  10. public String runActivity(PosContext context) {
  11. //早班的时间 上
  12. String[] shiftAS = (String[]) context.get("shiftAS");
  13. //早班的时间 下
  14. String[] shiftAX = (String[]) context.get("shiftAX");
  15. //中班的时间 上
  16. String[] shiftBS = (String[]) context.get("shiftBS");
  17. //中班的时间 下
  18. String[] shiftBX = (String[]) context.get("shiftBX");
  19. //晚班的时间 上
  20. String[] shiftCS = (String[]) context.get("shiftCS");
  21. //晚班的时间 下
  22. String[] shiftCX = (String[]) context.get("shiftCX");
  23. //操作人
  24. String[] REG_ID = (String[]) context.get("REG_ID");
  25. //中班的结束时间是否操作0点
  26. String[] ZB = (String[]) context.get("ZB");
  27. PosParameter param0 = new PosParameter();
  28. param0.setWhereClauseParameter(0, shiftAS[0]);
  29. param0.setWhereClauseParameter(1, shiftAX[0]);
  30. param0.setWhereClauseParameter(2, REG_ID[0]);
  31. getDao("mesdao").update("UIH060020_01.update", param0);
  32. PosParameter param1 = new PosParameter();
  33. param1.setWhereClauseParameter(0, shiftBS[0]);
  34. param1.setWhereClauseParameter(1, shiftBX[0]);
  35. param1.setWhereClauseParameter(2, REG_ID[0]);
  36. //这里加入中班是否超过0点的标志,为了切时间的时候判断。
  37. //如果超过0点就判断早班和晚班的情况,其它为中班。如果不超过0点就判断早班和中班的情况,其它为晚班
  38. param1.setWhereClauseParameter(3, ZB[0]);
  39. getDao("mesdao").update("UIH060020_02.update", param1);
  40. PosParameter param2 = new PosParameter();
  41. param2.setWhereClauseParameter(0, shiftCS[0]);
  42. param2.setWhereClauseParameter(1, shiftCX[0]);
  43. param2.setWhereClauseParameter(2, REG_ID[0]);
  44. getDao("mesdao").update("UIH060020_03.update", param2);
  45. return PosBizControlConstants.SUCCESS;
  46. }
  47. }