cuijian
2023-08-19 bdd0875d4b13a3f1ef472f64d4b6a95e0ef64b22
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
package org.jeecg.modules.spare.service.impl;
 
import org.jeecg.modules.spare.entity.SparePartOutbound;
import org.jeecg.modules.spare.entity.SparePartPurchaseStorage;
import org.jeecg.modules.spare.mapper.SparePartPurchaseStorageMapper;
import org.jeecg.modules.spare.service.ISparePartPurchaseStorageService;
import org.springframework.stereotype.Service;
 
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 
import java.util.List;
 
/**
 * @Description: mom_eam_spare_part_purchase_storage
 * @Author: jeecg-boot
 * @Date: 2023-06-27
 * @Version: V1.0
 */
@Service
public class SparePartPurchaseStorageServiceImpl extends ServiceImpl<SparePartPurchaseStorageMapper, SparePartPurchaseStorage> implements ISparePartPurchaseStorageService {
 
    /**
     * 获取仓库管理下  仓库对应的库位信息
     */
    @Override
    public List<String> getWarehouselocationManage(String warehouseId) {
        return this.baseMapper.getWarehouselocationManage(warehouseId);
    }
 
 
    @Override
    public void approval(SparePartPurchaseStorage sparePartPurchaseStorage) {
        String id = sparePartPurchaseStorage.getId();
        SparePartPurchaseStorage sparePart = super.getById(id);
        /*前端页面已经处理,只在待审批下方展示撤回按钮*/
        sparePart.setStatus("2");
        sparePart.setApprovalOpinions(sparePartPurchaseStorage.getApprovalOpinions());
        super.updateById(sparePart);
    }
 
    @Override
    public void reject(SparePartPurchaseStorage sparePartPurchaseStorage) {
        String id = sparePartPurchaseStorage.getId();
        SparePartPurchaseStorage sparePart = super.getById(id);
        /*前端页面已经处理,只在待审批下方展示撤回按钮*/
        sparePart.setStatus("3");
        sparePart.setApprovalOpinions(sparePartPurchaseStorage.getApprovalOpinions());
        super.updateById(sparePart);
    }
 
    @Override
    public void revocation(String id) {
        SparePartPurchaseStorage sparePartPurchaseStorage = super.getById(id);
        sparePartPurchaseStorage.setStatus("0");
        super.updateById(sparePartPurchaseStorage);
    }
}