Commit ef51d789aab6a686cac215d31ed0ec97a98097c7

Authored by 王彪总
2 parents b494f9b8 3b2a8cd1

Merge remote-tracking branch 'origin/dev'

Showing 21 changed files with 685 additions and 18 deletions
urbanops-module-bpm/src/main/java/com/zteits/urbanops/module/bpm/service/task/BpmTaskServiceImpl.java
... ... @@ -286,7 +286,14 @@ public class BpmTaskServiceImpl implements BpmTaskService {
286 286 || task.getCreateTime().before(DateUtils.of(pageVO.getCreateTime()[0]))
287 287 || task.getCreateTime().after(DateUtils.of(pageVO.getCreateTime()[1])));
288 288 }
289   - return new PageResult<>(tasks, count);
  289 +
  290 + // 过滤掉所有deleteReason = MI_END的任务,再进行遍历 解决管理端 或签任务展示 系统自动取消的问题
  291 + List<HistoricTaskInstance> nonMIEndTaskList = tasks.stream()
  292 + .filter(task -> !"MI_END".equals(task.getDeleteReason()))
  293 + .collect(Collectors.toList());
  294 +
  295 +
  296 + return new PageResult<>(nonMIEndTaskList, count);
290 297 }
291 298  
292 299 @Override
... ...
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/device/DeviceClockRecordController.java 0 → 100644
  1 +package com.zteits.urbanops.module.garden.controller.admin.device;
  2 +
  3 +import org.springframework.web.bind.annotation.*;
  4 +import jakarta.annotation.Resource;
  5 +import org.springframework.validation.annotation.Validated;
  6 +import org.springframework.security.access.prepost.PreAuthorize;
  7 +import io.swagger.v3.oas.annotations.tags.Tag;
  8 +import io.swagger.v3.oas.annotations.Parameter;
  9 +import io.swagger.v3.oas.annotations.Operation;
  10 +
  11 +import jakarta.validation.constraints.*;
  12 +import jakarta.validation.*;
  13 +import jakarta.servlet.http.*;
  14 +import java.util.*;
  15 +import java.io.IOException;
  16 +
  17 +import com.zteits.urbanops.framework.common.pojo.PageParam;
  18 +import com.zteits.urbanops.framework.common.pojo.PageResult;
  19 +import com.zteits.urbanops.framework.common.pojo.CommonResult;
  20 +import com.zteits.urbanops.framework.common.util.object.BeanUtils;
  21 +import static com.zteits.urbanops.framework.common.pojo.CommonResult.success;
  22 +
  23 +import com.zteits.urbanops.framework.excel.core.util.ExcelUtils;
  24 +
  25 +import com.zteits.urbanops.framework.apilog.core.annotation.ApiAccessLog;
  26 +import static com.zteits.urbanops.framework.apilog.core.enums.OperateTypeEnum.*;
  27 +
  28 +import com.zteits.urbanops.module.garden.controller.admin.device.vo.*;
  29 +import com.zteits.urbanops.module.garden.dal.dataobject.device.DeviceClockRecordDO;
  30 +import com.zteits.urbanops.module.garden.service.device.DeviceClockRecordService;
  31 +
  32 +@Tag(name = "管理后台 - 员工打卡记录")
  33 +@RestController
  34 +@RequestMapping("/garden/device-clock-record")
  35 +@Validated
  36 +public class DeviceClockRecordController {
  37 +
  38 + @Resource
  39 + private DeviceClockRecordService deviceClockRecordService;
  40 +
  41 + @PostMapping("/create")
  42 + @Operation(summary = "创建员工打卡记录")
  43 + @PreAuthorize("@ss.hasPermission('garden:device-clock-record:create')")
  44 + public CommonResult<Integer> createDeviceClockRecord(@Valid @RequestBody DeviceClockRecordSaveReqVO createReqVO) {
  45 + return success(deviceClockRecordService.createDeviceClockRecord(createReqVO));
  46 + }
  47 +
  48 + @PutMapping("/update")
  49 + @Operation(summary = "更新员工打卡记录")
  50 + @PreAuthorize("@ss.hasPermission('garden:device-clock-record:update')")
  51 + public CommonResult<Boolean> updateDeviceClockRecord(@Valid @RequestBody DeviceClockRecordSaveReqVO updateReqVO) {
  52 + deviceClockRecordService.updateDeviceClockRecord(updateReqVO);
  53 + return success(true);
  54 + }
  55 +
  56 + @DeleteMapping("/delete")
  57 + @Operation(summary = "删除员工打卡记录")
  58 + @Parameter(name = "id", description = "编号", required = true)
  59 + @PreAuthorize("@ss.hasPermission('garden:device-clock-record:delete')")
  60 + public CommonResult<Boolean> deleteDeviceClockRecord(@RequestParam("id") Integer id) {
  61 + deviceClockRecordService.deleteDeviceClockRecord(id);
  62 + return success(true);
  63 + }
  64 +
  65 + @DeleteMapping("/delete-list")
  66 + @Parameter(name = "ids", description = "编号", required = true)
  67 + @Operation(summary = "批量删除员工打卡记录")
  68 + @PreAuthorize("@ss.hasPermission('garden:device-clock-record:delete')")
  69 + public CommonResult<Boolean> deleteDeviceClockRecordList(@RequestParam("ids") List<Integer> ids) {
  70 + deviceClockRecordService.deleteDeviceClockRecordListByIds(ids);
  71 + return success(true);
  72 + }
  73 +
  74 + @GetMapping("/get")
  75 + @Operation(summary = "获得员工打卡记录")
  76 + @Parameter(name = "id", description = "编号", required = true, example = "1024")
  77 + @PreAuthorize("@ss.hasPermission('garden:device-clock-record:query')")
  78 + public CommonResult<DeviceClockRecordRespVO> getDeviceClockRecord(@RequestParam("id") Integer id) {
  79 + DeviceClockRecordDO deviceClockRecord = deviceClockRecordService.getDeviceClockRecord(id);
  80 + return success(BeanUtils.toBean(deviceClockRecord, DeviceClockRecordRespVO.class));
  81 + }
  82 +
  83 + @GetMapping("/page")
  84 + @Operation(summary = "获得员工打卡记录分页")
  85 + @PreAuthorize("@ss.hasPermission('garden:device-clock-record:query')")
  86 + public CommonResult<PageResult<DeviceClockRecordRespVO>> getDeviceClockRecordPage(@Valid DeviceClockRecordPageReqVO pageReqVO) {
  87 + PageResult<DeviceClockRecordDO> pageResult = deviceClockRecordService.getDeviceClockRecordPage(pageReqVO);
  88 + return success(BeanUtils.toBean(pageResult, DeviceClockRecordRespVO.class));
  89 + }
  90 +
  91 + @GetMapping("/export-excel")
  92 + @Operation(summary = "导出员工打卡记录 Excel")
  93 + @PreAuthorize("@ss.hasPermission('garden:device-clock-record:export')")
  94 + @ApiAccessLog(operateType = EXPORT)
  95 + public void exportDeviceClockRecordExcel(@Valid DeviceClockRecordPageReqVO pageReqVO,
  96 + HttpServletResponse response) throws IOException {
  97 + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
  98 + List<DeviceClockRecordDO> list = deviceClockRecordService.getDeviceClockRecordPage(pageReqVO).getList();
  99 + // 导出 Excel
  100 + ExcelUtils.write(response, "员工打卡记录.xls", "数据", DeviceClockRecordRespVO.class,
  101 + BeanUtils.toBean(list, DeviceClockRecordRespVO.class));
  102 + }
  103 +
  104 +}
0 105 \ No newline at end of file
... ...
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/device/vo/DeviceClockRecordPageReqVO.java 0 → 100644
  1 +package com.zteits.urbanops.module.garden.controller.admin.device.vo;
  2 +
  3 +import lombok.*;
  4 +import java.util.*;
  5 +import io.swagger.v3.oas.annotations.media.Schema;
  6 +import com.zteits.urbanops.framework.common.pojo.PageParam;
  7 +import java.math.BigDecimal;
  8 +import org.springframework.format.annotation.DateTimeFormat;
  9 +import java.time.LocalDateTime;
  10 +
  11 +import static com.zteits.urbanops.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
  12 +
  13 +@Schema(description = "管理后台 - 员工打卡记录分页 Request VO")
  14 +@Data
  15 +public class DeviceClockRecordPageReqVO extends PageParam {
  16 +
  17 + @Schema(description = "设备编码")
  18 + private String deviceCode;
  19 +
  20 + @Schema(description = "设备名称", example = "李四")
  21 + private String deviceName;
  22 +
  23 + @Schema(description = "打卡类型:上班/下班", example = "2")
  24 + private String punchType;
  25 +
  26 + @Schema(description = "高德GCJ02坐标系纬度")
  27 + private BigDecimal latGcj02;
  28 +
  29 + @Schema(description = "高德GCJ02坐标系经度")
  30 + private BigDecimal lngGcj02;
  31 +
  32 + @Schema(description = "详细地址")
  33 + private String address;
  34 +
  35 + @Schema(description = "84坐标经度")
  36 + private BigDecimal lng;
  37 +
  38 + @Schema(description = "84坐标纬度")
  39 + private BigDecimal lat;
  40 +
  41 + @Schema(description = "状态位")
  42 + private Integer statusBit;
  43 +
  44 + @Schema(description = "警告位")
  45 + private Integer warnBit;
  46 +
  47 + @Schema(description = "提交人用户ID", example = "20708")
  48 + private Long userId;
  49 +
  50 + @Schema(description = "用户昵称", example = "张三")
  51 + private String nickname;
  52 +
  53 + @Schema(description = "归属(一级部门id)", example = "10917")
  54 + private Long companyId;
  55 +
  56 + @Schema(description = "部门ID", example = "126")
  57 + private Long deptId;
  58 +
  59 + @Schema(description = "业务线: yl-园林;wy-物业:sz-市政;例如:yl,wy")
  60 + private String busiLine;
  61 +
  62 + @Schema(description = "创建时间")
  63 + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
  64 + private LocalDateTime[] createTime;
  65 +
  66 +}
0 67 \ No newline at end of file
... ...
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/device/vo/DeviceClockRecordRespVO.java 0 → 100644
  1 +package com.zteits.urbanops.module.garden.controller.admin.device.vo;
  2 +
  3 +import io.swagger.v3.oas.annotations.media.Schema;
  4 +import lombok.*;
  5 +import java.util.*;
  6 +import java.math.BigDecimal;
  7 +import org.springframework.format.annotation.DateTimeFormat;
  8 +import java.time.LocalDateTime;
  9 +import cn.idev.excel.annotation.*;
  10 +
  11 +@Schema(description = "管理后台 - 员工打卡记录 Response VO")
  12 +@Data
  13 +@ExcelIgnoreUnannotated
  14 +public class DeviceClockRecordRespVO {
  15 +
  16 + @Schema(description = "主键ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "10971")
  17 + @ExcelProperty("主键ID")
  18 + private Integer id;
  19 +
  20 + @Schema(description = "设备编码", requiredMode = Schema.RequiredMode.REQUIRED)
  21 + @ExcelProperty("设备编码")
  22 + private String deviceCode;
  23 +
  24 + @Schema(description = "设备名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四")
  25 + @ExcelProperty("设备名称")
  26 + private String deviceName;
  27 +
  28 + @Schema(description = "打卡类型:上班/下班", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
  29 + @ExcelProperty("打卡类型:上班/下班")
  30 + private String punchType;
  31 +
  32 + @Schema(description = "高德GCJ02坐标系纬度")
  33 + @ExcelProperty("高德GCJ02坐标系纬度")
  34 + private BigDecimal latGcj02;
  35 +
  36 + @Schema(description = "高德GCJ02坐标系经度")
  37 + @ExcelProperty("高德GCJ02坐标系经度")
  38 + private BigDecimal lngGcj02;
  39 +
  40 + @Schema(description = "详细地址")
  41 + @ExcelProperty("详细地址")
  42 + private String address;
  43 +
  44 + @Schema(description = "84坐标经度")
  45 + @ExcelProperty("84坐标经度")
  46 + private BigDecimal lng;
  47 +
  48 + @Schema(description = "84坐标纬度")
  49 + @ExcelProperty("84坐标纬度")
  50 + private BigDecimal lat;
  51 +
  52 + @Schema(description = "状态位")
  53 + @ExcelProperty("状态位")
  54 + private Integer statusBit;
  55 +
  56 + @Schema(description = "警告位")
  57 + @ExcelProperty("警告位")
  58 + private Integer warnBit;
  59 +
  60 + @Schema(description = "提交人用户ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "20708")
  61 + @ExcelProperty("提交人用户ID")
  62 + private Long userId;
  63 +
  64 + @Schema(description = "用户昵称", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三")
  65 + @ExcelProperty("用户昵称")
  66 + private String nickname;
  67 +
  68 + @Schema(description = "归属(一级部门id)", requiredMode = Schema.RequiredMode.REQUIRED, example = "10917")
  69 + @ExcelProperty("归属(一级部门id)")
  70 + private Long companyId;
  71 +
  72 + @Schema(description = "部门ID", example = "126")
  73 + @ExcelProperty("部门ID")
  74 + private Long deptId;
  75 +
  76 + @Schema(description = "业务线: yl-园林;wy-物业:sz-市政;例如:yl,wy", requiredMode = Schema.RequiredMode.REQUIRED)
  77 + @ExcelProperty("业务线: yl-园林;wy-物业:sz-市政;例如:yl,wy")
  78 + private String busiLine;
  79 +
  80 + @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
  81 + @ExcelProperty("创建时间")
  82 + private LocalDateTime createTime;
  83 +
  84 +}
0 85 \ No newline at end of file
... ...
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/device/vo/DeviceClockRecordSaveReqVO.java 0 → 100644
  1 +package com.zteits.urbanops.module.garden.controller.admin.device.vo;
  2 +
  3 +import io.swagger.v3.oas.annotations.media.Schema;
  4 +import lombok.*;
  5 +import java.util.*;
  6 +import jakarta.validation.constraints.*;
  7 +import java.math.BigDecimal;
  8 +
  9 +@Schema(description = "管理后台 - 员工打卡记录新增/修改 Request VO")
  10 +@Data
  11 +public class DeviceClockRecordSaveReqVO {
  12 +
  13 + @Schema(description = "主键ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "10971")
  14 + private Integer id;
  15 +
  16 + @Schema(description = "设备编码", requiredMode = Schema.RequiredMode.REQUIRED)
  17 + @NotEmpty(message = "设备编码不能为空")
  18 + private String deviceCode;
  19 +
  20 + @Schema(description = "设备名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四")
  21 + @NotEmpty(message = "设备名称不能为空")
  22 + private String deviceName;
  23 +
  24 + @Schema(description = "打卡类型:上班/下班", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
  25 + @NotEmpty(message = "打卡类型:上班/下班不能为空")
  26 + private String punchType;
  27 +
  28 + @Schema(description = "高德GCJ02坐标系纬度")
  29 + private BigDecimal latGcj02;
  30 +
  31 + @Schema(description = "高德GCJ02坐标系经度")
  32 + private BigDecimal lngGcj02;
  33 +
  34 + @Schema(description = "详细地址")
  35 + private String address;
  36 +
  37 + @Schema(description = "84坐标经度")
  38 + private BigDecimal lng;
  39 +
  40 + @Schema(description = "84坐标纬度")
  41 + private BigDecimal lat;
  42 +
  43 + @Schema(description = "状态位")
  44 + private Integer statusBit;
  45 +
  46 + @Schema(description = "警告位")
  47 + private Integer warnBit;
  48 +
  49 + @Schema(description = "提交人用户ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "20708")
  50 + @NotNull(message = "提交人用户ID不能为空")
  51 + private Long userId;
  52 +
  53 + @Schema(description = "用户昵称", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三")
  54 + @NotEmpty(message = "用户昵称不能为空")
  55 + private String nickname;
  56 +
  57 + @Schema(description = "归属(一级部门id)", requiredMode = Schema.RequiredMode.REQUIRED, example = "10917")
  58 + @NotNull(message = "归属(一级部门id)不能为空")
  59 + private Long companyId;
  60 +
  61 + @Schema(description = "部门ID", example = "126")
  62 + private Long deptId;
  63 +
  64 + @Schema(description = "业务线: yl-园林;wy-物业:sz-市政;例如:yl,wy", requiredMode = Schema.RequiredMode.REQUIRED)
  65 + @NotEmpty(message = "业务线: yl-园林;wy-物业:sz-市政;例如:yl,wy不能为空")
  66 + private String busiLine;
  67 +
  68 +}
0 69 \ No newline at end of file
... ...
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/materialinventoryout/vo/MaterialInventoryOutSaveReqVO.java
... ... @@ -13,6 +13,9 @@ public class MaterialInventoryOutSaveReqVO {
13 13  
14 14 @Schema(description = "入库ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "18713")
15 15 private Long id;
  16 + @Schema(description = "库存ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
  17 + @NotNull(message = "库存ID不能为空")
  18 + private Long inventoryId;
16 19  
17 20 @Schema(description = "物料ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "14541")
18 21 @NotNull(message = "物料ID不能为空")
... ...
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/road/RoadController.java
... ... @@ -139,7 +139,7 @@ public class RoadController {
139 139 reqVO.setRoadName(roadName);
140 140 // 处理deptCode为空的情况
141 141 if (deptCode != null && !deptCode.isEmpty()) {
142   - reqVO.setCompanyId(Long.valueOf(deptCode));
  142 + reqVO.setDeptId(Long.valueOf(deptCode));
143 143 }
144 144 reqVO.setBusiLine(companyCode);
145 145 List<RoadDO> roadList = roadService.getRoadList(reqVO);
... ...
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/road/vo/RoadListReqVO.java
... ... @@ -26,8 +26,11 @@ public class RoadListReqVO {
26 26 @NotNull(message = "归属(一级部门id)不能为空")
27 27 private Long companyId;
28 28  
  29 + @Schema(description = "部门ID", example = "126")
  30 + private Long deptId;
  31 +
29 32 @Schema(description = "业务看", example = "yl")
30 33 @NotEmpty(message = "创建者不能为空")
31 34 private String busiLine;
32 35  
33   -}
34 36 \ No newline at end of file
  37 +}
... ...
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/dataobject/device/DeviceClockRecordDO.java 0 → 100644
  1 +package com.zteits.urbanops.module.garden.dal.dataobject.device;
  2 +
  3 +import lombok.*;
  4 +import java.util.*;
  5 +import java.math.BigDecimal;
  6 +import java.math.BigDecimal;
  7 +import java.math.BigDecimal;
  8 +import java.math.BigDecimal;
  9 +import java.time.LocalDateTime;
  10 +import java.time.LocalDateTime;
  11 +import com.baomidou.mybatisplus.annotation.*;
  12 +import com.zteits.urbanops.framework.mybatis.core.dataobject.BaseDO;
  13 +
  14 +/**
  15 + * 员工打卡记录 DO
  16 + *
  17 + * @author 超级管理员
  18 + */
  19 +@TableName("garden_device_clock_record")
  20 +@KeySequence("garden_device_clock_record_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
  21 +@Data
  22 +@EqualsAndHashCode(callSuper = true)
  23 +@ToString(callSuper = true)
  24 +@Builder
  25 +@NoArgsConstructor
  26 +@AllArgsConstructor
  27 +public class DeviceClockRecordDO extends BaseDO {
  28 +
  29 + /**
  30 + * 主键ID
  31 + */
  32 + @TableId
  33 + private Integer id;
  34 + /**
  35 + * 设备编码
  36 + */
  37 + private String deviceCode;
  38 + /**
  39 + * 设备名称
  40 + */
  41 + private String deviceName;
  42 + /**
  43 + * 打卡类型:上班/下班
  44 + */
  45 + private String punchType;
  46 + /**
  47 + * 高德GCJ02坐标系纬度
  48 + */
  49 + private BigDecimal latGcj02;
  50 + /**
  51 + * 高德GCJ02坐标系经度
  52 + */
  53 + private BigDecimal lngGcj02;
  54 + /**
  55 + * 详细地址
  56 + */
  57 + private String address;
  58 + /**
  59 + * 84坐标经度
  60 + */
  61 + private BigDecimal lng;
  62 + /**
  63 + * 84坐标纬度
  64 + */
  65 + private BigDecimal lat;
  66 + /**
  67 + * 状态位
  68 + */
  69 + private Integer statusBit;
  70 + /**
  71 + * 警告位
  72 + */
  73 + private Integer warnBit;
  74 + /**
  75 + * 提交人用户ID
  76 + */
  77 + private Long userId;
  78 + /**
  79 + * 用户昵称
  80 + */
  81 + private String nickname;
  82 + /**
  83 + * 归属(一级部门id)
  84 + */
  85 + private Long companyId;
  86 + /**
  87 + * 部门ID
  88 + */
  89 + private Long deptId;
  90 + /**
  91 + * 业务线: yl-园林;wy-物业:sz-市政;例如:yl,wy
  92 + */
  93 + private String busiLine;
  94 +
  95 +
  96 +}
0 97 \ No newline at end of file
... ...
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/dal/mysql/device/DeviceClockRecordMapper.java 0 → 100644
  1 +package com.zteits.urbanops.module.garden.dal.mysql.device;
  2 +
  3 +import java.util.*;
  4 +
  5 +import com.zteits.urbanops.framework.common.pojo.PageResult;
  6 +import com.zteits.urbanops.framework.mybatis.core.query.LambdaQueryWrapperX;
  7 +import com.zteits.urbanops.framework.mybatis.core.mapper.BaseMapperX;
  8 +import com.zteits.urbanops.module.garden.dal.dataobject.device.DeviceClockRecordDO;
  9 +import org.apache.ibatis.annotations.Mapper;
  10 +import com.zteits.urbanops.module.garden.controller.admin.device.vo.*;
  11 +
  12 +/**
  13 + * 员工打卡记录 Mapper
  14 + *
  15 + * @author 超级管理员
  16 + */
  17 +@Mapper
  18 +public interface DeviceClockRecordMapper extends BaseMapperX<DeviceClockRecordDO> {
  19 +
  20 + default PageResult<DeviceClockRecordDO> selectPage(DeviceClockRecordPageReqVO reqVO) {
  21 + return selectPage(reqVO, new LambdaQueryWrapperX<DeviceClockRecordDO>()
  22 + .eqIfPresent(DeviceClockRecordDO::getDeviceCode, reqVO.getDeviceCode())
  23 + .likeIfPresent(DeviceClockRecordDO::getDeviceName, reqVO.getDeviceName())
  24 + .eqIfPresent(DeviceClockRecordDO::getPunchType, reqVO.getPunchType())
  25 + .eqIfPresent(DeviceClockRecordDO::getLatGcj02, reqVO.getLatGcj02())
  26 + .eqIfPresent(DeviceClockRecordDO::getLngGcj02, reqVO.getLngGcj02())
  27 + .eqIfPresent(DeviceClockRecordDO::getAddress, reqVO.getAddress())
  28 + .eqIfPresent(DeviceClockRecordDO::getLng, reqVO.getLng())
  29 + .eqIfPresent(DeviceClockRecordDO::getLat, reqVO.getLat())
  30 + .eqIfPresent(DeviceClockRecordDO::getStatusBit, reqVO.getStatusBit())
  31 + .eqIfPresent(DeviceClockRecordDO::getWarnBit, reqVO.getWarnBit())
  32 + .eqIfPresent(DeviceClockRecordDO::getUserId, reqVO.getUserId())
  33 + .likeIfPresent(DeviceClockRecordDO::getNickname, reqVO.getNickname())
  34 + .eqIfPresent(DeviceClockRecordDO::getCompanyId, reqVO.getCompanyId())
  35 + .eqIfPresent(DeviceClockRecordDO::getDeptId, reqVO.getDeptId())
  36 + .eqIfPresent(DeviceClockRecordDO::getBusiLine, reqVO.getBusiLine())
  37 + .betweenIfPresent(DeviceClockRecordDO::getCreateTime, reqVO.getCreateTime())
  38 + .orderByDesc(DeviceClockRecordDO::getId));
  39 + }
  40 +
  41 +}
0 42 \ No newline at end of file
... ...
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/device/DeviceClockRecordService.java 0 → 100644
  1 +package com.zteits.urbanops.module.garden.service.device;
  2 +
  3 +import java.util.*;
  4 +import jakarta.validation.*;
  5 +import com.zteits.urbanops.module.garden.controller.admin.device.vo.*;
  6 +import com.zteits.urbanops.module.garden.dal.dataobject.device.DeviceClockRecordDO;
  7 +import com.zteits.urbanops.framework.common.pojo.PageResult;
  8 +import com.zteits.urbanops.framework.common.pojo.PageParam;
  9 +
  10 +/**
  11 + * 员工打卡记录 Service 接口
  12 + *
  13 + * @author 超级管理员
  14 + */
  15 +public interface DeviceClockRecordService {
  16 +
  17 + /**
  18 + * 创建员工打卡记录
  19 + *
  20 + * @param createReqVO 创建信息
  21 + * @return 编号
  22 + */
  23 + Integer createDeviceClockRecord(@Valid DeviceClockRecordSaveReqVO createReqVO);
  24 +
  25 + /**
  26 + * 更新员工打卡记录
  27 + *
  28 + * @param updateReqVO 更新信息
  29 + */
  30 + void updateDeviceClockRecord(@Valid DeviceClockRecordSaveReqVO updateReqVO);
  31 +
  32 + /**
  33 + * 删除员工打卡记录
  34 + *
  35 + * @param id 编号
  36 + */
  37 + void deleteDeviceClockRecord(Integer id);
  38 +
  39 + /**
  40 + * 批量删除员工打卡记录
  41 + *
  42 + * @param ids 编号
  43 + */
  44 + void deleteDeviceClockRecordListByIds(List<Integer> ids);
  45 +
  46 + /**
  47 + * 获得员工打卡记录
  48 + *
  49 + * @param id 编号
  50 + * @return 员工打卡记录
  51 + */
  52 + DeviceClockRecordDO getDeviceClockRecord(Integer id);
  53 +
  54 + /**
  55 + * 获得员工打卡记录分页
  56 + *
  57 + * @param pageReqVO 分页查询
  58 + * @return 员工打卡记录分页
  59 + */
  60 + PageResult<DeviceClockRecordDO> getDeviceClockRecordPage(DeviceClockRecordPageReqVO pageReqVO);
  61 +
  62 +}
0 63 \ No newline at end of file
... ...
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/device/DeviceClockRecordServiceImpl.java 0 → 100644
  1 +package com.zteits.urbanops.module.garden.service.device;
  2 +
  3 +import cn.hutool.core.collection.CollUtil;
  4 +import org.springframework.stereotype.Service;
  5 +import jakarta.annotation.Resource;
  6 +import org.springframework.validation.annotation.Validated;
  7 +import org.springframework.transaction.annotation.Transactional;
  8 +
  9 +import java.util.*;
  10 +import com.zteits.urbanops.module.garden.controller.admin.device.vo.*;
  11 +import com.zteits.urbanops.module.garden.dal.dataobject.device.DeviceClockRecordDO;
  12 +import com.zteits.urbanops.framework.common.pojo.PageResult;
  13 +import com.zteits.urbanops.framework.common.pojo.PageParam;
  14 +import com.zteits.urbanops.framework.common.util.object.BeanUtils;
  15 +
  16 +import com.zteits.urbanops.module.garden.dal.mysql.device.DeviceClockRecordMapper;
  17 +
  18 +import static com.zteits.urbanops.framework.common.exception.util.ServiceExceptionUtil.exception;
  19 +import static com.zteits.urbanops.framework.common.util.collection.CollectionUtils.convertList;
  20 +import static com.zteits.urbanops.framework.common.util.collection.CollectionUtils.diffList;
  21 +import static com.zteits.urbanops.module.garden.enums.ErrorCodeConstants.*;
  22 +
  23 +/**
  24 + * 员工打卡记录 Service 实现类
  25 + *
  26 + * @author 超级管理员
  27 + */
  28 +@Service
  29 +@Validated
  30 +public class DeviceClockRecordServiceImpl implements DeviceClockRecordService {
  31 +
  32 + @Resource
  33 + private DeviceClockRecordMapper deviceClockRecordMapper;
  34 +
  35 + @Override
  36 + public Integer createDeviceClockRecord(DeviceClockRecordSaveReqVO createReqVO) {
  37 + // 插入
  38 + DeviceClockRecordDO deviceClockRecord = BeanUtils.toBean(createReqVO, DeviceClockRecordDO.class);
  39 + deviceClockRecordMapper.insert(deviceClockRecord);
  40 +
  41 + // 返回
  42 + return deviceClockRecord.getId();
  43 + }
  44 +
  45 + @Override
  46 + public void updateDeviceClockRecord(DeviceClockRecordSaveReqVO updateReqVO) {
  47 + // 校验存在
  48 + validateDeviceClockRecordExists(updateReqVO.getId());
  49 + // 更新
  50 + DeviceClockRecordDO updateObj = BeanUtils.toBean(updateReqVO, DeviceClockRecordDO.class);
  51 + deviceClockRecordMapper.updateById(updateObj);
  52 + }
  53 +
  54 + @Override
  55 + public void deleteDeviceClockRecord(Integer id) {
  56 + // 校验存在
  57 + validateDeviceClockRecordExists(id);
  58 + // 删除
  59 + deviceClockRecordMapper.deleteById(id);
  60 + }
  61 +
  62 + @Override
  63 + public void deleteDeviceClockRecordListByIds(List<Integer> ids) {
  64 + // 删除
  65 + deviceClockRecordMapper.deleteByIds(ids);
  66 + }
  67 +
  68 +
  69 + private void validateDeviceClockRecordExists(Integer id) {
  70 + if (deviceClockRecordMapper.selectById(id) == null) {
  71 + throw exception(DEVICE_CLOCK_RECORD_NOT_EXISTS);
  72 + }
  73 + }
  74 +
  75 + @Override
  76 + public DeviceClockRecordDO getDeviceClockRecord(Integer id) {
  77 + return deviceClockRecordMapper.selectById(id);
  78 + }
  79 +
  80 + @Override
  81 + public PageResult<DeviceClockRecordDO> getDeviceClockRecordPage(DeviceClockRecordPageReqVO pageReqVO) {
  82 + return deviceClockRecordMapper.selectPage(pageReqVO);
  83 + }
  84 +
  85 +}
0 86 \ No newline at end of file
... ...
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/materialinventoryout/MaterialInventoryOutServiceImpl.java
... ... @@ -55,7 +55,7 @@ public class MaterialInventoryOutServiceImpl implements MaterialInventoryOutServ
55 55 if(null == material){
56 56 throw exception0(BAD_REQUEST.getCode(), "无效参数-materialId");
57 57 }
58   - MaterialInventoryDO materialInventory = materialInventoryService.selectMaterialInventoryByMaterialId(material.getMaterialId(),getCompanyId());
  58 + MaterialInventoryDO materialInventory = materialInventoryService.getMaterialInventory(createReqVO.getInventoryId());
59 59 if(null == materialInventory){
60 60 throw exception0(BAD_REQUEST.getCode(),createReqVO.getMaterialName()+"没有库存");
61 61 }
... ... @@ -77,10 +77,10 @@ public class MaterialInventoryOutServiceImpl implements MaterialInventoryOutServ
77 77 out.setTypeDetailId(material.getTypeDetailId());
78 78 out.setTypeDetailName(material.getTypeDetailName());
79 79 out.setSpecifications(material.getSpecifications());
80   -// out.setBelongCompanyId(material.getBelongCompanyId());
81   -// out.setBelongCompanyName(material.getBelongCompanyName());
82   - out.setBelongCompanyId(deptRespDTO.getId());
83   - out.setBelongCompanyName(deptRespDTO.getName());
  80 + out.setBelongCompanyId(materialInventory.getBelongCompanyId());
  81 + out.setBelongCompanyName(materialInventory.getBelongCompanyName());
  82 + //out.setBelongCompanyId(deptRespDTO.getId());
  83 + // out.setBelongCompanyName(deptRespDTO.getName());
84 84 out.setOutInventoryNum(createReqVO.getOutInventoryNum());
85 85 out.setUnitId(material.getUnitId());
86 86 out.setUnitName(material.getUnitName());
... ...
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/road/RoadServiceImpl.java
... ... @@ -162,6 +162,9 @@ public class RoadServiceImpl implements RoadService {
162 162 if (reqVO.getCompanyId() != null) {
163 163 sql.lambda().eq(RoadDO::getCompanyId, reqVO.getCompanyId());
164 164 }
  165 + if (reqVO.getDeptId() != null) {
  166 + sql.lambda().eq(RoadDO::getDeptId, reqVO.getDeptId());
  167 + }
165 168 if (reqVO.getLevelId() != null) {
166 169 sql.lambda().eq(RoadDO::getLevelId, reqVO.getLevelId());
167 170 }
... ... @@ -176,4 +179,4 @@ public class RoadServiceImpl implements RoadService {
176 179  
177 180  
178 181  
179   -}
180 182 \ No newline at end of file
  183 +}
... ...
urbanops-module-garden/src/main/resources/mapper/device/DeviceClockRecordMapper.xml 0 → 100644
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  3 +<mapper namespace="com.zteits.urbanops.module.garden.dal.mysql.device.DeviceClockRecordMapper">
  4 +
  5 + <!--
  6 + 一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
  7 + 无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。
  8 + 代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
  9 + 文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
  10 + -->
  11 +
  12 +</mapper>
0 13 \ No newline at end of file
... ...
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/service/garden/BpmAIServiceImpl.java
... ... @@ -213,7 +213,9 @@ public class BpmAIServiceImpl implements BpmAIService{
213 213 .map(AdminUserRespDTO::getId)
214 214 // 收集结果到List
215 215 .collect(Collectors.toList());
216   - processInstanceVariables.put(BPM_COMMON_PROD_LEADERID, idList.get(0));
  216 + //processInstanceVariables.put(BPM_COMMON_PROD_LEADERID, idList.get(0));
  217 + //养护组张角色多人模式
  218 + RoleListUtils.teamLeaderByRoleAssign(userList,processInstanceVariables);
217 219 }
218 220  
219 221 String processInstanceId = processInstanceApi.createProcessInstance(userId,
... ... @@ -260,7 +262,9 @@ public class BpmAIServiceImpl implements BpmAIService{
260 262 .map(AdminUserRespDTO::getId)
261 263 // 收集结果到List
262 264 .collect(Collectors.toList());
263   - processInstanceVariables.put(BPM_COMMON_PROD_LEADERID, idList.get(0));//养护组长分配
  265 + //processInstanceVariables.put(BPM_COMMON_PROD_LEADERID, idList.get(0));//养护组长分配
  266 + //养护组张角色多人模式
  267 + RoleListUtils.teamLeaderByRoleAssign(userList,processInstanceVariables);
264 268 //流程变量重新赋值
265 269 runtimeService.setVariables(instanceId,processInstanceVariables);
266 270  
... ... @@ -316,7 +320,9 @@ public class BpmAIServiceImpl implements BpmAIService{
316 320 .map(AdminUserRespDTO::getId)
317 321 // 收集结果到List
318 322 .collect(Collectors.toList());
319   - processInstanceVariables.put(BPM_COMMON_PROD_LEADERID, idList.get(0));//养护组长分配
  323 + //processInstanceVariables.put(BPM_COMMON_PROD_LEADERID, idList.get(0));//养护组长分配
  324 + //养护组张角色多人模式
  325 + RoleListUtils.teamLeaderByRoleAssign(userList,processInstanceVariables);
320 326 //流程变量重新赋值
321 327 runtimeService.setVariables(instanceId,processInstanceVariables);
322 328 }
... ...
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/service/garden/BpmGardenServiceImpl.java
... ... @@ -53,6 +53,7 @@ import com.zteits.urbanops.module.workorder.dto.AppGardenWorkOrderRespVO;
53 53 import com.zteits.urbanops.module.workorder.enums.BusiLineTeamLeaderRoleCodeEnum;
54 54 import com.zteits.urbanops.module.workorder.enums.BusiLineWorkerRoleCodeEnum;
55 55 import com.zteits.urbanops.module.workorder.enums.EventSourceEnum;
  56 +import com.zteits.urbanops.module.workorder.util.RoleListUtils;
56 57 import com.zteits.urbanops.module.workorder.util.TaskNodeUtils;
57 58 import jakarta.annotation.Resource;
58 59 import jodd.util.StringUtil;
... ... @@ -647,7 +648,10 @@ public class BpmGardenServiceImpl implements BpmGardenService{
647 648 .map(AdminUserRespDTO::getId)
648 649 // 收集结果到List
649 650 .collect(Collectors.toList());
650   - processInstanceVariables.put(BPM_COMMON_PROD_LEADERID, idList.get(0));
  651 +
  652 + //processInstanceVariables.put(BPM_COMMON_PROD_LEADERID, idList.get(0));
  653 + //养护组张角色多人模式
  654 + RoleListUtils.teamLeaderByRoleAssign(userList,processInstanceVariables);
651 655 String processInstanceId = processInstanceApi.createProcessInstance(userId,
652 656 // new BpmProcessInstanceCreateReqDTO().setProcessDefinitionKey(BpmCommonConstant.BPM_GARDEN_INSPECT_WO)
653 657 new BpmProcessInstanceCreateReqDTO().setProcessDefinitionKey(BpmCommonConstant.BPM_WORKORDER_COMMON_PROD)
... ...
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/service/garden/BpmInspectorServiceImpl.java
... ... @@ -205,7 +205,9 @@ public class BpmInspectorServiceImpl implements BpmInspectorService{
205 205 .map(AdminUserRespDTO::getId)
206 206 // 收集结果到List
207 207 .collect(Collectors.toList());
208   - processInstanceVariables.put(BPM_COMMON_PROD_LEADERID, idList.get(0));
  208 + //processInstanceVariables.put(BPM_COMMON_PROD_LEADERID, idList.get(0));
  209 + //养护组张角色多人模式
  210 + RoleListUtils.teamLeaderByRoleAssign(userList,processInstanceVariables);
209 211 }
210 212  
211 213 String processInstanceId = processInstanceApi.createProcessInstance(userId,
... ... @@ -252,7 +254,9 @@ public class BpmInspectorServiceImpl implements BpmInspectorService{
252 254 .map(AdminUserRespDTO::getId)
253 255 // 收集结果到List
254 256 .collect(Collectors.toList());
255   - processInstanceVariables.put(BPM_COMMON_PROD_LEADERID, idList.get(0));//养护组长分配
  257 + //processInstanceVariables.put(BPM_COMMON_PROD_LEADERID, idList.get(0));//养护组长分配
  258 + //养护组张角色多人模式
  259 + RoleListUtils.teamLeaderByRoleAssign(userList,processInstanceVariables);
256 260 //流程变量重新赋值
257 261 runtimeService.setVariables(instanceId,processInstanceVariables);
258 262  
... ... @@ -308,7 +312,9 @@ public class BpmInspectorServiceImpl implements BpmInspectorService{
308 312 .map(AdminUserRespDTO::getId)
309 313 // 收集结果到List
310 314 .collect(Collectors.toList());
311   - processInstanceVariables.put(BPM_COMMON_PROD_LEADERID, idList.get(0));//养护组长分配
  315 + //processInstanceVariables.put(BPM_COMMON_PROD_LEADERID, idList.get(0));//养护组长分配
  316 + //养护组张角色多人模式
  317 + RoleListUtils.teamLeaderByRoleAssign(userList,processInstanceVariables);
312 318 //流程变量重新赋值
313 319 runtimeService.setVariables(instanceId,processInstanceVariables);
314 320 }
... ...
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/service/garden/BpmRegionMgrServiceImpl.java
... ... @@ -187,7 +187,9 @@ public class BpmRegionMgrServiceImpl implements BpmRegionMgrService{
187 187 .map(AdminUserRespDTO::getId)
188 188 // 收集结果到List
189 189 .collect(Collectors.toList());
190   - processInstanceVariables.put(BPM_COMMON_PROD_LEADERID, idList.get(0));
  190 + //processInstanceVariables.put(BPM_COMMON_PROD_LEADERID, idList.get(0));
  191 + //养护组张角色多人模式
  192 + RoleListUtils.teamLeaderByRoleAssign(userList,processInstanceVariables);
191 193 String processInstanceId = processInstanceApi.createProcessInstance(userId,
192 194 // new BpmProcessInstanceCreateReqDTO().setProcessDefinitionKey(BpmCommonConstant.BPM_GARDEN_INSPECT_WO)
193 195 new BpmProcessInstanceCreateReqDTO().setProcessDefinitionKey(BpmCommonConstant.BPM_REGION_MGR_WO)
... ...
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/service/garden/BpmUniversalServiceImpl.java
... ... @@ -214,7 +214,9 @@ public class BpmUniversalServiceImpl implements BpmUniversalService{
214 214 .map(AdminUserRespDTO::getId)
215 215 // 收集结果到List
216 216 .collect(Collectors.toList());
217   - processInstanceVariables.put(BPM_COMMON_PROD_LEADERID, idList.get(0));//养护组长分配
  217 + //processInstanceVariables.put(BPM_COMMON_PROD_LEADERID, idList.get(0));//养护组长分配
  218 + //养护组张角色多人模式
  219 + RoleListUtils.teamLeaderByRoleAssign(userList,processInstanceVariables);
218 220 //流程变量重新赋值
219 221 runtimeService.setVariables(instanceId,processInstanceVariables);
220 222  
... ...
urbanops-module-workorder/src/main/java/com/zteits/urbanops/module/workorder/util/RoleListUtils.java
1 1 package com.zteits.urbanops.module.workorder.util;
2 2  
  3 +import com.zteits.urbanops.module.system.api.user.dto.AdminUserRespDTO;
3 4 import com.zteits.urbanops.module.system.controller.admin.permission.vo.role.RoleRespVO;
4 5  
5 6 import java.util.List;
  7 +import java.util.Map;
6 8 import java.util.Objects;
7 9 import java.util.Set;
8 10 import java.util.stream.Collectors;
9 11  
  12 +import static com.zteits.urbanops.module.workorder.api.constant.BpmCommonConstant.BPM_COMMON_PROD_LEADERID;
  13 +
10 14 /**
11 15 * 类描述:判断角色包含关系工具类
12 16 * 创建人:yanhuiqing
... ... @@ -77,4 +81,13 @@ public class RoleListUtils {
77 81  
78 82 return containsCode1 && containsCode2;
79 83 }
  84 +
  85 + public static void teamLeaderByRoleAssign(List<AdminUserRespDTO> userList, Map<String, Object> processInstanceVariables){
  86 + //养护组长指派为多人
  87 + String assigneeIdStr = userList.stream()
  88 + .map(AdminUserRespDTO::getId) // 取Long类型ID
  89 + .map(String::valueOf) // 转String
  90 + .collect(Collectors.joining(",")); // 拼接成1001,1002,1003
  91 + processInstanceVariables.put(BPM_COMMON_PROD_LEADERID, assigneeIdStr);
  92 + }
80 93 }
81 94 \ No newline at end of file
... ...