| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788 |
- package xin.glue.ui.D.D01;
- import java.sql.CallableStatement;
- import com.posdata.glue.PosException;
- 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;
- /**
- * 板坯组合设计
- * @author 王小炎
- * @date 2010-3-6
- */
- public class SaveAssembleSlabResInfo extends PosActivity
- {
- public String runActivity(PosContext context)
- {
- //从页面获取一系列参数,供更新数据所用
- String[] chk = (String[]) context.get("CHK");
- String[] DSN_SLAB_NO = (String[]) context.get("DSN_SLAB_NO");//板坏号
- String[] ASSEMBLE_CNT = (String[])context.get("ASSEMBLE_CNT");
- StringBuffer P_DSN_SLAB_NO = new StringBuffer();
- //组织三个参数群,分别供查询,更新和插入数据所用
- //PosParameter parameter = null;
- CallableStatement cstm = null;
- PosGenericDao dao = this.getDao("mesdao");
-
- //PosRowSet rowSet = null;
- if (chk != null)
- {
- for (int i = 0; i < chk.length; i++)
- {
- if(chk[i] == null || chk[i].equals("false")){
- continue;
- }else{
- P_DSN_SLAB_NO.append(DSN_SLAB_NO[i]).append("|");
- }
- }
-
- try
- {
- cstm = dao.getCallableStatement("tbd01_slabdn_assemble.call");
- cstm.setString(1, P_DSN_SLAB_NO.toString());
- cstm.setString(2, ASSEMBLE_CNT[0]);
- cstm.setString(3, "");
- cstm.setString(4, "");
- cstm.registerOutParameter(5, java.sql.Types.VARBINARY);
- cstm.registerOutParameter(6, java.sql.Types.VARBINARY);
- cstm.execute();
-
- //String errorCD = cstm.getString(5);
- String errorMsg = cstm.getString(6);
-
- if(errorMsg != null && !"".equals(errorMsg)){
- context.put("errorMsg", errorMsg);
- return PosBizControlConstants.FAILURE;
- }
- }catch(Exception ex)
- {
- return PosBizControlConstants.FAILURE;
- }
- finally
- {
- if(cstm != null)
- {
- try
- {
- cstm.close();
- }
- catch(Exception e)
- {
- e.printStackTrace();
- }
- }
- }
- }
-
- return PosBizControlConstants.SUCCESS;
- }
- }
|