| | |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.data.redis.core.RedisTemplate; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.util.StringUtils; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.annotation.Resource; |
| | |
| | | import java.io.OutputStream; |
| | | import java.math.BigDecimal; |
| | | import java.text.DateFormat; |
| | | import java.text.ParseException; |
| | | import java.text.SimpleDateFormat; |
| | | import java.time.LocalDate; |
| | | import java.time.Period; |
| | |
| | | * 跳转到修改 |
| | | */ |
| | | @RequestMapping("/tDriver_update") |
| | | public String tDriverUpdate( Integer tDriverId, Model model) throws ParseException { |
| | | public String tDriverUpdate( Integer tDriverId, Model model) { |
| | | TDriver tDriver = tDriverService.selectById(tDriverId); |
| | | TDriverResp tDriverResp = new TDriverResp(); |
| | | BeanUtils.copyProperties(tDriver,tDriverResp); |
| | | |
| | | SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd"); |
| | | String format1 = format.format(tDriverResp.getFirstCertificateTime()); |
| | | tDriverResp.setFirstCertificateTimeStr(format1); |
| | | if(Objects.nonNull(tDriverResp.getFirstCertificateTime())){ |
| | | SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd"); |
| | | String format1 = format.format(tDriverResp.getFirstCertificateTime()); |
| | | tDriverResp.setFirstCertificateTimeStr(format1); |
| | | } |
| | | // tDriverResp.setFirstCertificateTime(format.parse(format1)); |
| | | |
| | | // 查询邀请人 |
| | |
| | | } |
| | | |
| | | model.addAttribute("item",tDriverResp); |
| | | model.addAttribute("driver",tDriver); |
| | | LogObjectHolder.me().set(tDriver); |
| | | return PREFIX + "tDriver_edit.html"; |
| | | } |
| | |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取详情中的汇总数据查询 |
| | | * @param id |
| | | * @param time |
| | | * @return |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping("/querySummaryData") |
| | | public Object querySummaryData(Integer id, String time){ |
| | | return tDriverService.querySummaryData(id, time); |
| | | } |
| | | } |