|
@ -24,6 +24,8 @@ public class PrescriptionCodeController extends BaseController{
|
|
|
@Autowired
|
|
|
private PrescriptionDispensaryCodeService prescriptionDispensaryCodeService;
|
|
|
|
|
|
@Autowired
|
|
|
private PrescriptionExpressageService prescriptionExpressageService;
|
|
|
/**
|
|
|
* 显示居民所有的取药码列表
|
|
|
* @param status 处方状态
|
|
@ -46,4 +48,26 @@ public class PrescriptionCodeController extends BaseController{
|
|
|
return result.toString();
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 确认配送 二维码方式
|
|
|
* 根据处方code获取处方流程
|
|
|
*
|
|
|
* @param code wlyy_prescription_dispensary_code的code
|
|
|
* @return
|
|
|
*/
|
|
|
@RequestMapping(value = "/expressage", method = RequestMethod.POST)
|
|
|
@ApiOperation(value = "确认配送")
|
|
|
public String expressage(
|
|
|
@RequestParam(required = true) @ApiParam(value = "wlyy_prescription_dispensary_code的code", name = "code") String code) {
|
|
|
try {
|
|
|
Integer status = prescriptionExpressageService.expressage(code, getUID());
|
|
|
if (status == -1) {
|
|
|
return error(-1, "编码不存在");
|
|
|
}
|
|
|
return write(200, "配送成功");
|
|
|
} catch (Exception e) {
|
|
|
return error(-1, "失败");
|
|
|
}
|
|
|
}
|
|
|
|
|
|
}
|