Showing
1 changed file
with
10 additions
and
6 deletions
| @@ -18,6 +18,8 @@ import com.lframework.starter.web.inner.entity.SysDept; | @@ -18,6 +18,8 @@ import com.lframework.starter.web.inner.entity.SysDept; | ||
| 18 | import com.lframework.starter.web.inner.service.system.SysDeptService; | 18 | import com.lframework.starter.web.inner.service.system.SysDeptService; |
| 19 | import com.lframework.starter.web.core.components.resp.PageResult; | 19 | import com.lframework.starter.web.core.components.resp.PageResult; |
| 20 | import com.lframework.starter.web.core.utils.PageResultUtil; | 20 | import com.lframework.starter.web.core.utils.PageResultUtil; |
| 21 | +import com.lframework.xingyun.basedata.entity.Workshop; | ||
| 22 | +import com.lframework.xingyun.basedata.service.workshop.WorkshopService; | ||
| 21 | import com.lframework.xingyun.sc.bo.procurement.GetProcurementPlanBo; | 23 | import com.lframework.xingyun.sc.bo.procurement.GetProcurementPlanBo; |
| 22 | import com.lframework.xingyun.sc.procurement.entity.ProcurementPlan; | 24 | import com.lframework.xingyun.sc.procurement.entity.ProcurementPlan; |
| 23 | import com.lframework.xingyun.sc.procurement.entity.ProcurementPlanLine; | 25 | import com.lframework.xingyun.sc.procurement.entity.ProcurementPlanLine; |
| @@ -45,14 +47,16 @@ import org.springframework.beans.factory.annotation.Autowired; | @@ -45,14 +47,16 @@ import org.springframework.beans.factory.annotation.Autowired; | ||
| 45 | import org.springframework.stereotype.Service; | 47 | import org.springframework.stereotype.Service; |
| 46 | import org.springframework.transaction.annotation.Transactional; | 48 | import org.springframework.transaction.annotation.Transactional; |
| 47 | 49 | ||
| 50 | +import javax.annotation.Resource; | ||
| 51 | + | ||
| 48 | @Service | 52 | @Service |
| 49 | public class ProcurementPlanServiceImpl extends BaseMpServiceImpl<ProcurementPlanMapper, ProcurementPlan> | 53 | public class ProcurementPlanServiceImpl extends BaseMpServiceImpl<ProcurementPlanMapper, ProcurementPlan> |
| 50 | implements ProcurementPlanService { | 54 | implements ProcurementPlanService { |
| 51 | 55 | ||
| 52 | @Autowired | 56 | @Autowired |
| 53 | private ProcurementPlanLineService procurementPlanLineService; | 57 | private ProcurementPlanLineService procurementPlanLineService; |
| 54 | - @Autowired | ||
| 55 | - private SysDeptService sysDeptService; | 58 | + @Resource |
| 59 | + private WorkshopService workshopService; | ||
| 56 | 60 | ||
| 57 | @Override | 61 | @Override |
| 58 | public PageResult<ProcurementPlan> query(Integer pageIndex, Integer pageSize, | 62 | public PageResult<ProcurementPlan> query(Integer pageIndex, Integer pageSize, |
| @@ -268,11 +272,11 @@ public class ProcurementPlanServiceImpl extends BaseMpServiceImpl<ProcurementPla | @@ -268,11 +272,11 @@ public class ProcurementPlanServiceImpl extends BaseMpServiceImpl<ProcurementPla | ||
| 268 | .distinct() | 272 | .distinct() |
| 269 | .collect(Collectors.toList()); | 273 | .collect(Collectors.toList()); |
| 270 | Map<String, String> deptId2CodeMap = new HashMap<>(); | 274 | Map<String, String> deptId2CodeMap = new HashMap<>(); |
| 271 | - List<SysDept> deptList = sysDeptService.listByIds(workshopIds); | ||
| 272 | - if (CollectionUtil.isNotEmpty(deptList)) { | ||
| 273 | - deptId2CodeMap = deptList.stream() | 275 | + List<Workshop> workshopList = workshopService.listByIds(workshopIds); |
| 276 | + if (CollectionUtil.isNotEmpty(workshopList)) { | ||
| 277 | + deptId2CodeMap = workshopList.stream() | ||
| 274 | .filter(d -> StringUtil.isNotBlank(d.getCode())) | 278 | .filter(d -> StringUtil.isNotBlank(d.getCode())) |
| 275 | - .collect(Collectors.toMap(SysDept::getId, SysDept::getCode, (v1, v2) -> v1)); | 279 | + .collect(Collectors.toMap(Workshop::getId, Workshop::getCode, (v1, v2) -> v1)); |
| 276 | } | 280 | } |
| 277 | 281 | ||
| 278 | // 分厂顺序:yfc(01) / efc(02) / sfc(03) / ztfc(04) | 282 | // 分厂顺序:yfc(01) / efc(02) / sfc(03) / ztfc(04) |