|
@@ -63,8 +63,8 @@ public class InOutStorageBomServiceImpl extends ServiceImpl<InOutStorageBomMappe
|
|
|
wrapper.eq("w", Warehouse::getId, dto.getWarehouseId());
|
|
|
wrapper.eq("ios", InOutStorage::getType, dto.getType());
|
|
|
wrapper.eq("ios", InOutStorage::getDetailType, dto.getDetailType());
|
|
|
- wrapper.ge("ios", InOutStorage::getCreateTime, dto.getBeginTime());
|
|
|
- wrapper.le("ios", InOutStorage::getCreateTime, dto.getEndTime());
|
|
|
+ wrapper.ge("ios", InOutStorage::getInOutStorageTime, dto.getBeginTime());
|
|
|
+ wrapper.le("ios", InOutStorage::getInOutStorageTime, dto.getEndTime());
|
|
|
|
|
|
Page<InOutStorageBomVo> page = this.baseMapper.getPage(dto.getPage(), wrapper);
|
|
|
return page;
|
|
@@ -119,7 +119,7 @@ public class InOutStorageBomServiceImpl extends ServiceImpl<InOutStorageBomMappe
|
|
|
}
|
|
|
List<InOutStorage> inOutStorageList = inOutStorageService.list(q -> q
|
|
|
.in(BaseIdPo::getId, inOutStorageIds)
|
|
|
- .orderByAsc(InOutStorage::getCreateTime));
|
|
|
+ .orderByAsc(InOutStorage::getInOutStorageTime));
|
|
|
|
|
|
List<InOutStorageErpExportVo> inOutStorageErpExportVoList = new ArrayList<>();
|
|
|
int codeNum = 1;
|
|
@@ -133,20 +133,22 @@ public class InOutStorageBomServiceImpl extends ServiceImpl<InOutStorageBomMappe
|
|
|
} else {
|
|
|
inOutStorageErpExportVo.setDocCode("T119");
|
|
|
}
|
|
|
-
|
|
|
- String format = DateUtil.format(inOutStorage.getCreateTime(), "-yyyyMM");
|
|
|
+
|
|
|
+ String[] codes = inOutStorage.getCode().split("-");
|
|
|
+ String substring = codes[1].substring(0, codes[1].length() - 2);
|
|
|
+ String format = "-20" + substring;
|
|
|
if (!Objects.equals(dateFormat, format)) {
|
|
|
dateFormat = format;
|
|
|
- codeNum = 1;
|
|
|
+
|
|
|
+ codeNum = Integer.parseInt(codes[1].substring(codes[1].length() - 2) + codes[2].substring(codes[2].length() - 2));
|
|
|
}
|
|
|
String code = inOutStorageErpExportVo.getDocCode() + format + String.format("%04d", codeNum);
|
|
|
inOutStorageErpExportVo.setCode(code);
|
|
|
- inOutStorageErpExportVo.setCreateTime(DateUtil.format(inOutStorage.getCreateTime(), "yyyy/MM/dd HH:mm:ss"));
|
|
|
+ inOutStorageErpExportVo.setCreateTime(DateUtil.format(inOutStorage.getInOutStorageTime(), "yyyy/MM/dd HH:mm:ss"));
|
|
|
inOutStorageErpExportVo.setDeptCode("GPIT");
|
|
|
inOutStorageErpExportVo.setEmployeeCode("GPIT02");
|
|
|
|
|
|
inOutStorageErpExportVoList.add(inOutStorageErpExportVo);
|
|
|
- codeNum++;
|
|
|
}
|
|
|
|
|
|
Map<Long, String> map = inOutStorageErpExportVoList.stream()
|