|  |  |  | 
|---|
|  |  |  | import com.zy.asrs.framework.common.DateUtils; | 
|---|
|  |  |  | import com.zy.asrs.common.web.BaseController; | 
|---|
|  |  |  | import com.zy.asrs.framework.exception.CoolException; | 
|---|
|  |  |  | import org.apache.ibatis.annotations.Param; | 
|---|
|  |  |  | import org.springframework.beans.BeanUtils; | 
|---|
|  |  |  | import org.springframework.beans.factory.annotation.Autowired; | 
|---|
|  |  |  | import org.springframework.jdbc.core.JdbcTemplate; | 
|---|
|  |  |  | 
|---|
|  |  |  | for (OrderDetl o: orderDetl1) { | 
|---|
|  |  |  | BigDecimal c1 = new BigDecimal(o.getEnableQty()).setScale(2,BigDecimal.ROUND_HALF_UP); | 
|---|
|  |  |  | o.setAnfme(c1.doubleValue()); | 
|---|
|  |  |  | if (o.getAnfme().equals(0.0)){ | 
|---|
|  |  |  | continue; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | orderDetls.add(o); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return R.ok(orderDetls); | 
|---|
|  |  |  | 
|---|
|  |  |  | return R.ok(orderService.selectAllorderNo(getHostId())); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //    @RequestMapping(value = "/outOrder/list/all") | 
|---|
|  |  |  | //    @ManagerAuth | 
|---|
|  |  |  | //    public R orderOutList() { | 
|---|
|  |  |  | //        return R.ok(orderService.selectAllOutOrderNo(getHostId())); | 
|---|
|  |  |  | //    } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @RequestMapping(value = "/outOrder/list/all") | 
|---|
|  |  |  | @ManagerAuth | 
|---|
|  |  |  | public R orderOutList() { | 
|---|
|  |  |  | return R.ok(orderService.selectAllOutOrderNo(getHostId())); | 
|---|
|  |  |  | public R orderOutListOrder(@RequestBody String orderNo) { | 
|---|
|  |  |  | return R.ok(orderService.selectAllOutOrderNo(orderNo,getHostId())); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @RequestMapping(value = "/order/{id}/auth") | 
|---|
|  |  |  | 
|---|
|  |  |  | @RequestParam(required = false)String orderByField, | 
|---|
|  |  |  | @RequestParam(required = false)String orderByType, | 
|---|
|  |  |  | @RequestParam Map<String, Object> param) throws UnsupportedEncodingException { | 
|---|
|  |  |  | condition = condition.trim(); | 
|---|
|  |  |  | if(!Cools.isEmpty(condition)){ | 
|---|
|  |  |  | condition = condition.trim(); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | QueryWrapper<Order> wrapper = new QueryWrapper<>(); | 
|---|
|  |  |  | excludeTrash(param); | 
|---|
|  |  |  | wrapper.eq("status", 1); | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | param.remove("order_no"); | 
|---|
|  |  |  | allLike(Order.class, param.keySet(), wrapper, condition); | 
|---|
|  |  |  | wrapper.orderByDesc("create_time"); | 
|---|
|  |  |  | return R.ok(orderService.page(new Page<>(curr, limit), wrapper)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|