| | |
| | | DataFormatter dataFormatter = new DataFormatter(); |
| | | for (int i = 1; i < totalRows; i++) { |
| | | Row row = sheet.getRow(i); |
| | | // 订单编号 |
| | | String uuid = dataFormatter.formatCellValue(row.getCell(0)); |
| | | // 物料号 |
| | | String maktx = dataFormatter.formatCellValue(row.getCell(1)); |
| | | // 物料号 |
| | | //单据类型 |
| | | String docName = dataFormatter.formatCellValue(row.getCell(0)); |
| | | //单据编号 |
| | | String uuid = dataFormatter.formatCellValue(row.getCell(1)); |
| | | //物料号 |
| | | String matnr = dataFormatter.formatCellValue(row.getCell(2)); |
| | | //销售单号 |
| | | String csocode = dataFormatter.formatCellValue(row.getCell(3)); |
| | | //自由项 |
| | | String isocode = dataFormatter.formatCellValue(row.getCell(4)); |
| | | // 数量 |
| | | Double anfme = Double.parseDouble(dataFormatter.formatCellValue(row.getCell(3))); |
| | | // 下单时间 |
| | | String timeStr = dataFormatter.formatCellValue(row.getCell(4)); |
| | | // 销售订单号 |
| | | String csocode = dataFormatter.formatCellValue(row.getCell(5)); |
| | | // 销售订单行号 |
| | | String isocode = dataFormatter.formatCellValue(row.getCell(6)); |
| | | Date time = null; |
| | | try { |
| | | time = DateUtils.convert(timeStr, DateUtils.yyyyMMddHHmmss_F); |
| | | } catch (Exception e) { |
| | | throw new CoolException("第" + i + "行下的那时间解析失败,请重新导入!"); |
| | | if(Cools.isEmpty(dataFormatter.formatCellValue(row.getCell(5)))){ |
| | | continue; |
| | | } |
| | | // 商品系列 |
| | | String tagName = dataFormatter.formatCellValue(row.getCell(5)); |
| | | // 规格 |
| | | String specs = dataFormatter.formatCellValue(row.getCell(6)); |
| | | |
| | | Double anfme = Double.parseDouble(dataFormatter.formatCellValue(row.getCell(5))); |
| | | Mat mat = matService.selectByMatnr(matnr); |
| | | if (null == mat) { |
| | | throw new CoolException(matnr + "商品编码的商品不存在,请重新导入!"); |
| | | } |
| | | |
| | | //String timeStr = DateUtils.convert(new Date()); |
| | | |
| | | DocType docType = docTypeService.selectOne(new EntityWrapper<DocType>().eq("doc_name", docName)); |
| | | |
| | | Order order = orderService.selectByNo(uuid); |
| | | if (null == order) { |
| | | order = new Order( |
| | | String.valueOf(snowflakeIdWorker.nextId()), // 编号[非空] |
| | | uuid, // 订单编号 |
| | | timeStr, // 单据日期 |
| | | 14L, // 单据类型 |
| | | null, // 单据日期 |
| | | docType.getDocId(), // 单据类型 |
| | | null, // 项目编号 |
| | | null, // |
| | | null, // 调拨项目编号 |
| | |
| | | orderDetl.setCreateTime(now); |
| | | orderDetl.setUpdateBy(userId); |
| | | orderDetl.setUpdateTime(now); |
| | | orderDetl.setThreeCode(csocode); |
| | | orderDetl.setDeadTime(isocode); |
| | | orderDetl.setStatus(1); |
| | | orderDetl.setQty(0.0D); |
| | | if (!orderDetlService.insert(orderDetl)) { |
| | |
| | | @Select("select station_code from agv_bas_devp where cache_shelves = 'N' and in_enable = 'Y' group by station_code") |
| | | List<String> selectCacheShelvesStationCodeByFloor(@Param("floor") int floor); |
| | | |
| | | @Select("select dev_no from agv_bas_devp where loc_type1 = #{locType}") |
| | | @Select("select dev_no from agv_bas_devp where loc_type1 = #{locType} and out_enable = 'Y'") |
| | | List<String> selectCacheShelvesStationCodeByLocType(@Param("locType") Short locType); |
| | | |
| | | @Select("SELECT\n" + |
| | |
| | | // //目标位 |
| | | // agvTaskParamList.add(new AgvTaskParam(agvWrkMast.getLocNo())); |
| | | |
| | | if(agvWrkMast.getIoType() == 53 || agvWrkMast.getIoType() == 57 ){ |
| | | agvWrkMast.setWrkNo(-agvWrkMast.getWrkNo()); |
| | | } |
| | | agvTaskCreateParam.setTaskCode(agvWrkMast.getWrkNo().toString()); |
| | | agvTaskCreateParam.setTaskTyp("F01"); |
| | | agvTaskCreateParam.setPositionCodePath(agvTaskParamList); |
| | |
| | | {field: 'matnr', align: 'center',title: '商品编码', width: 180} |
| | | //,{field: 'name', align: 'center',title: '移动类型', hide: true} |
| | | ,{field: 'maktx', align: 'center',title: '商品名称', width: 150} |
| | | ,{field: 'specs', align: 'center',title: '规格型号', hide: false} |
| | | ,{field: 'name', align: 'center',title: '生产部门名称', hide: false} |
| | | ,{field: 'beBatch$', align: 'center',title: '物料频率', hide: false} |
| | | ,{field: 'model', align: 'center',title: '通用型号', hide: true} |
| | | // ,{field: 'manuDate', align: 'center',title: '单据时间', hide: false} |
| | | // ,{field: 'weight', align: 'center',title: '重量', hide: false} |
| | | // ,{field: 'units', align: 'center',title: '支数', hide: false} |
| | | // ,{field: 'origin', align: 'center',title: '物料状态', hide: true} |
| | | ,{field: 'brand', align: 'center',title: '商品分类编码', hide: true} |
| | | ,{field: 'color', align: 'center',title: '商品分类名称', hide: true} |
| | | ,{field: 'unit', align: 'center',title: '计量单位', hide: true} |
| | | ,{field: 'price', align: 'center',title: '进项税', hide: true} |
| | | ,{field: 'units', align: 'center',title: '销项税', hide: true} |
| | | ,{field: 'brand', align: 'center',title: '存货大类名称', hide: true} |
| | | ,{field: 'color', align: 'center',title: '是否内销', hide: true} |
| | | ,{field: 'unit', align: 'center',title: '主计量单位名称', hide: true} |
| | | ,{field: 'price', align: 'center',title: '进项税率%', hide: true} |
| | | ,{field: 'units', align: 'center',title: '销项税率%', hide: true} |
| | | ,{field: 'dsDate', align: 'center',title: '启用日期', hide: true} |
| | | ,{field: 'supp', align: 'center',title: '建档人', hide: true} |
| | | ,{field: 'dInvCreateDatetime', align: 'center',title: '建档日期', hide: true} |
| | |
| | | var cols = [ |
| | | {type: 'checkbox'} |
| | | ,{field: 'tagId$', align: 'center',title: '归类', templet: '#tagTpl'} |
| | | ,{field: 'storeMax', align: 'center',title: '库存上限',width: 90} |
| | | ,{field: 'storeMin', align: 'center',title: '库存下限',width: 90} |
| | | ,{field: 'storeMaxDate', align: 'center',title: '库龄上限(天)',width: 90} |
| | | // ,{field: 'storeMax', align: 'center',title: '库存上限',width: 90} |
| | | // ,{field: 'storeMin', align: 'center',title: '库存下限',width: 90} |
| | | // ,{field: 'storeMaxDate', align: 'center',title: '库龄上限(天)',width: 90} |
| | | ,{field: 'status$', align: 'center',title: '状态'} |
| | | ]; |
| | | cols.push.apply(cols, matCols); |
| | |
| | | cols: [[ |
| | | {type: 'numbers'}, |
| | | {field: 'orderNo', title: '单据编号', templet: '#orderNoTpl'}, |
| | | {field: 'itemName', align: 'center', title: '核算主体'}, |
| | | //{field: 'itemName', align: 'center', title: '核算主体'}, |
| | | {field: 'docType$', align: 'center', title: '单据类型'}, |
| | | {field: 'defNumber', align: 'center', title: '业务类型'}, |
| | | //{field: 'defNumber', align: 'center', title: '业务类型'}, |
| | | //{field: 'postFee', align: 'center', title: '总数量', minWidth: 130, width: 130}, |
| | | {align: 'center', title: '明细', toolbar: '#tbLook', minWidth: 160, width: 160}, |
| | | {field: 'createTime$', title: '创建时间'}, |
| | |
| | | {type: 'numbers'}, |
| | | {field: 'matnr', title: '商品编码', width: 160}, |
| | | {field: 'maktx', title: '商品名称', width: 160}, |
| | | {field: 'batch', title: '批号'}, |
| | | //{field: 'batch', title: '批号'}, |
| | | {field: 'anfme', title: '数量'}, |
| | | {field: 'qty', title: '作业数量', style: 'font-weight: bold'}, |
| | | // {field: 'unit', title: '单位'}, |
| | |
| | | // }, |
| | | // {field: 'inQty', title: '已入库量'}, |
| | | // {field: 'color', title: '颜色'}, |
| | | {field: 'specs', title: '规格型号'}, |
| | | //{field: 'specs', title: '规格型号'}, |
| | | {field: 'unit', title: '计量单位'}, |
| | | {field: 'manu', title: '行号'}, |
| | | {field: 'threeCode', title: '销售订单号'}, |
| | | {field: 'deadTime', title: '销售订单行号'}, |
| | | {field: 'itemNum', title: '行唯一标识'} |
| | | //{field: 'manu', title: '行号'}, |
| | | {field: 'threeCode', title: '销售单号'}, |
| | | {field: 'deadTime', title: '自由项'}, |
| | | //{field: 'itemNum', title: '行唯一标识'} |
| | | ]], |
| | | request: { |
| | | pageName: 'curr', |
| | |
| | | <i class="layui-icon"></i>添加 |
| | | </button> |
| | | <button id="importOrder" class="layui-btn icon-btn btn-add"> |
| | | <i class="layui-icon layui-icon-upload"></i> 导入销售单 |
| | | <i class="layui-icon layui-icon-upload"></i> 导入单据 |
| | | </button> |
| | | <input style="display:none" id="importExcel" type="file" onchange="upload(this)" > |
| | | </div> |