| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687 |
- package xin.glue.ui.B.B02;
- import java.sql.CallableStatement;
- 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.PosRowSet;
- /**
- *
- * @Description 复样信息保存{界面ID:UIB020150}
- * @author 梅贵平{meiguiping}
- * @date 2008-11-19 上午10:49:48
- * @JDK Version jdk1.4.2
- */
- public class SaveRESampling extends PosActivity
- {
- public String runActivity(PosContext context)
- {
- PosGenericDao dao = this.getDao("mesdao");
- PosParameter param = null;
-
- String[]rowStatus = (String[])context.get("rowStatus");
- String[]CHK = (String[])context.get("CHK");//是否被选择,只有被选择的才能被更新
- String[]COIL_NO = (String[])context.get("COIL_NO");//复样对应的钢卷号(复样取自的某钢卷)
- String[]REASON = (String[])context.get("REASON");
- String[]QUYANGJUAN = (String[])context.get("QUYANGJUAN");//复样取样卷
- String[]NOResamp = (String[])context.get("NOResamp");
- String[]SMP_NO = (String[])context.get("SMP_NO");
-
- //复样
- if(rowStatus != null)
- {
- CallableStatement cstm = null;
- int len = rowStatus.length;
- cstm = dao.getCallableStatement("UIB020150_01.CALLSTATEMENT");
- for(int i = 0; i < len; i++)
- {
- if("Y".equals(QUYANGJUAN[i]))
- {
- try
- {
- cstm.setString(1, COIL_NO[i]);
- cstm.setString(2, "");
- cstm.registerOutParameter(3, java.sql.Types.VARCHAR);
- cstm.registerOutParameter(4, java.sql.Types.VARCHAR);
- cstm.execute();
- }
- catch(Exception ex)
- {
- ex.printStackTrace();
- }
- finally
- {
- if(cstm != null)
- {
- try
- {
- cstm.close();
- }
- catch(Exception e)
- {
- e.printStackTrace();
- }
- }
- }
- }
- }
- }
-
- String[]rowStatus1 = (String[])context.get("rowStatus1");
- //不做复样
- if(rowStatus1 != null)
- {
- param = new PosParameter();
- param.setWhereClauseParameter(0, SMP_NO[0]);
- dao.update("UIB020150_01.UPDATE", param);
- }
-
- return PosBizControlConstants.SUCCESS;
- }
- }
|