use of com.itrus.portal.db.ServiceProvider in project portal by ixinportal.
the class ExtraBillPayController method show.
// 显示详情
@RequestMapping(value = "/{id}", produces = "text/html")
public String show(@PathVariable("id") Long id, Model uiModel, @RequestParam(value = "payStatus", required = false) Integer payStatus) {
uiModel.addAttribute("payStatus", payStatus);
// 管理员项目权限
Long[] projectsOfAdmin = getProjectLongIdsOfAdmin();
List<Long> projectsOfAdminList = Arrays.asList(projectsOfAdmin);
ExtraBillExample billExample = new ExtraBillExample();
ExtraBillExample.Criteria criteria = billExample.or();
criteria.andIdEqualTo(id);
criteria.andProjectIn(projectsOfAdminList);
ExtraBill bill = sqlSession.selectOne("com.itrus.portal.db.ExtraBillMapper.selectByExample", billExample);
if (null == bill) {
uiModel.addAttribute("errorMsg", "未找到该订单");
return "status403";
}
uiModel.addAttribute("bill", bill);
// 项目
Project project = sqlSession.selectOne("com.itrus.portal.db.ProjectMapper.selectByPrimaryKey", bill.getProject());
uiModel.addAttribute("project", project);
// 企业
Enterprise enterprise = sqlSession.selectOne("com.itrus.portal.db.EnterpriseMapper.selectByPrimaryKey", bill.getEnterprise());
uiModel.addAttribute("enterprise", enterprise);
// 产品
ExtraProduct product = sqlSession.selectOne("com.itrus.portal.db.ExtraProductMapper.selectByPrimaryKey", bill.getExtraProduct());
uiModel.addAttribute("product", product);
// 规格
ExtraProductSpec productSpec = sqlSession.selectOne("com.itrus.portal.db.ExtraProductSpecMapper.selectByPrimaryKey", bill.getExtraProductSpec());
uiModel.addAttribute("productSpec", productSpec);
// 服务商
ServiceProvider serviceProvider = serviceProviderService.selectByPrimaryKey(product.getServiceProvider());
uiModel.addAttribute("serviceProvider", serviceProvider);
// 用户
UserInfo userInfo = sqlSession.selectOne("com.itrus.portal.db.UserInfoMapper.selectByPrimaryKey", bill.getUniqueId());
uiModel.addAttribute("userInfo", userInfo);
// 第三方支付信息
OnPayInfo onPayInfo = sqlSession.selectOne("com.itrus.portal.db.OnPayInfoMapper.selectByPrimaryKey", bill.getOnPayInfo());
uiModel.addAttribute("onPayInfo", onPayInfo);
if (onPayInfo != null && onPayInfo.getOnlinePay() != null) {
// 在线支付
OnlinePay onlinePay = sqlSession.selectOne("com.itrus.portal.db.OnlinePayMapper.selectByPrimaryKey", onPayInfo.getOnlinePay());
uiModel.addAttribute("onlinePay", onlinePay);
}
// 电子发票
Einvoice einvoice = sqlSession.selectOne("com.itrus.portal.db.EinvoiceMapper.selectByPrimaryKey", bill.geteInvoice());
uiModel.addAttribute("einvoice", einvoice);
// 其他附加信息
// 营业执照
BusinessLicense businessLicense = businessService.getBusinessByExtraBillId(id, null);
uiModel.addAttribute("businessLicense", businessLicense);
// 税务登记
TaxRegisterCert taxRegisterCert = taxCertService.getTaxRegisterCertByExtraBillId(id, null);
uiModel.addAttribute("taxRegisterCert", taxRegisterCert);
// 组织机构代码
OrgCode orgCode = orgCodeService.getOrgCodeByExtraBillId(id, null);
uiModel.addAttribute("orgCode", orgCode);
// 代理人
Agent agent = agentService.getAgentByExtraBillId(id, null);
uiModel.addAttribute("agent", agent);
// 开户行信息
OpenBankInfo openBankInfo = openBankInfoService.getOpenBankInfoByExtraBillId(id, null);
uiModel.addAttribute("openBankInfo", openBankInfo);
// 法人信息
IdentityCard identityCard = identityCardService.getIdentityCardByExtraBillId(id, null);
uiModel.addAttribute("identityCard", identityCard);
// TODO 还需要补充订单对应的附加信息和第三方回调信息
return "extrabillpay/show";
}
use of com.itrus.portal.db.ServiceProvider in project portal by ixinportal.
the class ServiceProviderController method list.
// 遍历页面
@RequestMapping(produces = "text/html")
public String list(@RequestParam(value = "queryDate1", required = false) Date queryDate1, @RequestParam(value = "queryDate2", required = false) Date queryDate2, @RequestParam(value = "name", required = false) String name, @RequestParam(value = "contactsName", required = false) String contactsName, @RequestParam(value = "contactsMphone", required = false) String contactsMphone, @RequestParam(value = "page", required = false) Integer page, @RequestParam(value = "size", required = false) Integer size, Model uiModel) throws Exception {
if (queryDate1 == null && queryDate2 == null) {
Calendar calendar = Calendar.getInstance();
calendar.add(Calendar.DATE, 1);
calendar.set(Calendar.HOUR_OF_DAY, 0);
calendar.set(Calendar.MINUTE, 0);
calendar.set(Calendar.SECOND, 0);
calendar.set(Calendar.MILLISECOND, 0);
calendar.add(Calendar.MILLISECOND, -1);
queryDate2 = calendar.getTime();
calendar.add(Calendar.MILLISECOND, 1);
calendar.add(Calendar.MONTH, -1);
queryDate1 = calendar.getTime();
}
if (page == null || page < 1)
page = 1;
if (size == null || size < 1)
size = 10;
Integer offset = size * (page - 1);
ServiceProviderExample example = new ServiceProviderExample();
ServiceProviderExample.Criteria criteria = example.createCriteria();
criteria.andCreateTimeBetween(queryDate1, queryDate2);
Integer count = ServiceProviderService.countByExample(example);
example.setLimit(size);
example.setOffset(offset);
if (StringUtils.isNotBlank(name)) {
criteria.andNameLike(name);
}
if (StringUtils.isNotBlank(contactsName)) {
criteria.andContactsNameLike(contactsName);
}
if (StringUtils.isNotBlank(contactsMphone)) {
criteria.andContactsMphoneLike(contactsMphone);
}
List<ServiceProvider> serviceProviders = ServiceProviderService.selectByExample(example);
uiModel.addAttribute("serviceProviders", serviceProviders);
uiModel.addAttribute("queryDate1", queryDate1);
uiModel.addAttribute("queryDate2", queryDate2);
uiModel.addAttribute("name", name);
uiModel.addAttribute("contactsName", contactsName);
uiModel.addAttribute("contactsMphone", contactsMphone);
uiModel.addAttribute("page", page);
uiModel.addAttribute("size", size);
uiModel.addAttribute("count", count);
return "serviceprovider/list";
}
use of com.itrus.portal.db.ServiceProvider in project portal by ixinportal.
the class ServiceProviderServiceImpl method selectByExample.
public List<ServiceProvider> selectByExample(ServiceProviderExample example) throws Exception {
ServiceProviderMapper mapper = sqlSession.getMapper(ServiceProviderMapper.class);
List<ServiceProvider> list = mapper.selectByExample(example);
return list;
}
use of com.itrus.portal.db.ServiceProvider in project portal by ixinportal.
the class ServiceProviderServiceImpl method selectByPrimaryKey.
public ServiceProvider selectByPrimaryKey(Long id) {
ServiceProviderMapper mapper = sqlSession.getMapper(ServiceProviderMapper.class);
ServiceProvider serviceProvider = mapper.selectByPrimaryKey(id);
return serviceProvider;
}
use of com.itrus.portal.db.ServiceProvider in project portal by ixinportal.
the class ServiceProviderController method show.
// 显示详情页面
@RequestMapping(value = "/show/{id}", produces = "text/html")
public String show(@PathVariable("id") Long id, Model uiModel) throws Exception {
ServiceProvider serviceProvider = ServiceProviderService.selectByPrimaryKey(id);
uiModel.addAttribute("serviceProvider", serviceProvider);
List<ServiceHall> serviceHalls = serviceHallService.getServiceHalls(serviceProvider.getId());
uiModel.addAttribute("serviceHalls", serviceHalls);
List<ExtraProduct> products = extraProductService.getProductsByServiceProviderId(serviceProvider.getId());
uiModel.addAttribute("products", products);
return "serviceprovider/show";
}
Aggregations