diff --git a/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/controller/XhpcPileRegularInspectController.java b/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/controller/XhpcPileRegularInspectController.java index 86b43b09..35d50db4 100644 --- a/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/controller/XhpcPileRegularInspectController.java +++ b/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/controller/XhpcPileRegularInspectController.java @@ -1,23 +1,19 @@ package com.xhpc.order.controller; - import com.xhpc.common.core.web.controller.BaseController; import com.xhpc.common.core.web.domain.AjaxResult; import com.xhpc.order.domain.XhpcPileRegularInspect; import com.xhpc.order.service.IXhpcPileRegularInspectService; import io.swagger.annotations.Api; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; - -import javax.annotation.Resource; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; @RestController @RequestMapping("/pileRegularInspect") @Api(value = "桩定期检查接口", tags = "桩定期检查接口") public class XhpcPileRegularInspectController extends BaseController { - @Resource - IXhpcPileRegularInspectService xhpcPileRegularInspectService; + + @Autowired + private IXhpcPileRegularInspectService xhpcPileRegularInspectService; /** * 查询桩定期检查接口 @@ -31,7 +27,7 @@ public class XhpcPileRegularInspectController extends BaseController { @PostMapping("/addPileRegularInspect") - public AjaxResult addPileRegularInspect(XhpcPileRegularInspect xhpcPileRegularInspect) + public AjaxResult addPileRegularInspect(@RequestBody XhpcPileRegularInspect xhpcPileRegularInspect) { return xhpcPileRegularInspectService.addPileRegularInspect(xhpcPileRegularInspect); } diff --git a/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/controller/XhpcStatisticsController.java b/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/controller/XhpcStatisticsController.java index fa820ddb..cf3b6ef2 100644 --- a/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/controller/XhpcStatisticsController.java +++ b/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/controller/XhpcStatisticsController.java @@ -1,6 +1,5 @@ package com.xhpc.order.controller; -import cn.hutool.core.date.DateUtil; import com.xhpc.common.core.web.controller.BaseController; import com.xhpc.common.core.web.domain.AjaxResult; import com.xhpc.common.core.web.page.TableDataInfo; @@ -9,7 +8,6 @@ import io.swagger.annotations.Api; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; -import javax.servlet.ServletOutputStream; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.IOException; diff --git a/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/mapper/XhpcStatisticsServiceMapper.java b/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/mapper/XhpcStatisticsServiceMapper.java index dc2a50e4..28751c3d 100644 --- a/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/mapper/XhpcStatisticsServiceMapper.java +++ b/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/mapper/XhpcStatisticsServiceMapper.java @@ -220,7 +220,9 @@ public interface XhpcStatisticsServiceMapper { List> getTerminalEmptyOrder(@Param("chargingStationId")Long chargingStationId,@Param("status") Integer status,@Param("logOperatorId")Long logOperatorId,@Param("tenantId")String tenantId,@Param("beginOfDay")String beginOfDay,@Param("endOfDay")String endOfDay); - List> getWorkHistoryOrderList(@Param("operatorId")Long operatorId, @Param("chargingStationId")Long chargingStationId,@Param("chargingPileId") Long chargingPileId,@Param("terminalId")Long terminalId, @Param("stopReason")String stopReason,@Param("status") Integer status,@Param("logOperatorId")Long logOperatorId,@Param("tenantId")String tenantId,@Param("beginOfDay")String beginOfDay,@Param("endOfDay")String endOfDay); + List> getWorkHistoryOrderList(@Param("operatorId")Long operatorId, @Param("chargingStationId")Long chargingStationId,@Param("chargingPileId") Long chargingPileId,@Param("terminalId")Long terminalId, @Param("stopReason")String stopReason,@Param("status") Integer status,@Param("logOperatorId")Long logOperatorId,@Param("tenantId")String tenantId,@Param("beginOfDay")String beginOfDay,@Param("endOfDay")String endOfDay,@Param("type")Integer type); + + List> getWorkHistoryOrderListYY(@Param("operatorId")Long operatorId, @Param("chargingStationId")Long chargingStationId,@Param("chargingPileId") Long chargingPileId,@Param("terminalId")Long terminalId, @Param("stopReason")String stopReason,@Param("status") Integer status,@Param("logOperatorId")Long logOperatorId,@Param("tenantId")String tenantId,@Param("beginOfDay")String beginOfDay,@Param("endOfDay")String endOfDay,@Param("type")Integer type); List> getWorkOrderNumber(@Param("status") Integer status,@Param("logOperatorId")Long logOperatorId,@Param("tenantId")String tenantId); diff --git a/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/service/impl/XhpcPileRegularInspectServiceImpl.java b/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/service/impl/XhpcPileRegularInspectServiceImpl.java index 34f4c557..6d6e355c 100644 --- a/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/service/impl/XhpcPileRegularInspectServiceImpl.java +++ b/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/service/impl/XhpcPileRegularInspectServiceImpl.java @@ -31,7 +31,7 @@ public class XhpcPileRegularInspectServiceImpl extends BaseService implements IX Map map = xhpcPileRegularInspectMapper.getPileRegularInspectTenantId(tenantId); return AjaxResult.success(map); }catch (Exception e){ - return AjaxResult.error(500, "请重新登录"); + return AjaxResult.error(500, "请重新登录!"); } } @@ -43,7 +43,7 @@ public class XhpcPileRegularInspectServiceImpl extends BaseService implements IX if(tenantId==null || "".equals(tenantId)){ return AjaxResult.error(500, "请重新登录"); } - if(xhpcPileRegularInspect.getPileRegularInspectId()!=null){ + if(xhpcPileRegularInspect.getPileRegularInspectId()==null){ Map map = xhpcPileRegularInspectMapper.getPileRegularInspectTenantId(tenantId); if(map !=null){ diff --git a/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/service/impl/XhpcStatisticsServiceImpl.java b/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/service/impl/XhpcStatisticsServiceImpl.java index 7972982f..4630b9ec 100644 --- a/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/service/impl/XhpcStatisticsServiceImpl.java +++ b/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/service/impl/XhpcStatisticsServiceImpl.java @@ -1385,14 +1385,28 @@ public class XhpcStatisticsServiceImpl extends BaseService implements IXhpcStati Long logOperatorId = sysUser.getOperatorId(); if ("01".equals(sysUser.getUserType())) { //运营商看自己的场站 - map= xhpcStatisticsServiceMapper.getWorkHistoryOrderList(operatorId,chargingStationId,chargingPileId,terminalId,stopReason,1,logOperatorId,tenantId,conditionBeginOfDay,conditionEndOfDay); + if(type !=null && type==4){ + map= xhpcStatisticsServiceMapper.getWorkHistoryOrderListYY(operatorId,chargingStationId,chargingPileId,terminalId,stopReason,1,logOperatorId,tenantId,conditionBeginOfDay,conditionEndOfDay,type); + }else{ + map= xhpcStatisticsServiceMapper.getWorkHistoryOrderList(operatorId,chargingStationId,chargingPileId,terminalId,stopReason,1,logOperatorId,tenantId,conditionBeginOfDay,conditionEndOfDay,type); + } + }else{ //查询赋值的场站 - map= xhpcStatisticsServiceMapper.getWorkHistoryOrderList(operatorId,chargingStationId,chargingPileId,terminalId,stopReason,2,logUserId,tenantId,conditionBeginOfDay,conditionEndOfDay); + if(type !=null && type==4){ + map= xhpcStatisticsServiceMapper.getWorkHistoryOrderListYY(operatorId,chargingStationId,chargingPileId,terminalId,stopReason,2,logUserId,tenantId,conditionBeginOfDay,conditionEndOfDay,type); + }else{ + map= xhpcStatisticsServiceMapper.getWorkHistoryOrderList(operatorId,chargingStationId,chargingPileId,terminalId,stopReason,2,logUserId,tenantId,conditionBeginOfDay,conditionEndOfDay,type); + } } }else{ //全部桩 - map= xhpcStatisticsServiceMapper.getWorkHistoryOrderList(operatorId,chargingStationId,chargingPileId,terminalId,stopReason,0,null,tenantId,conditionBeginOfDay,conditionEndOfDay); + if(type !=null && type==4){ + map= xhpcStatisticsServiceMapper.getWorkHistoryOrderListYY(operatorId,chargingStationId,chargingPileId,terminalId,stopReason,0,null,tenantId,conditionBeginOfDay,conditionEndOfDay,type); + }else{ + map= xhpcStatisticsServiceMapper.getWorkHistoryOrderList(operatorId,chargingStationId,chargingPileId,terminalId,stopReason,0,null,tenantId,conditionBeginOfDay,conditionEndOfDay,type); + } + } } } diff --git a/xhpc-modules/xhpc-order/src/main/resources/mapper/XhpcPileRegularInspectMapper.xml b/xhpc-modules/xhpc-order/src/main/resources/mapper/XhpcPileRegularInspectMapper.xml new file mode 100644 index 00000000..a9fb859a --- /dev/null +++ b/xhpc-modules/xhpc-order/src/main/resources/mapper/XhpcPileRegularInspectMapper.xml @@ -0,0 +1,129 @@ + + + + + + + + + + + + + + + + + + + + + + insert into xhpc_pile_regular_inspect + + + version_number_time, + + + timing_price_time, + + + rate_time, + + + copying_administrator_time, + + + status, + + + create_time, + + + create_by, + + + update_time, + + + update_by, + + + remark, + + + tenant_id, + + + del_flag, + + + + + #{versionNumberTime}, + + + #{timingPriceTime}, + + + #{rateTime}, + + + #{copyingAdministratorTime}, + + + #{status}, + + + #{createTime}, + + + #{createBy}, + + + #{updateTime}, + + + #{updateBy}, + + + #{remark}, + + + #{tenantId}, + + + #{delFlag}, + + + + + + update xhpc_pile_regular_inspect + + version_number_time = #{versionNumberTime}, + timing_price_time = #{timingPriceTime}, + rate_time=#{rateTime}, + copying_administrator_time = #{copyingAdministratorTime}, + + where pile_regular_inspect_id = #{pileRegularInspectId} + + + + + + + \ No newline at end of file diff --git a/xhpc-modules/xhpc-order/src/main/resources/mapper/XhpcStatisticsMapper.xml b/xhpc-modules/xhpc-order/src/main/resources/mapper/XhpcStatisticsMapper.xml index 4f7e1013..735093ab 100644 --- a/xhpc-modules/xhpc-order/src/main/resources/mapper/XhpcStatisticsMapper.xml +++ b/xhpc-modules/xhpc-order/src/main/resources/mapper/XhpcStatisticsMapper.xml @@ -1499,11 +1499,16 @@ + +