| | |
| | | import com.vincent.rsf.framework.common.R; |
| | | import com.vincent.rsf.framework.exception.CoolException; |
| | | import com.vincent.rsf.server.api.entity.dto.PoItemsDto; |
| | | import com.vincent.rsf.server.api.service.ReceiveMsgService; |
| | | import com.vincent.rsf.server.api.service.ReportMsgService; |
| | | import com.vincent.rsf.server.common.utils.DateUtils; |
| | | import com.vincent.rsf.server.manager.controller.dto.DashboardDto; |
| | |
| | | import com.vincent.rsf.server.manager.entity.*; |
| | | import com.vincent.rsf.server.manager.enums.*; |
| | | import com.vincent.rsf.server.manager.mapper.AsnOrderMapper; |
| | | import com.vincent.rsf.server.manager.mapper.TaskMapper; |
| | | import com.vincent.rsf.server.manager.service.*; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.vincent.rsf.server.system.constant.SerialRuleCode; |
| | |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.annotation.Resource; |
| | | import jakarta.annotation.Resource; |
| | | import java.text.DateFormat; |
| | | import java.text.ParsePosition; |
| | | import java.text.SimpleDateFormat; |
| | |
| | | @Service("asnOrderService") |
| | | public class AsnOrderServiceImpl extends ServiceImpl<AsnOrderMapper, WkOrder> implements AsnOrderService { |
| | | |
| | | @Autowired |
| | | private ReceiveMsgService receiveMsgService; |
| | | @Autowired |
| | | private ReportMsgService reportMsgService; |
| | | |
| | |
| | | @Autowired |
| | | private PurchaseItemService purchaseItemService; |
| | | @Autowired |
| | | private AsnOrderService asnOrderService; |
| | | @Autowired |
| | | private TaskService taskService; |
| | | private TaskMapper taskMapper; |
| | | |
| | | @Override |
| | | public boolean notifyInspect(List<WkOrder> orders) { |
| | |
| | | if (Objects.isNull(order)) { |
| | | throw new CoolException("修改参数不能为空!!"); |
| | | } |
| | | return this.update(new LambdaUpdateWrapper<WkOrder>() |
| | | .in(WkOrder::getId, params.getIds()) |
| | | .set(!Objects.isNull(order.getRleStatus()), WkOrder::getRleStatus, order.getRleStatus()) |
| | | .set(!Objects.isNull(order.getNtyStatus()), WkOrder::getNtyStatus, order.getNtyStatus()) |
| | | .set(!Objects.isNull(order.getStatus()), WkOrder::getStatus, order.getStatus()) |
| | | .set(!Objects.isNull(order.getWkType()), WkOrder::getWkType, order.getWkType()) |
| | | .set(!Objects.isNull(order.getExceStatus()), WkOrder::getExceStatus, order.getExceStatus()) |
| | | .set(WkOrder::getUpdateBy, userId)); |
| | | List<WkOrder> orders = this.listByIds(params.getIds()); |
| | | if (orders.isEmpty()) { |
| | | return false; |
| | | } |
| | | for (WkOrder current : orders) { |
| | | if (!Objects.isNull(order.getRleStatus())) { |
| | | current.setRleStatus(order.getRleStatus()); |
| | | } |
| | | if (!Objects.isNull(order.getNtyStatus())) { |
| | | current.setNtyStatus(order.getNtyStatus()); |
| | | } |
| | | if (!Objects.isNull(order.getStatus())) { |
| | | current.setStatus(order.getStatus()); |
| | | } |
| | | if (!Objects.isNull(order.getWkType())) { |
| | | current.setWkType(order.getWkType()); |
| | | } |
| | | if (!Objects.isNull(order.getExceStatus())) { |
| | | current.setExceStatus(order.getExceStatus()); |
| | | } |
| | | current.setUpdateBy(userId); |
| | | if (!this.updateById(current)) { |
| | | throw new CoolException("批量修改失败!!"); |
| | | } |
| | | } |
| | | return true; |
| | | } |
| | | |
| | | /** |
| | |
| | | dto.setOutAnf(outTrand.getAnfme()).setTaskOut(outTrand.getRealAnfme()).setTotalOut(outTrand.getAnfme() + outTrand.getRealAnfme()); |
| | | |
| | | //获取执行中任务数量 |
| | | List<Task> tasks = taskService.list(new LambdaQueryWrapper<>()); |
| | | List<Task> tasks = taskMapper.selectList(new LambdaQueryWrapper<>()); |
| | | if (!tasks.isEmpty()) { |
| | | outTrand.setTaskQty(tasks.size()); |
| | | dto.setTaskQty(tasks.size()); |
| | | } |
| | | return R.ok().add(dto); |
| | | } |