提交 bb6410d3 作者: “chaining”

feat:

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