예제 #1
0
 /** 删除 */
 @Override
 protected void onDelete(Long ids[]) throws BusinessException {
   // TODO Auto-generated method stub
   XjSchoolMapper xjSchoolMapper =
       SpringUtil.getSpringBean(XjSchoolMapper.class, "xjSchoolMapper");
   xjSchoolMapper.deleteXjSchool(ids);
 }
예제 #2
0
  /** 新增 */
  @Override
  protected void onAdd() throws BusinessException {
    // TODO Auto-generated method stub
    // 检查重名
    Map<String, Object> params = new HashMap<String, Object>();
    params.put("schoolName", this.getSchoolName());
    params.put("areaAbb", this.getDaoAbb());
    List<XjSchoolInfo> xjSchool =
        (List<XjSchoolInfo>) MethodAdapter.invoker(this, "qeuryXjSchools", params);
    if (xjSchool != null && xjSchool.size() > 0) throw new BusinessException("此地区已经存在同名学校,不可增加");

    XjSchoolEntry xjSchoolEntry = new XjSchoolEntry();

    xjSchoolEntry.setId(this.getId());
    xjSchoolEntry.setTownId(this.getTownId());
    xjSchoolEntry.setSchoolName(this.getSchoolName());
    xjSchoolEntry.setSchoolType(this.getSchoolType());
    xjSchoolEntry.setEstablishDate(this.getEstablishDate());
    xjSchoolEntry.setSchoolMode(this.getSchoolMode());
    xjSchoolEntry.setAddress(this.getAddress());
    xjSchoolEntry.setSchoolClass(this.getSchoolClass());
    xjSchoolEntry.setSchoolBank(this.getSchoolBank());
    xjSchoolEntry.setSchoolAddr(this.getSchoolAddr());
    xjSchoolEntry.setPostCode(this.getPostCode());
    xjSchoolEntry.setPhone(this.getPhone());
    xjSchoolEntry.setWebsite(this.getWebsite());
    xjSchoolEntry.setEmail(this.getEmail());
    xjSchoolEntry.setSchoolMaster(this.getSchoolMaster());
    xjSchoolEntry.setMobie(this.getMobie());
    xjSchoolEntry.setLearnyear(this.getLearnyear());
    xjSchoolEntry.setAreaId(this.getAreaId());
    xjSchoolEntry.setSection(this.getSection());
    xjSchoolEntry.setCreateTime(this.getCreateTime());
    xjSchoolEntry.setAdcEcCode(this.getAdcEcCode());
    xjSchoolEntry.setSchCode(this.getSchCode());
    xjSchoolEntry.setShortName(this.getShortName());
    xjSchoolEntry.setIsLong(this.getIsLong());
    XjSchoolMapper xjSchoolMapper =
        SpringUtil.getSpringBean(XjSchoolMapper.class, "xjSchoolMapper");
    xjSchoolMapper.insertXjSchool(xjSchoolEntry);
    xjSchoolEntry = null;
  }
예제 #3
0
 /**
  * 根据主键(id)返回单条记录
  *
  * @param id
  * @return XjSchoolInfo
  */
 public XjSchoolInfo findOne(long id) throws BusinessException {
   XjSchoolMapper xjSchoolMapper =
       SpringUtil.getSpringBean(XjSchoolMapper.class, "xjSchoolMapper");
   XjSchoolEntry entry = xjSchoolMapper.findOne(this.getDaoAbb(), id);
   if (entry != null) {
     this.setId(entry.getId());
     this.setTownId(entry.getTownId());
     this.setSchoolName(entry.getSchoolName());
     this.setSchoolType(entry.getSchoolType());
     this.setEstablishDate(entry.getEstablishDate());
     this.setSchoolMode(entry.getSchoolMode());
     this.setAddress(entry.getAddress());
     this.setSchoolClass(entry.getSchoolClass());
     this.setSchoolBank(entry.getSchoolBank());
     this.setSchoolAddr(entry.getSchoolAddr());
     this.setPostCode(entry.getPostCode());
     this.setPhone(entry.getPhone());
     this.setWebsite(entry.getWebsite());
     this.setEmail(entry.getEmail());
     this.setSchoolMaster(entry.getSchoolMaster());
     this.setMobie(entry.getMobie());
     this.setLearnyear(entry.getLearnyear());
     this.setAreaId(entry.getAreaId());
     this.setSection(entry.getSection());
     this.setCreateTime(entry.getCreateTime());
     this.setAdcEcCode(entry.getAdcEcCode());
     this.setSchCode(entry.getSchCode());
     this.setShortName(entry.getShortName());
     this.setIsLong(entry.getIsLong());
     this.setSiId(entry.getSiId());
     this.setSiName(entry.getSiName());
     this.setTownName(entry.getTownName());
     this.setAreaName(entry.getAreaName());
     this.setAreaCode(entry.getAreaCode());
     this.setAreaAbb(entry.getAreaAbb());
     entry = null;
   } else {
     this.xjSchoolEntry = new XjSchoolEntry();
   }
   return this;
 }
예제 #4
0
 /**
  * 查询
  *
  * @param startRow 开始记录的行数
  * @param pageSize 设置每页显示的记录数
  * @param townId 所属镇区
  * @param schoolName 学校的名称
  * @param schoolType 学校类别(1国家重点、2省重点、3市重点、4县重点、5少数民族学校、6其他)
  * @param establishDate1 建校时间 (大于或等于开始时间)
  * @param establishDate2 建校时间 (小于或等于结束时间)
  * @param schoolMode 办学模式(1教育部门和集体办、2社会力量办、3其他部门办)
  * @param address 所在地(1城市、2农村、3县镇、4其他)
  * @param schoolClass
  *     学校类型(1小学、2独立设置少数民族小学、3一贯制学校小学部、4小学教学点5其他学校附设小学班、6完全中学、7高级中学、8初级中学、9一贯制学校10其他学校附设初中班、11少数民族完全中学、12少数民族高级中学13少数民族初级中学、14少数民族一贯制学校、15职业初高中合设16职业高中、17职业初中、18普通中学附设职业班、19其它单位20学校职业班、21少数民职业初高中合设、22少数民族职业高中23少数民族职业初中、24幼儿园、25独立少数民族幼儿园、26独立设置学前班27盲人学校、28聋人学校、29弱智学校、30特殊教育其他学校、31小学附设特教班32初中附设特教班、33工读学校、34普通中等专业技术学校、35成人中等专业技术学校、36其他)
  * @param schoolBank 学校等级(1国家级、2省级、3市级、4县级、5其他)
  * @param schoolAddr 学校地址
  * @param postCode 邮编
  * @param phone 电话
  * @param website 网址
  * @param email E_MAIL
  * @param schoolMaster 校长
  * @param mobie 联系电话
  * @param learnyear 学制(小学为6年,初高中为3年)
  * @param areaId 地区id
  * @param section 学段:0幼儿园,1小学,2初中,3高中,4综合
  * @param createTime1 创建这个学校的时间 (大于或等于开始时间)
  * @param createTime2 创建这个学校的时间 (小于或等于结束时间)
  * @param adcEcCode 对应BOSS系统集团编号
  * @param schCode
  * @param shortName
  * @param isLong
  * @param siId SIID
  * @param siName 公司名称
  * @param townName 镇区名称
  * @param areaName 区域名称
  * @param areaCode 区域代码
  * @param areaAbb 区域简写
  * @param orderList //控制排序
  * @return List<XjSchoolInfo>
  */
 @SeacherFun(nameAlias = "XjSchoolInfoSeacher")
 public List<XjSchoolInfo> qeuryXjSchools(
     @SearchParameter(defaultValue = "1", name = "startRow") int startRow,
     @SearchParameter(defaultValue = "20", name = "pageSize") int pageSize,
     @SearchParameter(name = "townId", defaultValue = "-1") long townId,
     @SearchParameter(name = "schoolName") String schoolName,
     @SearchParameter(name = "schoolType", defaultValue = "-1") long schoolType,
     @SearchParameter(name = "establishDate1") Date establishDate1,
     @SearchParameter(name = "establishDate2") Date establishDate2,
     @SearchParameter(name = "schoolMode", defaultValue = "-1") long schoolMode,
     @SearchParameter(name = "address", defaultValue = "-1") long address,
     @SearchParameter(name = "schoolClass", defaultValue = "-1") long schoolClass,
     @SearchParameter(name = "schoolBank", defaultValue = "-1") long schoolBank,
     @SearchParameter(name = "schoolAddr") String schoolAddr,
     @SearchParameter(name = "postCode") String postCode,
     @SearchParameter(name = "phone") String phone,
     @SearchParameter(name = "website") String website,
     @SearchParameter(name = "email") String email,
     @SearchParameter(name = "schoolMaster") String schoolMaster,
     @SearchParameter(name = "mobie") String mobie,
     @SearchParameter(name = "learnyear", defaultValue = "-1") long learnyear,
     @SearchParameter(name = "areaId", defaultValue = "-1") long areaId,
     @SearchParameter(name = "section", defaultValue = "-1") long section,
     @SearchParameter(name = "createTime1") Date createTime1,
     @SearchParameter(name = "createTime2") Date createTime2,
     @SearchParameter(name = "adcEcCode") String adcEcCode,
     @SearchParameter(name = "schCode") String schCode,
     @SearchParameter(name = "shortName") String shortName,
     @SearchParameter(name = "isLong", defaultValue = "-1") long isLong,
     @SearchParameter(name = "siId", defaultValue = "-1") long siId,
     @SearchParameter(name = "siName") String siName,
     @SearchParameter(name = "townName") String townName,
     @SearchParameter(name = "areaName") String areaName,
     @SearchParameter(name = "areaCode") String areaCode,
     @SearchParameter(name = "areaAbb") String areaAbb,
     @SearchParameter(name = "orderList") List<OrderItem> orderList)
     throws BusinessException {
   // 实例化List对象
   List<XjSchoolInfo> list = new ArrayList<XjSchoolInfo>();
   // 查询结果实体
   XjSchoolMapper xjSchoolMapper =
       SpringUtil.getSpringBean(XjSchoolMapper.class, "xjSchoolMapper");
   this.setQeuryRecordTotalNum(
       xjSchoolMapper.qeuryXjSchoolsRecordCount(
           this.getDaoAbb(),
           townId,
           schoolName,
           schoolType,
           establishDate1,
           establishDate2,
           schoolMode,
           address,
           schoolClass,
           schoolBank,
           schoolAddr,
           postCode,
           phone,
           website,
           email,
           schoolMaster,
           mobie,
           learnyear,
           areaId,
           section,
           createTime1,
           createTime2,
           adcEcCode,
           schCode,
           shortName,
           isLong,
           siId,
           siName,
           townName,
           areaName,
           areaCode,
           areaAbb));
   List<XjSchoolEntry> entryList =
       xjSchoolMapper.qeuryXjSchools(
           startRow,
           pageSize,
           this.getDaoAbb(),
           townId,
           schoolName,
           schoolType,
           establishDate1,
           establishDate2,
           schoolMode,
           address,
           schoolClass,
           schoolBank,
           schoolAddr,
           postCode,
           phone,
           website,
           email,
           schoolMaster,
           mobie,
           learnyear,
           areaId,
           section,
           createTime1,
           createTime2,
           adcEcCode,
           schCode,
           shortName,
           isLong,
           siId,
           siName,
           townName,
           areaName,
           areaCode,
           areaAbb,
           orderList);
   if (entryList != null) {
     for (XjSchoolEntry entry : entryList) {
       list.add(new XjSchoolInfo(entry));
       entry = null;
     }
     entryList = null;
   }
   return list;
 }