提交 bb6410d3 作者: “chaining”

feat:

1. getWorkTask接口返回订单状态key以及是否可以点击申请墙盒
2. 墙盒申请修改增加是否存在订单校验
父级 78148381
......@@ -153,6 +153,11 @@ public class OrderPO implements Serializable {
@EnumConvert()
private Integer status;
@Column(name = "status")
@ApiModelProperty(value = "订单状态编码")
private Integer statusKey;
@Column(name = "type")
@ApiModelProperty(value = "类型 1:普通订单 2:移桩订单")
@EnumConvert()
......
......@@ -58,6 +58,7 @@ import com.boco.nbd.wios.manage.entity.cams.enums.OrderStatus;
import com.boco.nbd.wios.manage.entity.cams.enums.OverTimeType;
import com.boco.nbd.wios.manage.entity.cams.enums.UploadFileType;
import com.boco.nbd.wios.manage.entity.common.bo.UploadFile;
import com.boco.nbd.wios.manage.mapper.def.WallboxApplyMapper;
import com.boco.nbd.wios.wx.entity.bo.MinaOrderBO;
import com.boco.nbd.wios.wx.entity.bo.MinaOrderTrack;
import com.deepoove.poi.data.PictureRenderData;
......@@ -123,6 +124,9 @@ public class OrderServiceImpl extends BaseDaoService3<OrderPO, FlowOrderMapper>
@Autowired
INoticeService noticeService;
@Autowired
private WallboxApplyMapper wallboxApplyMapper;
/**
* 枚举转换字段
*/
......@@ -287,6 +291,7 @@ public class OrderServiceImpl extends BaseDaoService3<OrderPO, FlowOrderMapper>
order = new OrderPO();
}
BeanUtil.copyProperties(order, bo);
order.setStatusKey(order.getStatus());
//状态
bo.setStatusStr(order.getStatus() == null ? "" : OrderStatus.getText(order.getStatus()));
bo.setElectricExpand(order.getElectricExpandTime() != null);
......@@ -324,6 +329,7 @@ public class OrderServiceImpl extends BaseDaoService3<OrderPO, FlowOrderMapper>
for (WorkTaskInfo item : response.getWorkTaskList()) {
Map<String, Object> map = ProcessUtil.getFilterFields(item, filterFieldsBO, createEnumMap());
OrderPO order = orders.get(item.getWorkId());
if (order == null) {
order = new OrderPO();
}
......@@ -336,12 +342,20 @@ public class OrderServiceImpl extends BaseDaoService3<OrderPO, FlowOrderMapper>
//个性处理运行时长
order.setRunTimeValue();
}
order.setStatusKey(order.getStatus());
//order中保留关闭节点的nodeFlag
order.setNodeFlag(Convert.toInt(item.getNodeFlag()));
map.putAll(ProcessUtil.getFilterFields(order, filterFieldsBO, createEnumMap()));
//区域字段个性处理
map.put(WiosConstant.AREA_FIELD, order.findAreaName());
map.put(WiosConstant.REGION_ID, order.findAreaId());
map.put("statusKey", order.getStatus());
WallboxApply cond = new WallboxApply();
cond.setOrderId(order.getId());
//判断该订单是否为审核通过
cond.setCheckStatus(2L);
long count = wallboxApplyMapper.selectWallboxApplyList(cond).stream().count();
map.put("isApply", count > 0 ? 1 : 0);
//是否电力报装
map.put(LambdaUtils.getFieldName(OrderPO::getElectricExpand), order.getElectricExpandTime() != null);
//转派处理
......
......@@ -179,7 +179,9 @@ public class WallboxApplyService {
// if (!CHECK_STATUS_REJECT.equals(record.getCheckStatus())) {
// throw new ServiceException("非驳回状态订单无法修改信息!");
// }
validateApplyExists(wallboxApply.getOrderId());
wallboxApply.setCheckTime(new Date());
wallboxApply.setCheckStatus(1L);
return wallboxApplyMapper.updateWallboxApply(wallboxApply);
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论