[关闭]
@ZSCDumin 2018-12-26T11:47:00.000000Z 字数 6347 阅读 465

质量流程-数据录入-产品检测记录-接口说明

金驰


1、查询所有产品检测记录-分页

GET

/getAllByPage

接口返回数据

  1. {
  2. "code": 0,
  3. "message": "操作成功",
  4. "data": {
  5. "pageNumber": 1,
  6. "pageSize": 10,
  7. "sortField": "id",
  8. "sortType": "desc",
  9. "total": 2,
  10. "list": [
  11. {
  12. "sampleDeliveringRecordDTO": {
  13. "deliveryFactory": {
  14. "id": 1,
  15. "name": "液氮工厂"
  16. },
  17. "deliverer": {
  18. "id": 2,
  19. "name": "刘大气",
  20. "departmentId": 31,
  21. "departmentName": "材料部"
  22. },
  23. "serialNumberName": null,
  24. "testItemIds": null,
  25. "testItemString": null,
  26. "sampleDeliveringRecord": {
  27. "id": 6,
  28. "delivererId": 1,
  29. "serialNumberId": 2,
  30. "deliveryFactoryId": 1,
  31. "sampleDeliveringDate": "2018-12-17 15:32:17",
  32. "testItems": "1,2",
  33. "type": 3,
  34. "acceptStatus": 2,
  35. "exceptionComment": null,
  36. "handleComment": null
  37. },
  38. "repoBaseSerialNumber": {
  39. "id": 2,
  40. "serialNumber": "SN/2",
  41. "materialName": "钴",
  42. "materialClass": 1,
  43. "manufacturerName": "启东北新"
  44. }
  45. },
  46. "commonBatchNumberDTO": {
  47. "commonBatchNumber": {
  48. "id": 338,
  49. "batchNumber": "ECT/CCCCCCCCCCC",
  50. "createTime": "2018-12-17 12:20:50",
  51. "createPersonId": 1,
  52. "status": 2,
  53. "dataType": 3,
  54. "isUrgent": 0,
  55. "description": "样品送检",
  56. "memo": null,
  57. "isPublished": 0
  58. },
  59. "createPersonName": "王大大",
  60. "details": null
  61. },
  62. "testReportRecordDTO": {
  63. "testReportRecord": {
  64. "id": 4,
  65. "sampleDeliveringRecordId": 6,
  66. "batchNumberId": 338,
  67. "judger": 1,
  68. "judgeDate": "2018-12-17",
  69. "isQualified": 1,
  70. "purchaseReportRecordId": 2,
  71. "qualityLevel": 1,
  72. "decision": 1
  73. },
  74. "testItemResultRecordDTOList": [
  75. {
  76. "id": null,
  77. "name": null,
  78. "testResult": null,
  79. "testItemResultRecord": {
  80. "id": 4,
  81. "testItemId": 1,
  82. "testReportRecordId": 4,
  83. "testResult": "111"
  84. },
  85. "rawTestItemStandard": null,
  86. "productTestItemStandardList": [
  87. {
  88. "id": 1,
  89. "testItemId": 1,
  90. "value": "1",
  91. "productStandardId": 1
  92. }
  93. ],
  94. "testItem": {
  95. "id": 1,
  96. "name": "O",
  97. "unit": "g/ml"
  98. }
  99. }
  100. ],
  101. "judegrName": "王大大"
  102. },
  103. "testReportRecordDTOList": [
  104. {
  105. "testReportRecord": {
  106. "id": 4,
  107. "sampleDeliveringRecordId": 6,
  108. "batchNumberId": 338,
  109. "judger": 1,
  110. "judgeDate": "2018-12-17",
  111. "isQualified": 1,
  112. "purchaseReportRecordId": 2,
  113. "qualityLevel": 1,
  114. "decision": 1
  115. },
  116. "testItemResultRecordDTOList": [
  117. {
  118. "id": null,
  119. "name": null,
  120. "testResult": null,
  121. "testItemResultRecord": {
  122. "id": 4,
  123. "testItemId": 1,
  124. "testReportRecordId": 4,
  125. "testResult": "111"
  126. },
  127. "rawTestItemStandard": null,
  128. "productTestItemStandardList": [
  129. {
  130. "id": 1,
  131. "testItemId": 1,
  132. "value": "1",
  133. "productStandardId": 1
  134. }
  135. ],
  136. "testItem": {
  137. "id": 1,
  138. "name": "O",
  139. "unit": "g/ml"
  140. }
  141. }
  142. ],
  143. "judegrName": "王大大"
  144. }
  145. ]
  146. },
  147. {
  148. "sampleDeliveringRecordDTO": {
  149. "deliveryFactory": {
  150. "id": 1,
  151. "name": "液氮工厂"
  152. },
  153. "deliverer": {
  154. "id": 13,
  155. "name": "刘德华",
  156. "departmentId": 1,
  157. "departmentName": "智能部"
  158. },
  159. "serialNumberName": null,
  160. "testItemIds": null,
  161. "testItemString": null,
  162. "sampleDeliveringRecord": {
  163. "id": 7,
  164. "delivererId": 1,
  165. "serialNumberId": 13,
  166. "deliveryFactoryId": 1,
  167. "sampleDeliveringDate": "2018-12-17 15:32:17",
  168. "testItems": "1,2",
  169. "type": 3,
  170. "acceptStatus": 2,
  171. "exceptionComment": null,
  172. "handleComment": null
  173. },
  174. "repoBaseSerialNumber": {
  175. "id": 13,
  176. "serialNumber": "SN/2A2EEA9064E8",
  177. "materialName": "金矿",
  178. "materialClass": 1,
  179. "manufacturerName": "无良厂商"
  180. }
  181. },
  182. "commonBatchNumberDTO": {
  183. "commonBatchNumber": {
  184. "id": 339,
  185. "batchNumber": "ECT/CCCCCCCCCCC",
  186. "createTime": "2018-12-17 12:20:50",
  187. "createPersonId": 1,
  188. "status": 2,
  189. "dataType": 3,
  190. "isUrgent": 0,
  191. "description": "样品送检",
  192. "memo": null,
  193. "isPublished": 1
  194. },
  195. "createPersonName": "王大大",
  196. "details": null
  197. },
  198. "testReportRecordDTO": {
  199. "testReportRecord": {
  200. "id": 5,
  201. "sampleDeliveringRecordId": 7,
  202. "batchNumberId": 339,
  203. "judger": 1,
  204. "judgeDate": "2018-12-17",
  205. "isQualified": 1,
  206. "purchaseReportRecordId": 5,
  207. "qualityLevel": 1,
  208. "decision": 1
  209. },
  210. "testItemResultRecordDTOList": [
  211. {
  212. "id": null,
  213. "name": null,
  214. "testResult": null,
  215. "testItemResultRecord": {
  216. "id": 5,
  217. "testItemId": 1,
  218. "testReportRecordId": 5,
  219. "testResult": "111"
  220. },
  221. "rawTestItemStandard": null,
  222. "productTestItemStandardList": [
  223. {
  224. "id": 1,
  225. "testItemId": 1,
  226. "value": "1",
  227. "productStandardId": 1
  228. }
  229. ],
  230. "testItem": {
  231. "id": 1,
  232. "name": "O",
  233. "unit": "g/ml"
  234. }
  235. }
  236. ],
  237. "judegrName": "王大大"
  238. },
  239. "testReportRecordDTOList": [
  240. {
  241. "testReportRecord": {
  242. "id": 5,
  243. "sampleDeliveringRecordId": 7,
  244. "batchNumberId": 339,
  245. "judger": 1,
  246. "judgeDate": "2018-12-17",
  247. "isQualified": 1,
  248. "purchaseReportRecordId": 5,
  249. "qualityLevel": 1,
  250. "decision": 1
  251. },
  252. "testItemResultRecordDTOList": [
  253. {
  254. "id": null,
  255. "name": null,
  256. "testResult": null,
  257. "testItemResultRecord": {
  258. "id": 5,
  259. "testItemId": 1,
  260. "testReportRecordId": 5,
  261. "testResult": "111"
  262. },
  263. "rawTestItemStandard": null,
  264. "productTestItemStandardList": [
  265. {
  266. "id": 1,
  267. "testItemId": 1,
  268. "value": "1",
  269. "productStandardId": 1
  270. }
  271. ],
  272. "testItem": {
  273. "id": 1,
  274. "name": "O",
  275. "unit": "g/ml"
  276. }
  277. }
  278. ],
  279. "judegrName": "王大大"
  280. }
  281. ]
  282. }
  283. ],
  284. "startIndex": 0,
  285. "pages": 1,
  286. "firstPage": true,
  287. "lastPage": true,
  288. "prePage": 0,
  289. "nextPage": 0
  290. }
  291. }

2、保存

1、调用保存接口-----> 质量流程-数据录入-产品检测记录 /productTestRecord/save

测试数据

  1. {
  2. "testItemResultRecordDTOList": [
  3. {
  4. "testItemResultRecord": {
  5. "id": 0,
  6. "isValid": 0,
  7. "testItemId": 0,
  8. "testReportRecordId": 0,
  9. "testResult": "string"
  10. }
  11. }
  12. ],
  13. "testReportRecord": {
  14. "id": 0,
  15. "isQualified": 0
  16. }
  17. }

3、发布接口

POST

/productTestRecord/deploy

测试数据 id=339

返回结果

  1. {
  2. "code": 0,
  3. "message": "操作成功",
  4. "data": null
  5. }

4、根据Id查找产品检测记录

GET

/productTestRecord/{id}

测试数据 id=6

返回结果

  1. {
  2. "code": 0,
  3. "message": "操作成功",
  4. "data": {
  5. "sampleDeliveringRecordDTO": {
  6. "deliveryFactory": {
  7. "id": 1,
  8. "name": "液氮工厂"
  9. },
  10. "deliverer": null,
  11. "serialNumberName": null,
  12. "testItemIds": null,
  13. "testItemString": null,
  14. "sampleDeliveringRecord": {
  15. "id": 8,
  16. "delivererId": 1,
  17. "serialNumberId": 14,
  18. "deliveryFactoryId": 1,
  19. "sampleDeliveringDate": "2018-12-17 15:32:17",
  20. "testItems": "1,2",
  21. "type": 1,
  22. "acceptStatus": 2,
  23. "exceptionComment": null,
  24. "handleComment": null
  25. },
  26. "repoBaseSerialNumber": {
  27. "id": 14,
  28. "serialNumber": "SN/230F0B9BCED2",
  29. "materialName": "银矿",
  30. "materialClass": 1,
  31. "manufacturerName": "无良厂商"
  32. }
  33. },
  34. "commonBatchNumberDTO": {
  35. "commonBatchNumber": {
  36. "id": 339,
  37. "batchNumber": "ECT/CCCCCCCCCCC",
  38. "createTime": "2018-12-17 12:20:50",
  39. "createPersonId": 1,
  40. "status": 2,
  41. "dataType": 3,
  42. "isUrgent": 0,
  43. "description": "样品送检",
  44. "memo": null,
  45. "isPublished": 1
  46. },
  47. "createPersonName": "王大大",
  48. "details": null
  49. },
  50. "testReportRecordDTO": {
  51. "testReportRecord": {
  52. "id": 6,
  53. "sampleDeliveringRecordId": 8,
  54. "batchNumberId": 339,
  55. "judger": 1,
  56. "judgeDate": "2018-12-17",
  57. "isQualified": 1,
  58. "purchaseReportRecordId": null,
  59. "qualityLevel": 1,
  60. "decision": 1
  61. },
  62. "testItemResultRecordDTOList": [
  63. {
  64. "id": null,
  65. "name": null,
  66. "testResult": null,
  67. "testItemResultRecord": {
  68. "id": 6,
  69. "testItemId": 2,
  70. "testReportRecordId": 6,
  71. "testResult": "111"
  72. },
  73. "rawTestItemStandard": null,
  74. "productTestItemStandardList": [],
  75. "testItem": {
  76. "id": 2,
  77. "name": "H",
  78. "unit": "g/ml"
  79. }
  80. }
  81. ],
  82. "judegrName": "王大大"
  83. },
  84. "testReportRecordDTOList": [
  85. {
  86. "testReportRecord": {
  87. "id": 6,
  88. "sampleDeliveringRecordId": 8,
  89. "batchNumberId": 339,
  90. "judger": 1,
  91. "judgeDate": "2018-12-17",
  92. "isQualified": 1,
  93. "purchaseReportRecordId": null,
  94. "qualityLevel": 1,
  95. "decision": 1
  96. },
  97. "testItemResultRecordDTOList": [
  98. {
  99. "id": null,
  100. "name": null,
  101. "testResult": null,
  102. "testItemResultRecord": {
  103. "id": 6,
  104. "testItemId": 2,
  105. "testReportRecordId": 6,
  106. "testResult": "111"
  107. },
  108. "rawTestItemStandard": null,
  109. "productTestItemStandardList": [],
  110. "testItem": {
  111. "id": 2,
  112. "name": "H",
  113. "unit": "g/ml"
  114. }
  115. }
  116. ],
  117. "judegrName": "王大大"
  118. }
  119. ]
  120. }
  121. }
添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注