| | |
| | | import org.springframework.web.bind.annotation.*; |
| | | import zy.cloud.wms.common.web.BaseController; |
| | | import zy.cloud.wms.manager.entity.Cstmr; |
| | | import zy.cloud.wms.manager.entity.Mat; |
| | | import zy.cloud.wms.manager.service.CstmrService; |
| | | |
| | | import java.util.*; |
| | |
| | | @Autowired |
| | | private CstmrService cstmrService; |
| | | |
| | | @RequestMapping(value = "/cstmr/list/pda/auth") |
| | | @ManagerAuth |
| | | public R pdaList(@RequestParam(required = false)Long cstmrId){ |
| | | EntityWrapper<Cstmr> wrapper = new EntityWrapper<>(); |
| | | // wrapper.eq("id", cstmrId); |
| | | wrapper.orderBy("create_time", false); |
| | | hostEq(wrapper); |
| | | List<Cstmr> cstmrs = cstmrService.selectList(wrapper); |
| | | return R.ok().add(cstmrs); |
| | | } |
| | | |
| | | @RequestMapping(value = "/cstmr/search/pda/auth") |
| | | @ManagerAuth |
| | | public R pdaSearch(@RequestParam(required = false)String condition){ |
| | | EntityWrapper<Cstmr> wrapper = new EntityWrapper<>(); |
| | | if (!Cools.isEmpty(condition)) { |
| | | wrapper.like("name", condition); |
| | | } |
| | | wrapper.orderBy("create_time", false); |
| | | hostEq(wrapper); |
| | | List<Cstmr> cstmrs = cstmrService.selectList(wrapper); |
| | | return R.ok().add(cstmrs); |
| | | } |
| | | |
| | | @RequestMapping(value = "/cstmr/{id}/auth") |
| | | @ManagerAuth |
| | | public R get(@PathVariable("id") String id) { |