| | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.github.pagehelper.PageHelper; |
| | | import com.github.pagehelper.PageInfo; |
| | | import com.whyc.dto.FileDirPath; |
| | |
| | | PageInfo pageInfo = new PageInfo(list); |
| | | return new Response().setII(1,list.size()>0,pageInfo,"接收者反馈"); |
| | | } |
| | | //接收者确认反馈 |
| | | public Response setconfirmFk(int id) { |
| | | |
| | | /** |
| | | * 接收者确认反馈 |
| | | * |
| | | * @param feedback |
| | | * @return |
| | | */ |
| | | public Response confirmFeedback(BOMFeedback feedback) { |
| | | String msg=""; |
| | | boolean bl=true; |
| | | int id = feedback.getId(); |
| | | Integer confirmStatus = feedback.getConfirmStatus(); |
| | | String replyContent = feedback.getReplyContent(); |
| | | Date now = new Date(); |
| | | if(confirmStatus == 1){ //与我无关 |
| | | feedback.setReplyContent("系统默认生成回复:与我无关"); |
| | | } |
| | | //1.确认前先判断反馈是否被确认 |
| | | QueryWrapper qwrapper=new QueryWrapper(); |
| | | qwrapper.eq("id",id); |
| | | qwrapper.eq("confirm_status",1); |
| | | List list=mapper.selectList(qwrapper); |
| | | QueryWrapper<BOMFeedback> queryWrapper=new QueryWrapper<>(); |
| | | queryWrapper.eq("id",id); |
| | | queryWrapper.ne("confirm_status",0); |
| | | List list=mapper.selectList(queryWrapper); |
| | | if(list!=null&&list.size()>0){ |
| | | msg="该反馈已被确认"; |
| | | bl=false; |
| | | }else{ |
| | | //2.确认反馈 |
| | | UpdateWrapper wrapper=new UpdateWrapper(); |
| | | wrapper.set("confirm_status",1); |
| | | UpdateWrapper<BOMFeedback> wrapper=new UpdateWrapper<>(); |
| | | wrapper.set("confirm_status",confirmStatus); |
| | | wrapper.set("confirm_user_name",ActionUtil.getUser().getName()); |
| | | wrapper.set("reply_content",replyContent); |
| | | wrapper.set("reply_time",now); |
| | | wrapper.eq("id",id); |
| | | int count=mapper.update(null,wrapper); |
| | | bl=count>0; |
| | |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | public Response updateEcrNumber(int id, String ecrNumber) { |
| | | UpdateWrapper<BOMFeedback> update = Wrappers.update(); |
| | | update.set("ecr_number",ecrNumber).set("confirm_status",3).eq("id",id); |
| | | mapper.update(null, update); |
| | | return new Response().set(1,true,"上传完成"); |
| | | } |
| | | } |