| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586 |
- package xin.glue.ui.T.T03;
- import java.util.HashMap;
- import java.util.Map;
- import com.posdata.glue.biz.activity.PosActivity;
- import com.posdata.glue.biz.constants.PosBizControlConstants;
- import com.posdata.glue.context.PosContext;
- import com.posdata.glue.dao.PosGenericDao;
- import com.posdata.glue.dao.vo.PosParameter;
- import com.posdata.glue.dao.vo.PosRow;
- import com.posdata.glue.dao.vo.PosRowSet;
- public class ModifyCallResults extends PosActivity {
- public String runActivity(PosContext context) {
- PosGenericDao dao = (PosGenericDao)getDao("mesdao");
- String ResultCallSubService01 = (String)context.get("ResultCallSubService01");
- String ResultCallSubService02 = (String)context.get("ResultCallSubService02");
- logger.logInfo("SubService01 Result Value: " + ResultCallSubService01);
- logger.logInfo("SubService02 Result Value: " + ResultCallSubService02);
-
- PosRowSet rs1 = (PosRowSet) context.get("ListResult_1");
- logger.logInfo("rs1.count() = ["+ rs1.count() +"]");
-
- PosRow row = null;
- Map map = new HashMap();
- int iRows = 0;
- rs1.reset();
- while( rs1.hasNext() ) {
- row = rs1.next();
- map = row.getAttributes();
- String sDb_LgCd = ((String)map.get("LG_CD" ) == null ? "" : (String)map.get("LG_CD" )).toString() ; //LG_CD
- String sDb_SmCd = ((String)map.get("SM_CD" ) == null ? "" : (String)map.get("SM_CD" )).toString() ; //SM_CD
-
- logger.logInfo(iRows + " sDb_LgCd = ["+ sDb_LgCd +"] sDb_SmCd = ["+ sDb_SmCd +"]") ;
- PosParameter param = new PosParameter();
- param.setValueParamter( 0, sDb_LgCd );
- param.setValueParamter( 1, sDb_SmCd );
-
- dao.update("ModifyCallResults.Update", param);
- iRows++;
- }
-
- PosRowSet rs2 = (PosRowSet) context.get("ListResult_2");
- logger.logInfo("rs2.count() = ["+ rs2.count() +"]");
-
- row = null;
- map = new HashMap();
- iRows = 0;
- rs2.reset();
- while( rs2.hasNext() ) {
- row = rs2.next();
- map = row.getAttributes();
- String sDb_LgCd = ((String)map.get("LG_CD" ) == null ? "" : (String)map.get("LG_CD" )).toString() ; //LG_CD
- String sDb_SmCd = ((String)map.get("SM_CD" ) == null ? "" : (String)map.get("SM_CD" )).toString() ; //SM_CD
-
- logger.logInfo(iRows + " sDb_LgCd = ["+ sDb_LgCd +"] sDb_SmCd = ["+ sDb_SmCd +"]") ;
- PosParameter param = new PosParameter();
- param.setValueParamter( 0, sDb_LgCd );
- param.setValueParamter( 1, sDb_SmCd );
-
- dao.update("ModifyCallResults.Update", param);
- iRows++;
- }
-
- return PosBizControlConstants.SUCCESS;
- }
- }
|