kangwei : 采购计划相关接口
正在显示
25 个修改的文件
包含
352 行增加
和
223 行删除
... | @@ -135,13 +135,15 @@ public class PaperController { | ... | @@ -135,13 +135,15 @@ public class PaperController { |
135 | 135 | ||
136 | @AutoLog(value = "在线考试-发布试卷") | 136 | @AutoLog(value = "在线考试-发布试卷") |
137 | @ApiOperation(value="在线考试-发布试卷", notes="在线考试-发布试卷") | 137 | @ApiOperation(value="在线考试-发布试卷", notes="在线考试-发布试卷") |
138 | @PutMapping(value = "/publish") | 138 | @GetMapping(value = "/publish") |
139 | public Result<Paper> publish(@RequestBody Paper paper) { | 139 | public Result<Paper> publish(@RequestParam(name="id",required=true) String id) { |
140 | Result<Paper> result = new Result<Paper>(); | 140 | Result<Paper> result = new Result<Paper>(); |
141 | Paper paperEntity = paperService.getById(paper.getId()); | 141 | Paper paper = paperService.getById(id); |
142 | if(paperEntity==null) { | 142 | if(paper==null) { |
143 | result.error500("未找到对应实体"); | 143 | result.error500("未找到对应实体"); |
144 | }else { | 144 | }else { |
145 | paper.setSendStatus("1"); | ||
146 | paper.setSendTime( new Date()); | ||
145 | boolean ok = paperService.updateById(paper); | 147 | boolean ok = paperService.updateById(paper); |
146 | //TODO 返回false说明什么? | 148 | //TODO 返回false说明什么? |
147 | if(ok) { | 149 | if(ok) { | ... | ... |
... | @@ -10,17 +10,13 @@ import javax.servlet.http.HttpServletRequest; | ... | @@ -10,17 +10,13 @@ import javax.servlet.http.HttpServletRequest; |
10 | import javax.servlet.http.HttpServletResponse; | 10 | import javax.servlet.http.HttpServletResponse; |
11 | import com.skua.core.api.vo.Result; | 11 | import com.skua.core.api.vo.Result; |
12 | import com.skua.core.aspect.annotation.AutoLog; | 12 | import com.skua.core.aspect.annotation.AutoLog; |
13 | import com.skua.core.context.BaseContextHandler; | ||
14 | import com.skua.core.query.QueryGenerator; | 13 | import com.skua.core.query.QueryGenerator; |
15 | import com.skua.core.service.ISequenceService; | ||
16 | import com.skua.core.util.ConvertUtils; | 14 | import com.skua.core.util.ConvertUtils; |
17 | import com.skua.modules.edu.entity.Question; | 15 | import com.skua.modules.edu.entity.Question; |
18 | import com.skua.modules.edu.service.IQuestionService; | 16 | import com.skua.modules.edu.service.IQuestionService; |
19 | import java.util.Date; | ||
20 | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | 17 | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
21 | import com.baomidou.mybatisplus.core.metadata.IPage; | 18 | import com.baomidou.mybatisplus.core.metadata.IPage; |
22 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | 19 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
23 | import com.skua.modules.edu.vo.QuestionVO; | ||
24 | import lombok.extern.slf4j.Slf4j; | 20 | import lombok.extern.slf4j.Slf4j; |
25 | 21 | ||
26 | import org.jeecgframework.poi.excel.ExcelImportUtil; | 22 | import org.jeecgframework.poi.excel.ExcelImportUtil; |
... | @@ -94,7 +90,7 @@ public class QuestionController { | ... | @@ -94,7 +90,7 @@ public class QuestionController { |
94 | @AutoLog(value = "在线考试-试题-添加") | 90 | @AutoLog(value = "在线考试-试题-添加") |
95 | @ApiOperation(value="在线考试-试题-添加", notes="在线考试-试题-添加") | 91 | @ApiOperation(value="在线考试-试题-添加", notes="在线考试-试题-添加") |
96 | @PostMapping(value = "/add") | 92 | @PostMapping(value = "/add") |
97 | public Result<Question> add(@RequestBody QuestionVO question)throws Exception { | 93 | public Result<Question> add(@RequestBody Question question)throws Exception { |
98 | Result<Question> result = new Result<Question>(); | 94 | Result<Question> result = new Result<Question>(); |
99 | try { | 95 | try { |
100 | questionService.saveQuestion(question); | 96 | questionService.saveQuestion(question); |
... | @@ -117,7 +113,7 @@ public class QuestionController { | ... | @@ -117,7 +113,7 @@ public class QuestionController { |
117 | @AutoLog(value = "在线考试-试题-编辑") | 113 | @AutoLog(value = "在线考试-试题-编辑") |
118 | @ApiOperation(value="在线考试-试题-编辑", notes="在线考试-试题-编辑") | 114 | @ApiOperation(value="在线考试-试题-编辑", notes="在线考试-试题-编辑") |
119 | @PutMapping(value = "/edit") | 115 | @PutMapping(value = "/edit") |
120 | public Result<Question> edit(@RequestBody QuestionVO question) throws Exception { | 116 | public Result<Question> edit(@RequestBody Question question) throws Exception { |
121 | Result<Question> result = new Result<Question>(); | 117 | Result<Question> result = new Result<Question>(); |
122 | Question questionEntity = questionService.getById(question.getId()); | 118 | Question questionEntity = questionService.getById(question.getId()); |
123 | if(questionEntity==null) { | 119 | if(questionEntity==null) { |
... | @@ -190,7 +186,7 @@ public class QuestionController { | ... | @@ -190,7 +186,7 @@ public class QuestionController { |
190 | @GetMapping(value = "/queryById") | 186 | @GetMapping(value = "/queryById") |
191 | public Result<Question> queryById(@RequestParam(name="id",required=true) String id) { | 187 | public Result<Question> queryById(@RequestParam(name="id",required=true) String id) { |
192 | Result<Question> result = new Result<Question>(); | 188 | Result<Question> result = new Result<Question>(); |
193 | Question question = questionService.getById(id); | 189 | Question question = questionService.queryById(id); |
194 | if(question==null) { | 190 | if(question==null) { |
195 | result.error500("未找到对应实体"); | 191 | result.error500("未找到对应实体"); |
196 | }else { | 192 | }else { | ... | ... |
... | @@ -2,6 +2,8 @@ package com.skua.modules.edu.entity; | ... | @@ -2,6 +2,8 @@ package com.skua.modules.edu.entity; |
2 | 2 | ||
3 | import java.io.Serializable; | 3 | import java.io.Serializable; |
4 | import java.util.Date; | 4 | import java.util.Date; |
5 | import java.util.List; | ||
6 | |||
5 | import com.baomidou.mybatisplus.annotation.IdType; | 7 | import com.baomidou.mybatisplus.annotation.IdType; |
6 | import com.baomidou.mybatisplus.annotation.TableId; | 8 | import com.baomidou.mybatisplus.annotation.TableId; |
7 | import com.baomidou.mybatisplus.annotation.TableName; | 9 | import com.baomidou.mybatisplus.annotation.TableName; |
... | @@ -81,4 +83,15 @@ public class Question { | ... | @@ -81,4 +83,15 @@ public class Question { |
81 | @Excel(name = "delFlag", width = 15) | 83 | @Excel(name = "delFlag", width = 15) |
82 | @ApiModelProperty(value = "delFlag") | 84 | @ApiModelProperty(value = "delFlag") |
83 | private Integer delFlag; | 85 | private Integer delFlag; |
86 | |||
87 | |||
88 | /**试题分值*/ | ||
89 | @TableField(exist=false) | ||
90 | @Excel(name = "试题分值", width = 15) | ||
91 | @ApiModelProperty(value = "试题分值") | ||
92 | private String score; | ||
93 | |||
94 | @TableField(exist=false) | ||
95 | @ApiModelProperty(value = "试题选项集合") | ||
96 | private List<QuestionOption> optionList; | ||
84 | } | 97 | } | ... | ... |
... | @@ -2,9 +2,6 @@ package com.skua.modules.edu.service; | ... | @@ -2,9 +2,6 @@ package com.skua.modules.edu.service; |
2 | 2 | ||
3 | import com.skua.modules.edu.entity.Question; | 3 | import com.skua.modules.edu.entity.Question; |
4 | import com.baomidou.mybatisplus.extension.service.IService; | 4 | import com.baomidou.mybatisplus.extension.service.IService; |
5 | import com.skua.modules.edu.vo.QuestionVO; | ||
6 | |||
7 | import java.lang.reflect.InvocationTargetException; | ||
8 | 5 | ||
9 | /** | 6 | /** |
10 | * 在线考试-试题 | 7 | * 在线考试-试题 |
... | @@ -16,12 +13,20 @@ public interface IQuestionService extends IService<Question> { | ... | @@ -16,12 +13,20 @@ public interface IQuestionService extends IService<Question> { |
16 | * @param question | 13 | * @param question |
17 | * @return | 14 | * @return |
18 | */ | 15 | */ |
19 | public int saveQuestion(QuestionVO question)throws Exception; | 16 | public int saveQuestion(Question question)throws Exception; |
20 | 17 | ||
21 | /*** | 18 | /*** |
22 | * 修改试题 以及试题选项 | 19 | * 修改试题 以及试题选项 |
23 | * @param question | 20 | * @param question |
24 | * @return | 21 | * @return |
25 | */ | 22 | */ |
26 | public boolean updateQuestion(QuestionVO question) throws Exception ; | 23 | public boolean updateQuestion(Question question) throws Exception ; |
24 | |||
25 | |||
26 | /*** | ||
27 | * 修改试题 以及试题选项 | ||
28 | * @param id | ||
29 | * @return | ||
30 | */ | ||
31 | public Question queryById(String id); | ||
27 | } | 32 | } | ... | ... |
... | @@ -7,7 +7,6 @@ import com.skua.modules.edu.mapper.PaperMapper; | ... | @@ -7,7 +7,6 @@ import com.skua.modules.edu.mapper.PaperMapper; |
7 | import com.skua.modules.edu.mapper.PaperQuestionMapper; | 7 | import com.skua.modules.edu.mapper.PaperQuestionMapper; |
8 | import com.skua.modules.edu.service.IPaperService; | 8 | import com.skua.modules.edu.service.IPaperService; |
9 | import com.skua.modules.edu.vo.PaperVO; | 9 | import com.skua.modules.edu.vo.PaperVO; |
10 | import com.skua.modules.edu.vo.QuestionVO; | ||
11 | import org.apache.commons.beanutils.BeanUtils; | 10 | import org.apache.commons.beanutils.BeanUtils; |
12 | import org.springframework.stereotype.Service; | 11 | import org.springframework.stereotype.Service; |
13 | 12 | ||
... | @@ -41,10 +40,10 @@ public class PaperServiceImpl extends ServiceImpl<PaperMapper, Paper> implements | ... | @@ -41,10 +40,10 @@ public class PaperServiceImpl extends ServiceImpl<PaperMapper, Paper> implements |
41 | // 步骤2:批量插入试题选项集合 | 40 | // 步骤2:批量插入试题选项集合 |
42 | PaperQuestion paperQuestion = null; | 41 | PaperQuestion paperQuestion = null; |
43 | int index = 1; | 42 | int index = 1; |
44 | if(paperVO.getQuestionVOList() != null ){ | 43 | if(paperVO.getQuestionList() != null ){ |
45 | for(QuestionVO questionVO :paperVO.getQuestionVOList() ){ | 44 | for(Question question :paperVO.getQuestionList() ){ |
46 | //( String paperId, String questionId, String score, Integer sort ) | 45 | //( String paperId, String questionId, String score, Integer sort ) |
47 | paperQuestion = new PaperQuestion( paperVO.getId(),questionVO.getId(),questionVO.getScore(), index); | 46 | paperQuestion = new PaperQuestion( paperVO.getId(),question.getId(),question.getScore(), index); |
48 | paperQuestionMapper.insert( paperQuestion ) ; | 47 | paperQuestionMapper.insert( paperQuestion ) ; |
49 | } | 48 | } |
50 | } | 49 | } |
... | @@ -71,15 +70,13 @@ public class PaperServiceImpl extends ServiceImpl<PaperMapper, Paper> implements | ... | @@ -71,15 +70,13 @@ public class PaperServiceImpl extends ServiceImpl<PaperMapper, Paper> implements |
71 | // 步骤3:批量插入试题选项集合 | 70 | // 步骤3:批量插入试题选项集合 |
72 | PaperQuestion paperQuestion = null; | 71 | PaperQuestion paperQuestion = null; |
73 | int index = 1; | 72 | int index = 1; |
74 | if(paperVO.getQuestionVOList() != null ){ | 73 | if(paperVO.getQuestionList() != null ){ |
75 | for(QuestionVO questionVO :paperVO.getQuestionVOList() ){ | 74 | for(Question question :paperVO.getQuestionList() ){ |
76 | //( String paperId, String questionId, String score, Integer sort ) | 75 | //( String paperId, String questionId, String score, Integer sort ) |
77 | paperQuestion = new PaperQuestion( paperVO.getId(),questionVO.getId(),questionVO.getScore(), index); | 76 | paperQuestion = new PaperQuestion( paperVO.getId(),question.getId(),question.getScore(), index); |
78 | paperQuestionMapper.insert( paperQuestion ) ; | 77 | paperQuestionMapper.insert( paperQuestion ) ; |
79 | } | 78 | } |
80 | } | 79 | } |
81 | |||
82 | |||
83 | return true; | 80 | return true; |
84 | } | 81 | } |
85 | 82 | ... | ... |
1 | package com.skua.modules.edu.service.impl; | 1 | package com.skua.modules.edu.service.impl; |
2 | 2 | ||
3 | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | ||
3 | import com.google.gson.Gson; | 4 | import com.google.gson.Gson; |
4 | import com.skua.modules.edu.entity.Question; | 5 | import com.skua.modules.edu.entity.Question; |
5 | import com.skua.modules.edu.entity.QuestionOption; | 6 | import com.skua.modules.edu.entity.QuestionOption; |
6 | import com.skua.modules.edu.mapper.QuestionMapper; | 7 | import com.skua.modules.edu.mapper.QuestionMapper; |
7 | import com.skua.modules.edu.mapper.QuestionOptionMapper; | 8 | import com.skua.modules.edu.mapper.QuestionOptionMapper; |
8 | import com.skua.modules.edu.service.IQuestionService; | 9 | import com.skua.modules.edu.service.IQuestionService; |
9 | import com.skua.modules.edu.vo.QuestionVO; | ||
10 | import org.apache.commons.beanutils.BeanUtils; | ||
11 | import org.springframework.stereotype.Service; | 10 | import org.springframework.stereotype.Service; |
12 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | 11 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
13 | import org.springframework.transaction.annotation.Transactional; | 12 | import org.springframework.transaction.annotation.Transactional; |
14 | import javax.annotation.Resource; | 13 | import javax.annotation.Resource; |
14 | import java.util.List; | ||
15 | 15 | ||
16 | /** | 16 | /** |
17 | * 在线考试-试题 | 17 | * 在线考试-试题 |
... | @@ -23,28 +23,24 @@ public class QuestionServiceImpl extends ServiceImpl<QuestionMapper, Question> i | ... | @@ -23,28 +23,24 @@ public class QuestionServiceImpl extends ServiceImpl<QuestionMapper, Question> i |
23 | private QuestionOptionMapper optionMapper; | 23 | private QuestionOptionMapper optionMapper; |
24 | /*** | 24 | /*** |
25 | * 添加试题 以及试题选项 | 25 | * 添加试题 以及试题选项 |
26 | * @param questionVO | 26 | * @param question |
27 | * @return | 27 | * @return |
28 | */ | 28 | */ |
29 | @Transactional | 29 | @Transactional |
30 | public int saveQuestion(QuestionVO questionVO)throws Exception{ | 30 | public int saveQuestion(Question question)throws Exception{ |
31 | 31 | ||
32 | // 步骤1 保存试题表 | ||
33 | Question question = new Question(); | ||
34 | //将questionVO的属性 赋值给 question | ||
35 | BeanUtils.copyProperties(questionVO, question); | ||
36 | int count = this.baseMapper.insert( question ); | 32 | int count = this.baseMapper.insert( question ); |
37 | 33 | ||
38 | // 步骤2:批量插入试题选项集合 | 34 | // 步骤2:批量插入试题选项集合 |
39 | if(questionVO.getOptionVOList() != null ){ | 35 | if(question.getOptionList() != null ){ |
40 | for(QuestionOption option :questionVO.getOptionVOList() ){ | 36 | for(QuestionOption option : question.getOptionList() ){ |
41 | option.setQuestionId( questionVO.getId() ) ; | 37 | option.setQuestionId( question.getId() ) ; |
42 | optionMapper.insert( option ); | 38 | optionMapper.insert( option ); |
43 | } | 39 | } |
44 | // 创建Gson实例 | 40 | // 创建Gson实例 |
45 | Gson gson = new Gson(); | 41 | Gson gson = new Gson(); |
46 | // 将List转换为Json字符串 | 42 | // 将List转换为Json字符串 |
47 | String questionData = gson.toJson( questionVO.getOptionVOList() ) ; | 43 | String questionData = gson.toJson( question.getOptionList() ) ; |
48 | question.setQuestionData( questionData ) ; | 44 | question.setQuestionData( questionData ) ; |
49 | this.baseMapper.updateById( question ) ; | 45 | this.baseMapper.updateById( question ) ; |
50 | } | 46 | } |
... | @@ -54,35 +50,45 @@ public class QuestionServiceImpl extends ServiceImpl<QuestionMapper, Question> i | ... | @@ -54,35 +50,45 @@ public class QuestionServiceImpl extends ServiceImpl<QuestionMapper, Question> i |
54 | 50 | ||
55 | /*** | 51 | /*** |
56 | * 修改试题 以及试题选项 | 52 | * 修改试题 以及试题选项 |
57 | * @param questionVO | 53 | * @param question |
58 | * @return | 54 | * @return |
59 | */ | 55 | */ |
60 | @Transactional | 56 | @Transactional |
61 | public boolean updateQuestion(QuestionVO questionVO) throws Exception { | 57 | public boolean updateQuestion(Question question) throws Exception { |
62 | |||
63 | // 步骤1 保存试题表 | ||
64 | Question question = new Question(); | ||
65 | //将questionVO的属性 赋值给 question | ||
66 | BeanUtils.copyProperties(questionVO, question); | ||
67 | |||
68 | // 步骤2:根据试题编号删除,试题选项集合 | 58 | // 步骤2:根据试题编号删除,试题选项集合 |
69 | optionMapper.delByQuestionId( questionVO.getId() ) ; | 59 | optionMapper.delByQuestionId( question.getId() ) ; |
70 | // 步骤3:批量插入试题选项集合 | 60 | // 步骤3:批量插入试题选项集合 |
71 | if(questionVO.getOptionVOList() != null ){ | 61 | if(question.getOptionList() != null ){ |
72 | for(QuestionOption option :questionVO.getOptionVOList() ){ | 62 | for(QuestionOption option :question.getOptionList() ){ |
73 | option.setQuestionId( questionVO.getId() ) ; | 63 | option.setQuestionId( question.getId() ) ; |
74 | optionMapper.insert( option ); | 64 | optionMapper.insert( option ); |
75 | } | 65 | } |
76 | // 创建Gson实例 | 66 | // 创建Gson实例 |
77 | Gson gson = new Gson(); | 67 | Gson gson = new Gson(); |
78 | // 将List转换为Json字符串 | 68 | // 将List转换为Json字符串 |
79 | String questionData = gson.toJson( questionVO.getOptionVOList() ) ; | 69 | String questionData = gson.toJson( question.getOptionList() ) ; |
80 | question.setQuestionData( questionData ) ; | 70 | question.setQuestionData( questionData ) ; |
81 | } | 71 | } |
82 | //保存 | 72 | //保存 |
83 | this.baseMapper.updateById( question ); | 73 | this.baseMapper.updateById( question ); |
84 | |||
85 | return true; | 74 | return true; |
86 | } | 75 | } |
87 | 76 | ||
77 | /*** | ||
78 | * 修改试题 以及试题选项 | ||
79 | * @param id | ||
80 | * @return | ||
81 | */ | ||
82 | public Question queryById(String id){ | ||
83 | Question question = this.baseMapper.selectById(id); | ||
84 | if(question != null ){ | ||
85 | |||
86 | LambdaQueryWrapper<QuestionOption> lambda = new LambdaQueryWrapper<QuestionOption>(); | ||
87 | lambda.eq(QuestionOption::getQuestionId,id); | ||
88 | List<QuestionOption> userInfoList = optionMapper.selectList(lambda); | ||
89 | question.setOptionList( userInfoList); | ||
90 | } | ||
91 | return question; | ||
92 | } | ||
93 | |||
88 | } | 94 | } | ... | ... |
1 | package com.skua.modules.edu.vo; | ||
2 | |||
3 | import java.io.Serializable; | ||
4 | import java.util.Date; | ||
5 | import java.util.List; | ||
6 | |||
7 | import com.baomidou.mybatisplus.annotation.IdType; | ||
8 | import com.baomidou.mybatisplus.annotation.TableId; | ||
9 | import com.baomidou.mybatisplus.annotation.TableName; | ||
10 | import com.baomidou.mybatisplus.annotation.TableField; | ||
11 | import com.skua.modules.edu.entity.QuestionOption; | ||
12 | import io.swagger.annotations.ApiModel; | ||
13 | import io.swagger.annotations.ApiModelProperty; | ||
14 | import lombok.Data; | ||
15 | import lombok.EqualsAndHashCode; | ||
16 | import lombok.experimental.Accessors; | ||
17 | import com.fasterxml.jackson.annotation.JsonFormat; | ||
18 | import org.springframework.format.annotation.DateTimeFormat; | ||
19 | import org.jeecgframework.poi.excel.annotation.Excel; | ||
20 | |||
21 | /** | ||
22 | * 在线考试-试题 | ||
23 | */ | ||
24 | @Data | ||
25 | @ApiModel(value="edu_question数据传输对象", description="在线考试-试题") | ||
26 | public class QuestionVO implements Serializable{ | ||
27 | |||
28 | /**主键*/ | ||
29 | @ApiModelProperty(value = "主键") | ||
30 | private String id; | ||
31 | /**题库编号*/ | ||
32 | @Excel(name = "题库编号", width = 15) | ||
33 | @ApiModelProperty(value = "题库编号") | ||
34 | private String questionDbId; | ||
35 | /**试题标题*/ | ||
36 | @Excel(name = "试题标题", width = 15) | ||
37 | @ApiModelProperty(value = "试题标题") | ||
38 | private String questionTitle; | ||
39 | /**试题类型:1 单选、2多选、3判断*/ | ||
40 | @Excel(name = "试题类型:1 单选、2多选、3判断", width = 15) | ||
41 | @ApiModelProperty(value = "试题类型:1 单选、2多选、3判断") | ||
42 | private String questionType; | ||
43 | /**正确答案*/ | ||
44 | @Excel(name = "正确答案", width = 15) | ||
45 | @ApiModelProperty(value = "正确答案") | ||
46 | private String correct; | ||
47 | /**试题选项Json内容*/ | ||
48 | @Excel(name = "试题选项Json内容", width = 15) | ||
49 | @ApiModelProperty(value = "试题选项Json内容") | ||
50 | private String questionData; | ||
51 | /**试题解析*/ | ||
52 | @Excel(name = "试题解析", width = 15) | ||
53 | @ApiModelProperty(value = "试题解析") | ||
54 | private String analyzes; | ||
55 | /**备注*/ | ||
56 | @Excel(name = "备注", width = 15) | ||
57 | @ApiModelProperty(value = "备注") | ||
58 | private String remark; | ||
59 | |||
60 | |||
61 | /**试题分值*/ | ||
62 | @Excel(name = "试题分值", width = 15) | ||
63 | @ApiModelProperty(value = "试题分值") | ||
64 | private String score; | ||
65 | |||
66 | @ApiModelProperty(value = "试题选项集合") | ||
67 | private List<QuestionOption> optionVOList; | ||
68 | |||
69 | |||
70 | } |
1 | package com.skua.modules.erp.controller; | ||
2 | |||
3 | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | ||
4 | import com.baomidou.mybatisplus.core.metadata.IPage; | ||
5 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | ||
6 | import com.skua.core.api.vo.Result; | ||
7 | import com.skua.core.aspect.annotation.AutoLog; | ||
8 | import com.skua.core.context.BaseContextHandler; | ||
9 | import com.skua.core.query.QueryGenerator; | ||
10 | import com.skua.modules.equipment.service.IEquipmentSparepartService; | ||
11 | import com.skua.modules.erp.entity.ApproveRecord; | ||
12 | import com.skua.modules.supplies.entity.EquipmentSparepartSupplies; | ||
13 | import com.skua.modules.supplies.service.IEquipmentSparepartSuppliesService; | ||
14 | import com.skua.modules.system.entity.SysUser; | ||
15 | import io.swagger.annotations.Api; | ||
16 | import io.swagger.annotations.ApiOperation; | ||
17 | import lombok.extern.slf4j.Slf4j; | ||
18 | import org.springframework.beans.factory.annotation.Autowired; | ||
19 | import org.springframework.web.bind.annotation.*; | ||
20 | |||
21 | import javax.servlet.http.HttpServletRequest; | ||
22 | |||
23 | /** | ||
24 | * @auther kangwei | ||
25 | * @create ${year}-09-20-10:18 | ||
26 | */ | ||
27 | @Slf4j | ||
28 | @Api(tags="ert通用方法") | ||
29 | @RestController("rrpCommonController") | ||
30 | @RequestMapping("/web/erp/common") | ||
31 | public class ErpCommonController { | ||
32 | @Autowired | ||
33 | private IEquipmentSparepartSuppliesService sparepartSuppliesService;//物料serivce | ||
34 | |||
35 | @AutoLog(value = "ERP-物料列表") | ||
36 | @ApiOperation(value = "ERP-物料列表", notes = "ERP-物料列表") | ||
37 | @RequestMapping(value = "/sparepartList", method = RequestMethod.GET) | ||
38 | public Result<IPage<EquipmentSparepartSupplies>> departUserList(@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, | ||
39 | @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest req) { | ||
40 | Result<IPage<EquipmentSparepartSupplies>> result = new Result<IPage<EquipmentSparepartSupplies>>(); | ||
41 | Page<EquipmentSparepartSupplies> page = new Page<EquipmentSparepartSupplies>(pageNo, pageSize); | ||
42 | String depId = BaseContextHandler.getRealDepartId();//临时参数 | ||
43 | // String username = req.getParameter("username"); | ||
44 | IPage<EquipmentSparepartSupplies> pageList = sparepartSuppliesService.queryPageByOut(page, depId); | ||
45 | result.setSuccess(true); | ||
46 | result.setResult(pageList); | ||
47 | return result; | ||
48 | } | ||
49 | } |
1 | package com.skua.modules.erp.controller; | 1 | package com.skua.modules.erp.controller; |
2 | 2 | ||
3 | import java.util.Arrays; | 3 | import java.util.*; |
4 | import java.util.List; | ||
5 | import java.util.Map; | ||
6 | import java.io.IOException; | 4 | import java.io.IOException; |
7 | import java.io.UnsupportedEncodingException; | 5 | import java.io.UnsupportedEncodingException; |
8 | import java.net.URLDecoder; | 6 | import java.net.URLDecoder; |
... | @@ -16,10 +14,11 @@ import com.skua.core.service.ISequenceService; | ... | @@ -16,10 +14,11 @@ import com.skua.core.service.ISequenceService; |
16 | import com.skua.core.util.ConvertUtils; | 14 | import com.skua.core.util.ConvertUtils; |
17 | import com.skua.modules.erp.entity.PurchasePlan; | 15 | import com.skua.modules.erp.entity.PurchasePlan; |
18 | import com.skua.modules.erp.service.IPurchasePlanService; | 16 | import com.skua.modules.erp.service.IPurchasePlanService; |
19 | import java.util.Date; | ||
20 | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | 17 | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
21 | import com.baomidou.mybatisplus.core.metadata.IPage; | 18 | import com.baomidou.mybatisplus.core.metadata.IPage; |
22 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | 19 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
20 | import com.skua.modules.erp.vo.PurchasePlanVO; | ||
21 | import com.skua.modules.guest.util.DateUtil; | ||
23 | import lombok.extern.slf4j.Slf4j; | 22 | import lombok.extern.slf4j.Slf4j; |
24 | 23 | ||
25 | import org.jeecgframework.poi.excel.ExcelImportUtil; | 24 | import org.jeecgframework.poi.excel.ExcelImportUtil; |
... | @@ -56,7 +55,7 @@ public class PurchasePlanController { | ... | @@ -56,7 +55,7 @@ public class PurchasePlanController { |
56 | * <pre> | 55 | * <pre> |
57 | * 分页列表查询 | 56 | * 分页列表查询 |
58 | * </pre> | 57 | * </pre> |
59 | * @param purchasePlan | 58 | * @param purchasePlanVO |
60 | * @param pageNo | 59 | * @param pageNo |
61 | * @param pageSize | 60 | * @param pageSize |
62 | * @param req | 61 | * @param req |
... | @@ -69,14 +68,30 @@ public class PurchasePlanController { | ... | @@ -69,14 +68,30 @@ public class PurchasePlanController { |
69 | @ApiOperation(value="erp采购计划表-分页列表查询", notes="erp采购计划表-分页列表查询") | 68 | @ApiOperation(value="erp采购计划表-分页列表查询", notes="erp采购计划表-分页列表查询") |
70 | @GetMapping(value = "/list") | 69 | @GetMapping(value = "/list") |
71 | public Result<IPage<PurchasePlan>> queryPageList(PurchasePlan purchasePlan, | 70 | public Result<IPage<PurchasePlan>> queryPageList(PurchasePlan purchasePlan, |
72 | @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, | 71 | @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, |
73 | @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, | 72 | @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, |
74 | HttpServletRequest req) { | 73 | HttpServletRequest req) { |
75 | Result<IPage<PurchasePlan>> result = new Result<IPage<PurchasePlan>>(); | 74 | Result<IPage<PurchasePlan>> result = new Result<IPage<PurchasePlan>>(); |
76 | QueryWrapper<PurchasePlan> queryWrapper = QueryGenerator.initQueryWrapper(purchasePlan, req.getParameterMap()); | 75 | QueryWrapper<PurchasePlan> queryWrapper = QueryGenerator.initQueryWrapper(purchasePlan, req.getParameterMap()); |
77 | Page<PurchasePlan> page = new Page<PurchasePlan>(pageNo, pageSize); | 76 | Page<PurchasePlan> page = new Page<PurchasePlan>(pageNo, pageSize); |
78 | queryWrapper.eq("depart_id", purchasePlan.getDepartId()); | 77 | /*if(purchasePlanVO.getDepartId() != null ){ |
78 | queryWrapper.eq("depart_id", purchasePlanVO.getDepartId()); | ||
79 | } | ||
80 | if(purchasePlanVO.getStatus() != null ){ | ||
81 | queryWrapper.eq("status", purchasePlanVO.getStatus()); | ||
82 | } | ||
83 | |||
84 | if(purchasePlanVO.getApplyYear() != null ){ | ||
85 | queryWrapper.eq("apply_year", purchasePlanVO.getApplyYear()); | ||
86 | } | ||
87 | if(purchasePlanVO.getApplyYear() != null ){ | ||
88 | queryWrapper.eq("apply_year", purchasePlanVO.getApplyYear()); | ||
89 | } | ||
90 | if(purchasePlanVO.getApplyUser() != null ){ | ||
91 | queryWrapper.like("apply_user", purchasePlanVO.getApplyUser()); | ||
92 | }*/ | ||
79 | queryWrapper.orderByDesc("create_time"); | 93 | queryWrapper.orderByDesc("create_time"); |
94 | |||
80 | IPage<PurchasePlan> pageList = purchasePlanService.page(page, queryWrapper); | 95 | IPage<PurchasePlan> pageList = purchasePlanService.page(page, queryWrapper); |
81 | result.setSuccess(true); | 96 | result.setSuccess(true); |
82 | result.setResult(pageList); | 97 | result.setResult(pageList); |
... | @@ -92,8 +107,24 @@ public class PurchasePlanController { | ... | @@ -92,8 +107,24 @@ public class PurchasePlanController { |
92 | @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, | 107 | @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, |
93 | HttpServletRequest req) { | 108 | HttpServletRequest req) { |
94 | Result<IPage<PurchasePlan>> result = new Result<IPage<PurchasePlan>>(); | 109 | Result<IPage<PurchasePlan>> result = new Result<IPage<PurchasePlan>>(); |
95 | QueryWrapper<PurchasePlan> queryWrapper = QueryGenerator.initQueryWrapper(purchasePlan, req.getParameterMap()); | 110 | QueryWrapper<PurchasePlan> queryWrapper = QueryGenerator.initQueryWrapper(purchasePlan, req.getParameterMap()); |
96 | Page<PurchasePlan> page = new Page<PurchasePlan>(pageNo, pageSize); | 111 | Page<PurchasePlan> page = new Page<PurchasePlan>(pageNo, pageSize); |
112 | |||
113 | /* queryWrapper.in("depart_id", BaseContextHandler.getDeparts().split(",")); | ||
114 | |||
115 | if(purchasePlan.getStatus() != null ){ | ||
116 | queryWrapper.eq("status", purchasePlan.getStatus()); | ||
117 | } | ||
118 | |||
119 | if(purchasePlan.getApplyYear() != null ){ | ||
120 | queryWrapper.eq("apply_year", purchasePlan.getApplyYear()); | ||
121 | } | ||
122 | if(purchasePlan.getApplyYear() != null ){ | ||
123 | queryWrapper.eq("apply_year", purchasePlan.getApplyYear()); | ||
124 | } | ||
125 | if(purchasePlan.getApplyUser() != null ){ | ||
126 | queryWrapper.like("apply_user", purchasePlan.getApplyUser()); | ||
127 | }*/ | ||
97 | queryWrapper.in("depart_id", BaseContextHandler.getDeparts().split(",")); | 128 | queryWrapper.in("depart_id", BaseContextHandler.getDeparts().split(",")); |
98 | queryWrapper.orderByDesc("create_time"); | 129 | queryWrapper.orderByDesc("create_time"); |
99 | IPage<PurchasePlan> pageList = purchasePlanService.page(page, queryWrapper); | 130 | IPage<PurchasePlan> pageList = purchasePlanService.page(page, queryWrapper); |
... | @@ -114,10 +145,13 @@ public class PurchasePlanController { | ... | @@ -114,10 +145,13 @@ public class PurchasePlanController { |
114 | @AutoLog(value = "erp采购计划表-添加") | 145 | @AutoLog(value = "erp采购计划表-添加") |
115 | @ApiOperation(value="erp采购计划表-添加", notes="erp采购计划表-添加") | 146 | @ApiOperation(value="erp采购计划表-添加", notes="erp采购计划表-添加") |
116 | @PostMapping(value = "/add") | 147 | @PostMapping(value = "/add") |
117 | public Result<PurchasePlan> add(@RequestBody PurchasePlan purchasePlan) { | 148 | public Result<PurchasePlan> add(@RequestBody PurchasePlanVO purchasePlanVO) { |
118 | Result<PurchasePlan> result = new Result<PurchasePlan>(); | 149 | Result<PurchasePlan> result = new Result<PurchasePlan>(); |
119 | try { | 150 | try { |
120 | purchasePlanService.savePurchasePlan(purchasePlan); | 151 | purchasePlanVO.setApplyTime(DateUtil.getCurrentDate()); |
152 | |||
153 | //purchasePlan.setApplyUser(BaseContextHandler.getUserId()); | ||
154 | purchasePlanService.savePurchasePlan(purchasePlanVO); | ||
121 | result.success("添加成功!"); | 155 | result.success("添加成功!"); |
122 | } catch (Exception e) { | 156 | } catch (Exception e) { |
123 | log.error(e.getMessage(),e); | 157 | log.error(e.getMessage(),e); |
... | @@ -129,7 +163,7 @@ public class PurchasePlanController { | ... | @@ -129,7 +163,7 @@ public class PurchasePlanController { |
129 | * <pre> | 163 | * <pre> |
130 | * 编辑 | 164 | * 编辑 |
131 | * </pre> | 165 | * </pre> |
132 | * @param purchasePlan | 166 | * @param purchasePlanVO |
133 | * @return | 167 | * @return |
134 | * @author 开发者姓名, 开发时间 | 168 | * @author 开发者姓名, 开发时间 |
135 | * @Description: TODO(这里描述这个方法的需求变更情况) | 169 | * @Description: TODO(这里描述这个方法的需求变更情况) |
... | @@ -137,13 +171,13 @@ public class PurchasePlanController { | ... | @@ -137,13 +171,13 @@ public class PurchasePlanController { |
137 | @AutoLog(value = "erp采购计划表-编辑") | 171 | @AutoLog(value = "erp采购计划表-编辑") |
138 | @ApiOperation(value="erp采购计划表-编辑", notes="erp采购计划表-编辑") | 172 | @ApiOperation(value="erp采购计划表-编辑", notes="erp采购计划表-编辑") |
139 | @PutMapping(value = "/edit") | 173 | @PutMapping(value = "/edit") |
140 | public Result<PurchasePlan> edit(@RequestBody PurchasePlan purchasePlan) { | 174 | public Result<PurchasePlan> edit(@RequestBody PurchasePlanVO purchasePlanVO) { |
141 | Result<PurchasePlan> result = new Result<PurchasePlan>(); | 175 | Result<PurchasePlan> result = new Result<PurchasePlan>(); |
142 | PurchasePlan purchasePlanEntity = purchasePlanService.getById(purchasePlan.getId()); | 176 | PurchasePlan purchasePlanEntity = purchasePlanService.getById(purchasePlanVO.getId()); |
143 | if(purchasePlanEntity==null) { | 177 | if(purchasePlanEntity==null) { |
144 | result.error500("未找到对应实体"); | 178 | result.error500("未找到对应实体"); |
145 | }else { | 179 | }else { |
146 | boolean ok = purchasePlanService.updatePurchasePlan(purchasePlan); | 180 | boolean ok = purchasePlanService.updatePurchasePlan(purchasePlanVO); |
147 | //TODO 返回false说明什么? | 181 | //TODO 返回false说明什么? |
148 | if(ok) { | 182 | if(ok) { |
149 | result.success("修改成功!"); | 183 | result.success("修改成功!"); |
... | @@ -208,9 +242,9 @@ public class PurchasePlanController { | ... | @@ -208,9 +242,9 @@ public class PurchasePlanController { |
208 | @AutoLog(value = "erp采购计划表-通过id查询") | 242 | @AutoLog(value = "erp采购计划表-通过id查询") |
209 | @ApiOperation(value="erp采购计划表-通过id查询", notes="erp采购计划表-通过id查询") | 243 | @ApiOperation(value="erp采购计划表-通过id查询", notes="erp采购计划表-通过id查询") |
210 | @GetMapping(value = "/queryById") | 244 | @GetMapping(value = "/queryById") |
211 | public Result<PurchasePlan> queryById(@RequestParam(name="id",required=true) String id) { | 245 | public Result<PurchasePlanVO> queryById(@RequestParam(name="id",required=true) String id) { |
212 | Result<PurchasePlan> result = new Result<PurchasePlan>(); | 246 | Result<PurchasePlanVO> result = new Result<PurchasePlanVO>(); |
213 | PurchasePlan purchasePlan = purchasePlanService.queryById(id); | 247 | PurchasePlanVO purchasePlan = purchasePlanService.queryById(id); |
214 | if(purchasePlan==null) { | 248 | if(purchasePlan==null) { |
215 | result.error500("未找到对应实体"); | 249 | result.error500("未找到对应实体"); |
216 | }else { | 250 | }else { |
... | @@ -222,16 +256,38 @@ public class PurchasePlanController { | ... | @@ -222,16 +256,38 @@ public class PurchasePlanController { |
222 | 256 | ||
223 | 257 | ||
224 | 258 | ||
259 | @AutoLog(value = "erp采购计划表-送审") | ||
260 | @ApiOperation(value="erp采购计划表-送审", notes="erp采购计划表-送审") | ||
261 | @GetMapping(value = "/sendAudit") | ||
262 | public Result<PurchasePlan> sendAudit(@RequestParam(name="id",required=true) String id) { | ||
263 | Result<PurchasePlan> result = new Result<PurchasePlan>(); | ||
264 | PurchasePlan purchasePlan = null; | ||
265 | try { | ||
266 | purchasePlan = purchasePlanService.getById(id); | ||
267 | purchasePlan.setStatus("1");//提交审核 | ||
268 | if(purchasePlan==null) { | ||
269 | result.error500("未找到对应实体"); | ||
270 | } | ||
271 | } catch (Exception e) { | ||
272 | log.error("送审失败",e.getMessage()); | ||
273 | result.setResult(purchasePlan); | ||
274 | result.setSuccess(true); | ||
275 | } | ||
276 | return result; | ||
277 | } | ||
278 | |||
279 | |||
280 | |||
225 | @AutoLog(value = "erp采购计划表-审批") | 281 | @AutoLog(value = "erp采购计划表-审批") |
226 | @ApiOperation(value="erp采购计划表-审批", notes="erp采购计划表-审批") | 282 | @ApiOperation(value="erp采购计划表-审批", notes="erp采购计划表-审批") |
227 | @PutMapping(value = "/audit") | 283 | @PutMapping(value = "/audit") |
228 | public Result<PurchasePlan> auditPurchasePlan(@RequestBody PurchasePlan purchasePlan) { | 284 | public Result<PurchasePlanVO> auditPurchasePlan(@RequestBody PurchasePlanVO purchasePlanVO) { |
229 | Result<PurchasePlan> result = new Result<PurchasePlan>(); | 285 | Result<PurchasePlanVO> result = new Result<PurchasePlanVO>(); |
230 | try { | 286 | try { |
231 | purchasePlanService.auditPurchasePlan(purchasePlan); | 287 | purchasePlanService.auditPurchasePlan(purchasePlanVO); |
232 | } catch (Exception e) { | 288 | } catch (Exception e) { |
233 | log.error("审批失败",e.getMessage()); | 289 | log.error("审批失败",e.getMessage()); |
234 | result.setResult(purchasePlan); | 290 | result.setResult(purchasePlanVO); |
235 | result.setSuccess(true); | 291 | result.setSuccess(true); |
236 | } | 292 | } |
237 | return result; | 293 | return result; | ... | ... |
... | @@ -96,16 +96,5 @@ public class PurchasePlan implements Serializable{ | ... | @@ -96,16 +96,5 @@ public class PurchasePlan implements Serializable{ |
96 | @ApiModelProperty(value = "删除标识,0:有效,1:删除") | 96 | @ApiModelProperty(value = "删除标识,0:有效,1:删除") |
97 | private Integer delFlag; | 97 | private Integer delFlag; |
98 | 98 | ||
99 | @TableField(exist=false) | ||
100 | @ApiModelProperty(value = "删除标识,0:有效,1:删除") | ||
101 | private List<PurchasePlanItem> planItemList ; | ||
102 | 99 | ||
103 | /**审批人*/ | ||
104 | @TableField(exist=false) | ||
105 | @ApiModelProperty(value = "审批意见") | ||
106 | private String approveMessage; | ||
107 | /**审批状态*/ | ||
108 | @TableField(exist=false) | ||
109 | @ApiModelProperty(value = "审批状态 1通过2不通过") | ||
110 | private String approveState; | ||
111 | } | 100 | } | ... | ... |
... | @@ -38,7 +38,6 @@ public class PurchasePlanItem implements Serializable{ | ... | @@ -38,7 +38,6 @@ public class PurchasePlanItem implements Serializable{ |
38 | @ApiModelProperty(value = "物料类别编号") | 38 | @ApiModelProperty(value = "物料类别编号") |
39 | private String sparepartTypeId; | 39 | private String sparepartTypeId; |
40 | 40 | ||
41 | |||
42 | /**物料编号*/ | 41 | /**物料编号*/ |
43 | @Excel(name = "物料编号", width = 15) | 42 | @Excel(name = "物料编号", width = 15) |
44 | @ApiModelProperty(value = "物料编号") | 43 | @ApiModelProperty(value = "物料编号") |
... | @@ -63,13 +62,13 @@ public class PurchasePlanItem implements Serializable{ | ... | @@ -63,13 +62,13 @@ public class PurchasePlanItem implements Serializable{ |
63 | @Excel(name = "备注", width = 15) | 62 | @Excel(name = "备注", width = 15) |
64 | @ApiModelProperty(value = "备注") | 63 | @ApiModelProperty(value = "备注") |
65 | private String remarks; | 64 | private String remarks; |
66 | /**版本号*/ | ||
67 | @Excel(name = "版本号", width = 15) | ||
68 | @ApiModelProperty(value = "版本号") | ||
69 | private Integer versions; | ||
70 | 65 | ||
71 | 66 | ||
67 | @Excel(name = "去年出库数量", width = 15) | ||
68 | @ApiModelProperty(value = "去年出库数量") | ||
69 | private Integer outNum; | ||
72 | 70 | ||
71 | @Excel(name = "总价", width = 15) | ||
73 | @ApiModelProperty(value = "总价") | 72 | @ApiModelProperty(value = "总价") |
74 | private String totalPrice; | 73 | private String totalPrice; |
75 | 74 | ... | ... |
... | @@ -3,6 +3,7 @@ package com.skua.modules.erp.service; | ... | @@ -3,6 +3,7 @@ package com.skua.modules.erp.service; |
3 | import com.skua.modules.erp.entity.PurchasePlan; | 3 | import com.skua.modules.erp.entity.PurchasePlan; |
4 | import com.baomidou.mybatisplus.extension.service.IService; | 4 | import com.baomidou.mybatisplus.extension.service.IService; |
5 | import com.skua.modules.erp.entity.PurchasePlanItem; | 5 | import com.skua.modules.erp.entity.PurchasePlanItem; |
6 | import com.skua.modules.erp.vo.PurchasePlanVO; | ||
6 | 7 | ||
7 | import java.util.List; | 8 | import java.util.List; |
8 | 9 | ||
... | @@ -13,17 +14,17 @@ public interface IPurchasePlanService extends IService<PurchasePlan> { | ... | @@ -13,17 +14,17 @@ public interface IPurchasePlanService extends IService<PurchasePlan> { |
13 | 14 | ||
14 | /*** | 15 | /*** |
15 | * 新增 | 16 | * 新增 |
16 | * @param purchasePlan | 17 | * @param purchasePlanVO |
17 | * @return | 18 | * @return |
18 | */ | 19 | */ |
19 | public int savePurchasePlan(PurchasePlan purchasePlan); | 20 | public int savePurchasePlan(PurchasePlanVO purchasePlanVO); |
20 | 21 | ||
21 | /*** | 22 | /*** |
22 | * 修改 | 23 | * 修改 |
23 | * @param purchasePlan | 24 | * @param purchasePlanVO |
24 | * @return | 25 | * @return |
25 | */ | 26 | */ |
26 | public boolean updatePurchasePlan(PurchasePlan purchasePlan); | 27 | public boolean updatePurchasePlan(PurchasePlanVO purchasePlanVO); |
27 | 28 | ||
28 | /*** | 29 | /*** |
29 | * 删除 | 30 | * 删除 |
... | @@ -37,7 +38,7 @@ public interface IPurchasePlanService extends IService<PurchasePlan> { | ... | @@ -37,7 +38,7 @@ public interface IPurchasePlanService extends IService<PurchasePlan> { |
37 | * @param planId | 38 | * @param planId |
38 | * @return | 39 | * @return |
39 | */ | 40 | */ |
40 | public PurchasePlan queryById(String planId); | 41 | public PurchasePlanVO queryById(String planId); |
41 | 42 | ||
42 | /** | 43 | /** |
43 | * 根据编号获取采购清单集合 | 44 | * 根据编号获取采购清单集合 |
... | @@ -48,7 +49,7 @@ public interface IPurchasePlanService extends IService<PurchasePlan> { | ... | @@ -48,7 +49,7 @@ public interface IPurchasePlanService extends IService<PurchasePlan> { |
48 | 49 | ||
49 | /*** | 50 | /*** |
50 | * 审批 采购计划 | 51 | * 审批 采购计划 |
51 | * @param purchasePlan | 52 | * @param purchasePlanVO |
52 | */ | 53 | */ |
53 | public void auditPurchasePlan(PurchasePlan purchasePlan); | 54 | public void auditPurchasePlan(PurchasePlanVO purchasePlanVO); |
54 | } | 55 | } | ... | ... |
... | @@ -8,6 +8,8 @@ import com.skua.modules.erp.mapper.ApproveRecordMapper; | ... | @@ -8,6 +8,8 @@ import com.skua.modules.erp.mapper.ApproveRecordMapper; |
8 | import com.skua.modules.erp.mapper.PurchasePlanItemMapper; | 8 | import com.skua.modules.erp.mapper.PurchasePlanItemMapper; |
9 | import com.skua.modules.erp.mapper.PurchasePlanMapper; | 9 | import com.skua.modules.erp.mapper.PurchasePlanMapper; |
10 | import com.skua.modules.erp.service.IPurchasePlanService; | 10 | import com.skua.modules.erp.service.IPurchasePlanService; |
11 | import com.skua.modules.erp.vo.PurchasePlanVO; | ||
12 | import org.springframework.beans.BeanUtils; | ||
11 | import org.springframework.stereotype.Service; | 13 | import org.springframework.stereotype.Service; |
12 | 14 | ||
13 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | 15 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
... | @@ -29,15 +31,15 @@ public class PurchasePlanServiceImpl extends ServiceImpl<PurchasePlanMapper, Pur | ... | @@ -29,15 +31,15 @@ public class PurchasePlanServiceImpl extends ServiceImpl<PurchasePlanMapper, Pur |
29 | private ApproveRecordMapper recordMapper ; | 31 | private ApproveRecordMapper recordMapper ; |
30 | /*** | 32 | /*** |
31 | * 新增 | 33 | * 新增 |
32 | * @param purchasePlan | 34 | * @param purchasePlanVO |
33 | * @return | 35 | * @return |
34 | */ | 36 | */ |
35 | @Transactional | 37 | @Transactional |
36 | public int savePurchasePlan(PurchasePlan purchasePlan){ | 38 | public int savePurchasePlan(PurchasePlanVO purchasePlanVO){ |
37 | int count = this.baseMapper.insert( purchasePlan ); | 39 | int count = this.baseMapper.insert( purchasePlanVO ); |
38 | if(count > 0 && purchasePlan.getPlanItemList() != null && !purchasePlan.getPlanItemList().isEmpty()){ | 40 | if(count > 0 && purchasePlanVO.getPlanItemList() != null && !purchasePlanVO.getPlanItemList().isEmpty()){ |
39 | for(PurchasePlanItem planItem : purchasePlan.getPlanItemList()){ | 41 | for(PurchasePlanItem planItem : purchasePlanVO.getPlanItemList()){ |
40 | planItem.setPlanId( purchasePlan.getId() ); | 42 | planItem.setPlanId( purchasePlanVO.getId() ); |
41 | planItemMapper.insert( planItem ); | 43 | planItemMapper.insert( planItem ); |
42 | } | 44 | } |
43 | } | 45 | } |
... | @@ -46,19 +48,19 @@ public class PurchasePlanServiceImpl extends ServiceImpl<PurchasePlanMapper, Pur | ... | @@ -46,19 +48,19 @@ public class PurchasePlanServiceImpl extends ServiceImpl<PurchasePlanMapper, Pur |
46 | 48 | ||
47 | /*** | 49 | /*** |
48 | * 修改 | 50 | * 修改 |
49 | * @param purchasePlan | 51 | * @param purchasePlanVO |
50 | * @return | 52 | * @return |
51 | */ | 53 | */ |
52 | @Transactional | 54 | @Transactional |
53 | public boolean updatePurchasePlan(PurchasePlan purchasePlan){ | 55 | public boolean updatePurchasePlan(PurchasePlanVO purchasePlanVO){ |
54 | int count = this.baseMapper.updateById( purchasePlan ); | 56 | int count = this.baseMapper.updateById( purchasePlanVO ); |
55 | 57 | ||
56 | // ge根据计划编号删除清单集合 | 58 | // ge根据计划编号删除清单集合 |
57 | planItemMapper.delByPlanId(purchasePlan.getId() ) ; | 59 | planItemMapper.delByPlanId(purchasePlanVO.getId() ) ; |
58 | 60 | ||
59 | if( purchasePlan.getPlanItemList() != null && !purchasePlan.getPlanItemList().isEmpty()){ | 61 | if( purchasePlanVO.getPlanItemList() != null && !purchasePlanVO.getPlanItemList().isEmpty()){ |
60 | for(PurchasePlanItem planItem : purchasePlan.getPlanItemList()){ | 62 | for(PurchasePlanItem planItem : purchasePlanVO.getPlanItemList()){ |
61 | planItem.setPlanId( purchasePlan.getId() ); | 63 | planItem.setPlanId( purchasePlanVO.getId() ); |
62 | planItemMapper.insert( planItem ); | 64 | planItemMapper.insert( planItem ); |
63 | } | 65 | } |
64 | } | 66 | } |
... | @@ -84,15 +86,17 @@ public class PurchasePlanServiceImpl extends ServiceImpl<PurchasePlanMapper, Pur | ... | @@ -84,15 +86,17 @@ public class PurchasePlanServiceImpl extends ServiceImpl<PurchasePlanMapper, Pur |
84 | * @return | 86 | * @return |
85 | */ | 87 | */ |
86 | @Transactional | 88 | @Transactional |
87 | public PurchasePlan queryById(String planId){ | 89 | public PurchasePlanVO queryById(String planId){ |
88 | PurchasePlan purchasePlan = this.baseMapper.selectById( planId ); | 90 | PurchasePlan purchasePlan = this.baseMapper.selectById( planId ); |
91 | PurchasePlanVO purchasePlanVO = new PurchasePlanVO(); | ||
89 | 92 | ||
90 | List<PurchasePlanItem> planItemList = planItemMapper.queryListByPlanId( planId ); | ||
91 | if(purchasePlan != null ){ | 93 | if(purchasePlan != null ){ |
92 | purchasePlan.setPlanItemList( planItemList ); | 94 | BeanUtils.copyProperties(purchasePlan,purchasePlanVO); |
95 | List<PurchasePlanItem> planItemList = planItemMapper.queryListByPlanId( planId ); | ||
96 | purchasePlanVO.setPlanItemList( planItemList ); | ||
93 | } | 97 | } |
94 | 98 | ||
95 | return purchasePlan; | 99 | return purchasePlanVO; |
96 | } | 100 | } |
97 | 101 | ||
98 | /** | 102 | /** |
... | @@ -109,20 +113,29 @@ public class PurchasePlanServiceImpl extends ServiceImpl<PurchasePlanMapper, Pur | ... | @@ -109,20 +113,29 @@ public class PurchasePlanServiceImpl extends ServiceImpl<PurchasePlanMapper, Pur |
109 | * @param purchasePlan | 113 | * @param purchasePlan |
110 | */ | 114 | */ |
111 | @Transactional | 115 | @Transactional |
112 | public void auditPurchasePlan(PurchasePlan purchasePlan){ | 116 | public void auditPurchasePlan(PurchasePlanVO purchasePlanVO){ |
113 | 117 | ||
114 | //保存 | 118 | //保存 |
115 | //purchasePlan.getApproveState() 审批状态 1通过2不通过 | 119 | //purchasePlan.getApproveState() 审批状态 1通过2不通过 |
116 | if("1".equals( purchasePlan.getApproveState() )){ | 120 | if("1".equals( purchasePlanVO.getApproveState() )){ |
117 | purchasePlan.setStatus( "3" ); | 121 | purchasePlanVO.setStatus( "3" ); |
118 | } | 122 | } |
119 | if("2".equals( purchasePlan.getApproveState() )){ | 123 | if("2".equals( purchasePlanVO.getApproveState() )){ |
120 | purchasePlan.setStatus( "4" ); | 124 | purchasePlanVO.setStatus( "4" ); |
121 | } | 125 | } |
122 | 126 | ||
123 | this.baseMapper.updateById( purchasePlan ) ; | 127 | this.baseMapper.updateById( purchasePlanVO ) ; |
128 | // ge根据计划编号删除清单集合 | ||
129 | planItemMapper.delByPlanId(purchasePlanVO.getId() ) ; | ||
130 | |||
131 | if( purchasePlanVO.getPlanItemList() != null && !purchasePlanVO.getPlanItemList().isEmpty()){ | ||
132 | for(PurchasePlanItem planItem : purchasePlanVO.getPlanItemList()){ | ||
133 | planItem.setPlanId( purchasePlanVO.getId() ); | ||
134 | planItemMapper.insert( planItem ); | ||
135 | } | ||
136 | } | ||
124 | //审批记录 | 137 | //审批记录 |
125 | ApproveRecord record = new ApproveRecord( "CGJH", purchasePlan.getApplyUser(), purchasePlan.getId(), BaseContextHandler.getUserId(), purchasePlan.getApproveMessage(), purchasePlan.getApproveState()); | 138 | ApproveRecord record = new ApproveRecord( "CGJH", purchasePlanVO.getApplyUser(), purchasePlanVO.getId(), BaseContextHandler.getUserId(), purchasePlanVO.getApproveMessage(), purchasePlanVO.getApproveState()); |
126 | recordMapper.insert( record ) ; | 139 | recordMapper.insert( record ) ; |
127 | } | 140 | } |
128 | } | 141 | } | ... | ... |
1 | package com.skua.modules.erp.vo; | ||
2 | |||
3 | public enum ApproveType { | ||
4 | |||
5 | /** 已处理 */ | ||
6 | YCL("5"), | ||
7 | /** 处理中(已发起工单) */ | ||
8 | CLZ("3"), | ||
9 | /** 未处理 */ | ||
10 | NO("0") ; | ||
11 | |||
12 | //0 未发布、1 已发布(审核通知) 2 审核通过,3 审核驳回 | ||
13 | |||
14 | private String value; | ||
15 | private ApproveType(String code) { | ||
16 | this.value = code; | ||
17 | } | ||
18 | |||
19 | public String getValue() { | ||
20 | return value; | ||
21 | } | ||
22 | |||
23 | public void setStatusCode(String code) { | ||
24 | this.value = code; | ||
25 | } | ||
26 | } |
1 | package com.skua.modules.erp.vo; | ||
2 | |||
3 | import com.baomidou.mybatisplus.annotation.TableField; | ||
4 | import com.baomidou.mybatisplus.annotation.TableName; | ||
5 | import com.skua.core.aspect.annotation.Dict; | ||
6 | import com.skua.modules.erp.entity.PurchasePlan; | ||
7 | import com.skua.modules.erp.entity.PurchasePlanItem; | ||
8 | import io.swagger.annotations.ApiModel; | ||
9 | import io.swagger.annotations.ApiModelProperty; | ||
10 | import lombok.Data; | ||
11 | import lombok.EqualsAndHashCode; | ||
12 | import lombok.experimental.Accessors; | ||
13 | import org.jeecgframework.poi.excel.annotation.Excel; | ||
14 | |||
15 | import java.util.List; | ||
16 | |||
17 | /** | ||
18 | * erp采购计划表 | ||
19 | */ | ||
20 | @Data | ||
21 | @EqualsAndHashCode(callSuper = false) | ||
22 | @Accessors(chain = true) | ||
23 | @ApiModel(value="PurchasePlan查询对象", description="PurchasePlan查询对象") | ||
24 | public class PurchasePlanVO extends PurchasePlan { | ||
25 | |||
26 | @TableField(exist=false) | ||
27 | @ApiModelProperty(value = "采购计划物料清单集合") | ||
28 | private List<PurchasePlanItem> planItemList = null; | ||
29 | |||
30 | /**审批意见*/ | ||
31 | @TableField(exist=false) | ||
32 | @ApiModelProperty(value = "审批意见") | ||
33 | private String approveMessage; | ||
34 | /**审批状态*/ | ||
35 | @TableField(exist=false) | ||
36 | @ApiModelProperty(value = "审批状态 1通过2不通过") | ||
37 | private String approveState; | ||
38 | } |
1 | package com.skua.modules.equipment.mapper; | 1 | package com.skua.modules.equipment.mapper; |
2 | 2 | ||
3 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; | 3 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
4 | import com.baomidou.mybatisplus.core.metadata.IPage; | ||
5 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | ||
4 | import com.skua.modules.equipment.entity.EquipmentSparepart; | 6 | import com.skua.modules.equipment.entity.EquipmentSparepart; |
7 | import com.skua.modules.supplies.entity.EquipmentSparepartSupplies; | ||
5 | import org.apache.ibatis.annotations.Param; | 8 | import org.apache.ibatis.annotations.Param; |
6 | 9 | ||
7 | /** | 10 | /** |
... | @@ -10,4 +13,6 @@ import org.apache.ibatis.annotations.Param; | ... | @@ -10,4 +13,6 @@ import org.apache.ibatis.annotations.Param; |
10 | public interface EquipmentSparepartMapper extends BaseMapper<EquipmentSparepart> { | 13 | public interface EquipmentSparepartMapper extends BaseMapper<EquipmentSparepart> { |
11 | 14 | ||
12 | Integer updateStorageNumById(@Param("id") String id, @Param("storageNum") Double storageNum, @Param("version") Integer version); | 15 | Integer updateStorageNumById(@Param("id") String id, @Param("storageNum") Double storageNum, @Param("version") Integer version); |
16 | |||
17 | |||
13 | } | 18 | } | ... | ... |
sk-module-equipment/src/main/java/com/skua/modules/equipment/service/IEquipmentSparepartService.java
1 | package com.skua.modules.equipment.service; | 1 | package com.skua.modules.equipment.service; |
2 | 2 | ||
3 | import com.baomidou.mybatisplus.core.metadata.IPage; | ||
4 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | ||
3 | import com.baomidou.mybatisplus.extension.service.IService; | 5 | import com.baomidou.mybatisplus.extension.service.IService; |
4 | import com.skua.modules.equipment.entity.EquipmentSparepart; | 6 | import com.skua.modules.equipment.entity.EquipmentSparepart; |
7 | import com.skua.modules.supplies.entity.EquipmentSparepartSupplies; | ||
5 | 8 | ||
6 | /** | 9 | /** |
7 | * 备品备件表 | 10 | * 备品备件表 |
... | @@ -10,4 +13,5 @@ public interface IEquipmentSparepartService extends IService<EquipmentSparepart> | ... | @@ -10,4 +13,5 @@ public interface IEquipmentSparepartService extends IService<EquipmentSparepart> |
10 | 13 | ||
11 | Integer updateStorageNumById(String id, Double storageNum, Integer version); | 14 | Integer updateStorageNumById(String id, Double storageNum, Integer version); |
12 | 15 | ||
16 | |||
13 | } | 17 | } | ... | ... |
1 | package com.skua.modules.equipment.service.impl; | 1 | package com.skua.modules.equipment.service.impl; |
2 | 2 | ||
3 | import com.baomidou.mybatisplus.core.metadata.IPage; | ||
4 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | ||
3 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | 5 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
4 | import com.skua.modules.equipment.entity.EquipmentSparepart; | 6 | import com.skua.modules.equipment.entity.EquipmentSparepart; |
5 | import com.skua.modules.equipment.mapper.EquipmentSparepartMapper; | 7 | import com.skua.modules.equipment.mapper.EquipmentSparepartMapper; |
6 | import com.skua.modules.equipment.service.IEquipmentSparepartService; | 8 | import com.skua.modules.equipment.service.IEquipmentSparepartService; |
9 | import com.skua.modules.supplies.entity.EquipmentSparepartSupplies; | ||
7 | import org.springframework.stereotype.Service; | 10 | import org.springframework.stereotype.Service; |
8 | 11 | ||
9 | /** | 12 | /** |
... | @@ -17,4 +20,6 @@ public class EquipmentSparepartServiceImpl extends ServiceImpl<EquipmentSparepar | ... | @@ -17,4 +20,6 @@ public class EquipmentSparepartServiceImpl extends ServiceImpl<EquipmentSparepar |
17 | return baseMapper.updateStorageNumById(id, storageNum, version); | 20 | return baseMapper.updateStorageNumById(id, storageNum, version); |
18 | } | 21 | } |
19 | 22 | ||
23 | |||
24 | |||
20 | } | 25 | } | ... | ... |
... | @@ -247,4 +247,13 @@ public class EquipmentSparepartSupplies { | ... | @@ -247,4 +247,13 @@ public class EquipmentSparepartSupplies { |
247 | @Dict(dicCode = "yn") | 247 | @Dict(dicCode = "yn") |
248 | private String isDangerous; | 248 | private String isDangerous; |
249 | 249 | ||
250 | |||
251 | |||
252 | @ApiModelProperty(value = "物料类别名称") | ||
253 | @TableField(exist=false) | ||
254 | private String sparepartTypeName; | ||
255 | |||
256 | @ApiModelProperty(value = "去年出库数量") | ||
257 | @TableField(exist=false) | ||
258 | private String outNum; | ||
250 | } | 259 | } | ... | ... |
... | @@ -2,6 +2,8 @@ package com.skua.modules.supplies.mapper; | ... | @@ -2,6 +2,8 @@ package com.skua.modules.supplies.mapper; |
2 | 2 | ||
3 | import java.util.List; | 3 | import java.util.List; |
4 | 4 | ||
5 | import com.baomidou.mybatisplus.core.metadata.IPage; | ||
6 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | ||
5 | import org.apache.ibatis.annotations.Param; | 7 | import org.apache.ibatis.annotations.Param; |
6 | import com.skua.modules.supplies.entity.EquipmentSparepartSupplies; | 8 | import com.skua.modules.supplies.entity.EquipmentSparepartSupplies; |
7 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; | 9 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
... | @@ -10,5 +12,11 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; | ... | @@ -10,5 +12,11 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
10 | * 物料信息表 | 12 | * 物料信息表 |
11 | */ | 13 | */ |
12 | public interface EquipmentSparepartSuppliesMapper extends BaseMapper<EquipmentSparepartSupplies> { | 14 | public interface EquipmentSparepartSuppliesMapper extends BaseMapper<EquipmentSparepartSupplies> { |
13 | 15 | /*** | |
16 | * 物料列表+去年出库 | ||
17 | * @param page | ||
18 | * @param depId | ||
19 | * @return | ||
20 | */ | ||
21 | public IPage<EquipmentSparepartSupplies> queryPageByOut(Page<EquipmentSparepartSupplies> page, String depId); | ||
14 | } | 22 | } | ... | ... |
... | @@ -2,7 +2,7 @@ | ... | @@ -2,7 +2,7 @@ |
2 | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | 2 | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
3 | <mapper namespace="com.skua.modules.supplies.mapper.EquipmentSparepartSuppliesInspectMapper"> | 3 | <mapper namespace="com.skua.modules.supplies.mapper.EquipmentSparepartSuppliesInspectMapper"> |
4 | 4 | ||
5 | <select id="pageQuery" resultType="com.skua.modules.supplies.vo.EquipmentSuppliesInspectQueryVO"> | 5 | <select id="" resultType="com.skua.modules.supplies.vo.EquipmentSuppliesInspectQueryVO"> |
6 | select | 6 | select |
7 | inspect.id, | 7 | inspect.id, |
8 | inspect.inspect_order inspectOrder, | 8 | inspect.inspect_order inspectOrder, | ... | ... |
... | @@ -2,4 +2,16 @@ | ... | @@ -2,4 +2,16 @@ |
2 | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | 2 | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
3 | <mapper namespace="com.skua.modules.supplies.mapper.EquipmentSparepartSuppliesMapper"> | 3 | <mapper namespace="com.skua.modules.supplies.mapper.EquipmentSparepartSuppliesMapper"> |
4 | 4 | ||
5 | <!-- 物料列表+去年出库 --> | ||
6 | <select id="queryPageByOut" resultType="com.skua.modules.supplies.entity.EquipmentSparepartSupplies"> | ||
7 | select st.item_text 'sparepart_type_name' , aaa.out_num, ss.* from equipment_sparepart_supplies ss | ||
8 | left join equipment_sparepart_type st on ss.sparepart_type = st.id | ||
9 | |||
10 | left join ( | ||
11 | select sum(out_num) out_num ,sparepart_id from equipment_out_child | ||
12 | where | ||
13 | YEAR(create_time) = YEAR(CURRENT_DATE - INTERVAL 1 YEAR) | ||
14 | group by sparepart_id | ||
15 | ) aaa on aaa.sparepart_id = ss.id | ||
16 | </select> | ||
5 | </mapper> | 17 | </mapper> |
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
1 | package com.skua.modules.supplies.service; | 1 | package com.skua.modules.supplies.service; |
2 | 2 | ||
3 | import com.baomidou.mybatisplus.core.metadata.IPage; | ||
4 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | ||
3 | import com.skua.modules.supplies.entity.EquipmentSparepartSupplies; | 5 | import com.skua.modules.supplies.entity.EquipmentSparepartSupplies; |
4 | import com.baomidou.mybatisplus.extension.service.IService; | 6 | import com.baomidou.mybatisplus.extension.service.IService; |
5 | 7 | ||
... | @@ -7,5 +9,11 @@ import com.baomidou.mybatisplus.extension.service.IService; | ... | @@ -7,5 +9,11 @@ import com.baomidou.mybatisplus.extension.service.IService; |
7 | * 物料信息表 | 9 | * 物料信息表 |
8 | */ | 10 | */ |
9 | public interface IEquipmentSparepartSuppliesService extends IService<EquipmentSparepartSupplies> { | 11 | public interface IEquipmentSparepartSuppliesService extends IService<EquipmentSparepartSupplies> { |
10 | 12 | /*** | |
13 | * 物料列表+去年出库 | ||
14 | * @param page | ||
15 | * @param depId | ||
16 | * @return | ||
17 | */ | ||
18 | public IPage<EquipmentSparepartSupplies> queryPageByOut(Page<EquipmentSparepartSupplies> page, String depId); | ||
11 | } | 19 | } | ... | ... |
1 | package com.skua.modules.supplies.service.impl; | 1 | package com.skua.modules.supplies.service.impl; |
2 | 2 | ||
3 | import com.baomidou.mybatisplus.core.metadata.IPage; | ||
4 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | ||
3 | import com.skua.modules.supplies.entity.EquipmentSparepartSupplies; | 5 | import com.skua.modules.supplies.entity.EquipmentSparepartSupplies; |
4 | import com.skua.modules.supplies.mapper.EquipmentSparepartSuppliesMapper; | 6 | import com.skua.modules.supplies.mapper.EquipmentSparepartSuppliesMapper; |
5 | import com.skua.modules.supplies.service.IEquipmentSparepartSuppliesService; | 7 | import com.skua.modules.supplies.service.IEquipmentSparepartSuppliesService; |
... | @@ -12,5 +14,13 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | ... | @@ -12,5 +14,13 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
12 | */ | 14 | */ |
13 | @Service | 15 | @Service |
14 | public class EquipmentSparepartSuppliesServiceImpl extends ServiceImpl<EquipmentSparepartSuppliesMapper, EquipmentSparepartSupplies> implements IEquipmentSparepartSuppliesService { | 16 | public class EquipmentSparepartSuppliesServiceImpl extends ServiceImpl<EquipmentSparepartSuppliesMapper, EquipmentSparepartSupplies> implements IEquipmentSparepartSuppliesService { |
15 | 17 | /*** | |
18 | * 物料列表+去年出库 | ||
19 | * @param page | ||
20 | * @param depId | ||
21 | * @return | ||
22 | */ | ||
23 | public IPage<EquipmentSparepartSupplies> queryPageByOut(Page<EquipmentSparepartSupplies> page, String depId){ | ||
24 | return baseMapper.queryPageByOut(page,depId); | ||
25 | } | ||
16 | } | 26 | } | ... | ... |
-
请 注册 或 登录 后发表评论