订单历史bug修改
This commit is contained in:
lgh 2022-08-03 21:16:20 +08:00
parent 2741a7aa6e
commit 7812f248a2
3 changed files with 22 additions and 6 deletions

View File

@ -14,8 +14,10 @@ import com.mt.wms.core.base.BaseService;
import com.mt.wms.core.dal.entity.ApmsCheckResult;
import com.mt.wms.core.dal.entity.CurrTaskDet;
import com.mt.wms.core.dal.entity.OrderInfo;
import com.mt.wms.core.dal.entity.OrderInfoHis;
import com.mt.wms.core.dal.service.ApmsCheckResultServiceBiz;
import com.mt.wms.core.dal.service.CommunicationLogServiceBiz;
import com.mt.wms.core.dal.service.OrderInfoHisServiceBiz;
import com.mt.wms.core.dal.service.OrderInfoServiceBiz;
import com.mt.wms.core.enums.WhetherEnum;
import com.mt.wms.core.params.IdParam;
@ -81,6 +83,8 @@ public class OrderInfoServiceImpl extends BaseService implements OrderInfoServic
ApmsCheckResultServiceBiz apmsCheckResultServiceBiz;
@Autowired
ApmsController apmsControl;
@Autowired
OrderInfoHisServiceBiz orderInfoHisServiceBiz;
private void setCommon(OrderInfo communicationLog) {
communicationLog.setValid(WhetherEnum.YES.getValue());
@ -117,8 +121,7 @@ public class OrderInfoServiceImpl extends BaseService implements OrderInfoServic
.orderByDesc(OrderInfo.CREATE_TIME);
Page<OrderInfo> page = orderInfoService.page(new Page<>(param.getCurrent(), param.getSize()), wrapper);
PageVo<OrderInfoVo> orderInfoVoPageVo = new PageVo<>(page, OrderInfoVo.class);
orderInfoVoPageVo.getRecords().forEach(e ->
{
for (OrderInfoVo e : orderInfoVoPageVo.getRecords()) {
R<OrderInfoVo> info = getTaskInfoByIdenCardNum(e.getIdenCardNum());
e.setFinishWeight(info.getData().getFinishWeight());
e.setFinishQuantity(info.getData().getFinishQuantity());
@ -126,15 +129,19 @@ public class OrderInfoServiceImpl extends BaseService implements OrderInfoServic
e.setWaitQuantity(info.getData().getWaitQuantity());
e.setReProcessQuantity(info.getData().getReProcessQuantity());
e.setReProcessWeight(info.getData().getReProcessWeight());
e.setSurplusQuantity(e.getQuantity()-e.getFinishQuantity()-e.getWaitQuantity());
e.setSurplusWeight(e.getWeight()-e.getFinishWeight()-e.getWaitWeight());
e.setSurplusQuantity(e.getQuantity() - e.getFinishQuantity() - e.getWaitQuantity());
e.setSurplusWeight(e.getWeight() - e.getFinishWeight() - e.getWaitWeight());
//当完成数量等于总数量且完成重量等于总重量时订单状态置为2
if (e.getQuantity().equals(e.getFinishQuantity())&&e.getWeight().equals(e.getFinishWeight())){
if (e.getQuantity().equals(e.getFinishQuantity()) && e.getWeight().equals(e.getFinishWeight())) {
OrderInfo orderInfo = orderInfoService.getById(e.getId());
orderInfo.setStatus(2);
orderInfoService.updateById(orderInfo);
OrderInfoHis orderInfoHis=new OrderInfoHis();
BeanUtils.copyProperties(orderInfo, orderInfoHis);
orderInfoHisServiceBiz.save(orderInfoHis);
}
});
}
return successful(orderInfoVoPageVo);
}

View File

@ -114,6 +114,9 @@ public class TaskDistanceUtils {
//小车当前位置起点终点找出最大最小值
Double minDistance=(((rgvCurrPosition<startDistance)?rgvCurrPosition:startDistance)<endDistance)?((rgvCurrPosition<startDistance)?rgvCurrPosition:startDistance):endDistance;
Double maxDistance=(((rgvCurrPosition>startDistance)?rgvCurrPosition:startDistance)>endDistance)?((rgvCurrPosition>startDistance)?rgvCurrPosition:startDistance):endDistance;
logger.info("min"+minDistance);
logger.info("max"+maxDistance);
logger.info("other"+otherNowPosition);
//另一辆小车在在小车路径上比如冲突不在小车路径上时判定一下安全距离4米
if (otherNowPosition>=minDistance&&otherNowPosition<=maxDistance){
return true;

View File

@ -82,4 +82,10 @@ public class TaskHisQueryVo extends BaseVo implements PageVo.ConvertVo {
*/
@ApiModelProperty("加工单号")
private String sheetNo;
/**
* 加工单号
*/
@ApiModelProperty("加工单号")
private Long taskId;
}