caojianbin
8 months ago
18 changed files with 674 additions and 0 deletions
@ -0,0 +1,44 @@
@@ -0,0 +1,44 @@
|
||||
package com.ecell.internationalize.system.controller; |
||||
import com.ecell.internationalize.common.core.utils.locale.LocaleUtil; |
||||
import com.ecell.internationalize.common.core.web.domain.AjaxResult; |
||||
import com.ecell.internationalize.common.system.constant.FieldConstant; |
||||
import com.ecell.internationalize.system.service.HeartTemperatureRecordService; |
||||
import io.swagger.annotations.Api; |
||||
import io.swagger.annotations.ApiOperation; |
||||
import org.springframework.beans.factory.annotation.Autowired; |
||||
import org.springframework.web.bind.annotation.PostMapping; |
||||
import org.springframework.web.bind.annotation.RequestBody; |
||||
import org.springframework.web.bind.annotation.RequestMapping; |
||||
import org.springframework.web.bind.annotation.RestController; |
||||
|
||||
import java.util.Map; |
||||
|
||||
/** |
||||
* <p> |
||||
* 前端控制器 |
||||
* </p> |
||||
* |
||||
* @author liy |
||||
* @since 2022-07-11 |
||||
*/ |
||||
@Api(value="设备体温",tags={"设备体温接口"}) |
||||
@RestController |
||||
@RequestMapping("/temperature_detail") |
||||
public class TemperatureDetailController { |
||||
@Autowired |
||||
private HeartTemperatureRecordService heartTemperatureRecordService; |
||||
/** |
||||
* 设备体温条件分页查询 |
||||
* @Author liy |
||||
* @Date 2022/7/11 15:38 |
||||
* @param map 分页条件查询体 |
||||
* @Return AjaxResult |
||||
*/ |
||||
@ApiOperation("条件分页查询设备体温") |
||||
@PostMapping("temperature/detail/list") |
||||
public AjaxResult queryAll(@RequestBody Map<String,Object> map){ |
||||
map.put("type","2"); |
||||
return AjaxResult.success(LocaleUtil.getMessage(FieldConstant.MESSAGES_SUCCESS),heartTemperatureRecordService.findAllByPage(map)); |
||||
} |
||||
} |
||||
|
@ -0,0 +1,74 @@
@@ -0,0 +1,74 @@
|
||||
package com.ecell.internationalize.system.entity; |
||||
|
||||
import com.baomidou.mybatisplus.annotation.FieldFill; |
||||
import com.baomidou.mybatisplus.annotation.TableField; |
||||
import com.baomidou.mybatisplus.annotation.TableId; |
||||
import com.baomidou.mybatisplus.annotation.TableName; |
||||
import com.fasterxml.jackson.annotation.JsonFormat; |
||||
import lombok.Data; |
||||
import lombok.EqualsAndHashCode; |
||||
import lombok.experimental.Accessors; |
||||
|
||||
import java.util.Date; |
||||
|
||||
/** |
||||
* <p> |
||||
* |
||||
* </p> |
||||
* |
||||
* @author liy |
||||
* @since 2022-07-11 |
||||
*/ |
||||
@Data |
||||
@EqualsAndHashCode(callSuper = false) |
||||
@Accessors(chain = true) |
||||
@TableName("temperature_detail") |
||||
public class TemperatureDetail{ |
||||
|
||||
private static final long serialVersionUID=1L; |
||||
|
||||
/** |
||||
* 主键Id |
||||
*/ |
||||
@TableId("id") |
||||
private String id; |
||||
|
||||
/** |
||||
* 设备iMei |
||||
*/ |
||||
@TableField("i_mei") |
||||
private String mei; |
||||
|
||||
/** |
||||
* 体温数据 |
||||
*/ |
||||
private Double temperature; |
||||
|
||||
/** |
||||
* 姓名 |
||||
*/ |
||||
@TableField(exist = false) |
||||
private String name; |
||||
|
||||
/** |
||||
* 创建人 |
||||
*/ |
||||
private String createUser; |
||||
/** |
||||
* 创建时间 |
||||
*/ |
||||
@TableField(value = "create_time",fill = FieldFill.INSERT) |
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
||||
private Date createTime; |
||||
/** |
||||
* 修改人 |
||||
*/ |
||||
private String updateUser; |
||||
/** |
||||
* 修改时间 |
||||
*/ |
||||
@TableField(value = "update_time",fill = FieldFill.UPDATE) |
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
||||
private Date updateTime; |
||||
|
||||
} |
@ -0,0 +1,31 @@
@@ -0,0 +1,31 @@
|
||||
package com.ecell.internationalize.system.entity.api.dto; |
||||
|
||||
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.Data; |
||||
|
||||
/** |
||||
* @Title: ApiOutwardPage |
||||
* @Author: liy |
||||
* @Date: 2023/3/8 14:56 |
||||
* @Description: |
||||
* @Version:1.0 |
||||
*/ |
||||
@Data |
||||
public class TempPage { |
||||
@ApiModelProperty(example = "设备IMEI") |
||||
private String imei; |
||||
|
||||
@ApiModelProperty(example = "开始日期") |
||||
private String startDate; |
||||
|
||||
@ApiModelProperty(example = "结束日期") |
||||
private String endDate; |
||||
|
||||
// @ApiModelProperty(example = "每页展示的条数")
|
||||
// private Integer pageSize;
|
||||
//
|
||||
// @ApiModelProperty(example = "当前的页码")
|
||||
// private Integer current;
|
||||
|
||||
} |
||||
|
@ -0,0 +1,40 @@
@@ -0,0 +1,40 @@
|
||||
package com.ecell.internationalize.system.entity.api.dto; |
||||
|
||||
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.Data; |
||||
import lombok.EqualsAndHashCode; |
||||
import lombok.experimental.Accessors; |
||||
|
||||
import java.io.Serializable; |
||||
|
||||
/** |
||||
* <p> |
||||
* 闹钟设置表 |
||||
* </p> |
||||
* |
||||
* @author liy |
||||
* @since 2022-09-07 |
||||
*/ |
||||
@Data |
||||
@EqualsAndHashCode(callSuper = false) |
||||
@Accessors(chain = true) |
||||
public class UpdateDeviceAlarmDto implements Serializable { |
||||
|
||||
private static final long serialVersionUID=1L; |
||||
|
||||
@ApiModelProperty(example = "主键Id") |
||||
private String id; |
||||
|
||||
@ApiModelProperty(example = "标签") |
||||
private String tag; |
||||
|
||||
@ApiModelProperty(example = "响铃时间") |
||||
private String alarmTime; |
||||
|
||||
@ApiModelProperty(example = "重复星期数为'0', '1'组成的7位长度字符串, 表示周一至周日是否有效,eg: '0000011'为周六日有效, '1110000'为周一二三有效") |
||||
private String alarmWeek; |
||||
|
||||
@ApiModelProperty(example = "设备imei") |
||||
private String imei; |
||||
|
||||
} |
@ -0,0 +1,28 @@
@@ -0,0 +1,28 @@
|
||||
package com.ecell.internationalize.system.entity.dto; |
||||
import com.ecell.internationalize.common.system.entity.VersionRatioHistory; |
||||
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.Data; |
||||
|
||||
import java.util.List; |
||||
|
||||
/** |
||||
* @Title: TotalTypeDto |
||||
* @Author: liy |
||||
* @Date: 2022/11/2 15:24 |
||||
* @Description: |
||||
* @Version:1.0 |
||||
*/ |
||||
@Data |
||||
public class TotalTypeDto { |
||||
@ApiModelProperty(example = "统计类型(1:注册总数,2:今日注册数,3:今日活跃数,4:前一个月用户活跃数,5:前一个月每天的注册数)") |
||||
private String type; |
||||
|
||||
@ApiModelProperty(example="数量") |
||||
private Integer total; |
||||
|
||||
@ApiModelProperty(example="历史用户活跃数(type为4时存在该值)") |
||||
private List<VersionRatioHistory> list; |
||||
|
||||
@ApiModelProperty(example="前一个月每天的注册数(type为5时存在该值)") |
||||
private List<RegisterDto> registerList; |
||||
} |
@ -0,0 +1,15 @@
@@ -0,0 +1,15 @@
|
||||
package com.ecell.internationalize.system.entity.dto; |
||||
|
||||
import lombok.Data; |
||||
|
||||
/** |
||||
* @author borui |
||||
*/ |
||||
@Data |
||||
public class TrackDTO { |
||||
private String imei; |
||||
private String start; |
||||
private String firmId; |
||||
private String agentId; |
||||
|
||||
} |
@ -0,0 +1,13 @@
@@ -0,0 +1,13 @@
|
||||
package com.ecell.internationalize.system.entity.vo; |
||||
|
||||
import lombok.Data; |
||||
|
||||
/** |
||||
* @author borui |
||||
*/ |
||||
@Data |
||||
public class TrackVO { |
||||
private String imei; |
||||
private String longitude; |
||||
private String latitude; |
||||
} |
@ -0,0 +1,38 @@
@@ -0,0 +1,38 @@
|
||||
package com.ecell.internationalize.system.entity.vo; |
||||
|
||||
import io.swagger.annotations.ApiModel; |
||||
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.Data; |
||||
|
||||
import java.util.List; |
||||
|
||||
/** |
||||
* @Title: TreeNode |
||||
* @Author: liy |
||||
* @Date: 2022/7/19 9:20 |
||||
* @Description: |
||||
* @Version:1.0 |
||||
*/ |
||||
@Data |
||||
@ApiModel(value = "树形节点") |
||||
public class TreeNode { |
||||
@ApiModelProperty(value = "当前节点id") |
||||
protected String id; |
||||
|
||||
@ApiModelProperty(value = "父节点id") |
||||
protected String parentId; |
||||
|
||||
@ApiModelProperty(value = "子节点列表") |
||||
protected List<TreeNode> children ; |
||||
|
||||
/** |
||||
* 是否包含子节点 |
||||
* |
||||
* @since 3.7 |
||||
*/ |
||||
private Boolean hasChildren; |
||||
|
||||
public void add(TreeNode node) { |
||||
children.add(node); |
||||
} |
||||
} |
@ -0,0 +1,28 @@
@@ -0,0 +1,28 @@
|
||||
package com.ecell.internationalize.system.mapper; |
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
||||
import com.ecell.internationalize.system.entity.TemperatureDetail; |
||||
import org.apache.ibatis.annotations.Param; |
||||
|
||||
import java.util.Map; |
||||
|
||||
/** |
||||
* <p> |
||||
* Mapper 接口 |
||||
* </p> |
||||
* |
||||
* @author liy |
||||
* @since 2022-07-11 |
||||
*/ |
||||
public interface TemperatureDetailMapper extends BaseMapper<TemperatureDetail> { |
||||
/** |
||||
* 体温条件分页查询 |
||||
* @Author liy |
||||
* @Date 2022/7/11 15:42 |
||||
* @param page 分页 |
||||
* @param map 查询条件 |
||||
* @return Page |
||||
*/ |
||||
Page<TemperatureDetail> getList(@Param("page") Page<TemperatureDetail> page, @Param("map") Map<String, Object> map); |
||||
} |
@ -0,0 +1,16 @@
@@ -0,0 +1,16 @@
|
||||
package com.ecell.internationalize.system.service; |
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService; |
||||
import com.ecell.internationalize.system.entity.TemperatureConfig; |
||||
|
||||
/** |
||||
* <p> |
||||
* 服务类 |
||||
* </p> |
||||
* |
||||
* @author liy |
||||
* @since 2022-07-11 |
||||
*/ |
||||
public interface TemperatureConfigService extends IService<TemperatureConfig> { |
||||
|
||||
} |
@ -0,0 +1,28 @@
@@ -0,0 +1,28 @@
|
||||
package com.ecell.internationalize.system.service; |
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
import com.baomidou.mybatisplus.extension.service.IService; |
||||
import com.ecell.internationalize.system.entity.TemperatureDetail; |
||||
|
||||
import java.util.Map; |
||||
|
||||
/** |
||||
* <p> |
||||
* 服务类 |
||||
* </p> |
||||
* |
||||
* @author liy |
||||
* @since 2022-07-11 |
||||
*/ |
||||
public interface TemperatureDetailService extends IService<TemperatureDetail> { |
||||
/** |
||||
* 设备体温条件分页查询 |
||||
* @Author liy |
||||
* @Date 2022/7/11 15:42 |
||||
* @param map 分页查询体 |
||||
* @return IPage |
||||
*/ |
||||
IPage<TemperatureDetail> findAllByPage(Map<String, Object> map); |
||||
|
||||
|
||||
} |
@ -0,0 +1,45 @@
@@ -0,0 +1,45 @@
|
||||
package com.ecell.internationalize.system.service; |
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
import com.baomidou.mybatisplus.extension.service.IService; |
||||
import com.ecell.internationalize.common.system.entity.User; |
||||
import com.ecell.internationalize.common.system.entity.VersionRatioHistory; |
||||
import com.ecell.internationalize.system.entity.dto.RegisterDto; |
||||
|
||||
import java.util.Date; |
||||
import java.util.List; |
||||
import java.util.Map; |
||||
|
||||
/** |
||||
* <p> |
||||
* 用户 服务类 |
||||
* </p> |
||||
* @author liy |
||||
* @since 2022-07-07 |
||||
*/ |
||||
public interface UserService extends IService<User> { |
||||
/** |
||||
* 用户信息条件分页查询 |
||||
* @Author liy |
||||
* @Date 2022/7/7 16:42 |
||||
* @param map 分页查询体 |
||||
* @return IPage |
||||
*/ |
||||
IPage<User> queryList(Map<String,Object> map); |
||||
/** |
||||
* 用户操作条件分页查询 |
||||
* @Author liy |
||||
* @Date 2022/7/8 16:42 |
||||
* @param map 分页查询体 |
||||
* @return IPage |
||||
*/ |
||||
IPage<User> queryOperatorList(Map<String,Object> map); |
||||
|
||||
List<String> queryChannel(); |
||||
|
||||
int activeCount(Date startTime, Date endTime); |
||||
|
||||
List<VersionRatioHistory> monthActiveCount(String currentDate, String preMonthDate); |
||||
|
||||
List<RegisterDto> monthRegisterCount(String currentDate, String preMonthDate); |
||||
} |
@ -0,0 +1,20 @@
@@ -0,0 +1,20 @@
|
||||
package com.ecell.internationalize.system.service.impl; |
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
||||
import com.ecell.internationalize.system.entity.TemperatureConfig; |
||||
import com.ecell.internationalize.system.mapper.TemperatureConfigMapper; |
||||
import com.ecell.internationalize.system.service.TemperatureConfigService; |
||||
import org.springframework.stereotype.Service; |
||||
|
||||
/** |
||||
* <p> |
||||
* 服务实现类 |
||||
* </p> |
||||
* |
||||
* @author liy |
||||
* @since 2022-07-11 |
||||
*/ |
||||
@Service |
||||
public class TemperatureConfigServiceImpl extends ServiceImpl<TemperatureConfigMapper, TemperatureConfig> implements TemperatureConfigService { |
||||
|
||||
} |
@ -0,0 +1,39 @@
@@ -0,0 +1,39 @@
|
||||
package com.ecell.internationalize.system.service.impl; |
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
||||
import com.ecell.internationalize.common.system.constant.FieldConstant; |
||||
import com.ecell.internationalize.system.entity.TemperatureDetail; |
||||
import com.ecell.internationalize.system.mapper.TemperatureDetailMapper; |
||||
import com.ecell.internationalize.system.service.TemperatureDetailService; |
||||
import org.springframework.beans.factory.annotation.Autowired; |
||||
import org.springframework.stereotype.Service; |
||||
|
||||
import java.util.Map; |
||||
|
||||
/** |
||||
* <p> |
||||
* 服务实现类 |
||||
* </p> |
||||
* |
||||
* @author liy |
||||
* @since 2022-07-11 |
||||
*/ |
||||
@Service |
||||
public class TemperatureDetailServiceImpl extends ServiceImpl<TemperatureDetailMapper, TemperatureDetail> implements TemperatureDetailService { |
||||
@Autowired |
||||
private TemperatureDetailMapper temperatureDetailMapper; |
||||
/** |
||||
* 设备体温条件分页查询 |
||||
* @Author liy |
||||
* @Date 2022/7/11 15:42 |
||||
* @param map 分页查询体 |
||||
* @return IPage |
||||
*/ |
||||
@Override |
||||
public IPage<TemperatureDetail> findAllByPage(Map<String, Object> map) { |
||||
Page<TemperatureDetail> page=new Page<>(Integer.parseInt(map.get(FieldConstant.CURRENT).toString()),Integer.parseInt(map.get(FieldConstant.SIZE).toString())); |
||||
return temperatureDetailMapper.getList(page,map); |
||||
} |
||||
} |
@ -0,0 +1,95 @@
@@ -0,0 +1,95 @@
|
||||
package com.ecell.internationalize.system.service.impl; |
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
||||
import com.ecell.internationalize.common.system.constant.FieldConstant; |
||||
import com.ecell.internationalize.common.system.entity.User; |
||||
import com.ecell.internationalize.common.system.entity.VersionRatioHistory; |
||||
import com.ecell.internationalize.system.entity.dto.RegisterDto; |
||||
import com.ecell.internationalize.system.mapper.UserMapper; |
||||
import com.ecell.internationalize.system.service.UserService; |
||||
import org.springframework.beans.factory.annotation.Autowired; |
||||
import org.springframework.stereotype.Service; |
||||
|
||||
import java.util.Date; |
||||
import java.util.List; |
||||
import java.util.Map; |
||||
|
||||
/** |
||||
* <p> |
||||
* 用户 服务实现类 |
||||
* </p> |
||||
* @author liy |
||||
* @since 2022-07-07 |
||||
*/ |
||||
@Service |
||||
public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements UserService { |
||||
@Autowired |
||||
private UserMapper userMapper; |
||||
/** |
||||
* 用户信息条件分页查询 |
||||
* @Author liy |
||||
* @Date 2022/7/7 16:42 |
||||
* @param map 分页查询体 |
||||
* @return IPage |
||||
*/ |
||||
@Override |
||||
public IPage<User> queryList(Map<String,Object> map) { |
||||
Page<User> page=new Page<>(Integer.parseInt(map.get(FieldConstant.CURRENT).toString()),Integer.parseInt(map.get(FieldConstant.SIZE).toString())); |
||||
return userMapper.getList(page, map); |
||||
} |
||||
/** |
||||
* 用户操作条件分页查询 |
||||
* @Author liy |
||||
* @Date 2022/7/8 16:42 |
||||
* @param map 分页查询体 |
||||
* @return IPage |
||||
*/ |
||||
@Override |
||||
public IPage<User> queryOperatorList(Map<String, Object> map) { |
||||
Page<User> page=new Page<>(Integer.parseInt(map.get(FieldConstant.CURRENT).toString()),Integer.parseInt(map.get(FieldConstant.SIZE).toString())); |
||||
return userMapper.getList(page, map); |
||||
} |
||||
|
||||
@Override |
||||
public List<String> queryChannel() { |
||||
return userMapper.queryChannel(); |
||||
} |
||||
|
||||
@Override |
||||
public int activeCount(Date startTime, Date endTime) { |
||||
return userMapper.activeCount(startTime,endTime); |
||||
} |
||||
|
||||
@Override |
||||
public List<VersionRatioHistory> monthActiveCount(String currentDate, String preMonthDate) { |
||||
return userMapper.monthActiveCount(currentDate,preMonthDate); |
||||
} |
||||
|
||||
@Override |
||||
public List<RegisterDto> monthRegisterCount(String currentDate, String preMonthDate) { |
||||
return userMapper.monthRegisterCount(currentDate,preMonthDate); |
||||
} |
||||
/** |
||||
* 多条件查询 |
||||
* @Author: liy |
||||
* @Date: 2022/7/8 17:39 |
||||
*/ |
||||
// private LambdaQueryWrapper<User> conditionMap(Map<String,Object> map){
|
||||
// LambdaQueryWrapper<User> queryWrapper = new LambdaQueryWrapper<>();
|
||||
// if (map.containsKey(FieldConstant.PHONE)&&null!=map.get(FieldConstant.PHONE).toString()){
|
||||
// queryWrapper.eq(User::getPhone,map.get(FieldConstant.PHONE).toString());
|
||||
// }
|
||||
// if (map.containsKey(FieldConstant.I_MEI)&&null!=map.get(FieldConstant.I_MEI).toString()){
|
||||
// queryWrapper.eq(User::getIMei,map.get(FieldConstant.I_MEI).toString());
|
||||
// }
|
||||
// if (map.containsKey(FieldConstant.CHANNEL)&&null!=map.get(FieldConstant.CHANNEL).toString()){
|
||||
// queryWrapper.eq(User::getChannel,map.get(FieldConstant.CHANNEL).toString());
|
||||
// }
|
||||
// if (map.containsKey(FieldConstant.STATUS)&&null!=map.get(FieldConstant.STATUS).toString()){
|
||||
// queryWrapper.eq(User::getStatus,map.get(FieldConstant.STATUS).toString());
|
||||
// }
|
||||
// return queryWrapper;
|
||||
// }
|
||||
} |
@ -0,0 +1,68 @@
@@ -0,0 +1,68 @@
|
||||
package com.ecell.internationalize.system.utils; |
||||
|
||||
import com.ecell.internationalize.system.entity.FirmManage; |
||||
import com.ecell.internationalize.system.entity.vo.FirmTree; |
||||
import com.ecell.internationalize.system.entity.vo.TreeNode; |
||||
import lombok.experimental.UtilityClass; |
||||
|
||||
import java.util.ArrayList; |
||||
import java.util.List; |
||||
|
||||
/** |
||||
* @Title: TreeUtil |
||||
* @Author: liy |
||||
* @Date: 2022/7/19 9:16 |
||||
* @Description: |
||||
* @Version:1.0 |
||||
*/ |
||||
@UtilityClass |
||||
public class TreeUtil { |
||||
/** |
||||
* 两层循环实现建树 |
||||
* @param treeNodes 传入的树节点列表 |
||||
* @return |
||||
*/ |
||||
public <T extends TreeNode> List<T> build(List<T> treeNodes, Object root) { |
||||
|
||||
List<T> trees = new ArrayList<>(); |
||||
|
||||
for (T treeNode : treeNodes) { |
||||
|
||||
if (root.equals(treeNode.getParentId())) { |
||||
trees.add(treeNode); |
||||
} |
||||
|
||||
for (T it : treeNodes) { |
||||
if (it.getParentId().equals(treeNode.getId())) { |
||||
if (treeNode.getChildren() == null) { |
||||
treeNode.setChildren(new ArrayList<>()); |
||||
} |
||||
//treeNode.setHasChildren(true);
|
||||
treeNode.add(it); |
||||
} |
||||
} |
||||
} |
||||
return trees; |
||||
} |
||||
|
||||
/** |
||||
* 通过FirmManage创建树形节点 |
||||
* @param firmManages |
||||
* @param root |
||||
* @return |
||||
*/ |
||||
public List<FirmTree> buildFirmTree(List<FirmManage> firmManages, String root) { |
||||
List<FirmTree> trees = new ArrayList<>(); |
||||
FirmTree node; |
||||
for (FirmManage firmManage : firmManages) { |
||||
node = new FirmTree(); |
||||
node.setId(firmManage.getFirmId()); |
||||
node.setParentId(firmManage.getParentId()); |
||||
node.setFirmName(firmManage.getFirmName()); |
||||
node.setCreateTime(firmManage.getCreateTime()); |
||||
node.setHasChildren(false); |
||||
trees.add(node); |
||||
} |
||||
return TreeUtil.build(trees, root); |
||||
} |
||||
} |
@ -0,0 +1,21 @@
@@ -0,0 +1,21 @@
|
||||
<?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.ecell.internationalize.system.mapper.TemperatureConfigMapper"> |
||||
|
||||
<!-- 通用查询映射结果 --> |
||||
<resultMap id="BaseResultMap" type="com.ecell.internationalize.system.entity.TemperatureConfig"> |
||||
<id column="id" property="id" /> |
||||
<result column="i_mei" property="mei" /> |
||||
<result column="temperature_freq" property="temperatureFreq" /> |
||||
<result column="last_temperature" property="lastTemperature" /> |
||||
<result column="last_temperature_time" property="lastTemperatureTime" /> |
||||
<result column="upper" property="upper" /> |
||||
<result column="lower" property="lower" /> |
||||
<result column="switch_on" property="switchOn" /> |
||||
<result column="create_user" property="createUser" /> |
||||
<result column="create_time" property="createTime" /> |
||||
<result column="update_user" property="updateUser" /> |
||||
<result column="update_time" property="updateTime" /> |
||||
</resultMap> |
||||
|
||||
</mapper> |
@ -0,0 +1,31 @@
@@ -0,0 +1,31 @@
|
||||
<?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.ecell.internationalize.system.mapper.TemperatureDetailMapper"> |
||||
|
||||
<!-- 通用查询映射结果 --> |
||||
<resultMap id="BaseResultMap" type="com.ecell.internationalize.system.entity.TemperatureDetail"> |
||||
<id column="id" property="id" /> |
||||
<result column="i_mei" property="mei" /> |
||||
<result column="temperature" property="temperature" /> |
||||
<result column="name" property="name"/> |
||||
<result column="create_user" property="createUser" /> |
||||
<result column="create_time" property="createTime" /> |
||||
<result column="update_user" property="updateUser" /> |
||||
<result column="update_time" property="updateTime" /> |
||||
</resultMap> |
||||
<select id="getList" resultMap="BaseResultMap"> |
||||
select A.id,A.i_mei,A.temperature,A.create_user,A.create_time,A.update_user,A.update_time,B.name from |
||||
temperature_detail A left join user B ON A.i_mei=B.i_mei |
||||
where 1=1 |
||||
<if test="map.iMei!=null and map.iMei!=''"> |
||||
and A.i_mei=#{map.iMei} |
||||
</if> |
||||
<if test="map.startTime!=null"> |
||||
<![CDATA[and DATE_FORMAT(A.create_time,'%Y-%m-%d')>=DATE_FORMAT(#{map.startTime},'%Y-%m-%d')]]> |
||||
</if> |
||||
<if test="map.endTime!=null"> |
||||
<![CDATA[and DATE_FORMAT(A.create_time,'%Y-%m-%d')<=DATE_FORMAT(#{map.endTime},'%Y-%m-%d')]]> |
||||
</if> |
||||
</select> |
||||
|
||||
</mapper> |
Loading…
Reference in new issue