diff --git a/urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/hotline/HotlineCaseAdminController.java b/urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/hotline/HotlineCaseAdminController.java deleted file mode 100644 index 5a55d89..0000000 --- a/urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/hotline/HotlineCaseAdminController.java +++ /dev/null @@ -1,86 +0,0 @@ -package com.zteits.urbanops.module.garden.controller.admin.hotline; - -import com.zteits.urbanops.framework.common.pojo.CommonResult; -import com.zteits.urbanops.framework.common.pojo.PageParam; -import com.zteits.urbanops.framework.common.pojo.PageResult; -import com.zteits.urbanops.framework.excel.core.util.ExcelUtils; -import com.zteits.urbanops.module.garden.dal.dataobject.hotline.HotlineCaseDO; -import com.zteits.urbanops.module.garden.service.hotline.HotlineCaseService; -import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.tags.Tag; -import jakarta.annotation.Resource; -import jakarta.servlet.http.HttpServletResponse; -import org.springframework.security.access.prepost.PreAuthorize; -import org.springframework.web.bind.annotation.*; - -import java.io.IOException; -import java.util.List; - -import static com.zteits.urbanops.framework.common.pojo.CommonResult.success; -import static com.zteits.urbanops.framework.apilog.core.enums.OperateTypeEnum.EXPORT; -import com.zteits.urbanops.framework.apilog.core.annotation.ApiAccessLog; - -@Tag(name = "管理后台 - 12345案件信息") -@RestController -@RequestMapping("/business/hotlinecase") -public class HotlineCaseAdminController { - - @Resource - private HotlineCaseService service; - - @GetMapping("/list") - @Operation(summary = "查询列表") - @PreAuthorize("@ss.hasPermission('business:hotlinecase:list')") - public CommonResult> list(HotlineCaseDO where, - @RequestParam(value = "pageNum", required = false) Integer pageNum, - @RequestParam(value = "pageSize", required = false) Integer pageSize) { - PageParam page = new PageParam(); - page.setPageNo(pageNum == null ? 1 : pageNum); - page.setPageSize(pageSize == null ? 10 : pageSize); - return success(service.selectPage(page, where)); - } - - @PostMapping("export") - @Operation(summary = "导出列表") - @PreAuthorize("@ss.hasPermission('business:hotlinecase:export')") - @ApiAccessLog(operateType = EXPORT) - public void export(HotlineCaseDO where, HttpServletResponse response) throws IOException { - List list = service.selectPage(new PageParam(), where).getList(); - ExcelUtils.write(response, "12345案件信息.xls", "数据", HotlineCaseDO.class, list); - } - - @GetMapping("/{id}") - @Operation(summary = "详情") - @PreAuthorize("@ss.hasPermission('business:hotlinecase:query')") - public CommonResult getInfo(@PathVariable("id") String id) { - return success(service.selectById(id)); - } - - @GetMapping("/getInfoMore/{id}") - @Operation(summary = "详情(含附件与照片)") - @PreAuthorize("@ss.hasPermission('business:hotlinecase:query')") - public CommonResult getInfoMore(@PathVariable("id") String id) { - return success(service.getDetail(id)); - } - - @PostMapping - @Operation(summary = "新增") - @PreAuthorize("@ss.hasPermission('business:hotlinecase:add')") - public CommonResult add(@RequestBody HotlineCaseDO entity) { - return success(service.insert(entity)); - } - - @PutMapping - @Operation(summary = "修改") - @PreAuthorize("@ss.hasPermission('business:hotlinecase:edit')") - public CommonResult edit(@RequestBody HotlineCaseDO entity) { - return success(service.update(entity)); - } - - @DeleteMapping("/{ids}") - @Operation(summary = "删除") - @PreAuthorize("@ss.hasPermission('business:hotlinecase:remove')") - public CommonResult remove(@PathVariable List ids) { - return success(service.deleteByIds(ids)); - } -} \ No newline at end of file diff --git a/urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/hotline/HotlineCaseController.java b/urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/hotline/HotlineCaseController.java deleted file mode 100644 index 3e4f025..0000000 --- a/urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/hotline/HotlineCaseController.java +++ /dev/null @@ -1,32 +0,0 @@ -package com.zteits.urbanops.module.garden.controller.admin.hotline; - -import com.zteits.urbanops.framework.common.pojo.CommonResult; -import com.zteits.urbanops.framework.common.pojo.PageParam; -import com.zteits.urbanops.framework.common.pojo.PageResult; -import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.tags.Tag; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.RestController; - -import java.util.Collections; -import java.util.List; -import java.util.Map; - -import static com.zteits.urbanops.framework.common.pojo.CommonResult.success; - -@Tag(name = "管理后台 - 热线工单") -@RestController -@RequestMapping("/business/hotlinecase-compat") -public class HotlineCaseController { - - @GetMapping("/list") - @Operation(summary = "热线工单-列表") - public CommonResult>> list(@RequestParam(value = "page", required = false) Integer page, - @RequestParam(value = "pageSize", required = false) Integer pageSize) { - List> records = Collections.emptyList(); - long total = 0L; - return success(new PageResult<>(records, total)); - } -} \ No newline at end of file diff --git a/urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/hotline/HotlineFileController.java b/urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/hotline/HotlineFileController.java deleted file mode 100644 index 414a91b..0000000 --- a/urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/hotline/HotlineFileController.java +++ /dev/null @@ -1,69 +0,0 @@ -package com.zteits.urbanops.module.garden.controller.admin.hotline; - -import com.zteits.urbanops.framework.common.pojo.CommonResult; -import com.zteits.urbanops.framework.excel.core.util.ExcelUtils; -import com.zteits.urbanops.module.garden.dal.dataobject.hotline.HotlineFileDO; -import com.zteits.urbanops.module.garden.service.hotline.HotlineFileService; -import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.tags.Tag; -import jakarta.annotation.Resource; -import org.springframework.web.bind.annotation.*; -import org.springframework.web.multipart.MultipartFile; - -import java.io.IOException; -import java.util.Arrays; -import java.util.List; - -import static com.zteits.urbanops.framework.common.pojo.CommonResult.success; - -@Tag(name = "管理后台 - 12345案件-文件") -@RestController -@RequestMapping("/business/file") -public class HotlineFileController { - - @Resource - private HotlineFileService hotlineFileService; - - @PostMapping("/parseFile") - @Operation(summary = "解析word文档") - public CommonResult parseFile(@RequestParam("file") MultipartFile file) throws Exception { - return success(hotlineFileService.parseFile(file)); - } - - @GetMapping("/list") - @Operation(summary = "文件-列表") - public CommonResult> list(HotlineFileDO where) { - return success(hotlineFileService.selectList(where)); - } - - @GetMapping("/export") - @Operation(summary = "文件-导出") - public void export(HotlineFileDO where, jakarta.servlet.http.HttpServletResponse response) throws IOException { - List list = hotlineFileService.selectList(where); - ExcelUtils.write(response, "file.xls", "数据", HotlineFileDO.class, list); - } - - @GetMapping("/{caseid}") - @Operation(summary = "文件-详情") - public CommonResult getInfo(@PathVariable("caseid") String caseid) { - return success(hotlineFileService.selectById(caseid)); - } - - @PostMapping - @Operation(summary = "文件-新增") - public CommonResult add(@RequestBody HotlineFileDO entity) { - return success(hotlineFileService.insert(entity)); - } - - @PutMapping - @Operation(summary = "文件-修改") - public CommonResult edit(@RequestBody HotlineFileDO entity) { - return success(hotlineFileService.update(entity)); - } - - @DeleteMapping("/{caseids}") - @Operation(summary = "文件-删除") - public CommonResult remove(@PathVariable String[] caseids) { - return success(hotlineFileService.deleteByIds(Arrays.asList(caseids))); - } -} \ No newline at end of file diff --git a/urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/hotline/vo/HotlineCaseDetailResp.java b/urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/hotline/vo/HotlineCaseDetailResp.java deleted file mode 100644 index e52e6cc..0000000 --- a/urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/hotline/vo/HotlineCaseDetailResp.java +++ /dev/null @@ -1,15 +0,0 @@ -package com.zteits.urbanops.module.garden.controller.admin.hotline.vo; - -import com.zteits.urbanops.module.garden.dal.dataobject.hotline.HotlineCaseDO; -import com.zteits.urbanops.module.garden.dal.dataobject.hotline.HotlineFileDO; -import com.zteits.urbanops.module.garden.dal.dataobject.photo.SysPhotoDO; -import lombok.Data; - -import java.util.List; - -@Data -public class HotlineCaseDetailResp { - private HotlineCaseDO caseInfo; - private List files; - private List photos; -} \ No newline at end of file diff --git a/urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/hotlinecase/HotlineCaseController.java b/urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/hotlinecase/HotlineCaseController.java new file mode 100644 index 0000000..c2acc34 --- /dev/null +++ b/urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/hotlinecase/HotlineCaseController.java @@ -0,0 +1,104 @@ +package com.zteits.urbanops.module.garden.controller.admin.hotlinecase; + +import org.springframework.web.bind.annotation.*; +import jakarta.annotation.Resource; +import org.springframework.validation.annotation.Validated; +import org.springframework.security.access.prepost.PreAuthorize; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Operation; + +import jakarta.validation.constraints.*; +import jakarta.validation.*; +import jakarta.servlet.http.*; +import java.util.*; +import java.io.IOException; + +import com.zteits.urbanops.framework.common.pojo.PageParam; +import com.zteits.urbanops.framework.common.pojo.PageResult; +import com.zteits.urbanops.framework.common.pojo.CommonResult; +import com.zteits.urbanops.framework.common.util.object.BeanUtils; +import static com.zteits.urbanops.framework.common.pojo.CommonResult.success; + +import com.zteits.urbanops.framework.excel.core.util.ExcelUtils; + +import com.zteits.urbanops.framework.apilog.core.annotation.ApiAccessLog; +import static com.zteits.urbanops.framework.apilog.core.enums.OperateTypeEnum.*; + +import com.zteits.urbanops.module.garden.controller.admin.hotlinecase.vo.*; +import com.zteits.urbanops.module.garden.dal.dataobject.hotlinecase.HotlineCaseDO; +import com.zteits.urbanops.module.garden.service.hotlinecase.HotlineCaseService; + +@Tag(name = "管理后台 - 12345案件信息") +@RestController +@RequestMapping("/garden/hotline-case") +@Validated +public class HotlineCaseController { + + @Resource + private HotlineCaseService hotlineCaseService; + + @PostMapping("/create") + @Operation(summary = "创建12345案件信息") + @PreAuthorize("@ss.hasPermission('garden:hotline-case:create')") + public CommonResult createHotlineCase(@Valid @RequestBody HotlineCaseSaveReqVO createReqVO) { + return success(hotlineCaseService.createHotlineCase(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新12345案件信息") + @PreAuthorize("@ss.hasPermission('garden:hotline-case:update')") + public CommonResult updateHotlineCase(@Valid @RequestBody HotlineCaseSaveReqVO updateReqVO) { + hotlineCaseService.updateHotlineCase(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除12345案件信息") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('garden:hotline-case:delete')") + public CommonResult deleteHotlineCase(@RequestParam("id") String id) { + hotlineCaseService.deleteHotlineCase(id); + return success(true); + } + + @DeleteMapping("/delete-list") + @Parameter(name = "ids", description = "编号", required = true) + @Operation(summary = "批量删除12345案件信息") + @PreAuthorize("@ss.hasPermission('garden:hotline-case:delete')") + public CommonResult deleteHotlineCaseList(@RequestParam("ids") List ids) { + hotlineCaseService.deleteHotlineCaseListByIds(ids); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得12345案件信息") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('garden:hotline-case:query')") + public CommonResult getHotlineCase(@RequestParam("id") String id) { + HotlineCaseDO hotlineCase = hotlineCaseService.getHotlineCase(id); + return success(BeanUtils.toBean(hotlineCase, HotlineCaseRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得12345案件信息分页") + @PreAuthorize("@ss.hasPermission('garden:hotline-case:query')") + public CommonResult> getHotlineCasePage(@Valid HotlineCasePageReqVO pageReqVO) { + PageResult pageResult = hotlineCaseService.getHotlineCasePage(pageReqVO); + return success(BeanUtils.toBean(pageResult, HotlineCaseRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出12345案件信息 Excel") + @PreAuthorize("@ss.hasPermission('garden:hotline-case:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportHotlineCaseExcel(@Valid HotlineCasePageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = hotlineCaseService.getHotlineCasePage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "12345案件信息.xls", "数据", HotlineCaseRespVO.class, + BeanUtils.toBean(list, HotlineCaseRespVO.class)); + } + +} \ No newline at end of file diff --git a/urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/hotlinecase/vo/HotlineCasePageReqVO.java b/urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/hotlinecase/vo/HotlineCasePageReqVO.java new file mode 100644 index 0000000..158f24c --- /dev/null +++ b/urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/hotlinecase/vo/HotlineCasePageReqVO.java @@ -0,0 +1,153 @@ +package com.zteits.urbanops.module.garden.controller.admin.hotlinecase.vo; + +import lombok.*; +import java.util.*; +import io.swagger.v3.oas.annotations.media.Schema; +import com.zteits.urbanops.framework.common.pojo.PageParam; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; + +import static com.zteits.urbanops.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@Schema(description = "管理后台 - 12345案件信息分页 Request VO") +@Data +public class HotlineCasePageReqVO extends PageParam { + + @Schema(description = "工单编号") + private String hotlinenumber; + + @Schema(description = "12345工单文件") + private String casefile; + + @Schema(description = "事间来源:默认12345") + private String eventsouce; + + @Schema(description = "工单来源:集团 分公司") + private String casesource; + + @Schema(description = "市级编号") + private String citynum; + + @Schema(description = "区级编号") + private String regionnum; + + @Schema(description = "工单状态") + private String taskstate; + + @Schema(description = "权属信息 null 无 0权属 1非权属") + private String ownership; + + @Schema(description = "部门信息") + private String department; + + @Schema(description = "所属街道") + private String street; + + @Schema(description = "所属公司", example = "26510") + private String companyid; + + @Schema(description = "来电人姓名", example = "芋艿") + private String callName; + + @Schema(description = "来电人手机号") + private String callTel; + + @Schema(description = "接件时间") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] acceptcasetime; + + @Schema(description = "截止时间") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] endTime; + + @Schema(description = "详细地址") + private String address; + + @Schema(description = "工单内容") + private String content; + + @Schema(description = "工单照片") + private String casepic; + + @Schema(description = "是否派巡查") + private String dispatcher; + + @Schema(description = "巡查员") + private String dispperson; + + @Schema(description = "完成情况") + private String replyResult; + + @Schema(description = "完成图片1") + private String picResult1; + + @Schema(description = "完成图片2") + private String picResult2; + + @Schema(description = "完成图片3") + private String picResult3; + + @Schema(description = "工单完成时间") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] finishTime; + + @Schema(description = "回复居民时间") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] replayrtime; + + @Schema(description = "权属单位") + private String ownercompany; + + @Schema(description = "工单类型", example = "2") + private String casetype; + + @Schema(description = "办理结果:字典") + private String handingresult; + + @Schema(description = "处理情况") + private String resolvedesp; + + @Schema(description = "处理情况") + private String rstResolvedesp; + + @Schema(description = "转单人") + private String dealBy; + + @Schema(description = "上报时间") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] dealTime; + + @Schema(description = "创建人") + private String createBy; + + @Schema(description = "创建时间") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] createTime; + + @Schema(description = "修改人") + private String updateBy; + + @Schema(description = "结果录入人") + private String replayBy; + + @Schema(description = "回复时间,结果录入时间") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] replayTime; + + @Schema(description = "确认权属人") + private String ownershipBy; + + @Schema(description = "确认权属时间") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] ownershipTime; + + @Schema(description = "防止重复派单:1已经发送") + private String reserve1; + + @Schema(description = "小程序派单状态:1 待派单,2 派单中 3 派单处理完成") + private String reserve2; + + @Schema(description = "备注3") + private String reserve3; + +} \ No newline at end of file diff --git a/urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/hotlinecase/vo/HotlineCaseRespVO.java b/urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/hotlinecase/vo/HotlineCaseRespVO.java new file mode 100644 index 0000000..a7a9e63 --- /dev/null +++ b/urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/hotlinecase/vo/HotlineCaseRespVO.java @@ -0,0 +1,191 @@ +package com.zteits.urbanops.module.garden.controller.admin.hotlinecase.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import java.util.*; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; +import cn.idev.excel.annotation.*; + +@Schema(description = "管理后台 - 12345案件信息 Response VO") +@Data +@ExcelIgnoreUnannotated +public class HotlineCaseRespVO { + + @Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED, example = "9027") + @ExcelProperty("id") + private String id; + + @Schema(description = "工单编号") + @ExcelProperty("工单编号") + private String hotlinenumber; + + @Schema(description = "12345工单文件") + @ExcelProperty("12345工单文件") + private String casefile; + + @Schema(description = "事间来源:默认12345") + @ExcelProperty("事间来源:默认12345") + private String eventsouce; + + @Schema(description = "工单来源:集团 分公司") + @ExcelProperty("工单来源:集团 分公司") + private String casesource; + + @Schema(description = "市级编号", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("市级编号") + private String citynum; + + @Schema(description = "区级编号") + @ExcelProperty("区级编号") + private String regionnum; + + @Schema(description = "工单状态") + @ExcelProperty("工单状态") + private String taskstate; + + @Schema(description = "权属信息 null 无 0权属 1非权属") + @ExcelProperty("权属信息 null 无 0权属 1非权属") + private String ownership; + + @Schema(description = "部门信息") + @ExcelProperty("部门信息") + private String department; + + @Schema(description = "所属街道") + @ExcelProperty("所属街道") + private String street; + + @Schema(description = "所属公司", example = "26510") + @ExcelProperty("所属公司") + private String companyid; + + @Schema(description = "来电人姓名", example = "芋艿") + @ExcelProperty("来电人姓名") + private String callName; + + @Schema(description = "来电人手机号") + @ExcelProperty("来电人手机号") + private String callTel; + + @Schema(description = "接件时间") + @ExcelProperty("接件时间") + private LocalDateTime acceptcasetime; + + @Schema(description = "截止时间") + @ExcelProperty("截止时间") + private LocalDateTime endTime; + + @Schema(description = "详细地址") + @ExcelProperty("详细地址") + private String address; + + @Schema(description = "工单内容") + @ExcelProperty("工单内容") + private String content; + + @Schema(description = "工单照片") + @ExcelProperty("工单照片") + private String casepic; + + @Schema(description = "是否派巡查") + @ExcelProperty("是否派巡查") + private String dispatcher; + + @Schema(description = "巡查员") + @ExcelProperty("巡查员") + private String dispperson; + + @Schema(description = "完成情况") + @ExcelProperty("完成情况") + private String replyResult; + + @Schema(description = "完成图片1") + @ExcelProperty("完成图片1") + private String picResult1; + + @Schema(description = "完成图片2") + @ExcelProperty("完成图片2") + private String picResult2; + + @Schema(description = "完成图片3") + @ExcelProperty("完成图片3") + private String picResult3; + + @Schema(description = "工单完成时间") + @ExcelProperty("工单完成时间") + private LocalDateTime finishTime; + + @Schema(description = "回复居民时间") + @ExcelProperty("回复居民时间") + private LocalDateTime replayrtime; + + @Schema(description = "权属单位") + @ExcelProperty("权属单位") + private String ownercompany; + + @Schema(description = "工单类型", example = "2") + @ExcelProperty("工单类型") + private String casetype; + + @Schema(description = "办理结果:字典") + @ExcelProperty("办理结果:字典") + private String handingresult; + + @Schema(description = "处理情况") + @ExcelProperty("处理情况") + private String resolvedesp; + + @Schema(description = "处理情况") + @ExcelProperty("处理情况") + private String rstResolvedesp; + + @Schema(description = "转单人") + @ExcelProperty("转单人") + private String dealBy; + + @Schema(description = "上报时间") + @ExcelProperty("上报时间") + private LocalDateTime dealTime; + + @Schema(description = "创建人") + @ExcelProperty("创建人") + private String createBy; + + @Schema(description = "创建时间") + @ExcelProperty("创建时间") + private LocalDateTime createTime; + + @Schema(description = "修改人") + @ExcelProperty("修改人") + private String updateBy; + + @Schema(description = "结果录入人") + @ExcelProperty("结果录入人") + private String replayBy; + + @Schema(description = "回复时间,结果录入时间") + @ExcelProperty("回复时间,结果录入时间") + private LocalDateTime replayTime; + + @Schema(description = "确认权属人") + @ExcelProperty("确认权属人") + private String ownershipBy; + + @Schema(description = "确认权属时间") + @ExcelProperty("确认权属时间") + private LocalDateTime ownershipTime; + + @Schema(description = "防止重复派单:1已经发送") + @ExcelProperty("防止重复派单:1已经发送") + private String reserve1; + + @Schema(description = "小程序派单状态:1 待派单,2 派单中 3 派单处理完成") + @ExcelProperty("小程序派单状态:1 待派单,2 派单中 3 派单处理完成") + private String reserve2; + + @Schema(description = "备注3") + @ExcelProperty("备注3") + private String reserve3; + +} \ No newline at end of file diff --git a/urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/hotlinecase/vo/HotlineCaseSaveReqVO.java b/urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/hotlinecase/vo/HotlineCaseSaveReqVO.java new file mode 100644 index 0000000..585b620 --- /dev/null +++ b/urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/hotlinecase/vo/HotlineCaseSaveReqVO.java @@ -0,0 +1,144 @@ +package com.zteits.urbanops.module.garden.controller.admin.hotlinecase.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import java.util.*; +import jakarta.validation.constraints.*; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; + +@Schema(description = "管理后台 - 12345案件信息新增/修改 Request VO") +@Data +public class HotlineCaseSaveReqVO { + + @Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED, example = "9027") + private String id; + + @Schema(description = "工单编号") + private String hotlinenumber; + + @Schema(description = "12345工单文件") + private String casefile; + + @Schema(description = "事间来源:默认12345") + private String eventsouce; + + @Schema(description = "工单来源:集团 分公司") + private String casesource; + + @Schema(description = "市级编号", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "市级编号不能为空") + private String citynum; + + @Schema(description = "区级编号") + private String regionnum; + + @Schema(description = "工单状态") + private String taskstate; + + @Schema(description = "权属信息 null 无 0权属 1非权属") + private String ownership; + + @Schema(description = "部门信息") + private String department; + + @Schema(description = "所属街道") + private String street; + + @Schema(description = "所属公司", example = "26510") + private String companyid; + + @Schema(description = "来电人姓名", example = "芋艿") + private String callName; + + @Schema(description = "来电人手机号") + private String callTel; + + @Schema(description = "接件时间") + private LocalDateTime acceptcasetime; + + @Schema(description = "截止时间") + private LocalDateTime endTime; + + @Schema(description = "详细地址") + private String address; + + @Schema(description = "工单内容") + private String content; + + @Schema(description = "工单照片") + private String casepic; + + @Schema(description = "是否派巡查") + private String dispatcher; + + @Schema(description = "巡查员") + private String dispperson; + + @Schema(description = "完成情况") + private String replyResult; + + @Schema(description = "完成图片1") + private String picResult1; + + @Schema(description = "完成图片2") + private String picResult2; + + @Schema(description = "完成图片3") + private String picResult3; + + @Schema(description = "工单完成时间") + private LocalDateTime finishTime; + + @Schema(description = "回复居民时间") + private LocalDateTime replayrtime; + + @Schema(description = "权属单位") + private String ownercompany; + + @Schema(description = "工单类型", example = "2") + private String casetype; + + @Schema(description = "办理结果:字典") + private String handingresult; + + @Schema(description = "处理情况") + private String resolvedesp; + + @Schema(description = "处理情况") + private String rstResolvedesp; + + @Schema(description = "转单人") + private String dealBy; + + @Schema(description = "上报时间") + private LocalDateTime dealTime; + + @Schema(description = "创建人") + private String createBy; + + @Schema(description = "修改人") + private String updateBy; + + @Schema(description = "结果录入人") + private String replayBy; + + @Schema(description = "回复时间,结果录入时间") + private LocalDateTime replayTime; + + @Schema(description = "确认权属人") + private String ownershipBy; + + @Schema(description = "确认权属时间") + private LocalDateTime ownershipTime; + + @Schema(description = "防止重复派单:1已经发送") + private String reserve1; + + @Schema(description = "小程序派单状态:1 待派单,2 派单中 3 派单处理完成") + private String reserve2; + + @Schema(description = "备注3") + private String reserve3; + +} \ No newline at end of file diff --git a/urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/hotlinefile/HotlineFileController.java b/urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/hotlinefile/HotlineFileController.java new file mode 100644 index 0000000..53bb300 --- /dev/null +++ b/urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/hotlinefile/HotlineFileController.java @@ -0,0 +1,104 @@ +package com.zteits.urbanops.module.garden.controller.admin.hotlinefile; + +import org.springframework.web.bind.annotation.*; +import jakarta.annotation.Resource; +import org.springframework.validation.annotation.Validated; +import org.springframework.security.access.prepost.PreAuthorize; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Operation; + +import jakarta.validation.constraints.*; +import jakarta.validation.*; +import jakarta.servlet.http.*; +import java.util.*; +import java.io.IOException; + +import com.zteits.urbanops.framework.common.pojo.PageParam; +import com.zteits.urbanops.framework.common.pojo.PageResult; +import com.zteits.urbanops.framework.common.pojo.CommonResult; +import com.zteits.urbanops.framework.common.util.object.BeanUtils; +import static com.zteits.urbanops.framework.common.pojo.CommonResult.success; + +import com.zteits.urbanops.framework.excel.core.util.ExcelUtils; + +import com.zteits.urbanops.framework.apilog.core.annotation.ApiAccessLog; +import static com.zteits.urbanops.framework.apilog.core.enums.OperateTypeEnum.*; + +import com.zteits.urbanops.module.garden.controller.admin.hotlinefile.vo.*; +import com.zteits.urbanops.module.garden.dal.dataobject.hotlinefile.HotlineFileDO; +import com.zteits.urbanops.module.garden.service.hotlinefile.HotlineFileService; + +@Tag(name = "管理后台 - 12345案件-文件") +@RestController +@RequestMapping("/garden/hotline-file") +@Validated +public class HotlineFileController { + + @Resource + private HotlineFileService hotlineFileService; + + @PostMapping("/create") + @Operation(summary = "创建12345案件-文件") + @PreAuthorize("@ss.hasPermission('garden:hotline-file:create')") + public CommonResult createHotlineFile(@Valid @RequestBody HotlineFileSaveReqVO createReqVO) { + return success(hotlineFileService.createHotlineFile(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新12345案件-文件") + @PreAuthorize("@ss.hasPermission('garden:hotline-file:update')") + public CommonResult updateHotlineFile(@Valid @RequestBody HotlineFileSaveReqVO updateReqVO) { + hotlineFileService.updateHotlineFile(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除12345案件-文件") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('garden:hotline-file:delete')") + public CommonResult deleteHotlineFile(@RequestParam("id") String id) { + hotlineFileService.deleteHotlineFile(id); + return success(true); + } + + @DeleteMapping("/delete-list") + @Parameter(name = "ids", description = "编号", required = true) + @Operation(summary = "批量删除12345案件-文件") + @PreAuthorize("@ss.hasPermission('garden:hotline-file:delete')") + public CommonResult deleteHotlineFileList(@RequestParam("ids") List ids) { + hotlineFileService.deleteHotlineFileListByIds(ids); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得12345案件-文件") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('garden:hotline-file:query')") + public CommonResult getHotlineFile(@RequestParam("id") String id) { + HotlineFileDO hotlineFile = hotlineFileService.getHotlineFile(id); + return success(BeanUtils.toBean(hotlineFile, HotlineFileRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得12345案件-文件分页") + @PreAuthorize("@ss.hasPermission('garden:hotline-file:query')") + public CommonResult> getHotlineFilePage(@Valid HotlineFilePageReqVO pageReqVO) { + PageResult pageResult = hotlineFileService.getHotlineFilePage(pageReqVO); + return success(BeanUtils.toBean(pageResult, HotlineFileRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出12345案件-文件 Excel") + @PreAuthorize("@ss.hasPermission('garden:hotline-file:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportHotlineFileExcel(@Valid HotlineFilePageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = hotlineFileService.getHotlineFilePage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "12345案件-文件.xls", "数据", HotlineFileRespVO.class, + BeanUtils.toBean(list, HotlineFileRespVO.class)); + } + +} \ No newline at end of file diff --git a/urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/hotlinefile/vo/HotlineFilePageReqVO.java b/urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/hotlinefile/vo/HotlineFilePageReqVO.java new file mode 100644 index 0000000..7d61398 --- /dev/null +++ b/urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/hotlinefile/vo/HotlineFilePageReqVO.java @@ -0,0 +1,29 @@ +package com.zteits.urbanops.module.garden.controller.admin.hotlinefile.vo; + +import lombok.*; +import java.util.*; +import io.swagger.v3.oas.annotations.media.Schema; +import com.zteits.urbanops.framework.common.pojo.PageParam; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; + +import static com.zteits.urbanops.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@Schema(description = "管理后台 - 12345案件-文件分页 Request VO") +@Data +public class HotlineFilePageReqVO extends PageParam { + + @Schema(description = "12345案件id", example = "21278") + private String caseId; + + @Schema(description = "文件id", example = "28882") + private String fileid; + + @Schema(description = "文件类型(办理文件、挂账文件、剔除文件等)", example = "2") + private String filetype; + + @Schema(description = "文件上传时间") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] updatetime; + +} \ No newline at end of file diff --git a/urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/hotlinefile/vo/HotlineFileRespVO.java b/urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/hotlinefile/vo/HotlineFileRespVO.java new file mode 100644 index 0000000..0bbd655 --- /dev/null +++ b/urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/hotlinefile/vo/HotlineFileRespVO.java @@ -0,0 +1,31 @@ +package com.zteits.urbanops.module.garden.controller.admin.hotlinefile.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import java.util.*; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; +import cn.idev.excel.annotation.*; + +@Schema(description = "管理后台 - 12345案件-文件 Response VO") +@Data +@ExcelIgnoreUnannotated +public class HotlineFileRespVO { + + @Schema(description = "12345案件id", example = "21278") + @ExcelProperty("12345案件id") + private String caseId; + + @Schema(description = "文件id", example = "28882") + @ExcelProperty("文件id") + private String fileid; + + @Schema(description = "文件类型(办理文件、挂账文件、剔除文件等)", example = "2") + @ExcelProperty("文件类型(办理文件、挂账文件、剔除文件等)") + private String filetype; + + @Schema(description = "文件上传时间") + @ExcelProperty("文件上传时间") + private LocalDateTime updatetime; + +} \ No newline at end of file diff --git a/urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/hotlinefile/vo/HotlineFileSaveReqVO.java b/urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/hotlinefile/vo/HotlineFileSaveReqVO.java new file mode 100644 index 0000000..34eae36 --- /dev/null +++ b/urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/hotlinefile/vo/HotlineFileSaveReqVO.java @@ -0,0 +1,26 @@ +package com.zteits.urbanops.module.garden.controller.admin.hotlinefile.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import java.util.*; +import jakarta.validation.constraints.*; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; + +@Schema(description = "管理后台 - 12345案件-文件新增/修改 Request VO") +@Data +public class HotlineFileSaveReqVO { + + @Schema(description = "12345案件id", example = "21278") + private String caseId; + + @Schema(description = "文件id", example = "28882") + private String fileid; + + @Schema(description = "文件类型(办理文件、挂账文件、剔除文件等)", example = "2") + private String filetype; + + @Schema(description = "文件上传时间") + private LocalDateTime updatetime; + +} \ No newline at end of file diff --git a/urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/dataobject/hotline/HotlineCaseDO.java b/urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/dataobject/hotline/HotlineCaseDO.java deleted file mode 100644 index bade320..0000000 --- a/urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/dataobject/hotline/HotlineCaseDO.java +++ /dev/null @@ -1,25 +0,0 @@ -package com.zteits.urbanops.module.garden.dal.dataobject.hotline; - -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; -import com.fasterxml.jackson.annotation.JsonFormat; -import com.zteits.urbanops.framework.mybatis.core.dataobject.BaseDO; -import lombok.Data; - -import java.util.Date; - -@TableName("garden_hotline_case") -@Data -public class HotlineCaseDO extends BaseDO { - @TableId - private String id; - private String hotlinenumber; - private String casefile; - private String title; - private String content; - private String department; - private String taskstate; - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private Date replayTime; - private String street; -} \ No newline at end of file diff --git a/urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/dataobject/hotline/HotlineFileDO.java b/urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/dataobject/hotline/HotlineFileDO.java deleted file mode 100644 index 946f0f6..0000000 --- a/urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/dataobject/hotline/HotlineFileDO.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.zteits.urbanops.module.garden.dal.dataobject.hotline; - -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; -import com.zteits.urbanops.framework.mybatis.core.dataobject.BaseDO; -import lombok.Data; - -@TableName("garden_hotline_file") -@Data -public class HotlineFileDO extends BaseDO { - @TableId - private String caseid; - private String casefile; - private String title; - private String content; -} \ No newline at end of file diff --git a/urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/dataobject/hotlinecase/HotlineCaseDO.java b/urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/dataobject/hotlinecase/HotlineCaseDO.java new file mode 100644 index 0000000..7631b85 --- /dev/null +++ b/urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/dataobject/hotlinecase/HotlineCaseDO.java @@ -0,0 +1,207 @@ +package com.zteits.urbanops.module.garden.dal.dataobject.hotlinecase; + +import lombok.*; +import java.util.*; +import java.time.LocalDateTime; +import java.time.LocalDateTime; +import java.time.LocalDateTime; +import java.time.LocalDateTime; +import java.time.LocalDateTime; +import java.time.LocalDateTime; +import java.time.LocalDateTime; +import java.time.LocalDateTime; +import java.time.LocalDateTime; +import com.baomidou.mybatisplus.annotation.*; +import com.zteits.urbanops.framework.mybatis.core.dataobject.BaseDO; + +/** + * 12345案件信息 DO + * + * @author 超级管理员 + */ +@TableName("garden_hotline_case") +@KeySequence("garden_hotline_case_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class HotlineCaseDO extends BaseDO { + + /** + * id + */ + @TableId(type = IdType.INPUT) + private String id; + /** + * 工单编号 + */ + private String hotlinenumber; + /** + * 12345工单文件 + */ + private String casefile; + /** + * 事间来源:默认12345 + */ + private String eventsouce; + /** + * 工单来源:集团 分公司 + */ + private String casesource; + /** + * 市级编号 + */ + private String citynum; + /** + * 区级编号 + */ + private String regionnum; + /** + * 工单状态 + */ + private String taskstate; + /** + * 权属信息 null 无 0权属 1非权属 + */ + private String ownership; + /** + * 部门信息 + */ + private String department; + /** + * 所属街道 + */ + private String street; + /** + * 所属公司 + */ + private String companyid; + /** + * 来电人姓名 + */ + private String callName; + /** + * 来电人手机号 + */ + private String callTel; + /** + * 接件时间 + */ + private LocalDateTime acceptcasetime; + /** + * 截止时间 + */ + private LocalDateTime endTime; + /** + * 详细地址 + */ + private String address; + /** + * 工单内容 + */ + private String content; + /** + * 工单照片 + */ + private String casepic; + /** + * 是否派巡查 + */ + private String dispatcher; + /** + * 巡查员 + */ + private String dispperson; + /** + * 完成情况 + */ + private String replyResult; + /** + * 完成图片1 + */ + private String picResult1; + /** + * 完成图片2 + */ + private String picResult2; + /** + * 完成图片3 + */ + private String picResult3; + /** + * 工单完成时间 + */ + private LocalDateTime finishTime; + /** + * 回复居民时间 + */ + private LocalDateTime replayrtime; + /** + * 权属单位 + */ + private String ownercompany; + /** + * 工单类型 + */ + private String casetype; + /** + * 办理结果:字典 + */ + private String handingresult; + /** + * 处理情况 + */ + private String resolvedesp; + /** + * 处理情况 + */ + private String rstResolvedesp; + /** + * 转单人 + */ + private String dealBy; + /** + * 上报时间 + */ + private LocalDateTime dealTime; + /** + * 创建人 + */ + private String createBy; + /** + * 修改人 + */ + private String updateBy; + /** + * 结果录入人 + */ + private String replayBy; + /** + * 回复时间,结果录入时间 + */ + private LocalDateTime replayTime; + /** + * 确认权属人 + */ + private String ownershipBy; + /** + * 确认权属时间 + */ + private LocalDateTime ownershipTime; + /** + * 防止重复派单:1已经发送 + */ + private String reserve1; + /** + * 小程序派单状态:1 待派单,2 派单中 3 派单处理完成 + */ + private String reserve2; + /** + * 备注3 + */ + private String reserve3; + + +} \ No newline at end of file diff --git a/urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/dataobject/hotlinefile/HotlineFileDO.java b/urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/dataobject/hotlinefile/HotlineFileDO.java new file mode 100644 index 0000000..b1e2adc --- /dev/null +++ b/urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/dataobject/hotlinefile/HotlineFileDO.java @@ -0,0 +1,43 @@ +package com.zteits.urbanops.module.garden.dal.dataobject.hotlinefile; + +import lombok.*; +import java.util.*; +import java.time.LocalDateTime; +import com.baomidou.mybatisplus.annotation.*; +import com.zteits.urbanops.framework.mybatis.core.dataobject.BaseDO; + +/** + * 12345案件-文件 DO + * + * @author 超级管理员 + */ +@TableName("garden_hotline_file") +@KeySequence("garden_hotline_file_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class HotlineFileDO extends BaseDO { + + /** + * 12345案件id + */ + @TableId(type = IdType.INPUT) + private String caseId; + /** + * 文件id + */ + private String fileid; + /** + * 文件类型(办理文件、挂账文件、剔除文件等) + */ + private String filetype; + /** + * 文件上传时间 + */ + private LocalDateTime updatetime; + + +} \ No newline at end of file diff --git a/urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/mysql/hotline/HotlineCaseMapper.java b/urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/mysql/hotline/HotlineCaseMapper.java deleted file mode 100644 index e8fade7..0000000 --- a/urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/mysql/hotline/HotlineCaseMapper.java +++ /dev/null @@ -1,19 +0,0 @@ -package com.zteits.urbanops.module.garden.dal.mysql.hotline; - -import com.zteits.urbanops.framework.common.pojo.PageResult; -import com.zteits.urbanops.framework.mybatis.core.mapper.BaseMapperX; -import com.zteits.urbanops.framework.mybatis.core.query.LambdaQueryWrapperX; -import com.zteits.urbanops.module.garden.dal.dataobject.hotline.HotlineCaseDO; -import org.apache.ibatis.annotations.Mapper; - -@Mapper -public interface HotlineCaseMapper extends BaseMapperX { - default PageResult selectPage(com.zteits.urbanops.framework.common.pojo.PageParam pageParam, HotlineCaseDO where) { - return selectPage(pageParam, null, new LambdaQueryWrapperX() - .likeIfPresent(HotlineCaseDO::getTitle, where.getTitle()) - .likeIfPresent(HotlineCaseDO::getContent, where.getContent()) - .eqIfPresent(HotlineCaseDO::getDepartment, where.getDepartment()) - .eqIfPresent(HotlineCaseDO::getTaskstate, where.getTaskstate()) - .orderByDesc(HotlineCaseDO::getUpdateTime)); - } -} \ No newline at end of file diff --git a/urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/mysql/hotline/HotlineFileMapper.java b/urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/mysql/hotline/HotlineFileMapper.java deleted file mode 100644 index d6baa55..0000000 --- a/urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/mysql/hotline/HotlineFileMapper.java +++ /dev/null @@ -1,17 +0,0 @@ -package com.zteits.urbanops.module.garden.dal.mysql.hotline; - -import com.zteits.urbanops.framework.mybatis.core.mapper.BaseMapperX; -import com.zteits.urbanops.framework.mybatis.core.query.LambdaQueryWrapperX; -import com.zteits.urbanops.module.garden.dal.dataobject.hotline.HotlineFileDO; -import org.apache.ibatis.annotations.Mapper; - -import java.util.List; - -@Mapper -public interface HotlineFileMapper extends BaseMapperX { - default List selectList(HotlineFileDO where) { - return selectList(new LambdaQueryWrapperX() - .likeIfPresent(HotlineFileDO::getTitle, where.getTitle()) - .likeIfPresent(HotlineFileDO::getContent, where.getContent())); - } -} \ No newline at end of file diff --git a/urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/mysql/hotlinecase/HotlineCaseMapper.java b/urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/mysql/hotlinecase/HotlineCaseMapper.java new file mode 100644 index 0000000..4494131 --- /dev/null +++ b/urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/mysql/hotlinecase/HotlineCaseMapper.java @@ -0,0 +1,68 @@ +package com.zteits.urbanops.module.garden.dal.mysql.hotlinecase; + +import java.util.*; + +import com.zteits.urbanops.framework.common.pojo.PageResult; +import com.zteits.urbanops.framework.mybatis.core.query.LambdaQueryWrapperX; +import com.zteits.urbanops.framework.mybatis.core.mapper.BaseMapperX; +import com.zteits.urbanops.module.garden.dal.dataobject.hotlinecase.HotlineCaseDO; +import org.apache.ibatis.annotations.Mapper; +import com.zteits.urbanops.module.garden.controller.admin.hotlinecase.vo.*; + +/** + * 12345案件信息 Mapper + * + * @author 超级管理员 + */ +@Mapper +public interface HotlineCaseMapper extends BaseMapperX { + + default PageResult selectPage(HotlineCasePageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .eqIfPresent(HotlineCaseDO::getHotlinenumber, reqVO.getHotlinenumber()) + .eqIfPresent(HotlineCaseDO::getCasefile, reqVO.getCasefile()) + .eqIfPresent(HotlineCaseDO::getEventsouce, reqVO.getEventsouce()) + .eqIfPresent(HotlineCaseDO::getCasesource, reqVO.getCasesource()) + .eqIfPresent(HotlineCaseDO::getCitynum, reqVO.getCitynum()) + .eqIfPresent(HotlineCaseDO::getRegionnum, reqVO.getRegionnum()) + .eqIfPresent(HotlineCaseDO::getTaskstate, reqVO.getTaskstate()) + .eqIfPresent(HotlineCaseDO::getOwnership, reqVO.getOwnership()) + .eqIfPresent(HotlineCaseDO::getDepartment, reqVO.getDepartment()) + .eqIfPresent(HotlineCaseDO::getStreet, reqVO.getStreet()) + .eqIfPresent(HotlineCaseDO::getCompanyid, reqVO.getCompanyid()) + .likeIfPresent(HotlineCaseDO::getCallName, reqVO.getCallName()) + .eqIfPresent(HotlineCaseDO::getCallTel, reqVO.getCallTel()) + .betweenIfPresent(HotlineCaseDO::getAcceptcasetime, reqVO.getAcceptcasetime()) + .betweenIfPresent(HotlineCaseDO::getEndTime, reqVO.getEndTime()) + .eqIfPresent(HotlineCaseDO::getAddress, reqVO.getAddress()) + .eqIfPresent(HotlineCaseDO::getContent, reqVO.getContent()) + .eqIfPresent(HotlineCaseDO::getCasepic, reqVO.getCasepic()) + .eqIfPresent(HotlineCaseDO::getDispatcher, reqVO.getDispatcher()) + .eqIfPresent(HotlineCaseDO::getDispperson, reqVO.getDispperson()) + .eqIfPresent(HotlineCaseDO::getReplyResult, reqVO.getReplyResult()) + .eqIfPresent(HotlineCaseDO::getPicResult1, reqVO.getPicResult1()) + .eqIfPresent(HotlineCaseDO::getPicResult2, reqVO.getPicResult2()) + .eqIfPresent(HotlineCaseDO::getPicResult3, reqVO.getPicResult3()) + .betweenIfPresent(HotlineCaseDO::getFinishTime, reqVO.getFinishTime()) + .betweenIfPresent(HotlineCaseDO::getReplayrtime, reqVO.getReplayrtime()) + .eqIfPresent(HotlineCaseDO::getOwnercompany, reqVO.getOwnercompany()) + .eqIfPresent(HotlineCaseDO::getCasetype, reqVO.getCasetype()) + .eqIfPresent(HotlineCaseDO::getHandingresult, reqVO.getHandingresult()) + .eqIfPresent(HotlineCaseDO::getResolvedesp, reqVO.getResolvedesp()) + .eqIfPresent(HotlineCaseDO::getRstResolvedesp, reqVO.getRstResolvedesp()) + .eqIfPresent(HotlineCaseDO::getDealBy, reqVO.getDealBy()) + .betweenIfPresent(HotlineCaseDO::getDealTime, reqVO.getDealTime()) + .eqIfPresent(HotlineCaseDO::getCreateBy, reqVO.getCreateBy()) + .betweenIfPresent(HotlineCaseDO::getCreateTime, reqVO.getCreateTime()) + .eqIfPresent(HotlineCaseDO::getUpdateBy, reqVO.getUpdateBy()) + .eqIfPresent(HotlineCaseDO::getReplayBy, reqVO.getReplayBy()) + .betweenIfPresent(HotlineCaseDO::getReplayTime, reqVO.getReplayTime()) + .eqIfPresent(HotlineCaseDO::getOwnershipBy, reqVO.getOwnershipBy()) + .betweenIfPresent(HotlineCaseDO::getOwnershipTime, reqVO.getOwnershipTime()) + .eqIfPresent(HotlineCaseDO::getReserve1, reqVO.getReserve1()) + .eqIfPresent(HotlineCaseDO::getReserve2, reqVO.getReserve2()) + .eqIfPresent(HotlineCaseDO::getReserve3, reqVO.getReserve3()) + .orderByDesc(HotlineCaseDO::getId)); + } + +} \ No newline at end of file diff --git a/urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/mysql/hotlinefile/HotlineFileMapper.java b/urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/mysql/hotlinefile/HotlineFileMapper.java new file mode 100644 index 0000000..c18e754 --- /dev/null +++ b/urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/mysql/hotlinefile/HotlineFileMapper.java @@ -0,0 +1,29 @@ +package com.zteits.urbanops.module.garden.dal.mysql.hotlinefile; + +import java.util.*; + +import com.zteits.urbanops.framework.common.pojo.PageResult; +import com.zteits.urbanops.framework.mybatis.core.query.LambdaQueryWrapperX; +import com.zteits.urbanops.framework.mybatis.core.mapper.BaseMapperX; +import com.zteits.urbanops.module.garden.dal.dataobject.hotlinefile.HotlineFileDO; +import org.apache.ibatis.annotations.Mapper; +import com.zteits.urbanops.module.garden.controller.admin.hotlinefile.vo.*; + +/** + * 12345案件-文件 Mapper + * + * @author 超级管理员 + */ +@Mapper +public interface HotlineFileMapper extends BaseMapperX { + + default PageResult selectPage(HotlineFilePageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .eqIfPresent(HotlineFileDO::getCaseId, reqVO.getCaseId()) + .eqIfPresent(HotlineFileDO::getFileid, reqVO.getFileid()) + .eqIfPresent(HotlineFileDO::getFiletype, reqVO.getFiletype()) + .betweenIfPresent(HotlineFileDO::getUpdatetime, reqVO.getUpdatetime()) + .orderByDesc(HotlineFileDO::getCaseId)); + } + +} \ No newline at end of file diff --git a/urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/enums/ErrorCodeConstants.java b/urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/enums/ErrorCodeConstants.java index 181cb14..f403f9d 100644 --- a/urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/enums/ErrorCodeConstants.java +++ b/urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/enums/ErrorCodeConstants.java @@ -77,6 +77,12 @@ public interface ErrorCodeConstants { ErrorCode MATERIAL_NOT_EXISTS = new ErrorCode(1-100-004-003, "耗材管理不存在"); + + ErrorCode HOTLINE_FILE_NOT_EXISTS = new ErrorCode(1-300-001-001, "12345案件-文件不存在"); + + ErrorCode HOTLINE_CASE_NOT_EXISTS = new ErrorCode(1-300-001-002, "12345案件-案件不存在"); + + ErrorCode MATERIAL_INVENTORY_IN_NOT_EXISTS = new ErrorCode(1-100-004-004, "物料入库不存在"); ErrorCode MATERIAL_INVENTORY_OUT_NOT_EXISTS = new ErrorCode(1-100-004-005, "物料出库不存在"); diff --git a/urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/hotline/HotlineCaseService.java b/urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/hotline/HotlineCaseService.java deleted file mode 100644 index 7928efa..0000000 --- a/urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/hotline/HotlineCaseService.java +++ /dev/null @@ -1,14 +0,0 @@ -package com.zteits.urbanops.module.garden.service.hotline; - -import com.zteits.urbanops.framework.common.pojo.PageParam; -import com.zteits.urbanops.framework.common.pojo.PageResult; -import com.zteits.urbanops.module.garden.dal.dataobject.hotline.HotlineCaseDO; - -public interface HotlineCaseService { - PageResult selectPage(PageParam pageParam, HotlineCaseDO where); - HotlineCaseDO selectById(String id); - Boolean insert(HotlineCaseDO entity); - Boolean update(HotlineCaseDO entity); - Boolean deleteByIds(java.util.List ids); - com.zteits.urbanops.module.garden.controller.admin.hotline.vo.HotlineCaseDetailResp getDetail(String id); -} \ No newline at end of file diff --git a/urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/hotline/HotlineCaseServiceImpl.java b/urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/hotline/HotlineCaseServiceImpl.java deleted file mode 100644 index 3302b0e..0000000 --- a/urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/hotline/HotlineCaseServiceImpl.java +++ /dev/null @@ -1,64 +0,0 @@ -package com.zteits.urbanops.module.garden.service.hotline; - -import com.zteits.urbanops.framework.common.pojo.PageParam; -import com.zteits.urbanops.framework.common.pojo.PageResult; -import com.zteits.urbanops.module.garden.dal.dataobject.hotline.HotlineCaseDO; -import com.zteits.urbanops.module.garden.dal.dataobject.hotline.HotlineFileDO; -import com.zteits.urbanops.module.garden.dal.dataobject.photo.SysPhotoDO; -import com.zteits.urbanops.module.garden.dal.mysql.hotline.HotlineCaseMapper; -import com.zteits.urbanops.module.garden.dal.mysql.hotline.HotlineFileMapper; -import com.zteits.urbanops.module.garden.dal.mysql.photo.SysPhotoMapper; -import jakarta.annotation.Resource; -import org.springframework.stereotype.Service; - -import java.util.List; - -@Service -public class HotlineCaseServiceImpl implements HotlineCaseService { - - @Resource - private HotlineCaseMapper mapper; - @Resource(name = "hotlineFileMapper") - private HotlineFileMapper fileMapper; - @Resource - private SysPhotoMapper photoMapper; - - @Override - public PageResult selectPage(PageParam pageParam, HotlineCaseDO where) { - return mapper.selectPage(pageParam, where); - } - - @Override - public HotlineCaseDO selectById(String id) { - return mapper.selectById(id); - } - - @Override - public Boolean insert(HotlineCaseDO entity) { - return mapper.insert(entity) > 0; - } - - @Override - public Boolean update(HotlineCaseDO entity) { - return mapper.updateById(entity) > 0; - } - - @Override - public Boolean deleteByIds(List ids) { - return mapper.deleteBatchIds(ids) > 0; - } - - @Override - public com.zteits.urbanops.module.garden.controller.admin.hotline.vo.HotlineCaseDetailResp getDetail(String id) { - com.zteits.urbanops.module.garden.controller.admin.hotline.vo.HotlineCaseDetailResp resp = new com.zteits.urbanops.module.garden.controller.admin.hotline.vo.HotlineCaseDetailResp(); - resp.setCaseInfo(mapper.selectById(id)); - HotlineFileDO whereFile = new HotlineFileDO(); - whereFile.setCaseid(id); - java.util.List files = fileMapper.selectList(whereFile); - resp.setFiles(files); - SysPhotoDO wherePhoto = new SysPhotoDO(); - java.util.List photos = photoMapper.selectList(wherePhoto); - resp.setPhotos(photos); - return resp; - } -} \ No newline at end of file diff --git a/urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/hotline/HotlineFileService.java b/urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/hotline/HotlineFileService.java deleted file mode 100644 index 70c880d..0000000 --- a/urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/hotline/HotlineFileService.java +++ /dev/null @@ -1,15 +0,0 @@ -package com.zteits.urbanops.module.garden.service.hotline; - -import com.zteits.urbanops.module.garden.dal.dataobject.hotline.HotlineFileDO; -import org.springframework.web.multipart.MultipartFile; - -import java.util.List; - -public interface HotlineFileService { - Object parseFile(MultipartFile file) throws Exception; - List selectList(HotlineFileDO where); - HotlineFileDO selectById(String caseid); - Boolean insert(HotlineFileDO entity); - Boolean update(HotlineFileDO entity); - Boolean deleteByIds(List ids); -} \ No newline at end of file diff --git a/urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/hotline/HotlineFileServiceImpl.java b/urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/hotline/HotlineFileServiceImpl.java deleted file mode 100644 index fbe9b30..0000000 --- a/urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/hotline/HotlineFileServiceImpl.java +++ /dev/null @@ -1,46 +0,0 @@ -package com.zteits.urbanops.module.garden.service.hotline; - -import com.zteits.urbanops.module.garden.dal.dataobject.hotline.HotlineFileDO; -import com.zteits.urbanops.module.garden.dal.mysql.hotline.HotlineFileMapper; -import jakarta.annotation.Resource; -import org.springframework.stereotype.Service; -import org.springframework.web.multipart.MultipartFile; - -import java.util.List; - -@Service -public class HotlineFileServiceImpl implements HotlineFileService { - - @Resource - private HotlineFileMapper mapper; - - @Override - public Object parseFile(MultipartFile file) throws Exception { - return java.util.Collections.emptyMap(); - } - - @Override - public List selectList(HotlineFileDO where) { - return mapper.selectList(where); - } - - @Override - public HotlineFileDO selectById(String caseid) { - return mapper.selectById(caseid); - } - - @Override - public Boolean insert(HotlineFileDO entity) { - return mapper.insert(entity) > 0; - } - - @Override - public Boolean update(HotlineFileDO entity) { - return mapper.updateById(entity) > 0; - } - - @Override - public Boolean deleteByIds(List ids) { - return mapper.deleteBatchIds(ids) > 0; - } -} \ No newline at end of file diff --git a/urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/hotlinecase/HotlineCaseService.java b/urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/hotlinecase/HotlineCaseService.java new file mode 100644 index 0000000..b1d317d --- /dev/null +++ b/urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/hotlinecase/HotlineCaseService.java @@ -0,0 +1,62 @@ +package com.zteits.urbanops.module.garden.service.hotlinecase; + +import java.util.*; +import jakarta.validation.*; +import com.zteits.urbanops.module.garden.controller.admin.hotlinecase.vo.*; +import com.zteits.urbanops.module.garden.dal.dataobject.hotlinecase.HotlineCaseDO; +import com.zteits.urbanops.framework.common.pojo.PageResult; +import com.zteits.urbanops.framework.common.pojo.PageParam; + +/** + * 12345案件信息 Service 接口 + * + * @author 超级管理员 + */ +public interface HotlineCaseService { + + /** + * 创建12345案件信息 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + String createHotlineCase(@Valid HotlineCaseSaveReqVO createReqVO); + + /** + * 更新12345案件信息 + * + * @param updateReqVO 更新信息 + */ + void updateHotlineCase(@Valid HotlineCaseSaveReqVO updateReqVO); + + /** + * 删除12345案件信息 + * + * @param id 编号 + */ + void deleteHotlineCase(String id); + + /** + * 批量删除12345案件信息 + * + * @param ids 编号 + */ + void deleteHotlineCaseListByIds(List ids); + + /** + * 获得12345案件信息 + * + * @param id 编号 + * @return 12345案件信息 + */ + HotlineCaseDO getHotlineCase(String id); + + /** + * 获得12345案件信息分页 + * + * @param pageReqVO 分页查询 + * @return 12345案件信息分页 + */ + PageResult getHotlineCasePage(HotlineCasePageReqVO pageReqVO); + +} \ No newline at end of file diff --git a/urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/hotlinecase/HotlineCaseServiceImpl.java b/urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/hotlinecase/HotlineCaseServiceImpl.java new file mode 100644 index 0000000..0d1567c --- /dev/null +++ b/urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/hotlinecase/HotlineCaseServiceImpl.java @@ -0,0 +1,80 @@ +package com.zteits.urbanops.module.garden.service.hotlinecase; + +import com.zteits.urbanops.framework.common.pojo.PageResult; +import com.zteits.urbanops.framework.common.util.object.BeanUtils; +import com.zteits.urbanops.module.garden.controller.admin.hotlinecase.vo.HotlineCasePageReqVO; +import com.zteits.urbanops.module.garden.controller.admin.hotlinecase.vo.HotlineCaseSaveReqVO; +import com.zteits.urbanops.module.garden.dal.dataobject.hotlinecase.HotlineCaseDO; +import com.zteits.urbanops.module.garden.dal.mysql.hotlinecase.HotlineCaseMapper; +import jakarta.annotation.Resource; +import org.springframework.stereotype.Service; +import org.springframework.validation.annotation.Validated; + +import java.util.List; + +import static com.zteits.urbanops.framework.common.exception.util.ServiceExceptionUtil.exception; +import static com.zteits.urbanops.module.garden.enums.ErrorCodeConstants.HOTLINE_CASE_NOT_EXISTS; + +/** + * 12345案件信息 Service 实现类 + * + * @author 超级管理员 + */ +@Service +@Validated +public class HotlineCaseServiceImpl implements HotlineCaseService { + + @Resource + private HotlineCaseMapper hotlineCaseMapper; + + @Override + public String createHotlineCase(HotlineCaseSaveReqVO createReqVO) { + // 插入 + HotlineCaseDO hotlineCase = BeanUtils.toBean(createReqVO, HotlineCaseDO.class); + hotlineCaseMapper.insert(hotlineCase); + + // 返回 + return hotlineCase.getId(); + } + + @Override + public void updateHotlineCase(HotlineCaseSaveReqVO updateReqVO) { + // 校验存在 + validateHotlineCaseExists(updateReqVO.getId()); + // 更新 + HotlineCaseDO updateObj = BeanUtils.toBean(updateReqVO, HotlineCaseDO.class); + hotlineCaseMapper.updateById(updateObj); + } + + @Override + public void deleteHotlineCase(String id) { + // 校验存在 + validateHotlineCaseExists(id); + // 删除 + hotlineCaseMapper.deleteById(id); + } + + @Override + public void deleteHotlineCaseListByIds(List ids) { + // 删除 + hotlineCaseMapper.deleteByIds(ids); + } + + + private void validateHotlineCaseExists(String id) { + if (hotlineCaseMapper.selectById(id) == null) { + throw exception(HOTLINE_CASE_NOT_EXISTS); + } + } + + @Override + public HotlineCaseDO getHotlineCase(String id) { + return hotlineCaseMapper.selectById(id); + } + + @Override + public PageResult getHotlineCasePage(HotlineCasePageReqVO pageReqVO) { + return hotlineCaseMapper.selectPage(pageReqVO); + } + +} \ No newline at end of file diff --git a/urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/hotlinefile/HotlineFileService.java b/urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/hotlinefile/HotlineFileService.java new file mode 100644 index 0000000..23e7827 --- /dev/null +++ b/urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/hotlinefile/HotlineFileService.java @@ -0,0 +1,62 @@ +package com.zteits.urbanops.module.garden.service.hotlinefile; + +import java.util.*; +import jakarta.validation.*; +import com.zteits.urbanops.module.garden.controller.admin.hotlinefile.vo.*; +import com.zteits.urbanops.module.garden.dal.dataobject.hotlinefile.HotlineFileDO; +import com.zteits.urbanops.framework.common.pojo.PageResult; +import com.zteits.urbanops.framework.common.pojo.PageParam; + +/** + * 12345案件-文件 Service 接口 + * + * @author 超级管理员 + */ +public interface HotlineFileService { + + /** + * 创建12345案件-文件 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + String createHotlineFile(@Valid HotlineFileSaveReqVO createReqVO); + + /** + * 更新12345案件-文件 + * + * @param updateReqVO 更新信息 + */ + void updateHotlineFile(@Valid HotlineFileSaveReqVO updateReqVO); + + /** + * 删除12345案件-文件 + * + * @param id 编号 + */ + void deleteHotlineFile(String id); + + /** + * 批量删除12345案件-文件 + * + * @param ids 编号 + */ + void deleteHotlineFileListByIds(List ids); + + /** + * 获得12345案件-文件 + * + * @param id 编号 + * @return 12345案件-文件 + */ + HotlineFileDO getHotlineFile(String id); + + /** + * 获得12345案件-文件分页 + * + * @param pageReqVO 分页查询 + * @return 12345案件-文件分页 + */ + PageResult getHotlineFilePage(HotlineFilePageReqVO pageReqVO); + +} \ No newline at end of file diff --git a/urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/hotlinefile/HotlineFileServiceImpl.java b/urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/hotlinefile/HotlineFileServiceImpl.java new file mode 100644 index 0000000..6d69b32 --- /dev/null +++ b/urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/hotlinefile/HotlineFileServiceImpl.java @@ -0,0 +1,85 @@ +package com.zteits.urbanops.module.garden.service.hotlinefile; + +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.garden.controller.admin.hotlinefile.vo.*; +import com.zteits.urbanops.module.garden.dal.dataobject.hotlinefile.HotlineFileDO; +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.garden.dal.mysql.hotlinefile.HotlineFileMapper; + +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.garden.enums.ErrorCodeConstants.*; + +/** + * 12345案件-文件 Service 实现类 + * + * @author 超级管理员 + */ +@Service +@Validated +public class HotlineFileServiceImpl implements HotlineFileService { + + @Resource + private HotlineFileMapper hotlineFileMapper; + + @Override + public String createHotlineFile(HotlineFileSaveReqVO createReqVO) { + // 插入 + HotlineFileDO hotlineFile = BeanUtils.toBean(createReqVO, HotlineFileDO.class); + hotlineFileMapper.insert(hotlineFile); + + // 返回 + return hotlineFile.getFileid(); + } + + @Override + public void updateHotlineFile(HotlineFileSaveReqVO updateReqVO) { + // 校验存在 + validateHotlineFileExists(updateReqVO.getFileid()); + // 更新 + HotlineFileDO updateObj = BeanUtils.toBean(updateReqVO, HotlineFileDO.class); + hotlineFileMapper.updateById(updateObj); + } + + @Override + public void deleteHotlineFile(String id) { + // 校验存在 + validateHotlineFileExists(id); + // 删除 + hotlineFileMapper.deleteById(id); + } + + @Override + public void deleteHotlineFileListByIds(List ids) { + // 删除 + hotlineFileMapper.deleteByIds(ids); + } + + + private void validateHotlineFileExists(String id) { + if (hotlineFileMapper.selectById(id) == null) { + throw exception(HOTLINE_FILE_NOT_EXISTS); + } + } + + @Override + public HotlineFileDO getHotlineFile(String id) { + return hotlineFileMapper.selectById(id); + } + + @Override + public PageResult getHotlineFilePage(HotlineFilePageReqVO pageReqVO) { + return hotlineFileMapper.selectPage(pageReqVO); + } + +} \ No newline at end of file diff --git a/urbanops-module-garden/src/main/resources/mapper/hotlinecase/HotlineCaseMapper.xml b/urbanops-module-garden/src/main/resources/mapper/hotlinecase/HotlineCaseMapper.xml new file mode 100644 index 0000000..b032873 --- /dev/null +++ b/urbanops-module-garden/src/main/resources/mapper/hotlinecase/HotlineCaseMapper.xml @@ -0,0 +1,12 @@ + + + + + + + \ No newline at end of file diff --git a/urbanops-module-garden/src/main/resources/mapper/hotlinefile/HotlineFileMapper.xml b/urbanops-module-garden/src/main/resources/mapper/hotlinefile/HotlineFileMapper.xml new file mode 100644 index 0000000..e4e3f99 --- /dev/null +++ b/urbanops-module-garden/src/main/resources/mapper/hotlinefile/HotlineFileMapper.xml @@ -0,0 +1,12 @@ + + + + + + + \ No newline at end of file