| | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.by4cloud.platformx.common.core.util.R; |
| | | import com.by4cloud.platformx.common.security.util.SecurityUtils; |
| | | import com.by4cloud.platformx.device.constant.CommonStatusContant; |
| | | import com.by4cloud.platformx.device.constant.MaxSizeContant; |
| | | import com.by4cloud.platformx.device.dto.DevicePurchasePlanQueryDTO; |
| | | import com.by4cloud.platformx.device.entity.DevicePurchasePlan; |
| | |
| | | devicePurchasePlan.setReleaseCompId(SecurityUtils.getUser().getCompId()); |
| | | devicePurchasePlan.setReleaseId(SecurityUtils.getUser().getId()); |
| | | devicePurchasePlan.setReleaseTime(new Date()); |
| | | devicePurchasePlan.setStatus(0); |
| | | devicePurchasePlan.setStatus(CommonStatusContant.DEVICE_PURCHASE_STATUS_PANDING_APPROVAL); |
| | | baseMapper.insert(devicePurchasePlan); |
| | | if (devicePurchasePlan.getPlanItemList() != null&&devicePurchasePlan.getPlanItemList().size()>0) { |
| | | devicePurchasePlan.getPlanItemList().forEach(item->{ |
| | |
| | | @Override |
| | | public boolean approved(Long id) { |
| | | DevicePurchasePlan plan = baseMapper.selectById(id); |
| | | plan.setStatus(1); |
| | | plan.setStatus(CommonStatusContant.DEVICE_PURCHASE_STATUS_APPROVED); |
| | | baseMapper.updateById(plan); |
| | | return true; |
| | | } |
| | |
| | | } |
| | | return true; |
| | | } |
| | | |
| | | @Override |
| | | public R removeItemById(Long id) { |
| | | itemMapper.deleteById(id); |
| | | return R.ok(); |
| | | } |
| | | } |