mirror of
https://gitee.com/elegant_wings/dbd-meeting.git
synced 2025-06-21 12:29:36 +08:00
Merge remote-tracking branch 'origin/shoot-hand' into shoot-hand
This commit is contained in:
commit
40ea38ecaa
@ -119,39 +119,4 @@ public class RepairAttachController extends BaseController {
|
||||
public R delete(Long id) {
|
||||
return toAjax(repairAttachService.deleteRepairAttachById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询工单所有附件
|
||||
*/
|
||||
// @RequiresPermissions(value = {"repair:attach:operator", "member:center:view"}, logical = Logical.OR)
|
||||
// @GetMapping("list")
|
||||
// public R list(Long repairId) {
|
||||
// List<RepairAttach> list = repairAttachService.getListByRepair(repairId);//工单所有附件
|
||||
// List<RepairAttachVO> voices = new ArrayList<>();
|
||||
// List<RepairAttachVO> repairs = new ArrayList<>();
|
||||
// List<RepairAttachVO> feedbacks = new ArrayList<>();
|
||||
// List<RepairAttachVO> evals = new ArrayList<>();
|
||||
// for (RepairAttach repairAttach : list) {
|
||||
// RepairAttachVO repairAttachVO = new RepairAttachVO(repairAttach.getId(), repairAttach.getUrl());
|
||||
// if (repairAttach.getNodeId() == 1) {
|
||||
// if (FILE_VOICE.equals(repairAttach.getExt1())) voices.add(repairAttachVO);
|
||||
// if (FILE_IMG.equals(repairAttach.getExt1())) repairs.add(repairAttachVO);
|
||||
// }
|
||||
// if (repairAttach.getNodeId() == 9) feedbacks.add(repairAttachVO);
|
||||
// if (repairAttach.getNodeId() == 13) evals.add(repairAttachVO);
|
||||
// }
|
||||
//
|
||||
// return R.ok().put("voice", voices)
|
||||
// .put("repair", repairs)
|
||||
// .put("feedback", feedbacks)
|
||||
// .put("eval", evals);
|
||||
// }
|
||||
|
||||
// @Ignore
|
||||
// @PostMapping("test")
|
||||
// public R test(Long repairId) {
|
||||
// //repairAttachService.updateRepairAttach(repairId,ids);
|
||||
// return toAjax(repairAttachService.deleteByRepairId(repairId));
|
||||
// //return R.ok();
|
||||
// }
|
||||
}
|
||||
|
@ -46,7 +46,7 @@ public class RepairController extends BaseController {
|
||||
/**
|
||||
* 报修
|
||||
*/
|
||||
@RequiresPermissions(value = {"repair:attach:operator", "member:center:view"}, logical = Logical.OR)
|
||||
@RequiresPermissions(value = {"repair:manage:operator", "member:center:view"}, logical = Logical.OR)
|
||||
@PostMapping("flow/start")
|
||||
public R startFlow(@RequestBody RepairDTO repairDTO) {
|
||||
Long userId = getLoginStaffId();
|
||||
@ -58,7 +58,7 @@ public class RepairController extends BaseController {
|
||||
/**
|
||||
* 流程处理
|
||||
*/
|
||||
@RequiresPermissions(value = {"repair:attach:operator", "member:center:view"}, logical = Logical.OR)
|
||||
@RequiresPermissions(value = {"repair:manage:operator", "member:center:view"}, logical = Logical.OR)
|
||||
@PostMapping("flow/handle")
|
||||
public R handleFlow(@RequestBody RepairDTO repairDTO) {
|
||||
Long userId = getLoginStaffId();
|
||||
@ -69,7 +69,7 @@ public class RepairController extends BaseController {
|
||||
/**
|
||||
* 工单评价
|
||||
*/
|
||||
@RequiresPermissions(value = {"repair:attach:operator", "member:center:view"}, logical = Logical.OR)
|
||||
@RequiresPermissions(value = {"repair:manage:operator", "member:center:view"}, logical = Logical.OR)
|
||||
@PostMapping("eval")
|
||||
public R eval(@RequestBody RepairDTO repairDTO) {
|
||||
Long userId = getLoginStaffId();
|
||||
@ -86,16 +86,14 @@ public class RepairController extends BaseController {
|
||||
* 管理员:重派单,全部 type对应值:anew、all 【小程序暂时用不到】
|
||||
* </p>
|
||||
*/
|
||||
@RequiresPermissions(value = {"repair:attach:operator", "member:center:view"}, logical = Logical.OR)
|
||||
@RequiresPermissions(value = {"repair:manage:operator", "member:center:view"}, logical = Logical.OR)
|
||||
@RequestMapping("list")
|
||||
public R list(@RequestBody Map<String, String> map) {
|
||||
String type = map.get("type");
|
||||
String menu = map.get("menu");
|
||||
String workerId = map.get("workerId");
|
||||
if (StringUtils.isBlank(type) || StringUtils.isBlank(menu)) return R.error();
|
||||
startPage();
|
||||
|
||||
Long userId = workerId!=null? Long.valueOf(workerId) :getLoginStaffId();
|
||||
Long userId = getLoginStaffId();
|
||||
return result(repairService.repairList(menu, userId.toString(), type));
|
||||
}
|
||||
|
||||
@ -103,7 +101,7 @@ public class RepairController extends BaseController {
|
||||
* 获取维修人员工单数量统计
|
||||
* 待完成、进行中、已完成 对应:wait、working、close
|
||||
*/
|
||||
@RequiresPermissions(value = {"repair:attach:operator", "member:center:view"}, logical = Logical.OR)
|
||||
@RequiresPermissions(value = {"repair:manage:operator", "member:center:view"}, logical = Logical.OR)
|
||||
@RequestMapping("workerRepairNumber")
|
||||
public R workerRepairNumber() {
|
||||
Long userId = getLoginStaffId();
|
||||
@ -117,43 +115,22 @@ public class RepairController extends BaseController {
|
||||
* id 工单id
|
||||
* </p>
|
||||
*/
|
||||
@RequiresPermissions(value = {"repair:attach:operator", "member:center:view"}, logical = Logical.OR)
|
||||
@RequiresPermissions(value = {"repair:manage:operator", "member:center:view"}, logical = Logical.OR)
|
||||
@RequestMapping("get")
|
||||
public R get(@RequestBody Map<String, Long> map) {
|
||||
Long id = map.get("id");
|
||||
Repair repair = repairService.selectRepairById(id);
|
||||
|
||||
List<RepairAttach> list = repairAttachService.getListByRepair(id);
|
||||
List<RepairAttachVO> voices = new ArrayList<>();
|
||||
List<RepairAttachVO> repairs = new ArrayList<>();
|
||||
List<RepairAttachVO> feedbacks = new ArrayList<>();
|
||||
List<RepairAttachVO> evals = new ArrayList<>();
|
||||
for (RepairAttach repairAttach : list) {
|
||||
RepairAttachVO repairAttachVO = new RepairAttachVO(repairAttach.getId(), repairAttach.getUrl());
|
||||
if (repairAttach.getNodeId() == 1) {
|
||||
if (IRepairAttachService.FILE_VOICE.equals(repairAttach.getExt1())) voices.add(repairAttachVO);
|
||||
if (IRepairAttachService.FILE_IMG.equals(repairAttach.getExt1())) repairs.add(repairAttachVO);
|
||||
}
|
||||
if (repairAttach.getNodeId() == 9) feedbacks.add(repairAttachVO);
|
||||
if (repairAttach.getNodeId() == 13) evals.add(repairAttachVO);
|
||||
}
|
||||
Map<String, Object> files = new HashMap<>();
|
||||
files.put("voice", voices);
|
||||
files.put("repair", repairs);
|
||||
files.put("feedback", feedbacks);
|
||||
files.put("eval", evals);
|
||||
|
||||
Map<String, Object> files=repairAttachService.getAttachMapbyRepairId(id);
|
||||
List<RepairLog> logList = repairLogService.selectRepairLogListByRepairId(id);
|
||||
return R.ok().put("repair", repair)
|
||||
.put("files", files)
|
||||
.put("log", logList);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 删除工单
|
||||
*/
|
||||
@RequiresPermissions("repair:attach:operator")
|
||||
@RequiresPermissions("repair:manage:operator")
|
||||
@RequestMapping("delete")
|
||||
public R remove(Long id) {
|
||||
return toAjax(repairService.deleteRepairById(id));
|
||||
|
@ -2,6 +2,7 @@ package com.ics.admin.controller;
|
||||
|
||||
import com.ics.admin.domain.RepairFloorStatsVo;
|
||||
import com.ics.admin.domain.RepairWorkerStatsVo;
|
||||
import com.ics.admin.service.IRepairService;
|
||||
import com.ics.admin.service.IRepairStatsService;
|
||||
import com.ics.common.core.controller.BaseController;
|
||||
import com.ics.common.core.domain.R;
|
||||
@ -24,23 +25,47 @@ public class RepairStatsController extends BaseController {
|
||||
@Autowired
|
||||
private IRepairStatsService repairWorkerStatsService;
|
||||
|
||||
@Autowired
|
||||
private IRepairService repairService;
|
||||
|
||||
/**
|
||||
* 人员绩效,维修人员
|
||||
*/
|
||||
@RequiresPermissions(value = {"repair:attach:operator"})
|
||||
@RequiresPermissions(value = {"repair:manage:operator"})
|
||||
@RequestMapping("workerList")
|
||||
public R workerList(RepairWorkerStatsVo repairWorkerStatsVo) {
|
||||
startPage();
|
||||
return result(repairWorkerStatsService.selectRepairWorkerStatsList(repairWorkerStatsVo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 人员绩效,指定维修人员的列表
|
||||
*/
|
||||
@RequiresPermissions(value = {"repair:manage:operator"})
|
||||
@RequestMapping("oneWorkerList")
|
||||
public R oneWorkerList(String workerId) {
|
||||
startPage();
|
||||
return result(repairService.repairList("5", workerId, ""));
|
||||
}
|
||||
|
||||
/**
|
||||
* 人员绩效,楼层管理员
|
||||
*/
|
||||
@RequiresPermissions(value = {"repair:attach:operator"})
|
||||
@RequiresPermissions(value = {"repair:manage:operator"})
|
||||
@RequestMapping("floorList")
|
||||
public R floorList(RepairFloorStatsVo repairFloorStatsVo) {
|
||||
startPage();
|
||||
return result(repairWorkerStatsService.selectRepairFloorStatsVoList(repairFloorStatsVo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 人员绩效,指定楼层管理员的列表
|
||||
*/
|
||||
@RequiresPermissions(value = {"repair:manage:operator"})
|
||||
@RequestMapping("oneFloorList")
|
||||
public R oneFloorList(String floorerId) {
|
||||
startPage();
|
||||
return result(repairService.floorRepairList(floorerId));
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -38,6 +38,13 @@ public interface RepairMapper {
|
||||
* @return
|
||||
*/
|
||||
Integer workerRepairNumber(@Param("userId") String userId, @Param("type") String type);
|
||||
|
||||
/**
|
||||
* 楼层管理管工单列表
|
||||
* @param floorerId 管理员id
|
||||
* @return
|
||||
*/
|
||||
List<Repair> floorRepairList(@Param("floorerId")String floorerId);
|
||||
/**
|
||||
* 新增工单
|
||||
*
|
||||
|
@ -3,6 +3,7 @@ package com.ics.admin.service;
|
||||
import com.ics.admin.domain.RepairAttach;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 附件Service接口
|
||||
@ -41,7 +42,15 @@ public interface IRepairAttachService {
|
||||
* @param repairId 工单id
|
||||
* @return
|
||||
*/
|
||||
List<RepairAttach> getListByRepair(long repairId);
|
||||
List<RepairAttach> getListByRepair(Long repairId);
|
||||
|
||||
/**
|
||||
* 查询工单所有附件,并分类组合成map
|
||||
*
|
||||
* @param repairId 工单id
|
||||
* @return
|
||||
*/
|
||||
Map<String, Object> getAttachMapbyRepairId(Long repairId);
|
||||
|
||||
/**
|
||||
* 删除工单附件
|
||||
|
@ -47,6 +47,13 @@ public interface IRepairService {
|
||||
*/
|
||||
Map<String,Integer> workerRepairNumber(String userId);
|
||||
|
||||
/**
|
||||
* 楼层管理管工单列表
|
||||
* @param floorerId 管理员id
|
||||
* @return
|
||||
*/
|
||||
List<Repair> floorRepairList(String floorerId);
|
||||
|
||||
/**
|
||||
* 新增工单
|
||||
*
|
||||
|
@ -3,6 +3,7 @@ package com.ics.admin.service.impl;
|
||||
import com.ics.admin.domain.RepairAttach;
|
||||
import com.ics.admin.mapper.RepairAttachMapper;
|
||||
import com.ics.admin.service.IRepairAttachService;
|
||||
import com.ics.admin.vo.RepairAttachVO;
|
||||
import com.ics.common.utils.StringUtils;
|
||||
import com.ics.common.utils.file.FileUtils;
|
||||
import com.ics.system.config.DfsConfig;
|
||||
@ -10,7 +11,10 @@ import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 附件Service业务层处理
|
||||
@ -40,10 +44,34 @@ public class RepairAttachServiceImpl implements IRepairAttachService {
|
||||
|
||||
|
||||
@Override
|
||||
public List<RepairAttach> getListByRepair(long repairId) {
|
||||
public List<RepairAttach> getListByRepair(Long repairId) {
|
||||
return repairAttachMapper.selectRepairAttachList(repairId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> getAttachMapbyRepairId(Long repairId) {
|
||||
List<RepairAttach> list =repairAttachMapper.selectRepairAttachList(repairId);
|
||||
List<RepairAttachVO> voices = new ArrayList<>();
|
||||
List<RepairAttachVO> repairs = new ArrayList<>();
|
||||
List<RepairAttachVO> feedbacks = new ArrayList<>();
|
||||
List<RepairAttachVO> evals = new ArrayList<>();
|
||||
for (RepairAttach repairAttach : list) {
|
||||
RepairAttachVO repairAttachVO = new RepairAttachVO(repairAttach.getId(), repairAttach.getUrl());
|
||||
if (repairAttach.getNodeId() == 1) {
|
||||
if (IRepairAttachService.FILE_VOICE.equals(repairAttach.getExt1())) voices.add(repairAttachVO);
|
||||
if (IRepairAttachService.FILE_IMG.equals(repairAttach.getExt1())) repairs.add(repairAttachVO);
|
||||
}
|
||||
if (repairAttach.getNodeId() == 9) feedbacks.add(repairAttachVO);
|
||||
if (repairAttach.getNodeId() == 13) evals.add(repairAttachVO);
|
||||
}
|
||||
Map<String, Object> files = new HashMap<>();
|
||||
files.put("voice", voices);
|
||||
files.put("repair", repairs);
|
||||
files.put("feedback", feedbacks);
|
||||
files.put("eval", evals);
|
||||
return files;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int deleteByRepairId(long repairId) {
|
||||
List<RepairAttach> list = repairAttachMapper.selectRepairAttachList(repairId);
|
||||
|
@ -284,6 +284,11 @@ public class RepairServiceImpl implements IRepairService {
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Repair> floorRepairList(String floorerId) {
|
||||
return repairMapper.floorRepairList(floorerId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增工单
|
||||
*
|
||||
|
@ -246,6 +246,17 @@
|
||||
<if test="type == 'close'">and (status = 9 or status = 13)</if>
|
||||
</select>
|
||||
|
||||
<!-- 楼层管理员 工单列表 -->
|
||||
<select id="floorRepairList" resultMap="RepairResult">
|
||||
select
|
||||
rep.*
|
||||
from
|
||||
ics_repair rep,ics_repair_address_floor floor
|
||||
where
|
||||
rep.delete_flag=0 and floor.delete_flag=0 and floor.id=rep.floor_id and floor.admin_id= #{floorerId}
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
<delete id="deleteRepairById" parameterType="Long">
|
||||
DELETE FROM ics_repair WHERE id = #{id}
|
||||
</delete>
|
||||
|
Loading…
x
Reference in New Issue
Block a user