| | |
| | | import com.github.pagehelper.PageInfo; |
| | | import com.hx.common.BaseController; |
| | | import com.hx.exception.TipsException; |
| | | import com.hx.guide.util.CommonQueryUtil; |
| | | import com.hx.mybatisTool.SqlSentence; |
| | | import com.hx.phiappt.common.OperatorConstants; |
| | | import com.hx.phiappt.constants.enums.GroupTypeEnum; |
| | | import com.hx.phiappt.constants.tool.user.UserTool; |
| | | import com.hx.phiappt.dao.mapper.*; |
| | | import com.hx.phiappt.model.*; |
| | | import com.hx.phiappt.model.user.UserCard; |
| | | import com.hx.phip.config.GlobalExceptionHandler; |
| | | import com.hx.phip.tool.user.UserCardTool; |
| | | import com.hx.resultTool.Result; |
| | | import com.hx.util.DateUtil; |
| | | import com.hx.util.StringUtils; |
| | | import com.hz.his.dto.PageDto; |
| | | import com.hz.his.dto.appointment.AppointmentAutoMateDto; |
| | | import com.hz.his.dto.appointment.AppointmentDto; |
| | | import com.hz.his.dto.appointment.AppointmentV2Dto; |
| | | import com.hz.his.dto.user.UserDto; |
| | | import com.hz.his.vo.user.card.UserCardEquityVo; |
| | | 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; |
| | |
| | | if(StringUtils.isEmpty(dto.getUserId())){ |
| | | throw new TipsException("用户标识为空!"); |
| | | } |
| | | dto.setOpId(dto.getUserId()); |
| | | dto.setOpType(OperatorConstants.OP_TYPE_USER); |
| | | return appointmentController.cancel(dto); |
| | | } |
| | |
| | | Map<String, Object> values = new HashMap<>(); |
| | | sqlSentence.setM(values); |
| | | values.put("userId", dto.getUserId()); |
| | | values.put("status1", Appointment.STATUS_SUC); |
| | | // values.put("addMode9", Appointment.ADD_MODE_CRM_CREATE); |
| | | values.put("addMode9", Appointment.ADD_MODE_CRM_CREATE); |
| | | |
| | | 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, remark ") |
| | | sql.append(" select a.id, a.startTime, a.endTime, s.name as shopName, d.cnName as doctorName, a.doctorId, a.addMode ") |
| | | .append(" , a.status, a.isArrive, a.projectJson, a.addMode, a.createManName, a.createManType, a.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.userId = #{m.userId} ") |
| | | //只查询预约成功和取消的 |
| | | .append(" and a.status in (").append(Appointment.STATUS_SUC).append(",").append(Appointment.STATUS_CANCEL).append(") ") |
| | | // .append(" and a.addMode != #{m.addMode9} ") |
| | | .append(" order by a.startTime desc "); |
| | | sqlSentence.setSqlSentence(sql.toString()); |