fhx
2024-08-23 02d07216da19c6c7357de4d392e279ef13d13804
1.修改新增用户自助预约返回
1个文件已修改
28 ■■■■■ 已修改文件
phi_platform_user/src/main/java/com/hx/phip/controller/appointment/CrmSelfV2Controller.java 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
phi_platform_user/src/main/java/com/hx/phip/controller/appointment/CrmSelfV2Controller.java
@@ -28,6 +28,7 @@
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;
@@ -266,7 +267,30 @@
        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);
    }
    /** 取消预约 */
@@ -296,7 +320,7 @@
        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 ")