| | |
| | | import com.zy.asrs.entity.param.StockOutParam; |
| | | import com.zy.common.model.LocDetlDto; |
| | | |
| | | import java.util.List; |
| | | |
| | | public interface MatOutService { |
| | | |
| | | /** |
| | |
| | | * @param locDetls 待出库产品 |
| | | * @param ioType 入出库类型 |
| | | */ |
| | | void stockOut(String billNO,BasDevp staNo, LocDetlDto locDetls, Integer ioType, Long userId); |
| | | void stockOut(String billNO,Integer seqNo,BasDevp staNo, LocDetlDto locDetls, Integer ioType, Long userId); |
| | | } |
| | |
| | | import com.zy.asrs.service.*; |
| | | import com.zy.asrs.utils.VersionUtils; |
| | | import com.zy.common.model.LocDetlDto; |
| | | import com.zy.common.model.OutLocDto; |
| | | import com.zy.common.service.CommonService; |
| | | import com.zy.ints.entity.WaitMatout; |
| | | import com.zy.ints.mapper.WaitMatoutMapper; |
| | |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.*; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | @Service |
| | | public class MatOutServiceImpl implements MatOutService { |
| | |
| | | |
| | | if (outQty >= locDetl.getQty()){ |
| | | //生成文档记录 |
| | | stockOut(waitMatout.getBillNo(),staNo,new LocDetlDto(locDetl,locDetl.getQty()),ioType,userId); |
| | | stockOut(waitMatout.getBillNo(),waitMatout.getSeqNo(),staNo,new LocDetlDto(locDetl,locDetl.getQty()),ioType,userId); |
| | | waitMatout.setOutQty(waitMatout.getOutQty() + locDetl.getQty()); |
| | | waitMatout.setIoStatus(1); |
| | | //修改记录 |
| | | Integer update = waitMatoutMapper.update(waitMatout, new EntityWrapper<WaitMatout>().eq("bill_no", paramLocDetl.getBillNo()) |
| | | .eq("seq_no",paramLocDetl.getSeqNo())); |
| | | }else { |
| | | //生成文档记录 |
| | | stockOut(waitMatout.getBillNo(),staNo,new LocDetlDto(locDetl,outQty),ioType,userId); |
| | | stockOut(waitMatout.getBillNo(),waitMatout.getSeqNo(),staNo,new LocDetlDto(locDetl,outQty),ioType,userId); |
| | | waitMatout.setOutQty(waitMatout.getOutQty() + outQty); |
| | | waitMatout.setIoStatus(1); |
| | | //修改记录 |
| | | Integer update = waitMatoutMapper.update(waitMatout, new EntityWrapper<WaitMatout>().eq("bill_no", paramLocDetl.getBillNo()) |
| | | .eq("seq_no",paramLocDetl.getSeqNo())); |
| | |
| | | |
| | | @Override |
| | | @Transactional |
| | | public void stockOut(String billNo,BasDevp staNo, LocDetlDto locDetlDtos, Integer ioType, Long userId) { |
| | | public void stockOut(String billNo, Integer seqNo, BasDevp staNo, LocDetlDto locDetlDtos, Integer ioType, Long userId) { |
| | | // 生成工作档 |
| | | LocDetl locDetl=locDetlDtos.getLocDetl(); |
| | | // 获取库位 |
| | |
| | | wrkDetl.setAppeUser(userId); |
| | | wrkDetl.setModiTime(new Date()); |
| | | wrkDetl.setBillNo(billNo); |
| | | wrkDetl.setSeqNo(seqNo); |
| | | wrkDetl.setModiUser(userId); |
| | | if (!wrkDetlService.insert(wrkDetl)) { |
| | | throw new CoolException("保存工作档明细失败"); |
| | | } |
| | | |
| | | // 修改库位状态: F.在库 ====>>> R.出库预约/P.拣料/盘点/并板出库中 |
| | | locMast = locMastService.selectById(locDetl.getLocNo()); |
| | | if (locMast.getLocSts().equals("F")) { |
| | |
| | | return util.toDateString(d.createTime); |
| | | }, width: 180 |
| | | }, |
| | | {field: 'outqty', title: '已出库量'}, |
| | | {field: 'outQty', title: '已出库量'}, |
| | | {field: 'color', title: '颜色'}, |
| | | {field: 'specs', title: '规格'}, |
| | | ]], |
| | |
| | | response: { |
| | | statusCode: 200 |
| | | }, |
| | | done: function () { |
| | | done: function (res) { |
| | | // console.log(res); |
| | | $(layero).find('.layui-table-view').css('margin', '0'); |
| | | }, |
| | | size: '' |