Merge remote-tracking branch 'origin/master'
| | |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date recoveryTime; |
| | | |
| | | private Long deptId; |
| | | |
| | | public Long getDeptId() { |
| | | return deptId; |
| | | } |
| | | |
| | | public void setDeptId(Long deptId) { |
| | | this.deptId = deptId; |
| | | } |
| | | |
| | | public Long getDefaultOrder() { |
| | | return defaultOrder; |
| | | } |
| | |
| | | ", defaultOrder=" + defaultOrder + |
| | | ", recovery=" + recovery + |
| | | ", recoveryTime=" + recoveryTime + |
| | | ", deptId=" + deptId + |
| | | '}'; |
| | | } |
| | | } |
| | |
| | | @ApiModelProperty("夿³¨") |
| | | @TableField("remark") |
| | | private String remark; |
| | | @ApiModelProperty("è¿ç»´ç±»å") |
| | | @TableField("category") |
| | | private Short category; |
| | | @ApiModelProperty("䏿¥é¨é¨") |
| | | @TableField("dept_id") |
| | | private Long deptId; |
| | | |
| | | @TableField("point_detail") |
| | | private String pointDetail; |
| | |
| | | package com.ycl.platform.domain.vo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.ycl.platform.base.AbsVo; |
| | | import com.ycl.platform.domain.entity.YwPoint; |
| | | |
| | |
| | | private Integer unitId; |
| | | private String unitName; |
| | | |
| | | private String unitName; |
| | | /** è¿ç»´ç¶æ */ |
| | | private String status; |
| | | |
| | | /** 夿³¨ */ |
| | | private String remark; |
| | | |
| | | private Short category; |
| | | |
| | | private String deptName; |
| | | private String pointDetail; |
| | | |
| | | public static YwPointVO getVoByEntity(@NonNull YwPoint entity, YwPointVO vo) { |
| | |
| | | |
| | | import annotation.Log; |
| | | import com.ycl.platform.domain.entity.TMonitor; |
| | | import com.ycl.platform.domain.vo.TMonitorVO; |
| | | import com.ycl.platform.service.ITMonitorService; |
| | | import com.ycl.system.AjaxResult; |
| | | import com.ycl.system.controller.BaseController; |
| | |
| | | public TableDataInfo list(TMonitor tMonitor) |
| | | { |
| | | startPage(); |
| | | List<TMonitor> list = tMonitorService.selectTMonitorList(tMonitor); |
| | | List<TMonitorVO> list = tMonitorService.selectTMonitorList(tMonitor); |
| | | return getDataTable(list); |
| | | } |
| | | |
| | |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response, TMonitor tMonitor) |
| | | { |
| | | List<TMonitor> list = tMonitorService.selectTMonitorList(tMonitor); |
| | | ExcelUtil<TMonitor> util = new ExcelUtil<TMonitor>(TMonitor.class); |
| | | List<TMonitorVO> list = tMonitorService.selectTMonitorList(tMonitor); |
| | | ExcelUtil<TMonitorVO> util = new ExcelUtil<TMonitorVO>(TMonitorVO.class); |
| | | util.exportExcel(response, list, "设å¤èµäº§æ°æ®"); |
| | | } |
| | | |
| | |
| | | package com.ycl.platform.mapper; |
| | | |
| | | import com.ycl.platform.domain.entity.TMonitor; |
| | | import com.ycl.platform.domain.vo.TMonitorVO; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | * @param tMonitor 设å¤èµäº§ |
| | | * @return 设å¤èµäº§éå |
| | | */ |
| | | public List<TMonitor> selectTMonitorList(TMonitor tMonitor); |
| | | public List<TMonitorVO> selectTMonitorList(TMonitor tMonitor); |
| | | |
| | | /** |
| | | * æ°å¢è®¾å¤èµäº§ |
| | |
| | | package com.ycl.platform.service; |
| | | |
| | | import com.ycl.platform.domain.entity.TMonitor; |
| | | import com.ycl.platform.domain.vo.TMonitorVO; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | * @param tMonitor 设å¤èµäº§ |
| | | * @return 设å¤èµäº§éå |
| | | */ |
| | | public List<TMonitor> selectTMonitorList(TMonitor tMonitor); |
| | | public List<TMonitorVO> selectTMonitorList(TMonitor tMonitor); |
| | | |
| | | /** |
| | | * æ°å¢è®¾å¤èµäº§ |
| | |
| | | package com.ycl.platform.service.impl; |
| | | |
| | | import com.ycl.platform.domain.entity.TMonitor; |
| | | import com.ycl.platform.domain.vo.TMonitorVO; |
| | | import com.ycl.platform.mapper.TMonitorMapper; |
| | | import com.ycl.platform.service.ITMonitorService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | * @return 设å¤èµäº§ |
| | | */ |
| | | @Override |
| | | public List<TMonitor> selectTMonitorList(TMonitor tMonitor) |
| | | public List<TMonitorVO> selectTMonitorList(TMonitor tMonitor) |
| | | { |
| | | return tMonitorMapper.selectTMonitorList(tMonitor); |
| | | } |
| | |
| | | import com.ycl.platform.mapper.YwPointMapper; |
| | | import com.ycl.platform.mapper.YwUnitMapper; |
| | | import com.ycl.platform.service.YwPointService; |
| | | import com.ycl.platform.service.YwUnitService; |
| | | import com.ycl.system.Result; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ycl.platform.domain.form.YwPointForm; |
| | |
| | | import com.ycl.platform.domain.query.YwPointQuery; |
| | | import java.util.List; |
| | | |
| | | import com.ycl.system.entity.SysDept; |
| | | import com.ycl.system.service.ISysDeptService; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.ycl.system.page.PageUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.security.core.context.SecurityContextHolder; |
| | | import org.springframework.beans.BeanUtils; |
| | |
| | | public class YwPointServiceImpl extends ServiceImpl<YwPointMapper, YwPoint> implements YwPointService { |
| | | |
| | | private final YwPointMapper ywPointMapper; |
| | | @Autowired |
| | | private ISysDeptService deptService; |
| | | @Autowired |
| | | private YwUnitService unitService; |
| | | private final YwUnitMapper ywUnitMapper; |
| | | |
| | | /** |
| | |
| | | |
| | | List<YwPointVO> vos = page.getRecords().stream() |
| | | .map( |
| | | entity -> { |
| | | YwPointVO vo = YwPointVO.getVoByEntity(entity, null); |
| | | YwUnit unit = ywUnitMapper.selectById(vo.getUnitId()); |
| | | vo.setUnitName(unit.getUnitName()); |
| | | return vo; |
| | | } |
| | | entity -> YwPointVO.getVoByEntity(entity, null) |
| | | .setDeptName(deptService.selectDeptById(entity.getDeptId()).getDeptName()) |
| | | .setUnitName(unitService.getById(entity.getUnitId()).getUnitName()) |
| | | ) |
| | | .collect(Collectors.toList()); |
| | | |
| | | return Result.ok().data(vos).total(page.getTotal()); |
| | | } |
| | | |
| | |
| | | <result property="defaultOrder" column="default_order" /> |
| | | <result property="recovery" column="recovery" /> |
| | | <result property="recoveryTime" column="recovery_time" /> |
| | | <result property="deptId" column="dept_id" /> |
| | | </resultMap> |
| | | |
| | | <sql id="selectTMonitorVo"> |
| | | select id, serial_number, name, site_type, mac_addr, ip, camera_fun_type, longitude, latitude, camera_capture_area, on_state, civil_code, integrated_device, camera_brand, address, net_working, public_security, installed_time, management_unit, mu_contact_info, storage_days, monitor_azimuth, scene_photo_addr, model, site_vulgo, camera_type, camera_light_type, encoded_format, camera_dept, hybm, lxbm, reason, default_order,recovery,recovery_time from t_monitor |
| | | select id, serial_number, name, site_type, mac_addr, ip, camera_fun_type, longitude, latitude, camera_capture_area, on_state, civil_code, integrated_device, camera_brand, address, net_working, public_security, installed_time, management_unit, mu_contact_info, storage_days, monitor_azimuth, scene_photo_addr, model, site_vulgo, camera_type, camera_light_type, encoded_format, camera_dept, hybm, lxbm, reason, default_order,recovery,recovery_time,dept_id from t_monitor |
| | | </sql> |
| | | |
| | | <select id="selectTMonitorList" parameterType="com.ycl.platform.domain.entity.TMonitor" resultMap="TMonitorResult"> |
| | | <include refid="selectTMonitorVo"/> |
| | | <select id="selectTMonitorList" resultType="com.ycl.platform.domain.vo.TMonitorVO"> |
| | | select id, serial_number, name, site_type, mac_addr, ip, camera_fun_type, longitude, latitude, camera_capture_area, on_state, civil_code, integrated_device, camera_brand, address, net_working, public_security, installed_time, management_unit, mu_contact_info, storage_days |
| | | , monitor_azimuth, scene_photo_addr, model, site_vulgo, camera_type, camera_light_type, encoded_format, camera_dept, hybm, lxbm, reason, default_order,recovery,recovery_time,sd.dept_name from t_monitor m |
| | | left join sys_dept sd on m.dept_id = sd.dept_id |
| | | <where> |
| | | <if test="serialNumber != null and serialNumber != ''"> and serial_number = #{serialNumber}</if> |
| | | <if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if> |
| | |
| | | <if test="defaultOrder != null "> and default_order = #{defaultOrder}</if> |
| | | <if test="recovery != null "> and recovery = #{recovery}</if> |
| | | <if test="recoveryTime != null "> and recovery_time = #{recoveryTime}</if> |
| | | <if test="deptId != null "> and dept_id = #{deptId}</if> |
| | | </where> |
| | | </select> |
| | | |
| | |
| | | <if test="defaultOrder != null">default_order,</if> |
| | | <if test="recovery != null">recovery,</if> |
| | | <if test="recoveryTime != null">recovery_time,</if> |
| | | <if test="deptId != null">dept_id,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="serialNumber != null and serialNumber != ''">#{serialNumber},</if> |
| | |
| | | <if test="defaultOrder != null">#{defaultOrder},</if> |
| | | <if test="recovery != null">#{recovery},</if> |
| | | <if test="recoveryTime != null">#{recoveryTime},</if> |
| | | <if test="deptId != null">#{deptId},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | |
| | | <if test="defaultOrder != null">default_order = #{defaultOrder},</if> |
| | | <if test="recovery != null">recovery = #{defaultOrder},</if> |
| | | <if test="recoveryTime != null">recovery_time = #{recoveryTime},</if> |
| | | <if test="deptId != null">dept_id = #{deptId},</if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |