| | |
| | | excludeTrash(param); |
| | | convert(param, wrapper); |
| | | allLike(CheckRecord.class, param.keySet(), wrapper, condition); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} else { |
| | | wrapper.orderBy("create_time", false); |
| | | } |
| | | return R.ok(checkRecordService.selectPage(new Page<>(curr, limit), wrapper)); |
| | | } |
| | | |
New file |
| | |
| | | package com.zy.asrs.task; |
| | | |
| | | import com.zy.asrs.task.core.ReturnT; |
| | | import com.zy.asrs.task.handler.MatHandler; |
| | | import com.zy.asrs.task.handler.PlcLogHandler; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.scheduling.annotation.Scheduled; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | /** |
| | | * Created by vincent on 2020/7/7 |
| | | */ |
| | | @Slf4j |
| | | @Component |
| | | public class MatScheduler { |
| | | |
| | | @Autowired |
| | | private MatHandler matHandler; |
| | | |
| | | @Scheduled(cron = "0 0 1 * * ? ") |
| | | private void execute(){ |
| | | ReturnT<String> returnT = matHandler.start(); |
| | | if (!returnT.isSuccess()) { |
| | | log.error(returnT.getMsg()); |
| | | } |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.zy.asrs.task.handler; |
| | | |
| | | import com.zy.asrs.service.MatService; |
| | | import com.zy.asrs.task.AbstractHandler; |
| | | import com.zy.asrs.task.core.ReturnT; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.jdbc.core.JdbcTemplate; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.transaction.interceptor.TransactionAspectSupport; |
| | | |
| | | /** |
| | | * Created by vincent on 2020/7/7 |
| | | */ |
| | | @Service |
| | | public class MatHandler extends AbstractHandler<String> { |
| | | |
| | | @Autowired |
| | | private JdbcTemplate jdbcTemplate; |
| | | @Autowired |
| | | private MatService matService; |
| | | |
| | | @Transactional |
| | | public ReturnT<String> start() { |
| | | try { |
| | | |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
| | | return FAIL.setMsg(e.getMessage()); |
| | | } |
| | | return SUCCESS; |
| | | } |
| | | |
| | | } |
| | |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * 货架核心功能 |
| | |
| | | } |
| | | } |
| | | } |
| | | // LocMast locMast0 = locMastService.findOutMost(locMasts.stream().map(LocMast::getLocNo).distinct().collect(Collectors.toList())); |
| | | // if (!Cools.isEmpty(locMast0)) { |
| | | // locMast = locMast0; |
| | | // } |
| | | // 因库位移转、需预留空库位 todo:luxiaotao |
| | | // if (!locMastService.checkEmptyCount(locMast)) { |
| | | // locMast = null; |
| | |
| | | select * from |
| | | ( |
| | | select |
| | | ROW_NUMBER() over (order by a.appe_time,a.matnr,a.loc_no) as row, |
| | | ROW_NUMBER() over (order by a.loc_no,a.appe_time,a.matnr) as row, |
| | | a.* |
| | | from asr_loc_detl a |
| | | left join asr_loc_mast b on a.loc_no = b.loc_no |
| | |
| | | select top 1 * from ( |
| | | select top 1 * from asr_wrk_mast where 1=1 |
| | | and crn_no = 2 |
| | | and wrk_sts in (11,12,13,14,15,16,17) |
| | | and wrk_sts in (12,13,14,15,16) |
| | | and source_sta_no = #{staNo} |
| | | and io_type in (101.103,104,107,110) |
| | | union |
| | |
| | | ,{field: 'specs', align: 'center',title: '规格'} |
| | | ,{field: 'maktx', align: 'center',title: '商品名称', sort:true} |
| | | ,{field: 'orderNo', align: 'center',title: '单据编号', hide: false} |
| | | ,{field: 'batch', align: 'center',title: '批号', width: 200, sort:true} |
| | | ,{field: 'batch', align: 'center',title: '批号', sort:true} |
| | | ,{field: 'anfme', align: 'center',title: '数量'} |
| | | ,{field: 'zpallet', align: 'center',title: '托盘条码'} |
| | | |