New file |
| | |
| | | package com.panzhihua.applets.api; |
| | | |
| | | |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.dtos.equipment.UnionInspectionDto; |
| | | import com.panzhihua.common.model.dtos.equipment.UnionReportDto; |
| | | import com.panzhihua.common.model.vos.LoginUserInfoVO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.service.community.ComEquipmentUnionInspectionFeign; |
| | | import com.panzhihua.common.service.community.ComEquipmentUnionRePortFeign; |
| | | import com.panzhihua.common.service.user.UserService; |
| | | import io.swagger.annotations.Api; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/unionInspection/") |
| | | @Api(tags = {"户外劳工站巡查"}) |
| | | public class UnionInspectionApi extends BaseController { |
| | | |
| | | @Resource |
| | | private ComEquipmentUnionInspectionFeign comEquipmentUnionInspectionFeign; |
| | | |
| | | @Resource |
| | | private UserService userService; |
| | | |
| | | |
| | | /** |
| | | * 新增户外劳工站巡查 |
| | | * |
| | | * @param unionInspectionDto |
| | | * @return 新增结果 |
| | | */ |
| | | @PostMapping("/add") |
| | | public R add(@RequestBody UnionInspectionDto unionInspectionDto) { |
| | | // LoginUserInfoVO loginUser = this.getLoginUserInfo(); |
| | | // LoginUserInfoVO userInfoByUserId = userService.getUserInfoByUserId(loginUser.getUserId().toString()).getData(); |
| | | LoginUserInfoVO userInfoByUserId = userService.getUserInfoByUserId("1588095866109984769").getData(); |
| | | unionInspectionDto.setCreateUserId(userInfoByUserId.getUserId()); |
| | | return comEquipmentUnionInspectionFeign.add(unionInspectionDto); |
| | | } |
| | | |
| | | /** |
| | | * 分页户外劳工站巡查 |
| | | * |
| | | * @param unionInspectionDto |
| | | * @return 动态结果 |
| | | */ |
| | | @PostMapping("/query") |
| | | public R query(@RequestBody UnionInspectionDto unionInspectionDto) { |
| | | // LoginUserInfoVO loginUser = this.getLoginUserInfo(); |
| | | // LoginUserInfoVO userInfoByUserId = userService.getUserInfoByUserId(loginUser.getUserId().toString()).getData(); |
| | | LoginUserInfoVO userInfoByUserId = userService.getUserInfoByUserId("1588095866109984769").getData(); |
| | | unionInspectionDto.setCreateUserId(userInfoByUserId.getUserId()); |
| | | unionInspectionDto.setIsApplets(1); |
| | | return comEquipmentUnionInspectionFeign.query(unionInspectionDto); |
| | | } |
| | | } |