|
@@ -142,15 +142,42 @@ public class SbInfoServiceImpl extends BaseServiceImpl<SbInfoMapper, SbInfo, SbI
|
|
private final SbMeasureLogMapper sbMeasureLogMapper;
|
|
private final SbMeasureLogMapper sbMeasureLogMapper;
|
|
|
|
|
|
|
|
|
|
|
|
+ @Override
|
|
|
|
+ @Transactional(rollbackFor = Exception.class)
|
|
|
|
+ public void yiBiaoBatchOutStore(SbInfoDTO sbInfoDTO) {
|
|
|
|
+ List<String> sbIds = sbInfoDTO.getSbIds();
|
|
|
|
+ UserInfo userInfo = SecurityUtils.getUserInfo();
|
|
|
|
+ sbIds.forEach(item->{
|
|
|
|
+ SbInfo sbInfo = new SbInfo();
|
|
|
|
+ sbInfo.setStatus(SbInfoStatusEnum.IN_USE.getValue());
|
|
|
|
+ sbInfo.setPositionId(sbInfoDTO.getPositionId());
|
|
|
|
+
|
|
|
|
+ SbMeasureLog log = new SbMeasureLog();
|
|
|
|
+ log.setSbId(item);
|
|
|
|
+ log.setId(IdGeneratorUtils.getObjectId());
|
|
|
|
+ log.setOtherType(SbMeasureLogOtherTypeEnum.OUT_STORE.getValue());
|
|
|
|
+
|
|
|
|
+ log.setContent(sbInfoDTO.getRemark());
|
|
|
|
+ log.setCreatedTime(LocalDateTime.now());
|
|
|
|
+ log.setCreatedUserId(userInfo.getUserId());
|
|
|
|
+ log.setCreatedUserName(userInfo.getRealName());
|
|
|
|
+ log.setUpdateTime(LocalDateTime.now());
|
|
|
|
+ log.setUpdateUserId(userInfo.getUserId());
|
|
|
|
+ log.setUpdateUserName(userInfo.getRealName());
|
|
|
|
+ sbMeasureLogMapper.insert(log);
|
|
|
|
+
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+
|
|
@Override
|
|
@Override
|
|
public void yiBiaoBatchBackStore(SbInfoDTO sbInfoDTO) {
|
|
public void yiBiaoBatchBackStore(SbInfoDTO sbInfoDTO) {
|
|
- //批量退库到‘仪表二级库’
|
|
|
|
|
|
+ //批量退库
|
|
if (sbInfoDTO.getSbIds()!=null && sbInfoDTO.getSbIds().size()>0){
|
|
if (sbInfoDTO.getSbIds()!=null && sbInfoDTO.getSbIds().size()>0){
|
|
SbInfo udpSb = new SbInfo();
|
|
SbInfo udpSb = new SbInfo();
|
|
UserInfo userInfo = SecurityUtils.getUserInfo();
|
|
UserInfo userInfo = SecurityUtils.getUserInfo();
|
|
sbInfoDTO.getSbIds().forEach(item->{
|
|
sbInfoDTO.getSbIds().forEach(item->{
|
|
udpSb.setId(item);
|
|
udpSb.setId(item);
|
|
- udpSb.setPositionId("658d2817a6cf000dacd41698");
|
|
|
|
|
|
+ udpSb.setPositionId(sbInfoDTO.getPositionId());
|
|
udpSb.setStatus(sbInfoDTO.getStatus());
|
|
udpSb.setStatus(sbInfoDTO.getStatus());
|
|
if (sbInfoDTO.getStatus() == SbInfoStatusEnum.SCRAPED.getValue()) {
|
|
if (sbInfoDTO.getStatus() == SbInfoStatusEnum.SCRAPED.getValue()) {
|
|
udpSb.setScrapedDate(LocalDateTime.now());
|
|
udpSb.setScrapedDate(LocalDateTime.now());
|
|
@@ -160,7 +187,7 @@ public class SbInfoServiceImpl extends BaseServiceImpl<SbInfoMapper, SbInfo, SbI
|
|
SbMeasureLog log = new SbMeasureLog();
|
|
SbMeasureLog log = new SbMeasureLog();
|
|
log.setSbId(item);
|
|
log.setSbId(item);
|
|
log.setId(IdGeneratorUtils.getObjectId());
|
|
log.setId(IdGeneratorUtils.getObjectId());
|
|
- if (sbInfoDTO.getStatus() == SbInfoStatusEnum.IN_BACK.getValue()) {
|
|
|
|
|
|
+ if (sbInfoDTO.getStatus() == SbInfoStatusEnum.IN_STORE.getValue()) {
|
|
log.setOtherType(SbMeasureLogOtherTypeEnum.IN_STORE.getValue());
|
|
log.setOtherType(SbMeasureLogOtherTypeEnum.IN_STORE.getValue());
|
|
}
|
|
}
|
|
if (sbInfoDTO.getStatus() == SbInfoStatusEnum.SCRAPED.getValue()) {
|
|
if (sbInfoDTO.getStatus() == SbInfoStatusEnum.SCRAPED.getValue()) {
|