代码提交
This commit is contained in:
parent
1b17a81eeb
commit
099f9af785
|
|
@ -26,6 +26,7 @@ public class DeviceController extends BaseController {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private DeviceService deviceService;
|
private DeviceService deviceService;
|
||||||
|
|
||||||
@PreAuthorize("@ss.hasPermi('device:list')")
|
@PreAuthorize("@ss.hasPermi('device:list')")
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public TableDataInfo list(DeviceDto dto) {
|
public TableDataInfo list(DeviceDto dto) {
|
||||||
|
|
@ -33,11 +34,13 @@ public class DeviceController extends BaseController {
|
||||||
List<DeviceDto> list = deviceService.list(dto);
|
List<DeviceDto> list = deviceService.list(dto);
|
||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/getDeviceType")
|
@GetMapping("/getDeviceType")
|
||||||
public AjaxResult getDeviceType() {
|
public AjaxResult getDeviceType() {
|
||||||
List<SelectDto> list = deviceService.getDeviceType();
|
List<SelectDto> list = deviceService.getDeviceType();
|
||||||
return AjaxResult.success(list);
|
return AjaxResult.success(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/getDeviceKeepUser")
|
@GetMapping("/getDeviceKeepUser")
|
||||||
public AjaxResult getDeviceKeepUser() {
|
public AjaxResult getDeviceKeepUser() {
|
||||||
List<SelectDto> list = deviceService.getDeviceKeepUser();
|
List<SelectDto> list = deviceService.getDeviceKeepUser();
|
||||||
|
|
@ -49,16 +52,19 @@ public class DeviceController extends BaseController {
|
||||||
public AjaxResult add(@RequestBody DeviceDto dto) {
|
public AjaxResult add(@RequestBody DeviceDto dto) {
|
||||||
return deviceService.add(dto);
|
return deviceService.add(dto);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PreAuthorize("@ss.hasPermi('device:update')")
|
@PreAuthorize("@ss.hasPermi('device:update')")
|
||||||
@PostMapping("/update")
|
@PostMapping("/update")
|
||||||
public AjaxResult update(@RequestBody DeviceDto dto) {
|
public AjaxResult update(@RequestBody DeviceDto dto) {
|
||||||
return deviceService.update(dto);
|
return deviceService.update(dto);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PreAuthorize("@ss.hasPermi('device:del')")
|
@PreAuthorize("@ss.hasPermi('device:del')")
|
||||||
@PostMapping("/del")
|
@PostMapping("/del")
|
||||||
public AjaxResult del(@RequestBody DeviceDto dto) {
|
public AjaxResult del(@RequestBody DeviceDto dto) {
|
||||||
return deviceService.delete(dto);
|
return deviceService.delete(dto);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PreAuthorize("@ss.hasPermi('device:detail')")
|
@PreAuthorize("@ss.hasPermi('device:detail')")
|
||||||
@GetMapping("/getById")
|
@GetMapping("/getById")
|
||||||
public AjaxResult getById(String id) {
|
public AjaxResult getById(String id) {
|
||||||
|
|
@ -73,6 +79,7 @@ public class DeviceController extends BaseController {
|
||||||
public AjaxResult use(@RequestBody DeviceRecord dto) {
|
public AjaxResult use(@RequestBody DeviceRecord dto) {
|
||||||
return deviceService.use(dto);
|
return deviceService.use(dto);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 归还
|
* 归还
|
||||||
*/
|
*/
|
||||||
|
|
@ -85,12 +92,20 @@ public class DeviceController extends BaseController {
|
||||||
// 领用状态下 查询最后一次领用人和领用日期
|
// 领用状态下 查询最后一次领用人和领用日期
|
||||||
@GetMapping("/getLastUse")
|
@GetMapping("/getLastUse")
|
||||||
public AjaxResult getLastUse(DeviceRecord dto) {
|
public AjaxResult getLastUse(DeviceRecord dto) {
|
||||||
return AjaxResult.success(deviceService.getLastUse(dto));
|
DeviceRecord lastUse = deviceService.getLastUse(dto);
|
||||||
|
if (lastUse == null) {
|
||||||
|
return AjaxResult.success(new DeviceRecord());
|
||||||
|
} else {
|
||||||
|
return AjaxResult.success(lastUse);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 领用记录
|
// 领用记录
|
||||||
@GetMapping("/getRecordList")
|
@GetMapping("/getRecordList")
|
||||||
public AjaxResult getRecordList() {
|
@PreAuthorize("@ss.hasPermi('device:details')")
|
||||||
return AjaxResult.success(deviceService.getRecordList());
|
public TableDataInfo getRecordList(DeviceRecord dto) {
|
||||||
|
startPage();
|
||||||
|
List<DeviceRecord> recordList = deviceService.getRecordList(dto);
|
||||||
|
return getDataTable(recordList);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -36,11 +36,15 @@ public class ProjectController extends BaseController {
|
||||||
// @PreAuthorize("@ss.hasPermi('project:list')")
|
// @PreAuthorize("@ss.hasPermi('project:list')")
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public TableDataInfo list(Project project) {
|
public TableDataInfo list(Project project) {
|
||||||
startPage();
|
|
||||||
project.setCreateBy(getUserId().toString());
|
|
||||||
List<Project> list = projectService.selectProjectList(project);
|
List<Project> list = projectService.selectProjectList(project);
|
||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
}
|
}
|
||||||
|
// 首页
|
||||||
|
@GetMapping("/listMain")
|
||||||
|
public AjaxResult listMain(Project project) {
|
||||||
|
List<Project> list = projectService.selectProjectList(project);
|
||||||
|
return AjaxResult.success(list);
|
||||||
|
}
|
||||||
@GetMapping("/listApp")
|
@GetMapping("/listApp")
|
||||||
public AjaxResult listApp(Project project) {
|
public AjaxResult listApp(Project project) {
|
||||||
// project.setCreateBy(getUserId().toString());
|
// project.setCreateBy(getUserId().toString());
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,7 @@ public class DeviceRecord {
|
||||||
private String deviceId;
|
private String deviceId;
|
||||||
private String deviceType;
|
private String deviceType;
|
||||||
private String deviceTypeName;
|
private String deviceTypeName;
|
||||||
|
private String deviceCode;
|
||||||
private String userId;
|
private String userId;
|
||||||
private String userName;
|
private String userName;
|
||||||
private String startTime;
|
private String startTime;
|
||||||
|
|
|
||||||
|
|
@ -44,7 +44,7 @@ public class Model {
|
||||||
/**
|
/**
|
||||||
* 设计人员
|
* 设计人员
|
||||||
*/
|
*/
|
||||||
private int designer;
|
private String designer;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 设计人员姓名
|
* 设计人员姓名
|
||||||
|
|
|
||||||
|
|
@ -38,6 +38,7 @@ public class Project extends BaseEntity
|
||||||
/** 所属单位 */
|
/** 所属单位 */
|
||||||
// @Excel(name = "所属单位")
|
// @Excel(name = "所属单位")
|
||||||
private String unit;
|
private String unit;
|
||||||
|
private Integer unitId;
|
||||||
|
|
||||||
/** 负责人 */
|
/** 负责人 */
|
||||||
@Excel(name = "负责人")
|
@Excel(name = "负责人")
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,8 @@ public class ProjectVo {
|
||||||
private String proLocation;
|
private String proLocation;
|
||||||
private String lon;
|
private String lon;
|
||||||
private String lat;
|
private String lat;
|
||||||
|
private String version;
|
||||||
|
private String designer;
|
||||||
private String remark;
|
private String remark;
|
||||||
private String level ="1"; // 设置默认值;
|
private String level ="1"; // 设置默认值;
|
||||||
private String levelName;
|
private String levelName;
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ public interface DeviceMapper {
|
||||||
|
|
||||||
DeviceRecord getLastUse(DeviceRecord dto);
|
DeviceRecord getLastUse(DeviceRecord dto);
|
||||||
|
|
||||||
List<DeviceRecord> getRecordList();
|
List<DeviceRecord> getRecordList(DeviceRecord dto);
|
||||||
|
|
||||||
int getCount(DeviceDto model);
|
int getCount(DeviceDto model);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ public interface DeviceService {
|
||||||
|
|
||||||
DeviceRecord getLastUse(DeviceRecord dto);
|
DeviceRecord getLastUse(DeviceRecord dto);
|
||||||
|
|
||||||
List<DeviceRecord> getRecordList();
|
List<DeviceRecord> getRecordList(DeviceRecord dto);
|
||||||
|
|
||||||
List<SelectDto> getDeviceKeepUser();
|
List<SelectDto> getDeviceKeepUser();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -103,8 +103,8 @@ public class DeviceServiceImpl implements DeviceService {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<DeviceRecord> getRecordList() {
|
public List<DeviceRecord> getRecordList(DeviceRecord dto) {
|
||||||
return deviceMapper.getRecordList();
|
return deviceMapper.getRecordList(dto);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
|
|
@ -105,9 +105,10 @@
|
||||||
su.nick_name as userName,
|
su.nick_name as userName,
|
||||||
tdr.start_time as startTime,
|
tdr.start_time as startTime,
|
||||||
tdr.end_time as endTime,
|
tdr.end_time as endTime,
|
||||||
tdr.status as status,
|
td.status as status,
|
||||||
|
td.device_code as deviceCode,
|
||||||
td.device_type as deviceType,
|
td.device_type as deviceType,
|
||||||
sd.dict_label as deviceTypeName
|
sd.type_name as deviceTypeName
|
||||||
|
|
||||||
from tb_device_record tdr
|
from tb_device_record tdr
|
||||||
left join tb_device td on tdr.device_id = td.id
|
left join tb_device td on tdr.device_id = td.id
|
||||||
|
|
|
||||||
|
|
@ -83,6 +83,9 @@
|
||||||
<result property="nodeCountDetail" column="node_count_detail"/>
|
<result property="nodeCountDetail" column="node_count_detail"/>
|
||||||
<result property="nodeCount" column="node_count"/>
|
<result property="nodeCount" column="node_count"/>
|
||||||
<result property="nodeName" column="node_name"/>
|
<result property="nodeName" column="node_name"/>
|
||||||
|
<result property="version" column="version"/>
|
||||||
|
<result property="designer" column="designer"/>
|
||||||
|
<result property="remark" column="remark"/>
|
||||||
<result property="nodeId" column="node_id"/>
|
<result property="nodeId" column="node_id"/>
|
||||||
<result property="modelUrl" column="model_url"/>
|
<result property="modelUrl" column="model_url"/>
|
||||||
<!-- 子表节点信息 -->
|
<!-- 子表节点信息 -->
|
||||||
|
|
@ -118,7 +121,10 @@
|
||||||
n.node_name,
|
n.node_name,
|
||||||
n.level AS node_level,
|
n.level AS node_level,
|
||||||
n.node_count AS node_count_detail,
|
n.node_count AS node_count_detail,
|
||||||
m.model_url
|
m.model_url,
|
||||||
|
m.version,
|
||||||
|
m.designer,
|
||||||
|
m.remark
|
||||||
|
|
||||||
FROM project_node n
|
FROM project_node n
|
||||||
LEFT JOIN tb_project p ON p.id = n.project_id AND n.del_flag = '0'
|
LEFT JOIN tb_project p ON p.id = n.project_id AND n.del_flag = '0'
|
||||||
|
|
@ -137,6 +143,9 @@
|
||||||
<if test="projectId != null and projectId != ''">
|
<if test="projectId != null and projectId != ''">
|
||||||
AND p.id = #{projectId}
|
AND p.id = #{projectId}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="designer != null and designer != ''">
|
||||||
|
AND m.designer like concat('%',#{designer},'%')
|
||||||
|
</if>
|
||||||
order by n.create_time
|
order by n.create_time
|
||||||
</select>
|
</select>
|
||||||
<select id="openView" resultType="com.bonus.waterdesign.domain.CadData">
|
<select id="openView" resultType="com.bonus.waterdesign.domain.CadData">
|
||||||
|
|
|
||||||
|
|
@ -8,25 +8,13 @@
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
<update id="update">
|
<update id="update">
|
||||||
UPDATE tb_owner
|
update tb_owner
|
||||||
<set>
|
set unit_name = #{unitName},
|
||||||
<if test="unitName != null and unitName != ''">
|
|
||||||
unit_name = #{unitName},
|
|
||||||
</if>
|
|
||||||
<if test="unitMan != null and unitMan != ''">
|
|
||||||
unit_man = #{unitMan},
|
unit_man = #{unitMan},
|
||||||
</if>
|
|
||||||
<if test="phone != null and phone != ''">
|
|
||||||
phone = #{phone},
|
phone = #{phone},
|
||||||
</if>
|
|
||||||
<if test="address != null and address != ''">
|
|
||||||
address = #{address},
|
address = #{address},
|
||||||
</if>
|
remark = #{remark}
|
||||||
<if test="remark != null and remark != ''">
|
where id = #{id}
|
||||||
remark = #{remark},
|
|
||||||
</if>
|
|
||||||
</set>
|
|
||||||
WHERE id = #{id}
|
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<delete id="deleteById">
|
<delete id="deleteById">
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@
|
||||||
<id property="proId" column="id" />
|
<id property="proId" column="id" />
|
||||||
<result property="proName" column="pro_name" />
|
<result property="proName" column="pro_name" />
|
||||||
<result property="proType" column="pro_type" />
|
<result property="proType" column="pro_type" />
|
||||||
|
<result property="unitId" column="unit_id" />
|
||||||
<result property="unit" column="unit_name" />
|
<result property="unit" column="unit_name" />
|
||||||
<result property="chargePerson" column="user_name" />
|
<result property="chargePerson" column="user_name" />
|
||||||
<result property="location" column="pro_location" />
|
<result property="location" column="pro_location" />
|
||||||
|
|
@ -27,6 +28,7 @@
|
||||||
tp.id,
|
tp.id,
|
||||||
tp.pro_name,
|
tp.pro_name,
|
||||||
sdd.type_name as pro_type,
|
sdd.type_name as pro_type,
|
||||||
|
oo.id as unit_id,
|
||||||
oo.unit_name,
|
oo.unit_name,
|
||||||
tp.user_name,
|
tp.user_name,
|
||||||
tp.pro_location,
|
tp.pro_location,
|
||||||
|
|
@ -52,6 +54,9 @@
|
||||||
<if test="proName != null and proName != ''">
|
<if test="proName != null and proName != ''">
|
||||||
AND pro_name like concat('%', #{proName}, '%')
|
AND pro_name like concat('%', #{proName}, '%')
|
||||||
</if>
|
</if>
|
||||||
|
<if test="proId != null">
|
||||||
|
AND tp.id = #{proId}
|
||||||
|
</if>
|
||||||
<if test="unit != null and unit != ''">
|
<if test="unit != null and unit != ''">
|
||||||
AND unit_id = #{unit}
|
AND unit_id = #{unit}
|
||||||
</if>
|
</if>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue