| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081 |
- package xin.glue.ui.G.G04;
- 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;
- /**
- *
- * @auth: wangxiaoyan
- * @date: 2009-1-9
- * @desc: 删除行车命令后的善后工作 修改行车命令涉及到的 原板坯位置 行车命令状态修改为DELETE 3
- */
- public class XinDeleteCraneOrder extends PosActivity {
- public String runActivity(PosContext context) {
- // 从页面获取参数数据,供更新页面使用
- // 制定行车命令所需: 原位置;目的位置;移动块数,行车编号
- String[] fromAddress = (String[])context.get("FROM_ADDR");
- String[] slabCnt = (String[])context.get("SLAB_CNT");
- String[] toAddress = (String[])context.get("TO_ADDR");
-
- if(fromAddress == null||slabCnt== null||toAddress== null)return PosBizControlConstants.SUCCESS;
-
- // 记录要移动的板坯的数组
- String[] ArrSlabNo = new String[4];
- // 记录要移动的板坯的数组
- String[] ArrStorlay = new String[4];
- // 行车命令选定移动的板坯块数
-
-
- int intCnt = Integer.parseInt(slabCnt[0]);
- int i = 0;
- int j = 0;
-
- PosParameter param1 = new PosParameter();
- param1.setWhereClauseParameter(0, fromAddress[0]);
- PosRowSet YardVO = getDao("mesdao").find("UIG040043_06.select", param1);
- // 获得要移动的板坯,一个跺位从上到下获取 intCnt 块板坯数
- while(YardVO.hasNext()) {
- PosRow YardROW = YardVO.next();
- ArrSlabNo[i] = (String)YardROW.getAttribute("SLAB_NO");
- i++;
- if ( i == intCnt ) break;
- }
-
-
- param1 = new PosParameter();
- param1.setWhereClauseParameter(0, toAddress[0]);
- YardVO = getDao("mesdao").find("UIG040043_toAddr_delete.select", param1);
- //获得要放置板坯的层,一个跺位从下往上获取 inCnt 个层位置
- while(YardVO.hasNext()) {
- PosRow YardROW = YardVO.next();
- ArrStorlay[j] = (String)YardROW.getAttribute("STORELAY");
- j++;
- if ( j == intCnt ) break;
- }
-
-
- // 下面对制定命令涉及到的 板坯原位置,目的位置 进行控制 删除行车命令,则状态为3
- for ( int jj = 0; jj < intCnt ; jj++) {
-
- PosParameter param3 = new PosParameter();
- param3.setValueParamter(0, "");
- param3.setValueParamter(1, ArrSlabNo[jj]);
- param3.setValueParamter(2, fromAddress[0]);
- getDao("mesdao").insert("UIG040041_01.update", param3);
-
- param3 = new PosParameter();
- param3.setValueParamter(0, "");
- param3.setValueParamter(1, ArrStorlay[jj]);
- param3.setValueParamter(2, toAddress[0]);
- getDao("mesdao").update("UIG040041_02.update", param3);
- }
- return PosBizControlConstants.SUCCESS;
- }
- }
|