Commit 068795cceacf533af9272f91b4ad29208d64e339

Authored by huhai
2 parents 15d9db5d cfec800e

Merge branch 'develop' of http://172.16.29.40:8010/wms/wms2 into develop

Showing 52 changed files with 1511 additions and 362 deletions
.idea/workspace.xml
1 1 <?xml version="1.0" encoding="UTF-8"?>
2 2 <project version="4">
3 3 <component name="ChangeListManager">
4   - <list default="true" id="baeae966-16bb-4f97-a411-22fe5a65cefd" name="Default Changelist" comment="">
  4 + <list default="true" id="baeae966-16bb-4f97-a411-22fe5a65cefd" name="Default Changelist" comment="修改入库首选项页面,规则">
5 5 <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
6   - <change beforePath="$PROJECT_DIR$/src/main/java/com/huaheng/pc/config/FilterConfigDetail/service/FilterConfigDetailService.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/huaheng/pc/config/FilterConfigDetail/service/FilterConfigDetailService.java" afterDir="false" />
  6 + <change beforePath="$PROJECT_DIR$/src/main/java/com/huaheng/pc/config/FilterConfigHeader/controller/FilterConfigHeaderController.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/huaheng/pc/config/FilterConfigHeader/controller/FilterConfigHeaderController.java" afterDir="false" />
  7 + <change beforePath="$PROJECT_DIR$/src/main/java/com/huaheng/pc/config/container/mapper/ContainerMapper.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/huaheng/pc/config/container/mapper/ContainerMapper.java" afterDir="false" />
  8 + <change beforePath="$PROJECT_DIR$/src/main/java/com/huaheng/pc/config/container/service/ContainerService.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/huaheng/pc/config/container/service/ContainerService.java" afterDir="false" />
  9 + <change beforePath="$PROJECT_DIR$/src/main/java/com/huaheng/pc/config/container/service/ContainerServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/huaheng/pc/config/container/service/ContainerServiceImpl.java" afterDir="false" />
  10 + <change beforePath="$PROJECT_DIR$/src/main/java/com/huaheng/pc/config/material/controller/MaterialController.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/huaheng/pc/config/material/controller/MaterialController.java" afterDir="false" />
  11 + <change beforePath="$PROJECT_DIR$/src/main/java/com/huaheng/pc/receipt/receiptContainerDetail/service/ReceiptContainerDetailServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/huaheng/pc/receipt/receiptContainerDetail/service/ReceiptContainerDetailServiceImpl.java" afterDir="false" />
7 12 <change beforePath="$PROJECT_DIR$/src/main/java/com/huaheng/pc/receipt/receiptContainerHeader/service/ReceiptContainerHeaderServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/huaheng/pc/receipt/receiptContainerHeader/service/ReceiptContainerHeaderServiceImpl.java" afterDir="false" />
8 13 <change beforePath="$PROJECT_DIR$/src/main/java/com/huaheng/pc/receipt/receiptHeader/controller/ReceiptHeaderController.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/huaheng/pc/receipt/receiptHeader/controller/ReceiptHeaderController.java" afterDir="false" />
  14 + <change beforePath="$PROJECT_DIR$/src/main/java/com/huaheng/pc/receipt/receiptHeader/service/ReceiptHeaderService.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/huaheng/pc/receipt/receiptHeader/service/ReceiptHeaderService.java" afterDir="false" />
  15 + <change beforePath="$PROJECT_DIR$/src/main/java/com/huaheng/pc/receipt/receiving/controller/ReceivingController.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/huaheng/pc/receipt/receiving/controller/ReceivingController.java" afterDir="false" />
9 16 <change beforePath="$PROJECT_DIR$/src/main/java/com/huaheng/pc/receipt/receiving/service/ReceivingService.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/huaheng/pc/receipt/receiving/service/ReceivingService.java" afterDir="false" />
10   - <change beforePath="$PROJECT_DIR$/src/main/resources/templates/check/checkDetail/checkDetail.html" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/templates/check/checkDetail/checkDetail.html" afterDir="false" />
11   - <change beforePath="$PROJECT_DIR$/src/main/resources/templates/receipt/receiptDetail/add.html" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/templates/receipt/receiptDetail/add.html" afterDir="false" />
12   - <change beforePath="$PROJECT_DIR$/src/main/resources/templates/receipt/receiptDetail/receiptDetail.html" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/templates/receipt/receiptDetail/receiptDetail.html" afterDir="false" />
  17 + <change beforePath="$PROJECT_DIR$/src/main/resources/mybatis/config/ContainerMapper.xml" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/mybatis/config/ContainerMapper.xml" afterDir="false" />
  18 + <change beforePath="$PROJECT_DIR$/src/main/resources/templates/config/filterConfigHeader/add.html" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/templates/config/filterConfigHeader/add.html" afterDir="false" />
  19 + <change beforePath="$PROJECT_DIR$/src/main/resources/templates/config/filterConfigHeader/filterConfigHeader.html" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/templates/config/filterConfigHeader/filterConfigHeader.html" afterDir="false" />
  20 + <change beforePath="$PROJECT_DIR$/src/main/resources/templates/receipt/receiptHeader/edit.html" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/templates/receipt/receiptHeader/edit.html" afterDir="false" />
13 21 <change beforePath="$PROJECT_DIR$/src/main/resources/templates/receipt/receiptHeader/receiptHeader.html" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/templates/receipt/receiptHeader/receiptHeader.html" afterDir="false" />
14   - <change beforePath="$PROJECT_DIR$/src/main/resources/templates/receipt/receiptHeader/report.html" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/templates/receipt/receiptHeader/report.html" afterDir="false" />
15   - <change beforePath="$PROJECT_DIR$/src/main/resources/templates/receipt/receiving/add.html" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/templates/receipt/receiving/add.html" afterDir="false" />
  22 + <change beforePath="$PROJECT_DIR$/src/main/resources/templates/receipt/receiving/receiving.html" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/templates/receipt/receiving/receiving.html" afterDir="false" />
16 23 </list>
17 24 <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
18 25 <option name="SHOW_DIALOG" value="false" />
... ... @@ -31,59 +38,7 @@
31 38 <option name="HIDDEN_KINDS">
32 39 <set />
33 40 </option>
34   - <expand>
35   - <path>
36   - <item name="Database" type="3277223f:DatabaseStructure$DbRootGroup" />
37   - <item name="@172.16.29.45" type="feb32156:DbDataSourceImpl" />
38   - </path>
39   - <path>
40   - <item name="Database" type="3277223f:DatabaseStructure$DbRootGroup" />
41   - <item name="@172.16.29.45" type="feb32156:DbDataSourceImpl" />
42   - <item name="schemas" type="d4e8921:DatabaseStructure$FamilyGroup" />
43   - </path>
44   - <path>
45   - <item name="Database" type="3277223f:DatabaseStructure$DbRootGroup" />
46   - <item name="@172.16.29.45" type="feb32156:DbDataSourceImpl" />
47   - <item name="schemas" type="d4e8921:DatabaseStructure$FamilyGroup" />
48   - <item name="wms_v2: schema" type="76f4a085:MysqlImplModel$Schema" />
49   - </path>
50   - <path>
51   - <item name="Database" type="3277223f:DatabaseStructure$DbRootGroup" />
52   - <item name="@172.16.29.45" type="feb32156:DbDataSourceImpl" />
53   - <item name="schemas" type="d4e8921:DatabaseStructure$FamilyGroup" />
54   - <item name="wms_v2: schema" type="76f4a085:MysqlImplModel$Schema" />
55   - <item name="receipt_header: table" type="285a2a93:MysqlImplModel$Table" />
56   - </path>
57   - <path>
58   - <item name="Database" type="3277223f:DatabaseStructure$DbRootGroup" />
59   - <item name="@localhost" type="feb32156:DbDataSourceImpl" />
60   - </path>
61   - <path>
62   - <item name="Database" type="3277223f:DatabaseStructure$DbRootGroup" />
63   - <item name="@localhost" type="feb32156:DbDataSourceImpl" />
64   - <item name="schemas" type="d4e8921:DatabaseStructure$FamilyGroup" />
65   - </path>
66   - <path>
67   - <item name="Database" type="3277223f:DatabaseStructure$DbRootGroup" />
68   - <item name="@localhost" type="feb32156:DbDataSourceImpl" />
69   - <item name="schemas" type="d4e8921:DatabaseStructure$FamilyGroup" />
70   - <item name="wms2.0: schema" type="76f4a085:MysqlImplModel$Schema" />
71   - </path>
72   - <path>
73   - <item name="Database" type="3277223f:DatabaseStructure$DbRootGroup" />
74   - <item name="@localhost" type="feb32156:DbDataSourceImpl" />
75   - <item name="schemas" type="d4e8921:DatabaseStructure$FamilyGroup" />
76   - <item name="wms2.0: schema" type="76f4a085:MysqlImplModel$Schema" />
77   - <item name="check_detail: table" type="285a2a93:MysqlImplModel$Table" />
78   - </path>
79   - <path>
80   - <item name="Database" type="3277223f:DatabaseStructure$DbRootGroup" />
81   - <item name="@localhost" type="feb32156:DbDataSourceImpl" />
82   - <item name="schemas" type="d4e8921:DatabaseStructure$FamilyGroup" />
83   - <item name="wms2.0: schema" type="76f4a085:MysqlImplModel$Schema" />
84   - <item name="check_header: table" type="285a2a93:MysqlImplModel$Table" />
85   - </path>
86   - </expand>
  41 + <expand />
87 42 <select />
88 43 </component>
89 44 <component name="FileTemplateManagerImpl">
... ... @@ -104,6 +59,7 @@
104 59 <OptionsSetting value="false" id="Update" />
105 60 </component>
106 61 <component name="PropertiesComponent">
  62 + <property name="ASKED_ADD_EXTERNAL_FILES" value="true" />
107 63 <property name="DefaultHtmlFileTemplate" value="HTML File" />
108 64 <property name="RequestMappingsPanelOrder0" value="0" />
109 65 <property name="RequestMappingsPanelOrder1" value="1" />
... ... @@ -112,17 +68,30 @@
112 68 <property name="WebServerToolWindowFactoryState" value="false" />
113 69 <property name="aspect.path.notification.shown" value="true" />
114 70 <property name="full.screen.before.presentation.mode" value="false" />
115   - <property name="last_opened_file_path" value="$PROJECT_DIR$/../WMSV1" />
  71 + <property name="last_opened_file_path" value="$PROJECT_DIR$/src/main/resources/static/ajax/libs/bootstrap-table/extensions/editable" />
116 72 <property name="node.js.detected.package.eslint" value="true" />
117 73 <property name="node.js.detected.package.tslint" value="true" />
118 74 <property name="node.js.path.for.package.eslint" value="project" />
119 75 <property name="node.js.path.for.package.tslint" value="project" />
120 76 <property name="node.js.selected.package.eslint" value="(autodetect)" />
121 77 <property name="node.js.selected.package.tslint" value="(autodetect)" />
  78 + <property name="project.structure.last.edited" value="Modules" />
  79 + <property name="project.structure.proportion" value="0.15429688" />
  80 + <property name="project.structure.side.proportion" value="0.2" />
122 81 <property name="run.code.analysis.last.selected.profile" value="pProject Default" />
123   - <property name="settings.editor.selected.configurable" value="reference.settingsdialog.IDE.editor.colors.Console Font" />
  82 + <property name="settings.editor.selected.configurable" value="preferences.pluginManager" />
  83 + </component>
  84 + <component name="RecentsManager">
  85 + <key name="CopyFile.RECENT_KEYS">
  86 + <recent name="E:\code\wms2\src\main\resources\static\ajax\libs\bootstrap-table\extensions\editable" />
  87 + </key>
124 88 </component>
125 89 <component name="RunDashboard">
  90 + <option name="configurationTypes">
  91 + <set>
  92 + <option value="SpringBootApplicationConfigurationType" />
  93 + </set>
  94 + </option>
126 95 <option name="ruleStates">
127 96 <list>
128 97 <RuleState>
... ... @@ -135,6 +104,19 @@
135 104 </option>
136 105 </component>
137 106 <component name="RunManager" selected="Spring Boot.HuaHengApplication">
  107 + <configuration name="ReceiptContainerHeaderServiceImpl" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true">
  108 + <option name="MAIN_CLASS_NAME" value="com.huaheng.pc.receipt.receiptContainerHeader.service.ReceiptContainerHeaderServiceImpl" />
  109 + <module name="huaheng" />
  110 + <extension name="coverage">
  111 + <pattern>
  112 + <option name="PATTERN" value="com.huaheng.pc.receipt.receiptContainerHeader.service.*" />
  113 + <option name="ENABLED" value="true" />
  114 + </pattern>
  115 + </extension>
  116 + <method v="2">
  117 + <option name="Make" enabled="true" />
  118 + </method>
  119 + </configuration>
138 120 <configuration name="ServiceTest.sendSimpleMail" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
139 121 <module name="huaheng" />
140 122 <extension name="coverage">
... ... @@ -168,12 +150,14 @@
168 150 </method>
169 151 </configuration>
170 152 <list>
  153 + <item itemvalue="Application.ReceiptContainerHeaderServiceImpl" />
171 154 <item itemvalue="JUnit.ServiceTest.sendSimpleMail" />
172 155 <item itemvalue="Spring Boot.HuaHengApplication" />
173 156 </list>
174 157 <recent_temporary>
175 158 <list>
176 159 <item itemvalue="Spring Boot.HuaHengApplication" />
  160 + <item itemvalue="Application.ReceiptContainerHeaderServiceImpl" />
177 161 <item itemvalue="JUnit.ServiceTest.sendSimpleMail" />
178 162 </list>
179 163 </recent_temporary>
... ... @@ -181,13 +165,9 @@
181 165 <component name="ServiceViewManager">
182 166 <option name="allServicesViewState">
183 167 <serviceView>
  168 + <option name="contentProportion" value="0.1612554" />
184 169 <treeState>
185   - <expand>
186   - <path>
187   - <item name="services root" type="e789fda9:ObjectUtils$Sentinel" />
188   - <item name="com.intellij.execution.services.ServiceModel$ServiceGroupNode@20dd4d1b" type="7427dc5b:ServiceModel$ServiceGroupNode" />
189   - </path>
190   - </expand>
  170 + <expand />
191 171 <select />
192 172 </treeState>
193 173 </serviceView>
... ... @@ -224,7 +204,73 @@
224 204 <workItem from="1568102802104" duration="132000" />
225 205 <workItem from="1568108585629" duration="2016000" />
226 206 <workItem from="1568162278389" duration="3299000" />
227   - <workItem from="1568170378983" duration="10947000" />
  207 + <workItem from="1568170378983" duration="18141000" />
  208 + <workItem from="1568249510258" duration="10225000" />
  209 + <workItem from="1568266250892" duration="1333000" />
  210 + <workItem from="1568269799447" duration="99000" />
  211 + <workItem from="1568270609232" duration="2008000" />
  212 + <workItem from="1568277784815" duration="3397000" />
  213 + <workItem from="1568595092050" duration="120000" />
  214 + <workItem from="1568595230891" duration="859000" />
  215 + <workItem from="1568597823149" duration="18415000" />
  216 + <workItem from="1568622349963" duration="1657000" />
  217 + <workItem from="1568625672966" duration="1471000" />
  218 + <workItem from="1568680155591" duration="361000" />
  219 + <workItem from="1568680712425" duration="2511000" />
  220 + <workItem from="1568684486098" duration="957000" />
  221 + <workItem from="1568685565340" duration="4430000" />
  222 + <workItem from="1568691952276" duration="8650000" />
  223 + <workItem from="1568707800753" duration="1137000" />
  224 + <workItem from="1568710796434" duration="1618000" />
  225 + <workItem from="1568766055582" duration="6000" />
  226 + <workItem from="1568768025248" duration="5346000" />
  227 + <workItem from="1568778175920" duration="2572000" />
  228 + <workItem from="1568787162277" duration="1740000" />
  229 + <workItem from="1568788907625" duration="7345000" />
  230 + <workItem from="1568853208604" duration="1177000" />
  231 + <workItem from="1568854399388" duration="3001000" />
  232 + <workItem from="1568861704814" duration="2380000" />
  233 + <workItem from="1568865359898" duration="108000" />
  234 + <workItem from="1568865651366" duration="623000" />
  235 + <workItem from="1568868902957" duration="3468000" />
  236 + <workItem from="1568875455023" duration="3979000" />
  237 + <workItem from="1568882661913" duration="1883000" />
  238 + <workItem from="1568887498559" duration="554000" />
  239 + <workItem from="1568940290765" duration="1255000" />
  240 + <workItem from="1568943643646" duration="634000" />
  241 + <workItem from="1568946720514" duration="599000" />
  242 + <workItem from="1568951675236" duration="5060000" />
  243 + <workItem from="1568963416874" duration="848000" />
  244 + <workItem from="1568964502775" duration="3587000" />
  245 + <workItem from="1568970279520" duration="8000" />
  246 + <workItem from="1569032862367" duration="1792000" />
  247 + <workItem from="1569037677538" duration="64000" />
  248 + <workItem from="1569134046393" duration="65000" />
  249 + <workItem from="1569198499251" duration="8680000" />
  250 + <workItem from="1569207254306" duration="18489000" />
  251 + <workItem from="1569285398457" duration="5908000" />
  252 + <workItem from="1569295518709" duration="463000" />
  253 + <workItem from="1569299856099" duration="4172000" />
  254 + <workItem from="1569312420091" duration="6208000" />
  255 + <workItem from="1569318779053" duration="35000" />
  256 + <workItem from="1569372049669" duration="4595000" />
  257 + <workItem from="1569390345693" duration="1418000" />
  258 + <workItem from="1569393808742" duration="10588000" />
  259 + <workItem from="1569411369199" duration="191000" />
  260 + <workItem from="1569457959376" duration="2373000" />
  261 + <workItem from="1569461866204" duration="777000" />
  262 + <workItem from="1569462694383" duration="6561000" />
  263 + <workItem from="1569477197991" duration="8695000" />
  264 + <workItem from="1569545011335" duration="12640000" />
  265 + <workItem from="1569565238961" duration="5096000" />
  266 + <workItem from="1569571884664" duration="2032000" />
  267 + <workItem from="1569577676760" duration="124000" />
  268 + <workItem from="1569717688488" duration="13568000" />
  269 + <workItem from="1569743740441" duration="1168000" />
  270 + <workItem from="1569745589865" duration="2739000" />
  271 + <workItem from="1569748443357" duration="438000" />
  272 + <workItem from="1569803438585" duration="13789000" />
  273 + <workItem from="1570581146682" duration="827000" />
228 274 </task>
229 275 <task id="LOCAL-00001" summary="修改添加物料时使用物料类别生成物料编码">
230 276 <created>1567664306836</created>
... ... @@ -268,7 +314,196 @@
268 314 <option name="project" value="LOCAL" />
269 315 <updated>1568174134623</updated>
270 316 </task>
271   - <option name="localTasksCounter" value="7" />
  317 + <task id="LOCAL-00007" summary="修改入库单审核移动到入库单头表">
  318 + <created>1568186231357</created>
  319 + <option name="number" value="00007" />
  320 + <option name="presentableId" value="LOCAL-00007" />
  321 + <option name="project" value="LOCAL" />
  322 + <updated>1568186231357</updated>
  323 + </task>
  324 + <task id="LOCAL-00008" summary="修改任务完成更新库位的错误">
  325 + <created>1568191139437</created>
  326 + <option name="number" value="00008" />
  327 + <option name="presentableId" value="LOCAL-00008" />
  328 + <option name="project" value="LOCAL" />
  329 + <updated>1568191139437</updated>
  330 + </task>
  331 + <task id="LOCAL-00009" summary="修改入库类型自动判断">
  332 + <created>1568259182874</created>
  333 + <option name="number" value="00009" />
  334 + <option name="presentableId" value="LOCAL-00009" />
  335 + <option name="project" value="LOCAL" />
  336 + <updated>1568259182874</updated>
  337 + </task>
  338 + <task id="LOCAL-00010" summary="修改入库单页面">
  339 + <created>1568281128408</created>
  340 + <option name="number" value="00010" />
  341 + <option name="presentableId" value="LOCAL-00010" />
  342 + <option name="project" value="LOCAL" />
  343 + <updated>1568281128408</updated>
  344 + </task>
  345 + <task id="LOCAL-00011" summary="修改入库单页面,入库单审核,质检页面后台跳转接口">
  346 + <created>1568616697584</created>
  347 + <option name="number" value="00011" />
  348 + <option name="presentableId" value="LOCAL-00011" />
  349 + <option name="project" value="LOCAL" />
  350 + <updated>1568616697584</updated>
  351 + </task>
  352 + <task id="LOCAL-00012" summary="修改 入库收货,生成上架任务自动执行定位">
  353 + <created>1568692224269</created>
  354 + <option name="number" value="00012" />
  355 + <option name="presentableId" value="LOCAL-00012" />
  356 + <option name="project" value="LOCAL" />
  357 + <updated>1568692224269</updated>
  358 + </task>
  359 + <task id="LOCAL-00013" summary="修复商品管理、物料类别种bug">
  360 + <created>1568784920330</created>
  361 + <option name="number" value="00013" />
  362 + <option name="presentableId" value="LOCAL-00013" />
  363 + <option name="project" value="LOCAL" />
  364 + <updated>1568784920330</updated>
  365 + </task>
  366 + <task id="LOCAL-00014" summary="修改入库明细添加加载定位规则的错误">
  367 + <created>1568788287608</created>
  368 + <option name="number" value="00014" />
  369 + <option name="presentableId" value="LOCAL-00014" />
  370 + <option name="project" value="LOCAL" />
  371 + <updated>1568788287608</updated>
  372 + </task>
  373 + <task id="LOCAL-00015" summary="添加入库质检行内编辑">
  374 + <created>1568857387442</created>
  375 + <option name="number" value="00015" />
  376 + <option name="presentableId" value="LOCAL-00015" />
  377 + <option name="project" value="LOCAL" />
  378 + <updated>1568857387442</updated>
  379 + </task>
  380 + <task id="LOCAL-00016" summary="行内编辑完成后更新数据库">
  381 + <created>1568875291383</created>
  382 + <option name="number" value="00016" />
  383 + <option name="presentableId" value="LOCAL-00016" />
  384 + <option name="project" value="LOCAL" />
  385 + <updated>1568875291383</updated>
  386 + </task>
  387 + <task id="LOCAL-00017" summary="修改质检登记使用bootstarp boot原生方法初始化">
  388 + <created>1568885639106</created>
  389 + <option name="number" value="00017" />
  390 + <option name="presentableId" value="LOCAL-00017" />
  391 + <option name="project" value="LOCAL" />
  392 + <updated>1568885639106</updated>
  393 + </task>
  394 + <task id="LOCAL-00018" summary="表单头创建时间添加默认创建时间&#10;开始时间默认提前一周,结束时间默认当天">
  395 + <created>1569207792528</created>
  396 + <option name="number" value="00018" />
  397 + <option name="presentableId" value="LOCAL-00018" />
  398 + <option name="project" value="LOCAL" />
  399 + <updated>1569207792528</updated>
  400 + </task>
  401 + <task id="LOCAL-00019" summary="配置中所有页面添加重置按钮">
  402 + <created>1569218224945</created>
  403 + <option name="number" value="00019" />
  404 + <option name="presentableId" value="LOCAL-00019" />
  405 + <option name="project" value="LOCAL" />
  406 + <updated>1569218224945</updated>
  407 + </task>
  408 + <task id="LOCAL-00020" summary="收货添加定位、取消定位、取消组盘按钮">
  409 + <created>1569232154274</created>
  410 + <option name="number" value="00020" />
  411 + <option name="presentableId" value="LOCAL-00020" />
  412 + <option name="project" value="LOCAL" />
  413 + <updated>1569232154274</updated>
  414 + </task>
  415 + <task id="LOCAL-00021" summary="修改入库单数量使用BigDecimal类型,修改入库单添加、修改、物理类型添加和修改页面">
  416 + <created>1569318560852</created>
  417 + <option name="number" value="00021" />
  418 + <option name="presentableId" value="LOCAL-00021" />
  419 + <option name="project" value="LOCAL" />
  420 + <updated>1569318560852</updated>
  421 + </task>
  422 + <task id="LOCAL-00022" summary="修改物料管理中物料类型使用物料类别表,不在使用数据字典">
  423 + <created>1569395439782</created>
  424 + <option name="number" value="00022" />
  425 + <option name="presentableId" value="LOCAL-00022" />
  426 + <option name="project" value="LOCAL" />
  427 + <updated>1569395439782</updated>
  428 + </task>
  429 + <task id="LOCAL-00023" summary="修改波次主表、波次流程头表、波次流程明细页面">
  430 + <created>1569402291802</created>
  431 + <option name="number" value="00023" />
  432 + <option name="presentableId" value="LOCAL-00023" />
  433 + <option name="project" value="LOCAL" />
  434 + <updated>1569402291802</updated>
  435 + </task>
  436 + <task id="LOCAL-00024" summary="修改入库首选项修改添加模块为select">
  437 + <created>1569411473661</created>
  438 + <option name="number" value="00024" />
  439 + <option name="presentableId" value="LOCAL-00024" />
  440 + <option name="project" value="LOCAL" />
  441 + <updated>1569411473661</updated>
  442 + </task>
  443 + <task id="LOCAL-00025" summary="修改任务取消入库组盘状态不回滚,修改任务完成入库单状态不完成">
  444 + <created>1569477488017</created>
  445 + <option name="number" value="00025" />
  446 + <option name="presentableId" value="LOCAL-00025" />
  447 + <option name="project" value="LOCAL" />
  448 + <updated>1569477488017</updated>
  449 + </task>
  450 + <task id="LOCAL-00026" summary="添加自动生成容器编码">
  451 + <created>1569484931952</created>
  452 + <option name="number" value="00026" />
  453 + <option name="presentableId" value="LOCAL-00026" />
  454 + <option name="project" value="LOCAL" />
  455 + <updated>1569484931952</updated>
  456 + </task>
  457 + <task id="LOCAL-00027" summary="修改入库首选项页面,规则查询使用数据字典值,表格值显示修改">
  458 + <created>1569553028716</created>
  459 + <option name="number" value="00027" />
  460 + <option name="presentableId" value="LOCAL-00027" />
  461 + <option name="project" value="LOCAL" />
  462 + <updated>1569553028716</updated>
  463 + </task>
  464 + <task id="LOCAL-00028" summary="入库单添加重置按钮,入库单历史添加上游单号搜索">
  465 + <created>1569554438854</created>
  466 + <option name="number" value="00028" />
  467 + <option name="presentableId" value="LOCAL-00028" />
  468 + <option name="project" value="LOCAL" />
  469 + <updated>1569554438854</updated>
  470 + </task>
  471 + <task id="LOCAL-00029" summary="添加取消入库组盘时容器为临时容器,删除容器">
  472 + <created>1569567112288</created>
  473 + <option name="number" value="00029" />
  474 + <option name="presentableId" value="LOCAL-00029" />
  475 + <option name="project" value="LOCAL" />
  476 + <updated>1569567112288</updated>
  477 + </task>
  478 + <task id="LOCAL-00030" summary="出库完成时删除临时容器">
  479 + <created>1569568426923</created>
  480 + <option name="number" value="00030" />
  481 + <option name="presentableId" value="LOCAL-00030" />
  482 + <option name="project" value="LOCAL" />
  483 + <updated>1569568426923</updated>
  484 + </task>
  485 + <task id="LOCAL-00031" summary="修改容器新增时容器enable状态">
  486 + <created>1569577849038</created>
  487 + <option name="number" value="00031" />
  488 + <option name="presentableId" value="LOCAL-00031" />
  489 + <option name="project" value="LOCAL" />
  490 + <updated>1569577849039</updated>
  491 + </task>
  492 + <task id="LOCAL-00032" summary="修改入库组盘页面中任务类型的显示问题&#10;修改任务完成不修改入库组盘状态的问题">
  493 + <created>1569740895495</created>
  494 + <option name="number" value="00032" />
  495 + <option name="presentableId" value="LOCAL-00032" />
  496 + <option name="project" value="LOCAL" />
  497 + <updated>1569740895496</updated>
  498 + </task>
  499 + <task id="LOCAL-00033" summary="添加根据code查询物料">
  500 + <created>1569743042718</created>
  501 + <option name="number" value="00033" />
  502 + <option name="presentableId" value="LOCAL-00033" />
  503 + <option name="project" value="LOCAL" />
  504 + <updated>1569743042718</updated>
  505 + </task>
  506 + <option name="localTasksCounter" value="34" />
272 507 <servers />
273 508 </component>
274 509 <component name="TypeScriptGeneratedFilesManager">
... ... @@ -288,41 +523,88 @@
288 523 </option>
289 524 </component>
290 525 <component name="VcsManagerConfiguration">
291   - <MESSAGE value="修改添加物料时使用物料类别生成物料编码" />
292   - <MESSAGE value="修改质检页面、添加完成质检" />
293   - <MESSAGE value="修复入库质检请求地址冲突" />
294   - <MESSAGE value="添加入库单打印" />
295   - <option name="LAST_COMMIT_MESSAGE" value="添加入库单打印" />
  526 + <option name="ADD_EXTERNAL_FILES_SILENTLY" value="true" />
  527 + <MESSAGE value="修改入库类型自动判断" />
  528 + <MESSAGE value="修改入库单页面" />
  529 + <MESSAGE value="修改入库单页面,入库单审核,质检页面后台跳转接口" />
  530 + <MESSAGE value="修改 入库收货,生成上架任务自动执行定位" />
  531 + <MESSAGE value="修复商品管理、物料类别种bug" />
  532 + <MESSAGE value="修改入库明细添加加载定位规则的错误" />
  533 + <MESSAGE value="添加入库质检行内编辑" />
  534 + <MESSAGE value="行内编辑完成后更新数据库" />
  535 + <MESSAGE value="修改质检登记使用bootstarp boot原生方法初始化" />
  536 + <MESSAGE value="表单头创建时间添加默认创建时间&#10;开始时间默认提前一周,结束时间默认当天" />
  537 + <MESSAGE value="配置中所有页面添加重置按钮" />
  538 + <MESSAGE value="收货添加定位、取消定位、取消组盘按钮" />
  539 + <MESSAGE value="修改入库单数量使用BigDecimal类型,修改入库单添加、修改、物理类型添加和修改页面" />
  540 + <MESSAGE value="修改物料管理中物料类型使用物料类别表,不在使用数据字典" />
  541 + <MESSAGE value="修改波次主表、波次流程头表、波次流程明细页面" />
  542 + <MESSAGE value="修改入库首选项修改添加模块为select" />
  543 + <MESSAGE value="修改任务取消入库组盘状态不回滚,修改任务完成入库单状态不完成" />
  544 + <MESSAGE value="添加自动生成容器编码" />
  545 + <MESSAGE value="修改入库首选项页面,规则查询使用数据字典值,表格值显示修改" />
  546 + <MESSAGE value="入库单添加重置按钮,入库单历史添加上游单号搜索" />
  547 + <MESSAGE value="添加取消入库组盘时容器为临时容器,删除容器" />
  548 + <MESSAGE value="出库完成时删除临时容器" />
  549 + <MESSAGE value="修改容器新增时容器enable状态" />
  550 + <MESSAGE value="修改入库组盘页面中任务类型的显示问题&#10;修改任务完成不修改入库组盘状态的问题" />
  551 + <MESSAGE value="添加根据code查询物料" />
  552 + <option name="LAST_COMMIT_MESSAGE" value="添加根据code查询物料" />
296 553 </component>
297 554 <component name="XDebuggerManager">
298 555 <breakpoint-manager>
299 556 <breakpoints>
300 557 <line-breakpoint enabled="true" type="java-line">
301   - <url>file://$PROJECT_DIR$/src/main/java/com/huaheng/pc/check/checkDetail/controller/CheckDetailController.java</url>
302   - <line>152</line>
303   - <option name="timeStamp" value="6" />
  558 + <url>file://$PROJECT_DIR$/src/main/java/com/huaheng/pc/config/bom/controller/BomHeaderController.java</url>
  559 + <line>164</line>
  560 + <option name="timeStamp" value="24" />
  561 + </line-breakpoint>
  562 + <line-breakpoint enabled="true" type="java-line">
  563 + <url>file://$PROJECT_DIR$/src/main/java/com/huaheng/pc/config/material/controller/MaterialController.java</url>
  564 + <line>150</line>
  565 + <option name="timeStamp" value="26" />
304 566 </line-breakpoint>
305 567 <line-breakpoint enabled="true" type="java-line">
306   - <url>file://$PROJECT_DIR$/src/main/java/com/huaheng/pc/check/checkDetail/controller/CheckDetailController.java</url>
307   - <line>154</line>
308   - <option name="timeStamp" value="8" />
  568 + <url>file://$PROJECT_DIR$/src/main/java/com/huaheng/pc/check/checkingRegister/controller/CheckingRegisterController.java</url>
  569 + <line>172</line>
  570 + <option name="timeStamp" value="28" />
309 571 </line-breakpoint>
310 572 <line-breakpoint enabled="true" type="java-line">
311   - <url>file://$PROJECT_DIR$/src/main/java/com/huaheng/pc/check/checkDetail/service/CheckDetailService.java</url>
312   - <line>45</line>
313   - <option name="timeStamp" value="9" />
  573 + <url>file://$PROJECT_DIR$/src/main/java/com/huaheng/pc/task/taskHeader/service/TaskHeaderServiceImpl.java</url>
  574 + <line>618</line>
  575 + <option name="timeStamp" value="48" />
314 576 </line-breakpoint>
315 577 <line-breakpoint enabled="true" type="java-line">
316   - <url>file://$PROJECT_DIR$/src/main/java/com/huaheng/pc/receipt/receiptHeader/service/ReceiptHeaderService.java</url>
317   - <line>144</line>
318   - <option name="timeStamp" value="10" />
  578 + <url>file://$PROJECT_DIR$/src/main/java/com/huaheng/pc/receipt/receiptContainerDetail/service/ReceiptContainerDetailServiceImpl.java</url>
  579 + <line>56</line>
  580 + <option name="timeStamp" value="49" />
319 581 </line-breakpoint>
320 582 <line-breakpoint enabled="true" type="java-line">
321   - <url>file://$PROJECT_DIR$/src/main/java/com/huaheng/pc/receipt/receiptHeader/controller/ReceiptHeaderController.java</url>
322   - <line>240</line>
323   - <option name="timeStamp" value="11" />
  583 + <url>file://$PROJECT_DIR$/src/main/java/com/huaheng/pc/receipt/receiptContainerDetail/service/ReceiptContainerDetailServiceImpl.java</url>
  584 + <line>84</line>
  585 + <option name="timeStamp" value="51" />
  586 + </line-breakpoint>
  587 + <line-breakpoint enabled="true" type="javascript">
  588 + <url>file://$PROJECT_DIR$/src/main/resources/templates/check/checkingRegister/checkingRegister.html</url>
  589 + <line>308</line>
  590 + <option name="timeStamp" value="29" />
  591 + </line-breakpoint>
  592 + <line-breakpoint enabled="true" type="javascript">
  593 + <url>file://$PROJECT_DIR$/src/main/resources/templates/config/waveFlowHeader/waveFlowHeader.html</url>
  594 + <line>71</line>
  595 + <option name="timeStamp" value="43" />
324 596 </line-breakpoint>
325 597 </breakpoints>
326 598 </breakpoint-manager>
  599 + <watches-manager>
  600 + <configuration name="SpringBootApplicationConfigurationType">
  601 + <watch expression="receiptDetailService.getById(receiptContainerDetail.getReceiptDetailId()).getLocatingRule()" language="JAVA" />
  602 + </configuration>
  603 + </watches-manager>
  604 + </component>
  605 + <component name="com.intellij.coverage.CoverageDataManagerImpl">
  606 + <SUITE FILE_PATH="coverage/huaheng$HuaHengApplication.ic" NAME="HuaHengApplication Coverage Results" MODIFIED="1568251952497" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="idea" COVERAGE_BY_TEST_ENABLED="false" COVERAGE_TRACING_ENABLED="false">
  607 + <FILTER>com.huaheng.*</FILTER>
  608 + </SUITE>
327 609 </component>
328 610 </project>
329 611 \ No newline at end of file
... ...
src/main/java/com/huaheng/api/general/controller/BasicDataApi.java 0 → 100644
  1 +package com.huaheng.api.general.controller;
  2 +
  3 +import com.huaheng.api.general.service.BasicDataApiService;
  4 +import com.huaheng.framework.aspectj.lang.annotation.Log;
  5 +import com.huaheng.framework.aspectj.lang.constant.BusinessType;
  6 +import com.huaheng.framework.web.controller.BaseController;
  7 +import com.huaheng.framework.web.domain.AjaxResult;
  8 +import com.huaheng.pc.config.customer.domain.Customer;
  9 +import com.huaheng.pc.config.material.domain.Material;
  10 +import com.huaheng.pc.config.supplier.domain.Supplier;
  11 +import com.huaheng.pc.config.warehouse.domain.Warehouse;
  12 +import com.huaheng.pc.system.dept.domain.Dept;
  13 +import com.huaheng.pc.system.dict.domain.DictData;
  14 +import com.huaheng.pc.system.user.domain.User;
  15 +import io.swagger.annotations.Api;
  16 +import io.swagger.annotations.ApiOperation;
  17 +import org.springframework.beans.factory.annotation.Autowired;
  18 +import org.springframework.web.bind.annotation.*;
  19 +
  20 +@RestController
  21 +@RequestMapping("/api/basicData")
  22 +@Api(tags = {"basicData"}, description = "基础数据接口")
  23 +public class BasicDataApi extends BaseController {
  24 +
  25 + @Autowired
  26 + private BasicDataApiService basicDataApiService;
  27 +
  28 + /**
  29 + * 同步物料
  30 + */
  31 + @Log(title = "物料添加", action = BusinessType.INSERT)
  32 + @PostMapping("/material")
  33 + @ApiOperation("物料添加公共接口")
  34 + @ResponseBody
  35 + public AjaxResult MaterialApi(@RequestBody Material material)
  36 + {
  37 + AjaxResult ajaxResult = basicDataApiService.material(material);
  38 + return ajaxResult;
  39 + }
  40 +
  41 + /**
  42 + * 同步字典
  43 + */
  44 + @Log(title = "字典添加", action = BusinessType.INSERT)
  45 + @PostMapping("/dictData")
  46 + @ApiOperation("字典添加公共接口")
  47 + @ResponseBody
  48 + public AjaxResult UnitlApi(@RequestBody DictData dictData)
  49 + {
  50 + AjaxResult ajaxResult = basicDataApiService.dict(dictData);
  51 + return ajaxResult;
  52 + }
  53 +
  54 +
  55 +
  56 + /**
  57 + * 同步仓库和货主
  58 + */
  59 + @Log(title = "仓库添加", action = BusinessType.INSERT)
  60 + @PostMapping("/warehouse")
  61 + @ApiOperation("仓库添加公共接口")
  62 + @ResponseBody
  63 + public AjaxResult WarehouseApi(@RequestBody Warehouse warehouse)
  64 + {
  65 + AjaxResult ajaxResult = basicDataApiService.warehouse(warehouse);
  66 + return ajaxResult;
  67 + }
  68 +
  69 + /**
  70 + * 同步客户档案
  71 + */
  72 + @Log(title = "客户档案添加", action = BusinessType.INSERT)
  73 + @PostMapping("/customer")
  74 + @ApiOperation("客户档案添加公共接口")
  75 + @ResponseBody
  76 + public AjaxResult CustomerApi(@RequestBody Customer customer)
  77 + {
  78 + AjaxResult ajaxResult = basicDataApiService.customer(customer);
  79 + return ajaxResult;
  80 + }
  81 +
  82 + /**
  83 + * 同步部门档案
  84 + */
  85 + @Log(title = "部门档案添加", action = BusinessType.INSERT)
  86 + @PostMapping("/dept")
  87 + @ApiOperation("部门档案添加公共接口")
  88 + @ResponseBody
  89 + public AjaxResult DeptApi(@RequestBody Dept dept)
  90 + {
  91 + AjaxResult ajaxResult = basicDataApiService.dept(dept);
  92 + return ajaxResult;
  93 + }
  94 +
  95 + /**
  96 + * 同步人员档案
  97 + */
  98 + @Log(title = "人员档案添加", action = BusinessType.INSERT)
  99 + @PostMapping("/user")
  100 + @ApiOperation("人员档案添加公共接口")
  101 + @ResponseBody
  102 + public AjaxResult UserApi(@RequestBody User user)
  103 + {
  104 + AjaxResult ajaxResult = basicDataApiService.user(user);
  105 + return ajaxResult;
  106 + }
  107 +
  108 + /**
  109 + * 同步供应商档案
  110 + */
  111 + @Log(title = "供应商档案添加", action = BusinessType.INSERT)
  112 + @PostMapping("/supplier")
  113 + @ApiOperation("供应商档案添加公共接口")
  114 + @ResponseBody
  115 + public AjaxResult SupplierApi(@RequestBody Supplier supplier){
  116 + AjaxResult ajaxResult = basicDataApiService.supplier(supplier);
  117 + return ajaxResult;
  118 + }
  119 +
  120 +
  121 +
  122 +
  123 +}
... ...
src/main/java/com/huaheng/api/general/controller/LoginApi.java 0 → 100644
  1 +package com.huaheng.api.general.controller;
  2 +
  3 +import com.alibaba.fastjson.JSONException;
  4 +import com.huaheng.common.utils.DataUtils;
  5 +import com.huaheng.framework.web.controller.BaseController;
  6 +import com.huaheng.framework.web.domain.AjaxResult;
  7 +import com.huaheng.pc.system.user.service.IUserService;
  8 +import io.swagger.annotations.Api;
  9 +import io.swagger.annotations.ApiOperation;
  10 +import io.swagger.annotations.ApiParam;
  11 +import org.springframework.beans.factory.annotation.Autowired;
  12 +import org.springframework.web.bind.annotation.PostMapping;
  13 +import org.springframework.web.bind.annotation.RequestBody;
  14 +import org.springframework.web.bind.annotation.RequestMapping;
  15 +import org.springframework.web.bind.annotation.RestController;
  16 +
  17 +import java.util.Map;
  18 +
  19 +
  20 +@RestController
  21 +@RequestMapping("/api")
  22 +@Api(tags = {"Login"}, description = "登陆接口")
  23 +public class LoginApi extends BaseController {
  24 +
  25 + @Autowired
  26 + private IUserService userService;
  27 +
  28 + @PostMapping("/login")
  29 + @ApiOperation("登陆接口")
  30 + public AjaxResult login(@RequestBody @ApiParam(value="登陆的Map集合") Map<String, String> param)
  31 + {
  32 + if (param.get("username") == null)
  33 + throw new JSONException("username(用户名)不能为空");
  34 + if (param.get("password") == null)
  35 + throw new JSONException("password(密码)不能为空");
  36 + if (param.get("warehouseCode") == null)
  37 + throw new JSONException("warehouseCode(仓库编码)不能为空");
  38 + String username = param.get("username");
  39 + String password = param.get("password");
  40 + String warehouseCode = param.get("warehouseCode");
  41 + AjaxResult ajaxResult = userService.login(username, password, warehouseCode, false);
  42 + return ajaxResult;
  43 + }
  44 +
  45 +
  46 + @PostMapping("/heartbeat")
  47 + @ApiOperation("心跳接口,用于延长cookie有效期")
  48 + public AjaxResult heartbeat()
  49 + {
  50 + return AjaxResult.success("success");
  51 + }
  52 +
  53 +
  54 +}
... ...
src/main/java/com/huaheng/api/general/service/BasicDataApiService.java 0 → 100644
  1 +package com.huaheng.api.general.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.framework.web.domain.AjaxResult;
  8 +import com.huaheng.pc.config.company.domain.Company;
  9 +import com.huaheng.pc.config.company.service.CompanyService;
  10 +import com.huaheng.pc.config.customer.domain.Customer;
  11 +import com.huaheng.pc.config.customer.service.CustomerServiceImpl;
  12 +import com.huaheng.pc.config.material.domain.Material;
  13 +import com.huaheng.pc.config.material.service.MaterialService;
  14 +import com.huaheng.pc.config.supplier.domain.Supplier;
  15 +import com.huaheng.pc.config.supplier.service.SupplierService;
  16 +import com.huaheng.pc.config.warehouse.domain.Warehouse;
  17 +import com.huaheng.pc.config.warehouse.service.WarehouseService;
  18 +import com.huaheng.pc.system.dept.domain.Dept;
  19 +import com.huaheng.pc.system.dept.service.IDeptService;
  20 +import com.huaheng.pc.system.dict.domain.DictData;
  21 +import com.huaheng.pc.system.dict.domain.DictType;
  22 +import com.huaheng.pc.system.dict.mapper.DictDataMapper;
  23 +import com.huaheng.pc.system.dict.mapper.DictTypeMapper;
  24 +import com.huaheng.pc.system.dict.service.IDictDataService;
  25 +import com.huaheng.pc.system.dict.service.IDictTypeService;
  26 +import com.huaheng.pc.system.user.domain.User;
  27 +import com.huaheng.pc.system.user.service.IUserService;
  28 +import org.springframework.beans.factory.annotation.Autowired;
  29 +import org.springframework.stereotype.Component;
  30 +import org.springframework.transaction.annotation.Transactional;
  31 +
  32 +import javax.annotation.Resource;
  33 +import java.util.ArrayList;
  34 +import java.util.List;
  35 +
  36 +@Component
  37 +@Transactional
  38 +public class BasicDataApiService {
  39 + @Autowired
  40 + IDictTypeService dictTypeService;
  41 + @Autowired
  42 + IDictDataService dictDataService;
  43 + @Autowired
  44 + MaterialService materialService;
  45 +
  46 + @Resource
  47 + private DictTypeMapper dictTypeMapper;
  48 + @Resource
  49 + private DictDataMapper dictDataMapper;
  50 +
  51 + @Autowired
  52 + IUserService iUserService;
  53 +
  54 + @Autowired
  55 + IDeptService iDeptService;
  56 +
  57 + @Autowired
  58 + CustomerServiceImpl iCustomerService;
  59 +
  60 + @Autowired
  61 + WarehouseService iWarehouseService;
  62 +
  63 + @Autowired
  64 + SupplierService iSupplierService;
  65 +
  66 + @Autowired
  67 + CompanyService companyService;
  68 +
  69 + //检查仓库
  70 + public Warehouse checkWarehouse(String code) {
  71 + LambdaQueryWrapper<Warehouse> warehouseLam = Wrappers.lambdaQuery();
  72 + warehouseLam.eq(Warehouse::getCode, code);
  73 + Warehouse warehouse = iWarehouseService.getOne(warehouseLam);
  74 + if (warehouse == null) {
  75 + throw new ServiceException("数据出现问题,系统没有该仓库");
  76 + }
  77 + return warehouse;
  78 + }
  79 +
  80 + /**
  81 + * 字典通用接口
  82 + * 1、判断必填字段是否为空
  83 + * 2、仓库是否正确
  84 + * 3、检查字典头表,如果没有就添加
  85 + * 4、增新一条字典明细表的记录
  86 + * @param dictData
  87 + * @return
  88 + */
  89 + public AjaxResult dict(DictData dictData) {
  90 + //1、判断必填字段是否为空
  91 + if(StringUtils.isEmpty(dictData.getWarehouseCode())){
  92 + return AjaxResult.error("没有仓库编码");
  93 + }
  94 + if(StringUtils.isEmpty(dictData.getDictLabel())){
  95 + return AjaxResult.error("没有字典标签");
  96 + }
  97 + if(StringUtils.isEmpty(dictData.getDictType())){
  98 + return AjaxResult.error("没有字典类型");
  99 + }
  100 + if(StringUtils.isEmpty(dictData.getDictValue())){
  101 + return AjaxResult.error("没有字典键值");
  102 + }
  103 +
  104 + //2、仓库是否正确
  105 + int result = 0;
  106 + this.checkWarehouse(dictData.getWarehouseCode());
  107 +
  108 + //3、检查字典头表,如果没有就添加
  109 + DictData condition = new DictData();
  110 + try {
  111 + condition.setDictType(dictData.getDictType());
  112 + condition.setWarehouseCode(dictData.getWarehouseCode());
  113 + condition.setDictValue(dictData.getDictValue());
  114 + condition.setEnable(true);
  115 + List<DictData> dictDatas = dictDataService.selectDictDataList(dictData);
  116 + if (dictDatas.size() < 1) {
  117 + //找出字典头表的id
  118 + DictType dictType = new DictType();
  119 + dictType.setWarehouseCode(dictData.getWarehouseCode());
  120 + dictType.setDictType(dictData.getDictType());
  121 + List<DictType> dictList = dictTypeService.selectDictTypeList(dictType);
  122 + if (dictList.size() < 1) {
  123 + dictType.setWarehouseId(dictData.getWarehouseId());
  124 + dictType.setCreateBy(dictData.getCreateBy());
  125 + dictType.setCreateTime(dictData.getCreateTime());
  126 + if(StringUtils.isEmpty(dictType.getCreateBy())) {
  127 + result = dictTypeService.insertDictType(dictType);
  128 + }else {
  129 + result=dictTypeMapper.insertDictType(dictType);
  130 + }
  131 + dictList.add(dictType);
  132 + if (result < 1) {
  133 + throw new ServiceException("新增字典类型失败!");
  134 + }
  135 + }
  136 + //4、增新一条字典明细表的记录
  137 + dictData.setHeaderId(dictList.get(0).getId());
  138 + if(StringUtils.isEmpty(dictData.getCreateBy())) {
  139 + result = dictDataService.insertDictData(dictData);
  140 + }else {
  141 + result=dictDataMapper.insertDictData(dictData);
  142 + }
  143 + if (result < 1) {
  144 + throw new ServiceException("新增字典数据失败!");
  145 + }
  146 + }
  147 + }catch (Exception e){
  148 + throw new ServiceException("字典数据有误!!");
  149 + }
  150 + return AjaxResult.success("新增字典成功");
  151 + }
  152 +
  153 + /**
  154 + * 检查是否存在物料,如果存在就修改,不存在就新增
  155 + * 1、判断必填字段是否为空
  156 + * 2、检查仓库和货主
  157 + * 3、查看此物料在系统是否存在
  158 + * @param material
  159 + * @return
  160 + */
  161 + @Transactional
  162 + public AjaxResult material(Material material) {
  163 +
  164 + //1、判断必填字段是否为空
  165 + if(StringUtils.isEmpty(material.getCode())){
  166 + return AjaxResult.error("物料编码不能为空!!");
  167 + }
  168 + if(StringUtils.isEmpty(material.getWarehouseCode())){
  169 + return AjaxResult.error("仓库编码不能为空!!");
  170 + }
  171 + if(StringUtils.isEmpty(material.getCompanyCode())){
  172 + return AjaxResult.error("货主编码不能为空!!");
  173 + }
  174 + if(StringUtils.isEmpty(material.getType())){
  175 + return AjaxResult.error("物料类型不能为空!!");
  176 + }
  177 + if(StringUtils.isEmpty(material.getName())){
  178 + return AjaxResult.error("物料名称不能为空!!");
  179 + }
  180 + if(StringUtils.isEmpty(material.getSpec())){
  181 + return AjaxResult.error("物料规格不能为空!!");
  182 + }
  183 + if(StringUtils.isEmpty(material.getUnit())){
  184 + return AjaxResult.error("物料单位不能为空!!");
  185 + }
  186 +
  187 + //2、检查仓库和货主
  188 + this.checkWarehouse(material.getWarehouseCode());
  189 + LambdaQueryWrapper<Company> companyLam = Wrappers.lambdaQuery();
  190 + companyLam.eq(Company::getCode,material.getCompanyCode());
  191 + Company company=companyService.getOne(companyLam);
  192 + if(company==null){
  193 + return AjaxResult.error("没有该货主!!");
  194 + }
  195 +
  196 + Boolean flag = false;
  197 + try {
  198 + //3、查看此物料在系统是否存在
  199 + LambdaQueryWrapper<Material> materialLam = Wrappers.lambdaQuery();
  200 + materialLam.eq(Material::getCode,material.getCode())
  201 + .eq(Material::getWarehouseCode,material.getWarehouseCode());
  202 + Material entity = materialService.getOne(materialLam);
  203 + if (entity == null) {
  204 + flag = materialService.save(material);
  205 + if (flag == false) {
  206 + throw new ServiceException("新增物料失败!");
  207 + }
  208 + } else {
  209 +// return AjaxResult.error("已有该物料,无法进行修改!!");
  210 + material.setId(entity.getId());
  211 + flag = materialService.updateById(material);
  212 + if (flag == false) {
  213 + throw new ServiceException("更新物料失败!");
  214 + }else {
  215 + return AjaxResult.success("更新物流成功!");
  216 + }
  217 + }
  218 + }catch (Exception e){
  219 + throw new ServiceException("物料数据问题");
  220 + }
  221 + return AjaxResult.success("新增物料成功");
  222 + }
  223 +
  224 +
  225 +
  226 + /**
  227 + * 人员档案通用接口
  228 + * 1、判断必填字段是否为空
  229 + * 2、判断系统中是否有该用户,如果有则更新,如果没有则新增
  230 + *新增: (1)、默认密码为123456
  231 + * (2)默认为普通用户
  232 + * (3)默认为长沙仓库
  233 + * @param user
  234 + * @return
  235 + */
  236 + public AjaxResult user(User user){
  237 + //1、判断必填字段是否为空
  238 + int result = 0;
  239 + User user1 = new User();
  240 + if(user.getLoginName()==null || user.getLoginName()=="") {
  241 + return AjaxResult.error("没有人员编码!!");
  242 + }
  243 + if (user.getUserName()==null || user.getUserName()==""){
  244 + return AjaxResult.error("没有人员名称!!");
  245 + }
  246 + if(user.getDeptId()==null){
  247 + return AjaxResult.error("没有部门ID!!");
  248 + }
  249 + if(iDeptService.selectDeptById(user.getDeptId())==null){
  250 + return AjaxResult.error("系统没有此部门!!");
  251 + }
  252 + try {
  253 + user1.setLoginName(user.getLoginName());
  254 + //2、判断系统中是否有该用户,如果有则更新,如果没有则新增
  255 + if (iUserService.selectmen(user.getLoginName()) == null) {
  256 + //(1)默认密码为123456
  257 + if(user.getPassword()==null) {
  258 + user.setPassword("123456");
  259 + }
  260 + //(2)默认为普通用户
  261 + if(StringUtils.isEmpty(user.getRoleIds())) {
  262 + List<Integer> roleIds=new ArrayList<>();
  263 + roleIds.add(2);
  264 + user.setRoleIds(roleIds);
  265 + }
  266 + //(3)默认为长沙仓库
  267 + if(StringUtils.isEmpty(user.getCompanyIdList())) {
  268 + List<Integer> companyIdList = new ArrayList<>();
  269 + companyIdList.add(2);
  270 + user.setCompanyIdList(companyIdList);
  271 + }
  272 + result = iUserService.insertUser(user);
  273 + if (result < 1) {
  274 + throw new ServiceException("新增人员档案失败!");
  275 + } else {
  276 + return AjaxResult.success("新增人员档案成功!");
  277 + }
  278 + } else {
  279 + return AjaxResult.error("已有该人员档案,无法进行修改!");
  280 +// result = iUserService.updateUser(user);
  281 +// if (result < 1) {
  282 +// throw new ServiceException("更新人员档案失败!");
  283 +// } else {
  284 +// return AjaxResult.success("更新人员档案成功!");
  285 +// }
  286 + }
  287 + }catch (Exception e){
  288 + throw new ServiceException("数据问题。。。");
  289 + }
  290 + }
  291 +
  292 +
  293 +
  294 + /**
  295 + * 部门档案通用接口
  296 + * 1、判断必填字段是否为空
  297 + * 2、部门编码长度应是双数
  298 + *
  299 + * @param dept
  300 + * @return
  301 + */
  302 + @Transactional
  303 + public AjaxResult dept(Dept dept) {
  304 +
  305 + //1、判断必填字段是否为空
  306 + int result = 0;
  307 + String code = dept.getCode();
  308 + if (code == null || code == "") {
  309 + return AjaxResult.error("部门编码不能为空!!");
  310 + }
  311 + try {
  312 + Dept rs = iDeptService.selectDepts(code);
  313 +
  314 + //2、部门编码长度应是双数
  315 + if (rs == null) {
  316 + int x = code.length() % 2;
  317 + if (x != 0) {
  318 + return AjaxResult.error("部门编码长度应是双数");
  319 + } else {
  320 + int y = code.length() / 2;
  321 + if (y >= 1) {
  322 + String scode = code.substring(0, 2);
  323 + if (iDeptService.selectDepts(scode) == null) {
  324 + dept.setCode(scode);
  325 + dept.setParentId(100);
  326 + dept.setAncestors("0,100");
  327 + dept.setOrderNum("1");
  328 + result = iDeptService.insertDept(dept);
  329 + if (result < 1) {
  330 + throw new ServiceException("新增部门档案失败!");
  331 + }
  332 + }
  333 + }
  334 + for (int z = 1; z <=y; z++) {
  335 +
  336 + //找到上级部门
  337 + String sqcode = code.substring(0, 2 * (z - 1));
  338 + Dept sdept = iDeptService.selectDepts(sqcode);
  339 + String sscode = code.substring(0, 2 * z);
  340 + if (iDeptService.selectDepts(sscode) == null) {
  341 + dept.setCode(sscode);
  342 + dept.setParentId(sdept.getId());
  343 + dept.setAncestors(sdept.getAncestors() + "," + sdept.getId());
  344 + dept.setOrderNum(String.valueOf(z));
  345 + result = iDeptService.insertDept(dept);
  346 + if (result < 1) {
  347 + throw new ServiceException("新增部门档案失败!");
  348 + }
  349 + }
  350 + }
  351 + }
  352 + return AjaxResult.success("新增部门成功");
  353 + } else {
  354 + dept.setId(rs.getId());
  355 + int num = iDeptService.updatesDept(dept);
  356 + if (num < 1) {
  357 + throw new ServiceException("部门修改失败");
  358 + } else {
  359 + return AjaxResult.success("部门修改成功");
  360 + }
  361 + }
  362 + } catch (Exception e) {
  363 + throw new ServiceException("数据问题。。。");
  364 + }
  365 + }
  366 +
  367 + /**
  368 + * 客户档案通用接口
  369 + * 1、判断必填字段是否为空
  370 + * 2、检查仓库
  371 + * 3、查看此客户在系统是否存在
  372 + * @param customer
  373 + * @return
  374 + */
  375 + public AjaxResult customer(Customer customer){
  376 + Boolean flag = true;
  377 + //1、判断必填字段是否为空
  378 + if(customer.getCode()==null||customer.getCode()=="") {
  379 + return AjaxResult.error("客户代码不能为空!!");
  380 + }
  381 + if(StringUtils.isEmpty(customer.getWarehouseCode())){
  382 + return AjaxResult.error("没有仓库编码");
  383 + }
  384 + if(StringUtils.isEmpty(customer.getName())){
  385 + return AjaxResult.error("没有客户名称");
  386 + }
  387 + if(StringUtils.isEmpty(customer.getCompanyCode())){
  388 + return AjaxResult.error("没有货主编码");
  389 + }
  390 + try {
  391 + //2、检查仓库
  392 + this.checkWarehouse(customer.getWarehouseCode());
  393 +
  394 + //3、查看此客户在系统是否存在
  395 + LambdaQueryWrapper<Customer> customerLam = Wrappers.lambdaQuery();
  396 + customerLam.eq(Customer::getCode,customer.getCode())
  397 + .eq(Customer::getWarehouseCode,customer.getWarehouseCode());
  398 + Customer ctr = iCustomerService.getOne(customerLam);
  399 +
  400 + //不存在添加
  401 + if ( ctr == null) {
  402 + flag = iCustomerService.save(customer);
  403 + if (flag == false) {
  404 + throw new ServiceException("新增客户档案失败!");
  405 + } else {
  406 + return AjaxResult.success("新增客户档案成功!");
  407 + }
  408 + } else {
  409 + return AjaxResult.error("已有该客户,无法进行修改!!");
  410 +// customer.setId(rs.getId());
  411 +// result = iCustomerService.updateByModel(customer);
  412 +// if (result < 1) {
  413 +// throw new ServiceException("更新客户档案失败!");
  414 +// } else {
  415 +// return AjaxResult.success("更新客户档案成功!");
  416 +// }
  417 + }
  418 + }catch (Exception e){
  419 + throw new ServiceException("数据问题。。。");
  420 + }
  421 + }
  422 +
  423 + /**
  424 + * 仓库档案通用接口
  425 + * 1、判断必填字段是否为空
  426 + * 2、判断系统中是否有该仓库,若有则更新,若无则新增
  427 + * @param warehouse
  428 + * @return
  429 + */
  430 + public AjaxResult warehouse(Warehouse warehouse){
  431 + if(warehouse.getCode()==null||warehouse.getCode()=="") {
  432 + return AjaxResult.error("仓库编码不能为空!!");
  433 + }
  434 + if(warehouse.getName()==null||warehouse.getName()=="") {
  435 + return AjaxResult.error("仓库名称不能为空!!");
  436 + }
  437 + try {
  438 + LambdaQueryWrapper<Warehouse> warehouseLam = Wrappers.lambdaQuery();
  439 + warehouseLam.eq(Warehouse::getCode,warehouse.getCode());
  440 + Warehouse whs = iWarehouseService.getOne(warehouseLam);
  441 +
  442 + //2、判断系统中是否有该仓库,若有则更新,若无则新增
  443 + if (whs == null) {
  444 + Boolean flag = iWarehouseService.save(warehouse);
  445 + if (flag == false) {
  446 + throw new ServiceException("新增仓库档案失败!");
  447 + } else {
  448 + return AjaxResult.success("新增仓库档案成功!");
  449 + }
  450 + } else {
  451 + return AjaxResult.error("已有该仓库,无法进行修改!");
  452 +// warehouse.setId(rs.getId());
  453 +// result = iWarehouseService.updateByModel(warehouse);
  454 +// if (result < 1) {
  455 +// throw new ServiceException("更新仓库档案失败!");
  456 +// } else {
  457 +// return AjaxResult.success("更新仓库档案成功!");
  458 +// }
  459 + }
  460 + }catch (Exception e){
  461 + throw new ServiceException("仓库数据问题。。。");
  462 + }
  463 + }
  464 +
  465 + /**
  466 + * 供应商档案通用接口
  467 + * 1、判断必填字段是否为空
  468 + * 2、检查仓库
  469 + * 3、查看此供应商在系统是否存在
  470 + * @param supplier
  471 + * @return
  472 + */
  473 + public AjaxResult supplier(Supplier supplier){
  474 +
  475 + //1、判断必填字段是否为空
  476 + if(StringUtils.isEmpty(supplier.getCode())){
  477 + return AjaxResult.error("没有供应商代码");
  478 + }
  479 + if(StringUtils.isEmpty(supplier.getName())){
  480 + return AjaxResult.error("没有供应商名称");
  481 + }
  482 + if(StringUtils.isEmpty(supplier.getWarehouseCode())){
  483 + return AjaxResult.error("没有仓库编码");
  484 + }
  485 +
  486 + //2、检查仓库
  487 + this.checkWarehouse(supplier.getCode());
  488 +
  489 + //3、查看此供应商在系统是否存在
  490 + try {
  491 + LambdaQueryWrapper<Supplier> supplierLam = Wrappers.lambdaQuery();
  492 + supplierLam.eq(Supplier::getCode,supplier.getCode())
  493 + .eq(Supplier::getWarehouseCode,supplier.getWarehouseCode());
  494 + Supplier spl=iSupplierService.getOne(supplierLam);
  495 +
  496 + if (spl== null) {
  497 + Boolean flag = iSupplierService.save(supplier);
  498 + if (flag == false) {
  499 + throw new ServiceException("新增供应商失败!");
  500 + } else {
  501 + return AjaxResult.success("新增供应商成功!");
  502 + }
  503 + } else {
  504 + return AjaxResult.error("已有该供应商,无法修改!!");
  505 + }
  506 + }catch (Exception e){
  507 + throw new ServiceException("供应商数据问题。。。");
  508 + }
  509 + }
  510 +}
... ...
src/main/java/com/huaheng/pc/check/checkDetail/controller/CheckDetailController.java
... ... @@ -131,8 +131,7 @@ public class CheckDetailController extends BaseController {
131 131  
132 132 /**
133 133 * 保存质检完成
134   - * @param inventorySts 库存状态
135   - * @param qty 数量
  134 + * @param id
136 135 * @return AjaxResult
137 136 */
138 137 @ApiOperation(value="完成质检详情", notes="完成质检详情", httpMethod = "POST")
... ...
src/main/java/com/huaheng/pc/config/FilterConfigHeader/controller/FilterConfigHeaderController.java
... ... @@ -98,8 +98,9 @@ public class FilterConfigHeaderController extends BaseController {
98 98 /**
99 99 * 新增规则配置主表
100 100 */
101   - @GetMapping("/add")
102   - public String add() {
  101 + @GetMapping("/add/{type}")
  102 + public String add(@PathVariable("type")String type, ModelMap modelMap) {
  103 + modelMap.put("moduleType", type);
103 104 return prefix + "/add";
104 105 }
105 106  
... ...
src/main/java/com/huaheng/pc/config/container/mapper/ContainerMapper.java
... ... @@ -14,6 +14,7 @@ public interface ContainerMapper extends BaseMapper&lt;Container&gt; {
14 14  
15 15 void updateLocationCodeAndStatus(@Param("warehouseCode") String warehouseCode, @Param("containerCode") String containerCode, @Param("locationCode") String locationCode, @Param("status") String status);
16 16  
  17 + Container findAllByCode(@Param("code") String code);
17 18  
18 19  
19 20 }
20 21 \ No newline at end of file
... ...
src/main/java/com/huaheng/pc/config/container/service/ContainerService.java
... ... @@ -20,4 +20,6 @@ public interface ContainerService extends IService&lt;Container&gt;{
20 20 void removeContainer(String containType, String containCode);
21 21  
22 22 void removeByCode(String containCode);
  23 +
  24 + Container findAllByCode(String containCode);
23 25 }
... ...
src/main/java/com/huaheng/pc/config/container/service/ContainerServiceImpl.java
... ... @@ -162,4 +162,9 @@ public class ContainerServiceImpl extends ServiceImpl&lt;ContainerMapper, Container
162 162 }
163 163  
164 164 }
  165 +
  166 + @Override
  167 + public Container findAllByCode(String code) {
  168 + return containerMapper.findAllByCode(code);
  169 + }
165 170 }
... ...
src/main/java/com/huaheng/pc/config/material/controller/MaterialController.java
... ... @@ -156,7 +156,6 @@ public class MaterialController extends BaseController {
156 156  
157 157 /**
158 158 * 导出模板
159   - * @param file
160 159 * @return
161 160 * @throws Exception
162 161 */
... ...
src/main/java/com/huaheng/pc/config/shipmentPreference/service/ShipmentPreferenceService.java
... ... @@ -10,6 +10,6 @@ public interface ShipmentPreferenceService extends IService&lt;ShipmentPreference&gt;{
10 10  
11 11  
12 12 //查看出库此操作是否符合出库首选项的出库流程
13   - List<ShipmentHeader> checkShipmentProcess(String ids, Integer code);
  13 + List<ShipmentHeader> checkShipmentProcess(String ids, Integer status,String code);
14 14  
15 15 }
... ...
src/main/java/com/huaheng/pc/config/shipmentPreference/service/ShipmentPreferenceServiceImpl.java
... ... @@ -45,11 +45,11 @@ public class ShipmentPreferenceServiceImpl extends ServiceImpl&lt;ShipmentPreferenc
45 45 * 4、判断单据是否按出库流程操作
46 46 *
47 47 * @param ids 出库单id
48   - * @param code 状态流
  48 + * @param status 状态流
49 49 * @return
50 50 */
51 51 @Override
52   - public List<ShipmentHeader> checkShipmentProcess(String ids, Integer code) {
  52 + public List<ShipmentHeader> checkShipmentProcess(String ids, Integer status,String code) {
53 53  
54 54 LambdaQueryWrapper<ConfigValue> configValueLambdaQueryWrapper=Wrappers.lambdaQuery();
55 55 configValueLambdaQueryWrapper.eq(ConfigValue::getModuleType,"shipment")
... ... @@ -80,21 +80,33 @@ public class ShipmentPreferenceServiceImpl extends ServiceImpl&lt;ShipmentPreferenc
80 80 LambdaQueryWrapper<StatusFlowDetail> statusFlowDetailLamb = Wrappers.lambdaQuery();
81 81 statusFlowDetailLamb.eq(StatusFlowDetail::getHeaderId,statusFlowHeader.getId())
82 82 .eq(StatusFlowDetail::getWarehouseCode,ShiroUtils.getWarehouseCode())
83   - .eq(StatusFlowDetail::getFlowCode,code.toString());
  83 + .eq(StatusFlowDetail::getFlowCode,status.toString());
84 84 StatusFlowDetail statusFlowDetail = statusFlowDetailService.getOne(statusFlowDetailLamb);
85 85  
86 86 List<ShipmentHeader> shipmentHeaderList = new ArrayList<>();
87   - if(statusFlowDetail != null && statusFlowDetail.getNessary() == 1){
88   - for (Integer id : Convert.toIntArray(ids))
89   - {
90   - //判断单据是否按出库流程操作
91   - ShipmentHeader shipmentHeader = shipmentHeaderService.getById(id);
92   - if(shipmentHeader == null || shipmentHeader.getFirstStatus()<code){
  87 + if(statusFlowDetail != null && statusFlowDetail.getNessary() == 1) {
  88 + if (StringUtils.isNotEmpty(ids)) {
  89 + for (Integer id : Convert.toIntArray(ids)) {
  90 + //判断单据是否按出库流程操作
  91 + ShipmentHeader shipmentHeader = shipmentHeaderService.getById(id);
  92 + if (shipmentHeader == null || shipmentHeader.getFirstStatus() < status) {
  93 + throw new ServiceException("单据状态不对,此操作不符合出库流程,请按照出库流程出库");
  94 + }
  95 + shipmentHeaderList.add(shipmentHeader);
  96 + }
  97 + }
  98 + else {
  99 + LambdaQueryWrapper<ShipmentHeader> lam = Wrappers.lambdaQuery();
  100 + lam.eq(ShipmentHeader::getCode,code)
  101 + .eq(ShipmentHeader::getWarehouseCode,ShiroUtils.getWarehouseCode());
  102 + ShipmentHeader shipmentHeader = shipmentHeaderService.getOne(lam);
  103 + if (shipmentHeader == null || shipmentHeader.getFirstStatus() < status) {
93 104 throw new ServiceException("单据状态不对,此操作不符合出库流程,请按照出库流程出库");
94 105 }
95 106 shipmentHeaderList.add(shipmentHeader);
96 107 }
97 108 }
  109 +
98 110 return shipmentHeaderList;
99 111 }
100 112 }
... ...
src/main/java/com/huaheng/pc/inventory/adjustHeader/controller/adjustHeaderController.java
... ... @@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
4 4 import com.baomidou.mybatisplus.core.metadata.IPage;
5 5 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
6 6 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
  7 +import com.huaheng.common.support.Convert;
7 8 import com.huaheng.common.utils.StringUtils;
8 9 import com.huaheng.common.utils.security.ShiroUtils;
9 10 import com.huaheng.framework.aspectj.lang.annotation.Log;
... ... @@ -13,17 +14,17 @@ import com.huaheng.framework.web.domain.AjaxResult;
13 14 import com.huaheng.framework.web.page.PageDomain;
14 15 import com.huaheng.framework.web.page.TableDataInfo;
15 16 import com.huaheng.framework.web.page.TableSupport;
  17 +import com.huaheng.pc.inventory.adjustDetail.domain.AdjustDetail;
16 18 import com.huaheng.pc.inventory.adjustDetail.service.AdjustDetailService;
17 19 import com.huaheng.pc.inventory.adjustDetail.service.AdjustDetailServiceImpl;
18 20 import com.huaheng.pc.inventory.adjustHeader.domain.AdjustHeader;
19 21 import com.huaheng.pc.inventory.adjustHeader.service.AdjustHeaderService;
20 22 import com.huaheng.pc.inventory.adjustHeader.service.AdjustHeaderServiceImpl;
21 23 import com.huaheng.pc.inventory.cycleCountHeader.domain.CycleCountHeader;
  24 +import org.apache.shiro.authz.annotation.RequiresPermissions;
22 25 import org.springframework.stereotype.Controller;
23   -import org.springframework.web.bind.annotation.GetMapping;
24   -import org.springframework.web.bind.annotation.PostMapping;
25   -import org.springframework.web.bind.annotation.RequestMapping;
26   -import org.springframework.web.bind.annotation.ResponseBody;
  26 +import org.springframework.ui.ModelMap;
  27 +import org.springframework.web.bind.annotation.*;
27 28  
28 29 import javax.annotation.Resource;
29 30 import java.util.Date;
... ... @@ -40,7 +41,6 @@ public class adjustHeaderController extends BaseController {
40 41 private AdjustDetailService adjustDetailService;
41 42  
42 43  
43   -
44 44 private String prefix = "inventory/adjustHeader";
45 45  
46 46  
... ... @@ -90,7 +90,7 @@ public class adjustHeaderController extends BaseController {
90 90 }
91 91  
92 92 /**
93   - * 新增调整单主
  93 + * 新增调整单主页面
94 94 */
95 95 @GetMapping("/add")
96 96 public String add()
... ... @@ -108,13 +108,50 @@ public class adjustHeaderController extends BaseController {
108 108 public AjaxResult addSave(AdjustHeader adjustHeader)
109 109 {
110 110 adjustHeader.setWarehouseCode(ShiroUtils.getWarehouseCode());
111   - adjustHeader.setCreated(new Date());
112   - adjustHeader.setCreatedBy(ShiroUtils.getLoginName());
113   - adjustHeader.setCode(adjustHeaderService.createCode());
114   - return toAjax(adjustHeaderService.save(adjustHeader));
  111 + return AjaxResult.success(adjustHeaderService.addSave(adjustHeader));
115 112 }
116 113  
  114 + /**
  115 + * 删除调整单主
  116 + */
  117 + //@RequiresPermissions("inventory:cycleCount:remove")
  118 + @Log(title = "库存-调整",operating = "删除调整主单", action = BusinessType.DELETE)
  119 + @PostMapping( "/remove")
  120 + @ResponseBody
  121 + public AjaxResult remove(String ids)
  122 + {
  123 + if (StringUtils.isEmpty(ids))
  124 + return AjaxResult.error("id不能为空");
  125 + for (Integer id : Convert.toIntArray(ids))
  126 + {
  127 + AjaxResult result = adjustHeaderService.delete(id);
  128 + if(result.code!=200){
  129 + return result;
  130 + }
  131 + }
  132 + return AjaxResult.success("删除成功!");
  133 + }
117 134  
  135 + /**
  136 + * 调整单打印
  137 + * @return
  138 + */
  139 + //@RequiresPermissions("inventory:cyclecountAdjust:report")
  140 + @GetMapping("/report/{id}")
  141 + public String report(@PathVariable("id") Integer id, ModelMap mmap)
  142 + {
  143 + AdjustHeader adjustHeader = adjustHeaderService.getById(id);
  144 + mmap.put("adjustHeader", adjustHeader);
  145 + //明细
  146 + AdjustDetail adjustDetail = new AdjustDetail();
  147 + adjustDetail.setAdjustCode(adjustHeader.getCode());
  148 + adjustDetail.setWarehouseCode(adjustHeader.getWarehouseCode());
  149 + adjustDetail.setCompanyCode(adjustHeader.getCompanyCode());
  150 + LambdaQueryWrapper<AdjustDetail> adjustDetailLambdaQueryWrapper = Wrappers.lambdaQuery(adjustDetail);
  151 + List<AdjustDetail> adjustDetails = adjustDetailService.list(adjustDetailLambdaQueryWrapper);
  152 + mmap.put("adjustDetails", adjustDetails);
  153 + return prefix + "/report";
  154 + }
118 155  
119 156  
120 157  
... ...
src/main/java/com/huaheng/pc/inventory/adjustHeader/service/AdjustHeaderService.java
1 1 package com.huaheng.pc.inventory.adjustHeader.service;
2 2  
3 3 import com.baomidou.mybatisplus.extension.service.IService;
  4 +import com.huaheng.framework.web.domain.AjaxResult;
4 5 import com.huaheng.pc.inventory.adjustHeader.domain.AdjustHeader;
5 6 import com.huaheng.pc.inventory.cycleCountHeader.domain.CycleCountHeader;
6 7  
... ... @@ -10,8 +11,9 @@ public interface AdjustHeaderService extends IService&lt;AdjustHeader&gt; {
10 11  
11 12 String createCode();
12 13  
  14 + AjaxResult delete(Integer id);
13 15  
14   -
  16 + AjaxResult addSave(AdjustHeader adjustHeader);
15 17  
16 18 }
17 19  
... ...
src/main/java/com/huaheng/pc/inventory/adjustHeader/service/AdjustHeaderServiceImpl.java
1 1 package com.huaheng.pc.inventory.adjustHeader.service;
2 2  
  3 +import com.huaheng.common.utils.StringUtils;
  4 +import com.huaheng.common.utils.security.ShiroUtils;
  5 +import com.huaheng.framework.web.domain.AjaxResult;
  6 +import com.huaheng.pc.inventory.adjustDetail.domain.AdjustDetail;
3 7 import org.springframework.stereotype.Service;
4 8 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
5 9 import com.huaheng.pc.inventory.adjustHeader.domain.AdjustHeader;
6 10 import com.huaheng.pc.inventory.adjustHeader.mapper.AdjustHeaderMapper;
  11 +import org.springframework.transaction.annotation.Transactional;
7 12  
8 13 import javax.annotation.Resource;
9 14 import java.text.SimpleDateFormat;
... ... @@ -21,6 +26,7 @@ public class AdjustHeaderServiceImpl extends ServiceImpl&lt;AdjustHeaderMapper, Adj
21 26  
22 27  
23 28  
  29 +
24 30 //生成差异单号
25 31 @Override
26 32 public String createCode() {
... ... @@ -41,9 +47,56 @@ public class AdjustHeaderServiceImpl extends ServiceImpl&lt;AdjustHeaderMapper, Adj
41 47 return code;
42 48 }
43 49  
  50 + /**
  51 + * 删除
  52 + * 空缺
  53 + * @param id
  54 + * @return
  55 + */
  56 + @Override
  57 + public AjaxResult delete(Integer id) {
  58 + AdjustHeader adjustHeader = this.getById(id);
  59 + if(adjustHeader == null){
  60 + return AjaxResult.error("id为"+id.toString()+"的调整单不存在出,操作中止");
  61 + }
44 62  
  63 + //批量删除子单据
  64 + AdjustDetail temp = new AdjustDetail();
  65 + temp.setAdjustCode(adjustHeader.getCode());
  66 +
  67 + return AjaxResult.success("删除成功");
  68 + }
45 69  
46 70  
  71 + /**
  72 + * 保存新增调整头
  73 + * @param adjustHeader
  74 + * @return
  75 + */
  76 + @Transactional
  77 + @Override
  78 + public AjaxResult addSave(AdjustHeader adjustHeader) {
  79 + //校验调整类型
  80 + //盘点调整,质检调整需要和盘点和质检单据确认。
  81 + switch (adjustHeader.getProblemType()){
  82 + case "checkAdjust": //质检调整
  83 + if(StringUtils.isEmpty(adjustHeader.getCheckCode())){
  84 + throw new SecurityException("选择单据类型为质检调整时,质检单编码不能为空!");
  85 + }
  86 + break;
  87 + case "adjust": //盘点调整
  88 + if(StringUtils.isEmpty(adjustHeader.getCycleCountCode())){
  89 + throw new SecurityException("选择单据类型为盘点调整时,盘点单编码不能为空!");
  90 + }
  91 + break;
  92 + }
  93 +
  94 + adjustHeader.setCreated(new Date());
  95 + adjustHeader.setCreatedBy(ShiroUtils.getLoginName());
  96 + adjustHeader.setCode(this.createCode());
  97 + this.save(adjustHeader);
  98 + return AjaxResult.success("新增调整头成功!");
  99 + }
47 100  
48 101  
49 102 }
... ...
src/main/java/com/huaheng/pc/inventory/cycleCountDetail/controller/CycleCountDetailController.java
... ... @@ -58,9 +58,10 @@ public class CycleCountDetailController extends BaseController {
58 58  
59 59  
60 60  
61   -
62 61 private String prefix = "inventory/cycleCountDetail";
63 62  
  63 +
  64 + @RequiresPermissions("inventory:cyclecountDetail:view")
64 65 @GetMapping()
65 66 public String cyclecountHeader()
66 67 {
... ... @@ -70,7 +71,7 @@ public class CycleCountDetailController extends BaseController {
70 71 /**
71 72 * 查询盘点单主列表
72 73 */
73   - //@RequiresPermissions("inventory:cycleCount:list")
  74 + @RequiresPermissions("inventory:cycleCountDetail:list")
74 75 @PostMapping("/list")
75 76 @Log(title = "库存-盘点",operating = "查看盘点明细", action = BusinessType.GRANT)
76 77 @ResponseBody
... ... @@ -143,7 +144,7 @@ public class CycleCountDetailController extends BaseController {
143 144 /**
144 145 * 新增保存盘点明细
145 146 */
146   - //@RequiresPermissions("inventory:cyclecountDetail:add")
  147 + @RequiresPermissions("inventory:cyclecountDetail:add")
147 148 @Log(title = "库存-盘点", operating = "新增盘点补货明细", action = BusinessType.INSERT)
148 149 @PostMapping("/add")
149 150 @ResponseBody
... ... @@ -155,7 +156,7 @@ public class CycleCountDetailController extends BaseController {
155 156 /**
156 157 * 删除盘点明细
157 158 */
158   - //@RequiresPermissions("inventory:cyclecountDetail:remove")
  159 + @RequiresPermissions("inventory:cyclecountDetail:remove")
159 160 @Log(title = "库存-盘点", operating = "删除盘点明细", action = BusinessType.DELETE)
160 161 @PostMapping( "/remove")
161 162 @ResponseBody
... ... @@ -194,7 +195,7 @@ public class CycleCountDetailController extends BaseController {
194 195 }
195 196  
196 197 /**生成全部盘点任务*/
197   - //@RequiresPermissions("inventory:cyclecountDetail:createTask")
  198 + @RequiresPermissions("inventory:cyclecountDetail:createTask")
198 199 @PostMapping("/createCycleCountTaskByHeadId")
199 200 @ResponseBody
200 201 public AjaxResult createCycleCountTaskByHeadId(String cycleCountHeadCode){
... ... @@ -205,7 +206,7 @@ public class CycleCountDetailController extends BaseController {
205 206 }
206 207  
207 208 /**生成单条盘点任务*/
208   - //@RequiresPermissions("inventory:cyclecountDetail:createTask")
  209 + @RequiresPermissions("inventory:cyclecountDetail:createTask")
209 210 @PostMapping("/createCycleCoutTaskByDetailId")
210 211 @ResponseBody
211 212 public AjaxResult createCycleCoutTaskByDetailId(Integer cycleCoutdetailId){
... ... @@ -221,7 +222,7 @@ public class CycleCountDetailController extends BaseController {
221 222 * @param qty
222 223 * @return
223 224 */
224   - //@RequiresPermissions("inventory:cyclecountDetail:confirm")
  225 + @RequiresPermissions("inventory:cyclecountDetail:confirm")
225 226 @PostMapping("/confirmGapQty")
226 227 @ResponseBody
227 228 public AjaxResult confirmGapQty(Integer detailId, BigDecimal qty){
... ... @@ -233,7 +234,7 @@ public class CycleCountDetailController extends BaseController {
233 234 * @param cycleCountHeadCode
234 235 * @return
235 236 */
236   - //@RequiresPermissions("inventory:cyclecountDetail:cyclecountRepeat")
  237 + @RequiresPermissions("inventory:cyclecountDetail:cyclecountRepeat")
237 238 @PostMapping("/createCyclecountWithGapQty")
238 239 @ResponseBody
239 240 public AjaxResult createCyclecountWithGapQty(String cycleCountHeadCode){
... ...
src/main/java/com/huaheng/pc/inventory/cycleCountHeader/controller/CycleCountHeaderController.java
... ... @@ -44,15 +44,12 @@ public class CycleCountHeaderController extends BaseController {
44 44 private CycleCountHeaderService cycleCountHeaderService;
45 45 @Resource
46 46 private CycleCountDetailService cycleCountDetailService;
47   - @Resource
48   - private AdjustHeaderService adjustHeaderService;
49   -
50 47  
51 48  
52 49 private String prefix = "inventory/cycleCountHeader";
53 50  
54 51  
55   - //@RequiresPermissions("inventory:cycleCount:view")
  52 + @RequiresPermissions("inventory:cycleCountHeader:view")
56 53 @GetMapping()
57 54 public String cyclecountHeader()
58 55 {
... ... @@ -62,7 +59,7 @@ public class CycleCountHeaderController extends BaseController {
62 59 /**
63 60 * 查询盘点单主列表
64 61 */
65   - //@RequiresPermissions("inventory:cycleCount:list")
  62 + @RequiresPermissions("inventory:cycleCountHeader:list")
66 63 @PostMapping("/list")
67 64 @Log(title = "库存-盘点",operating = "查看盘点主单", action = BusinessType.GRANT)
68 65 @ResponseBody
... ... @@ -95,6 +92,9 @@ public class CycleCountHeaderController extends BaseController {
95 92 }
96 93  
97 94 }
  95 +
  96 +
  97 +
98 98 /**
99 99 * 新增盘点单主
100 100 */
... ... @@ -107,7 +107,7 @@ public class CycleCountHeaderController extends BaseController {
107 107 /**
108 108 * 新增保存盘点单主
109 109 */
110   - //@RequiresPermissions("inventory:cycleCount:add")
  110 + @RequiresPermissions("inventory:cycleCountHeader:add")
111 111 @Log(title = "库存-盘点",operating = "新增盘点主单", action = BusinessType.INSERT)
112 112 @PostMapping("/add")
113 113 @ResponseBody
... ... @@ -137,7 +137,7 @@ public class CycleCountHeaderController extends BaseController {
137 137 /**
138 138 * 修改保存盘点单主
139 139 */
140   - //@RequiresPermissions("inventory:cycleCount:edit")
  140 + @RequiresPermissions("inventory:cycleCountHeader:edit")
141 141 @Log(title = "库存-盘点",operating = "修改盘点主单", action = BusinessType.UPDATE)
142 142 @PostMapping("/edit")
143 143 @ResponseBody
... ... @@ -151,7 +151,7 @@ public class CycleCountHeaderController extends BaseController {
151 151 /**
152 152 * 删除盘点单主
153 153 */
154   - //@RequiresPermissions("inventory:cycleCount:remove")
  154 + @RequiresPermissions("inventory:cycleCountHeader:remove")
155 155 @Log(title = "库存-盘点",operating = "删除盘点主单", action = BusinessType.DELETE)
156 156 @PostMapping( "/remove")
157 157 @ResponseBody
... ... @@ -173,7 +173,7 @@ public class CycleCountHeaderController extends BaseController {
173 173 *
174 174 * 生成调整单
175 175 * */
176   - //@RequiresPermissions("inventory:cyclecountHead:addAdjust")
  176 + @RequiresPermissions("inventory:cyclecountHead:addAdjust")
177 177 @Log(title = "库存-盘点", operating = "新增盘点差异调整单", action = BusinessType.INSERT)
178 178 @PostMapping("/goAdjust")
179 179 @ResponseBody
... ... @@ -187,7 +187,7 @@ public class CycleCountHeaderController extends BaseController {
187 187 * 盘点单报表打印
188 188 * @return
189 189 */
190   - //@RequiresPermissions("inventory:cycleCount:report")
  190 + @RequiresPermissions("inventory:cycleCountHeader:report")
191 191 @GetMapping("/report/{id}")
192 192 public String report(@PathVariable("id") Integer id, ModelMap mmap)
193 193 {
... ...
src/main/java/com/huaheng/pc/inventory/inventoryDetail/controller/InventoryDetailController.java
... ... @@ -18,6 +18,7 @@ import com.huaheng.pc.config.material.service.MaterialServiceImpl;
18 18 import com.huaheng.pc.inventory.inventoryDetail.domain.InventoryDetail;
19 19 import com.huaheng.pc.inventory.inventoryDetail.service.InventoryDetailService;
20 20 import com.huaheng.pc.inventory.inventoryHeader.service.InventoryHeaderService;
  21 +import org.apache.shiro.authz.annotation.RequiresPermissions;
21 22 import org.springframework.stereotype.Controller;
22 23 import org.springframework.web.bind.annotation.GetMapping;
23 24 import org.springframework.web.bind.annotation.PostMapping;
... ... @@ -160,9 +161,8 @@ public class InventoryDetailController extends BaseController
160 161 return AjaxResult.success("库存明细出库查看任务下发成功!");
161 162 }
162 163  
163   -
164 164 /**在库质检*/
165   - //@RequiresPermissions("inventory:inventoryHeader:detailCheckTask")
  165 + @RequiresPermissions("inventory:inventoryDetail:detailCheckTask")
166 166 @PostMapping("/detailCheckTask")
167 167 @ResponseBody
168 168 public AjaxResult detailCheckTask(String ids) throws InvocationTargetException, IllegalAccessException {
... ...
src/main/java/com/huaheng/pc/inventory/inventoryHeader/controller/InventoryHeaderController.java
... ... @@ -95,7 +95,7 @@ public class InventoryHeaderController extends BaseController
95 95 }
96 96  
97 97 /**移库*/
98   - //@RequiresPermissions("inventory:inventoryHeader:transfer")
  98 + @RequiresPermissions("inventory:inventoryHeader:transfer")
99 99 @PostMapping("/transfer")
100 100 @ResponseBody
101 101 public AjaxResult transfer(String sourceLocation, String destinationLocation){
... ... @@ -106,7 +106,7 @@ public class InventoryHeaderController extends BaseController
106 106 }
107 107  
108 108 /**出库查看*/
109   - //@RequiresPermissions("inventory:inventoryHeader:seeOut")
  109 + @RequiresPermissions("inventory:inventoryHeader:seeOut")
110 110 @PostMapping("/createCheckOutTask")
111 111 @ResponseBody
112 112 public AjaxResult createCheckOutTask(String[] ids){
... ... @@ -130,7 +130,7 @@ public class InventoryHeaderController extends BaseController
130 130 * @param destinationLocation
131 131 * @return
132 132 */
133   - //@RequiresPermissions("task:task:emptyIn")
  133 + @RequiresPermissions("inventory:inventoryHeader:emptyIn")
134 134 @PostMapping("/emptyIn")
135 135 @Log(title = "任务-任务管理", operating = "生成空托盘入库任务", action = BusinessType.INSERT)
136 136 @ResponseBody
... ... @@ -155,7 +155,7 @@ public class InventoryHeaderController extends BaseController
155 155 * @param sourceLocation
156 156 * @return
157 157 */
158   - //@RequiresPermissions("task:task:emptyOut")
  158 + @RequiresPermissions("inventory:inventoryHeader:emptyOut")
159 159 @PostMapping("/emptyOut")
160 160 @Log(title = "任务-任务管理", operating = "生成空托盘出库任务", action = BusinessType.INSERT)
161 161 @ResponseBody
... ... @@ -180,7 +180,7 @@ public class InventoryHeaderController extends BaseController
180 180 * @param location
181 181 * @return
182 182 */
183   - //@RequiresPermissions("task:task:emptyInOut")
  183 + @RequiresPermissions("inventory:inventoryHeader:emptyCheckOut")
184 184 @PostMapping("/emptyCheckOut")
185 185 @Log(title = "任务-任务管理", operating = "生成空托盘出库查看任务", action = BusinessType.INSERT)
186 186 @ResponseBody
... ...
src/main/java/com/huaheng/pc/inventory/inventoryTransaction/controller/InventoryTransactionController.java
... ... @@ -18,6 +18,7 @@ import com.huaheng.pc.inventory.inventoryHeader.service.InventoryHeaderService;
18 18 import com.huaheng.pc.inventory.inventoryTransaction.domain.InventoryTransaction;
19 19 import com.huaheng.pc.inventory.inventoryTransaction.service.InventoryTransactionService;
20 20 import io.swagger.models.auth.In;
  21 +import org.apache.shiro.authz.annotation.RequiresPermissions;
21 22 import org.springframework.stereotype.Controller;
22 23 import org.springframework.ui.ModelMap;
23 24 import org.springframework.web.bind.annotation.*;
... ... @@ -43,7 +44,7 @@ public class InventoryTransactionController extends BaseController{
43 44  
44 45 private String prefix = "inventory/inventoryTransaction";
45 46  
46   - //@RequiresPermissions("inventory:inventoryTransaction:view")
  47 + @RequiresPermissions("inventory:inventoryTransaction:view")
47 48 @GetMapping()
48 49 public String inventoryTransaction()
49 50 {
... ... @@ -53,7 +54,7 @@ public class InventoryTransactionController extends BaseController{
53 54 /**
54 55 * 查询库存交易列表
55 56 */
56   - //@RequiresPermissions("inventory:inventoryTransaction:inventoryTransactionList")
  57 + @RequiresPermissions("inventory:inventoryTransaction:inventoryTransactionList")
57 58 @Log(title = "库存-库存交易",operating = "查看库存交易列表", action = BusinessType.GRANT)
58 59 @PostMapping("/inventoryTransactionList")
59 60 @ResponseBody
... ... @@ -95,15 +96,16 @@ public class InventoryTransactionController extends BaseController{
95 96 }
96 97 }
97 98  
98   - //@RequiresPermissions("receipt:bill:report")
  99 + @RequiresPermissions("inventory:inventoryTransaction:view:report")
99 100 @Log(title = "库存-库存交易明细", operating = "库存交易明细报表打印", action = BusinessType.OTHER)
100 101 @GetMapping("/report/{ids}")
101 102 public String report(@PathVariable("ids") Integer[] ids, ModelMap mmap)
102 103 {
103   - List<InventoryTransaction> list=new ArrayList<InventoryTransaction>();
  104 + List<InventoryTransaction> list = new ArrayList<>();
104 105 for(Integer id:ids){
105   - if(id!=null) {
106   - //list.add(inventoryTransaction);
  106 + if(id != null) {
  107 + InventoryTransaction inventoryTransaction = inventoryTransactionService.getById(id);
  108 + list.add(inventoryTransaction);
107 109 }
108 110 mmap.put("inventoryTransaction", list);
109 111 }
... ...
src/main/java/com/huaheng/pc/receipt/receiptContainerDetail/service/ReceiptContainerDetailServiceImpl.java
... ... @@ -59,6 +59,9 @@ public class ReceiptContainerDetailServiceImpl extends ServiceImpl&lt;ReceiptContai
59 59 ReceiptDetail receiptDetail = receiptDetailService.getById(receiptContainerDetail.getReceiptDetailId());
60 60 receiptDetail.setOpenQty(receiptDetail.getOpenQty().subtract(receiptContainerDetail.getQty()));
61 61  
  62 + //如果为临时容器,则删除
  63 + receiptContainerDetail.getContainerCode();
  64 +
62 65 if (!receiptDetailService.updateById(receiptDetail)){throw new SecurityException("回滚入库单明细失败");}
63 66 //删除组盘明细
64 67 if (!this.removeById(id)){ throw new ServiceException("回滚入库组盘失败");}
... ... @@ -70,12 +73,15 @@ public class ReceiptContainerDetailServiceImpl extends ServiceImpl&lt;ReceiptContai
70 73 throw new ServiceException("删除入库组盘头失败");
71 74 }
72 75 }
  76 +
73 77 //查询入库头表
74 78 LambdaQueryWrapper<ReceiptContainerDetail> containerDetailLambda = Wrappers.lambdaQuery();
75 79 containerDetailLambda.eq(ReceiptContainerDetail::getReceiptId, receiptContainerDetail.getReceiptId());
76 80 List<ReceiptContainerDetail> containerDetailList = this.list(containerDetailLambda);
  81 +
  82 +
77 83 //如果入库组盘没有该入库单的组盘信息,回滚入库单状态
78   - if (containerDetailList == null){
  84 + if (containerDetailList.size() == 0){
79 85 ReceiptHeader receiptHeader = new ReceiptHeader();
80 86 receiptHeader.setId(receiptContainerDetail.getReceiptId());
81 87 receiptHeader.setFirstStatus(200);
... ...
src/main/java/com/huaheng/pc/receipt/receiptContainerHeader/service/ReceiptContainerHeaderServiceImpl.java
... ... @@ -72,6 +72,7 @@ public class ReceiptContainerHeaderServiceImpl extends ServiceImpl&lt;ReceiptContai
72 72 //检查容器编码合法性
73 73 Integer taskType = checkContainer(containerCode, detail.getMaterialCode());
74 74 if (taskType == 1){
  75 + //创建临时容器
75 76 containerCode = createContainer();
76 77 taskType = 100;
77 78 }else {
... ... @@ -97,6 +98,8 @@ public class ReceiptContainerHeaderServiceImpl extends ServiceImpl&lt;ReceiptContai
97 98 receiptContainerHeader.setWarehouseCode(ShiroUtils.getWarehouseCode());
98 99 receiptContainerHeader.setCompanyCode(receiptDetail.getCompanyCode());
99 100 receiptContainerHeader.setContainerCode(containerCode);
  101 + Container container = containerService.findAllByCode(containerCode);
  102 + receiptContainerHeader.setContainerType(container.getContainerType());
100 103 receiptContainerHeader.setTaskType(String.valueOf(taskType));
101 104 receiptContainerHeader.setProjectNo(receiptDetail.getProjectNo());
102 105 receiptContainerHeader.setToLocation(locationCode);
... ... @@ -128,6 +131,11 @@ public class ReceiptContainerHeaderServiceImpl extends ServiceImpl&lt;ReceiptContai
128 131 receiptContainerDetailAdd(receiptContainerHeaders.get(0).getId(), receiptDetail, qty, containerCode, locationCode);
129 132 //如果单据数量等于已收数量,更新入库详情状态和入库单状态
130 133 if (receiptDetail.getTotalQty() == receiptDetail.getOpenQty()){
  134 + receiptDetail.setProcessStamp("200");
  135 + if (!receiptDetailService.updateById(receiptDetail)){
  136 + throw new ServiceException("更新入库详情处理标记失败");
  137 + }
  138 +
131 139 ReceiptDetail receiptDetail1 = receiptDetailService.queryflow(receiptDetail);
132 140 if (!receiptDetailService.updateById(receiptDetail1)){
133 141 throw new ServiceException("更新入库详情下一流程失败");
... ... @@ -182,7 +190,9 @@ public class ReceiptContainerHeaderServiceImpl extends ServiceImpl&lt;ReceiptContai
182 190 }
183 191 }
184 192 //删除入库组盘头表
185   - this.removeById(id);
  193 + if (!this.removeById(id)){
  194 + throw new ServiceException("删除入库组盘头表失败");
  195 + }
186 196 } else {
187 197 throw new ServiceException("已生成任务不允许取消");
188 198 }
... ...
src/main/java/com/huaheng/pc/receipt/receiptHeader/controller/ReceiptHeaderController.java
... ... @@ -137,7 +137,8 @@ public class ReceiptHeaderController extends BaseController {
137 137 @PostMapping("/edit")
138 138 @ResponseBody
139 139 public AjaxResult editSave(ReceiptHeader receiptHeader) {
140   - if (receiptHeader.getFirstStatus() >100 | receiptHeader.getLastStatus()>100){
  140 + ReceiptHeader receiptHeader1 = receiptHeaderService.getById(receiptHeader.getId());
  141 + if (receiptHeader1.getFirstStatus() >100 | receiptHeader1.getLastStatus()>100){
141 142 return AjaxResult.error("已进入订单池,不允许修改");
142 143 }
143 144 receiptHeader.setLastUpdatedBy(ShiroUtils.getLoginName());
... ... @@ -223,7 +224,7 @@ public class ReceiptHeaderController extends BaseController {
223 224 */
224 225 @ApiOperation(value="保存入库预约", notes="保存入库预约", httpMethod = "POST")
225 226 @RequiresPermissions("receipt:receiptHeader:reservation")
226   - @Log(title = "入库-入库单 ",operating = "入库单到货", action = BusinessType.UPDATE)
  227 + @Log(title = "入库-入库单 ",operating = "入库单预约", action = BusinessType.UPDATE)
227 228 @PostMapping("/arrival")
228 229 @ResponseBody
229 230 public AjaxResult reservation(ReceiptHeader receiptHeader) {
... ... @@ -287,4 +288,19 @@ public class ReceiptHeaderController extends BaseController {
287 288 }
288 289 return AjaxResult.success(receiptHeaderService.getById(id));
289 290 }
  291 +
  292 + /**
  293 + * 到货通知
  294 + */
  295 + @ApiOperation(value="到货通知 ", notes="到货通知 ", httpMethod = "POST")
  296 + @RequiresPermissions("receipt:receiptDetail:add")
  297 + @Log(title = "入库-入库单 ",operating = "到货通知 ", action = BusinessType.OTHER)
  298 + @PostMapping("/arrivalNotice")
  299 + @ResponseBody
  300 + public AjaxResult arrivalNotice(String id) {
  301 + if (StringUtils.isEmpty(id)){
  302 + return AjaxResult.success("");
  303 + }
  304 + return AjaxResult.success(receiptHeaderService.arrivalNotice(id));
  305 + }
290 306 }
... ...
src/main/java/com/huaheng/pc/receipt/receiptHeader/service/ReceiptHeaderService.java
... ... @@ -15,6 +15,7 @@ import com.huaheng.pc.check.checkHeader.domain.CheckHeader;
15 15 import com.huaheng.pc.check.checkHeader.service.CheckHeaderService;
16 16 import com.huaheng.pc.config.receiptType.domain.ReceiptType;
17 17 import com.huaheng.pc.config.receiptType.service.ReceiptTypeService;
  18 +import com.huaheng.pc.config.sendMail.service.SendMailService;
18 19 import com.huaheng.pc.config.statusFlow.domain.StatusFlowDetail;
19 20 import com.huaheng.pc.config.statusFlow.service.StatusFlowDetailService;
20 21 import com.huaheng.pc.receipt.receiptDetail.domain.ReceiptDetail;
... ... @@ -41,6 +42,8 @@ public class ReceiptHeaderService extends ServiceImpl&lt;ReceiptHeaderMapper, Recei
41 42 private CheckHeaderService checkHeaderService;
42 43 @Resource
43 44 private CheckDetailService checkDetailService;
  45 + @Resource
  46 + private SendMailService sendMailService;
44 47  
45 48 /**
46 49 * 保存入库单
... ... @@ -223,4 +226,24 @@ public class ReceiptHeaderService extends ServiceImpl&lt;ReceiptHeaderMapper, Recei
223 226 }
224 227 return AjaxResult.success("提交审核成功");
225 228 }
  229 +
  230 + /**
  231 + * 到货通知
  232 + * @param id
  233 + * @return
  234 + */
  235 + public AjaxResult arrivalNotice(String id){
  236 + LambdaQueryWrapper<ReceiptDetail> lambda = Wrappers.lambdaQuery();
  237 + lambda.eq(ReceiptDetail::getReceiptId, id);
  238 + List<ReceiptDetail> receiptDetails = receiptDetailService.list(lambda);
  239 + for (ReceiptDetail receiptDetail : receiptDetails) {
  240 + receiptDetail.setProcessStamp(String.valueOf(150));
  241 + receiptDetailService.updateById(receiptDetail);
  242 + if (!receiptDetailService.updateById(receiptDetailService.queryflow(receiptDetail))){
  243 + throw new ServiceException("更新入库明细处理标记出错");
  244 + }
  245 + receiptDetailService.updateReceiptHeaderLastStatus(receiptDetail.getReceiptId());
  246 + }
  247 + return AjaxResult.success("");
  248 + }
226 249 }
... ...
src/main/java/com/huaheng/pc/receipt/receiving/controller/ReceivingController.java
1 1 package com.huaheng.pc.receipt.receiving.controller;
2 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 3 import com.huaheng.framework.aspectj.lang.annotation.Log;
7 4 import com.huaheng.framework.aspectj.lang.constant.BusinessType;
8 5 import com.huaheng.framework.web.controller.BaseController;
... ... @@ -10,8 +7,6 @@ import com.huaheng.framework.web.domain.AjaxResult;
10 7 import com.huaheng.pc.receipt.receiptContainerDetail.service.ReceiptContainerDetailService;
11 8 import com.huaheng.pc.receipt.receiptContainerHeader.service.ReceiptContainerHeaderService;
12 9 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 10 import io.swagger.annotations.ApiOperation;
16 11 import io.swagger.annotations.ApiParam;
17 12 import org.apache.shiro.authz.annotation.RequiresPermissions;
... ...
src/main/java/com/huaheng/pc/receipt/receiving/service/ReceivingService.java
... ... @@ -182,16 +182,17 @@ public class ReceivingService {
182 182 throw new ServiceException("组盘已生成任务不能取消定位");
183 183 }
184 184 //将入库组盘头表中的而库位编码赋值null
185   - receiptContainerHeader.setToLocation(null);
  185 + receiptContainerHeader.setToLocation("");
186 186 if (!receiptContainerHeaderService.updateById(receiptContainerHeader)){
187 187 throw new ServiceException("回滚入库组盘头失败");
188 188 }
189 189  
  190 + //将入库组盘明细的库位修改为空
190 191 LambdaQueryWrapper<ReceiptContainerDetail> lambdaQueryWrapper = Wrappers.lambdaQuery();
191 192 lambdaQueryWrapper.eq(ReceiptContainerDetail::getReceiptContainerId, receiptContainerDetail.getReceiptContainerId());
192 193 List<ReceiptContainerDetail> receiptContainerDetailList = receiptContainerDetailService.list(lambdaQueryWrapper);
193 194 for (ReceiptContainerDetail receiptContainerDetail2 : receiptContainerDetailList) {
194   - receiptContainerDetail2.setLocationCode(null);
  195 + receiptContainerDetail2.setLocationCode("");
195 196 if (!receiptContainerDetailService.updateById(receiptContainerDetail2)){
196 197 throw new ServiceException("回滚入库组盘明细失败");
197 198 }
... ...
src/main/java/com/huaheng/pc/shipment/shipmentContainerHeader/service/ShipmentContainerHeaderServiceImpl.java
... ... @@ -195,7 +195,8 @@ public class ShipmentContainerHeaderServiceImpl extends ServiceImpl&lt;ShipmentCont
195 195  
196 196 //1.查看是否有状态小于等于20的组盘头,有就需新建组盘头,没有就新建
197 197 LambdaQueryWrapper<ShipmentContainerHeader> lambdaQueryWrapper=Wrappers.lambdaQuery();
198   - lambdaQueryWrapper.eq(ShipmentContainerHeader::getContainerCode,location.getContainerCode())
  198 + lambdaQueryWrapper.eq(ShipmentContainerHeader::getLocationCode,location.getCode())
  199 + .eq(ShipmentContainerHeader::getContainerCode,location.getContainerCode())
199 200 .eq(ShipmentContainerHeader::getWarehouseCode,ShiroUtils.getWarehouseCode())
200 201 .le(ShipmentContainerHeader::getStatus,20);
201 202 ShipmentContainerHeader shipmentContainerHeader = this.getOne(lambdaQueryWrapper);
... ... @@ -249,6 +250,8 @@ public class ShipmentContainerHeaderServiceImpl extends ServiceImpl&lt;ShipmentCont
249 250 //1.查看是否有同一出库明细的物料需要出库
250 251 LambdaQueryWrapper<ShipmentContainerDetail> lambdaQueryWrapper=Wrappers.lambdaQuery();
251 252 lambdaQueryWrapper.eq(ShipmentContainerDetail::getShippingContainerId,shipmentContainerHeader.getId())
  253 + .eq(ShipmentContainerDetail::getLocationCode,shipmentContainerHeader.getLocationCode())
  254 + .eq(ShipmentContainerDetail::getContainerCode,shipmentContainerHeader.getContainerCode())
252 255 .eq(ShipmentContainerDetail::getShipmentDetailId,shipmentCombinationModel.getShipmentDetailId())
253 256 .eq(ShipmentContainerDetail::getWarehouseCode,ShiroUtils.getWarehouseCode());
254 257 ShipmentContainerDetail shipmentContainerDetail = shipmentContainerDetailService.getOne(lambdaQueryWrapper);
... ... @@ -289,11 +292,12 @@ public class ShipmentContainerHeaderServiceImpl extends ServiceImpl&lt;ShipmentCont
289 292 shipmentContainerDetaill.setQty(shipmentCombinationModel.getShipQty());
290 293 shipmentContainerDetaill.setWaveId(shipmentDetail.getWaveId());
291 294 shipmentContainerDetaill.setTaskCreated(0);
  295 + shipmentContainerDetaill.setStatus(0);
292 296 shipmentContainerDetaill.setBatch(shipmentDetail.getBatch());
293 297 shipmentContainerDetaill.setLot(shipmentDetail.getLot());
294 298 shipmentContainerDetaill.setProjectNo(shipmentDetail.getProjectNo());
295 299 shipmentContainerDetaill.setCreatedBy(ShiroUtils.getLoginName());
296   - flag = shipmentContainerDetailService.save(shipmentContainerDetail);
  300 + flag = shipmentContainerDetailService.save(shipmentContainerDetaill);
297 301 if(flag == false){
298 302 throw new ServiceException("新建组盘明细失败,sql错误");
299 303 }
... ... @@ -408,7 +412,7 @@ public class ShipmentContainerHeaderServiceImpl extends ServiceImpl&lt;ShipmentCont
408 412 if(shipmentDetail.getRequestQty().compareTo(BigDecimal.ZERO) != 0 ){
409 413 shipmentDetail.setStatus(200);//明细状态恢复,如果删除后还有以出数量就是波次
410 414 }else{
411   - shipmentDetail.setStatus(0 );//明细状态
  415 + shipmentDetail.setStatus(100 );//明细状态
412 416 }
413 417 shipmentDetailService.saveOrUpdate(shipmentDetail);
414 418 //删除这个配盘明细
... ... @@ -468,7 +472,7 @@ public class ShipmentContainerHeaderServiceImpl extends ServiceImpl&lt;ShipmentCont
468 472 if(shipmentHeader == null){
469 473 throw new ServiceException("系统没有此单据");
470 474 }
471   - shipmentPreferenceService.checkShipmentProcess(shipmentHeader.getId().toString(),100);
  475 + shipmentPreferenceService.checkShipmentProcess(shipmentHeader.getId().toString(),100,shipmentCode);
472 476  
473 477 LambdaQueryWrapper<ShipmentDetail> lambdaQueryWrapper = Wrappers.lambdaQuery();
474 478 lambdaQueryWrapper.eq(ShipmentDetail::getShipmentCode, shipmentCode)
... ...
src/main/java/com/huaheng/pc/shipment/shipmentDetail/controller/ShipmentDetailController.java
... ... @@ -13,10 +13,12 @@ import com.huaheng.framework.web.domain.AjaxResult;
13 13 import com.huaheng.framework.web.page.PageDomain;
14 14 import com.huaheng.framework.web.page.TableDataInfo;
15 15 import com.huaheng.framework.web.page.TableSupport;
  16 +import com.huaheng.pc.config.shipmentPreference.service.ShipmentPreferenceService;
16 17 import com.huaheng.pc.inventory.inventoryDetail.domain.InventoryDetail;
17 18 import com.huaheng.pc.inventory.inventoryDetail.service.InventoryDetailService;
18 19 import com.huaheng.pc.shipment.shipmentDetail.domain.ShipmentDetail;
19 20 import com.huaheng.pc.shipment.shipmentDetail.service.ShipmentDetailService;
  21 +import com.huaheng.pc.shipment.shipmentHeader.domain.ShipmentHeader;
20 22 import org.apache.shiro.authz.annotation.RequiresPermissions;
21 23 import org.springframework.beans.factory.annotation.Autowired;
22 24 import org.springframework.stereotype.Controller;
... ... @@ -41,6 +43,8 @@ public class ShipmentDetailController extends BaseController
41 43 private ShipmentDetailService shipmentDetailService;
42 44 @Autowired
43 45 private InventoryDetailService inventoryDetailService;
  46 + @Autowired
  47 + private ShipmentPreferenceService shipmentPreferenceService;
44 48  
45 49  
46 50  
... ... @@ -162,4 +166,15 @@ public class ShipmentDetailController extends BaseController
162 166  
163 167  
164 168  
  169 + @RequiresPermissions("shipment:bill:view")
  170 + @PostMapping( "/shippingCombination")
  171 + @ResponseBody
  172 + public AjaxResult ShippingCombination(String shipmentCode, ModelMap map){
  173 + map.put("code", shipmentCode);
  174 + Integer status = 100;
  175 + String ids="";
  176 + List<ShipmentHeader> shipmentHeaderList =shipmentPreferenceService.checkShipmentProcess(ids,status,shipmentCode);
  177 + return AjaxResult.success("成功");
  178 + }
  179 +
165 180 }
... ...
src/main/java/com/huaheng/pc/shipment/shipmentDetail/service/ShipmentDetailServiceImpl.java
... ... @@ -174,7 +174,7 @@ public class ShipmentDetailServiceImpl extends ServiceImpl&lt;ShipmentDetailMapper,
174 174 @Transactional
175 175 public void saveWave(String ids, String code) {
176 176 Integer status = 100;
177   - List<ShipmentHeader> shipmentHeaderList =shipmentPreferenceService.checkShipmentProcess(ids,status);
  177 + List<ShipmentHeader> shipmentHeaderList =shipmentPreferenceService.checkShipmentProcess(ids,status,code);
178 178  
179 179 //找到波次主表,看系统是否有此波次
180 180 LambdaQueryWrapper<WaveMaster> lam=Wrappers.lambdaQuery();
... ...
src/main/java/com/huaheng/pc/shipment/shipmentHeader/service/ShipmentHeaderServiceImpl.java
... ... @@ -106,25 +106,19 @@ public class ShipmentHeaderServiceImpl extends ServiceImpl&lt;ShipmentHeaderMapper,
106 106 Map<String,Integer> map = shipmentContainerHeaderService.getShipmentContainerMaxAndMinStatusByShipmentID(shipmentId);
107 107 if(map==null){
108 108 //说明没有货箱,则直接首位均为新建
109   - shipmentHeader.setFirstStatus(0);
110   - shipmentHeader.setLastStatus(0);
  109 + shipmentHeader.setFirstStatus(100);
  110 + shipmentHeader.setLastStatus(100);
111 111 this.saveOrUpdate(shipmentHeader);
112 112 }else {
113 113 int firstStatus = map.get("maxStatus");
114 114 int lastStatus = map.get("minStatus");
115   - if(firstStatus<20){
116   - shipmentHeader.setFirstStatus(200);
117   - }
118   - if(firstStatus==20){
  115 + if(firstStatus<=20){
119 116 shipmentHeader.setFirstStatus(300);
120 117 }
121 118 if(firstStatus==30){
122 119 shipmentHeader.setFirstStatus(500);
123 120 }
124   - if(lastStatus<20){
125   - shipmentHeader.setLastStatus(200);
126   - }
127   - if(lastStatus==20){
  121 + if(lastStatus <=20){
128 122 shipmentHeader.setLastStatus(300);
129 123 }
130 124 if(lastStatus==30){
... ... @@ -133,7 +127,7 @@ public class ShipmentHeaderServiceImpl extends ServiceImpl&lt;ShipmentHeaderMapper,
133 127 //是否存在未配盘的数量,如果是,则尾状态为新建
134 128 Integer UnCompleted = shipmentDetailService.countUnCompleted(shipmentId);
135 129 if(UnCompleted != null && UnCompleted.intValue() > 0){
136   - shipmentHeader.setLastStatus(0);
  130 + shipmentHeader.setLastStatus(100);
137 131 }
138 132 this.saveOrUpdate(shipmentHeader);
139 133 }
... ...
src/main/java/com/huaheng/pc/shipment/shippingCombination/controller/ShippingCombinationController.java
... ... @@ -53,6 +53,8 @@ public class ShippingCombinationController extends BaseController {
53 53 ShipmentContainerDetailService shipmentContainerDetailService;
54 54 @Autowired
55 55 ShipmentHeaderService shipmentHeaderService;
  56 + @Autowired
  57 + ShipmentPreferenceService shipmentPreferenceService;
56 58  
57 59  
58 60 /**
... ...
src/main/java/com/huaheng/pc/system/user/controller/IndexController.java
... ... @@ -73,7 +73,7 @@ public class IndexController extends BaseController
73 73 pie.itemStyle().emphasis().setShadowBlur(10);
74 74 pie.itemStyle().emphasis().setShadowOffsetX(0);
75 75 pie.itemStyle().emphasis().setShadowColor("rgba(0, 0, 0, 0.4)");
76   - String sql = "SELECT d.dictLabel '状态', i.qty '库存' FROM (SELECT status ,SUM(qty) qty FROM inventoryHeader WHERE warehouseCode = " + ShiroUtils.getWarehouseCode() + " GROUP BY status) i INNER JOIN sys_dict_data d ON i.status= d.dictValue AND d.warehouseCode = ' " + ShiroUtils.getWarehouseCode()+"' ;";
  76 + String sql = "SELECT d.dictLabel '状态', i.qty '库存' FROM (SELECT inventorySts ,SUM(qty) qty FROM inventory_detail WHERE warehouseCode = '" + ShiroUtils.getWarehouseCode()+"' GROUP BY inventorySts) i INNER JOIN sys_dict_data d ON i.inventorySts= d.dictValue AND d.warehouseCode = '" + ShiroUtils.getWarehouseCode()+"' ;";
77 77 List<LinkedHashMap<String, Object>> results = mapper.selectCommon(sql);
78 78 for(LinkedHashMap<String, Object> item : results){
79 79 ChartData chartData = new ChartData();
... ... @@ -147,7 +147,7 @@ public class IndexController extends BaseController
147 147 " union all\n" +
148 148 " SELECT date_sub(curdate(), interval 6 day) as click_date\n" +
149 149 ") a left join (\n" +
150   - "SELECT DATE(h.created) AS created , SUM(d.qty) AS taskQty from shipment_container_detail d join shipment_container_header h on d.shippingContainerId = h.id and h.warehouseCode='"+ShiroUtils.getWarehouseCode()+"' WHERE h.created >= DATE_SUB(CURDATE(), INTERVAL 7 DAY) AND h.enable>19 GROUP BY DATE(h.created)\n" +
  150 + "SELECT DATE(h.created) AS created , SUM(d.qty) AS taskQty from shipment_container_detail d join shipment_container_header h on d.shippingContainerId = h.id and h.warehouseCode='"+ShiroUtils.getWarehouseCode()+"' WHERE h.created >= DATE_SUB(CURDATE(), INTERVAL 7 DAY) AND h.status=30 GROUP BY DATE(h.created)\n" +
151 151 ") b on a.click_date = b.created ORDER BY a.click_date;";
152 152 List<LinkedHashMap<String, Object>> list = mapper.selectCommon(sql);
153 153  
... ... @@ -167,7 +167,7 @@ public class IndexController extends BaseController
167 167 " union all\n" +
168 168 " SELECT date_sub(curdate(), interval 6 day) as click_date\n" +
169 169 ") a left join (\n" +
170   - "SELECT DATE(h.created) AS created , SUM(d.qty) AS taskQty from receipt_container_detail d join receipt_container_header h on d.headerId = h.id and h.warehouseCode="+ShiroUtils.getWarehouseCode()+" WHERE h.created >= DATE_SUB(CURDATE(), INTERVAL 7 DAY) AND h.processStamp=20 GROUP BY DATE(h.created)\n" +
  170 + "SELECT DATE(h.created) AS created , SUM(d.qty) AS taskQty from receipt_container_detail d join receipt_container_header h on d.receiptContainerId = h.id and h.warehouseCode='"+ShiroUtils.getWarehouseCode()+"' WHERE h.created >= DATE_SUB(CURDATE(), INTERVAL 7 DAY) AND h.processStamp=20 GROUP BY DATE(h.created)\n" +
171 171 ") b on a.click_date = b.created ORDER BY a.click_date;";
172 172 List<LinkedHashMap<String, Object>> list2 = mapper.selectCommon(sql);
173 173  
... ... @@ -211,7 +211,7 @@ public class IndexController extends BaseController
211 211 @GetMapping("index/getInventoryProp")
212 212 @ResponseBody
213 213 public String getInventoryProp(){
214   - String sql = "SELECT m.`name`,sum(i.qty) as total from inventoryHeader i join material m on i.materialCode = m.`code` and i.warehouseId = m.warehouseId AND i.warehouseCode = "+ShiroUtils.getWarehouseCode()+" \n" +
  214 + String sql = "SELECT m.`name`,sum(i.qty) as total from inventory_detail i join material m on i.materialCode = m.`code` and i.warehouseCode = m.warehouseCode AND i.warehouseCode = '"+ShiroUtils.getWarehouseCode()+"' \n" +
215 215 "GROUP BY m.`name` ORDER BY total desc;";
216 216 List<LinkedHashMap<String, Object>> results = mapper.selectCommon(sql);
217 217  
... ...
src/main/java/com/huaheng/pc/task/taskHeader/service/TaskHeaderServiceImpl.java
... ... @@ -865,6 +865,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
865 865  
866 866 for (String id : ids) {
867 867 InventoryHeader inventoryHeader = inventoryHeaderService.getById(Integer.parseInt(id));
  868 + //校验库位是否锁定
868 869 //检查库位容器
869 870 Location temp = new Location();
870 871 temp.setCode(inventoryHeader.getLocationCode());
... ... @@ -924,7 +925,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
924 925 }
925 926 if (taskDetailService.saveBatch(taskDetails)) {
926 927 //锁定库位状态
927   - locationService.updateStatus(loc.getContainerCode(), "lock");
  928 + locationService.updateStatus(inventoryHeader.getLocationCode(), "lock");
928 929 } else {
929 930 throw new ServiceException("出库查看任务明细生成失败!");
930 931 }
... ... @@ -1339,8 +1340,8 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
1339 1340  
1340 1341 ShipmentHeader shipmentHeader =new ShipmentHeader();
1341 1342 shipmentHeader.setId(shipmentDetailService.getOne(shipmentDetailLambdaQueryWrapper).getShipmentId());
1342   - shipmentHeader.setFirstStatus(100);
1343   - shipmentHeader.setLastStatus(100);
  1343 + shipmentHeader.setFirstStatus(300);
  1344 + shipmentHeader.setLastStatus(300);
1344 1345 shipmentHeader.setLastUpdatedBy(ShiroUtils.getLoginName());
1345 1346 shipmentHeader.setLastUpdated(new Date());
1346 1347 shipmentHeaderService.updateById(shipmentHeader);
... ...
src/main/resources/mybatis/config/ContainerMapper.xml
... ... @@ -52,4 +52,7 @@
52 52 UPDATE container set `status`=#{status}, locationCode=#{locationCode} WHERE warehouseCode=#{warehouseCode} AND `code`=#{containerCode}
53 53 </update>
54 54  
  55 + <select id="findAllByCode" resultMap="BaseResultMap" parameterType="java.lang.String">
  56 + SELECT * FROM container WHERE code = #{code,jdbcType=VARCHAR}
  57 + </select>
55 58 </mapper>
56 59 \ No newline at end of file
... ...
src/main/resources/templates/check/checkHeader/checkHeader.html
... ... @@ -103,10 +103,12 @@
103 103 </div>
104 104  
105 105 <div class="btn-group hidden-xs" id="toolbarReg" role="group">
106   - <a class="btn btn-outline btn-success btn-rounded" onclick="complete()" shiro:hasPermission="check:checkingRegister:remove">
  106 + <a class="btn btn-outline btn-success btn-rounded" onclick="complete()"
  107 + shiro:hasPermission="check:checkingRegister:remove">
107 108 <i class="fa fa-check-circle-o"></i> 质检完成
108 109 </a>
109   - <a class="btn btn-outline btn-danger btn-rounded" onclick="$.operate.batRemove()" shiro:hasPermission="check:checkingRegister:remove">
  110 + <a class="btn btn-outline btn-danger btn-rounded" onclick="$.operate.batRemove()"
  111 + shiro:hasPermission="check:checkingRegister:remove">
110 112 <i class="fa fa-trash-o"></i> 删除
111 113 </a>
112 114 </div>
... ...
src/main/resources/templates/config/filterConfigHeader/add.html
... ... @@ -5,14 +5,7 @@
5 5 <body class="white-bg">
6 6 <div class="wrapper wrapper-content animated fadeInRight ibox-content">
7 7 <form class="form-horizontal m" id="form-filterConfigHeader-add">
8   - <div class="form-group">
9   - <label class="col-sm-3 control-label">模块:</label>
10   - <div class="col-sm-8">
11   - <select class="form-control" name="moduleType" th:with="moduleType=${@dict.getType('moduleType')}">
12   - <option th:each="item : ${moduleType}" th:text="${item['dictLabel']}" th:value="${item['dictValue']}"></option>
13   - </select>
14   - </div>
15   - </div>
  8 + <input name="moduleType" th:field="${moduleType}" type="hidden">
16 9 <div class="form-group">
17 10 <label class="col-sm-3 control-label">类型:</label>
18 11 <div class="col-sm-8">
... ...
src/main/resources/templates/config/filterConfigHeader/filterConfigHeader.html
... ... @@ -79,7 +79,7 @@
79 79 $(function() {
80 80 var options = {
81 81 url: prefix + "/list",
82   - createUrl: prefix + "/add",
  82 + createUrl: prefix + "/add/"+[[${moduleType}]],
83 83 updateUrl: prefix + "/edit/{id}",
84 84 removeUrl: prefix + "/remove",
85 85 modalName: "规则配置主表",
... ...
src/main/resources/templates/inventory/adjustHeader/add.html
... ... @@ -6,106 +6,66 @@
6 6 <div class="wrapper wrapper-content animated fadeInRight ibox-content">
7 7  
8 8 <form class="form-horizontal m" id="form-adjustHeader-add" >
  9 +
9 10 <div class="form-group">
10   - <label class="col-sm-3 control-label">调整单编号:</label>
  11 + <label class="col-sm-3 control-label">货主:</label>
11 12 <div class="col-sm-8">
12   - <input id="code" name="code" class="form-control" type="text">
  13 + <select id="companyCode" name="companyCode" class="form-control" th:with="list=${@companyService.getCode()}">
  14 + <option th:each="item : ${list}" th:text="${item['name']}" th:value="${item['code']}" th:attr = " code = ${item['code']}"></option>
  15 + </select>
13 16 </div>
14 17 </div>
  18 + <!--<div class="form-group">
  19 + <label class="col-sm-3 control-label">调整类型:</label>
  20 + <div class="col-sm-8">
  21 + <div class="col-sm-8">
  22 + <select id="problemType" name="problemType" class="form-control" th:with="problemType=${@dict.getType('adjustType')}">
  23 + <option th:each="dict : ${problemType}" th:text="${dict['dictLabel']}" th:value="${dict['dictValue']}"></option>
  24 + </select>
  25 + </div>
  26 + </div>
  27 + </div>-->
  28 +
15 29 <div class="form-group">
16   - <label class="col-sm-3 control-label">货主编码:</label>
  30 + <label class="col-sm-3 control-label">调整类型:</label>
17 31 <div class="col-sm-8">
18   - <input id="companyCode" name="companyCode" class="form-control" type="text" readonly="readonly">
  32 + <select id="problemType" name="problemType" class="form-control" th:with="problemType=${@dict.getType('adjustType')}">
  33 + <option th:each="dict : ${problemType}" th:text="${dict['dictLabel']}" th:value="${dict['dictValue']}"></option>
  34 + </select>
19 35 </div>
20 36 </div>
21 37 <div class="form-group">
22   - <label class="col-sm-3 control-label">盘点单编:</label>
  38 + <label class="col-sm-3 control-label">盘点单编:</label>
23 39 <div class="col-sm-8">
24   - <input id="cyclecountHeadCode" name="cyclecountHeadCode" class="form-control" type="text" readonly="readonly">
  40 + <input id="cyclecountHeadCode" name="cyclecountHeadCode" class="form-control" type="text" onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')">
25 41 </div>
26 42 </div>
27 43 <div class="form-group">
28   - <label class="col-sm-3 control-label">物料编码:</label>
  44 + <label class="col-sm-3 control-label">质检单编码:</label>
29 45 <div class="col-sm-8">
30   - <input id="materialCode" name="materialCode" class="form-control" type="text" onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')">
  46 + <input id="checkCode" name="checkCode" class="form-control" type="text" onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')">
31 47 </div>
32 48 </div>
33 49 <div class="form-group">
34   - <label class="col-sm-3 control-label">库位编码:</label>
  50 + <label class="col-sm-3 control-label">关联上游单编码:</label>
35 51 <div class="col-sm-8">
36   - <input id="locationCode" name="locationCode" class="form-control" type="text" onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')">
  52 + <input id="referCode" name="referCode" class="form-control" type="text" onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')">
37 53 </div>
38 54 </div>
39 55 <div class="form-group">
40   - <label class="col-sm-3 control-label">容器编号:</label>
  56 + <label class="col-sm-3 control-label">关联上游说明:</label>
41 57 <div class="col-sm-8">
42   - <input id="containerCode" name="containerCode" class="form-control" type="text" onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')">
  58 + <input id="referReason" name="referReason" class="form-control" type="text" >
43 59 </div>
44 60 </div>
45   - <div class="form-group">
  61 + <!--<div class="form-group">
46 62 <label class="col-sm-3 control-label">库存状态:</label>
47 63 <div class="col-sm-8">
48 64 <select id="inventoryStatus" name="inventoryStatus" class="form-control" th:with="inventoryStatus=${@dict.getType('inventoryStatus')}">
49 65 <option th:each="dict : ${inventoryStatus}" th:text="${dict['dictLabel']}" th:value="${dict['dictValue']}"></option>
50 66 </select>
51 67 </div>
52   - </div>
53   - <div class="form-group">
54   - <label class="col-sm-3 control-label">系统数量:</label>
55   - <div class="col-sm-8">
56   - <input id="systemQty" name="systemQty" value="0" class="form-control" type="text" onkeyup="this.value=this.value.replace(/[^\-?\d.]/g,'')" readonly="readonly">
57   - </div>
58   - </div>
59   - <div class="form-group">
60   - <label class="col-sm-3 control-label">实际数量:</label>
61   - <div class="col-sm-8">
62   - <input id="countedQty" name="countedQty" class="form-control" type="text" onkeyup="this.value=this.value.replace(/[^\-?\d.]/g,'')" >
63   - </div>
64   - </div>
65   - <div class="form-group">
66   - <label class="col-sm-3 control-label">差异数量:</label>
67   - <div class="col-sm-8">
68   - <input id="gapQty" name="gapQty" class="form-control" type="text" onkeyup="this.value=this.value.replace(/[^\-?\d.]/g,'')" >
69   - </div>
70   - </div>
71   - <div class="form-group">
72   - <label class="col-sm-3 control-label">调整数量:</label>
73   - <div class="col-sm-8">
74   - <input id="adjustQty" name="adjustQty" class="form-control" type="text" onkeyup="this.value=this.value.replace(/[^\-?\d.]/g,'')">
75   - </div>
76   - </div>
77   -
78   - <div class="form-group">
79   - <label class="col-sm-3 control-label">批次:</label>
80   - <div class="col-sm-8">
81   - <input id="batch" name="batch" class="form-control" type="text" >
82   - </div>
83   - </div>
84   - <div class="form-group">
85   - <label class="col-sm-3 control-label">批号:</label>
86   - <div class="col-sm-8">
87   - <input id="lot" name="lot" class="form-control" type="text" >
88   - </div>
89   - </div>
90   - <div class="form-group">
91   - <label class="col-sm-3 control-label">项目号:</label>
92   - <div class="col-sm-8">
93   - <input id="project" name="project" class="form-control" type="text" >
94   - </div>
95   - </div>
96   - <div class="form-group">
97   - <label class="col-sm-3 control-label">生产日期:</label>
98   - <div class="col-sm-8">
99   - <input id="manufactureDate" name="manufactureDate" class="form-control" type="text" >
100   - </div>
101   - </div>
102   - <div class="form-group">
103   - <label class="col-sm-3 control-label">失效日期:</label>
104   - <div class="col-sm-8">
105   - <input id="expirationDate" name="expirationDate" class="form-control" type="text">
106   - </div>
107   - </div>
108   -
  68 + </div>-->
109 69  
110 70 <div class="form-group">
111 71 <div class="form-control-static col-sm-offset-9">
... ... @@ -121,28 +81,12 @@
121 81  
122 82 $("#form-adjustHeader-add").validate({
123 83 rules:{
124   - materialCode:{
125   - required:true,
126   - },
127   - containerCode:{
128   - required:true,
129   - },
130   - locationCode:{
  84 + companyCode:{
131 85 required:true,
132 86 },
133   - systemQty:{
  87 + problemType:{
134 88 required:true,
135 89 },
136   - countedQty:{
137   - required:true,
138   - },
139   - gapQty:{
140   - required:true,
141   - },
142   - adjustQty:{
143   - required:true,
144   - },
145   -
146 90 //必须填值判定
147 91 },
148 92 submitHandler: function(form) {
... ...
src/main/resources/templates/inventory/adjustHeader/adjustHeader.html
... ... @@ -131,10 +131,11 @@
131 131 field: 'cycleCountCode',
132 132 title: '盘点单编码'
133 133 },
134   - /*{
135   - field: 'problemType',
136   - title: '调整类型'
137   - },*/
  134 + {
  135 + field: 'checkCode',
  136 + title: '质检单编码'
  137 + },
  138 +
138 139 {
139 140 field: 'referCode',
140 141 title: '关联上游单编码'
... ... @@ -179,9 +180,9 @@
179 180 align: 'center',
180 181 formatter: function (value, row, index) {
181 182 var actions = [];
182   - actions.push('<a class="btn btn-success btn-xs ' + report + '" href="#" onclick="cyclecountPrint(\'' + row.id + '\')"><i class="fa fa-print"></i>打印</a> ');
183   - actions.push('<a class="btn btn-info btn-xs ' + upload + ' " href="#" onclick="upLoad(\'' + row.code + '\',\'' + row.sourceCode + '\')"><i class="fa fa-edit"></i>上传</a> ');
184   - actions.push('<a class="btn btn-danger btn-xs " href="#" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-trash-o"></i>删除</a> ');
  183 + /* actions.push('<a class="btn btn-success btn-xs " href="#" onclick="adjustPrint(\'' + row.id + '\')"><i class="fa fa-print"></i>打印</a> ');
  184 + actions.push('<a class="btn btn-info btn-xs ' + upload + ' " href="#" onclick="upLoad(\'' + row.code + '\',\'' + row.sourceCode + '\')"><i class="fa fa-edit"></i>上传</a> ');
  185 + actions.push('<a class="btn btn-danger btn-xs " href="#" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-trash-o"></i>删除</a> ');*/
185 186 actions.push('<a style="background: #b5bdc0" class="btn btn-default btn-xs " href="#" onclick="detail(\'' + row.id + '\',\'' + row.code + '\')"><i class="fa fa-list-ul"></i>明细</a>');
186 187 return actions.join('');
187 188 }
... ... @@ -212,7 +213,7 @@
212 213 $("#tabDetail").addClass("in active");
213 214 }
214 215  
215   - function cyclecountPrint(id) {
  216 + function adjustPrint(id) {
216 217 var url = prefix + "/report/" + id;
217 218 $.modal.open("调整单打印", url);
218 219 }
... ...
src/main/resources/templates/inventory/adjustHeader/report.html
... ... @@ -10,8 +10,8 @@
10 10 <tr>
11 11 <td colspan="10">
12 12 <span style="padding-top:40px;width: 40%; float:left;" class="time_c"></span>
13   - <h2 style="width:24%;text-align:center;float:left;padding-top:10px;">盘点差异调整单</h2>
14   - <span style="padding-top:20px;width:35%;float:right; text-align: right"><img id="code" th:data="${cyclecountAdjust['code']}"></img></span>
  13 + <h2 style="width:24%;text-align:center;float:left;padding-top:10px;">调整单</h2>
  14 + <span style="padding-top:20px;width:35%;float:right; text-align: right"><img id="code" th:data="${adjustHeader['code']}"></img></span>
15 15 </td>
16 16 </tr>
17 17 <tr style="padding:15px 0 5px 0;border-bottom:1px solid #606060">
... ... @@ -35,7 +35,7 @@
35 35 </tr>
36 36 </thead>
37 37 <tbody>
38   - <tr th:each="row,rowStat : ${details}">
  38 + <tr th:each="row,rowStat : ${adjustDetails}">
39 39 <td th:text="${row.containerCode}"></td>
40 40 <td th:text="${row.id}"></td>
41 41 <td th:text="${row.materialCode}"></td>
... ...
src/main/resources/templates/inventory/cycleCountDetail/cycleCountDetail.html
... ... @@ -85,7 +85,7 @@
85 85 </div>
86 86 <div class="btn-group hidden-xs" id="toolbar" role="group">
87 87 <a class="btn btn-outline btn-success btn-rounded" onclick="add()"
88   - shiro:hasPermission="inventory:cycleCountDetail:add">
  88 + shiro:hasPermission="inventory:cyclecountDetail:add">
89 89 <i class="fa fa-plus"></i> 新增
90 90 </a>
91 91 <a class="btn btn-outline btn-danger btn-rounded" onclick="createCyclecountWithGapQty()"
... ... @@ -98,7 +98,7 @@
98 98 </a>
99 99 <a class="btn btn-outline btn-danger btn-rounded" onclick="batRemove()"
100 100 shiro:hasPermission="inventory:cyclecountDetail:remove">
101   - <i class="fa fa-trash-o"></i> 批量删除
  101 + <i class="fa fa-trash-o"></i> 删除
102 102 </a>
103 103 <a class="btn btn-outline btn-success btn-rounded" onclick="$.table.refresh()">
104 104 <i class="fa fa-refresh"></i> 刷新
... ... @@ -109,10 +109,10 @@
109 109 </div>
110 110 <div th:include="include :: footer"></div>
111 111 <script th:inline="javascript">
112   - var editFlag = [[${@permission.hasPermi('inventoryHeader:cycleCountDetail:edit')}]];
113   - var removeFlag = [[${@permission.hasPermi('inventoryHeader:cycleCountDetail:remove')}]];
114   - var confirmFlag=[[${@permission.hasPermi('inventoryHeader:cycleCountDetail:confirm')}]];
115   - var createTaskFalg=[[${@permission.hasPermi('inventoryHeader:cycleCountDetail:createTask')}]];
  112 + //var editFlag = [[${@permission.hasPermi('inventory:cyclecountDetail:edit')}]];
  113 + var removeFlag = [[${@permission.hasPermi('inventory:cyclecountDetail:remove')}]];
  114 + var confirmFlag = [[${@permission.hasPermi('inventory:cyclecountDetail:confirm')}]];
  115 + var createTaskFalg = [[${@permission.hasPermi('inventory:cyclecountDetail:createTask')}]];
116 116 var prefix = ctx + "inventory/cycleCountDetail";
117 117 var prefix_head = ctx + "inventory/cycleCountHeader";
118 118 var remove_url= prefix + "/remove";
... ... @@ -319,11 +319,12 @@
319 319 formatter: function (value, row, index) {
320 320 var actions = [];
321 321  
322   - actions.push('<a class="btn btn-success btn-xs " href="#" onclick="confirmGapQty(\'' + row.id + '\')"><i class="fa fa-comment"></i>实盘登记</a> ');
  322 + actions.push('<a class="btn btn-success btn-xs ' + confirmFlag + '" href="#" onclick="confirmGapQty(\'' + row.id + '\')"><i class="fa fa-comment"></i>实盘登记</a> ');
323 323  
324   - actions.push('<a class="btn btn-primary btn-xs " href="#" onclick="outcheck(\'' + row.id + '\')"><i class="fa fa-gbp"></i>生成盘点任务</a> ');
  324 + actions.push('<a class="btn btn-primary btn-xs ' + createTaskFalg + '" href="#" onclick="outcheck(\'' + row.id + '\')"><i class="fa fa-gbp"></i>生成盘点任务</a> ');
  325 +
  326 + actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="#" onclick="remove(\'' + row.id + '\')" ><i class="fa fa-trash-o"></i>删除</a>');
325 327  
326   - actions.push('<a class="btn btn-danger btn-xs " href="#" onclick="remove(\'' + row.id + '\')" ><i class="fa fa-trash-o"></i>删除</a>');
327 328 return actions.join('');
328 329 }
329 330 }]
... ...
src/main/resources/templates/inventory/cycleCountHeader/cycleCountHeader.html
... ... @@ -70,13 +70,13 @@
70 70 </div>
71 71 <div class="btn-group hidden-xs" id="toolbar" role="group">
72 72 <a class="btn btn-outline btn-success btn-rounded" onclick="$.operate.add()"
73   - shiro:hasPermission="inventory:cycleCount:add">
  73 + shiro:hasPermission="inventory:cycleCountHeader:add">
74 74 <i class="fa fa-plus"></i> 新增
75 75 </a>
76   - <a class="btn btn-outline btn-danger btn-rounded" onclick="$.operate.batRemove()"
77   - shiro:hasPermission="inventory:cycleCount:remove">
  76 + <!--<a class="btn btn-outline btn-danger btn-rounded" onclick="$.operate.batRemove()"
  77 + shiro:hasPermission="inventory:cycleCountHeader:remove">
78 78 <i class="fa fa-trash-o"></i> 删除
79   - </a>
  79 + </a>-->
80 80 </div>
81 81 <table id="bootstrap-table" data-mobile-responsive="true"
82 82 class="table table-bordered table-hover"></table>
... ... @@ -89,10 +89,10 @@
89 89 </div>
90 90 <div th:include="include :: footer"></div>
91 91 <script th:inline="javascript">
92   - var reportFlag = [[${@permission.hasPermi('inventoryHeader:cycleCount:report')}]];
93   - var editFlag = [[${@permission.hasPermi('inventoryHeader:cycleCount:edit')}]];
94   - var addAdjust = [[${@permission.hasPermi('inventoryHeader:cyclecountHead:addAdjust')}]];
95   - var removeFlag = [[${@permission.hasPermi('inventoryHeader:cycleCount:remove')}]];
  92 + var reportFlag = [[${@permission.hasPermi('inventory:cycleCountHeader:report')}]];
  93 + //var editFlag = [[${@permission.hasPermi('inventory:cycleCountHeader:edit')}]];
  94 + var addAdjust = [[${@permission.hasPermi('inventory:cyclecountHead:addAdjust')}]];
  95 + var removeFlag = [[${@permission.hasPermi('inventory:cycleCount:remove')}]];
96 96 var prefix = ctx + "inventory/cycleCountHeader";
97 97 var datas = [[${@dict.getType('sys_normal_disable')}]];
98 98 var types = [[${@dict.getType('cyclecountType')}]];
... ... @@ -274,12 +274,12 @@
274 274 align: 'center',
275 275 formatter: function (value, row, index) {
276 276 var actions = [];
277   - actions.push('<a class="btn btn-success btn-xs " href="#" onclick="cyclecountPrint(\'' + row.id + '\')"><i class="fa fa-print"></i>打印</a> ');
  277 + actions.push('<a class="btn btn-success btn-xs ' + reportFlag + '" href="#" onclick="cyclecountPrint(\'' + row.id + '\')"><i class="fa fa-print"></i>打印</a> ');
278 278  
279   - actions.push('<a class="btn btn-warning btn-xs " href="#" onclick="goAdjust(\'' + row.id + '\')"><i class="fa fa-gbp"></i>生成调整单</a> ');
  279 + actions.push('<a class="btn btn-warning btn-xs ' + addAdjust + '" href="#" onclick="goAdjust(\'' + row.id + '\')"><i class="fa fa-gbp"></i>生成调整单</a> ');
280 280  
281   - //actions.push('<a class="btn btn-info btn-xs " href="#" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
282   - actions.push('<a class="btn btn-danger btn-xs " href="#" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-trash-o"></i>删除</a> ');
  281 + //actions.push('<a class="btn btn-info btn-xs ' + editFlag + '" href="#" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
  282 + actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="#" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-trash-o"></i>删除</a> ');
283 283 return actions.join('');
284 284 }
285 285 }]
... ...
src/main/resources/templates/inventory/inventoryDetail/inventoryDetail.html
... ... @@ -83,11 +83,11 @@
83 83 </div>
84 84 <div class="btn-group hidden-xs" id="toolbar" role="group">
85 85 <a class="btn btn-outline btn-primary btn-rounded" onclick="checkOut()"
86   - shiro:hasPermission="inventory:inventory:seeOut">
  86 + shiro:hasPermission="inventory:inventoryHeader:seeOut">
87 87 <i class="fa fa-eye"></i> 出库查看
88 88 </a>
89 89 <a class="btn btn-outline btn-primary btn-rounded" onclick="check()"
90   - >
  90 + shiro:hasPermission="inventory:inventoryDetail:detailCheckTask">
91 91 <i class="fa fa-eye"></i> 在库质检
92 92 </a>
93 93 </div>
... ...
src/main/resources/templates/inventory/inventoryHeader/inventoryHeader.html
... ... @@ -53,19 +53,24 @@
53 53 </form>
54 54 </div>
55 55 <div class="btn-group hidden-xs" id="toolbar" role="group">
56   - <a class="btn btn-outline btn-danger btn-rounded" onclick="transfer()">
  56 + <a class="btn btn-outline btn-danger btn-rounded" onclick="transfer()"
  57 + shiro:hasPermission="inventory:inventoryHeader:transfer">
57 58 <i class="fa fa-exchange"></i> 立库移库
58 59 </a>
59   - <a class="btn btn-outline btn-primary btn-rounded" onclick="checkOut()">
  60 + <a class="btn btn-outline btn-primary btn-rounded" onclick="checkOut()"
  61 + shiro:hasPermission="inventory:inventoryHeader:seeOut">
60 62 <i class="fa fa-eye"></i> 出库查看
61 63 </a>
62   - <a class="btn btn-outline btn-info btn-rounded" onclick="emptyIn()" shiro:hasPermission="task:task:emptyIn">
  64 + <a class="btn btn-outline btn-info btn-rounded" onclick="emptyIn()"
  65 + shiro:hasPermission="inventory:inventoryHeader:emptyIn">
63 66 <i class="fa fa-level-down"></i> 空托入库
64 67 </a>
65   - <a class="btn btn-outline btn-default btn-rounded" onclick="emptyCheckOut()" >
  68 + <a class="btn btn-outline btn-default btn-rounded" onclick="emptyCheckOut()"
  69 + shiro:hasPermission="inventory:inventoryHeader:emptyCheckOut">
66 70 <i class="fa fa fa-eye"></i> 空托出库查看
67 71 </a>
68   - <a class="btn btn-outline btn-info btn-rounded" onclick="emptyOut()" shiro:hasPermission="task:task:emptyOut">
  72 + <a class="btn btn-outline btn-info btn-rounded" onclick="emptyOut()"
  73 + shiro:hasPermission="inventory:inventoryHeader:emptyOut">
69 74 <i class="fa fa-level-up"></i> 空托出库
70 75 </a>
71 76 </div>
... ...
src/main/resources/templates/inventory/inventoryTransaction/inventoryTransaction.html
... ... @@ -81,7 +81,8 @@
81 81 </div>
82 82 <div class="col-sm-12 select-info">
83 83 <div class="btn-group hidden-xs" id="toolbar" role="group">
84   - <a class="btn btn-outline btn-success btn-rounded" onclick="report()">
  84 + <a class="btn btn-outline btn-success btn-rounded" onclick="report()"
  85 + shiro:hasPermission="inventory:inventoryTransaction:report">
85 86 <i class="fa fa-plus"></i> 打印
86 87 </a>
87 88 </div>
... ...
src/main/resources/templates/inventory/inventoryTransaction/report.html
... ... @@ -4,7 +4,7 @@
4 4 <head>
5 5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
6 6 <head th:include="include :: header"></head>
7   - <title>文字</title>
  7 + <title>库存交易明细</title>
8 8 <!--<link href="css/bootstrap.min.css" rel="stylesheet" />-->
9 9 <!--<link href="css/font-awesome.min.css" rel="stylesheet" />-->
10 10 <!--&lt;!&ndash;[if IE]>-->
... ... @@ -33,19 +33,19 @@
33 33 <caption style="font-size:18px;text-align:center; color:#333; padding-bottom: 3px;">长沙华恒机器人系统有限公司</caption>
34 34 <tbody>
35 35 <tr>
36   - <td width="20%" scope="col">存货编码</td>
  36 + <td width="20%" scope="col">物料编码</td>
37 37 <td colspan="2" scope="col" style="text-align:center">
38 38 <span th:text="${row.materialCode}" ></span>
39 39 </td>
40 40 </tr>
41 41 <tr>
42   - <td scope="col">存货代码</td>
  42 + <td scope="col">重量</td>
43 43 <td colspan="2" scope="col" style="text-align:center">
44   - <span th:text="${row.userDef1}" ></span>
  44 + <span th:text="${row.weight}" ></span>
45 45 </td>
46 46 </tr>
47 47 <tr style="vertical-align:middle">
48   - <td>存货名称</td>
  48 + <td>物料名称</td>
49 49 <td style="text-align:center">
50 50 <span th:text="${row.materialName}"></span>
51 51 </td>
... ... @@ -56,22 +56,22 @@
56 56 </td>
57 57 </tr>
58 58 <tr>
59   - <td>规格型号</td>
  59 + <td>物料规格</td>
60 60 <td style="text-align:center">
61 61 <span th:text="${row.materialSpec}"></span>
62 62 </td>
63 63 </tr>
64 64 <tr>
65   - <td>数&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;量</td>
  65 + <td>任务数量</td>
66 66 <td style="text-align:center; padding: 0">
67 67 <!--<input name="" type="text" style="line-height:18px; border:0; text-align:center;" th:text="${receiptDetail.qty}"/>-->
68   - <input id="qty" name="qty" th:value="*{row.qty}" class="form-control" type="text" style="text-align:center;height:30px;border: none"/>
  68 + <input id="qty" name="qty" th:value="*{row.taskQty}" class="form-control" type="text" style="text-align:center;height:30px;border: none"/>
69 69 </td>
70 70 </tr>
71 71 <tr>
72   - <td scope="col">生产编号</td>
  72 + <td scope="col">项目号</td>
73 73 <td colspan="2" scope="col" style="text-align:center">
74   - <span th:text="${row.project}" ></span>
  74 + <span th:text="${row.projectNo}" ></span>
75 75 </td>
76 76 </tr>
77 77 </tbody>
... ... @@ -102,12 +102,12 @@
102 102 var code16=$(this).children()[1].children[1].innerText;
103 103 var name=$(this).children()[1].children[2].innerText;
104 104 var spec=$(this).children()[1].children[3].innerText;
105   - var project=$(this).children()[1].children[5].innerText;
  105 + var projectNo=$(this).children()[1].children[5].innerText;
106 106 company=company.substring(5);
107 107 code16=code16.substring(5);
108 108 name=name.substring(5);
109 109 spec=spec.substring(5);
110   - project=project.substring(5);
  110 + projectNo=projectNo.substring(5);
111 111 var reg=/\t/;
112 112 name=name.replace(reg,"");
113 113 var qty=$(this).find('input').val();
... ...
src/main/resources/templates/main.html
... ... @@ -112,18 +112,18 @@
112 112 var chart4 = echarts.init(document.getElementById('chart4'));
113 113  
114 114 function refresh() {
115   - // $.get("../index/getShipmentsLast7Days").done(function (data) {
116   - // chart1.setOption(JSON.parse(data));
117   - // })
  115 + $.get("../index/getShipmentsLast7Days").done(function (data) {
  116 + chart1.setOption(JSON.parse(data));
  117 + })
118 118 $.get("../index/getLocationProp").done(function (data) {
119 119 chart2.setOption(JSON.parse(data));
120 120 });
121   - // $.get("../index/getInventoryStatus").done(function (data) {
122   - // chart3.setOption(JSON.parse(data));
123   - // })
124   - // $.get("../index/getInventoryProp").done(function(data){
125   - // chart4.setOption(JSON.parse(data));
126   - // });
  121 + $.get("../index/getInventoryStatus").done(function (data) {
  122 + chart3.setOption(JSON.parse(data));
  123 + })
  124 + $.get("../index/getInventoryProp").done(function(data){
  125 + chart4.setOption(JSON.parse(data));
  126 + });
127 127  
128 128 $.get("../index/getCommonData").done(function (data) {
129 129 if(data.code==200){
... ...
src/main/resources/templates/receipt/receiptHeader/edit.html
... ... @@ -54,9 +54,6 @@
54 54 },
55 55 companyCode:{
56 56 required:true,
57   - },
58   - scheduledArriveDate:{
59   - required:true,
60 57 }
61 58 },
62 59 submitHandler: function(form) {
... ...
src/main/resources/templates/receipt/receiptHeader/receiptHeader.html
... ... @@ -807,6 +807,12 @@
807 807 var data = { "id": id };
808 808 $.operate.submit(url, "post", "json", data);
809 809 }
  810 +
  811 + function arrivalNotice(id) {
  812 + var url = prefix+"/arrivalNotice";
  813 + var data = { "id": id };
  814 + $.operate.submit(url, "post", "json", data);
  815 + }
810 816 </script>
811 817 </body>
812 818 </html>
813 819 \ No newline at end of file
... ...
src/main/resources/templates/receipt/receiving/receiving.html
... ... @@ -189,15 +189,11 @@
189 189 updateUrl: prefix + "/edit/{id}",
190 190 removeUrl: prefix + "/remove",
191 191 contentType: "application/x-www-form-urlencoded",
192   - // search: true, //搜索
193   - // showRefresh: true,//刷新
194   - // showToggle:true, //视图切换
195 192 clickToSelect: true,
196   - // showColumns:true, //列选择
197   - // detailView:true,
198   - // showExport: true, //导出
199   - // exportDataType: "all", //导出类型basic', 'all', 'selected'.当前页、所有数据、选中数据
200 193 modalName: "收货",
  194 + onRefresh: function(){
  195 +
  196 + },
201 197 columns: [
202 198 {
203 199 field:'work',
... ... @@ -367,6 +363,7 @@
367 363 }
368 364 localStorage.removeItem("receiving_code");
369 365 }
  366 +
370 367 receiving_refresh();
371 368  
372 369 function remove(id) {
... ... @@ -390,7 +387,18 @@
390 387 ids += ",";
391 388 }
392 389 var data = { "ids": ids };
393   - $.operate.submit(url, "post", "json", data);
  390 + $.modal.loading("正在处理中,请稍后...");
  391 + var config = {
  392 + url: url,
  393 + type: "post",
  394 + dataType: "json",
  395 + data: data,
  396 + success: function(result) {
  397 + $.operate.ajaxSuccess(result);
  398 + list_receiptInfo($("#code").val());
  399 + }
  400 + };
  401 + $.ajax(config)
394 402 }
395 403  
396 404 function cancelPositioning() {
... ... @@ -406,7 +414,20 @@
406 414 ids += ",";
407 415 }
408 416 var data = { "ids": ids };
409   - $.operate.submit(url, "post", "json", data);
  417 +
  418 + $.modal.loading("正在处理中,请稍后...");
  419 + var config = {
  420 + url: url,
  421 + type: "post",
  422 + dataType: "json",
  423 + data: data,
  424 + success: function(result) {
  425 + $.operate.ajaxSuccess(result);
  426 + list_receiptInfo($("#code").val());
  427 + }
  428 + };
  429 + $.ajax(config)
  430 +
410 431 }
411 432  
412 433 function batRemove() {
... ... @@ -418,11 +439,22 @@
418 439 var url = ctx+"receipt/receiptContainerDetail/remove";
419 440 var ids = "";
420 441 for (var i = 0; i<rows.length; i++){
421   - ids += rows[i].receiptContainerId;
  442 + ids += rows[i].id;
422 443 ids += ",";
423 444 }
424 445 var data = { "ids": ids };
425   - $.operate.submit(url, "post", "json", data);
  446 + var config = {
  447 + url: url,
  448 + type: "post",
  449 + dataType: "json",
  450 + data: data,
  451 + success: function(result) {
  452 + $.operate.ajaxSuccess(result);
  453 + list_receiptInfo($("#code").val());
  454 + list_select($("#code").val());
  455 + }
  456 + };
  457 + $.ajax(config)
426 458 }
427 459 </script>
428 460 </body>
... ...
src/main/resources/templates/shipment/shipmentContainerHeader/shipmentContainerHeader.html
... ... @@ -93,7 +93,7 @@
93 93 var shipmentTaskType=[[${@dict.getType('shipmentTaskType')}]];
94 94 var shipmentContainerHeaderStatus=[[${@dict.getType('shipmentContainerHeaderStatus')}]];
95 95 var createTaskFlag = [[${@permission.hasPermi('shipment:container:add')}]]
96   - var headerId;
  96 + var shippingContainerId;
97 97  
98 98 $(function() {
99 99 var options = {
... ... @@ -291,7 +291,7 @@
291 291 ]
292 292 });
293 293  
294   - function createtable(url,headerId) {
  294 + function createtable(url,shippingContainerId) {
295 295 // $("#tabDetail").children().remove();
296 296 $("#myTab li").removeClass("active");
297 297 $(".tab-pane").removeClass("in active");
... ... @@ -301,7 +301,7 @@
301 301 url:url,
302 302 type: 'post',
303 303 data:{
304   - headerId:headerId
  304 + shippingContainerId:shippingContainerId
305 305 },
306 306 success : function (value) {
307 307 $("#bootstrap-table1").bootstrapTable('load',value.data);
... ... @@ -333,9 +333,9 @@
333 333 /*入库单列表-详细*/
334 334 function detail(id) {
335 335 var url = detailPrefix + '/list/';
336   - headerId = id;
  336 + shippingContainerId = id;
337 337 // createMenuItem(url, "入库组盘明细");
338   - createtable(url,headerId);
  338 + createtable(url,shippingContainerId);
339 339 }
340 340  
341 341 /* 单个生成任务 */
... ...
src/main/resources/templates/shipment/shipmentHeader/shipmentHeader.html
... ... @@ -695,8 +695,22 @@
695 695 parent.$('.tabReload').click();
696 696 }
697 697 else{
698   - createMenuItem(url, "出库组盘");
699   - parent.$('.tabReload').click();
  698 + $.ajax({
  699 + url: ctx + "shipment/shipmentDetail/shippingCombination",
  700 + type: 'post',
  701 + data:{
  702 + shipmentCode
  703 + },
  704 + success: function(res) {
  705 + if (res.code === 200) {
  706 + createMenuItem(url, "出库组盘");
  707 + parent.$('.tabReload').click();
  708 + }
  709 + else {
  710 + $.modal.msgError(res.msg)
  711 + }
  712 + }
  713 + });
700 714 }
701 715 }
702 716 /* 点击明细面板 */
... ...