package xin.glue.ui.H.H02; 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.PosRowSet; import com.posdata.glue.util.log.PosLog; import com.posdata.glue.util.log.PosLogFactory; public class saveShift extends PosActivity { public String runActivity(PosContext context) { //早班的时间 上 String[] shiftAS = (String[]) context.get("shiftAS"); //早班的时间 下 String[] shiftAX = (String[]) context.get("shiftAX"); //中班的时间 上 String[] shiftBS = (String[]) context.get("shiftBS"); //中班的时间 下 String[] shiftBX = (String[]) context.get("shiftBX"); //晚班的时间 上 String[] shiftCS = (String[]) context.get("shiftCS"); //晚班的时间 下 String[] shiftCX = (String[]) context.get("shiftCX"); //操作人 String[] REG_ID = (String[]) context.get("REG_ID"); //中班的结束时间是否操作0点 String[] ZB = (String[]) context.get("ZB"); PosParameter param0 = new PosParameter(); param0.setWhereClauseParameter(0, shiftAS[0]); param0.setWhereClauseParameter(1, shiftAX[0]); param0.setWhereClauseParameter(2, REG_ID[0]); getDao("mesdao").update("UIH060020_01.update", param0); PosParameter param1 = new PosParameter(); param1.setWhereClauseParameter(0, shiftBS[0]); param1.setWhereClauseParameter(1, shiftBX[0]); param1.setWhereClauseParameter(2, REG_ID[0]); //这里加入中班是否超过0点的标志,为了切时间的时候判断。 //如果超过0点就判断早班和晚班的情况,其它为中班。如果不超过0点就判断早班和中班的情况,其它为晚班 param1.setWhereClauseParameter(3, ZB[0]); getDao("mesdao").update("UIH060020_02.update", param1); PosParameter param2 = new PosParameter(); param2.setWhereClauseParameter(0, shiftCS[0]); param2.setWhereClauseParameter(1, shiftCX[0]); param2.setWhereClauseParameter(2, REG_ID[0]); getDao("mesdao").update("UIH060020_03.update", param2); return PosBizControlConstants.SUCCESS; } }