无关风月
2024-08-01 8876b1b9cd27fad076ea9e5f3e04197b84ba02bd
ruoyi-modules/ruoyi-management/src/main/java/com/ruoyi/management/service/impl/InventoriesSuppliesServiceImpl.java
@@ -62,10 +62,10 @@
    @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);
@@ -76,7 +76,9 @@
        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 {
@@ -88,7 +90,7 @@
            wrapper1.gt(InventoriesSupplies::getPdTime, inventoriesSuppliesQuery.getStartpdTime());
        }
        if (inventoriesSuppliesQuery.getEndpdTime()!=null){
        if (inventoriesSuppliesQuery.getEndpdTime()!=null&&inventoriesSuppliesQuery.getPdrName()!=""){
            wrapper1.le(InventoriesSupplies::getPdTime, inventoriesSuppliesQuery.getEndpdTime());
       }
@@ -112,6 +114,7 @@
        InventoriesSupplies inventoriesSupplies=new InventoriesSupplies();
        inventoriesSupplies.setMaterialsId(inventoriesSuppDTO.getMaterialsId());
        inventoriesSupplies.setPdTime(new Date());
        inventoriesSupplies.setCreateTime(new Date());
        inventoriesSupplies.setPdrId(inventoriesSuppDTO.getPdrId());
        R<SysUser> sysUser = sysUserClient.getSysUser(inventoriesSuppDTO.getPdrId());
        inventoriesSupplies.setPdrName(sysUser.getData().getNickName());
@@ -119,9 +122,9 @@
    }
    @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);