|
@@ -160,6 +160,7 @@ public class RtuCheckOrderController extends BladeController {
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* 新工单列表
|
|
* 新工单列表
|
|
|
|
|
+ *
|
|
|
* @param checkOrderInfoDTO
|
|
* @param checkOrderInfoDTO
|
|
|
* @return
|
|
* @return
|
|
|
*/
|
|
*/
|
|
@@ -387,6 +388,7 @@ public class RtuCheckOrderController extends BladeController {
|
|
|
@ApiOperationSupport(order = 4)
|
|
@ApiOperationSupport(order = 4)
|
|
|
@ApiOperation(value = "新增", notes = "传入实体类CheckOrderInfoEntity")
|
|
@ApiOperation(value = "新增", notes = "传入实体类CheckOrderInfoEntity")
|
|
|
public R xjgdSave(@RequestBody CheckOrderInfoDTO checkOrderInfoEntity) {
|
|
public R xjgdSave(@RequestBody CheckOrderInfoDTO checkOrderInfoEntity) {
|
|
|
|
|
+ BladeUser user = AuthUtil.getUser();
|
|
|
if (Func.isNull(checkOrderInfoEntity.getBatchId())) {
|
|
if (Func.isNull(checkOrderInfoEntity.getBatchId())) {
|
|
|
return R.fail("参数错误");
|
|
return R.fail("参数错误");
|
|
|
}
|
|
}
|
|
@@ -395,18 +397,19 @@ public class RtuCheckOrderController extends BladeController {
|
|
|
wrapper.last("limit 1");
|
|
wrapper.last("limit 1");
|
|
|
long count = rtuCheckOrderService.count(wrapper);
|
|
long count = rtuCheckOrderService.count(wrapper);
|
|
|
if (count == 0) {
|
|
if (count == 0) {
|
|
|
- if (Func.notNull(checkOrderInfoEntity.getTaskOwnerId())){
|
|
|
|
|
|
|
+ if (Func.notNull(checkOrderInfoEntity.getTaskOwnerId())) {
|
|
|
DictInfoEntity dictInfoEntity = baseInfoDictService.getDict(DictBusinessConstant.ORDER_STATUS_CODE, OrderStatusEnum.STATUS_CONFIRM.getCode());
|
|
DictInfoEntity dictInfoEntity = baseInfoDictService.getDict(DictBusinessConstant.ORDER_STATUS_CODE, OrderStatusEnum.STATUS_CONFIRM.getCode());
|
|
|
checkOrderInfoEntity.setOrderStatusKey(dictInfoEntity.getId());
|
|
checkOrderInfoEntity.setOrderStatusKey(dictInfoEntity.getId());
|
|
|
checkOrderInfoEntity.setOrderConfirmUser(checkOrderInfoEntity.getTaskOwnerId());
|
|
checkOrderInfoEntity.setOrderConfirmUser(checkOrderInfoEntity.getTaskOwnerId());
|
|
|
checkOrderInfoEntity.setOrderConfirm(1);
|
|
checkOrderInfoEntity.setOrderConfirm(1);
|
|
|
checkOrderInfoEntity.setOrderConfirmTime(new Date());
|
|
checkOrderInfoEntity.setOrderConfirmTime(new Date());
|
|
|
checkOrderInfoEntity.setContactUser(checkOrderInfoEntity.getTaskOwnerId());
|
|
checkOrderInfoEntity.setContactUser(checkOrderInfoEntity.getTaskOwnerId());
|
|
|
- }else{
|
|
|
|
|
|
|
+ } else {
|
|
|
DictInfoEntity dictInfoEntity = baseInfoDictService.getDict(DictBusinessConstant.ORDER_STATUS_CODE, OrderStatusEnum.STATUS_CREATE.getCode());
|
|
DictInfoEntity dictInfoEntity = baseInfoDictService.getDict(DictBusinessConstant.ORDER_STATUS_CODE, OrderStatusEnum.STATUS_CREATE.getCode());
|
|
|
checkOrderInfoEntity.setOrderStatusKey(dictInfoEntity.getId());
|
|
checkOrderInfoEntity.setOrderStatusKey(dictInfoEntity.getId());
|
|
|
}
|
|
}
|
|
|
checkOrderInfoEntity.setOrderType(1);
|
|
checkOrderInfoEntity.setOrderType(1);
|
|
|
|
|
+ checkOrderInfoEntity.setOrgId(Func.toLong(user.getDeptId()));
|
|
|
rtuCheckOrderService.save(checkOrderInfoEntity);
|
|
rtuCheckOrderService.save(checkOrderInfoEntity);
|
|
|
OrderProcessInfoEntity processInfoEntity = new OrderProcessInfoEntity();
|
|
OrderProcessInfoEntity processInfoEntity = new OrderProcessInfoEntity();
|
|
|
processInfoEntity.setOrderId(checkOrderInfoEntity.getId());
|
|
processInfoEntity.setOrderId(checkOrderInfoEntity.getId());
|
|
@@ -542,7 +545,7 @@ public class RtuCheckOrderController extends BladeController {
|
|
|
if (Func.isNull(checkOrderInfoEntity.getId())) {
|
|
if (Func.isNull(checkOrderInfoEntity.getId())) {
|
|
|
return R.fail("参数错误");
|
|
return R.fail("参数错误");
|
|
|
}
|
|
}
|
|
|
- // BladeUser user = AuthUtil.getUser();
|
|
|
|
|
|
|
+ // BladeUser user = AuthUtil.getUser();
|
|
|
|
|
|
|
|
DictInfoEntity dictInfoEntity = baseInfoDictService.getDict(DictBusinessConstant.ORDER_STATUS_CODE, OrderStatusEnum.STATUS_CANCEL.getCode());
|
|
DictInfoEntity dictInfoEntity = baseInfoDictService.getDict(DictBusinessConstant.ORDER_STATUS_CODE, OrderStatusEnum.STATUS_CANCEL.getCode());
|
|
|
OrderProcessInfoEntity processInfoEntity = new OrderProcessInfoEntity();
|
|
OrderProcessInfoEntity processInfoEntity = new OrderProcessInfoEntity();
|
|
@@ -822,21 +825,32 @@ public class RtuCheckOrderController extends BladeController {
|
|
|
@ApiOperationSupport(order = 3)
|
|
@ApiOperationSupport(order = 3)
|
|
|
@ApiOperation(value = "统计表格")
|
|
@ApiOperation(value = "统计表格")
|
|
|
public R<Map<String, Object>> orderCount(@ApiIgnore CheckOrderInfoDTO checkOrderInfoDTO) {
|
|
public R<Map<String, Object>> orderCount(@ApiIgnore CheckOrderInfoDTO checkOrderInfoDTO) {
|
|
|
- if (checkOrderInfoDTO.getAdCode() == null) {
|
|
|
|
|
- return R.status(false);
|
|
|
|
|
- }
|
|
|
|
|
- checkOrderInfoDTO.setOrderClose(0);
|
|
|
|
|
|
|
+
|
|
|
|
|
+ BladeUser user = AuthUtil.getUser();
|
|
|
|
|
+ checkOrderInfoDTO.setOrgId(Func.toLong(user.getDeptId()));
|
|
|
Long orderCount = rtuCheckOrderService.orderCount(checkOrderInfoDTO);
|
|
Long orderCount = rtuCheckOrderService.orderCount(checkOrderInfoDTO);
|
|
|
- Long unConfirmOrderCount = rtuCheckOrderService.unconfirmOrderCount(checkOrderInfoDTO);
|
|
|
|
|
- Long unCloseOrderCount = rtuCheckOrderService.unCloseOrderCount(checkOrderInfoDTO);
|
|
|
|
|
|
|
+
|
|
|
|
|
+ DictInfoEntity dictInfoEntity = baseInfoDictService.getDict(DictBusinessConstant.ORDER_STATUS_CODE, OrderStatusEnum.STATUS_CREATE.getCode());
|
|
|
|
|
+ checkOrderInfoDTO.setOrderStatusKey(dictInfoEntity.getId());
|
|
|
|
|
+ Long unConfirmOrderCount = rtuCheckOrderService.orderCount(checkOrderInfoDTO);
|
|
|
|
|
+ dictInfoEntity = baseInfoDictService.getDict(DictBusinessConstant.ORDER_STATUS_CODE, OrderStatusEnum.STATUS_CONFIRM.getCode());
|
|
|
|
|
+ checkOrderInfoDTO.setOrderStatusKey(dictInfoEntity.getId());
|
|
|
|
|
+ Long processingCount = rtuCheckOrderService.orderCount(checkOrderInfoDTO);
|
|
|
|
|
+ dictInfoEntity = baseInfoDictService.getDict(DictBusinessConstant.ORDER_STATUS_CODE, OrderStatusEnum.STATUS_CLOSE_PENDING_APPROVE.getCode());
|
|
|
|
|
+ checkOrderInfoDTO.setOrderStatusKey(dictInfoEntity.getId());
|
|
|
|
|
+ Long closeApproveCount = rtuCheckOrderService.orderCount(checkOrderInfoDTO);
|
|
|
|
|
+ dictInfoEntity = baseInfoDictService.getDict(DictBusinessConstant.ORDER_STATUS_CODE, OrderStatusEnum.STATUS_CLOSE.getCode());
|
|
|
|
|
+ checkOrderInfoDTO.setOrderStatusKey(dictInfoEntity.getId());
|
|
|
|
|
+ Long closeCount = rtuCheckOrderService.orderCount(checkOrderInfoDTO);
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
Map<String, Object> data = new HashMap<>();
|
|
Map<String, Object> data = new HashMap<>();
|
|
|
data.put("orderCount", orderCount);
|
|
data.put("orderCount", orderCount);
|
|
|
- data.put("orderUnconfirm", unConfirmOrderCount);
|
|
|
|
|
- data.put("orderProcessing", unCloseOrderCount);
|
|
|
|
|
- checkOrderInfoDTO.setOrderConfirm(1);
|
|
|
|
|
- checkOrderInfoDTO.setOrderClose(1);
|
|
|
|
|
- Long reportOrderCount = rtuCheckOrderService.orderCount(checkOrderInfoDTO);
|
|
|
|
|
- data.put("reportOrderCount", reportOrderCount);
|
|
|
|
|
|
|
+ data.put("orderUnconfirmCount", unConfirmOrderCount);
|
|
|
|
|
+ data.put("orderProcessingCount", processingCount);
|
|
|
|
|
+ data.put("closeApproveOrderCount", closeApproveCount);
|
|
|
|
|
+ data.put("closeOrderCount", closeCount);
|
|
|
|
|
+
|
|
|
return R.data(data);
|
|
return R.data(data);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|