| | |
| | | package com.flow.controller; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.flow.mapper.OperationLogMapper; |
| | | import com.flow.mapper.TbFuwuqiMapper; |
| | | import com.flow.pojo.Card; |
| | | import com.flow.pojo.OperationLog; |
| | | import com.flow.pojo.TbFuwuqi; |
| | | import com.flow.service.CompanyService; |
| | | import com.flow.service.OperationLogService; |
| | | import com.flow.service.TbFuwuqiService; |
| | | import com.flow.util.result; |
| | | import com.flow.util.resultutil; |
| | |
| | | @Autowired |
| | | CompanyService companyService; |
| | | |
| | | @Autowired |
| | | OperationLogService operationLogService; |
| | | @Autowired |
| | | TbFuwuqiMapper tbFuwuqiMapper; |
| | | @Autowired |
| | | OperationLogMapper operationLogMapper; |
| | | @GetMapping({"findTbFuwuqi"}) |
| | | result<List<TbFuwuqi>> findBangZhu(Integer page, Integer limit) throws ParseException { |
| | | PageInfo<TbFuwuqi> cz = this.tbFuwuqiService.FindTbFuwuqi(page, limit); |
| | |
| | | ((TbFuwuqi)cz.getList().get(i)).setRemainingdays(+num11/24/60/60/1000+"天"); |
| | | } |
| | | if (!((TbFuwuqi)cz.getList().get(i)).getRemainingdays().equals("0天") || !((TbFuwuqi)cz.getList().get(i)).getRemainingdays().equals(+num11/24/60/60/1000+"天") ){ |
| | | System.out.println("打印数据==========》》》》》》》》》》"); |
| | | this.tbFuwuqiService.UpdateTbFuwuqi((TbFuwuqi)cz.getList().get(i)); |
| | | } |
| | | // |
| | |
| | | ((TbFuwuqi)cz.getList().get(i)).setRemainingdays(+num11/24/60/60/1000+"天"); |
| | | } |
| | | if (!((TbFuwuqi)cz.getList().get(i)).getRemainingdays().equals("0天") || !((TbFuwuqi)cz.getList().get(i)).getRemainingdays().equals(+num11/24/60/60/1000+"天") ){ |
| | | System.out.println("222222222222"); |
| | | this.tbFuwuqiService.UpdateTbFuwuqi((TbFuwuqi)cz.getList().get(i)); |
| | | } |
| | | } |
| | |
| | | @PostMapping({"UpdateTbFuwuqi"}) |
| | | public ModelAndView UpdateCard(TbFuwuqi tbFuwuqi) { |
| | | this.tbFuwuqiService.UpdateTbFuwuqi(tbFuwuqi); |
| | | QueryWrapper queryWrapper = new QueryWrapper(); |
| | | queryWrapper.eq("id", tbFuwuqi.getId()); |
| | | TbFuwuqi tbFuwuqi1 = tbFuwuqiMapper.selectOne(queryWrapper); |
| | | OperationLog operationLog = new OperationLog(); |
| | | operationLog.setCaozuotype("修改"); |
| | | operationLog.setCaozuocontent("修改服务器:"+tbFuwuqi1.getServername()); |
| | | operationLog.setCaozuoname(tbFuwuqi1.getCaozuoname()); |
| | | operationLogService.addOperationLog(operationLog); |
| | | Date date = new Date(); |
| | | SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | operationLog.setCaozuodate(formatter.format(date)); |
| | | operationLogMapper.insert(operationLog); |
| | | ModelAndView modelAndView = new ModelAndView(); |
| | | modelAndView.setViewName("/page/Fuwuqi.jsp"); |
| | | return modelAndView; |
| | | } |
| | | |
| | | @PostMapping({"DeleteTbFuwuqi"}) |
| | | public int DeleteCard(String num) { |
| | | return this.tbFuwuqiService.DeleteTbFuwuqi(num); |
| | | public int DeleteCard(String num,String caozuoname) { |
| | | return this.tbFuwuqiService.DeleteTbFuwuqi(num,caozuoname); |
| | | } |
| | | |
| | | @PostMapping({"tbFuwuqiSearch"}) |
| | |
| | | } |
| | | return resultutil.returnSuccess(cz.getTotal(), cz.getList()); |
| | | } |
| | | |
| | | @PostMapping({"ifFuwuqi"}) |
| | | public TbFuwuqi ifFuwuqi(TbFuwuqi tbFuwuqi) { |
| | | return this.tbFuwuqiService.ifFuwuqi(tbFuwuqi); |
| | | } |
| | | |
| | | |
| | | } |