Commit f43c94d3afb26a33f6112e90eb9d670c11ca81cd

Authored by xqs
2 parents e316de12 cbcf213d

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

Showing 20 changed files with 191 additions and 169 deletions
src/main/java/com/huaheng/api/wcs/service/overrideHandle/OverrideHandleServiceImpl.java
... ... @@ -4,10 +4,13 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
4 4 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
5 5 import com.huaheng.api.wcs.domain.TaskFinishDomain;
6 6 import com.huaheng.api.wcs.domain.WcsTask;
  7 +import com.huaheng.api.wcs.service.warecellAllocation.WarecellAllocationService;
7 8 import com.huaheng.common.exception.service.ServiceException;
8 9 import com.huaheng.common.utils.StringUtils;
9 10 import com.huaheng.common.utils.security.ShiroUtils;
10 11 import com.huaheng.framework.web.domain.AjaxResult;
  12 +import com.huaheng.pc.config.FilterConfigDetail.domain.FilterConfigDetail;
  13 +import com.huaheng.pc.config.FilterConfigDetail.service.FilterConfigDetailService;
11 14 import com.huaheng.pc.config.location.domain.Location;
12 15 import com.huaheng.pc.config.location.service.LocationService;
13 16 import com.huaheng.pc.receipt.receiptContainerDetail.domain.ReceiptContainerDetail;
... ... @@ -22,6 +25,7 @@ import org.springframework.beans.factory.annotation.Autowired;
22 25 import org.springframework.stereotype.Service;
23 26 import org.springframework.transaction.annotation.Transactional;
24 27  
  28 +import javax.annotation.Resource;
25 29 import java.util.ArrayList;
26 30 import java.util.List;
27 31  
... ... @@ -39,6 +43,10 @@ public class OverrideHandleServiceImpl implements OverrideHandleService {
39 43 private ReceiptContainerHeaderService receiptContainerHeaderService;
40 44 @Autowired
41 45 private ReceiptContainerDetailService receiptContainerDetailService;
  46 + @Resource
  47 + private WarecellAllocationService warecellAllocationService;
  48 + @Resource
  49 + private FilterConfigDetailService filterConfigDetailService;
42 50  
43 51 /**
44 52 * 重入处理
... ... @@ -60,7 +68,7 @@ public class OverrideHandleServiceImpl implements OverrideHandleService {
60 68 return AjaxResult.error("目的库位为空");
61 69 }
62 70 if(StringUtils.isEmpty(taskFinishDomain.getRedirectionLocationCode())){
63   - return AjaxResult.error("目的库位为空");
  71 + return AjaxResult.error("重入的库位编码为空");
64 72 }
65 73  
66 74  
... ... @@ -105,7 +113,26 @@ public class OverrideHandleServiceImpl implements OverrideHandleService {
105 113 }
106 114 }else {
107 115 //重入的库位由wms提供
  116 + //查询任务明细
  117 + LambdaQueryWrapper<TaskDetail> taskDetailLambda = Wrappers.lambdaQuery();
  118 + taskDetailLambda.eq(TaskDetail::getTaskId, taskFinishDomain.getTaskNo());
  119 + List<TaskDetail> taskDetailList = taskDetailService.list(taskDetailLambda);
  120 + //查询入库组盘明细
  121 + List<ReceiptContainerDetail> receiptContainerDetailList = new ArrayList<>();
  122 + for (TaskDetail taskDetail : taskDetailList) {
  123 + receiptContainerDetailList.add(receiptContainerDetailService.getById(taskDetail.getAllocationId()));
  124 + }
  125 + ReceiptContainerHeader receiptContainerHeader = receiptContainerHeaderService.getById(receiptContainerDetailList.get(0).getReceiptContainerId());
  126 + String locatingRule = warecellAllocationService.taskPositioning(receiptContainerDetailList.get(0));
  127 +
  128 + LambdaQueryWrapper<FilterConfigDetail> filterConfigDetailLambda = Wrappers.lambdaQuery();
  129 + filterConfigDetailLambda.eq(FilterConfigDetail::getCode, locatingRule);
  130 + FilterConfigDetail filterConfigDetail = filterConfigDetailService.getOne(filterConfigDetailLambda);
108 131  
  132 + //根据定位规则查询库位编码
  133 + LambdaQueryWrapper<Location> locationLambda = Wrappers.lambdaQuery();
  134 + locationLambda.last(filterConfigDetail.getStatement());
  135 + newlocation = locationService.getOne(locationLambda);
109 136 }
110 137  
111 138 //修改任务
... ...
src/main/java/com/huaheng/api/wcs/service/warecellAllocation/WarecellAllocationService.java
... ... @@ -2,9 +2,12 @@ package com.huaheng.api.wcs.service.warecellAllocation;
2 2  
3 3 import com.huaheng.api.wcs.domain.WcsTask;
4 4 import com.huaheng.framework.web.domain.AjaxResult;
  5 +import com.huaheng.pc.receipt.receiptContainerDetail.domain.ReceiptContainerDetail;
5 6  
6 7 public interface WarecellAllocationService {
7 8  
8 9 //仓位分配
9 10 AjaxResult WarecellAllocation(WcsTask wcsTask);
  11 +
  12 + String taskPositioning(ReceiptContainerDetail receiptContainerDetail);
10 13 }
... ...
src/main/java/com/huaheng/api/wcs/service/warecellAllocation/WarecellAllocationServiceImpl.java
... ... @@ -35,6 +35,7 @@ import com.huaheng.pc.task.taskDetail.service.TaskDetailService;
35 35 import com.huaheng.pc.task.taskHeader.domain.TaskHeader;
36 36 import com.huaheng.pc.task.taskHeader.service.TaskHeaderService;
37 37 import com.jhlabs.image.LightFilter;
  38 +import com.mchange.v1.util.Sublist;
38 39 import io.swagger.annotations.ResponseHeader;
39 40 import org.springframework.stereotype.Service;
40 41  
... ... @@ -129,48 +130,12 @@ public class WarecellAllocationServiceImpl implements WarecellAllocationService
129 130  
130 131 for (ReceiptContainerDetail receiptContainerDetail : receiptContainerDetailList) {
131 132 ReceiptContainerHeader receiptContainerHeader = receiptContainerHeaderService.getById(receiptContainerDetail.getReceiptContainerId());
132   - String locatingRule = receiptContainerHeader.getLocatingRule(); //定位规则
133   - if (StringUtils.isEmpty(locatingRule)){
134   - locatingRule = receiptDetailService.getById(receiptContainerDetail.getReceiptDetailId()).getLocatingRule();
135   - //入库单明细定位规则不为空时执行
136   - if (StringUtils.isEmpty(locatingRule)){
137   - //入库单明细为空时,查询物料表中是否含有定位规则
138   - LambdaQueryWrapper<Material> materialLambda = Wrappers.lambdaQuery();
139   - materialLambda.eq(Material::getCode, receiptContainerDetail.getMaterialCode());
140   - Material material = materialService.getOne(materialLambda);
141   - locatingRule = material.getLocatingRule();
142 133  
143   - if (StringUtils.isEmpty(locatingRule)){
144   - //物料表中定位规则为空时,查询物料类别
145   - LambdaQueryWrapper<MaterialType> materialTypeLambda = Wrappers.lambdaQuery();
146   - materialTypeLambda.eq(MaterialType::getCode, material.getType());
147   - MaterialType materialType = materialTypeService.getOne(materialTypeLambda);
148   - locatingRule = materialType.getLocatingRule();
149   - if (StringUtils.isEmpty(locatingRule)){
150   - //物料类别中定位规则为空时,查询入库首选项
151   - LambdaQueryWrapper<ConfigValue> configValueLambda = Wrappers.lambdaQuery();
152   - configValueLambda.eq(ConfigValue::getWarehouseCode, ShiroUtils.getWarehouseCode())
153   - .eq(ConfigValue::getModuleType, "receipt")
154   - .eq(ConfigValue::getRecordType, "入库首选项");
155   - ConfigValue configValue = configValueService.getOne(configValueLambda);
156   - LambdaQueryWrapper<ReceiptPreference> receiptPreferenceLambda = Wrappers.lambdaQuery();
157   - receiptPreferenceLambda.eq(ReceiptPreference::getCode, configValue.getValue());
158   - ReceiptPreference receiptPreference = receiptPreferenceService.getOne(receiptPreferenceLambda);
159   - locatingRule = receiptPreferenceService.getOne(receiptPreferenceLambda).getLocationRule();
160   - }
161   - }
162   - }
163   -
164   - }
165   - //通过定位规则查找自定义sql
166   - if (StringUtils.isEmpty(locatingRule)){
167   - throw new ServiceException("未绑定定位规则");
168   - }
  134 + String locatingRule = this.taskPositioning(receiptContainerDetail);
169 135  
170 136 LambdaQueryWrapper<FilterConfigDetail> filterConfigDetailLambda = Wrappers.lambdaQuery();
171 137 filterConfigDetailLambda.eq(FilterConfigDetail::getCode, locatingRule);
172 138 FilterConfigDetail filterConfigDetail = filterConfigDetailService.getOne(filterConfigDetailLambda);
173   -
174 139 String[] locatingRules = filterConfigDetail.getStatement().split("limit");
175 140  
176 141 //根据定位规则查询库位编码
... ... @@ -178,7 +143,7 @@ public class WarecellAllocationServiceImpl implements WarecellAllocationService
178 143 locationLambda.last(locatingRules[0]);
179 144 List<Location> locationList = locationService.list(locationLambda);
180 145 // locationList.stream().filter(location -> location.getLocationType().equals(locationTypeList.get(0)));
181   - locationCode = filter(locationList, locationTypeList);
  146 + locationCode = filter(locationList, locationTypeList, wcsTask.getRoadWay());
182 147 if (StringUtils.isEmpty(locationCode)){
183 148 throw new ServiceException("没有库位可分配");
184 149 }
... ... @@ -205,6 +170,7 @@ public class WarecellAllocationServiceImpl implements WarecellAllocationService
205 170 }
206 171  
207 172 }
  173 +
208 174 if (StringUtils.isNotEmpty(locationCode)){
209 175 //修改任务明细目标库位
210 176 for (TaskDetail taskDetail : taskDetailList) {
... ... @@ -226,20 +192,65 @@ public class WarecellAllocationServiceImpl implements WarecellAllocationService
226 192  
227 193 /**
228 194 * 库位筛选
229   - * @param locationList
230   - * @param locationTypeList
  195 + * @param locationList 库位列表
  196 + * @param locationTypeList 库位类型列表
  197 + * @param roadway 巷道
231 198 * @return
232 199 */
233   - public String filter(List<Location> locationList, List<LocationType> locationTypeList){
234   - String locationCode = null;
235   - for (Location location: locationList){
236   - for (LocationType locationType: locationTypeList) {
237   - if (location.getLocationType().equals(locationType.getCode())){
238   - locationCode = location.getCode();
239   - return locationCode;
  200 + public String filter(List<Location> locationList, List<LocationType> locationTypeList, String roadway){
  201 + List<String> codeList = locationTypeList.stream().map(t-> t.getCode()).collect(Collectors.toList());
  202 + List<Location> newLocation = locationList.stream().filter(t-> codeList.contains(t.getLocationType()) && t.getRoadway().equals(roadway)).collect(Collectors.toList());
  203 + if (newLocation.isEmpty()){
  204 + return null;
  205 + } else{
  206 + return newLocation.get(0).getCode();
  207 + }
  208 + }
  209 +
  210 + /**
  211 + * 定位
  212 + * @param receiptContainerDetail
  213 + * @return
  214 + */
  215 + public String taskPositioning(ReceiptContainerDetail receiptContainerDetail){
  216 + ReceiptContainerHeader receiptContainerHeader = receiptContainerHeaderService.getById(receiptContainerDetail.getReceiptContainerId());
  217 + String locatingRule = receiptContainerHeader.getLocatingRule(); //定位规则
  218 + if (StringUtils.isEmpty(locatingRule)){
  219 + locatingRule = receiptDetailService.getById(receiptContainerDetail.getReceiptDetailId()).getLocatingRule();
  220 + //入库单明细定位规则不为空时执行
  221 + if (StringUtils.isEmpty(locatingRule)){
  222 + //入库单明细为空时,查询物料表中是否含有定位规则
  223 + LambdaQueryWrapper<Material> materialLambda = Wrappers.lambdaQuery();
  224 + materialLambda.eq(Material::getCode, receiptContainerDetail.getMaterialCode());
  225 + Material material = materialService.getOne(materialLambda);
  226 + locatingRule = material.getLocatingRule();
  227 +
  228 + if (StringUtils.isEmpty(locatingRule)){
  229 + //物料表中定位规则为空时,查询物料类别
  230 + LambdaQueryWrapper<MaterialType> materialTypeLambda = Wrappers.lambdaQuery();
  231 + materialTypeLambda.eq(MaterialType::getCode, material.getType());
  232 + MaterialType materialType = materialTypeService.getOne(materialTypeLambda);
  233 + locatingRule = materialType.getLocatingRule();
  234 + if (StringUtils.isEmpty(locatingRule)){
  235 + //物料类别中定位规则为空时,查询入库首选项
  236 + LambdaQueryWrapper<ConfigValue> configValueLambda = Wrappers.lambdaQuery();
  237 + configValueLambda.eq(ConfigValue::getWarehouseCode, ShiroUtils.getWarehouseCode())
  238 + .eq(ConfigValue::getModuleType, "receipt")
  239 + .eq(ConfigValue::getRecordType, "入库首选项");
  240 + ConfigValue configValue = configValueService.getOne(configValueLambda);
  241 + LambdaQueryWrapper<ReceiptPreference> receiptPreferenceLambda = Wrappers.lambdaQuery();
  242 + receiptPreferenceLambda.eq(ReceiptPreference::getCode, configValue.getValue());
  243 + ReceiptPreference receiptPreference = receiptPreferenceService.getOne(receiptPreferenceLambda);
  244 + locatingRule = receiptPreferenceService.getOne(receiptPreferenceLambda).getLocationRule();
  245 + }
240 246 }
241 247 }
242 248 }
243   - return null;
  249 + //通过定位规则查找自定义sql
  250 + if (StringUtils.isEmpty(locatingRule)){
  251 + throw new ServiceException("未绑定定位规则");
  252 + }
  253 +
  254 + return locatingRule;
244 255 }
245 256 }
... ...
src/main/java/com/huaheng/pc/config/FilterConfigDetail/controller/FilterConfigDetailController.java
... ... @@ -123,6 +123,7 @@ public class FilterConfigDetailController extends BaseController {
123 123 }
124 124 filterConfigDetail.setModuleType(configHeader.getModuleType());
125 125 filterConfigDetail.setRecordType(configHeader.getRecordType());
  126 + filterConfigDetail.setFilterCode(configHeader.getFilterCode());
126 127 filterConfigDetail.setWarehouseCode(ShiroUtils.getWarehouseCode());
127 128 filterConfigDetail.setCreatedBy(ShiroUtils.getLoginName());
128 129 filterConfigDetail.setLastUpdatedBy(ShiroUtils.getLoginName());
... ...
src/main/java/com/huaheng/pc/config/FilterConfigDetail/domain/FilterConfigDetail.java
... ... @@ -78,9 +78,9 @@ public class FilterConfigDetail implements Serializable {
78 78 @ApiModelProperty(value="全SQL")
79 79 private String statement;
80 80  
81   - @TableField(value = "sqll")
  81 + @TableField(value = "statements")
82 82 @ApiModelProperty(value="后续分组排序")
83   - private String sqll;
  83 + private String statements;
84 84  
85 85 /**
86 86 * 是否系统创建
... ...
src/main/java/com/huaheng/pc/config/location/controller/LocationController.java
... ... @@ -123,7 +123,7 @@ public class LocationController extends BaseController {
123 123 /**
124 124 * 批量新增保存库位
125 125 */
126   - @RequiresPermissions("config:location:add")
  126 + @RequiresPermissions("config:location:addBatch")
127 127 @ApiOperation(value="新增库位", notes="批量新增库位", httpMethod = "POST")
128 128 @Log(title = "通用-库位管理", operating = "新增库位", action = BusinessType.INSERT)
129 129 @PostMapping("/addBatchSave")
... ...
src/main/java/com/huaheng/pc/config/location/domain/Location.java
... ... @@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.annotation.TableName;
7 7 import java.io.Serializable;
8 8 import java.util.Date;
9 9 import lombok.Data;
  10 +import org.springframework.transaction.annotation.Transactional;
10 11  
11 12 @Data
12 13 @TableName(value = "location")
... ... @@ -72,6 +73,12 @@ public class Location implements Serializable {
72 73 private Integer iGrid;
73 74  
74 75 /**
  76 + * 巷道
  77 + */
  78 + @TableField(value = "roadway")
  79 + private String roadway;
  80 +
  81 + /**
75 82 * 名称
76 83 */
77 84 @TableField(value = "name")
... ... @@ -174,56 +181,4 @@ public class Location implements Serializable {
174 181 private Boolean deleted;
175 182  
176 183 private static final long serialVersionUID = 1L;
177   -
178   - public static final String COL_CODE = "code";
179   -
180   - public static final String COL_WAREHOUSECODE = "warehouseCode";
181   -
182   - public static final String COL_ZONECODE = "zoneCode";
183   -
184   - public static final String COL_LOCATIONTYPE = "locationType";
185   -
186   - public static final String COL_CONTAINERCODE = "containerCode";
187   -
188   - public static final String COL_IROW = "iRow";
189   -
190   - public static final String COL_ICOLUMN = "iColumn";
191   -
192   - public static final String COL_ILAYER = "iLayer";
193   -
194   - public static final String COL_IGRID = "iGrid";
195   -
196   - public static final String COL_NAME = "name";
197   -
198   - public static final String COL_ENABLE = "enable";
199   -
200   - public static final String COL_LASTCYCLECOUNTDATE = "lastCycleCountDate";
201   -
202   - public static final String COL_CREATED = "created";
203   -
204   - public static final String COL_CREATEDBY = "createdBy";
205   -
206   - public static final String COL_LASTUPDATED = "lastUpdated";
207   -
208   - public static final String COL_LASTUPDATEDBY = "lastUpdatedBy";
209   -
210   - public static final String COL_VERSION = "version";
211   -
212   - public static final String COL_USERDEF1 = "userDef1";
213   -
214   - public static final String COL_USERDEF2 = "userDef2";
215   -
216   - public static final String COL_USERDEF3 = "userDef3";
217   -
218   - public static final String COL_USERDEF4 = "userDef4";
219   -
220   - public static final String COL_USERDEF5 = "userDef5";
221   -
222   - public static final String COL_USERDEF6 = "userDef6";
223   -
224   - public static final String COL_USERDEF7 = "userDef7";
225   -
226   - public static final String COL_USERDEF8 = "userDef8";
227   -
228   - public static final String COL_SYSTEMCREATED = "systemCreated";
229 184 }
230 185 \ No newline at end of file
... ...
src/main/java/com/huaheng/pc/config/location/service/LocationServiceImpl.java
... ... @@ -73,13 +73,18 @@ public class LocationServiceImpl extends ServiceImpl&lt;LocationMapper, Location&gt; i
73 73 return AjaxResult.success("新增库位成功");
74 74 }
75 75  
  76 + /**
  77 + * 批量新增库位
  78 + * @param location
  79 + * @return boolean
  80 + */
76 81 @Override
77 82 public boolean insertLocation(Location location) {
78 83 /* 判断库位类型编码是否存在*/
79   - LambdaQueryWrapper<LocationType> typelambda = Wrappers.lambdaQuery();
80   - typelambda.eq(LocationType::getCode,location.getLocationType())
  84 + LambdaQueryWrapper<LocationType> typeLambda = Wrappers.lambdaQuery();
  85 + typeLambda.eq(LocationType::getCode,location.getLocationType())
81 86 .select(LocationType::getCode);
82   - List<Map<String, Object>> list = locationTypeService.listMaps(typelambda);
  87 + List<Map<String, Object>> list = locationTypeService.listMaps(typeLambda);
83 88 if (list.size() < 1){
84 89 throw new ServiceException("库位类型编码不存在");
85 90 }
... ... @@ -97,6 +102,7 @@ public class LocationServiceImpl extends ServiceImpl&lt;LocationMapper, Location&gt; i
97 102 if(!location.getZoneCode().equals(location.getLocationType())){
98 103 throw new ServiceException(location.getLocationType()+"的库位类型与"+location.getZoneCode()+"库区不匹配");
99 104 }
  105 +
100 106 String prefix = location.getLocationType().substring(1);
101 107 List<Location> locations = new ArrayList<>();
102 108 for (int i=1; i<=location.getIRow().intValue(); i++) {
... ... @@ -109,6 +115,7 @@ public class LocationServiceImpl extends ServiceImpl&lt;LocationMapper, Location&gt; i
109 115 param.setIColumn(j);
110 116 param.setILayer(k);
111 117 param.setIGrid(m);
  118 + param.setRoadway(location.getRoadway());
112 119 param.setZoneCode(location.getZoneCode());
113 120 param.setLocationType(location.getLocationType());
114 121 param.setStatus(location.getStatus());
... ... @@ -121,6 +128,7 @@ public class LocationServiceImpl extends ServiceImpl&lt;LocationMapper, Location&gt; i
121 128 String.format("%02d", j),
122 129 String.format("%02d", k),
123 130 String.format("%02d", m));
  131 + //查询该库位编码是否存在
124 132 LambdaQueryWrapper<Location> queryWrapper = Wrappers.lambdaQuery();
125 133 queryWrapper.eq(Location::getCode,code)
126 134 .eq(Location::getWarehouseCode,ShiroUtils.getWarehouseCode());
... ... @@ -133,8 +141,7 @@ public class LocationServiceImpl extends ServiceImpl&lt;LocationMapper, Location&gt; i
133 141 }
134 142 }
135 143 }
136   - Boolean result = locationService.saveBatch(locations);
137   - return result;
  144 + return locationService.saveBatch(locations);
138 145 }
139 146  
140 147 @Override
... ...
src/main/java/com/huaheng/pc/config/waveFlowDetail/controller/WaveFlowDetailController.java
... ... @@ -50,9 +50,9 @@ public class WaveFlowDetailController extends BaseController {
50 50  
51 51  
52 52 @RequiresPermissions("config:waveFlowDetail:view")
53   - @GetMapping("/list/{id}")
54   - public String waveFlowDetail(@PathVariable("id")Integer id, ModelMap mmap) {
55   - mmap.put("headerId",id);
  53 + @GetMapping("/list/{headerId}")
  54 + public String waveFlowDetail(@PathVariable("id")Integer headerId, ModelMap mmap) {
  55 + mmap.put("headerId",headerId);
56 56 return prefix + "/waveFlowDetail";
57 57 }
58 58  
... ...
src/main/java/com/huaheng/pc/shipment/shipmentHeader/service/ShipmentHeaderServiceImpl.java
... ... @@ -108,6 +108,7 @@ public class ShipmentHeaderServiceImpl extends ServiceImpl&lt;ShipmentHeaderMapper,
108 108 //说明没有货箱,则直接首位均为新建
109 109 shipmentHeader.setFirstStatus(100);
110 110 shipmentHeader.setLastStatus(100);
  111 +
111 112 this.saveOrUpdate(shipmentHeader);
112 113 }else {
113 114 int firstStatus = map.get("maxStatus");
... ...
src/main/java/com/huaheng/pc/shipment/shippingCombination/service/ShippingCombinationService.java
... ... @@ -78,7 +78,7 @@ public class ShippingCombinationService {
78 78  
79 79 //根据sql查库存
80 80 try {
81   - list = inventoryDetailService.selectBysql(filterConfigDetail.getStatement(),shipmentDetail,filterConfigDetail.getSqll(),shipmentPreference);
  81 + list = inventoryDetailService.selectBysql(filterConfigDetail.getStatement(),shipmentDetail,filterConfigDetail.getStatements(),shipmentPreference);
82 82 }catch (Exception e){
83 83 throw new ServiceException("sql错误");
84 84 }
... ... @@ -98,7 +98,7 @@ public class ShippingCombinationService {
98 98 }
99 99  
100 100 //根据sql查库存
101   - list=inventoryDetailService.selectBysql(filterConfigDetail.getStatement(),shipmentDetail,filterConfigDetail.getSqll(),shipmentPreference);
  101 + list=inventoryDetailService.selectBysql(filterConfigDetail.getStatement(),shipmentDetail,filterConfigDetail.getStatements(),shipmentPreference);
102 102 return list;
103 103 }
104 104  
... ... @@ -112,7 +112,7 @@ public class ShippingCombinationService {
112 112 }
113 113  
114 114 //根据sql查库存
115   - list=inventoryDetailService.selectBysql(filterConfigDetail.getStatement(),shipmentDetail,filterConfigDetail.getSqll(),shipmentPreference);
  115 + list=inventoryDetailService.selectBysql(filterConfigDetail.getStatement(),shipmentDetail,filterConfigDetail.getStatements(),shipmentPreference);
116 116 return list;
117 117 }
118 118  
... ...
src/main/resources/mybatis/config/LocationMapper.xml
... ... @@ -13,6 +13,7 @@
13 13 <result column="iColumn" jdbcType="INTEGER" property="iColumn" />
14 14 <result column="iLayer" jdbcType="INTEGER" property="iLayer" />
15 15 <result column="iGrid" jdbcType="INTEGER" property="iGrid" />
  16 + <result column="roadway" jdbcType="VARCHAR" property="roadway" />
16 17 <result column="name" jdbcType="VARCHAR" property="name" />
17 18 <result column="lastCycleCountDate" jdbcType="TIMESTAMP" property="lastCycleCountDate" />
18 19 <result column="created" jdbcType="TIMESTAMP" property="created" />
... ... @@ -33,7 +34,7 @@
33 34 <sql id="Base_Column_List">
34 35 <!--@mbg.generated-->
35 36 id, code, warehouseCode, zoneCode, locationType, containerCode, iRow, iColumn, iLayer,
36   - iGrid, `name`, `enable`, lastCycleCountDate, created, createdBy, lastUpdated, lastUpdatedBy,
  37 + iGrid, roadway, `name`, `enable`, lastCycleCountDate, created, createdBy, lastUpdated, lastUpdatedBy,
37 38 version, userDef1, userDef2, userDef3, userDef4, userDef5, userDef6, userDef7, userDef8,
38 39 systemCreated
39 40 </sql>
... ...
src/main/resources/templates/config/filterConfigDetail/add.html
... ... @@ -24,12 +24,12 @@
24 24 <!--<input id="recordType" name="recordType" class="form-control" type="text">-->
25 25 <!--</div>-->
26 26 <!--</div>-->
27   - <div class="form-group">
28   - <label class="col-sm-3 control-label">条件名:</label>
29   - <div class="col-sm-8">
30   - <input id="filterCode" name="filterCode" class="form-control" type="text">
31   - </div>
32   - </div>
  27 + <!--<div class="form-group">-->
  28 + <!--<label class="col-sm-3 control-label">条件名:</label>-->
  29 + <!--<div class="col-sm-8">-->
  30 + <!--<input id="filterCode" name="filterCode" class="form-control" type="text">-->
  31 + <!--</div>-->
  32 + <!--</div>-->
33 33 <div class="form-group">
34 34 <label class="col-sm-3 control-label">描述:</label>
35 35 <div class="col-sm-8">
... ... @@ -43,6 +43,12 @@
43 43 </div>
44 44 </div>
45 45 <div class="form-group">
  46 + <label class="col-sm-3 control-label">后续分组排序:</label>
  47 + <div class="col-sm-8">
  48 + <input id="statements" name="statements" class="form-control" type="text">
  49 + </div>
  50 + </div>
  51 + <div class="form-group">
46 52 <label class="col-sm-3 control-label">是否系统创建:</label>
47 53 <div class="col-sm-8">
48 54 <div class="onoffswitch">
... ... @@ -82,15 +88,6 @@
82 88 code:{
83 89 required:true,
84 90 },
85   - // moduleType:{
86   - // required:true,
87   - // },
88   - // recordType:{
89   - // required:true,
90   - // },
91   - filterCode:{
92   - required:true,
93   - },
94 91 },
95 92 submitHandler: function(form) {
96 93 // $.operate.save(prefix + "/add", $('#form-locationType-add').serialize());
... ...
src/main/resources/templates/config/filterConfigDetail/edit.html
... ... @@ -25,12 +25,7 @@
25 25 <!--<input id="recordType" name="recordType" class="form-control" type="text" th:field="*{recordType}">-->
26 26 <!--</div>-->
27 27 <!--</div>-->
28   - <div class="form-group">
29   - <label class="col-sm-3 control-label">条件名:</label>
30   - <div class="col-sm-8">
31   - <input id="filterCode" name="filterCode" class="form-control" type="text" th:field="*{filterCode}">
32   - </div>
33   - </div>
  28 +
34 29 <div class="form-group">
35 30 <label class="col-sm-3 control-label">描述:</label>
36 31 <div class="col-sm-8">
... ... @@ -83,15 +78,6 @@
83 78 code:{
84 79 required:true,
85 80 },
86   - // moduleType:{
87   - // required:true,
88   - // },
89   - // recordType:{
90   - // required:true,
91   - // },
92   - filterCode:{
93   - required:true,
94   - },
95 81 },
96 82 submitHandler: function(form) {
97 83 // $.operate.save(prefix + "/add", $('#form-locationType-add').serialize());
... ...
src/main/resources/templates/config/filterConfigDetail/filterConfigDetail.html
... ... @@ -92,6 +92,10 @@
92 92 title : '全SQL'
93 93 },
94 94 {
  95 + field : 'statements',
  96 + title : '后续分组排序'
  97 + },
  98 + {
95 99 field : 'systemCreated',
96 100 title : '是否系统创建',
97 101 formatter: function (value, item, index) {
... ...
src/main/resources/templates/config/location/addBatch.html
... ... @@ -30,6 +30,12 @@
30 30 </div>
31 31 </div>
32 32 <div class="form-group">
  33 + <label class="col-sm-3 control-label">巷道:</label>
  34 + <div class="col-sm-8">
  35 + <input id="roadway" name="roadway" class="form-control" type="text">
  36 + </div>
  37 + </div>
  38 + <div class="form-group">
33 39 <label class="col-sm-3 control-label">库位类型:</label>
34 40 <div class="col-sm-8">
35 41 <select id="locationType" name="locationType" class="form-control" th:with="locationType=${@locationType.getLocationPrefix()}">
... ... @@ -104,6 +110,7 @@
104 110 "iColumn": $("input[name='iColumn']").val(),
105 111 "iLayer": $("input[name='iLayer']").val(),
106 112 "iGrid": $("input[name='iGrid']").val(),
  113 + "roadway": $("input[name='roadway']").val(),
107 114 "locationType": $("#locationType option:selected").val(),
108 115 "zoneCode": $("#zone option:selected").attr("code"),
109 116 "status" : $("#status option:selected").val(),
... ...
src/main/resources/templates/config/location/location.html
... ... @@ -68,7 +68,7 @@
68 68 <a class="btn btn-outline btn-success btn-rounded" onclick="$.operate.add()" shiro:hasPermission="config:location:add">
69 69 <i class="fa fa-plus"></i> 新增
70 70 </a>
71   - <a class="btn btn-outline btn-primary btn-rounded" onclick="addBatch()" shiro:hasPermission="config:location:add">
  71 + <a class="btn btn-outline btn-primary btn-rounded" onclick="addBatch()" shiro:hasPermission="config:location:addBatch">
72 72 <i class="fa fa-plus-square-o"></i> 批量新增
73 73 </a>
74 74 <a class="btn btn-outline btn-danger btn-rounded" onclick="$.operate.batRemove()" shiro:hasPermission="config:location:remove">
... ... @@ -133,6 +133,10 @@
133 133 title : '格'
134 134 },
135 135 {
  136 + field : 'roadway',
  137 + title : '巷道'
  138 + },
  139 + {
136 140 field : 'name',
137 141 title : '名称',
138 142 visible : false
... ...
src/main/resources/templates/config/waveMaster/add.html
... ... @@ -68,21 +68,25 @@
68 68 <div class="form-group">
69 69 <label class="col-sm-3 control-label">是否补货:</label>
70 70 <div class="col-sm-8">
71   - <div class="radio radio-info radio-inline" style="transform: scale(1.1, 1.1);">
72   - <input type="radio" id="needReplenishment1" name="needReplenishment" value="true" checked="checked"
73   - class="radio_select">
74   - <label for="needReplenishment1">是</label>
75   - </div>
76   - <div class="radio radio-danger radio-inline " style="transform: scale(1.1, 1.1);">
77   - <input type="radio" id="needReplenishment2" name="needReplenishment" value="false">
78   - <label for="needReplenishment2">否</label>
  71 + <div class="onoffswitch">
  72 + <input type="checkbox" th:checked="true" class="onoffswitch-checkbox" id="needReplenishment" name="needReplenishment">
  73 + <label class="onoffswitch-label" for="needReplenishment">
  74 + <span class="onoffswitch-inner"></span>
  75 + <span class="onoffswitch-switch"></span>
  76 + </label>
79 77 </div>
80 78 </div>
81 79 </div>
82 80 <div class="form-group">
83 81 <label class="col-sm-3 control-label">取消波次时保留补货任务:</label>
84 82 <div class="col-sm-8">
85   - <input id="holdRplnTask" name="holdRplnTask" class="form-control" type="text">
  83 + <div class="onoffswitch">
  84 + <input type="checkbox" th:checked="true" class="onoffswitch-checkbox" id="holdRplnTask" name="holdRplnTask">
  85 + <label class="onoffswitch-label" for="holdRplnTask">
  86 + <span class="onoffswitch-inner"></span>
  87 + <span class="onoffswitch-switch"></span>
  88 + </label>
  89 + </div>
86 90 </div>
87 91 </div>
88 92 <!--<div class="form-group">
... ...
src/main/resources/templates/config/waveMaster/edit.html
... ... @@ -69,23 +69,28 @@
69 69 <div class="form-group">
70 70 <label class="col-sm-3 control-label">是否补货:</label>
71 71 <div class="col-sm-8">
72   - <div class="radio radio-info radio-inline" style="transform: scale(1.1, 1.1);">
73   - <input type="radio" id="needReplenishment1" name="needReplenishment" value="true" th:field="*{needReplenishment}"
74   - class="radio_select">
75   - <label for="needReplenishment1">是</label>
76   - </div>
77   - <div class="radio radio-danger radio-inline " style="transform: scale(1.1, 1.1);">
78   - <input type="radio" id="needReplenishment2" name="needReplenishment" value="false" th:field="*{needReplenishment}">
79   - <label for="needReplenishment2">否</label>
  72 + <div class="onoffswitch">
  73 + <input type="checkbox" th:checked="*{needReplenishment}" class="onoffswitch-checkbox" id="needReplenishment" name="needReplenishment">
  74 + <label class="onoffswitch-label" for="needReplenishment">
  75 + <span class="onoffswitch-inner"></span>
  76 + <span class="onoffswitch-switch"></span>
  77 + </label>
80 78 </div>
81 79 </div>
82 80 </div>
83 81 <div class="form-group">
84 82 <label class="col-sm-3 control-label">取消波次时保留补货任务:</label>
85 83 <div class="col-sm-8">
86   - <input id="holdRplnTask" name="holdRplnTask" class="form-control" type="text" th:field="*{holdRplnTask}">
  84 + <div class="onoffswitch">
  85 + <input type="checkbox" th:checked="*{holdRplnTask}" class="onoffswitch-checkbox" id="holdRplnTask" name="holdRplnTask">
  86 + <label class="onoffswitch-label" for="holdRplnTask">
  87 + <span class="onoffswitch-inner"></span>
  88 + <span class="onoffswitch-switch"></span>
  89 + </label>
  90 + </div>
87 91 </div>
88 92 </div>
  93 +
89 94 <!--<div class="form-group">
90 95 <label class="col-sm-3 control-label">数据版本:</label>
91 96 <div class="col-sm-8">
... ...
src/main/resources/templates/config/waveMaster/waveMaster.html
... ... @@ -104,8 +104,8 @@
104 104 <div class="tab-pane fade" id="tabDetail">
105 105  
106 106 <div class="btn-group hidden-xs" id="toolbar2" role="group">
107   - <a class="btn btn-outline btn-success btn-rounded" onclick="detailAdd()"
108   - shiro:hasPermission="config:waveFlowHeader:add">
  107 + <a class="btn btn-outline btn-success btn-rounded" onclick="detailAdd()" style="display:none;"
  108 + id="detailAdd" shiro:hasPermission="config:waveFlowHeader:add">
109 109 <i class="fa fa-plus"></i> 新增
110 110 </a>
111 111 <a class="btn btn-outline btn-danger btn-rounded" onclick="detailBatRemove()"
... ... @@ -216,7 +216,15 @@
216 216 },
217 217 {
218 218 field : 'holdRplnTask',
219   - title : '取消波次时保留补货任务'
  219 + title : '取消波次时保留补货任务',
  220 + formatter: function (value, item, index) {
  221 + if (value==true) {
  222 + return '<span class="badge" style="background-color: #00B83F;color: white;width: 36px;">' + ' 是 ' + '</span>';
  223 + }
  224 + else if (value==false) {
  225 + return '<span class="badge" style="background-color: #ff0000;color: white;width: 36px;">' + ' 否 ' + '</span>';
  226 + }
  227 + }
220 228 },
221 229 {
222 230 field : 'created',
... ... @@ -524,6 +532,7 @@
524 532  
525 533 function detailReg(rowId){
526 534 headerId = rowId;
  535 + $("#detailAdd").css("display","block");
527 536 detail();
528 537 }
529 538  
... ... @@ -598,7 +607,7 @@
598 607 }
599 608  
600 609 function detailAdd() {
601   - var url = prefix2+"/add";
  610 + var url = prefix2+"/add/"+headerId;
602 611 $.modal.open("添加明细", url);
603 612 }
604 613  
... ...