update:
订单历史bug修改
This commit is contained in:
parent
2741a7aa6e
commit
7812f248a2
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
|
@ -82,4 +82,10 @@ public class TaskHisQueryVo extends BaseVo implements PageVo.ConvertVo {
|
||||
*/
|
||||
@ApiModelProperty("加工单号")
|
||||
private String sheetNo;
|
||||
|
||||
/**
|
||||
* 加工单号
|
||||
*/
|
||||
@ApiModelProperty("加工单号")
|
||||
private Long taskId;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user