|
|
@@ -222,13 +222,15 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
|
|
|
//检测调拨单拨入、拨出仓库是否一致
|
|
|
List<ProdIODetailDTO> items = formData.getItems();
|
|
|
int count = 0;
|
|
|
- for (ProdIODetailDTO item : items) {
|
|
|
- if (item.getPd_inwhcode().equals(item.getPd_whcode())) {
|
|
|
- count++;
|
|
|
+ if (BillCodeSeq.APPROPRIATIONINOUT.getName().equals(formData.getMain().getPi_class())) {
|
|
|
+ for (ProdIODetailDTO item : items) {
|
|
|
+ if (item.getPd_inwhcode().equals(item.getPd_whcode())) {
|
|
|
+ count++;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (count > 0) {
|
|
|
+ throw new BizException(BizExceptionCode.STORAGE_WAREHOUSE_SAME);
|
|
|
}
|
|
|
- }
|
|
|
- if (count > 0) {
|
|
|
- throw new BizException(BizExceptionCode.STORAGE_WAREHOUSE_SAME);
|
|
|
}
|
|
|
id = formData.getMain().getId();
|
|
|
if (StringUtils.isEmpty(id)|| "0".equals(String.valueOf(id))) {
|