| | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.core.utils.page.BeanUtils; |
| | | import com.ruoyi.common.core.utils.page.PageDTO; |
| | | import com.ruoyi.management.domain.ManagementGoodsMaterials; |
| | | import com.ruoyi.management.domain.SlGoodsMaterials; |
| | |
| | | import com.ruoyi.management.service.SlGoodsMaterialsService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.management.service.SlVolumeProductionRkService; |
| | | import io.micrometer.core.instrument.binder.BaseUnits; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | |
| | | |
| | | return storeManagementGoodSmaterialsVOPageDTO; |
| | | } |
| | | |
| | | @Override |
| | | public StoreManagementGoodSmaterialsVO getSmaterialsOne(StoreManagementGoodSmaterialsQuery storeManagementGoodSmaterialsQuery) { |
| | | LambdaQueryWrapper< ManagementGoodsMaterials> wrapper= Wrappers.lambdaQuery(); |
| | | |
| | | |
| | | wrapper.eq(ManagementGoodsMaterials::getGoodsMaterialsId,storeManagementGoodSmaterialsQuery.getGoodsMaterialsId()); |
| | | |
| | | wrapper.eq( ManagementGoodsMaterials::getDelFlag,0); |
| | | wrapper.orderByDesc(ManagementGoodsMaterials::getCreateTime); |
| | | ManagementGoodsMaterials page1 = managementGoodsMaterialsService.getOne(wrapper); |
| | | StoreManagementGoodSmaterialsVO storeManagementGoodSmaterialsVO = BeanUtils.copyBean(page1, StoreManagementGoodSmaterialsVO.class); |
| | | Double storeManagementGoodSmaterialsOne = slVolumeProductionRkMapper.getStoreManagementGoodSmaterialsOne(storeManagementGoodSmaterialsVO.getGoodsMaterialsId()); |
| | | SlGoodsMaterials byId = this.getById(storeManagementGoodSmaterialsVO.getGoodsMaterialsId()); |
| | | storeManagementGoodSmaterialsVO.setGoodsMaterialsName(byId.getGoodsMaterialsName()); |
| | | storeManagementGoodSmaterialsVO.setIsConsume(byId.getIsConsume()); |
| | | storeManagementGoodSmaterialsVO.setAveragePrice(storeManagementGoodSmaterialsOne); |
| | | return storeManagementGoodSmaterialsVO; |
| | | } |
| | | |
| | | |
| | | } |