| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293 |
- package xin.glue.ui.G.G06;
- 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.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;
- /*
- * This program is class moving slab from address to address by crane command
- * @author
- * @date 2008.08.11
- */
- public class PosSaveEmpGroup extends PosActivity
- {
-
- public String runActivity(PosContext context)
- {
-
- String[] status1 = (String[]) context.get("rowStatus");
- String[] chk = (String[]) context.get("CHK");
- String[] FAC_CD = (String[])context.get("FAC_CD");
- String[] PROC_CD = (String[])context.get("PROC_CD");
- String[] PROC_TEL = (String[])context.get("PROC_TEL");
- String[] WK_GROUP = (String[])context.get("WK_GROUP");
- String[] WK_EMP = (String[])context.get("WK_EMP");
- String[] WK_EMP_HP = (String[])context.get("WK_EMP_HP");
-
- logger.logInfo("PosSaveEmpGroup- FAC_CD:"+FAC_CD[0] );
-
- int rowset = 0;
-
-
- if (status1 != null ) {
-
- for (int i = 0 ; i < status1.length ; i++ ) {
- if(!(chk[i].equals("Y")))continue ;
- if(status1[i].equals("d")){
- PosParameter param = new PosParameter();
- param.setWhereClauseParameter(0, WK_EMP[i]);
- param.setWhereClauseParameter(1, PROC_CD[i]);
- param.setWhereClauseParameter(2, FAC_CD[0]);
- int cnt = getDao("mesdao").delete("UIG060010_Emp.delete",param);
-
- }else{
- PosParameter param1 = new PosParameter();
- param1.setWhereClauseParameter(0, WK_EMP[i]);
- param1.setWhereClauseParameter(1, PROC_CD[i]);
- param1.setWhereClauseParameter(2, FAC_CD[0]);
- PosRowSet empVO = getDao("mesdao").find("UIG060010_Emp_Exist.select", param1);
-
- if(empVO.hasNext()) {
- PosRow empROW = empVO.next();
-
- PosParameter param2 = new PosParameter();
- param2.setValueParamter(0, PROC_TEL[i]);
- param2.setValueParamter(1, WK_GROUP[i]);
- param2.setValueParamter(2, WK_EMP_HP[i] );
- param2.setValueParamter(3, WK_EMP[i] );
- param2.setValueParamter(4, PROC_CD[i] );
- param2.setValueParamter(5, FAC_CD[0] );
-
- getDao("mesdao").update("UIG060010_Emp.update",param2);
- } else {
-
- PosParameter param2 = new PosParameter();
-
- param2.setValueParamter(0, FAC_CD[0]);
- param2.setValueParamter(1, PROC_CD[i]);
- param2.setValueParamter(2, WK_EMP[i]);
- param2.setValueParamter(3, PROC_TEL[i]);
- param2.setValueParamter(4, WK_GROUP[i]);
- param2.setValueParamter(5, WK_EMP_HP[i]);
-
- getDao("mesdao").update("UIG060010_Emp.insert",param2);
-
- }
- }
- }
- }
- return PosBizControlConstants.SUCCESS;
- }
-
- }
|