|
|
@@ -219,6 +219,17 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
|
|
|
Long id = null;
|
|
|
DocBaseDTO baseDTO = new DocBaseDTO();
|
|
|
if (null != formData) {
|
|
|
+ //检测调拨单拨入、拨出仓库是否一致
|
|
|
+ List<ProdIODetailDTO> items = formData.getItems();
|
|
|
+ int count = 0;
|
|
|
+ for (ProdIODetailDTO item : items) {
|
|
|
+ if (item.getPd_inwhcode().equals(item.getPd_whcode())) {
|
|
|
+ count++;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (count > 0) {
|
|
|
+ throw new BizException(BizExceptionCode.STORAGE_WAREHOUSE_SAME);
|
|
|
+ }
|
|
|
id = formData.getMain().getId();
|
|
|
if (StringUtils.isEmpty(id)|| "0".equals(String.valueOf(id))) {
|
|
|
baseDTO = saveFormData(formData);
|
|
|
@@ -232,7 +243,7 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
|
|
|
}
|
|
|
|
|
|
@Transactional(propagation = Propagation.REQUIRED)
|
|
|
- private void singleAudit(ProdInOutDTO prodInOutDTO) {
|
|
|
+ public void singleAudit(ProdInOutDTO prodInOutDTO) {
|
|
|
String pi_class= prodInOutDTO.getPi_class();
|
|
|
String pi_inoutno = prodInOutDTO.getPi_inoutno();
|
|
|
String pi_statuscode = prodInOutDTO.getPi_statuscode();
|
|
|
@@ -263,6 +274,10 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
|
|
|
baseDTOs.getBaseDTOs().size() == 0) {
|
|
|
return "没有可审核单据。";
|
|
|
}
|
|
|
+ String codes = getMapper().checkWarehouse(baseDTOs.getBaseDTOs());
|
|
|
+ if (!StringUtils.isEmpty(codes)) {
|
|
|
+ throw new BizException(BizExceptionCode.STORAGE_WAREHOUSE_SAMES.getCode(), String.format(BizExceptionCode.STORAGE_WAREHOUSE_SAMES.getMessage(), codes));
|
|
|
+ }
|
|
|
StringBuffer errorMsg = new StringBuffer();
|
|
|
for (DocBaseDTO base : baseDTOs.getBaseDTOs()) {
|
|
|
try {
|