| | |
| | | |
| | | Integer getStockOutPageCount(Map<String, Object> map); |
| | | |
| | | @Update("update asr_loc_detl set qty=#{qty}, modi_time = getDate() where loc_no = #{locNo} and mat_no = #{matNo}") |
| | | int updateAnfme(Double qty, String locNo, String matNo); |
| | | @Update("update asr_loc_detl set qty=#{qty}, modi_time = getDate(),all_weight=#{weight},all_qty=#{allQty} where loc_no = #{locNo} and mat_no = #{matNo}") |
| | | int updateAnfme(Double qty, String locNo, String matNo,Double weight,Double allQty); |
| | | |
| | | @Update("update asr_loc_detl set loc_no = #{newLocNo}, modi_time=getDate() where loc_no = #{oldLocNo}") |
| | | int updateLocNo(String newLocNo, String oldLocNo); |
| | |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.zy.asrs.entity.LocDetl; |
| | | import com.zy.asrs.entity.MatCode; |
| | | import com.zy.asrs.mapper.LocDetlMapper; |
| | | import com.zy.asrs.service.LocDetlService; |
| | | import com.zy.asrs.service.MatCodeService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | |
| | | |
| | | @Autowired |
| | | private LocDetlMapper locDetlMapper; |
| | | @Autowired |
| | | private MatCodeService matCodeService; |
| | | |
| | | |
| | | @Override |
| | |
| | | if (qty <= 0) { |
| | | return delete(new EntityWrapper<LocDetl>().eq("loc_no", locNo).eq("mat_no", matNo).eq("supplier",supplier)); |
| | | } else { |
| | | int res = baseMapper.updateAnfme(qty, locNo, matNo); |
| | | MatCode matCode = matCodeService.selectById(matNo); |
| | | Double weight = qty*matCode.getWeight()+30; |
| | | Double allQty = qty*matCode.getStr6(); |
| | | |
| | | int res = baseMapper.updateAnfme(qty, locNo, matNo,weight,allQty); |
| | | return res > 0; |
| | | } |
| | | } |
| | |
| | | pltBarcode.setVendor(combMat.getVendor()); |
| | | pltBarcode.setSource(combMat.getSource()); |
| | | pltBarcode.setQtyBox(matCode.getStr6()); |
| | | pltBarcode.setMemo(combMat.getMemo()); |
| | | if (!pltBarcodeService.insert(pltBarcode)) { |
| | | throw new CoolException("保存数据失败"); |
| | | } |
| | |
| | | pltBarcode.setVendor(combMat.getVendor()); |
| | | pltBarcode.setSource(combMat.getSource()); |
| | | pltBarcode.setQtyBox(matCode.getStr6()); |
| | | pltBarcode.setMemo(combMat.getMemo()); |
| | | if (!pltBarcodeService.insert(pltBarcode)) { |
| | | throw new CoolException("保存数据失败"); |
| | | } |
| | |
| | | } |
| | | // 生成工作档明细 |
| | | for (LocDetlDto detlDto : dto.getLocDetlDtos()) { |
| | | MatCode matCode = matCodeService.selectById(detlDto.getLocDetl().getMatNo()); |
| | | // 出库时,数量为0的直接忽略 |
| | | if (detlDto.getCount()==null || detlDto.getCount() <= 0.0D) {continue;} |
| | | WrkDetl wrkDetl = new WrkDetl(); |
| | |
| | | wrkDetl.setModiTime(new Date()); |
| | | wrkDetl.setModiUser(userId); |
| | | wrkDetl.setMemo(detlDto.getLocDetl().getMemo()); |
| | | wrkDetl.setQtyBox(matCode.getStr6()); |
| | | wrkDetl.setWeight(matCode.getWeight()); |
| | | wrkDetl.setAllWeight(qty*matCode.getWeight()+30); |
| | | wrkDetl.setAllQty(qty*matCode.getStr6()); |
| | | wrkDetl.setVendor(detlDto.getLocDetl().getVendor()); |
| | | wrkDetl.setSource(detlDto.getLocDetl().getSource()); |
| | | if (!wrkDetlService.insert(wrkDetl)) { |
| | | throw new CoolException("保存工作档明细失败"); |
| | | } |
| | |
| | | // {field: 'count', align: 'center',title: '出库数量', edit:'text', width: 130, style:'color: blue;font-weight: bold'} |
| | | {field: 'anfme', align: 'center',title: '出库数量',edit:'text',style:'color: blue;font-weight: bold'} |
| | | ,{field: 'locNo$', align: 'center',title: '库位号'} |
| | | , {field: 'matNo', align: 'center',title: '产品编码'} |
| | | ,{field: 'matNo', align: 'center',title: '产品编码'} |
| | | ,{field: 'matName', align: 'center',title: '产品名称'} |
| | | ,{field: 'specs', align: 'center',title: '规格'} |
| | | ,{field: 'qty', align: 'center',title: '数量'} |
| | | ,{field: 'qty', align: 'center',title: '库存数量'} |
| | | ,{field: 'source', title: '来源', align: 'center'} |
| | | ,{field: 'vendor', title: '供应商', align: 'center'} |
| | | ,{field: 'qtyBox', align: 'center', title: '每箱数量(PCS)'} |
| | | ,{field: 'allQty', title: '总数量(PCS)', align: 'center'} |
| | | ,{field: 'weight', align: 'center', title: '每箱重量(KG)'} |
| | | ,{field: 'allWeight', title: '总重量(KG)', align: 'center'} |
| | | ,{field: 'unit', align: 'center',title: '单位', width:80, hide: true} |
| | | ,{field: 'supplier', align: 'center',title: '批号'} |
| | | ,{field: 'color', align: 'center',title: '颜色'} |
| | |
| | | ,{field: 'matName', align: 'center',title: '产品名称'} |
| | | ,{field: 'specs', align: 'center',title: '规格'} |
| | | ,{field: 'qty', align: 'center',title: '数量'} |
| | | ,{field: 'source', title: '来源', align: 'center'} |
| | | ,{field: 'vendor', title: '供应商', align: 'center'} |
| | | ,{field: 'qtyBox', align: 'center', title: '每箱数量(PCS)'} |
| | | ,{field: 'allQty', title: '总数量(PCS)', align: 'center'} |
| | | ,{field: 'weight', align: 'center', title: '每箱重量(KG)'} |
| | | ,{field: 'allWeight', title: '总重量(KG)', align: 'center'} |
| | | ,{field: 'unit', align: 'center',title: '单位', width:80, hide: true} |
| | | ,{field: 'supplier', align: 'center',title: '批号'} |
| | | ,{field: 'color', align: 'center',title: '颜色'} |
| | |
| | | ,{field: 'matNo', align: 'center',title: '产品编码'} |
| | | ,{field: 'matName', align: 'center',title: '产品名称'} |
| | | ,{field: 'specs', align: 'center',title: '规格'} |
| | | ,{field: 'qty', align: 'center',title: '入库数量'} |
| | | ,{field: 'qty', align: 'center',title: '数量'} |
| | | ,{field: 'qtyBox', align: 'center',title: '每箱数量(PCS)'} |
| | | ,{field: 'allQty', align: 'center',title: '总数量(PCS)'} |
| | | ,{field: 'weight', align: 'center',title: '每箱重量(KG)'} |