bb6b5b5feaefb4484e409e19b145eca5b9f433c1.svn-base 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. package xin.glue.ui.F.F02;
  2. import java.sql.CallableStatement;
  3. import java.sql.SQLException;
  4. import com.posdata.glue.PosException;
  5. import com.posdata.glue.biz.activity.PosActivity;
  6. import com.posdata.glue.biz.constants.PosBizControlConstants;
  7. import com.posdata.glue.context.PosContext;
  8. public class UpdateSchRoll extends PosActivity {
  9. public String runActivity(PosContext ctx) {
  10. String[] V_isYH = (String[]) ctx.get("isYH");
  11. //DELETE FROM TBF02_SCH_ROLL
  12. int cntD = this.getDao("mesdao").delete("UIF023010.deleteSchRoll");
  13. //INSERT INEW CCR ROLL INFOMATION TO TBF02_SCH_ROLL
  14. int cntI = this.getDao("mesdao").insert("UIF023010.insertSCH_ROLL");
  15. //adjust the roll_slab_seq by wth and thk desc
  16. CallableStatement cStmt = null;
  17. if (V_isYH == null) V_isYH = new String[]{"N"};
  18. if("Y".equals(V_isYH[0])) {
  19. cStmt = this.getDao("mesdao").getCallableStatement("callAdjustRollSlabSeqByWthDesc");
  20. }
  21. try {
  22. if(cStmt != null) {
  23. cStmt.execute();
  24. }
  25. } catch (SQLException e) {
  26. throw new PosException(e.getMessage());
  27. }finally
  28. {
  29. if (cStmt != null)
  30. {
  31. try
  32. {
  33. cStmt.close();
  34. }
  35. catch (SQLException e)
  36. {
  37. logger.logWarn(e.getMessage(), e);
  38. }
  39. }
  40. }
  41. return PosBizControlConstants.SUCCESS;
  42. }
  43. }