ca371ee69536ffa07540ad4bad77c80955c97fa5.svn-base 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. package xin.glue.ui.F.F02;
  2. import java.sql.CallableStatement;
  3. import java.sql.SQLException;
  4. import java.sql.Types;
  5. import kr.co.comsquare.rwXmlLib.RwXml;
  6. import com.posdata.glue.PosException;
  7. import com.posdata.glue.biz.activity.PosActivity;
  8. import com.posdata.glue.biz.constants.PosBizControlConstants;
  9. import com.posdata.glue.biz.control.PosBizProvider;
  10. import com.posdata.glue.context.PosContext;
  11. import com.posdata.glue.dao.vo.PosParameter;
  12. import com.posdata.glue.dao.vo.PosRowSet;
  13. import com.posdata.glue.msg.PosMESMessageImpl;
  14. import com.posdata.glue.msg.PosMessage;
  15. import com.posdata.glue.transaction.PosDataSourceTransactionManager;
  16. import com.posdata.glue.transaction.PosTransactionManager;
  17. public class AutoRepSlabCurLoadLoc extends PosActivity {
  18. public String runActivity(PosContext ctx) {
  19. String[] P_REG_ID = (String[]) ctx.get("USER_NAME");
  20. String P_RTN_MSG = "";
  21. // tx.clearTransactionStatus();
  22. CallableStatement cStmt = null;
  23. try {
  24. cStmt = this.getDao("mesdao").getCallableStatement("callCCR_SLAB_ORD_REP");
  25. cStmt.setString(1, P_REG_ID[0]);
  26. cStmt.registerOutParameter(2, Types.VARCHAR);
  27. cStmt.execute();
  28. P_RTN_MSG = cStmt.getString(2);
  29. } catch (SQLException e) {
  30. // e.printStackTrace();
  31. throw new PosException(e.getMessage());
  32. } finally {
  33. if (cStmt != null) {
  34. try {
  35. cStmt.close();
  36. } catch (SQLException e) {
  37. logger.logWarn(e.getMessage(), e);
  38. }
  39. }
  40. }
  41. if (P_RTN_MSG == null || "".equals(P_RTN_MSG)) {
  42. } else {
  43. throw new PosException(P_RTN_MSG);
  44. }
  45. NIE012080_CALL();
  46. return PosBizControlConstants.SUCCESS;
  47. }
  48. public PosContext NIE012080_CALL()
  49. {
  50. PosContext context = new PosContext();
  51. PosMessage message = new PosMESMessageImpl();
  52. //OrdStsMain
  53. String TcId = "NIE012080";
  54. message.setTCID(TcId);
  55. message.setObject("MSG_ID", TcId);
  56. message.setObject("AA", "");
  57. context.setMessage(message);
  58. message.setTCID(TcId);
  59. String SERVICE_POSTFIX = "-service";
  60. context.put(PosBizControlConstants.SERVICE_NAME, TcId + SERVICE_POSTFIX);
  61. PosBizProvider.getController().doSubController(context, false);
  62. String SERVICE_ERR_MSG = (String) context.get("SERVICE_ERR_MSG");
  63. if (SERVICE_ERR_MSG != null)
  64. {
  65. throw new PosException(SERVICE_ERR_MSG);
  66. }
  67. return context;
  68. }
  69. }