9917779a3195c2c61ed2f8926ee304619996a5c0.svn-base 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. package xin.glue.ui.J.J01;
  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.PosRow;
  7. import com.posdata.glue.dao.vo.PosRowSet;
  8. /************
  9. * 热卷移送板加
  10. * 回退功能
  11. * *************/
  12. public class CancBJ extends PosActivity{
  13. public String runActivity(PosContext context){
  14. //行状态
  15. String[] rowStuts = (String[]) context.get("rowStuts");
  16. //钢卷号
  17. String[] OLD_SAMPL_NO = (String[]) context.get("OLD_SAMPL_NO");
  18. //钢卷重量
  19. String[] ACT_WGT = (String[]) context.get("ACT_WGT");
  20. //预装车标志位
  21. String[] CHK = (String[]) context.get("CHK");
  22. //录入人
  23. String[] REG_ID = (String[]) context.get("REG_ID");
  24. String coil_no = null;
  25. for(int i=0;i<OLD_SAMPL_NO.length;i++){
  26. if(CHK[i].equals("Y")){
  27. //查询此垛位上面是否存在钢卷
  28. PosParameter param11 = new PosParameter();
  29. param11.setWhereClauseParameter(0,OLD_SAMPL_NO[i]);
  30. PosRowSet rows = getDao("mesdao").find("UIJ010060_BJ.SELECT", param11);
  31. if(rows.hasNext()){
  32. PosRow row = rows.next();
  33. coil_no = (String) row.getAttribute("MOVE_ST");
  34. if(coil_no == "0"){
  35. // 清除垛位表信息
  36. PosParameter param2 = new PosParameter();
  37. param2.setWhereClauseParameter(0, OLD_SAMPL_NO[i]);
  38. getDao("mesdao").update("UIJ010060_BJ02.UPDATE", param2);
  39. PosParameter param1 = new PosParameter();
  40. param1.setWhereClauseParameter(0, OLD_SAMPL_NO[i]);
  41. this.getDao("mesdao").delete("UIJ010060_BJ.DELETE", param1);
  42. }else{
  43. logger.logInfo("已移送的卷"+OLD_SAMPL_NO[i]+"已被板加接收,请联系板加退回!");
  44. String vtemp="ERROR";
  45. context.put("rs", vtemp);
  46. }
  47. }
  48. }
  49. }
  50. return PosBizControlConstants.SUCCESS;
  51. }
  52. }