|
@ -1,57 +0,0 @@
|
|
|
package com.yihu.wlyy.web.doctor.prescription;
|
|
|
|
|
|
import com.yihu.wlyy.aop.ObserverRequired;
|
|
|
import com.yihu.wlyy.service.app.prescription.PrescriptionDispensaryCodeService;
|
|
|
import com.yihu.wlyy.service.app.prescription.PrescriptionExpressageService;
|
|
|
import com.yihu.wlyy.service.app.prescription.PrescriptionNoticesService;
|
|
|
import com.yihu.wlyy.web.BaseController;
|
|
|
import com.yihu.wlyy.web.WeixinBaseController;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import io.swagger.annotations.ApiParam;
|
|
|
import org.json.JSONArray;
|
|
|
import org.json.JSONObject;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
/**
|
|
|
* Created by Reece on 2017/8/3.
|
|
|
*/
|
|
|
@RestController
|
|
|
@RequestMapping(value = "/doctor/prescriptionNotices")
|
|
|
@Api(description = "医生端-长处方模板消息接口")
|
|
|
public class PrescriptionNoticesController extends WeixinBaseController {
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
private PrescriptionNoticesService noticesService;
|
|
|
|
|
|
/**
|
|
|
* 医生端及基卫发送给居民的模板消息
|
|
|
* @param doctor 相关医生信息
|
|
|
* @param patient 目标居民信息
|
|
|
* @param checkDoctor 审核医生姓名
|
|
|
* @param ordenTime 订单完成时间 时间字符串格式yyyy-MM-dd HH:mm:ss
|
|
|
* @param type 1:续方审核通知 2:取药代办通知 3:配送中信息变更 4:已完成服务结果
|
|
|
* @param status 续方通知状态 0不通过 1通过 2调整处方 其余模板通知消息状态均为0
|
|
|
* @return
|
|
|
*/
|
|
|
@RequestMapping(value = "/sendMessage", method = RequestMethod.POST)
|
|
|
@ApiOperation(value = "模板消息发送")
|
|
|
public String sendMessage(
|
|
|
@RequestParam() @ApiParam(value = "相关医生信息", name = "doctor")String doctor,
|
|
|
@RequestParam() @ApiParam(value = "目标居民信息", name = "patient")String patient,
|
|
|
@RequestParam() @ApiParam(value = "审核医生姓名", name = "checkDoctor")String checkDoctor,
|
|
|
@RequestParam() @ApiParam(value = "订单完成时间 格式yyyy-MM-dd HH:mm:ss", name = "ordenTime")String ordenTime,
|
|
|
@RequestParam() @ApiParam(value = "模板类型", name = "type")int type,
|
|
|
@RequestParam() @ApiParam(value = "模板", name = "status")int status) {
|
|
|
try {
|
|
|
String accessToken = getAccessToken();
|
|
|
noticesService.sendMessages(accessToken,doctor,patient,checkDoctor,ordenTime,type,status);
|
|
|
return write(200, "配送成功");
|
|
|
} catch (Exception e) {
|
|
|
return error(-1, "失败");
|
|
|
}
|
|
|
}
|
|
|
|
|
|
}
|