fix(入库计划): 修复入库计划明细实例 数据问题
This commit is contained in:
parent
43201ab3c8
commit
1492deeeda
@ -39,7 +39,17 @@ public class WmsInPlanServiceImpl implements IWmsInPlanService {
|
||||
*/
|
||||
@Override
|
||||
public WmsInPlan selectWmsInPlanByPlanId(String planId) {
|
||||
return wmsInPlanMapper.selectWmsInPlanByPlanId(planId);
|
||||
WmsInPlan wmsInPlan = wmsInPlanMapper.selectWmsInPlanByPlanId(planId);
|
||||
List<WmsInPlanDetails> wmsInPlanDetailsList = new ArrayList<>();
|
||||
wmsInPlan.getWmsInPlanDetailsList().forEach(detail -> {
|
||||
WmsInPlanDetailEntity wmsInPlanDetailEntityQuery = new WmsInPlanDetailEntity();
|
||||
wmsInPlanDetailEntityQuery.setPlanDetailsId(detail.getDetailsId());
|
||||
List<WmsInPlanDetailEntity> wmsInPlanDetailEntityList = wmsInPlanDetailEntityMapper.selectWmsInPlanDetailEntityList(wmsInPlanDetailEntityQuery);
|
||||
detail.setWmsInPlanDetailEntityList(wmsInPlanDetailEntityList);
|
||||
wmsInPlanDetailsList.add(detail);
|
||||
});
|
||||
wmsInPlan.setWmsInPlanDetailsList(wmsInPlanDetailsList);
|
||||
return wmsInPlan;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -123,15 +133,14 @@ public class WmsInPlanServiceImpl implements IWmsInPlanService {
|
||||
List<WmsInPlanDetails> wmsInPlanDetailsList = wmsInPlan.getWmsInPlanDetailsList();
|
||||
Long planId = wmsInPlan.getPlanId();
|
||||
if (StringUtils.isNotNull(wmsInPlanDetailsList)) {
|
||||
List<WmsInPlanDetails> list = new ArrayList<WmsInPlanDetails>();
|
||||
List<WmsInPlanDetails> list = new ArrayList<>();
|
||||
for (WmsInPlanDetails wmsInPlanDetails : wmsInPlanDetailsList) {
|
||||
wmsInPlanDetails.setPlanId(planId);
|
||||
list.add(wmsInPlanDetails);
|
||||
|
||||
}
|
||||
if (!list.isEmpty()) {
|
||||
wmsInPlanMapper.batchWmsInPlanDetails(list);
|
||||
WmsInPlan wmsInPlan1 = wmsInPlanMapper.selectWmsInPlanByPlanId(planId.toString());
|
||||
WmsInPlan wmsInPlan1 = selectWmsInPlanByPlanId(planId.toString());
|
||||
List<WmsInPlanDetails> wmsInPlanDetailsList1 = wmsInPlan1.getWmsInPlanDetailsList();
|
||||
for (int i = 0; i < list.size(); i++) {
|
||||
List<WmsInPlanDetailEntity> wmsInPlanDetailEntityList = list.get(i).getWmsInPlanDetailEntityList();
|
||||
|
Loading…
Reference in New Issue
Block a user