| | |
| | | import com.ruoyi.system.api.domain.SysUser; |
| | | import com.ruoyi.system.api.domain.WebsocketMessageDTO; |
| | | import com.ruoyi.system.api.feignClient.SysUserClient; |
| | | import io.swagger.models.auth.In; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | |
| | | @Override |
| | | public PageDTO<InventoriesSuppliesVO> getInventoriesSuppliesList(InventoriesSuppliesQuery inventoriesSuppliesQuery) { |
| | | LambdaQueryWrapper<SlStoreManagement> wrapper= Wrappers.lambdaQuery(); |
| | | if (inventoriesSuppliesQuery.getStoreManagementName()!=null){ |
| | | if (inventoriesSuppliesQuery.getStoreManagementName()!=null&&inventoriesSuppliesQuery.getStoreManagementName()!=""){ |
| | | wrapper.eq(SlStoreManagement::getStoreManagementName,inventoriesSuppliesQuery.getStoreManagementName()); |
| | | } |
| | | if (inventoriesSuppliesQuery.getStoreManagementNo()!=null){ |
| | | if (inventoriesSuppliesQuery.getStoreManagementNo()!=null&&inventoriesSuppliesQuery.getStoreManagementNo()!=""){ |
| | | wrapper.eq(SlStoreManagement::getStoreManagementNo,inventoriesSuppliesQuery.getStoreManagementNo()); |
| | | } |
| | | List<SlStoreManagement> slStoreManagements = slStoreManagementMapper.selectList(wrapper); |
| | |
| | | |
| | | Page<InventoriesSupplies> page = new Page<>(inventoriesSuppliesQuery.getPageCurr(), inventoriesSuppliesQuery.getPageSize()); |
| | | LambdaQueryWrapper< InventoriesSupplies> wrapper1= Wrappers.lambdaQuery(); |
| | | wrapper1.like(InventoriesSupplies::getPdrName,inventoriesSuppliesQuery.getPdrName()); |
| | | if (inventoriesSuppliesQuery.getPdrName()!=null&&inventoriesSuppliesQuery.getPdrName()!=""){ |
| | | wrapper1.like(InventoriesSupplies::getPdrName,inventoriesSuppliesQuery.getPdrName()); |
| | | } |
| | | if (slStoreManagementIdList.size()>0){ |
| | | wrapper1.in(InventoriesSupplies::getMaterialsId,slStoreManagementIdList); |
| | | }else { |
| | |
| | | |
| | | wrapper1.gt(InventoriesSupplies::getPdTime, inventoriesSuppliesQuery.getStartpdTime()); |
| | | } |
| | | if (inventoriesSuppliesQuery.getEndpdTime()!=null){ |
| | | if (inventoriesSuppliesQuery.getEndpdTime()!=null&&inventoriesSuppliesQuery.getPdrName()!=""){ |
| | | wrapper1.le(InventoriesSupplies::getPdTime, inventoriesSuppliesQuery.getEndpdTime()); |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | @Override |
| | | public void scanCodes(ScanCodesDTO scanCodesDTO) { |
| | | public void scanCodes(String rkNumber) { |
| | | LambdaQueryWrapper< SlVolumeProductionRk> wrapper1= Wrappers.lambdaQuery(); |
| | | wrapper1.like(SlVolumeProductionRk::getRkNumber,scanCodesDTO.getRkNumber()); |
| | | wrapper1.like(SlVolumeProductionRk::getRkNumber,rkNumber); |
| | | wrapper1.eq( SlVolumeProductionRk::getDelFlag,0); |
| | | wrapper1.orderByDesc(SlVolumeProductionRk::getCreateTime); |
| | | SlVolumeProductionRk page2 = slVolumeProductionRkMapper.selectOne(wrapper1); |
| | | if (page2.getSmerwmNum()>0){ |
| | | Integer i=page2.getSmerwmNum()-1; |
| | | page2.setSmerwmNum(i); |
| | | slVolumeProductionRkMapper.updateById(page2); |
| | | } |
| | | Map<String, Object> map = new ConcurrentHashMap<>(); |
| | | map.put("notification_type", NotificationTypeConstant.SCANCODES); |
| | | map.put("SlVolumeProductionRk",page2); |