trade.go 13 KB

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