| | |
| | | import com.github.yulichang.base.MPJBaseServiceImpl; |
| | | import com.github.yulichang.toolkit.JoinWrappers; |
| | | import com.github.yulichang.wrapper.MPJLambdaWrapper; |
| | | import com.google.common.collect.Lists; |
| | | import com.mes.base.entity.vo.BigStorageVO; |
| | | import com.mes.bigstorage.entity.BigStorageCage; |
| | | import com.mes.bigstorage.entity.BigStorageCageDetails; |
| | |
| | | .orderByAsc(BigStorageCageDetails::getTemperingFeedSequence) |
| | | ); |
| | | if (CollectionUtils.isNotEmpty(temperingGlassInfos)) { |
| | | temperingGlassInfoService.saveBatch(temperingGlassInfos); |
| | | //避免大量数据插入导致sqlserver数据库异常,分批次每调存储依次 |
| | | List<List<TemperingGlassInfo>> temperingGlassInfoLists = Lists.partition(temperingGlassInfos, 50); |
| | | for (List<TemperingGlassInfo> item : temperingGlassInfoLists) { |
| | | temperingGlassInfoService.saveBatch(item); |
| | | } |
| | | return true; |
| | | } |
| | | } |