Commit ab67cd70 张少辉

1.优化odn抛送

1 个父辈 d7e71a98
......@@ -284,6 +284,8 @@ public class Barcode extends BasePo implements Serializable {
private String odn;
private String sto;
/**
* 是否是锡膏
*/
......
......@@ -41,7 +41,7 @@ public class StationCacheUtil {
log.info("开始工位缓存信息");
for (int i = 1; i <= 5; i++) {
String stationName = "s" + i;
Station station = dataCache.getCache(stationName);
Station station = new Station();
if(station == null){
station = new Station();
station.setName(stationName);
......
......@@ -1223,7 +1223,7 @@ public class LuxsanApi extends DefaultSmfApiListener {
log.info("autoSto接口返回结果为:" + resultStr);
AutoStoResult result = JSONObject.parseObject(resultStr, AutoStoResult.class);
return result;
} catch (ApiException e) {
} catch (Exception e) {
log.info("autoSto请求失败:" + e.getMessage());
throw new ValidateException("smfcore.api.error", "接口请求失败[{0}]", new String[]{e.getMessage()});
}
......
......@@ -14,4 +14,5 @@ public class AutoDispatchDto {
private String posName;
private String modelFamily;
private int amount;
private String sto;
}
......@@ -112,6 +112,7 @@ public class AutoDispatchInfoController {
barcode.setCurrentRequestId("");
barcode.setOdn("");
barcode.setMemo(autoStoResult.getMSGTX());
barcode.setSto("");
barcodeManager.save(barcode);
pos.setBarcode(barcode);
storagePosManager.save(pos);
......@@ -126,6 +127,7 @@ public class AutoDispatchInfoController {
if (barcode != null) {
if (key_id.equals(barcode.getCurrentRequestId())) {
barcode.setOdn(data);
barcode.setSto(autoStoResult.getDETAIL());
barcodeManager.save(barcode);
pos.setBarcode(barcode);
storagePosManager.save(pos);
......
......@@ -48,7 +48,7 @@ public class AutoDispatchInventoryController {
public ResultBean getDispathSetting() {
Boolean dispath = dataCache.getCache(Constants.CACHE_AutoDispatchInventory);
if (dispath == null){
dispath = true;
dispath = false;
}
return ResultBean.newOkResult(dispath);
}
......@@ -58,7 +58,7 @@ public class AutoDispatchInventoryController {
@AnonymousAccess
public ResultBean openOrClosdDispath(Boolean dispath) {
if (dispath == null) {
dispath = true;
dispath = false;
}
dataCache.updateCache(Constants.CACHE_AutoDispatchInventory, dispath);
return ResultBean.newOkResult("");
......@@ -73,7 +73,7 @@ public class AutoDispatchInventoryController {
Query q = QueryHelp.getQuery(criteria);
Criteria c = Criteria.where("barcode").exists(true)
.and("enabled").is(true);
q.addCriteria(c).fields().include("id","posName","barcode.barcode", "barcode.amount","barcode.palletId", "barcode.partNumber", "barcode.warehouseCode", "barcode.currentRequestId", "barcode.odn","barcode.modelFamily");
q.addCriteria(c).fields().include("id","posName","barcode.barcode", "barcode.amount","barcode.palletId", "barcode.partNumber", "barcode.warehouseCode", "barcode.currentRequestId", "barcode.odn","barcode.modelFamily","barcode.sto");
//查询所有的,把hold的排除
Map<String, FetchHoldInfoRequest> fetchHoldInfoRequestMap = new HashMap<>();
......@@ -128,6 +128,7 @@ public class AutoDispatchInventoryController {
dto.setPosName(pos.getPosName());
dto.setModelFamily(barcode.getModelFamily());
dto.setAmount(barcode.getAmount());
dto.setSto(barcode.getSto());
autoDispatchDtoList.add(dto);
}
}
......
......@@ -65,6 +65,25 @@ public class OdnCheckOutNewController {
return ResultBean.newOkResult(FetchShipmentInfoDto.convertFetchShipmentInfoDto(resultList));
}
@ApiOperation("根据odn查询已绑定的料箱信息")
@RequestMapping("/getOdnBindBox")
@AnonymousAccess
public ResultBean getOdnBindBox(String odn) {
List<String> palletIdList = new ArrayList<>();
Query query = new Query();
Criteria criteria = Criteria.where("barcode.odn").is(odn);
query.addCriteria(criteria).fields().include("barcode.palletId","barcode.barcode");
List<StoragePos> storagePosList = storagePosManager.findByQuery(query);
if (storagePosList != null && !storagePosList.isEmpty()) {
for (StoragePos pos : storagePosList) {
palletIdList.add(pos.getBarcode().getPalletId());
}
}
return ResultBean.newOkResult(palletIdList);
}
@ApiOperation("获取odn要出库的箱子")
@RequestMapping("/getOdnCheckOutBox")
@AnonymousAccess
......
......@@ -20,7 +20,7 @@ spring:
backup-mongodb:
host: 10.68.27.128 # 主机地址
port: 27017 # 端口
database: wipsmf # 数据库
database: 8001 # 数据库
username: neotel
password: neotel
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!