123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666 |
- package controllers
- import (
- "ERP_salary/Nats/NatsServer"
- "ERP_salary/conf"
- "ERP_salary/logs"
- "ERP_salary/models/Account"
- "ERP_salary/models/Reimburse"
- "encoding/json"
- "fmt"
- powerlibs "git.baozhida.cn/ERP_libs/Power"
- userlibs "git.baozhida.cn/ERP_libs/User"
- "git.baozhida.cn/ERP_libs/lib"
- "github.com/beego/beego/v2/adapter/orm"
- "strconv"
- "strings"
- //"github.com/beego/beego/v2/client/orm"
- beego "github.com/beego/beego/v2/server/web"
- "math"
- "time"
- )
- type ReimburseController struct {
- beego.Controller
- User userlibs.User
- }
- func (c *ReimburseController) Prepare() {
- c.User = *Account.User_r
- }
- func (c *ReimburseController) CheckRBAC(T_power string) {
- o := orm.NewOrm()
- powerDao := powerlibs.NewPower(o)
- power, err := powerDao.Read_Power_ByT_id(T_power)
- if err != nil {
- c.Data["json"] = lib.JSONS{Code: 202, Msg: "无权访问!"}
- c.ServeJSON()
- return
- }
- if power.T_menu == "*" {
- return
- }
- api := Account.Read_API_List_ByPower(power.T_id, power.T_menu)
- flag := false
- for _, v := range api {
- if v.T_uri == c.Ctx.Request.URL.Path {
- flag = true
- break
- }
- }
- if !flag {
- c.Data["json"] = lib.JSONS{Code: 202, Msg: "无权访问!"}
- c.ServeJSON()
- return
- }
- }
- func (c *ReimburseController) User_List() {
- var r_jsons lib.R_JSONS
- // 分页参数 初始化
- page, _ := c.GetInt("page")
- if page < 1 {
- page = 1
- }
- page_z, _ := c.GetInt("page_z")
- if page_z < 1 {
- page_z = conf.Page_size
- }
- T_name := c.GetString("T_name")
- ReimburseDao := Reimburse.NewReimburse(orm.NewOrm())
- uuidList := ReimburseDao.Read_T_uuid_List()
- if len(uuidList) == 0 {
- c.Data["json"] = lib.JSONS{Code: 200, Msg: "ok!"}
- c.ServeJSON()
- return
- }
- WaitAuditList := ReimburseDao.Read_T_uuid_List_by_State(Reimburse.WaitAudit)
- WaitAuditListMap := make(map[string]struct{})
- for _, v := range WaitAuditList {
- WaitAuditListMap[v] = struct{}{}
- }
- type User struct {
- userlibs.User
- T_wait_audit bool `json:"T_wait_audit"`
- }
- R_List, R_cnt, err := NatsServer.Read_User_List_T_uuid(T_name, uuidList, page, page_z)
- if err != nil {
- c.Data["json"] = lib.JSONS{Code: 202, Msg: "查询失败"}
- c.ServeJSON()
- return
- }
- var U_List []User
- for _, user := range R_List {
- var T_wait_audit bool
- if _, ok := WaitAuditListMap[user.T_uuid]; ok {
- T_wait_audit = true
- }
- U_List = append(U_List, User{user, T_wait_audit})
- }
- r_jsons.Num = R_cnt
- r_jsons.Data = U_List
- r_jsons.Page = page
- r_jsons.Page_size = int(math.Ceil(float64(R_cnt) / float64(page_z)))
- c.Data["json"] = lib.JSONS{Code: 200, Msg: "ok!", Data: r_jsons}
- c.ServeJSON()
- return
- }
- // 消费类型
- func (c *ReimburseController) FeeType_List() {
- type Reimburse_R struct {
- Id int
- T_name string
- T_mid int
- T_State int
- FeeDetails []Reimburse.FeeType
- }
- var res []Reimburse_R
- list := Reimburse.Read_FeeType_List()
- for _, v := range list {
- res = append(res, Reimburse_R{
- Id: v.Id,
- T_name: v.T_name,
- T_mid: v.T_mid,
- T_State: v.T_State,
- FeeDetails: Reimburse.Read_FeeDetails_List(v.Id),
- })
- }
- c.Data["json"] = lib.JSONS{Code: 200, Msg: "ok!", Data: res}
- c.ServeJSON()
- return
- }
- //func (c *ReimburseController) FeeType_List() {
- // c.Data["json"] = lib.JSONS{Code: 200, Msg: "ok!", Data: Reimburse.Read_FeeType_List()}
- // c.ServeJSON()
- // return
- //}
- // 消费明细
- func (c *ReimburseController) FeeDetails_List() {
- T_feeType, _ := c.GetInt("T_feeType")
- if T_feeType == 0 {
- c.Data["json"] = lib.JSONS{Code: 202, Msg: "T_feeType Err!"}
- c.ServeJSON()
- return
- }
- c.Data["json"] = lib.JSONS{Code: 200, Msg: "ok!", Data: Reimburse.Read_FeeDetails_List(T_feeType)}
- c.ServeJSON()
- return
- }
- // 管理元报销列表
- func (c *ReimburseController) Reimburse_List() {
- // 分页参数 初始化
- page, _ := c.GetInt("page")
- if page < 1 {
- page = 1
- }
- page_z, _ := c.GetInt("page_z")
- if page_z < 1 {
- page_z = conf.Page_size
- }
- T_uuid := c.GetString("T_uuid")
- userList, _ := NatsServer.Read_User_List_All()
- Account.Read_User_All_Map(userList)
- ReimburseDao := Reimburse.NewReimburse(orm.NewOrm())
- reimburse_List, num := ReimburseDao.Read_Reimburse_Finance_List(T_uuid, page, page_z)
- var r_jsons lib.R_JSONS
- r_jsons.Data = reimburse_List
- r_jsons.Num = num
- r_jsons.Page = page
- r_jsons.Page_size = int(math.Ceil(float64(num) / float64(page_z)))
- c.Data["json"] = lib.JSONS{Code: 200, Msg: "ok!", Data: r_jsons}
- c.ServeJSON()
- return
- }
- // 员工报销列表
- func (c *ReimburseController) Reimburse_User_List() {
- // 分页参数 初始化
- page, _ := c.GetInt("page")
- if page < 1 {
- page = 1
- }
- page_z, _ := c.GetInt("page_z")
- if page_z < 1 {
- page_z = conf.Page_size
- }
- userList, _ := NatsServer.Read_User_List_All()
- Account.Read_User_All_Map(userList)
- ReimburseDao := Reimburse.NewReimburse(orm.NewOrm())
- reimburse_List, num := ReimburseDao.Read_Reimburse_List(c.User.T_uuid, page, page_z)
- var r_jsons lib.R_JSONS
- r_jsons.Data = reimburse_List
- r_jsons.Num = num
- r_jsons.Page = page
- r_jsons.Page_size = int(math.Ceil(float64(num) / float64(page_z)))
- c.Data["json"] = lib.JSONS{Code: 200, Msg: "ok!", Data: r_jsons}
- c.ServeJSON()
- return
- }
- func (c *ReimburseController) Reimburse_Add() {
- type RequestBody struct {
- User_tokey string
- ReimburseDetails []Reimburse.ReimburseDetails
- T_money float32
- }
- var body RequestBody
- data := c.Ctx.Input.RequestBody
- err := json.Unmarshal(data, &body)
- if err != nil {
- c.Data["json"] = lib.JSONS{Code: 202, Msg: "json 反序列化错误:" + err.Error()}
- c.ServeJSON()
- return
- }
- if len(body.ReimburseDetails) == 0 {
- c.Data["json"] = lib.JSONS{Code: 202, Msg: "报销明细不能为空"}
- c.ServeJSON()
- return
- }
- user_r, err := NatsServer.Verification(body.User_tokey, "")
- if err != nil {
- c.Data["json"] = lib.JSONS{Code: 201, Msg: "请重新登陆!"}
- c.ServeJSON()
- return
- }
- // 权限验证
- c.CheckRBAC(user_r.T_power)
- var_ := Reimburse.Reimburse{
- T_uid: user_r.T_uuid,
- T_date: time.Now().Format("2006-01-02"),
- T_money: body.T_money,
- T_State: Reimburse.WaitSubmit,
- }
- o := orm.NewOrm()
- o.Begin()
- ReimburseDao := Reimburse.NewReimburse(o)
- ReimburseDetailsDao := Reimburse.NewReimburseDetails(o)
- id, err := ReimburseDao.Add_Reimburse(var_)
- if err != nil {
- o.Rollback()
- c.Data["json"] = lib.JSONS{Code: 203, Msg: "添加失败"}
- c.ServeJSON()
- return
- }
- for _, v := range body.ReimburseDetails {
- reimburseDetails := Reimburse.ReimburseDetails{
- T_reimburse_id: int(id),
- T_trip_start_time: v.T_trip_start_time,
- T_trip_end_time: v.T_trip_end_time,
- T_trip_origin: v.T_trip_origin,
- T_trip_terminus: v.T_trip_terminus,
- T_fee_type: v.T_fee_type,
- T_fee_details: v.T_fee_details,
- T_money: v.T_money,
- T_reasons: v.T_reasons,
- T_project: v.T_project,
- T_img: v.T_img,
- T_State: 1,
- }
- _, err = ReimburseDetailsDao.Add_ReimburseDetails(reimburseDetails)
- if err != nil {
- o.Rollback()
- c.Data["json"] = lib.JSONS{Code: 203, Msg: "添加失败"}
- c.ServeJSON()
- return
- }
- }
- o.Commit()
- NatsServer.AddUserLogs(c.User.T_uuid, "报销", "添加", var_)
- c.Data["json"] = lib.JSONS{Code: 200, Msg: "ok!", Data: id}
- c.ServeJSON()
- return
- }
- func (c *ReimburseController) Reimburse_Edit() {
- type RequestBody struct {
- User_tokey string
- ReimburseDetails []Reimburse.ReimburseDetails
- T_money float32
- T_id int
- }
- var body RequestBody
- data := c.Ctx.Input.RequestBody
- err := json.Unmarshal(data, &body)
- if err != nil {
- c.Data["json"] = lib.JSONS{Code: 202, Msg: "json.Unmarshal is err:" + err.Error()}
- c.ServeJSON()
- return
- }
- user_r, err := NatsServer.Verification(body.User_tokey, "")
- if err != nil {
- c.Data["json"] = lib.JSONS{Code: 201, Msg: "请重新登陆!"}
- c.ServeJSON()
- return
- }
- // 权限验证
- c.CheckRBAC(user_r.T_power)
- o := orm.NewOrm()
- o.Begin()
- ReimburseDao := Reimburse.NewReimburse(o)
- ReimburseDetailsDao := Reimburse.NewReimburseDetails(o)
- reimburse, err := ReimburseDao.Read_Reimburse_ById(body.T_id)
- if err != nil {
- o.Rollback()
- c.Data["json"] = lib.JSONS{Code: 202, Msg: "Id Err"}
- c.ServeJSON()
- return
- }
- if len(body.ReimburseDetails) == 0 {
- o.Rollback()
- c.Data["json"] = lib.JSONS{Code: 202, Msg: "报销明细不能为空"}
- c.ServeJSON()
- return
- }
- reimburse.T_money = body.T_money
- _, err = ReimburseDao.Update_Reimburse(reimburse, "T_money")
- if err != nil {
- o.Rollback()
- c.Data["json"] = lib.JSONS{Code: 202, Msg: "Id Err"}
- c.ServeJSON()
- return
- }
- // 删除之前的报销明细
- err = ReimburseDetailsDao.Delete_ReimburseDetails(body.T_id)
- if err != nil {
- o.Rollback()
- c.Data["json"] = lib.JSONS{Code: 202, Msg: "修改失败"}
- c.ServeJSON()
- return
- }
- for _, v := range body.ReimburseDetails {
- reimburseDetails := Reimburse.ReimburseDetails{
- T_reimburse_id: reimburse.Id,
- T_trip_start_time: v.T_trip_start_time,
- T_trip_end_time: v.T_trip_end_time,
- T_trip_origin: v.T_trip_origin,
- T_trip_terminus: v.T_trip_terminus,
- T_fee_type: v.T_fee_type,
- T_fee_details: v.T_fee_details,
- T_money: v.T_money,
- T_reasons: v.T_reasons,
- T_project: v.T_project,
- T_img: v.T_img,
- T_State: 1,
- }
- _, err = ReimburseDetailsDao.Add_ReimburseDetails(reimburseDetails)
- if err != nil {
- o.Rollback()
- c.Data["json"] = lib.JSONS{Code: 202, Msg: "修改失败"}
- c.ServeJSON()
- return
- }
- }
- o.Commit()
- NatsServer.AddUserLogs(c.User.T_uuid, "报销", "修改", reimburse)
- c.Data["json"] = lib.JSONS{Code: 200, Msg: "ok!", Data: reimburse.Id}
- c.ServeJSON()
- return
- }
- func (c *ReimburseController) Reimburse_Del() {
- T_id, _ := c.GetInt("T_id")
- o := orm.NewOrm()
- o.Begin()
- ReimburseDao := Reimburse.NewReimburse(o)
- ReimburseDetailsDao := Reimburse.NewReimburseDetails(o)
- reimburse, err := ReimburseDao.Read_Reimburse_ById(T_id)
- if err != nil {
- o.Rollback()
- c.Data["json"] = lib.JSONS{Code: 202, Msg: "T_id Err!"}
- c.ServeJSON()
- return
- }
- if reimburse.T_State == Reimburse.AuditPass || reimburse.T_State == Reimburse.RemitPart || reimburse.T_State == Reimburse.RemitAll {
- o.Rollback()
- c.Data["json"] = lib.JSONS{Code: 202, Msg: "合同已审核通过或已打款,禁止删除!"}
- c.ServeJSON()
- return
- }
- _, err = ReimburseDao.Delete_Reimburse(reimburse)
- if err != nil {
- o.Rollback()
- c.Data["json"] = lib.JSONS{Code: 202, Msg: "删除失败!"}
- c.ServeJSON()
- return
- }
- //删除报销明细
- err = ReimburseDetailsDao.Delete_ReimburseDetails(reimburse.Id)
- if err != nil {
- o.Rollback()
- c.Data["json"] = lib.JSONS{Code: 202, Msg: "删除失败!"}
- c.ServeJSON()
- return
- }
- o.Commit()
- NatsServer.AddUserLogs(c.User.T_uuid, "报销", "删除", T_id)
- c.Data["json"] = lib.JSONS{Code: 200, Msg: "ok!", Data: reimburse.Id}
- c.ServeJSON()
- return
- }
- func (c *ReimburseController) Reimburse_Get() {
- logs.Info("header=======", c.Ctx.Request.Header.Get("User_tokey"))
- T_id, _ := c.GetInt("T_id")
- o := orm.NewOrm()
- ReimburseDao := Reimburse.NewReimburse(o)
- ReimburseDetailsDao := Reimburse.NewReimburseDetails(o)
- Reimburse.Read_FeeType_All_Map()
- reimburse, err := ReimburseDao.Read_Reimburse_ById(T_id)
- if err != nil {
- c.Data["json"] = lib.JSONS{Code: 202, Msg: "T_id Err!"}
- c.ServeJSON()
- return
- }
- //删除报销明细
- reimburseDetailsList, err := ReimburseDetailsDao.Read_ReimburseDetailsList_ByT_reimburse_id(reimburse.Id)
- if err != nil {
- c.Data["json"] = lib.JSONS{Code: 202, Msg: "查询失败!"}
- c.ServeJSON()
- return
- }
- var pList []Reimburse.ReimburseDetails_R
- for _, v := range reimburseDetailsList {
- p := Reimburse.ReimburseDetailsToReimburseDetails_R(v)
- pList = append(pList, p)
- }
- NatsServer.AddUserLogs(c.User.T_uuid, "报销", "删除", T_id)
- c.Data["json"] = lib.JSONS{Code: 200, Msg: "ok!", Data: Reimburse.ReimburseToReimburse_Detail(reimburse, pList)}
- c.ServeJSON()
- return
- }
- // 提交审核
- func (c *ReimburseController) Reimburse_Submit_Audit() {
- T_id, _ := c.GetInt("T_id")
- o := orm.NewOrm()
- ReimburseDao := Reimburse.NewReimburse(o)
- reimburse, err := ReimburseDao.Read_Reimburse_ById(T_id)
- if err != nil {
- c.Data["json"] = lib.JSONS{Code: 202, Msg: "T_id Err!"}
- c.ServeJSON()
- return
- }
- if c.User.T_uuid != reimburse.T_uid {
- c.Data["json"] = lib.JSONS{Code: 202, Msg: "没有权限!"}
- c.ServeJSON()
- return
- }
- if reimburse.T_State != Reimburse.WaitSubmit && reimburse.T_State != Reimburse.AuditUnPass {
- c.Data["json"] = lib.JSONS{Code: 202, Msg: fmt.Sprintf("状态为%s,禁止提交审核!", Reimburse.Read_Audit_Get(reimburse.T_State))}
- c.ServeJSON()
- return
- }
- reimburse.T_State = Reimburse.WaitAudit
- _, err = ReimburseDao.Update_Reimburse(reimburse, "T_State")
- if err != nil {
- c.Data["json"] = lib.JSONS{Code: 202, Msg: "提交审核失败!"}
- c.ServeJSON()
- return
- }
- NatsServer.AddNews(conf.FinanceUuid, fmt.Sprintf("【报销审核】您有一条%s的报销审核待处理", c.User.T_name), conf.ReimburseApprovalUrl)
- NatsServer.AddUserLogs(c.User.T_uuid, "报销", "提交审核", reimburse)
- c.Data["json"] = lib.JSONS{Code: 200, Msg: "ok!", Data: T_id}
- c.ServeJSON()
- return
- }
- // 修改审核状态
- func (c *ReimburseController) Reimburse_Edit_Audit() {
- T_id, _ := c.GetInt("T_id")
- T_State, _ := c.GetInt("T_State")
- o := orm.NewOrm()
- ReimburseDao := Reimburse.NewReimburse(o)
- reimburse, err := ReimburseDao.Read_Reimburse_ById(T_id)
- if err != nil {
- c.Data["json"] = lib.JSONS{Code: 202, Msg: "T_id Err!"}
- c.ServeJSON()
- return
- }
- if reimburse.T_State == Reimburse.WaitSubmit {
- c.Data["json"] = lib.JSONS{Code: 202, Msg: fmt.Sprintf("状态为%s,禁止修改!", Reimburse.Read_Audit_Get(reimburse.T_State))}
- c.ServeJSON()
- return
- }
- if T_State == Reimburse.RemitPart || T_State == Reimburse.RemitAll {
- if reimburse.T_State != Reimburse.AuditPass && reimburse.T_State != Reimburse.RemitPart {
- c.Data["json"] = lib.JSONS{Code: 202, Msg: fmt.Sprintf("状态为%s,禁止修改!", Reimburse.Read_Audit_Get(reimburse.T_State))}
- c.ServeJSON()
- return
- }
- }
- if T_State == Reimburse.AuditPass || T_State == Reimburse.AuditUnPass {
- if reimburse.T_State != Reimburse.WaitAudit && T_State != Reimburse.AuditUnPass {
- c.Data["json"] = lib.JSONS{Code: 202, Msg: fmt.Sprintf("状态为%s,禁止修改!", Reimburse.Read_Audit_Get(reimburse.T_State))}
- c.ServeJSON()
- return
- }
- }
- reimburse.T_State = T_State
- _, err = ReimburseDao.Update_Reimburse(reimburse, "T_State")
- if err != nil {
- c.Data["json"] = lib.JSONS{Code: 202, Msg: "修改审核状态失败!"}
- c.ServeJSON()
- return
- }
- NatsServer.AddNews(reimburse.T_uid, fmt.Sprintf("【报销申请】您的报销申请%s", Reimburse.Read_Audit_Get(T_State)), conf.MyReimburseUrl)
- NatsServer.AddUserLogs(c.User.T_uuid, "报销", "修改审核状态", reimburse)
- c.Data["json"] = lib.JSONS{Code: 200, Msg: "ok!", Data: T_id}
- c.ServeJSON()
- return
- }
- // 修改(财务)
- func (c *ReimburseController) Reimburse_Edit_Finance() {
- T_id, _ := c.GetInt("T_id")
- T_approval_money, _ := c.GetFloat("T_approval_money")
- T_approval_details := c.GetString("T_approval_details")
- T_remit_details := c.GetString("T_remit_detials")
- o := orm.NewOrm()
- o.Begin()
- ReimburseDao := Reimburse.NewReimburse(o)
- ReimburseDetailsDao := Reimburse.NewReimburseDetails(o)
- reimburse, err := ReimburseDao.Read_Reimburse_ById(T_id)
- if err != nil {
- o.Rollback()
- c.Data["json"] = lib.JSONS{Code: 202, Msg: "T_id Err!"}
- c.ServeJSON()
- return
- }
- // 1 未提交审核 2 待审核 3 审核通过 4 审核不通过 5 已部分打款 6 已全部打款
- if reimburse.T_State == Reimburse.WaitSubmit {
- o.Rollback()
- c.Data["json"] = lib.JSONS{Code: 202, Msg: fmt.Sprintf("状态为%s,禁止修改!", Reimburse.Read_Audit_Get(reimburse.T_State))}
- c.ServeJSON()
- return
- }
- approval_details_list := strings.Split(strings.Trim(T_approval_details, "|"), "|")
- for _, detail := range approval_details_list {
- id, _ := strconv.Atoi(strings.Split(detail, ",")[0])
- money := lib.StringToFloat64TwoDecimal(strings.Split(detail, ",")[1]) // 审批金额
- opinion := strings.Split(detail, ",")[2] // 审批意见
- err = ReimburseDetailsDao.Update_ReimburseDetails(Reimburse.ReimburseDetails{
- Id: id,
- T_approval_money: float32(money),
- T_approval_opinion: opinion,
- }, "T_approval_money", "T_approval_opinion")
- if err != nil {
- o.Rollback()
- c.Data["json"] = lib.JSONS{Code: 202, Msg: "修改报销详情失败!"}
- c.ServeJSON()
- return
- }
- }
- var T_remit float32
- remitList := Reimburse.ReimburseToRemitDetail(T_remit_details)
- for _, r := range remitList {
- T_remit += r.T_money
- }
- if T_remit == reimburse.T_approval_money && T_remit > 0 {
- reimburse.T_State = Reimburse.RemitAll
- } else if T_remit < reimburse.T_approval_money && T_remit > 0 {
- reimburse.T_State = Reimburse.RemitPart
- }
- reimburse.T_remit = T_remit
- reimburse.T_approval_money = float32(T_approval_money)
- reimburse.T_remit_detials = T_remit_details
- _, err = ReimburseDao.Update_Reimburse(reimburse, "T_State", "T_remit", "T_remit_detials", "T_approval_money")
- if err != nil {
- o.Rollback()
- c.Data["json"] = lib.JSONS{Code: 202, Msg: "修改审核状态失败!"}
- c.ServeJSON()
- return
- }
- o.Commit()
- if T_remit > 0 {
- NatsServer.AddNews(reimburse.T_uid, fmt.Sprintf("【报销打款】您的报销申请已%s", Reimburse.Read_Audit_Get(reimburse.T_State)), conf.MyReimburseUrl)
- }
- NatsServer.AddUserLogs(c.User.T_uuid, "报销", "修改(财务)", reimburse)
- c.Data["json"] = lib.JSONS{Code: 200, Msg: "ok!", Data: T_id}
- c.ServeJSON()
- return
- }
|