| | |
| | | |
| | | double issued = Optional.of(orderDetl.getAnfme() - orderDetl.getWorkQty()).orElse(0.0D); |
| | | if (issued <= 0.0D) { continue; } |
| | | List<LocDetl> locDetls = locDetlService.queryStock2(orderDetl.getMatnr(), orderDetl.getBatch()); |
| | | for (LocDetl locDetl : locDetls) { |
| | | List<ManLocDetl> manLocDetls = manLocDetlService.queryStock(orderDetl.getMatnr()); |
| | | for (ManLocDetl locDetl : manLocDetls) { |
| | | if (issued > 0) { |
| | | boolean sign = false; |
| | | if (issued > locDetl.getAnfme() || locDetl.getAnfme().equals(issued)){ |
| | | sign=true; |
| | | } |
| | | LocDto locDto = new LocDto(locDetl.getLocNo(), locDetl.getMatnr(), locDetl.getMaktx(), locDetl.getBatch(), orderDetl.getOrderNo(), |
| | | LocDto locDto = new LocDto(locDetl.getHostId(),locDetl.getLocNo(), locDetl.getMatnr(), locDetl.getMaktx(), locDetl.getBatch(), orderDetl.getOrderNo(), |
| | | sign ? locDetl.getAnfme() : issued); |
| | | List<Integer> staNos = staDescService.queryOutStaNosByLocNo(locDetl.getLocNo(), sign? 101 : 103); |
| | | // LocDto locDto = new LocDto(locDetl.getLocNo(), locDetl.getMatnr(), locDetl.getMaktx(), locDetl.getBatch(), orderDetl.getOrderNo(), |
| | |
| | | // //速腾只有全板,所以只能101全板出库 |
| | | // List<Integer> staNos = staDescService.queryOutStaNosByLocNo(locDetl.getLocNo(), 101); |
| | | locDto.setStaNos(staNos); |
| | | locDto.setManu(locDetl.getManu()); |
| | | locDtos.add(locDto); |
| | | exist.add(locDetl.getLocNo()); |
| | | BigDecimal iss=new BigDecimal(Double.toString(issued)).setScale(2,BigDecimal.ROUND_HALF_UP); |
| | |
| | | } |
| | | } |
| | | if (issued > 0) { |
| | | LocDto locDto = new LocDto(null, orderDetl.getMatnr(), orderDetl.getMaktx(), orderDetl.getBatch(), orderDetl.getOrderNo(), issued); |
| | | LocDto locDto = new LocDto(null,null, orderDetl.getMatnr(), orderDetl.getMaktx(), orderDetl.getBatch(), orderDetl.getOrderNo(), issued); |
| | | // LocDto locDto = new LocDto(null, orderDetl.getMatnr(), orderDetl.getMaktx(), orderDetl.getBatch(), orderDetl.getOrderNo(), 0.0,issued); |
| | | locDto.setLack(Boolean.TRUE); |
| | | locDtos.add(locDto); |
| | |
| | | LocDto locDto = locDtos.get(locDtos.size() - 1 - i); |
| | | if (locDto.getLocNo() == null) { |
| | | is[i][0] = 1; |
| | | } else if (locDto.getManu().equals("立库")){ |
| | | is[i][0] = 2; |
| | | } else { |
| | | is[i][0] = 0; |
| | | } |
| | |
| | | |
| | | private R addPakOUT(LocDto locDto,String uuid){ |
| | | ManPakOut manPakOut=new ManPakOut(); |
| | | manPakOut.setDocId(locDto.getHostId()); |
| | | manPakOut.setWrkNo(locDto.getOrderNo()+"-"+System.currentTimeMillis()); |
| | | manPakOut.setWrkSts((long)1); |
| | | manPakOut.setAnfme(locDto.getAnfme()); |
| | |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.Set; |
| | | |
| | | @Mapper |
| | | @Repository |
| | |
| | | |
| | | // ------------------------------------------------- |
| | | |
| | | List<ManLocDetl> queryStock(@Param("matnr")String matnr, @Param("batch")String batch, @Param("orderNo")String orderNo, @Param("locNos") Set<String> locNos); |
| | | List<ManLocDetl> queryStock(@Param("matnr")String matnr); |
| | | |
| | | Double queryStockAnfme(String matnr, String batch); |
| | | |
| | |
| | | import com.zy.system.entity.User; |
| | | |
| | | import java.util.List; |
| | | import java.util.Set; |
| | | |
| | | public interface ManLocDetlService extends IService<ManLocDetl> { |
| | | Page<ManLocDetl> getPage(Page<ManLocDetl> page); |
| | |
| | | |
| | | // -------------------------------------------------- |
| | | |
| | | List<ManLocDetl> queryStock(String matnr, String batch, String orderNo, Set<String> locNos); |
| | | List<ManLocDetl> queryStock(String matnr); |
| | | |
| | | Double queryStockAnfme(String matnr, String batch); |
| | | |
| | |
| | | } |
| | | |
| | | @Override |
| | | public List<ManLocDetl> queryStock(String matnr, String batch, String orderNo, Set<String> locNos) { |
| | | return this.baseMapper.queryStock(matnr, batch, orderNo, locNos); |
| | | public List<ManLocDetl> queryStock(String matnr) { |
| | | return this.baseMapper.queryStock(matnr); |
| | | } |
| | | |
| | | @Override |
| | |
| | | @Data |
| | | public class LocDto { |
| | | |
| | | private Long hostId; |
| | | |
| | | private String locNo; |
| | | |
| | | private String matnr; |
| | |
| | | public LocDto() { |
| | | } |
| | | |
| | | public LocDto(String locNo, String matnr, String batch, Double anfme) { |
| | | public LocDto(Long hostId,String locNo, String matnr, String batch, Double anfme) { |
| | | this.locNo = locNo; |
| | | this.matnr = matnr; |
| | | this.batch = batch; |
| | | this.anfme = anfme; |
| | | this.hostId = hostId; |
| | | } |
| | | |
| | | public LocDto(String locNo, String matnr, String batch, String orderNo, Double anfme) { |
| | | public LocDto(Long hostId,String locNo, String matnr, String batch, String orderNo, Double anfme) { |
| | | this.locNo = locNo; |
| | | this.matnr = matnr; |
| | | this.batch = batch; |
| | | this.orderNo = orderNo; |
| | | this.anfme = anfme; |
| | | this.hostId = hostId; |
| | | } |
| | | |
| | | public LocDto(String locNo, String matnr, String maktx, String batch, String orderNo, Double anfme) { |
| | | public LocDto(Long hostId,String locNo, String matnr, String maktx, String batch, String orderNo, Double anfme) { |
| | | this.locNo = locNo; |
| | | this.matnr = matnr; |
| | | this.maktx = maktx; |
| | | this.batch = batch; |
| | | this.orderNo = orderNo; |
| | | this.anfme = anfme; |
| | | this.hostId = hostId; |
| | | |
| | | } |
| | | |
| | | public LocDto(String locNo, String matnr, String maktx, String batch, String orderNo, Double anfme, Double needQty) { |
| | | public LocDto(Long hostId,String locNo, String matnr, String maktx, String batch, String orderNo, Double anfme, Double needQty) { |
| | | this.locNo = locNo; |
| | | this.matnr = matnr; |
| | | this.maktx = maktx; |
| | |
| | | this.orderNo = orderNo; |
| | | this.anfme = anfme; |
| | | this.needQty = needQty; |
| | | this.hostId = hostId; |
| | | } |
| | | |
| | | public String getTitle() { |
| | |
| | | |
| | | |
| | | </select> |
| | | <select id="queryStock" resultMap="BaseResultMap"> |
| | | select a.* |
| | | from asr_loc_detl_merge a |
| | | left join asr_loc_detl_F_view b on a.loc_no = b.loc_no |
| | | where 1=1 |
| | | and b.loc_sts = 'F' |
| | | and a.matnr = #{matnr} |
| | | |
| | | </select> |
| | | <delete id="deleteDatailed"> |
| | | delete from man_loc_detl |
| | | where loc_no = #{locNo} |
| | |
| | | ,{field: 'orderNo', align: 'center',title: '单据编号', templet: '#orderNoTpl', width: 160} |
| | | ,{field: 'matnr', align: 'center',title: '商品编码', width: 160} |
| | | ,{field: 'maktx', align: 'center',title: '商品名称', width: 200} |
| | | // ,{field: 'anfme', align: 'center',title: '数量'} |
| | | // ,{field: 'qty', align: 'center',title: '作业数量', style: 'font-weight: bold'} |
| | | ,{field: 'anfme', align: 'center',title: '总数量', style: 'font-weight: bold'} |
| | | ,{field: 'enableQty', align: 'center',title: '待出数量', style: 'font-weight: bold'} |
| | | // ,{field: 'name', align: 'center',title: '名称'} |
| | | // ,{field: 'model', align: 'center',title: '型号'} |
| | | ,{field: 'unit', align: 'center',title: '单位', hide: true} |
| | | ,{field: 'barcode', align: 'center',title: '商品条码', hide: true} |
| | | // ,{field: 'supplier', align: 'center',title: '供应商'} |
| | | // ,{field: 'unitPrice', align: 'center',title: '单价'} |
| | | // ,{field: 'itemNum', align: 'center',title: '品项数'} |
| | | // ,{field: 'count', align: 'center',title: '数量'} |
| | | // ,{field: 'weight', align: 'center',title: '重量'} |
| | | // ,{field: 'status$', align: 'center',title: '状态'} |
| | | // ,{field: 'createBy$', align: 'center',title: '添加人员'} |
| | | // ,{field: 'createTime$', align: 'center',title: '添加时间'} |
| | | // ,{field: 'updateBy$', align: 'center',title: '修改人员'} |
| | | // ,{field: 'updateTime$', align: 'center',title: '修改时间'} |
| | | // ,{field: 'memo', align: 'center',title: '备注'} |
| | | ,{fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width: 160} |
| | | ]], |
| | | request: { |
| | |
| | | // {type: 'checkbox', merge: ['orderNo']}, |
| | | {field: 'orderNo', title: '单据编号', merge: true, align: 'center'}, |
| | | {field: 'title', title: '商品', merge: true, align: 'center', width: 350}, |
| | | {field: 'batch', title: '序列码', align: 'center'}, |
| | | {field: 'manu', title: '仓库', align: 'center'}, |
| | | {field: 'hostId', title: 'id', align: 'center'}, |
| | | // { title: '剩余需求量', align: 'center' , width: 120, toolbar: '#checkNeedQty'}, |
| | | // {field: 'anfme', title: '实际数量', align: 'center', width: 90, style: 'font-weight: bold'}, |
| | | { title: '出库数量', align: 'center',field: 'anfme', width: 90, style: 'font-weight: bold; color: red'}, |