Compare commits

...

2 Commits

4 changed files with 27 additions and 18 deletions

View File

@ -157,6 +157,12 @@
<version>2.2.9</version>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<scope>annotationProcessor</scope>
</dependency>
</dependencies>
</project>

View File

@ -3,12 +3,14 @@ package com.ktg.mes.md.mapper;
import com.ktg.common.annotation.DataSource;
import com.ktg.common.enums.DataSourceType;
import com.ktg.mes.md.domain.AP0AE;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
/**
* @author Kelvin
*/
@Mapper
public interface AP0AEMapper {
@DataSource(DataSourceType.SQLSERVER)
List<AP0AE> selectOutNewData();

View File

@ -8,8 +8,16 @@ import java.util.List;
* @author luo26
*/
public interface IAP0AEService {
public List<AP0AE> selectOutNewData();
/**
* 获取借用记录
* @return 借用记录列表
*/
public List<AP0AE> selectBorrowedNewData();
public List<AP0AE> selectInNewData();
/**
* 获取归还记录
* @return 归还记录列表
*/
public List<AP0AE> selectReturnedNewData();
}

View File

@ -15,6 +15,7 @@ import com.ktg.mes.wm.domain.WmsInTask;
import com.ktg.mes.wm.service.IWmStorageAreaService;
import com.ktg.mes.wm.service.IWmsInPlanService;
import com.ktg.mes.wm.service.IWmsInTaskService;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -29,29 +30,21 @@ import java.util.List;
* @author Kelvin
*/
@Service
@RequiredArgsConstructor
public class AP0AEServiceImpl implements IAP0AEService {
@Autowired
private AP0AEMapper aP0AEMapper;
@Autowired
private IWmsInPlanService wmsInPlanService;
@Autowired
private IWmsInTaskService wmsInTaskService;
@Autowired
private IWmStorageAreaService wmStorageAreaService;
@Autowired
private IMdItemService mdItemService;
private final AP0AEMapper aP0AEMapper;
private final IWmsInPlanService wmsInPlanService;
private final IWmsInTaskService wmsInTaskService;
private final IWmStorageAreaService wmStorageAreaService;
private final IMdItemService mdItemService;
@Override
public List<AP0AE> selectOutNewData() {
public List<AP0AE> selectBorrowedNewData() {
return this.aP0AEMapper.selectOutNewData();
}
@Override
public List<AP0AE> selectInNewData() {
public List<AP0AE> selectReturnedNewData() {
List<AP0AE> ap0aeList = aP0AEMapper.selectInNewData();
ap0aeList.stream().filter(ap0ae -> ap0ae.getAE003() != null).forEach(ap0ae -> {
WmsInPlan wmsInPlan = new WmsInPlan();