无关风月
2024-08-27 b5ef65d0103a71dc7af2b9be6d2ac43aca5bb726
ruoyi-modules/ruoyi-management/src/main/java/com/ruoyi/management/service/impl/SlVolumeProductionCkServiceImpl.java
@@ -18,6 +18,7 @@
import com.ruoyi.management.service.ManagementGoodsMaterialsService;
import com.ruoyi.management.service.SlVolumeProductionCkService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.management.service.SlVolumeProductionCkglService;
import com.ruoyi.management.service.SlVolumeProductionRkService;
import com.ruoyi.system.api.domain.SysUser;
import org.springframework.beans.factory.annotation.Autowired;
@@ -43,6 +44,8 @@
    @Resource
    private SlVolumeProductionRkMapper  slVolumeProductionRkMapper;
    @Autowired
    private SlVolumeProductionCkglService ckglService;
    @Resource
    private SlGoodsMaterialsMapper slGoodsMaterialsMapper;
@@ -77,9 +80,24 @@
               byId.setCkNum(c.getCkNum());
               byId.setGuihNum(c.getGuihNum());
               this.updateById(byId);
           }
    }
    @Override
    public void updSlVolumeProductionCk1(List<AddSlVolumeProductionCkDTO> slVolumeProductionCkDTO) {
           for (AddSlVolumeProductionCkDTO c:slVolumeProductionCkDTO){
               SlVolumeProductionCk byId = this.getById(c.getCkgl_id());
               byId.setCkNum(c.getCkNum());
               byId.setGuihNum(c.getGuihNum());
               byId.setIsGh(2);
               this.updateById(byId);
//               Long ckglId = byId.getCkglId();
//               SlVolumeProductionCkgl byId1 = ckglService.getById(ckglId);
//               byId1.setAuditStatus(1);
//               byId1.setPresentState(1);
//               ckglService.updateById(byId1);
           }
    }
    @Override
@@ -110,8 +128,8 @@
        PageDTO<ManagementimgVolumeProductionCkVO> SlGoodsShelfDTO = PageDTO.of(page2, ManagementimgVolumeProductionCkVO.class);
        List<ManagementimgVolumeProductionCkVO> list2 = SlGoodsShelfDTO.getList();
        for(ManagementimgVolumeProductionCkVO list:list2) {{
        for(ManagementimgVolumeProductionCkVO list:list2) {
            {
            SlVolumeProductionRk slVolumeProductionRk = slVolumeProductionRkMapper.selectById(list.getRkId());
            list.setStoreManagementNumber(slVolumeProductionRk.getStoreManagementNumber());
            list.setRkNumber(slVolumeProductionRk.getRkNumber());
@@ -159,7 +177,6 @@
    @Override
    public PageDTO<InventoriesSuppliesInfoVO> getMaterialByManagementIdList(GetMaterialsByManagementIdQuery query) {
        List<InventoriesSuppliesInfoVO> res = new ArrayList<>();
        Page<SlVolumeProductionRk> page = new Page<>(query.getPageCurr(), query.getPageSize());
        QueryWrapper<ManagementGoodsMaterials> wrapper1 = new QueryWrapper<>();
        wrapper1.eq("del_flag","0");
@@ -174,10 +191,13 @@
            wrapper2.eq("is_consume",query.getIsConsume());
        }
        wrapper2.eq("del_flag","0");
        if (collect.isEmpty())collect.add(-1L);
        wrapper2.in("id",collect);
        List<Long> collect1 = slGoodsMaterialsMapper.selectList(wrapper2).stream().map(SlGoodsMaterials::getId).collect(Collectors.toList());
        QueryWrapper<SlVolumeProductionRk> wrapper = new QueryWrapper<>();
        if (collect1.isEmpty())collect1.add(-1L);
        wrapper.in("materials_id",collect1);
        wrapper.eq("management_id",query.getManagementId());
        wrapper.eq("del_flag","0");
        Page<SlVolumeProductionRk> page2 = slVolumeProductionRkService.page(page, wrapper);