| | |
| | | import com.ruoyi.approve.service.IApproveNodeService; |
| | | import com.ruoyi.common.enums.FileNameType; |
| | | import com.ruoyi.common.enums.StockInQualifiedRecordTypeEnum; |
| | | import com.ruoyi.common.enums.StockOutQualifiedRecordTypeEnum; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.common.utils.bean.BeanUtils; |
| | | import com.ruoyi.device.mapper.DeviceRepairMapper; |
| | | import com.ruoyi.device.pojo.DeviceRepair; |
| | | import com.ruoyi.other.service.impl.TempFileServiceImpl; |
| | |
| | | import com.ruoyi.purchase.mapper.PurchaseLedgerMapper; |
| | | import com.ruoyi.purchase.pojo.PurchaseLedger; |
| | | import com.ruoyi.purchase.service.impl.PurchaseLedgerServiceImpl; |
| | | import com.ruoyi.sales.mapper.*; |
| | | import com.ruoyi.sales.dto.ShippingInfoDto; |
| | | import com.ruoyi.sales.mapper.CommonFileMapper; |
| | | import com.ruoyi.sales.mapper.SalesLedgerProductMapper; |
| | | import com.ruoyi.sales.mapper.SalesQuotationMapper; |
| | | import com.ruoyi.sales.mapper.ShippingInfoMapper; |
| | | import com.ruoyi.sales.pojo.CommonFile; |
| | | import com.ruoyi.sales.pojo.SalesLedgerProduct; |
| | | import com.ruoyi.sales.pojo.SalesQuotation; |
| | | import com.ruoyi.sales.pojo.ShippingInfo; |
| | | import com.ruoyi.sales.service.impl.CommonFileServiceImpl; |
| | | import com.ruoyi.sales.service.impl.ShippingInfoServiceImpl; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | |
| | | |
| | | @Autowired |
| | | private ShippingInfoMapper shippingInfoMapper; |
| | | |
| | | @Autowired |
| | | private ShippingInfoServiceImpl shippingInfoService; |
| | | |
| | | @Autowired |
| | | private CommonFileServiceImpl commonFileService; |
| | |
| | | } |
| | | approveProcessMapper.updateById(approveProcess); |
| | | |
| | | DeviceRepair deviceRepair = deviceRepairMapper.selectById(approveProcess.getDeviceRepairId()); |
| | | if(ObjectUtils.isNotNull(deviceRepair)) { |
| | | if(approveProcess.getApproveStatus().equals(2)){ |
| | | // 同意 |
| | | deviceRepair.setStatus(1); |
| | | }else if(approveProcess.getApproveStatus().equals(3)){ |
| | | // 拒绝 |
| | | deviceRepair.setStatus(2); |
| | | if (ObjectUtils.isNotNull(approveProcess.getDeviceRepairId())){ |
| | | DeviceRepair deviceRepair = deviceRepairMapper.selectById(approveProcess.getDeviceRepairId()); |
| | | if(ObjectUtils.isNotNull(deviceRepair)) { |
| | | if(approveProcess.getApproveStatus().equals(2)){ |
| | | // 同意 |
| | | deviceRepair.setStatus(1); |
| | | }else if(approveProcess.getApproveStatus().equals(3)){ |
| | | // 拒绝 |
| | | deviceRepair.setStatus(2); |
| | | } |
| | | deviceRepairMapper.updateById(deviceRepair); |
| | | } |
| | | deviceRepairMapper.updateById(deviceRepair); |
| | | } |
| | | |
| | | //采购审核 |
| | |
| | | if(shippingInfo != null){ |
| | | if(status.equals(2)){ |
| | | shippingInfo.setStatus("审核通过"); |
| | | ShippingInfoDto shippingInfoDto = new ShippingInfoDto(); |
| | | BeanUtils.copyProperties(shippingInfo, shippingInfoDto); |
| | | shippingInfoService.deductStock(shippingInfoDto); |
| | | shippingInfo.setStatus("已发货"); |
| | | }else if(status.equals(3)){ |
| | | shippingInfo.setStatus("审核拒绝"); |
| | | }else if(status.equals(1)){ |