|
|
@ -50,7 +50,6 @@ public class BorrowApplyServiceImpl implements BorrowApplyService {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
RecordUpdateReqVO recordUpdateReqVO = new RecordUpdateReqVO();
|
|
|
|
RecordUpdateReqVO recordUpdateReqVO = new RecordUpdateReqVO();
|
|
|
|
BeanUtils.copyProperties(record,recordUpdateReqVO);
|
|
|
|
BeanUtils.copyProperties(record,recordUpdateReqVO);
|
|
|
|
recordUpdateReqVO.setBorrowStatus("1");
|
|
|
|
|
|
|
|
recordService.updateRecord(recordUpdateReqVO);
|
|
|
|
recordService.updateRecord(recordUpdateReqVO);
|
|
|
|
borrowApplyMapper.insert(borrowApply);
|
|
|
|
borrowApplyMapper.insert(borrowApply);
|
|
|
|
// 返回
|
|
|
|
// 返回
|
|
|
@ -59,7 +58,7 @@ public class BorrowApplyServiceImpl implements BorrowApplyService {
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
@Transactional
|
|
|
|
@Transactional
|
|
|
|
public void updateBorrowApply(BorrowApplyUpdateReqVO updateReqVO) {
|
|
|
|
public CommonResult<String> updateBorrowApply(BorrowApplyUpdateReqVO updateReqVO) {
|
|
|
|
|
|
|
|
|
|
|
|
BorrowApplyDO borrowApply = this.getBorrowApply(updateReqVO.getId());
|
|
|
|
BorrowApplyDO borrowApply = this.getBorrowApply(updateReqVO.getId());
|
|
|
|
RecordUpdateReqVO recordUpdateReqVO = new RecordUpdateReqVO();
|
|
|
|
RecordUpdateReqVO recordUpdateReqVO = new RecordUpdateReqVO();
|
|
|
@ -68,9 +67,13 @@ public class BorrowApplyServiceImpl implements BorrowApplyService {
|
|
|
|
BeanUtils.copyProperties(record,recordUpdateReqVO);
|
|
|
|
BeanUtils.copyProperties(record,recordUpdateReqVO);
|
|
|
|
|
|
|
|
|
|
|
|
if (StringUtils.isNotNull(updateReqVO.getBorrowState())){
|
|
|
|
if (StringUtils.isNotNull(updateReqVO.getBorrowState())){
|
|
|
|
|
|
|
|
if (record.getBorrowStatus().equals("0")){
|
|
|
|
|
|
|
|
return CommonResult.error("档案已被借阅");
|
|
|
|
|
|
|
|
}
|
|
|
|
if (updateReqVO.getBorrowState().equals("2")) {
|
|
|
|
if (updateReqVO.getBorrowState().equals("2")) {
|
|
|
|
recordUpdateReqVO.setBorrowStatus(null);
|
|
|
|
recordUpdateReqVO.setBorrowStatus(null);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
recordUpdateReqVO.setBorrowStatus(updateReqVO.getBorrowState());
|
|
|
|
recordUpdateReqVO.setBorrowStatus(updateReqVO.getBorrowState());
|
|
|
|
recordService.updateRecord(recordUpdateReqVO);
|
|
|
|
recordService.updateRecord(recordUpdateReqVO);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -79,6 +82,7 @@ public class BorrowApplyServiceImpl implements BorrowApplyService {
|
|
|
|
// 更新
|
|
|
|
// 更新
|
|
|
|
BorrowApplyDO updateObj = BorrowApplyConvert.INSTANCE.convert(updateReqVO);
|
|
|
|
BorrowApplyDO updateObj = BorrowApplyConvert.INSTANCE.convert(updateReqVO);
|
|
|
|
borrowApplyMapper.updateById(updateObj);
|
|
|
|
borrowApplyMapper.updateById(updateObj);
|
|
|
|
|
|
|
|
return CommonResult.success("成功");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|