自动化立体仓库 - WMS系统
#
lty
4 天以前 d8c9b9afb41c368a08d7e05d0f624c98bf72042a
src/main/java/com/zy/third/erp/task/ERPOutHedTBScheduler.java
@@ -41,7 +41,7 @@
    public void OutHedTBScheduler() {
        //log.info("OutHedTBScheduler开始了");
        if (!erpEnabled) return;
        String sqlInHed = "select * from erp_OutHedTB where LKName='中扬二期'";
        String sqlInHed = "select * from erp_OutHedTB where LKName='高霖立库'";
        List<OutHedTB> inHeds = erpSqlServer.select(sqlInHed, OutHedTB.class);
        if (!inHeds.isEmpty()) {
            for (OutHedTB inHed : inHeds) {
@@ -49,11 +49,14 @@
                    //continue;
                }
                HashMap<String, String> condition = new HashMap<>();
                condition.put("BillNo", "'" + inHed.getBillNo() + "'");
                condition.put("bill_no", "'" + inHed.getBillNo() + "'");
                List<OutDetTB> inDetTBS = erpSqlServer.selectList(OutDetTB.class, condition);
                HashMap<String, Object> hedAndDet = new HashMap<>();
                hedAndDet.put("hed", inHed);
                hedAndDet.put("det", inDetTBS);
                if (inDetTBS == null || inDetTBS.isEmpty()) {
                    continue;
                }
                try {
                    inMS.createOutOrder(inHed, inDetTBS);
                    log.info("出库单据成功,{}", inHed);
@@ -70,11 +73,10 @@
    }
    public void OutHedTBScheduler(String orderNo) {
        //log.info("OutHedTBScheduler开始了");
        if (!erpEnabled) return;
        String sqlInHed = "select * from erp_OutHedTB where LKName='中扬二期' and BillNo = '"+ orderNo +"'";
        String sqlInHed = "select * from erp_OutHedTB where LKName='高霖立库' and BillNo = '" + orderNo + "'";
        List<OutHedTB> inHeds = erpSqlServer.select(sqlInHed, OutHedTB.class);
        if (!inHeds.isEmpty()) {
            for (OutHedTB inHed : inHeds) {
@@ -107,12 +109,12 @@
        OutHedTB hed = (OutHedTB) hedAndDet.get("hed");
        ArrayList<OutDetTB> dets = (ArrayList<OutDetTB>) hedAndDet.get("det");
        HashMap<String, String> condition = new HashMap<>();
        condition.put("BillNo", "'" + hed.getBillNo() + "'");
        condition.put("bill_no", "'" + hed.getBillNo() + "'");
        erpSqlServer.delete(OutHedTB.class, condition);
        for (OutDetTB det : dets) {
            HashMap<String, String> condition2 = new HashMap<>();
            condition2.put("BillNo", "'" + det.getBillNo() + "'");
            condition2.put("iNo", String.valueOf(det.getINO()));
            condition2.put("bill_no", "'" + det.getBillNo() + "'");
            condition2.put("i_no", String.valueOf(det.getINO()));
            erpSqlServer.delete(OutDetTB.class, condition2);
        }