zss
2023-08-21 aacbd7e7bfee3604d22388801b45955a26f746fa
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
58
59
60
61
62
63
64
65
66
67
68
package com.yuanchu.limslaboratory.service.impl;
 
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.yuanchu.limslaboratory.mapper.*;
import com.yuanchu.limslaboratory.pojo.InspectionProduct;
import com.yuanchu.limslaboratory.pojo.Instrument;
import com.yuanchu.limslaboratory.pojo.User;
import com.yuanchu.limslaboratory.service.InstrumentService;
import com.yuanchu.limslaboratory.service.PlanService;
import org.springframework.stereotype.Service;
 
import javax.annotation.Resource;
import java.util.List;
import java.util.Map;
 
/**
 * <p>
 * 服务实现类
 * </p>
 *
 * @author 江苏鵷雏网络科技有限公司
 * @since 2023-08-09
 */
@Service
public class PlanServiceImpl implements PlanService {
 
    @Resource
    private PlanMapper planMapper;
 
    @Resource
    InspectionProductMapper inspectionProductMapper;
 
    @Resource
    UserMapper userMapper;
 
    @Resource
    InstrumentMapper instrumentMapper;
 
    //查询检验计划
    @Override
    public  List<Map<String,Object>> selectAllPlan(String code , String beginTime, String endTime,Integer status) {
        return planMapper.selectAllPlan(code,beginTime,endTime,status);
    }
 
    //分配-->选择检验人
    @Override
    public List<Map<String, Object>> choosecheck() {
        return userMapper.selectUser();
    }
 
    //分配-->选择设备
    @Override
    public List<Map<String, Object>> chooseinstum() {
        return null;
    }
 
    //分配人员与设备
    @Override
    public String distribution(Integer id, Integer userId, Integer instrumentId) {
        InspectionProduct inspectionProduct = new InspectionProduct();
        inspectionProduct.setId(id);
        inspectionProduct.setUserId(userId);
        inspectionProduct.setInstrumentId(instrumentId);
        inspectionProductMapper.updateById(inspectionProduct);
        return "分配完成!";
    }
}