fhx
2024-08-28 140b61aad1730391e9da54eac267adcf480239d8
1.修改crm自助预约v2类代码
1个文件已修改
19 ■■■■■ 已修改文件
phi_platform_user/src/main/java/com/hx/phip/controller/appointment/CrmSelfV2Controller.java 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
phi_platform_user/src/main/java/com/hx/phip/controller/appointment/CrmSelfV2Controller.java
@@ -6,29 +6,20 @@
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;
@@ -307,6 +298,7 @@
        if(StringUtils.isEmpty(dto.getUserId())){
            throw new TipsException("用户标识为空!");
        }
        dto.setOpId(dto.getUserId());
        dto.setOpType(OperatorConstants.OP_TYPE_USER);
        return appointmentController.cancel(dto);
    }
@@ -323,16 +315,17 @@
        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());