trade.go 13 KB

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