|
|
@@ -439,11 +439,20 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
|
|
|
return Result.success();
|
|
|
|
|
|
}
|
|
|
+
|
|
|
@Override
|
|
|
@Transactional
|
|
|
- public void close(long id) {
|
|
|
- ProdInOut prodInOut = new ProdInOut();
|
|
|
- prodInOut.setId(id);
|
|
|
+ public void close(Long id) {
|
|
|
+ if(id == null || id <= 0) {
|
|
|
+ throw new BizException(BizExceptionCode.ILLEGAL_ID);
|
|
|
+ }
|
|
|
+ ProdInOut prodInOut = prodInOutMapper.selectByPrimaryKey(id);
|
|
|
+ if(prodInOut==null){
|
|
|
+ throw new BizException(BizExceptionCode.NO_DATA);
|
|
|
+ }
|
|
|
+ if(Status.CLOSE.name().equals(prodInOut.getPi_status())){
|
|
|
+ throw new BizException(BizExceptionCode.BIZ_CLOSE);
|
|
|
+ }
|
|
|
prodInOut.setPi_status(Status.CLOSE.getDisplay());
|
|
|
prodInOut.setPi_statuscode(Status.CLOSE.name());
|
|
|
|
|
|
@@ -452,16 +461,14 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
|
|
|
//日志
|
|
|
messageLogService.close(docBaseDTO);
|
|
|
}
|
|
|
- public void batchClose(BatchDealBaseDTO baseDTOs){
|
|
|
- if (null == baseDTOs || null == baseDTOs.getBaseDTOs() ||
|
|
|
- baseDTOs.getBaseDTOs().size() == 0) {
|
|
|
- return;
|
|
|
- }
|
|
|
- }
|
|
|
+
|
|
|
@Override
|
|
|
@Transactional
|
|
|
public void open(Long id){
|
|
|
ProdInOut prodInOut = prodInOutMapper.selectByPrimaryKey(id);
|
|
|
+ if(prodInOut==null){
|
|
|
+ throw new BizException(BizExceptionCode.NO_DATA);
|
|
|
+ }
|
|
|
List<ProdIODetail> prodIODetailList = prodIODetailMapper.selectByFK(id);
|
|
|
//部分入库、全部入库
|
|
|
int partTurnCount = 0,turnCount = 0;
|