| | |
| | | package com.mes.md.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.github.yulichang.base.MPJBaseServiceImpl; |
| | | import com.mes.md.entity.PrimitiveTask; |
| | | import com.mes.md.mapper.PrimitiveTaskMapper; |
| | | import com.mes.md.service.PrimitiveTaskService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | @Service |
| | | public class PrimitiveTaskServiceImpl extends MPJBaseServiceImpl<PrimitiveTaskMapper, PrimitiveTask> implements PrimitiveTaskService { |
| | | |
| | | @Override |
| | | public boolean updateReportCount(String scanId) { |
| | | //更新报工数量 |
| | | UpdateWrapper<PrimitiveTask> wrapper = new UpdateWrapper<>(); |
| | | wrapper.eq("scan_id", scanId) |
| | | .set("report_count",1); |
| | | return update(wrapper); |
| | | } |
| | | |
| | | @Override |
| | | public boolean updatePrimitiveTask(PrimitiveTask task) { |
| | | //手动报工更改数量 |
| | | UpdateWrapper<PrimitiveTask> wrapper = new UpdateWrapper<>(); |
| | | wrapper.eq("batch_number", task.getBatchNumber()) |
| | | .set("report_count", task.getReportCount()); |
| | | return update(wrapper); |
| | | } |
| | | |
| | | @Override |
| | | public List<PrimitiveTask> selectPrimitiveTask(PrimitiveTask task) { |
| | | //查询报工数据 |
| | | return list(new QueryWrapper<>(task)) ; |
| | | } |
| | | } |