提交 | 用户 | 时间
|
849473
|
1 |
package com.billion.main.bs.service.impl; |
A |
2 |
|
|
3 |
import java.util.Date; |
|
4 |
import java.util.List; |
|
5 |
|
|
6 |
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
|
7 |
import com.billion.common.utils.DateUtils; |
|
8 |
import com.billion.common.utils.SecurityUtils; |
|
9 |
import org.springframework.beans.factory.annotation.Autowired; |
|
10 |
import org.springframework.stereotype.Service; |
|
11 |
import com.billion.main.bs.mapper.BsRouteInfoMapper; |
|
12 |
import com.billion.main.bs.domain.BsRouteInfo; |
|
13 |
import com.billion.main.bs.service.IBsRouteInfoService; |
|
14 |
|
|
15 |
import static org.apache.commons.lang3.SystemUtils.getUserName; |
|
16 |
|
|
17 |
/** |
|
18 |
* 工艺路线Service业务层处理 |
|
19 |
* |
|
20 |
* @author Billion-Yi |
|
21 |
* @date 2024-11-23 |
|
22 |
*/ |
|
23 |
@Service |
|
24 |
public class BsRouteInfoServiceImpl extends ServiceImpl<BsRouteInfoMapper, BsRouteInfo> implements IBsRouteInfoService |
|
25 |
{ |
|
26 |
@Autowired |
|
27 |
private BsRouteInfoMapper bsRouteInfoMapper; |
|
28 |
|
|
29 |
/** |
|
30 |
* 查询工艺路线 |
|
31 |
* |
|
32 |
* @param id 工艺路线主键 |
|
33 |
* @return 工艺路线 |
|
34 |
*/ |
|
35 |
@Override |
|
36 |
public BsRouteInfo selectBsRouteInfoById(Long id) |
|
37 |
{ |
|
38 |
return bsRouteInfoMapper.selectBsRouteInfoById(id); |
|
39 |
} |
|
40 |
|
|
41 |
/** |
|
42 |
* 查询工艺路线列表 |
|
43 |
* |
|
44 |
* @param bsRouteInfo 工艺路线 |
|
45 |
* @return 工艺路线 |
|
46 |
*/ |
|
47 |
@Override |
|
48 |
public List<BsRouteInfo> selectBsRouteInfoList(BsRouteInfo bsRouteInfo) |
|
49 |
{ |
|
50 |
return bsRouteInfoMapper.selectBsRouteInfoList(bsRouteInfo); |
|
51 |
} |
|
52 |
|
|
53 |
/** |
|
54 |
* 新增工艺路线 |
|
55 |
* |
|
56 |
* @param bsRouteInfo 工艺路线 |
|
57 |
* @return 结果 |
|
58 |
*/ |
|
59 |
@Override |
|
60 |
public int insertBsRouteInfo(BsRouteInfo bsRouteInfo) |
|
61 |
{ |
|
62 |
bsRouteInfo.setCreateTime(DateUtils.getNowDate()); |
|
63 |
bsRouteInfo.setCreateBy(getUserName()); |
|
64 |
bsRouteInfo.setDataSource("MES"); |
|
65 |
return bsRouteInfoMapper.insertBsRouteInfo(bsRouteInfo); |
|
66 |
} |
|
67 |
|
|
68 |
/** |
|
69 |
* 修改工艺路线 |
|
70 |
* |
|
71 |
* @param bsRouteInfo 工艺路线 |
|
72 |
* @return 结果 |
|
73 |
*/ |
|
74 |
@Override |
|
75 |
public int updateBsRouteInfo(BsRouteInfo bsRouteInfo) |
|
76 |
{ |
|
77 |
bsRouteInfo.setUpdateTime(DateUtils.getNowDate()); |
|
78 |
bsRouteInfo.setUpdateBy(getUserName()); |
|
79 |
return bsRouteInfoMapper.updateBsRouteInfo(bsRouteInfo); |
|
80 |
} |
|
81 |
|
|
82 |
/** |
|
83 |
* 批量删除工艺路线 |
|
84 |
* |
|
85 |
* @param ids 需要删除的工艺路线主键 |
|
86 |
* @return 结果 |
|
87 |
*/ |
|
88 |
@Override |
|
89 |
public int deleteBsRouteInfoByIds(Long[] ids) |
|
90 |
{ |
|
91 |
return bsRouteInfoMapper.deleteBsRouteInfoByIds(ids); |
|
92 |
} |
|
93 |
|
|
94 |
/** |
|
95 |
* 删除工艺路线信息 |
|
96 |
* |
|
97 |
* @param id 工艺路线主键 |
|
98 |
* @return 结果 |
|
99 |
*/ |
|
100 |
@Override |
|
101 |
public int deleteBsRouteInfoById(Long id) |
|
102 |
{ |
|
103 |
return bsRouteInfoMapper.deleteBsRouteInfoById(id); |
|
104 |
} |
|
105 |
} |