00a60be5f8d9c6b5467d33b290b948bc3835bc83.svn-base 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. package xin.glue.ui.J.J02;
  2. /*
  3. * desc:为火运的与装车处理,垛位移到预装垛位。记录移垛历史信息
  4. * author:唐亮 tangliang
  5. * date:2010-3-25
  6. */
  7. import com.posdata.glue.biz.activity.PosActivity;
  8. import com.posdata.glue.biz.constants.PosBizControlConstants;
  9. import com.posdata.glue.context.PosContext;
  10. import com.posdata.glue.dao.vo.PosParameter;
  11. import com.posdata.glue.dao.vo.PosRow;
  12. import com.posdata.glue.dao.vo.PosRowSet;
  13. public class saveYZCoil extends PosActivity{
  14. public String runActivity(PosContext context)
  15. {
  16. //获取行状态
  17. String[] rowStatus = (String[]) context.get("rowStatus");
  18. String[] CHK = (String[]) context.get("CHK");
  19. //卷号
  20. String[] OLD_SAMPL_NO = (String[]) context.get("OLD_SAMPL_NO");
  21. //现在位置
  22. String[] CUR_LOAD_LOC = (String[]) context.get("CUR_LOAD_LOC");
  23. String[] REG_ID = (String[]) context.get("REG_ID");
  24. for (int i = 0; i < rowStatus.length; i++){
  25. if(CHK[i] != null && CHK[i].equals("Y")){
  26. //清除公共表信息,把正式垛位改为预装垛位
  27. PosParameter param = new PosParameter();
  28. param.setWhereClauseParameter(0,OLD_SAMPL_NO[i]);
  29. this.getDao("mesdao").update("FAHUO00_03.select", param);
  30. //清除垛位表信息
  31. PosParameter param1 = new PosParameter();
  32. param1.setWhereClauseParameter(0,OLD_SAMPL_NO[i]);
  33. this.getDao("mesdao").update("FAHUO00_04.select", param1);
  34. Number SEQ = null;
  35. int SEQ_1 = 0;
  36. // 记录库存移动的情况
  37. PosParameter param11 = new PosParameter();
  38. PosRowSet rows11 = getDao("mesdao").find("UIH050700_05.select", param11);
  39. if(rows11.hasNext()){
  40. PosRow row11 = rows11.next();
  41. SEQ = (Number) row11.getAttribute("ROLL_SEQ");
  42. if(null == SEQ){
  43. SEQ_1 = 1;
  44. }else{
  45. SEQ_1 = SEQ.intValue()+1;
  46. }
  47. //取出主键后,更新移动表
  48. PosParameter param4 = new PosParameter();
  49. param4.setValueParamter(0, new Integer(SEQ_1));
  50. param4.setValueParamter(1, CUR_LOAD_LOC[i]);
  51. param4.setValueParamter(2, "YZ");
  52. param4.setValueParamter(3, OLD_SAMPL_NO[i]);
  53. param4.setValueParamter(4, "");
  54. param4.setValueParamter(5, "");
  55. param4.setValueParamter(6, "");
  56. param4.setValueParamter(7, "");
  57. param4.setValueParamter(8, REG_ID[0]);
  58. getDao("mesdao").insert("UIH050700_01.insert", param4);
  59. }
  60. }
  61. }
  62. return PosBizControlConstants.SUCCESS;
  63. }
  64. }