| | |
| | | public static final String YW_PATROL ="YW_PATROL" ; |
| | | public static final String YW_CONTRACT_BILL ="YW_CONTRACT_BILL" ; |
| | | public static final String YW_MATERIAL ="YW_MATERIAL" ; |
| | | public static final String YW_PROBLEM ="YW_PROBLEM" ; |
| | | |
| | | public static final String RESERVATION_TOTAL_NUM ="RESERVATION_TOTAL_NUM" ; |
| | | public static final String SIGN_IN_PLACE_LAT ="SIGN_IN_PLACE_LAT" ; |
| | |
| | | FN_PATROL_TASK_RECORD_FILE(11, "å·¡æ£ä»»å¡ç¹å¤çéä»¶ ", "å·¡æ£ä»»å¡ç¹å¤çéä»¶ "), |
| | | MATERIAL_FILE(12, "èµäº§éä»¶ ", "èµäº§éä»¶ "), |
| | | PROBLEM_FILE(13, "é®é¢éä»¶ ", "é®é¢éä»¶ "), |
| | | FN_DEVICE_MAINTENANCE_FILE(14, "é宿å¡å¹³å°è®¾å¤æä»¶ ", "é宿å¡å¹³å°è®¾å¤æä»¶ "), |
| | | |
| | | ; |
| | | // æååé |
| | |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.dao.business.model.YwDevice; |
| | | import com.doumee.dao.business.vo.YwDeviceCateDataVO; |
| | | import com.doumee.dao.business.vo.YwDeviceStatusDataVO; |
| | | import com.doumee.service.business.YwDeviceService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Set; |
| | | |
| | | /** |
| | | * @author æ±è¹è¹ |
| | |
| | | return ApiResponse.success(ywDeviceService.findByCode(deviceCode)); |
| | | } |
| | | |
| | | @ApiOperation("è®¾å¤æ°éåç±»ç»è®¡") |
| | | @PostMapping("/getDeviceCateData") |
| | | @CloudRequiredPermission("business:ywdevice:query") |
| | | public ApiResponse<Set<YwDeviceCateDataVO>> getDeviceCateData (@RequestBody YwDevice ywDevice,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | return ApiResponse.success(ywDeviceService.getDeviceCateData(ywDevice)); |
| | | } |
| | | |
| | | |
| | | @ApiOperation("设å¤ç¶æç»è®¡") |
| | | @PostMapping("/getDeviceStatus") |
| | | @CloudRequiredPermission("business:ywdevice:query") |
| | | public ApiResponse<YwDeviceStatusDataVO> getDeviceStatus (@RequestBody YwDevice ywDevice,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | return ApiResponse.success(ywDeviceService.getDeviceStatus(ywDevice)); |
| | | } |
| | | } |
| | |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.dao.business.model.YwProblem; |
| | | import com.doumee.dao.business.model.YwWorkorder; |
| | | import com.doumee.service.business.YwProblemService; |
| | | import com.doumee.service.business.impl.YwWorkorderServiceImpl; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | |
| | | @Autowired |
| | | private YwProblemService ywProblemService; |
| | | |
| | | @Autowired |
| | | private YwWorkorderServiceImpl ywWorkorderService; |
| | | @LoginNoRequired |
| | | @PreventRepeat |
| | | @ApiOperation("é®é¢ææ¥") |
| | |
| | | return ApiResponse.success(ywProblemService.create(ywProblem)); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | @ApiOperation("æ ¹æ®IDä¿®æ¹") |
| | | @PostMapping("/editProblem") |
| | | @CloudRequiredPermission("business:ywproblem:update") |
| | | public ApiResponse editProblem(@RequestBody YwProblem ywProblem,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | ywProblem.setLoginUserInfo(getLoginUser(token)); |
| | | ywProblemService.editProblem(ywProblem,ywWorkorderService); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | |
| | | @ApiOperation("æ ¹æ®IDå é¤") |
| | | @GetMapping("/delete/{id}") |
| | | @CloudRequiredPermission("business:ywproblem:delete") |
| | | public ApiResponse deleteById(@PathVariable Integer id) { |
| | | public ApiResponse deleteById(@PathVariable Integer id,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | ywProblemService.deleteById(id); |
| | | return ApiResponse.success(null); |
| | | } |
| | |
| | | @ApiOperation("æ¹éå é¤") |
| | | @GetMapping("/delete/batch") |
| | | @CloudRequiredPermission("business:ywproblem:delete") |
| | | public ApiResponse deleteByIdInBatch(@RequestParam String ids) { |
| | | public ApiResponse deleteByIdInBatch(@RequestParam String ids,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | String [] idArray = ids.split(","); |
| | | List<Integer> idList = new ArrayList<>(); |
| | | for (String id : idArray) { |
| | |
| | | @ApiOperation("æ ¹æ®IDä¿®æ¹") |
| | | @PostMapping("/updateById") |
| | | @CloudRequiredPermission("business:ywproblem:update") |
| | | public ApiResponse updateById(@RequestBody YwProblem ywProblem) { |
| | | public ApiResponse updateById(@RequestBody YwProblem ywProblem,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | ywProblemService.updateById(ywProblem); |
| | | return ApiResponse.success(null); |
| | | } |
| | |
| | | @ApiOperation("å页æ¥è¯¢") |
| | | @PostMapping("/page") |
| | | @CloudRequiredPermission("business:ywproblem:query") |
| | | public ApiResponse<PageData<YwProblem>> findPage (@RequestBody PageWrap<YwProblem> pageWrap) { |
| | | public ApiResponse<PageData<YwProblem>> findPage (@RequestBody PageWrap<YwProblem> pageWrap,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | return ApiResponse.success(ywProblemService.findPage(pageWrap)); |
| | | } |
| | | |
| | | @ApiOperation("导åºExcel") |
| | | @PostMapping("/exportExcel") |
| | | @CloudRequiredPermission("business:ywproblem:exportExcel") |
| | | public void exportExcel (@RequestBody PageWrap<YwProblem> pageWrap, HttpServletResponse response) { |
| | | public void exportExcel (@RequestBody PageWrap<YwProblem> pageWrap, HttpServletResponse response,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | ExcelExporter.build(YwProblem.class).export(ywProblemService.findPage(pageWrap).getRecords(), "è¿ç»´é®é¢ä¸æ¥ä¿¡æ¯è¡¨", response); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDæ¥è¯¢") |
| | | @GetMapping("/{id}") |
| | | @CloudRequiredPermission("business:ywproblem:query") |
| | | public ApiResponse findById(@PathVariable Integer id) { |
| | | return ApiResponse.success(ywProblemService.findById(id)); |
| | | public ApiResponse findById(@PathVariable Integer id,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | return ApiResponse.success(ywProblemService.getDetail(id)); |
| | | } |
| | | } |
| | |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.dao.business.dto.YwWorkorderDataDTO; |
| | | import com.doumee.dao.business.model.YwWorkorder; |
| | | import com.doumee.dao.business.vo.YwWorkorderDataVO; |
| | | import com.doumee.service.business.YwWorkorderService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | |
| | | @CloudRequiredPermission("business:ywworkorder:create") |
| | | public ApiResponse create(@RequestBody YwWorkorder ywWorkorder,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | ywWorkorder.setLoginUserInfo(this.getLoginUser(token)); |
| | | ywWorkorder.setOrigin(Constants.ZERO); |
| | | return ApiResponse.success(ywWorkorderService.create(ywWorkorder)); |
| | | } |
| | | |
| | |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | |
| | | @ApiOperation("è·å工忰éä¿¡æ¯") |
| | | @PostMapping("/getDataVO") |
| | | @CloudRequiredPermission("business:ywworkorder:update") |
| | | public ApiResponse<YwWorkorderDataVO> getDataVO(@RequestBody YwWorkorderDataDTO dto,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | YwWorkorderDataVO ywWorkorderDataVO = ywWorkorderService.getDataVO(dto); |
| | | return ApiResponse.success(ywWorkorderDataVO); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | @ApiOperation("å页æ¥è¯¢") |
| | | @PostMapping("/page") |
| | | @CloudRequiredPermission("business:ywworkorder:query") |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.doumee.dao.business.model.YwProblem; |
| | | import com.github.yulichang.base.MPJBaseMapper; |
| | | |
| | | /** |
| | | * @author æ±è¹è¹ |
| | | * @date 2025/01/06 11:05 |
| | | */ |
| | | public interface YwProblemMapper extends BaseMapper<YwProblem> { |
| | | public interface YwProblemMapper extends MPJBaseMapper<YwProblem> { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.dao.business.dto; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * Created by IntelliJ IDEA. |
| | | * |
| | | * @Author : Rk |
| | | * @create 2025/1/8 15:37 |
| | | */ |
| | | @Data |
| | | public class YwWorkorderDataDTO { |
| | | |
| | | |
| | | @ApiModelProperty(value = "æ¥è¯¢ç±»åï¼1=项ç®ï¼2=楼å±ï¼3=æ¿é´", example = "1") |
| | | private Integer queryType; |
| | | |
| | | @ApiModelProperty(value = "ä¸å¡ä¸»é®", example = "1") |
| | | private Integer queryId; |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | @ExcelColumn(name="ç©ä¸è´¹æ»éé¢") |
| | | private BigDecimal wyTotalFee; |
| | | |
| | | @ApiModelProperty(value = "æ¿é´ä¸»é® æ¥è¯¢ä½¿ç¨") |
| | | @TableField(exist = false) |
| | | private Integer roomId; |
| | | @ApiModelProperty(value = "éä»¶éå") |
| | | @TableField(exist = false) |
| | | private List<Multifile> fileList; |
| | |
| | | import lombok.Data; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * è¿ç»´è®¾å¤ä¿¡æ¯è¡¨ |
| | |
| | | @ExcelColumn(name="æå¨ä½ç½®") |
| | | private String addr; |
| | | |
| | | @ApiModelProperty(value = "æå±é¡¹ç®ç¼ç ï¼å
³èyw_project)", example = "1") |
| | | private Integer projectId; |
| | | |
| | | @ApiModelProperty(value = "æå±æ¥¼å±ç¼ç ï¼å
³èyw_floor)", example = "1") |
| | | private Integer floorId; |
| | | |
| | | @ApiModelProperty(value = "æå±æ¥¼å®ç¼ç ï¼å
³èyw_building)", example = "1") |
| | | private Integer buildingId; |
| | | |
| | | @ApiModelProperty(value = "æå±æ¿é´ç¼ç ï¼å
³èyw_room)", example = "1") |
| | | private Integer roomId; |
| | | |
| | | |
| | | @ApiModelProperty(value = "ä¾åºåè系人") |
| | | private String supplierLinker; |
| | | |
| | | @ApiModelProperty(value = "ä¾åºåèç³»çµè¯") |
| | | private String supplierPhone; |
| | | |
| | | @ApiModelProperty(value = "ç»´ä¿äººå主é®ï¼å
³èsystem_userï¼") |
| | | private Integer maintenanceUserId; |
| | | |
| | | @ApiModelProperty(value = "ç»´ä¿å°ææ¥") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private Date maintenanceOverDate; |
| | | |
| | | @ApiModelProperty(value = "ç»´ä¿è¯´æ") |
| | | private String maintenanceContent; |
| | | |
| | | @ApiModelProperty(value = "åç±»åç§°") |
| | | @TableField(exist = false) |
| | | private String categoryName; |
| | | |
| | | @ApiModelProperty(value = "ç¶çº§åç±»åç§°") |
| | | @TableField(exist = false) |
| | | private String categoryParentName; |
| | | |
| | | @ApiModelProperty(value = "æå±ç¶çº§åç±»ç¼ç ï¼å
³ècategoryï¼", example = "1") |
| | | @TableField(exist = false) |
| | | private Integer cateParentId; |
| | | |
| | | @ApiModelProperty(value = "管çååç§°") |
| | | @TableField(exist = false) |
| | |
| | | @TableField(exist = false) |
| | | private String fileFullUrl; |
| | | |
| | | @ApiModelProperty(value = "éä»¶ä¿¡æ¯") |
| | | @TableField(exist = false) |
| | | private List<Multifile> multifileList; |
| | | |
| | | |
| | | |
| | | |
| | | // @ApiModelProperty(value = "éä»¶ä¿¡æ¯") |
| | | // @TableField(exist = false) |
| | |
| | | @TableField(exist = false) |
| | | private Integer projectId; |
| | | |
| | | @ApiModelProperty(value = "楼å®ä¸»é®", example = "1") |
| | | @TableField(exist = false) |
| | | private Integer buildingId; |
| | | |
| | | @ApiModelProperty(value = "楼å±ä¸»é®", example = "1") |
| | | @TableField(exist = false) |
| | | private Integer floorId; |
| | | |
| | | |
| | | } |
| | |
| | | @TableField(exist = false) |
| | | private List<Multifile> multifileList; |
| | | |
| | | |
| | | @ApiModelProperty(value = "å·¡æ£è®¡ååç§°") |
| | | @TableField(exist = false) |
| | | private String schemeTitle; |
| | | |
| | | @ApiModelProperty(value = "å·¡æ£ä»»å¡ç¼å·") |
| | | @TableField(exist = false) |
| | | private String taskCode; |
| | | |
| | | @ApiModelProperty(value = "å¼å§æ¥æ") |
| | | @TableField(exist = false) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date startDate; |
| | | |
| | | @ApiModelProperty(value = "ç»ææ¥æ") |
| | | @TableField(exist = false) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date endDate; |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.doumee.core.annotation.excel.ExcelColumn; |
| | | import com.doumee.core.model.LoginUserModel; |
| | | import com.doumee.dao.system.model.Multifile; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | |
| | | @Data |
| | | @ApiModel("è¿ç»´é®é¢ä¸æ¥ä¿¡æ¯è¡¨") |
| | | @TableName("`yw_problem`") |
| | | public class YwProblem { |
| | | public class YwProblem extends LoginUserModel { |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | @ApiModelProperty(value = "主é®", example = "1") |
| | |
| | | |
| | | @ApiModelProperty(value = "å¤çæ¶é´") |
| | | @ExcelColumn(name="å¤çæ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date dealDate; |
| | | |
| | | @ApiModelProperty(value = "å¤ç夿³¨") |
| | |
| | | @ApiModelProperty(value = "éä»¶ä¿¡æ¯") |
| | | @TableField(exist = false) |
| | | private List<Multifile> fileList; |
| | | |
| | | @ApiModelProperty(value = "å¤ç人åç§°") |
| | | @TableField(exist = false) |
| | | private String dealUserName; |
| | | |
| | | @ApiModelProperty(value = "å¤ç人ç»ç»åç§°") |
| | | @TableField(exist = false) |
| | | private String dealUserCompanyName; |
| | | |
| | | @ApiModelProperty(value = "å¤çå¼å§æ¶é´ æ¥è¯¢ä½¿ç¨") |
| | | @TableField(exist = false) |
| | | private Date dealDateStart; |
| | | |
| | | @ApiModelProperty(value = "å¤çç»ææ¶é´ æ¥è¯¢ä½¿ç¨") |
| | | @TableField(exist = false) |
| | | private Date dealDateEnd; |
| | | |
| | | |
| | | @ApiModelProperty(value = "ä¿ä¿®åºåç±»å 0室å
ç»´ä¿® 1å
Œ
񆧆", example = "1") |
| | | @TableField(exist = false) |
| | | private Integer workOrderAreaType; |
| | | |
| | | @ApiModelProperty(value = "æå±æ¿é´ç¼ç ï¼å
³èyw_room)", example = "1") |
| | | @TableField(exist = false) |
| | | private Integer workOrderRoomId; |
| | | |
| | | @ApiModelProperty(value = "æå±æ¥¼å±ç¼ç ï¼å
³èyw_floor)", example = "1") |
| | | @TableField(exist = false) |
| | | private Integer workOrderFloorId; |
| | | |
| | | @ApiModelProperty(value = "å·¥ååç±»ç¼ç (å
³ècategoryï¼", example = "1") |
| | | @TableField(exist = false) |
| | | private Integer workOrderCateId; |
| | | |
| | | @ApiModelProperty(value = "ä¸é¨æ¶é´") |
| | | @TableField(exist = false) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date workOrderGetDate; |
| | | |
| | | @ApiModelProperty(value = "æ
åµè¯´æ") |
| | | @TableField(exist = false) |
| | | private String workOrderContent; |
| | | |
| | | @ApiModelProperty(value = "转工åéä»¶ä¿¡æ¯") |
| | | @TableField(exist = false) |
| | | private List<Multifile> workOrderFileList; |
| | | |
| | | } |
| | |
| | | |
| | | @ApiModelProperty(value = "æå±æ¿é´ç¼ç ï¼å
³èyw_room)", example = "1") |
| | | private Integer roomId; |
| | | |
| | | @ApiModelProperty(value = "æå±æ¥¼å±ç¼ç ï¼å
³èyw_floor)", example = "1") |
| | | private Integer floorId; |
| | | |
| | |
| | | @ApiModelProperty(value = "å¤çæ¹å¼ 0ææ´¾åå¤ç 1ç´æ¥åå¤", example = "1") |
| | | private Integer dealType; |
| | | |
| | | |
| | | @ApiModelProperty(value = "æ¥æº 0èªå»º 1é®é¢è½¬å·¥å", example = "1") |
| | | private Integer origin; |
| | | |
| | | @ApiModelProperty(value = "项ç®åç§°") |
| | | @TableField(exist = false) |
| | | private String projectName; |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.dao.business.vo; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * Created by IntelliJ IDEA. |
| | | * |
| | | * @Author : Rk |
| | | * @create 2024/12/2 10:02 |
| | | */ |
| | | @Data |
| | | public class YwDeviceCateDataVO { |
| | | |
| | | @ApiModelProperty(value = "å类主é®", example = "1") |
| | | private Integer cateId; |
| | | |
| | | @ApiModelProperty(value = "åç±»åç§°", example = "1") |
| | | private String cateName; |
| | | |
| | | @ApiModelProperty(value = "ç¶çº§å类主é®", example = "1") |
| | | private Integer cateParentId; |
| | | |
| | | @ApiModelProperty(value = "æ°é", example = "1") |
| | | private Integer deviceAmount ; |
| | | |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.dao.business.vo; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * Created by IntelliJ IDEA. |
| | | * |
| | | * @Author : Rk |
| | | * @create 2024/12/2 10:02 |
| | | */ |
| | | @Data |
| | | public class YwDeviceParentCateDataVO { |
| | | |
| | | @ApiModelProperty(value = "å类主é®", example = "1") |
| | | private Integer cateId; |
| | | |
| | | @ApiModelProperty(value = "åç±»åç§°", example = "1") |
| | | private String cateName; |
| | | |
| | | @ApiModelProperty(value = "æ°é", example = "1") |
| | | private Integer deviceAmount ; |
| | | |
| | | @ApiModelProperty(value = "ååç±»æ°æ®", example = "1") |
| | | private List<YwDeviceCateDataVO> ywDeviceCateDataVOList; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.dao.business.vo; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * Created by IntelliJ IDEA. |
| | | * |
| | | * @Author : Rk |
| | | * @create 2025/1/8 15:32 |
| | | */ |
| | | @Data |
| | | public class YwDeviceStatusDataVO { |
| | | |
| | | |
| | | @ApiModelProperty(value = "æ£å¸¸æ°é", example = "1") |
| | | private Integer workAmount; |
| | | |
| | | @ApiModelProperty(value = "å¼å¸¸æ°é", example = "1") |
| | | private Integer exceptionAmount; |
| | | |
| | | @ApiModelProperty(value = "æ¥åºæ°é", example = "1") |
| | | private Integer errAmount; |
| | | |
| | | @ApiModelProperty(value = "ç´¯è®¡æ»æ°", example = "1") |
| | | private Integer amount; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.dao.business.vo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * Created by IntelliJ IDEA. |
| | | * |
| | | * @Author : Rk |
| | | * @create 2025/1/8 15:32 |
| | | */ |
| | | @Data |
| | | public class YwWorkorderDataVO { |
| | | |
| | | |
| | | @ApiModelProperty(value = "å¾
ææ´¾æ°é", example = "1") |
| | | private Integer waitAssignAmount; |
| | | |
| | | @ApiModelProperty(value = "å¾
å¤çæ°é", example = "1") |
| | | private Integer waitDealAmount; |
| | | |
| | | @ApiModelProperty(value = "æ¬ææ»æ°", example = "1") |
| | | private Integer monthAmount; |
| | | |
| | | @ApiModelProperty(value = "ç´¯è®¡æ»æ°", example = "1") |
| | | private Integer amount; |
| | | |
| | | } |
| | |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.dao.business.model.YwDevice; |
| | | import com.doumee.dao.business.vo.YwDeviceCateDataVO; |
| | | import com.doumee.dao.business.vo.YwDeviceDataVO; |
| | | import com.doumee.dao.business.vo.YwDeviceStatusDataVO; |
| | | |
| | | import java.util.List; |
| | | import java.util.Set; |
| | | |
| | | /** |
| | | * è¿ç»´è®¾å¤ä¿¡æ¯è¡¨Serviceå®ä¹ |
| | |
| | | |
| | | YwDevice findByCode(String deviceCode); |
| | | |
| | | Set<YwDeviceCateDataVO> getDeviceCateData(YwDevice model); |
| | | |
| | | YwDeviceStatusDataVO getDeviceStatus(YwDevice model); |
| | | } |
| | |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.dao.business.model.YwProblem; |
| | | import com.doumee.service.business.impl.YwWorkorderServiceImpl; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | */ |
| | | YwProblem findById(Integer id); |
| | | |
| | | YwProblem getDetail(Integer id); |
| | | |
| | | |
| | | /** |
| | | * æ¡ä»¶æ¥è¯¢åæ¡è®°å½ |
| | | * |
| | |
| | | * @return long |
| | | */ |
| | | long count(YwProblem ywProblem); |
| | | |
| | | |
| | | void editProblem(YwProblem ywProblem, YwWorkorderServiceImpl ywWorkorderService); |
| | | } |
| | |
| | | import com.doumee.core.model.LoginUserInfo; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.dao.business.dto.YwWorkorderDataDTO; |
| | | import com.doumee.dao.business.model.YwWorkorder; |
| | | import com.doumee.dao.business.vo.YwWorkorderDataVO; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | |
| | | void dispatchOrder(YwWorkorder ywWorkorder); |
| | | void dealOrder(YwWorkorder ywWorkorder); |
| | | |
| | | YwWorkorderDataVO getDataVO(YwWorkorderDataDTO dto); |
| | | } |
| | |
| | | queryWrapper.le(YwContract::getWyFreeEndDate, Utils.Date.getEnd(pageWrap.getModel().getWyFreeEndDate())); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | if (pageWrap.getModel().getZlTotalFee() != null) { |
| | | queryWrapper.eq(YwContract::getZlTotalFee, pageWrap.getModel().getZlTotalFee()); |
| | | } |
| | |
| | | if (pageWrap.getModel().getCompanyName() != null) { |
| | | queryWrapper.like(Company::getName, pageWrap.getModel().getCompanyName()); |
| | | } |
| | | if (pageWrap.getModel().getRoomId() != null) { |
| | | queryWrapper.apply(" t.id in ( select ycr.CONTRACT_ID from yw_contract_room ycr where ycr.type = 0 and ycr.ROOM_ID = "+pageWrap.getModel().getRoomId()+" ) "); |
| | | } |
| | | queryWrapper.ge(Objects.nonNull(pageWrap.getModel().getQueryStartTime()), YwContract::getStartDate, pageWrap.getModel().getQueryStartTime()) |
| | | .le(Objects.nonNull(pageWrap.getModel().getQueryEndTime()), YwContract::getEndDate, pageWrap.getModel().getQueryEndTime()); |
| | | queryWrapper.orderByDesc(YwContract::getCreateDate ); |
| | |
| | | .and(Objects.nonNull(model)&&StringUtils.isNotBlank(model.getDeviceName()),i->i.like(YwDevice::getName,model.getDeviceName()).or().like(YwDevice::getCode,model.getDeviceName())) |
| | | .ge(Objects.nonNull(model.getStartDate()),YwDeviceRecord::getCreateDate, Utils.Date.getStart(pageWrap.getModel().getStartDate())) |
| | | .le(Objects.nonNull(model.getEndDate()),YwDeviceRecord::getCreateDate, Utils.Date.getStart(pageWrap.getModel().getEndDate())) |
| | | .eq(Objects.nonNull(model.getDeviceId()),YwDeviceRecord::getDeviceId,model.getDeviceId()) |
| | | .eq(YwDeviceRecord::getIsdeleted,Constants.ZERO) |
| | | .orderByDesc(YwDeviceRecord::getCreateDate) |
| | | ); |
| | |
| | | import com.doumee.dao.business.model.Company; |
| | | import com.doumee.dao.business.model.YwDevice; |
| | | import com.doumee.dao.business.model.YwDeviceRecord; |
| | | import com.doumee.dao.business.vo.YwDeviceCateDataVO; |
| | | import com.doumee.dao.business.vo.YwDeviceDataVO; |
| | | import com.doumee.dao.business.vo.YwDeviceParentCateDataVO; |
| | | import com.doumee.dao.business.vo.YwDeviceStatusDataVO; |
| | | import com.doumee.dao.system.MultifileMapper; |
| | | import com.doumee.dao.system.model.Multifile; |
| | | import com.doumee.dao.system.model.SystemUser; |
| | |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | |
| | | || StringUtils.isBlank(ywDevice.getName()) |
| | | || StringUtils.isBlank(ywDevice.getCode()) |
| | | || Objects.isNull(ywDevice.getStatus()) |
| | | || Objects.isNull(ywDevice.getProjectId()) |
| | | || Objects.isNull(ywDevice.getFloorId()) |
| | | || Objects.isNull(ywDevice.getBuildingId()) |
| | | || Objects.isNull(ywDevice.getRoomId()) |
| | | ){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | |
| | | multifile.setObjId(ywDevice.getId()); |
| | | multifile.setFileurl(ywDevice.getFileUrl()); |
| | | multifileMapper.insert(multifile); |
| | | } |
| | | |
| | | List<Multifile> fileList = new ArrayList<>(); |
| | | if(ywDevice.getMultifileList()!=null && ywDevice.getMultifileList().size()>0){ |
| | | for (int i = 0; i < ywDevice.getMultifileList().size(); i++) { |
| | | Multifile multifile = ywDevice.getMultifileList().get(i); |
| | | if(StringUtils.isBlank(multifile.getFileurl())){ |
| | | continue; |
| | | } |
| | | multifile.setCreateDate(ywDevice.getCreateDate()); |
| | | multifile.setEditDate(ywDevice.getCreateDate()); |
| | | multifile.setCreator(ywDevice.getEditor()); |
| | | multifile.setIsdeleted(Constants.ZERO); |
| | | multifile.setObjId(ywDevice.getId()); |
| | | multifile.setEditor(ywDevice.getCreator()); |
| | | multifile.setObjType(Constants.MultiFile.FN_DEVICE_MAINTENANCE_FILE.getKey()); |
| | | multifile.setSortnum(i+1); |
| | | fileList.add(multifile); |
| | | } |
| | | } |
| | | if(fileList.size()>0){ |
| | | multifileMapper.insert(fileList); |
| | | } |
| | | |
| | | return ywDevice.getId(); |
| | |
| | | || StringUtils.isBlank(ywDevice.getName()) |
| | | || StringUtils.isBlank(ywDevice.getCode()) |
| | | || Objects.isNull(ywDevice.getStatus()) |
| | | || Objects.isNull(ywDevice.getProjectId()) |
| | | || Objects.isNull(ywDevice.getFloorId()) |
| | | || Objects.isNull(ywDevice.getBuildingId()) |
| | | || Objects.isNull(ywDevice.getRoomId()) |
| | | ){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | |
| | | ywDeviceMapper.updateById(ywDevice); |
| | | multifileMapper.delete(new QueryWrapper<Multifile>().lambda() |
| | | .eq(Multifile::getObjId,ywDevice.getId()) |
| | | .eq(Multifile::getObjType,Constants.MultiFile.FN_DEVICE_FILE.getKey()) |
| | | .in(Multifile::getObjType,Constants.MultiFile.FN_DEVICE_FILE.getKey(),Constants.MultiFile.FN_DEVICE_MAINTENANCE_FILE.getKey()) |
| | | ); |
| | | if(Objects.nonNull(ywDevice.getFileUrl())){ |
| | | Multifile multifile = new Multifile(); |
| | |
| | | multifile.setObjId(ywDevice.getId()); |
| | | multifile.setFileurl(ywDevice.getFileUrl()); |
| | | multifileMapper.insert(multifile); |
| | | } |
| | | |
| | | List<Multifile> fileList = new ArrayList<>(); |
| | | if(ywDevice.getMultifileList()!=null && ywDevice.getMultifileList().size()>0){ |
| | | for (int i = 0; i < ywDevice.getMultifileList().size(); i++) { |
| | | Multifile multifile = ywDevice.getMultifileList().get(i); |
| | | if(StringUtils.isBlank(multifile.getFileurl())){ |
| | | continue; |
| | | } |
| | | multifile.setCreateDate(ywDevice.getCreateDate()); |
| | | multifile.setEditDate(ywDevice.getCreateDate()); |
| | | multifile.setCreator(ywDevice.getEditor()); |
| | | multifile.setIsdeleted(Constants.ZERO); |
| | | multifile.setObjId(ywDevice.getId()); |
| | | multifile.setEditor(ywDevice.getCreator()); |
| | | multifile.setObjType(Constants.MultiFile.FN_DEVICE_MAINTENANCE_FILE.getKey()); |
| | | multifile.setSortnum(i+1); |
| | | fileList.add(multifile); |
| | | } |
| | | } |
| | | if(fileList.size()>0){ |
| | | multifileMapper.insert(fileList); |
| | | } |
| | | |
| | | |
| | |
| | | +systemDictDataBiz.queryByCode(Constants.FTP,Constants.YW_DEVICE).getCode(); |
| | | ywDevice.setFileFullUrl(path + multifile.getFileurl()); |
| | | } |
| | | |
| | | //éä»¶æ°æ® |
| | | List<Multifile> multifileList = multifileMapper.selectJoinList(Multifile.class,new MPJLambdaWrapper<Multifile>() |
| | | .selectAll(Multifile.class) |
| | | .selectAs(SystemUser::getRealname,Multifile::getUserName) |
| | | .leftJoin(SystemUser.class,SystemUser::getId,Multifile::getCreator) |
| | | .eq(Multifile::getObjId,ywDevice.getId()) |
| | | .eq(Multifile::getIsdeleted,Constants.ZERO) |
| | | .eq(Multifile::getObjType,Constants.MultiFile.FN_DEVICE_MAINTENANCE_FILE.getKey())); |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(multifileList)){ |
| | | String path = systemDictDataBiz.queryByCode(Constants.FTP,Constants.FTP_RESOURCE_PATH).getCode() |
| | | +systemDictDataBiz.queryByCode(Constants.FTP,Constants.YW_PATROL).getCode(); |
| | | for (Multifile m:multifileList) { |
| | | if(StringUtils.isNotBlank(m.getFileurl())){ |
| | | m.setFileurlFull(path + m.getFileurl()); |
| | | } |
| | | } |
| | | ywDevice.setMultifileList(multifileList); |
| | | } |
| | | |
| | | return ywDevice; |
| | | } |
| | | |
| | |
| | | Utils.MP.blankToNull(pageWrap.getModel()); |
| | | YwDevice model = pageWrap.getModel(); |
| | | queryWrapper.selectAll(YwDevice.class) |
| | | .selectAs(Category::getName,YwDevice::getCategoryName) |
| | | .select("c.name",YwDevice::getCategoryName) |
| | | .select("c1.name",YwDevice::getCategoryParentName) |
| | | .selectAs(SystemUser::getRealname,YwDevice::getRealName) |
| | | .leftJoin(Category.class,Category::getId,YwDevice::getCateId) |
| | | .leftJoin(SystemUser.class,SystemUser::getId,YwDevice::getUserId) |
| | | .leftJoin("category c on t.CATE_ID = c.id") |
| | | .leftJoin("category c1 on c.PARENT_ID = c1.id") |
| | | .and(Objects.nonNull(model)&&StringUtils.isNotBlank(model.getName()),i->i.like(YwDevice::getName,model.getName()).or().like(YwDevice::getCode,model.getName())) |
| | | .eq(Objects.nonNull(model.getStatus()),YwDevice::getStatus,model.getStatus()) |
| | | .eq(Objects.nonNull(model.getRoomId()),YwDevice::getRoomId,model.getRoomId()) |
| | | .eq(Objects.nonNull(model.getFloorId()),YwDevice::getFloorId,model.getFloorId()) |
| | | .eq(Objects.nonNull(model.getProjectId()),YwDevice::getProjectId,model.getProjectId()) |
| | | .eq(Objects.nonNull(model.getBuildingId()),YwDevice::getBuildingId,model.getBuildingId()) |
| | | .eq(YwDevice::getIsdeleted,Constants.ZERO) |
| | | .orderByDesc(YwDevice::getCreateDate) |
| | | ; |
| | |
| | | return ywDeviceDataVO; |
| | | } |
| | | |
| | | @Override |
| | | public Set<YwDeviceCateDataVO> getDeviceCateData(YwDevice model){ |
| | | MPJLambdaWrapper<YwDevice> queryWrapper = new MPJLambdaWrapper<YwDevice>(); |
| | | queryWrapper.selectAll(YwDevice.class) |
| | | .select("c.name",YwDevice::getCategoryName) |
| | | .select("c1.name",YwDevice::getCategoryParentName) |
| | | .select("c1.id",YwDevice::getCateParentId) |
| | | .selectAs(SystemUser::getRealname,YwDevice::getRealName) |
| | | .leftJoin(SystemUser.class,SystemUser::getId,YwDevice::getUserId) |
| | | .leftJoin("category c on t.CATE_ID = c.id") |
| | | .leftJoin("category c1 on c.PARENT_ID = c1.id") |
| | | .eq(Objects.nonNull(model.getRoomId()),YwDevice::getRoomId,model.getRoomId()) |
| | | .eq(Objects.nonNull(model.getFloorId()),YwDevice::getFloorId,model.getFloorId()) |
| | | .eq(Objects.nonNull(model.getProjectId()),YwDevice::getProjectId,model.getProjectId()) |
| | | .eq(Objects.nonNull(model.getBuildingId()),YwDevice::getBuildingId,model.getBuildingId()) |
| | | .eq(YwDevice::getIsdeleted,Constants.ZERO) |
| | | .isNotNull(YwDevice::getCateId) |
| | | .orderByDesc(YwDevice::getCreateDate) |
| | | ; |
| | | List<YwDevice> ywDeviceList = ywDeviceMapper.selectJoinList(YwDevice.class,queryWrapper); |
| | | Set<YwDeviceCateDataVO> ywDeviceCateDataVOSet = new HashSet<>(); |
| | | Set<YwDeviceParentCateDataVO> ywDeviceParentCateDataVOSet = new HashSet<>(); |
| | | for (YwDevice y: ywDeviceList) { |
| | | YwDeviceCateDataVO ywDeviceCateDataVO = new YwDeviceCateDataVO(); |
| | | ywDeviceCateDataVO.setCateId(y.getCateId()); |
| | | ywDeviceCateDataVO.setCateName(y.getCategoryName()); |
| | | ywDeviceCateDataVO.setCateParentId(y.getCateParentId()); |
| | | ywDeviceCateDataVOSet.add(ywDeviceCateDataVO); |
| | | YwDeviceParentCateDataVO ywDeviceParentCateDataVO = new YwDeviceParentCateDataVO(); |
| | | ywDeviceParentCateDataVO.setCateId(y.getCateParentId()); |
| | | ywDeviceParentCateDataVO.setCateName(y.getCategoryParentName()); |
| | | ywDeviceParentCateDataVOSet.add(ywDeviceParentCateDataVO); |
| | | } |
| | | |
| | | for (YwDeviceCateDataVO ywDeviceCateDataVO:ywDeviceCateDataVOSet) { |
| | | ywDeviceCateDataVO.setDeviceAmount( |
| | | ywDeviceList.stream().filter(i->Objects.nonNull(i.getCateId()) && Constants.equalsInteger(i.getCateId(),ywDeviceCateDataVO.getCateId())).collect(Collectors.toList()).size() |
| | | ); |
| | | } |
| | | |
| | | for (YwDeviceParentCateDataVO ywDeviceParentCateDataVO:ywDeviceParentCateDataVOSet) { |
| | | ywDeviceParentCateDataVO.setDeviceAmount( |
| | | ywDeviceList.stream().filter(i->Objects.nonNull(i.getCateParentId()) && Constants.equalsInteger(i.getCateParentId(),ywDeviceParentCateDataVO.getCateId())).collect(Collectors.toList()).size() |
| | | ); |
| | | ywDeviceParentCateDataVO.setYwDeviceCateDataVOList( |
| | | ywDeviceCateDataVOSet.stream().filter(i->Constants.equalsInteger(i.getCateParentId(),ywDeviceParentCateDataVO.getCateId())).collect(Collectors.toList()) |
| | | ); |
| | | } |
| | | return ywDeviceCateDataVOSet; |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public YwDeviceStatusDataVO getDeviceStatus(YwDevice model){ |
| | | YwDeviceStatusDataVO ywDeviceStatusDataVO = new YwDeviceStatusDataVO(); |
| | | MPJLambdaWrapper<YwDevice> queryWrapper = new MPJLambdaWrapper<YwDevice>(); |
| | | queryWrapper.selectAll(YwDevice.class) |
| | | .eq(Objects.nonNull(model.getRoomId()),YwDevice::getRoomId,model.getRoomId()) |
| | | .eq(Objects.nonNull(model.getFloorId()),YwDevice::getFloorId,model.getFloorId()) |
| | | .eq(Objects.nonNull(model.getProjectId()),YwDevice::getProjectId,model.getProjectId()) |
| | | .eq(Objects.nonNull(model.getBuildingId()),YwDevice::getBuildingId,model.getBuildingId()) |
| | | .eq(YwDevice::getIsdeleted,Constants.ZERO) |
| | | ; |
| | | List<YwDevice> ywDeviceList = ywDeviceMapper.selectJoinList(YwDevice.class,queryWrapper); |
| | | ywDeviceStatusDataVO.setAmount(ywDeviceList.size()); |
| | | ywDeviceStatusDataVO.setWorkAmount(ywDeviceList.stream().filter(i->Objects.nonNull(i.getStatus())&&Constants.equalsInteger(i.getStatus(),Constants.ZERO)).collect(Collectors.toList()).size()); |
| | | ywDeviceStatusDataVO.setExceptionAmount(ywDeviceList.stream().filter(i->Objects.nonNull(i.getStatus())&&Constants.equalsInteger(i.getStatus(),Constants.ONE)).collect(Collectors.toList()).size()); |
| | | ywDeviceStatusDataVO.setErrAmount(ywDeviceList.stream().filter(i->Objects.nonNull(i.getStatus())&&Constants.equalsInteger(i.getStatus(),Constants.THREE)).collect(Collectors.toList()).size()); |
| | | return ywDeviceStatusDataVO; |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | .like(StringUtils.isNotBlank(model.getAttr()),YwMaterial::getAttr,model.getAttr()) |
| | | .eq(Objects.nonNull(model.getProjectId()),YwRoom::getProjectId,model.getProjectId()) |
| | | .eq(Objects.nonNull(model.getRoomId()),YwMaterial::getRoomId,model.getRoomId()) |
| | | .eq(Objects.nonNull(model.getFloorId()),YwRoom::getFloor,model.getFloorId()) |
| | | .eq(Objects.nonNull(model.getBuildingId()),YwRoom::getBuildingId,model.getBuildingId()) |
| | | .eq(YwMaterial::getIsdeleted,Constants.ZERO) |
| | | .orderByAsc(YwMaterial::getCode) |
| | | ; |
| | |
| | | .selectAs(YwPatrolPoint::getName,YwPatrolTaskRecord::getPointName) |
| | | .selectAs(YwPatrolPoint::getContent,YwPatrolTaskRecord::getContent) |
| | | .selectAs(SystemUser::getRealname,YwPatrolTaskRecord::getRealname) |
| | | |
| | | .selectAs(YwPatrolScheme::getTitle,YwPatrolTaskRecord::getSchemeTitle) |
| | | .selectAs(YwPatrolTask::getTitle,YwPatrolTaskRecord::getTaskCode) |
| | | .selectAs(YwPatrolTask::getStartDate,YwPatrolTaskRecord::getStartDate) |
| | | .selectAs(YwPatrolTask::getEndDate,YwPatrolTaskRecord::getEndDate) |
| | | |
| | | .leftJoin(YwPatrolPoint.class,YwPatrolPoint::getId,YwPatrolTaskRecord::getPointId) |
| | | .leftJoin(SystemUser.class,SystemUser::getId,YwPatrolTaskRecord::getDealUserId) |
| | | .leftJoin(YwPatrolTask.class,YwPatrolTask::getId,YwPatrolTaskRecord::getTaskId) |
| | | .leftJoin(YwPatrolScheme.class,YwPatrolScheme::getId,YwPatrolTask::getSchemeId) |
| | | .eq(YwPatrolScheme::getIsdeleted, Constants.ZERO) |
| | | .eq(Objects.nonNull(model) && Objects.nonNull(model.getTaskId()),YwPatrolTaskRecord::getTaskId, model.getTaskId()) |
| | | .eq(Objects.nonNull(model) && Objects.nonNull(model.getDealUserId()),YwPatrolTaskRecord::getDealUserId, model.getDealUserId()) |
| | | .like(StringUtils.isNotBlank(model.getPointName()),YwPatrolPoint::getName,model.getPointName()) |
| | | .eq(Objects.nonNull(model) && Objects.nonNull(model.getStatus()) , YwPatrolTaskRecord::getStatus,model.getStatus()) |
| | | .eq(Objects.nonNull(model) && Objects.nonNull(model.getDeviceId()) , YwPatrolPoint::getDeviceId,model.getDeviceId()) |
| | | .orderByDesc(YwPatrolScheme::getCreateDate) |
| | | ; |
| | | IPage<YwPatrolTaskRecord> iPage = ywPatrolTaskRecordMapper.selectJoinPage(page,YwPatrolTaskRecord.class,queryWrapper); |
| | |
| | | package com.doumee.service.business.impl; |
| | | |
| | | import com.doumee.biz.system.SystemDictDataBiz; |
| | | import com.doumee.core.constants.ResponseStatus; |
| | | import com.doumee.core.exception.BusinessException; |
| | | import com.doumee.core.model.LoginUserInfo; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.core.utils.DateUtil; |
| | | import com.doumee.core.utils.Utils; |
| | | import com.doumee.dao.business.YwProblemMapper; |
| | | import com.doumee.dao.business.model.YwProblem; |
| | | import com.doumee.dao.business.YwRoomMapper; |
| | | import com.doumee.dao.business.model.*; |
| | | import com.doumee.dao.system.MultifileMapper; |
| | | import com.doumee.dao.system.model.Multifile; |
| | | import com.doumee.dao.system.model.SystemUser; |
| | | import com.doumee.service.business.YwProblemService; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.github.yulichang.wrapper.MPJLambdaWrapper; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * è¿ç»´é®é¢ä¸æ¥ä¿¡æ¯è¡¨Serviceå®ç° |
| | |
| | | private YwProblemMapper ywProblemMapper; |
| | | |
| | | @Autowired |
| | | private YwRoomMapper ywRoomMapper; |
| | | |
| | | @Autowired |
| | | private MultifileMapper multifileMapper; |
| | | |
| | | @Autowired |
| | | private SystemDictDataBiz systemDictDataBiz; |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = {Exception.class,BusinessException.class}) |
| | | public Integer create(YwProblem ywProblem) { |
| | | if(Objects.isNull(ywProblem) |
| | | || Objects.isNull(ywProblem.getSubmitDate()) |
| | |
| | | return ywProblemMapper.selectById(id); |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public YwProblem getDetail(Integer id) { |
| | | MPJLambdaWrapper<YwProblem> queryWrapper = new MPJLambdaWrapper<YwProblem>(); |
| | | queryWrapper.selectAll(YwProblem.class) |
| | | .selectAs(SystemUser::getRealname,YwProblem::getDealUserName) |
| | | .selectAs(Company::getName,YwProblem::getDealUserCompanyName) |
| | | .leftJoin(SystemUser.class,SystemUser::getId,YwProblem::getDealUserId) |
| | | .leftJoin(Company.class,Company::getId,SystemUser::getCompanyId) |
| | | .eq(YwProblem::getId,id) |
| | | ; |
| | | YwProblem ywProblem = ywProblemMapper.selectJoinOne(YwProblem.class,queryWrapper); |
| | | if(Objects.isNull(ywProblem)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY); |
| | | } |
| | | List<Multifile> multifiles = multifileMapper.selectList(new QueryWrapper<Multifile>().lambda() |
| | | .eq(Multifile::getObjId, ywProblem.getId() ) |
| | | .in(Multifile::getObjType, Arrays.asList(new Integer[]{Constants.MultiFile.PROBLEM_FILE.getKey() })) |
| | | .eq(Multifile::getIsdeleted,Constants.ZERO)); |
| | | if(multifiles!=null){ |
| | | String path = systemDictDataBiz.queryByCode(Constants.FTP,Constants.FTP_RESOURCE_PATH).getCode() |
| | | +systemDictDataBiz.queryByCode(Constants.FTP,Constants.YW_PROBLEM).getCode(); |
| | | for(Multifile f : multifiles){ |
| | | if(StringUtils.isBlank(f.getFileurl())){ |
| | | continue; |
| | | } |
| | | f.setFileurlFull(path+f.getFileurl()); |
| | | } |
| | | ywProblem.setFileList(multifiles); |
| | | } |
| | | return ywProblem; |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = {Exception.class,BusinessException.class}) |
| | | public void editProblem(YwProblem ywProblem,YwWorkorderServiceImpl ywWorkorderService){ |
| | | if(Objects.isNull(ywProblem) |
| | | || Objects.isNull(ywProblem.getId()) |
| | | || Objects.isNull(ywProblem.getDealStatus()) |
| | | || !(Constants.equalsInteger(ywProblem.getDealStatus(),Constants.ONE)||Constants.equalsInteger(ywProblem.getDealStatus(),Constants.TWO)) |
| | | || (Constants.equalsInteger(ywProblem.getDealStatus(),Constants.TWO)&&StringUtils.isBlank(ywProblem.getDealInfo())) |
| | | ){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | | LoginUserInfo loginUserInfo = ywProblem.getLoginUserInfo(); |
| | | //å
³éé®é¢ |
| | | if(Constants.equalsInteger(ywProblem.getDealStatus(),Constants.TWO)){ |
| | | ywProblemMapper.update(new UpdateWrapper<YwProblem>().lambda() |
| | | .set(YwProblem::getDealDate, DateUtil.getCurrDateTime()) |
| | | .set(YwProblem::getDealInfo,ywProblem.getDealInfo()) |
| | | .set(YwProblem::getDealType,Constants.ONE) |
| | | .set(YwProblem::getDealStatus,ywProblem.getDealStatus()) |
| | | .set(YwProblem::getDealUserId,loginUserInfo.getId()) |
| | | .set(YwProblem::getEditor,loginUserInfo.getId()) |
| | | .set(YwProblem::getEditDate, DateUtil.getCurrDateTime()) |
| | | .eq(YwProblem::getId,ywProblem.getId()) |
| | | ); |
| | | }else{ |
| | | if(Objects.isNull(ywProblem.getWorkOrderAreaType()) |
| | | ||Objects.isNull(ywProblem.getWorkOrderCateId()) |
| | | ||StringUtils.isBlank(ywProblem.getWorkOrderContent()) |
| | | ){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | | YwWorkorder ywWorkorder = new YwWorkorder(); |
| | | ywWorkorder.setAreaType(ywProblem.getWorkOrderAreaType()); |
| | | ywWorkorder.setCateId(ywProblem.getWorkOrderCateId()); |
| | | ywWorkorder.setContent(ywProblem.getWorkOrderContent()); |
| | | ywWorkorder.setRoomId(ywProblem.getWorkOrderRoomId()); |
| | | ywWorkorder.setFloorId(ywProblem.getWorkOrderFloorId()); |
| | | ywWorkorder.setGetDate(ywProblem.getWorkOrderGetDate()); |
| | | ywWorkorder.setOrigin(Constants.ONE); |
| | | ywWorkorder.setLoginUserInfo(loginUserInfo); |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(ywProblem.getWorkOrderFileList())){ |
| | | ywWorkorder.setFileList(ywProblem.getWorkOrderFileList()); |
| | | } |
| | | Integer workOrderId = ywWorkorderService.create(ywWorkorder); |
| | | ywProblemMapper.update(new UpdateWrapper<YwProblem>().lambda() |
| | | .set(YwProblem::getDealDate, DateUtil.getCurrDateTime()) |
| | | .set(YwProblem::getDealInfo,ywProblem.getDealInfo()) |
| | | .set(YwProblem::getDealType,Constants.ZERO) |
| | | .set(YwProblem::getDealStatus,ywProblem.getDealStatus()) |
| | | .set(YwProblem::getDealUserId,loginUserInfo.getId()) |
| | | .set(YwProblem::getEditor,loginUserInfo.getId()) |
| | | .set(YwProblem::getEditDate, DateUtil.getCurrDateTime()) |
| | | .set(YwProblem::getWorkorderId,workOrderId) |
| | | .eq(YwProblem::getId,ywProblem.getId()) |
| | | ); |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | @Override |
| | | public YwProblem findOne(YwProblem ywProblem) { |
| | | QueryWrapper<YwProblem> wrapper = new QueryWrapper<>(ywProblem); |
| | |
| | | @Override |
| | | public PageData<YwProblem> findPage(PageWrap<YwProblem> pageWrap) { |
| | | IPage<YwProblem> page = new Page<>(pageWrap.getPage(), pageWrap.getCapacity()); |
| | | QueryWrapper<YwProblem> queryWrapper = new QueryWrapper<>(); |
| | | MPJLambdaWrapper<YwProblem> queryWrapper = new MPJLambdaWrapper<YwProblem>(); |
| | | Utils.MP.blankToNull(pageWrap.getModel()); |
| | | if (pageWrap.getModel().getId() != null) { |
| | | queryWrapper.lambda().eq(YwProblem::getId, pageWrap.getModel().getId()); |
| | | } |
| | | if (pageWrap.getModel().getCreator() != null) { |
| | | queryWrapper.lambda().eq(YwProblem::getCreator, pageWrap.getModel().getCreator()); |
| | | } |
| | | if (pageWrap.getModel().getCreateDate() != null) { |
| | | queryWrapper.lambda().ge(YwProblem::getCreateDate, Utils.Date.getStart(pageWrap.getModel().getCreateDate())); |
| | | queryWrapper.lambda().le(YwProblem::getCreateDate, Utils.Date.getEnd(pageWrap.getModel().getCreateDate())); |
| | | } |
| | | if (pageWrap.getModel().getEditor() != null) { |
| | | queryWrapper.lambda().eq(YwProblem::getEditor, pageWrap.getModel().getEditor()); |
| | | } |
| | | if (pageWrap.getModel().getEditDate() != null) { |
| | | queryWrapper.lambda().ge(YwProblem::getEditDate, Utils.Date.getStart(pageWrap.getModel().getEditDate())); |
| | | queryWrapper.lambda().le(YwProblem::getEditDate, Utils.Date.getEnd(pageWrap.getModel().getEditDate())); |
| | | } |
| | | if (pageWrap.getModel().getIsdeleted() != null) { |
| | | queryWrapper.lambda().eq(YwProblem::getIsdeleted, pageWrap.getModel().getIsdeleted()); |
| | | } |
| | | if (pageWrap.getModel().getPosition() != null) { |
| | | queryWrapper.lambda().eq(YwProblem::getPosition, pageWrap.getModel().getPosition()); |
| | | } |
| | | if (pageWrap.getModel().getRemark() != null) { |
| | | queryWrapper.lambda().eq(YwProblem::getRemark, pageWrap.getModel().getRemark()); |
| | | } |
| | | if (pageWrap.getModel().getStatus() != null) { |
| | | queryWrapper.lambda().eq(YwProblem::getStatus, pageWrap.getModel().getStatus()); |
| | | } |
| | | if (pageWrap.getModel().getContent() != null) { |
| | | queryWrapper.lambda().eq(YwProblem::getContent, pageWrap.getModel().getContent()); |
| | | } |
| | | if (pageWrap.getModel().getPhone() != null) { |
| | | queryWrapper.lambda().eq(YwProblem::getPhone, pageWrap.getModel().getPhone()); |
| | | } |
| | | if (pageWrap.getModel().getSubmitDate() != null) { |
| | | queryWrapper.lambda().ge(YwProblem::getSubmitDate, Utils.Date.getStart(pageWrap.getModel().getSubmitDate())); |
| | | queryWrapper.lambda().le(YwProblem::getSubmitDate, Utils.Date.getEnd(pageWrap.getModel().getSubmitDate())); |
| | | } |
| | | if (pageWrap.getModel().getCode() != null) { |
| | | queryWrapper.lambda().eq(YwProblem::getCode, pageWrap.getModel().getCode()); |
| | | } |
| | | if (pageWrap.getModel().getDealStatus() != null) { |
| | | queryWrapper.lambda().eq(YwProblem::getDealStatus, pageWrap.getModel().getDealStatus()); |
| | | } |
| | | if (pageWrap.getModel().getDealUserId() != null) { |
| | | queryWrapper.lambda().eq(YwProblem::getDealUserId, pageWrap.getModel().getDealUserId()); |
| | | } |
| | | if (pageWrap.getModel().getDealDate() != null) { |
| | | queryWrapper.lambda().ge(YwProblem::getDealDate, Utils.Date.getStart(pageWrap.getModel().getDealDate())); |
| | | queryWrapper.lambda().le(YwProblem::getDealDate, Utils.Date.getEnd(pageWrap.getModel().getDealDate())); |
| | | } |
| | | if (pageWrap.getModel().getDealInfo() != null) { |
| | | queryWrapper.lambda().eq(YwProblem::getDealInfo, pageWrap.getModel().getDealInfo()); |
| | | } |
| | | if (pageWrap.getModel().getDealType() != null) { |
| | | queryWrapper.lambda().eq(YwProblem::getDealType, pageWrap.getModel().getDealType()); |
| | | } |
| | | if (pageWrap.getModel().getWorkorderId() != null) { |
| | | queryWrapper.lambda().eq(YwProblem::getWorkorderId, pageWrap.getModel().getWorkorderId()); |
| | | } |
| | | for(PageWrap.SortData sortData: pageWrap.getSorts()) { |
| | | if (sortData.getDirection().equalsIgnoreCase(PageWrap.DESC)) { |
| | | queryWrapper.orderByDesc(sortData.getProperty()); |
| | | } else { |
| | | queryWrapper.orderByAsc(sortData.getProperty()); |
| | | } |
| | | } |
| | | return PageData.from(ywProblemMapper.selectPage(page, queryWrapper)); |
| | | YwProblem model = pageWrap.getModel(); |
| | | queryWrapper.selectAll(YwProblem.class) |
| | | .selectAs(SystemUser::getRealname,YwProblem::getDealUserName) |
| | | .leftJoin(SystemUser.class,SystemUser::getId,YwProblem::getDealUserId) |
| | | .like(StringUtils.isNotBlank(model.getContent()),YwProblem::getContent,model.getContent()) |
| | | .ge(Objects.nonNull(model.getDealDateStart()),YwProblem::getDealDate, Utils.Date.getStart(model.getDealDateStart())) |
| | | .le(Objects.nonNull(model.getDealDateEnd()),YwProblem::getDealDate, Utils.Date.getEnd(model.getDealDateEnd())) |
| | | .eq(Objects.nonNull(model.getDealStatus()),YwProblem::getDealStatus,model.getDealStatus()) |
| | | ; |
| | | IPage iPage = ywProblemMapper.selectJoinPage(page,YwProblem.class,queryWrapper); |
| | | return PageData.from(iPage); |
| | | } |
| | | |
| | | @Override |
| | |
| | | |
| | | @Override |
| | | public YwRoom findById(Integer id) { |
| | | return ywRoomMapper.selectById(id); |
| | | MPJLambdaWrapper<YwRoom> queryWrapper = new MPJLambdaWrapper<>(); |
| | | queryWrapper.selectAll(YwRoom.class ) |
| | | .selectAs(YwProject::getName,YwRoom::getProjectName) |
| | | .selectAs(YwFloor::getName,YwRoom::getFloorName) |
| | | .selectAs(YwBuilding::getName,YwRoom::getBuildingName) |
| | | .leftJoin(YwProject.class,YwProject::getId,YwRoom::getProjectId) |
| | | .leftJoin(YwBuilding.class,YwBuilding::getId,YwRoom::getBuildingId) |
| | | .leftJoin(YwFloor.class,YwFloor::getId,YwRoom::getFloor) |
| | | .eq(YwRoom::getId,id) |
| | | .last(" limit 1 ") |
| | | ; |
| | | YwRoom ywRoom = ywRoomMapper.selectJoinOne(YwRoom.class,queryWrapper); |
| | | return ywRoom; |
| | | } |
| | | |
| | | @Override |
| | |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.core.utils.DateUtil; |
| | | import com.doumee.core.utils.Utils; |
| | | import com.doumee.dao.business.*; |
| | | import com.doumee.dao.business.dto.YwWorkorderDataDTO; |
| | | import com.doumee.dao.business.model.*; |
| | | import com.doumee.dao.business.vo.YwWorkorderDataVO; |
| | | import com.doumee.dao.system.MultifileMapper; |
| | | import com.doumee.dao.system.SystemUserMapper; |
| | | import com.doumee.dao.system.model.Multifile; |
| | |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * è¿ç»´å·¥åä¿¡æ¯è¡¨Serviceå®ç° |
| | |
| | | QueryWrapper<YwWorkorder> wrapper = new QueryWrapper<>(ywWorkorder); |
| | | return ywWorkorderMapper.selectCount(wrapper); |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public YwWorkorderDataVO getDataVO(YwWorkorderDataDTO dto){ |
| | | YwWorkorderDataVO ywWorkorderDataVO = new YwWorkorderDataVO(); |
| | | |
| | | List<YwWorkorder> list = ywWorkorderMapper.selectList(new QueryWrapper<YwWorkorder>().lambda() |
| | | .eq(YwWorkorder::getIsdeleted,Constants.ZERO) |
| | | .eq(Constants.equalsInteger(dto.getQueryType(),Constants.ONE),YwWorkorder::getProjectId,dto.getQueryId()) |
| | | .eq(Constants.equalsInteger(dto.getQueryType(),Constants.TWO),YwWorkorder::getFloorId,dto.getQueryId()) |
| | | .eq(Constants.equalsInteger(dto.getQueryType(),Constants.THREE),YwWorkorder::getRoomId,dto.getQueryId())); |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(list)){ |
| | | ywWorkorderDataVO.setAmount(list.size()); |
| | | ywWorkorderDataVO.setMonthAmount(list.stream().filter(i-> DateUtil.formatDate(i.getSubmitDate(),"yyyy-MM").equals(DateUtil.formatDate(new Date(),"yyyy-MM"))).collect(Collectors.toList()).size()); |
| | | ywWorkorderDataVO.setWaitDealAmount(list.stream().filter(i-> Constants.equalsInteger(i.getDealStatus(),Constants.ONE)).collect(Collectors.toList()).size()); |
| | | ywWorkorderDataVO.setWaitAssignAmount(list.stream().filter(i-> Constants.equalsInteger(i.getDealStatus(),Constants.ZERO)).collect(Collectors.toList()).size()); |
| | | } |
| | | return ywWorkorderDataVO; |
| | | } |
| | | |
| | | |
| | | |
| | | } |