public void repeatAduit(Long osadId) throws Exception { User user = WebRalasafe.getCurrentUser(Struts2Utils.getRequest()); OprShuntApplyDetail osad = oprShuntApplyDetailDao.get(osadId); osad.setStatus(0L); osad.setUpdateName(user.get("name").toString()); osad.setUpdateTime(new Date()); oprShuntApplyDetailDao.save(osad); }
public Page findCarGuard(Page page, Date date) throws Exception { StringBuffer sql = new StringBuffer( "select osad.dis_car_no,osad.dis_car_ton,osad.dis_shunt_piece,osad.dis_shunt_weight,to_char(osad.create_time,'yyyy-mm-dd') create_time,osad.plan_car_time,bc.car_status from opr_shunt_apply_detail osad,bas_car bc where osad.dis_car_no=bc.car_code and osad.status=1 "); Map map = new HashMap(); if (date != null) { sql.append( " and to_date(to_char(osad.create_time,'yyyy-mm-dd'),'yyyy-mm-dd')=to_date(:createTime,'yyyy-mm-dd')"); map.put("createTime", new SimpleDateFormat("yyyy-MM-dd").format(date)); } return oprShuntApplyDetailDao.findPageBySqlMap(page, sql.toString(), map); }
public void shuntApplyAduit(OprShuntApplyDetail osad) throws Exception { List<BasCar> list = basCarService.findBy("carCode", osad.getDisCarNo()); BasCar bc = list.get(0); bc.setCarStatus("хэ│хол"); basCarService.save(bc); User user = WebRalasafe.getCurrentUser(Struts2Utils.getRequest()); osad.setRouteNumber(oprOvermemoService.findRouteNumberSeq()); osad.setStatus(1L); osad.setCreateName(user.get("name").toString()); osad.setCreateTime(new Date()); oprShuntApplyDetailDao.save(osad); }