| | |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.domain.TravelCount; |
| | | import com.ruoyi.service.TravelCountDownlService; |
| | | import com.ruoyi.service.TravelCountService; |
| | | import com.ruoyi.service.TravelCountSharService; |
| | | import com.ruoyi.service.TravelDetailSharService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | |
| | | @Autowired |
| | | private TravelCountService travelCountService; |
| | | |
| | | @Autowired |
| | | private TravelCountDownlService travelCountDownlService; |
| | | |
| | | @Autowired |
| | | private TravelCountSharService travelCountSharService; |
| | | |
| | | @GetMapping("/all") |
| | | public AjaxResult listAll(TravelCount travelCount, String happenStartTime, String happenEndTime) throws ParseException { |
| | | SysUser user = SecurityUtils.getLoginUser().getUser(); |
| | |
| | | |
| | | |
| | | |
| | | return travelCountService.selectDataList(userId,pageNum,pageSize,travelCount,happenStartTime,happenEndTime); |
| | | AjaxResult res = travelCountService.selectDataList(userId,pageNum,pageSize,travelCount,happenStartTime,happenEndTime); |
| | | System.out.println(res); |
| | | return res; |
| | | } |
| | | |
| | | @GetMapping("/{id}") |
| | |
| | | @DeleteMapping("/{ids}") |
| | | public AjaxResult remove(@PathVariable Long[] ids) |
| | | { |
| | | if (! (travelCountDownlService.deleteData(ids) && travelCountSharService.deleteByContentId(ids) ) ){ |
| | | return AjaxResult.error(); |
| | | } |
| | | travelCountService.removeData(Arrays.asList(ids)); |
| | | return AjaxResult.success(); |
| | | } |