| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.time.LocalDate; |
| | | import java.util.*; |
| | | |
| | | @RestController |
| | |
| | | @RequestParam(required = false)String orderByType, |
| | | @RequestParam(required = false)String condition, |
| | | @RequestParam Map<String, Object> param, |
| | | @RequestParam(required = false)Boolean unreason){ |
| | | @RequestParam(required = false)Boolean unreason, |
| | | @RequestParam(required = false)Boolean expired){ |
| | | if (!Cools.isEmpty(unreason) && unreason) { |
| | | |
| | | return R.ok(locDetlService.selectPage(new Page<>(curr, limit), new EntityWrapper<LocDetl>() |
| | | .where(" DATALENGTH( batch ) != 11 or\n" + |
| | | " batch LIKE '%[a-z]%'"))); |
| | | } |
| | | if (!Cools.isEmpty(expired) && expired) { |
| | | return R.ok(locDetlService.selectPage( |
| | | new Page<>(curr, limit), |
| | | new EntityWrapper<LocDetl>() |
| | | .where("deadline < {0}", LocalDate.now()) // 新增的过期判断 |
| | | )); |
| | | } |
| | | param.remove("unreason"); |
| | | param.remove("expired"); |
| | | String row = ""; |
| | | EntityWrapper<LocDetl> wrapper = new EntityWrapper<>(); |
| | | if (param.get("row") != null) { |