| | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.fzzy.igds.constant.InoutConstant; |
| | | import com.fzzy.igds.mapper.InoutNoticeInMapper; |
| | | import com.fzzy.igds.mapper.InoutNoticeOutMapper; |
| | | import com.fzzy.igds.utils.ContextUtil; |
| | | import com.fzzy.igds.utils.DateUtil; |
| | | import com.fzzy.work.data.OrderStatus; |
| | | import com.fzzy.work.data.WorkStatus; |
| | | import com.fzzy.work.data.WorkBizType; |
| | | import com.fzzy.work.data.WorkOrderParam; |
| | | import com.fzzy.work.domain.WorkOrder; |
| | |
| | | public class WorkOrderService { |
| | | @Resource |
| | | private WorkOrderMapper workOrderMapper; |
| | | |
| | | @Resource |
| | | private InoutNoticeInMapper noticeInMapper; |
| | | @Resource |
| | | private InoutNoticeOutMapper noticeOutMapper; |
| | | |
| | | |
| | | public void addData(WorkOrder data) { |
| | |
| | | |
| | | public List<SysDictData> triggerStatus() { |
| | | List<SysDictData> list = new ArrayList<SysDictData>(); |
| | | for (OrderStatus w : OrderStatus.values()) { |
| | | for (WorkStatus w : WorkStatus.values()) { |
| | | list.add(new SysDictData(w.getMsg(), w.getCode())); |
| | | } |
| | | return list; |
| | |
| | | if(null == orderId) return null; |
| | | return workOrderMapper.selectById(orderId); |
| | | } |
| | | |
| | | public void complete(WorkOrder work) { |
| | | //更新工单状态 |
| | | workOrderMapper.updateStatus(work.getId(), work.getStatus()); |
| | | |
| | | //更新入库通知单状态 |
| | | if (work.getBizType().equals(WorkBizType.TYPE_10.getCode())) { |
| | | noticeInMapper.auditComplete(work.getBusinessId(), work.getStatus()); |
| | | } |
| | | |
| | | //更新入库通知单状态 |
| | | if (work.getBizType().equals(WorkBizType.TYPE_20.getCode())) { |
| | | noticeOutMapper.auditComplete(work.getBusinessId(), work.getStatus()); |
| | | } |
| | | } |
| | | } |