[关闭]
@ZSCDumin 2018-12-27T05:20:33.000000Z 字数 24278 阅读 484

进货接口测试

未分类


1、已生成进货检验报告单的数据

接口地址:

GET

purchaseReportRecords/generated?page=1&size=10&orderField=id&orderType=desc

返回结果:

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

2、未生成进货报告单

接口地址

GET

purchaseReportRecords/unGenerated?page=1&size=10&orderField=id&orderType=desc

返回结果

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

3、生成进货报告单的搜索功能

接口地址

GET

purchaseReportRecords/sampleDeliveringDate?sampleDeliveringDate=2&page=1&size=10&orderField=id&orderType=desc

返回结果

  1. {
  2. "code": 0,
  3. "message": "操作成功",
  4. "data": {
  5. "pageNumber": 1,
  6. "pageSize": 10,
  7. "sortField": "id",
  8. "sortType": "desc",
  9. "total": 6,
  10. "list": [
  11. {
  12. "purchaseReportRecord": null,
  13. "sampleDeliveringRecordDTO": {
  14. "deliveryFactory": {
  15. "id": 1,
  16. "name": "液氮工厂"
  17. },
  18. "deliverer": {
  19. "id": 1,
  20. "name": "王大大",
  21. "departmentId": 1,
  22. "departmentName": "智能部"
  23. },
  24. "serialNumberName": null,
  25. "testItemIds": null,
  26. "testItemString": null,
  27. "sampleDeliveringRecord": {
  28. "id": 16,
  29. "delivererId": 1,
  30. "serialNumberId": 1,
  31. "deliveryFactoryId": 1,
  32. "sampleDeliveringDate": "2018-12-14 11:41:22",
  33. "testItems": "1",
  34. "type": 1,
  35. "acceptStatus": 3,
  36. "exceptionComment": null,
  37. "handleComment": null
  38. },
  39. "repoBaseSerialNumber": {
  40. "id": 1,
  41. "serialNumber": "SN/1",
  42. "materialName": "原材料",
  43. "materialClass": 1,
  44. "manufacturerName": "启东北新"
  45. }
  46. },
  47. "commonBatchNumberDTO": null,
  48. "testReportRecordDTO": {
  49. "testReportRecord": {
  50. "id": 1,
  51. "sampleDeliveringRecordId": 16,
  52. "batchNumberId": 284,
  53. "judger": 1,
  54. "judgeDate": "2018-12-15",
  55. "isQualified": 1,
  56. "purchaseReportRecordId": null,
  57. "qualityLevel": 1,
  58. "decision": null
  59. },
  60. "testItemResultRecordDTOList": [
  61. {
  62. "id": null,
  63. "name": null,
  64. "testResult": null,
  65. "testItemResultRecord": {
  66. "id": 4,
  67. "testItemId": 4,
  68. "testReportRecordId": 1,
  69. "testResult": "1"
  70. },
  71. "rawTestItemStandard": [
  72. {
  73. "id": 4,
  74. "value": "20",
  75. "rawStandardRecordId": 1,
  76. "testItemID": 4
  77. }
  78. ],
  79. "testItem": {
  80. "id": 4,
  81. "name": "Si",
  82. "unit": "g/ml"
  83. }
  84. }
  85. ],
  86. "judegrName": null
  87. },
  88. "testReportRecordDTOList": null
  89. },
  90. {
  91. "purchaseReportRecord": null,
  92. "sampleDeliveringRecordDTO": {
  93. "deliveryFactory": {
  94. "id": 1,
  95. "name": "液氮工厂"
  96. },
  97. "deliverer": {
  98. "id": 1,
  99. "name": "王大大",
  100. "departmentId": 1,
  101. "departmentName": "智能部"
  102. },
  103. "serialNumberName": null,
  104. "testItemIds": null,
  105. "testItemString": null,
  106. "sampleDeliveringRecord": {
  107. "id": 17,
  108. "delivererId": 1,
  109. "serialNumberId": 1,
  110. "deliveryFactoryId": 1,
  111. "sampleDeliveringDate": "2018-12-14 11:41:22",
  112. "testItems": "1",
  113. "type": 1,
  114. "acceptStatus": 2,
  115. "exceptionComment": null,
  116. "handleComment": null
  117. },
  118. "repoBaseSerialNumber": {
  119. "id": 1,
  120. "serialNumber": "SN/1",
  121. "materialName": "原材料",
  122. "materialClass": 1,
  123. "manufacturerName": "启东北新"
  124. }
  125. },
  126. "commonBatchNumberDTO": null,
  127. "testReportRecordDTO": {
  128. "testReportRecord": {
  129. "id": 2,
  130. "sampleDeliveringRecordId": 17,
  131. "batchNumberId": 285,
  132. "judger": 1,
  133. "judgeDate": "2018-12-15",
  134. "isQualified": 1,
  135. "purchaseReportRecordId": null,
  136. "qualityLevel": 1,
  137. "decision": null
  138. },
  139. "testItemResultRecordDTOList": [
  140. {
  141. "id": null,
  142. "name": null,
  143. "testResult": null,
  144. "testItemResultRecord": {
  145. "id": 5,
  146. "testItemId": 5,
  147. "testReportRecordId": 2,
  148. "testResult": "1"
  149. },
  150. "rawTestItemStandard": [
  151. {
  152. "id": 5,
  153. "value": "20",
  154. "rawStandardRecordId": 1,
  155. "testItemID": 5
  156. }
  157. ],
  158. "testItem": {
  159. "id": 5,
  160. "name": "Fe",
  161. "unit": "g/ml"
  162. }
  163. }
  164. ],
  165. "judegrName": null
  166. },
  167. "testReportRecordDTOList": null
  168. },
  169. {
  170. "purchaseReportRecord": {
  171. "id": 1,
  172. "batchNumberId": 202,
  173. "testMaterialId": 3,
  174. "manufacturerId": 11,
  175. "quantity": "11",
  176. "weight": "11",
  177. "norm": "kg",
  178. "judger": 1,
  179. "judgement": "无",
  180. "judgeDate": "2018-12-11T08:01:54.000+0000",
  181. "devJudger": 1,
  182. "devJudgement": "无",
  183. "devJudgeDate": "2018-12-11T08:02:15.000+0000"
  184. },
  185. "sampleDeliveringRecordDTO": {
  186. "deliveryFactory": {
  187. "id": 1,
  188. "name": "液氮工厂"
  189. },
  190. "deliverer": {
  191. "id": 1,
  192. "name": "王大大",
  193. "departmentId": 1,
  194. "departmentName": "智能部"
  195. },
  196. "serialNumberName": null,
  197. "testItemIds": null,
  198. "testItemString": null,
  199. "sampleDeliveringRecord": {
  200. "id": 19,
  201. "delivererId": 1,
  202. "serialNumberId": 1,
  203. "deliveryFactoryId": 1,
  204. "sampleDeliveringDate": "2018-12-14 11:41:22",
  205. "testItems": "1",
  206. "type": 1,
  207. "acceptStatus": 2,
  208. "exceptionComment": null,
  209. "handleComment": null
  210. },
  211. "repoBaseSerialNumber": {
  212. "id": 1,
  213. "serialNumber": "SN/1",
  214. "materialName": "原材料",
  215. "materialClass": 1,
  216. "manufacturerName": "启东北新"
  217. }
  218. },
  219. "commonBatchNumberDTO": null,
  220. "testReportRecordDTO": {
  221. "testReportRecord": {
  222. "id": 3,
  223. "sampleDeliveringRecordId": 19,
  224. "batchNumberId": 262,
  225. "judger": 1,
  226. "judgeDate": "2018-12-15",
  227. "isQualified": 1,
  228. "purchaseReportRecordId": 1,
  229. "qualityLevel": 1,
  230. "decision": null
  231. },
  232. "testItemResultRecordDTOList": [
  233. {
  234. "id": null,
  235. "name": null,
  236. "testResult": null,
  237. "testItemResultRecord": {
  238. "id": 1,
  239. "testItemId": 1,
  240. "testReportRecordId": 3,
  241. "testResult": "1"
  242. },
  243. "rawTestItemStandard": [
  244. {
  245. "id": 1,
  246. "value": "20",
  247. "rawStandardRecordId": 1,
  248. "testItemID": 1
  249. }
  250. ],
  251. "testItem": {
  252. "id": 1,
  253. "name": "O",
  254. "unit": "g/ml"
  255. }
  256. }
  257. ],
  258. "judegrName": null
  259. },
  260. "testReportRecordDTOList": null
  261. },
  262. {
  263. "purchaseReportRecord": {
  264. "id": 1,
  265. "batchNumberId": 202,
  266. "testMaterialId": 3,
  267. "manufacturerId": 11,
  268. "quantity": "11",
  269. "weight": "11",
  270. "norm": "kg",
  271. "judger": 1,
  272. "judgement": "无",
  273. "judgeDate": "2018-12-11T08:01:54.000+0000",
  274. "devJudger": 1,
  275. "devJudgement": "无",
  276. "devJudgeDate": "2018-12-11T08:02:15.000+0000"
  277. },
  278. "sampleDeliveringRecordDTO": {
  279. "deliveryFactory": {
  280. "id": 1,
  281. "name": "液氮工厂"
  282. },
  283. "deliverer": {
  284. "id": 1,
  285. "name": "王大大",
  286. "departmentId": 1,
  287. "departmentName": "智能部"
  288. },
  289. "serialNumberName": null,
  290. "testItemIds": null,
  291. "testItemString": null,
  292. "sampleDeliveringRecord": {
  293. "id": 19,
  294. "delivererId": 1,
  295. "serialNumberId": 1,
  296. "deliveryFactoryId": 1,
  297. "sampleDeliveringDate": "2018-12-14 11:41:22",
  298. "testItems": "1",
  299. "type": 1,
  300. "acceptStatus": 2,
  301. "exceptionComment": null,
  302. "handleComment": null
  303. },
  304. "repoBaseSerialNumber": {
  305. "id": 1,
  306. "serialNumber": "SN/1",
  307. "materialName": "原材料",
  308. "materialClass": 1,
  309. "manufacturerName": "启东北新"
  310. }
  311. },
  312. "commonBatchNumberDTO": null,
  313. "testReportRecordDTO": {
  314. "testReportRecord": {
  315. "id": 4,
  316. "sampleDeliveringRecordId": 19,
  317. "batchNumberId": 262,
  318. "judger": 1,
  319. "judgeDate": "2018-12-15",
  320. "isQualified": 1,
  321. "purchaseReportRecordId": 1,
  322. "qualityLevel": 1,
  323. "decision": null
  324. },
  325. "testItemResultRecordDTOList": [
  326. {
  327. "id": null,
  328. "name": null,
  329. "testResult": null,
  330. "testItemResultRecord": {
  331. "id": 2,
  332. "testItemId": 2,
  333. "testReportRecordId": 4,
  334. "testResult": "1"
  335. },
  336. "rawTestItemStandard": [
  337. {
  338. "id": 2,
  339. "value": "20",
  340. "rawStandardRecordId": 1,
  341. "testItemID": 2
  342. }
  343. ],
  344. "testItem": {
  345. "id": 2,
  346. "name": "H",
  347. "unit": "g/ml"
  348. }
  349. }
  350. ],
  351. "judegrName": null
  352. },
  353. "testReportRecordDTOList": null
  354. },
  355. {
  356. "purchaseReportRecord": {
  357. "id": 1,
  358. "batchNumberId": 202,
  359. "testMaterialId": 3,
  360. "manufacturerId": 11,
  361. "quantity": "11",
  362. "weight": "11",
  363. "norm": "kg",
  364. "judger": 1,
  365. "judgement": "无",
  366. "judgeDate": "2018-12-11T08:01:54.000+0000",
  367. "devJudger": 1,
  368. "devJudgement": "无",
  369. "devJudgeDate": "2018-12-11T08:02:15.000+0000"
  370. },
  371. "sampleDeliveringRecordDTO": {
  372. "deliveryFactory": {
  373. "id": 1,
  374. "name": "液氮工厂"
  375. },
  376. "deliverer": {
  377. "id": 1,
  378. "name": "王大大",
  379. "departmentId": 1,
  380. "departmentName": "智能部"
  381. },
  382. "serialNumberName": null,
  383. "testItemIds": null,
  384. "testItemString": null,
  385. "sampleDeliveringRecord": {
  386. "id": 19,
  387. "delivererId": 1,
  388. "serialNumberId": 1,
  389. "deliveryFactoryId": 1,
  390. "sampleDeliveringDate": "2018-12-14 11:41:22",
  391. "testItems": "1",
  392. "type": 1,
  393. "acceptStatus": 2,
  394. "exceptionComment": null,
  395. "handleComment": null
  396. },
  397. "repoBaseSerialNumber": {
  398. "id": 1,
  399. "serialNumber": "SN/1",
  400. "materialName": "原材料",
  401. "materialClass": 1,
  402. "manufacturerName": "启东北新"
  403. }
  404. },
  405. "commonBatchNumberDTO": null,
  406. "testReportRecordDTO": {
  407. "testReportRecord": {
  408. "id": 5,
  409. "sampleDeliveringRecordId": 19,
  410. "batchNumberId": 262,
  411. "judger": 1,
  412. "judgeDate": "2018-12-15",
  413. "isQualified": 1,
  414. "purchaseReportRecordId": 1,
  415. "qualityLevel": 1,
  416. "decision": null
  417. },
  418. "testItemResultRecordDTOList": [
  419. {
  420. "id": null,
  421. "name": null,
  422. "testResult": null,
  423. "testItemResultRecord": {
  424. "id": 3,
  425. "testItemId": 3,
  426. "testReportRecordId": 5,
  427. "testResult": "1"
  428. },
  429. "rawTestItemStandard": [
  430. {
  431. "id": 3,
  432. "value": "20",
  433. "rawStandardRecordId": 1,
  434. "testItemID": 3
  435. }
  436. ],
  437. "testItem": {
  438. "id": 3,
  439. "name": "Li",
  440. "unit": "g/ml"
  441. }
  442. }
  443. ],
  444. "judegrName": null
  445. },
  446. "testReportRecordDTOList": null
  447. },
  448. {
  449. "purchaseReportRecord": null,
  450. "sampleDeliveringRecordDTO": {
  451. "deliveryFactory": {
  452. "id": 1,
  453. "name": "液氮工厂"
  454. },
  455. "deliverer": {
  456. "id": 1,
  457. "name": "王大大",
  458. "departmentId": 1,
  459. "departmentName": "智能部"
  460. },
  461. "serialNumberName": null,
  462. "testItemIds": null,
  463. "testItemString": null,
  464. "sampleDeliveringRecord": {
  465. "id": 27,
  466. "delivererId": 1,
  467. "serialNumberId": 1,
  468. "deliveryFactoryId": 1,
  469. "sampleDeliveringDate": "2018-12-15 16:51:45",
  470. "testItems": "1,4,5",
  471. "type": 1,
  472. "acceptStatus": 2,
  473. "exceptionComment": "加急测试",
  474. "handleComment": null
  475. },
  476. "repoBaseSerialNumber": {
  477. "id": 1,
  478. "serialNumber": "SN/1",
  479. "materialName": "原材料",
  480. "materialClass": 1,
  481. "manufacturerName": "启东北新"
  482. }
  483. },
  484. "commonBatchNumberDTO": null,
  485. "testReportRecordDTO": {
  486. "testReportRecord": {
  487. "id": 13,
  488. "sampleDeliveringRecordId": 27,
  489. "batchNumberId": 287,
  490. "judger": null,
  491. "judgeDate": null,
  492. "isQualified": null,
  493. "purchaseReportRecordId": null,
  494. "qualityLevel": null,
  495. "decision": null
  496. },
  497. "testItemResultRecordDTOList": [
  498. {
  499. "id": null,
  500. "name": null,
  501. "testResult": null,
  502. "testItemResultRecord": {
  503. "id": 14,
  504. "testItemId": 1,
  505. "testReportRecordId": 13,
  506. "testResult": null
  507. },
  508. "rawTestItemStandard": [
  509. {
  510. "id": 1,
  511. "value": "20",
  512. "rawStandardRecordId": 1,
  513. "testItemID": 1
  514. }
  515. ],
  516. "testItem": {
  517. "id": 1,
  518. "name": "O",
  519. "unit": "g/ml"
  520. }
  521. },
  522. {
  523. "id": null,
  524. "name": null,
  525. "testResult": null,
  526. "testItemResultRecord": {
  527. "id": 15,
  528. "testItemId": 4,
  529. "testReportRecordId": 13,
  530. "testResult": null
  531. },
  532. "rawTestItemStandard": [
  533. {
  534. "id": 4,
  535. "value": "20",
  536. "rawStandardRecordId": 1,
  537. "testItemID": 4
  538. }
  539. ],
  540. "testItem": {
  541. "id": 4,
  542. "name": "Si",
  543. "unit": "g/ml"
  544. }
  545. },
  546. {
  547. "id": null,
  548. "name": null,
  549. "testResult": null,
  550. "testItemResultRecord": {
  551. "id": 16,
  552. "testItemId": 5,
  553. "testReportRecordId": 13,
  554. "testResult": null
  555. },
  556. "rawTestItemStandard": [
  557. {
  558. "id": 5,
  559. "value": "20",
  560. "rawStandardRecordId": 1,
  561. "testItemID": 5
  562. }
  563. ],
  564. "testItem": {
  565. "id": 5,
  566. "name": "Fe",
  567. "unit": "g/ml"
  568. }
  569. }
  570. ],
  571. "judegrName": null
  572. },
  573. "testReportRecordDTOList": null
  574. }
  575. ],
  576. "startIndex": 0,
  577. "firstPage": true,
  578. "nextPage": 0,
  579. "pages": 1,
  580. "lastPage": true,
  581. "prePage": 0
  582. }
  583. }

4、生成进货单-保存、送审

接口调用顺序:

仅保存

1、先调用根据检测记录ID数组来查询 ----> 质量流程-数据录入-进货检验 /testReportRecords/ids
2、调用保存 ----> 质量流程-数据录入-进货检验 /purchaseReportRecord

直接送审

1、先调用根据检测记录ID数组来查询 ----> 质量流程-数据录入-进货检验 /testReportRecords/ids
2、调用保存 ----> 质量流程-数据录入-进货检验 /purchaseReportRecord
3、保存后调用审核----> 质量流程-待办事项 /toDoList/{taskId}

检测接口

POST

/testReportRecord/check

测试数据

测试结果

  1. {
  2. "code": -2,
  3. "message": "不是同一批数据,无法生成进货检验报告单!",
  4. "data": null
  5. }

保存接口

POST

/purchaseReportRecord

测试数据

  1. {
  2. "commonBatchNumberDTO": {
  3. "commonBatchNumber": {
  4. "id": 404,
  5. "batchNumber": "BN-JHJC-181224001",
  6. "createTime": "2018-12-24 10:52:02",
  7. "createPersonId": 1,
  8. "status": -1,
  9. "dataType": 7,
  10. "isUrgent": null,
  11. "description": "原材料进货检验",
  12. "memo": null,
  13. "isPublished": 0
  14. }
  15. },
  16. "purchaseReportRecord": {
  17. "id": 4,
  18. "batchNumberId": 404,
  19. "testMaterialId": 1,
  20. "manufacturerId": 1,
  21. "quantity": "11",
  22. "weight": "11",
  23. "norm": "1",
  24. "judger": 1,
  25. "judgement": "1",
  26. "judgeDate": "2018-09-09T04:02:02.000+0000",
  27. "devJudgement": "string",
  28. "devJudger": 1
  29. },
  30. "testReportRecordDTOList": [
  31. {
  32. "testReportRecord": {
  33. "id": 4,
  34. "purchaseReportRecordId": 2
  35. },
  36. "testItemResultRecordDTOList": [
  37. {
  38. "testItemResultRecord": {
  39. "id": 4,
  40. "testItemId": 1,
  41. "testReportRecordId": 4,
  42. "testResult": "111",
  43. "isValid": 1
  44. }
  45. }
  46. ]
  47. }
  48. ]
  49. }
  50. materialName = "铁矿"

测试结果

  1. {
  2. "code": 0,
  3. "message": "操作成功",
  4. "data": {
  5. "commonBatchNumber": {
  6. "id": 299,
  7. "batchNumber": "ECT/5EF37344082F",
  8. "createTime": "2018-12-16 07:08:27",
  9. "createPersonId": 1,
  10. "status": -1,
  11. "dataType": 7,
  12. "isUrgent": null,
  13. "description": "原材料进货检验",
  14. "memo": "string"
  15. },
  16. "createPersonName": null,
  17. "details": {
  18. "id": 18,
  19. "batchNumberId": 299,
  20. "testMaterialId": 1,
  21. "manufacturerId": 1,
  22. "quantity": "25",
  23. "weight": "0",
  24. "norm": "25kg/袋",
  25. "judger": null,
  26. "judgement": null,
  27. "judgeDate": null,
  28. "devJudger": null,
  29. "devJudgement": null,
  30. "devJudgeDate": null
  31. }
  32. }
  33. }

生成进货单-编辑、送审

1、调用更新原材料进货记录接口 /purchaseReportRecord(isNewMaterial默认为-1,表示正常的送审,为0表示为不是新材料,为1表示为新材料
2、调用审核接口 质量流程-待办事项 /toDoList/{taskId}

5、审核

接口

GET

/purchaseReportRecords/audit

测试结果

  1. {
  2. "code": 0,
  3. "message": "操作成功",
  4. "data": {
  5. "pageNumber": 1,
  6. "pageSize": 10,
  7. "sortField": "id",
  8. "sortType": "desc",
  9. "total": 1,
  10. "list": [
  11. {
  12. "purchaseReportRecord": {
  13. "id": 18,
  14. "batchNumberId": 299,
  15. "testMaterialId": 1,
  16. "manufacturerId": 1,
  17. "quantity": "25",
  18. "weight": "0",
  19. "norm": "25kg/袋",
  20. "judger": null,
  21. "judgement": null,
  22. "judgeDate": null,
  23. "devJudger": null,
  24. "devJudgement": null,
  25. "devJudgeDate": null
  26. },
  27. "sampleDeliveringRecordDTO": {
  28. "deliveryFactory": {
  29. "id": 1,
  30. "name": "液氮工厂"
  31. },
  32. "deliverer": {
  33. "id": 1,
  34. "name": "王大大",
  35. "departmentId": 1,
  36. "departmentName": "智能部"
  37. },
  38. "serialNumberName": null,
  39. "testItemIds": null,
  40. "testItemString": null,
  41. "sampleDeliveringRecord": {
  42. "id": 27,
  43. "delivererId": 1,
  44. "serialNumberId": 1,
  45. "deliveryFactoryId": 1,
  46. "sampleDeliveringDate": "2018-12-15 16:51:45",
  47. "testItems": "1,4,5",
  48. "type": 1,
  49. "acceptStatus": 2,
  50. "exceptionComment": "加急测试",
  51. "handleComment": null
  52. },
  53. "repoBaseSerialNumber": {
  54. "id": 1,
  55. "serialNumber": "SN/1",
  56. "materialName": "原材料",
  57. "materialClass": 1,
  58. "manufacturerName": "启东北新"
  59. }
  60. },
  61. "commonBatchNumberDTO": {
  62. "commonBatchNumber": {
  63. "id": 299,
  64. "batchNumber": "ECT/5EF37344082F",
  65. "createTime": "2018-12-16 07:08:27",
  66. "createPersonId": 1,
  67. "status": 2,
  68. "dataType": 7,
  69. "isUrgent": null,
  70. "description": "原材料进货检验",
  71. "memo": null
  72. },
  73. "createPersonName": "王大大",
  74. "details": null
  75. },
  76. "testReportRecordDTO": null,
  77. "testReportRecordDTOList": [
  78. {
  79. "testReportRecord": {
  80. "id": 13,
  81. "sampleDeliveringRecordId": 27,
  82. "batchNumberId": 287,
  83. "judger": 1,
  84. "judgeDate": "2018-12-16",
  85. "isQualified": 1,
  86. "purchaseReportRecordId": 18,
  87. "qualityLevel": 1,
  88. "decision": null
  89. },
  90. "testItemResultRecordDTOList": [
  91. {
  92. "id": null,
  93. "name": null,
  94. "testResult": null,
  95. "testItemResultRecord": {
  96. "id": 14,
  97. "testItemId": 1,
  98. "testReportRecordId": 13,
  99. "testResult": null
  100. },
  101. "rawTestItemStandard": [
  102. {
  103. "id": 1,
  104. "value": "20",
  105. "rawStandardRecordId": 1,
  106. "testItemID": 1
  107. }
  108. ],
  109. "testItem": {
  110. "id": 1,
  111. "name": "O",
  112. "unit": "g/ml"
  113. }
  114. },
  115. {
  116. "id": null,
  117. "name": null,
  118. "testResult": null,
  119. "testItemResultRecord": {
  120. "id": 15,
  121. "testItemId": 4,
  122. "testReportRecordId": 13,
  123. "testResult": null
  124. },
  125. "rawTestItemStandard": [
  126. {
  127. "id": 4,
  128. "value": "20",
  129. "rawStandardRecordId": 1,
  130. "testItemID": 4
  131. }
  132. ],
  133. "testItem": {
  134. "id": 4,
  135. "name": "Si",
  136. "unit": "g/ml"
  137. }
  138. },
  139. {
  140. "id": null,
  141. "name": null,
  142. "testResult": null,
  143. "testItemResultRecord": {
  144. "id": 16,
  145. "testItemId": 5,
  146. "testReportRecordId": 13,
  147. "testResult": null
  148. },
  149. "rawTestItemStandard": [
  150. {
  151. "id": 5,
  152. "value": "20",
  153. "rawStandardRecordId": 1,
  154. "testItemID": 5
  155. }
  156. ],
  157. "testItem": {
  158. "id": 5,
  159. "name": "Fe",
  160. "unit": "g/ml"
  161. }
  162. }
  163. ],
  164. "judegrName": "王大大"
  165. }
  166. ]
  167. }
  168. ],
  169. "startIndex": 0,
  170. "firstPage": true,
  171. "pages": 1,
  172. "prePage": 0,
  173. "nextPage": 0,
  174. "lastPage": true
  175. }
  176. }

6、发布

不是新材料,直接调用 /purchaseReportRecords/deploy
是新材料,调用更新接口 /purchaseReportRecord 【isDeployNewMaterial =1(默认为0)】

接口

GET

/purchaseReportRecords/deploy

测试结果

  1. {
  2. "code": 0,
  3. "data": {
  4. "firstPage": true,
  5. "lastPage": true,
  6. "list": [
  7. {
  8. "commonBatchNumberDTO": {
  9. "commonBatchNumber": {
  10. "batchNumber": "string",
  11. "createPersonId": 0,
  12. "createTime": "2018-12-16T08:56:28.482Z",
  13. "dataType": 0,
  14. "description": "string",
  15. "id": 0,
  16. "isUrgent": 0,
  17. "memo": "string",
  18. "status": 0
  19. },
  20. "createPersonName": "string",
  21. "details": {}
  22. },
  23. "purchaseReportRecord": {
  24. "batchNumberId": 0,
  25. "devJudgeDate": "2018-12-16T08:56:28.482Z",
  26. "devJudgement": "string",
  27. "devJudger": 0,
  28. "id": 0,
  29. "judgeDate": "2018-12-16T08:56:28.482Z",
  30. "judgement": "string",
  31. "judger": 0,
  32. "manufacturerId": 0,
  33. "norm": "string",
  34. "quantity": "string",
  35. "testMaterialId": 0,
  36. "weight": "string"
  37. },
  38. "sampleDeliveringRecordDTO": {
  39. "deliverer": {
  40. "departmentId": 0,
  41. "departmentName": "string",
  42. "id": 0,
  43. "name": "string"
  44. },
  45. "deliveryFactory": {
  46. "id": 0,
  47. "name": "string"
  48. },
  49. "repoBaseSerialNumber": {
  50. "id": 0,
  51. "manufacturerName": "string",
  52. "materialClass": 0,
  53. "materialName": "string",
  54. "serialNumber": "string"
  55. },
  56. "sampleDeliveringRecord": {
  57. "acceptStatus": 0,
  58. "delivererId": 0,
  59. "deliveryFactoryId": 0,
  60. "exceptionComment": "string",
  61. "handleComment": "string",
  62. "id": 0,
  63. "sampleDeliveringDate": "2018-12-16T08:56:28.483Z",
  64. "serialNumberId": 0,
  65. "testItems": "string",
  66. "type": 0
  67. },
  68. "serialNumberName": "string",
  69. "testItemIds": [
  70. 0
  71. ],
  72. "testItemString": "string"
  73. },
  74. "testReportRecordDTO": {
  75. "judegrName": "string",
  76. "testItemResultRecordDTOList": [
  77. {
  78. "id": 0,
  79. "name": "string",
  80. "rawTestItemStandard": [
  81. {
  82. "id": 0,
  83. "rawStandardRecordId": 0,
  84. "testItemID": 0,
  85. "value": "string"
  86. }
  87. ],
  88. "testItem": {
  89. "id": 0,
  90. "name": "string",
  91. "unit": "string"
  92. },
  93. "testItemResultRecord": {
  94. "id": 0,
  95. "testItemId": 0,
  96. "testReportRecordId": 0,
  97. "testResult": "string"
  98. },
  99. "testResult": "string"
  100. }
  101. ],
  102. "testReportRecord": {
  103. "batchNumberId": 0,
  104. "decision": 0,
  105. "id": 0,
  106. "isQualified": 0,
  107. "judgeDate": "2018-12-16T08:56:28.483Z",
  108. "judger": 0,
  109. "purchaseReportRecordId": 0,
  110. "qualityLevel": 0,
  111. "sampleDeliveringRecordId": 0
  112. }
  113. },
  114. "testReportRecordDTOList": [
  115. {
  116. "judegrName": "string",
  117. "testItemResultRecordDTOList": [
  118. {
  119. "id": 0,
  120. "name": "string",
  121. "rawTestItemStandard": [
  122. {
  123. "id": 0,
  124. "rawStandardRecordId": 0,
  125. "testItemID": 0,
  126. "value": "string"
  127. }
  128. ],
  129. "testItem": {
  130. "id": 0,
  131. "name": "string",
  132. "unit": "string"
  133. },
  134. "testItemResultRecord": {
  135. "id": 0,
  136. "testItemId": 0,
  137. "testReportRecordId": 0,
  138. "testResult": "string"
  139. },
  140. "testResult": "string"
  141. }
  142. ],
  143. "testReportRecord": {
  144. "batchNumberId": 0,
  145. "decision": 0,
  146. "id": 0,
  147. "isQualified": 0,
  148. "judgeDate": "2018-12-16T08:56:28.483Z",
  149. "judger": 0,
  150. "purchaseReportRecordId": 0,
  151. "qualityLevel": 0,
  152. "sampleDeliveringRecordId": 0
  153. }
  154. }
  155. ]
  156. }
  157. ],
  158. "nextPage": 0,
  159. "pageNumber": 0,
  160. "pageSize": 0,
  161. "pages": 0,
  162. "prePage": 0,
  163. "sortField": "string",
  164. "sortType": "string",
  165. "startIndex": 0,
  166. "total": 0
  167. },
  168. "message": "string"
  169. }
添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注