Commit 0e8f9693 sunke

唯一码校验接口添加businessType字段

数量大于50000不允许入库
1 个父辈 cb47f708
......@@ -241,6 +241,7 @@ public class CodeResolve {
}
}
barcodeFromRule.setLabelAmount(barcodeFromRule.getAmount());
barcodeFromRule.setDistance(component.getDistance());
barcode = barcodeManager.save(barcodeFromRule);
......
......@@ -266,7 +266,7 @@ public class SingleInController {
} else {
//唯一码校验接口
ResponseParam param = HikApi.riCheckApi(SecurityUtils.getCurrentUsername(), barcode.getBarcode(), "", "");
ResponseParam param = HikApi.riCheckApi(SecurityUtils.getCurrentUsername(), barcode.getBarcode(), "", "", inType);
if (ObjectUtil.isNotEmpty(param)) {
if (param.getCode().equals(HikApi.CODE_OK)) {
......@@ -353,7 +353,7 @@ public class SingleInController {
if (barcode == null) {
throw new ValidateException("smfcore.error.barcode.invalid", "{0}不是有效的条码", new String[]{code});
}
int qty = barcode.getLabelAmount();
int qty = barcode.getAmount();
if(qty > 50000){
throw new ValidateException("smfcore.error.qty.invalid", "条码数量超过50000不允许入库");
}
......
......@@ -469,9 +469,10 @@ public class HikApi {
* @param trayId 料盘ID
* @param baseCode 基地
* @param lgort 库位
* @param inType 1=普通入库,2=并盘入库,3=截料入库,4=退料入库,5=转储入库
* @return 提供唯一码校验功能 是否成功,true=成功
*/
public static ResponseParam riCheckApi(String userName, String trayId,String baseCode,String lgort) {
public static ResponseParam riCheckApi(String userName, String trayId,String baseCode,String lgort, Integer inType) {
String apiName = "Hik 唯一码校验接口 (riCheckApi): ";
String url = getUrl(config.addr_8_riCheckApi, "riCheckApi");
......@@ -491,6 +492,11 @@ public class HikApi {
dataMap.put("trayId", trayId);//料盘ID
dataMap.put("baseCode", baseCode);//基地
dataMap.put("lgort", lgort);//库位
String businessType = "";
if(inType == 1){
businessType = "0";
}
dataMap.put("businessType", businessType);//库位
// String data = JsonUtil.toJsonStr(dataMap);
RequestParam info = new RequestParam(getReqCode(), userName, dataMap);
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!