| | |
| | | @Service |
| | | public class NotifyLogHandler extends AbstractHandler<String> { |
| | | |
| | | private static final String WAIT_PAKIN_ARCHIVE_COLUMNS = |
| | | "zpallet, anfme, loc_no, matnr, maktx, batch, order_no, specs, model, color, brand, unit, price, sku, units, barcode, " + |
| | | "origin, manu, manu_date, item_num, safe_qty, weight, man_length, volume, three_code, supp, supp_code, be_batch, dead_time, " + |
| | | "dead_warn, source, inspect, danger, status, io_status, modi_time, modi_user, appe_time, appe_user, memo, standby1, standby2, " + |
| | | "standby3, box_type1, box_type2, box_type3"; |
| | | |
| | | private static final String ARCHIVE_FINISHED_WAIT_PAKIN_SQL = |
| | | "insert into cust_wait_pakin_log (" + WAIT_PAKIN_ARCHIVE_COLUMNS + ") " + |
| | | "select " + WAIT_PAKIN_ARCHIVE_COLUMNS + " from cust_wait_pakin where io_status = 'F'"; |
| | | |
| | | @Autowired |
| | | private JdbcTemplate jdbcTemplate; |
| | | |
| | |
| | | public ReturnT<String> start() { |
| | | try { |
| | | // 入库通知档转历史档 |
| | | int pakInLog = jdbcTemplate.update("insert into cust_wait_pakin_log select * from cust_wait_pakin where io_status = 'F';"); |
| | | int pakInLog = jdbcTemplate.update(ARCHIVE_FINISHED_WAIT_PAKIN_SQL); |
| | | if (pakInLog > 0) { |
| | | int pakInDelete = jdbcTemplate.update("delete from cust_wait_pakin where io_status = 'F';"); |
| | | if (pakInDelete <= 0) { |