trade.go 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348
  1. package guangzuan
  2. import (
  3. "mtp2_if/global/app"
  4. "mtp2_if/models"
  5. "github.com/gin-gonic/gin"
  6. )
  7. // QueryBuyOrder
  8. // @Summary 查询求购大厅委托单
  9. // @Produce json
  10. // @Security ApiKeyAuth
  11. // @Security LoginID
  12. // @Security Group
  13. // @Param page query int false "页码"
  14. // @Param pagesize query int false "每页条数"
  15. // @Param zsallproperties query string false "商品(查询字段-模糊查询)"
  16. // @Param zscategorys query string false "钻石分类, 格式:1,2,3"
  17. // @Param wrtradeorderid query int false "委托单号"
  18. // @Param buyusername query string false "买方(查询字段-模糊查询)"
  19. // @Success 200 {array} models.BuyOrder
  20. // @Failure 500 {object} app.Response
  21. // @Router /Guangzuan/QueryBuyOrder [get]
  22. // @Tags 广钻
  23. func QueryBuyOrder(c *gin.Context) {
  24. a := app.GinUtils{Gin: app.Gin{C: c}}
  25. m := models.BuyOrder{}
  26. a.DoBindReq(&m)
  27. a.DoGetDataByPage(&m)
  28. }
  29. // QuerySellOrder
  30. // @Summary 查询出售大厅委托单
  31. // @Produce json
  32. // @Security ApiKeyAuth
  33. // @Security LoginID
  34. // @Security Group
  35. // @Param page query int false "页码"
  36. // @Param pagesize query int false "每页条数"
  37. // @Param zsallproperties query string false "商品(查询字段-模糊查询)"
  38. // @Param zscategorys query string false "钻石分类, 格式:1,2,3"
  39. // @Param wrtradeorderid query int false "委托单号"
  40. // @Param buyusername query string false "卖方(查询字段-模糊查询)"
  41. // @Success 200 {array} models.SellOrder
  42. // @Failure 500 {object} app.Response
  43. // @Router /Guangzuan/QuerySellOrder [get]
  44. // @Tags 广钻
  45. func QuerySellOrder(c *gin.Context) {
  46. a := app.GinUtils{Gin: app.Gin{C: c}}
  47. m := models.SellOrder{}
  48. a.DoBindReq(&m)
  49. a.DoGetDataByPage(&m)
  50. }
  51. // QueryDiamond
  52. // @Summary 钻石搜索
  53. // @Produce json
  54. // @Security ApiKeyAuth
  55. // @Security LoginID
  56. // @Security Group
  57. // @Param data body models.SellOrderQueryReq true "钻石搜索入参"
  58. // @Success 200 {array} models.SellOrder
  59. // @Failure 500 {object} app.Response
  60. // @Router /Guangzuan/QueryDiamond [post]
  61. // @Tags 广钻
  62. func QueryDiamond(c *gin.Context) {
  63. a := app.GinUtils{Gin: app.Gin{C: c}}
  64. req := models.SellOrderQueryReq{}
  65. a.DoBindJsonReq(&req)
  66. m := models.SellOrder{
  67. IsQueryDiamond: true,
  68. ZSCATEGORY: req.ZSCATEGORY,
  69. ZSCATEGORYS: req.ZSCATEGORYS,
  70. ZSCURRENCYTYPE_S: req.ZSCURRENCYTYPE,
  71. WAREHOUSEID: req.WAREHOUSEID,
  72. WEIGHT: req.WEIGHT1,
  73. WEIGHT_END: req.WEIGHT2,
  74. WEIGHTAVG: req.WEIGHTAVG1,
  75. WEIGHTAVG_END: req.WEIGHTAVG2,
  76. ZSSHAPETYPE: req.ZSSHAPETYPE,
  77. ZSCOLORTYPE: req.ZSCOLORTYPE,
  78. ZSCLARITYTYPE: req.ZSCLARITYTYPE,
  79. ZSCUTTYPE: req.ZSCUTTYPE,
  80. ZSSYMMETRYTYPE: req.ZSSYMMETRYTYPE,
  81. ZSPOLISHTYPE: req.ZSPOLISHTYPE,
  82. ZSFLUORESCENCETYPE: req.ZSFLUORESCENCETYPE,
  83. ZSCERTTYPE: req.ZSCERTTYPE,
  84. ORIGIN: req.ORIGIN,
  85. ZSSTYLETYPE: req.ZSSTYLETYPE,
  86. ZSCZCOLOR1TYPE: req.ZSCZCOLOR1TYPE,
  87. PageEx: models.PageEx{Page: req.Page, PageSize: req.PageSize},
  88. }
  89. a.DoGetDataByPage(&m)
  90. }
  91. // QueryGzbscinOutOrder
  92. // @Summary 保税仓出入库申请表查询
  93. // @Produce json
  94. // @Security ApiKeyAuth
  95. // @Param userid query int true "用户ID"
  96. // @Param ordertype query int true "单据类型 - 1:进仓 2:出仓(枚举:GZBSCOrderType)"
  97. // @Param listtype query int false "列表类型 - 0.全部 1.待上传 2.进行中 3.已结束"
  98. // @Param outtype query int false "出仓类型 - 1:转厂 2:出境(枚举:GZBSCOutType)"
  99. // @Param page query int false "页码"
  100. // @Param pagesize query int false "每页条数"
  101. // @Success 200 {array} models.GGzbscinoutorder
  102. // @Failure 500 {object} app.Response
  103. // @Router /Guangzuan/QueryGzbscinOutOrder [get]
  104. // @Tags 广钻
  105. func QueryGzbscinOutOrder(c *gin.Context) {
  106. a := app.GinUtils{Gin: app.Gin{C: c}}
  107. m := models.GGzbscinoutorder{}
  108. a.DoBindReq(&m)
  109. a.DoGetDataByPage(&m)
  110. }
  111. // QueryBScinOutOrderDetail
  112. // @Summary 保税仓出入库申请明细表查询
  113. // @Produce json
  114. // @Security ApiKeyAuth
  115. // @Param userid query int true "用户ID"
  116. // @Param orderid query string true "申请ID"
  117. // @Param page query int false "页码"
  118. // @Param pagesize query int false "每页条数"
  119. // @Success 200 {array} models.BScinoutorderdetail
  120. // @Failure 500 {object} app.Response
  121. // @Router /Guangzuan/QueryBScinOutOrderDetail [get]
  122. // @Tags 广钻
  123. func QueryBScinOutOrderDetail(c *gin.Context) {
  124. a := app.GinUtils{Gin: app.Gin{C: c}}
  125. m := models.BScinoutorderdetail{}
  126. a.DoBindReq(&m)
  127. a.DoGetDataByPage(&m)
  128. }
  129. // QueryBScOutOrderDetailatt
  130. // @Summary 保税仓出库申请明细附表查询
  131. // @Produce json
  132. // @Security ApiKeyAuth
  133. // @Param userid query int true "用户ID"
  134. // @Param orderid query string true "申请ID"
  135. // @Param page query int false "页码"
  136. // @Param pagesize query int false "每页条数"
  137. // @Success 200 {array} models.BScoutorderdetailatt
  138. // @Failure 500 {object} app.Response
  139. // @Router /Guangzuan/QueryBScOutOrderDetailatt [get]
  140. // @Tags 广钻
  141. func QueryBScOutOrderDetailatt(c *gin.Context) {
  142. a := app.GinUtils{Gin: app.Gin{C: c}}
  143. m := models.BScoutorderdetailatt{}
  144. a.DoBindReq(&m)
  145. a.DoGetDataByPage(&m)
  146. }
  147. // QueryGzbscPosition
  148. // @Summary 保税商品报关头寸表查询
  149. // @Produce json
  150. // @Security ApiKeyAuth
  151. // @Param userid query int true "用户ID"
  152. // @Param page query int false "页码"
  153. // @Param pagesize query int false "每页条数"
  154. // @Success 200 {array} models.GGzbscposition
  155. // @Failure 500 {object} app.Response
  156. // @Router /Guangzuan/QueryGzbscPosition [get]
  157. // @Tags 广钻
  158. func QueryGzbscPosition(c *gin.Context) {
  159. a := app.GinUtils{Gin: app.Gin{C: c}}
  160. m := models.GGzbscposition{}
  161. a.DoBindReq(&m)
  162. a.DoGetDataByPage(&m)
  163. }
  164. // QueryGzbscusermonthpay
  165. // @Summary 保税仓用户月付款通知书表查询(计费管理)
  166. // @Produce json
  167. // @Security ApiKeyAuth
  168. // @Param userid query int true "用户ID"
  169. // @Param paystatus query int false "支付状态 - 1:待确认 2:待支付 3:已支付(枚举:GZBSCPayStatus)"
  170. // @Param page query int false "页码"
  171. // @Param pagesize query int false "每页条数"
  172. // @Success 200 {array} models.GGzbscusermonthpay
  173. // @Failure 500 {object} app.Response
  174. // @Router /Guangzuan/QueryGzbscusermonthpay [get]
  175. // @Tags 广钻
  176. func QueryGzbscusermonthpay(c *gin.Context) {
  177. a := app.GinUtils{Gin: app.Gin{C: c}}
  178. m := models.GGzbscusermonthpay{}
  179. a.DoBindReq(&m)
  180. a.DoGetDataByPage(&m)
  181. }
  182. // QueryGzbscuserpowerfee
  183. // @Summary 保税仓月电费登记表查询
  184. // @Produce json
  185. // @Security ApiKeyAuth
  186. // @Param userid query int true "用户ID"
  187. // @Param trademonth query string true "月份(yyyMM)"
  188. // @Param page query int false "页码"
  189. // @Param pagesize query int false "每页条数"
  190. // @Success 200 {array} models.GGzbscuserpowerfee
  191. // @Failure 500 {object} app.Response
  192. // @Router /Guangzuan/QueryGzbscuserpowerfee [get]
  193. // @Tags 广钻
  194. func QueryGzbscuserpowerfee(c *gin.Context) {
  195. a := app.GinUtils{Gin: app.Gin{C: c}}
  196. m := models.GGzbscuserpowerfee{}
  197. a.DoBindReq(&m)
  198. a.DoGetDataByPage(&m)
  199. }
  200. // QueryBscinoutorder
  201. // @Summary 保税仓本月进口明细/本月出境明细/本月转厂明细查询
  202. // @Produce json
  203. // @Security ApiKeyAuth
  204. // @Param userid query int true "用户ID"
  205. // @Param jckdate query string true "进出口月份(yyyMM)"
  206. // @Param page query int false "页码"
  207. // @Param pagesize query int false "每页条数"
  208. // @Success 200 {array} models.Bscinoutorder
  209. // @Failure 500 {object} app.Response
  210. // @Router /Guangzuan/QueryBscinoutorder [get]
  211. // @Tags 广钻
  212. func QueryBscinoutorder(c *gin.Context) {
  213. a := app.GinUtils{Gin: app.Gin{C: c}}
  214. m := models.Bscinoutorder{}
  215. a.DoBindReq(&m)
  216. a.DoGetDataByPage(&m)
  217. }
  218. // QueryGZPreSell
  219. // @Summary 预售大厅/我的预售/集采大厅/我的集采 列表查询
  220. // @Produce json
  221. // @Security ApiKeyAuth
  222. // @Param marketid query int true "市场ID"
  223. // @Param presalestatus query int false "预售状态 - 1:未开始 2:进行中 3:已结束 4:已关闭 5:处理中 6::处理失败 7:已完成"
  224. // @Param presalestatuses query string false "预售状态 - 1:未开始 2:进行中 3:已结束 4:已关闭 5:处理中 6::处理失败 7:已完成 - 逗号分隔"
  225. // @Param wrstandardname query string false "现货商品名称"
  226. // @Param customername query string false "预售方"
  227. // @Param selluserid query int false "发行方用户ID"
  228. // @Param page query int false "页码"
  229. // @Param pagesize query int false "每页条数"
  230. // @Success 200 {array} models.GZPresell
  231. // @Failure 500 {object} app.Response
  232. // @Router /Guangzuan/QueryGZPreSell [get]
  233. // @Tags 广钻
  234. func QueryGZPreSell(c *gin.Context) {
  235. a := app.GinUtils{Gin: app.Gin{C: c}}
  236. m := models.GZPresell{}
  237. a.DoBindReq(&m)
  238. a.DoGetDataByPage(&m)
  239. }
  240. // QueryGZMyPresell
  241. // @Summary 我的预售认购列表查询
  242. // @Produce json
  243. // @Security ApiKeyAuth
  244. // @Param presaleapplyid query int true "预售申请ID"
  245. // @Param page query int false "页码"
  246. // @Param pagesize query int false "每页条数"
  247. // @Success 200 {array} models.GZMyPresell
  248. // @Failure 500 {object} app.Response
  249. // @Router /Guangzuan/QueryGZMyPresell [get]
  250. // @Tags 广钻
  251. func QueryGZMyPresell(c *gin.Context) {
  252. a := app.GinUtils{Gin: app.Gin{C: c}}
  253. m := models.GZMyPresell{}
  254. a.DoBindReq(&m)
  255. a.DoGetDataByPage(&m)
  256. }
  257. // QueryGZMyTradingPreSell
  258. // @Summary 我参与的预售(预售中\执行中)\我参与的集采(集采中\执行中) 列表查询
  259. // @Produce json
  260. // @Security ApiKeyAuth
  261. // @Param userid query int true "用户ID"
  262. // @Param marketid query int true "市场ID"
  263. // @Param status query int false "状态 1:预售中\集采中 2:执行中 3:已完成"
  264. // @Param customername query string false "卖方"
  265. // @Param wrstandardname query string false "商品"
  266. // @Param page query int false "页码"
  267. // @Param pagesize query int false "每页条数"
  268. // @Success 200 {array} models.GZMyTradingPresell
  269. // @Failure 500 {object} app.Response
  270. // @Router /Guangzuan/QueryGZMyTradingPreSell [get]
  271. // @Tags 广钻
  272. func QueryGZMyTradingPreSell(c *gin.Context) {
  273. a := app.GinUtils{Gin: app.Gin{C: c}}
  274. m := models.GZMyTradingPresell{}
  275. a.DoBindReq(&m)
  276. a.DoGetDataByPage(&m)
  277. }
  278. // QueryGZWrPreSaleApply
  279. // @Summary 我的预售申请列表查询
  280. // @Produce json
  281. // @Security ApiKeyAuth
  282. // @Param userid query int true "用户ID"
  283. // @Param marketid query int true "市场ID"
  284. // @Param page query int false "页码"
  285. // @Param pagesize query int false "每页条数"
  286. // @Success 200 {array} models.Wrpresaleapply
  287. // @Failure 500 {object} app.Response
  288. // @Router /Guangzuan/QueryGZWrPreSaleApply [get]
  289. // @Tags 广钻
  290. func QueryGZWrPreSaleApply(c *gin.Context) {
  291. a := app.GinUtils{Gin: app.Gin{C: c}}
  292. m := models.Wrpresaleapply{}
  293. a.DoBindReq(&m)
  294. a.DoGetDataByPage(&m)
  295. }
  296. // QueryPresaleorderapplyprice
  297. // @Summary 查询预售申请价格表
  298. // @Produce json
  299. // @Param applyid query string true "预售申请ID"
  300. // @Success 200 {array} models.Presaleorderapplyprice
  301. // @Failure 500 {object} app.Response
  302. // @Router /Guangzuan/QueryPresaleorderapplyprice [get]
  303. // @Tags 广钻
  304. func QueryPresaleorderapplyprice(c *gin.Context) {
  305. a := app.GinUtils{Gin: app.Gin{C: c}}
  306. m := models.Presaleorderapplyprice{}
  307. a.DoBindReq(&m)
  308. a.DoGetDataEx(&m)
  309. }
  310. // QueryGzbscreckonorder
  311. // @Summary 保税仓结算单表查询
  312. // @Produce json
  313. // @Security ApiKeyAuth
  314. // @Param userid query int true "用户ID"
  315. // @Param paystatus query int false "支付状态 - 2:待支付 3:已支付(枚举:GZBSCPayStatus)"
  316. // @Param page query int false "页码"
  317. // @Param pagesize query int false "每页条数"
  318. // @Success 200 {array} models.Gzbscreckonorder
  319. // @Failure 500 {object} app.Response
  320. // @Router /Guangzuan/QueryGzbscreckonorder [get]
  321. // @Tags 广钻
  322. func QueryGzbscreckonorder(c *gin.Context) {
  323. a := app.GinUtils{Gin: app.Gin{C: c}}
  324. m := models.Gzbscreckonorder{}
  325. a.DoBindReq(&m)
  326. a.DoGetDataByPage(&m)
  327. }