自动化立体仓库 - WMS系统
mrzhssss
2022-05-14 4d113f37f719f62962af992028d718e9afa44a59
src/main/java/com/zy/asrs/task/handler/PlcLogHandler.java
@@ -20,13 +20,23 @@
    @Transactional
    public ReturnT<String> start() {
        try {
            // 下位机命令转历史档
            int updateCount = jdbcTemplate.update("insert into asr_stk_hplc select * from asr_stk_plcm where dateadd(day,7,appe_time) <= getdate();");
            if (updateCount > 0) {
                int deleteCount = jdbcTemplate.update("delete from asr_stk_plcm where dateadd(day,7,io_time) <= getdate();");
                if (deleteCount <= 0) {
                    exceptionHandle("堆垛机&PLC命令转历史档错误 ! ");
                }
//                if (deleteCount <= 0) {
//                    exceptionHandle("堆垛机&PLC命令转历史档错误 ! ");
//                }
            }
//            //条码组托数据转历史档 2021-09-10 TQS ADD
//            int updateBarcodeCount = jdbcTemplate.update("insert into asr_plt_barcode_log select * from asr_plt_barcode where io_status>=2;");
//            if (updateBarcodeCount > 0) {
//                int deleteBarcodeCount = jdbcTemplate.update("delete from asr_plt_barcode where io_status>=2;");
//                if (deleteBarcodeCount <= 0) {
//                    exceptionHandle("条码组托数据转历史档错误 ! ");
//                }
//            }
        } catch (Exception e) {
            e.printStackTrace();
            TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();