Commit 5bb572eaa420697978161bbe77ea1c273728193c

Authored by 李泰瑜
2 parents 654bdd92 4a01e7cc

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

Showing 45 changed files with 1056 additions and 594 deletions
src/main/java/com/huaheng/api/wcs/service/warecellAllocation/LocationAllocationService.java
... ... @@ -6,7 +6,7 @@ import java.util.List;
6 6  
7 7 public interface LocationAllocationService {
8 8  
9   - String allocation(String locationRule, String roadWay, String warehouseCode, String containerCode, Integer materialAreas);
  9 + String allocation(int locationRule, List<String> locationTypeCodeList, int high, String destination, String warehouseCode, String containerCode, String materialAreaCode);
10 10  
11 11  
12 12 }
... ...
src/main/java/com/huaheng/api/wcs/service/warecellAllocation/LocationAllocationServiceImpl.java
... ... @@ -22,6 +22,8 @@ import java.util.ArrayList;
22 22 import java.util.List;
23 23 import java.util.stream.Collectors;
24 24  
  25 +import static java.util.stream.Collectors.toList;
  26 +
25 27 @Service
26 28 public class LocationAllocationServiceImpl implements LocationAllocationService {
27 29  
... ... @@ -37,18 +39,17 @@ public class LocationAllocationServiceImpl implements LocationAllocationService
37 39 private TaskHeaderService taskHeaderService;
38 40  
39 41 @Override
40   - public String allocation(String locationRule, String area, String warehouseCode, String containerCode, Integer materialAreas) {
41   - if (StringUtils.isEmpty(locationRule)) {
42   - return null;
43   - }
  42 + public String allocation(int locationRule, List<String> locationTypeCodeList, int high, String area, String warehouseCode, String containerCode, String materialAreaCode) {
44 43 LambdaQueryWrapper<Container> containerLambdaQueryWrapper = Wrappers.lambdaQuery();
45 44 containerLambdaQueryWrapper.eq(Container::getCode, containerCode)
46 45 .eq(Container::getWarehouseCode, warehouseCode);
47 46 Container container = containerService.getOne(containerLambdaQueryWrapper);
  47 +
48 48 LambdaQueryWrapper<ContainerType> containerTypeLambdaQueryWrapper = Wrappers.lambdaQuery();
49 49 containerTypeLambdaQueryWrapper.eq(ContainerType::getCode, container.getContainerType())
50 50 .eq(ContainerType::getWarehouseCode, warehouseCode);
51 51 ContainerType containerType = containerTypeService.getOne(containerTypeLambdaQueryWrapper);
  52 +
52 53 String locationType = containerType.getLocationType();
53 54 List<LocationType> locationTypeList = new ArrayList<>();
54 55 String[] list = locationType.split(",");
... ... @@ -59,52 +60,42 @@ public class LocationAllocationServiceImpl implements LocationAllocationService
59 60 LocationType locationType1 = locationTypeService.getOne(locationTypeLambdaQueryWrapper);
60 61 locationTypeList.add(locationType1);
61 62 }
62   - if(area == null) {
63   - String locationTypeCode = locationTypeList.get(0).getCode();
64   - LambdaQueryWrapper<Location> locationLambdaQueryWrapper = Wrappers.lambdaQuery();
65   - locationLambdaQueryWrapper.eq(Location::getLocationType, locationTypeCode)
66   - .eq(Location::getDeleted, 0);
67   - List<Location> locations = locationService.list(locationLambdaQueryWrapper);
68   - Location location = locations.get(0);
69   - area = location.getArea();
70   - }
  63 + List<String> locationTypeCodes = locationTypeList.stream().
  64 + map(t -> t.getCode()).collect(toList());
  65 + List<String> mergelocationTypeCodeList = locationTypeCodeList.stream().filter(item -> locationTypeCodes.contains(item)).collect(toList());
71 66 switch (locationRule) {
72   - case Constants.DOUBLE_RK:
73   - return doubleRk(area, warehouseCode, locationTypeList, materialAreas);
74   - case Constants.SINGER_RK:
75   - return singleRk(area, warehouseCode, locationTypeList, materialAreas);
  67 + case QuantityConstant.DOUBLE_FORK:
  68 + return doubleRk(area, high, warehouseCode, mergelocationTypeCodeList, materialAreaCode);
  69 + case QuantityConstant.SINGLE_FORK:
  70 + return singleRk(area, high, warehouseCode, mergelocationTypeCodeList, materialAreaCode);
76 71 }
77 72 return null;
78 73 }
79 74  
80   - /*
  75 + /**
81 76 * 双伸位库位入库分配库位
82 77 */
83   - private String doubleRk(String area, String warehouseCode, List<LocationType> locationTypeList, Integer materialAreas) {
  78 + private String doubleRk(String area, int high, String warehouseCode, List<String> locationTypeCodeList, String materialAreaCode) {
84 79 LambdaQueryWrapper<Location> locationLambda = Wrappers.lambdaQuery();
85 80 locationLambda.eq(Location::getArea, area).
86 81 eq(Location::getWarehouseCode, warehouseCode)
87 82 .eq(Location::getStatus, QuantityConstant.STATUS_LOCATION_EMPTY)
88   - .eq(Location::getRowFlag, 1)
  83 + .eq(Location::getHigh, high)
  84 + .eq(StringUtils.isNotEmpty(materialAreaCode), Location::getMaterialAreaCode, materialAreaCode)
  85 + .eq(Location::getRowFlag, QuantityConstant.ROW_OUT)
89 86 .eq(Location::getContainerCode, "");
90 87 List<Location> locationList = locationService.list(locationLambda);
91 88 List<Location> removeLocaationList = new ArrayList<>();
92   - for (Location location1 : locationList) {
93   - if (taskHeaderService.getUncompleteTaskInNear(location1) > 0) {
94   - removeLocaationList.add(location1);
95   - }
96   - Integer areas = location1.getMaterialAreas();
97   - if(areas.intValue() != materialAreas.intValue()) {
98   - removeLocaationList.add(location1);
99   - }
100   - }
101 89 locationList.removeAll(removeLocaationList);
  90 +
102 91 if (locationList == null || locationList.size() == 0) {
103 92 locationLambda = Wrappers.lambdaQuery();
104 93 locationLambda.eq(Location::getArea, area).
105 94 eq(Location::getWarehouseCode, warehouseCode)
106 95 .eq(Location::getStatus, QuantityConstant.STATUS_LOCATION_EMPTY)
107   - .eq(Location::getRowFlag, 0)
  96 + .eq(Location::getHigh, high)
  97 + .eq(StringUtils.isNotEmpty(materialAreaCode), Location::getMaterialAreaCode, materialAreaCode)
  98 + .eq(Location::getRowFlag, QuantityConstant.ROW_IN)
108 99 .eq(Location::getContainerCode, "");
109 100 locationList = locationService.list(locationLambda);
110 101 removeLocaationList = new ArrayList<>();
... ... @@ -115,39 +106,36 @@ public class LocationAllocationServiceImpl implements LocationAllocationService
115 106 }
116 107 locationList.removeAll(removeLocaationList);
117 108 }
118   - String locationCode = filter(locationList, locationTypeList, area);
  109 + Location location = locationList.stream().findFirst().orElse(null);
  110 + String locationCode = location.getCode();
119 111 return locationCode;
120 112 }
121 113  
122   - /*
  114 + /**
123 115 * 单伸位库位入库分配库位
124 116 */
125   - private String singleRk(String area, String warehouseCode, List<LocationType> locationTypeList, Integer materialAreas) {
  117 + private String singleRk(String area, int high, String warehouseCode, List<String> locationTypeCodeList, String materialAreaCode) {
126 118 LambdaQueryWrapper<Location> locationLambda = Wrappers.lambdaQuery();
127 119 locationLambda.eq(Location::getArea, area).
128 120 eq(Location::getWarehouseCode, warehouseCode)
129 121 .eq(Location::getStatus, QuantityConstant.STATUS_LOCATION_EMPTY)
  122 + .eq(Location::getHigh, high)
  123 + .eq(StringUtils.isNotEmpty(materialAreaCode), Location::getMaterialAreaCode, materialAreaCode)
  124 + .in(Location::getLocationType, locationTypeCodeList)
130 125 .eq(Location::getContainerCode, "");
131 126 List<Location> locationList = locationService.list(locationLambda);
132   - List<Location> removeLocaationList = new ArrayList<>();
133   - for (Location location1 : locationList) {
134   - Integer areas = location1.getMaterialAreas();
135   - if(areas.intValue() != materialAreas.intValue()) {
136   - removeLocaationList.add(location1);
137   - }
138   - }
139   - locationList.removeAll(removeLocaationList);
140   - String locationCode = filter(locationList, locationTypeList, area);
  127 +
  128 + Location location = locationList.stream().findFirst().orElse(null);
  129 + String locationCode = location.getCode();
141 130 return locationCode;
142 131 }
143 132  
144   - private String filter(List<Location> locationList, List<LocationType> locationTypeList, String area) {
145   - List<String> codeList = locationTypeList.stream().map(t -> t.getCode()).collect(Collectors.toList());
146   - List<Location> newLocation = locationList.stream().filter(t -> codeList.contains(t.getLocationType()) && t.getArea().equals(area)).collect(Collectors.toList());
147   - if (newLocation.isEmpty()) {
148   - return null;
149   - } else {
150   - return newLocation.get(0).getCode();
151   - }
152   - }
  133 +// private String filter(List<Location> locationList, List<String> locationTypeList, String area) {
  134 +// List<Location> newLocation = locationList.stream().filter(t -> locationTypeList.contains(t.getLocationType()) && t.getArea().equals(area)).collect(toList());
  135 +// if (newLocation.isEmpty()) {
  136 +// return null;
  137 +// } else {
  138 +// return newLocation.get(0).getCode();
  139 +// }
  140 +// }
153 141 }
... ...
src/main/java/com/huaheng/api/wcs/service/warecellAllocation/WarecellAllocationServiceImpl.java
... ... @@ -9,6 +9,7 @@ import com.huaheng.common.support.Convert;
9 9 import com.huaheng.common.utils.StringUtils;
10 10 import com.huaheng.common.utils.security.ShiroUtils;
11 11 import com.huaheng.framework.web.domain.AjaxResult;
  12 +import com.huaheng.framework.web.service.ConfigService;
12 13 import com.huaheng.pc.config.FilterConfigDetail.domain.FilterConfigDetail;
13 14 import com.huaheng.pc.config.FilterConfigDetail.service.FilterConfigDetailService;
14 15 import com.huaheng.pc.config.configValue.domain.ConfigValue;
... ... @@ -19,6 +20,8 @@ import com.huaheng.pc.config.containerType.domain.ContainerType;
19 20 import com.huaheng.pc.config.containerType.service.ContainerTypeService;
20 21 import com.huaheng.pc.config.location.domain.Location;
21 22 import com.huaheng.pc.config.location.service.LocationService;
  23 +import com.huaheng.pc.config.locationHigh.domain.LocationHigh;
  24 +import com.huaheng.pc.config.locationHigh.service.LocationHighService;
22 25 import com.huaheng.pc.config.locationType.domain.LocationType;
23 26 import com.huaheng.pc.config.locationType.service.LocationTypeService;
24 27 import com.huaheng.pc.config.material.domain.Material;
... ... @@ -27,6 +30,8 @@ import com.huaheng.pc.config.materialType.domain.MaterialType;
27 30 import com.huaheng.pc.config.materialType.service.MaterialTypeService;
28 31 import com.huaheng.pc.config.receiptPreference.domain.ReceiptPreference;
29 32 import com.huaheng.pc.config.receiptPreference.service.ReceiptPreferenceService;
  33 +import com.huaheng.pc.config.zone.domain.Zone;
  34 +import com.huaheng.pc.config.zone.service.ZoneService;
30 35 import com.huaheng.pc.receipt.receiptContainerDetail.domain.ReceiptContainerDetail;
31 36 import com.huaheng.pc.receipt.receiptContainerDetail.service.ReceiptContainerDetailService;
32 37 import com.huaheng.pc.receipt.receiptContainerHeader.domain.ReceiptContainerHeader;
... ... @@ -59,6 +64,8 @@ public class WarecellAllocationServiceImpl implements WarecellAllocationService
59 64 @Resource
60 65 private ContainerTypeService containerTypeService;
61 66 @Resource
  67 + private ConfigService configService;
  68 + @Resource
62 69 private ConfigValueService configValueService;
63 70 @Resource
64 71 private ReceiptPreferenceService receiptPreferenceService;
... ... @@ -84,6 +91,10 @@ public class WarecellAllocationServiceImpl implements WarecellAllocationService
84 91 private TransferTaskService transferTaskService;
85 92 @Resource
86 93 private LocationAllocationService locationAllocationService;
  94 + @Resource
  95 + private ZoneService zoneService;
  96 + @Resource
  97 + private LocationHighService locationHighService;
87 98  
88 99 /**
89 100 * 立库仓位分配
... ... @@ -113,72 +124,74 @@ public class WarecellAllocationServiceImpl implements WarecellAllocationService
113 124 if (StringUtils.isNull(wcsTask.getHeight())) {
114 125 return AjaxResult.error("高为空");
115 126 }
116   - if (StringUtils.isNull(wcsTask.getWeight())) {
117   - return AjaxResult.error("重为空");
118   - }
  127 +// if (StringUtils.isNull(wcsTask.getWeight())) {
  128 +// return AjaxResult.error("重为空");
  129 +// }
119 130 return verticalWarehouseAllocation(wcsTask);
120 131 }
121 132  
122 133 public AjaxResult verticalWarehouseAllocation(WcsTask wcsTask) {
123 134 String warehouseCode = wcsTask.getWarehouseCode();
  135 + String destination = wcsTask.getDestination();
  136 + String locationCode = null;
  137 + String height = wcsTask.getHeight();
  138 + if(height == null) {
  139 + return AjaxResult.error("分配库位时,高度为空");
  140 + }
  141 + LambdaQueryWrapper<Zone> zoneLambdaQueryWrapper = Wrappers.lambdaQuery();
  142 + zoneLambdaQueryWrapper.eq(Zone::getArea, destination);
  143 + Zone zone = zoneService.getOne(zoneLambdaQueryWrapper);
  144 + if(zone == null) {
  145 + return AjaxResult.error("分配库位时,没有找到库区");
  146 + }
124 147 //查询满足条件的库位类型
125 148 LambdaQueryWrapper<LocationType> lambdaQueryWrapper = Wrappers.lambdaQuery();
126   - lambdaQueryWrapper.gt(LocationType::getLength, wcsTask.getLength())
127   - .gt(LocationType::getWidth, wcsTask.getWidth())
128   - .gt(LocationType::getHeight, wcsTask.getHeight())
129   - .gt(LocationType::getMaxWeight, wcsTask.getWidth())
  149 + lambdaQueryWrapper.eq(LocationType::getZoneCode, zone.getCode())
130 150 .eq(LocationType::getWarehouseCode, warehouseCode);
131 151 List<LocationType> locationTypeList = locationTypeService.list(lambdaQueryWrapper);
132   -
133   - String locationCode = null;
  152 + if(locationTypeList == null) {
  153 + return AjaxResult.error("分配库位时,没有找到库位类型");
  154 + }
  155 + List<String> locationTypeCodeList = locationTypeList.stream().
  156 + map(t -> t.getCode()).collect(Collectors.toList());
  157 + LambdaQueryWrapper<LocationHigh> locationHighLambdaQueryWrapper = Wrappers.lambdaQuery();
  158 + locationHighLambdaQueryWrapper.eq(LocationHigh::getHighLevel, Integer.parseInt(height))
  159 + .in(LocationHigh::getLocationTypeCode, locationTypeCodeList);
  160 + LocationHigh locationHigh = locationHighService.getOne(locationHighLambdaQueryWrapper);
  161 + int high = locationHigh.getHigh();
  162 + TaskHeader taskHeader = taskHeaderService.getById(wcsTask.getTaskNo());
  163 + if (taskHeader.getStatus() == QuantityConstant.TASK_STATUS_COMPLETED) {
  164 + return AjaxResult.error("任务已经完成,不能再分库位");
  165 + }
134 166 //查询任务明细
135 167 LambdaQueryWrapper<TaskDetail> taskDetailLambda = Wrappers.lambdaQuery();
136 168 taskDetailLambda.eq(TaskDetail::getTaskId, wcsTask.getTaskNo());
137 169 List<TaskDetail> taskDetailList = taskDetailService.list(taskDetailLambda);
138   -
139   - TaskHeader taskHeader = taskHeaderService.getById(wcsTask.getTaskNo());
140   - if (taskHeader.getStatus() == 100) {
141   - return AjaxResult.error("任务已经完成,不能再分库位");
142   - }
143 170 String containerCode = taskHeader.getContainerCode();
144   -
  171 + String value = configService.getKey(QuantityConstant.RULE_ALLOCATION);
  172 + if (StringUtils.isEmpty(value)) {
  173 + return AjaxResult.error("未绑定定位规则");
  174 + }
  175 + int allocationRule = Integer.parseInt(value);
  176 + String materialAreaCode = null;
145 177 /* 循环查询入库组盘明细*/
146 178 List<ReceiptContainerDetail> receiptContainerDetailList = new ArrayList<>();
147 179 for (TaskDetail taskDetail : taskDetailList) {
148   - ReceiptContainerDetail receiptContainerDetail = receiptContainerDetailService.getById(taskDetail.getAllocationId());
  180 + ReceiptContainerDetail receiptContainerDetail = receiptContainerDetailService.
  181 + getById(taskDetail.getAllocationId());
149 182 if (receiptContainerDetail != null) {
150 183 receiptContainerDetailList.add(receiptContainerDetail);
151 184 }
152 185 }
153 186 //去重
154 187 receiptContainerDetailList = receiptContainerDetailList.stream().distinct().collect(Collectors.toList());
155   -
156   - String locatingRule = null;
157   - ReceiptContainerHeader receiptContainerHeader = null;
158   - if (StringUtils.isEmpty(locatingRule)) {
159   - //物料类别中定位规则为空时,查询入库首选项
160   - LambdaQueryWrapper<ConfigValue> configValueLambda = Wrappers.lambdaQuery();
161   - configValueLambda.eq(ConfigValue::getWarehouseCode, warehouseCode)
162   - .eq(ConfigValue::getModuleType, "receipt")
163   - .eq(ConfigValue::getRecordType, "入库首选项");
164   - ConfigValue configValue = configValueService.getOne(configValueLambda);
165   - LambdaQueryWrapper<ReceiptPreference> receiptPreferenceLambda = Wrappers.lambdaQuery();
166   - receiptPreferenceLambda.eq(ReceiptPreference::getCode, configValue.getValue())
167   - .eq(ReceiptPreference::getWarehouseCode, warehouseCode);
168   - ReceiptPreference receiptPreference = receiptPreferenceService.getOne(receiptPreferenceLambda);
169   - locatingRule = receiptPreference.getLocationRule();
170   - }
171   -
172   - if (StringUtils.isEmpty(locatingRule)){
173   - throw new ServiceException("未绑定定位规则");
174   - }
175   - Integer materialAreas = 0;
176 188 if(receiptContainerDetailList != null && receiptContainerDetailList.size() > 0) {
177 189 String materialCode = receiptContainerDetailList.get(0).getMaterialCode();
178 190 Material material = materialService.findAllByCode(materialCode, warehouseCode);
179   - materialAreas = material.getMaterialAreas();
  191 + materialAreaCode = material.getMaterialAreaCode();
180 192 }
181   - locationCode = locationAllocationService.allocation(locatingRule, wcsTask.getDestination(), warehouseCode, containerCode, materialAreas);
  193 + locationCode = locationAllocationService.allocation(allocationRule,
  194 + locationTypeCodeList, high, destination, warehouseCode, containerCode, materialAreaCode);
182 195 if (StringUtils.isEmpty(locationCode)) {
183 196 return AjaxResult.error("没有库位可分配");
184 197 }
... ... @@ -195,7 +208,7 @@ public class WarecellAllocationServiceImpl implements WarecellAllocationService
195 208 //更新库位编码到组盘头表
196 209 ReceiptContainerDetail receiptContainerDetail = receiptContainerDetailList.get(0);
197 210 if (receiptContainerDetail != null) {
198   - receiptContainerHeader = receiptContainerHeaderService.getById(receiptContainerDetail.getReceiptContainerId());
  211 + ReceiptContainerHeader receiptContainerHeader = receiptContainerHeaderService.getById(receiptContainerDetail.getReceiptContainerId());
199 212 receiptContainerHeader.setToLocation(locationCode);
200 213 if (!receiptContainerHeaderService.updateById(receiptContainerHeader)) {
201 214 throw new ServiceException("更新库位失败");
... ... @@ -227,7 +240,7 @@ public class WarecellAllocationServiceImpl implements WarecellAllocationService
227 240 int rowFlag = location.getRowFlag().intValue();
228 241 Integer preTaskNo = 0;
229 242 //如果是外侧库位,那么就要判断该库位对应的内侧库位是不是有托盘
230   - if (rowFlag == 1) {
  243 + if (rowFlag == QuantityConstant.ROW_OUT) {
231 244 Location insideLocation = locationService.getInsideNear(location);
232 245 if (StringUtils.isNotEmpty(insideLocation.getContainerCode())) {
233 246 Location destinationLocation = locationService.getEmptyLocation(insideLocation);
... ... @@ -241,6 +254,7 @@ public class WarecellAllocationServiceImpl implements WarecellAllocationService
241 254 }
242 255 taskHeader.setZoneCode(location.getZoneCode());
243 256 taskHeader.setPreTaskNo(preTaskNo);
  257 + taskHeader.setWeight(wcsTask.getWeight());
244 258 taskHeader.setToLocation(locationCode);
245 259 if (!taskHeaderService.updateById(taskHeader)) {
246 260 throw new ServiceException("更新任务头表目标库位失败");
... ... @@ -318,9 +332,9 @@ public class WarecellAllocationServiceImpl implements WarecellAllocationService
318 332 if (StringUtils.isNull(wcsTask.getHeight())) {
319 333 return AjaxResult.error("高为空");
320 334 }
321   - if (StringUtils.isNull(wcsTask.getWeight())) {
322   - return AjaxResult.error("重为空");
323   - }
  335 +// if (StringUtils.isNull(wcsTask.getWeight())) {
  336 +// return AjaxResult.error("重为空");
  337 +// }
324 338  
325 339 //查询满足条件的库位类型
326 340 LambdaQueryWrapper<LocationType> lambdaQueryWrapper = Wrappers.lambdaQuery();
... ...
src/main/java/com/huaheng/common/constant/QuantityConstant.java
... ... @@ -391,6 +391,10 @@ public class QuantityConstant {
391 391 public static final String RULE_SHIPMENT_TASK= "shipmentTaskRule";
392 392 public static final String RULE_TASK_LOCATION = "taskLocationRule";
393 393 public static final String RULE_CONNECT_WCS = "connectWcs";
  394 + public static final String RULE_ALLOCATION = "allocationRule";
  395 +
  396 + public static final int DOUBLE_FORK = 1;
  397 + public static final int SINGLE_FORK = 0;
394 398  
395 399 public static final int RULE_TASK_SET_LOCATION = 1;
396 400 public static final int RULE_TASK_NOT_LOCATION = 0;
... ... @@ -401,6 +405,8 @@ public class QuantityConstant {
401 405 public static final int RULE_WCS_CONNECT = 1;
402 406 public static final int RULE_WCS_DISCONNECT = 0;
403 407  
  408 + public static final int NOT_MATERIAL_AREAS = 0;
  409 +
404 410 public static final int RYTASK_STATUS_RUN = 0;
405 411 public static final int RYTASK_STATUS_STOP = 1;
406 412  
... ...
src/main/java/com/huaheng/pc/config/company/controller/CompanyController.java
... ... @@ -67,7 +67,7 @@ public class CompanyController extends BaseController {
67 67 .eq(Company::getDeleted,false)
68 68 .orderByDesc(Company::getId);
69 69  
70   - if (StringUtils.isNotNull(pageNum) && StringUtils.isNotNull(pageSize)){
  70 + if (StringUtils.isNotNull(pageNum) && StringUtils.isNotNull(pageSize)) {
71 71 /**
72 72 * 使用分页查询
73 73 */
... ...
src/main/java/com/huaheng/pc/config/location/domain/Location.java
... ... @@ -99,8 +99,8 @@ public class Location implements Serializable {
99 99 /**
100 100 * 物料分区
101 101 */
102   - @TableField(value = "materialAreas")
103   - private Integer materialAreas;
  102 + @TableField(value = "materialAreaCode")
  103 + private String materialAreaCode;
104 104  
105 105 /**
106 106 * 名称
... ...
src/main/java/com/huaheng/pc/config/location/service/LocationServiceImpl.java
... ... @@ -520,6 +520,7 @@ public class LocationServiceImpl extends ServiceImpl&lt;LocationMapper, Location&gt; i
520 520 LambdaQueryWrapper<Location> queryWrapper = Wrappers.lambdaQuery();
521 521 queryWrapper.eq(Location::getWarehouseCode, location.getWarehouseCode());
522 522 queryWrapper.eq(Location::getRoadway, location.getRoadway());
  523 + queryWrapper.eq(Location::getHigh, location.getHigh());
523 524 queryWrapper.eq(Location::getRowFlag, QuantityConstant.ROW_OUT);
524 525 queryWrapper.eq(Location::getContainerCode, "");
525 526 queryWrapper.eq(Location::getStatus, QuantityConstant.STATUS_LOCATION_EMPTY);
... ... @@ -564,6 +565,7 @@ public class LocationServiceImpl extends ServiceImpl&lt;LocationMapper, Location&gt; i
564 565 queryWrapper.eq(Location::getWarehouseCode, location.getWarehouseCode());
565 566 queryWrapper.eq(Location::getRoadway, location.getRoadway());
566 567 queryWrapper.eq(Location::getRowFlag, QuantityConstant.ROW_OUT);
  568 + queryWrapper.eq(Location::getHigh, location.getHigh());
567 569 queryWrapper.eq(Location::getContainerCode, "");
568 570 queryWrapper.eq(Location::getStatus, QuantityConstant.STATUS_LOCATION_EMPTY);
569 571 queryWrapper.eq(Location::getLocationType, location.getLocationType());
... ...
src/main/java/com/huaheng/pc/config/locationHigh/controller/LocationHighController.java
... ... @@ -82,7 +82,7 @@ public class LocationHighController extends BaseController
82 82 if(StringUtils.isEmpty(locationHigh.getCode())) {
83 83 return AjaxResult.error("库位类型为空");
84 84 }
85   -
  85 + locationHigh.setWarehouseCode(ShiroUtils.getWarehouseCode());
86 86 return toAjax(locationHighService.save(locationHigh));
87 87 }
88 88  
... ...
src/main/java/com/huaheng/pc/config/locationHigh/domain/LocationHigh.java
... ... @@ -35,11 +35,18 @@ public class LocationHigh implements Serializable {
35 35 private String locationTypeCode;
36 36  
37 37 /**
38   - * 高度值
  38 + * 高低位
39 39 */
40 40 @TableField(value = "high")
41 41 private Integer high;
42 42  
  43 +
  44 + /**
  45 + * 高度值
  46 + */
  47 + @TableField(value = "highLevel")
  48 + private Integer highLevel;
  49 +
43 50 /**
44 51 * 顺序
45 52 */
... ...
src/main/java/com/huaheng/pc/config/material/controller/MaterialController.java
... ... @@ -20,6 +20,8 @@ import com.huaheng.framework.web.page.TableSupport;
20 20 import com.huaheng.pc.common.JasperPrint.Print;
21 21 import com.huaheng.pc.config.material.domain.Material;
22 22 import com.huaheng.pc.config.material.service.MaterialService;
  23 +import com.huaheng.pc.config.materialArea.domain.MaterialArea;
  24 +import com.huaheng.pc.config.materialArea.service.MaterialAreaService;
23 25 import com.huaheng.pc.inventory.inventoryDetail.domain.InventoryDetail;
24 26 import com.huaheng.pc.inventory.inventoryDetail.service.InventoryDetailService;
25 27 import io.swagger.annotations.Api;
... ... @@ -33,10 +35,7 @@ import org.springframework.web.multipart.MultipartFile;
33 35  
34 36 import javax.annotation.Resource;
35 37 import javax.sql.DataSource;
36   -import java.util.ArrayList;
37   -import java.util.HashMap;
38   -import java.util.List;
39   -import java.util.Map;
  38 +import java.util.*;
40 39  
41 40 @Api(tags = {"物料控制类"})
42 41 @Controller
... ... @@ -48,6 +47,8 @@ public class MaterialController extends BaseController {
48 47 @Resource
49 48 private MaterialService materialService;
50 49 @Resource
  50 + private MaterialAreaService materialAreaService;
  51 + @Resource
51 52 private InventoryDetailService inventoryDetailService;
52 53 @Resource
53 54 private DataSource dataSource;
... ... @@ -157,15 +158,23 @@ public class MaterialController extends BaseController {
157 158 */
158 159 @ApiOperation(value = "批量修改物料", notes = "批量修改物料", httpMethod = "POST")
159 160 @RequiresPermissions("config:material:edit")
160   - @Log(title = "通用-物料管理", operating = "批量修改物料", action = BusinessType.UPDATE)
  161 + @Log(title = "基础数据-物料管理", operating = "批量修改物料", action = BusinessType.UPDATE)
161 162 @PostMapping("/editBatchSave")
162 163 @ResponseBody
163   - public AjaxResult editBatchSave (String ids, String area) {
164   - String[] idArray = Convert.toStrArray(ids);
165   - LambdaUpdateWrapper<Material> wrapper = Wrappers.lambdaUpdate();
166   - wrapper.in(Material::getId, idArray)
167   - .set(Material::getMaterialAreas, Integer.parseInt(area));
168   - return toAjax(materialService.update(wrapper));
  164 + public AjaxResult editBatchSave (String ids, String materialAreaCode) {
  165 + if(StringUtils.isNotEmpty(materialAreaCode)) {
  166 + LambdaQueryWrapper<MaterialArea> materialAreaLambdaQueryWrapper = Wrappers.lambdaQuery();
  167 + materialAreaLambdaQueryWrapper.eq(MaterialArea::getCode, materialAreaCode);
  168 + MaterialArea materialArea = materialAreaService.getOne(materialAreaLambdaQueryWrapper);
  169 + if (materialArea == null) {
  170 + return AjaxResult.error("没找到对应的物料区域");
  171 + }
  172 + }
  173 + String[] idArray = Convert.toStrArray(ids);
  174 + LambdaUpdateWrapper<Material> wrapper = Wrappers.lambdaUpdate();
  175 + wrapper.in(Material::getId, idArray)
  176 + .set(Material::getMaterialAreaCode, materialAreaCode);
  177 + return toAjax(materialService.update(wrapper));
169 178 }
170 179  
171 180 /**
... ...
src/main/java/com/huaheng/pc/config/material/domain/Material.java
... ... @@ -315,7 +315,7 @@ public class Material implements Serializable {
315 315 /**
316 316 * 物料分区
317 317 */
318   - @TableField(value = "materialAreas")
319   - private Integer materialAreas;
  318 + @TableField(value = "materialAreaCode")
  319 + private String materialAreaCode;
320 320  
321 321 }
322 322 \ No newline at end of file
... ...
src/main/java/com/huaheng/pc/config/materialArea/controller/MaterialAreaController.java 0 → 100644
  1 +package com.huaheng.pc.config.materialArea.controller;
  2 +
  3 +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
  4 +import com.baomidou.mybatisplus.core.toolkit.Wrappers;
  5 +import com.huaheng.common.support.Convert;
  6 +import com.huaheng.common.utils.StringUtils;
  7 +import com.huaheng.common.utils.security.ShiroUtils;
  8 +import com.huaheng.framework.aspectj.lang.annotation.Log;
  9 +import com.huaheng.framework.aspectj.lang.constant.BusinessType;
  10 +import com.huaheng.framework.web.controller.BaseController;
  11 +import com.huaheng.framework.web.domain.AjaxResult;
  12 +import com.huaheng.framework.web.page.TableDataInfo;
  13 +import com.huaheng.pc.config.locationHigh.domain.LocationHigh;
  14 +import com.huaheng.pc.config.locationHigh.service.LocationHighService;
  15 +import com.huaheng.pc.config.materialArea.domain.MaterialArea;
  16 +import com.huaheng.pc.config.materialArea.service.MaterialAreaService;
  17 +import io.swagger.annotations.Api;
  18 +import org.apache.shiro.authz.annotation.RequiresPermissions;
  19 +import org.springframework.beans.factory.annotation.Autowired;
  20 +import org.springframework.stereotype.Controller;
  21 +import org.springframework.ui.ModelMap;
  22 +import org.springframework.web.bind.annotation.*;
  23 +
  24 +import java.util.List;
  25 +
  26 +/**
  27 + * 物料分区
  28 + *
  29 + * @author youjie
  30 + * @date 2021-08-24
  31 + */
  32 +@Api(tags = "物料分区")
  33 +@Controller
  34 +@RequestMapping("/config/materialArea")
  35 +public class MaterialAreaController extends BaseController
  36 +{
  37 + private String prefix = "config/materialArea";
  38 +
  39 + @Autowired
  40 + private MaterialAreaService materialAreaService;
  41 +
  42 + @GetMapping()
  43 + public String materialArea()
  44 + {
  45 + return prefix + "/materialArea";
  46 + }
  47 +
  48 + /**
  49 + * 查询物料分区列表
  50 + */
  51 + @Log(title = "基础数据-物料分区", operating = "物料分区", action = BusinessType.GRANT)
  52 + @PostMapping("/list")
  53 + @ResponseBody
  54 + public TableDataInfo list(MaterialArea materialArea, String createdBegin, String createdEnd)
  55 + {
  56 + LambdaQueryWrapper<MaterialArea> lambdaQueryWrapper = Wrappers.lambdaQuery();
  57 + startPage();
  58 + lambdaQueryWrapper.ge(StringUtils.isNotEmpty(createdBegin), MaterialArea::getCreated, createdBegin)
  59 + .le(StringUtils.isNotEmpty(createdEnd), MaterialArea::getCreated, createdEnd)
  60 + .eq(MaterialArea::getWarehouseCode, ShiroUtils.getWarehouseCode())
  61 + .eq(StringUtils.isNotEmpty(materialArea.getCode()), MaterialArea::getCode, materialArea.getCode())
  62 + .orderByAsc(MaterialArea::getId);
  63 +
  64 + List<MaterialArea> list = materialAreaService.list(lambdaQueryWrapper);
  65 + return getDataTable(list);
  66 + }
  67 +
  68 + /**
  69 + * 新增库位类型
  70 + */
  71 + @GetMapping("/add")
  72 + public String add()
  73 + {
  74 + return prefix + "/add";
  75 + }
  76 +
  77 + /**
  78 + * 新增物料分区
  79 + */
  80 + @Log(title = "基础数据-物料分区", operating = "新增物料分区", action = BusinessType.INSERT)
  81 + @PostMapping("/add")
  82 + @ResponseBody
  83 + public AjaxResult addSave(MaterialArea materialArea)
  84 + {
  85 + if(StringUtils.isEmpty(materialArea.getCode())) {
  86 + return AjaxResult.error("物料分区编码为空");
  87 + }
  88 + materialArea.setWarehouseCode(ShiroUtils.getWarehouseCode());
  89 + return toAjax(materialAreaService.save(materialArea));
  90 + }
  91 +
  92 + /**
  93 + * 修改物料分区
  94 + */
  95 + @GetMapping("/edit/{id}")
  96 + public String edit(@PathVariable("id") Integer id, ModelMap mmap)
  97 + {
  98 + MaterialArea materialArea = materialAreaService.getById(id);
  99 + mmap.put("materialArea", materialArea);
  100 + return prefix + "/edit";
  101 + }
  102 +
  103 +
  104 + /**
  105 + * 修改物料分区
  106 + */
  107 + @Log(title = "基础数据-物料分区", operating = "修改物料分区", action = BusinessType.UPDATE)
  108 + @PostMapping("/edit")
  109 + @ResponseBody
  110 + public AjaxResult editSave(MaterialArea materialArea)
  111 + {
  112 + return toAjax(materialAreaService.saveOrUpdate(materialArea));
  113 + }
  114 +
  115 + /**
  116 + * 删除物料分区
  117 + */
  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 + }
  126 + for (Integer id : Convert.toIntArray(ids))
  127 + {
  128 + materialAreaService.removeById(id);
  129 + }
  130 + return AjaxResult.success("删除成功!");
  131 + }
  132 +
  133 +}
... ...
src/main/java/com/huaheng/pc/config/materialArea/domain/MaterialArea.java 0 → 100644
  1 +package com.huaheng.pc.config.materialArea.domain;
  2 +
  3 +import com.baomidou.mybatisplus.annotation.*;
  4 +import lombok.Data;
  5 +
  6 +import java.io.Serializable;
  7 +import java.util.Date;
  8 +
  9 +@Data
  10 +@TableName(value = "material_area")
  11 +public class MaterialArea implements Serializable {
  12 +
  13 + /**
  14 + * 内部号
  15 + */
  16 + @TableId(value = "id", type = IdType.AUTO)
  17 + private Integer id;
  18 +
  19 + /**
  20 + * 仓库编码
  21 + */
  22 + @TableField(value = "warehouseCode")
  23 + private String warehouseCode;
  24 +
  25 + /**
  26 + * 编码
  27 + */
  28 + @TableField(value = "code")
  29 + private String code;
  30 +
  31 +
  32 + /**
  33 + * 名字
  34 + */
  35 + @TableField(value = "name")
  36 + private String name;
  37 +
  38 + /**
  39 + * 创建时间
  40 + */
  41 + @TableField(value = "created", fill = FieldFill.INSERT)
  42 + private Date created;
  43 +
  44 + /**
  45 + * 创建用户
  46 + */
  47 + @TableField(value = "createdBy", fill = FieldFill.INSERT)
  48 + private String createdBy;
  49 +
  50 +}
0 51 \ No newline at end of file
... ...
src/main/java/com/huaheng/pc/config/materialArea/mapper/MaterialAreaMapper.java 0 → 100644
  1 +package com.huaheng.pc.config.materialArea.mapper;
  2 +
  3 +import com.baomidou.mybatisplus.core.mapper.BaseMapper;
  4 +import com.huaheng.pc.config.locationHigh.domain.LocationHigh;
  5 +import com.huaheng.pc.config.locationType.domain.LocationType;
  6 +import com.huaheng.pc.config.materialArea.domain.MaterialArea;
  7 +
  8 +public interface MaterialAreaMapper extends BaseMapper<MaterialArea> {
  9 +
  10 +}
0 11 \ No newline at end of file
... ...
src/main/java/com/huaheng/pc/config/materialArea/service/MaterialAreaService.java 0 → 100644
  1 +package com.huaheng.pc.config.materialArea.service;
  2 +
  3 +import com.huaheng.pc.config.locationHigh.domain.LocationHigh;
  4 +import com.huaheng.pc.config.locationType.domain.LocationType;
  5 +import com.baomidou.mybatisplus.extension.service.IService;
  6 +import com.huaheng.pc.config.materialArea.domain.MaterialArea;
  7 +
  8 +import java.util.List;
  9 +import java.util.Map;
  10 +
  11 +public interface MaterialAreaService extends IService<MaterialArea>{
  12 +
  13 + List<Map<String, Object>> queryCode();
  14 +}
... ...
src/main/java/com/huaheng/pc/config/materialArea/service/MaterialAreaServiceImpl.java 0 → 100644
  1 +package com.huaheng.pc.config.materialArea.service;
  2 +
  3 +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
  4 +import com.baomidou.mybatisplus.core.toolkit.Wrappers;
  5 +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
  6 +import com.huaheng.common.utils.security.ShiroUtils;
  7 +import com.huaheng.pc.config.locationHigh.domain.LocationHigh;
  8 +import com.huaheng.pc.config.locationHigh.mapper.LocationHighMapper;
  9 +import com.huaheng.pc.config.locationHigh.service.LocationHighService;
  10 +import com.huaheng.pc.config.materialArea.domain.MaterialArea;
  11 +import com.huaheng.pc.config.materialArea.mapper.MaterialAreaMapper;
  12 +import com.huaheng.pc.config.zone.domain.Zone;
  13 +import org.springframework.stereotype.Service;
  14 +
  15 +import java.util.List;
  16 +import java.util.Map;
  17 +
  18 +@Service("materialArea")
  19 +public class MaterialAreaServiceImpl extends ServiceImpl<MaterialAreaMapper, MaterialArea> implements MaterialAreaService {
  20 +
  21 +
  22 + @Override
  23 + public List<Map<String, Object>> queryCode() {
  24 + LambdaQueryWrapper<MaterialArea> lambda = Wrappers.lambdaQuery();
  25 + lambda.select(MaterialArea::getCode, MaterialArea::getId, MaterialArea::getName)
  26 + .eq(MaterialArea::getWarehouseCode, ShiroUtils.getWarehouseCode());
  27 + List<Map<String, Object>> mapList = this.listMaps(lambda);
  28 + return mapList;
  29 + }
  30 +}
... ...
src/main/java/com/huaheng/pc/config/materialType/controller/MaterialTypeController.java
1 1 package com.huaheng.pc.config.materialType.controller;
2 2  
3 3 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
  4 +import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
4 5 import com.baomidou.mybatisplus.core.metadata.IPage;
5 6 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
6 7 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
... ... @@ -16,6 +17,8 @@ import com.huaheng.framework.web.page.TableDataInfo;
16 17 import com.huaheng.framework.web.page.TableSupport;
17 18 import com.huaheng.pc.config.material.domain.Material;
18 19 import com.huaheng.pc.config.material.service.MaterialService;
  20 +import com.huaheng.pc.config.materialArea.domain.MaterialArea;
  21 +import com.huaheng.pc.config.materialArea.service.MaterialAreaService;
19 22 import com.huaheng.pc.config.materialType.domain.MaterialType;
20 23 import com.huaheng.pc.config.materialType.service.MaterialTypeService;
21 24 import io.swagger.annotations.Api;
... ... @@ -38,6 +41,8 @@ public class MaterialTypeController extends BaseController {
38 41 @Resource
39 42 private MaterialTypeService materialTypeService;
40 43 @Resource
  44 + private MaterialAreaService materialAreaService;
  45 + @Resource
41 46 private MaterialService materialService;
42 47  
43 48 private String prefix = "config/materialType";
... ... @@ -131,6 +136,39 @@ public class MaterialTypeController extends BaseController {
131 136 }
132 137  
133 138 /**
  139 + * 修改物料
  140 + */
  141 + @GetMapping("/editBatch/{ids}")
  142 + public String editBatch (@PathVariable("ids") String ids, ModelMap mmap) {
  143 + mmap.put("ids", ids);
  144 + return prefix + "/editBatch";
  145 + }
  146 +
  147 + /**
  148 + * 修改保存物料
  149 + */
  150 + @ApiOperation(value = "批量修改物料", notes = "批量修改物料", httpMethod = "POST")
  151 + @RequiresPermissions("config:material:edit")
  152 + @Log(title = "基础数据-物料管理", operating = "批量修改物料", action = BusinessType.UPDATE)
  153 + @PostMapping("/editBatchSave")
  154 + @ResponseBody
  155 + public AjaxResult editBatchSave (String ids, String materialAreaCode) {
  156 + if(StringUtils.isNotEmpty(materialAreaCode)) {
  157 + LambdaQueryWrapper<MaterialArea> materialAreaLambdaQueryWrapper = Wrappers.lambdaQuery();
  158 + materialAreaLambdaQueryWrapper.eq(MaterialArea::getCode, materialAreaCode);
  159 + MaterialArea materialArea = materialAreaService.getOne(materialAreaLambdaQueryWrapper);
  160 + if (materialArea == null) {
  161 + return AjaxResult.error("没找到对应的物料区域");
  162 + }
  163 + }
  164 + String[] idArray = Convert.toStrArray(ids);
  165 + LambdaUpdateWrapper<MaterialType> wrapper = Wrappers.lambdaUpdate();
  166 + wrapper.in(MaterialType::getId, idArray)
  167 + .set(MaterialType::getMaterialAreaCode, materialAreaCode);
  168 + return toAjax(materialTypeService.update(wrapper));
  169 + }
  170 +
  171 + /**
134 172 * 删除物料类别
135 173 */
136 174 @RequiresPermissions("config:materialType:remove")
... ...
src/main/java/com/huaheng/pc/config/materialType/domain/MaterialType.java
... ... @@ -57,6 +57,12 @@ public class MaterialType implements Serializable {
57 57 private String abcClass;
58 58  
59 59 /**
  60 + * 物料分区
  61 + */
  62 + @TableField(value = "materialAreaCode")
  63 + private String materialAreaCode;
  64 +
  65 + /**
60 66 * 保质期(天)
61 67 */
62 68 @TableField(value = "daysToExpire")
... ...
src/main/java/com/huaheng/pc/config/zone/controller/ZoneController.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.constant.QuantityConstant;
7 8 import com.huaheng.common.support.Convert;
8 9 import com.huaheng.common.utils.StringUtils;
9 10 import com.huaheng.common.utils.security.ShiroUtils;
... ... @@ -15,6 +16,7 @@ import com.huaheng.framework.web.page.PageDomain;
15 16 import com.huaheng.framework.web.page.TableDataInfo;
16 17 import com.huaheng.framework.web.page.TableSupport;
17 18 import com.huaheng.pc.config.container.domain.Container;
  19 +import com.huaheng.pc.config.container.service.ContainerService;
18 20 import com.huaheng.pc.config.location.domain.Location;
19 21 import com.huaheng.pc.config.location.service.LocationService;
20 22 import com.huaheng.pc.config.station.domain.Station;
... ... @@ -31,6 +33,7 @@ import java.util.ArrayList;
31 33 import java.util.HashMap;
32 34 import java.util.List;
33 35 import java.util.Map;
  36 +import java.util.stream.Collectors;
34 37  
35 38 /**
36 39 * 库区 信息操作处理
... ... @@ -49,6 +52,8 @@ public class ZoneController extends BaseController {
49 52 private ZoneService zoneService;
50 53 @Resource
51 54 private LocationService locationService;
  55 + @Resource
  56 + private ContainerService containerService;
52 57  
53 58 @RequiresPermissions("config:zone:view")
54 59 @GetMapping()
... ... @@ -180,28 +185,38 @@ public class ZoneController extends BaseController {
180 185  
181 186 @GetMapping("/getStatus")
182 187 @ResponseBody
183   - public AjaxResult getStatus(String zoneCode){
  188 + public AjaxResult getStatus(String zoneCode) {
184 189 HashMap<String, Integer> map = new HashMap<>();
185 190 LambdaQueryWrapper<Location> queryWrapper = Wrappers.lambdaQuery();
186 191 queryWrapper.eq(Location::getZoneCode,zoneCode);
187 192 List<Location> locationList = locationService.list(queryWrapper);
188   - map.put("location",locationList.size());
  193 + map.put("location", locationList.size());
189 194 queryWrapper = Wrappers.lambdaQuery();
190 195 queryWrapper.and(wrapper->wrapper.isNull(Location::getContainerCode).or().eq(Location::getContainerCode,""))
191 196 .eq(Location::getZoneCode,zoneCode);
192 197 List<Location> emptyLocationList = locationService.list(queryWrapper);
193   - map.put("emptyLocation",emptyLocationList.size());
194   - queryWrapper = Wrappers.lambdaQuery();
195   - queryWrapper.eq(Location::getZoneCode,zoneCode)
196   - .eq(Location::getStatus,"empty")
197   - .isNotNull(Location::getContainerCode)
198   - .ne(Location::getContainerCode,"");
199   - List<Location> haveContainLocation = locationService.list(queryWrapper);
200   - map.put("haveContainLocation",haveContainLocation.size());
201   - queryWrapper = Wrappers.lambdaQuery();
202   - queryWrapper.eq(Location::getZoneCode,zoneCode)
203   - .eq(Location::getStatus,"some");
204   - map.put("haveInventoryLocation",locationService.list(queryWrapper).size());
  198 + map.put("emptyLocation", emptyLocationList.size());
  199 +
  200 + LambdaQueryWrapper<Container> containerLambdaQueryWrapper2 = Wrappers.lambdaQuery();
  201 + containerLambdaQueryWrapper2.eq(Container::getStatus, QuantityConstant.STATUS_CONTAINER_EMPTY);
  202 + List<Container> containerList2 = containerService.list(containerLambdaQueryWrapper2);
  203 + List<String> containerCodeList2 = containerList2.stream().map(Container::getCode).collect(Collectors.toList());
  204 + LambdaQueryWrapper<Location> locationLambdaQueryWrapper2 = Wrappers.lambdaQuery();
  205 + locationLambdaQueryWrapper2.in(Location::getContainerCode, containerCodeList2);
  206 + locationLambdaQueryWrapper2.eq(Location::getZoneCode, zoneCode);
  207 + List<Location> haveEmptyContainLocation = locationService.list(locationLambdaQueryWrapper2);
  208 + map.put("haveContainLocation", haveEmptyContainLocation.size());
  209 +
  210 + LambdaQueryWrapper<Container> containerLambdaQueryWrapper = Wrappers.lambdaQuery();
  211 + containerLambdaQueryWrapper.eq(Container::getStatus, QuantityConstant.STATUS_CONTAINER_SOME);
  212 + List<Container> containerList = containerService.list(containerLambdaQueryWrapper);
  213 + List<String> containerCodeList = containerList.stream().map(Container::getCode).collect(Collectors.toList());
  214 + LambdaQueryWrapper<Location> locationLambdaQueryWrapper = Wrappers.lambdaQuery();
  215 + locationLambdaQueryWrapper.in(Location::getContainerCode, containerCodeList);
  216 + locationLambdaQueryWrapper.eq(Location::getZoneCode, zoneCode);
  217 + List<Location> haveInventoryLocation = locationService.list(locationLambdaQueryWrapper);
  218 + map.put("haveInventoryLocation", haveInventoryLocation.size());
  219 +
205 220 return AjaxResult.success().setData(map);
206 221 }
207 222 }
... ...
src/main/java/com/huaheng/pc/monitor/systemLog/controller/SystemLogController.java 0 → 100644
  1 +package com.huaheng.pc.monitor.systemLog.controller;
  2 +
  3 +import com.huaheng.common.exception.service.ServiceException;
  4 +import org.apache.shiro.authz.annotation.RequiresPermissions;
  5 +import org.springframework.beans.factory.annotation.Value;
  6 +import org.springframework.stereotype.Controller;
  7 +import org.springframework.ui.ModelMap;
  8 +import org.springframework.web.bind.annotation.GetMapping;
  9 +import org.springframework.web.bind.annotation.RequestMapping;
  10 +
  11 +import java.io.*;
  12 +
  13 +@Controller
  14 +@RequestMapping("/monitor/systemLog")
  15 +public class SystemLogController {
  16 +
  17 + /**
  18 + * 此处值应为日志所在路径
  19 + */
  20 +// @Value("${log.path}")
  21 +// private String path;
  22 + private String path = "D:\\company\\wms2\\WMSlog";
  23 + private String prefix = "monitor/systemLog";
  24 +
  25 +
  26 + @RequiresPermissions("monitor:systemLog:view")
  27 + @GetMapping("")
  28 + public String systemLog(ModelMap mmap){
  29 + path = path + "\\";
  30 + System.out.println("path路径为---"+path+"-----");
  31 + File info = new File(path+"sys-info");
  32 + File debug = new File(path+"sys-debug");
  33 + File warn = new File(path+"sys-warn");
  34 + File error = new File(path+"sys-error");
  35 + mmap.put("infoNames",info.list());
  36 + mmap.put("debugNames",debug.list());
  37 + mmap.put("warnNames",warn.list());
  38 + mmap.put("errorNames",error.list());
  39 + return prefix+"/systemLog";
  40 + }
  41 +
  42 + @GetMapping("/logview")
  43 + public String logview(String name,ModelMap mmap){
  44 + String[] type = name.split("\\.");
  45 + String filePath = path+type[0]+"\\"+name;
  46 + StringBuilder stringBuilder = new StringBuilder();
  47 + String len;
  48 + try {
  49 + BufferedReader bufferedReader = new BufferedReader(new FileReader(filePath));
  50 + while ((len = bufferedReader.readLine())!=null){
  51 + stringBuilder.append(len+"<br>\n");
  52 + }
  53 + }catch (FileNotFoundException e){
  54 + throw new ServiceException("找不到该文件");
  55 + }catch (IOException e){
  56 + throw new ServiceException("读取过程出现异常");
  57 + }catch (Exception e){
  58 + throw new ServiceException("未知的错误");
  59 + }
  60 + mmap.put("log",stringBuilder.toString());
  61 + return prefix + "/logview";
  62 + }
  63 +
  64 +}
... ...
src/main/java/com/huaheng/pc/receipt/receiving/service/ReceivingService.java
... ... @@ -11,6 +11,7 @@ import com.huaheng.common.support.Convert;
11 11 import com.huaheng.common.utils.StringUtils;
12 12 import com.huaheng.common.utils.security.ShiroUtils;
13 13 import com.huaheng.framework.web.domain.AjaxResult;
  14 +import com.huaheng.framework.web.service.ConfigService;
14 15 import com.huaheng.pc.config.FilterConfigDetail.domain.FilterConfigDetail;
15 16 import com.huaheng.pc.config.FilterConfigDetail.service.FilterConfigDetailService;
16 17 import com.huaheng.pc.config.configValue.domain.ConfigValue;
... ... @@ -76,6 +77,8 @@ public class ReceivingService {
76 77 @Resource
77 78 private ContainerService containerService;
78 79 @Resource
  80 + private ConfigService configService;
  81 + @Resource
79 82 private TaskHeaderService taskHeaderService;
80 83 @Resource
81 84 private LocationTypeService locationTypeService;
... ... @@ -150,14 +153,14 @@ public class ReceivingService {
150 153 }
151 154 }
152 155  
153   - String locatingRule = this.findPositionRule(receiptContainerHeader, receiptContainerDetail);
154   - //通过定位规则查找自定义sql
155   - if (StringUtils.isEmpty(locatingRule)){
  156 + String value = configService.getKey(QuantityConstant.RULE_ALLOCATION);
  157 + if (StringUtils.isEmpty(value)) {
156 158 throw new ServiceException("未绑定定位规则");
157 159 }
  160 + int allocationRule = Integer.parseInt(value);
158 161 Material material = materialService.findAllByCode(receiptContainerDetail.getMaterialCode());
159   - Integer materialAreas = material.getMaterialAreas();
160   - String locationCode = locationAllocationService.allocation(locatingRule, area, ShiroUtils.getWarehouseCode(),container.getCode(), materialAreas);
  162 + String materialAreaCode = material.getMaterialAreaCode();
  163 + String locationCode = locationAllocationService.allocation(allocationRule, null, 0, area, ShiroUtils.getWarehouseCode(),container.getCode(), materialAreaCode);
161 164  
162 165 if (StringUtils.isNotEmpty(locationCode)){
163 166 locationService.updateStatus(locationCode, QuantityConstant.STATUS_LOCATION_LOCK);
... ... @@ -171,7 +174,7 @@ public class ReceivingService {
171 174 int rowFlag = location.getRowFlag().intValue();
172 175 Integer preTaskNo = 0;
173 176 //如果是外侧库位,那么就要判断该库位对应的内侧库位是不是有托盘
174   - if(rowFlag == 1) {
  177 + if(rowFlag == QuantityConstant.ROW_OUT) {
175 178 Location insideLocation = locationService.getInsideNear(location);
176 179 if(StringUtils.isNotEmpty(insideLocation.getContainerCode())) {
177 180 Location destinationLocation = locationService.getEmptyLocation(insideLocation);
... ...
src/main/java/com/huaheng/pc/task/taskHeader/service/ReceiptTaskService.java
... ... @@ -281,9 +281,9 @@ public class ReceiptTaskService {
281 281 inventoryHeader.setLocationCode(task.getToLocation());
282 282 Location location = locationService.getLocationByCode(task.getToLocation(), ShiroUtils.getWarehouseCode());
283 283 inventoryHeader.setZoneCode(location.getZoneCode());
  284 + inventoryHeader.setTotalWeight(task.getWeight());
284 285 inventoryHeader.setContainerCode(task.getContainerCode());
285 286 inventoryHeader.setContainerStatus(QuantityConstant.STATUS_CONTAINER_SOME);
286   - inventoryHeader.setTotalWeight(task.getWeight());
287 287 inventoryHeader.setTotalQty(new BigDecimal(0));
288 288 inventoryHeader.setTotalLines(0);
289 289 inventoryHeader.setLocking(1);
... ...
src/main/java/com/huaheng/pc/task/taskHeader/service/TaskHeaderServiceImpl.java
... ... @@ -375,11 +375,11 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
375 375 throw new ServiceException("任务" + taskIds[i] + "未找到,执行中止");
376 376 }
377 377 //任务写入重量
378   - String weight = "";
379   - if (StringUtils.isNotNull(weightConvert)) {
380   - weight = weightConvert[i];
381   - }
382   - task.setWeight(weight);
  378 +// String weight = "";
  379 +// if (StringUtils.isNotNull(weightConvert)) {
  380 +// weight = weightConvert[i];
  381 +// }
  382 +// task.setWeight(weight);
383 383 //如果已完成则不管
384 384 if (task.getStatus().equals(QuantityConstant.TASK_STATUS_COMPLETED)) {
385 385 return AjaxResult.success("任务(" + taskIds[i] + ")任务已经是完成的!");
... ...
src/main/java/com/huaheng/pc/task/taskHeader/service/TransferTaskService.java
... ... @@ -98,11 +98,15 @@ public class TransferTaskService {
98 98 return AjaxResult.error("目标库位和源库位不在同一个巷道");
99 99 }
100 100  
  101 + if(!sourceLocation.getHigh().equals(desLocation.getHigh())) {
  102 + return AjaxResult.error("目标库位和源库位高度不一样");
  103 + }
  104 +
101 105 if(!sourceLocation.getArea().equals(desLocation.getArea())) {
102 106 return AjaxResult.error("目标库位和源库位不在同一个区域");
103 107 }
104 108  
105   - if(sourceLocation.getRowFlag() == 1) {
  109 + if(sourceLocation.getRowFlag() == QuantityConstant.ROW_OUT) {
106 110 Location location1 = locationService.getNear(sourceLocation); //内侧库位
107 111 String locationCode = location1.getCode();
108 112 if(StringUtils.isNotEmpty(location1.getContainerCode())) {
... ...
src/main/resources/application-druid.properties
... ... @@ -2,19 +2,26 @@
2 2 spring.datasource.type=com.alibaba.druid.pool.DruidDataSource
3 3 spring.datasource.driverClassName=com.mysql.cj.jdbc.Driver
4 4 # 主库
5   -spring.datasource.druid.master.url=jdbc:mysql://localhost:3306/wms_v2?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2b8
  5 +#spring.datasource.druid.master.url=jdbc:mysql://172.16.29.45:3306/wms_v2?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2b8
  6 +spring.datasource.druid.master.url=jdbc:mysql://127.0.0.1:3306/wms_v2?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2b8
6 7 #spring.datasource.druid.master.url=jdbc:mysql://172.16.29.45:3306/huahengExample?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false
7 8 #spring.datasource.druid.master.url=jdbc:mysql://117.62.222.186:3306/wms_v2?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2b8
8 9  
9 10 #spring.datasource.druid.master.username=softhuaheng
10 11 #spring.datasource.druid.master.password=HHrobot123.
  12 +#spring.datasource.druid.master.username=root
  13 +#spring.datasource.druid.master.password=hhsoftware
11 14 spring.datasource.druid.master.username=root
12   -spring.datasource.druid.master.password=hhsoftware
  15 +spring.datasource.druid.master.password=root
13 16 # 从库
14 17 spring.datasource.druid.slave.open = false
15 18 spring.datasource.druid.slave.url=jdbc:mysql://117.62.222.186:3306/wms_v2?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false
16   -#spring.datasource.druid.master.username=softhuaheng
17   -#spring.datasource.druid.master.password=HHrobot123.
  19 +#spring.datasource.druid.slave.username=softhuaheng
  20 +#spring.datasource.druid.slave.password=HHrobot123.
  21 +#WCS库
  22 +spring.datasource.druid.wcs.url = jdbc:mysql://172.16.29.45:3306/huahengwcs3?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2b8
  23 +spring.datasource.druid.wcs.username=softhuaheng
  24 +spring.datasource.druid.wcs.password=HHrobot123.
18 25 # 初始连接数
19 26 spring.datasource.druid.initial-size=4
20 27 # 最大连接池数量,以当前CPU核数加2
... ... @@ -46,4 +53,4 @@ spring.datasource.druid.filter.wall.config.multi-statement-allow=true
46 53 logging.level.com.huaheng=debug
47 54 logging.level.org.springframework=warn
48 55 logging.level.spring.springboot.dao=DEBUG
49   -
  56 +logger.path=D:\\home\\WMSlog
... ...
src/main/resources/application.yml
... ... @@ -189,3 +189,6 @@ gen:
189 189 autoRemovePre: false
190 190 # 表前缀(类名不会包含表前缀)
191 191 gen.tablePrefix: sys_
  192 +#系统日志地址
  193 +log:
  194 + path: D:\home\WMSlog
... ...
src/main/resources/logback.xml
... ... @@ -5,6 +5,7 @@
5 5 <property name="log.pattern" value="%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n" />
6 6 <!--<appender name="ROLLING" class="ch.qos.logback.core.rolling.RollingFileAppender" />-->
7 7 <property resource="application-druid.properties" />
  8 +<!-- <property name="log.path" value="${logger.path}" />-->
8 9 <property name="dataSource" value="${spring.datasource.type}" />
9 10 <property name="driverClassName" value="${spring.datasource.driverClassName}" />
10 11 <property name="url" value="${spring.datasource.druid.master.url}" />
... ... @@ -186,4 +187,4 @@ each file should be at most 100MB, keep 60 days worth of history, but at most 20
186 187 <!--<logger name="sys-user" level="debug">-->
187 188 <!--<appender-ref ref="sys-user"/>-->
188 189 <!--</logger>-->
189   -</configuration>
190 190 \ No newline at end of file
  191 +</configuration>
... ...
src/main/resources/static/huaheng/index.js
... ... @@ -231,9 +231,9 @@ $(function () {
231 231 $('.menuTabs .page-tabs-content').append(str);
232 232 scrollToTab($('.menuTab.active'));
233 233 }
234   - // else {
235   - // refreshTab();
236   - // }
  234 + else {
  235 + refreshTab();
  236 + }
237 237 return false;
238 238 }
239 239  
... ...
src/main/resources/templates/config/locationHigh/add.html
... ... @@ -12,6 +12,32 @@
12 12 </div>
13 13 </div>
14 14 <div class="form-group">
  15 + <label class="col-sm-3 control-label">库位类型编码:</label>
  16 + <div class="col-sm-8">
  17 + <input id="locationTypeCode" name="locationTypeCode" class="form-control" type="text">
  18 + </div>
  19 + </div>
  20 + <div class="form-group">
  21 + <label class="col-sm-3 control-label">高度值:</label>
  22 + <div class="col-sm-8">
  23 + <input id="highLevel" name="highLevel" class="form-control" type="text">
  24 + </div>
  25 + </div>
  26 + <div class="form-group">
  27 + <label class="col-sm-3 control-label">高低位:</label>
  28 + <div class="col-sm-8">
  29 + <select id="high" name="high" class="form-control" th:with="high=${@dict.getType('high')}">
  30 + <option th:each="item : ${high}" th:text="${item['dictLabel']}" th:value="${item['dictValue']}"></option>
  31 + </select>
  32 + </div>
  33 + </div>
  34 + <div class="form-group">
  35 + <label class="col-sm-3 control-label">顺序:</label>
  36 + <div class="col-sm-8">
  37 + <input id="sequence" name="sequence" class="form-control" type="text">
  38 + </div>
  39 + </div>
  40 + <div class="form-group">
15 41 <div class="form-control-static col-sm-offset-9">
16 42 <button type="submit" class="btn btn-primary">提交</button>
17 43 <button onclick="$.modal.close()" class="btn btn-danger" type="button">关闭</button>
... ...
src/main/resources/templates/config/locationHigh/edit.html
... ... @@ -4,155 +4,40 @@
4 4 <head th:include="include :: header"></head>
5 5 <body class="white-bg">
6 6 <div class="wrapper wrapper-content animated fadeInRight ibox-content">
7   - <form class="form-horizontal m" id="form-locationType-edit" th:object="${locationType}">
  7 + <form class="form-horizontal m" id="form-locationHigh-edit" th:object="${locationHigh}">
8 8 <input id="id" name="id" th:field="*{id}" type="hidden">
9 9 <div class="form-group">
10   - <label class="col-sm-3 control-label">区域:</label>
11   - <div class="col-sm-8">
12   - <select id="zoneCode" name="zoneCode" class="form-control" th:with="zoneType=${@zone.getZoneCodeList()}">
13   - <option th:each="item : ${zoneType}" th:text="${item['name']}" th:value="${item['code']}"></option>
14   - </select>
15   - </div>
16   - </div>
17   - <div class="form-group">
18 10 <label class="col-sm-3 control-label">编码:</label>
19 11 <div class="col-sm-8">
20 12 <input id="code" name="code" th:field="*{code}" class="form-control" type="text">
21 13 </div>
22 14 </div>
23 15 <div class="form-group">
24   - <label class="col-sm-3 control-label">库位类型名称:</label>
25   - <div class="col-sm-8">
26   - <input id="name" name="name" th:field="*{name}" class="form-control" type="text">
27   - </div>
28   - </div>
29   - <div class="form-group">
30   - <label class="col-sm-3 control-label">长m:</label>
31   - <div class="col-sm-8">
32   - <input id="length" name="length" th:field="*{length}" class="form-control" type="text">
33   - </div>
34   - </div>
35   - <div class="form-group">
36   - <label class="col-sm-3 control-label">宽m:</label>
37   - <div class="col-sm-8">
38   - <input id="width" name="width" th:field="*{width}" class="form-control" type="text">
39   - </div>
40   - </div>
41   - <div class="form-group">
42   - <label class="col-sm-3 control-label">高m:</label>
43   - <div class="col-sm-8">
44   - <input id="height" name="height" th:field="*{height}" class="form-control" type="text">
45   - </div>
46   - </div>
47   - <div class="form-group">
48   - <label class="col-sm-3 control-label">最大重量kg:</label>
49   - <div class="col-sm-8">
50   - <input id="maxWeight" name="maxWeight" th:field="*{maxWeight}" class="form-control" type="text">
51   - </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="minQtyUm" name="minQtyUm" th:field="*{minQtyUm}" class="form-control" type="text">
57   - </div>
58   - </div>
59   - <div class="form-group">
60   - <label class="col-sm-3 control-label">校验位:</label>
  16 + <label class="col-sm-3 control-label">库位类型编码:</label>
61 17 <div class="col-sm-8">
62   - <input id="checkDigit" name="checkDigit" th:field="*{checkDigit}" class="form-control" type="text">
  18 + <input id="locationTypeCode" name="locationTypeCode" th:field="*{locationTypeCode}" class="form-control" type="text">
63 19 </div>
64 20 </div>
65 21 <div class="form-group">
66   - <label class="col-sm-3 control-label">最多混放物料数:</label>
  22 + <label class="col-sm-3 control-label">高度值:</label>
67 23 <div class="col-sm-8">
68   - <input id="maxMaterials" name="maxMaterials" th:field="*{maxMaterials}" class="form-control" type="text">
  24 + <input id="highLevel" name="highLevel" th:field="*{highLevel}" class="form-control" type="text">
69 25 </div>
70 26 </div>
71 27 <div class="form-group">
72   - <label class="col-sm-3 control-label">最大批号数量:</label>
  28 + <label class="col-sm-3 control-label">高低位:</label>
73 29 <div class="col-sm-8">
74   - <input id="maxLots" name="maxLots" th:field="*{maxLots}" class="form-control" type="text">
  30 + <select id="high" name="high" th:field="*{high}" class="form-control" th:with="high=${@dict.getType('high')}">
  31 + <option th:each="item : ${high}" th:text="${item['dictLabel']}" th:value="${item['dictValue']}"></option>
  32 + </select>
75 33 </div>
76 34 </div>
77 35 <div class="form-group">
78   - <label class="col-sm-3 control-label">最大允许托盘数:</label>
79   - <div class="col-sm-8">
80   - <input id="maxContainers" name="maxContainers" th:field="*{maxContainers}" class="form-control" type="text">
81   - </div>
82   - </div>
83   - <!--<div class="form-group"> -->
84   - <!--<label class="col-sm-3 control-label">创建时间:</label>-->
85   - <!--<div class="col-sm-8">-->
86   - <!--<input id="created" name="created" th:field="*{created}" class="form-control" type="text">-->
87   - <!--</div>-->
88   - <!--</div>-->
89   - <!--<div class="form-group"> -->
90   - <!--<label class="col-sm-3 control-label">创建者:</label>-->
91   - <!--<div class="col-sm-8">-->
92   - <!--<input id="createdBy" name="createdBy" th:field="*{createdBy}" class="form-control" type="text">-->
93   - <!--</div>-->
94   - <!--</div>-->
95   - <!--<div class="form-group"> -->
96   - <!--<label class="col-sm-3 control-label">创建时间:</label>-->
97   - <!--<div class="col-sm-8">-->
98   - <!--<input id="lastUpdated" name="lastUpdated" th:field="*{lastUpdated}" class="form-control" type="text">-->
99   - <!--</div>-->
100   - <!--</div>-->
101   - <!--<div class="form-group"> -->
102   - <!--<label class="col-sm-3 control-label">更新者:</label>-->
103   - <!--<div class="col-sm-8">-->
104   - <!--<input id="lastUpdatedBy" name="lastUpdatedBy" th:field="*{lastUpdatedBy}" class="form-control" type="text">-->
105   - <!--</div>-->
106   - <!--</div>-->
107   - <div class="form-group">
108   - <label class="col-sm-3 control-label">是否有效:</label>
  36 + <label class="col-sm-3 control-label">顺序:</label>
109 37 <div class="col-sm-8">
110   - <!--<input id="enable" name="enable" th:field="*{enable}" class="form-control" type="text">-->
111   - <div class="onoffswitch">
112   - <input type="checkbox" th:checked="${locationType.enable}" class="onoffswitch-checkbox" id="enable" name="enable">
113   - <label class="onoffswitch-label" for="enable">
114   - <span class="onoffswitch-inner"></span>
115   - <span class="onoffswitch-switch"></span>
116   - </label>
117   - </div>
  38 + <input id="sequence" name="sequence" th:field="*{sequence}" class="form-control" type="text">
118 39 </div>
119 40 </div>
120   - <!--<div class="form-group"> -->
121   - <!--<label class="col-sm-3 control-label">是否删除:</label>-->
122   - <!--<div class="col-sm-8">-->
123   - <!--<input id="deleted" name="deleted" th:field="*{deleted}" class="form-control" type="text">-->
124   - <!--</div>-->
125   - <!--</div>-->
126   - <!--<div class="form-group"> -->
127   - <!--<label class="col-sm-3 control-label">自定义字段1:</label>-->
128   - <!--<div class="col-sm-8">-->
129   - <!--<input id="userDef1" name="userDef1" th:field="*{userDef1}" class="form-control" type="text">-->
130   - <!--</div>-->
131   - <!--</div>-->
132   - <!--<div class="form-group"> -->
133   - <!--<label class="col-sm-3 control-label">自定义字段2:</label>-->
134   - <!--<div class="col-sm-8">-->
135   - <!--<input id="userDef2" name="userDef2" th:field="*{userDef2}" class="form-control" type="text">-->
136   - <!--</div>-->
137   - <!--</div>-->
138   - <!--<div class="form-group"> -->
139   - <!--<label class="col-sm-3 control-label">自定义字段3:</label>-->
140   - <!--<div class="col-sm-8">-->
141   - <!--<input id="userDef3" name="userDef3" th:field="*{userDef3}" class="form-control" type="text">-->
142   - <!--</div>-->
143   - <!--</div>-->
144   - <!--<div class="form-group"> -->
145   - <!--<label class="col-sm-3 control-label">自定义字段4:</label>-->
146   - <!--<div class="col-sm-8">-->
147   - <!--<input id="userDef4" name="userDef4" th:field="*{userDef4}" class="form-control" type="text">-->
148   - <!--</div>-->
149   - <!--</div>-->
150   - <!--<div class="form-group"> -->
151   - <!--<label class="col-sm-3 control-label">自定义字段5:</label>-->
152   - <!--<div class="col-sm-8">-->
153   - <!--<input id="userDef5" name="userDef5" th:field="*{userDef5}" class="form-control" type="text">-->
154   - <!--</div>-->
155   - <!--</div>-->
156 41 <div class="form-group">
157 42 <div class="form-control-static col-sm-offset-9">
158 43 <button type="submit" class="btn btn-primary">提交</button>
... ... @@ -163,16 +48,11 @@
163 48 </div>
164 49 <div th:include="include::footer"></div>
165 50 <script type="text/javascript">
166   - var prefix = ctx + "config/locationType";
167   - $("#form-locationType-edit").validate({
168   - rules:{
169   - xxxx:{
170   - required:true,
171   - },
172   - },
  51 + var prefix = ctx + "config/locationHigh";
  52 + $("#form-locationHigh-edit").validate({
173 53 submitHandler: function(form) {
174 54 // $.operate.save(prefix + "/edit", $('#form-locationType-edit').serialize());
175   - var tableValue = $.common.getTableValue("#form-locationType-edit");
  55 + var tableValue = $.common.getTableValue("#form-locationHigh-edit");
176 56 $.operate.save(prefix + "/edit", tableValue);
177 57 }
178 58 });
... ...
src/main/resources/templates/config/locationHigh/locationHigh.html
... ... @@ -41,6 +41,8 @@
41 41 var removeFlag = [[${@permission.hasPermi('config:locationType:remove')}]];
42 42 var prefix = ctx + "config/locationHigh"
43 43 var datas = [[${@dict.getType('sys_normal_disable')}]];
  44 + var rowFlags = [[${@dict.getType('rowFlag')}]];
  45 + var high = [[${@dict.getType('high')}]];
44 46 $(function() {
45 47 var options = {
46 48 url: prefix + "/list",
... ... @@ -66,10 +68,17 @@
66 68 title : '库位类型编码'
67 69 },
68 70 {
69   - field : 'high',
  71 + field : 'highLevel',
70 72 title : '高度值'
71 73 },
72 74 {
  75 + field : 'high',
  76 + title : '高低位',
  77 + formatter: function(value, row, index) {
  78 + return $.table.selectDictLabel(high, value);
  79 + }
  80 + },
  81 + {
73 82 field : 'sequence',
74 83 title : '顺序'
75 84 },
... ...
src/main/resources/templates/config/material/edit.html
... ... @@ -26,10 +26,7 @@
26 26 <div class="form-group">
27 27 <label class="col-sm-3 control-label">单位:</label>
28 28 <div class="col-sm-8">
29   - <select id="unit" name="unit" class="form-control" th:with="materialType=${@dict.getType('materialType')}">
30   - <option th:each="item : ${materialType}" th:text="${item['dictLabel']}" th:value="${item['dictValue']}"
31   - th:field="*{unit}" ></option>
32   - </select>
  29 + <input id="unit" name="unit" class="form-control" type="text" th:field="*{unit}">
33 30 </div>
34 31 </div>
35 32 <div class="form-group">
... ...
src/main/resources/templates/config/material/editBatch.html
... ... @@ -4,231 +4,28 @@
4 4 <head th:include="include :: header"></head>
5 5 <body class="white-bg">
6 6 <div class="wrapper wrapper-content animated fadeInRight ibox-content">
7   - <form class="form-horizontal m" id="form-material-add">
8   - <input name="ids" hidden="hidden" th:value="${ids}">
  7 + <form class="form-horizontal m" id="form-material-add" >
  8 + <input name="ids" hidden="hidden" th:value="${ids}" >
9 9 <div class="form-group">
10   - <label class="col-sm-3 control-label">物料分区</label>
  10 + <label class="col-sm-3 control-label">物料分区编码</label>
11 11 <div class="col-sm-8">
12   - <select id="area" name="area" class="form-control" th:with="areas=${@dict.getType('material_areas')}">
13   - <option th:each="item : ${areas}" th:text="${item['dictLabel']}" th:value="${item['dictValue']}"></option>
14   - </select>
  12 + <input id="materialAreaCode" name="materialAreaCode" class="form-control" type="text">
15 13 </div>
16 14 </div>
17   - <!-- <div class="form-group">-->
18   - <!-- <label class="col-sm-3 control-label">物料类别:</label>-->
19   - <!-- <div class="col-sm-8">-->
20   - <!-- <select id="type" name="type" class="form-control" th:with="materialType=${@materialType.queryType()}" th:field="*{type}">-->
21   - <!-- <option th:each="item : ${materialType}" th:text="${item['name']}" th:value="${item['code']}"></option>-->
22   - <!-- </select>-->
23   - <!-- </div>-->
24   - <!-- </div>-->
25   - <!-- <div class="form-group">-->
26   - <!-- <label class="col-sm-3 control-label">ABC分类:</label>-->
27   - <!-- <div class="col-sdm-8">-->
28   - <!-- <input id="abcClass" name="abcClass" class="form-control" type="text" th:field="*{abcClass}"/>-->
29   - <!-- </div>-->
30   - <!-- </div>-->
31   - <!-- <div class="form-group">-->
32   - <!-- <label class="col-sm-3 control-label">保质期(天)</label>-->
33   - <!-- <div class="col-sm-8">-->
34   - <!-- <input id="daysToExpire" name="daysToExpire" class="form-control" type="text" th:field="*{daysToExpire}"/>-->
35   - <!-- </div>-->
36   - <!-- </div>-->
37   - <!-- <div class="form-group">-->
38   - <!-- <label class="col-sm-3 control-label">定位规则:</label>-->
39   - <!-- <div class="col-sm-8">-->
40   - <!-- <input id="locatingRule" name="locatingRule" class="form-control" type="text" th:field="*{locatingRule}">-->
41   - <!-- </div>-->
42   - <!-- </div>-->
43   - <!-- <div class="form-group">-->
44   - <!-- <label class="col-sm-3 control-label">分配规则:</label>-->
45   - <!-- <div class="col-sm-8">-->
46   - <!-- <input id="allocationRule" name="allocationRule" class="form-control" type="text" th:field="*{allocationRule}">-->
47   - <!-- </div>-->
48   - <!-- </div>-->
49   - <!-- <div class="form-group">-->
50   - <!-- <label class="col-sm-3 control-label">补货规则:</label>-->
51   - <!-- <div class="col-sm-8">-->
52   - <!-- <input id="replenishmentRule" name="replenishmentRule" class="form-control" type="text" th:field="*{replenishmentRule}">-->
53   - <!-- </div>-->
54   - <!-- </div>-->
55   - <!-- <div class="form-group">-->
56   - <!-- <label class="col-sm-3 control-label">空货位规则:</label>-->
57   - <!-- <div class="col-sm-8">-->
58   - <!-- <input id="emptyLocRule" name="emptyLocRule" class="form-control" type="text" th:field="*{emptyLocRule}">-->
59   - <!-- </div>-->
60   - <!-- </div>-->
61   - <!-- <div class="form-group">-->
62   - <!-- <label class="col-sm-3 control-label">入库规则</label>-->
63   - <!-- <div class="col-sm-8">-->
64   - <!-- <input id="receivingFlow" name="receivingFlow" class="form-control" type="text" th:field="*{receivingFlow}">-->
65   - <!-- </div>-->
66   - <!-- </div>-->
67   - <!-- <div class="form-group">-->
68   - <!-- <label class="col-sm-3 control-label">出库流程:</label>-->
69   - <!-- <div class="col-sm-8">-->
70   - <!-- <input id="shippingFlow" name="shippingFlow" class="form-control" type="text" th:field="*{shippingFlow}">-->
71   - <!-- </div>-->
72   - <!-- </div>-->
73   - <!-- <div class="form-group">-->
74   - <!-- <label class="col-sm-3 control-label">属性模板:</label>-->
75   - <!-- <div class="col-sm-8">-->
76   - <!-- <input id="attributeTemplateCode" name="attributeTemplateCode" class="form-control" type="text" th:field="*{attributeTemplateCode}">-->
77   - <!-- </div>-->
78   - <!-- </div>-->
79   - <!-- <div class="form-group">-->
80   - <!-- <label class="col-sm-3 control-label">记录序列号:</label>-->
81   - <!-- <div class="col-sm-8">-->
82   - <!-- <input id="trackSerialNum" name="trackSerialNum" class="form-control" type="text" th:field="*{trackSerialNum}">-->
83   - <!-- </div>-->
84   - <!-- </div>-->
85   - <!-- <div class="form-group">-->
86   - <!-- <label class="col-sm-3 control-label">自动生成序列号:</label>-->
87   - <!-- <div class="col-sm-8">-->
88   - <!-- <input id="autoGenSerialNum" name="autoGenSerialNum" class="form-control" type="text" th:field="*{autoGenSerialNum}">-->
89   - <!-- </div>-->
90   - <!-- </div>-->
91   - <!-- <div class="form-group">-->
92   - <!-- <label class="col-sm-3 control-label">自动生成序列号表达式:</label>-->
93   - <!-- <div class="col-sm-8">-->
94   - <!-- <input id="autoGenSerialNumFormat" name="autoGenSerialNumFormat" class="form-control" type="text" th:field="*{autoGenSerialNumFormat}">-->
95   - <!-- </div>-->
96   - <!-- </div>-->
97   - <!-- <div class="form-group">-->
98   - <!-- <label class="col-sm-3 control-label">序列号模板:</label>-->
99   - <!-- <div class="col-sm-8">-->
100   - <!-- <input id="snTemplateCode" name="snTemplateCode" class="form-control" type="text" th:field="*{snTemplateCode}">-->
101   - <!-- </div>-->
102   - <!-- </div>-->
103   - <!-- <div class="form-group">-->
104   - <!-- <label class="col-sm-3 control-label">临期预警天数:</label>-->
105   - <!-- <div class="col-sm-8">-->
106   - <!-- <input id="expiringDays" name="expiringDays" class="form-control" type="text" th:field="*{expiringDays}">-->
107   - <!-- </div>-->
108   - <!-- </div>-->
109   - <!-- <div class="form-group">-->
110   - <!-- <label class="col-sm-3 control-label">收货预警天数:</label>-->
111   - <!-- <div class="col-sm-8">-->
112   - <!-- <input id="minShelfLifeDays" name="minShelfLifeDays" class="form-control" type="text" th:field="*{minShelfLifeDays}">-->
113   - <!-- </div>-->
114   - <!-- </div>-->
115   - <!--<div class="form-group">
116   - <label class="col-sm-3 control-label">数据版本:</label>
117   - <div class="col-sm-8">
118   - <input id="version" name="version" class="form-control" type="text">
119   - </div>
120   - </div>-->
121   - <!--<div class="form-group"> -->
122   - <!--<label class="col-sm-3 control-label">创建时间:</label>-->
123   - <!--<div class="col-sm-8">-->
124   - <!--<input id="created" name="created" class="form-control" type="text">-->
125   - <!--</div>-->
126   - <!--</div>-->
127   - <!--<div class="form-group"> -->
128   - <!--<label class="col-sm-3 control-label">创建用户:</label>-->
129   - <!--<div class="col-sm-8">-->
130   - <!--<input id="createdBy" name="createdBy" class="form-control" type="text">-->
131   - <!--</div>-->
132   - <!--</div>-->
133   - <!--<div class="form-group"> -->
134   - <!--<label class="col-sm-3 control-label">最后修改间:</label>-->
135   - <!--<div class="col-sm-8">-->
136   - <!--<input id="lastUpdated" name="lastUpdated" class="form-control" type="text">-->
137   - <!--</div>-->
138   - <!--</div>-->
139   - <!--<div class="form-group"> -->
140   - <!--<label class="col-sm-3 control-label">更新用户:</label>-->
141   - <!--<div class="col-sm-8">-->
142   - <!--<input id="lastUpdatedBy" name="lastUpdatedBy" class="form-control" type="text">-->
143   - <!--</div>-->
144   - <!--</div>-->
145 15  
146   - <!-- <div class="form-group">-->
147   - <!-- <label class="col-sm-3 control-label">状态:</label>-->
148   - <!-- <div class="col-sm-8">-->
149   - <!-- <div class="onoffswitch">-->
150   - <!-- <input type="checkbox" th:checked="true" class="onoffswitch-checkbox" id="enable" name="enable">-->
151   - <!-- <label class="onoffswitch-label" for="enable">-->
152   - <!-- <span class="onoffswitch-inner"></span>-->
153   - <!-- <span class="onoffswitch-switch"></span>-->
154   - <!-- </label>-->
155   - <!-- </div>-->
156   - <!-- </div>-->
157   - <!-- </div>-->
158   - <!--<div class="form-group"> -->
159   - <!--<label class="col-sm-3 control-label">是否删除:</label>-->
160   - <!--<div class="col-sm-8">-->
161   - <!--<input id="deleted" name="deleted" class="form-control" type="text">-->
162   - <!--</div>-->
163   - <!--</div>-->
164   - <!--<div class="form-group"> -->
165   - <!--<label class="col-sm-3 control-label">自定义字段1:</label>-->
166   - <!--<div class="col-sm-8">-->
167   - <!--<input id="userDef1" name="userDef1" class="form-control" type="text">-->
168   - <!--</div>-->
169   - <!--</div>-->
170   - <!--<div class="form-group"> -->
171   - <!--<label class="col-sm-3 control-label">自定义字段2:</label>-->
172   - <!--<div class="col-sm-8">-->
173   - <!--<input id="userDef2" name="userDef2" class="form-control" type="text">-->
174   - <!--</div>-->
175   - <!--</div>-->
176   - <!--<div class="form-group"> -->
177   - <!--<label class="col-sm-3 control-label">自定义字段3:</label>-->
178   - <!--<div class="col-sm-8">-->
179   - <!--<input id="userDef3" name="userDef3" class="form-control" type="text">-->
180   - <!--</div>-->
181   - <!--</div>-->
182   - <!--<div class="form-group"> -->
183   - <!--<label class="col-sm-3 control-label">自定义字段4:</label>-->
184   - <!--<div class="col-sm-8">-->
185   - <!--<input id="userDef4" name="userDef4" class="form-control" type="text">-->
186   - <!--</div>-->
187   - <!--</div>-->
188   - <!--<div class="form-group"> -->
189   - <!--<label class="col-sm-3 control-label">自定义字段5:</label>-->
190   - <!--<div class="col-sm-8">-->
191   - <!--<input id="userDef5" name="userDef5" class="form-control" type="text">-->
192   - <!--</div>-->
193   - <!--</div>-->
194   - <!--<div class="form-group"> -->
195   - <!--<label class="col-sm-3 control-label">自定义字段6:</label>-->
196   - <!--<div class="col-sm-8">-->
197   - <!--<input id="userDef6" name="userDef6" class="form-control" type="text">-->
198   - <!--</div>-->
199   - <!--</div>-->
200   - <!--<div class="form-group"> -->
201   - <!--<label class="col-sm-3 control-label">自定义字段7:</label>-->
202   - <!--<div class="col-sm-8">-->
203   - <!--<input id="userDef7" name="userDef7" class="form-control" type="text">-->
204   - <!--</div>-->
205   - <!--</div>-->
206   - <!--<div class="form-group"> -->
207   - <!--<label class="col-sm-3 control-label">自定义字段8:</label>-->
208   - <!--<div class="col-sm-8">-->
209   - <!--<input id="userDef8" name="userDef8" class="form-control" type="text">-->
210   - <!--</div>-->
211   - <!--</div>-->
212   - <div class="form-group">
213   - <div class="form-control-static col-sm-offset-9">
214   - <button type="submit" class="btn btn-primary">提交</button>
215   - <button onclick="$.modal.close()" class="btn btn-danger" type="button">关闭</button>
216   - </div>
  16 + <div class="form-group">
  17 + <div class="form-control-static col-sm-offset-9">
  18 + <button type="submit" class="btn btn-primary">提交</button>
  19 + <button onclick="$.modal.close()" class="btn btn-danger" type="button">关闭</button>
217 20 </div>
  21 + </div>
218 22 </form>
219 23 </div>
220 24 <div th:include="include::footer"></div>
221 25 <script type="text/javascript">
222 26 var prefix = ctx + "config/material";
223 27 $("#form-material-add").validate({
224   - rules: {
225   - code: {
226   - required: true,
227   - },
228   - name: {
229   - required: true,
230   - }
231   - },
  28 +
232 29 submitHandler: function (form) {
233 30 var tableValue = $("#form-material-add").serialize();
234 31 $.operate.save(prefix + "/editBatchSave", tableValue);
... ...
src/main/resources/templates/config/material/material.html
... ... @@ -70,6 +70,8 @@
70 70 var prefix = ctx + "config/material";
71 71 var datas = [[${@dict.getType('sys_normal_disable')}]];
72 72 var mType = [[${@materialType.queryType()}]];
  73 + var materialArea = [[${@materialArea.queryCode()}]];
  74 +
73 75 $(function() {
74 76 var options = {
75 77 url: prefix + "/list",
... ... @@ -91,7 +93,7 @@
91 93 align: 'center',
92 94 formatter: function(value, row, index) {
93 95 var actions = [];
94   - // actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="#" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
  96 + actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="#" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
95 97 actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="#" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-trash-o"></i>删除</a>');
96 98 return actions.join('');
97 99 }
... ... @@ -121,11 +123,6 @@
121 123 }
122 124 },
123 125 {
124   - field : 'abcClass',
125   - title : 'ABC分类' ,
126   - align: 'center',
127   - },
128   - {
129 126 field : 'name',
130 127 title : '名称'
131 128 },
... ... @@ -134,9 +131,29 @@
134 131 title : '规格'
135 132 },
136 133 {
  134 + field: 'materialAreaCode',
  135 + title: '物料分区',
  136 + align: 'center',
  137 + formatter: function(value, row, index) {
  138 + var actions = [];
  139 + $.each(materialArea, function(index, dict) {
  140 + if (dict.code == value) {
  141 + actions.push("<span class='badge badge-" + dict.code + "'>" + dict.name + "</span>");
  142 + return false;
  143 + }
  144 + });
  145 + return actions.join('');
  146 + }
  147 + },
  148 + {
137 149 field : 'unit',
138 150 title : '单位' ,
139   - visible:false
  151 + visible:true
  152 + },
  153 + {
  154 + field : 'abcClass',
  155 + title : 'ABC分类' ,
  156 + align: 'center',
140 157 },
141 158 {
142 159 field : 'daysToExpire',
... ... @@ -170,14 +187,17 @@
170 187 {
171 188 field : 'attributeTemplateCode',
172 189 title : '属性模板' ,
  190 + visible:false,
173 191 },
174 192 {
175 193 field : 'trackSerialNum',
176 194 title : '记录序列号' ,
  195 + visible:false,
177 196 },
178 197 {
179 198 field : 'autoGenSerialNum',
180 199 title : '自动生成序列号',
  200 + visible:false,
181 201 align: 'center',
182 202 formatter: function(value, row, index) {
183 203 var actions = [];
... ... @@ -192,10 +212,12 @@
192 212 {
193 213 field : 'autoGenSerialNumFormat',
194 214 title : '自动生成序列号表达式' ,
  215 + visible:false,
195 216 },
196 217 {
197 218 field : 'snTemplateCode',
198 219 title : '序列号模板' ,
  220 + visible:false,
199 221 },
200 222 {
201 223 field : 'expiringDays',
... ... @@ -238,6 +260,7 @@
238 260 {
239 261 field: 'isMix',
240 262 title: '是否允许混放',
  263 + visible:false,
241 264 align: 'center',
242 265 formatter: function (value, row, index) {
243 266 return $.table.selectLogicLabel(value);
... ...
src/main/resources/templates/config/materialArea/add.html 0 → 100644
  1 +<!DOCTYPE HTML>
  2 +<html lang="zh" xmlns:th="http://www.thymeleaf.org">
  3 +<meta charset="utf-8">
  4 +<head th:include="include :: header"></head>
  5 +<body class="white-bg">
  6 + <div class="wrapper wrapper-content animated fadeInRight ibox-content">
  7 + <form class="form-horizontal m" id="form-material-area">
  8 +
  9 + <div class="form-group">
  10 + <label class="col-sm-3 control-label">编码:</label>
  11 + <div class="col-sm-8">
  12 + <input id="code" name="code" class="form-control" type="text">
  13 + </div>
  14 + </div>
  15 +
  16 + <div class="form-group">
  17 + <label class="col-sm-3 control-label">名字:</label>
  18 + <div class="col-sm-8">
  19 + <input id="name" name="name" class="form-control" type="text">
  20 + </div>
  21 + </div>
  22 +
  23 + <div class="form-group">
  24 + <div class="form-control-static col-sm-offset-9">
  25 + <button type="submit" class="btn btn-primary">提交</button>
  26 + <button onclick="$.modal.close()" class="btn btn-danger" type="button">关闭</button>
  27 + </div>
  28 + </div>
  29 +
  30 + </form>
  31 + </div>
  32 + <div th:include="include::footer"></div>
  33 + <script type="text/javascript">
  34 + var prefix = ctx + "config/materialArea";
  35 + $("#form-material-area").validate({
  36 + submitHandler: function(form) {
  37 + // $.operate.save(prefix + "/add", $('#form-locationType-add').serialize());
  38 + var tableValue = $.common.getTableValue("#form-material-area");
  39 + $.operate.save(prefix + "/add", tableValue);
  40 + }
  41 + });
  42 + </script>
  43 +</body>
  44 +</html>
... ...
src/main/resources/templates/config/materialArea/edit.html 0 → 100644
  1 +<!DOCTYPE HTML>
  2 +<html lang="zh" xmlns:th="http://www.thymeleaf.org">
  3 +<meta charset="utf-8">
  4 +<head th:include="include :: header"></head>
  5 +<body class="white-bg">
  6 + <div class="wrapper wrapper-content animated fadeInRight ibox-content">
  7 + <form class="form-horizontal m" id="form-materialArea-edit" th:object="${materialArea}">
  8 + <input id="id" name="id" th:field="*{id}" type="hidden">
  9 +
  10 + <div class="form-group">
  11 + <label class="col-sm-3 control-label">编码:</label>
  12 + <div class="col-sm-8">
  13 + <input id="code" name="code" th:field="*{code}" class="form-control" type="text">
  14 + </div>
  15 + </div>
  16 +
  17 + <div class="form-group">
  18 + <label class="col-sm-3 control-label">名字:</label>
  19 + <div class="col-sm-8">
  20 + <input id="name" name="name" th:field="*{name}" class="form-control" type="text">
  21 + </div>
  22 + </div>
  23 +
  24 + <div class="form-group">
  25 + <div class="form-control-static col-sm-offset-9">
  26 + <button type="submit" class="btn btn-primary">提交</button>
  27 + <button onclick="$.modal.close()" class="btn btn-danger" type="button">关闭</button>
  28 + </div>
  29 + </div>
  30 +
  31 + </form>
  32 + </div>
  33 + <div th:include="include::footer"></div>
  34 + <script type="text/javascript">
  35 + var prefix = ctx + "config/locationHigh";
  36 + $("#form-materialArea-edit").validate({
  37 + submitHandler: function(form) {
  38 + // $.operate.save(prefix + "/edit", $('#form-locationType-edit').serialize());
  39 + var tableValue = $.common.getTableValue("#form-materialArea-edit");
  40 + $.operate.save(prefix + "/edit", tableValue);
  41 + }
  42 + });
  43 + </script>
  44 +</body>
  45 +</html>
... ...
src/main/resources/templates/config/materialArea/materialArea.html 0 → 100644
  1 +<!DOCTYPE HTML>
  2 +<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
  3 +<meta charset="utf-8">
  4 +<head th:include="include :: header"></head>
  5 +<body class="gray-bg">
  6 + <div class="container-div">
  7 + <div class="row">
  8 + <div class="col-sm-12 select-info">
  9 + <form id="materialArea-form">
  10 + <div class="select-list">
  11 + <li>
  12 +
  13 + <li>
  14 + <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
  15 + <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset('alarmLevel-form')"><i class="fa fa-refresh"></i>&nbsp;重置</a>
  16 + <!--<a class="btn btn-success btn-rounded btn-sm" onclick="$.table.exportExcel()" shiro:hasPermission="system:role:export"><i class="fa fa-download"></i>&nbsp;导出</a>-->
  17 + </li>
  18 + </ul>
  19 + </div>
  20 + </form>
  21 + </div>
  22 + <div class="btn-group hidden-xs" id="toolbar" role="group">
  23 + <a class="btn btn-outline btn-success btn-rounded" onclick="$.operate.add()">
  24 + <i class="fa fa-plus"></i> 新增
  25 + </a>
  26 + <a class="btn btn-outline btn-danger btn-rounded" onclick="$.operate.batRemove()">
  27 + <i class="fa fa-trash-o"></i> 删除
  28 + </a>
  29 + </div>
  30 +
  31 + <div class="col-sm-12 select-info">
  32 + <table id="bootstrap-table" data-mobile-responsive="true" class="table table-bordered table-hover"></table>
  33 + </div>
  34 + <div>
  35 + </div>
  36 + <div th:include="include :: footer"></div>
  37 + <script th:inline="javascript">
  38 + var editFlag = [[${@permission.hasPermi('config:locationType:edit')}]];
  39 + var removeFlag = [[${@permission.hasPermi('config:locationType:remove')}]];
  40 + var prefix = ctx + "config/materialArea"
  41 + var datas = [[${@dict.getType('sys_normal_disable')}]];
  42 + var rowFlags = [[${@dict.getType('rowFlag')}]];
  43 + $(function() {
  44 + var options = {
  45 + url: prefix + "/list",
  46 + createUrl: prefix + "/add",
  47 + updateUrl: prefix + "/edit/{id}",
  48 + removeUrl: prefix + "/remove",
  49 + modalName: "物料分区",
  50 + search: false,
  51 + columns: [{
  52 + checkbox: true
  53 + },
  54 + {
  55 + field : 'warehouseCode',
  56 + title : '仓库编码'
  57 + },
  58 + {
  59 + field : 'code',
  60 + title : '编码'
  61 + },
  62 + {
  63 + field : 'name',
  64 + title : '名称'
  65 + },
  66 + {
  67 + field : 'created',
  68 + title : '创建时间'
  69 + },
  70 + {
  71 + field : 'createdBy',
  72 + title : '创建用户'
  73 + },
  74 + {
  75 + title: '操作',
  76 + align: 'center',
  77 + formatter: function(value, row, index) {
  78 + var actions = [];
  79 + actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="#" onclick="$.operate.edit(\'' + row.id + '\')" ><i class="fa fa-edit"></i>编辑</a> ');
  80 + actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="#" onclick="$.operate.remove(\'' + row.id + '\')" ><i class="fa fa-trash-o"></i>删除</a>');
  81 + return actions.join('');
  82 + }
  83 + }]
  84 + };
  85 + $.table.init(options);
  86 + });
  87 + </script>
  88 +</body>
  89 +</html>
0 90 \ No newline at end of file
... ...
src/main/resources/templates/config/materialType/editBatch.html 0 → 100644
  1 +<!DOCTYPE HTML>
  2 +<html lang="zh" xmlns:th="http://www.thymeleaf.org">
  3 +<meta charset="utf-8">
  4 +<head th:include="include :: header"></head>
  5 +<body class="white-bg">
  6 +<div class="wrapper wrapper-content animated fadeInRight ibox-content">
  7 + <form class="form-horizontal m" id="form-material-add" >
  8 + <input name="ids" hidden="hidden" th:value="${ids}" >
  9 + <div class="form-group">
  10 + <label class="col-sm-3 control-label">物料分区编码</label>
  11 + <div class="col-sm-8">
  12 + <input id="materialAreaCode" name="materialAreaCode" class="form-control" type="text">
  13 + </div>
  14 + </div>
  15 +
  16 + <div class="form-group">
  17 + <div class="form-control-static col-sm-offset-9">
  18 + <button type="submit" class="btn btn-primary">提交</button>
  19 + <button onclick="$.modal.close()" class="btn btn-danger" type="button">关闭</button>
  20 + </div>
  21 + </div>
  22 + </form>
  23 +</div>
  24 +<div th:include="include::footer"></div>
  25 +<script type="text/javascript">
  26 + var prefix = ctx + "config/materialType";
  27 + $("#form-material-add").validate({
  28 +
  29 + submitHandler: function (form) {
  30 + var tableValue = $("#form-material-add").serialize();
  31 + $.operate.save(prefix + "/editBatchSave", tableValue);
  32 + }
  33 + });
  34 +</script>
  35 +</body>
  36 +</html>
... ...
src/main/resources/templates/config/materialType/materialType.html
... ... @@ -38,6 +38,9 @@
38 38 <a class="btn btn-outline btn-danger btn-rounded" onclick="$.operate.batRemove()" shiro:hasPermission="config:materialType:remove">
39 39 <i class="fa fa-trash-o"></i> 删除
40 40 </a>
  41 + <a class="btn btn-outline btn-success btn-rounded" onclick="batEdit()" shiro:hasPermission="config:materialType:add">
  42 + <i class="fa fa-edit"></i> 批量编辑
  43 + </a>
41 44 </div>
42 45  
43 46 <div class="col-sm-12 select-info">
... ... @@ -51,6 +54,7 @@
51 54 var removeFlag = [[${@permission.hasPermi('config:materialType:remove')}]];
52 55 var prefix = ctx + "config/materialType";
53 56 var datas = [[${@dict.getType('sys_normal_disable')}]];
  57 + var materialArea = [[${@materialArea.queryCode()}]];
54 58 $(function() {
55 59 var options = {
56 60 url: prefix + "/list",
... ... @@ -88,74 +92,89 @@
88 92 title : 'ABC分类'
89 93 },
90 94 {
91   - field : 'daysToExpire',
92   - title : '保质期(天)'
93   - },
94   - {
95   - field : 'receivingFlow',
96   - title : '入库流程'
97   - },
98   - {
99   - field : 'shippingFlow',
100   - title : '出库流程'
101   - },
102   - {
103   - field : 'locatingRule',
104   - title : '定位规则'
105   - },
106   - {
107   - field : 'allocationRule',
108   - title : '分配规则'
109   - },
110   - {
111   - field : 'replenishmentRule',
112   - title : '补货规则'
113   - },
114   - {
115   - field : 'emptyLocRule',
116   - title : '空货位规则'
117   - },
118   - {
119   - field : 'pickingRule',
120   - title : '拣货规则'
121   - },
122   - {
123   - field : 'attributeTemplateCode',
124   - title : '属性模版'
125   - },
126   - {
127   - field : 'trackSerialNum',
128   - title : '记录序列号'
129   - },
130   - {
131   - field : 'autoGenSerialNum',
132   - title : '自动生成序列号'
133   - },
134   - {
135   - field : 'autoGenSerialNumFormat',
136   - title : '自动生成序列号表达式',
137   - visible : false
138   - },
139   - {
140   - field : 'snTemplateCode',
141   - title : '序列号模版'
142   - },
143   - {
144   - field : 'expiringDays',
145   - title : '临期预警天数'
146   - },
147   - {
148   - field : 'minShelfLifeDays',
149   - title : '收货预警天数'
150   - },
151   - {
152   - field : 'enable',
153   - title : '是否启用',
154   - formatter: function(value, row, index) {
155   - return $.table.selectDictLabel(datas, value);
156   - },
  95 + field: 'materialAreaCode',
  96 + title: '物料分区',
157 97 align: 'center',
  98 + formatter: function(value, row, index) {
  99 + var actions = [];
  100 + $.each(materialArea, function(index, dict) {
  101 + if (dict.code == value) {
  102 + actions.push("<span class='badge badge-" + dict.code + "'>" + dict.name + "</span>");
  103 + return false;
  104 + }
  105 + });
  106 + return actions.join('');
  107 + }
158 108 },
  109 + // {
  110 + // field : 'daysToExpire',
  111 + // title : '保质期(天)'
  112 + // },
  113 + // {
  114 + // field : 'receivingFlow',
  115 + // title : '入库流程'
  116 + // },
  117 + // {
  118 + // field : 'shippingFlow',
  119 + // title : '出库流程'
  120 + // },
  121 + // {
  122 + // field : 'locatingRule',
  123 + // title : '定位规则'
  124 + // },
  125 + // {
  126 + // field : 'allocationRule',
  127 + // title : '分配规则'
  128 + // },
  129 + // {
  130 + // field : 'replenishmentRule',
  131 + // title : '补货规则'
  132 + // },
  133 + // {
  134 + // field : 'emptyLocRule',
  135 + // title : '空货位规则'
  136 + // },
  137 + // {
  138 + // field : 'pickingRule',
  139 + // title : '拣货规则'
  140 + // },
  141 + // {
  142 + // field : 'attributeTemplateCode',
  143 + // title : '属性模版'
  144 + // },
  145 + // {
  146 + // field : 'trackSerialNum',
  147 + // title : '记录序列号'
  148 + // },
  149 + // {
  150 + // field : 'autoGenSerialNum',
  151 + // title : '自动生成序列号'
  152 + // },
  153 + // {
  154 + // field : 'autoGenSerialNumFormat',
  155 + // title : '自动生成序列号表达式',
  156 + // visible : false
  157 + // },
  158 + // {
  159 + // field : 'snTemplateCode',
  160 + // title : '序列号模版'
  161 + // },
  162 + // {
  163 + // field : 'expiringDays',
  164 + // title : '临期预警天数'
  165 + // },
  166 + // {
  167 + // field : 'minShelfLifeDays',
  168 + // title : '收货预警天数'
  169 + // },
  170 + // {
  171 + // field : 'enable',
  172 + // title : '是否启用',
  173 + // formatter: function(value, row, index) {
  174 + // return $.table.selectDictLabel(datas, value);
  175 + // },
  176 + // align: 'center',
  177 + // },
159 178 {
160 179 field : 'created',
161 180 title : '创建时间'
... ... @@ -180,10 +199,10 @@
180 199 },
181 200 align: 'center',
182 201 },
183   - {
184   - field : 'userDef1',
185   - title : '是否AGV区域发货'
186   - },
  202 + // {
  203 + // field : 'userDef1',
  204 + // title : '是否AGV区域发货'
  205 + // },
187 206 {
188 207 field : 'userDef2',
189 208 title : '自定义字段2' ,
... ... @@ -217,6 +236,16 @@
217 236 };
218 237 $.table.init(options);
219 238 });
  239 +
  240 + function batEdit() {
  241 + let rows = $.table.selectColumns("id");
  242 + if (rows.length == 0) {
  243 + $.modal.alertWarning("请至少选择一条记录");
  244 + return;
  245 + } else {
  246 + $.modal.open("修改物料", prefix+"/editBatch/"+rows.join(","));
  247 + }
  248 + }
220 249 </script>
221 250 </body>
222 251  
... ...
src/main/resources/templates/inventory/inventoryHeader/inventoryHeader.html
... ... @@ -168,7 +168,7 @@
168 168 {
169 169 field: 'totalWeight',
170 170 title: ' 总重量',
171   - visible: false
  171 + visible: true
172 172 },
173 173 {
174 174 field: 'materialSkuQty',
... ...
src/main/resources/templates/monitor/SystemLog/logview.html 0 → 100644
  1 +<!DOCTYPE html>
  2 +<html lang="zh" xmlns:th="http://www.thymeleaf.org">
  3 +<meta charset="UTF-8">
  4 +<head th:include="include :: header">
  5 +</head>
  6 +<body>
  7 +<div id="log" style="margin: 20px 20px"></div>
  8 +</body>
  9 +<div th:include="include :: footer"></div>
  10 +<script th:inline="javascript">
  11 + function init() {
  12 + $("#log").html([[${log}]])
  13 + }
  14 + init();
  15 +</script>
  16 +</html>
... ...
src/main/resources/templates/monitor/SystemLog/systemLog.html 0 → 100644
  1 +<!DOCTYPE html>
  2 +<html lang="zh" xmlns:th="http://www.thymeleaf.org">
  3 +<meta charset="UTF-8">
  4 +<head th:include="include :: header">
  5 +</head>
  6 +<body class="gray-bg">
  7 +<div class="col-sm-12" style="height: auto;">
  8 + <div class="select-info" style="height: 100%;">
  9 + <h1 style="margin-bottom: 15px;font-weight: bold ">系统日志</h1>
  10 + <div class="panel panel-info">
  11 + <div class="panel-heading">一般日志</div>
  12 + <div class="panel-body">
  13 + <a data-toggle="collapse" data-target="#infoLogList">sys-info</a>
  14 + <div class="panel-collapse collapse" style="margin-top: 10px" id="infoLogList">
  15 + <ul th:each="name:${infoNames}">
  16 + <li>
  17 + <a th:text="${name}" th:onclick="getLog([[${name}]])"></a>
  18 + </li>
  19 + </ul>
  20 + </div>
  21 + </div>
  22 + </div>
  23 + <div class="panel panel-primary">
  24 + <div class="panel-heading">调试日志</div>
  25 + <div class="panel-body">
  26 + <a data-toggle="collapse" data-target="#debugLogList">sys-debug</a>
  27 + <div class="panel-collapse collapse" style="margin-top: 10px" id="debugLogList">
  28 + <ul th:each="name:${debugNames}">
  29 + <li><a th:text="${name}" th:onclick="getLog([[${name}]])"></a></li>
  30 + </ul>
  31 + </div>
  32 + </div>
  33 + </div>
  34 + <div class="panel panel-warning">
  35 + <div class="panel-heading">警告日志</div>
  36 + <div class="panel-body">
  37 + <a data-toggle="collapse" data-target="#warnLogList">sys-warn</a>
  38 + <div class="panel-collapse collapse" style="margin-top: 10px" id="warnLogList">
  39 + <ul th:each="name:${warnNames}">
  40 + <li><a th:text="${name}" th:onclick="getLog([[${name}]])"></a></li>
  41 + </ul>
  42 + </div>
  43 + </div>
  44 + </div>
  45 + <div class="panel panel-danger">
  46 + <div class="panel-heading">错误日志</div>
  47 + <div class="panel-body">
  48 + <a data-toggle="collapse" data-target="#errorLogList">sys-error</a>
  49 + <div class="panel-collapse collapse" style="margin-top: 10px" id="errorLogList">
  50 + <ul th:each="name:${errorNames}">
  51 + <li><a th:text="${name}" th:onclick="getLog([[${name}]])"></a></li>
  52 + </ul>
  53 + </div>
  54 + </div>
  55 + </div>
  56 + </div>
  57 +</div>
  58 +</body>
  59 +<div th:include="include :: footer"></div>
  60 +<script th:inline="javascript">
  61 + function getLog(name) {
  62 + $.modal.openFull(name, ctx+"monitor/systemLog/logview?name="+name)
  63 + }
  64 +</script>
  65 +</html>
... ...
src/main/resources/templates/monitor/locationstatus/locationstatus.html
... ... @@ -67,9 +67,9 @@
67 67 <option value="layer">层</option>
68 68 </select>
69 69 </li>
70   - <li>货主编码:
71   - <input type="text" name="receiptCompanyCode" id="receiptCompanyCode">
72   - </li>
  70 +<!-- <li>货主编码:-->
  71 +<!-- <input type="text" name="receiptCompanyCode" id="receiptCompanyCode">-->
  72 +<!-- </li>-->
73 73 <li>
74 74 <a class="btn btn-primary btn-rounded btn-sm" onclick="Search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
75 75 </li>
... ... @@ -117,21 +117,22 @@
117 117 <li>
118 118 整盘禁用:<img src="../img/icon/整盘禁用.png">
119 119 </li>
  120 + <li><span style="font-size: 12px">库位统计情况:</span>
  121 + <input style="width: 400px; font-size: 12px" type="text" id="zone" disabled/>
  122 + </li>
120 123 </ul><br><br>
121 124 <ul id="info_list">
122   - <li><span>库区:</span><input type="text" id="zone" style="width: 450px" disabled/></li>
123 125 <li><span>库位:</span><input type="text" id="code" disabled/></li>
124 126 <li><span>容器编码:</span><input type="text" id="containerCode" disabled/></li>
125 127 <li><span>物料信息:<select id="material" style="width: auto"><option>无</option></select></span></li>
126   - <li>&nbsp;&nbsp;&nbsp;&nbsp;</li>
127 128 <li>
128 129 <a class="btn btn-success btn-rounded btn-sm" onclick="checkLocationCode()" shiro:hasPermission="inventory:inventory:seeOut"><i class="fa fa-eye"></i>&nbsp;出库查看</a>
129 130 </li>
130 131 </ul>
131   - <ul>
132   - <li style="float:left;margin-left: 40px"><button type="button" class="btn btn-sm btn-success" onclick="searchLocation()">查看库位</button></li>
133   - <li style="float:left;margin-left: 20px"><button type="button" class="btn btn-sm btn-success" onclick="searchInventory()">查看库存</button></li>
134   - </ul>
  132 +<!-- <ul>-->
  133 +<!-- <li style="float:left;margin-left: 40px"><button type="button" class="btn btn-sm btn-success" onclick="searchLocation()">查看库位</button></li>-->
  134 +<!-- <li style="float:left;margin-left: 20px"><button type="button" class="btn btn-sm btn-success" onclick="searchInventory()">查看库存</button></li>-->
  135 +<!-- </ul>-->
135 136 </div>
136 137 </form>
137 138 </div>
... ... @@ -625,8 +626,8 @@
625 626 },
626 627 success:function (response) {
627 628 if (response.code==200){
628   - $("#zone").val("库位数量:"+response.data.location+", 空柜数量:"+response.data.emptyLocation+
629   - ", 空盘数量:"+response.data.haveContainLocation+", 半整盘库位数量:"+response.data.haveInventoryLocation)
  629 + $("#zone").val("库位总数:"+response.data.location+", 空闲库位:"+response.data.emptyLocation+
  630 + ", 空托盘库位:"+response.data.haveContainLocation+", 有货库位:"+response.data.haveInventoryLocation)
630 631 }else {
631 632 $.modal.alertError(response.msg)
632 633 }
... ...
src/main/resources/templates/receipt/receiptHeader/receiptHeader.html
... ... @@ -202,7 +202,7 @@
202 202 </div>
203 203 <div th:include="include :: footer"></div>
204 204 <script th:inline="javascript">
205   - var printFlag = [[${@permission.hasPermi('receipt:receiptHeader:report')}]];
  205 + var printFlag = [[${@permission.hasPremi('receipt:receiptHeader:report')}]];
206 206 var editFlag = [[${@permission.hasPermi('receipt:receiptHeader:edit')}]];
207 207 var removeFlag = [[${@permission.hasPermi('receipt:receiptHeader:remove')}]];
208 208 let receiveFlag = [[${@permission.hasPermi('receipt:receiptHeader:receive')}]];
... ...
src/main/resources/templates/shipment/shipmentHeader/shipmentHeader.html
... ... @@ -333,7 +333,7 @@
333 333 {
334 334 field: 'projectCode',
335 335 title: '项目号',
336   - sortable:true
  336 + visible: false
337 337 },
338 338 {
339 339 field: 'shipmentType',
... ... @@ -379,7 +379,8 @@
379 379 },
380 380 {
381 381 field: 'waveId',
382   - title: '波次号'
  382 + title: '波次号',
  383 + visible: false
383 384 },
384 385 {
385 386 field: 'totalQty',
... ...