1
luxiaotao1123
2021-09-24 cdc10eca2be8e548c6b05a0e5eb91fef38b587d1
src/main/java/com/zy/asrs/service/impl/OutStockServiceImpl.java
@@ -94,9 +94,11 @@
        String sql = "update OutStockbillEntry set FAuxCommitQty = (FAuxCommitQty + {0,number,#}) where 1=1 and Fnumber = ''{1}'' and FInterID = {2,number,#}";
        sql = MessageFormat.format(sql, increment, Fnumber, FInterID);
        if (jdbcTemplate.update(sql) > 0) {
            log.info("step 1 ======>> {}", sql);
            sql = "select * from OutStockbillEntry where 1=1 and Fnumber = ''{0}'' and FInterID = {1,number,#}";
            sql = MessageFormat.format(sql, Fnumber, FInterID);
            List<OutStockBillEntry> select = jdbcTemplate.queryForList(sql, OutStockBillEntry.class);
            log.info("step 2 ======>> {}", sql);
            OutStockBillEntry outStockBillEntry = select.get(0);
            boolean complete = false;
            if (outStockBillEntry.getFQty().compareTo(BigDecimal.ZERO) == 1) {
@@ -123,6 +125,7 @@
    private boolean completeCPakOut(String FBillNo){
        String sql = "update OutStockbill set Fflag_finish = 1 where FBillNo = ''{0}''";
        sql = MessageFormat.format(sql, FBillNo);
        log.info("step 3 ======>> {}", sql);
        return jdbcTemplate.update(sql) > 0;
    }