| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161 |
- package xin.glue.ui.G.G04;
- import com.posdata.glue.biz.activity.PosActivity;
- import com.posdata.glue.biz.constants.PosBizControlConstants;
- import com.posdata.glue.biz.control.PosBizControlIF;
- import com.posdata.glue.biz.control.PosBizProvider;
- import com.posdata.glue.component.PosConstants;
- 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.PosMESMessageImpl;
- import com.posdata.glue.msg.PosMessage;
-
- public class PosComplusMove extends PosActivity{
-
-
- public String runActivity(PosContext context)
- {
- String[] rowStatus = (String[]) context.get("rowStatus");
- String[] YARD_ADDR = (String[]) context.get("YARD_ADDR");
- String[] SLAB_NO = (String[]) context.get("SLAB_NO");
- String[] FROM_ADDR = (String[]) context.get("FROM_ADDR");
- String[] TO_ADDR = (String[]) context.get("TO_ADDR");
-
- logger.logInfo("PosComplusMove---> rowStatus["+ rowStatus.length+"]" );
-
- for(int i=rowStatus.length - 1;i>=0 ;i--){
-
- PosParameter param1 = new PosParameter();
- param1.setWhereClauseParameter(0, TO_ADDR[i] );
-
- PosRowSet CompToVo = getDao("mesdao").find("UIG040060_COMPLUS_TO_ADDR.select", param1);
-
- if(CompToVo.hasNext()) {
-
- PosRow CompToVoROW = CompToVo.next();
-
- String StoreLay = (String)CompToVoROW.getAttribute("STORELAY");
-
- // TO Address SLAB NO Setting
- PosParameter param2 = new PosParameter();
- param2.setValueParamter(0, SLAB_NO[i]);
- param2.setValueParamter(1, "UIG040060");
- param2.setValueParamter(2, YARD_ADDR[i]);
- param2.setValueParamter(3, StoreLay);
- param2.setValueParamter(4, TO_ADDR[i]);
-
- getDao("mesdao").update("UIG040060_COMPLUS_MOVE.update",param2);
-
- // From Address SLAB NO CLEAR
- PosParameter param3 = new PosParameter();
- param3.setValueParamter(0, YARD_ADDR[i]);
- getDao("mesdao").update("UIG040060_COMPLUS_FROM_02.update",param3);
-
- // TBG02_SLAB_COMM_CUR_LOAD_LOC, ENTER_STOCK_DTIME SETTING
- String yard_addr = null;
- String storelay = null;
- param3 = new PosParameter();
- String slabYardStr = "SELECT YARD_ADDR ,STORELAY FROM TBG04_SLAB_YARD WHERE SLAB_NO = ?";
- param3.setWhereClauseParameter(0,SLAB_NO[i]);
- PosRowSet yardAddr = getDao("mesdao").findByQueryStatement(slabYardStr, param3);
- if(yardAddr.hasNext()){
- PosRow row = yardAddr.next();
- yard_addr = (String)row.getAttribute("YARD_ADDR");
- storelay = (String)row.getAttribute("STORELAY");
- }
- PosParameter param4 = new PosParameter();
-
-
- // Mill Schedule delete request
- PosParameter param5 = new PosParameter();
- param5.setWhereClauseParameter(0, SLAB_NO[i]);
- //PosRowSet SpecSlabVO = getDao("mesdao").find("UIG040042_SPEC_SLAB.select", param5);
- PosRowSet SpecSlabVO = getDao("mesdao").find("UIG040042_SPEC_SLAB_MILL_FL.select", param5);
-
- if(yard_addr.substring(0,1).equals("Z")){
- param4.setWhereClauseParameter(0, yard_addr+storelay);
- param4.setWhereClauseParameter(1, SLAB_NO[i]);
- if(SpecSlabVO.hasNext()) {
- PosRow SpecSlabROW = SpecSlabVO.next();
- String MillFl = (String)SpecSlabROW.getAttribute("MILL_FL");
-
- if(MillFl != null && MillFl.equals("Y")) {
- getDao("mesdao").update("UIG040060_LOC_03.update",param4);
- }else{
- getDao("mesdao").update("UIG040060_LOC_01.update",param4);
- }
- }
-
-
- }else if(yard_addr.substring(0,1).equals("L")){
- param4.setWhereClauseParameter(0, yard_addr+storelay);
- param4.setWhereClauseParameter(1, SLAB_NO[i]);
- getDao("mesdao").update("UIG040060_LOC_02.update",param4);
- }
-
-
-
-
-
- /*
- if(SpecSlabVO.hasNext()) {
- PosRow SpecSlabROW = SpecSlabVO.next();
- String MillFl = (String)SpecSlabROW.getAttribute("MILL_FL");
-
- if(MillFl != null && MillFl.equals("Y")) {
- SendProg_NIF024060( SLAB_NO[i]);
- }
- } */
-
- }
-
- }
-
- return PosBizControlConstants.SUCCESS;
- }
- //Mill Schedule delete request service call
- public void SendProg_NIF024060(String SlabNo )
- {
-
-
-
- PosContext context = new PosContext();
- PosMessage message = new PosMESMessageImpl();
-
- String TcId = "NIF024060";
- message.setTCID(TcId);
- message.setObject("MSG_ID",TcId);
- message.setObject("TYPE","S");
- message.setObject("FROM",SlabNo);
- message.setObject("TO",SlabNo);
- message.setObject("REG_ID","UIG040010");
-
- context.setMessage(message);
- this.processComponent(PosConstants.CREATE_MESSAGE, context);
- String transactionCode = context.getMessage().getTC();
-
- message.setTCID(TcId);
-
- String serviceName = "NIF024060";
-
- String SERVICE_POSTFIX = "-service";
-
-
- context.put(PosBizControlConstants.SERVICE_NAME, serviceName + SERVICE_POSTFIX);
-
-
- context.setMessage(message);
-
-
- PosBizControlIF controller = PosBizProvider.getController();
-
- controller.doSubController(context,false);
-
- }
- }
|