Commit 973fe85a1a0fa27673ce3bbcd2642e2bb1121db4

Authored by 易文鹏
1 parent 23461ec5

修改看板接口

src/main/java/com/huaheng/api/tv/controller/TvController.java
... ... @@ -37,6 +37,7 @@ import javax.annotation.Resource;
37 37 import java.util.*;
38 38  
39 39 @RestController
  40 +@CrossOrigin
40 41 @RequestMapping("/API/WMS/v2")
41 42 public class TvController extends BaseController {
42 43  
... ... @@ -62,18 +63,17 @@ public class TvController extends BaseController {
62 63 private ShipmentDetailMapper shipmentDetailMapper;
63 64  
64 65 @PostMapping("/getTvView")
65   - //@ApiOperation("获取电视信息")
66   - @CrossOrigin
67 66 //@ApiLogger(apiName = "获取电视信息", from="TV")
68 67 @ResponseBody
69 68 public AjaxResult getTvView(@RequestBody WcsTask wcsTask) {
70 69 String area = wcsTask.getArea();
71   - LambdaQueryWrapper<TaskHeader> taskHeaderLambdaQueryWrapper = Wrappers.lambdaQuery();
72   - taskHeaderLambdaQueryWrapper.eq(TaskHeader::getArea, area)
  70 + List<TaskHeader> taskHeaderList = taskHeaderService.list(new LambdaQueryWrapper<TaskHeader>()
  71 + .eq(TaskHeader::getArea, area)
73 72 .lt(TaskHeader::getStatus, QuantityConstant.TASK_STATUS_COMPLETED)
74   - .orderByDesc(TaskHeader::getId);
75   - List<TaskHeader> taskHeaderList = taskHeaderService.list(taskHeaderLambdaQueryWrapper);
76   - if (taskHeaderList != null && taskHeaderList.size() > 0) {
  73 + .orderByDesc(TaskHeader::getId));
  74 +
  75 + //写入物料编码
  76 + if (taskHeaderList != null && !taskHeaderList.isEmpty()) {
77 77 for (TaskHeader taskHeader : taskHeaderList) {
78 78 String materialCode = taskHeader.getMaterialCode();
79 79 String warehouseCode = taskHeader.getWarehouseCode();
... ... @@ -84,44 +84,44 @@ public class TvController extends BaseController {
84 84 }
85 85 }
86 86  
87   - LambdaQueryWrapper<Container> containerEmptyLambdaQueryWrapper = Wrappers.lambdaQuery();
88   - containerEmptyLambdaQueryWrapper.eq(Container::getArea, area)
  87 + //获取指定库区的空托盘数量
  88 + List<Container> containerEmptyList = containerService.list(new LambdaQueryWrapper<Container>()
  89 + .eq(Container::getArea, area)
89 90 .eq(Container::getStatus, QuantityConstant.STATUS_CONTAINER_EMPTY)
90   - .ne(Container::getLocationCode, "");
91   - List<Container> containerEmptyList = containerService.list(containerEmptyLambdaQueryWrapper);
  91 + .ne(Container::getLocationCode, ""));
92 92 int containerEmptySize = containerEmptyList.size();
93 93  
94   - LambdaQueryWrapper<Container> containerManyLambdaQueryWrapper = Wrappers.lambdaQuery();
95   - containerManyLambdaQueryWrapper.eq(Container::getArea, area)
96   - .eq(Container::getStatus, QuantityConstant.STATUS_CONTAINER_MANY)
97   - .ne(Container::getLocationCode, "");
98   - List<Container> manyEmptyList = containerService.list(containerManyLambdaQueryWrapper);
99   - int manyEmptyListSize = manyEmptyList.size();
100   - containerEmptySize = containerEmptySize + manyEmptyListSize * 6;
101   - LambdaQueryWrapper<Container> containerSomeLambdaQueryWrapper = Wrappers.lambdaQuery();
102   - containerSomeLambdaQueryWrapper.eq(Container::getArea, area)
  94 + //获取指定库区的有货托盘数量
  95 + //List<Container> manyEmptyList = containerService.list(new LambdaQueryWrapper<Container>()
  96 + // .eq(Container::getArea, area)
  97 + // .eq(Container::getStatus, QuantityConstant.STATUS_CONTAINER_MANY)
  98 + // .ne(Container::getLocationCode, ""));
  99 + //int manyEmptyListSize = manyEmptyList.size();
  100 + //空托盘的数量+有货托盘数量*6 (有货托盘数量这个项目好像没有啊,所以直接返回空托盘数量)
  101 + //containerEmptySize = containerEmptySize + manyEmptyListSize * 6;
  102 +
  103 + //获取指定库区的有货托盘数量
  104 + List<Container> containerSomeList = containerService.list(new LambdaQueryWrapper<Container>()
  105 + .eq(Container::getArea, area)
103 106 .eq(Container::getStatus, QuantityConstant.STATUS_CONTAINER_SOME)
104   - .ne(Container::getLocationCode, "");
105   - List<Container> containerSomeList = containerService.list(containerSomeLambdaQueryWrapper);
  107 + .ne(Container::getLocationCode, ""));
106 108 int containerSomeSize = containerSomeList.size();
107 109  
108   - LambdaQueryWrapper<Location> locationLambdaQueryWrapper = Wrappers.lambdaQuery();
109   - locationLambdaQueryWrapper.eq(Location::getArea, area);
110   - List<Location> locationList = locationService.list(locationLambdaQueryWrapper);
  110 + //指定库区总库位数
  111 + List<Location> locationList = locationService.list(new LambdaQueryWrapper<Location>().eq(Location::getArea, area));
111 112 int totalLocationSize = locationList.size();
112 113  
113   - LambdaQueryWrapper<Zone> zoneLambdaQueryWrapper = Wrappers.lambdaQuery();
114   - zoneLambdaQueryWrapper.eq(Zone::getArea, area);
115   - Zone zone = zoneService.getOne(zoneLambdaQueryWrapper);
116   - LambdaQueryWrapper<InventoryDetail> inventoryDetailLambdaQueryWrapper = Wrappers.lambdaQuery();
117   - inventoryDetailLambdaQueryWrapper.eq(InventoryDetail::getZoneCode, zone.getCode());
118   - List<InventoryDetail> inventoryDetailList = inventoryDetailService.list(inventoryDetailLambdaQueryWrapper);
  114 +
  115 + //获取指定区域的所有库存数
  116 + Zone zone = zoneService.getOne(new LambdaQueryWrapper<Zone>().eq(Zone::getArea, area));
  117 + List<InventoryDetail> inventoryDetailList = inventoryDetailService.list(new LambdaQueryWrapper<InventoryDetail>()
  118 + .eq(InventoryDetail::getZoneCode, zone.getCode()));
119 119 int inventorySize = inventoryDetailList.size();
120 120  
121 121  
122   - LambdaQueryWrapper<InventoryMaterialSummary> lambdaQueryWrapper = Wrappers.lambdaQuery();
123   - lambdaQueryWrapper.eq(InventoryMaterialSummary::getZoneCode, zone.getCode());
124   - List<InventoryMaterialSummary> list = inventoryMaterialSummaryService.list(lambdaQueryWrapper);
  122 + //库存物料汇总
  123 + List<InventoryMaterialSummary> list = inventoryMaterialSummaryService.list(new LambdaQueryWrapper<InventoryMaterialSummary>()
  124 + .eq(InventoryMaterialSummary::getZoneCode, zone.getCode()));
125 125 if (list == null) {
126 126 list = Collections.emptyList();
127 127 }
... ... @@ -139,10 +139,8 @@ public class TvController extends BaseController {
139 139 }
140 140  
141 141 @PostMapping("/getTvReceiptView")
142   - //@ApiOperation("获取电视入库信息")
143   - @CrossOrigin
144 142 @ResponseBody
145   - //@ApiLogger(apiName = "获取电视入库信息", from = "TV")
  143 + @ApiLogger(apiName = "获取电视入库信息", from = "TV")
146 144 public AjaxResult getTvReceiptView() {
147 145 AllBean allBean = new AllBean();
148 146 LambdaQueryWrapper<TaskDetail> queryWrapper = Wrappers.lambdaQuery();
... ... @@ -151,7 +149,7 @@ public class TvController extends BaseController {
151 149 .last(" and date_format( created, '%Y-%m-%d' )= date_format( now(), '%Y-%m-%d' ) and `status`>=100");
152 150 List<TaskDetail> list = taskDetailService.list(queryWrapper);
153 151 List<TopBean> topList = new ArrayList<>();
154   - if (list.size() > 0) {
  152 + if (!list.isEmpty()) {
155 153 topList = taskDetailService.getTvReceiptView("1");
156 154 }
157 155 allBean.setTopList(topList);
... ... @@ -161,19 +159,16 @@ public class TvController extends BaseController {
161 159 }
162 160  
163 161 @PostMapping("/getTvShipmentView")
164   - //@ApiOperation("获取电视出库信息")
165   - @CrossOrigin
166 162 @ResponseBody
167   - //@ApiLogger(apiName = "获取电视出库信息", from = "TV")
  163 + @ApiLogger(apiName = "获取电视出库信息", from = "TV")
168 164 public AjaxResult getTvShipmentView(@RequestBody Map<String, String> map) {
169 165 AllBean allBean = new AllBean();
170   - LambdaQueryWrapper<TaskDetail> queryWrapper = Wrappers.lambdaQuery();
171 166 List<String> str = Arrays.asList("300", "400");
172   - queryWrapper.in(TaskDetail::getTaskType, str)
173   - .last(" and date_format( created, '%Y-%m-%d' )= date_format( now(), '%Y-%m-%d' ) and `status`>=100");
174   - List<TaskDetail> list = taskDetailService.list(queryWrapper);
  167 + List<TaskDetail> list = taskDetailService.list(new LambdaQueryWrapper<TaskDetail>()
  168 + .in(TaskDetail::getTaskType, str)
  169 + .last(" and date_format( created, '%Y-%m-%d' )= date_format( now(), '%Y-%m-%d' ) and `status`>=100"));
175 170 List<TopBean> topList = new ArrayList<>();
176   - if (list.size() > 0) {
  171 + if (!list.isEmpty()) {
177 172 topList = taskDetailService.getTvReceiptView("2");
178 173 }
179 174 allBean.setTopList(topList);
... ... @@ -187,7 +182,6 @@ public class TvController extends BaseController {
187 182  
188 183 @PostMapping("/getTvPortShipmentView")
189 184 @ApiOperation("获取出站口出库信息")
190   - @CrossOrigin
191 185 @ResponseBody
192 186 @ApiLogger(apiName = "获取出站口出库信息", from = "TV")
193 187 public AjaxResult getTvPortShipmentView(@RequestBody Map<String, String> map) {
... ...
src/main/java/com/huaheng/pc/config/zone/service/ZoneServiceImpl.java
... ... @@ -24,6 +24,7 @@ import org.springframework.stereotype.Service;
24 24 import org.springframework.transaction.annotation.Transactional;
25 25  
26 26 import javax.annotation.Resource;
  27 +import java.math.BigDecimal;
27 28 import java.util.List;
28 29 import java.util.Map;
29 30  
... ... @@ -173,6 +174,12 @@ public class ZoneServiceImpl extends ServiceImpl&lt;ZoneMapper, Zone&gt; implements Zo
173 174 containerType.setLocationType(locationTypeCode);
174 175 containerType.setEnable(true);
175 176 containerType.setFillPercent(100);
  177 + containerType.setLength(new BigDecimal(1));
  178 + containerType.setWeight(new BigDecimal(1));
  179 + containerType.setMaxWeight(new BigDecimal(1));
  180 + containerType.setWidth(new BigDecimal(1));
  181 + containerType.setHeight(new BigDecimal(1));
  182 + containerType.setEmptyWeight(new BigDecimal(1));
176 183 boolean save = containerTypeService.save(containerType);
177 184 if (!save) {
178 185 throw new ServiceException("新增容器类型失败");
... ...
src/main/java/com/huaheng/pc/shipment/shippingCombination/service/ShippingCombinationService.java
... ... @@ -84,7 +84,7 @@ public class ShippingCombinationService {
84 84 List<InventoryDetail> list = inventoryDetailService.list(idlqw);
85 85  
86 86 //如果通知单号对不上
87   - if (list.size()==0 &&StringUtils.isNotEmpty(isNoticeNo)) {
  87 + if (list.isEmpty() && StringUtils.isNotEmpty(isNoticeNo)) {
88 88 return inventoryDetailService.list(new LambdaQueryWrapper<InventoryDetail>()
89 89 .eq(InventoryDetail::getMaterialCode, materialCode)
90 90 .eq(InventoryDetail::getCompanyCode, companyCode)
... ...
src/main/resources/application-druid.properties
... ... @@ -50,4 +50,4 @@ logging.level.org.springframework=ERROR
50 50 logging.level.spring.springboot.dao=ERROR
51 51 #\u63A5\u53E3\u8BF7\u6C42\u65E5\u5FD7
52 52 logging.level.com.huaheng.framework.aspectj=ERROR
53   -logger.path=D:\\home\\WMSlog
54 53 \ No newline at end of file
  54 +logger.path=D:\\home\\WMSlog
... ...
src/main/resources/templates/receipt/receiving/receiving.html
... ... @@ -62,7 +62,7 @@
62 62 <li>收货数量:<input type="text" id="receiveNum"/></li>
63 63 <li>容器编号:<input type="text" id="containerCode"/></li>
64 64 <li>
65   - <button class="btn btn-sm btn-success" onclick="receipt()">组盘</button>
  65 + <button class="btn btn-sm btn-success" onclick="receipt()">立库组盘</button>
66 66 </li>
67 67  
68 68 <ul class="select-list top_text">
... ... @@ -70,7 +70,7 @@
70 70 <option th:each="c:${zone}" th:text="${c['name']}" th:value="${c['code']}"></option>
71 71 </select></li>
72 72 <li>
73   - <button class="btn btn-sm btn-success" onclick="flatReceipt()">组盘</button>
  73 + <button class="btn btn-sm btn-success" onclick="flatReceipt()">平库组盘</button>
74 74 </li>
75 75 </ul>
76 76 </ul>
... ...
src/main/resources/templates/shipment/shipmentHeader/shipmentHeader.html
... ... @@ -143,7 +143,7 @@
143 143 </div>
144 144 <div class="btn-group hidden-xs" id="toolbar" role="group">
145 145 <a class="btn btn-outline btn-success btn-rounded" onclick="$.operate.add()"
146   - shiro:hasPermission="shipment:add">
  146 + shiro:hasPermission="shipment:bill:add">
147 147 <i class="fa fa-plus"></i> 新增
148 148 </a>
149 149 <!-- <a class="btn btn-outline btn-danger btn-rounded" onclick="$.operate.batRemove()"-->
... ...