New file |
| | |
| | | package com.panzhihua.applets.api; |
| | | |
| | | |
| | | import com.panzhihua.common.controller.BaseController; |
| | | 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.ComEquipmentUnionRePortFeign; |
| | | import com.panzhihua.common.service.community.ComEquipmentUnionUserFeign; |
| | | import com.panzhihua.common.service.user.UserService; |
| | | import io.swagger.annotations.Api; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/unionReport/") |
| | | @Api(tags = {"户外劳工站上报"}) |
| | | public class UnionReportApi extends BaseController { |
| | | |
| | | @Resource |
| | | private ComEquipmentUnionRePortFeign comEquipmentUnionRePortFeign; |
| | | |
| | | @Resource |
| | | private UserService userService; |
| | | |
| | | |
| | | /** |
| | | * 户外劳工站上报表 |
| | | * |
| | | * @param unionReportDto |
| | | * @return 新增结果 |
| | | */ |
| | | @PostMapping("/add") |
| | | public R add(@RequestBody UnionReportDto unionReportDto) { |
| | | // LoginUserInfoVO loginUser = this.getLoginUserInfo(); |
| | | // LoginUserInfoVO userInfoByUserId = userService.getUserInfoByUserId(loginUser.getUserId().toString()).getData(); |
| | | LoginUserInfoVO userInfoByUserId = userService.getUserInfoByUserId("1588095866109984769").getData(); |
| | | unionReportDto.setCreateUserId(userInfoByUserId.getUserId()); |
| | | return comEquipmentUnionRePortFeign.add(unionReportDto); |
| | | } |
| | | |
| | | /** |
| | | * 分页户外劳工站上报表 |
| | | * |
| | | * @param unionReportDto |
| | | * @return 动态结果 |
| | | */ |
| | | @PostMapping("/query") |
| | | public R query(@RequestBody UnionReportDto unionReportDto) { |
| | | // LoginUserInfoVO loginUser = this.getLoginUserInfo(); |
| | | // LoginUserInfoVO userInfoByUserId = userService.getUserInfoByUserId(loginUser.getUserId().toString()).getData(); |
| | | LoginUserInfoVO userInfoByUserId = userService.getUserInfoByUserId("1588095866109984769").getData(); |
| | | unionReportDto.setCreateUserId(userInfoByUserId.getUserId()); |
| | | unionReportDto.setIsApplets(1); |
| | | return comEquipmentUnionRePortFeign.query(unionReportDto); |
| | | } |
| | | } |