jsk
This commit is contained in:
parent
202ecaa85a
commit
da534ea432
|
|
@ -1,6 +1,7 @@
|
|||
package com.bonus.canteen.core.kitchen.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
|
|
|
|||
|
|
@ -65,5 +65,5 @@ public interface IKitchenDeviceInfoService extends IService<KitchenDeviceInfo> {
|
|||
|
||||
List<KitchenDeviceListVO> selectKitchenDeviceInfoSelect(KitchenDeviceListDTO kitchenDeviceInfo);
|
||||
|
||||
Map<Integer, String> deviceType();
|
||||
List<KitchenDeviceListVO> deviceType();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -272,17 +272,49 @@ public class KitchenDeviceInfoServiceImpl extends ServiceImpl<KitchenDeviceInfoM
|
|||
}
|
||||
|
||||
@Override
|
||||
public Map<Integer, String> deviceType() {
|
||||
Map<Integer, String> deviceMap = new HashMap<>();
|
||||
deviceMap.put(DeviceTypeEnum.CAMERA.getKey(), DeviceTypeEnum.CAMERA.getValue());
|
||||
deviceMap.put(DeviceTypeEnum.DOOR.getKey(), DeviceTypeEnum.DOOR.getValue());
|
||||
deviceMap.put(DeviceTypeEnum.SAMPLE_WEIGHT.getKey(), DeviceTypeEnum.SAMPLE_WEIGHT.getValue());
|
||||
deviceMap.put(DeviceTypeEnum.SAMPLECABINET.getKey(), DeviceTypeEnum.SAMPLECABINET.getValue());
|
||||
deviceMap.put(DeviceTypeEnum.TEMPERATURE_HUMIDITY_SENSOR.getKey(), DeviceTypeEnum.TEMPERATURE_HUMIDITY_SENSOR.getValue());
|
||||
deviceMap.put(DeviceTypeEnum.SMOKE_SENSOR.getKey(), DeviceTypeEnum.SMOKE_SENSOR.getValue());
|
||||
deviceMap.put(DeviceTypeEnum.WATER_METER.getKey(), DeviceTypeEnum.WATER_METER.getValue());
|
||||
deviceMap.put(DeviceTypeEnum.ELECTRIC_METER.getKey(), DeviceTypeEnum.ELECTRIC_METER.getValue());
|
||||
deviceMap.put(DeviceTypeEnum.SMART_IN_OUT_WEIGHT.getKey(), DeviceTypeEnum.SMART_IN_OUT_WEIGHT.getValue());
|
||||
return deviceMap;
|
||||
public List<KitchenDeviceListVO> deviceType() {
|
||||
List<KitchenDeviceListVO> list=new ArrayList<>();
|
||||
|
||||
KitchenDeviceListVO vo=new KitchenDeviceListVO();
|
||||
vo.setDeviceType(DeviceTypeEnum.CAMERA.getKey());
|
||||
vo.setDeviceTypeName(DeviceTypeEnum.CAMERA.getValue());
|
||||
list.add(vo);
|
||||
|
||||
vo=new KitchenDeviceListVO();
|
||||
vo.setDeviceType(DeviceTypeEnum.DOOR.getKey());
|
||||
vo.setDeviceTypeName(DeviceTypeEnum.DOOR.getValue());
|
||||
list.add(vo);
|
||||
|
||||
vo=new KitchenDeviceListVO();
|
||||
vo.setDeviceType(DeviceTypeEnum.SAMPLE_WEIGHT.getKey());
|
||||
vo.setDeviceTypeName(DeviceTypeEnum.SAMPLE_WEIGHT.getValue());
|
||||
list.add(vo);
|
||||
|
||||
vo=new KitchenDeviceListVO();
|
||||
vo.setDeviceType(DeviceTypeEnum.SAMPLECABINET.getKey());
|
||||
vo.setDeviceTypeName(DeviceTypeEnum.SAMPLECABINET.getValue());
|
||||
list.add(vo);
|
||||
|
||||
vo=new KitchenDeviceListVO();
|
||||
vo.setDeviceType(DeviceTypeEnum.TEMPERATURE_HUMIDITY_SENSOR.getKey());
|
||||
vo.setDeviceTypeName(DeviceTypeEnum.TEMPERATURE_HUMIDITY_SENSOR.getValue());
|
||||
list.add(vo);
|
||||
|
||||
vo=new KitchenDeviceListVO();
|
||||
vo.setDeviceType(DeviceTypeEnum.WATER_METER.getKey());
|
||||
vo.setDeviceTypeName(DeviceTypeEnum.WATER_METER.getValue());
|
||||
list.add(vo);
|
||||
|
||||
vo=new KitchenDeviceListVO();
|
||||
vo.setDeviceType(DeviceTypeEnum.ELECTRIC_METER.getKey());
|
||||
vo.setDeviceTypeName(DeviceTypeEnum.ELECTRIC_METER.getValue());
|
||||
list.add(vo);
|
||||
|
||||
vo=new KitchenDeviceListVO();
|
||||
vo.setDeviceType(DeviceTypeEnum.SMART_IN_OUT_WEIGHT.getKey());
|
||||
vo.setDeviceTypeName(DeviceTypeEnum.SMART_IN_OUT_WEIGHT.getValue());
|
||||
list.add(vo);
|
||||
|
||||
return list;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ public class KitchenDeviceListVO {
|
|||
/** 设备类型(1-摄像头 2-传感器 3-门禁 4-仪表 5-仪器, 参考DeviceTypeEnum) */
|
||||
@ApiModelProperty(value = "设备类型(1-摄像头 2-传感器 3-门禁 4-仪表 5-仪器, 参考DeviceTypeEnum)")
|
||||
private Integer deviceType;
|
||||
|
||||
private String deviceTypeName;
|
||||
/** 设备类型 */
|
||||
@ApiModelProperty(value = "设备类型")
|
||||
private Integer deviceCategory;
|
||||
|
|
|
|||
|
|
@ -7,6 +7,9 @@ import com.bonus.canteen.core.screening.vo.HydroPowerVo;
|
|||
import com.bonus.canteen.core.screening.vo.MorningCheckVo;
|
||||
import com.bonus.canteen.core.screening.vo.SensorVo;
|
||||
import com.bonus.canteen.core.supermarket.domain.SupermarketInfo;
|
||||
import com.bonus.canteen.core.zhhq.domain.PhysicalExaminationDTO;
|
||||
import com.bonus.canteen.core.zhhq.domain.PhysicalExaminationVO;
|
||||
import com.bonus.canteen.core.zhhq.mapper.ZhhqPhysicalExaminationMapper;
|
||||
import com.bonus.common.core.web.controller.BaseController;
|
||||
import com.bonus.common.core.web.domain.AjaxResult;
|
||||
import com.bonus.common.core.web.page.TableDataInfo;
|
||||
|
|
@ -15,6 +18,8 @@ import io.swagger.annotations.ApiOperation;
|
|||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
|
|
@ -30,6 +35,9 @@ public class HardwareScreenController extends BaseController {
|
|||
@Autowired
|
||||
private HardwareScreenService hardwareScreenService;
|
||||
|
||||
@Resource
|
||||
private ZhhqPhysicalExaminationMapper mapper;
|
||||
|
||||
/**
|
||||
* 获取水电数据详细信息
|
||||
*/
|
||||
|
|
@ -104,4 +112,20 @@ public class HardwareScreenController extends BaseController {
|
|||
List<SensorVo> list = hardwareScreenService.getDeviceRecordListByDeviceType(vo);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询健康一体机列表
|
||||
*/
|
||||
@ApiOperation(value = "查询健康一体机列表")
|
||||
@GetMapping("/physicalList")
|
||||
public TableDataInfo list(PhysicalExaminationDTO dto) {
|
||||
List<PhysicalExaminationVO> list=new ArrayList<>();
|
||||
try {
|
||||
startPage();
|
||||
list = this.mapper.selectRecordList(dto);
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
return getDataTable(list);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,6 +6,8 @@ import com.bonus.canteen.core.account.domain.param.AccountInfoQueryParam;
|
|||
import com.bonus.canteen.core.account.domain.vo.AccInfoDetailsVO;
|
||||
import com.bonus.canteen.core.account.service.IAccInfoService;
|
||||
import com.bonus.canteen.core.common.utils.HeaderFetchUtil;
|
||||
import com.bonus.canteen.core.kitchen.dto.KitchenDeviceListDTO;
|
||||
import com.bonus.canteen.core.kitchen.vo.KitchenDeviceListVO;
|
||||
import com.bonus.canteen.core.zhhq.domain.AccountInfoDTO;
|
||||
import com.bonus.canteen.core.zhhq.domain.AccountInfoVO;
|
||||
import com.bonus.canteen.core.zhhq.domain.PhysicalExaminationDTO;
|
||||
|
|
@ -15,6 +17,7 @@ import com.bonus.common.core.exception.ServiceException;
|
|||
import com.bonus.common.core.utils.encryption.Sm4Utils;
|
||||
import com.bonus.common.core.web.controller.BaseController;
|
||||
import com.bonus.common.core.web.domain.AjaxResult;
|
||||
import com.bonus.common.core.web.page.TableDataInfo;
|
||||
import com.bonus.common.houqin.constant.GlobalConstants;
|
||||
import com.bonus.common.houqin.utils.SM4EncryptUtils;
|
||||
import io.swagger.annotations.Api;
|
||||
|
|
@ -25,6 +28,7 @@ import org.springframework.web.bind.annotation.*;
|
|||
|
||||
import javax.annotation.Resource;
|
||||
import javax.validation.Valid;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
|
|
|||
|
|
@ -17,4 +17,10 @@ public class PhysicalExaminationDTO {
|
|||
private String phone;
|
||||
private String selectPhone;
|
||||
private String empCode;
|
||||
//查询参数 开始时间
|
||||
private String startDate;
|
||||
//查询参数 结束时间
|
||||
private String endDate;
|
||||
//查询参数 关键字
|
||||
private String keyWord;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,21 +9,49 @@ import lombok.Data;
|
|||
*/
|
||||
@Data
|
||||
public class PhysicalExaminationVO {
|
||||
//设备ID
|
||||
private String machineId;
|
||||
//设备名称
|
||||
private String deviceName;
|
||||
//用户ID
|
||||
private String userId;
|
||||
//用户姓名
|
||||
private String userName;
|
||||
//电话
|
||||
private String phone;
|
||||
//部门名称
|
||||
private String deptName;
|
||||
//性别
|
||||
private String sex;
|
||||
//年纪
|
||||
private Integer age;
|
||||
//身高
|
||||
private Double height;
|
||||
//体重
|
||||
private Integer weight;
|
||||
//bmi值
|
||||
private Double bmi;
|
||||
//体脂
|
||||
private Double bodyFat;
|
||||
//肌肉含量
|
||||
private Double muscle;
|
||||
//骨骼质量
|
||||
private Double boneMass;
|
||||
//含水量
|
||||
private Double waterContent;
|
||||
//细胞外液
|
||||
private Double extwater;
|
||||
//蛋白质含量
|
||||
private Double protein;
|
||||
//新陈代谢度
|
||||
private Integer metabolism;
|
||||
//脂肪水平
|
||||
private Integer fatLevel;
|
||||
//身体年龄
|
||||
private Integer bodyAge;
|
||||
|
||||
//设备位置
|
||||
private String subPlace;
|
||||
|
||||
private String createTime;
|
||||
}
|
||||
|
|
@ -25,5 +25,7 @@ public interface ZhhqPhysicalExaminationMapper {
|
|||
|
||||
PhysicalExaminationVO selectRecordByPhoneSingle(PhysicalExaminationDTO dto);
|
||||
|
||||
List<PhysicalExaminationVO> selectRecordList(PhysicalExaminationDTO dto);
|
||||
|
||||
String ByempCode(PhysicalExaminationDTO dto);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,7 +22,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
bodyAge,
|
||||
bodyFat
|
||||
from kitchen_staff_physical_examination
|
||||
where phone = #{selectPhone}
|
||||
where 1=1
|
||||
<if test="selectPhone!=null and selectPhone!=''">
|
||||
and phone = #{selectPhone}
|
||||
</if>
|
||||
order by create_time desc
|
||||
</select>
|
||||
<select id="selectRecordByPhoneSingle"
|
||||
|
|
@ -47,10 +50,53 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
where phone = #{selectPhone}
|
||||
order by create_time desc
|
||||
limit 1;
|
||||
|
||||
</select>
|
||||
<select id="ByempCode" resultType="java.lang.String">
|
||||
select phonenumber from sys_user where user_code=#{empCode} limit 1
|
||||
</select>
|
||||
|
||||
<select id="selectRecordList" resultType="com.bonus.canteen.core.zhhq.domain.PhysicalExaminationVO">
|
||||
select
|
||||
a.staff_id as userId,
|
||||
b.nick_name as userName,
|
||||
b.phonenumber as phone,
|
||||
c.dept_name as deptName,
|
||||
a.device_id as machineId,
|
||||
m.device_name as deviceName,
|
||||
CONCAT(ba.area_name, '-', ksp.sub_place_name) AS subplace,
|
||||
a.sex,
|
||||
a.age,
|
||||
a.height,
|
||||
a.weight,
|
||||
a.bmi,
|
||||
a.muscle,
|
||||
a.boneMass,
|
||||
a.waterContent,
|
||||
a.extwater,
|
||||
a.protein,
|
||||
a.metabolism,
|
||||
a.fatLevel,
|
||||
a.bodyAge,a.create_time as createTime,
|
||||
a.bodyFat
|
||||
from kitchen_staff_physical_examination a
|
||||
left join sys_user b on a.phone =b.phonenumber
|
||||
left join sys_dept c on b.dept_id=c.dept_id
|
||||
left join kitchen_device_info m on a.device_id=m.device_id
|
||||
LEFT JOIN kitchen_sub_place ksp ON ksp.sub_place_id = m.sub_place
|
||||
LEFT JOIN basic_area ba ON m.area_id = ba.area_id
|
||||
where 1=1
|
||||
<if test="keyWord!=null and keyWord!=''">
|
||||
and (b.phonenumber like concat('%', #{keyWord}, '%') or b.nick_name like concat('%', #{keyWord}, '%') or ksp.sub_place_name like concat('%', #{keyWord}, '%') or m.device_no like concat('%', #{keyWord}, '%')
|
||||
or m.device_sn like concat('%', #{keyWord}, '%') or m.device_name like concat('%', #{keyWord}, '%')
|
||||
)
|
||||
</if>
|
||||
<if test="startDate!=null and startDate!=''">
|
||||
and substr(a.create_time,1,10)>=#{startDate}
|
||||
</if>
|
||||
<if test="endDate!=null and endDate!=''">
|
||||
and #{endDate}>=substr(a.create_time,1,10)
|
||||
</if>
|
||||
order by a.create_time desc
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue