外部接口

This commit is contained in:
jiang 2025-09-01 13:49:07 +08:00
parent 763141e7e5
commit 8f85d4df1e
8 changed files with 30 additions and 21 deletions

View File

@ -677,8 +677,8 @@ public class DevInfoServiceImpl implements DevInfoService {
public int insertInfoMotionDto(InfoMotionDto infoMotionDto) { public int insertInfoMotionDto(InfoMotionDto infoMotionDto) {
DevInfo devInfo = new DevInfo(); DevInfo devInfo = new DevInfo();
BeanUtils.copyProperties(infoMotionDto, devInfo); BeanUtils.copyProperties(infoMotionDto, devInfo);
devInfoMapper.insertDevInfo(devInfo); return devInfoMapper.insertDevInfo(devInfo);
return devInfoMapper.insertLon(infoMotionDto); //return devInfoMapper.insertLon(infoMotionDto);
} }

View File

@ -3,10 +3,7 @@ package com.bonus.material.externalInterface.controller;
import com.bonus.common.core.web.controller.BaseController; import com.bonus.common.core.web.controller.BaseController;
import com.bonus.common.core.web.domain.AjaxResult; import com.bonus.common.core.web.domain.AjaxResult;
import com.bonus.material.externalInterface.service.EquipmentExternalService; import com.bonus.material.externalInterface.service.EquipmentExternalService;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.util.List; import java.util.List;
@ -15,6 +12,7 @@ import java.util.Map;
/** /**
* 装备管理 * 装备管理
*/ */
@RestController
@RequestMapping("equipmentExternal") @RequestMapping("equipmentExternal")
public class EquipmentExternalController extends BaseController { public class EquipmentExternalController extends BaseController {
@Resource @Resource

View File

@ -3,15 +3,16 @@ package com.bonus.material.externalInterface.controller;
import com.bonus.common.core.web.controller.BaseController; import com.bonus.common.core.web.controller.BaseController;
import com.bonus.common.core.web.domain.AjaxResult; import com.bonus.common.core.web.domain.AjaxResult;
import com.bonus.material.externalInterface.service.LargeScreenExternalService; import com.bonus.material.externalInterface.service.LargeScreenExternalService;
import org.aspectj.weaver.loadtime.Aj;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource; import javax.annotation.Resource;
/** /**
* 装备共享一张图 * 装备共享一张图
*/ */
@RestController
@RequestMapping("largeScreenExternal") @RequestMapping("largeScreenExternal")
public class LargeScreenExternalController extends BaseController { public class LargeScreenExternalController extends BaseController {

View File

@ -17,7 +17,7 @@ public interface LargeScreenExternalMapper {
* @param accountId id * @param accountId id
* @return 设备数据 * @return 设备数据
*/ */
@MapKey("name") @MapKey("")
Map<String, Object> deviceStatusStatistics(String accountId); Map<String, Object> deviceStatusStatistics(String accountId);
/** /**

View File

@ -170,4 +170,7 @@ public class OrderInfoDto {
@ApiModelProperty(value = "出库时间") @ApiModelProperty(value = "出库时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private String preOutboundTime; private String preOutboundTime;
private String maId;
} }

View File

@ -378,6 +378,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</insert> </insert>
<insert id="insertLon"> <insert id="insertLon">
<if test="dto != null">
insert into gps_real_info insert into gps_real_info
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="dto.gpsCode != null and dto.gpsCode != ''">gps_code,</if> <if test="dto.gpsCode != null and dto.gpsCode != ''">gps_code,</if>
@ -389,6 +390,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="dto.lon != null and dto.lon !=''">#{dto.lon},</if> <if test="dto.lon != null and dto.lon !=''">#{dto.lon},</if>
<if test="dto.lat != null and dto.lat != ''">#{dto.lat},</if> <if test="dto.lat != null and dto.lat != ''">#{dto.lat},</if>
</trim> </trim>
</if>
</insert> </insert>
<update id="updateDevInfo" parameterType="com.bonus.material.device.domain.DevInfo"> <update id="updateDevInfo" parameterType="com.bonus.material.device.domain.DevInfo">

View File

@ -6,7 +6,8 @@
<!-- 统计各种状态下的装备数量,用于大屏展示 --> <!-- 统计各种状态下的装备数量,用于大屏展示 -->
<select id="deviceStatusStatistics" resultType="java.util.Map"> <select id="deviceStatusStatistics" resultType="java.util.Map">
SELECT COUNT(*) AS totalCount
FROM ma_dev_info
</select> </select>
<!-- 图表展示当前账号下装备的分级统计可切换分布查看I、II、III类下的分级统计 --> <!-- 图表展示当前账号下装备的分级统计可切换分布查看I、II、III类下的分级统计 -->
<select id="deviceLevelStatistics" resultType="java.util.Map"> <select id="deviceLevelStatistics" resultType="java.util.Map">

View File

@ -171,6 +171,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="code != null and code != ''"> <if test="code != null and code != ''">
AND moi.code = #{code} AND moi.code = #{code}
</if> </if>
<if test="maId != null and maId != ''">
AND moi.maId = #{maId}
</if>
<if test="startTime != null and endTime != null "> <if test="startTime != null and endTime != null ">
AND ((hh.rent_begin_time BETWEEN #{startTime} AND #{endTime}) AND ((hh.rent_begin_time BETWEEN #{startTime} AND #{endTime})
OR (hh.rent_end_time BETWEEN #{startTime} AND #{endTime}) OR (hh.rent_end_time BETWEEN #{startTime} AND #{endTime})