| | |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.core.enums.ClientTypeEnum; |
| | | import com.ruoyi.common.core.utils.page.PageDTO; |
| | | import com.ruoyi.management.domain.InventoriesSupplies; |
| | | import com.ruoyi.management.domain.*; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.management.domain.SlGoodsShelf; |
| | | import com.ruoyi.management.domain.SlStoreManagement; |
| | | import com.ruoyi.management.domain.SlVolumeProductionRk; |
| | | import com.ruoyi.management.domain.dto.InventoriesSuppDTO; |
| | | import com.ruoyi.management.domain.dto.InventoriesSuppliesQuery; |
| | | import com.ruoyi.management.domain.dto.ScanCodesDTO; |
| | |
| | | import com.ruoyi.management.mapper.SlStoreManagementMapper; |
| | | import com.ruoyi.management.mapper.SlVolumeProductionRkMapper; |
| | | import com.ruoyi.management.service.InventoriesSuppliesService; |
| | | import com.ruoyi.management.service.SlGoodsMaterialsService; |
| | | import com.ruoyi.management.service.SlGoodsShelfService; |
| | | import com.ruoyi.management.service.SlVolumeProductionRkService; |
| | | import com.ruoyi.system.api.constants.NotificationTypeConstant; |
| | | 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.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | |
| | | |
| | | @Resource |
| | | private SlVolumeProductionRkMapper slVolumeProductionRkMapper; |
| | | |
| | | @Autowired |
| | | private SlGoodsMaterialsService slGoodsMaterialsService; |
| | | @Autowired |
| | | private SlGoodsShelfService slGoodsShelfService; |
| | | @Autowired |
| | | private InventoriesSuppliesMapper inventoriesSuppliesMapper; |
| | | private static final ObjectMapper objectMapper = new ObjectMapper(); |
| | | |
| | | @Override |
| | |
| | | public void scanCodes(String rkNumber) { |
| | | LambdaQueryWrapper< SlVolumeProductionRk> wrapper1= Wrappers.lambdaQuery(); |
| | | wrapper1.eq(SlVolumeProductionRk::getRkNumber,rkNumber); |
| | | wrapper1.eq(SlVolumeProductionRk::getDelFlag,0); |
| | | 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); |
| | | } |
| | | // if (page2.getSmerwmNum()<page2.getErwmNum()){ |
| | | // Integer i=page2.getSmerwmNum()+1; |
| | | // page2.setSmerwmNum(i); |
| | | // slVolumeProductionRkMapper.updateById(page2); |
| | | // } |
| | | SlGoodsMaterials byId = slGoodsMaterialsService.getById(page2.getMaterialsId()); |
| | | |
| | | page2.setGoodsMaterialsName(byId.getGoodsMaterialsName()); |
| | | page2.setIsConsume(byId.getIsConsume()); |
| | | page2.setManagementNumber(page2.getStoreManagementNumber()); |
| | | page2.setShelfName(slGoodsShelfService.getById(page2.getShelfId()).getGoodsShelfName()); |
| | | SlVolumeProductionRkVO slVolumeProductionRkVO = new SlVolumeProductionRkVO(); |
| | | BeanUtils.copyProperties(page2,slVolumeProductionRkVO); |
| | | slVolumeProductionRkVO.setId(page2.getId().toString()); |
| | | // slVolumeProductionRkVO.setVolumeProductionRkglId(page2.getVolumeProductionRkglId().toString()); |
| | | slVolumeProductionRkVO.setMaterialsId(page2.getMaterialsId().toString()); |
| | | slVolumeProductionRkVO.setManagementId(page2.getManagementId().toString()); |
| | | slVolumeProductionRkVO.setShelfId(page2.getShelfId().toString()); |
| | | |
| | | Map<String, Object> map = new ConcurrentHashMap<>(); |
| | | map.put("notification_type", NotificationTypeConstant.SCANCODES); |
| | | map.put("SlVolumeProductionRk",page2); |
| | | map.put("SlVolumeProductionRk",slVolumeProductionRkVO); |
| | | String msg = null; |
| | | try { |
| | | msg = objectMapper.writeValueAsString(map); |
| | |
| | | } |
| | | |
| | | |
| | | public InventoriesSupplies getById1(Long suppliesId) { |
| | | return inventoriesSuppliesMapper.getById1(suppliesId); |
| | | } |
| | | } |