| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101 |
- package xin.glue.ui.D.D03;
- import java.text.DecimalFormat;
- 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.vo.PosParameter;
- import com.posdata.glue.dao.vo.PosRow;
- import com.posdata.glue.dao.vo.PosRowSet;
- public class InsertNewCastRow extends PosActivity {
- public String runActivity(PosContext context) {
- String[] sDb_MatTp = (String[])context.get("MatTp" ) ; //MAT_TP Àç·á±¸ºÐ(01:CAST 02:CHARGE 03:SLAB 04:SLAB-D)
- //String[] sDb_MatTp = null ; //MAT_TP Àç·á±¸ºÐ(01:CAST 02:CHARGE 03:SLAB 04:SLAB-D)
- // sDb_MatTp[0] = "01";
- PosParameter param = null;
- Map m = new HashMap();
- PosRow row = null;
- String sMaxMatSpecSeq = null;
- int iMaxMatSpecSeq = 1;
- param = new PosParameter();
- param.setWhereClauseParameter( 0, sDb_MatTp[0]);
- PosRowSet rs = getDao("mesdao").find("UID030020.MatDnRst.ByType.MaxMatSpecSeq", param);
- if( rs.hasNext() ) {
- row = rs.next();
- m = row.getAttributes();
-
- sMaxMatSpecSeq = (String)m.get("MAX_MAT_SPEC_SEQ");
- if( sMaxMatSpecSeq != null ) {
- iMaxMatSpecSeq = Integer.parseInt(sMaxMatSpecSeq) + 1;
- }
- sMaxMatSpecSeq = new DecimalFormat("00").format(iMaxMatSpecSeq);
-
- param = new PosParameter();
-
- param.setValueParamter( 0, sMaxMatSpecSeq );
- param.setValueParamter( 1, "" );
- param.setValueParamter( 2, sDb_MatTp[0] );
- param.setValueParamter( 3, "" );
- param.setValueParamter( 4, Integer.valueOf(sMaxMatSpecSeq) );
- param.setValueParamter( 5, "0" );
- param.setValueParamter( 6, "" );
- param.setValueParamter( 7, "" );
- param.setValueParamter( 8, "" );
- param.setValueParamter( 9, "" );
- param.setValueParamter( 10, "" );
- param.setValueParamter( 11, "" );
- param.setValueParamter( 12, "" );
- param.setValueParamter( 13, "" );
- param.setValueParamter( 14, "" );
- param.setValueParamter( 15, "" );
- param.setValueParamter( 16, "" );
- param.setValueParamter( 17, "" );
- param.setValueParamter( 18, "" );
- param.setValueParamter( 19, "" );
- param.setValueParamter( 20, "" );
- param.setValueParamter( 21, "" );
- param.setValueParamter( 22, "" );
- param.setValueParamter( 23, "" );
- param.setValueParamter( 24, "" );
- param.setValueParamter( 25, "" );
- param.setValueParamter( 26, "" );
- param.setValueParamter( 27, "" );
- param.setValueParamter( 28, "" );
- param.setValueParamter( 29, "" );
- param.setValueParamter( 30, "" );
- param.setValueParamter( 31, "" );
- param.setValueParamter( 32, "" );
- param.setValueParamter( 33, "" );
- param.setValueParamter( 34, "" );
- param.setValueParamter( 35, "" );
- param.setValueParamter( 36, "01" );
- param.setValueParamter( 37, "" );
- param.setValueParamter( 38, "" );
- param.setValueParamter( 39, "" );
- param.setValueParamter( 40, "" );
- param.setValueParamter( 41, "" );
- param.setValueParamter( 42, "" );
- param.setValueParamter( 43, "" );
- param.setValueParamter( 44, "" );
- param.setValueParamter( 45, "" );
- param.setValueParamter( 46, "" );
- param.setValueParamter( 47, "" );
- param.setValueParamter( 48, "" );
-
- getDao("mesdao").insert("UID030020.MatDnRst.Row.Insert", param);
- }
- return PosBizControlConstants.SUCCESS;
- }
- }
|