| New file |
| | |
| | | package com.zy.asrs.controller; |
| | | |
| | | import com.core.annotations.ManagerAuth; |
| | | import com.core.common.R; |
| | | import com.zy.asrs.entity.param.StockOutParam; |
| | | import com.zy.asrs.service.MatOutService; |
| | | import com.zy.asrs.service.WorkService; |
| | | import com.zy.common.web.BaseController; |
| | | import com.zy.ints.service.WaitMatinService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | /** |
| | | * 入库作业控制器(根据通知档) |
| | | * Created by TQS on 2021/8/24 |
| | | */ |
| | | @RestController |
| | | public class MatOutController extends BaseController { |
| | | @Autowired |
| | | private WaitMatinService waitMatinService; |
| | | @Autowired |
| | | private WorkService workService; |
| | | @Autowired |
| | | private MatOutService matOutService; |
| | | |
| | | @RequestMapping("/mat/out/start") |
| | | @ManagerAuth(memo = "出库启动(通知档)") |
| | | public R matOutStart(@RequestBody StockOutParam stockOutParam) { |
| | | return R.ok("出库启动成功").add(matOutService.startupMatOut(stockOutParam, getUserId()); |
| | | } |
| | | } |
| | |
| | | private MatStoreService matStoreService; |
| | | |
| | | @RequestMapping("/mat/store/start") |
| | | @ManagerAuth(memo = "全板入库(通知档)") |
| | | @ManagerAuth(memo = "入库启动(通知档)") |
| | | public R matStoreStart(@RequestBody FullStoreParam fullStoreParam) { |
| | | // return R.ok("入库启动成功").add(workService.startupFullPutStore(fullStoreParam,getUserId())); |
| | | return R.ok("入库启动成功").add(matStoreService.startupFullStore(fullStoreParam,getUserId())); |
| | |
| | | |
| | | public static class LocDetl { |
| | | |
| | | //单据编号 |
| | | private String billNo; |
| | | |
| | | //序号 |
| | | private Integer seqNo; |
| | | |
| | | // 库位号 |
| | | private String locNo; |
| | | |
| | |
| | | // 数量 |
| | | private Double count; |
| | | |
| | | public String getBillNo() { return billNo; } |
| | | |
| | | public void setBillNo(String billNo) { this.billNo = billNo; } |
| | | |
| | | public Integer getSeqNo() { return seqNo; } |
| | | |
| | | public void setSeqNo(Integer seqNo) { this.seqNo = seqNo; } |
| | | |
| | | public String getLocNo() { |
| | | return locNo; |
| | | } |
| New file |
| | |
| | | package com.zy.asrs.service; |
| | | |
| | | import com.zy.asrs.entity.param.StockOutParam; |
| | | |
| | | public interface MatOutService { |
| | | |
| | | /** |
| | | * 出库启动 |
| | | * @return 库位号 |
| | | */ |
| | | public void startupMatOut(StockOutParam param, Long userId); |
| | | } |
| New file |
| | |
| | | package com.zy.asrs.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.core.common.Cools; |
| | | import com.core.exception.CoolException; |
| | | import com.zy.asrs.entity.BasDevp; |
| | | import com.zy.asrs.entity.LocDetl; |
| | | import com.zy.asrs.entity.param.StockOutParam; |
| | | import com.zy.asrs.service.MatOutService; |
| | | import com.zy.common.model.LocDetlDto; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | @Service |
| | | public class MatOutServiceImpl implements MatOutService { |
| | | |
| | | @Override |
| | | @Transactional |
| | | public void startupMatOut(StockOutParam param, Long userId){ |
| | | // // 目标站点状态检测 |
| | | // BasDevp staNo = basDevpService.checkSiteStatus(param.getOutSite()); |
| | | // // 获取库位明细 |
| | | // List<LocDetlDto> locDetlDtos = new ArrayList<>(); |
| | | // for (StockOutParam.LocDetl paramLocDetl : param.getLocDetls()) { |
| | | // if (!Cools.isEmpty(paramLocDetl.getLocNo(), paramLocDetl.getMatNo(), paramLocDetl.getCount())) { |
| | | // LocDetl sqlParam = new LocDetl(); |
| | | // sqlParam.setLocNo(paramLocDetl.getLocNo()); |
| | | // sqlParam.setMatNo(paramLocDetl.getMatNo()); |
| | | // LocDetl one = locDetlService.selectOne(new EntityWrapper<>(sqlParam)); |
| | | // if (null != one) locDetlDtos.add(new LocDetlDto(one, paramLocDetl.getCount())); |
| | | // } |
| | | // } |
| | | // if (!locDetlDtos.isEmpty()) { |
| | | // // 启动出库开始 101.出库 |
| | | // stockOut(staNo, locDetlDtos, null, userId); |
| | | // } else { |
| | | // throw new CoolException("库位产品不存在"); |
| | | // } |
| | | } |
| | | } |
| | |
| | | var locDetlData = []; |
| | | function getCol() { |
| | | var cols = [ |
| | | // {field: 'count', align: 'center',title: '出库数量', edit:'text', width: 130, style:'color: blue;font-weight: bold'} |
| | | {field: 'anfme', align: 'center',title: '数量'} |
| | | ,{field: 'locNo$', align: 'center',title: '库位号'} |
| | | {fixed: 'left', field: 'count', title: '数量(必填)', align: 'center', edit:'text', width: 120, style:'color: blue;font-weight: bold'} |
| | | ,{field: 'billNo', title:'单据编号', align: 'center'} |
| | | ,{field: 'seqNo', title:'序号', align: 'center', width:80} |
| | | ,{field: 'qty', title:'通知入库量', align: 'center'} |
| | | ,{field: 'outQty', title:'已出库量', align: 'center'} |
| | | ]; |
| | | arrRemove(detlCols, 'field', 'anfme'); |
| | | arrRemove(detlCols, 'field', 'qty'); |
| | | cols.push.apply(cols, detlCols); |
| | | // cols.push({fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width:80}) |
| | | return cols; |
| | |
| | | switch (obj.event) { |
| | | case 'outbound': |
| | | if (data.length === 0){ |
| | | layer.msg('请先添加库位产品'); |
| | | layer.msg('请先添加产品'); |
| | | } else { |
| | | var staNo = $("#staNoSelect").val(); |
| | | if (staNo === "" || staNo === null){ |
| | |
| | | locDetls: locDetls |
| | | } |
| | | $.ajax({ |
| | | url: baseUrl+"/plate/out/start", |
| | | url: baseUrl+"/mat/out/start", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: JSON.stringify(param), |
| | | contentType:'application/json;charset=UTF-8', |
| | |
| | | var pageCurr; |
| | | function getCol() { |
| | | var cols = [ |
| | | {type: 'checkbox'} |
| | | ,{field: 'locNo$', align: 'center',title: '库位号'} |
| | | {type: 'checkbox', fixed: 'left'} |
| | | ,{field: 'qty', title: '通知出库量', fixed: 'left', width:100} |
| | | ,{field: 'outQty', title: '已出库量', fixed: 'left', width:90} |
| | | ]; |
| | | cols.push.apply(cols, detlCols); |
| | | cols.push( |
| | | {field: 'memo', align: 'center',title: '备注'} |
| | | cols.push.apply(cols, matCols); |
| | | cols.push({field: 'billNo', title:'单据编号', align: 'center'} |
| | | ,{field: 'seqNo', title:'序号', align: 'center', width:80} |
| | | ,{field: 'modiUser$', align: 'center',title: '修改人员', hide: true} |
| | | ,{field: 'modiTime$', align: 'center',title: '修改时间'}) |
| | | return cols; |
| | |
| | | locDetlTableIns = table.render({ |
| | | elem: '#stockOut', |
| | | headers: {token: localStorage.getItem('token')}, |
| | | url: baseUrl+'/stock/out/list/auth', |
| | | url: baseUrl+'/waitMatout/list/auth', |
| | | page: true, |
| | | limit: 10, |
| | | even: true, |
| | |
| | | if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | } |
| | | pageCurr=curr; |
| | | $('.layui-form-checkbox').css("pointer-events", "none"); |
| | | $('td[data-field="0').css("cursor", "pointer") |
| | | // pageCurr=curr; |
| | | // $('.layui-form-checkbox').css("pointer-events", "none"); |
| | | // $('td[data-field="0').css("cursor", "pointer") |
| | | } |
| | | }); |
| | | |