d7750f946a562de5786922eea8409ca88baeb211.svn-base 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. package xin.glue.ui.T.T03;
  2. import java.util.HashMap;
  3. import java.util.Map;
  4. import com.posdata.glue.biz.activity.PosActivity;
  5. import com.posdata.glue.biz.constants.PosBizControlConstants;
  6. import com.posdata.glue.context.PosContext;
  7. import com.posdata.glue.dao.PosGenericDao;
  8. import com.posdata.glue.dao.vo.PosParameter;
  9. import com.posdata.glue.dao.vo.PosRow;
  10. import com.posdata.glue.dao.vo.PosRowSet;
  11. public class ModifyCallResults extends PosActivity {
  12. public String runActivity(PosContext context) {
  13. PosGenericDao dao = (PosGenericDao)getDao("mesdao");
  14. String ResultCallSubService01 = (String)context.get("ResultCallSubService01");
  15. String ResultCallSubService02 = (String)context.get("ResultCallSubService02");
  16. logger.logInfo("SubService01 Result Value: " + ResultCallSubService01);
  17. logger.logInfo("SubService02 Result Value: " + ResultCallSubService02);
  18. PosRowSet rs1 = (PosRowSet) context.get("ListResult_1");
  19. logger.logInfo("rs1.count() = ["+ rs1.count() +"]");
  20. PosRow row = null;
  21. Map map = new HashMap();
  22. int iRows = 0;
  23. rs1.reset();
  24. while( rs1.hasNext() ) {
  25. row = rs1.next();
  26. map = row.getAttributes();
  27. String sDb_LgCd = ((String)map.get("LG_CD" ) == null ? "" : (String)map.get("LG_CD" )).toString() ; //LG_CD
  28. String sDb_SmCd = ((String)map.get("SM_CD" ) == null ? "" : (String)map.get("SM_CD" )).toString() ; //SM_CD
  29. logger.logInfo(iRows + " sDb_LgCd = ["+ sDb_LgCd +"] sDb_SmCd = ["+ sDb_SmCd +"]") ;
  30. PosParameter param = new PosParameter();
  31. param.setValueParamter( 0, sDb_LgCd );
  32. param.setValueParamter( 1, sDb_SmCd );
  33. dao.update("ModifyCallResults.Update", param);
  34. iRows++;
  35. }
  36. PosRowSet rs2 = (PosRowSet) context.get("ListResult_2");
  37. logger.logInfo("rs2.count() = ["+ rs2.count() +"]");
  38. row = null;
  39. map = new HashMap();
  40. iRows = 0;
  41. rs2.reset();
  42. while( rs2.hasNext() ) {
  43. row = rs2.next();
  44. map = row.getAttributes();
  45. String sDb_LgCd = ((String)map.get("LG_CD" ) == null ? "" : (String)map.get("LG_CD" )).toString() ; //LG_CD
  46. String sDb_SmCd = ((String)map.get("SM_CD" ) == null ? "" : (String)map.get("SM_CD" )).toString() ; //SM_CD
  47. logger.logInfo(iRows + " sDb_LgCd = ["+ sDb_LgCd +"] sDb_SmCd = ["+ sDb_SmCd +"]") ;
  48. PosParameter param = new PosParameter();
  49. param.setValueParamter( 0, sDb_LgCd );
  50. param.setValueParamter( 1, sDb_SmCd );
  51. dao.update("ModifyCallResults.Update", param);
  52. iRows++;
  53. }
  54. return PosBizControlConstants.SUCCESS;
  55. }
  56. }