| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253 |
- package xin.glue.nui.G.G02;
- import java.math.BigDecimal;
- import java.text.DateFormat;
- import java.text.SimpleDateFormat;
- import java.util.Date;
- 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;
- import com.posdata.glue.msg.PosMessage;
- import xin.glue.ui.common.PosDateFormat;
- /*
- * author:wangxiaoyan
- * Date:08-10-28
- * desc:
- */
- public class XinSaveCcmResult extends PosActivity
- {
- public String runActivity(PosContext context)
- {
- PosMessage message = context.getMessage();
-
- String MSG_RSV_DATE = (String)message.get("RSV_DATE");
- String MSG_CHRGE_NO = (String)message.get("CHRGE_NO");
- String MSG_PLAN_CHARGE_NO = (String)message.get("PLAN_CHARGE_NO");
- String MSG_CAST_NO = (String)message.get("CAST_NO");
- BigDecimal MSG_CAST_EDT_CHARGE_CNT = (BigDecimal)message.get("CAST_EDT_CHARGE_CNT");
- BigDecimal MSG_CAST_CHARGE_SEQ = (BigDecimal)message.get("CAST_CHARGE_SEQ");
- String MSG_CAST_END_YN = (String)message.get("CAST_END_YN");
- String MSG_CC_DEVNO = (String)message.get("CC_DEVNO");
- BigDecimal MSG_STLMELT_WGT = (BigDecimal)message.get("STLMELT_WGT");
- BigDecimal MSG_STLMELT_TEMP = (BigDecimal)message.get("STLMELT_TEMP");
- BigDecimal MSG_CC_END_STLMELT_USE_WGT = (BigDecimal)message.get("CC_END_STLMELT_USE_WGT");
- BigDecimal MSG_REM_WGT_IN_LD = (BigDecimal)message.get("REM_WGT_IN_LD");
- BigDecimal MSG_REM_WGT_IN_TD = (BigDecimal)message.get("REM_WGT_IN_TD");
- BigDecimal MSG_CC_YIELD = (BigDecimal)message.get("CC_YIELD");
- // String MSG_SPEC_ABBSYM = (String)message.get("SPEC_ABBSYM");
- // String MSG_LD_NO = (String)message.get("LD_NO");
- BigDecimal MSG_CC_SPEED_AVG1 = (BigDecimal)message.get("CC_SPEED_AVG1");
- BigDecimal MSG_CC_SPEED_MIN1 = (BigDecimal)message.get("CC_SPEED_MIN1");
- BigDecimal MSG_CC_SPEED_MAX1 = (BigDecimal)message.get("CC_SPEED_MAX1");
- BigDecimal MSG_CC_SPEED_AVG2 = (BigDecimal)message.get("CC_SPEED_AVG2");
- BigDecimal MSG_CC_SPEED_MIN2 = (BigDecimal)message.get("CC_SPEED_MIN2");
- BigDecimal MSG_CC_SPEED_MAX2 = (BigDecimal)message.get("CC_SPEED_MAX2");
- BigDecimal MSG_TD_TEMP_AVG = (BigDecimal)message.get("TD_TEMP_AVG");
- BigDecimal MSG_TD_TEMP_MIN = (BigDecimal)message.get("TD_TEMP_MIN");
- BigDecimal MSG_TD_TEMP_MAX = (BigDecimal)message.get("TD_TEMP_MAX");
- String MSG_LD_OPEN_YN = (String)message.get("LD_OPEN_YN");
- BigDecimal MSG_MD_LVL1 = (BigDecimal)message.get("MD_LVL1");
- BigDecimal MSG_MD_UPPER_WTH1 = (BigDecimal)message.get("MD_UPPER_WTH1");
- BigDecimal MSG_MD_LOWER_WTH1 = (BigDecimal)message.get("MD_LOWER_WTH1");
- BigDecimal MSG_MD_LVL2 = (BigDecimal)message.get("MD_LVL2");
- BigDecimal MSG_MD_UPPER_WTH2 = (BigDecimal)message.get("MD_UPPER_WTH2");
- BigDecimal MSG_MD_LOWER_WTH2 = (BigDecimal)message.get("MD_LOWER_WTH2");
- BigDecimal MSG_COOLWAT_WGT = (BigDecimal)message.get("COOLWAT_WGT");
- BigDecimal MSG_MD_VIBRATE_CNT1 = (BigDecimal)message.get("MD_VIBRATE_CNT1");
- BigDecimal MSG_MD_VIBRATE_WTH1 = (BigDecimal)message.get("MD_VIBRATE_WTH1");
- BigDecimal MSG_MD_VIBRATE_CNT2 = (BigDecimal)message.get("MD_VIBRATE_CNT2");
- BigDecimal MSG_MD_VIBRATE_WTH2 = (BigDecimal)message.get("MD_VIBRATE_WTH2");
- String MSG_LD_ARRV_DTIME = (String)message.get("LD_ARRV_DTIME");
- String MSG_CC_STA_DTIME = (String)message.get("CC_STA_DTIME");
- String MSG_LD_OPEN_DTIME = (String)message.get("LD_OPEN_DTIME");
- String MSG_LD_CLOSE_DTIME = (String)message.get("LD_CLOSE_DTIME");
- String MSG_CC_END_DTIME = (String)message.get("CC_END_DTIME");
- BigDecimal MSG_CC_HOUR = (BigDecimal)message.get("CC_HOUR");
- BigDecimal MSG_SLAB_TOTLEN = (BigDecimal)message.get("SLAB_TOTLEN");
- BigDecimal MSG_SLAB_PROD_CNT = (BigDecimal)message.get("SLAB_PROD_CNT");
- BigDecimal MSG_SLAB_TOTWGT = (BigDecimal)message.get("SLAB_TOTWGT");
-
- int chLth = MSG_CHRGE_NO.trim().length();
-
- if (chLth < 10 ) {
-
- logger.logError("XinSaveCcmResult CHARGE_NO ERROR !!!!-->"+MSG_CHRGE_NO );
-
- return PosBizControlConstants.SUCCESS;
- }
-
- String sShift = null;
- if (MSG_RSV_DATE == null || MSG_RSV_DATE.equals("") ) {
- DateFormat formatter = new SimpleDateFormat("yyyyMMddHHmmss");
- MSG_RSV_DATE = formatter.format(new Date());
- }
- sShift = PosDateFormat.getShift(MSG_RSV_DATE);
-
- PosParameter paramA = new PosParameter();
- paramA.setWhereClauseParameter(0, MSG_RSV_DATE.substring(0,6));
- paramA.setWhereClauseParameter(1, MSG_RSV_DATE.substring(6,8));
- paramA.setWhereClauseParameter(2, sShift);
- paramA.setWhereClauseParameter(3, "S");
- PosRowSet groupVO = this.getDao("mesdao").find("NIG020210_SHIFT.select", paramA);
-
- String sGroup = null;
- if (groupVO.hasNext()){
- PosRow groupROW = groupVO.next();
- sGroup = (String)groupROW.getAttribute("GR_GROUP_CD");
- }
- /*
- //获取计划牌号
- PosParameter paramB = new PosParameter();
- paramB.setWhereClauseParameter(0, "J"+MSG_PLAN_CHARGE_NO.substring(1));
- PosRowSet GETSTLGRD = this.getDao("mesdao").find("NIG020620_02.select", paramB);
- String stlgrd = null;
- if (GETSTLGRD.hasNext()){
- PosRow stlROW = GETSTLGRD.next();
- stlgrd = (String)stlROW.getAttribute("STL_GRD");
- }
- */
-
- PosParameter param0 = new PosParameter();
- PosParameter param1 = new PosParameter();
-
- // 用电文接收的数据项修改 RH炉实绩表 tbg02_rh_result
- param0.setWhereClauseParameter(0, MSG_CHRGE_NO);
- PosRowSet rowset0 = this.getDao("mesdao").find("NIG020620_01.select", param0);
-
-
- if(rowset0.hasNext())
- {
-
- param1.setValueParamter(0,MSG_PLAN_CHARGE_NO);
- param1.setValueParamter(1,MSG_RSV_DATE.substring(0,8) );
- param1.setValueParamter(2,MSG_CAST_NO );
- param1.setValueParamter(3,MSG_CAST_EDT_CHARGE_CNT);
- param1.setValueParamter(4,MSG_CAST_CHARGE_SEQ );
- param1.setValueParamter(5,MSG_CAST_END_YN );
- param1.setValueParamter(6,MSG_CC_DEVNO );
- param1.setValueParamter(7,MSG_STLMELT_WGT );
- param1.setValueParamter(8,MSG_STLMELT_TEMP );
- param1.setValueParamter(9,MSG_CC_END_STLMELT_USE_WGT );
- param1.setValueParamter(10,MSG_REM_WGT_IN_LD );
- param1.setValueParamter(11,MSG_REM_WGT_IN_TD );
- param1.setValueParamter(12,MSG_CC_YIELD );
- param1.setValueParamter(13,MSG_CC_SPEED_AVG1 );
- param1.setValueParamter(14,MSG_CC_SPEED_MIN1 );
- param1.setValueParamter(15,MSG_CC_SPEED_MAX1 );
- param1.setValueParamter(16,MSG_CC_SPEED_AVG2 );
- param1.setValueParamter(17,MSG_CC_SPEED_MIN2 );
- param1.setValueParamter(18,MSG_CC_SPEED_MAX2 );
- param1.setValueParamter(19,MSG_TD_TEMP_AVG );
- param1.setValueParamter(20,MSG_TD_TEMP_MIN );
- param1.setValueParamter(21,MSG_TD_TEMP_MAX );
- param1.setValueParamter(22,MSG_LD_OPEN_YN );
- param1.setValueParamter(23,MSG_MD_LVL1 );
- param1.setValueParamter(24,MSG_MD_UPPER_WTH1 );
- param1.setValueParamter(25,MSG_MD_LOWER_WTH1 );
- param1.setValueParamter(26,MSG_MD_VIBRATE_CNT1 );
- param1.setValueParamter(27,MSG_MD_VIBRATE_WTH1 );
- param1.setValueParamter(28,MSG_MD_LVL2 );
- param1.setValueParamter(29,MSG_MD_UPPER_WTH2 );
- param1.setValueParamter(30,MSG_MD_LOWER_WTH2 );
- param1.setValueParamter(31,MSG_MD_VIBRATE_CNT2 );
- param1.setValueParamter(32,MSG_MD_VIBRATE_WTH2 );
- param1.setValueParamter(33,MSG_COOLWAT_WGT );
- param1.setValueParamter(34,MSG_LD_ARRV_DTIME );
- param1.setValueParamter(35,MSG_CC_STA_DTIME );
- param1.setValueParamter(36,MSG_LD_OPEN_DTIME );
- param1.setValueParamter(37,MSG_LD_CLOSE_DTIME );
- param1.setValueParamter(38,MSG_CC_END_DTIME );
- param1.setValueParamter(39,MSG_CC_HOUR );
- param1.setValueParamter(40,MSG_SLAB_TOTLEN );
- param1.setValueParamter(41,MSG_SLAB_PROD_CNT );
- param1.setValueParamter(42,MSG_SLAB_TOTWGT );
- param1.setValueParamter(43,sShift );
- param1.setValueParamter(44,sGroup );
- param1.setValueParamter(45,MSG_CHRGE_NO );
-
- this.getDao("mesdao").update("NIG020620_CCM.update",param1);
- //获取原料浇次信息便于静态报表数据统计 20190525wl
- this.getDao("mesdao").update("NIG020620_REPORTCCM.update",param1);
- }
- else
- {
-
- param1.setValueParamter(0,MSG_CHRGE_NO);
- param1.setValueParamter(1,MSG_PLAN_CHARGE_NO);
- param1.setValueParamter(2,MSG_RSV_DATE.substring(0,8) );
- param1.setValueParamter(3,MSG_CAST_NO );
- param1.setValueParamter(4,MSG_CAST_EDT_CHARGE_CNT);
- param1.setValueParamter(5,MSG_CAST_CHARGE_SEQ );
- param1.setValueParamter(6,MSG_CAST_END_YN );
- param1.setValueParamter(7,MSG_CC_DEVNO );
- param1.setValueParamter(8,MSG_STLMELT_WGT );
- param1.setValueParamter(9,MSG_STLMELT_TEMP );
- param1.setValueParamter(10,MSG_CC_END_STLMELT_USE_WGT );
- param1.setValueParamter(11,MSG_REM_WGT_IN_LD );
- param1.setValueParamter(12,MSG_REM_WGT_IN_TD );
- param1.setValueParamter(13,MSG_CC_YIELD );
- param1.setValueParamter(14,MSG_CC_SPEED_AVG1 );
- param1.setValueParamter(15,MSG_CC_SPEED_MIN1 );
- param1.setValueParamter(16,MSG_CC_SPEED_MAX1 );
- param1.setValueParamter(17,MSG_CC_SPEED_AVG2 );
- param1.setValueParamter(18,MSG_CC_SPEED_MIN2 );
- param1.setValueParamter(19,MSG_CC_SPEED_MAX2 );
- param1.setValueParamter(20,MSG_TD_TEMP_AVG );
- param1.setValueParamter(21,MSG_TD_TEMP_MIN );
- param1.setValueParamter(22,MSG_TD_TEMP_MAX );
- param1.setValueParamter(23,MSG_LD_OPEN_YN );
- param1.setValueParamter(24,MSG_MD_LVL1 );
- param1.setValueParamter(25,MSG_MD_UPPER_WTH1 );
- param1.setValueParamter(26,MSG_MD_LOWER_WTH1 );
- param1.setValueParamter(27,MSG_MD_VIBRATE_CNT1 );
- param1.setValueParamter(28,MSG_MD_VIBRATE_WTH1 );
- param1.setValueParamter(29,MSG_MD_LVL2 );
- param1.setValueParamter(30,MSG_MD_UPPER_WTH2 );
- param1.setValueParamter(31,MSG_MD_LOWER_WTH2 );
- param1.setValueParamter(32,MSG_MD_VIBRATE_CNT2 );
- param1.setValueParamter(33,MSG_MD_VIBRATE_WTH2 );
- param1.setValueParamter(34,MSG_COOLWAT_WGT );
- param1.setValueParamter(35,MSG_LD_ARRV_DTIME );
- param1.setValueParamter(36,MSG_CC_STA_DTIME );
- param1.setValueParamter(37,MSG_LD_OPEN_DTIME );
- param1.setValueParamter(38,MSG_LD_CLOSE_DTIME );
- param1.setValueParamter(39,MSG_CC_END_DTIME );
- param1.setValueParamter(40,MSG_CC_HOUR );
- param1.setValueParamter(41,MSG_SLAB_TOTLEN );
- param1.setValueParamter(42,MSG_SLAB_PROD_CNT );
- param1.setValueParamter(43,MSG_SLAB_TOTWGT );
- param1.setValueParamter(44,sShift );
- param1.setValueParamter(45,sGroup );
-
- this.getDao("mesdao").insert("NIG020620_CCM.insert",param1);
- //获取原料浇次信息便于静态报表数据统计 20190525wl
- this.getDao("mesdao").insert("NIG020620_REPORTCCM.insert",param1);
-
- }
-
- PosParameter param6 = new PosParameter();
- param6.setValueParamter(0, MSG_CC_DEVNO );
- param6.setValueParamter(1, MSG_CC_STA_DTIME );
- param6.setValueParamter(2, MSG_CC_END_DTIME );
- param6.setValueParamter(3, MSG_CHRGE_NO );
-
- this.getDao("mesdao").update("NIG020620_CHARGE_COMM.update", param6);
-
-
-
- return PosBizControlConstants.SUCCESS;
- }
-
-
- }
-
-
-
-
|