Commit e67f7c430579847d687e32b129a01f760471fbf7

Authored by xqs
2 parents ae199c1c eddd6905

xml

Showing 34 changed files with 15164 additions and 719 deletions

Too many changes to show.

To preserve performance only 33 of 34 files are displayed.

.idea/.gitignore deleted
1   -
2   -# Datasource local storage ignored files
3   -/dataSources.local.xml
4   -# Datasource local storage ignored files
5   -/dataSources/
6   -/.*
7 0 \ No newline at end of file
.idea/MyBatisCodeHelperDatasource.xml deleted
1   -<?xml version="1.0" encoding="UTF-8"?>
2   -<project version="4">
3   - <component name="MyBatisCodeHelperDatasource">
4   - <option name="projectProfile">
5   - <ProjectProfile>
6   - <option name="addSerializeUid" value="true" />
7   - <option name="generateService" value="true" />
8   - <option name="javaMapperPackage" value="com.huaheng.pc.config.cycleCountPreference.mapper" />
9   - <option name="javaMapperPath" value="$PROJECT_DIR$/src/main/java" />
10   - <option name="javaModelPackage" value="com.huaheng.pc.config.cycleCountPreference.domain" />
11   - <option name="javaModelPath" value="$PROJECT_DIR$/src/main/java" />
12   - <option name="lastDatabaseCrudChooseModuleName" value="huaheng" />
13   - <option name="moduleNameToPackageAndPathMap">
14   - <map>
15   - <entry key="WMSV1">
16   - <value>
17   - <UserPackageAndPathInfoByModule>
18   - <option name="javaMapperPackage" value="com.huaheng.pc.config.zoneCapacity.mapper" />
19   - <option name="javaMapperPath" value="$PROJECT_DIR$/src/main/java" />
20   - <option name="javaModelPacakge" value="com.huaheng.pc.config.zoneCapacity.domain" />
21   - <option name="javaModelPath" value="$PROJECT_DIR$/src/main/java" />
22   - <option name="javaServiceInterfacePackage" value="com.huaheng.pc.shipment.shipmentContainerDetail.service" />
23   - <option name="javaServiceInterfacePath" value="$PROJECT_DIR$/src/main/java" />
24   - <option name="xmlPackage" value="config" />
25   - <option name="xmlPath" value="E:\code\wms2\src\main\resources\mybatis" />
26   - </UserPackageAndPathInfoByModule>
27   - </value>
28   - </entry>
29   - <entry key="huaheng">
30   - <value>
31   - <UserPackageAndPathInfoByModule>
32   - <option name="javaMapperPackage" value="com.huaheng.pc.config.cycleCountPreference.mapper" />
33   - <option name="javaMapperPath" value="$PROJECT_DIR$/src/main/java" />
34   - <option name="javaModelPacakge" value="com.huaheng.pc.config.cycleCountPreference.domain" />
35   - <option name="javaModelPath" value="$PROJECT_DIR$/src/main/java" />
36   - <option name="javaServicePackage" value="com.huaheng.pc.config.cycleCountPreference.service" />
37   - <option name="javaServicePath" value="$PROJECT_DIR$/src/main/java" />
38   - <option name="xmlPackage" value="config" />
39   - <option name="xmlPath" value="E:\code\wms2\src\main\resources\mybatis" />
40   - </UserPackageAndPathInfoByModule>
41   - </value>
42   - </entry>
43   - </map>
44   - </option>
45   - <option name="mybatisPlusStaticField" value="false" />
46   - <option name="tableGenerateConfigs">
47   - <map>
48   - <entry key="wms_v2:adjust_detail">
49   - <value>
50   - <TableGenerateConfig>
51   - <option name="generatedKey" value="id" />
52   - <option name="javaModelName" value="AdjustDetail" />
53   - <option name="moduleName" value="huaheng" />
54   - <option name="useActualColumnName" value="true" />
55   - </TableGenerateConfig>
56   - </value>
57   - </entry>
58   - <entry key="wms_v2:adjust_header">
59   - <value>
60   - <TableGenerateConfig>
61   - <option name="generatedKey" value="id" />
62   - <option name="javaModelName" value="AdjustHeader" />
63   - <option name="moduleName" value="huaheng" />
64   - <option name="useActualColumnName" value="true" />
65   - </TableGenerateConfig>
66   - </value>
67   - </entry>
68   - <entry key="wms_v2:alarm_level">
69   - <value>
70   - <TableGenerateConfig>
71   - <option name="generatedKey" value="id" />
72   - <option name="javaModelName" value="AlarmLevel" />
73   - <option name="moduleName" value="huaheng" />
74   - <option name="useActualColumnName" value="true" />
75   - </TableGenerateConfig>
76   - </value>
77   - </entry>
78   - <entry key="wms_v2:bom_detail">
79   - <value>
80   - <TableGenerateConfig>
81   - <option name="generatedKey" value="id" />
82   - <option name="javaModelName" value="BomDetail" />
83   - <option name="moduleName" value="huaheng" />
84   - <option name="useActualColumnName" value="true" />
85   - </TableGenerateConfig>
86   - </value>
87   - </entry>
88   - <entry key="wms_v2:bom_header">
89   - <value>
90   - <TableGenerateConfig>
91   - <option name="generatedKey" value="id" />
92   - <option name="javaModelName" value="BomHeader" />
93   - <option name="moduleName" value="WMSV1" />
94   - <option name="useActualColumnName" value="true" />
95   - </TableGenerateConfig>
96   - </value>
97   - </entry>
98   - <entry key="wms_v2:carrier">
99   - <value>
100   - <TableGenerateConfig>
101   - <option name="generatedKey" value="id" />
102   - <option name="javaModelName" value="Carrier" />
103   - <option name="moduleName" value="WMSV1" />
104   - <option name="useActualColumnName" value="true" />
105   - </TableGenerateConfig>
106   - </value>
107   - </entry>
108   - <entry key="wms_v2:check_detail">
109   - <value>
110   - <TableGenerateConfig>
111   - <option name="generatedKey" value="id" />
112   - <option name="javaModelName" value="CheckDetail" />
113   - <option name="moduleName" value="huaheng" />
114   - <option name="useActualColumnName" value="true" />
115   - </TableGenerateConfig>
116   - </value>
117   - </entry>
118   - <entry key="wms_v2:check_header">
119   - <value>
120   - <TableGenerateConfig>
121   - <option name="generatedKey" value="id" />
122   - <option name="javaModelName" value="CheckHeader" />
123   - <option name="moduleName" value="huaheng" />
124   - <option name="useActualColumnName" value="true" />
125   - </TableGenerateConfig>
126   - </value>
127   - </entry>
128   - <entry key="wms_v2:checking_register">
129   - <value>
130   - <TableGenerateConfig>
131   - <option name="generatedKey" value="id" />
132   - <option name="javaModelName" value="CheckingRegister" />
133   - <option name="moduleName" value="huaheng" />
134   - <option name="useActualColumnName" value="true" />
135   - </TableGenerateConfig>
136   - </value>
137   - </entry>
138   - <entry key="wms_v2:container">
139   - <value>
140   - <TableGenerateConfig>
141   - <option name="generatedKey" value="id" />
142   - <option name="javaModelName" value="Container" />
143   - <option name="moduleName" value="huaheng" />
144   - <option name="useActualColumnName" value="true" />
145   - </TableGenerateConfig>
146   - </value>
147   - </entry>
148   - <entry key="wms_v2:container_capacity">
149   - <value>
150   - <TableGenerateConfig>
151   - <option name="generatedKey" value="id" />
152   - <option name="javaModelName" value="ContainerCapacity" />
153   - <option name="moduleName" value="huaheng" />
154   - <option name="useActualColumnName" value="true" />
155   - </TableGenerateConfig>
156   - </value>
157   - </entry>
158   - <entry key="wms_v2:container_type">
159   - <value>
160   - <TableGenerateConfig>
161   - <option name="generatedKey" value="id" />
162   - <option name="javaModelName" value="ContainerType" />
163   - <option name="moduleName" value="huaheng" />
164   - <option name="useActualColumnName" value="true" />
165   - </TableGenerateConfig>
166   - </value>
167   - </entry>
168   - <entry key="wms_v2:customer">
169   - <value>
170   - <TableGenerateConfig>
171   - <option name="generatedKey" value="id" />
172   - <option name="javaModelName" value="Customer" />
173   - <option name="moduleName" value="huaheng" />
174   - <option name="useActualColumnName" value="true" />
175   - </TableGenerateConfig>
176   - </value>
177   - </entry>
178   - <entry key="wms_v2:cycle_count_preference">
179   - <value>
180   - <TableGenerateConfig>
181   - <option name="generatedKey" value="id" />
182   - <option name="javaModelName" value="CycleCountPreference" />
183   - <option name="moduleName" value="huaheng" />
184   - <option name="useActualColumnName" value="true" />
185   - </TableGenerateConfig>
186   - </value>
187   - </entry>
188   - <entry key="wms_v2:eccel_template">
189   - <value>
190   - <TableGenerateConfig>
191   - <option name="generatedKey" value="" />
192   - <option name="javaModelName" value="EccelTemplate" />
193   - <option name="moduleName" value="huaheng" />
194   - <option name="useActualColumnName" value="true" />
195   - </TableGenerateConfig>
196   - </value>
197   - </entry>
198   - <entry key="wms_v2:excel_template">
199   - <value>
200   - <TableGenerateConfig>
201   - <option name="generatedKey" value="" />
202   - <option name="javaModelName" value="ExcelTemplate" />
203   - <option name="moduleName" value="huaheng" />
204   - <option name="useActualColumnName" value="true" />
205   - </TableGenerateConfig>
206   - </value>
207   - </entry>
208   - <entry key="wms_v2:inventory_detail">
209   - <value>
210   - <TableGenerateConfig>
211   - <option name="generatedKey" value="id" />
212   - <option name="javaModelName" value="InventoryDetail" />
213   - <option name="moduleName" value="huaheng" />
214   - <option name="useActualColumnName" value="true" />
215   - </TableGenerateConfig>
216   - </value>
217   - </entry>
218   - <entry key="wms_v2:inventory_header">
219   - <value>
220   - <TableGenerateConfig>
221   - <option name="generatedKey" value="id" />
222   - <option name="javaModelName" value="InventoryHeader" />
223   - <option name="moduleName" value="huaheng" />
224   - <option name="useActualColumnName" value="true" />
225   - </TableGenerateConfig>
226   - </value>
227   - </entry>
228   - <entry key="wms_v2:inventory_transaction">
229   - <value>
230   - <TableGenerateConfig>
231   - <option name="generatedKey" value="id" />
232   - <option name="javaModelName" value="InventoryTransaction" />
233   - <option name="moduleName" value="WMSV1" />
234   - <option name="useActualColumnName" value="true" />
235   - </TableGenerateConfig>
236   - </value>
237   - </entry>
238   - <entry key="wms_v2:location_capacity">
239   - <value>
240   - <TableGenerateConfig>
241   - <option name="generatedKey" value="id" />
242   - <option name="javaModelName" value="LocationCapacity" />
243   - <option name="moduleName" value="WMSV1" />
244   - <option name="useActualColumnName" value="true" />
245   - </TableGenerateConfig>
246   - </value>
247   - </entry>
248   - <entry key="wms_v2:log_execption">
249   - <value>
250   - <TableGenerateConfig>
251   - <option name="generatedKey" value="" />
252   - <option name="javaModelName" value="LogExecption" />
253   - <option name="moduleName" value="huaheng" />
254   - <option name="useActualColumnName" value="true" />
255   - </TableGenerateConfig>
256   - </value>
257   - </entry>
258   - <entry key="wms_v2:material">
259   - <value>
260   - <TableGenerateConfig>
261   - <option name="generatedKey" value="id" />
262   - <option name="javaModelName" value="Material" />
263   - <option name="moduleName" value="WMSV1" />
264   - <option name="useActualColumnName" value="true" />
265   - </TableGenerateConfig>
266   - </value>
267   - </entry>
268   - <entry key="wms_v2:material_multiple">
269   - <value>
270   - <TableGenerateConfig>
271   - <option name="generatedKey" value="id" />
272   - <option name="javaModelName" value="MaterialMultiple" />
273   - <option name="moduleName" value="huaheng" />
274   - <option name="useActualColumnName" value="true" />
275   - </TableGenerateConfig>
276   - </value>
277   - </entry>
278   - <entry key="wms_v2:material_unit">
279   - <value>
280   - <TableGenerateConfig>
281   - <option name="generatedKey" value="id" />
282   - <option name="javaModelName" value="MaterialUnit" />
283   - <option name="moduleName" value="huaheng" />
284   - <option name="useActualColumnName" value="true" />
285   - </TableGenerateConfig>
286   - </value>
287   - </entry>
288   - <entry key="wms_v2:receipt_container_detail">
289   - <value>
290   - <TableGenerateConfig>
291   - <option name="generatedKey" value="id" />
292   - <option name="javaModelName" value="ReceiptContainerDetail" />
293   - <option name="moduleName" value="WMSV1" />
294   - <option name="useActualColumnName" value="true" />
295   - </TableGenerateConfig>
296   - </value>
297   - </entry>
298   - <entry key="wms_v2:receipt_container_header">
299   - <value>
300   - <TableGenerateConfig>
301   - <option name="generatedKey" value="id" />
302   - <option name="javaModelName" value="ReceiptContainerHeader" />
303   - <option name="moduleName" value="WMSV1" />
304   - <option name="useActualColumnName" value="true" />
305   - </TableGenerateConfig>
306   - </value>
307   - </entry>
308   - <entry key="wms_v2:receipt_detail">
309   - <value>
310   - <TableGenerateConfig>
311   - <option name="generatedKey" value="id" />
312   - <option name="javaModelName" value="ReceiptDetail" />
313   - <option name="moduleName" value="huaheng" />
314   - <option name="useActualColumnName" value="true" />
315   - </TableGenerateConfig>
316   - </value>
317   - </entry>
318   - <entry key="wms_v2:receipt_detail_history">
319   - <value>
320   - <TableGenerateConfig>
321   - <option name="generatedKey" value="id" />
322   - <option name="javaModelName" value="ReceiptDetailHistory" />
323   - <option name="moduleName" value="huaheng" />
324   - <option name="useActualColumnName" value="true" />
325   - </TableGenerateConfig>
326   - </value>
327   - </entry>
328   - <entry key="wms_v2:receipt_header_history">
329   - <value>
330   - <TableGenerateConfig>
331   - <option name="generatedKey" value="id" />
332   - <option name="javaModelName" value="ReceiptHeaderHistory" />
333   - <option name="moduleName" value="huaheng" />
334   - <option name="useActualColumnName" value="true" />
335   - </TableGenerateConfig>
336   - </value>
337   - </entry>
338   - <entry key="wms_v2:receipt_preference">
339   - <value>
340   - <TableGenerateConfig>
341   - <option name="generatedKey" value="id" />
342   - <option name="javaModelName" value="ReceiptPreference" />
343   - <option name="moduleName" value="WMSV1" />
344   - <option name="useActualColumnName" value="true" />
345   - </TableGenerateConfig>
346   - </value>
347   - </entry>
348   - <entry key="wms_v2:receipt_type">
349   - <value>
350   - <TableGenerateConfig>
351   - <option name="generatedKey" value="id" />
352   - <option name="javaModelName" value="ReceiptType" />
353   - <option name="moduleName" value="WMSV1" />
354   - <option name="useActualColumnName" value="true" />
355   - </TableGenerateConfig>
356   - </value>
357   - </entry>
358   - <entry key="wms_v2:send_mail">
359   - <value>
360   - <TableGenerateConfig>
361   - <option name="generatedKey" value="id" />
362   - <option name="javaModelName" value="SendMail" />
363   - <option name="moduleName" value="huaheng" />
364   - <option name="useActualColumnName" value="true" />
365   - </TableGenerateConfig>
366   - </value>
367   - </entry>
368   - <entry key="wms_v2:shipment_container_detail">
369   - <value>
370   - <TableGenerateConfig>
371   - <option name="generatedKey" value="id" />
372   - <option name="javaModelName" value="ShipmentContainerDetail" />
373   - <option name="moduleName" value="WMSV1" />
374   - <option name="useActualColumnName" value="true" />
375   - </TableGenerateConfig>
376   - </value>
377   - </entry>
378   - <entry key="wms_v2:shipment_container_header">
379   - <value>
380   - <TableGenerateConfig>
381   - <option name="generatedKey" value="id" />
382   - <option name="javaModelName" value="ShipmentContainerHeader" />
383   - <option name="moduleName" value="WMSV1" />
384   - <option name="useActualColumnName" value="true" />
385   - </TableGenerateConfig>
386   - </value>
387   - </entry>
388   - <entry key="wms_v2:shipment_detail">
389   - <value>
390   - <TableGenerateConfig>
391   - <option name="generatedKey" value="id" />
392   - <option name="javaModelName" value="ShipmentDetail" />
393   - <option name="moduleName" value="WMSV1" />
394   - <option name="useActualColumnName" value="true" />
395   - </TableGenerateConfig>
396   - </value>
397   - </entry>
398   - <entry key="wms_v2:shipment_header">
399   - <value>
400   - <TableGenerateConfig>
401   - <option name="generatedKey" value="id" />
402   - <option name="javaModelName" value="ShipmentHeader" />
403   - <option name="moduleName" value="huaheng" />
404   - <option name="useActualColumnName" value="true" />
405   - </TableGenerateConfig>
406   - </value>
407   - </entry>
408   - <entry key="wms_v2:shipment_preference">
409   - <value>
410   - <TableGenerateConfig>
411   - <option name="generatedKey" value="id" />
412   - <option name="javaModelName" value="ShipmentPreference" />
413   - <option name="moduleName" value="WMSV1" />
414   - <option name="useActualColumnName" value="true" />
415   - </TableGenerateConfig>
416   - </value>
417   - </entry>
418   - <entry key="wms_v2:shipment_type">
419   - <value>
420   - <TableGenerateConfig>
421   - <option name="generatedKey" value="id" />
422   - <option name="javaModelName" value="ShipmentType" />
423   - <option name="moduleName" value="WMSV1" />
424   - <option name="useActualColumnName" value="true" />
425   - </TableGenerateConfig>
426   - </value>
427   - </entry>
428   - <entry key="wms_v2:status_flow_detail">
429   - <value>
430   - <TableGenerateConfig>
431   - <option name="generatedKey" value="id" />
432   - <option name="javaModelName" value="StatusFlowDetail" />
433   - <option name="moduleName" value="huaheng" />
434   - <option name="useActualColumnName" value="true" />
435   - </TableGenerateConfig>
436   - </value>
437   - </entry>
438   - <entry key="wms_v2:status_flow_header">
439   - <value>
440   - <TableGenerateConfig>
441   - <option name="generatedKey" value="id" />
442   - <option name="javaModelName" value="StatusFlowHeader" />
443   - <option name="moduleName" value="huaheng" />
444   - <option name="useActualColumnName" value="true" />
445   - </TableGenerateConfig>
446   - </value>
447   - </entry>
448   - <entry key="wms_v2:supplier">
449   - <value>
450   - <TableGenerateConfig>
451   - <option name="generatedKey" value="id" />
452   - <option name="javaModelName" value="Supplier" />
453   - <option name="moduleName" value="WMSV1" />
454   - <option name="useActualColumnName" value="true" />
455   - </TableGenerateConfig>
456   - </value>
457   - </entry>
458   - <entry key="wms_v2:sys_user_warehouse">
459   - <value>
460   - <TableGenerateConfig>
461   - <option name="generatedKey" value="id" />
462   - <option name="javaModelName" value="SysUserWarehouse" />
463   - <option name="moduleName" value="huaheng" />
464   - <option name="useActualColumnName" value="true" />
465   - </TableGenerateConfig>
466   - </value>
467   - </entry>
468   - <entry key="wms_v2:task_detail">
469   - <value>
470   - <TableGenerateConfig>
471   - <option name="generatedKey" value="id" />
472   - <option name="javaModelName" value="TaskDetail" />
473   - <option name="moduleName" value="huaheng" />
474   - <option name="useActualColumnName" value="true" />
475   - </TableGenerateConfig>
476   - </value>
477   - </entry>
478   - <entry key="wms_v2:task_header">
479   - <value>
480   - <TableGenerateConfig>
481   - <option name="generatedKey" value="id" />
482   - <option name="javaModelName" value="TaskHeader" />
483   - <option name="moduleName" value="huaheng" />
484   - <option name="useActualColumnName" value="true" />
485   - </TableGenerateConfig>
486   - </value>
487   - </entry>
488   - <entry key="wms_v2:task_preference">
489   - <value>
490   - <TableGenerateConfig>
491   - <option name="generatedKey" value="id" />
492   - <option name="javaModelName" value="TaskPreference" />
493   - <option name="moduleName" value="huaheng" />
494   - <option name="useActualColumnName" value="true" />
495   - </TableGenerateConfig>
496   - </value>
497   - </entry>
498   - <entry key="wms_v2:warehouse_config">
499   - <value>
500   - <TableGenerateConfig>
501   - <option name="generatedKey" value="" />
502   - <option name="javaModelName" value="WarehouseConfig" />
503   - <option name="moduleName" value="huaheng" />
504   - <option name="useActualColumnName" value="true" />
505   - </TableGenerateConfig>
506   - </value>
507   - </entry>
508   - <entry key="wms_v2:wave">
509   - <value>
510   - <TableGenerateConfig>
511   - <option name="generatedKey" value="id" />
512   - <option name="javaModelName" value="Wave" />
513   - <option name="moduleName" value="huaheng" />
514   - <option name="useActualColumnName" value="true" />
515   - </TableGenerateConfig>
516   - </value>
517   - </entry>
518   - <entry key="wms_v2:wave_flow_detail">
519   - <value>
520   - <TableGenerateConfig>
521   - <option name="generatedKey" value="id" />
522   - <option name="javaModelName" value="WaveFlowDetail" />
523   - <option name="moduleName" value="huaheng" />
524   - <option name="useActualColumnName" value="true" />
525   - </TableGenerateConfig>
526   - </value>
527   - </entry>
528   - <entry key="wms_v2:wave_flow_header">
529   - <value>
530   - <TableGenerateConfig>
531   - <option name="generatedKey" value="id" />
532   - <option name="javaModelName" value="WaveFlowHeader" />
533   - <option name="moduleName" value="huaheng" />
534   - <option name="useActualColumnName" value="true" />
535   - </TableGenerateConfig>
536   - </value>
537   - </entry>
538   - <entry key="wms_v2:wave_master">
539   - <value>
540   - <TableGenerateConfig>
541   - <option name="generatedKey" value="id" />
542   - <option name="javaModelName" value="WaveMaster" />
543   - <option name="moduleName" value="huaheng" />
544   - <option name="useActualColumnName" value="true" />
545   - </TableGenerateConfig>
546   - </value>
547   - </entry>
548   - <entry key="wms_v2:zone_capacity">
549   - <value>
550   - <TableGenerateConfig>
551   - <option name="generatedKey" value="id" />
552   - <option name="javaModelName" value="ZoneCapacity" />
553   - <option name="moduleName" value="WMSV1" />
554   - <option name="useActualColumnName" value="true" />
555   - </TableGenerateConfig>
556   - </value>
557   - </entry>
558   - </map>
559   - </option>
560   - <option name="useActualColumnNames" value="true" />
561   - <option name="useLomBokOnModel" value="true" />
562   - <option name="useSwagger" value="true" />
563   - <option name="userMybatisPlus" value="true" />
564   - <option name="xmlMapperPackage" value="config" />
565   - <option name="xmlMapperPath" value="E:\code\wms2\src\main\resources\mybatis" />
566   - </ProjectProfile>
567   - </option>
568   - </component>
569   -</project>
570 0 \ No newline at end of file
.idea/dataSources.xml
1 1 <?xml version="1.0" encoding="UTF-8"?>
2 2 <project version="4">
3 3 <component name="DataSourceManagerImpl" format="xml" multifile-model="true">
4   - <data-source source="LOCAL" name="@172.16.29.45" uuid="5e014158-5749-424f-a74a-1c32e588e60f">
  4 + <data-source source="LOCAL" name="@localhost" uuid="6d5de702-a841-421b-9ba7-321e00f6c120">
5 5 <driver-ref>mysql.8</driver-ref>
6 6 <synchronize>true</synchronize>
7 7 <jdbc-driver>com.mysql.cj.jdbc.Driver</jdbc-driver>
8   - <jdbc-url>jdbc:mysql://172.16.29.45:3306</jdbc-url>
  8 + <jdbc-url>jdbc:mysql://localhost:3306</jdbc-url>
9 9 <driver-properties>
10 10 <property name="autoReconnect" value="true" />
11 11 <property name="zeroDateTimeBehavior" value="CONVERT_TO_NULL" />
... ... @@ -13,6 +13,7 @@
13 13 <property name="characterEncoding" value="utf8" />
14 14 <property name="characterSetResults" value="utf8" />
15 15 <property name="yearIsDateType" value="false" />
  16 + <property name="serverTimezone" value="UTC" />
16 17 </driver-properties>
17 18 </data-source>
18 19 </component>
... ...
.idea/encodings.xml
... ... @@ -2,7 +2,6 @@
2 2 <project version="4">
3 3 <component name="Encoding" native2AsciiForPropertiesFiles="true" defaultCharsetForPropertiesFiles="UTF-8">
4 4 <file url="file://$PROJECT_DIR$" charset="UTF-8" />
5   - <file url="file://$PROJECT_DIR$/src/main/resources/application.yml" charset="UTF-8" />
6 5 <file url="PROJECT" charset="UTF-8" />
7 6 </component>
8 7 </project>
9 8 \ No newline at end of file
... ...
.idea/misc.xml
1 1 <?xml version="1.0" encoding="UTF-8"?>
2 2 <project version="4">
3 3 <component name="ExternalStorageConfigurationManager" enabled="true" />
4   - <component name="JavaScriptSettings">
5   - <option name="languageLevel" value="ES6" />
6   - </component>
7 4 <component name="MavenProjectsManager">
8 5 <option name="originalFiles">
9 6 <list>
... ...
src/main/java/com/huaheng/pc/config/location/mapper/LocationMapper.java
... ... @@ -8,4 +8,5 @@ public interface LocationMapper extends BaseMapper&lt;Location&gt; {
8 8  
9 9 void updateStatus(@Param("warehouseCode") String warehouseCode, @Param("code") String code, @Param("status") String status);
10 10  
  11 + String position(String locatingRule);
11 12 }
12 13 \ No newline at end of file
... ...
src/main/java/com/huaheng/pc/config/location/service/LocationService.java
... ... @@ -8,4 +8,5 @@ public interface LocationService extends IService&lt;Location&gt;{
8 8  
9 9 void updateStatus(String locationCode, String status);
10 10  
  11 + String position(String locatingRule);
11 12 }
... ...
src/main/java/com/huaheng/pc/config/location/service/LocationServiceImpl.java
... ... @@ -104,4 +104,13 @@ public class LocationServiceImpl extends ServiceImpl&lt;LocationMapper, Location&gt; i
104 104 locationMapper.updateStatus(ShiroUtils.getWarehouseCode(), locationCode, status);
105 105 }
106 106 }
  107 +
  108 + /**
  109 + * 通过定位规则查找库位
  110 + * @param locatingRule
  111 + * @return
  112 + */
  113 + public String position(String locatingRule){
  114 + return locationMapper.position(locatingRule);
  115 + }
107 116 }
... ...
src/main/java/com/huaheng/pc/inventory/inventoryHeader/controller/InventoryHeaderController.java
... ... @@ -95,8 +95,8 @@ public class InventoryHeaderController extends BaseController
95 95 @PostMapping("/transfer")
96 96 @ResponseBody
97 97 public AjaxResult transfer(String sourceLocation, String destinationLocation){
98   -
99   - return inventoryHeaderService.transfer(sourceLocation,destinationLocation);
  98 + String companyCode="";
  99 + return inventoryHeaderService.transfer(sourceLocation,destinationLocation,companyCode);
100 100 }
101 101  
102 102 /**出库查看*/
... ...
src/main/java/com/huaheng/pc/receipt/receiptContainerDetail/service/ReceiptContainerDetailService.java
1 1 package com.huaheng.pc.receipt.receiptContainerDetail.service;
2 2  
  3 +import com.huaheng.framework.web.domain.AjaxResult;
3 4 import com.huaheng.pc.receipt.receiptContainerDetail.domain.ReceiptContainerDetail;
4 5 import com.baomidou.mybatisplus.extension.service.IService;
5   -public interface ReceiptContainerDetailService extends IService<ReceiptContainerDetail>{
6 6  
  7 +import java.util.List;
  8 +import java.util.Map;
  9 +
  10 +public interface ReceiptContainerDetailService extends IService<ReceiptContainerDetail>{
7 11  
  12 + AjaxResult<List<Map<String, Object>>> getReceiptInfoByBill(String receiptCode);
8 13 }
... ...
src/main/java/com/huaheng/pc/receipt/receiptContainerDetail/service/ReceiptContainerDetailServiceImpl.java
1 1 package com.huaheng.pc.receipt.receiptContainerDetail.service;
2 2  
3   -import org.springframework.stereotype.Service;
4   -import javax.annotation.Resource;
5   -import java.util.List;
  3 +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
  4 +import com.baomidou.mybatisplus.core.toolkit.Wrappers;
6 5 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
  6 +import com.huaheng.common.utils.security.ShiroUtils;
  7 +import com.huaheng.framework.web.domain.AjaxResult;
7 8 import com.huaheng.pc.receipt.receiptContainerDetail.domain.ReceiptContainerDetail;
8 9 import com.huaheng.pc.receipt.receiptContainerDetail.mapper.ReceiptContainerDetailMapper;
9   -import com.huaheng.pc.receipt.receiptContainerDetail.service.ReceiptContainerDetailService;
  10 +import org.springframework.stereotype.Service;
  11 +
  12 +import java.util.List;
  13 +import java.util.Map;
10 14 @Service
11 15 public class ReceiptContainerDetailServiceImpl extends ServiceImpl<ReceiptContainerDetailMapper, ReceiptContainerDetail> implements ReceiptContainerDetailService{
12 16  
  17 + @Override
  18 + public AjaxResult<List<Map<String, Object>>> getReceiptInfoByBill(String receiptCode) {
  19 + LambdaQueryWrapper<ReceiptContainerDetail> lambdaQueryWrapper = Wrappers.lambdaQuery();
  20 + lambdaQueryWrapper.eq(ReceiptContainerDetail::getReceiptCode, receiptCode)
  21 + .eq(ReceiptContainerDetail::getWarehouseCode, ShiroUtils.getWarehouseCode());
  22 +
  23 + List<Map<String, Object>> detail = this.listMaps(lambdaQueryWrapper);
  24 + return AjaxResult.success(detail);
  25 + }
  26 +
  27 +
13 28 }
... ...
src/main/java/com/huaheng/pc/receipt/receiptContainerHeader/service/ReceiptContainerHeaderService.java
1 1 package com.huaheng.pc.receipt.receiptContainerHeader.service;
2 2  
  3 +import com.huaheng.framework.web.domain.AjaxResult;
3 4 import com.huaheng.pc.receipt.receiptContainerHeader.domain.ReceiptContainerHeader;
4 5 import com.baomidou.mybatisplus.extension.service.IService;
5 6 public interface ReceiptContainerHeaderService extends IService<ReceiptContainerHeader>{
6 7  
7   -
  8 + /**
  9 + * 保存入库组盘
  10 + * @param receiptCode 入库单编码
  11 + * @param containerCode 容器编码
  12 + * @param receiptDetailId 入库单详情id
  13 + * @param taskType 任务类型
  14 + * @param locationCode 库位编码
  15 + * @param qty 收货数量
  16 + * @param locatingRule 定位规则
  17 + * @return 是否保存成功
  18 + */
  19 + AjaxResult saveCountain(String receiptCode, String containerCode, Integer receiptDetailId, Integer taskType,
  20 + String locationCode, Integer qty, String locatingRule);
8 21 }
... ...
src/main/java/com/huaheng/pc/receipt/receiptContainerHeader/service/ReceiptContainerHeaderServiceImpl.java
1 1 package com.huaheng.pc.receipt.receiptContainerHeader.service;
2 2  
3   -import org.springframework.stereotype.Service;
4   -import javax.annotation.Resource;
5   -import java.util.List;
  3 +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
  4 +import com.baomidou.mybatisplus.core.toolkit.StringUtils;
  5 +import com.baomidou.mybatisplus.core.toolkit.Wrappers;
6 6 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
  7 +import com.huaheng.common.exception.service.ServiceException;
  8 +import com.huaheng.common.utils.security.ShiroUtils;
  9 +import com.huaheng.framework.web.domain.AjaxResult;
  10 +import com.huaheng.pc.config.container.domain.Container;
  11 +import com.huaheng.pc.config.container.domain.ContainerStatus;
  12 +import com.huaheng.pc.config.container.service.ContainerService;
  13 +import com.huaheng.pc.config.location.domain.Location;
  14 +import com.huaheng.pc.config.location.service.LocationService;
  15 +import com.huaheng.pc.config.material.domain.Material;
  16 +import com.huaheng.pc.config.material.service.MaterialService;
  17 +import com.huaheng.pc.receipt.receiptContainerDetail.domain.ReceiptContainerDetail;
  18 +import com.huaheng.pc.receipt.receiptContainerDetail.service.ReceiptContainerDetailService;
7 19 import com.huaheng.pc.receipt.receiptContainerHeader.domain.ReceiptContainerHeader;
8 20 import com.huaheng.pc.receipt.receiptContainerHeader.mapper.ReceiptContainerHeaderMapper;
9   -import com.huaheng.pc.receipt.receiptContainerHeader.service.ReceiptContainerHeaderService;
  21 +import com.huaheng.pc.receipt.receiptDetail.domain.ReceiptDetail;
  22 +import com.huaheng.pc.receipt.receiptDetail.service.ReceiptDetailService;
  23 +import com.huaheng.pc.receipt.receiptHeader.domain.ReceiptHeader;
  24 +import com.huaheng.pc.receipt.receiptHeader.service.ReceiptHeaderService;
  25 +import com.huaheng.pc.task.taskHeader.domain.TaskHeader;
  26 +import com.huaheng.pc.task.taskHeader.service.TaskHeaderService;
  27 +import io.swagger.models.auth.In;
  28 +import org.springframework.stereotype.Service;
  29 +import org.springframework.transaction.annotation.Transactional;
  30 +
  31 +import javax.annotation.Resource;
  32 +import java.util.List;
10 33 @Service
11 34 public class ReceiptContainerHeaderServiceImpl extends ServiceImpl<ReceiptContainerHeaderMapper, ReceiptContainerHeader> implements ReceiptContainerHeaderService{
12 35  
  36 + @Resource
  37 + private TaskHeaderService taskHeaderService;
  38 + @Resource
  39 + private LocationService locationService;
  40 + @Resource
  41 + private ReceiptDetailService receiptDetailService;
  42 + @Resource
  43 + private ReceiptContainerDetailService receiptContainerDetailService;
  44 + @Resource
  45 + private MaterialService materialService;
  46 + @Resource
  47 + private ContainerService containerService;
  48 + @Resource
  49 + private ReceiptHeaderService receiptHeaderService;
  50 +
  51 + /**
  52 + * 保存入库组盘
  53 + * @param receiptCode 入库单编码
  54 + * @param containerCode 容器编码
  55 + * @param receiptDetailId 入库单详情id
  56 + * @param taskType 任务类型
  57 + * @param locationCode 库位编码
  58 + * @param qty 收货数量
  59 + * @param locatingRule 定位规则
  60 + * @return 是否保存成功
  61 + */
  62 + @Override
  63 + @Transactional
  64 + public AjaxResult saveCountain(String receiptCode, String containerCode, Integer receiptDetailId, Integer taskType,
  65 + String locationCode, Integer qty, String locatingRule) {
  66 + //检查容器编码合法性
  67 + checkContainer(containerCode);
  68 +
  69 + //检查库位编码合法性
  70 + if (checkLocationCode(locationCode, containerCode, taskType) == true) {
  71 + locationService.updateStatus(locationCode, "lock");
  72 + }
  73 +
  74 + /* 新建保存组盘头表记录*/
  75 + //根据容器编码查询组盘表头记录
  76 + LambdaQueryWrapper<ReceiptContainerHeader> lambda = Wrappers.lambdaQuery();
  77 + lambda.eq(ReceiptContainerHeader::getContainerCode, containerCode);
  78 + List<ReceiptContainerHeader> list = this.list(lambda);
  79 +
  80 + ReceiptContainerHeader receiptContainerHeader = new ReceiptContainerHeader();
  81 + //如果不存在记录则新建记录
  82 + if (list.size() < 1){
  83 + ReceiptDetail receiptDetail = receiptDetailService.getById(receiptDetailId);
  84 +
  85 + receiptContainerHeader.setWarehouseCode(ShiroUtils.getWarehouseCode());
  86 + receiptContainerHeader.setCompanyCode(receiptDetail.getCompanyCode());
  87 + receiptContainerHeader.setContainerCode(containerCode);
  88 + receiptContainerHeader.setTaskType(String.valueOf(taskType));
  89 + receiptContainerHeader.setProjectNo(receiptDetail.getProjectNo());
  90 + receiptContainerHeader.setToLocation(locationCode);
  91 + receiptContainerHeader.setCreatedBy(ShiroUtils.getLoginName());
  92 + receiptContainerHeader.setLastUpdatedBy(ShiroUtils.getLoginName());
  93 +
  94 + if (!this.save(receiptContainerHeader)){
  95 + throw new ServiceException("入库组盘头表保存失败");
  96 + }
  97 + } else {
  98 + receiptContainerHeader = list.get(0);
  99 + if (receiptContainerHeader.getStatus() > 9){
  100 + throw new ServiceException("容器已经生成任务,不能放物料了!");
  101 + }
  102 + }
  103 + List<ReceiptContainerHeader> receiptContainerHeaders = this.list(lambda);
  104 + /* 更新入库单详情的收货数量*/
  105 + //根据入库单详情id查询入库详情
  106 + ReceiptDetail receiptDetail = receiptDetailService.getById(receiptDetailId);
  107 + receiptDetail.setId(receiptDetailId);
  108 + receiptDetail.setOpenQty(qty+receiptDetail.getOpenQty());
  109 + //更新入库单详情的收货数量
  110 + if (!receiptDetailService.updateById(receiptDetail)){
  111 + throw new ServiceException("更新入库单详情失败");
  112 + }
  113 +
  114 + receiptDetail = receiptDetailService.getById(receiptDetailId);
  115 +
  116 + receiptContainerDetailAdd(receiptContainerHeaders.get(0).getId(), receiptDetail, qty, containerCode);
  117 + //更新入库详情状态和入库单状态
  118 + ReceiptDetail receiptDetail1 = receiptDetailService.queryflow(receiptDetail);
  119 + if (!receiptDetailService.updateById(receiptDetail1)){
  120 + throw new ServiceException("更新入库详情下一流程失败");
  121 + }
  122 + receiptDetailService.updateReceiptHeaderLastStatus(receiptDetail.getReceiptId());
  123 + return AjaxResult.success("success");
  124 + }
  125 +
  126 + /**
  127 + * 检查容器编码合法性
  128 + * @param containerCode
  129 + * @return
  130 + */
  131 + @Transactional
  132 + public AjaxResult checkContainer(String containerCode) {
  133 +
  134 + if (StringUtils.isEmpty(containerCode))
  135 + throw new ServiceException("容器不能为空");
  136 +
  137 + //检查该容器编码是否已存任务
  138 + LambdaQueryWrapper<TaskHeader> lambdaQueryWrapper = Wrappers.lambdaQuery();
  139 + lambdaQueryWrapper.eq(TaskHeader::getContainerCode, containerCode)
  140 + .lt(TaskHeader::getStatus, 100)
  141 + .eq(TaskHeader::getWarehouseCode, ShiroUtils.getWarehouseCode());
  142 + if (taskHeaderService.count(lambdaQueryWrapper) > 0)
  143 + throw new ServiceException("容器已经存在任务,请更换容器");
  144 + return AjaxResult.success("");
  145 + }
  146 +
  147 + /**
  148 + * 检查库位是否合法
  149 + * @param locationCode 库位编码
  150 + * @param containerCode 容器编码
  151 + * @param taskType 任务类型
  152 + * @return
  153 + */
  154 + @Transactional
  155 + Boolean checkLocationCode(String locationCode, String containerCode, Integer taskType) {
  156 + //如果选了库位,就要校验库位和已经组盘的库位是否一致,避免重入库
  157 + if (StringUtils.isEmpty(locationCode)) {
  158 + if ("200".equals(locationCode))
  159 + throw new ServiceException("补充入库,必须填写库位");
  160 + else
  161 + return true;
  162 + }
  163 +
  164 + //查询组盘头表
  165 + LambdaQueryWrapper<ReceiptContainerHeader> lambda = Wrappers.lambdaQuery();
  166 + lambda.eq(ReceiptContainerHeader::getContainerCode, containerCode)
  167 + .eq(ReceiptContainerHeader::getTaskType, taskType)
  168 + .eq(ReceiptContainerHeader::getStatus, 0)
  169 + .last("Limit 1");
  170 + ReceiptContainerHeader receiptContainerHeader = this.getOne(lambda);
  171 +
  172 + if (receiptContainerHeader != null) {
  173 + if (receiptContainerHeader.getToLocation().equals(locationCode))
  174 + return true;
  175 + else
  176 + throw new ServiceException("容器(" + containerCode + ")对应的库位是:" + receiptContainerHeader.getToLocation());
  177 + }
  178 +
  179 + LambdaQueryWrapper<Location> lambdaLocation = Wrappers.lambdaQuery();
  180 + lambdaLocation.eq(Location::getWarehouseCode, ShiroUtils.getWarehouseCode())
  181 + .eq(Location::getDeleted, false)
  182 + .eq(Location::getCode, locationCode);
  183 + Location location = locationService.getOne(lambdaLocation);
  184 + if (location == null)
  185 + throw new ServiceException("库位不存在!");
  186 + if (location.getStatus().equals("empty") == false)
  187 + throw new ServiceException("库位不是空闲状态!");
  188 + if ("100".equals(taskType)) {
  189 + if (com.huaheng.common.utils.StringUtils.isNotEmpty(location.getContainerCode()))
  190 + throw new ServiceException("库位(" + containerCode + ")有容器(" + location.getContainerCode() + "),不能整盘入库!");
  191 + }
  192 + if("200".equals(taskType)) {
  193 + if (com.huaheng.common.utils.StringUtils.isEmpty(location.getContainerCode()))
  194 + throw new ServiceException("库位(" + locationCode + ")没有容器,不能补充入库!");
  195 + else
  196 + if (location.getContainerCode().equals(containerCode) == false)
  197 + throw new ServiceException("库位(" + containerCode + ")对应的容器是:" + location.getContainerCode()+ ",请重选库位!");
  198 + }
  199 +
  200 + LambdaQueryWrapper<Location> lambdaQueryWrapper = Wrappers.lambdaQuery();
  201 + lambdaQueryWrapper.eq(Location::getStatus, "empty")
  202 + .ne(Location::getContainerCode, "")
  203 + .eq(Location::getIColumn, location.getIColumn())
  204 + .eq(Location::getILayer, location.getILayer())
  205 + .gt(Location::getIRow, location.getIRow())
  206 + .lt(Location::getIRow, location.getIRow());
  207 + int frontCount = locationService.count(lambdaQueryWrapper);
  208 +
  209 + if (frontCount > 0) {
  210 + throw new ServiceException("库位前面有货物挡住,不能入库");
  211 + }
  212 + return true;
  213 + }
  214 +
  215 + /**
  216 + * 增加组盘明细记录
  217 + * @param receiptContainerHeaderId 入库组盘头表id
  218 + * @param receiptDetail 入库详情
  219 + * @param qty 收货数量
  220 + * @param containerCode 容器编码
  221 + */
  222 + @Transactional
  223 + public void receiptContainerDetailAdd(Integer receiptContainerHeaderId, ReceiptDetail receiptDetail, Integer qty, String containerCode){
  224 + LambdaQueryWrapper<ReceiptContainerDetail> lambda = Wrappers.lambdaQuery();
  225 + lambda.eq(ReceiptContainerDetail::getReceiptContainerId, receiptContainerHeaderId)
  226 + .eq(ReceiptContainerDetail::getReceiptId, receiptDetail.getReceiptId())
  227 + .eq(ReceiptContainerDetail::getReceiptDetailId, receiptDetail.getId())
  228 + .last("Limit 1");
  229 + ReceiptContainerDetail receiptContainerDetail = receiptContainerDetailService.getOne(lambda);
  230 +
  231 + if (receiptContainerDetail == null){
  232 + //查询入库头表
  233 + LambdaQueryWrapper<ReceiptHeader> receiptHeaderLambda = Wrappers.lambdaQuery();
  234 + receiptHeaderLambda.eq(ReceiptHeader::getId, receiptDetail.getReceiptId())
  235 + .eq(ReceiptHeader::getCode, receiptDetail.getReceiptCode());
  236 + ReceiptHeader receiptHeader = receiptHeaderService.getOne(receiptHeaderLambda);
  237 +
  238 + //查询容器
  239 + LambdaQueryWrapper<Container> containerLambda = Wrappers.lambdaQuery();
  240 + containerLambda.eq(Container::getCode, containerCode);
  241 + Container container = containerService.getOne(containerLambda);
  242 +
  243 + receiptContainerDetail = new ReceiptContainerDetail();
  244 + receiptContainerDetail.setReceiptContainerId(receiptContainerHeaderId);
  245 + receiptContainerDetail.setWarehouseCode(ShiroUtils.getWarehouseCode());
  246 + receiptContainerDetail.setReceiptId(receiptDetail.getReceiptId());
  247 + receiptContainerDetail.setReceiptDetailId(receiptDetail.getId());
  248 + receiptContainerDetail.setReceiptCode(receiptDetail.getReceiptCode());
  249 + receiptContainerDetail.setReceiptType(receiptHeader.getReceiptType());
  250 + receiptContainerDetail.setContainerCode(container.getCode());
  251 + receiptContainerDetail.setContainerType(container.getContainerType());
  252 + receiptContainerDetail.setCompanyCode(receiptDetail.getCompanyCode());
  253 + receiptContainerDetail.setMaterialCode(receiptDetail.getMaterialCode());
  254 + receiptContainerDetail.setMaterialName(receiptDetail.getMaterialName());
  255 + receiptContainerDetail.setMaterialSpec(receiptDetail.getMaterialSpec());
  256 + receiptContainerDetail.setMaterialUnit(receiptDetail.getMaterialUnit());
  257 + receiptContainerDetail.setQty(qty);
  258 + receiptContainerDetail.setSupplierCode(receiptDetail.getSupplierCode());
  259 + receiptContainerDetail.setBatch(receiptDetail.getBatch());
  260 + receiptContainerDetail.setLot(receiptDetail.getLot());
  261 + receiptContainerDetail.setProjectNo(receiptDetail.getProjectNo());
  262 + receiptContainerDetail.setManufactureDate(receiptDetail.getManufactureDate());
  263 + receiptContainerDetail.setExpirationDate(receiptDetail.getExpirationDate());
  264 + receiptContainerDetail.setAgingDate(receiptDetail.getAgingDate());
  265 + receiptContainerDetail.setInventorySts(receiptDetail.getInventorySts());
  266 + receiptContainerDetail.setCreatedBy(ShiroUtils.getLoginName());
  267 + receiptContainerDetail.setLastUpdatedBy(ShiroUtils.getLoginName());
  268 + if (!receiptContainerDetailService.save(receiptContainerDetail)){
  269 + throw new ServiceException("保存入库组盘详情失败");
  270 + }
  271 + } else {
  272 + receiptContainerDetail.setQty(receiptContainerDetail.getQty()+qty);
  273 + if (!receiptContainerDetailService.updateById(receiptContainerDetail)){
  274 + throw new ServiceException("更新入库组盘详情失败");
  275 + }
  276 + }
  277 + }
13 278 }
... ...
src/main/java/com/huaheng/pc/receipt/receiptHeader/controller/ReceiptHeaderController.java
... ... @@ -219,4 +219,11 @@ public class ReceiptHeaderController extends BaseController {
219 219 public AjaxResult reservation(ReceiptHeader receiptHeader) {
220 220 return receiptHeaderService.reservation(receiptHeader);
221 221 }
  222 +
  223 + @RequiresPermissions("receipt:receiptHeader:view")
  224 + @GetMapping("/receiving")
  225 + public String receiving()
  226 + {
  227 + return prefix + "/receiving";
  228 + }
222 229 }
... ...
src/main/java/com/huaheng/pc/receipt/receiptHeader/service/ReceiptHeaderService.java
... ... @@ -116,7 +116,7 @@ public class ReceiptHeaderService extends ServiceImpl&lt;ReceiptHeaderMapper, Recei
116 116 for (ReceiptDetail receiptDetail : receiptDetails) {
117 117 receiptDetailService.queryflow(receiptDetail);
118 118 }
119   - //更新入库单
  119 + //更新入库单头表
120 120 receiptDetailService.updateReceiptHeaderLastStatus(id);
121 121 return AjaxResult.success("预约成功");
122 122 }
... ...
src/main/java/com/huaheng/pc/receipt/receiving/controller/ReceivingController.java 0 → 100644
  1 +package com.huaheng.pc.receipt.receiving.controller;
  2 +
  3 +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
  4 +import com.baomidou.mybatisplus.core.toolkit.Wrappers;
  5 +import com.huaheng.common.utils.security.ShiroUtils;
  6 +import com.huaheng.framework.aspectj.lang.annotation.Log;
  7 +import com.huaheng.framework.aspectj.lang.constant.BusinessType;
  8 +import com.huaheng.framework.web.controller.BaseController;
  9 +import com.huaheng.framework.web.domain.AjaxResult;
  10 +import com.huaheng.pc.receipt.receiptContainerDetail.service.ReceiptContainerDetailService;
  11 +import com.huaheng.pc.receipt.receiptContainerHeader.service.ReceiptContainerHeaderService;
  12 +import com.huaheng.pc.receipt.receiving.service.ReceivingService;
  13 +import com.huaheng.pc.task.taskHeader.domain.TaskHeader;
  14 +import com.huaheng.pc.task.taskHeader.service.TaskHeaderService;
  15 +import io.swagger.annotations.ApiOperation;
  16 +import io.swagger.annotations.ApiParam;
  17 +import org.apache.shiro.authz.annotation.RequiresPermissions;
  18 +import org.springframework.stereotype.Controller;
  19 +import org.springframework.web.bind.annotation.GetMapping;
  20 +import org.springframework.web.bind.annotation.PostMapping;
  21 +import org.springframework.web.bind.annotation.RequestMapping;
  22 +import org.springframework.web.bind.annotation.ResponseBody;
  23 +
  24 +import javax.annotation.Resource;
  25 +
  26 +/**
  27 + * @author mahua
  28 + * @ClassName ReceivingController
  29 + * @projectName huaheng
  30 + * @description: 入库组盘
  31 + * @date 2019/8/31 15:51
  32 + */
  33 +@Controller
  34 +@RequestMapping("/receipt/receiving")
  35 +public class ReceivingController extends BaseController {
  36 +
  37 + private String prefix = "receipt/receiving";
  38 +
  39 + @Resource
  40 + private ReceivingService receivingService;
  41 + @Resource
  42 + private ReceiptContainerDetailService receiptContainerDetailService;
  43 + @Resource
  44 + private TaskHeaderService taskHeaderService;
  45 + @Resource
  46 + private ReceiptContainerHeaderService receiptContainerHeaderService;
  47 +
  48 + @RequiresPermissions("receipt:receiving:view")
  49 + @GetMapping()
  50 + public String receiving() {
  51 + return prefix + "/receiving";
  52 + }
  53 +
  54 + /**
  55 + * 获取订单明细
  56 + */
  57 + @ResponseBody
  58 + @PostMapping("/scanBill")
  59 + @RequiresPermissions("receipt:receiving:receiving")
  60 + @Log(title = "入库-获取订单明细", operating ="PC端扫描收货单号", action = BusinessType.OTHER)
  61 + public AjaxResult scanBill(String code) {
  62 + AjaxResult result = receivingService.scanReceiptCode(code);
  63 + return result;
  64 + }
  65 +
  66 + /**
  67 + * 获取收货信息
  68 + */
  69 + @ResponseBody
  70 + @PostMapping("/getReceiptInfoByBill")
  71 + @RequiresPermissions("receipt:receiving:receiving")
  72 + @Log(title = "入库-获取收货信息", operating ="获取收货信息", action = BusinessType.OTHER)
  73 + public AjaxResult getReceiptInfoByBill(String code) {
  74 + AjaxResult result = receiptContainerDetailService.getReceiptInfoByBill(code);
  75 + return result;
  76 + }
  77 +
  78 +
  79 + @GetMapping("/add")
  80 + public String add() {
  81 + return prefix + "/add";
  82 + }
  83 +
  84 + /**
  85 + * 保存收货
  86 + */
  87 + @ApiOperation(value="保存收货 ", notes="保存收货 ", httpMethod = "POST")
  88 + @ResponseBody
  89 + @PostMapping("/save")
  90 + @RequiresPermissions("receipt:receiving:receiving")
  91 + @Log(title = "入库-保存收货", operating ="PC端保存收货", action = BusinessType.OTHER)
  92 + public AjaxResult save(
  93 + @ApiParam(name="receiptCode",value="入库单编码") String receiptCode,
  94 + @ApiParam(name="containerCode",value="容器编码")String containerCode,
  95 + @ApiParam(name="receiptDetailId",value="入库单详情id")Integer receiptDetailId,
  96 + @ApiParam(name="receiptDetail",value="任务类型")Integer taskType,
  97 + @ApiParam(name="locationCode",value="库位编码", required = false)String locationCode,
  98 + @ApiParam(name="qty",value="收货数量")Integer qty,
  99 + @ApiParam(name="localtionRule",value="定位规则", required = false)String locatingRule){
  100 + LambdaQueryWrapper<TaskHeader> lambdaQueryWrapper = Wrappers.lambdaQuery();
  101 + lambdaQueryWrapper.eq(TaskHeader::getTaskType, 900)
  102 + .lt(TaskHeader::getStatus, 100)
  103 + .eq(TaskHeader::getWarehouseCode, ShiroUtils.getWarehouseCode());
  104 + int count = taskHeaderService.count(lambdaQueryWrapper);
  105 + if (count > 0) {
  106 + return AjaxResult.error("仓库有“出库查看”任务没有完成,请先完成任务");
  107 + }
  108 + AjaxResult result = receiptContainerHeaderService.saveCountain(receiptCode, containerCode, receiptDetailId,
  109 + taskType, locationCode, qty, locatingRule);
  110 + return result;
  111 + }
  112 +}
... ...
src/main/java/com/huaheng/pc/receipt/receiving/service/ReceivingService.java 0 → 100644
  1 +package com.huaheng.pc.receipt.receiving.service;
  2 +
  3 +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
  4 +import com.baomidou.mybatisplus.core.toolkit.Wrappers;
  5 +import com.huaheng.common.exception.service.ServiceException;
  6 +import com.huaheng.common.utils.StringUtils;
  7 +import com.huaheng.common.utils.security.ShiroUtils;
  8 +import com.huaheng.framework.web.domain.AjaxResult;
  9 +import com.huaheng.pc.config.configValue.domain.ConfigValue;
  10 +import com.huaheng.pc.config.configValue.service.ConfigValueService;
  11 +import com.huaheng.pc.config.location.service.LocationService;
  12 +import com.huaheng.pc.config.material.domain.Material;
  13 +import com.huaheng.pc.config.material.service.MaterialService;
  14 +import com.huaheng.pc.config.materialType.domain.MaterialType;
  15 +import com.huaheng.pc.config.materialType.service.MaterialTypeService;
  16 +import com.huaheng.pc.config.receiptPreference.service.ReceiptPreferenceService;
  17 +import com.huaheng.pc.receipt.receiptContainerDetail.domain.ReceiptContainerDetail;
  18 +import com.huaheng.pc.receipt.receiptContainerHeader.domain.ReceiptContainerHeader;
  19 +import com.huaheng.pc.receipt.receiptContainerHeader.service.ReceiptContainerHeaderService;
  20 +import com.huaheng.pc.receipt.receiptDetail.domain.ReceiptDetail;
  21 +import com.huaheng.pc.receipt.receiptDetail.service.ReceiptDetailService;
  22 +import org.springframework.stereotype.Service;
  23 +import org.springframework.transaction.annotation.Transactional;
  24 +
  25 +import javax.annotation.Resource;
  26 +import java.util.List;
  27 +
  28 +/**
  29 + * @author mahua
  30 + * @ClassName ReceivingService
  31 + * @projectName huaheng
  32 + * @description: TODO
  33 + * @date 2019/8/3123:09
  34 + */
  35 +@Service
  36 +public class ReceivingService {
  37 +
  38 + @Resource
  39 + private ReceiptDetailService receiptDetailService;
  40 + @Resource
  41 + private ReceiptContainerHeaderService receiptContainerHeaderService;
  42 + @Resource
  43 + private LocationService locationService;
  44 + @Resource
  45 + private MaterialService materialService;
  46 + @Resource
  47 + private MaterialTypeService materialTypeService;
  48 + @Resource
  49 + private ConfigValueService configValueService;
  50 + @Resource
  51 + private ReceiptPreferenceService preferenceService;
  52 +
  53 + /**
  54 + * 获取当前单号详情
  55 + * @param receiptCode 入库单号
  56 + * @return 入库单详情
  57 + */
  58 + @Transactional
  59 + public AjaxResult<List<ReceiptDetail>> scanReceiptCode(String receiptCode) {
  60 + //根据仓库编码和入库单号查询入库单详情
  61 + LambdaQueryWrapper<ReceiptDetail> lambda = new LambdaQueryWrapper<>();
  62 + lambda.eq(ReceiptDetail::getReceiptCode, receiptCode)
  63 + .eq(ReceiptDetail::getWarehouseCode, ShiroUtils.getWarehouseCode());
  64 +
  65 + List<ReceiptDetail> detail = receiptDetailService.list(lambda);
  66 + return AjaxResult.success(detail);
  67 + }
  68 +
  69 + /**
  70 + * 定位
  71 + * @return
  72 + */
  73 + @Transactional
  74 + public Boolean position(ReceiptContainerDetail receiptContainerDetail){
  75 + ReceiptContainerHeader receiptContainerHeader = receiptContainerHeaderService.getById(receiptContainerDetail.getReceiptContainerId());
  76 +
  77 + //如果入库组盘表中有目标库位说名已经指定
  78 + if (receiptContainerHeader.getToLocation() != null){return true;}
  79 + String locatingRule = receiptContainerHeader.getLocatingRule(); //定位规则
  80 + if (StringUtils.isNotEmpty(locatingRule)){
  81 + //入库组盘头表中定位规则不为空时执行
  82 + } else if ((locatingRule = receiptDetailService.getById(receiptContainerDetail.getReceiptDetailId()).getLocatingRule()) != null ){
  83 + //入库单明细定位规则不为空时执行
  84 + } else {
  85 + //入库单明细为空时,查询物料表中是否含有定位规则
  86 + LambdaQueryWrapper<Material> materialLambda = Wrappers.lambdaQuery();
  87 + materialLambda.eq(Material::getCode, receiptContainerDetail.getMaterialCode());
  88 + Material material = materialService.getOne(materialLambda);
  89 + locatingRule = material.getLocatingRule();
  90 + if (locatingRule == null){
  91 + //物料表中定位规则为空时,查询物料类别
  92 + LambdaQueryWrapper<MaterialType> materialTypeLambda = Wrappers.lambdaQuery();
  93 + materialTypeLambda.eq(MaterialType::getCode, material.getType());
  94 + MaterialType materialType = materialTypeService.getOne(materialTypeLambda);
  95 + locatingRule = materialType.getLocatingRule();
  96 + if (locatingRule == null){
  97 + //物料类别中定位规则为空时,查询入库首选项
  98 + LambdaQueryWrapper<ConfigValue> configValueLambda = Wrappers.lambdaQuery();
  99 + configValueLambda.eq(ConfigValue::getWarehouseCode, ShiroUtils.getWarehouseCode())
  100 + .eq(ConfigValue::getModuleType, "入库")
  101 + .eq(ConfigValue::getRecordType, "入库首选项");
  102 + ConfigValue configValue = configValueService.getOne(configValueLambda);
  103 + locatingRule = preferenceService.getById(configValue.getId()).getLocationRule();
  104 + }
  105 + }
  106 + }
  107 + //根据定位规则查询库位编码
  108 + String locationCode = locationService.position(locatingRule);
  109 + receiptContainerHeader.setToLocation(locationCode);
  110 +
  111 + if (!receiptContainerHeaderService.updateById(receiptContainerHeader)){
  112 + throw new ServiceException("更新库位失败");
  113 + }
  114 +
  115 + ReceiptDetail receiptDetail = receiptDetailService.queryflow(receiptDetailService.getById(receiptContainerDetail.getReceiptDetailId()));
  116 + //更新入库单详情状态
  117 + if (!receiptDetailService.updateById(receiptDetail)){ throw new ServiceException("更新入库单详情失败");}
  118 + //更新入库单头尾状态
  119 + receiptDetailService.updateReceiptHeaderLastStatus(receiptDetail.getReceiptId());
  120 +
  121 + return true;
  122 + }
  123 +}
... ...
src/main/java/com/huaheng/pc/task/taskHeader/service/TaskHeaderServiceImpl.java
... ... @@ -19,7 +19,6 @@ import com.huaheng.pc.inventory.inventoryTransaction.domain.InventoryTransaction
19 19 import com.huaheng.pc.inventory.inventoryTransaction.service.InventoryTransactionService;
20 20 import com.huaheng.pc.receipt.receiptContainerDetail.domain.ReceiptContainerDetail;
21 21 import com.huaheng.pc.receipt.receiptContainerDetail.service.ReceiptContainerDetailService;
22   -import com.huaheng.pc.receipt.receiptContainerHeader.domain.ReceiptContainerHeader;
23 22 import com.huaheng.pc.receipt.receiptHeader.domain.ReceiptHeader;
24 23 import com.huaheng.pc.receipt.receiptHeader.service.ReceiptHeaderService;
25 24 import com.huaheng.pc.shipment.shipmentContainerDetail.domain.ShipmentContainerDetail;
... ... @@ -28,11 +27,11 @@ import com.huaheng.pc.shipment.shipmentContainerHeader.domain.ShipmentContainerH
28 27 import com.huaheng.pc.shipment.shipmentContainerHeader.service.ShipmentContainerHeaderService;
29 28 import com.huaheng.pc.shipment.shipmentHeader.domain.ShipmentHeader;
30 29 import com.huaheng.pc.task.taskDetail.domain.TaskDetail;
31   -import com.huaheng.pc.task.taskDetail.mapper.TaskDetailMapper;
32 30 import com.huaheng.pc.task.taskDetail.service.TaskDetailService;
33 31 import com.huaheng.pc.task.taskHeader.domain.ShipmentTaskCreateModel;
34 32 import com.sun.jmx.snmp.tasks.Task;
35 33 import org.apache.poi.ss.formula.functions.T;
  34 +
36 35 import org.springframework.beans.factory.annotation.Autowired;
37 36 import org.springframework.stereotype.Service;
38 37 import java.math.BigDecimal;
... ... @@ -40,11 +39,9 @@ import java.util.ArrayList;
40 39 import java.util.Date;
41 40 import java.util.List;
42 41 import java.util.Map;
43   -
44 42 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
45 43 import com.huaheng.pc.task.taskHeader.domain.TaskHeader;
46 44 import com.huaheng.pc.task.taskHeader.mapper.TaskHeaderMapper;
47   -import com.huaheng.pc.task.taskHeader.service.TaskHeaderService;
48 45 import org.springframework.transaction.annotation.Transactional;
49 46  
50 47 import javax.annotation.Resource;
... ...
src/main/resources/mybatis/config/LocationMapper.xml
... ... @@ -42,4 +42,7 @@
42 42 <update id="updateStatus">
43 43 UPDATE location set `status`=#{status} WHERE warehouseCode=#{warehouseCode} AND `code`=#{code}
44 44 </update>
  45 + <select id="position" resultType="java.lang.String">
  46 + select location.code from location where #{locatingRule}
  47 + </select>
45 48 </mapper>
46 49 \ No newline at end of file
... ...
src/main/resources/templates/config/filterConfigDetail/add.html
... ... @@ -39,19 +39,35 @@
39 39 <div class="form-group">
40 40 <label class="col-sm-3 control-label">全SQL:</label>
41 41 <div class="col-sm-8">
42   - <input id="statement" name="statement" class="description" type="text">
  42 + <input id="statement" name="statement" class="form-control" type="text">
43 43 </div>
44 44 </div>
45 45 <div class="form-group">
46 46 <label class="col-sm-3 control-label">是否系统创建:</label>
47 47 <div class="col-sm-8">
48   - <input id="systemCreated" name="systemCreated" class="form-control" type="text">
  48 + <div class="radio radio-info radio-inline" style="transform: scale(1.1, 1.1);">
  49 + <input type="radio" id="systemCreated1" name="systemCreated" value="true" checked="checked"
  50 + class="radio_select">
  51 + <label for="systemCreated1">是</label>
  52 + </div>
  53 + <div class="radio radio-danger radio-inline " style="transform: scale(1.1, 1.1);">
  54 + <input type="radio" id="systemCreated2" name="systemCreated" value="false">
  55 + <label for="systemCreated2">否</label>
  56 + </div>
49 57 </div>
50 58 </div>
51 59 <div class="form-group">
52 60 <label class="col-sm-3 control-label">是否自定义SQL:</label>
53 61 <div class="col-sm-8">
54   - <input id="customSql" name="customSql" class="form-control" type="text">
  62 + <div class="radio radio-info radio-inline" style="transform: scale(1.1, 1.1);">
  63 + <input type="radio" id="customSql1" name="customSql" value="true" checked="checked"
  64 + class="radio_select">
  65 + <label for="customSql1">是</label>
  66 + </div>
  67 + <div class="radio radio-danger radio-inline " style="transform: scale(1.1, 1.1);">
  68 + <input type="radio" id="customSql2" name="customSql" value="false">
  69 + <label for="customSql2">否</label>
  70 + </div>
55 71 </div>
56 72 </div>
57 73 <div class="form-group">
... ...
src/main/resources/templates/config/filterConfigDetail/edit.html
... ... @@ -46,13 +46,29 @@
46 46 <div class="form-group">
47 47 <label class="col-sm-3 control-label">是否系统创建:</label>
48 48 <div class="col-sm-8">
49   - <input id="systemCreated" name="systemCreated" class="form-control" type="text" th:field="*{systemCreated}">
  49 + <div class="radio radio-info radio-inline" style="transform: scale(1.1, 1.1);">
  50 + <input type="radio" id="systemCreated1" name="systemCreated" value="true" th:field="*{systemCreated}"
  51 + class="radio_select">
  52 + <label for="systemCreated1">是</label>
  53 + </div>
  54 + <div class="radio radio-danger radio-inline " style="transform: scale(1.1, 1.1);">
  55 + <input type="radio" id="systemCreated2" name="systemCreated" value="false" th:field="*{systemCreated}">
  56 + <label for="systemCreated2">否</label>
  57 + </div>
50 58 </div>
51 59 </div>
52 60 <div class="form-group">
53 61 <label class="col-sm-3 control-label">是否自定义SQL:</label>
54 62 <div class="col-sm-8">
55   - <input id="customSql" name="customSql" class="form-control" type="text" th:field="*{customSql}">
  63 + <div class="radio radio-info radio-inline" style="transform: scale(1.1, 1.1);">
  64 + <input type="radio" id="customSql1" name="customSql" value="true" th:field="*{customSql}"
  65 + class="radio_select">
  66 + <label for="customSql1">是</label>
  67 + </div>
  68 + <div class="radio radio-danger radio-inline " style="transform: scale(1.1, 1.1);">
  69 + <input type="radio" id="customSql2" name="customSql" value="false" th:field="*{customSql}">
  70 + <label for="customSql2">否</label>
  71 + </div>
56 72 </div>
57 73 </div>
58 74 <div class="form-group">
... ...
src/main/resources/templates/config/filterConfigDetail/filterConfigDetail.html
... ... @@ -83,7 +83,27 @@
83 83 },
84 84 {
85 85 field : 'systemCreated',
86   - title : '是否系统创建'
  86 + title : '是否系统创建',
  87 + formatter: function (value, item, index) {
  88 + if (value==true) {
  89 + return '<span class="badge" style="background-color: #00B83F;color: white;width: 36px;">' + ' 是 ' + '</span>';
  90 + }
  91 + else if (value==false) {
  92 + return '<span class="badge" style="background-color: #ff0000;color: white;width: 36px;">' + ' 否 ' + '</span>';
  93 + }
  94 + }
  95 + },
  96 + {
  97 + field : 'customSql',
  98 + title : '是否自定义SQL',
  99 + formatter: function (value, item, index) {
  100 + if (value==true) {
  101 + return '<span class="badge" style="background-color: #00B83F;color: white;width: 36px;">' + ' 是 ' + '</span>';
  102 + }
  103 + else if (value==false) {
  104 + return '<span class="badge" style="background-color: #ff0000;color: white;width: 36px;">' + ' 否 ' + '</span>';
  105 + }
  106 + }
87 107 },
88 108 {
89 109 field : 'version',
... ...
src/main/resources/templates/config/filterConfigHeader/add.html
1 1 <!DOCTYPE HTML>
2   -<html lang="zh" xmlns:th="http://www.thymeleaf.org">
  2 +<html lang="zh" xmlns:th="http://www.thymeleaf.org">
3 3 <meta charset="utf-8">
4 4 <head th:include="include :: header"></head>
5 5 <body class="white-bg">
... ... @@ -35,7 +35,26 @@
35 35 <input id="description" name="description" class="form-control" type="text">
36 36 </div>
37 37 </div>
38   -
  38 + <!--<div class="form-group">-->
  39 + <!--<label class="col-sm-3 control-label">是否系统创建:</label>-->
  40 + <!--<div class="col-sm-8">-->
  41 + <!--<input id="systemCreated" name="systemCreated" class="form-control" type="text">-->
  42 + <!--</div>-->
  43 + <!--</div>-->
  44 + <div class="form-group">
  45 + <label class="col-sm-3 control-label">是否系统创建:</label>
  46 + <div class="col-sm-8">
  47 + <div class="radio radio-info radio-inline" style="transform: scale(1.1, 1.1);">
  48 + <input type="radio" id="systemCreated1" name="systemCreated" value="true" checked="checked"
  49 + class="radio_select">
  50 + <label for="systemCreated1">是</label>
  51 + </div>
  52 + <div class="radio radio-danger radio-inline " style="transform: scale(1.1, 1.1);">
  53 + <input type="radio" id="systemCreated2" name="systemCreated" value="false">
  54 + <label for="systemCreated2">否</label>
  55 + </div>
  56 + </div>
  57 + </div>
39 58 <div class="form-group">
40 59 <div class="form-control-static col-sm-offset-9">
41 60 <button type="submit" class="btn btn-primary">提交</button>
... ... @@ -48,18 +67,18 @@
48 67 <script type="text/javascript">
49 68 var prefix = ctx + "config/filterConfigHeader";
50 69 $("#form-filterConfigHeader-add").validate({
51   - rules:{
52   - moduleType:{
53   - required:true,
  70 + rules: {
  71 + moduleType: {
  72 + required: true,
54 73 },
55   - recordType:{
56   - required:true,
  74 + recordType: {
  75 + required: true,
57 76 },
58   - filterCode:{
59   - required:true,
  77 + filterCode: {
  78 + required: true,
60 79 },
61 80 },
62   - submitHandler: function(form) {
  81 + submitHandler: function (form) {
63 82 // $.operate.save(prefix + "/add", $('#form-locationType-add').serialize());
64 83 var tableValue = $.common.getTableValue("#form-filterConfigHeader-add");
65 84 $.operate.save(prefix + "/add", tableValue);
... ...
src/main/resources/templates/config/filterConfigHeader/edit.html
... ... @@ -36,6 +36,32 @@
36 36 <input id="description" name="description" class="form-control" type="text" th:field="*{description}">
37 37 </div>
38 38 </div>
  39 + <!--<div class="form-group">-->
  40 + <!--<label class="col-sm-3 control-label">是否系统创建:</label>-->
  41 + <!--<div class="col-sm-8">-->
  42 + <!--<div class="onoffswitch">-->
  43 + <!--<input type="checkbox" th:checked="${systemCreated}" class="onoffswitch-checkbox" id="systemCreated" name="systemCreated">-->
  44 + <!--<label class="onoffswitch-label" for="systemCreated">-->
  45 + <!--<span class="onoffswitch-inner"></span>-->
  46 + <!--<span class="onoffswitch-switch"></span>-->
  47 + <!--</label>-->
  48 + <!--</div>-->
  49 + <!--</div>-->
  50 + <!--</div>-->
  51 + <div class="form-group">
  52 + <label class="col-sm-3 control-label">是否系统创建:</label>
  53 + <div class="col-sm-8">
  54 + <div class="radio radio-info radio-inline" style="transform: scale(1.1, 1.1);">
  55 + <input type="radio" id="systemCreated1" name="systemCreated" value="true" th:field="*{systemCreated}"
  56 + class="radio_select">
  57 + <label for="systemCreated1">是</label>
  58 + </div>
  59 + <div class="radio radio-danger radio-inline " style="transform: scale(1.1, 1.1);">
  60 + <input type="radio" id="systemCreated2" name="systemCreated" value="false" th:field="*{systemCreated}">
  61 + <label for="systemCreated2">否</label>
  62 + </div>
  63 + </div>
  64 + </div>
39 65 <div class="form-group">
40 66 <div class="form-control-static col-sm-offset-9">
41 67 <button type="submit" class="btn btn-primary">提交</button>
... ...
src/main/resources/templates/config/filterConfigHeader/filterConfigHeader.html
... ... @@ -112,8 +112,16 @@
112 112 title : '描述'
113 113 },
114 114 {
115   - field : 'description',
116   - title : '是否系统创建'
  115 + field : 'systemCreated',
  116 + title : '是否系统创建',
  117 + formatter: function (value, item, index) {
  118 + if (value==true) {
  119 + return '<span class="badge" style="background-color: #00B83F;color: white;width: 36px;">' + ' 是 ' + '</span>';
  120 + }
  121 + else if (value==false) {
  122 + return '<span class="badge" style="background-color: #ff0000;color: white;width: 36px;">' + ' 否 ' + '</span>';
  123 + }
  124 + }
117 125 },
118 126 {
119 127 field : 'version',
... ...
src/main/resources/templates/config/shipmentPreference/add.html
... ... @@ -50,13 +50,29 @@
50 50 <div class="form-group">
51 51 <label class="col-sm-3 control-label">允许越库:</label>
52 52 <div class="col-sm-8">
53   - <input id="allowCross" name="allowCross" class="form-control" type="text">
  53 + <div class="radio radio-info radio-inline" style="transform: scale(1.1, 1.1);">
  54 + <input type="radio" id="allowCross1" name="allowCross" value="true" checked="checked"
  55 + class="radio_select">
  56 + <label for="allowCross1">是</label>
  57 + </div>
  58 + <div class="radio radio-danger radio-inline " style="transform: scale(1.1, 1.1);">
  59 + <input type="radio" id="allowCross2" name="allowCross" value="false">
  60 + <label for="allowCross2">否</label>
  61 + </div>
54 62 </div>
55 63 </div>
56 64 <div class="form-group">
57 65 <label class="col-sm-3 control-label">允许未质检的出库:</label>
58 66 <div class="col-sm-8">
59   - <input id="allowQcCheckResult" name="allowQcCheckResult" class="form-control" type="text">
  67 + <div class="radio radio-info radio-inline" style="transform: scale(1.1, 1.1);">
  68 + <input type="radio" id="allowQcCheckResult1" name="allowQcCheckResult" value="true" checked="checked"
  69 + class="radio_select">
  70 + <label for="allowQcCheckResult1">是</label>
  71 + </div>
  72 + <div class="radio radio-danger radio-inline " style="transform: scale(1.1, 1.1);">
  73 + <input type="radio" id="allowQcCheckResult2" name="allowQcCheckResult" value="false">
  74 + <label for="allowQcCheckResult2">否</label>
  75 + </div>
60 76 </div>
61 77 </div>
62 78 <div class="form-group">
... ...
src/main/resources/templates/config/shipmentPreference/edit.html
... ... @@ -51,14 +51,29 @@
51 51 <div class="form-group">
52 52 <label class="col-sm-3 control-label">允许越库:</label>
53 53 <div class="col-sm-8">
54   - <input id="allowCross" name="allowCross" class="form-control" type="text" th:field="*{allowCross}">
  54 + <div class="radio radio-info radio-inline" style="transform: scale(1.1, 1.1);">
  55 + <input type="radio" id="allowCross1" name="allowCross" value="true" th:field="*{allowCross}"
  56 + class="radio_select">
  57 + <label for="allowCross1">是</label>
  58 + </div>
  59 + <div class="radio radio-danger radio-inline " style="transform: scale(1.1, 1.1);">
  60 + <input type="radio" id="allowCross2" name="allowCross" value="false" th:field="*{allowCross}">
  61 + <label for="allowCross2">否</label>
  62 + </div>
55 63 </div>
56 64 </div>
57 65 <div class="form-group">
58 66 <label class="col-sm-3 control-label">允许未质检的出库:</label>
59 67 <div class="col-sm-8">
60   - <input id="allowQcCheckResult" name="allowQcCheckResult" class="form-control"
61   - type="text" th:field="*{allowQcCheckResult}">
  68 + <div class="radio radio-info radio-inline" style="transform: scale(1.1, 1.1);">
  69 + <input type="radio" id="allowQcCheckResult1" name="allowQcCheckResult" value="true" th:field="*{allowQcCheckResult}"
  70 + class="radio_select">
  71 + <label for="allowQcCheckResult1">是</label>
  72 + </div>
  73 + <div class="radio radio-danger radio-inline " style="transform: scale(1.1, 1.1);">
  74 + <input type="radio" id="allowQcCheckResult2" name="allowQcCheckResult" value="false" th:field="*{allowQcCheckResult}">
  75 + <label for="allowQcCheckResult2">否</label>
  76 + </div>
62 77 </div>
63 78 </div>
64 79 <div class="form-group">
... ...
src/main/resources/templates/config/shipmentPreference/shipmentPreference.html
... ... @@ -102,11 +102,27 @@
102 102 },
103 103 {
104 104 field : 'allowCross',
105   - title : '允许越库'
  105 + title : '允许越库',
  106 + formatter: function (value, item, index) {
  107 + if (value==true) {
  108 + return '<span class="badge" style="background-color: #00B83F;color: white;width: 36px;">' + ' 是 ' + '</span>';
  109 + }
  110 + else if (value==false) {
  111 + return '<span class="badge" style="background-color: #ff0000;color: white;width: 36px;">' + ' 否 ' + '</span>';
  112 + }
  113 + }
106 114 },
107 115 {
108 116 field : 'allowQcCheckResult',
109   - title : '允许未质检的出库'
  117 + title : '允许未质检的出库',
  118 + formatter: function (value, item, index) {
  119 + if (value==true) {
  120 + return '<span class="badge" style="background-color: #00B83F;color: white;width: 36px;">' + ' 是 ' + '</span>';
  121 + }
  122 + else if (value==false) {
  123 + return '<span class="badge" style="background-color: #ff0000;color: white;width: 36px;">' + ' 否 ' + '</span>';
  124 + }
  125 + }
110 126 },
111 127 {
112 128 field : 'showInventoryQty',
... ...
src/main/resources/templates/receipt/receiptDetail/receiptDetail.html
... ... @@ -231,8 +231,8 @@
231 231 actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="#" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
232 232 actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="#" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-trash-o"></i>删除</a>');
233 233 }
234   - if (row.processStamp >100 && row.processStamp < 200){
235   - actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="#" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>到货</a> ');
  234 + if (row.processStamp >120 && row.processStamp < 200){
  235 + actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="#" onclick="arrival(\'' + row.id + '\')"><i class="fa fa-edit"></i>到货</a> ');
236 236 }
237 237 return actions.join('');
238 238 }
... ... @@ -257,6 +257,12 @@
257 257 var data = { "ids": id , "approval": value};
258 258 $.operate.submit(url, "post", "json", data);
259 259 }
  260 +
  261 + function arrival(id) {
  262 + var url = prefix+"/arrival";
  263 + var data = { "ids": id };
  264 + $.operate.submit(url, "post", "json", data);
  265 + }
260 266 </script>
261 267 </body>
262 268 </html>
263 269 \ No newline at end of file
... ...
src/main/resources/templates/receipt/receiptHeader/receiptHeader.html
... ... @@ -265,16 +265,15 @@
265 265 formatter: function(value, row, index) {
266 266 var actions = [];
267 267 actions.push('<a id="table_edit" class="btn btn-success btn-xs ' + printFlag + '" href="#" onclick="receiptPrint(\'' + row.id + '\')"><i class="fa fa-print"></i>打印</a> ');
268   - if (row.lastStatus >= 200)
269   - actions.push('<a style="background: #b5bdc0" class="btn btn-default btn-xs" onclick="Toreceiving(\''+ row.code + '\')"><i class="fa fa-list-ul"></i>列表</a> ');
270   - if (row.firstStatus < 100)
  268 + if (row.firstStatus < 100){
271 269 actions.push('<a class="btn btn-info btn-xs ' + editFlag + '" href="#" onclick="$.operate.edit(\'' + row.id + '\')" ><i class="fa fa-edit"></i>编辑</a> ');
  270 + actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="#" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-trash-o"></i>删除</a>');
  271 + }
272 272 if ((row.firstStatus >= 100 && row.firstStatus < 200) | (row.lastStatus >= 100 && row.firstStatus < 200)){
273 273 actions.push('<a class="btn btn-info btn-xs ' + editFlag + '" href="#" onclick="arrival(\'' + row.id + '\')" ><i class="fa fa-edit"></i>入库预约</a> ');
274 274 }
275   - if (row.lastStatus < 200){
  275 + if (row.lastStatus <= 200){
276 276 actions.push('<a class="btn btn-primary btn-xs to-receive" ' +addFlag+ ' onclick="Toreceiving(\''+ row.code + '\')"><i class="fa fa-cart-plus"></i>收货</a> ');
277   - actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="#" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-trash-o"></i>删除</a>');
278 277 }
279 278 if (row.lastStatus >= 900){
280 279 actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="#" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-trash-o"></i>删除</a>');
... ... @@ -307,6 +306,14 @@
307 306 var url = prefix+"/arrival/"+id;
308 307 $.modal.open("预约" + $.table._option.modalName, url);
309 308 }
  309 +
  310 + /* 收货 */
  311 + function Toreceiving(code) {
  312 + createMenuItem(prefix + "/receiving","入库组盘");
  313 + var storage=window.localStorage;
  314 + storage.receiving_code=code;
  315 + parent.$('.tabReload').click();
  316 + }
310 317 </script>
311 318 </body>
312 319 </html>
313 320 \ No newline at end of file
... ...
src/main/resources/templates/receipt/receiptHeader/receiving.html 0 → 100644
  1 +<!DOCTYPE HTML>
  2 +<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
  3 +<meta charset="utf-8">
  4 +<head th:include="include :: header"></head>
  5 +<style>
  6 + .table-striped-left{
  7 + width: 41%;
  8 + /*margin-right: 4px;*/
  9 + }
  10 + .table-striped-right{
  11 + /*right: -10px;*/
  12 + width: 58%;
  13 + float: right;
  14 + }
  15 + .info_text{
  16 + float: right;
  17 + }
  18 + .info_text li{
  19 + font-size: 16px;
  20 + }
  21 + .info_text li span{
  22 + font-size: 20px;
  23 + font-weight: bold;
  24 + color: rgb(28,132,198);
  25 + }
  26 +</style>
  27 +<body class="gray-bg">
  28 +<div class="container-div">
  29 +
  30 + <div class="row">
  31 + <div class="col-sm-12 select-info">
  32 + <form id="dept-form">
  33 + <div class="select-list">
  34 + <ul>
  35 + <li>
  36 + 收货单号:<input type="text" id="code" name="deptName"/>
  37 + </li>
  38 + <li>
  39 + <a class="btn btn-primary btn-rounded btn-sm" id="list-btn"><i class="fa fa-search"></i>&nbsp;搜索</a>
  40 + </li>
  41 + </ul>
  42 + <ul class="info_text">
  43 + <li>物料总数:<span id="material_length"></span></li>
  44 + <li>总单据数量:<span id="qty_length"></span></li>
  45 + <li>已收货数量:<span id="qtyCompleted_length"></span></li>
  46 + </ul>
  47 + </div>
  48 + </form>
  49 + </div>
  50 + <div class="col-sm-12 select-info table-striped-left" style="padding-top: 20px;">
  51 + <table id="bootstrap-table" data-mobile-responsive="true" class="table table-bordered table-hover"></table>
  52 + </div>
  53 + <div class="col-sm-12 select-info table-striped-right">
  54 + <table id="bootstrap-table1" data-mobile-responsive="true" class="table table-bordered table-hover"></table>
  55 + </div>
  56 + </div>
  57 +</div>
  58 +<div th:include="include :: footer"></div>
  59 +<script th:inline="javascript">
  60 + var addFlag = [[${@permission.hasPermi('receipt:receiving:add')}]];
  61 + var removeFlag = [[${@permission.hasPermi('receipt:receiving:remove')}]];
  62 + var prefix = ctx + "receipt/receiving";
  63 + var Types = [[${@dict.getType('taskType')}]];
  64 + var Status=[[${@dict.getType('receiptContainerHeaderStatus')}]];
  65 +
  66 + function list_select(code) {
  67 + $.ajax({
  68 + url: prefix + "/scanBill",
  69 + type: 'post',
  70 + datatype: 'json',
  71 + data: {
  72 + code: code
  73 + },
  74 + error:function (response) {
  75 + console.log(response);
  76 + },
  77 + success: function (value) {
  78 + var qty_show=0;
  79 + var qtyCompleted_show=0;
  80 + $("#bootstrap-table").bootstrapTable('removeAll');
  81 + if(value.data){
  82 + console.log(value);
  83 + for (var i = 0; i < value.data.length; i++) {
  84 + if (value.data[i].totalQty > value.data[i].openQty) {
  85 + $("#bootstrap-table").bootstrapTable('insertRow', {
  86 + index: 0, row: {
  87 + projectNo:value.data[i].projectNo,
  88 + id: value.data[i].id,
  89 + materialName: value.data[i].materialName,
  90 + receiptId: value.data[i].receiptId,
  91 + receiptCode: value.data[i].receiptCode,
  92 + materialCode: value.data[i].materialCode,
  93 + totalQty: value.data[i].totalQty,
  94 + openQty: value.data[i].openQty,
  95 + inventorySts: value.data[i].inventorySts,
  96 + materialUnit: value.data[i].materialUnit
  97 + }
  98 + });
  99 + }
  100 + qty_show=value.data[i].totalQty + qty_show;
  101 + qtyCompleted_show=value.data[i].openQty + qtyCompleted_show;
  102 + }
  103 + $("#material_length").text(value.data.length);
  104 + $("#qty_length").text(qty_show);
  105 + $("#qtyCompleted_length").text(qtyCompleted_show);
  106 + }
  107 + else {
  108 + console.log("收货单不存在!")
  109 + }
  110 + }
  111 + })
  112 + }
  113 +
  114 + function list_receiptInfo(code) {
  115 + $.ajax({
  116 + url: prefix + "/getReceiptInfoByBill",
  117 + type: 'post',
  118 + datatype: 'json',
  119 + data: {
  120 + code: code
  121 + },
  122 + error:function (response) {
  123 + console.log(response);
  124 + },
  125 + success: function (value) {
  126 + $("#bootstrap-table1").bootstrapTable('removeAll');
  127 + if(value.data){
  128 + for (var i = 0; i < value.data.length; i++) {
  129 + $("#bootstrap-table1").bootstrapTable('insertRow', {
  130 + index: 0, row: {
  131 + project:value.data[i].project,
  132 + id: value.data[i].id,
  133 + headerId:value.data[i].headerId,
  134 + receiptDetailId:value.data[i].receiptDetailId,
  135 + containerCode: value.data[i].containerCode,
  136 + locationCode: value.data[i].locationCode,
  137 + taskType: value.data[i].taskType,
  138 + materialCode: value.data[i].materialCode,
  139 + materialName: value.data[i].materialName,
  140 + materialSpec: value.data[i].materialSpec,
  141 + qty: value.data[i].qty,
  142 + status: value.data[i].status,
  143 + created: value.data[i].created,
  144 + createdBy: value.data[i].createdBy
  145 + }
  146 + });
  147 + }
  148 + }
  149 + else {
  150 + console.log("没有查找到入库容器!")
  151 + }
  152 + }
  153 + })
  154 + }
  155 +
  156 + $("#list-btn").click(initTable);
  157 +
  158 + $("body").bind("keypress",function(e){
  159 + // 兼容FF和IE和Opera
  160 + var theEvent = e || window.event;
  161 + var code = theEvent.keyCode || theEvent.which || theEvent.charCode;
  162 + if (code == 13) {
  163 + e.preventDefault();
  164 + //回车执行查询
  165 + initTable();
  166 + // list_select($("#code").val());
  167 + }
  168 + });
  169 +
  170 + function initTable(){
  171 + var receiptCode=$("#code").val();
  172 + list_select(receiptCode);
  173 + list_receiptInfo(receiptCode);
  174 + }
  175 +
  176 + $("#bootstrap-table").bootstrapTable({
  177 + // url: prefix + "/list",
  178 + createUrl: prefix + "/add",
  179 + updateUrl: prefix + "/edit/{id}",
  180 + removeUrl: prefix + "/remove",
  181 + contentType: "application/x-www-form-urlencoded",
  182 + // search: true, //搜索
  183 + // showRefresh: true,//刷新
  184 + // showToggle:true, //视图切换
  185 + clickToSelect: true,
  186 + // showColumns:true, //列选择
  187 + // detailView:true,
  188 + // showExport: true, //导出
  189 + // exportDataType: "all", //导出类型basic', 'all', 'selected'.当前页、所有数据、选中数据
  190 + modalName: "收货",
  191 + columns: [
  192 + {
  193 + field:'work',
  194 + title: '操作',
  195 + align: 'center',
  196 + events: "operateEvents",
  197 + formatter: function(value, row, index) {
  198 + var actions = [];
  199 + actions.push('<a id="qty" class="btn btn-success btn-xs ' + addFlag + '" href="#" onclick="" ><i class="fa fa-edit"></i>收货</a>');
  200 + // actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="#" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
  201 + return actions.join('');
  202 + }
  203 + },
  204 + // {
  205 + // field : 'id',
  206 + // title : 'id号'
  207 + // },
  208 + // {
  209 + // field : 'receiptCode',
  210 + // title : '收货单编码'
  211 + // },
  212 + {
  213 + field : 'id',
  214 + title : '明细id'
  215 + },
  216 + {
  217 + field : 'materialCode',
  218 + title : '存货编码'
  219 + },
  220 + {
  221 + field:"materialName",
  222 + title:"名称"
  223 + },
  224 + {
  225 + field : 'totalQty',
  226 + title : '单据数量'
  227 + },
  228 + {
  229 + field : 'openQty',
  230 + title : '已入数量'
  231 + },
  232 + {
  233 + field : 'inventorySts',
  234 + title : '库存状态'
  235 + },
  236 + {
  237 + field : 'projectNo',
  238 + title : '项目号'
  239 + },
  240 + {
  241 + field : 'materialUnit',
  242 + title : '单位'
  243 + },
  244 +
  245 + ]
  246 + });
  247 +
  248 + $("#bootstrap-table1").bootstrapTable({
  249 + // url: prefix + "/list",
  250 + // createUrl: prefix + "/add",
  251 + // updateUrl: prefix + "/edit/{id}",
  252 + removeUrl: ctx + "receipt/receiptContainerDetail/remove",
  253 + // search: true, //搜索
  254 + showRefresh: true, //刷新
  255 + showToggle:true, //视图切换
  256 + clickToSelect: true,
  257 + showColumns:true, //列选择
  258 + // detailView:true,
  259 + showExport: true, //导出
  260 + exportDataType: "all", //导出类型basic', 'all', 'selected'.当前页、所有数据、选中数据
  261 + modalName: "入库组盘",
  262 + iconSize: "outline",
  263 + toolbar: "#toolbar",
  264 + contentType: "application/x-www-form-urlencoded",
  265 + onRefresh: function(){
  266 + list_receiptInfo($("#code").val());
  267 + },
  268 + columns: [
  269 + // {
  270 + // checkbox: true
  271 + // },
  272 + {
  273 + field : 'id',
  274 + title : '组盘明细id',
  275 + visible:false
  276 + },
  277 + {
  278 + field : 'headerId',
  279 + title : '组盘头id'
  280 + },
  281 + {
  282 + field : 'containerCode',
  283 + title : '容器编号'
  284 + },
  285 + {
  286 + field : 'locationCode',
  287 + title : '库位编号'
  288 + },
  289 + {
  290 + field : 'materialCode',
  291 + title : '存货编码'
  292 + },
  293 + {
  294 + field:"materialName",
  295 + title:"物料名称"
  296 + },
  297 + {
  298 + field:"materialSpec",
  299 + title:"物料规格"
  300 + },
  301 + {
  302 + field : 'qty',
  303 + title : '数量'
  304 + },
  305 + {
  306 + field : 'taskType',
  307 + title : '任务类型',
  308 + align: 'center',
  309 + formatter: function(value, row, index) {
  310 + return $.table.selectDictLabel(Types, value);
  311 + }
  312 + },
  313 + {
  314 + field : 'project',
  315 + title : '项目号'
  316 + },
  317 + {
  318 + field : 'status',
  319 + title : '组盘状态',
  320 + align: 'center',
  321 + formatter: function(value, row, index) {
  322 + return $.table.selectDictLabel(Status, value);
  323 + }
  324 + },
  325 + {
  326 + field : 'receiptDetailId',
  327 + title : '入库单明细id'
  328 + },
  329 + {
  330 + field : 'created',
  331 + title : '创建时间'
  332 + },
  333 + {
  334 + field : 'createdBy',
  335 + title : '创建人'
  336 + },
  337 + {
  338 + title: '操作',
  339 + align: 'center',
  340 + events:'operateEvents',
  341 + formatter: function(value, row, index) {
  342 + var actions = [];
  343 + if (row.status == 0) {
  344 + actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="#" onclick="remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>取消</a>');
  345 + }
  346 + return actions.join('');
  347 + }
  348 + }]
  349 + });
  350 +
  351 + window.operateEvents = {
  352 + 'click #qty': function (e, value, row, index) {
  353 + var url = prefix + '/add?';
  354 + jQuery.each(row, function(key, val) {
  355 + url = url + key + "=" + encodeURI(val) + "&";
  356 + });
  357 + var modalName="入库组盘";
  358 + $.modal.open("添加"+modalName,url);
  359 + }
  360 + };
  361 +
  362 + function receiving_refresh() {
  363 + var receiving_code = localStorage.getItem("receiving_code");
  364 + $("#code").val(receiving_code);
  365 + if (receiving_code) {
  366 + initTable();
  367 + }
  368 + localStorage.removeItem("receiving_code");
  369 + }
  370 + receiving_refresh();
  371 +
  372 + function remove(id) {
  373 + $.modal.confirm("确定删除该组盘?", function() {
  374 + var url = ctx + "receipt/receiptContainerDetail/remove";
  375 + var data = { "id": id };
  376 + $.operate.submitAndCallback(url, "post", "json", data, initTable);
  377 + });
  378 + }
  379 +</script>
  380 +</body>
  381 +</html>
0 382 \ No newline at end of file
... ...
src/main/resources/templates/receipt/receiving/add.html
... ... @@ -14,7 +14,7 @@
14 14 </div>
15 15 </div>
16 16 <div class="form-group">
17   - <label class="col-sm-3 control-label">存货编码:</label>
  17 + <label class="col-sm-3 control-label">物料编码:</label>
18 18 <div class="col-sm-8">
19 19 <input id="materialCode" name="materialCode" class="form-control" type="text" readonly="readonly" onkeyup=" this.value=this.value.replace(/^\s+|\s+$/g,'')">
20 20 </div>
... ... @@ -22,43 +22,43 @@
22 22 <div class="form-group">
23 23 <label class="col-sm-3 control-label">物料名称:</label>
24 24 <div class="col-sm-8">
25   - <input id="name" name="name" class="form-control" type="text" readonly="readonly">
  25 + <input id="materialName" name="materialName" class="form-control" type="text" readonly="readonly">
26 26 </div>
27 27 </div>
28 28 <div class="form-group">
29 29 <label class="col-sm-3 control-label">库存状态:</label>
30 30 <div class="col-sm-8">
31   - <input id="inventoryStatus" name="inventoryStatus" class="form-control" type="text" readonly="readonly">
  31 + <input id="inventorySts" name="inventorySts" class="form-control" type="text" readonly="readonly">
32 32 </div>
33 33 </div>
34 34 <div class="form-group">
35 35 <label class="col-sm-3 control-label">单据数量:</label>
36 36 <div class="col-sm-8">
37   - <input id="qty" name="qty" class="form-control" type="text" readonly="readonly">
  37 + <input id="totalQty" name="totalQty" class="form-control" type="text" readonly="readonly">
38 38 </div>
39 39 </div>
40 40 <div class="form-group">
41 41 <label class="col-sm-3 control-label">已收数量:</label>
42 42 <div class="col-sm-8">
43   - <input id="qtyCompleted" name="qtyCompleted" class="form-control" type="text" readonly="readonly">
  43 + <input id="openQty" name="openQty" class="form-control" type="text" readonly="readonly">
44 44 </div>
45 45 </div>
46 46 <div class="form-group">
47 47 <label class="col-sm-3 control-label">单位:</label>
48 48 <div class="col-sm-8">
49   - <input id="unit" name="unit" class="form-control" type="text" readonly="readonly">
  49 + <input id="materialUnit" name="materialUnit" class="form-control" type="text" readonly="readonly">
50 50 </div>
51 51 </div>
52 52 <div class="form-group">
53 53 <label class="col-sm-3 control-label">收货数量:</label>
54 54 <div class="col-sm-8">
55   - <input id="qtyReceiving" name="qtyReceiving" class="form-control" type="text">
  55 + <input id="qty" name="qty" class="form-control" type="text">
56 56 </div>
57 57 </div>
58 58 <div class="form-group">
59 59 <label class="col-sm-3 control-label">容器编号:</label>
60 60 <div class="col-sm-8">
61   - <input id="receiptContainerCode" name="receiptContainerCode" class="form-control" type="text" onkeyup=" this.value=this.value.replace(/^\s+|\s+$/g,'')">
  61 + <input id="containerCode" name="containerCode" class="form-control" type="text" onkeyup=" this.value=this.value.replace(/^\s+|\s+$/g,'')">
62 62 </div>
63 63 </div>
64 64 <div class="form-group">
... ... @@ -68,6 +68,12 @@
68 68 </div>
69 69 </div>
70 70 <div class="form-group">
  71 + <label class="col-sm-3 control-label">定位规则:</label>
  72 + <div class="col-sm-8">
  73 + <input id="locatingRule" name="locatingRule" class="form-control" type="text">
  74 + </div>
  75 + </div>
  76 + <div class="form-group">
71 77 <label class="col-sm-3 control-label">入库方式:</label>
72 78 <div class="col-sm-8">
73 79 <div class="radio radio-info radio-inline" style="transform: scale(1.3, 1.3);">
... ... @@ -108,11 +114,12 @@
108 114 url : prefix + "/save",
109 115 data : {
110 116 "receiptCode": $("input[name='receiptCode']").val(),
111   - "receiptContainerCode": $("input[name='receiptContainerCode']").val(),
  117 + "containerCode": $("input[name='containerCode']").val(),
112 118 "receiptDetailId": $("input[name='receiptDetailId']").val(),
113 119 "taskType": $("input[name='taskType']:checked").val(),
114 120 "locationCode": $("input[name='locationCode']").val(),
115   - "qty": $("input[name='qtyReceiving']").val()
  121 + "qty": $("input[name='qty']").val(),
  122 + "locatingRule":$("input[name='locatingRule']").val()
116 123 },
117 124 async : false,
118 125 error : function(request) {
... ... @@ -133,14 +140,13 @@
133 140 $("input[name='receiptId']").val(urlParms.receiptId);
134 141 $("input[name='receiptCode']").val(urlParms.receiptCode);
135 142 $("input[name='materialCode']").val(urlParms.materialCode);
136   - $("input[name='name']").val(urlParms.name);
  143 + $("input[name='materialName']").val(urlParms.materialName);
137 144 $("input[name='locationCode']").val(urlParms.locationCode);
138   - $("input[name='qty']").val(urlParms.qty);
139   - $("input[name='qtyCompleted']").val(urlParms.qtyCompleted);
140   - $("input[name='inventoryStatus']").val(urlParms.inventoryStatus);
141   - $("input[name='unit']").val(urlParms.unit);
142   - $("input[name='qtyReceiving']").val(urlParms.qty);
143   - $("input[name='qtyReceiving']").focus();
  145 + $("input[name='totalQty']").val(urlParms.totalQty);
  146 + $("input[name='openQty']").val(urlParms.openQty);
  147 + $("input[name='inventorySts']").val(urlParms.inventorySts);
  148 + $("input[name='materialUnit']").val(urlParms.materialUnit);
  149 + $("input[name='qty']").focus();
144 150  
145 151  
146 152 var code = $("input[name='receiptCode']").val();
... ... @@ -161,60 +167,6 @@
161 167 parent.layer.close(index);
162 168 }
163 169  
164   -
165   - // $(".radio-inline").click(function () {
166   - // $("input:radio").removeAttr("class");
167   - // $(this).find("input:radio").attr("class","radio_select");
168   - // });
169   - // $("#receiptContainerCode").click(function () {
170   - // if ($("#1").attr("class")=="radio_select") {
171   - // // alert(1);
172   - // }
173   - // else if ($("#2").attr("class")=="radio_select"){
174   - // // alert(2);
175   - // // var title="test";
176   - // // var url="test.html";
177   - // // open(title,url)
178   - // }
179   - // });
180   - // function open(title, url, width, height){
181   - // if (navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)) {
182   - // width = 'auto';
183   - // height = 'auto';
184   - // }
185   - // if (title==null){
186   - // title = false;
187   - // }
188   - // if (url==null){
189   - // url="404.html";
190   - // }
191   - // if ($.common.isEmpty(width)) {
192   - // width = ($(window).width() - 100);
193   - // }
194   - // if ($.common.isEmpty(height)) {
195   - // height = ($(window).height() - 50);
196   - // }
197   - // layer.open({
198   - // type: 2,
199   - // area: [width + 'px', height + 'px'],
200   - // fix: false,
201   - // //不固定
202   - // maxmin: true,
203   - // shade: 0.3,
204   - // title: title,
205   - // content: url,
206   - // // shadeClose: true, //点击遮罩关闭层
207   - // success:function (layero,index) {
208   - // var body = layer.getChildFrame('body',index);//建立父子联系
209   - //
210   - // // console.log(iframeWin);
211   - // var inputList = body.find('input');
212   - // for(var j = 0; j< inputList.length; j++){
213   - // // console.log(inputList[j]);
214   - // }
215   - // }
216   - // })
217   - // }
218 170 </script>
219 171 </body>
220 172 </html>
... ...
src/main/resources/templates/receipt/receiving/receiving.html
... ... @@ -80,24 +80,24 @@
80 80 $("#bootstrap-table").bootstrapTable('removeAll');
81 81 if(value.data){
82 82 for (var i = 0; i < value.data.length; i++) {
83   - if (value.data[i].qty > value.data[i].qtyCompleted) {
  83 + if (value.data[i].totalQty > value.data[i].openQty) {
84 84 $("#bootstrap-table").bootstrapTable('insertRow', {
85 85 index: 0, row: {
86   - project:value.data[i].project,
  86 + projectNo:value.data[i].project,
87 87 id: value.data[i].id,
88   - name: value.data[i].name,
  88 + materialName: value.data[i].materialName,
89 89 receiptId: value.data[i].receiptId,
90 90 receiptCode: value.data[i].receiptCode,
91 91 materialCode: value.data[i].materialCode,
92   - qty: value.data[i].qty,
93   - qtyCompleted: value.data[i].qtyCompleted,
94   - inventoryStatus: value.data[i].inventoryStatus,
95   - unit: value.data[i].unit
  92 + totalQty: value.data[i].totalQty,
  93 + openQty: value.data[i].openQty,
  94 + inventorySts: value.data[i].inventorySts,
  95 + materialUnit: value.data[i].materialUnit
96 96 }
97 97 });
98 98 }
99   - qty_show=value.data[i].qty + qty_show;
100   - qtyCompleted_show=value.data[i].qtyCompleted + qtyCompleted_show;
  99 + qty_show=value.data[i].totalQty + qty_show;
  100 + qtyCompleted_show=value.data[i].openQty + qtyCompleted_show;
101 101 }
102 102 $("#material_length").text(value.data.length);
103 103 $("#qty_length").text(qty_show);
... ... @@ -127,9 +127,9 @@
127 127 for (var i = 0; i < value.data.length; i++) {
128 128 $("#bootstrap-table1").bootstrapTable('insertRow', {
129 129 index: 0, row: {
130   - project:value.data[i].project,
  130 + projectNo :value.data[i].projectNo,
131 131 id: value.data[i].id,
132   - headerId:value.data[i].headerId,
  132 + receiptContainerId:value.data[i].receiptContainerId,
133 133 receiptDetailId:value.data[i].receiptDetailId,
134 134 containerCode: value.data[i].containerCode,
135 135 locationCode: value.data[i].locationCode,
... ... @@ -217,27 +217,27 @@
217 217 title : '存货编码'
218 218 },
219 219 {
220   - field:"name",
221   - title:"名称"
  220 + field: "materialName",
  221 + title: "名称"
222 222 },
223 223 {
224   - field : 'qty',
  224 + field : 'totalQty',
225 225 title : '单据数量'
226 226 },
227 227 {
228   - field : 'qtyCompleted',
  228 + field : 'openQty',
229 229 title : '已入数量'
230 230 },
231 231 {
232   - field : 'inventoryStatus',
  232 + field : 'inventorySts',
233 233 title : '库存状态'
234 234 },
235 235 {
236   - field : 'project',
  236 + field : 'projectNo',
237 237 title : '项目号'
238 238 },
239 239 {
240   - field : 'unit',
  240 + field : 'materialUnit',
241 241 title : '单位'
242 242 },
243 243  
... ...