| | |
| | | |
| | | public interface LocRuleService extends IService<LocRule> { |
| | | |
| | | LocRule find(String matnr, String batch); |
| | | |
| | | } |
| | |
| | | package com.zy.asrs.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.core.common.Cools; |
| | | import com.zy.asrs.entity.Mat; |
| | | import com.zy.asrs.mapper.LocRuleMapper; |
| | | import com.zy.asrs.entity.LocRule; |
| | | import com.zy.asrs.service.LocRuleService; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.zy.asrs.service.MatService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service("locRuleService") |
| | | public class LocRuleServiceImpl extends ServiceImpl<LocRuleMapper, LocRule> implements LocRuleService { |
| | | |
| | | @Autowired |
| | | private MatService matService; |
| | | |
| | | @Override |
| | | public LocRule find(String matnr, String batch) { |
| | | if (Cools.isEmpty(matnr)) { |
| | | return null; |
| | | } |
| | | Mat mat = matService.selectByMatnr(matnr); |
| | | if (Cools.isEmpty(mat)) { |
| | | return null; |
| | | } |
| | | LocRule locRule = null; |
| | | do { |
| | | locRule = this.selectOne(new EntityWrapper<LocRule>().eq("matnr", matnr).eq("status", 1)); |
| | | if (null != locRule) { |
| | | break; |
| | | } |
| | | locRule = this.selectOne(new EntityWrapper<LocRule>().eq("specs", mat.getSpecs()).eq("status", 1)); |
| | | if (null != locRule) { |
| | | break; |
| | | } |
| | | locRule = this.selectOne(new EntityWrapper<LocRule>().eq("model", mat.getModel()).eq("status", 1)); |
| | | if (null != locRule) { |
| | | break; |
| | | } |
| | | locRule = this.selectOne(new EntityWrapper<LocRule>().eq("batch", batch).eq("status", 1)); |
| | | if (null != locRule) { |
| | | break; |
| | | } |
| | | } while (false); |
| | | return locRule; |
| | | } |
| | | } |
| | |
| | | private SlaveProperties slaveProperties; |
| | | @Autowired |
| | | private MatService matService; |
| | | @Autowired |
| | | private LocRuleService locRuleService; |
| | | |
| | | /** |
| | | * 生成工作号 |
| | |
| | | ,{field: 'model', align: 'center',title: '型号'} |
| | | ,{field: 'cstmr', align: 'center',title: '客户'} |
| | | ,{field: 'batch', align: 'center',title: '批号'} |
| | | ,{field: 'other', align: 'center',title: '其他'} |
| | | ,{field: 'other', align: 'center',title: '其他', hide: true} |
| | | ,{field: 'rowBeg', align: 'center',title: '开始排'} |
| | | ,{field: 'rowEnd', align: 'center',title: '结束排'} |
| | | ,{field: 'bayBeg', align: 'center',title: '开始列'} |