自动化立体仓库 - WMS系统
pang.jiabao
4 天以前 4aebedd582c7b1beb23df39829c341b40343e2ce
src/main/java/com/zy/asrs/controller/OrderController.java
@@ -19,6 +19,8 @@
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.math.BigDecimal;
import java.util.*;
@RestController
@@ -42,6 +44,25 @@
    private WrkMastService wrkMastService;
    @Autowired
    private WrkMastLogService wrkMastLogService;
    @Resource
    private OrderDetlPakinService orderDetlPakinService;
    @RequestMapping(value = "/order/list/orderNo")
    public R orderListorderNo(@RequestParam String orderNo) {
        //数量修改成为完成数量
        List<OrderDetlPakin> orderDetl1 = orderDetlPakinService.selectList(new EntityWrapper<OrderDetlPakin>().eq("order_no", orderNo));
        List<OrderDetlPakin> orderDetls= new ArrayList<>();
        for (OrderDetlPakin 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);
    }
    @RequestMapping(value = "/order/nav/list/auth")
    @ManagerAuth
@@ -104,9 +125,14 @@
            DocType docType = docTypeService.selectById(param.getDocType());
            if(!Cools.isEmpty(docType)){
                prefix = docType.getPakin() == 1 ? "RK" : "CK";
                status = (prefix == "RK" ? 1 : (prefix == "CK" ? 2 : 0));
                status = (prefix.equals("RK") ? 1 : (prefix.equals("CK") ? 2 : 0));
            }
            param.setOrderNo(prefix + snowflakeIdWorker.nextId());
        } else {
            DocType docType = docTypeService.selectById(param.getDocType());
            if(!Cools.isEmpty(docType)){
                status = (docType.getPakin() == 1 ? 1 :  2 );
            }
        }
        Order order = orderService.selectByNo(param.getOrderNo());