resolve: 解决合并冲突
This commit is contained in:
commit
80dface225
97 files changed
+4789
-1686
No files matched your search
+12
@@ -20,6 +20,8 @@ import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.hq.domain.vo.HqHallReservationVo;
|
||||
import org.dromara.hq.domain.bo.HqHallReservationBo;
|
||||
import org.dromara.hq.domain.bo.HqHallReservationAuditBo;
|
||||
import org.dromara.hq.domain.bo.HqHallTimeCheckBo;
|
||||
import org.dromara.hq.domain.vo.HqHallTimeCheckVo;
|
||||
import org.dromara.hq.service.IHqHallReservationService;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
|
||||
@@ -112,4 +114,14 @@ public class HqHallReservationController extends BaseController {
|
||||
public R<Void> audit(@RequestBody HqHallReservationAuditBo auditBo) {
|
||||
return toAjax(hqHallReservationService.auditByIds(auditBo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 检查报告厅时间冲突
|
||||
*/
|
||||
@SaCheckPermission("hq:hallReservation:query")
|
||||
@PostMapping("/checkTimeConflict")
|
||||
public R<HqHallTimeCheckVo> checkTimeConflict(@Validated @RequestBody HqHallTimeCheckBo timeCheckBo) {
|
||||
HqHallTimeCheckVo result = hqHallReservationService.checkTimeConflict(timeCheckBo);
|
||||
return R.ok(result);
|
||||
}
|
||||
}
|
||||
+16
-16
@@ -15,9 +15,9 @@ import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.hq.domain.bo.PmRepairAttachmentBo;
|
||||
import org.dromara.hq.domain.vo.PmRepairAttachmentVo;
|
||||
import org.dromara.hq.service.IPmRepairAttachmentService;
|
||||
import org.dromara.hq.domain.bo.HqPmRepairAttachmentBo;
|
||||
import org.dromara.hq.domain.vo.HqPmRepairAttachmentVo;
|
||||
import org.dromara.hq.service.IHqPmRepairAttachmentService;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
@@ -35,16 +35,16 @@ import java.util.List;
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/hq/pm/attachment")
|
||||
public class PmRepairAttachmentController extends BaseController {
|
||||
public class HqPmRepairAttachmentController extends BaseController {
|
||||
|
||||
private final IPmRepairAttachmentService attachmentService;
|
||||
private final IHqPmRepairAttachmentService attachmentService;
|
||||
|
||||
/**
|
||||
* 查询报修附件列表
|
||||
*/
|
||||
// @SaCheckPermission("pm:attachment:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<PmRepairAttachmentVo> list(PmRepairAttachmentBo bo, PageQuery pageQuery) {
|
||||
public TableDataInfo<HqPmRepairAttachmentVo> list(HqPmRepairAttachmentBo bo, PageQuery pageQuery) {
|
||||
return attachmentService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
@@ -53,8 +53,8 @@ public class PmRepairAttachmentController extends BaseController {
|
||||
*/
|
||||
// @SaCheckPermission("pm:attachment:list")
|
||||
@GetMapping("/order/{orderId}")
|
||||
public R<List<PmRepairAttachmentVo>> getByOrderId(@PathVariable("orderId") Long orderId) {
|
||||
List<PmRepairAttachmentVo> list = attachmentService.queryByOrderId(orderId);
|
||||
public R<List<HqPmRepairAttachmentVo>> getByOrderId(@PathVariable("orderId") Long orderId) {
|
||||
List<HqPmRepairAttachmentVo> list = attachmentService.queryByOrderId(orderId);
|
||||
return R.ok(list);
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@ public class PmRepairAttachmentController extends BaseController {
|
||||
*/
|
||||
// @SaCheckPermission("pm:attachment:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<PmRepairAttachmentVo> getInfo(@NotNull(message = "主键不能为空") @PathVariable Long id) {
|
||||
public R<HqPmRepairAttachmentVo> getInfo(@NotNull(message = "主键不能为空") @PathVariable Long id) {
|
||||
return R.ok(attachmentService.queryById(id));
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ public class PmRepairAttachmentController extends BaseController {
|
||||
@Log(title = "报修附件", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody PmRepairAttachmentBo bo) {
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody HqPmRepairAttachmentBo bo) {
|
||||
return toAjax(attachmentService.insertByBo(bo));
|
||||
}
|
||||
|
||||
@@ -85,7 +85,7 @@ public class PmRepairAttachmentController extends BaseController {
|
||||
@Log(title = "报修附件", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody PmRepairAttachmentBo bo) {
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody HqPmRepairAttachmentBo bo) {
|
||||
return toAjax(attachmentService.updateByBo(bo));
|
||||
}
|
||||
|
||||
@@ -106,7 +106,7 @@ public class PmRepairAttachmentController extends BaseController {
|
||||
// @SaCheckPermission("pm:attachment:upload")
|
||||
@Log(title = "上传报修附件", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/upload")
|
||||
public R<PmRepairAttachmentVo> uploadFile(
|
||||
public R<HqPmRepairAttachmentVo> uploadFile(
|
||||
@RequestParam("orderId") Long orderId,
|
||||
@RequestParam(value = "uploadStage", defaultValue = "1") String uploadStage,
|
||||
@RequestParam("file") MultipartFile file,
|
||||
@@ -117,7 +117,7 @@ public class PmRepairAttachmentController extends BaseController {
|
||||
}
|
||||
|
||||
try {
|
||||
PmRepairAttachmentVo result = attachmentService.uploadFile(orderId, uploadStage, file, description);
|
||||
HqPmRepairAttachmentVo result = attachmentService.uploadFile(orderId, uploadStage, file, description);
|
||||
return R.ok(result);
|
||||
} catch (Exception e) {
|
||||
return R.fail("上传失败: " + e.getMessage());
|
||||
@@ -130,7 +130,7 @@ public class PmRepairAttachmentController extends BaseController {
|
||||
// @SaCheckPermission("pm:attachment:upload")
|
||||
@Log(title = "批量上传报修附件", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/upload/batch")
|
||||
public R<List<PmRepairAttachmentVo>> uploadFiles(
|
||||
public R<List<HqPmRepairAttachmentVo>> uploadFiles(
|
||||
@RequestParam("orderId") Long orderId,
|
||||
@RequestParam(value = "uploadStage", defaultValue = "1") String uploadStage,
|
||||
@RequestParam("files") MultipartFile[] files,
|
||||
@@ -141,7 +141,7 @@ public class PmRepairAttachmentController extends BaseController {
|
||||
}
|
||||
|
||||
try {
|
||||
List<PmRepairAttachmentVo> results = attachmentService.uploadFiles(orderId, uploadStage, files,
|
||||
List<HqPmRepairAttachmentVo> results = attachmentService.uploadFiles(orderId, uploadStage, files,
|
||||
descriptions);
|
||||
return R.ok(results);
|
||||
} catch (Exception e) {
|
||||
@@ -165,7 +165,7 @@ public class PmRepairAttachmentController extends BaseController {
|
||||
// @SaCheckPermission("pm:attachment:download")
|
||||
@GetMapping("/download/{id}")
|
||||
public void downloadFile(@PathVariable("id") Long id, HttpServletResponse response) {
|
||||
PmRepairAttachmentVo attachment = attachmentService.queryById(id);
|
||||
HqPmRepairAttachmentVo attachment = attachmentService.queryById(id);
|
||||
if (attachment == null) {
|
||||
return;
|
||||
}
|
||||
+16
-16
@@ -17,9 +17,9 @@ import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.hq.domain.vo.PmRepairCategoryVo;
|
||||
import org.dromara.hq.domain.bo.PmRepairCategoryBo;
|
||||
import org.dromara.hq.service.IPmRepairCategoryService;
|
||||
import org.dromara.hq.domain.vo.HqPmRepairCategoryVo;
|
||||
import org.dromara.hq.domain.bo.HqPmRepairCategoryBo;
|
||||
import org.dromara.hq.service.IHqPmRepairCategoryService;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
@@ -32,16 +32,16 @@ import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/hq/pm/repairCategory")
|
||||
public class PmRepairCategoryController extends BaseController {
|
||||
public class HqPmRepairCategoryController extends BaseController {
|
||||
|
||||
private final IPmRepairCategoryService repairCategoryService;
|
||||
private final IHqPmRepairCategoryService repairCategoryService;
|
||||
|
||||
/**
|
||||
* 查询维修类型列表
|
||||
*/
|
||||
@SaCheckPermission("pm:category:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<PmRepairCategoryVo> list(PmRepairCategoryBo bo, PageQuery pageQuery) {
|
||||
public TableDataInfo<HqPmRepairCategoryVo> list(HqPmRepairCategoryBo bo, PageQuery pageQuery) {
|
||||
return repairCategoryService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
@@ -51,9 +51,9 @@ public class PmRepairCategoryController extends BaseController {
|
||||
@SaCheckPermission("pm:category:export")
|
||||
@Log(title = "维修类型", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(PmRepairCategoryBo bo, HttpServletResponse response) {
|
||||
List<PmRepairCategoryVo> list = repairCategoryService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "维修类型", PmRepairCategoryVo.class, response);
|
||||
public void export(HqPmRepairCategoryBo bo, HttpServletResponse response) {
|
||||
List<HqPmRepairCategoryVo> list = repairCategoryService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "维修类型", HqPmRepairCategoryVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -61,7 +61,7 @@ public class PmRepairCategoryController extends BaseController {
|
||||
*/
|
||||
@SaCheckPermission("pm:category:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<PmRepairCategoryVo> getInfo(@NotNull(message = "主键不能为空") @PathVariable Long id) {
|
||||
public R<HqPmRepairCategoryVo> getInfo(@NotNull(message = "主键不能为空") @PathVariable Long id) {
|
||||
return R.ok(repairCategoryService.queryById(id));
|
||||
}
|
||||
|
||||
@@ -72,7 +72,7 @@ public class PmRepairCategoryController extends BaseController {
|
||||
@Log(title = "维修类型", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody PmRepairCategoryBo bo) {
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody HqPmRepairCategoryBo bo) {
|
||||
return toAjax(repairCategoryService.insertByBo(bo));
|
||||
}
|
||||
|
||||
@@ -83,7 +83,7 @@ public class PmRepairCategoryController extends BaseController {
|
||||
@Log(title = "维修类型", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody PmRepairCategoryBo bo) {
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody HqPmRepairCategoryBo bo) {
|
||||
return toAjax(repairCategoryService.updateByBo(bo));
|
||||
}
|
||||
|
||||
@@ -102,7 +102,7 @@ public class PmRepairCategoryController extends BaseController {
|
||||
*/
|
||||
@SaCheckPermission("pm:category:tree")
|
||||
@GetMapping("/tree")
|
||||
public R<List<PmRepairCategoryVo>> tree() {
|
||||
public R<List<HqPmRepairCategoryVo>> tree() {
|
||||
return R.ok(repairCategoryService.queryTree());
|
||||
}
|
||||
|
||||
@@ -112,7 +112,7 @@ public class PmRepairCategoryController extends BaseController {
|
||||
@SaCheckPermission("pm:category:options")
|
||||
@GetMapping("/options")
|
||||
public R<List<java.util.Map<String, Object>>> options() {
|
||||
List<PmRepairCategoryVo> list = repairCategoryService.queryTree();
|
||||
List<HqPmRepairCategoryVo> list = repairCategoryService.queryTree();
|
||||
List<java.util.Map<String, Object>> options = buildCategoryOptions(list);
|
||||
return R.ok(options);
|
||||
}
|
||||
@@ -120,9 +120,9 @@ public class PmRepairCategoryController extends BaseController {
|
||||
/**
|
||||
* 构建维修类型下拉选项
|
||||
*/
|
||||
private List<java.util.Map<String, Object>> buildCategoryOptions(List<PmRepairCategoryVo> list) {
|
||||
private List<java.util.Map<String, Object>> buildCategoryOptions(List<HqPmRepairCategoryVo> list) {
|
||||
List<java.util.Map<String, Object>> result = new java.util.ArrayList<>();
|
||||
for (PmRepairCategoryVo item : list) {
|
||||
for (HqPmRepairCategoryVo item : list) {
|
||||
java.util.Map<String, Object> option = new java.util.HashMap<>();
|
||||
option.put("value", item.getId());
|
||||
option.put("label", item.getCategoryName());
|
||||
+18
-18
@@ -17,11 +17,11 @@ import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.hq.domain.vo.PmRepairOrderVo;
|
||||
import org.dromara.hq.domain.bo.PmRepairOrderBo;
|
||||
import org.dromara.hq.domain.vo.PmRepairAttachmentVo;
|
||||
import org.dromara.hq.service.IPmRepairOrderService;
|
||||
import org.dromara.hq.service.IPmRepairAttachmentService;
|
||||
import org.dromara.hq.domain.vo.HqPmRepairOrderVo;
|
||||
import org.dromara.hq.domain.bo.HqPmRepairOrderBo;
|
||||
import org.dromara.hq.domain.vo.HqPmRepairAttachmentVo;
|
||||
import org.dromara.hq.service.IHqPmRepairOrderService;
|
||||
import org.dromara.hq.service.IHqPmRepairAttachmentService;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
@@ -34,18 +34,18 @@ import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/hq/pm/repairOrder")
|
||||
public class PmRepairOrderController extends BaseController {
|
||||
public class HqPmRepairOrderController extends BaseController {
|
||||
|
||||
private final IPmRepairOrderService repairOrderService;
|
||||
private final IPmRepairAttachmentService attachmentService;
|
||||
private final IHqPmRepairOrderService repairOrderService;
|
||||
private final IHqPmRepairAttachmentService attachmentService;
|
||||
|
||||
/**
|
||||
* 查询报修工单列表
|
||||
*/
|
||||
@SaCheckPermission("pm:repairOrder:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<PmRepairOrderVo> list(PmRepairOrderBo bo, PageQuery pageQuery) {
|
||||
TableDataInfo<PmRepairOrderVo> result = repairOrderService.queryPageList(bo, pageQuery);
|
||||
public TableDataInfo<HqPmRepairOrderVo> list(HqPmRepairOrderBo bo, PageQuery pageQuery) {
|
||||
TableDataInfo<HqPmRepairOrderVo> result = repairOrderService.queryPageList(bo, pageQuery);
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -55,9 +55,9 @@ public class PmRepairOrderController extends BaseController {
|
||||
@SaCheckPermission("pm:repairOrder:export")
|
||||
@Log(title = "报修工单", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(PmRepairOrderBo bo, HttpServletResponse response) {
|
||||
List<PmRepairOrderVo> list = repairOrderService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "报修工单", PmRepairOrderVo.class, response);
|
||||
public void export(HqPmRepairOrderBo bo, HttpServletResponse response) {
|
||||
List<HqPmRepairOrderVo> list = repairOrderService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "报修工单", HqPmRepairOrderVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -65,7 +65,7 @@ public class PmRepairOrderController extends BaseController {
|
||||
*/
|
||||
@SaCheckPermission("pm:repairOrder:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<PmRepairOrderVo> getInfo(@NotNull(message = "主键不能为空") @PathVariable Long id) {
|
||||
public R<HqPmRepairOrderVo> getInfo(@NotNull(message = "主键不能为空") @PathVariable Long id) {
|
||||
return R.ok(repairOrderService.queryById(id));
|
||||
}
|
||||
|
||||
@@ -76,7 +76,7 @@ public class PmRepairOrderController extends BaseController {
|
||||
@Log(title = "报修工单", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Long> add(@Validated(AddGroup.class) @RequestBody PmRepairOrderBo bo) {
|
||||
public R<Long> add(@Validated(AddGroup.class) @RequestBody HqPmRepairOrderBo bo) {
|
||||
boolean success = repairOrderService.insertByBo(bo);
|
||||
if (success) {
|
||||
// 返回创建的工单ID,供前端上传附件使用
|
||||
@@ -93,7 +93,7 @@ public class PmRepairOrderController extends BaseController {
|
||||
@Log(title = "报修工单", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody PmRepairOrderBo bo) {
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody HqPmRepairOrderBo bo) {
|
||||
return toAjax(repairOrderService.updateByBo(bo));
|
||||
}
|
||||
|
||||
@@ -323,9 +323,9 @@ public class PmRepairOrderController extends BaseController {
|
||||
*/
|
||||
@SaCheckPermission("pm:repairOrder:query")
|
||||
@GetMapping("/{orderId}/attachments")
|
||||
public R<List<PmRepairAttachmentVo>> getRepairAttachments(
|
||||
public R<List<HqPmRepairAttachmentVo>> getRepairAttachments(
|
||||
@NotNull(message = "工单ID不能为空") @PathVariable Long orderId) {
|
||||
List<PmRepairAttachmentVo> attachments = attachmentService.queryByOrderId(orderId);
|
||||
List<HqPmRepairAttachmentVo> attachments = attachmentService.queryByOrderId(orderId);
|
||||
return R.ok(attachments);
|
||||
}
|
||||
|
||||
+4
-4
@@ -10,15 +10,15 @@ import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 报修附件对象 pm_repair_attachment
|
||||
* 报修附件对象 hq_pm_repair_attachment
|
||||
*
|
||||
* @author Cursor AI
|
||||
* @date 2025-01-23
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("pm_repair_attachment")
|
||||
public class PmRepairAttachment extends TenantEntity {
|
||||
@TableName("hq_pm_repair_attachment")
|
||||
public class HqPmRepairAttachment extends TenantEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
@@ -30,7 +30,7 @@ public class PmRepairAttachment extends TenantEntity {
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 报修工单ID,关联pm_repair_order.id
|
||||
* 报修工单ID,关联hq_pm_repair_order.id
|
||||
*/
|
||||
private Long orderId;
|
||||
|
||||
+3
-3
@@ -11,15 +11,15 @@ import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 维修类型对象 pm_repair_category
|
||||
* 维修类型对象 hq_pm_repair_category
|
||||
*
|
||||
* @author Cursor AI
|
||||
* @date 2025-01-23
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("pm_repair_category")
|
||||
public class PmRepairCategory extends TenantEntity {
|
||||
@TableName("hq_pm_repair_category")
|
||||
public class HqPmRepairCategory extends TenantEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
+4
-4
@@ -11,15 +11,15 @@ import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 报修工单对象 pm_repair_order
|
||||
* 报修工单对象 hq_pm_repair_order
|
||||
*
|
||||
* @author Cursor AI
|
||||
* @date 2025-01-23
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("pm_repair_order")
|
||||
public class PmRepairOrder extends TenantEntity {
|
||||
@TableName("hq_pm_repair_order")
|
||||
public class HqPmRepairOrder extends TenantEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
@@ -51,7 +51,7 @@ public class PmRepairOrder extends TenantEntity {
|
||||
private String repairLocation;
|
||||
|
||||
/**
|
||||
* 维修类型ID,关联pm_repair_category.id
|
||||
* 维修类型ID,关联hq_pm_repair_category.id
|
||||
*/
|
||||
private Long categoryId;
|
||||
|
||||
+3
-3
@@ -18,8 +18,8 @@ import java.io.Serial;
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("pm_repair_progress")
|
||||
public class PmRepairProgress extends TenantEntity {
|
||||
@TableName("hq_pm_repair_progress")
|
||||
public class HqPmRepairProgress extends TenantEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
@@ -31,7 +31,7 @@ public class PmRepairProgress extends TenantEntity {
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 报修工单ID,关联pm_repair_order.id
|
||||
* 报修工单ID,关联hq_pm_repair_order.id
|
||||
*/
|
||||
private Long orderId;
|
||||
|
||||
+4
-4
@@ -11,15 +11,15 @@ import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 服务评价对象 pm_service_evaluation
|
||||
* 服务评价对象 hq_pm_service_evaluation
|
||||
*
|
||||
* @author Cursor AI
|
||||
* @date 2025-01-23
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("pm_service_evaluation")
|
||||
public class PmServiceEvaluation extends TenantEntity {
|
||||
@TableName("hq_pm_service_evaluation")
|
||||
public class HqPmServiceEvaluation extends TenantEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
@@ -31,7 +31,7 @@ public class PmServiceEvaluation extends TenantEntity {
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 报修工单ID,关联pm_repair_order.id
|
||||
* 报修工单ID,关联hq_pm_repair_order.id
|
||||
*/
|
||||
private Long orderId;
|
||||
|
||||
+41
@@ -0,0 +1,41 @@
|
||||
package org.dromara.hq.domain.bo;
|
||||
|
||||
import lombok.Data;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
/**
|
||||
* 报告厅时间冲突检查业务对象
|
||||
*
|
||||
* @author wuzilong
|
||||
* @date 2025-01-09
|
||||
*/
|
||||
@Data
|
||||
public class HqHallTimeCheckBo {
|
||||
|
||||
/**
|
||||
* 报告厅ID
|
||||
*/
|
||||
@NotNull(message = "报告厅ID不能为空")
|
||||
private Long hallId;
|
||||
|
||||
/**
|
||||
* 开始时间
|
||||
*/
|
||||
@NotNull(message = "开始时间不能为空")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date startTime;
|
||||
|
||||
/**
|
||||
* 结束时间
|
||||
*/
|
||||
@NotNull(message = "结束时间不能为空")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date endTime;
|
||||
|
||||
/**
|
||||
* 排除的预约ID(编辑时排除自己)
|
||||
*/
|
||||
private Long excludeId;
|
||||
}
|
||||
+4
-4
@@ -9,20 +9,20 @@ import lombok.EqualsAndHashCode;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import org.dromara.hq.domain.PmRepairAttachment;
|
||||
import org.dromara.hq.domain.HqPmRepairAttachment;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 报修附件业务对象 pm_repair_attachment
|
||||
* 报修附件业务对象 hq_pm_repair_attachment
|
||||
*
|
||||
* @author Cursor AI
|
||||
* @date 2025-01-26
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@AutoMapper(target = PmRepairAttachment.class, reverseConvertGenerate = false)
|
||||
public class PmRepairAttachmentBo extends BaseEntity {
|
||||
@AutoMapper(target = HqPmRepairAttachment.class, reverseConvertGenerate = false)
|
||||
public class HqPmRepairAttachmentBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
+4
-4
@@ -1,6 +1,6 @@
|
||||
package org.dromara.hq.domain.bo;
|
||||
|
||||
import org.dromara.hq.domain.PmRepairCategory;
|
||||
import org.dromara.hq.domain.HqPmRepairCategory;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
@@ -14,15 +14,15 @@ import java.util.List;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
/**
|
||||
* 维修类型业务对象 pm_repair_category
|
||||
* 维修类型业务对象 hq_pm_repair_category
|
||||
*
|
||||
* @author Cursor AI
|
||||
* @date 2025-01-23
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@AutoMapper(target = PmRepairCategory.class, reverseConvertGenerate = false)
|
||||
public class PmRepairCategoryBo extends BaseEntity {
|
||||
@AutoMapper(target = HqPmRepairCategory.class, reverseConvertGenerate = false)
|
||||
public class HqPmRepairCategoryBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
+4
-4
@@ -1,6 +1,6 @@
|
||||
package org.dromara.hq.domain.bo;
|
||||
|
||||
import org.dromara.hq.domain.PmRepairOrder;
|
||||
import org.dromara.hq.domain.HqPmRepairOrder;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
@@ -14,15 +14,15 @@ import java.util.List;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
/**
|
||||
* 报修工单业务对象 pm_repair_order
|
||||
* 报修工单业务对象 hq_pm_repair_order
|
||||
*
|
||||
* @author Cursor AI
|
||||
* @date 2025-01-23
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@AutoMapper(target = PmRepairOrder.class, reverseConvertGenerate = false)
|
||||
public class PmRepairOrderBo extends BaseEntity {
|
||||
@AutoMapper(target = HqPmRepairOrder.class, reverseConvertGenerate = false)
|
||||
public class HqPmRepairOrderBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
+124
@@ -0,0 +1,124 @@
|
||||
package org.dromara.hq.domain.bo;
|
||||
|
||||
import org.dromara.hq.domain.HqPmRepairProgress;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import jakarta.validation.constraints.*;
|
||||
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 维修进度记录业务对象 hq_pm_repair_progress
|
||||
*
|
||||
* @author Cursor AI
|
||||
* @date 2025-01-23
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@AutoMapper(target = HqPmRepairProgress.class, reverseConvertGenerate = false)
|
||||
public class HqPmRepairProgressBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@NotNull(message = "主键ID不能为空", groups = { EditGroup.class })
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 报修工单ID,关联hq_pm_repair_order.id
|
||||
*/
|
||||
@NotNull(message = "报修工单ID不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long orderId;
|
||||
|
||||
/**
|
||||
* 进度类型:1-工单分派,2-接收确认,3-到达现场,4-开始维修,5-进度更新,6-完成维修,7-用户评价,8-工单归档,9-其他
|
||||
*/
|
||||
@NotBlank(message = "进度类型不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String progressType;
|
||||
|
||||
/**
|
||||
* 进度状态描述
|
||||
*/
|
||||
@NotBlank(message = "进度状态描述不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String progressStatus;
|
||||
|
||||
/**
|
||||
* 进度详细描述
|
||||
*/
|
||||
private String progressDetail;
|
||||
|
||||
/**
|
||||
* 操作人ID,关联sys_user.id
|
||||
*/
|
||||
@NotNull(message = "操作人ID不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long operatorId;
|
||||
|
||||
/**
|
||||
* 操作人姓名
|
||||
*/
|
||||
@NotBlank(message = "操作人姓名不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String operatorName;
|
||||
|
||||
/**
|
||||
* 操作人角色:user-用户,admin-管理员,worker-维修员
|
||||
*/
|
||||
@NotBlank(message = "操作人角色不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String operatorRole;
|
||||
|
||||
/**
|
||||
* 操作位置信息
|
||||
*/
|
||||
private String locationInfo;
|
||||
|
||||
/**
|
||||
* GPS纬度
|
||||
*/
|
||||
private BigDecimal gpsLatitude;
|
||||
|
||||
/**
|
||||
* GPS经度
|
||||
*/
|
||||
private BigDecimal gpsLongitude;
|
||||
|
||||
/**
|
||||
* 操作时间
|
||||
*/
|
||||
@NotNull(message = "操作时间不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Date operationTime;
|
||||
|
||||
/**
|
||||
* 预计耗时(分钟)
|
||||
*/
|
||||
private Integer estimatedDuration;
|
||||
|
||||
/**
|
||||
* 关联附件ID列表(逗号分隔)
|
||||
*/
|
||||
private String attachmentIds;
|
||||
|
||||
/**
|
||||
* 下一步计划
|
||||
*/
|
||||
private String nextStep;
|
||||
|
||||
/**
|
||||
* 遇到的问题
|
||||
*/
|
||||
private String issuesEncountered;
|
||||
|
||||
/**
|
||||
* 需要的材料
|
||||
*/
|
||||
private String materialsNeeded;
|
||||
|
||||
/**
|
||||
* 备注信息
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
}
|
||||
+160
@@ -0,0 +1,160 @@
|
||||
package org.dromara.hq.domain.bo;
|
||||
|
||||
import org.dromara.hq.domain.HqPmServiceEvaluation;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import jakarta.validation.constraints.*;
|
||||
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 服务评价业务对象 hq_pm_service_evaluation
|
||||
*
|
||||
* @author Cursor AI
|
||||
* @date 2025-01-23
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@AutoMapper(target = HqPmServiceEvaluation.class, reverseConvertGenerate = false)
|
||||
public class HqPmServiceEvaluationBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@NotNull(message = "主键ID不能为空", groups = { EditGroup.class })
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 报修工单ID,关联hq_pm_repair_order.id
|
||||
*/
|
||||
@NotNull(message = "报修工单ID不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long orderId;
|
||||
|
||||
/**
|
||||
* 评价人ID,关联sys_user.id
|
||||
*/
|
||||
@NotNull(message = "评价人ID不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long evaluatorId;
|
||||
|
||||
/**
|
||||
* 评价人姓名
|
||||
*/
|
||||
@NotBlank(message = "评价人姓名不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String evaluatorName;
|
||||
|
||||
/**
|
||||
* 被评价维修员ID,关联sys_user.id
|
||||
*/
|
||||
@NotNull(message = "被评价维修员ID不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long evaluatedWorkerId;
|
||||
|
||||
/**
|
||||
* 被评价维修员姓名
|
||||
*/
|
||||
@NotBlank(message = "被评价维修员姓名不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String evaluatedWorkerName;
|
||||
|
||||
/**
|
||||
* 综合评价得分(1.0-5.0)
|
||||
*/
|
||||
@NotNull(message = "综合评价得分不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
@DecimalMin(value = "1.0", message = "综合评价得分不能小于1.0")
|
||||
@DecimalMax(value = "5.0", message = "综合评价得分不能大于5.0")
|
||||
private BigDecimal overallScore;
|
||||
|
||||
/**
|
||||
* 维修质量得分(1.0-5.0)
|
||||
*/
|
||||
@DecimalMin(value = "1.0", message = "维修质量得分不能小于1.0")
|
||||
@DecimalMax(value = "5.0", message = "维修质量得分不能大于5.0")
|
||||
private BigDecimal qualityScore;
|
||||
|
||||
/**
|
||||
* 服务态度得分(1.0-5.0)
|
||||
*/
|
||||
@DecimalMin(value = "1.0", message = "服务态度得分不能小于1.0")
|
||||
@DecimalMax(value = "5.0", message = "服务态度得分不能大于5.0")
|
||||
private BigDecimal attitudeScore;
|
||||
|
||||
/**
|
||||
* 响应速度得分(1.0-5.0)
|
||||
*/
|
||||
@DecimalMin(value = "1.0", message = "响应速度得分不能小于1.0")
|
||||
@DecimalMax(value = "5.0", message = "响应速度得分不能大于5.0")
|
||||
private BigDecimal responseSpeedScore;
|
||||
|
||||
/**
|
||||
* 沟通效果得分(1.0-5.0)
|
||||
*/
|
||||
@DecimalMin(value = "1.0", message = "沟通效果得分不能小于1.0")
|
||||
@DecimalMax(value = "5.0", message = "沟通效果得分不能大于5.0")
|
||||
private BigDecimal communicationScore;
|
||||
|
||||
/**
|
||||
* 文字评价内容
|
||||
*/
|
||||
private String evaluationContent;
|
||||
|
||||
/**
|
||||
* 满意度等级:1-非常满意,2-满意,3-一般,4-不满意,5-非常不满意
|
||||
*/
|
||||
@NotBlank(message = "满意度等级不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String satisfactionLevel;
|
||||
|
||||
/**
|
||||
* 是否匿名评价(0-实名,1-匿名)
|
||||
*/
|
||||
private Integer isAnonymous;
|
||||
|
||||
/**
|
||||
* 是否公开显示(0-不公开,1-公开)
|
||||
*/
|
||||
private Integer isPublic;
|
||||
|
||||
/**
|
||||
* 评价时间
|
||||
*/
|
||||
@NotNull(message = "评价时间不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Date evaluationTime;
|
||||
|
||||
/**
|
||||
* 服务开始时间
|
||||
*/
|
||||
private Date serviceStartTime;
|
||||
|
||||
/**
|
||||
* 服务结束时间
|
||||
*/
|
||||
private Date serviceEndTime;
|
||||
|
||||
/**
|
||||
* 服务时长(分钟)
|
||||
*/
|
||||
private Integer serviceDuration;
|
||||
|
||||
/**
|
||||
* 正面标签(逗号分隔)
|
||||
*/
|
||||
private String positiveTags;
|
||||
|
||||
/**
|
||||
* 负面标签(逗号分隔)
|
||||
*/
|
||||
private String negativeTags;
|
||||
|
||||
/**
|
||||
* 改进建议
|
||||
*/
|
||||
private String improvementSuggestions;
|
||||
|
||||
/**
|
||||
* 备注信息
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
}
|
||||
+25
@@ -113,4 +113,29 @@ public class HqHallReservationVo implements Serializable {
|
||||
@ExcelProperty(value = "审核备注")
|
||||
private String auditRemark;
|
||||
|
||||
// ========== 基础字段(强制性,所有VO类必须包含) ==========
|
||||
|
||||
/**
|
||||
* 创建者
|
||||
*/
|
||||
private Long createBy;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@ExcelProperty(value = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 更新者
|
||||
*/
|
||||
private Long updateBy;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date updateTime;
|
||||
|
||||
}
|
||||
+57
@@ -0,0 +1,57 @@
|
||||
package org.dromara.hq.domain.vo;
|
||||
|
||||
import lombok.Data;
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 报告厅时间冲突检查结果视图对象
|
||||
*
|
||||
* @author wuzilong
|
||||
* @date 2025-01-09
|
||||
*/
|
||||
@Data
|
||||
public class HqHallTimeCheckVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 是否存在时间冲突
|
||||
*/
|
||||
private Boolean hasConflict;
|
||||
|
||||
/**
|
||||
* 冲突的预约记录列表
|
||||
*/
|
||||
private List<HqHallReservationVo> conflictList;
|
||||
|
||||
/**
|
||||
* 冲突描述信息
|
||||
*/
|
||||
private String conflictMessage;
|
||||
|
||||
public HqHallTimeCheckVo() {
|
||||
}
|
||||
|
||||
public HqHallTimeCheckVo(Boolean hasConflict, List<HqHallReservationVo> conflictList, String conflictMessage) {
|
||||
this.hasConflict = hasConflict;
|
||||
this.conflictList = conflictList;
|
||||
this.conflictMessage = conflictMessage;
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建无冲突结果
|
||||
*/
|
||||
public static HqHallTimeCheckVo noConflict() {
|
||||
return new HqHallTimeCheckVo(false, List.of(), "无时间冲突");
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建有冲突结果
|
||||
*/
|
||||
public static HqHallTimeCheckVo hasConflict(List<HqHallReservationVo> conflictList, String message) {
|
||||
return new HqHallTimeCheckVo(true, conflictList, message);
|
||||
}
|
||||
}
|
||||
+4
-4
@@ -5,22 +5,22 @@ import cn.idev.excel.annotation.ExcelProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
import org.dromara.hq.domain.PmRepairAttachment;
|
||||
import org.dromara.hq.domain.HqPmRepairAttachment;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 报修附件视图对象 pm_repair_attachment
|
||||
* 报修附件视图对象 hq_pm_repair_attachment
|
||||
*
|
||||
* @author Cursor AI
|
||||
* @date 2025-01-26
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = PmRepairAttachment.class)
|
||||
public class PmRepairAttachmentVo implements Serializable {
|
||||
@AutoMapper(target = HqPmRepairAttachment.class)
|
||||
public class HqPmRepairAttachmentVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
+5
-5
@@ -4,7 +4,7 @@ import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.dromara.hq.domain.PmRepairCategory;
|
||||
import org.dromara.hq.domain.HqPmRepairCategory;
|
||||
import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import cn.idev.excel.annotation.ExcelProperty;
|
||||
import org.dromara.common.excel.annotation.ExcelDictFormat;
|
||||
@@ -16,15 +16,15 @@ import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 维修类型视图对象 pm_repair_category
|
||||
* 维修类型视图对象 hq_pm_repair_category
|
||||
*
|
||||
* @author Cursor AI
|
||||
* @date 2025-01-23
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = PmRepairCategory.class)
|
||||
public class PmRepairCategoryVo implements Serializable {
|
||||
@AutoMapper(target = HqPmRepairCategory.class)
|
||||
public class HqPmRepairCategoryVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
@@ -156,6 +156,6 @@ public class PmRepairCategoryVo implements Serializable {
|
||||
/**
|
||||
* 子分类列表(用于树形结构)
|
||||
*/
|
||||
private List<PmRepairCategoryVo> children;
|
||||
private List<HqPmRepairCategoryVo> children;
|
||||
|
||||
}
|
||||
+4
-4
@@ -3,7 +3,7 @@ package org.dromara.hq.domain.vo;
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.dromara.hq.domain.PmRepairOrder;
|
||||
import org.dromara.hq.domain.HqPmRepairOrder;
|
||||
import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import cn.idev.excel.annotation.ExcelProperty;
|
||||
import org.dromara.common.excel.annotation.ExcelDictFormat;
|
||||
@@ -15,15 +15,15 @@ import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 报修工单视图对象 pm_repair_order
|
||||
* 报修工单视图对象 hq_pm_repair_order
|
||||
*
|
||||
* @author Cursor AI
|
||||
* @date 2025-01-23
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = PmRepairOrder.class)
|
||||
public class PmRepairOrderVo implements Serializable {
|
||||
@AutoMapper(target = HqPmRepairOrder.class)
|
||||
public class HqPmRepairOrderVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
+171
@@ -0,0 +1,171 @@
|
||||
package org.dromara.hq.domain.vo;
|
||||
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.dromara.hq.domain.HqPmRepairProgress;
|
||||
import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import cn.idev.excel.annotation.ExcelProperty;
|
||||
import org.dromara.common.excel.annotation.ExcelDictFormat;
|
||||
import org.dromara.common.excel.convert.ExcelDictConvert;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 维修进度记录视图对象 hq_pm_repair_progress
|
||||
*
|
||||
* @author Cursor AI
|
||||
* @date 2025-01-23
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = HqPmRepairProgress.class)
|
||||
public class HqPmRepairProgressVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@ExcelProperty(value = "主键ID")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 报修工单ID,关联hq_pm_repair_order.id
|
||||
*/
|
||||
@ExcelProperty(value = "报修工单ID")
|
||||
private Long orderId;
|
||||
|
||||
/**
|
||||
* 进度类型:1-工单分派,2-接收确认,3-到达现场,4-开始维修,5-进度更新,6-完成维修,7-用户评价,8-工单归档,9-其他
|
||||
*/
|
||||
@ExcelProperty(value = "进度类型", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(dictType = "pm_progress_type")
|
||||
private String progressType;
|
||||
|
||||
/**
|
||||
* 进度状态描述
|
||||
*/
|
||||
@ExcelProperty(value = "进度状态描述")
|
||||
private String progressStatus;
|
||||
|
||||
/**
|
||||
* 进度详细描述
|
||||
*/
|
||||
@ExcelProperty(value = "进度详细描述")
|
||||
private String progressDetail;
|
||||
|
||||
/**
|
||||
* 操作人ID,关联sys_user.id
|
||||
*/
|
||||
@ExcelProperty(value = "操作人ID")
|
||||
private Long operatorId;
|
||||
|
||||
/**
|
||||
* 操作人姓名
|
||||
*/
|
||||
@ExcelProperty(value = "操作人姓名")
|
||||
private String operatorName;
|
||||
|
||||
/**
|
||||
* 操作人角色:user-用户,admin-管理员,worker-维修员
|
||||
*/
|
||||
@ExcelProperty(value = "操作人角色", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(dictType = "pm_operator_role")
|
||||
private String operatorRole;
|
||||
|
||||
/**
|
||||
* 操作位置信息
|
||||
*/
|
||||
@ExcelProperty(value = "操作位置信息")
|
||||
private String locationInfo;
|
||||
|
||||
/**
|
||||
* GPS纬度
|
||||
*/
|
||||
@ExcelProperty(value = "GPS纬度")
|
||||
private BigDecimal gpsLatitude;
|
||||
|
||||
/**
|
||||
* GPS经度
|
||||
*/
|
||||
@ExcelProperty(value = "GPS经度")
|
||||
private BigDecimal gpsLongitude;
|
||||
|
||||
/**
|
||||
* 操作时间
|
||||
*/
|
||||
@ExcelProperty(value = "操作时间")
|
||||
private Date operationTime;
|
||||
|
||||
/**
|
||||
* 预计耗时(分钟)
|
||||
*/
|
||||
@ExcelProperty(value = "预计耗时(分钟)")
|
||||
private Integer estimatedDuration;
|
||||
|
||||
/**
|
||||
* 关联附件ID列表(逗号分隔)
|
||||
*/
|
||||
@ExcelProperty(value = "关联附件ID列表")
|
||||
private String attachmentIds;
|
||||
|
||||
/**
|
||||
* 下一步计划
|
||||
*/
|
||||
@ExcelProperty(value = "下一步计划")
|
||||
private String nextStep;
|
||||
|
||||
/**
|
||||
* 遇到的问题
|
||||
*/
|
||||
@ExcelProperty(value = "遇到的问题")
|
||||
private String issuesEncountered;
|
||||
|
||||
/**
|
||||
* 需要的材料
|
||||
*/
|
||||
@ExcelProperty(value = "需要的材料")
|
||||
private String materialsNeeded;
|
||||
|
||||
/**
|
||||
* 备注信息
|
||||
*/
|
||||
@ExcelProperty(value = "备注信息")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 租户ID
|
||||
*/
|
||||
private String tenantId;
|
||||
|
||||
/**
|
||||
* 创建部门
|
||||
*/
|
||||
private Long createDept;
|
||||
|
||||
/**
|
||||
* 创建者
|
||||
*/
|
||||
private Long createBy;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 更新者
|
||||
*/
|
||||
private Long updateBy;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private Date updateTime;
|
||||
|
||||
}
|
||||
+207
@@ -0,0 +1,207 @@
|
||||
package org.dromara.hq.domain.vo;
|
||||
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.dromara.hq.domain.HqPmServiceEvaluation;
|
||||
import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import cn.idev.excel.annotation.ExcelProperty;
|
||||
import org.dromara.common.excel.annotation.ExcelDictFormat;
|
||||
import org.dromara.common.excel.convert.ExcelDictConvert;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 服务评价视图对象 hq_pm_service_evaluation
|
||||
*
|
||||
* @author Cursor AI
|
||||
* @date 2025-01-23
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = HqPmServiceEvaluation.class)
|
||||
public class HqPmServiceEvaluationVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@ExcelProperty(value = "主键ID")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 报修工单ID,关联hq_pm_repair_order.id
|
||||
*/
|
||||
@ExcelProperty(value = "报修工单ID")
|
||||
private Long orderId;
|
||||
|
||||
/**
|
||||
* 评价人ID,关联sys_user.id
|
||||
*/
|
||||
@ExcelProperty(value = "评价人ID")
|
||||
private Long evaluatorId;
|
||||
|
||||
/**
|
||||
* 评价人姓名
|
||||
*/
|
||||
@ExcelProperty(value = "评价人姓名")
|
||||
private String evaluatorName;
|
||||
|
||||
/**
|
||||
* 被评价维修员ID,关联sys_user.id
|
||||
*/
|
||||
@ExcelProperty(value = "维修员ID")
|
||||
private Long evaluatedWorkerId;
|
||||
|
||||
/**
|
||||
* 被评价维修员姓名
|
||||
*/
|
||||
@ExcelProperty(value = "维修员姓名")
|
||||
private String evaluatedWorkerName;
|
||||
|
||||
/**
|
||||
* 综合评价得分(1.0-5.0)
|
||||
*/
|
||||
@ExcelProperty(value = "综合评价得分")
|
||||
private BigDecimal overallScore;
|
||||
|
||||
/**
|
||||
* 维修质量得分(1.0-5.0)
|
||||
*/
|
||||
@ExcelProperty(value = "维修质量得分")
|
||||
private BigDecimal qualityScore;
|
||||
|
||||
/**
|
||||
* 服务态度得分(1.0-5.0)
|
||||
*/
|
||||
@ExcelProperty(value = "服务态度得分")
|
||||
private BigDecimal attitudeScore;
|
||||
|
||||
/**
|
||||
* 响应速度得分(1.0-5.0)
|
||||
*/
|
||||
@ExcelProperty(value = "响应速度得分")
|
||||
private BigDecimal responseSpeedScore;
|
||||
|
||||
/**
|
||||
* 沟通效果得分(1.0-5.0)
|
||||
*/
|
||||
@ExcelProperty(value = "沟通效果得分")
|
||||
private BigDecimal communicationScore;
|
||||
|
||||
/**
|
||||
* 文字评价内容
|
||||
*/
|
||||
@ExcelProperty(value = "文字评价内容")
|
||||
private String evaluationContent;
|
||||
|
||||
/**
|
||||
* 满意度等级:1-非常满意,2-满意,3-一般,4-不满意,5-非常不满意
|
||||
*/
|
||||
@ExcelProperty(value = "满意度等级", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(dictType = "pm_satisfaction_level")
|
||||
private String satisfactionLevel;
|
||||
|
||||
/**
|
||||
* 是否匿名评价(0-实名,1-匿名)
|
||||
*/
|
||||
@ExcelProperty(value = "是否匿名评价", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(dictType = "sys_yes_no")
|
||||
private Integer isAnonymous;
|
||||
|
||||
/**
|
||||
* 是否公开显示(0-不公开,1-公开)
|
||||
*/
|
||||
@ExcelProperty(value = "是否公开显示", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(dictType = "sys_yes_no")
|
||||
private Integer isPublic;
|
||||
|
||||
/**
|
||||
* 评价时间
|
||||
*/
|
||||
@ExcelProperty(value = "评价时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date evaluationTime;
|
||||
|
||||
/**
|
||||
* 服务开始时间
|
||||
*/
|
||||
@ExcelProperty(value = "服务开始时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date serviceStartTime;
|
||||
|
||||
/**
|
||||
* 服务结束时间
|
||||
*/
|
||||
@ExcelProperty(value = "服务结束时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date serviceEndTime;
|
||||
|
||||
/**
|
||||
* 服务时长(分钟)
|
||||
*/
|
||||
@ExcelProperty(value = "服务时长(分钟)")
|
||||
private Integer serviceDuration;
|
||||
|
||||
/**
|
||||
* 正面标签(逗号分隔)
|
||||
*/
|
||||
@ExcelProperty(value = "正面标签")
|
||||
private String positiveTags;
|
||||
|
||||
/**
|
||||
* 负面标签(逗号分隔)
|
||||
*/
|
||||
@ExcelProperty(value = "负面标签")
|
||||
private String negativeTags;
|
||||
|
||||
/**
|
||||
* 改进建议
|
||||
*/
|
||||
@ExcelProperty(value = "改进建议")
|
||||
private String improvementSuggestions;
|
||||
|
||||
/**
|
||||
* 备注信息
|
||||
*/
|
||||
@ExcelProperty(value = "备注信息")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 租户ID
|
||||
*/
|
||||
private String tenantId;
|
||||
|
||||
/**
|
||||
* 创建部门
|
||||
*/
|
||||
private Long createDept;
|
||||
|
||||
/**
|
||||
* 创建者
|
||||
*/
|
||||
private Long createBy;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@ExcelProperty(value = "创建时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 更新者
|
||||
*/
|
||||
private Long updateBy;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private Date updateTime;
|
||||
|
||||
}
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
package org.dromara.hq.mapper;
|
||||
|
||||
import org.dromara.hq.domain.HqPmRepairAttachment;
|
||||
import org.dromara.hq.domain.vo.HqPmRepairAttachmentVo;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 报修附件Mapper接口
|
||||
*
|
||||
* @author Cursor AI
|
||||
* @date 2025-01-26
|
||||
*/
|
||||
public interface HqPmRepairAttachmentMapper extends BaseMapperPlus<HqPmRepairAttachment, HqPmRepairAttachmentVo> {
|
||||
|
||||
}
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
package org.dromara.hq.mapper;
|
||||
|
||||
import org.dromara.hq.domain.HqPmRepairCategory;
|
||||
import org.dromara.hq.domain.vo.HqPmRepairCategoryVo;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 维修类型Mapper接口
|
||||
*
|
||||
* @author Cursor AI
|
||||
* @date 2025-01-23
|
||||
*/
|
||||
public interface HqPmRepairCategoryMapper extends BaseMapperPlus<HqPmRepairCategory, HqPmRepairCategoryVo> {
|
||||
|
||||
}
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
package org.dromara.hq.mapper;
|
||||
|
||||
import org.dromara.hq.domain.PmRepairOrder;
|
||||
import org.dromara.hq.domain.vo.PmRepairOrderVo;
|
||||
import org.dromara.hq.domain.HqPmRepairOrder;
|
||||
import org.dromara.hq.domain.vo.HqPmRepairOrderVo;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
|
||||
import java.util.List;
|
||||
@@ -13,7 +13,7 @@ import java.util.Map;
|
||||
* @author Cursor AI
|
||||
* @date 2025-01-23
|
||||
*/
|
||||
public interface PmRepairOrderMapper extends BaseMapperPlus<PmRepairOrder, PmRepairOrderVo> {
|
||||
public interface HqPmRepairOrderMapper extends BaseMapperPlus<HqPmRepairOrder, HqPmRepairOrderVo> {
|
||||
|
||||
/**
|
||||
* 查询拥有"维修人员"角色的用户列表
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
package org.dromara.hq.mapper;
|
||||
|
||||
import org.dromara.hq.domain.PmRepairProgress;
|
||||
import org.dromara.hq.domain.HqPmRepairProgress;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
@@ -9,6 +9,6 @@ import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
* @author Cursor AI
|
||||
* @date 2025-01-26
|
||||
*/
|
||||
public interface PmRepairProgressMapper extends BaseMapperPlus<PmRepairProgress, PmRepairProgress> {
|
||||
public interface HqPmRepairProgressMapper extends BaseMapperPlus<HqPmRepairProgress, HqPmRepairProgress> {
|
||||
|
||||
}
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
package org.dromara.hq.mapper;
|
||||
|
||||
import org.dromara.hq.domain.PmServiceEvaluation;
|
||||
import org.dromara.hq.domain.HqPmServiceEvaluation;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
@@ -9,6 +9,6 @@ import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
* @author Cursor AI
|
||||
* @date 2025-01-26
|
||||
*/
|
||||
public interface PmServiceEvaluationMapper extends BaseMapperPlus<PmServiceEvaluation, PmServiceEvaluation> {
|
||||
public interface HqPmServiceEvaluationMapper extends BaseMapperPlus<HqPmServiceEvaluation, HqPmServiceEvaluation> {
|
||||
|
||||
}
|
||||
-15
@@ -1,15 +0,0 @@
|
||||
package org.dromara.hq.mapper;
|
||||
|
||||
import org.dromara.hq.domain.PmRepairAttachment;
|
||||
import org.dromara.hq.domain.vo.PmRepairAttachmentVo;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 报修附件Mapper接口
|
||||
*
|
||||
* @author Cursor AI
|
||||
* @date 2025-01-26
|
||||
*/
|
||||
public interface PmRepairAttachmentMapper extends BaseMapperPlus<PmRepairAttachment, PmRepairAttachmentVo> {
|
||||
|
||||
}
|
||||
-15
@@ -1,15 +0,0 @@
|
||||
package org.dromara.hq.mapper;
|
||||
|
||||
import org.dromara.hq.domain.PmRepairCategory;
|
||||
import org.dromara.hq.domain.vo.PmRepairCategoryVo;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 维修类型Mapper接口
|
||||
*
|
||||
* @author Cursor AI
|
||||
* @date 2025-01-23
|
||||
*/
|
||||
public interface PmRepairCategoryMapper extends BaseMapperPlus<PmRepairCategory, PmRepairCategoryVo> {
|
||||
|
||||
}
|
||||
+10
@@ -3,6 +3,8 @@ package org.dromara.hq.service;
|
||||
import org.dromara.hq.domain.vo.HqHallReservationVo;
|
||||
import org.dromara.hq.domain.bo.HqHallReservationBo;
|
||||
import org.dromara.hq.domain.bo.HqHallReservationAuditBo;
|
||||
import org.dromara.hq.domain.bo.HqHallTimeCheckBo;
|
||||
import org.dromara.hq.domain.vo.HqHallTimeCheckVo;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
|
||||
@@ -74,4 +76,12 @@ public interface IHqHallReservationService {
|
||||
* @return 是否审核成功
|
||||
*/
|
||||
Boolean auditByIds(HqHallReservationAuditBo auditBo);
|
||||
|
||||
/**
|
||||
* 检查报告厅时间冲突
|
||||
*
|
||||
* @param timeCheckBo 时间检查参数
|
||||
* @return 时间冲突检查结果
|
||||
*/
|
||||
HqHallTimeCheckVo checkTimeConflict(HqHallTimeCheckBo timeCheckBo);
|
||||
}
|
||||
+11
-11
@@ -1,7 +1,7 @@
|
||||
package org.dromara.hq.service;
|
||||
|
||||
import org.dromara.hq.domain.vo.PmRepairAttachmentVo;
|
||||
import org.dromara.hq.domain.bo.PmRepairAttachmentBo;
|
||||
import org.dromara.hq.domain.vo.HqPmRepairAttachmentVo;
|
||||
import org.dromara.hq.domain.bo.HqPmRepairAttachmentBo;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
@@ -15,37 +15,37 @@ import java.util.List;
|
||||
* @author Cursor AI
|
||||
* @date 2025-01-26
|
||||
*/
|
||||
public interface IPmRepairAttachmentService {
|
||||
public interface IHqPmRepairAttachmentService {
|
||||
|
||||
/**
|
||||
* 查询报修附件
|
||||
*/
|
||||
PmRepairAttachmentVo queryById(Long id);
|
||||
HqPmRepairAttachmentVo queryById(Long id);
|
||||
|
||||
/**
|
||||
* 查询报修附件列表
|
||||
*/
|
||||
TableDataInfo<PmRepairAttachmentVo> queryPageList(PmRepairAttachmentBo bo, PageQuery pageQuery);
|
||||
TableDataInfo<HqPmRepairAttachmentVo> queryPageList(HqPmRepairAttachmentBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询报修附件列表
|
||||
*/
|
||||
List<PmRepairAttachmentVo> queryList(PmRepairAttachmentBo bo);
|
||||
List<HqPmRepairAttachmentVo> queryList(HqPmRepairAttachmentBo bo);
|
||||
|
||||
/**
|
||||
* 根据工单ID查询附件列表
|
||||
*/
|
||||
List<PmRepairAttachmentVo> queryByOrderId(Long orderId);
|
||||
List<HqPmRepairAttachmentVo> queryByOrderId(Long orderId);
|
||||
|
||||
/**
|
||||
* 新增报修附件
|
||||
*/
|
||||
Boolean insertByBo(PmRepairAttachmentBo bo);
|
||||
Boolean insertByBo(HqPmRepairAttachmentBo bo);
|
||||
|
||||
/**
|
||||
* 修改报修附件
|
||||
*/
|
||||
Boolean updateByBo(PmRepairAttachmentBo bo);
|
||||
Boolean updateByBo(HqPmRepairAttachmentBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除报修附件信息
|
||||
@@ -55,12 +55,12 @@ public interface IPmRepairAttachmentService {
|
||||
/**
|
||||
* 上传附件文件
|
||||
*/
|
||||
PmRepairAttachmentVo uploadFile(Long orderId, String uploadStage, MultipartFile file, String description);
|
||||
HqPmRepairAttachmentVo uploadFile(Long orderId, String uploadStage, MultipartFile file, String description);
|
||||
|
||||
/**
|
||||
* 批量上传附件文件
|
||||
*/
|
||||
List<PmRepairAttachmentVo> uploadFiles(Long orderId, String uploadStage, MultipartFile[] files,
|
||||
List<HqPmRepairAttachmentVo> uploadFiles(Long orderId, String uploadStage, MultipartFile[] files,
|
||||
List<String> descriptions);
|
||||
|
||||
/**
|
||||
+9
-9
@@ -1,7 +1,7 @@
|
||||
package org.dromara.hq.service;
|
||||
|
||||
import org.dromara.hq.domain.vo.PmRepairCategoryVo;
|
||||
import org.dromara.hq.domain.bo.PmRepairCategoryBo;
|
||||
import org.dromara.hq.domain.vo.HqPmRepairCategoryVo;
|
||||
import org.dromara.hq.domain.bo.HqPmRepairCategoryBo;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
|
||||
@@ -14,7 +14,7 @@ import java.util.List;
|
||||
* @author Cursor AI
|
||||
* @date 2025-01-23
|
||||
*/
|
||||
public interface IPmRepairCategoryService {
|
||||
public interface IHqPmRepairCategoryService {
|
||||
|
||||
/**
|
||||
* 查询维修类型
|
||||
@@ -22,7 +22,7 @@ public interface IPmRepairCategoryService {
|
||||
* @param id 主键
|
||||
* @return 维修类型
|
||||
*/
|
||||
PmRepairCategoryVo queryById(Long id);
|
||||
HqPmRepairCategoryVo queryById(Long id);
|
||||
|
||||
/**
|
||||
* 分页查询维修类型列表
|
||||
@@ -31,7 +31,7 @@ public interface IPmRepairCategoryService {
|
||||
* @param pageQuery 分页参数
|
||||
* @return 维修类型分页列表
|
||||
*/
|
||||
TableDataInfo<PmRepairCategoryVo> queryPageList(PmRepairCategoryBo bo, PageQuery pageQuery);
|
||||
TableDataInfo<HqPmRepairCategoryVo> queryPageList(HqPmRepairCategoryBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询符合条件的维修类型列表
|
||||
@@ -39,7 +39,7 @@ public interface IPmRepairCategoryService {
|
||||
* @param bo 查询条件
|
||||
* @return 维修类型列表
|
||||
*/
|
||||
List<PmRepairCategoryVo> queryList(PmRepairCategoryBo bo);
|
||||
List<HqPmRepairCategoryVo> queryList(HqPmRepairCategoryBo bo);
|
||||
|
||||
/**
|
||||
* 新增维修类型
|
||||
@@ -47,7 +47,7 @@ public interface IPmRepairCategoryService {
|
||||
* @param bo 维修类型
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
Boolean insertByBo(PmRepairCategoryBo bo);
|
||||
Boolean insertByBo(HqPmRepairCategoryBo bo);
|
||||
|
||||
/**
|
||||
* 修改维修类型
|
||||
@@ -55,7 +55,7 @@ public interface IPmRepairCategoryService {
|
||||
* @param bo 维修类型
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
Boolean updateByBo(PmRepairCategoryBo bo);
|
||||
Boolean updateByBo(HqPmRepairCategoryBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除维修类型信息
|
||||
@@ -71,7 +71,7 @@ public interface IPmRepairCategoryService {
|
||||
*
|
||||
* @return 维修类型树形列表
|
||||
*/
|
||||
List<PmRepairCategoryVo> queryTree();
|
||||
List<HqPmRepairCategoryVo> queryTree();
|
||||
|
||||
/**
|
||||
* 更新使用次数
|
||||
+8
-8
@@ -1,7 +1,7 @@
|
||||
package org.dromara.hq.service;
|
||||
|
||||
import org.dromara.hq.domain.vo.PmRepairOrderVo;
|
||||
import org.dromara.hq.domain.bo.PmRepairOrderBo;
|
||||
import org.dromara.hq.domain.vo.HqPmRepairOrderVo;
|
||||
import org.dromara.hq.domain.bo.HqPmRepairOrderBo;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
|
||||
@@ -14,7 +14,7 @@ import java.util.List;
|
||||
* @author Cursor AI
|
||||
* @date 2025-01-23
|
||||
*/
|
||||
public interface IPmRepairOrderService {
|
||||
public interface IHqPmRepairOrderService {
|
||||
|
||||
/**
|
||||
* 查询报修工单
|
||||
@@ -22,7 +22,7 @@ public interface IPmRepairOrderService {
|
||||
* @param id 主键
|
||||
* @return 报修工单
|
||||
*/
|
||||
PmRepairOrderVo queryById(Long id);
|
||||
HqPmRepairOrderVo queryById(Long id);
|
||||
|
||||
/**
|
||||
* 分页查询报修工单列表
|
||||
@@ -31,7 +31,7 @@ public interface IPmRepairOrderService {
|
||||
* @param pageQuery 分页参数
|
||||
* @return 报修工单分页列表
|
||||
*/
|
||||
TableDataInfo<PmRepairOrderVo> queryPageList(PmRepairOrderBo bo, PageQuery pageQuery);
|
||||
TableDataInfo<HqPmRepairOrderVo> queryPageList(HqPmRepairOrderBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询符合条件的报修工单列表
|
||||
@@ -39,7 +39,7 @@ public interface IPmRepairOrderService {
|
||||
* @param bo 查询条件
|
||||
* @return 报修工单列表
|
||||
*/
|
||||
List<PmRepairOrderVo> queryList(PmRepairOrderBo bo);
|
||||
List<HqPmRepairOrderVo> queryList(HqPmRepairOrderBo bo);
|
||||
|
||||
/**
|
||||
* 新增报修工单
|
||||
@@ -47,7 +47,7 @@ public interface IPmRepairOrderService {
|
||||
* @param bo 报修工单
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
Boolean insertByBo(PmRepairOrderBo bo);
|
||||
Boolean insertByBo(HqPmRepairOrderBo bo);
|
||||
|
||||
/**
|
||||
* 修改报修工单
|
||||
@@ -55,7 +55,7 @@ public interface IPmRepairOrderService {
|
||||
* @param bo 报修工单
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
Boolean updateByBo(PmRepairOrderBo bo);
|
||||
Boolean updateByBo(HqPmRepairOrderBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除报修工单信息
|
||||
+64
@@ -0,0 +1,64 @@
|
||||
package org.dromara.hq.service;
|
||||
|
||||
import org.dromara.hq.domain.vo.HqPmRepairProgressVo;
|
||||
import org.dromara.hq.domain.bo.HqPmRepairProgressBo;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 维修进度记录Service接口
|
||||
*
|
||||
* @author Cursor AI
|
||||
* @date 2025-01-23
|
||||
*/
|
||||
public interface IHqPmRepairProgressService {
|
||||
|
||||
/**
|
||||
* 查询维修进度记录
|
||||
*/
|
||||
HqPmRepairProgressVo queryById(Long id);
|
||||
|
||||
/**
|
||||
* 查询维修进度记录列表
|
||||
*/
|
||||
TableDataInfo<HqPmRepairProgressVo> queryPageList(HqPmRepairProgressBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询维修进度记录列表
|
||||
*/
|
||||
List<HqPmRepairProgressVo> queryList(HqPmRepairProgressBo bo);
|
||||
|
||||
/**
|
||||
* 根据工单ID查询进度记录列表
|
||||
*/
|
||||
List<HqPmRepairProgressVo> queryListByOrderId(Long orderId);
|
||||
|
||||
/**
|
||||
* 新增维修进度记录
|
||||
*/
|
||||
Boolean insertByBo(HqPmRepairProgressBo bo);
|
||||
|
||||
/**
|
||||
* 修改维修进度记录
|
||||
*/
|
||||
Boolean updateByBo(HqPmRepairProgressBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除维修进度记录信息
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
|
||||
/**
|
||||
* 批量删除维修进度记录信息
|
||||
*/
|
||||
Boolean deleteByIds(Collection<Long> ids);
|
||||
|
||||
/**
|
||||
* 删除维修进度记录信息
|
||||
*/
|
||||
Boolean deleteById(Long id);
|
||||
|
||||
}
|
||||
+69
@@ -0,0 +1,69 @@
|
||||
package org.dromara.hq.service;
|
||||
|
||||
import org.dromara.hq.domain.vo.HqPmServiceEvaluationVo;
|
||||
import org.dromara.hq.domain.bo.HqPmServiceEvaluationBo;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 服务评价Service接口
|
||||
*
|
||||
* @author Cursor AI
|
||||
* @date 2025-01-23
|
||||
*/
|
||||
public interface IHqPmServiceEvaluationService {
|
||||
|
||||
/**
|
||||
* 查询服务评价
|
||||
*/
|
||||
HqPmServiceEvaluationVo queryById(Long id);
|
||||
|
||||
/**
|
||||
* 查询服务评价列表
|
||||
*/
|
||||
TableDataInfo<HqPmServiceEvaluationVo> queryPageList(HqPmServiceEvaluationBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询服务评价列表
|
||||
*/
|
||||
List<HqPmServiceEvaluationVo> queryList(HqPmServiceEvaluationBo bo);
|
||||
|
||||
/**
|
||||
* 根据工单ID查询评价信息
|
||||
*/
|
||||
HqPmServiceEvaluationVo queryByOrderId(Long orderId);
|
||||
|
||||
/**
|
||||
* 根据维修员ID查询评价列表
|
||||
*/
|
||||
List<HqPmServiceEvaluationVo> queryListByWorkerId(Long workerId);
|
||||
|
||||
/**
|
||||
* 新增服务评价
|
||||
*/
|
||||
Boolean insertByBo(HqPmServiceEvaluationBo bo);
|
||||
|
||||
/**
|
||||
* 修改服务评价
|
||||
*/
|
||||
Boolean updateByBo(HqPmServiceEvaluationBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除服务评价信息
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
|
||||
/**
|
||||
* 批量删除服务评价信息
|
||||
*/
|
||||
Boolean deleteByIds(Collection<Long> ids);
|
||||
|
||||
/**
|
||||
* 删除服务评价信息
|
||||
*/
|
||||
Boolean deleteById(Long id);
|
||||
|
||||
}
|
||||
+47
@@ -12,7 +12,9 @@ import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.dromara.hq.domain.bo.HqHallReservationBo;
|
||||
import org.dromara.hq.domain.bo.HqHallReservationAuditBo;
|
||||
import org.dromara.hq.domain.bo.HqHallTimeCheckBo;
|
||||
import org.dromara.hq.domain.vo.HqHallReservationVo;
|
||||
import org.dromara.hq.domain.vo.HqHallTimeCheckVo;
|
||||
import org.dromara.hq.domain.HqHallReservation;
|
||||
import org.dromara.hq.mapper.HqHallReservationMapper;
|
||||
import org.dromara.hq.service.IHqHallReservationService;
|
||||
@@ -223,4 +225,49 @@ public class HqHallReservationServiceImpl implements IHqHallReservationService {
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 检查报告厅时间冲突
|
||||
*
|
||||
* @param timeCheckBo 时间检查参数
|
||||
* @return 时间冲突检查结果
|
||||
*/
|
||||
@Override
|
||||
public HqHallTimeCheckVo checkTimeConflict(HqHallTimeCheckBo timeCheckBo) {
|
||||
log.info("开始检查报告厅时间冲突,参数:{}", timeCheckBo);
|
||||
|
||||
// 构建查询条件:同一报告厅,时间有重叠,状态为已批准的预约
|
||||
LambdaQueryWrapper<HqHallReservation> lqw = Wrappers.lambdaQuery();
|
||||
|
||||
// 1. 同一报告厅
|
||||
lqw.eq(HqHallReservation::getHallId, timeCheckBo.getHallId());
|
||||
|
||||
// 2. 状态为已批准(状态为'1')
|
||||
lqw.eq(HqHallReservation::getStatus, "1");
|
||||
|
||||
// 3. 如果有排除ID,则排除该记录(用于编辑时排除自己)
|
||||
if (timeCheckBo.getExcludeId() != null) {
|
||||
lqw.ne(HqHallReservation::getId, timeCheckBo.getExcludeId());
|
||||
}
|
||||
|
||||
// 4. 时间重叠判断:
|
||||
// 两个时间段重叠的条件:新开始时间 < 已存在结束时间 AND 新结束时间 > 已存在开始时间
|
||||
// 即:startTime < existingEndTime AND endTime > existingStartTime
|
||||
lqw.and(wrapper -> wrapper
|
||||
.lt(HqHallReservation::getStartTime, timeCheckBo.getEndTime())
|
||||
.gt(HqHallReservation::getEndTime, timeCheckBo.getStartTime()));
|
||||
|
||||
// 查询冲突的预约记录
|
||||
List<HqHallReservationVo> conflictList = baseMapper.selectVoList(lqw);
|
||||
|
||||
// 构建返回结果
|
||||
if (conflictList.isEmpty()) {
|
||||
log.info("未发现时间冲突");
|
||||
return HqHallTimeCheckVo.noConflict();
|
||||
} else {
|
||||
String conflictMessage = String.format("发现 %d 个时间冲突的已批准预约", conflictList.size());
|
||||
log.info("发现时间冲突,冲突记录数:{}", conflictList.size());
|
||||
return HqHallTimeCheckVo.hasConflict(conflictList, conflictMessage);
|
||||
}
|
||||
}
|
||||
}
|
||||
+48
-48
@@ -16,12 +16,12 @@ import org.dromara.common.oss.core.OssClient;
|
||||
import org.dromara.common.oss.entity.UploadResult;
|
||||
import org.dromara.common.oss.factory.OssFactory;
|
||||
import org.dromara.common.satoken.utils.LoginHelper;
|
||||
import org.dromara.hq.domain.PmRepairAttachment;
|
||||
import org.dromara.hq.domain.bo.PmRepairAttachmentBo;
|
||||
import org.dromara.hq.domain.vo.PmRepairAttachmentVo;
|
||||
import org.dromara.hq.mapper.PmRepairAttachmentMapper;
|
||||
import org.dromara.hq.mapper.PmRepairOrderMapper;
|
||||
import org.dromara.hq.service.IPmRepairAttachmentService;
|
||||
import org.dromara.hq.domain.HqPmRepairAttachment;
|
||||
import org.dromara.hq.domain.bo.HqPmRepairAttachmentBo;
|
||||
import org.dromara.hq.domain.vo.HqPmRepairAttachmentVo;
|
||||
import org.dromara.hq.mapper.HqPmRepairAttachmentMapper;
|
||||
import org.dromara.hq.mapper.HqPmRepairOrderMapper;
|
||||
import org.dromara.hq.service.IHqPmRepairAttachmentService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
@@ -40,16 +40,16 @@ import java.util.List;
|
||||
@Slf4j
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class PmRepairAttachmentServiceImpl implements IPmRepairAttachmentService {
|
||||
public class HqPmRepairAttachmentServiceImpl implements IHqPmRepairAttachmentService {
|
||||
|
||||
private final PmRepairAttachmentMapper baseMapper;
|
||||
private final PmRepairOrderMapper repairOrderMapper;
|
||||
private final HqPmRepairAttachmentMapper baseMapper;
|
||||
private final HqPmRepairOrderMapper repairOrderMapper;
|
||||
|
||||
/**
|
||||
* 查询报修附件
|
||||
*/
|
||||
@Override
|
||||
public PmRepairAttachmentVo queryById(Long id) {
|
||||
public HqPmRepairAttachmentVo queryById(Long id) {
|
||||
return baseMapper.selectVoById(id);
|
||||
}
|
||||
|
||||
@@ -57,9 +57,9 @@ public class PmRepairAttachmentServiceImpl implements IPmRepairAttachmentService
|
||||
* 查询报修附件列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<PmRepairAttachmentVo> queryPageList(PmRepairAttachmentBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<PmRepairAttachment> lqw = buildQueryWrapper(bo);
|
||||
Page<PmRepairAttachmentVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
public TableDataInfo<HqPmRepairAttachmentVo> queryPageList(HqPmRepairAttachmentBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<HqPmRepairAttachment> lqw = buildQueryWrapper(bo);
|
||||
Page<HqPmRepairAttachmentVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
@@ -67,8 +67,8 @@ public class PmRepairAttachmentServiceImpl implements IPmRepairAttachmentService
|
||||
* 查询报修附件列表
|
||||
*/
|
||||
@Override
|
||||
public List<PmRepairAttachmentVo> queryList(PmRepairAttachmentBo bo) {
|
||||
LambdaQueryWrapper<PmRepairAttachment> lqw = buildQueryWrapper(bo);
|
||||
public List<HqPmRepairAttachmentVo> queryList(HqPmRepairAttachmentBo bo) {
|
||||
LambdaQueryWrapper<HqPmRepairAttachment> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
@@ -76,22 +76,22 @@ public class PmRepairAttachmentServiceImpl implements IPmRepairAttachmentService
|
||||
* 根据工单ID查询附件列表
|
||||
*/
|
||||
@Override
|
||||
public List<PmRepairAttachmentVo> queryByOrderId(Long orderId) {
|
||||
LambdaQueryWrapper<PmRepairAttachment> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(PmRepairAttachment::getOrderId, orderId);
|
||||
lqw.orderByAsc(PmRepairAttachment::getSortOrder)
|
||||
.orderByAsc(PmRepairAttachment::getCreateTime);
|
||||
public List<HqPmRepairAttachmentVo> queryByOrderId(Long orderId) {
|
||||
LambdaQueryWrapper<HqPmRepairAttachment> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(HqPmRepairAttachment::getOrderId, orderId);
|
||||
lqw.orderByAsc(HqPmRepairAttachment::getSortOrder)
|
||||
.orderByAsc(HqPmRepairAttachment::getCreateTime);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<PmRepairAttachment> buildQueryWrapper(PmRepairAttachmentBo bo) {
|
||||
LambdaQueryWrapper<PmRepairAttachment> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(bo.getOrderId() != null, PmRepairAttachment::getOrderId, bo.getOrderId());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getFileName()), PmRepairAttachment::getFileName, bo.getFileName());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getFileType()), PmRepairAttachment::getFileType, bo.getFileType());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getUploadStage()), PmRepairAttachment::getUploadStage, bo.getUploadStage());
|
||||
lqw.eq(bo.getUploaderId() != null, PmRepairAttachment::getUploaderId, bo.getUploaderId());
|
||||
lqw.orderByAsc(PmRepairAttachment::getSortOrder).orderByDesc(PmRepairAttachment::getCreateTime);
|
||||
private LambdaQueryWrapper<HqPmRepairAttachment> buildQueryWrapper(HqPmRepairAttachmentBo bo) {
|
||||
LambdaQueryWrapper<HqPmRepairAttachment> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(bo.getOrderId() != null, HqPmRepairAttachment::getOrderId, bo.getOrderId());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getFileName()), HqPmRepairAttachment::getFileName, bo.getFileName());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getFileType()), HqPmRepairAttachment::getFileType, bo.getFileType());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getUploadStage()), HqPmRepairAttachment::getUploadStage, bo.getUploadStage());
|
||||
lqw.eq(bo.getUploaderId() != null, HqPmRepairAttachment::getUploaderId, bo.getUploaderId());
|
||||
lqw.orderByAsc(HqPmRepairAttachment::getSortOrder).orderByDesc(HqPmRepairAttachment::getCreateTime);
|
||||
return lqw;
|
||||
}
|
||||
|
||||
@@ -99,8 +99,8 @@ public class PmRepairAttachmentServiceImpl implements IPmRepairAttachmentService
|
||||
* 新增报修附件
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(PmRepairAttachmentBo bo) {
|
||||
PmRepairAttachment add = MapstructUtils.convert(bo, PmRepairAttachment.class);
|
||||
public Boolean insertByBo(HqPmRepairAttachmentBo bo) {
|
||||
HqPmRepairAttachment add = MapstructUtils.convert(bo, HqPmRepairAttachment.class);
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
@@ -115,8 +115,8 @@ public class PmRepairAttachmentServiceImpl implements IPmRepairAttachmentService
|
||||
* 修改报修附件
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(PmRepairAttachmentBo bo) {
|
||||
PmRepairAttachment update = MapstructUtils.convert(bo, PmRepairAttachment.class);
|
||||
public Boolean updateByBo(HqPmRepairAttachmentBo bo) {
|
||||
HqPmRepairAttachment update = MapstructUtils.convert(bo, HqPmRepairAttachment.class);
|
||||
validEntityBeforeSave(update);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
@@ -124,7 +124,7 @@ public class PmRepairAttachmentServiceImpl implements IPmRepairAttachmentService
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(PmRepairAttachment entity) {
|
||||
private void validEntityBeforeSave(HqPmRepairAttachment entity) {
|
||||
// 设置默认值
|
||||
if (entity.getSortOrder() == null) {
|
||||
entity.setSortOrder(0);
|
||||
@@ -147,9 +147,9 @@ public class PmRepairAttachmentServiceImpl implements IPmRepairAttachmentService
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
// 先获取要删除的附件信息(在删除前)
|
||||
List<PmRepairAttachmentVo> attachments = new ArrayList<>();
|
||||
List<HqPmRepairAttachmentVo> attachments = new ArrayList<>();
|
||||
for (Long id : ids) {
|
||||
PmRepairAttachmentVo attachment = baseMapper.selectVoById(id);
|
||||
HqPmRepairAttachmentVo attachment = baseMapper.selectVoById(id);
|
||||
if (attachment != null) {
|
||||
attachments.add(attachment);
|
||||
}
|
||||
@@ -157,7 +157,7 @@ public class PmRepairAttachmentServiceImpl implements IPmRepairAttachmentService
|
||||
|
||||
if (isValid) {
|
||||
// 删除OSS文件
|
||||
for (PmRepairAttachmentVo attachment : attachments) {
|
||||
for (HqPmRepairAttachmentVo attachment : attachments) {
|
||||
try {
|
||||
if (StringUtils.isNotBlank(attachment.getFilePath())) {
|
||||
OssFactory.instance().delete(attachment.getFilePath());
|
||||
@@ -176,7 +176,7 @@ public class PmRepairAttachmentServiceImpl implements IPmRepairAttachmentService
|
||||
if (flag) {
|
||||
// 更新相关工单的附件数量
|
||||
attachments.stream()
|
||||
.map(PmRepairAttachmentVo::getOrderId)
|
||||
.map(HqPmRepairAttachmentVo::getOrderId)
|
||||
.distinct()
|
||||
.forEach(this::updateOrderAttachmentCount);
|
||||
}
|
||||
@@ -188,7 +188,7 @@ public class PmRepairAttachmentServiceImpl implements IPmRepairAttachmentService
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public PmRepairAttachmentVo uploadFile(Long orderId, String uploadStage, MultipartFile file, String description) {
|
||||
public HqPmRepairAttachmentVo uploadFile(Long orderId, String uploadStage, MultipartFile file, String description) {
|
||||
try {
|
||||
// 文件基本信息
|
||||
String originalFilename = file.getOriginalFilename();
|
||||
@@ -200,7 +200,7 @@ public class PmRepairAttachmentServiceImpl implements IPmRepairAttachmentService
|
||||
UploadResult uploadResult = OssFactory.instance().uploadSuffix(file.getBytes(), fileExtension, contentType);
|
||||
|
||||
// 构建附件信息
|
||||
PmRepairAttachmentBo bo = new PmRepairAttachmentBo();
|
||||
HqPmRepairAttachmentBo bo = new HqPmRepairAttachmentBo();
|
||||
bo.setOrderId(orderId);
|
||||
bo.setFileName(originalFilename);
|
||||
bo.setFilePath(uploadResult.getUrl());
|
||||
@@ -231,16 +231,16 @@ public class PmRepairAttachmentServiceImpl implements IPmRepairAttachmentService
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public List<PmRepairAttachmentVo> uploadFiles(Long orderId, String uploadStage, MultipartFile[] files,
|
||||
public List<HqPmRepairAttachmentVo> uploadFiles(Long orderId, String uploadStage, MultipartFile[] files,
|
||||
List<String> descriptions) {
|
||||
List<PmRepairAttachmentVo> results = new ArrayList<>();
|
||||
List<HqPmRepairAttachmentVo> results = new ArrayList<>();
|
||||
|
||||
for (int i = 0; i < files.length; i++) {
|
||||
MultipartFile file = files[i];
|
||||
String description = (descriptions != null && i < descriptions.size()) ? descriptions.get(i) : null;
|
||||
|
||||
try {
|
||||
PmRepairAttachmentVo result = uploadFile(orderId, uploadStage, file, description);
|
||||
HqPmRepairAttachmentVo result = uploadFile(orderId, uploadStage, file, description);
|
||||
results.add(result);
|
||||
} catch (Exception e) {
|
||||
log.error("批量上传第{}个文件失败: {}", i + 1, e.getMessage());
|
||||
@@ -257,7 +257,7 @@ public class PmRepairAttachmentServiceImpl implements IPmRepairAttachmentService
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean deleteAttachment(Long id) {
|
||||
PmRepairAttachmentVo attachment = queryById(id);
|
||||
HqPmRepairAttachmentVo attachment = queryById(id);
|
||||
if (attachment == null) {
|
||||
return false;
|
||||
}
|
||||
@@ -292,14 +292,14 @@ public class PmRepairAttachmentServiceImpl implements IPmRepairAttachmentService
|
||||
return;
|
||||
}
|
||||
|
||||
LambdaQueryWrapper<PmRepairAttachment> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(PmRepairAttachment::getOrderId, orderId);
|
||||
LambdaQueryWrapper<HqPmRepairAttachment> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(HqPmRepairAttachment::getOrderId, orderId);
|
||||
long count = baseMapper.selectCount(lqw);
|
||||
|
||||
// 更新工单的附件数量
|
||||
LambdaUpdateWrapper<org.dromara.hq.domain.PmRepairOrder> updateWrapper = Wrappers.lambdaUpdate();
|
||||
updateWrapper.eq(org.dromara.hq.domain.PmRepairOrder::getId, orderId)
|
||||
.set(org.dromara.hq.domain.PmRepairOrder::getAttachmentCount, (int) count);
|
||||
LambdaUpdateWrapper<org.dromara.hq.domain.HqPmRepairOrder> updateWrapper = Wrappers.lambdaUpdate();
|
||||
updateWrapper.eq(org.dromara.hq.domain.HqPmRepairOrder::getId, orderId)
|
||||
.set(org.dromara.hq.domain.HqPmRepairOrder::getAttachmentCount, (int) count);
|
||||
repairOrderMapper.update(null, updateWrapper);
|
||||
}
|
||||
|
||||
+53
-51
@@ -11,11 +11,11 @@ import cn.hutool.core.collection.CollUtil;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.dromara.hq.domain.bo.PmRepairCategoryBo;
|
||||
import org.dromara.hq.domain.vo.PmRepairCategoryVo;
|
||||
import org.dromara.hq.domain.PmRepairCategory;
|
||||
import org.dromara.hq.mapper.PmRepairCategoryMapper;
|
||||
import org.dromara.hq.service.IPmRepairCategoryService;
|
||||
import org.dromara.hq.domain.bo.HqPmRepairCategoryBo;
|
||||
import org.dromara.hq.domain.vo.HqPmRepairCategoryVo;
|
||||
import org.dromara.hq.domain.HqPmRepairCategory;
|
||||
import org.dromara.hq.mapper.HqPmRepairCategoryMapper;
|
||||
import org.dromara.hq.service.IHqPmRepairCategoryService;
|
||||
import org.dromara.common.core.exception.ServiceException;
|
||||
|
||||
import java.util.List;
|
||||
@@ -32,9 +32,9 @@ import java.util.stream.Collectors;
|
||||
@Slf4j
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class PmRepairCategoryServiceImpl implements IPmRepairCategoryService {
|
||||
public class HqPmRepairCategoryServiceImpl implements IHqPmRepairCategoryService {
|
||||
|
||||
private final PmRepairCategoryMapper baseMapper;
|
||||
private final HqPmRepairCategoryMapper baseMapper;
|
||||
|
||||
/**
|
||||
* 查询维修类型
|
||||
@@ -43,7 +43,7 @@ public class PmRepairCategoryServiceImpl implements IPmRepairCategoryService {
|
||||
* @return 维修类型
|
||||
*/
|
||||
@Override
|
||||
public PmRepairCategoryVo queryById(Long id) {
|
||||
public HqPmRepairCategoryVo queryById(Long id) {
|
||||
return baseMapper.selectVoById(id);
|
||||
}
|
||||
|
||||
@@ -55,9 +55,9 @@ public class PmRepairCategoryServiceImpl implements IPmRepairCategoryService {
|
||||
* @return 维修类型分页列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<PmRepairCategoryVo> queryPageList(PmRepairCategoryBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<PmRepairCategory> lqw = buildQueryWrapper(bo);
|
||||
Page<PmRepairCategoryVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
public TableDataInfo<HqPmRepairCategoryVo> queryPageList(HqPmRepairCategoryBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<HqPmRepairCategory> lqw = buildQueryWrapper(bo);
|
||||
Page<HqPmRepairCategoryVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
@@ -68,26 +68,28 @@ public class PmRepairCategoryServiceImpl implements IPmRepairCategoryService {
|
||||
* @return 维修类型列表
|
||||
*/
|
||||
@Override
|
||||
public List<PmRepairCategoryVo> queryList(PmRepairCategoryBo bo) {
|
||||
LambdaQueryWrapper<PmRepairCategory> lqw = buildQueryWrapper(bo);
|
||||
public List<HqPmRepairCategoryVo> queryList(HqPmRepairCategoryBo bo) {
|
||||
LambdaQueryWrapper<HqPmRepairCategory> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<PmRepairCategory> buildQueryWrapper(PmRepairCategoryBo bo) {
|
||||
LambdaQueryWrapper<PmRepairCategory> lqw = Wrappers.lambdaQuery();
|
||||
lqw.orderByAsc(PmRepairCategory::getSortOrder).orderByAsc(PmRepairCategory::getId);
|
||||
lqw.like(StringUtils.isNotBlank(bo.getCategoryName()), PmRepairCategory::getCategoryName, bo.getCategoryName());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getCategoryCode()), PmRepairCategory::getCategoryCode, bo.getCategoryCode());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getCategoryDescription()), PmRepairCategory::getCategoryDescription,
|
||||
private LambdaQueryWrapper<HqPmRepairCategory> buildQueryWrapper(HqPmRepairCategoryBo bo) {
|
||||
LambdaQueryWrapper<HqPmRepairCategory> lqw = Wrappers.lambdaQuery();
|
||||
lqw.orderByAsc(HqPmRepairCategory::getSortOrder).orderByAsc(HqPmRepairCategory::getId);
|
||||
lqw.like(StringUtils.isNotBlank(bo.getCategoryName()), HqPmRepairCategory::getCategoryName,
|
||||
bo.getCategoryName());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getCategoryCode()), HqPmRepairCategory::getCategoryCode,
|
||||
bo.getCategoryCode());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getCategoryDescription()), HqPmRepairCategory::getCategoryDescription,
|
||||
bo.getCategoryDescription());
|
||||
lqw.eq(bo.getParentId() != null, PmRepairCategory::getParentId, bo.getParentId());
|
||||
lqw.eq(bo.getLevelDepth() != null, PmRepairCategory::getLevelDepth, bo.getLevelDepth());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getSkillLevel()), PmRepairCategory::getSkillLevel, bo.getSkillLevel());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getStatus()), PmRepairCategory::getStatus, bo.getStatus());
|
||||
lqw.eq(bo.getParentId() != null, HqPmRepairCategory::getParentId, bo.getParentId());
|
||||
lqw.eq(bo.getLevelDepth() != null, HqPmRepairCategory::getLevelDepth, bo.getLevelDepth());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getSkillLevel()), HqPmRepairCategory::getSkillLevel, bo.getSkillLevel());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getStatus()), HqPmRepairCategory::getStatus, bo.getStatus());
|
||||
|
||||
// IN查询条件
|
||||
lqw.in(CollUtil.isNotEmpty(bo.getStatusIn()), PmRepairCategory::getStatus, bo.getStatusIn());
|
||||
lqw.in(CollUtil.isNotEmpty(bo.getParentIdIn()), PmRepairCategory::getParentId, bo.getParentIdIn());
|
||||
lqw.in(CollUtil.isNotEmpty(bo.getStatusIn()), HqPmRepairCategory::getStatus, bo.getStatusIn());
|
||||
lqw.in(CollUtil.isNotEmpty(bo.getParentIdIn()), HqPmRepairCategory::getParentId, bo.getParentIdIn());
|
||||
|
||||
return lqw;
|
||||
}
|
||||
@@ -99,8 +101,8 @@ public class PmRepairCategoryServiceImpl implements IPmRepairCategoryService {
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(PmRepairCategoryBo bo) {
|
||||
PmRepairCategory add = MapstructUtils.convert(bo, PmRepairCategory.class);
|
||||
public Boolean insertByBo(HqPmRepairCategoryBo bo) {
|
||||
HqPmRepairCategory add = MapstructUtils.convert(bo, HqPmRepairCategory.class);
|
||||
validEntityBeforeSave(add);
|
||||
|
||||
// 设置层级信息
|
||||
@@ -140,12 +142,12 @@ public class PmRepairCategoryServiceImpl implements IPmRepairCategoryService {
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(PmRepairCategoryBo bo) {
|
||||
PmRepairCategory update = MapstructUtils.convert(bo, PmRepairCategory.class);
|
||||
public Boolean updateByBo(HqPmRepairCategoryBo bo) {
|
||||
HqPmRepairCategory update = MapstructUtils.convert(bo, HqPmRepairCategory.class);
|
||||
validEntityBeforeSave(update);
|
||||
|
||||
// 如果修改了父级,需要重新计算层级信息
|
||||
PmRepairCategory oldEntity = baseMapper.selectById(update.getId());
|
||||
HqPmRepairCategory oldEntity = baseMapper.selectById(update.getId());
|
||||
if (oldEntity != null && !oldEntity.getParentId().equals(update.getParentId())) {
|
||||
buildHierarchyInfo(update);
|
||||
// 更新新旧父级的子类数量
|
||||
@@ -159,13 +161,13 @@ public class PmRepairCategoryServiceImpl implements IPmRepairCategoryService {
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(PmRepairCategory entity) {
|
||||
private void validEntityBeforeSave(HqPmRepairCategory entity) {
|
||||
// 校验类型编码唯一性
|
||||
if (StringUtils.isNotBlank(entity.getCategoryCode())) {
|
||||
LambdaQueryWrapper<PmRepairCategory> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(PmRepairCategory::getCategoryCode, entity.getCategoryCode());
|
||||
LambdaQueryWrapper<HqPmRepairCategory> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(HqPmRepairCategory::getCategoryCode, entity.getCategoryCode());
|
||||
if (entity.getId() != null) {
|
||||
lqw.ne(PmRepairCategory::getId, entity.getId());
|
||||
lqw.ne(HqPmRepairCategory::getId, entity.getId());
|
||||
}
|
||||
boolean exists = baseMapper.exists(lqw);
|
||||
if (exists) {
|
||||
@@ -182,13 +184,13 @@ public class PmRepairCategoryServiceImpl implements IPmRepairCategoryService {
|
||||
/**
|
||||
* 构建层级信息
|
||||
*/
|
||||
private void buildHierarchyInfo(PmRepairCategory entity) {
|
||||
private void buildHierarchyInfo(HqPmRepairCategory entity) {
|
||||
if (entity.getParentId() == null || entity.getParentId() == 0L) {
|
||||
entity.setParentId(0L);
|
||||
entity.setLevelDepth(1);
|
||||
entity.setAncestorIds("0");
|
||||
} else {
|
||||
PmRepairCategory parent = baseMapper.selectById(entity.getParentId());
|
||||
HqPmRepairCategory parent = baseMapper.selectById(entity.getParentId());
|
||||
if (parent != null) {
|
||||
entity.setLevelDepth(parent.getLevelDepth() + 1);
|
||||
entity.setAncestorIds(parent.getAncestorIds() + "," + parent.getId());
|
||||
@@ -204,11 +206,11 @@ public class PmRepairCategoryServiceImpl implements IPmRepairCategoryService {
|
||||
return;
|
||||
}
|
||||
|
||||
LambdaQueryWrapper<PmRepairCategory> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(PmRepairCategory::getParentId, parentId);
|
||||
LambdaQueryWrapper<HqPmRepairCategory> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(HqPmRepairCategory::getParentId, parentId);
|
||||
long count = baseMapper.selectCount(lqw);
|
||||
|
||||
PmRepairCategory parent = new PmRepairCategory();
|
||||
HqPmRepairCategory parent = new HqPmRepairCategory();
|
||||
parent.setId(parentId);
|
||||
parent.setChildrenCount((int) count);
|
||||
baseMapper.updateById(parent);
|
||||
@@ -226,7 +228,7 @@ public class PmRepairCategoryServiceImpl implements IPmRepairCategoryService {
|
||||
if (isValid) {
|
||||
// 校验是否有子类
|
||||
for (Long id : ids) {
|
||||
PmRepairCategory category = baseMapper.selectById(id);
|
||||
HqPmRepairCategory category = baseMapper.selectById(id);
|
||||
if (category != null && category.getChildrenCount() > 0) {
|
||||
throw new ServiceException("存在子类型,不允许删除:" + category.getCategoryName());
|
||||
}
|
||||
@@ -234,10 +236,10 @@ public class PmRepairCategoryServiceImpl implements IPmRepairCategoryService {
|
||||
}
|
||||
|
||||
// 删除后更新父级的子类数量
|
||||
List<PmRepairCategory> categories = baseMapper.selectBatchIds(ids);
|
||||
List<HqPmRepairCategory> categories = baseMapper.selectBatchIds(ids);
|
||||
boolean flag = baseMapper.deleteByIds(ids) > 0;
|
||||
if (flag) {
|
||||
for (PmRepairCategory category : categories) {
|
||||
for (HqPmRepairCategory category : categories) {
|
||||
updateParentChildrenCount(category.getParentId());
|
||||
}
|
||||
}
|
||||
@@ -250,11 +252,11 @@ public class PmRepairCategoryServiceImpl implements IPmRepairCategoryService {
|
||||
* @return 维修类型树形列表
|
||||
*/
|
||||
@Override
|
||||
public List<PmRepairCategoryVo> queryTree() {
|
||||
LambdaQueryWrapper<PmRepairCategory> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(PmRepairCategory::getStatus, "1");
|
||||
lqw.orderByAsc(PmRepairCategory::getSortOrder).orderByAsc(PmRepairCategory::getId);
|
||||
List<PmRepairCategoryVo> allList = baseMapper.selectVoList(lqw);
|
||||
public List<HqPmRepairCategoryVo> queryTree() {
|
||||
LambdaQueryWrapper<HqPmRepairCategory> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(HqPmRepairCategory::getStatus, "1");
|
||||
lqw.orderByAsc(HqPmRepairCategory::getSortOrder).orderByAsc(HqPmRepairCategory::getId);
|
||||
List<HqPmRepairCategoryVo> allList = baseMapper.selectVoList(lqw);
|
||||
|
||||
return buildTree(allList, 0L);
|
||||
}
|
||||
@@ -262,11 +264,11 @@ public class PmRepairCategoryServiceImpl implements IPmRepairCategoryService {
|
||||
/**
|
||||
* 构建树形结构
|
||||
*/
|
||||
private List<PmRepairCategoryVo> buildTree(List<PmRepairCategoryVo> allList, Long parentId) {
|
||||
private List<HqPmRepairCategoryVo> buildTree(List<HqPmRepairCategoryVo> allList, Long parentId) {
|
||||
return allList.stream()
|
||||
.filter(item -> parentId.equals(item.getParentId()))
|
||||
.map(item -> {
|
||||
List<PmRepairCategoryVo> children = buildTree(allList, item.getId());
|
||||
List<HqPmRepairCategoryVo> children = buildTree(allList, item.getId());
|
||||
item.setChildren(children);
|
||||
return item;
|
||||
})
|
||||
@@ -281,12 +283,12 @@ public class PmRepairCategoryServiceImpl implements IPmRepairCategoryService {
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateUsageCount(Long categoryId) {
|
||||
PmRepairCategory category = baseMapper.selectById(categoryId);
|
||||
HqPmRepairCategory category = baseMapper.selectById(categoryId);
|
||||
if (category == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
PmRepairCategory update = new PmRepairCategory();
|
||||
HqPmRepairCategory update = new HqPmRepairCategory();
|
||||
update.setId(categoryId);
|
||||
update.setUsageCount(category.getUsageCount() + 1);
|
||||
update.setLastUsedTime(new Date());
|
||||
+108
-107
@@ -12,16 +12,16 @@ import cn.hutool.core.date.DateUtil;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.dromara.hq.domain.bo.PmRepairOrderBo;
|
||||
import org.dromara.hq.domain.vo.PmRepairOrderVo;
|
||||
import org.dromara.hq.domain.PmRepairOrder;
|
||||
import org.dromara.hq.domain.PmRepairProgress;
|
||||
import org.dromara.hq.domain.PmServiceEvaluation;
|
||||
import org.dromara.hq.mapper.PmRepairOrderMapper;
|
||||
import org.dromara.hq.mapper.PmRepairProgressMapper;
|
||||
import org.dromara.hq.mapper.PmServiceEvaluationMapper;
|
||||
import org.dromara.hq.service.IPmRepairOrderService;
|
||||
import org.dromara.hq.service.IPmRepairCategoryService;
|
||||
import org.dromara.hq.domain.bo.HqPmRepairOrderBo;
|
||||
import org.dromara.hq.domain.vo.HqPmRepairOrderVo;
|
||||
import org.dromara.hq.domain.HqPmRepairOrder;
|
||||
import org.dromara.hq.domain.HqPmRepairProgress;
|
||||
import org.dromara.hq.domain.HqPmServiceEvaluation;
|
||||
import org.dromara.hq.mapper.HqPmRepairOrderMapper;
|
||||
import org.dromara.hq.mapper.HqPmRepairProgressMapper;
|
||||
import org.dromara.hq.mapper.HqPmServiceEvaluationMapper;
|
||||
import org.dromara.hq.service.IHqPmRepairOrderService;
|
||||
import org.dromara.hq.service.IHqPmRepairCategoryService;
|
||||
import org.dromara.common.satoken.utils.LoginHelper;
|
||||
import org.dromara.common.core.exception.ServiceException;
|
||||
import org.dromara.common.core.service.UserService;
|
||||
@@ -39,13 +39,13 @@ import java.util.Date;
|
||||
@Slf4j
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class PmRepairOrderServiceImpl implements IPmRepairOrderService {
|
||||
public class HqPmRepairOrderServiceImpl implements IHqPmRepairOrderService {
|
||||
|
||||
private final PmRepairOrderMapper baseMapper;
|
||||
private final PmRepairProgressMapper repairProgressMapper;
|
||||
private final IPmRepairCategoryService repairCategoryService;
|
||||
private final HqPmRepairOrderMapper baseMapper;
|
||||
private final HqPmRepairProgressMapper repairProgressMapper;
|
||||
private final IHqPmRepairCategoryService repairCategoryService;
|
||||
private final UserService userService;
|
||||
private final PmServiceEvaluationMapper serviceEvaluationMapper;
|
||||
private final HqPmServiceEvaluationMapper serviceEvaluationMapper;
|
||||
|
||||
/**
|
||||
* 查询报修工单
|
||||
@@ -54,8 +54,8 @@ public class PmRepairOrderServiceImpl implements IPmRepairOrderService {
|
||||
* @return 报修工单
|
||||
*/
|
||||
@Override
|
||||
public PmRepairOrderVo queryById(Long id) {
|
||||
PmRepairOrderVo orderVo = baseMapper.selectVoById(id);
|
||||
public HqPmRepairOrderVo queryById(Long id) {
|
||||
HqPmRepairOrderVo orderVo = baseMapper.selectVoById(id);
|
||||
if (orderVo == null) {
|
||||
return null;
|
||||
}
|
||||
@@ -74,7 +74,7 @@ public class PmRepairOrderServiceImpl implements IPmRepairOrderService {
|
||||
* @param orderVo 工单数据
|
||||
* @return 是否有权限
|
||||
*/
|
||||
private boolean hasDataPermission(PmRepairOrderVo orderVo) {
|
||||
private boolean hasDataPermission(HqPmRepairOrderVo orderVo) {
|
||||
try {
|
||||
// 获取当前登录用户信息
|
||||
var loginUser = LoginHelper.getLoginUser();
|
||||
@@ -119,9 +119,9 @@ public class PmRepairOrderServiceImpl implements IPmRepairOrderService {
|
||||
* @return 报修工单分页列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<PmRepairOrderVo> queryPageList(PmRepairOrderBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<PmRepairOrder> lqw = buildQueryWrapper(bo);
|
||||
Page<PmRepairOrderVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
public TableDataInfo<HqPmRepairOrderVo> queryPageList(HqPmRepairOrderBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<HqPmRepairOrder> lqw = buildQueryWrapper(bo);
|
||||
Page<HqPmRepairOrderVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
@@ -132,33 +132,34 @@ public class PmRepairOrderServiceImpl implements IPmRepairOrderService {
|
||||
* @return 报修工单列表
|
||||
*/
|
||||
@Override
|
||||
public List<PmRepairOrderVo> queryList(PmRepairOrderBo bo) {
|
||||
LambdaQueryWrapper<PmRepairOrder> lqw = buildQueryWrapper(bo);
|
||||
public List<HqPmRepairOrderVo> queryList(HqPmRepairOrderBo bo) {
|
||||
LambdaQueryWrapper<HqPmRepairOrder> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<PmRepairOrder> buildQueryWrapper(PmRepairOrderBo bo) {
|
||||
LambdaQueryWrapper<PmRepairOrder> lqw = Wrappers.lambdaQuery();
|
||||
lqw.orderByDesc(PmRepairOrder::getCreateTime);
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getOrderNo()), PmRepairOrder::getOrderNo, bo.getOrderNo());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getTitle()), PmRepairOrder::getTitle, bo.getTitle());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getDescription()), PmRepairOrder::getDescription, bo.getDescription());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getRepairLocation()), PmRepairOrder::getRepairLocation,
|
||||
private LambdaQueryWrapper<HqPmRepairOrder> buildQueryWrapper(HqPmRepairOrderBo bo) {
|
||||
LambdaQueryWrapper<HqPmRepairOrder> lqw = Wrappers.lambdaQuery();
|
||||
lqw.orderByDesc(HqPmRepairOrder::getCreateTime);
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getOrderNo()), HqPmRepairOrder::getOrderNo, bo.getOrderNo());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getTitle()), HqPmRepairOrder::getTitle, bo.getTitle());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getDescription()), HqPmRepairOrder::getDescription, bo.getDescription());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getRepairLocation()), HqPmRepairOrder::getRepairLocation,
|
||||
bo.getRepairLocation());
|
||||
lqw.eq(bo.getCategoryId() != null, PmRepairOrder::getCategoryId, bo.getCategoryId());
|
||||
lqw.eq(bo.getPriorityLevel() != null, PmRepairOrder::getPriorityLevel, bo.getPriorityLevel());
|
||||
lqw.eq(bo.getReporterId() != null, PmRepairOrder::getReporterId, bo.getReporterId());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getReporterName()), PmRepairOrder::getReporterName, bo.getReporterName());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getReporterPhone()), PmRepairOrder::getReporterPhone, bo.getReporterPhone());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getOrderStatus()), PmRepairOrder::getOrderStatus, bo.getOrderStatus());
|
||||
lqw.eq(bo.getAssigneeId() != null, PmRepairOrder::getAssigneeId, bo.getAssigneeId());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getAssigneeName()), PmRepairOrder::getAssigneeName, bo.getAssigneeName());
|
||||
lqw.eq(bo.getCategoryId() != null, HqPmRepairOrder::getCategoryId, bo.getCategoryId());
|
||||
lqw.eq(bo.getPriorityLevel() != null, HqPmRepairOrder::getPriorityLevel, bo.getPriorityLevel());
|
||||
lqw.eq(bo.getReporterId() != null, HqPmRepairOrder::getReporterId, bo.getReporterId());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getReporterName()), HqPmRepairOrder::getReporterName, bo.getReporterName());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getReporterPhone()), HqPmRepairOrder::getReporterPhone,
|
||||
bo.getReporterPhone());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getOrderStatus()), HqPmRepairOrder::getOrderStatus, bo.getOrderStatus());
|
||||
lqw.eq(bo.getAssigneeId() != null, HqPmRepairOrder::getAssigneeId, bo.getAssigneeId());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getAssigneeName()), HqPmRepairOrder::getAssigneeName, bo.getAssigneeName());
|
||||
|
||||
// IN查询条件
|
||||
lqw.in(CollUtil.isNotEmpty(bo.getOrderStatusIn()), PmRepairOrder::getOrderStatus, bo.getOrderStatusIn());
|
||||
lqw.in(CollUtil.isNotEmpty(bo.getCategoryIdIn()), PmRepairOrder::getCategoryId, bo.getCategoryIdIn());
|
||||
lqw.in(CollUtil.isNotEmpty(bo.getReporterIdIn()), PmRepairOrder::getReporterId, bo.getReporterIdIn());
|
||||
lqw.in(CollUtil.isNotEmpty(bo.getAssigneeIdIn()), PmRepairOrder::getAssigneeId, bo.getAssigneeIdIn());
|
||||
lqw.in(CollUtil.isNotEmpty(bo.getOrderStatusIn()), HqPmRepairOrder::getOrderStatus, bo.getOrderStatusIn());
|
||||
lqw.in(CollUtil.isNotEmpty(bo.getCategoryIdIn()), HqPmRepairOrder::getCategoryId, bo.getCategoryIdIn());
|
||||
lqw.in(CollUtil.isNotEmpty(bo.getReporterIdIn()), HqPmRepairOrder::getReporterId, bo.getReporterIdIn());
|
||||
lqw.in(CollUtil.isNotEmpty(bo.getAssigneeIdIn()), HqPmRepairOrder::getAssigneeId, bo.getAssigneeIdIn());
|
||||
|
||||
// 添加数据权限控制
|
||||
addDataPermissionFilter(lqw);
|
||||
@@ -171,14 +172,14 @@ public class PmRepairOrderServiceImpl implements IPmRepairOrderService {
|
||||
*
|
||||
* @param lqw 查询条件构造器
|
||||
*/
|
||||
private void addDataPermissionFilter(LambdaQueryWrapper<PmRepairOrder> lqw) {
|
||||
private void addDataPermissionFilter(LambdaQueryWrapper<HqPmRepairOrder> lqw) {
|
||||
try {
|
||||
// 获取当前登录用户信息
|
||||
var loginUser = LoginHelper.getLoginUser();
|
||||
if (loginUser == null) {
|
||||
// 未登录用户不能查看任何数据
|
||||
log.warn("未登录用户尝试访问报修订单数据");
|
||||
lqw.eq(PmRepairOrder::getId, 0L);
|
||||
lqw.eq(HqPmRepairOrder::getId, 0L);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -210,16 +211,16 @@ public class PmRepairOrderServiceImpl implements IPmRepairOrderService {
|
||||
if (rolePermissions != null && rolePermissions.contains("maintenance_worker")) {
|
||||
log.debug("当前用户[{}]为维修人员,只能查看自己创建或分配给自己的报修单", currentUserId);
|
||||
lqw.and(wrapper -> wrapper
|
||||
.eq(PmRepairOrder::getReporterId, currentUserId) // 自己创建的报修单
|
||||
.eq(HqPmRepairOrder::getReporterId, currentUserId) // 自己创建的报修单
|
||||
.or()
|
||||
.eq(PmRepairOrder::getAssigneeId, currentUserId) // 分配给自己的报修单
|
||||
.eq(HqPmRepairOrder::getAssigneeId, currentUserId) // 分配给自己的报修单
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
// 其他用户:只能看见自己创建的报修单
|
||||
log.debug("当前用户[{}]为普通用户,只能查看自己创建的报修单", currentUserId);
|
||||
lqw.eq(PmRepairOrder::getReporterId, currentUserId);
|
||||
lqw.eq(HqPmRepairOrder::getReporterId, currentUserId);
|
||||
|
||||
} catch (Exception e) {
|
||||
log.error("数据权限过滤异常: {}", e.getMessage(), e);
|
||||
@@ -228,14 +229,14 @@ public class PmRepairOrderServiceImpl implements IPmRepairOrderService {
|
||||
Long currentUserId = LoginHelper.getUserId();
|
||||
if (currentUserId != null) {
|
||||
log.warn("权限过滤异常,回退到只查看自己创建的报修单,用户ID: {}", currentUserId);
|
||||
lqw.eq(PmRepairOrder::getReporterId, currentUserId);
|
||||
lqw.eq(HqPmRepairOrder::getReporterId, currentUserId);
|
||||
} else {
|
||||
log.error("无法获取当前用户ID,拒绝所有数据访问");
|
||||
lqw.eq(PmRepairOrder::getId, 0L);
|
||||
lqw.eq(HqPmRepairOrder::getId, 0L);
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
log.error("权限过滤回退逻辑也失败了: {}", ex.getMessage(), ex);
|
||||
lqw.eq(PmRepairOrder::getId, 0L);
|
||||
lqw.eq(HqPmRepairOrder::getId, 0L);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -247,8 +248,8 @@ public class PmRepairOrderServiceImpl implements IPmRepairOrderService {
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(PmRepairOrderBo bo) {
|
||||
PmRepairOrder add = MapstructUtils.convert(bo, PmRepairOrder.class);
|
||||
public Boolean insertByBo(HqPmRepairOrderBo bo) {
|
||||
HqPmRepairOrder add = MapstructUtils.convert(bo, HqPmRepairOrder.class);
|
||||
validEntityBeforeSave(add);
|
||||
|
||||
// 生成工单编号
|
||||
@@ -289,7 +290,7 @@ public class PmRepairOrderServiceImpl implements IPmRepairOrderService {
|
||||
*
|
||||
* @param order 报修工单
|
||||
*/
|
||||
private void fillReporterInfo(PmRepairOrder order) {
|
||||
private void fillReporterInfo(HqPmRepairOrder order) {
|
||||
try {
|
||||
// 获取当前登录用户信息
|
||||
Long userId = LoginHelper.getUserId();
|
||||
@@ -335,8 +336,8 @@ public class PmRepairOrderServiceImpl implements IPmRepairOrderService {
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(PmRepairOrderBo bo) {
|
||||
PmRepairOrder update = MapstructUtils.convert(bo, PmRepairOrder.class);
|
||||
public Boolean updateByBo(HqPmRepairOrderBo bo) {
|
||||
HqPmRepairOrder update = MapstructUtils.convert(bo, HqPmRepairOrder.class);
|
||||
validEntityBeforeSave(update);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
@@ -344,13 +345,13 @@ public class PmRepairOrderServiceImpl implements IPmRepairOrderService {
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(PmRepairOrder entity) {
|
||||
private void validEntityBeforeSave(HqPmRepairOrder entity) {
|
||||
// 校验工单编号唯一性
|
||||
if (StringUtils.isNotBlank(entity.getOrderNo())) {
|
||||
LambdaQueryWrapper<PmRepairOrder> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(PmRepairOrder::getOrderNo, entity.getOrderNo());
|
||||
LambdaQueryWrapper<HqPmRepairOrder> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(HqPmRepairOrder::getOrderNo, entity.getOrderNo());
|
||||
if (entity.getId() != null) {
|
||||
lqw.ne(PmRepairOrder::getId, entity.getId());
|
||||
lqw.ne(HqPmRepairOrder::getId, entity.getId());
|
||||
}
|
||||
boolean exists = baseMapper.exists(lqw);
|
||||
if (exists) {
|
||||
@@ -371,7 +372,7 @@ public class PmRepairOrderServiceImpl implements IPmRepairOrderService {
|
||||
if (isValid) {
|
||||
// 校验是否可以删除
|
||||
for (Long id : ids) {
|
||||
PmRepairOrder order = baseMapper.selectById(id);
|
||||
HqPmRepairOrder order = baseMapper.selectById(id);
|
||||
if (order != null && !"1".equals(order.getOrderStatus()) && !"9".equals(order.getOrderStatus())) {
|
||||
throw new ServiceException("只能删除待分派或已取消状态的工单");
|
||||
}
|
||||
@@ -390,13 +391,13 @@ public class PmRepairOrderServiceImpl implements IPmRepairOrderService {
|
||||
*/
|
||||
@Override
|
||||
public Boolean assignOrder(Long orderId, Long assigneeId, String assignRemark) {
|
||||
PmRepairOrder order = baseMapper.selectById(orderId);
|
||||
HqPmRepairOrder order = baseMapper.selectById(orderId);
|
||||
if (order == null) {
|
||||
throw new ServiceException("工单不存在");
|
||||
}
|
||||
|
||||
// 数据权限验证
|
||||
PmRepairOrderVo orderVo = MapstructUtils.convert(order, PmRepairOrderVo.class);
|
||||
HqPmRepairOrderVo orderVo = MapstructUtils.convert(order, HqPmRepairOrderVo.class);
|
||||
if (!hasDataPermission(orderVo)) {
|
||||
throw new ServiceException("无权限操作该工单");
|
||||
}
|
||||
@@ -427,7 +428,7 @@ public class PmRepairOrderServiceImpl implements IPmRepairOrderService {
|
||||
}
|
||||
|
||||
// 更新工单信息
|
||||
PmRepairOrder update = new PmRepairOrder();
|
||||
HqPmRepairOrder update = new HqPmRepairOrder();
|
||||
update.setId(orderId);
|
||||
update.setAssigneeId(assigneeId);
|
||||
update.setAssigneeName(assigneeName); // 设置维修员姓名
|
||||
@@ -453,13 +454,13 @@ public class PmRepairOrderServiceImpl implements IPmRepairOrderService {
|
||||
*/
|
||||
@Override
|
||||
public Boolean startRepair(Long orderId) {
|
||||
PmRepairOrder order = baseMapper.selectById(orderId);
|
||||
HqPmRepairOrder order = baseMapper.selectById(orderId);
|
||||
if (order == null) {
|
||||
throw new ServiceException("工单不存在");
|
||||
}
|
||||
|
||||
// 数据权限验证
|
||||
PmRepairOrderVo orderVo = MapstructUtils.convert(order, PmRepairOrderVo.class);
|
||||
HqPmRepairOrderVo orderVo = MapstructUtils.convert(order, HqPmRepairOrderVo.class);
|
||||
if (!hasDataPermission(orderVo)) {
|
||||
throw new ServiceException("无权限操作该工单");
|
||||
}
|
||||
@@ -468,7 +469,7 @@ public class PmRepairOrderServiceImpl implements IPmRepairOrderService {
|
||||
throw new ServiceException("只能开始已分派状态的工单");
|
||||
}
|
||||
|
||||
PmRepairOrder update = new PmRepairOrder();
|
||||
HqPmRepairOrder update = new HqPmRepairOrder();
|
||||
update.setId(orderId);
|
||||
update.setStartTime(new Date());
|
||||
update.setOrderStatus("3"); // 进行中
|
||||
@@ -486,13 +487,13 @@ public class PmRepairOrderServiceImpl implements IPmRepairOrderService {
|
||||
*/
|
||||
@Override
|
||||
public Boolean finishRepair(Long orderId, String repairResult, String usedMaterials) {
|
||||
PmRepairOrder order = baseMapper.selectById(orderId);
|
||||
HqPmRepairOrder order = baseMapper.selectById(orderId);
|
||||
if (order == null) {
|
||||
throw new ServiceException("工单不存在");
|
||||
}
|
||||
|
||||
// 数据权限验证
|
||||
PmRepairOrderVo orderVo = MapstructUtils.convert(order, PmRepairOrderVo.class);
|
||||
HqPmRepairOrderVo orderVo = MapstructUtils.convert(order, HqPmRepairOrderVo.class);
|
||||
if (!hasDataPermission(orderVo)) {
|
||||
throw new ServiceException("无权限操作该工单");
|
||||
}
|
||||
@@ -510,7 +511,7 @@ public class PmRepairOrderServiceImpl implements IPmRepairOrderService {
|
||||
totalDuration = (int) (diff / 60000); // 转换为分钟
|
||||
}
|
||||
|
||||
PmRepairOrder update = new PmRepairOrder();
|
||||
HqPmRepairOrder update = new HqPmRepairOrder();
|
||||
update.setId(orderId);
|
||||
update.setFinishTime(finishTime);
|
||||
update.setTotalDuration(totalDuration);
|
||||
@@ -530,13 +531,13 @@ public class PmRepairOrderServiceImpl implements IPmRepairOrderService {
|
||||
*/
|
||||
@Override
|
||||
public Boolean cancelOrder(Long orderId, String cancelReason) {
|
||||
PmRepairOrder order = baseMapper.selectById(orderId);
|
||||
HqPmRepairOrder order = baseMapper.selectById(orderId);
|
||||
if (order == null) {
|
||||
throw new ServiceException("工单不存在");
|
||||
}
|
||||
|
||||
// 数据权限验证
|
||||
PmRepairOrderVo orderVo = MapstructUtils.convert(order, PmRepairOrderVo.class);
|
||||
HqPmRepairOrderVo orderVo = MapstructUtils.convert(order, HqPmRepairOrderVo.class);
|
||||
if (!hasDataPermission(orderVo)) {
|
||||
throw new ServiceException("无权限操作该工单");
|
||||
}
|
||||
@@ -546,7 +547,7 @@ public class PmRepairOrderServiceImpl implements IPmRepairOrderService {
|
||||
throw new ServiceException("已完成、已评价或已归档的工单不能取消");
|
||||
}
|
||||
|
||||
PmRepairOrder update = new PmRepairOrder();
|
||||
HqPmRepairOrder update = new HqPmRepairOrder();
|
||||
update.setId(orderId);
|
||||
update.setCancelReason(cancelReason);
|
||||
update.setOrderStatus("9"); // 已取消
|
||||
@@ -565,12 +566,12 @@ public class PmRepairOrderServiceImpl implements IPmRepairOrderService {
|
||||
String prefix = "RO" + dateStr;
|
||||
|
||||
// 查询当天最大序号
|
||||
LambdaQueryWrapper<PmRepairOrder> lqw = Wrappers.lambdaQuery();
|
||||
lqw.likeRight(PmRepairOrder::getOrderNo, prefix);
|
||||
lqw.orderByDesc(PmRepairOrder::getOrderNo);
|
||||
LambdaQueryWrapper<HqPmRepairOrder> lqw = Wrappers.lambdaQuery();
|
||||
lqw.likeRight(HqPmRepairOrder::getOrderNo, prefix);
|
||||
lqw.orderByDesc(HqPmRepairOrder::getOrderNo);
|
||||
lqw.last("LIMIT 1");
|
||||
|
||||
PmRepairOrder lastOrder = baseMapper.selectOne(lqw);
|
||||
HqPmRepairOrder lastOrder = baseMapper.selectOne(lqw);
|
||||
int sequence = 1;
|
||||
|
||||
if (lastOrder != null && StringUtils.isNotBlank(lastOrder.getOrderNo())) {
|
||||
@@ -611,13 +612,13 @@ public class PmRepairOrderServiceImpl implements IPmRepairOrderService {
|
||||
@Override
|
||||
public Boolean updateProgress(Long orderId, java.util.Map<String, Object> progressData) {
|
||||
// 1. 验证工单是否存在
|
||||
PmRepairOrder order = baseMapper.selectById(orderId);
|
||||
HqPmRepairOrder order = baseMapper.selectById(orderId);
|
||||
if (order == null) {
|
||||
throw new ServiceException("工单不存在");
|
||||
}
|
||||
|
||||
// 2. 数据权限验证
|
||||
PmRepairOrderVo orderVo = MapstructUtils.convert(order, PmRepairOrderVo.class);
|
||||
HqPmRepairOrderVo orderVo = MapstructUtils.convert(order, HqPmRepairOrderVo.class);
|
||||
if (!hasDataPermission(orderVo)) {
|
||||
throw new ServiceException("无权限操作该工单");
|
||||
}
|
||||
@@ -635,7 +636,7 @@ public class PmRepairOrderServiceImpl implements IPmRepairOrderService {
|
||||
String currentUserName = loginUser.getUsername();
|
||||
|
||||
// 5. 创建进度记录
|
||||
PmRepairProgress progress = new PmRepairProgress();
|
||||
HqPmRepairProgress progress = new HqPmRepairProgress();
|
||||
progress.setOrderId(orderId);
|
||||
progress.setProgressType(String.valueOf(progressData.get("progressType")));
|
||||
progress.setProgressStatus(String.valueOf(progressData.get("progressStatus")));
|
||||
@@ -675,7 +676,7 @@ public class PmRepairOrderServiceImpl implements IPmRepairOrderService {
|
||||
boolean statusUpdated = false;
|
||||
if ("2".equals(order.getOrderStatus())) {
|
||||
// 如果是首次更新进度(从已分派状态),自动将状态改为进行中
|
||||
PmRepairOrder statusUpdate = new PmRepairOrder();
|
||||
HqPmRepairOrder statusUpdate = new HqPmRepairOrder();
|
||||
statusUpdate.setId(orderId);
|
||||
statusUpdate.setStartTime(new Date());
|
||||
statusUpdate.setOrderStatus("3"); // 进行中
|
||||
@@ -707,27 +708,27 @@ public class PmRepairOrderServiceImpl implements IPmRepairOrderService {
|
||||
@Override
|
||||
public List<java.util.Map<String, Object>> getRepairProgress(Long orderId) {
|
||||
// 1. 验证工单是否存在
|
||||
PmRepairOrder order = baseMapper.selectById(orderId);
|
||||
HqPmRepairOrder order = baseMapper.selectById(orderId);
|
||||
if (order == null) {
|
||||
throw new ServiceException("工单不存在");
|
||||
}
|
||||
|
||||
// 2. 数据权限验证
|
||||
PmRepairOrderVo orderVo = MapstructUtils.convert(order, PmRepairOrderVo.class);
|
||||
HqPmRepairOrderVo orderVo = MapstructUtils.convert(order, HqPmRepairOrderVo.class);
|
||||
if (!hasDataPermission(orderVo)) {
|
||||
throw new ServiceException("无权限查看该工单进度");
|
||||
}
|
||||
|
||||
// 3. 查询进度记录
|
||||
LambdaQueryWrapper<PmRepairProgress> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(PmRepairProgress::getOrderId, orderId);
|
||||
lqw.orderByAsc(PmRepairProgress::getOperationTime); // 按时间正序排列
|
||||
LambdaQueryWrapper<HqPmRepairProgress> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(HqPmRepairProgress::getOrderId, orderId);
|
||||
lqw.orderByAsc(HqPmRepairProgress::getOperationTime); // 按时间正序排列
|
||||
|
||||
List<PmRepairProgress> progressList = repairProgressMapper.selectList(lqw);
|
||||
List<HqPmRepairProgress> progressList = repairProgressMapper.selectList(lqw);
|
||||
|
||||
// 4. 转换为Map格式返回
|
||||
List<java.util.Map<String, Object>> result = new java.util.ArrayList<>();
|
||||
for (PmRepairProgress progress : progressList) {
|
||||
for (HqPmRepairProgress progress : progressList) {
|
||||
java.util.Map<String, Object> map = new java.util.HashMap<>();
|
||||
map.put("id", progress.getId());
|
||||
map.put("orderId", progress.getOrderId());
|
||||
@@ -758,12 +759,12 @@ public class PmRepairOrderServiceImpl implements IPmRepairOrderService {
|
||||
private void updateProgressCount(Long orderId) {
|
||||
try {
|
||||
// 查询该工单的进度记录总数
|
||||
LambdaQueryWrapper<PmRepairProgress> countLqw = Wrappers.lambdaQuery();
|
||||
countLqw.eq(PmRepairProgress::getOrderId, orderId);
|
||||
LambdaQueryWrapper<HqPmRepairProgress> countLqw = Wrappers.lambdaQuery();
|
||||
countLqw.eq(HqPmRepairProgress::getOrderId, orderId);
|
||||
long progressCount = repairProgressMapper.selectCount(countLqw);
|
||||
|
||||
// 更新工单的进度计数
|
||||
PmRepairOrder update = new PmRepairOrder();
|
||||
HqPmRepairOrder update = new HqPmRepairOrder();
|
||||
update.setId(orderId);
|
||||
update.setProgressCount((int) progressCount);
|
||||
baseMapper.updateById(update);
|
||||
@@ -815,13 +816,13 @@ public class PmRepairOrderServiceImpl implements IPmRepairOrderService {
|
||||
@Override
|
||||
public Boolean completeOrder(Long orderId, String repairResult, String usedMaterials, String followSuggestions) {
|
||||
// 1. 验证工单是否存在
|
||||
PmRepairOrder order = baseMapper.selectById(orderId);
|
||||
HqPmRepairOrder order = baseMapper.selectById(orderId);
|
||||
if (order == null) {
|
||||
throw new ServiceException("工单不存在");
|
||||
}
|
||||
|
||||
// 2. 数据权限验证
|
||||
PmRepairOrderVo orderVo = MapstructUtils.convert(order, PmRepairOrderVo.class);
|
||||
HqPmRepairOrderVo orderVo = MapstructUtils.convert(order, HqPmRepairOrderVo.class);
|
||||
if (!hasDataPermission(orderVo)) {
|
||||
throw new ServiceException("无权限操作该工单");
|
||||
}
|
||||
@@ -841,7 +842,7 @@ public class PmRepairOrderServiceImpl implements IPmRepairOrderService {
|
||||
}
|
||||
|
||||
// 5. 更新工单状态和完成信息
|
||||
PmRepairOrder update = new PmRepairOrder();
|
||||
HqPmRepairOrder update = new HqPmRepairOrder();
|
||||
update.setId(orderId);
|
||||
update.setFinishTime(finishTime);
|
||||
update.setTotalDuration(totalDuration);
|
||||
@@ -858,7 +859,7 @@ public class PmRepairOrderServiceImpl implements IPmRepairOrderService {
|
||||
// 6. 添加完成进度记录
|
||||
try {
|
||||
var loginUser = LoginHelper.getLoginUser();
|
||||
PmRepairProgress completionProgress = new PmRepairProgress();
|
||||
HqPmRepairProgress completionProgress = new HqPmRepairProgress();
|
||||
completionProgress.setOrderId(orderId);
|
||||
completionProgress.setProgressType("6"); // 完成维修
|
||||
completionProgress.setProgressStatus("维修已完成");
|
||||
@@ -902,13 +903,13 @@ public class PmRepairOrderServiceImpl implements IPmRepairOrderService {
|
||||
Long orderId = Long.valueOf(evaluationData.get("orderId").toString());
|
||||
|
||||
// 2. 验证工单是否存在
|
||||
PmRepairOrder order = baseMapper.selectById(orderId);
|
||||
HqPmRepairOrder order = baseMapper.selectById(orderId);
|
||||
if (order == null) {
|
||||
throw new ServiceException("工单不存在");
|
||||
}
|
||||
|
||||
// 3. 数据权限验证
|
||||
PmRepairOrderVo orderVo = MapstructUtils.convert(order, PmRepairOrderVo.class);
|
||||
HqPmRepairOrderVo orderVo = MapstructUtils.convert(order, HqPmRepairOrderVo.class);
|
||||
if (!hasDataPermission(orderVo)) {
|
||||
throw new ServiceException("无权限评价该工单");
|
||||
}
|
||||
@@ -919,8 +920,8 @@ public class PmRepairOrderServiceImpl implements IPmRepairOrderService {
|
||||
}
|
||||
|
||||
// 5. 验证是否已经评价过
|
||||
LambdaQueryWrapper<PmServiceEvaluation> checkLqw = Wrappers.lambdaQuery();
|
||||
checkLqw.eq(PmServiceEvaluation::getOrderId, orderId);
|
||||
LambdaQueryWrapper<HqPmServiceEvaluation> checkLqw = Wrappers.lambdaQuery();
|
||||
checkLqw.eq(HqPmServiceEvaluation::getOrderId, orderId);
|
||||
boolean hasEvaluated = serviceEvaluationMapper.exists(checkLqw);
|
||||
if (hasEvaluated) {
|
||||
throw new ServiceException("该工单已经评价过,不能重复评价");
|
||||
@@ -933,7 +934,7 @@ public class PmRepairOrderServiceImpl implements IPmRepairOrderService {
|
||||
|
||||
// 7. 创建服务评价记录
|
||||
Date evaluationTime = new Date();
|
||||
PmServiceEvaluation evaluation = new PmServiceEvaluation();
|
||||
HqPmServiceEvaluation evaluation = new HqPmServiceEvaluation();
|
||||
evaluation.setOrderId(orderId);
|
||||
evaluation.setEvaluatorId(currentUserId);
|
||||
evaluation.setEvaluatorName(currentUserName);
|
||||
@@ -989,7 +990,7 @@ public class PmRepairOrderServiceImpl implements IPmRepairOrderService {
|
||||
}
|
||||
|
||||
// 9. 更新工单状态为"已评价",并设置评价得分和评价时间
|
||||
PmRepairOrder updateOrder = new PmRepairOrder();
|
||||
HqPmRepairOrder updateOrder = new HqPmRepairOrder();
|
||||
updateOrder.setId(orderId);
|
||||
updateOrder.setOrderStatus("5"); // 已评价
|
||||
updateOrder.setEvaluationScore(evaluation.getOverallScore());
|
||||
@@ -1002,7 +1003,7 @@ public class PmRepairOrderServiceImpl implements IPmRepairOrderService {
|
||||
|
||||
// 10. 添加评价进度记录
|
||||
try {
|
||||
PmRepairProgress evaluationProgress = new PmRepairProgress();
|
||||
HqPmRepairProgress evaluationProgress = new HqPmRepairProgress();
|
||||
evaluationProgress.setOrderId(orderId);
|
||||
evaluationProgress.setProgressType("7"); // 用户评价
|
||||
evaluationProgress.setProgressStatus("用户已评价");
|
||||
@@ -1043,24 +1044,24 @@ public class PmRepairOrderServiceImpl implements IPmRepairOrderService {
|
||||
public java.util.Map<String, Object> getServiceEvaluation(Long orderId) {
|
||||
try {
|
||||
// 1. 验证工单是否存在
|
||||
PmRepairOrder order = baseMapper.selectById(orderId);
|
||||
HqPmRepairOrder order = baseMapper.selectById(orderId);
|
||||
if (order == null) {
|
||||
throw new ServiceException("工单不存在");
|
||||
}
|
||||
|
||||
// 2. 数据权限验证
|
||||
PmRepairOrderVo orderVo = MapstructUtils.convert(order, PmRepairOrderVo.class);
|
||||
HqPmRepairOrderVo orderVo = MapstructUtils.convert(order, HqPmRepairOrderVo.class);
|
||||
if (!hasDataPermission(orderVo)) {
|
||||
throw new ServiceException("无权限查看该工单的评价");
|
||||
}
|
||||
|
||||
// 3. 查询评价记录
|
||||
LambdaQueryWrapper<PmServiceEvaluation> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(PmServiceEvaluation::getOrderId, orderId);
|
||||
lqw.orderByDesc(PmServiceEvaluation::getCreateTime);
|
||||
LambdaQueryWrapper<HqPmServiceEvaluation> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(HqPmServiceEvaluation::getOrderId, orderId);
|
||||
lqw.orderByDesc(HqPmServiceEvaluation::getCreateTime);
|
||||
lqw.last("LIMIT 1");
|
||||
|
||||
PmServiceEvaluation evaluation = serviceEvaluationMapper.selectOne(lqw);
|
||||
HqPmServiceEvaluation evaluation = serviceEvaluationMapper.selectOne(lqw);
|
||||
if (evaluation == null) {
|
||||
throw new ServiceException("该工单还没有评价记录");
|
||||
}
|
||||
+4
-4
@@ -2,9 +2,9 @@
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.dromara.hq.mapper.PmRepairAttachmentMapper">
|
||||
<mapper namespace="org.dromara.hq.mapper.HqPmRepairAttachmentMapper">
|
||||
|
||||
<resultMap type="org.dromara.hq.domain.PmRepairAttachment" id="PmRepairAttachmentResult">
|
||||
<resultMap type="org.dromara.hq.domain.HqPmRepairAttachment" id="HqPmRepairAttachmentResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="orderId" column="order_id" />
|
||||
<result property="fileName" column="file_name" />
|
||||
@@ -30,8 +30,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="deleted" column="deleted" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectPmRepairAttachmentVo">
|
||||
select id, order_id, file_name, file_path, file_size, file_type, file_extension, file_mime_type, upload_stage, uploader_id, uploader_name, thumbnail_path, duration, resolution, description, sort_order, tenant_id, create_dept, create_by, create_time, update_by, update_time, deleted from pm_repair_attachment
|
||||
<sql id="selectHqPmRepairAttachmentVo">
|
||||
select id, order_id, file_name, file_path, file_size, file_type, file_extension, file_mime_type, upload_stage, uploader_id, uploader_name, thumbnail_path, duration, resolution, description, sort_order, tenant_id, create_dept, create_by, create_time, update_by, update_time, deleted from hq_pm_repair_attachment
|
||||
</sql>
|
||||
|
||||
</mapper>
|
||||
+1
-1
@@ -2,6 +2,6 @@
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.dromara.hq.mapper.PmRepairCategoryMapper">
|
||||
<mapper namespace="org.dromara.hq.mapper.HqPmRepairCategoryMapper">
|
||||
|
||||
</mapper>
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.dromara.hq.mapper.PmRepairOrderMapper">
|
||||
<mapper namespace="org.dromara.hq.mapper.HqPmRepairOrderMapper">
|
||||
|
||||
<!-- 查询拥有"维修人员"角色的用户列表 -->
|
||||
<select id="selectMaintenanceWorkers" resultType="java.util.Map">
|
||||
+4
-4
@@ -2,9 +2,9 @@
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.dromara.hq.mapper.PmRepairProgressMapper">
|
||||
<mapper namespace="org.dromara.hq.mapper.HqPmRepairProgressMapper">
|
||||
|
||||
<resultMap type="org.dromara.hq.domain.PmRepairProgress" id="PmRepairProgressResult">
|
||||
<resultMap type="org.dromara.hq.domain.HqPmRepairProgress" id="HqPmRepairProgressResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="orderId" column="order_id" />
|
||||
<result property="progressType" column="progress_type" />
|
||||
@@ -32,8 +32,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="deleted" column="deleted" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectPmRepairProgressVo">
|
||||
select id, order_id, progress_type, progress_status, progress_detail, operator_id, operator_name, operator_role, location_info, gps_latitude, gps_longitude, operation_time, estimated_duration, attachment_ids, next_step, issues_encountered, materials_needed, remark, tenant_id, create_dept, create_by, create_time, update_by, update_time, deleted from pm_repair_progress
|
||||
<sql id="selectHqPmRepairProgressVo">
|
||||
select id, order_id, progress_type, progress_status, progress_detail, operator_id, operator_name, operator_role, location_info, gps_latitude, gps_longitude, operation_time, estimated_duration, attachment_ids, next_step, issues_encountered, materials_needed, remark, tenant_id, create_dept, create_by, create_time, update_by, update_time, deleted from hq_pm_repair_progress
|
||||
</sql>
|
||||
|
||||
</mapper>
|
||||
+44
@@ -0,0 +1,44 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.dromara.hq.mapper.HqPmServiceEvaluationMapper">
|
||||
|
||||
<resultMap type="org.dromara.hq.domain.HqPmServiceEvaluation" id="HqPmServiceEvaluationResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="orderId" column="order_id" />
|
||||
<result property="evaluatorId" column="evaluator_id" />
|
||||
<result property="evaluatorName" column="evaluator_name" />
|
||||
<result property="evaluatedWorkerId" column="evaluated_worker_id" />
|
||||
<result property="evaluatedWorkerName" column="evaluated_worker_name" />
|
||||
<result property="overallScore" column="overall_score" />
|
||||
<result property="qualityScore" column="quality_score" />
|
||||
<result property="attitudeScore" column="attitude_score" />
|
||||
<result property="responseSpeedScore" column="response_speed_score" />
|
||||
<result property="communicationScore" column="communication_score" />
|
||||
<result property="evaluationContent" column="evaluation_content" />
|
||||
<result property="satisfactionLevel" column="satisfaction_level" />
|
||||
<result property="isAnonymous" column="is_anonymous" />
|
||||
<result property="isPublic" column="is_public" />
|
||||
<result property="evaluationTime" column="evaluation_time" />
|
||||
<result property="serviceStartTime" column="service_start_time" />
|
||||
<result property="serviceEndTime" column="service_end_time" />
|
||||
<result property="serviceDuration" column="service_duration" />
|
||||
<result property="positiveTags" column="positive_tags" />
|
||||
<result property="negativeTags" column="negative_tags" />
|
||||
<result property="improvementSuggestions" column="improvement_suggestions" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="tenantId" column="tenant_id" />
|
||||
<result property="createDept" column="create_dept" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="deleted" column="deleted" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectHqPmServiceEvaluationVo">
|
||||
select id, order_id, evaluator_id, evaluator_name, evaluated_worker_id, evaluated_worker_name, overall_score, quality_score, attitude_score, response_speed_score, communication_score, evaluation_content, satisfaction_level, is_anonymous, is_public, evaluation_time, service_start_time, service_end_time, service_duration, positive_tags, negative_tags, improvement_suggestions, remark, tenant_id, create_dept, create_by, create_time, update_by, update_time, deleted from hq_pm_service_evaluation
|
||||
</sql>
|
||||
|
||||
</mapper>
|
||||
Reference in new issue
Block a user