Commit ddc1e591 zshaohui

returnMaterial 增加备注字段

1 个父辈 a97f1ab4
...@@ -9,4 +9,6 @@ public class CheckOutDto { ...@@ -9,4 +9,6 @@ public class CheckOutDto {
private String[] pids; private String[] pids;
@ApiModelProperty("是否是单盘出库") @ApiModelProperty("是否是单盘出库")
private String singleOut; private String singleOut;
@ApiModelProperty("备注")
private String comments;
} }
...@@ -790,7 +790,7 @@ public class Micron20031Api { ...@@ -790,7 +790,7 @@ public class Micron20031Api {
* //Input: TypeofReturn, MicronPN, LotNo, BatchNo, Location, RemainingQuantity, Mode, Username, SystemId, MaterialType * //Input: TypeofReturn, MicronPN, LotNo, BatchNo, Location, RemainingQuantity, Mode, Username, SystemId, MaterialType
* //Output: TypeofReturn, MicronPN, LotNo, BatchNo, Location, RemainingQuantity, Mode, Username, SystemId, MaterialType, Message, Status, ExpiredDate * //Output: TypeofReturn, MicronPN, LotNo, BatchNo, Location, RemainingQuantity, Mode, Username, SystemId, MaterialType, Message, Status, ExpiredDate
*/ */
public static Barcode returnMaterial(Barcode barcode, String typeOfReturn, String username) throws ApiException { public static Barcode returnMaterial(Barcode barcode, String typeOfReturn, String username,String comments) throws ApiException {
String checkStockAvailableUrl = getUrl(api_ReturnMaterial); String checkStockAvailableUrl = getUrl(api_ReturnMaterial);
if(ObjectUtil.isEmpty(checkStockAvailableUrl)){ if(ObjectUtil.isEmpty(checkStockAvailableUrl)){
return barcode; return barcode;
...@@ -807,6 +807,7 @@ public class Micron20031Api { ...@@ -807,6 +807,7 @@ public class Micron20031Api {
dataMap.put("Username",username); dataMap.put("Username",username);
dataMap.put("SystemID","SPMMS"); dataMap.put("SystemID","SPMMS");
dataMap.put("MaterialType",MATERIAL_TYPE); dataMap.put("MaterialType",MATERIAL_TYPE);
dataMap.put("Comments",comments);
log.info("调用MES接口 ReturnMaterial type="+typeOfReturn+",参数:"+JsonUtil.toJsonStr(dataMap)); log.info("调用MES接口 ReturnMaterial type="+typeOfReturn+",参数:"+JsonUtil.toJsonStr(dataMap));
String resultStr = HttpHelper.postJsonWithAuth(checkStockAvailableUrl, dataMap, auth); String resultStr = HttpHelper.postJsonWithAuth(checkStockAvailableUrl, dataMap, auth);
......
...@@ -108,7 +108,7 @@ public class MicronSpApiListener extends BaseSmfApiListener { ...@@ -108,7 +108,7 @@ public class MicronSpApiListener extends BaseSmfApiListener {
//普通入库验证 调用return //普通入库验证 调用return
try { try {
log.info("canPutInAfterResolve 普通入库验证 调用return"); log.info("canPutInAfterResolve 普通入库验证 调用return");
Barcode resultBarcode = Micron20031Api.returnMaterial(barcode, Micron20031Api.NORMAL_RETURN, params.getLoginUser()); Barcode resultBarcode = Micron20031Api.returnMaterial(barcode, Micron20031Api.NORMAL_RETURN, params.getLoginUser(),"");
if (resultBarcode != null) { if (resultBarcode != null) {
return resultBarcode; return resultBarcode;
} }
......
...@@ -6,6 +6,7 @@ import com.neotel.smfcore.common.bean.ResultBean; ...@@ -6,6 +6,7 @@ import com.neotel.smfcore.common.bean.ResultBean;
import com.neotel.smfcore.common.exception.ApiException; import com.neotel.smfcore.common.exception.ApiException;
import com.neotel.smfcore.common.exception.ValidateException; import com.neotel.smfcore.common.exception.ValidateException;
import com.neotel.smfcore.common.utils.SecurityUtils; import com.neotel.smfcore.common.utils.SecurityUtils;
import com.neotel.smfcore.common.utils.StringUtils;
import com.neotel.smfcore.core.barcode.service.po.Barcode; import com.neotel.smfcore.core.barcode.service.po.Barcode;
import com.neotel.smfcore.core.device.util.DataCache; import com.neotel.smfcore.core.device.util.DataCache;
import com.neotel.smfcore.core.storage.enums.CHECKOUT_TYPE; import com.neotel.smfcore.core.storage.enums.CHECKOUT_TYPE;
...@@ -175,6 +176,12 @@ public class MicronSpUnloadController { ...@@ -175,6 +176,12 @@ public class MicronSpUnloadController {
if (checkOutDto.getSingleOut() == null) { if (checkOutDto.getSingleOut() == null) {
checkOutDto.setSingleOut(true + ""); checkOutDto.setSingleOut(true + "");
} }
String comments = checkOutDto.getComments();
if (StringUtils.isEmpty(comments)){
throw new ValidateException("smfcore.valueCanotNull", "{0}不能为空", new String[]{"comments"});
}
String isSingleOutStr = checkOutDto.getSingleOut(); String isSingleOutStr = checkOutDto.getSingleOut();
boolean isSingleOut = Boolean.valueOf(isSingleOutStr); boolean isSingleOut = Boolean.valueOf(isSingleOutStr);
...@@ -193,7 +200,7 @@ public class MicronSpUnloadController { ...@@ -193,7 +200,7 @@ public class MicronSpUnloadController {
int unloakOk = 0; int unloakOk = 0;
try { try {
//接口验证能否出库 //接口验证能否出库
Barcode barcode = Micron20031Api.returnMaterial(pos.getBarcode(), Micron20031Api.EXPIRED_DISPOSAL, SecurityUtils.getCurrentUsername()); Barcode barcode = Micron20031Api.returnMaterial(pos.getBarcode(), Micron20031Api.EXPIRED_DISPOSAL, SecurityUtils.getCurrentUsername(),comments);
if (barcode != null) { if (barcode != null) {
log.info("removal 料仓【" + storage.getName() + "_" + storage.getCid() + "】仓位【" + pos.getPosName() + "】 returnMaterial 成功,开始出库"); log.info("removal 料仓【" + storage.getName() + "_" + storage.getCid() + "】仓位【" + pos.getPosName() + "】 returnMaterial 成功,开始出库");
try { try {
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!