提交 | 用户 | 时间
|
7fd198
|
1 |
package com.iailab.module.model.mcs.pre.service.impl; |
潘 |
2 |
|
|
3 |
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
5c6007
|
4 |
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
7fd198
|
5 |
import com.iailab.module.model.mcs.pre.dao.MmItemOutputDao; |
5c6007
|
6 |
import com.iailab.module.model.mcs.pre.dto.MmItemOutputDTO; |
7fd198
|
7 |
import com.iailab.module.model.mcs.pre.entity.MmItemOutputEntity; |
潘 |
8 |
import com.iailab.module.model.mcs.pre.service.MmItemOutputService; |
|
9 |
import com.iailab.module.model.mdk.vo.MmItemOutputVO; |
5c6007
|
10 |
import org.springframework.beans.factory.annotation.Autowired; |
7fd198
|
11 |
import org.springframework.stereotype.Service; |
潘 |
12 |
import org.springframework.util.CollectionUtils; |
|
13 |
|
|
14 |
import java.util.List; |
|
15 |
import java.util.Map; |
|
16 |
import java.util.UUID; |
|
17 |
|
|
18 |
/** |
|
19 |
* @author PanZhibao |
|
20 |
* @date 2021年04月27日 9:22 |
|
21 |
*/ |
5c6007
|
22 |
@Service |
L |
23 |
public class MmItemOutputServiceImpl extends ServiceImpl<MmItemOutputDao, MmItemOutputEntity> implements MmItemOutputService { |
7fd198
|
24 |
|
5c6007
|
25 |
@Autowired |
L |
26 |
private MmItemOutputDao mmItemOutputDao; |
|
27 |
|
7fd198
|
28 |
@Override |
潘 |
29 |
public void saveMmItemOutput(MmItemOutputEntity mmItemOutput) { |
|
30 |
mmItemOutput.setId(UUID.randomUUID().toString()); |
5c6007
|
31 |
mmItemOutputDao.insert(mmItemOutput); |
7fd198
|
32 |
} |
潘 |
33 |
|
|
34 |
@Override |
|
35 |
public void update(MmItemOutputEntity mmItemOutput) { |
5c6007
|
36 |
mmItemOutputDao.updateById(mmItemOutput); |
7fd198
|
37 |
} |
潘 |
38 |
|
|
39 |
public void deleteBatch(String[] itemIds) { |
5c6007
|
40 |
QueryWrapper<MmItemOutputEntity> queryWrapper = new QueryWrapper(); |
7fd198
|
41 |
queryWrapper.in("itemid", itemIds); |
5c6007
|
42 |
mmItemOutputDao.delete(queryWrapper); |
7fd198
|
43 |
} |
潘 |
44 |
|
|
45 |
@Override |
|
46 |
public MmItemOutputEntity getByItemid(String itemid) { |
5c6007
|
47 |
QueryWrapper<MmItemOutputEntity> queryWrapper = new QueryWrapper(); |
7fd198
|
48 |
queryWrapper.eq("itemid", itemid); |
5c6007
|
49 |
List<MmItemOutputEntity> list = mmItemOutputDao.selectList(queryWrapper); |
7fd198
|
50 |
if (CollectionUtils.isEmpty(list)) { |
潘 |
51 |
return new MmItemOutputEntity(); |
|
52 |
} |
|
53 |
return list.get(0); |
|
54 |
} |
|
55 |
|
|
56 |
@Override |
|
57 |
public List<MmItemOutputDTO> queryList(Map<String, Object> params) { |
5c6007
|
58 |
return mmItemOutputDao.queryList(params); |
7fd198
|
59 |
} |
潘 |
60 |
|
|
61 |
@Override |
|
62 |
public MmItemOutputVO getOutPutById(String outputid) { |
5c6007
|
63 |
List<MmItemOutputVO> list = mmItemOutputDao.getOutPutById(outputid); |
7fd198
|
64 |
if (CollectionUtils.isEmpty(list)) { |
潘 |
65 |
return null; |
|
66 |
} |
|
67 |
return list.get(0); |
|
68 |
} |
|
69 |
|
|
70 |
@Override |
|
71 |
public List<MmItemOutputVO> getOutPutByItemId(String itemid) { |
5c6007
|
72 |
return mmItemOutputDao.getOutPutByItemId(itemid); |
7fd198
|
73 |
} |
潘 |
74 |
|
|
75 |
@Override |
|
76 |
public List<MmItemOutputVO> getOutPutByPointId(String pointid) { |
5c6007
|
77 |
return mmItemOutputDao.getOutPutByPointId(pointid); |
7fd198
|
78 |
} |
潘 |
79 |
} |