|
|
|
@ -59,6 +59,7 @@ import com.glxp.api.service.purchase.impl.PurOrderDetailService;
|
|
|
|
|
import com.glxp.api.service.purchase.impl.PurPlanDetailService;
|
|
|
|
|
import com.glxp.api.util.CustomUtil;
|
|
|
|
|
import com.glxp.api.util.GennerOrderUtils;
|
|
|
|
|
import com.glxp.api.util.IntUtil;
|
|
|
|
|
import com.glxp.api.util.OrderNoTypeBean;
|
|
|
|
|
import com.glxp.api.util.udi.FilterUdiUtils;
|
|
|
|
|
import org.springframework.validation.BindingResult;
|
|
|
|
@ -161,8 +162,8 @@ public class PurOrderReceiveController extends BaseController {
|
|
|
|
|
filterReceiveRequest.setCreateUser(authAdmin.getId() + ""); //查询自己
|
|
|
|
|
}
|
|
|
|
|
if (filterReceiveRequest.getIsInvCode() != null && filterReceiveRequest.getIsInvCode()) {
|
|
|
|
|
AuthAdmin authAdmin = customerService.getUserBean();
|
|
|
|
|
filterReceiveRequest.setTargetInvCode(authAdmin.getLocInvCode());
|
|
|
|
|
// AuthAdmin authAdmin = customerService.getUserBean();
|
|
|
|
|
filterReceiveRequest.setTargetInvCode("1000000");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
List<ReceiveResponse> data = receiveService.filterList(filterReceiveRequest);
|
|
|
|
@ -260,7 +261,7 @@ public class PurOrderReceiveController extends BaseController {
|
|
|
|
|
//寄售
|
|
|
|
|
FilterInvPreProductRequest request = new FilterInvPreProductRequest();
|
|
|
|
|
// BeanUtils.copyProperties(updateReceiveDetailRequest,request);
|
|
|
|
|
request.setNameCode(updateReceiveDetailRequest.getNameCode());
|
|
|
|
|
request.setDiCode(updateReceiveDetailRequest.getNameCode());
|
|
|
|
|
request.setInvCode(updateReceiveDetailRequest.getTargetInvCode());
|
|
|
|
|
list = selectFilterInvPreProductRequest(request);
|
|
|
|
|
|
|
|
|
@ -268,20 +269,20 @@ public class PurOrderReceiveController extends BaseController {
|
|
|
|
|
//预验收
|
|
|
|
|
FilterInvPreinProductRequest request = new FilterInvPreinProductRequest();
|
|
|
|
|
// BeanUtils.copyProperties(updateReceiveDetailRequest,request);
|
|
|
|
|
request.setNameCode(updateReceiveDetailRequest.getNameCode());
|
|
|
|
|
request.setDiCode(updateReceiveDetailRequest.getNameCode());
|
|
|
|
|
request.setInvCode(updateReceiveDetailRequest.getTargetInvCode());
|
|
|
|
|
listinvprein = selectfilterListStock(request);
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
FilterInvProductRequest request = new FilterInvProductRequest();
|
|
|
|
|
// BeanUtils.copyProperties(updateReceiveDetailRequest,request);
|
|
|
|
|
request.setNameCode(updateReceiveDetailRequest.getNameCode());
|
|
|
|
|
request.setDiCode(updateReceiveDetailRequest.getNameCode());
|
|
|
|
|
request.setInvCode(updateReceiveDetailRequest.getTargetInvCode());
|
|
|
|
|
listInv = selectFilterInvProductRequest(request);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
if (list != null && list.size() > 0) {
|
|
|
|
|
if (list.get(0).getReCount() < updateReceiveDetailRequest.getCount()) {
|
|
|
|
|
if (list.get(0).getReCount() < IntUtil.value(updateReceiveDetailRequest.getCount())) {
|
|
|
|
|
return ResultVOUtils.error(999, "库存不足!");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|