订单历史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.ApmsCheckResult;
import com.mt.wms.core.dal.entity.CurrTaskDet; import com.mt.wms.core.dal.entity.CurrTaskDet;
import com.mt.wms.core.dal.entity.OrderInfo; 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.ApmsCheckResultServiceBiz;
import com.mt.wms.core.dal.service.CommunicationLogServiceBiz; 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.dal.service.OrderInfoServiceBiz;
import com.mt.wms.core.enums.WhetherEnum; import com.mt.wms.core.enums.WhetherEnum;
import com.mt.wms.core.params.IdParam; import com.mt.wms.core.params.IdParam;
@ -81,6 +83,8 @@ public class OrderInfoServiceImpl extends BaseService implements OrderInfoServic
ApmsCheckResultServiceBiz apmsCheckResultServiceBiz; ApmsCheckResultServiceBiz apmsCheckResultServiceBiz;
@Autowired @Autowired
ApmsController apmsControl; ApmsController apmsControl;
@Autowired
OrderInfoHisServiceBiz orderInfoHisServiceBiz;
private void setCommon(OrderInfo communicationLog) { private void setCommon(OrderInfo communicationLog) {
communicationLog.setValid(WhetherEnum.YES.getValue()); communicationLog.setValid(WhetherEnum.YES.getValue());
@ -117,8 +121,7 @@ public class OrderInfoServiceImpl extends BaseService implements OrderInfoServic
.orderByDesc(OrderInfo.CREATE_TIME); .orderByDesc(OrderInfo.CREATE_TIME);
Page<OrderInfo> page = orderInfoService.page(new Page<>(param.getCurrent(), param.getSize()), wrapper); Page<OrderInfo> page = orderInfoService.page(new Page<>(param.getCurrent(), param.getSize()), wrapper);
PageVo<OrderInfoVo> orderInfoVoPageVo = new PageVo<>(page, OrderInfoVo.class); PageVo<OrderInfoVo> orderInfoVoPageVo = new PageVo<>(page, OrderInfoVo.class);
orderInfoVoPageVo.getRecords().forEach(e -> for (OrderInfoVo e : orderInfoVoPageVo.getRecords()) {
{
R<OrderInfoVo> info = getTaskInfoByIdenCardNum(e.getIdenCardNum()); R<OrderInfoVo> info = getTaskInfoByIdenCardNum(e.getIdenCardNum());
e.setFinishWeight(info.getData().getFinishWeight()); e.setFinishWeight(info.getData().getFinishWeight());
e.setFinishQuantity(info.getData().getFinishQuantity()); e.setFinishQuantity(info.getData().getFinishQuantity());
@ -133,8 +136,12 @@ public class OrderInfoServiceImpl extends BaseService implements OrderInfoServic
OrderInfo orderInfo = orderInfoService.getById(e.getId()); OrderInfo orderInfo = orderInfoService.getById(e.getId());
orderInfo.setStatus(2); orderInfo.setStatus(2);
orderInfoService.updateById(orderInfo); orderInfoService.updateById(orderInfo);
OrderInfoHis orderInfoHis=new OrderInfoHis();
BeanUtils.copyProperties(orderInfo, orderInfoHis);
orderInfoHisServiceBiz.save(orderInfoHis);
}
} }
});
return successful(orderInfoVoPageVo); 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 minDistance=(((rgvCurrPosition<startDistance)?rgvCurrPosition:startDistance)<endDistance)?((rgvCurrPosition<startDistance)?rgvCurrPosition:startDistance):endDistance;
Double maxDistance=(((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米 //另一辆小车在在小车路径上比如冲突不在小车路径上时判定一下安全距离4米
if (otherNowPosition>=minDistance&&otherNowPosition<=maxDistance){ if (otherNowPosition>=minDistance&&otherNowPosition<=maxDistance){
return true; return true;

View File

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