1修改财务接口
This commit is contained in:
parent
2df624ff7a
commit
838ed627ba
@ -1,111 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" ?>
|
|
||||||
<!DOCTYPE mapper
|
|
||||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
||||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
||||||
<mapper namespace="com.ruoyi.job.mapper.SysJobMapper">
|
|
||||||
|
|
||||||
<resultMap type="SysJob" id="SysJobResult">
|
|
||||||
<id property="jobId" column="job_id" />
|
|
||||||
<result property="jobName" column="job_name" />
|
|
||||||
<result property="jobGroup" column="job_group" />
|
|
||||||
<result property="invokeTarget" column="invoke_target" />
|
|
||||||
<result property="cronExpression" column="cron_expression" />
|
|
||||||
<result property="misfirePolicy" column="misfire_policy" />
|
|
||||||
<result property="concurrent" column="concurrent" />
|
|
||||||
<result property="status" column="status" />
|
|
||||||
<result property="createBy" column="create_by" />
|
|
||||||
<result property="createTime" column="create_time" />
|
|
||||||
<result property="updateBy" column="update_by" />
|
|
||||||
<result property="updateTime" column="update_time" />
|
|
||||||
<result property="remark" column="remark" />
|
|
||||||
</resultMap>
|
|
||||||
|
|
||||||
<sql id="selectJobVo">
|
|
||||||
select job_id, job_name, job_group, invoke_target, cron_expression, misfire_policy, concurrent, status, create_by, create_time, remark
|
|
||||||
from sys_job
|
|
||||||
</sql>
|
|
||||||
|
|
||||||
<select id="selectJobList" parameterType="SysJob" resultMap="SysJobResult">
|
|
||||||
<include refid="selectJobVo"/>
|
|
||||||
<where>
|
|
||||||
<if test="jobName != null and jobName != ''">
|
|
||||||
AND job_name like concat('%', #{jobName}, '%')
|
|
||||||
</if>
|
|
||||||
<if test="jobGroup != null and jobGroup != ''">
|
|
||||||
AND job_group = #{jobGroup}
|
|
||||||
</if>
|
|
||||||
<if test="status != null and status != ''">
|
|
||||||
AND status = #{status}
|
|
||||||
</if>
|
|
||||||
<if test="invokeTarget != null and invokeTarget != ''">
|
|
||||||
AND invoke_target like concat('%', #{invokeTarget}, '%')
|
|
||||||
</if>
|
|
||||||
</where>
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<select id="selectJobAll" resultMap="SysJobResult">
|
|
||||||
<include refid="selectJobVo"/>
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<select id="selectJobById" parameterType="Long" resultMap="SysJobResult">
|
|
||||||
<include refid="selectJobVo"/>
|
|
||||||
where job_id = #{jobId}
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<delete id="deleteJobById" parameterType="Long">
|
|
||||||
delete from sys_job where job_id = #{jobId}
|
|
||||||
</delete>
|
|
||||||
|
|
||||||
<delete id="deleteJobByIds" parameterType="Long">
|
|
||||||
delete from sys_job where job_id in
|
|
||||||
<foreach collection="array" item="jobId" open="(" separator="," close=")">
|
|
||||||
#{jobId}
|
|
||||||
</foreach>
|
|
||||||
</delete>
|
|
||||||
|
|
||||||
<update id="updateJob" parameterType="SysJob">
|
|
||||||
update sys_job
|
|
||||||
<set>
|
|
||||||
<if test="jobName != null and jobName != ''">job_name = #{jobName},</if>
|
|
||||||
<if test="jobGroup != null and jobGroup != ''">job_group = #{jobGroup},</if>
|
|
||||||
<if test="invokeTarget != null and invokeTarget != ''">invoke_target = #{invokeTarget},</if>
|
|
||||||
<if test="cronExpression != null and cronExpression != ''">cron_expression = #{cronExpression},</if>
|
|
||||||
<if test="misfirePolicy != null and misfirePolicy != ''">misfire_policy = #{misfirePolicy},</if>
|
|
||||||
<if test="concurrent != null and concurrent != ''">concurrent = #{concurrent},</if>
|
|
||||||
<if test="status !=null">status = #{status},</if>
|
|
||||||
<if test="remark != null and remark != ''">remark = #{remark},</if>
|
|
||||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
|
||||||
update_time = sysdate()
|
|
||||||
</set>
|
|
||||||
where job_id = #{jobId}
|
|
||||||
</update>
|
|
||||||
|
|
||||||
<insert id="insertJob" parameterType="SysJob" useGeneratedKeys="true" keyProperty="jobId">
|
|
||||||
insert into sys_job(
|
|
||||||
<if test="jobId != null and jobId != 0">job_id,</if>
|
|
||||||
<if test="jobName != null and jobName != ''">job_name,</if>
|
|
||||||
<if test="jobGroup != null and jobGroup != ''">job_group,</if>
|
|
||||||
<if test="invokeTarget != null and invokeTarget != ''">invoke_target,</if>
|
|
||||||
<if test="cronExpression != null and cronExpression != ''">cron_expression,</if>
|
|
||||||
<if test="misfirePolicy != null and misfirePolicy != ''">misfire_policy,</if>
|
|
||||||
<if test="concurrent != null and concurrent != ''">concurrent,</if>
|
|
||||||
<if test="status != null and status != ''">status,</if>
|
|
||||||
<if test="remark != null and remark != ''">remark,</if>
|
|
||||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
|
||||||
create_time
|
|
||||||
)values(
|
|
||||||
<if test="jobId != null and jobId != 0">#{jobId},</if>
|
|
||||||
<if test="jobName != null and jobName != ''">#{jobName},</if>
|
|
||||||
<if test="jobGroup != null and jobGroup != ''">#{jobGroup},</if>
|
|
||||||
<if test="invokeTarget != null and invokeTarget != ''">#{invokeTarget},</if>
|
|
||||||
<if test="cronExpression != null and cronExpression != ''">#{cronExpression},</if>
|
|
||||||
<if test="misfirePolicy != null and misfirePolicy != ''">#{misfirePolicy},</if>
|
|
||||||
<if test="concurrent != null and concurrent != ''">#{concurrent},</if>
|
|
||||||
<if test="status != null and status != ''">#{status},</if>
|
|
||||||
<if test="remark != null and remark != ''">#{remark},</if>
|
|
||||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
|
||||||
sysdate()
|
|
||||||
)
|
|
||||||
</insert>
|
|
||||||
|
|
||||||
</mapper>
|
|
||||||
@ -55,7 +55,6 @@ public class SysUserController extends BaseController {
|
|||||||
@PreAuthorize(hasPermi = "system:user:list")
|
@PreAuthorize(hasPermi = "system:user:list")
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public TableDataInfo list(SysUser user) {
|
public TableDataInfo list(SysUser user) {
|
||||||
Long userId = SecurityUtils.getUserId();
|
|
||||||
startPage();
|
startPage();
|
||||||
List<SysUser> list = userService.selectUserList(user);
|
List<SysUser> list = userService.selectUserList(user);
|
||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
|
|||||||
@ -1,22 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" ?>
|
|
||||||
<!DOCTYPE mapper
|
|
||||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
||||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
||||||
<mapper namespace="com.xhpc.charging.station.mapper.XhpcRateMapper">
|
|
||||||
|
|
||||||
<resultMap id="BaseResultMap" type="com.xhpc.charging.station.domain.XhpcRate">
|
|
||||||
<result property="rateId" column="rate_id" />
|
|
||||||
<result property="chargingStationId" column="charging_station_id" />
|
|
||||||
<result property="name" column="name" />
|
|
||||||
<result property="powerFee" column="power_fee" />
|
|
||||||
<result property="serviceFee" column="service_fee" />
|
|
||||||
<result property="status" column="status" />
|
|
||||||
<result property="delFlag" column="del_flag" />
|
|
||||||
<result property="createTime" column="create_time" />
|
|
||||||
<result property="createBy" column="create_by" />
|
|
||||||
<result property="updateTime" column="update_time" />
|
|
||||||
<result property="updateBy" column="update_by" />
|
|
||||||
<result property="remark" column="remark" />
|
|
||||||
</resultMap>
|
|
||||||
|
|
||||||
</mapper>
|
|
||||||
@ -1,27 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" ?>
|
|
||||||
<!DOCTYPE mapper
|
|
||||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
||||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
||||||
<mapper namespace="com.xhpc.general.mapper.XhpcDictBizMapper">
|
|
||||||
|
|
||||||
<resultMap id="BaseResultMap" type="com.xhpc.common.domain.XhpcDictBiz">
|
|
||||||
<result property="dictBizId" column="dict_biz_id"/>
|
|
||||||
<result property="parentId" column="parent_id"/>
|
|
||||||
<result property="code" column="code"/>
|
|
||||||
<result property="dictKey" column="dict_key"/>
|
|
||||||
<result property="dictValue" column="dict_value"/>
|
|
||||||
<result property="sort" column="sort"/>
|
|
||||||
<result property="delFlag" column="del_flag"/>
|
|
||||||
<result property="createTime" column="create_time"/>
|
|
||||||
<result property="createBy" column="create_by" />
|
|
||||||
<result property="updateTime" column="update_time" />
|
|
||||||
<result property="updateBy" column="update_by" />
|
|
||||||
<result property="remark" column="remark" />
|
|
||||||
</resultMap>
|
|
||||||
<!-- 通用查询映射结果 -->
|
|
||||||
|
|
||||||
<select id="getCode" resultMap="BaseResultMap">
|
|
||||||
select code, dict_key, dict_value, sort, remark from xhpc_dict_biz where code = #{code} and parent_id > 0 and del_flag = 0
|
|
||||||
</select>
|
|
||||||
|
|
||||||
</mapper>
|
|
||||||
@ -2,14 +2,15 @@ package com.xhpc.order.controller;
|
|||||||
|
|
||||||
import com.ruoyi.common.core.web.controller.BaseController;
|
import com.ruoyi.common.core.web.controller.BaseController;
|
||||||
import com.ruoyi.common.core.web.domain.AjaxResult;
|
import com.ruoyi.common.core.web.domain.AjaxResult;
|
||||||
import com.xhpc.order.domain.XhpcHistoryOrderReconciliationStatus;
|
import com.ruoyi.common.core.web.page.TableDataInfo;
|
||||||
import com.xhpc.order.service.IXhpcHistoryOrderReconciliationStatusService;
|
import com.xhpc.order.service.IXhpcHistoryOrderReconciliationStatusService;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import javax.validation.Valid;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/order/reconciliation")
|
@RequestMapping("/order/reconciliation")
|
||||||
@ -22,24 +23,45 @@ public class XhpcHistoryOrderReconciliationStatusController extends BaseControll
|
|||||||
/**
|
/**
|
||||||
* 修改对账状态
|
* 修改对账状态
|
||||||
*
|
*
|
||||||
* @param xhpcHistoryOrderReconciliationStatus 历史订单对账状态信息
|
* @param historyOrderIds
|
||||||
|
* @param status
|
||||||
|
* @param remark
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@GetMapping("/status")
|
@PostMapping("/status")
|
||||||
@ApiOperation(value = "修改对账状态")
|
@ApiOperation(value = "修改对账状态")
|
||||||
public AjaxResult status(@Valid @RequestBody XhpcHistoryOrderReconciliationStatus xhpcHistoryOrderReconciliationStatus) {
|
public AjaxResult status(@RequestParam String historyOrderIds, @RequestParam Integer status, @RequestParam String remark) {
|
||||||
return iXhpcHistoryOrderReconciliationStatusService.status(xhpcHistoryOrderReconciliationStatus);
|
return iXhpcHistoryOrderReconciliationStatusService.status(historyOrderIds, status, remark);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 流量用户信息
|
* 流量用户信息
|
||||||
*
|
*
|
||||||
* @param internetUserId 流量用户id
|
* @param userId 用户id
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@GetMapping("/internetUser")
|
@GetMapping("/internetUser")
|
||||||
@ApiOperation(value = "修改对账状态")
|
@ApiOperation(value = "修改对账状态")
|
||||||
public AjaxResult internetUser(@RequestParam Long internetUserId) {
|
public AjaxResult internetUser(@RequestParam Long userId) {
|
||||||
return iXhpcHistoryOrderReconciliationStatusService.internetUser(internetUserId);
|
return iXhpcHistoryOrderReconciliationStatusService.internetUser(userId);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 流量用户对账分页列表
|
||||||
|
*
|
||||||
|
* @param userId 用户id
|
||||||
|
* @param serialNumber 订单编号
|
||||||
|
* @param createTimeStart 创建开始时间
|
||||||
|
* @param createTimeEnd 创建结束时间
|
||||||
|
* @param chargingStationName 电站名称
|
||||||
|
* @param status 状态
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping("/page")
|
||||||
|
@ApiOperation(value = "流量用户对账分页列表")
|
||||||
|
public TableDataInfo page(@RequestParam Long userId, String serialNumber, String createTimeStart, String createTimeEnd, String chargingStationName, String status) {
|
||||||
|
startPage();
|
||||||
|
List<Map<String, Object>> list = iXhpcHistoryOrderReconciliationStatusService.page(userId, serialNumber, createTimeStart, createTimeEnd, chargingStationName, status);
|
||||||
|
return getDataTable(list);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,17 +2,15 @@ package com.xhpc.order.controller;
|
|||||||
|
|
||||||
import com.ruoyi.common.core.web.controller.BaseController;
|
import com.ruoyi.common.core.web.controller.BaseController;
|
||||||
import com.ruoyi.common.core.web.domain.AjaxResult;
|
import com.ruoyi.common.core.web.domain.AjaxResult;
|
||||||
import com.xhpc.order.domain.XhpcHistoryOrderSortingStatus;
|
import com.ruoyi.common.core.web.page.TableDataInfo;
|
||||||
import com.xhpc.order.service.IXhpcHistoryOrderSortingStatusService;
|
import com.xhpc.order.service.IXhpcHistoryOrderSortingStatusService;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
|
|
||||||
import javax.validation.Valid;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/order/sorting")
|
@RequestMapping("/order/sorting")
|
||||||
@ -22,15 +20,49 @@ public class XhpcHistoryOrderSortingStatusController extends BaseController {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private IXhpcHistoryOrderSortingStatusService iXhpcHistoryOrderSortingStatusService;
|
private IXhpcHistoryOrderSortingStatusService iXhpcHistoryOrderSortingStatusService;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改清分状态
|
* 修改清分状态
|
||||||
*
|
*
|
||||||
* @param xhpcHistoryOrderSortingStatus 历史订单清分状态信息
|
* @param historyOrderIds
|
||||||
|
* @param status
|
||||||
|
* @param remark
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@GetMapping("/status")
|
@PostMapping("/status")
|
||||||
@ApiOperation(value = "修改清分状态")
|
@ApiOperation(value = "修改清分状态")
|
||||||
public AjaxResult status(@Valid @RequestBody XhpcHistoryOrderSortingStatus xhpcHistoryOrderSortingStatus) {
|
public AjaxResult status(@RequestParam String historyOrderIds, @RequestParam Integer status, @RequestParam String remark) {
|
||||||
return iXhpcHistoryOrderSortingStatusService.status(xhpcHistoryOrderSortingStatus);
|
return iXhpcHistoryOrderSortingStatusService.status(historyOrderIds, status, remark);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运营商用户信息
|
||||||
|
*
|
||||||
|
* @param userId 用户id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping("/operatorUser")
|
||||||
|
@ApiOperation(value = "运营商用户信息")
|
||||||
|
public AjaxResult operatorUser(@RequestParam Long userId) {
|
||||||
|
return iXhpcHistoryOrderSortingStatusService.operatorUser(userId);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运营商清分分页列表
|
||||||
|
*
|
||||||
|
* @param userId 用户id
|
||||||
|
* @param serialNumber 订单编号
|
||||||
|
* @param createTimeStart 创建开始时间
|
||||||
|
* @param createTimeEnd 创建结束时间
|
||||||
|
* @param chargingStationName 电站名称
|
||||||
|
* @param status 状态
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping("/page")
|
||||||
|
@ApiOperation(value = "运营商清分分页列表")
|
||||||
|
public TableDataInfo page(@RequestParam Long userId, String serialNumber, String createTimeStart, String createTimeEnd, String chargingStationName, String status) {
|
||||||
|
startPage();
|
||||||
|
List<Map<String, Object>> list = iXhpcHistoryOrderSortingStatusService.page(userId, serialNumber, createTimeStart, createTimeEnd, chargingStationName, status);
|
||||||
|
return getDataTable(list);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -33,4 +33,20 @@ public interface XhpcHistoryOrderMapper {
|
|||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public XhpcHistoryOrder info(@Param("historyOrderId") Long historyOrderId);
|
public XhpcHistoryOrder info(@Param("historyOrderId") Long historyOrderId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新对账状态 历史订单信息
|
||||||
|
*
|
||||||
|
* @param xhpcHistoryOrderIds 历史订单信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateReconciliation(String[] xhpcHistoryOrderIds);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新清分状态 历史订单信息
|
||||||
|
*
|
||||||
|
* @param xhpcHistoryOrderIds 历史订单信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateSorting(String[] xhpcHistoryOrderIds);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -21,33 +21,28 @@ public interface XhpcHistoryOrderReconciliationStatusMapper {
|
|||||||
*/
|
*/
|
||||||
public int insert(XhpcHistoryOrderReconciliationStatus xhpcHistoryOrderReconciliationStatus);
|
public int insert(XhpcHistoryOrderReconciliationStatus xhpcHistoryOrderReconciliationStatus);
|
||||||
|
|
||||||
/**
|
|
||||||
* 更新 历史订单对账状态信息
|
|
||||||
*
|
|
||||||
* @param xhpcHistoryOrderReconciliationStatus 历史订单对账状态信息
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
public int update(XhpcHistoryOrderReconciliationStatus xhpcHistoryOrderReconciliationStatus);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 流量用户信息
|
* 流量用户信息
|
||||||
*
|
* @param userId
|
||||||
* @param internetUserId 流量用户id
|
* @param operatorId
|
||||||
* @return 结果
|
* @param chargingStation
|
||||||
|
* @return
|
||||||
*/
|
*/
|
||||||
public Map<String, Object> internetUser(@Param("internetUserId") Long internetUserId);
|
public Map<String, Object> internetUser(@Param("userId") Long userId, @Param("operatorId") String operatorId, @Param("chargingStation") String chargingStation);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 流量用户对账分页列表
|
* 流量用户对账分页列表
|
||||||
*
|
*
|
||||||
* @param internetUserId 流量用户id
|
* @param userId 流量用户id
|
||||||
* @param serialNumber 订单编号
|
* @param serialNumber 订单编号
|
||||||
* @param createTimeStart 创建开始时间
|
* @param createTimeStart 创建开始时间
|
||||||
* @param createTimeEnd 创建结束时间
|
* @param createTimeEnd 创建结束时间
|
||||||
* @param chargingStationName 电站名称
|
* @param chargingStationName 电站名称
|
||||||
* @param status 状态
|
* @param status 状态
|
||||||
* @return
|
* @param operatorId 运营商id
|
||||||
|
* @param status 状态
|
||||||
|
* @return chargingStation 电站
|
||||||
*/
|
*/
|
||||||
public List<Map<String, Object>> page(@Param("internetUserId") Long internetUserId, @Param("serialNumber") String serialNumber, @Param("createTimeStart") String createTimeStart, @Param("createTimeEnd") String createTimeEnd, @Param("chargingStationName") String chargingStationName, @Param("status") String status);
|
public List<Map<String, Object>> page(@Param("userId") Long userId, @Param("serialNumber") String serialNumber, @Param("createTimeStart") String createTimeStart, @Param("createTimeEnd") String createTimeEnd, @Param("chargingStationName") String chargingStationName, @Param("status") String status, @Param("operatorId") String operatorId, @Param("chargingStation") String chargingStation);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,10 @@
|
|||||||
package com.xhpc.order.mapper;
|
package com.xhpc.order.mapper;
|
||||||
|
|
||||||
import com.xhpc.order.domain.XhpcHistoryOrderSortingStatus;
|
import com.xhpc.order.domain.XhpcHistoryOrderSortingStatus;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 历史订单对账状态信息 数据层
|
* 历史订单对账状态信息 数据层
|
||||||
@ -24,4 +28,30 @@ public interface XhpcHistoryOrderSortingStatusMapper {
|
|||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public int update(XhpcHistoryOrderSortingStatus xhpcHistoryOrderSortingStatus);
|
public int update(XhpcHistoryOrderSortingStatus xhpcHistoryOrderSortingStatus);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运营商用户信息
|
||||||
|
*
|
||||||
|
* @param userId
|
||||||
|
* @param operatorId
|
||||||
|
* @param chargingStation
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public Map<String, Object> operatorUser(@Param("userId") Long userId, @Param("operatorId") String operatorId, @Param("chargingStation") String chargingStation);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运营商清分分页列表
|
||||||
|
*
|
||||||
|
* @param userId 用户id
|
||||||
|
* @param serialNumber 订单编号
|
||||||
|
* @param createTimeStart 创建开始时间
|
||||||
|
* @param createTimeEnd 创建结束时间
|
||||||
|
* @param chargingStationName 电站名称
|
||||||
|
* @param status 状态
|
||||||
|
* @param operatorId 运营商id
|
||||||
|
* @param status 状态
|
||||||
|
* @param chargingStation 电站
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public List<Map<String, Object>> page(@Param("userId") Long userId, @Param("serialNumber") String serialNumber, @Param("createTimeStart") String createTimeStart, @Param("createTimeEnd") String createTimeEnd, @Param("chargingStationName") String chargingStationName, @Param("status") String status, @Param("operatorId") String operatorId, @Param("chargingStation") String chargingStation);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,6 +3,9 @@ package com.xhpc.order.service;
|
|||||||
import com.ruoyi.common.core.web.domain.AjaxResult;
|
import com.ruoyi.common.core.web.domain.AjaxResult;
|
||||||
import com.xhpc.order.domain.XhpcHistoryOrderReconciliationStatus;
|
import com.xhpc.order.domain.XhpcHistoryOrderReconciliationStatus;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 历史订单对账状态信息 服务层
|
* 历史订单对账状态信息 服务层
|
||||||
*
|
*
|
||||||
@ -19,16 +22,31 @@ public interface IXhpcHistoryOrderReconciliationStatusService {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改对账状态 历史订单对账状态
|
* 修改对账状态 历史订单对账状态
|
||||||
*
|
* @param historyOrderIds 历史订单id集合
|
||||||
* @param xhpcHistoryOrderReconciliationStatus 历史订单对账状态信息
|
* @param status 状态
|
||||||
|
* @param remark 备注
|
||||||
|
* @return
|
||||||
*/
|
*/
|
||||||
public AjaxResult status(XhpcHistoryOrderReconciliationStatus xhpcHistoryOrderReconciliationStatus);
|
public AjaxResult status(String historyOrderIds, Integer status, String remark);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 流量用户信息
|
* 流量用户信息
|
||||||
*
|
*
|
||||||
* @param internetUserId 流量用户id
|
* @param userId 用户id
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public AjaxResult internetUser(Long internetUserId);
|
public AjaxResult internetUser(Long userId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 流量用户对账分页列表
|
||||||
|
*
|
||||||
|
* @param userId 用户id
|
||||||
|
* @param serialNumber 订单编号
|
||||||
|
* @param createTimeStart 创建开始时间
|
||||||
|
* @param createTimeEnd 创建结束时间
|
||||||
|
* @param chargingStationName 电站名称
|
||||||
|
* @param status 状态
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public List<Map<String, Object>> page(Long userId, String serialNumber, String createTimeStart, String createTimeEnd, String chargingStationName, String status);
|
||||||
}
|
}
|
||||||
@ -3,6 +3,9 @@ package com.xhpc.order.service;
|
|||||||
import com.ruoyi.common.core.web.domain.AjaxResult;
|
import com.ruoyi.common.core.web.domain.AjaxResult;
|
||||||
import com.xhpc.order.domain.XhpcHistoryOrderSortingStatus;
|
import com.xhpc.order.domain.XhpcHistoryOrderSortingStatus;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 历史订单对账状态信息 服务层
|
* 历史订单对账状态信息 服务层
|
||||||
*
|
*
|
||||||
@ -18,9 +21,33 @@ public interface IXhpcHistoryOrderSortingStatusService {
|
|||||||
public int insert(XhpcHistoryOrderSortingStatus xhpcHistoryOrderSortingStatus);
|
public int insert(XhpcHistoryOrderSortingStatus xhpcHistoryOrderSortingStatus);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改对账状态 历史订单对账状态
|
* 修改清分状态
|
||||||
*
|
*
|
||||||
* @param xhpcHistoryOrderSortingStatus 历史订单清分状态信息
|
* @param historyOrderIds
|
||||||
|
* @param status
|
||||||
|
* @param remark
|
||||||
|
* @return
|
||||||
*/
|
*/
|
||||||
public AjaxResult status(XhpcHistoryOrderSortingStatus xhpcHistoryOrderSortingStatus);
|
public AjaxResult status(String historyOrderIds, Integer status, String remark);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运营商用户信息
|
||||||
|
* @param userId
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public AjaxResult operatorUser(Long userId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运营商清分分页列表
|
||||||
|
*
|
||||||
|
* @param userId 用户id
|
||||||
|
* @param serialNumber 订单编号
|
||||||
|
* @param createTimeStart 创建开始时间
|
||||||
|
* @param createTimeEnd 创建结束时间
|
||||||
|
* @param chargingStationName 电站名称
|
||||||
|
* @param status 状态
|
||||||
|
* @param status 状态
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public List<Map<String, Object>> page(Long userId, String serialNumber, String createTimeStart, String createTimeEnd, String chargingStationName, String status);
|
||||||
}
|
}
|
||||||
@ -1,6 +1,8 @@
|
|||||||
package com.xhpc.order.service.impl;
|
package com.xhpc.order.service.impl;
|
||||||
|
|
||||||
|
import com.ruoyi.common.core.utils.StringUtils;
|
||||||
import com.ruoyi.common.core.web.domain.AjaxResult;
|
import com.ruoyi.common.core.web.domain.AjaxResult;
|
||||||
|
import com.ruoyi.common.redis.service.RedisService;
|
||||||
import com.xhpc.order.domain.XhpcHistoryOrder;
|
import com.xhpc.order.domain.XhpcHistoryOrder;
|
||||||
import com.xhpc.order.domain.XhpcHistoryOrderReconciliationStatus;
|
import com.xhpc.order.domain.XhpcHistoryOrderReconciliationStatus;
|
||||||
import com.xhpc.order.mapper.XhpcHistoryOrderMapper;
|
import com.xhpc.order.mapper.XhpcHistoryOrderMapper;
|
||||||
@ -9,6 +11,9 @@ import com.xhpc.order.service.IXhpcHistoryOrderReconciliationStatusService;
|
|||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 历史订单对账状态信息 服务层
|
* 历史订单对账状态信息 服务层
|
||||||
*
|
*
|
||||||
@ -23,6 +28,9 @@ public class XhpcHistoryOrderReconciliationStatusServiceImpl implements IXhpcHis
|
|||||||
@Autowired
|
@Autowired
|
||||||
private XhpcHistoryOrderMapper xhpcHistoryOrderMapper;
|
private XhpcHistoryOrderMapper xhpcHistoryOrderMapper;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private RedisService redisService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增 历史订单对账状态
|
* 新增 历史订单对账状态
|
||||||
*
|
*
|
||||||
@ -34,42 +42,89 @@ public class XhpcHistoryOrderReconciliationStatusServiceImpl implements IXhpcHis
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改对账状态 历史订单对账状态
|
* 修改对账状态 历史订单对账状态
|
||||||
*
|
*
|
||||||
* @param xhpcHistoryOrderReconciliationStatus 历史订单对账状态信息
|
* @param historyOrderIds 历史订单id集合
|
||||||
|
* @param status 状态
|
||||||
|
* @param remark 备注
|
||||||
|
* @return
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public AjaxResult status(XhpcHistoryOrderReconciliationStatus xhpcHistoryOrderReconciliationStatus) {
|
public AjaxResult status(String historyOrderIds, Integer status, String remark) {
|
||||||
XhpcHistoryOrder xhpcHistoryOrder = xhpcHistoryOrderMapper.info(xhpcHistoryOrderReconciliationStatus.getHistoryOrderId());
|
for (String historyOrderId : historyOrderIds.split(",")) {
|
||||||
if (0 == xhpcHistoryOrderReconciliationStatus.getStatus()) {
|
XhpcHistoryOrder xhpcHistoryOrder = xhpcHistoryOrderMapper.info(Long.parseLong(historyOrderId));
|
||||||
if (3 != xhpcHistoryOrder.getReconciliationStatus()) {
|
if ("0".equals(status)) {
|
||||||
return AjaxResult.error("状态异常");
|
if (3 != xhpcHistoryOrder.getReconciliationStatus()) {
|
||||||
}
|
return AjaxResult.error("状态异常");
|
||||||
} else if (1 == xhpcHistoryOrderReconciliationStatus.getStatus()) {
|
}
|
||||||
if (0 != xhpcHistoryOrder.getReconciliationStatus()) {
|
} else if ("1".equals(status)) {
|
||||||
return AjaxResult.error("状态异常");
|
if (0 != xhpcHistoryOrder.getReconciliationStatus()) {
|
||||||
}
|
return AjaxResult.error("状态异常");
|
||||||
} else if (2 == xhpcHistoryOrderReconciliationStatus.getStatus()) {
|
}
|
||||||
if (0 != xhpcHistoryOrder.getReconciliationStatus()) {
|
} else if ("2".equals(status)) {
|
||||||
return AjaxResult.error("状态异常");
|
if (0 != xhpcHistoryOrder.getReconciliationStatus()) {
|
||||||
}
|
return AjaxResult.error("状态异常");
|
||||||
} else if (3 == xhpcHistoryOrderReconciliationStatus.getStatus()) {
|
}
|
||||||
if (2 != xhpcHistoryOrder.getReconciliationStatus()) {
|
} else if ("3".equals(status)) {
|
||||||
return AjaxResult.error("状态异常");
|
if (2 != xhpcHistoryOrder.getReconciliationStatus()) {
|
||||||
|
return AjaxResult.error("状态异常");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
XhpcHistoryOrderReconciliationStatus xhpcHistoryOrderReconciliationStatus = new XhpcHistoryOrderReconciliationStatus();
|
||||||
|
xhpcHistoryOrderReconciliationStatus.setHistoryOrderId(Long.parseLong(historyOrderId));
|
||||||
|
xhpcHistoryOrderReconciliationStatus.setStatus(status);
|
||||||
|
xhpcHistoryOrderReconciliationStatus.setRemark(remark);
|
||||||
|
xhpcHistoryOrderReconciliationStatusMapper.insert(xhpcHistoryOrderReconciliationStatus);
|
||||||
}
|
}
|
||||||
xhpcHistoryOrderReconciliationStatusMapper.update(xhpcHistoryOrderReconciliationStatus);
|
xhpcHistoryOrderMapper.updateReconciliation(historyOrderIds.split(","));
|
||||||
return AjaxResult.success();
|
return AjaxResult.success();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 流量用户信息
|
* 流量用户信息
|
||||||
*
|
*
|
||||||
* @param internetUserId 流量用户id
|
* @param userId 用户id
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public AjaxResult internetUser(Long internetUserId) {
|
public AjaxResult internetUser(Long userId) {
|
||||||
return AjaxResult.success(xhpcHistoryOrderReconciliationStatusMapper.internetUser(internetUserId));
|
Map<String, Object> map = redisService.getCacheMap(userId + ":privilege");
|
||||||
|
if (null != map) {
|
||||||
|
String privilege = StringUtils.valueOf(map.get("privilege"));
|
||||||
|
if ("1".equals(privilege)) {
|
||||||
|
String operatorId = StringUtils.valueOf(map.get("operatorId"));
|
||||||
|
return AjaxResult.success(xhpcHistoryOrderReconciliationStatusMapper.internetUser(userId, operatorId, null));
|
||||||
|
} else if ("2".equals(privilege)) {
|
||||||
|
return AjaxResult.success(xhpcHistoryOrderReconciliationStatusMapper.internetUser(userId, null, "privilege"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return AjaxResult.success(xhpcHistoryOrderReconciliationStatusMapper.internetUser(userId, null, null));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 流量用户对账分页列表
|
||||||
|
*
|
||||||
|
* @param userId 流量用户id
|
||||||
|
* @param serialNumber 订单编号
|
||||||
|
* @param createTimeStart 创建开始时间
|
||||||
|
* @param createTimeEnd 创建结束时间
|
||||||
|
* @param chargingStationName 电站名称
|
||||||
|
* @param status 状态
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<Map<String, Object>> page(Long userId, String serialNumber, String createTimeStart, String createTimeEnd, String chargingStationName, String status) {
|
||||||
|
Map<String, Object> map = redisService.getCacheMap(userId + ":privilege");
|
||||||
|
if (null != map) {
|
||||||
|
String privilege = StringUtils.valueOf(map.get("privilege"));
|
||||||
|
if ("1".equals(privilege)) {
|
||||||
|
String operatorId = StringUtils.valueOf(map.get("operatorId"));
|
||||||
|
return xhpcHistoryOrderReconciliationStatusMapper.page(userId, serialNumber, createTimeStart, createTimeEnd, chargingStationName, status, operatorId, null);
|
||||||
|
} else if ("2".equals(privilege)) {
|
||||||
|
return xhpcHistoryOrderReconciliationStatusMapper.page(userId, serialNumber, createTimeStart, createTimeEnd, chargingStationName, status, null, "privilege");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return xhpcHistoryOrderReconciliationStatusMapper.page(userId, serialNumber, createTimeStart, createTimeEnd, chargingStationName, status, null, null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1,6 +1,8 @@
|
|||||||
package com.xhpc.order.service.impl;
|
package com.xhpc.order.service.impl;
|
||||||
|
|
||||||
|
import com.ruoyi.common.core.utils.StringUtils;
|
||||||
import com.ruoyi.common.core.web.domain.AjaxResult;
|
import com.ruoyi.common.core.web.domain.AjaxResult;
|
||||||
|
import com.ruoyi.common.redis.service.RedisService;
|
||||||
import com.xhpc.order.domain.XhpcHistoryOrder;
|
import com.xhpc.order.domain.XhpcHistoryOrder;
|
||||||
import com.xhpc.order.domain.XhpcHistoryOrderSortingStatus;
|
import com.xhpc.order.domain.XhpcHistoryOrderSortingStatus;
|
||||||
import com.xhpc.order.mapper.XhpcHistoryOrderMapper;
|
import com.xhpc.order.mapper.XhpcHistoryOrderMapper;
|
||||||
@ -9,6 +11,9 @@ import com.xhpc.order.service.IXhpcHistoryOrderSortingStatusService;
|
|||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 历史订单清分状态信息 服务层
|
* 历史订单清分状态信息 服务层
|
||||||
*
|
*
|
||||||
@ -23,6 +28,9 @@ public class XhpcHistoryOrderSortingStatusServiceImpl implements IXhpcHistoryOrd
|
|||||||
@Autowired
|
@Autowired
|
||||||
private XhpcHistoryOrderMapper xhpcHistoryOrderMapper;
|
private XhpcHistoryOrderMapper xhpcHistoryOrderMapper;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private RedisService redisService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增 历史订单清分状态
|
* 新增 历史订单清分状态
|
||||||
*
|
*
|
||||||
@ -34,31 +42,90 @@ public class XhpcHistoryOrderSortingStatusServiceImpl implements IXhpcHistoryOrd
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改对账状态 历史订单清分状态
|
* 修改清分状态
|
||||||
*
|
*
|
||||||
* @param xhpcHistoryOrderSortingStatus 历史订单清分状态信息
|
* @param historyOrderIds
|
||||||
|
* @param status
|
||||||
|
* @param remark
|
||||||
|
* @return
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public AjaxResult status(XhpcHistoryOrderSortingStatus xhpcHistoryOrderSortingStatus) {
|
public AjaxResult status(String historyOrderIds, Integer status, String remark) {
|
||||||
XhpcHistoryOrder xhpcHistoryOrder = xhpcHistoryOrderMapper.info(xhpcHistoryOrderSortingStatus.getHistoryOrderId());
|
for (String historyOrderId : historyOrderIds.split(",")) {
|
||||||
if (1 == xhpcHistoryOrderSortingStatus.getStatus()) {
|
XhpcHistoryOrder xhpcHistoryOrder = xhpcHistoryOrderMapper.info(Long.parseLong(historyOrderId));
|
||||||
if (4 != xhpcHistoryOrder.getReconciliationStatus()) {
|
if ("1".equals(status)) {
|
||||||
return AjaxResult.error("状态异常");
|
if (4 != xhpcHistoryOrder.getReconciliationStatus()) {
|
||||||
}
|
return AjaxResult.error("状态异常");
|
||||||
} else if (2 == xhpcHistoryOrderSortingStatus.getStatus()) {
|
}
|
||||||
if (1 != xhpcHistoryOrder.getReconciliationStatus()) {
|
} else if ("2".equals(status)) {
|
||||||
return AjaxResult.error("状态异常");
|
if (1 != xhpcHistoryOrder.getReconciliationStatus()) {
|
||||||
}
|
return AjaxResult.error("状态异常");
|
||||||
} else if (3 == xhpcHistoryOrderSortingStatus.getStatus()) {
|
}
|
||||||
if (1 != xhpcHistoryOrder.getReconciliationStatus()) {
|
} else if ("3".equals(status)) {
|
||||||
return AjaxResult.error("状态异常");
|
if (1 != xhpcHistoryOrder.getReconciliationStatus()) {
|
||||||
}
|
return AjaxResult.error("状态异常");
|
||||||
} else if (4 == xhpcHistoryOrderSortingStatus.getStatus()) {
|
}
|
||||||
if (3 != xhpcHistoryOrder.getReconciliationStatus()) {
|
} else if ("4".equals(status)) {
|
||||||
return AjaxResult.error("状态异常");
|
if (3 != xhpcHistoryOrder.getReconciliationStatus()) {
|
||||||
|
return AjaxResult.error("状态异常");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
XhpcHistoryOrderSortingStatus xhpcHistoryOrderSortingStatus = new XhpcHistoryOrderSortingStatus();
|
||||||
|
xhpcHistoryOrderSortingStatus.setHistoryOrderId(Long.parseLong(historyOrderId));
|
||||||
|
xhpcHistoryOrderSortingStatus.setStatus(status);
|
||||||
|
xhpcHistoryOrderSortingStatus.setRemark(remark);
|
||||||
|
xhpcHistoryOrderSortingStatusMapper.insert(xhpcHistoryOrderSortingStatus);
|
||||||
}
|
}
|
||||||
xhpcHistoryOrderSortingStatusMapper.update(xhpcHistoryOrderSortingStatus);
|
xhpcHistoryOrderMapper.updateSorting(historyOrderIds.split(","));
|
||||||
return AjaxResult.success();
|
return AjaxResult.success();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运营商用户信息
|
||||||
|
*
|
||||||
|
* @param userId
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public AjaxResult operatorUser(Long userId) {
|
||||||
|
Map<String, Object> map = redisService.getCacheMap(userId + ":privilege");
|
||||||
|
if (null != map) {
|
||||||
|
String privilege = StringUtils.valueOf(map.get("privilege"));
|
||||||
|
if ("1".equals(privilege)) {
|
||||||
|
String operatorId = StringUtils.valueOf(map.get("operatorId"));
|
||||||
|
return AjaxResult.success(xhpcHistoryOrderSortingStatusMapper.operatorUser(userId, operatorId, null));
|
||||||
|
} else if ("2".equals(privilege)) {
|
||||||
|
return AjaxResult.success(xhpcHistoryOrderSortingStatusMapper.operatorUser(userId, null, "privilege"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return AjaxResult.success(xhpcHistoryOrderSortingStatusMapper.operatorUser(userId, null, null));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运营商清分分页列表
|
||||||
|
*
|
||||||
|
* @param userId 用户id
|
||||||
|
* @param serialNumber 订单编号
|
||||||
|
* @param createTimeStart 创建开始时间
|
||||||
|
* @param createTimeEnd 创建结束时间
|
||||||
|
* @param chargingStationName 电站名称
|
||||||
|
* @param status 状态
|
||||||
|
* @param status 状态
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<Map<String, Object>> page(Long userId, String serialNumber, String createTimeStart, String createTimeEnd, String chargingStationName, String status) {
|
||||||
|
Map<String, Object> map = redisService.getCacheMap(userId + ":privilege");
|
||||||
|
if (null != map) {
|
||||||
|
String privilege = StringUtils.valueOf(map.get("privilege"));
|
||||||
|
if ("1".equals(privilege)) {
|
||||||
|
String operatorId = StringUtils.valueOf(map.get("operatorId"));
|
||||||
|
return xhpcHistoryOrderSortingStatusMapper.page(userId, serialNumber, createTimeStart, createTimeEnd, chargingStationName, status, operatorId, null);
|
||||||
|
} else if ("2".equals(privilege)) {
|
||||||
|
return xhpcHistoryOrderSortingStatusMapper.page(userId, serialNumber, createTimeStart, createTimeEnd, chargingStationName, status, null, "privilege");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return xhpcHistoryOrderSortingStatusMapper.page(userId, serialNumber, createTimeStart, createTimeEnd, chargingStationName, status, null, null);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@ -18,10 +18,10 @@ spring:
|
|||||||
nacos:
|
nacos:
|
||||||
discovery:
|
discovery:
|
||||||
# 服务注册地址
|
# 服务注册地址
|
||||||
server-addr: 118.24.137.203:8848
|
server-addr: 127.0.0.1:8848
|
||||||
config:
|
config:
|
||||||
# 配置中心地址
|
# 配置中心地址
|
||||||
server-addr: 118.24.137.203:8848
|
server-addr: 127.0.0.1:8848
|
||||||
# 配置文件格式
|
# 配置文件格式
|
||||||
file-extension: yml
|
file-extension: yml
|
||||||
# 共享配置
|
# 共享配置
|
||||||
|
|||||||
@ -67,7 +67,7 @@
|
|||||||
</root>
|
</root>
|
||||||
|
|
||||||
<!--系统操作日志-->
|
<!--系统操作日志-->
|
||||||
<root level="info">
|
<root level="debug">
|
||||||
<appender-ref ref="file_info"/>
|
<appender-ref ref="file_info"/>
|
||||||
<appender-ref ref="file_error"/>
|
<appender-ref ref="file_error"/>
|
||||||
</root>
|
</root>
|
||||||
|
|||||||
@ -280,4 +280,18 @@
|
|||||||
from xhpc_history_order xho
|
from xhpc_history_order xho
|
||||||
where xho.del_flag = 0 and xho.history_order_id = #{historyOrderId}
|
where xho.del_flag = 0 and xho.history_order_id = #{historyOrderId}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<update id="updateReconciliation" parameterType="com.xhpc.order.domain.XhpcHistoryOrderReconciliationStatus">
|
||||||
|
update xhpc_history_order set reconciliation_status = #{status} where history_order_id in
|
||||||
|
<foreach collection="array" item="xhpcHistoryOrderId" open="(" separator="," close=")">
|
||||||
|
#{xhpcHistoryOrderId}
|
||||||
|
</foreach>
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<update id="updateSorting" parameterType="com.xhpc.order.domain.XhpcHistoryOrderReconciliationStatus">
|
||||||
|
update xhpc_history_order set sorting_status = #{status} where history_order_id in
|
||||||
|
<foreach collection="array" item="xhpcHistoryOrderId" open="(" separator="," close=")">
|
||||||
|
#{xhpcHistoryOrderId}
|
||||||
|
</foreach>
|
||||||
|
</update>
|
||||||
</mapper>
|
</mapper>
|
||||||
@ -74,48 +74,67 @@
|
|||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
<update id="update" parameterType="com.xhpc.order.domain.XhpcHistoryOrderReconciliationStatus">
|
|
||||||
UPDATE xhpc_history_order_reconciliation_status
|
|
||||||
<set>
|
|
||||||
<if test="null != historyOrderId and '' != historyOrderId">history_order_id = #{historyOrderId},</if>
|
|
||||||
<if test="null != status and '' != status">status = #{status},</if>
|
|
||||||
<if test="null != delFlag and '' != delFlag">del_flag = #{delFlag},</if>
|
|
||||||
<if test="null != createTime and '' != createTime">create_time = #{createTime},</if>
|
|
||||||
<if test="null != createBy and '' != createBy">create_by = #{createBy},</if>
|
|
||||||
<if test="null != updateTime and '' != updateTime">update_time = #{updateTime},</if>
|
|
||||||
<if test="null != updateBy and '' != updateBy">update_by = #{updateBy},</if>
|
|
||||||
<if test="null != remark and '' != remark">remark = #{remark}</if>
|
|
||||||
</set>
|
|
||||||
WHERE history_order_reconciliation_status_id = #{historyOrderReconciliationStatusId}
|
|
||||||
</update>
|
|
||||||
|
|
||||||
<select id="internetUser" parameterType="java.lang.Long" resultType="java.util.Map">
|
<select id="internetUser" parameterType="java.lang.Long" resultType="java.util.Map">
|
||||||
select xiu.internet_user_id internetUserId,xiu.`name`,xiu.open_bank openbank,xiu.card_number cardNumber,a.waitConfirmed,b.confirmed
|
select xiu.internet_user_id internetUserId,xiu.`name`,xiu.open_bank openbank,xiu.card_number
|
||||||
|
cardNumber,a.waitConfirmed,b.confirmed
|
||||||
from
|
from
|
||||||
(select sum(xho.total_price-xho.promotion_discount-xho.internet_commission-xho.internet_svc_commission) waitConfirmed,xho.user_id
|
sys_user su
|
||||||
from xhpc_history_order xho
|
LEFT JOIN (select sum(xho.act_price-xho.internet_commission-xho.internet_svc_commission)
|
||||||
where xho.del_flag = 0 and xho.reconciliation_status = 0 GROUP BY user_id) a
|
waitConfirmed,xho.user_id
|
||||||
LEFT JOIN
|
|
||||||
(select sum(xho.total_price-xho.promotion_discount-xho.internet_commission-xho.internet_svc_commission) confirmed ,xho.user_id
|
|
||||||
from xhpc_history_order xho
|
|
||||||
where xho.del_flag = 0 and xho.reconciliation_status = 1 GROUP BY user_id) b on a.user_id = b.user_id
|
|
||||||
LEFT JOIN xhpc_internet_user xiu on xiu.internet_user_id = b.user_id
|
|
||||||
where a.user_id = #{internetUserId}
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<select id="page" parameterType="java.lang.Long" resultType="java.util.Map">
|
|
||||||
select sum(xho.total_price-xho.promotion_discount-xho.internet_commission-xho.internet_svc_commission)
|
|
||||||
realIncome,
|
|
||||||
xho.user_id userId,xho.serial_number serialNumber,xco.create_time createTime,
|
|
||||||
xo.`name` operatorName,xcs.`name` chargingStationName,xho.`status`,xdb.dict_value reconciliationStatusName
|
|
||||||
from xhpc_history_order xho
|
from xhpc_history_order xho
|
||||||
LEFT JOIN xhpc_charge_order xco on xco.charge_order_id = xho.charging_order_id
|
LEFT JOIN xhpc_charge_order xco on xco.charge_order_id = xho.charging_order_id
|
||||||
LEFT JOIN xhpc_charging_station xcs on xcs.charging_station_id = xho.charging_station_id
|
LEFT JOIN xhpc_charging_station xcs on xcs.charging_station_id = xho.charging_station_id
|
||||||
LEFT JOIN xhpc_operator xo on xo.operator_id = xcs.operator_id
|
LEFT JOIN xhpc_operator xo on xo.operator_id = xcs.operator_id
|
||||||
LEFT JOIN xhpc_dict_biz xdb on xdb.`code` = 'reconciliation_status' and xdb.dict_key = xho.`status`
|
<if test="chargingStation != null and chargingStation != ''">
|
||||||
|
LEFT JOIN xhpc_user_privilege xup on xup.charging_station_id = xcs.charging_station_id
|
||||||
|
</if>
|
||||||
|
where xho.del_flag = 0 and xho.reconciliation_status = 0
|
||||||
|
<if test="operatorId != null and operatorId != ''">
|
||||||
|
and xo.operator_id = #{operatorId }
|
||||||
|
</if>
|
||||||
|
<if test="chargingStation != null and chargingStation != ''">
|
||||||
|
and xho.user_id = #{userId}
|
||||||
|
</if>
|
||||||
|
GROUP BY xho.user_id) a on su.user_id = a.user_id
|
||||||
|
LEFT JOIN
|
||||||
|
(select sum(xho.total_price-xho.promotion_discount-xho.internet_commission-xho.internet_svc_commission) confirmed ,xho.user_id
|
||||||
|
from xhpc_history_order xho
|
||||||
|
LEFT JOIN xhpc_charge_order xco on xco.charge_order_id = xho.charging_order_id
|
||||||
|
LEFT JOIN xhpc_charging_station xcs on xcs.charging_station_id = xho.charging_station_id
|
||||||
|
LEFT JOIN xhpc_operator xo on xo.operator_id = xcs.operator_id
|
||||||
|
<if test="chargingStation != null and chargingStation !=''">
|
||||||
|
LEFT JOIN xhpc_user_privilege xup on xup.charging_station_id = xcs.charging_station_id
|
||||||
|
</if>
|
||||||
|
where xho.del_flag = 0 and xho.reconciliation_status = 1
|
||||||
|
<if test="operatorId != null and operatorId !=''">
|
||||||
|
and xo.operator_id = #{operatorId}
|
||||||
|
</if>
|
||||||
|
<if test="chargingStation != null and chargingStation !=''">
|
||||||
|
and xcs.user_id = #{userId}
|
||||||
|
</if>
|
||||||
|
GROUP BY xho.user_id) b on a.user_id = su.user_id
|
||||||
|
LEFT JOIN xhpc_internet_user xiu on xiu.internet_user_id = su.internet_user_id
|
||||||
|
where a.user_id = #{userId}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="page" parameterType="java.lang.Long" resultType="java.util.Map">
|
||||||
|
select sum(xho.act_price-xho.internet_commission-xho.internet_svc_commission)
|
||||||
|
realIncome,
|
||||||
|
xho.user_id userId,xho.serial_number serialNumber,xco.create_time createTime,
|
||||||
|
xo.`name` operatorName,xcs.`name` chargingStationName,xho.`reconciliation_status`
|
||||||
|
reconciliationStatus,xdb.dict_value reconciliationStatusName
|
||||||
|
from xhpc_history_order xho
|
||||||
|
LEFT JOIN xhpc_charge_order xco on xco.charge_order_id = xho.charging_order_id
|
||||||
|
LEFT JOIN xhpc_charging_station xcs on xcs.charging_station_id = xho.charging_station_id
|
||||||
|
LEFT JOIN xhpc_operator xo on xo.operator_id = xcs.operator_id
|
||||||
|
LEFT JOIN xhpc_dict_biz xdb on xdb.`code` = 'reconciliation_status' and xdb.dict_key =
|
||||||
|
xho.`reconciliation_status`
|
||||||
|
<if test="chargingStation != null and chargingStation !=''">
|
||||||
|
LEFT JOIN xhpc_user_privilege xup on xup.charging_station_id = xcs.charging_station_id
|
||||||
|
</if>
|
||||||
where xho.del_flag = 0
|
where xho.del_flag = 0
|
||||||
<if test="internetUserId != null and internetUserId != ''">
|
<if test="userId != null and userId != ''">
|
||||||
and xho.user_id = #{internetUserId}
|
and xho.user_id = #{userId}
|
||||||
</if>
|
</if>
|
||||||
<if test="serialNumber != null and serialNumber != ''">
|
<if test="serialNumber != null and serialNumber != ''">
|
||||||
and xho.serial_number like concat(concat('%', #{serialNumber}), '%')
|
and xho.serial_number like concat(concat('%', #{serialNumber}), '%')
|
||||||
@ -132,5 +151,11 @@
|
|||||||
<if test="status != null and status != ''">
|
<if test="status != null and status != ''">
|
||||||
and xho.status = #{status}
|
and xho.status = #{status}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="operatorId != null and operatorId !=''">
|
||||||
|
and xo.operator_id = #{operatorId }
|
||||||
|
</if>
|
||||||
|
<if test="chargingStation != null and chargingStation !=''">
|
||||||
|
and xup.user_id = #{userId}
|
||||||
|
</if>
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
@ -88,4 +88,106 @@
|
|||||||
WHERE history_order_sorting_status_id = #{historyOrderSortingStatusId}
|
WHERE history_order_sorting_status_id = #{historyOrderSortingStatusId}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
|
<select id="operatorUser" parameterType="java.lang.Long" resultType="java.util.Map">
|
||||||
|
select xo.operator_id operatorId,xo.`name`,xo.open_bank openbank,xo.card_number
|
||||||
|
cardNumber,a.waitSorting,b.sortingOnTheWay,c.withdrawnCash
|
||||||
|
from sys_user su
|
||||||
|
LEFT JOIN (select sum(xho.act_power_price+xho.act_service_price) waitSorting,xho.user_id
|
||||||
|
from xhpc_history_order xho
|
||||||
|
LEFT JOIN xhpc_charge_order xco on xco.charge_order_id = xho.charging_order_id
|
||||||
|
LEFT JOIN xhpc_charging_station xcs on xcs.charging_station_id = xho.charging_station_id
|
||||||
|
LEFT JOIN xhpc_operator xo on xo.operator_id = xcs.operator_id
|
||||||
|
<if test="chargingStation != null and chargingStation != ''">
|
||||||
|
LEFT JOIN xhpc_user_privilege xup on xup.charging_station_id = xcs.charging_station_id
|
||||||
|
</if>
|
||||||
|
where xho.del_flag = 0 and xho.sorting_status = 0
|
||||||
|
<if test="operatorId != null and operatorId != ''">
|
||||||
|
and xo.operator_id = #{operatorId }
|
||||||
|
</if>
|
||||||
|
<if test="chargingStation != null and chargingStation != ''">
|
||||||
|
and xho.user_id = #{userId}
|
||||||
|
</if>
|
||||||
|
GROUP BY xho.user_id) a on su.user_id = a.user_id
|
||||||
|
LEFT JOIN
|
||||||
|
(select sum(xho.act_power_price+xho.act_service_price) sortingOnTheWay ,xho.user_id
|
||||||
|
from xhpc_history_order xho
|
||||||
|
LEFT JOIN xhpc_charge_order xco on xco.charge_order_id = xho.charging_order_id
|
||||||
|
LEFT JOIN xhpc_charging_station xcs on xcs.charging_station_id = xho.charging_station_id
|
||||||
|
LEFT JOIN xhpc_operator xo on xo.operator_id = xcs.operator_id
|
||||||
|
<if test="chargingStation != null and chargingStation != ''">
|
||||||
|
LEFT JOIN xhpc_user_privilege xup on xup.charging_station_id = xcs.charging_station_id
|
||||||
|
</if>
|
||||||
|
where xho.del_flag = 0 and xho.sorting_status = 1
|
||||||
|
<if test="operatorId != null and operatorId != ''">
|
||||||
|
and xo.operator_id = #{operatorId}
|
||||||
|
</if>
|
||||||
|
<if test="chargingStation != null and chargingStation != ''">
|
||||||
|
and xcs.user_id = #{userId}
|
||||||
|
</if>
|
||||||
|
GROUP BY xho.user_id) b on su.user_id = b.user_id
|
||||||
|
LEFT JOIN
|
||||||
|
(select sum(xho.act_power_price+xho.act_service_price) withdrawnCash ,xho.user_id
|
||||||
|
from xhpc_history_order xho
|
||||||
|
LEFT JOIN xhpc_charge_order xco on xco.charge_order_id = xho.charging_order_id
|
||||||
|
LEFT JOIN xhpc_charging_station xcs on xcs.charging_station_id = xho.charging_station_id
|
||||||
|
LEFT JOIN xhpc_operator xo on xo.operator_id = xcs.operator_id
|
||||||
|
<if test="chargingStation != null and chargingStation != ''">
|
||||||
|
LEFT JOIN xhpc_user_privilege xup on xup.charging_station_id = xcs.charging_station_id
|
||||||
|
</if>
|
||||||
|
where xho.del_flag = 0 and xho.sorting_status = 2
|
||||||
|
<if test="operatorId != null and operatorId != ''">
|
||||||
|
and xo.operator_id = #{operatorId}
|
||||||
|
</if>
|
||||||
|
<if test="chargingStation != null and chargingStation != ''">
|
||||||
|
and xcs.user_id = #{userId}
|
||||||
|
</if>
|
||||||
|
GROUP BY xho.user_id) c on su.user_id = c.user_id
|
||||||
|
LEFT JOIN xhpc_operator xo on xo.operator_id = su.operator_id
|
||||||
|
where a.user_id = #{userId}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="page" parameterType="java.lang.Long" resultType="java.util.Map">
|
||||||
|
|
||||||
|
select sum(xho.act_power_price+xho.act_service_price)
|
||||||
|
expenditure,
|
||||||
|
xho.user_id userId,xho.serial_number serialNumber,xco.create_time createTime,
|
||||||
|
xcs.`name` chargingStationName,xho.`sorting_status` sortingStatus,xdb.dict_value sortingStatusName,
|
||||||
|
xco.source,
|
||||||
|
CASE WHEN xco.source = 0 THEN '平台' else xiu.`name` end sourceName
|
||||||
|
from xhpc_history_order xho
|
||||||
|
LEFT JOIN xhpc_charge_order xco on xco.charge_order_id = xho.charging_order_id
|
||||||
|
LEFT JOIN xhpc_charging_station xcs on xcs.charging_station_id = xho.charging_station_id
|
||||||
|
LEFT JOIN xhpc_operator xo on xo.operator_id = xcs.operator_id
|
||||||
|
LEFT JOIN xhpc_dict_biz xdb on xdb.`code` = 'sorting_status' and xdb.dict_key = xho.`sorting_status`
|
||||||
|
<if test="chargingStation != null and chargingStation != ''">
|
||||||
|
LEFT JOIN xhpc_user_privilege xup on xup.charging_station_id = xcs.charging_station_id
|
||||||
|
</if>
|
||||||
|
LEFT JOIN sys_user su on su.user_id = xco.user_id
|
||||||
|
LEFT JOIN xhpc_internet_user xiu on xiu.internet_user_id = su.internet_user_id
|
||||||
|
where xho.del_flag = 0
|
||||||
|
<if test="userId != null and userId != ''">
|
||||||
|
and xho.user_id = #{userId}
|
||||||
|
</if>
|
||||||
|
<if test="serialNumber != null and serialNumber != ''">
|
||||||
|
and xho.serial_number like concat(concat('%', #{serialNumber}), '%')
|
||||||
|
</if>
|
||||||
|
<if test="createTimeStart != null and createTimeStart != ''"><!-- 开始时间检索 -->
|
||||||
|
AND xco.create_time >= #{createTimeStart}
|
||||||
|
</if>
|
||||||
|
<if test="createTimeEnd != null and createTimeEnd != ''"><!-- 结束时间检索 -->
|
||||||
|
AND xco.create_time <= #{createTimeEnd}
|
||||||
|
</if>
|
||||||
|
<if test="chargingStationName != null and chargingStationName != ''">
|
||||||
|
and xcs.`name`like concat(concat('%', #{chargingStationName}), '%')
|
||||||
|
</if>
|
||||||
|
<if test="status != null and status != ''">
|
||||||
|
and xho.sorting_status = #{status}
|
||||||
|
</if>
|
||||||
|
<if test="operatorId != null and operatorId != ''">
|
||||||
|
and xo.operator_id = #{operatorId }
|
||||||
|
</if>
|
||||||
|
<if test="chargingStation != null and chargingStation != ''">
|
||||||
|
and xup.user_id = #{userId}
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
@ -10,6 +10,7 @@ import com.ruoyi.system.api.domain.SysUser;
|
|||||||
import com.xhpc.user.domain.XhpcInternetUser;
|
import com.xhpc.user.domain.XhpcInternetUser;
|
||||||
import com.xhpc.user.openfeign.RemoteSystemService;
|
import com.xhpc.user.openfeign.RemoteSystemService;
|
||||||
import com.xhpc.user.service.IXhpcInternetUserService;
|
import com.xhpc.user.service.IXhpcInternetUserService;
|
||||||
|
import com.xhpc.user.service.IXhpcUserService;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
@ -33,6 +34,8 @@ public class XhpcInternetUserController extends BaseController {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private RemoteSystemService remoteSystemService;
|
private RemoteSystemService remoteSystemService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IXhpcUserService iXhpcUserService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增流量用户
|
* 新增流量用户
|
||||||
@ -55,7 +58,14 @@ public class XhpcInternetUserController extends BaseController {
|
|||||||
if (null != ajaxResult && !"200".equals(StringUtils.valueOf(ajaxResult.get("code")))) {
|
if (null != ajaxResult && !"200".equals(StringUtils.valueOf(ajaxResult.get("code")))) {
|
||||||
return ajaxResult;
|
return ajaxResult;
|
||||||
}
|
}
|
||||||
return toAjax(iXhpcInternetUserService.insert(xhpcInternetUser));
|
SysUser sysUser1 = iXhpcUserService.selectUserByUserName(sysUser.getUserName());
|
||||||
|
iXhpcInternetUserService.insert(xhpcInternetUser);
|
||||||
|
sysUser1.setInternetUserId(xhpcInternetUser.getInternetUserId());
|
||||||
|
ajaxResult = remoteSystemService.editUser(sysUser1);
|
||||||
|
if (null != ajaxResult && !"200".equals(StringUtils.valueOf(ajaxResult.get("code")))) {
|
||||||
|
return ajaxResult;
|
||||||
|
}
|
||||||
|
return AjaxResult.success();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -111,9 +121,9 @@ public class XhpcInternetUserController extends BaseController {
|
|||||||
*/
|
*/
|
||||||
//@PreAuthorize(hasPermi = "system:internet:page")
|
//@PreAuthorize(hasPermi = "system:internet:page")
|
||||||
@GetMapping("/page")
|
@GetMapping("/page")
|
||||||
public TableDataInfo page(String name, String contactName, String contactPhone) {
|
public TableDataInfo page(String name, String contactName, String contactPhone, String createTimeStart, String createTimeEnd) {
|
||||||
startPage();
|
startPage();
|
||||||
List<Map<String, Object>> list = iXhpcInternetUserService.selectInternetList(name, contactName, contactPhone);
|
List<Map<String, Object>> list = iXhpcInternetUserService.selectInternetList(name, contactName, contactPhone, createTimeStart, createTimeEnd);
|
||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -11,6 +11,7 @@ import com.ruoyi.system.api.domain.SysUser;
|
|||||||
import com.xhpc.user.domain.XhpcOperator;
|
import com.xhpc.user.domain.XhpcOperator;
|
||||||
import com.xhpc.user.openfeign.RemoteSystemService;
|
import com.xhpc.user.openfeign.RemoteSystemService;
|
||||||
import com.xhpc.user.service.IXhpcOperatorService;
|
import com.xhpc.user.service.IXhpcOperatorService;
|
||||||
|
import com.xhpc.user.service.IXhpcUserService;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
@ -34,6 +35,9 @@ public class XhpcOperatorController extends BaseController {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private RemoteSystemService remoteSystemService;
|
private RemoteSystemService remoteSystemService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IXhpcUserService iXhpcUserService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增运营商
|
* 新增运营商
|
||||||
*/
|
*/
|
||||||
@ -62,7 +66,14 @@ public class XhpcOperatorController extends BaseController {
|
|||||||
if (UserConstants.NOT_UNIQUE.equals(iXhpcOperatorService.checkAccountUnique(xhpcOperator))) {
|
if (UserConstants.NOT_UNIQUE.equals(iXhpcOperatorService.checkAccountUnique(xhpcOperator))) {
|
||||||
return AjaxResult.error("用户'" + xhpcOperator.getPhone() + "'失败,登录账号已存在");
|
return AjaxResult.error("用户'" + xhpcOperator.getPhone() + "'失败,登录账号已存在");
|
||||||
}
|
}
|
||||||
return toAjax(iXhpcOperatorService.insert(xhpcOperator));
|
iXhpcOperatorService.insert(xhpcOperator);
|
||||||
|
SysUser sysUser1 = iXhpcUserService.selectUserByUserName(sysUser.getUserName());
|
||||||
|
sysUser1.setOperatorId(xhpcOperator.getOperatorId());
|
||||||
|
ajaxResult = remoteSystemService.editUser(sysUser1);
|
||||||
|
if (null != ajaxResult && !"200".equals(StringUtils.valueOf(ajaxResult.get("code")))) {
|
||||||
|
return ajaxResult;
|
||||||
|
}
|
||||||
|
return AjaxResult.success();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -122,9 +133,9 @@ public class XhpcOperatorController extends BaseController {
|
|||||||
*/
|
*/
|
||||||
//@PreAuthorize(hasPermi = "system:operator:page")
|
//@PreAuthorize(hasPermi = "system:operator:page")
|
||||||
@GetMapping("/page")
|
@GetMapping("/page")
|
||||||
public TableDataInfo page(String name, String contactName, String contactPhone) {
|
public TableDataInfo page(String name, String contactName, String contactPhone, String createTimeStart, String createTimeEnd) {
|
||||||
startPage();
|
startPage();
|
||||||
List<Map<String, Object>> list = iXhpcOperatorService.selectOperatorList(name, contactName, contactPhone);
|
List<Map<String, Object>> list = iXhpcOperatorService.selectOperatorList(name, contactName, contactPhone, createTimeStart, createTimeEnd);
|
||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -51,6 +51,18 @@ public class XhpcOperator extends BaseEntity {
|
|||||||
@NotNull(message = "运营商属性不能为空")
|
@NotNull(message = "运营商属性不能为空")
|
||||||
private Integer attribute;
|
private Integer attribute;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 开户行
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "开户行不能为空")
|
||||||
|
private String openBank;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 卡号
|
||||||
|
*/
|
||||||
|
@NotNull(message = "卡号不能为空")
|
||||||
|
private Long cardNumber;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 地址code
|
* 地址code
|
||||||
*/
|
*/
|
||||||
@ -279,4 +291,20 @@ public class XhpcOperator extends BaseEntity {
|
|||||||
public void setDelFlag(Integer delFlag) {
|
public void setDelFlag(Integer delFlag) {
|
||||||
this.delFlag = delFlag;
|
this.delFlag = delFlag;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getOpenBank() {
|
||||||
|
return openBank;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOpenBank(String openBank) {
|
||||||
|
this.openBank = openBank;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getCardNumber() {
|
||||||
|
return cardNumber;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCardNumber(Long cardNumber) {
|
||||||
|
this.cardNumber = cardNumber;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@ -55,7 +55,7 @@ public interface XhpcInternetUserMapper {
|
|||||||
* @param contactPhone 联系人电话
|
* @param contactPhone 联系人电话
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public List<Map<String, Object>> selectInternetList(@Param("name") String name, @Param("contactName") String contactName, @Param("contactPhone") String contactPhone);
|
public List<Map<String, Object>> selectInternetList(@Param("name") String name, @Param("contactName") String contactName, @Param("contactPhone") String contactPhone, @Param("createTimeStart") String createTimeStart, @Param("createTimeEnd") String createTimeEnd);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过流量用户ID查询用户
|
* 通过流量用户ID查询用户
|
||||||
|
|||||||
@ -62,7 +62,7 @@ public interface XhpcOperatorMapper {
|
|||||||
* @param contactPhone 联系人电话
|
* @param contactPhone 联系人电话
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public List<Map<String, Object>> selectOperatorList(@Param("name") String name, @Param("contactName") String contactName, @Param("contactPhone") String contactPhone);
|
public List<Map<String, Object>> selectOperatorList(@Param("name") String name, @Param("contactName") String contactName, @Param("contactPhone") String contactPhone, @Param("createTimeStart") String createTimeStart, @Param("createTimeEnd") String createTimeEnd);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过用户ID删除用户和角色关联
|
* 通过用户ID删除用户和角色关联
|
||||||
|
|||||||
@ -70,4 +70,12 @@ public interface XhpcUserMapper {
|
|||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public Map<String, Object> operatorInfo(@Param("userId") Long userId);
|
public Map<String, Object> operatorInfo(@Param("userId") Long userId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过用户账号查询用户详情
|
||||||
|
*
|
||||||
|
* @param userName 用户账号
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public SysUser selectUserByUserName(@Param("userName") String userName);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -53,7 +53,7 @@ public interface IXhpcInternetUserService {
|
|||||||
* @param contactPhone 联系人电话
|
* @param contactPhone 联系人电话
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public List<Map<String, Object>> selectInternetList(String name, String contactName, String contactPhone);
|
public List<Map<String, Object>> selectInternetList(String name, String contactName, String contactPhone, String createTimeStart, String createTimeEnd);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 禁用/启用流量用户
|
* 禁用/启用流量用户
|
||||||
|
|||||||
@ -61,7 +61,7 @@ public interface IXhpcOperatorService {
|
|||||||
* @param contactPhone 联系人电话
|
* @param contactPhone 联系人电话
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public List<Map<String, Object>> selectOperatorList(String name, String contactName, String contactPhone);
|
public List<Map<String, Object>> selectOperatorList(String name, String contactName, String contactPhone, String createTimeStart, String createTimeEnd);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除用户
|
* 删除用户
|
||||||
|
|||||||
@ -1,5 +1,7 @@
|
|||||||
package com.xhpc.user.service;
|
package com.xhpc.user.service;
|
||||||
|
|
||||||
|
import com.ruoyi.system.api.domain.SysUser;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@ -62,4 +64,12 @@ public interface IXhpcUserService {
|
|||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public void status(Long userId);
|
public void status(Long userId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过用户账号查询用户详情
|
||||||
|
*
|
||||||
|
* @param userName 用户张号
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public SysUser selectUserByUserName(String userName);
|
||||||
}
|
}
|
||||||
@ -1,6 +1,5 @@
|
|||||||
package com.xhpc.user.service.impl;
|
package com.xhpc.user.service.impl;
|
||||||
|
|
||||||
import com.ruoyi.common.core.utils.StringUtils;
|
|
||||||
import com.ruoyi.system.api.domain.SysUser;
|
import com.ruoyi.system.api.domain.SysUser;
|
||||||
import com.xhpc.user.domain.XhpcInternetUser;
|
import com.xhpc.user.domain.XhpcInternetUser;
|
||||||
import com.xhpc.user.mapper.XhpcInternetUserMapper;
|
import com.xhpc.user.mapper.XhpcInternetUserMapper;
|
||||||
@ -89,8 +88,8 @@ public class XhpcInternetUserServiceImpl implements IXhpcInternetUserService {
|
|||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<Map<String, Object>> selectInternetList(String name, String contactName, String contactPhone) {
|
public List<Map<String, Object>> selectInternetList(String name, String contactName, String contactPhone, String createTimeStart, String createTimeEnd) {
|
||||||
return xhpcInternetUserMapper.selectInternetList(name, contactName, contactPhone);
|
return xhpcInternetUserMapper.selectInternetList(name, contactName, contactPhone, createTimeStart, createTimeEnd);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -104,8 +103,6 @@ public class XhpcInternetUserServiceImpl implements IXhpcInternetUserService {
|
|||||||
SysUser sysUser = xhpcInternetUserMapper.getUserByInternetUserId(internetUserId);
|
SysUser sysUser = xhpcInternetUserMapper.getUserByInternetUserId(internetUserId);
|
||||||
sysUser.setStatus("1".equals(sysUser.getStatus()) ? "0" : "1");
|
sysUser.setStatus("1".equals(sysUser.getStatus()) ? "0" : "1");
|
||||||
xhpcUserMapper.update(sysUser);
|
xhpcUserMapper.update(sysUser);
|
||||||
Map<String, Object> map = xhpcInternetUserMapper.info(internetUserId);
|
|
||||||
String status = StringUtils.valueOf(map.get("status"));
|
|
||||||
XhpcInternetUser xhpcInternetUser = new XhpcInternetUser();
|
XhpcInternetUser xhpcInternetUser = new XhpcInternetUser();
|
||||||
xhpcInternetUser.setInternetUserId(internetUserId);
|
xhpcInternetUser.setInternetUserId(internetUserId);
|
||||||
xhpcInternetUser.setStatus("0".equals(sysUser.getStatus()) ? 1 : 0);
|
xhpcInternetUser.setStatus("0".equals(sysUser.getStatus()) ? 1 : 0);
|
||||||
|
|||||||
@ -98,8 +98,8 @@ public class XhpcOperatorServiceImpl implements IXhpcOperatorService {
|
|||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<Map<String, Object>> selectOperatorList(String name, String contactName, String contactPhone) {
|
public List<Map<String, Object>> selectOperatorList(String name, String contactName, String contactPhone, String createTimeStart, String createTimeEnd) {
|
||||||
return xhpcOperatorMapper.selectOperatorList(name, contactName, contactPhone);
|
return xhpcOperatorMapper.selectOperatorList(name, contactName, contactPhone, createTimeStart, createTimeEnd);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -96,4 +96,15 @@ public class XhpcUserServiceImpl implements IXhpcUserService {
|
|||||||
sysUser.setStatus("1".equals(sysUser.getStatus()) ? "0" : "1");
|
sysUser.setStatus("1".equals(sysUser.getStatus()) ? "0" : "1");
|
||||||
xhpcUserMapper.update(sysUser);
|
xhpcUserMapper.update(sysUser);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过用户账号查询用户详情
|
||||||
|
*
|
||||||
|
* @param userName 用户张号
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public SysUser selectUserByUserName(String userName) {
|
||||||
|
return xhpcUserMapper.selectUserByUserName(userName);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@ -242,7 +242,7 @@
|
|||||||
<select id="selectInternetList" parameterType="java.lang.Long" resultType="java.util.Map">
|
<select id="selectInternetList" parameterType="java.lang.Long" resultType="java.util.Map">
|
||||||
select
|
select
|
||||||
xiu.internet_user_id internetUserId, xiu.`name`, xiu.phone, xiu.contact_name contactName,
|
xiu.internet_user_id internetUserId, xiu.`name`, xiu.phone, xiu.contact_name contactName,
|
||||||
xiu.contact_phone contactPhone,
|
xiu.contact_phone contactPhone,xiu.create_time createTime,
|
||||||
xiu.commission_type commissionType, xiu.commission_rate commissionRate,
|
xiu.commission_type commissionType, xiu.commission_rate commissionRate,
|
||||||
xiu.latitude, xiu.`status`,
|
xiu.latitude, xiu.`status`,
|
||||||
CASE WHEN xiu.`status` = 0 THEN '正常' else '禁用' end statusName,
|
CASE WHEN xiu.`status` = 0 THEN '正常' else '禁用' end statusName,
|
||||||
@ -259,6 +259,12 @@
|
|||||||
<if test="contactPhone != null and contactPhone != ''">
|
<if test="contactPhone != null and contactPhone != ''">
|
||||||
and xiu.contact_phone like concat(concat('%', #{contactPhone}), '%')
|
and xiu.contact_phone like concat(concat('%', #{contactPhone}), '%')
|
||||||
</if>
|
</if>
|
||||||
|
<if test="createTimeStart != null and createTimeStart != ''"><!-- 开始时间检索 -->
|
||||||
|
AND xiu.create_time >= #{createTimeStart}
|
||||||
|
</if>
|
||||||
|
<if test="createTimeEnd != null and createTimeEnd != ''"><!-- 结束时间检索 -->
|
||||||
|
AND xiu.create_time <= #{createTimeEnd}
|
||||||
|
</if>
|
||||||
ORDER BY xiu.update_time DESC
|
ORDER BY xiu.update_time DESC
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|||||||
@ -11,6 +11,8 @@
|
|||||||
<result column="contact_phone" property="contactPhone"/>
|
<result column="contact_phone" property="contactPhone"/>
|
||||||
<result column="phone" property="phone"/>
|
<result column="phone" property="phone"/>
|
||||||
<result column="attribute" property="attribute"/>
|
<result column="attribute" property="attribute"/>
|
||||||
|
<result column="open_bank" property="openBank"/>
|
||||||
|
<result column="card_number" property="cardNumber"/>
|
||||||
<result column="area_code" property="areaCode"/>
|
<result column="area_code" property="areaCode"/>
|
||||||
<result column="address" property="address"/>
|
<result column="address" property="address"/>
|
||||||
<result column="longitude" property="longitude"/>
|
<result column="longitude" property="longitude"/>
|
||||||
@ -33,7 +35,7 @@
|
|||||||
|
|
||||||
<sql id="Base_Column_List">
|
<sql id="Base_Column_List">
|
||||||
xo.operator_id operatorId, xo.name, xo.contact_name contactName, xo.contact_phone contactPhone,
|
xo.operator_id operatorId, xo.name, xo.contact_name contactName, xo.contact_phone contactPhone,
|
||||||
xo.phone, xo.attribute, xo.area_code areaCode, xo.address,
|
xo.phone, xo.attribute,xo.open_bank openBank,xo.card_number cardNumber, xo.area_code areaCode, xo.address,
|
||||||
xo.longitude, xo.latitude, xo.email, xo.commission_type commissionType,
|
xo.longitude, xo.latitude, xo.email, xo.commission_type commissionType,
|
||||||
xo.platform_commission_rate platformCommissionRate,
|
xo.platform_commission_rate platformCommissionRate,
|
||||||
xo.maintenance_commission_rate maintenanceCommissionRate,
|
xo.maintenance_commission_rate maintenanceCommissionRate,
|
||||||
@ -61,6 +63,12 @@
|
|||||||
<if test="null != attribute and '' != attribute">
|
<if test="null != attribute and '' != attribute">
|
||||||
attribute,
|
attribute,
|
||||||
</if>
|
</if>
|
||||||
|
<if test="null != openBank and '' != openBank">
|
||||||
|
open_bank,
|
||||||
|
</if>
|
||||||
|
<if test="null != cardNumber and '' != cardNumber">
|
||||||
|
card_number,
|
||||||
|
</if>
|
||||||
<if test="null != areaCode and '' != areaCode">
|
<if test="null != areaCode and '' != areaCode">
|
||||||
area_code,
|
area_code,
|
||||||
</if>
|
</if>
|
||||||
@ -132,6 +140,12 @@
|
|||||||
<if test="null != attribute and '' != attribute">
|
<if test="null != attribute and '' != attribute">
|
||||||
#{attribute},
|
#{attribute},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="null != openBank and '' != openBank">
|
||||||
|
#{openBank},
|
||||||
|
</if>
|
||||||
|
<if test="null != cardNumber and '' != cardNumber">
|
||||||
|
#{cardNumber},
|
||||||
|
</if>
|
||||||
<if test="null != areaCode and '' != areaCode">
|
<if test="null != areaCode and '' != areaCode">
|
||||||
#{areaCode},
|
#{areaCode},
|
||||||
</if>
|
</if>
|
||||||
@ -198,6 +212,8 @@
|
|||||||
<if test="null != contactPhone and '' != contactPhone">contact_phone = #{contactPhone},</if>
|
<if test="null != contactPhone and '' != contactPhone">contact_phone = #{contactPhone},</if>
|
||||||
<if test="null != phone and '' != phone">phone = #{phone},</if>
|
<if test="null != phone and '' != phone">phone = #{phone},</if>
|
||||||
<if test="null != attribute and '' != attribute">attribute = #{attribute},</if>
|
<if test="null != attribute and '' != attribute">attribute = #{attribute},</if>
|
||||||
|
<if test="null != openBank and '' != openBank">open_bank = #{openBank},</if>
|
||||||
|
<if test="null != cardNumber and '' != cardNumber">card_number = #{cardNumber},</if>
|
||||||
<if test="null != areaCode and '' != areaCode">area_code = #{areaCode},</if>
|
<if test="null != areaCode and '' != areaCode">area_code = #{areaCode},</if>
|
||||||
<if test="null != address and '' != address">address = #{address},</if>
|
<if test="null != address and '' != address">address = #{address},</if>
|
||||||
<if test="null != longitude and '' != longitude">longitude = #{longitude},</if>
|
<if test="null != longitude and '' != longitude">longitude = #{longitude},</if>
|
||||||
@ -251,7 +267,7 @@
|
|||||||
|
|
||||||
<select id="selectOperatorList" parameterType="java.lang.Long" resultType="java.util.Map">
|
<select id="selectOperatorList" parameterType="java.lang.Long" resultType="java.util.Map">
|
||||||
select xo.operator_id operatorId, xo.name, xo.contact_name contactName,
|
select xo.operator_id operatorId, xo.name, xo.contact_name contactName,
|
||||||
xo.contact_phone contactPhone, xo.phone, xo.attribute,
|
xo.contact_phone contactPhone, xo.phone, xo.attribute,xiu.create_time createTime,
|
||||||
xdb.dict_value attributenName
|
xdb.dict_value attributenName
|
||||||
from xhpc_operator `xo`
|
from xhpc_operator `xo`
|
||||||
LEFT JOIN xhpc_dict_biz xdb on xdb.`code` = 'operator_attribute' and xdb.dict_key = xo.attribute
|
LEFT JOIN xhpc_dict_biz xdb on xdb.`code` = 'operator_attribute' and xdb.dict_key = xo.attribute
|
||||||
@ -265,6 +281,12 @@
|
|||||||
<if test="contactPhone != null and contactPhone != ''">
|
<if test="contactPhone != null and contactPhone != ''">
|
||||||
and xo.contact_phone like concat(concat('%', #{contactPhone}), '%')
|
and xo.contact_phone like concat(concat('%', #{contactPhone}), '%')
|
||||||
</if>
|
</if>
|
||||||
|
<if test="createTimeStart != null and createTimeStart != ''"><!-- 开始时间检索 -->
|
||||||
|
AND xo.create_time >= #{createTimeStart}
|
||||||
|
</if>
|
||||||
|
<if test="createTimeEnd != null and createTimeEnd != ''"><!-- 结束时间检索 -->
|
||||||
|
AND xo.create_time <= #{createTimeEnd}
|
||||||
|
</if>
|
||||||
ORDER BY xo.update_time DESC
|
ORDER BY xo.update_time DESC
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|||||||
@ -132,4 +132,10 @@
|
|||||||
LEFT JOIN sys_dict_data sdd on sdd.`dict_type` = "sys_user_sex" and sdd.dict_code = su.sex
|
LEFT JOIN sys_dict_data sdd on sdd.`dict_type` = "sys_user_sex" and sdd.dict_code = su.sex
|
||||||
WHERE su.del_flag = 0 and user_id = #{userId}
|
WHERE su.del_flag = 0 and user_id = #{userId}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="selectUserByUserName" parameterType="java.lang.Long" resultMap="XhpcUserResult">
|
||||||
|
select *
|
||||||
|
from sys_user
|
||||||
|
where user_name = #{userName}
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
Loading…
x
Reference in New Issue
Block a user