Percentage.go 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594
  1. package controllers
  2. import (
  3. "ERP_storage/Nats/NatsServer"
  4. "ERP_storage/conf"
  5. "ERP_storage/models/Account"
  6. "ERP_storage/models/Basic"
  7. "ERP_storage/models/Contract"
  8. "ERP_storage/models/Percentage"
  9. "ERP_storage/models/Stock"
  10. "fmt"
  11. userlibs "gogs.baozhida.cn/zoie/ERP_libs/User"
  12. "gogs.baozhida.cn/zoie/ERP_libs/lib"
  13. "github.com/beego/beego/v2/adapter/orm"
  14. beego "github.com/beego/beego/v2/server/web"
  15. "math"
  16. )
  17. type PercentageController struct {
  18. beego.Controller
  19. User userlibs.User
  20. }
  21. func (c *PercentageController) Prepare() {
  22. c.User = *Account.User_r
  23. }
  24. // 财务管理列表
  25. func (c *PercentageController) Percentage_List() {
  26. // 分页参数 初始化
  27. page, _ := c.GetInt("page")
  28. if page < 1 {
  29. page = 1
  30. }
  31. page_z, _ := c.GetInt("page_z")
  32. if page_z < 1 {
  33. page_z = conf.Page_size
  34. }
  35. // 查询
  36. T_name := c.GetString("T_name")
  37. T_uuid := c.GetString("T_uuid")
  38. T_state, _ := c.GetInt("T_state")
  39. userList, _ := NatsServer.Read_User_List_All()
  40. Account.Read_User_All_Map(userList)
  41. Contract.Read_Contract_All_Map()
  42. Contract.Read_VerifyContract_All_Map()
  43. PercentageDao := Percentage.NewPercentage(orm.NewOrm())
  44. R_List, R_cnt := PercentageDao.Read_Percentage_List(T_name, T_uuid, T_state, page, page_z)
  45. var r_jsons lib.R_JSONS
  46. r_jsons.Num = R_cnt
  47. r_jsons.Data = R_List
  48. r_jsons.Page = page
  49. r_jsons.Page_size = int(math.Ceil(float64(R_cnt) / float64(page_z)))
  50. c.Data["json"] = lib.JSONS{Code: 200, Msg: "ok!", Data: r_jsons}
  51. c.ServeJSON()
  52. return
  53. }
  54. func (c *PercentageController) Percentage_User_List() {
  55. // 分页参数 初始化
  56. page, _ := c.GetInt("page")
  57. if page < 1 {
  58. page = 1
  59. }
  60. page_z, _ := c.GetInt("page_z")
  61. if page_z < 1 {
  62. page_z = conf.Page_size
  63. }
  64. // 查询
  65. T_name := c.GetString("T_name")
  66. T_state, _ := c.GetInt("T_state")
  67. userList, _ := NatsServer.Read_User_List_All()
  68. Account.Read_User_All_Map(userList)
  69. Contract.Read_Contract_All_Map()
  70. Contract.Read_VerifyContract_All_Map()
  71. PercentageDao := Percentage.NewPercentage(orm.NewOrm())
  72. R_List, R_cnt := PercentageDao.Read_Percentage_User_List(c.User.T_uuid, T_name, T_state, page, page_z)
  73. var r_jsons lib.R_JSONS
  74. r_jsons.Num = R_cnt
  75. r_jsons.Data = R_List
  76. r_jsons.Page = page
  77. r_jsons.Page_size = int(math.Ceil(float64(R_cnt) / float64(page_z)))
  78. c.Data["json"] = lib.JSONS{Code: 200, Msg: "ok!", Data: r_jsons}
  79. c.ServeJSON()
  80. return
  81. }
  82. func (c *PercentageController) Percentage_Get() {
  83. // 查询
  84. T_id, _ := c.GetInt("T_id")
  85. o := orm.NewOrm()
  86. PercentageDao := Percentage.NewPercentage(o)
  87. ContractDao := Contract.NewContract(o)
  88. DeviceDao := Stock.NewDevice(o)
  89. contractProductDao := Contract.NewContractProduct(o)
  90. percentage, err := PercentageDao.Read_Percentage_ById(T_id)
  91. if err != nil {
  92. c.Data["json"] = lib.JSONS{Code: 202, Msg: "查询失败!"}
  93. c.ServeJSON()
  94. return
  95. }
  96. contract, err := ContractDao.Read_Contract_ByT_number(percentage.T_number)
  97. if err != nil {
  98. c.Data["json"] = lib.JSONS{Code: 202, Msg: "合同不存在!"}
  99. c.ServeJSON()
  100. return
  101. }
  102. productList := contractProductDao.Read_ContractProduct_List(contract.T_number)
  103. var pList []Contract.ContractProduct_R
  104. for _, v := range productList {
  105. p := Contract.ContractProductToContractProduct_R(v)
  106. p.T_device_list, _ = DeviceDao.Read_DeviceSn_List(contract.T_number, v.T_product_id, "", "")
  107. pList = append(pList, p)
  108. }
  109. userList, _ := NatsServer.Read_User_List_All()
  110. Account.Read_User_All_Map(userList)
  111. Contract.Read_VerifyContract_All_Map()
  112. Basic.Read_VerifyItem_All_Map()
  113. c.Data["json"] = lib.JSONS{Code: 200, Msg: "ok!", Data: Percentage.PercentageToPercentage_Detail(percentage, contract, pList)}
  114. c.ServeJSON()
  115. return
  116. }
  117. func (c *PercentageController) Percentage_Add() {
  118. T_number := c.GetString("T_number")
  119. T_uuid := c.GetString("T_uuid")
  120. T_money, _ := c.GetFloat("T_money") // 总价
  121. T_type, _ := c.GetInt("T_type") // 类型
  122. T_item := c.GetString("T_item")
  123. if len(T_item) == 0 {
  124. c.Data["json"] = lib.JSONS{Code: 202, Msg: "提成明细不能为空"}
  125. c.ServeJSON()
  126. return
  127. }
  128. var_ := Percentage.Percentage{
  129. T_number: T_number,
  130. T_uuid: T_uuid,
  131. T_money: float32(T_money),
  132. T_type: T_type, //类型 1-验证实施 2-报告编写
  133. T_State: 6, // 6-未提交审核
  134. T_submit: c.User.T_uuid,
  135. T_item: T_item,
  136. }
  137. o := orm.NewOrm()
  138. ContractDao := Contract.NewContract(o)
  139. _, err := ContractDao.Read_Contract_ByT_number(T_number)
  140. if err != nil {
  141. c.Data["json"] = lib.JSONS{Code: 202, Msg: "合同不存在!"}
  142. c.ServeJSON()
  143. return
  144. }
  145. Basic.Read_VerifyItem_All_Map()
  146. o.Begin()
  147. PercentageDao := Percentage.NewPercentage(o)
  148. var T_type_str string
  149. if T_type == 1 {
  150. T_type_str = "验证实施"
  151. }
  152. if T_type == 2 {
  153. T_type_str = "报告编写"
  154. }
  155. _, err = PercentageDao.Read_Percentage_ByT_number_T_type(T_number, T_type)
  156. if err == nil {
  157. o.Rollback()
  158. c.Data["json"] = lib.JSONS{Code: 202, Msg: fmt.Sprintf("该合同已提交过%s提成申请", T_type_str)}
  159. c.ServeJSON()
  160. return
  161. }
  162. var_.T_item_price = Percentage.Generate_VerifyItem_Price(var_.T_item)
  163. var_.T_item = "|" + var_.T_item
  164. _, err = PercentageDao.Add_Percentage(var_)
  165. if err != nil {
  166. o.Rollback()
  167. c.Data["json"] = lib.JSONS{Code: 203, Msg: "添加失败"}
  168. c.ServeJSON()
  169. return
  170. }
  171. o.Commit()
  172. NatsServer.AddUserLogs(c.User.T_uuid, "提成", "添加", var_)
  173. c.Data["json"] = lib.JSONS{Code: 200, Msg: "ok!", Data: T_number}
  174. c.ServeJSON()
  175. return
  176. }
  177. func (c *PercentageController) Percentage_Approval() {
  178. T_id, _ := c.GetInt("T_id")
  179. T_item := c.GetString("T_item")
  180. T_state, _ := c.GetInt("T_state")
  181. T_approval_money, _ := c.GetFloat("T_approval_money")
  182. T_approval_opinion := c.GetString("T_approval_opinion")
  183. o := orm.NewOrm()
  184. PercentageDao := Percentage.NewPercentage(o)
  185. percentage, err := PercentageDao.Read_Percentage_ById(T_id)
  186. if err != nil {
  187. c.Data["json"] = lib.JSONS{Code: 202, Msg: "修改失败!"}
  188. c.ServeJSON()
  189. return
  190. }
  191. // 未提交审核 不能修改
  192. if percentage.T_State == Percentage.NotSubmit ||
  193. percentage.T_State == Percentage.AuditPass ||
  194. percentage.T_State == Percentage.RemitPart ||
  195. percentage.T_State == Percentage.RemitAll {
  196. c.Data["json"] = lib.JSONS{Code: 202, Msg: fmt.Sprintf("状态为%s,禁止提交!", Percentage.Read_Audit_Get(percentage.T_State))}
  197. c.ServeJSON()
  198. return
  199. }
  200. Basic.Read_VerifyItem_All_Map()
  201. if len(T_approval_opinion) > 0 {
  202. percentage.T_approval_opinion = T_approval_opinion
  203. }
  204. if T_approval_money > 0 {
  205. percentage.T_approval_money = float32(T_approval_money)
  206. }
  207. // 2-已通过 3-未通过
  208. if T_state == 2 || T_state == 3 {
  209. percentage.T_State = T_state
  210. }
  211. if len(T_item) > 0 {
  212. percentage.T_item = T_item
  213. percentage.T_item_price = Percentage.Generate_VerifyItem_Price(percentage.T_item)
  214. }
  215. err = PercentageDao.Update_Percentage(percentage, "T_State", "T_approval_opinion", "T_approval_money", "T_item", "T_item_price")
  216. if err != nil {
  217. o.Rollback()
  218. c.Data["json"] = lib.JSONS{Code: 203, Msg: "修改失败"}
  219. c.ServeJSON()
  220. return
  221. }
  222. if T_state == Percentage.AuditPass {
  223. NatsServer.AddNews(percentage.T_uuid, fmt.Sprintf("【提成申请】您提交的提成申请(%s)审核已通过", percentage.T_number), conf.MyPercentageUrl)
  224. }
  225. if T_state == Percentage.AuditUnPass {
  226. NatsServer.AddNews(percentage.T_uuid, fmt.Sprintf("【提成申请】您提交的提成申请(%s)审核未通过", percentage.T_number), conf.MyPercentageUrl)
  227. }
  228. NatsServer.AddUserLogs(c.User.T_uuid, "提成", "审核", percentage)
  229. c.Data["json"] = lib.JSONS{Code: 200, Msg: "ok!", Data: T_id}
  230. c.ServeJSON()
  231. return
  232. }
  233. func (c *PercentageController) Percentage_Edit() {
  234. T_id, _ := c.GetInt("T_id")
  235. T_number := c.GetString("T_number")
  236. T_uuid := c.GetString("T_uuid")
  237. T_money, _ := c.GetFloat("T_money") // 总价
  238. T_type, _ := c.GetInt("T_type") // 优惠价
  239. T_item := c.GetString("T_item")
  240. if len(T_item) == 0 {
  241. c.Data["json"] = lib.JSONS{Code: 202, Msg: "提成明细不能为空"}
  242. c.ServeJSON()
  243. return
  244. }
  245. var T_type_str string
  246. if T_type == 1 {
  247. T_type_str = "验证实施"
  248. }
  249. if T_type == 2 {
  250. T_type_str = "报告编写"
  251. }
  252. o := orm.NewOrm()
  253. ContractDao := Contract.NewContract(o)
  254. _, err := ContractDao.Read_Contract_ByT_number(T_number)
  255. if err != nil {
  256. c.Data["json"] = lib.JSONS{Code: 202, Msg: "合同不存在!"}
  257. c.ServeJSON()
  258. return
  259. }
  260. PercentageDao := Percentage.NewPercentage(o)
  261. percentage, err := PercentageDao.Read_Percentage_ById(T_id)
  262. if err != nil {
  263. c.Data["json"] = lib.JSONS{Code: 202, Msg: "查询失败!"}
  264. c.ServeJSON()
  265. return
  266. }
  267. percentage1, err := PercentageDao.Read_Percentage_ByT_number_T_type(T_number, T_type)
  268. if err != nil && err.Error() != orm.ErrNoRows.Error() {
  269. c.Data["json"] = lib.JSONS{Code: 202, Msg: "查询失败!"}
  270. c.ServeJSON()
  271. return
  272. }
  273. if percentage1.Id > 0 && percentage1.Id != percentage.Id {
  274. c.Data["json"] = lib.JSONS{Code: 202, Msg: fmt.Sprintf("该合同已提交过%s提成申请", T_type_str)}
  275. c.ServeJSON()
  276. return
  277. }
  278. // 1-待审核 2-审核通过 3-审核不通过 4-部分打款 5-全部打款 6-未提交审核 合同状态为未通过,修改之后将状态更改为待审核
  279. if percentage.T_State == Percentage.AuditPass || percentage.T_State == Percentage.RemitPart || percentage.T_State == Percentage.RemitAll {
  280. c.Data["json"] = lib.JSONS{Code: 202, Msg: fmt.Sprintf("状态为%s,禁止修改!", Percentage.Read_Audit_Get(percentage.T_State))}
  281. c.ServeJSON()
  282. return
  283. }
  284. if len(T_number) > 0 {
  285. percentage.T_number = T_number
  286. }
  287. if len(T_uuid) > 0 {
  288. percentage.T_uuid = T_uuid
  289. }
  290. if T_money > 0 {
  291. percentage.T_money = float32(T_money)
  292. }
  293. if T_type > 0 {
  294. percentage.T_type = T_type
  295. }
  296. if len(T_item) > 0 {
  297. percentage.T_item = "|" + T_item
  298. percentage.T_item_price = Percentage.Generate_VerifyItem_Price(T_item)
  299. }
  300. err = PercentageDao.Update_Percentage(percentage, "T_number", "T_uuid", "T_money", "T_type", "T_item", "T_item_price")
  301. if err != nil {
  302. c.Data["json"] = lib.JSONS{Code: 203, Msg: "修改失败"}
  303. c.ServeJSON()
  304. return
  305. }
  306. NatsServer.AddUserLogs(c.User.T_uuid, "提成", "修改", percentage)
  307. c.Data["json"] = lib.JSONS{Code: 200, Msg: "ok!", Data: percentage.Id}
  308. c.ServeJSON()
  309. return
  310. }
  311. func (c *PercentageController) Percentage_Del() {
  312. T_id, _ := c.GetInt("T_id")
  313. o := orm.NewOrm()
  314. PercentageDao := Percentage.NewPercentage(o)
  315. percentage, err := PercentageDao.Read_Percentage_ById(T_id)
  316. if err != nil {
  317. c.Data["json"] = lib.JSONS{Code: 202, Msg: "查询失败!"}
  318. c.ServeJSON()
  319. return
  320. }
  321. // 1-待审核 2-审核通过 3-审核不通过 4-部分打款 5-全部打款 合同状态为未通过,修改之后将状态更改为待审核
  322. if percentage.T_State == Percentage.AuditPass || percentage.T_State == Percentage.RemitPart || percentage.T_State == Percentage.RemitAll {
  323. c.Data["json"] = lib.JSONS{Code: 202, Msg: fmt.Sprintf("状态为%s,禁止删除!", Percentage.Read_Audit_Get(percentage.T_State))}
  324. c.ServeJSON()
  325. return
  326. }
  327. err = PercentageDao.Delete_Percentage(percentage)
  328. if err != nil {
  329. c.Data["json"] = lib.JSONS{Code: 202, Msg: "删除失败!"}
  330. c.ServeJSON()
  331. return
  332. }
  333. NatsServer.AddUserLogs(c.User.T_uuid, "提成", "删除", T_id)
  334. c.Data["json"] = lib.JSONS{Code: 200, Msg: "ok!", Data: T_id}
  335. c.ServeJSON()
  336. return
  337. }
  338. func (c *PercentageController) Percentage_Admin_Del() {
  339. T_id, _ := c.GetInt("T_id")
  340. o := orm.NewOrm()
  341. PercentageDao := Percentage.NewPercentage(o)
  342. percentage, err := PercentageDao.Read_Percentage_ById(T_id)
  343. if err != nil {
  344. c.Data["json"] = lib.JSONS{Code: 202, Msg: "查询失败!"}
  345. c.ServeJSON()
  346. return
  347. }
  348. err = PercentageDao.Delete_Percentage(percentage)
  349. if err != nil {
  350. c.Data["json"] = lib.JSONS{Code: 202, Msg: "删除失败!"}
  351. c.ServeJSON()
  352. return
  353. }
  354. NatsServer.AddUserLogs(c.User.T_uuid, "提成", "删除", T_id)
  355. c.Data["json"] = lib.JSONS{Code: 200, Msg: "ok!", Data: T_id}
  356. c.ServeJSON()
  357. return
  358. }
  359. // 打款
  360. func (c *PercentageController) Percentage_Remit() {
  361. T_id, _ := c.GetInt("T_id")
  362. T_remit := c.GetString("T_remit")
  363. o := orm.NewOrm()
  364. PercentageDao := Percentage.NewPercentage(o)
  365. percentage, err := PercentageDao.Read_Percentage_ById(T_id)
  366. if err != nil {
  367. o.Rollback()
  368. c.Data["json"] = lib.JSONS{Code: 202, Msg: "查询失败!"}
  369. c.ServeJSON()
  370. return
  371. }
  372. // 1-待审核 2-审核通过 3-审核不通过 4-部分打款 5-全部打款 合同状态为未通过,修改之后将状态更改为待审核
  373. if percentage.T_State == 1 || percentage.T_State == 3 {
  374. c.Data["json"] = lib.JSONS{Code: 202, Msg: "当前状态不可添加打款信息!"}
  375. c.ServeJSON()
  376. return
  377. }
  378. if len(T_remit) == 0 {
  379. c.Data["json"] = lib.JSONS{Code: 202, Msg: "打款明细不能为空"}
  380. c.ServeJSON()
  381. return
  382. }
  383. if len(T_remit) > 0 {
  384. percentage.T_remit = T_remit
  385. }
  386. _, money := Percentage.PercentageToPercentageRemit_R(T_remit)
  387. // 部分打款
  388. if percentage.T_approval_money > money && money > 0 {
  389. percentage.T_State = 4
  390. }
  391. // 全部打款
  392. if percentage.T_approval_money == money && money > 0 {
  393. percentage.T_State = 5
  394. }
  395. err = PercentageDao.Update_Percentage(percentage, "T_remit", "T_State")
  396. if err != nil {
  397. c.Data["json"] = lib.JSONS{Code: 203, Msg: "修改失败"}
  398. c.ServeJSON()
  399. return
  400. }
  401. if percentage.T_State == 4 {
  402. NatsServer.AddNews(percentage.T_uuid, fmt.Sprintf("【提成申请】您提交的提成申请(%s)已部分打款", percentage.T_number), conf.MyPercentageUrl)
  403. }
  404. if percentage.T_State == 5 {
  405. NatsServer.AddNews(percentage.T_uuid, fmt.Sprintf("【提成申请】您提交的提成申请(%s)已全部打款", percentage.T_number), conf.MyPercentageUrl)
  406. }
  407. NatsServer.AddUserLogs(c.User.T_uuid, "提成", "修改", percentage)
  408. c.Data["json"] = lib.JSONS{Code: 200, Msg: "ok!", Data: percentage.Id}
  409. c.ServeJSON()
  410. return
  411. }
  412. func (c *PercentageController) User_List() {
  413. var r_jsons lib.R_JSONS
  414. // 分页参数 初始化
  415. page, _ := c.GetInt("page")
  416. if page < 1 {
  417. page = 1
  418. }
  419. page_z, _ := c.GetInt("page_z")
  420. if page_z < 1 {
  421. page_z = conf.Page_size
  422. }
  423. T_name := c.GetString("T_name")
  424. ReimburseDao := Percentage.NewPercentage(orm.NewOrm())
  425. uuidList := ReimburseDao.Read_T_uuid_List()
  426. if len(uuidList) == 0 {
  427. c.Data["json"] = lib.JSONS{Code: 200, Msg: "ok!"}
  428. c.ServeJSON()
  429. return
  430. }
  431. R_List, R_cnt, err := NatsServer.Read_User_List_T_uuid(T_name, uuidList, page, page_z)
  432. if err != nil {
  433. c.Data["json"] = lib.JSONS{Code: 202, Msg: "查询失败"}
  434. c.ServeJSON()
  435. return
  436. }
  437. var U_List []userlibs.User
  438. for _, user := range R_List {
  439. U_List = append(U_List, user)
  440. }
  441. r_jsons.Num = R_cnt
  442. r_jsons.Data = U_List
  443. r_jsons.Page = page
  444. r_jsons.Page_size = int(math.Ceil(float64(R_cnt) / float64(page_z)))
  445. c.Data["json"] = lib.JSONS{Code: 200, Msg: "ok!", Data: r_jsons}
  446. c.ServeJSON()
  447. return
  448. }
  449. func (c *PercentageController) Contract_List() {
  450. // 分页参数 初始化
  451. page, _ := c.GetInt("page")
  452. if page < 1 {
  453. page = 1
  454. }
  455. page_z, _ := c.GetInt("page_z")
  456. if page_z < 1 {
  457. page_z = conf.Page_size
  458. }
  459. // 查询
  460. T_name := c.GetString("T_name")
  461. ContractDao := Contract.NewContract(orm.NewOrm())
  462. R_List, R_cnt := ContractDao.Read_Contract_List("", T_name, 0, 0, page, page_z)
  463. var r_jsons lib.R_JSONS
  464. r_jsons.Num = R_cnt
  465. r_jsons.Data = R_List
  466. r_jsons.Page = page
  467. r_jsons.Page_size = int(math.Ceil(float64(R_cnt) / float64(page_z)))
  468. c.Data["json"] = lib.JSONS{Code: 200, Msg: "ok!", Data: r_jsons}
  469. c.ServeJSON()
  470. return
  471. }
  472. // 提交审核
  473. func (c *PercentageController) Percentage_Submit_Audit() {
  474. T_id, _ := c.GetInt("T_id")
  475. o := orm.NewOrm()
  476. PercentageDao := Percentage.NewPercentage(o)
  477. percentage, err := PercentageDao.Read_Percentage_ById(T_id)
  478. if err != nil {
  479. c.Data["json"] = lib.JSONS{Code: 202, Msg: "提交失败!"}
  480. c.ServeJSON()
  481. return
  482. }
  483. if percentage.T_State != 6 && percentage.T_State != 3 {
  484. c.Data["json"] = lib.JSONS{Code: 202, Msg: fmt.Sprintf("状态为%s,禁止提交!", Percentage.Read_Audit_Get(percentage.T_State))}
  485. c.ServeJSON()
  486. return
  487. }
  488. // 1-待审核 2-审核通过 3-审核不通过 4-部分打款 5-全部打款 6-待审核 审核状态
  489. percentage.T_State = 1
  490. err = PercentageDao.Update_Percentage(percentage, "T_State")
  491. if err != nil {
  492. c.Data["json"] = lib.JSONS{Code: 203, Msg: "修改失败"}
  493. c.ServeJSON()
  494. return
  495. }
  496. NatsServer.AddNews(conf.FinanceUuid, fmt.Sprintf("【提成申请】您有一条提成申请(%s)待审核", percentage.T_number), conf.PercentageApprovalUrl)
  497. NatsServer.AddUserLogs(c.User.T_uuid, "提成", "审核", percentage)
  498. c.Data["json"] = lib.JSONS{Code: 200, Msg: "ok!", Data: T_id}
  499. c.ServeJSON()
  500. return
  501. }