提交 | 用户 | 时间
|
e57a89
|
1 |
package com.jcdm.main.bs.workshop.service.impl; |
懒 |
2 |
|
|
3 |
import java.util.List; |
0ce25f
|
4 |
|
W |
5 |
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
e57a89
|
6 |
import com.jcdm.common.utils.DateUtils; |
懒 |
7 |
import com.jcdm.main.bs.workshop.service.IBsWorkshopInfoService; |
|
8 |
import org.springframework.beans.factory.annotation.Autowired; |
|
9 |
import org.springframework.stereotype.Service; |
|
10 |
import com.jcdm.main.bs.workshop.mapper.BsWorkshopInfoMapper; |
|
11 |
import com.jcdm.main.bs.workshop.domain.BsWorkshopInfo; |
|
12 |
|
|
13 |
import static org.apache.commons.lang3.SystemUtils.getUserName; |
|
14 |
|
|
15 |
/** |
|
16 |
* 车间信息Service业务层处理 |
|
17 |
* |
|
18 |
* @author jc |
|
19 |
* @date 2023-12-06 |
|
20 |
*/ |
|
21 |
@Service |
0ce25f
|
22 |
public class BsWorkshopInfoServiceImpl extends ServiceImpl<BsWorkshopInfoMapper,BsWorkshopInfo> implements IBsWorkshopInfoService |
e57a89
|
23 |
{ |
懒 |
24 |
@Autowired |
|
25 |
private BsWorkshopInfoMapper bsWorkshopInfoMapper; |
|
26 |
|
|
27 |
/** |
|
28 |
* 查询车间信息 |
|
29 |
* |
|
30 |
* @param id 车间信息主键 |
|
31 |
* @return 车间信息 |
|
32 |
*/ |
|
33 |
@Override |
|
34 |
public BsWorkshopInfo selectBsWorkshopInfoById(Long id) |
|
35 |
{ |
|
36 |
return bsWorkshopInfoMapper.selectBsWorkshopInfoById(id); |
|
37 |
} |
|
38 |
|
|
39 |
/** |
|
40 |
* 查询车间信息列表 |
|
41 |
* |
|
42 |
* @param bsWorkshopInfo 车间信息 |
|
43 |
* @return 车间信息 |
|
44 |
*/ |
|
45 |
@Override |
|
46 |
public List<BsWorkshopInfo> selectBsWorkshopInfoList(BsWorkshopInfo bsWorkshopInfo) |
|
47 |
{ |
|
48 |
return bsWorkshopInfoMapper.selectBsWorkshopInfoList(bsWorkshopInfo); |
|
49 |
} |
|
50 |
|
|
51 |
/** |
|
52 |
* 新增车间信息 |
|
53 |
* |
|
54 |
* @param bsWorkshopInfo 车间信息 |
|
55 |
* @return 结果 |
|
56 |
*/ |
|
57 |
@Override |
|
58 |
public int insertBsWorkshopInfo(BsWorkshopInfo bsWorkshopInfo) |
|
59 |
{ |
|
60 |
bsWorkshopInfo.setCreateTime(DateUtils.getNowDate()); |
|
61 |
bsWorkshopInfo.setCreateUser(getUserName()); |
|
62 |
return bsWorkshopInfoMapper.insertBsWorkshopInfo(bsWorkshopInfo); |
|
63 |
} |
|
64 |
|
|
65 |
/** |
|
66 |
* 修改车间信息 |
|
67 |
* |
|
68 |
* @param bsWorkshopInfo 车间信息 |
|
69 |
* @return 结果 |
|
70 |
*/ |
|
71 |
@Override |
|
72 |
public int updateBsWorkshopInfo(BsWorkshopInfo bsWorkshopInfo) |
|
73 |
{ |
|
74 |
bsWorkshopInfo.setUpdateTime(DateUtils.getNowDate()); |
|
75 |
bsWorkshopInfo.setUpdateUser(getUserName()); |
|
76 |
return bsWorkshopInfoMapper.updateBsWorkshopInfo(bsWorkshopInfo); |
|
77 |
} |
|
78 |
|
|
79 |
/** |
|
80 |
* 批量删除车间信息 |
|
81 |
* |
|
82 |
* @param ids 需要删除的车间信息主键 |
|
83 |
* @return 结果 |
|
84 |
*/ |
|
85 |
@Override |
|
86 |
public int deleteBsWorkshopInfoByIds(Long[] ids) |
|
87 |
{ |
|
88 |
return bsWorkshopInfoMapper.deleteBsWorkshopInfoByIds(ids); |
|
89 |
} |
|
90 |
|
|
91 |
/** |
|
92 |
* 删除车间信息信息 |
|
93 |
* |
|
94 |
* @param id 车间信息主键 |
|
95 |
* @return 结果 |
|
96 |
*/ |
|
97 |
@Override |
|
98 |
public int deleteBsWorkshopInfoById(Long id) |
|
99 |
{ |
|
100 |
return bsWorkshopInfoMapper.deleteBsWorkshopInfoById(id); |
|
101 |
} |
|
102 |
} |