新增上报处方平台接口
This commit is contained in:
@@ -27,7 +27,7 @@ func (b *Department) GetDepartmentCustomList(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
hospitalDepartmentCustomDao := dao.HospitalDepartmentCustom{}
|
||||
hospitalDepartmentCustomDao := dao.HospitalDepartmentCustomDao{}
|
||||
|
||||
hospitalDepartmentCustom, err := hospitalDepartmentCustomDao.GetHospitalDepartmentCustomListByMaps(departmentRequest.GetDepartmentCustomList)
|
||||
if err != nil {
|
||||
|
||||
+24
-6
@@ -1,18 +1,36 @@
|
||||
package controller
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/gin-gonic/gin"
|
||||
"hospital-admin-api/api/responses"
|
||||
"hospital-admin-api/extend/prescription"
|
||||
"hospital-admin-api/api/service"
|
||||
"strconv"
|
||||
)
|
||||
|
||||
type Order struct{}
|
||||
|
||||
// ReportPreOrder 上报处方平台
|
||||
func (r *Order) ReportPreOrder(c *gin.Context) {
|
||||
token, err := prescription.NoticePreOrderCancel("124")
|
||||
if err != nil {
|
||||
responses.OkWithData(err.Error(), c)
|
||||
id := c.Param("order_product_id")
|
||||
if id == "" {
|
||||
responses.FailWithMessage("缺少参数", c)
|
||||
return
|
||||
}
|
||||
fmt.Println(token)
|
||||
|
||||
// 将 id 转换为 int64 类型
|
||||
orderProductId, err := strconv.ParseInt(id, 10, 64)
|
||||
if err != nil {
|
||||
responses.Fail(c)
|
||||
return
|
||||
}
|
||||
|
||||
// 业务处理
|
||||
orderService := service.OrderService{}
|
||||
_, err = orderService.ReportPreProduct(orderProductId)
|
||||
if err != nil {
|
||||
responses.FailWithMessage(err.Error(), c)
|
||||
return
|
||||
}
|
||||
|
||||
responses.Ok(c)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user