|
@ -9,6 +9,7 @@ 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.*;
|
|
|
|
|
@ -25,7 +26,7 @@ public class PrescriptionCodeController extends BaseController{
|
|
|
private PrescriptionDispensaryCodeService prescriptionDispensaryCodeService;
|
|
|
|
|
|
/**
|
|
|
* 显示居民所有的取药码列表
|
|
|
* 显示健管师(配送员)所有的取药码列表
|
|
|
* @param status 处方状态
|
|
|
* @param timeType 搜索时间类型
|
|
|
* @param page 当前页
|
|
@ -42,8 +43,39 @@ public class PrescriptionCodeController extends BaseController{
|
|
|
@RequestParam(value = "page",required = true) Integer page,
|
|
|
@RequestParam(value = "pagesize",required = true) Integer pagesize) {
|
|
|
//getUID()
|
|
|
JSONArray result = prescriptionDispensaryCodeService.findByStatusAndTime(timeType,getUID(),status,page,pagesize,2);
|
|
|
return result.toString();
|
|
|
try{
|
|
|
JSONArray result = prescriptionDispensaryCodeService.findByStatusAndTime(timeType,getUID(),status,page,pagesize,2);
|
|
|
return result.toString();
|
|
|
}catch (Exception e) {
|
|
|
error(e);
|
|
|
return error(-1, "查询失败!");
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 判断医生端是否有待取的药的接口
|
|
|
* @return
|
|
|
*/
|
|
|
@RequestMapping(value = "/whetherHaveCode", method = RequestMethod.GET)
|
|
|
@ResponseBody
|
|
|
@ObserverRequired
|
|
|
public String whetherHaveCode() {
|
|
|
try{
|
|
|
JSONObject json = new JSONObject();
|
|
|
// String patientCode = getUID();
|
|
|
int count = prescriptionDispensaryCodeService.dispensaryCodeCount(getUID(),2);
|
|
|
if (count > 0) {
|
|
|
json.put("data", true);
|
|
|
return json.toString();
|
|
|
}
|
|
|
json.put("data", false);
|
|
|
return json.toString();
|
|
|
}catch (Exception e) {
|
|
|
error(e);
|
|
|
return error(-1, "查询失败!");
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|