| | |
| | | import com.core.common.Cools; |
| | | import com.core.common.DateUtils; |
| | | import com.core.common.R; |
| | | import com.zy.asrs.entity.Order; |
| | | import com.zy.asrs.entity.OrderDetl; |
| | | import com.zy.asrs.mapper.OrderDetlMapper; |
| | | import com.zy.asrs.service.OrderDetlService; |
| | | import com.zy.common.web.BaseController; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | |
| | | @Autowired |
| | | private OrderDetlService orderDetlService; |
| | | |
| | | @RequestMapping("/orderDetl/list/pda/auth") |
| | | public R getPdaOrderDetl(@RequestParam String orderNo) { |
| | | @Resource |
| | | private OrderDetlMapper orderDetlMapper; |
| | | |
| | | @RequestMapping(value = "/orderDetl/search/pda/auth") |
| | | @ManagerAuth |
| | | public R pdaOrderDetlSearch(@RequestParam(required = false)String condition,@RequestParam(required = false) String order){ |
| | | EntityWrapper<OrderDetl> wrapper = new EntityWrapper<>(); |
| | | wrapper.eq("order_no", orderNo); |
| | | if (!Cools.isEmpty(condition)) { |
| | | // wrapper.like("matnr", condition).or().like("maktx", condition); |
| | | |
| | | wrapper.like("matnr", condition); |
| | | } |
| | | wrapper.eq("order_no", order); |
| | | wrapper.orderBy("create_time", false); |
| | | List<OrderDetl> mats = orderDetlService.selectList(wrapper); |
| | | return R.ok().add(mats); |
| | | } |
| | | |
| | | @PostMapping("/orderDetl/list/pda/auth") |
| | | public R getPdaOrderDetl(@RequestBody Map<String,Object> map) { |
| | | EntityWrapper<OrderDetl> wrapper = new EntityWrapper<>(); |
| | | wrapper.eq("order_no", map.get("orderNo")); |
| | | return R.ok(orderDetlService.selectList(wrapper)); |
| | | } |
| | | |
| | |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/orderDetl/getPrintDetl/{id}") |
| | | @ManagerAuth |
| | | public R getPrintDetl(@PathVariable("id") Integer id) { |
| | | if (Cools.isEmpty(id)) { |
| | | return R.parse("id为空"); |
| | | } |
| | | return R.ok(orderDetlService.selectById(id)); |
| | | } |
| | | |
| | | } |