Search in sources :

Example 6 with AppServiceExample

use of com.itrus.portal.db.AppServiceExample in project portal by ixinportal.

the class SaveServiceController method updateForm.

// 返回修改页面
@RequestMapping(value = "/{id}", params = "form", produces = "text/html")
public String updateForm(@PathVariable("id") Long id, Model uiModel) {
    EvidenceSaveService saveService = saveServiceImpl.selectServiceById(id);
    uiModel.addAttribute("saveService", saveService);
    AppService appService = appServiceImpl.selectById(saveService.getAppService());
    uiModel.addAttribute("appService", appService);
    AppServiceExample ase = new AppServiceExample();
    AppServiceExample.Criteria asec = ase.createCriteria();
    asec.andTypeEqualTo(3L);
    asec.andServiceConfigNameEqualTo("EvidenceOutServiceConfig");
    List<AppService> appServiceList = sqlSession.selectList("com.itrus.portal.db.AppServiceMapper.selectByExample", ase);
    uiModel.addAttribute("appServiceList", appServiceList);
    return "saveservice/update";
}
Also used : AppService(com.itrus.portal.db.AppService) EvidenceSaveService(com.itrus.portal.db.EvidenceSaveService) AppServiceExample(com.itrus.portal.db.AppServiceExample) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Example 7 with AppServiceExample

use of com.itrus.portal.db.AppServiceExample in project portal by ixinportal.

the class SaveServiceController method isRepeatAppServiceName.

/**
 * 判断服务名称是否重复
 * @param appServiceName
 * @param uiModel
 * @return
 */
@RequestMapping(value = "/isRepeatAppServiceName")
@ResponseBody
public String isRepeatAppServiceName(@RequestParam(required = false, value = "appServiceName") String appServiceName, Model uiModel) {
    AppServiceExample appServiceExample = new AppServiceExample();
    AppServiceExample.Criteria ac = appServiceExample.createCriteria();
    ac.andAppServiceNameEqualTo(appServiceName);
    int count = appServiceImpl.countByExample(appServiceExample);
    if (count > 0) {
        return "此应用服务名称已存在";
    }
    return null;
}
Also used : AppServiceExample(com.itrus.portal.db.AppServiceExample) RequestMapping(org.springframework.web.bind.annotation.RequestMapping) ResponseBody(org.springframework.web.bind.annotation.ResponseBody)

Example 8 with AppServiceExample

use of com.itrus.portal.db.AppServiceExample in project portal by ixinportal.

the class AppServiceAuthenticationController method isRepeatAppServiceId.

/**
 * 判断服务编号是否重复
 * @param appServiceId
 * @param uiModel
 * @return
 */
@RequestMapping(value = "/isRepeatAppServiceId")
@ResponseBody
public String isRepeatAppServiceId(@RequestParam(required = false, value = "appServiceId") String appServiceId, Model uiModel) {
    AppServiceExample appServiceExample = new AppServiceExample();
    AppServiceExample.Criteria ac = appServiceExample.createCriteria();
    ac.andAppServiceIdEqualTo(appServiceId);
    int count = appServiceImpl.countByExample(appServiceExample);
    if (count > 0) {
        return "此应用服务编号已存在";
    }
    return null;
}
Also used : AppServiceExample(com.itrus.portal.db.AppServiceExample) RequestMapping(org.springframework.web.bind.annotation.RequestMapping) ResponseBody(org.springframework.web.bind.annotation.ResponseBody)

Example 9 with AppServiceExample

use of com.itrus.portal.db.AppServiceExample in project portal by ixinportal.

the class CertificationChargingController method show.

// 根据应用id,查询应用下的所有计费规则信息
@RequestMapping(value = "/show/{id}")
public String show(@PathVariable("id") Long id, Model uiModel, HttpServletRequest request) {
    ApplicationInfo applicationInfo = sqlSession.selectOne("com.itrus.portal.db.ApplicationInfoMapper.selectByPrimaryKey", id);
    uiModel.addAttribute("applicationInfo", applicationInfo);
    // 系统配置的实名认证服务集合
    List<AppService> appServices = new ArrayList<AppService>();
    AppServiceExample appServiceExample = new AppServiceExample();
    AppServiceExample.Criteria criteria = appServiceExample.or();
    criteria.andTypeEqualTo(ComNames.SERVICE_TYPE_CERTIFICATION);
    appServices = sqlSession.selectList("com.itrus.portal.db.AppServiceMapper.selectByExample", appServiceExample);
    uiModel.addAttribute("appServices", appServices);
    List<CertificationCharging> certificationChargings = new ArrayList<CertificationCharging>();
    certificationChargings = certificationChargingService.selectList(id, ComNames.CHARGING_TYPE_SMRZ_1);
    CertificationChargingWrap certificationChargingWrap = new CertificationChargingWrap();
    List<CertificationChargingList> certificationChargingLists = new ArrayList<CertificationChargingList>();
    for (int i = 0; i < certificationChargings.size(); i++) {
        CertificationChargingList certificationChargingList = new CertificationChargingList();
        List<ServiceName> serviceNames = new ArrayList<ServiceName>();
        serviceNames = serviceNameService.selectListByCertificationCharging(certificationChargings.get(i));
        List<ServiceNameList> serviceNameLists = new ArrayList<ServiceNameList>();
        for (int j = 0; j < serviceNames.size(); j++) {
            List<ChargingPrice> chargingPrices = chargingPriceService.selectListByOneServiceName(serviceNames.get(j));
            ServiceNameList serviceNameList = new ServiceNameList();
            ChargingPriceList chargingPriceList = new ChargingPriceList();
            // 1
            chargingPriceList.setChargingPriceLists(chargingPrices);
            // 2
            serviceNameList.setServiceName(serviceNames.get(j));
            serviceNameList.setChargingPriceList(chargingPriceList);
            serviceNameLists.add(serviceNameList);
        }
        certificationChargingList.setCertificationCharging(certificationChargings.get(i));
        certificationChargingList.setServiceNameLists(serviceNameLists);
        certificationChargingLists.add(certificationChargingList);
    }
    certificationChargingWrap.setCertificationChargingLists(certificationChargingLists);
    uiModel.addAttribute("ccw", certificationChargingWrap);
    Map<Long, AppService> appServiceMap = sqlSession.selectMap("com.itrus.portal.db.AppServiceMapper.selectByExample", null, "id");
    uiModel.addAttribute("appServiceMap", appServiceMap);
    // 返回页面上的表单数据
    returnParam(request, uiModel);
    return "certificationcharging/show";
}
Also used : ServiceNameList(com.itrus.portal.entity.ServiceNameList) AppService(com.itrus.portal.db.AppService) CertificationCharging(com.itrus.portal.db.CertificationCharging) ApplicationInfo(com.itrus.portal.db.ApplicationInfo) ArrayList(java.util.ArrayList) ChargingPriceList(com.itrus.portal.entity.ChargingPriceList) CertificationChargingList(com.itrus.portal.entity.CertificationChargingList) AppServiceExample(com.itrus.portal.db.AppServiceExample) CertificationChargingWrap(com.itrus.portal.entity.CertificationChargingWrap) ServiceName(com.itrus.portal.db.ServiceName) ChargingPrice(com.itrus.portal.db.ChargingPrice) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Example 10 with AppServiceExample

use of com.itrus.portal.db.AppServiceExample in project portal by ixinportal.

the class AppServiceExtImpl method selectAppServiceByAppServiceId.

/**
 * 根据服务编号,得到服务
 * @param appServiceId
 * @return
 */
public AppService selectAppServiceByAppServiceId(String appServiceId) {
    AppServiceExample appServiceExample = new AppServiceExample();
    AppServiceExample.Criteria aec = appServiceExample.createCriteria();
    aec.andAppServiceIdEqualTo(appServiceId);
    return this.selectOneByExample(appServiceExample);
}
Also used : AppServiceExample(com.itrus.portal.db.AppServiceExample)

Aggregations

AppServiceExample (com.itrus.portal.db.AppServiceExample)17 RequestMapping (org.springframework.web.bind.annotation.RequestMapping)13 AppService (com.itrus.portal.db.AppService)10 ResponseBody (org.springframework.web.bind.annotation.ResponseBody)6 ApplicationInfo (com.itrus.portal.db.ApplicationInfo)2 CertificationCharging (com.itrus.portal.db.CertificationCharging)2 ChargingPrice (com.itrus.portal.db.ChargingPrice)2 EvidenceSaveService (com.itrus.portal.db.EvidenceSaveService)2 ServiceName (com.itrus.portal.db.ServiceName)2 CertificationChargingList (com.itrus.portal.entity.CertificationChargingList)2 CertificationChargingWrap (com.itrus.portal.entity.CertificationChargingWrap)2 ChargingPriceList (com.itrus.portal.entity.ChargingPriceList)2 ServiceNameList (com.itrus.portal.entity.ServiceNameList)2 ArrayList (java.util.ArrayList)2 HashMap (java.util.HashMap)1