| | |
| | | tbOrders.setAppId(appId); |
| | | tbOrders.setCreateTime(new Date()); |
| | | |
| | | tbOrdersService.insertTbOrders(tbOrders); |
| | | try |
| | | { |
| | | tbOrdersService.insertTbOrders(tbOrders); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | return AjaxResult.error("订单号不能重复"); |
| | | } |
| | | |
| | | |
| | | SysClientApp scApp = clientAppService.selectSysClientAppByAppKey(tbOrders.getAppId()); |
| | |
| | | ServiceOrderAppVo model = new ServiceOrderAppVo(); |
| | | model.setMethod("ServiceOrder_APP"); // 设置接口名称 |
| | | model.setAppId(scApp.getMinAppId()); // 设置商户 APPID |
| | | |
| | | |
| | | model.setOrdType(tbOrders.getTypeCode().intValue()); |
| | | model.setCoPhone(tbOrders.getLinkTel()); // 客户联系电话 |
| | | model.setCoName(tbOrders.getLinkPerson()); // 客户姓名 |
| | |
| | | model.setOutHosp(tbOrders.getLocalAddress()); // 设置转出医院 |
| | | model.setInHosp(tbOrders.getSendAddress()); // 设置转入医院 |
| | | // model.setPtServices("科室" + (int) (Math.random() * 10)); // 随机设置患者所在科室 |
| | | model.setPtDiagnosis(tbOrders.getComplaint()); // 设置诊断信息 |
| | | model.setCondition(tbOrders.getRemark()); // 设置备注信息 |
| | | |
| | | //如果诊断信息为空,则不设置诊断信息 |
| | | if(tbOrders.getComplaint() != null && !tbOrders.getComplaint().equals("")) |
| | | { |
| | | model.setPtDiagnosis(tbOrders.getComplaint()); // 设置诊断信息 |
| | | } |
| | | |
| | | //如果备注信息为空,则不设置备注信息 |
| | | if(tbOrders.getRemark() != null && !tbOrders.getRemark().equals("")) |
| | | { |
| | | model.setCondition(tbOrders.getRemark()); // 设置备注信息 |
| | | } |
| | | |
| | | |
| | | // model.setDoctor("医生" + (int) (Math.random() * 10)); // 随机设置患者医生 |
| | | // model.setDoctorPhone("13" + (int) (Math.random() * 900000000 + 100000000)); // 随机生成患者医生电话 |
| | | model.setOfferPrice(tbOrders.getBookingPrice().doubleValue()); // 生成报价 |