Browse Source

调整查询,超时查询

dev-pushdata-important
caoyizhong 10 months ago
parent
commit
1b75a5495f
  1. 2
      blade-service-api/logpm-aftersales-api/src/main/java/com/logpm/aftersales/vo/AftersalesOvertimeFineVO.java
  2. 14
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/controller/AftersalesOvertimeFineController.java
  3. 1
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/controller/AftersalesWorkOrderController.java
  4. 2
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesOvertimeFineMapper.xml
  5. 2
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesWorkOrderMapper.xml

2
blade-service-api/logpm-aftersales-api/src/main/java/com/logpm/aftersales/vo/AftersalesOvertimeFineVO.java

@ -37,6 +37,8 @@ public class AftersalesOvertimeFineVO extends AftersalesOvertimeFineEntity {
private String workOrderNumber;
//工单异常类型
private String workOrderType;
//异常工单ID
private Long workOrderId;
//工单异常类型名称
private String workOrderTypeName;
//发现节点

14
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/controller/AftersalesOvertimeFineController.java

@ -16,6 +16,7 @@
*/
package com.logpm.aftersales.controller;
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
@ -24,6 +25,7 @@ import lombok.AllArgsConstructor;
import javax.validation.Valid;
import lombok.extern.slf4j.Slf4j;
import org.springblade.core.log.exception.ServiceException;
import org.springblade.core.secure.BladeUser;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
@ -122,8 +124,18 @@ public class AftersalesOvertimeFineController extends BladeController {
@ApiOperation(value = "修改", notes = "传入aftersalesOvertimeFine")
public R update(@Valid @RequestBody AftersalesOvertimeFineEntity aftersalesOvertimeFine) {
log.info("超时修改参数》》》》{}",aftersalesOvertimeFine);
if(ObjectUtils.isNull(aftersalesOvertimeFine.getId())){
throw new ServiceException("超时记录ID不能为空!!!");
}
try{
return R.status(aftersalesOvertimeFineService.updateById(aftersalesOvertimeFine));
}catch(ServiceException s){
return R.fail(s.getMessage());
}
catch(Exception e){
return R.fail("系统异常!!!");
}
return R.status(aftersalesOvertimeFineService.updateById(aftersalesOvertimeFine));
}
/**

1
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/controller/AftersalesWorkOrderController.java

@ -643,6 +643,7 @@ public class AftersalesWorkOrderController extends BladeController {
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(ObjectUtils.isNotNull(myCurrentWarehouse)){
aftersalesWorkOrder.setWarehouseId(myCurrentWarehouse.getId());
}
try {
IPage<AftersalesWorkOrderVO> list= aftersalesWorkOrderService.getPendingWorkOrder(aftersalesWorkOrder,Condition.getPage(query));

2
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesOvertimeFineMapper.xml

@ -26,7 +26,7 @@
</resultMap>
<select id="pageListOwn" resultType="com.logpm.aftersales.vo.AftersalesOvertimeFineVO" >
select laof.id,lawo.work_order_number workOrderNumber,lawo.work_order_type workOrderType,lawo.discovery_node discoveryNode,COUNT(laof.id) ,laof.create_time createTime,
laof.timeout,laof.money
laof.timeout,laof.money,laof.business_name businessName,lawo.id workOrderId
from logpm_aftersales_overtime_fine laof
LEFT JOIN logpm_aftersales_work_order lawo on lawo.id = laof.work_order_id
<where>

2
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesWorkOrderMapper.xml

@ -161,7 +161,7 @@ date_format(from_unixtime(create_time),'%Y-%m-%d') = date_format(now(),'%Y-%m-%d
from logpm_aftersales_processor lap
LEFT JOIN logpm_aftersales_work_order law on lap.work_order_id = law.id
<where>
lap.conditions != '3' and lap.is_deleted = 0 and law.id is not null and lap.processing_status in ('1','3') and lap.types_of = '2'
lap.conditions != '3' and lap.is_deleted = 0 and law.id is not null and lap.processing_status in ('1','3') and lap.types_of = '2' and law.work_order_status in ('10','20','30')
<if test="param.workOrderStatus != null and param.workOrderStatus != ''">and law.work_order_status = #{param.workOrderStatus}</if>
<if test="param.warehouseId != null and param.warehouseId != ''">and lap.business_id = #{param.warehouseId}</if>
</where>

Loading…
Cancel
Save