修改了对应接口

This commit is contained in:
chenze 2024-08-16 10:45:27 +08:00
parent 515265e0eb
commit d0da4caa5e
4 changed files with 7 additions and 4 deletions

View File

@ -65,7 +65,7 @@ public class RepairAttachController extends BaseController {
if ((nodeId == 9 || nodeId == 13) && repairId == null) return R.error("无效参数"); if ((nodeId == 9 || nodeId == 13) && repairId == null) return R.error("无效参数");
String ext = FileUploadUtils.getExtension(file); String ext = FileUploadUtils.getExtension(file);
String type = IRepairAttachService.FILE_IMG; String type = IRepairAttachService.FILE_IMG;
if (StringUtils.isNotBlank(ext) && ext.toLowerCase().equals("mp4")) type = IRepairAttachService.FILE_VIDEO; if (StringUtils.isNotBlank(ext) && ext.toLowerCase().equals("wav")) type = IRepairAttachService.FILE_VIDEO;
return processAttache(file, repairId, nodeId, type); return processAttache(file, repairId, nodeId, type);
} }

View File

@ -50,7 +50,7 @@ public class RepairController extends BaseController {
@PostMapping("flow/start") @PostMapping("flow/start")
public R startFlow(@RequestBody RepairDTO repairDTO) { public R startFlow(@RequestBody RepairDTO repairDTO) {
Long userId = getLoginStaffId(); Long userId = getLoginStaffId();
if (!repairService.submitCheck(userId.toString())) return R.error("报修过于频繁,请稍后再试."); // if (!repairService.submitCheck(userId.toString())) return R.error("报修过于频繁,请稍后再试.");
String result = repairService.handleFlow(repairDTO.getRepair(), userId, repairDTO.getFiles(), null, null); String result = repairService.handleFlow(repairDTO.getRepair(), userId, repairDTO.getFiles(), null, null);
return IRepairService.OK.equals(result) ? R.ok() : R.error(result); return IRepairService.OK.equals(result) ? R.ok() : R.error(result);
} }
@ -91,9 +91,11 @@ public class RepairController extends BaseController {
public R list(@RequestBody Map<String, String> map) { public R list(@RequestBody Map<String, String> map) {
String type = map.get("type"); String type = map.get("type");
String menu = map.get("menu"); String menu = map.get("menu");
String workerId = map.get("workerId");
if (StringUtils.isBlank(type) || StringUtils.isBlank(menu)) return R.error(); if (StringUtils.isBlank(type) || StringUtils.isBlank(menu)) return R.error();
startPage(); startPage();
Long userId = getLoginStaffId();
Long userId = workerId!=null? Long.valueOf(workerId) :getLoginStaffId();
return result(repairService.repairList(menu, userId.toString(), type)); return result(repairService.repairList(menu, userId.toString(), type));
} }

View File

@ -42,6 +42,7 @@ public class RepairDeviceServiceImpl extends ServiceImpl<RepairDeviceMapper, Rep
@Override @Override
public List<RepairDevice> selectRepairDeviceList(RepairDevice repairDevice) { public List<RepairDevice> selectRepairDeviceList(RepairDevice repairDevice) {
QueryWrapper queryWrapper = new QueryWrapper(); QueryWrapper queryWrapper = new QueryWrapper();
queryWrapper.eq(repairDevice.getTypeId() !=null, "type_id", repairDevice.getTypeId());
return repairDeviceMapper.selectList(queryWrapper); return repairDeviceMapper.selectList(queryWrapper);
} }

View File

@ -28,7 +28,7 @@ public class MimeTypeUtils {
// word excel powerpoint // word excel powerpoint
"doc", "docx", "xls", "xlsx", "ppt", "pptx", "html", "htm", "txt", "doc", "docx", "xls", "xlsx", "ppt", "pptx", "html", "htm", "txt",
// 压缩文件 // 压缩文件
"rar", "zip", "gz", "bz2","mp4","mp3", "rar", "zip", "gz", "bz2","mp4","mp3","wav",
// pdf // pdf
"pdf"}; "pdf"};