| | |
| | | import com.hz.his.vo.user.card.UserCardItemVo; |
| | | import com.hz.his.vo.user.card.UserCardVo; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.poi.ss.formula.functions.T; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | |
| | | dto.setIsMicApprove(BaseEntity.NO); //无需MIC同意 |
| | | dto.setIsSendMsg(BaseEntity.YES); //发送短信通知 |
| | | dto.setIsArriveSendMsg(BaseEntity.YES); //发送短信通知 |
| | | return appointmentController.add(dto); |
| | | |
| | | //新增预约 |
| | | Result result = appointmentController.add(dto); |
| | | if(!result.checkCode()){ |
| | | log.error("新增用户自助预约V2失败:{}", JSONObject.toJSONString(result)); |
| | | throw new TipsException("新增预约失败!"); |
| | | } |
| | | |
| | | JSONObject data = result.getJsonObject(result.getData()); |
| | | //查询返回对应预约信息 |
| | | SqlSentence sqlSentence = new SqlSentence(); |
| | | Map<String, Object> values = new HashMap<>(); |
| | | sqlSentence.setM(values); |
| | | values.put("id", data.getString("id")); |
| | | StringBuilder sql = new StringBuilder(); |
| | | sql.append(" select a.id, a.startTime, a.endTime, s.name as shopName , d.cnName as doctorName, a.doctorId ") |
| | | .append(" , a.status, a.isArrive, a.projectNames, a.projectJson, a.addMode, a.createManName, a.createManType, remark ") |
| | | .append(" from appointment a ") |
| | | .append(" left join shop s on s.id = a.shopId ") |
| | | .append(" left join employee d on d.id = a.doctorId ") |
| | | .append(" where a.isDel = 0 and a.id = #{m.id} "); |
| | | sqlSentence.setSqlSentence(sql.toString()); |
| | | Map<String, Object> dataMap = commonService.selectOneMap(AppointmentMapper.class, sqlSentence); |
| | | return Result.success(dataMap); |
| | | } |
| | | |
| | | /** 取消预约 */ |
| | |
| | | |
| | | StringBuilder sql = new StringBuilder(); |
| | | sql.append(" select a.id, a.startTime, a.endTime, s.name as shopName , d.cnName as doctorName, a.doctorId ") |
| | | .append(" , a.status, a.isArrive, a.projectJson, a.addMode, a.createManName, a.createManType ") |
| | | .append(" , a.status, a.isArrive, a.projectJson, a.addMode, a.createManName, a.createManType, remark ") |
| | | .append(" from appointment a ") |
| | | .append(" left join shop s on s.id = a.shopId ") |
| | | .append(" left join employee d on d.id = a.doctorId ") |