()
+ .eqIfPresent(MaterialDetailDO::getOrderNo, reqVO.getOrderNo())
+ .eqIfPresent(MaterialDetailDO::getUserId, reqVO.getUserId())
+ .likeIfPresent(MaterialDetailDO::getUserName, reqVO.getUserName())
+ .eqIfPresent(MaterialDetailDO::getClassifyId, reqVO.getClassifyId())
+ .likeIfPresent(MaterialDetailDO::getClassifyName, reqVO.getClassifyName())
+ .eqIfPresent(MaterialDetailDO::getTypeId, reqVO.getTypeId())
+ .likeIfPresent(MaterialDetailDO::getTypeName, reqVO.getTypeName())
+ .eqIfPresent(MaterialDetailDO::getTypeDetailId, reqVO.getTypeDetailId())
+ .likeIfPresent(MaterialDetailDO::getTypeDetailName, reqVO.getTypeDetailName())
+ .eqIfPresent(MaterialDetailDO::getUserCount, reqVO.getUserCount())
+ .likeIfPresent(MaterialDetailDO::getUnitName, reqVO.getUnitName())
+ .eqIfPresent(MaterialDetailDO::getStatus, reqVO.getStatus())
+ .eqIfPresent(MaterialDetailDO::getRemark, reqVO.getRemark())
+ .betweenIfPresent(MaterialDetailDO::getCreateTime, reqVO.getCreateTime())
+ .orderByDesc(MaterialDetailDO::getId));
+ }
+
+}
\ No newline at end of file
diff --git a/urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/enums/ErrorCodeConstants.java b/urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/enums/ErrorCodeConstants.java
new file mode 100644
index 0000000..9ebffe2
--- /dev/null
+++ b/urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/enums/ErrorCodeConstants.java
@@ -0,0 +1,19 @@
+package com.zteits.urbanops.module.workorder.enums;
+
+
+import com.zteits.urbanops.framework.common.exception.ErrorCode;
+
+/**
+ * workorder 错误码枚举类
+ *
+ * workorder 系统,使用 1-100-000-000 段
+ */
+public interface ErrorCodeConstants {
+
+ // ========== server 工单 1-100-001-000 ==========
+ ErrorCode MAIN_INFO_NOT_EXISTS = new ErrorCode(1-100-001-000, "工单信息不存在");
+
+ ErrorCode ATTACHMENT_NOT_EXISTS = new ErrorCode(1-100-002-000, "工单附件信息不存在");
+
+ ErrorCode MATERIAL_DETAIL_NOT_EXISTS = new ErrorCode(1-100-003-000, "工单耗材明细不存在");
+}
diff --git a/urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/service/attachment/AttachmentService.java b/urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/service/attachment/AttachmentService.java
new file mode 100644
index 0000000..bf01a32
--- /dev/null
+++ b/urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/service/attachment/AttachmentService.java
@@ -0,0 +1,62 @@
+package com.zteits.urbanops.module.workorder.service.attachment;
+
+import java.util.*;
+import jakarta.validation.*;
+import com.zteits.urbanops.module.workorder.controller.admin.attachment.vo.*;
+import com.zteits.urbanops.module.workorder.dal.dataobject.attachment.AttachmentDO;
+import com.zteits.urbanops.framework.common.pojo.PageResult;
+import com.zteits.urbanops.framework.common.pojo.PageParam;
+
+/**
+ * 工单附件信息 Service 接口
+ *
+ * @author 超级管理员
+ */
+public interface AttachmentService {
+
+ /**
+ * 创建工单附件信息
+ *
+ * @param createReqVO 创建信息
+ * @return 编号
+ */
+ Long createAttachment(@Valid AttachmentSaveReqVO createReqVO);
+
+ /**
+ * 更新工单附件信息
+ *
+ * @param updateReqVO 更新信息
+ */
+ void updateAttachment(@Valid AttachmentSaveReqVO updateReqVO);
+
+ /**
+ * 删除工单附件信息
+ *
+ * @param id 编号
+ */
+ void deleteAttachment(Long id);
+
+ /**
+ * 批量删除工单附件信息
+ *
+ * @param ids 编号
+ */
+ void deleteAttachmentListByIds(List ids);
+
+ /**
+ * 获得工单附件信息
+ *
+ * @param id 编号
+ * @return 工单附件信息
+ */
+ AttachmentDO getAttachment(Long id);
+
+ /**
+ * 获得工单附件信息分页
+ *
+ * @param pageReqVO 分页查询
+ * @return 工单附件信息分页
+ */
+ PageResult getAttachmentPage(AttachmentPageReqVO pageReqVO);
+
+}
\ No newline at end of file
diff --git a/urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/service/attachment/AttachmentServiceImpl.java b/urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/service/attachment/AttachmentServiceImpl.java
new file mode 100644
index 0000000..0af1491
--- /dev/null
+++ b/urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/service/attachment/AttachmentServiceImpl.java
@@ -0,0 +1,85 @@
+package com.zteits.urbanops.module.workorder.service.attachment;
+
+import cn.hutool.core.collection.CollUtil;
+import org.springframework.stereotype.Service;
+import jakarta.annotation.Resource;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.*;
+import com.zteits.urbanops.module.workorder.controller.admin.attachment.vo.*;
+import com.zteits.urbanops.module.workorder.dal.dataobject.attachment.AttachmentDO;
+import com.zteits.urbanops.framework.common.pojo.PageResult;
+import com.zteits.urbanops.framework.common.pojo.PageParam;
+import com.zteits.urbanops.framework.common.util.object.BeanUtils;
+
+import com.zteits.urbanops.module.workorder.dal.mysql.attachment.AttachmentMapper;
+
+import static com.zteits.urbanops.framework.common.exception.util.ServiceExceptionUtil.exception;
+import static com.zteits.urbanops.framework.common.util.collection.CollectionUtils.convertList;
+import static com.zteits.urbanops.framework.common.util.collection.CollectionUtils.diffList;
+import static com.zteits.urbanops.module.workorder.enums.ErrorCodeConstants.*;
+
+/**
+ * 工单附件信息 Service 实现类
+ *
+ * @author 超级管理员
+ */
+@Service
+@Validated
+public class AttachmentServiceImpl implements AttachmentService {
+
+ @Resource
+ private AttachmentMapper attachmentMapper;
+
+ @Override
+ public Long createAttachment(AttachmentSaveReqVO createReqVO) {
+ // 插入
+ AttachmentDO attachment = BeanUtils.toBean(createReqVO, AttachmentDO.class);
+ attachmentMapper.insert(attachment);
+
+ // 返回
+ return attachment.getId();
+ }
+
+ @Override
+ public void updateAttachment(AttachmentSaveReqVO updateReqVO) {
+ // 校验存在
+ validateAttachmentExists(updateReqVO.getId());
+ // 更新
+ AttachmentDO updateObj = BeanUtils.toBean(updateReqVO, AttachmentDO.class);
+ attachmentMapper.updateById(updateObj);
+ }
+
+ @Override
+ public void deleteAttachment(Long id) {
+ // 校验存在
+ validateAttachmentExists(id);
+ // 删除
+ attachmentMapper.deleteById(id);
+ }
+
+ @Override
+ public void deleteAttachmentListByIds(List ids) {
+ // 删除
+ attachmentMapper.deleteByIds(ids);
+ }
+
+
+ private void validateAttachmentExists(Long id) {
+ if (attachmentMapper.selectById(id) == null) {
+ throw exception(ATTACHMENT_NOT_EXISTS);
+ }
+ }
+
+ @Override
+ public AttachmentDO getAttachment(Long id) {
+ return attachmentMapper.selectById(id);
+ }
+
+ @Override
+ public PageResult getAttachmentPage(AttachmentPageReqVO pageReqVO) {
+ return attachmentMapper.selectPage(pageReqVO);
+ }
+
+}
\ No newline at end of file
diff --git a/urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/service/maininfo/MainInfoService.java b/urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/service/maininfo/MainInfoService.java
new file mode 100644
index 0000000..95cee14
--- /dev/null
+++ b/urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/service/maininfo/MainInfoService.java
@@ -0,0 +1,62 @@
+package com.zteits.urbanops.module.workorder.service.maininfo;
+
+import java.util.*;
+import jakarta.validation.*;
+import com.zteits.urbanops.module.workorder.controller.admin.maininfo.vo.*;
+import com.zteits.urbanops.module.workorder.dal.dataobject.maininfo.MainInfoDO;
+import com.zteits.urbanops.framework.common.pojo.PageResult;
+import com.zteits.urbanops.framework.common.pojo.PageParam;
+
+/**
+ * 工单信息 Service 接口
+ *
+ * @author 超级管理员
+ */
+public interface MainInfoService {
+
+ /**
+ * 创建工单信息
+ *
+ * @param createReqVO 创建信息
+ * @return 编号
+ */
+ Long createMainInfo(@Valid MainInfoSaveReqVO createReqVO);
+
+ /**
+ * 更新工单信息
+ *
+ * @param updateReqVO 更新信息
+ */
+ void updateMainInfo(@Valid MainInfoSaveReqVO updateReqVO);
+
+ /**
+ * 删除工单信息
+ *
+ * @param id 编号
+ */
+ void deleteMainInfo(Long id);
+
+ /**
+ * 批量删除工单信息
+ *
+ * @param ids 编号
+ */
+ void deleteMainInfoListByIds(List ids);
+
+ /**
+ * 获得工单信息
+ *
+ * @param id 编号
+ * @return 工单信息
+ */
+ MainInfoDO getMainInfo(Long id);
+
+ /**
+ * 获得工单信息分页
+ *
+ * @param pageReqVO 分页查询
+ * @return 工单信息分页
+ */
+ PageResult getMainInfoPage(MainInfoPageReqVO pageReqVO);
+
+}
\ No newline at end of file
diff --git a/urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/service/maininfo/MainInfoServiceImpl.java b/urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/service/maininfo/MainInfoServiceImpl.java
new file mode 100644
index 0000000..3b11d64
--- /dev/null
+++ b/urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/service/maininfo/MainInfoServiceImpl.java
@@ -0,0 +1,85 @@
+package com.zteits.urbanops.module.workorder.service.maininfo;
+
+import cn.hutool.core.collection.CollUtil;
+import org.springframework.stereotype.Service;
+import jakarta.annotation.Resource;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.*;
+import com.zteits.urbanops.module.workorder.controller.admin.maininfo.vo.*;
+import com.zteits.urbanops.module.workorder.dal.dataobject.maininfo.MainInfoDO;
+import com.zteits.urbanops.framework.common.pojo.PageResult;
+import com.zteits.urbanops.framework.common.pojo.PageParam;
+import com.zteits.urbanops.framework.common.util.object.BeanUtils;
+
+import com.zteits.urbanops.module.workorder.dal.mysql.maininfo.MainInfoMapper;
+
+import static com.zteits.urbanops.framework.common.exception.util.ServiceExceptionUtil.exception;
+import static com.zteits.urbanops.framework.common.util.collection.CollectionUtils.convertList;
+import static com.zteits.urbanops.framework.common.util.collection.CollectionUtils.diffList;
+import static com.zteits.urbanops.module.workorder.enums.ErrorCodeConstants.*;
+
+/**
+ * 工单信息 Service 实现类
+ *
+ * @author 超级管理员
+ */
+@Service
+@Validated
+public class MainInfoServiceImpl implements MainInfoService {
+
+ @Resource
+ private MainInfoMapper mainInfoMapper;
+
+ @Override
+ public Long createMainInfo(MainInfoSaveReqVO createReqVO) {
+ // 插入
+ MainInfoDO mainInfo = BeanUtils.toBean(createReqVO, MainInfoDO.class);
+ mainInfoMapper.insert(mainInfo);
+
+ // 返回
+ return mainInfo.getId();
+ }
+
+ @Override
+ public void updateMainInfo(MainInfoSaveReqVO updateReqVO) {
+ // 校验存在
+ validateMainInfoExists(updateReqVO.getId());
+ // 更新
+ MainInfoDO updateObj = BeanUtils.toBean(updateReqVO, MainInfoDO.class);
+ mainInfoMapper.updateById(updateObj);
+ }
+
+ @Override
+ public void deleteMainInfo(Long id) {
+ // 校验存在
+ validateMainInfoExists(id);
+ // 删除
+ mainInfoMapper.deleteById(id);
+ }
+
+ @Override
+ public void deleteMainInfoListByIds(List ids) {
+ // 删除
+ mainInfoMapper.deleteByIds(ids);
+ }
+
+
+ private void validateMainInfoExists(Long id) {
+ if (mainInfoMapper.selectById(id) == null) {
+ throw exception(MAIN_INFO_NOT_EXISTS);
+ }
+ }
+
+ @Override
+ public MainInfoDO getMainInfo(Long id) {
+ return mainInfoMapper.selectById(id);
+ }
+
+ @Override
+ public PageResult getMainInfoPage(MainInfoPageReqVO pageReqVO) {
+ return mainInfoMapper.selectPage(pageReqVO);
+ }
+
+}
\ No newline at end of file
diff --git a/urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/service/materialdetail/MaterialDetailService.java b/urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/service/materialdetail/MaterialDetailService.java
new file mode 100644
index 0000000..812fe24
--- /dev/null
+++ b/urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/service/materialdetail/MaterialDetailService.java
@@ -0,0 +1,62 @@
+package com.zteits.urbanops.module.workorder.service.materialdetail;
+
+import java.util.*;
+import jakarta.validation.*;
+import com.zteits.urbanops.module.workorder.controller.admin.materialdetail.vo.*;
+import com.zteits.urbanops.module.workorder.dal.dataobject.materialdetail.MaterialDetailDO;
+import com.zteits.urbanops.framework.common.pojo.PageResult;
+import com.zteits.urbanops.framework.common.pojo.PageParam;
+
+/**
+ * 工单耗材明细 Service 接口
+ *
+ * @author 超级管理员
+ */
+public interface MaterialDetailService {
+
+ /**
+ * 创建工单耗材明细
+ *
+ * @param createReqVO 创建信息
+ * @return 编号
+ */
+ Long createMaterialDetail(@Valid MaterialDetailSaveReqVO createReqVO);
+
+ /**
+ * 更新工单耗材明细
+ *
+ * @param updateReqVO 更新信息
+ */
+ void updateMaterialDetail(@Valid MaterialDetailSaveReqVO updateReqVO);
+
+ /**
+ * 删除工单耗材明细
+ *
+ * @param id 编号
+ */
+ void deleteMaterialDetail(Long id);
+
+ /**
+ * 批量删除工单耗材明细
+ *
+ * @param ids 编号
+ */
+ void deleteMaterialDetailListByIds(List ids);
+
+ /**
+ * 获得工单耗材明细
+ *
+ * @param id 编号
+ * @return 工单耗材明细
+ */
+ MaterialDetailDO getMaterialDetail(Long id);
+
+ /**
+ * 获得工单耗材明细分页
+ *
+ * @param pageReqVO 分页查询
+ * @return 工单耗材明细分页
+ */
+ PageResult getMaterialDetailPage(MaterialDetailPageReqVO pageReqVO);
+
+}
\ No newline at end of file
diff --git a/urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/service/materialdetail/MaterialDetailServiceImpl.java b/urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/service/materialdetail/MaterialDetailServiceImpl.java
new file mode 100644
index 0000000..1145c54
--- /dev/null
+++ b/urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/service/materialdetail/MaterialDetailServiceImpl.java
@@ -0,0 +1,85 @@
+package com.zteits.urbanops.module.workorder.service.materialdetail;
+
+import cn.hutool.core.collection.CollUtil;
+import org.springframework.stereotype.Service;
+import jakarta.annotation.Resource;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.*;
+import com.zteits.urbanops.module.workorder.controller.admin.materialdetail.vo.*;
+import com.zteits.urbanops.module.workorder.dal.dataobject.materialdetail.MaterialDetailDO;
+import com.zteits.urbanops.framework.common.pojo.PageResult;
+import com.zteits.urbanops.framework.common.pojo.PageParam;
+import com.zteits.urbanops.framework.common.util.object.BeanUtils;
+
+import com.zteits.urbanops.module.workorder.dal.mysql.materialdetail.MaterialDetailMapper;
+
+import static com.zteits.urbanops.framework.common.exception.util.ServiceExceptionUtil.exception;
+import static com.zteits.urbanops.framework.common.util.collection.CollectionUtils.convertList;
+import static com.zteits.urbanops.framework.common.util.collection.CollectionUtils.diffList;
+import static com.zteits.urbanops.module.workorder.enums.ErrorCodeConstants.*;
+
+/**
+ * 工单耗材明细 Service 实现类
+ *
+ * @author 超级管理员
+ */
+@Service
+@Validated
+public class MaterialDetailServiceImpl implements MaterialDetailService {
+
+ @Resource
+ private MaterialDetailMapper materialDetailMapper;
+
+ @Override
+ public Long createMaterialDetail(MaterialDetailSaveReqVO createReqVO) {
+ // 插入
+ MaterialDetailDO materialDetail = BeanUtils.toBean(createReqVO, MaterialDetailDO.class);
+ materialDetailMapper.insert(materialDetail);
+
+ // 返回
+ return materialDetail.getId();
+ }
+
+ @Override
+ public void updateMaterialDetail(MaterialDetailSaveReqVO updateReqVO) {
+ // 校验存在
+ validateMaterialDetailExists(updateReqVO.getId());
+ // 更新
+ MaterialDetailDO updateObj = BeanUtils.toBean(updateReqVO, MaterialDetailDO.class);
+ materialDetailMapper.updateById(updateObj);
+ }
+
+ @Override
+ public void deleteMaterialDetail(Long id) {
+ // 校验存在
+ validateMaterialDetailExists(id);
+ // 删除
+ materialDetailMapper.deleteById(id);
+ }
+
+ @Override
+ public void deleteMaterialDetailListByIds(List ids) {
+ // 删除
+ materialDetailMapper.deleteByIds(ids);
+ }
+
+
+ private void validateMaterialDetailExists(Long id) {
+ if (materialDetailMapper.selectById(id) == null) {
+ throw exception(MATERIAL_DETAIL_NOT_EXISTS);
+ }
+ }
+
+ @Override
+ public MaterialDetailDO getMaterialDetail(Long id) {
+ return materialDetailMapper.selectById(id);
+ }
+
+ @Override
+ public PageResult getMaterialDetailPage(MaterialDetailPageReqVO pageReqVO) {
+ return materialDetailMapper.selectPage(pageReqVO);
+ }
+
+}
\ No newline at end of file
diff --git a/urbanops-module-workorder/src/main/resources/mapper/maininfo/MainInfoMapper.xml b/urbanops-module-workorder/src/main/resources/mapper/maininfo/MainInfoMapper.xml
new file mode 100644
index 0000000..0693933
--- /dev/null
+++ b/urbanops-module-workorder/src/main/resources/mapper/maininfo/MainInfoMapper.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/urbanops-module-workorder/src/main/resources/mapper/mapper/attachment/AttachmentMapper.xml b/urbanops-module-workorder/src/main/resources/mapper/mapper/attachment/AttachmentMapper.xml
new file mode 100644
index 0000000..29c87ff
--- /dev/null
+++ b/urbanops-module-workorder/src/main/resources/mapper/mapper/attachment/AttachmentMapper.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/urbanops-module-workorder/src/main/resources/mapper/materialdetail/MaterialDetailMapper.xml b/urbanops-module-workorder/src/main/resources/mapper/materialdetail/MaterialDetailMapper.xml
new file mode 100644
index 0000000..e182d04
--- /dev/null
+++ b/urbanops-module-workorder/src/main/resources/mapper/materialdetail/MaterialDetailMapper.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/urbanops-server/pom.xml b/urbanops-server/pom.xml
index 566c7a6..19d1e1a 100644
--- a/urbanops-server/pom.xml
+++ b/urbanops-server/pom.xml
@@ -43,6 +43,13 @@
urbanops-module-garden
${revision}
+
+
+
+ com.zteits.boot
+ urbanops-module-workorder
+ ${revision}
+