diff --git a/ruoyi-admin/src/main/java/com/ruoyi/manufacture/controller/MaterialRequisitionInfoController.java b/ruoyi-admin/src/main/java/com/ruoyi/manufacture/controller/MaterialRequisitionInfoController.java deleted file mode 100644 index cc7d8549..00000000 --- a/ruoyi-admin/src/main/java/com/ruoyi/manufacture/controller/MaterialRequisitionInfoController.java +++ /dev/null @@ -1,769 +0,0 @@ -//package com.ruoyi.manufacture.controller; -// -//import com.alibaba.excel.EasyExcel; -//import com.alibaba.excel.ExcelWriter; -//import com.alibaba.excel.util.MapUtils; -//import com.alibaba.excel.write.metadata.WriteSheet; -//import com.alibaba.excel.write.metadata.fill.FillConfig; -//import com.alibaba.excel.write.metadata.fill.FillWrapper; -//import com.alibaba.excel.write.metadata.style.WriteCellStyle; -//import com.alibaba.excel.write.style.HorizontalCellStyleStrategy; -//import com.ruoyi.ck.utils.Result; -//import com.ruoyi.common.annotation.Log; -//import com.ruoyi.common.core.controller.BaseController; -//import com.ruoyi.common.core.domain.AjaxResult; -//import com.ruoyi.common.core.page.TableDataInfo; -//import com.ruoyi.common.enums.BusinessType; -//import com.ruoyi.common.utils.poi.ExcelUtil; -//import com.ruoyi.manufacture.domain.MaterialRequisitionDetail; -//import com.ruoyi.manufacture.domain.MaterialRequisitionInfo; -//import com.ruoyi.manufacture.domain.WorkOrderInfo; -//import com.ruoyi.manufacture.domain.exportDto.MaterialRequisitionDetailDto; -//import com.ruoyi.manufacture.domain.exportDto.MaterialRequisitionInfoDto; -//import com.ruoyi.manufacture.domain.exportDto.WorkOrderInfoDto; -//import com.ruoyi.manufacture.service.IMaterialRequisitionDetailService; -//import com.ruoyi.manufacture.service.IMaterialRequisitionInfoService; -//import com.ruoyi.manufacture.service.IWorkOrderInfoService; -//import com.ruoyi.system.domain.*; -//import com.ruoyi.system.service.*; -//import com.ruoyi.system.utils.ExcelFillCellMergePrevColUtils; -//import org.apache.poi.ss.usermodel.HorizontalAlignment; -//import org.apache.poi.ss.usermodel.VerticalAlignment; -//import org.apache.poi.xssf.usermodel.XSSFWorkbook; -//import org.apache.shiro.authz.annotation.RequiresPermissions; -//import org.springframework.beans.BeanUtils; -//import org.springframework.beans.factory.annotation.Autowired; -//import org.springframework.stereotype.Controller; -//import org.springframework.ui.ModelMap; -//import org.springframework.web.bind.annotation.*; -// -//import javax.servlet.http.HttpServletResponse; -//import java.io.*; -//import java.net.URLEncoder; -//import java.text.SimpleDateFormat; -//import java.util.*; -// -//import static com.ruoyi.common.config.datasource.DynamicDataSourceContextHolder.log; -// -///** -// * 领料单Controller -// * -// * @author ruoyi -// * @date 2023-04-06 -// */ -//@Controller -//@RequestMapping("/manufacture/materialRequisitionInfo") -//public class MaterialRequisitionInfoController extends BaseController -//{ -// private String prefix = "manufacture/materialRequisitionInfo"; -// private String prefixRaw = "manufacture/materialRequisitionYL"; -// private String prefixSubsidiary = "manufacture/materialRequisitionFL"; -// private String prefixBcp = "manufacture/materialRequisitionBCP"; -// private String prefixOutsource = "outsource/materialRequisitionOutsource"; -// -// //excel数据量 -// private Integer excelSize = 28; -// -// @Autowired -// private IMaterialRequisitionInfoService materialRequisitionInfoService; -// @Autowired -// private IMaterialRequisitionDetailService materialRequisitionDetailService; -// @Autowired -// private ISysDictTypeService sysDictTypeService; -// @Autowired -// private ISysBomService sysBomService; -// @Autowired -// private ISysBomBcpService sysBomBcpService; -// @Autowired -// private ISysBomRawMaterialService sysBomRawMaterialService; -// @Autowired -// private ISysBomSubsidiaryMaterialService sysBomSubsidiaryMaterialService; -// @Autowired -// private IWorkOrderInfoService workOrderInfoService; -// @Autowired -// private IOutsourceOrderMaterialService outsourceOrderMaterialService; -// @Autowired -// private ISysFinishProductService sysFinishProductService; -// -// -//// @RequiresPermissions("manufacture:materialRequisitionInfo:view") -//// @GetMapping() -//// public String materialRequisitionInfo() -//// { -//// return prefix + "/materialRequisitionInfo"; -//// } -// -// @RequiresPermissions("manufacture:materialRequisitionInfo:viewRaw") -// @GetMapping("/viewRaw") -// public String materialRequisitionRaw() -// { -// return prefixRaw + "/materialRequisitionYL"; -// } -// -// @RequiresPermissions("manufacture:materialRequisitionInfo:viewSubsidiary") -// @GetMapping("/viewSubsidiary") -// public String materialRequisitionSubsidiary() -// { -// return prefixSubsidiary + "/materialRequisitionFL"; -// } -// -// @RequiresPermissions("manufacture:materialRequisitionInfo:viewBcp") -// @GetMapping("/viewBcp") -// public String materialRequisitionBcp() -// { -// return prefixBcp + "/materialRequisitionBCP"; -// } -// -// @RequiresPermissions("manufacture:materialRequisitionInfo:viewOutsource") -// @GetMapping("/viewOutsource") -// public String materialRequisitionOutsource() -// { -// return prefixOutsource + "/materialRequisitionOutsource"; -// } -// -// /** -// * 查询领料单列表 -// */ -//// @RequiresPermissions("manufacture:materialRequisitionInfo:list") -//// @PostMapping("/list") -//// @ResponseBody -//// public TableDataInfo list(MaterialRequisitionInfo materialRequisitionInfo) -//// { -//// startPage(); -//// List list = materialRequisitionInfoService.selectMaterialRequisitionInfoList(materialRequisitionInfo); -//// return getDataTable(list); -//// } -// -// @RequiresPermissions("manufacture:materialRequisitionInfo:listRaw") -// @PostMapping("/listRaw") -// @ResponseBody -// public TableDataInfo listRaw(MaterialRequisitionInfo materialRequisitionInfo) -// { -// startPage(); -// List list = materialRequisitionInfoService.selectMaterialRequisitionInfoListRaw(materialRequisitionInfo); -// return getDataTable(list); -// } -// @RequiresPermissions("manufacture:materialRequisitionInfo:listSubsidiary") -// @PostMapping("/listSubsidiary") -// @ResponseBody -// public TableDataInfo listSubsidiary(MaterialRequisitionInfo materialRequisitionInfo) -// { -// startPage(); -// List list = materialRequisitionInfoService.selectMaterialRequisitionInfoListSubsidiary(materialRequisitionInfo); -// return getDataTable(list); -// } -// @RequiresPermissions("manufacture:materialRequisitionInfo:listBcp") -// @PostMapping("/listBcp") -// @ResponseBody -// public TableDataInfo listBcp(MaterialRequisitionInfo materialRequisitionInfo) -// { -// startPage(); -// List list = materialRequisitionInfoService.selectMaterialRequisitionInfoListBcp(materialRequisitionInfo); -// return getDataTable(list); -// } -// @RequiresPermissions("manufacture:materialRequisitionInfo:listOutsource") -// @PostMapping("/listOutsource") -// @ResponseBody -// public TableDataInfo listOutsource(MaterialRequisitionInfo materialRequisitionInfo) -// { -// startPage(); -// List list = materialRequisitionInfoService.selectMaterialRequisitionInfoListOutsource(materialRequisitionInfo); -// return getDataTable(list); -// } -// -// /** -// * 导出领料单列表 -// */ -// @RequiresPermissions("manufacture:materialRequisitionInfo:export") -// @Log(title = "领料单", businessType = BusinessType.EXPORT) -// @PostMapping("/export") -// @ResponseBody -// public AjaxResult export(MaterialRequisitionInfo materialRequisitionInfo) -// { -// List list = materialRequisitionInfoService.selectMaterialRequisitionInfoList(materialRequisitionInfo); -// ExcelUtil util = new ExcelUtil(MaterialRequisitionInfo.class); -// return util.exportExcel(list, "领料单数据"); -// } -// -// /** -// * 新增领料单 -// */ -// @GetMapping("/add") -// public String add() -// { -// return prefix + "/add"; -// } -// -// @GetMapping("/addRaw") -// public String addRaw() -// { -// return prefixRaw + "/add"; -// } -// -// @GetMapping("/addSubsidiary") -// public String addSubsidiary() -// { -// return prefixSubsidiary + "/add"; -// } -// -// @GetMapping("/addBcp") -// public String addBcp() -// { -// return prefixBcp + "/add"; -// } -// @GetMapping("/addOutsource") -// public String addOutsource() -// { -// return prefixOutsource + "/add"; -// } -// -// /** -// * 新增保存领料单 -// */ -// @RequiresPermissions("manufacture:materialRequisitionInfo:add") -// @Log(title = "领料单", businessType = BusinessType.INSERT) -// @PostMapping("/add") -// @ResponseBody -// public AjaxResult addSave(MaterialRequisitionInfo materialRequisitionInfo) -// { -// return toAjax(materialRequisitionInfoService.insertMaterialRequisitionInfo(materialRequisitionInfo)); -// } -// -// /** -// * 修改领料单 -// */ -//// @GetMapping("/edit/{materialRequisitionId}") -//// public String edit(@PathVariable("materialRequisitionId") Long materialRequisitionId, ModelMap mmap) -//// { -//// MaterialRequisitionInfo materialRequisitionInfo = materialRequisitionInfoService.selectMaterialRequisitionInfoById(materialRequisitionId); -//// mmap.put("materialRequisitionInfo", materialRequisitionInfo); -//// return prefix + "/edit"; -//// } -// -// @GetMapping("/editRaw/{materialRequisitionId}") -// public String editRaw(@PathVariable("materialRequisitionId") Long materialRequisitionId, ModelMap mmap) -// { -// MaterialRequisitionInfo materialRequisitionInfo = materialRequisitionInfoService.selectMaterialRequisitionInfoById(materialRequisitionId); -// mmap.put("materialRequisitionInfo", materialRequisitionInfo); -// return prefixRaw + "/edit"; -// } -// @GetMapping("/editSubsidiary/{materialRequisitionId}") -// public String editSubsidiary(@PathVariable("materialRequisitionId") Long materialRequisitionId, ModelMap mmap) -// { -// MaterialRequisitionInfo materialRequisitionInfo = materialRequisitionInfoService.selectMaterialRequisitionInfoById(materialRequisitionId); -// mmap.put("materialRequisitionInfo", materialRequisitionInfo); -// return prefixSubsidiary + "/edit"; -// } -// @GetMapping("/editBcp/{materialRequisitionId}") -// public String editBcp(@PathVariable("materialRequisitionId") Long materialRequisitionId, ModelMap mmap) -// { -// MaterialRequisitionInfo materialRequisitionInfo = materialRequisitionInfoService.selectMaterialRequisitionInfoById(materialRequisitionId); -// mmap.put("materialRequisitionInfo", materialRequisitionInfo); -// return prefixBcp + "/edit"; -// } -// @GetMapping("/editOutsource/{materialRequisitionId}") -// public String editOutsource(@PathVariable("materialRequisitionId") Long materialRequisitionId, ModelMap mmap) -// { -// MaterialRequisitionInfo materialRequisitionInfo = materialRequisitionInfoService.selectMaterialRequisitionInfoById(materialRequisitionId); -// mmap.put("materialRequisitionInfo", materialRequisitionInfo); -// return prefixOutsource + "/edit"; -// } -// /** -// * 修改保存领料单 -// */ -// @RequiresPermissions("manufacture:materialRequisitionInfo:edit") -// @Log(title = "领料单", businessType = BusinessType.UPDATE) -// @PostMapping("/edit") -// @ResponseBody -// public AjaxResult editSave(MaterialRequisitionInfo materialRequisitionInfo) -// { -// return toAjax(materialRequisitionInfoService.updateMaterialRequisitionInfo(materialRequisitionInfo)); -// } -// -// /** -// * 删除领料单 -// */ -// @RequiresPermissions("manufacture:materialRequisitionInfo:remove") -// @Log(title = "领料单", businessType = BusinessType.DELETE) -// @PostMapping( "/remove") -// @ResponseBody -// public AjaxResult remove(@RequestParam(value = "ids") String ids) -// { -// return toAjax(materialRequisitionInfoService.deleteMaterialRequisitionInfoByIds(ids)); -// } -// -// @RequiresPermissions("manufacture:materialRequisitionInfo:remove") -// @Log(title = "领料单", businessType = BusinessType.DELETE) -// @RequestMapping( "/removeSelected") -// @ResponseBody -// public String removeSelected(@RequestParam(value = "ids") String ids) { -// System.out.println(ids); -// String[] idsStr = ids.split(","); -// for (int i = 0; i< idsStr.length; i++) { -// MaterialRequisitionInfo materialRequisitionInfo = materialRequisitionInfoService.selectMaterialRequisitionInfoById(Long.valueOf(idsStr[i])); -// MaterialRequisitionDetail materialRequisitionDetail = new MaterialRequisitionDetail(); -// materialRequisitionDetail.setMaterialRequisitionNumber(materialRequisitionInfo.getMaterialRequisitionNumber()); -// List list = materialRequisitionDetailService.selectMaterialRequisitionDetailList(materialRequisitionDetail); -// if (list.size()>0) { -// for (int j=0;j workOrderInfoList = workOrderInfoService.selectWorkOrderInfoList(workOrderInfo); -// WorkOrderInfoDto workOrderInfoDto = new WorkOrderInfoDto(); -// String specificationModel = ""; -// String versionNumber = ""; -// if (workOrderInfoList.size() == 1) { -// BeanUtils.copyProperties(workOrderInfoList.get(0),workOrderInfoDto); -// specificationModel = workOrderInfoDto.getSpecificationModel(); -// versionNumber = workOrderInfoDto.getVersionNumber(); -// } -// -// //查询物料信息 -// MaterialRequisitionDetail materialRequisitionDetail = new MaterialRequisitionDetail(); -// materialRequisitionDetail.setMaterialRequisitionNumber(materialRequisitionInfo.getMaterialRequisitionNumber()); -// -// // 创建列合并工具类对象 -// ExcelFillCellMergePrevColUtils mergePrevColUtils = new ExcelFillCellMergePrevColUtils(); -// -// //领料单包含的物料 -// List materialRequisitionDetailList = materialRequisitionDetailService.selectMaterialRequisitionDetailList(materialRequisitionDetail); -// List materialRequisitionDetailDtoList = new ArrayList<>(); -// -// try { -// int number = 0; -// Iterator values= materialRequisitionDetailList.iterator(); -// while(values.hasNext()) { -// Object source = values.next(); -// MaterialRequisitionDetailDto target = MaterialRequisitionDetailDto.class.newInstance(); -// BeanUtils.copyProperties(source, target); -// target.setNumber(++number); -// materialRequisitionDetailDtoList.add(target); -//// getBomDetail(number, target.getMaterialCode(), materialRequisitionDetailDtoList); -// } -// int size = materialRequisitionDetailDtoList.size(); -// if (materialRequisitionDetailDtoList.size()>>>>>异常<<<<<<", e); -// } -// System.out.println(materialRequisitionDetailDtoList); -// -// response.setCharacterEncoding("utf-8"); -// String fileName = URLEncoder.encode("领料单", "UTF-8").replaceAll("\\+", "%20"); -// response.setHeader("Content-disposition", "attachment;filename*=utf-8''" + fileName + ".xlsx"); -// String templateFileName = "C:\\exportTemplates\\exportMaterialRequisition.xlsx"; -// try (ExcelWriter excelWriter = EasyExcel -// .write(response.getOutputStream(), MaterialRequisitionDetailDto.class) -// .withTemplate(templateFileName) -//// .registerWriteHandler(mergePrevColUtils) -// //样式注册 -// .registerWriteHandler(horizontalCellStyleStrategyBuilder()) -// .build()) { -// WriteSheet writeSheet = EasyExcel.writerSheet().build(); -// FillConfig fillConfig = FillConfig.builder().forceNewRow(Boolean.TRUE).build(); -// excelWriter.fill(materialRequisitionDetailDtoList, fillConfig, writeSheet); -// Map map = MapUtils.newHashMap(); -//// map.put("date", DateTimeFormatter.ofPattern("yyyy/MM/dd").format(LocalDateTime.now())); -// map.put("materialRequisitionNumber", materialRequisitionInfoDto.getMaterialRequisitionNumber()); -// map.put("salesOrderNumber", materialRequisitionInfoDto.getSalesOrderNumber()); -// map.put("workOrderNumber", materialRequisitionInfoDto.getWorkOrderNumber()); -// map.put("firstAddTime", materialRequisitionInfoDto.getFirstAddTime()); -// map.put("outputDate", materialRequisitionInfoDto.getOutputDate()); -//// List deptData = sysDictTypeService.selectDictDataByType("sys_dept_type"); -//// for (int i = 0;i materialRequisitionDetailDtoList) { -// //获取bom信息 -// //判断是否有bom -// SysBom sysBom = new SysBom(); -// sysBom.setFinishProductCode(materialCode); -// List sysBomList = sysBomService.selectSysBomList(sysBom); -// //如果是半成品,则继续查询 -// if (sysBomList.size() != 0) { -// //先查询原料 -// SysBomRawMaterial sysBomRawMaterial = new SysBomRawMaterial(); -// sysBomRawMaterial.setFinishProductCode(sysBomList.get(0).getFinishProductCode()); -// List sysBomRawMaterialList = sysBomRawMaterialService.selectSysBomRawMaterialList(sysBomRawMaterial); -// try { -//// Iterator values1= sysBomRawMaterialList.iterator(); -// for (int i = 0; i < sysBomRawMaterialList.size(); i++){ -// MaterialRequisitionDetailDto target1 = MaterialRequisitionDetailDto.class.newInstance(); -//// BeanUtils.copyProperties(source1, target1); -// target1.setNumber(++number); -// target1.setMaterialCode(sysBomRawMaterialList.get(i).getRawMaterialCode()); -// target1.setMaterialName(sysBomRawMaterialList.get(i).getRawMaterialName()); -// target1.setSpecificationModel(sysBomRawMaterialList.get(i).getSpecificationModel()); -// target1.setItemNumber(sysBomRawMaterialList.get(i).getSupplierNumber()); -// target1.setInventoryUnit(sysBomRawMaterialList.get(i).getInventoryUnit()); -// target1.setUnitUsage(sysBomRawMaterialList.get(i).getRawMaterialConsumption()); -// materialRequisitionDetailDtoList.add(target1); -// getBomDetail(number,sysBomRawMaterialList.get(i).getRawMaterialCode(),materialRequisitionDetailDtoList); -// } -// } catch (Exception e) { -// log.error(">>>>>>异常<<<<<<", e); -// } -// } -// } -// -// -// /** -// * 导出领料单列表 -// */ -// @RequiresPermissions("manufacture:materialRequisitionInfo:export") -// @Log(title = "领料单", businessType = BusinessType.EXPORT) -// @PostMapping("/exportSelectedOutSource/{materialRequisitionId}") -// @ResponseBody -// public void exportSelectedOutSource(@PathVariable("materialRequisitionId") Long materialRequisitionId, HttpServletResponse response) throws IOException { -//// -// -// System.out.println(materialRequisitionId); -// MaterialRequisitionInfo materialRequisitionInfo = materialRequisitionInfoService.selectMaterialRequisitionInfoById(materialRequisitionId); -// MaterialRequisitionInfoDto materialRequisitionInfoDto = new MaterialRequisitionInfoDto(); -// BeanUtils.copyProperties(materialRequisitionInfo,materialRequisitionInfoDto); -// -// MaterialRequisitionDetail materialRequisitionDetail = new MaterialRequisitionDetail(); -// materialRequisitionDetail.setMaterialRequisitionNumber(materialRequisitionInfo.getMaterialRequisitionNumber()); -// -// // 创建列合并工具类对象 -// ExcelFillCellMergePrevColUtils mergePrevColUtils = new ExcelFillCellMergePrevColUtils(); -// -// List materialRequisitionDetailList = materialRequisitionDetailService.selectMaterialRequisitionDetailList(materialRequisitionDetail); -// List materialRequisitionDetailDtoList = new ArrayList<>(); -// -// try { -// int number = 0; -// Iterator values= materialRequisitionDetailList.iterator(); -// while(values.hasNext()) { -// Object source = values.next(); -// MaterialRequisitionDetailDto target = MaterialRequisitionDetailDto.class.newInstance(); -// BeanUtils.copyProperties(source, target); -// mergePrevColUtils.add(number+5,1,1); -// mergePrevColUtils.add(number+5,4,1); -// target.setNumber(++number); -// materialRequisitionDetailDtoList.add(target); -// } -// }catch (Exception e) { -// log.error(">>>>>>异常<<<<<<", e); -// } -// System.out.println(materialRequisitionDetailDtoList); -// -// response.setCharacterEncoding("utf-8"); -// String fileName = URLEncoder.encode("委外领料单", "UTF-8").replaceAll("\\+", "%20"); -// response.setHeader("Content-disposition", "attachment;filename*=utf-8''" + fileName + ".xlsx"); -// String templateFileName = "C:\\exportTemplates\\exportMaterialRequisitionOutsource.xlsx"; -// try (ExcelWriter excelWriter = EasyExcel -// .write(response.getOutputStream(), MaterialRequisitionDetailDto.class) -// .withTemplate(templateFileName) -// .registerWriteHandler(mergePrevColUtils) -// //样式注册 -// .registerWriteHandler(horizontalCellStyleStrategyBuilder()) -// .build()) { -// WriteSheet writeSheet = EasyExcel.writerSheet().build(); -// FillConfig fillConfig = FillConfig.builder().forceNewRow(Boolean.TRUE).build(); -// excelWriter.fill(materialRequisitionDetailDtoList, fillConfig, writeSheet); -// Map map = MapUtils.newHashMap(); -//// map.put("date", DateTimeFormatter.ofPattern("yyyy/MM/dd").format(LocalDateTime.now())); -// map.put("materialRequisitionNumber", materialRequisitionInfoDto.getMaterialRequisitionNumber()); -// map.put("outsourceOrderNumber", materialRequisitionInfoDto.getOutsourceOrderNumber()); -// map.put("supplierCode", materialRequisitionInfoDto.getWorkOrderNumber()); -// map.put("supplierName", materialRequisitionInfoDto.getFirstAddTime()); -// map.put("outputDate", materialRequisitionInfoDto.getOutputDate()); -// map.put("materialRequisitionPerson", materialRequisitionInfoDto.getMaterialRequisitionPerson()); -// excelWriter.fill(map, writeSheet); -// } -// } -// -// -// public HorizontalCellStyleStrategy horizontalCellStyleStrategyBuilder() { -// WriteCellStyle headWriteCellStyle = new WriteCellStyle(); -// //设置头字体 -//// WriteFont headWriteFont = new WriteFont(); -//// headWriteFont.setFontHeightInPoints((short) 13); -//// headWriteFont.setBold(true); -//// headWriteCellStyle.setWriteFont(headWriteFont); -// //设置头居中 -// headWriteCellStyle.setHorizontalAlignment(HorizontalAlignment.CENTER); -// -// //内容策略 -// WriteCellStyle contentWriteCellStyle = new WriteCellStyle(); -// //设置 水平居中 -// contentWriteCellStyle.setHorizontalAlignment(HorizontalAlignment.CENTER); -// //垂直居中 -// contentWriteCellStyle.setVerticalAlignment(VerticalAlignment.CENTER); -// //单元格边框 -//// contentWriteCellStyle.setBorderTop(BorderStyle.THIN); -//// contentWriteCellStyle.setBorderLeft(BorderStyle.THIN); -//// contentWriteCellStyle.setBorderRight(BorderStyle.THIN); -//// contentWriteCellStyle.setBorderBottom(BorderStyle.THIN); -// -// return new HorizontalCellStyleStrategy(headWriteCellStyle, contentWriteCellStyle); -// } -// -// /** -// * 查询委外领料单物料明细List -// */ -//// @RequiresPermissions("manufacture:materialRequisitionInfo:listOutsource") -// @PostMapping("/selectOutsourceDetail/{outsourceOrderNumber}") -// @ResponseBody -// public TableDataInfo selectOutsourceDetail(@PathVariable("outsourceOrderNumber")String outsourceOrderNumber){ -// startPage(); -// //委外订单 -// List orderMaterialList = outsourceOrderMaterialService.selectOutsourceOrderMaterialList(new OutsourceOrderMaterial(outsourceOrderNumber)); -// //委外明细 -// List materialRequisitionDetailList = new ArrayList<>(); -// //bom阶 -// int bomRank = 1; -// for (OutsourceOrderMaterial outsourceOrderMaterial : orderMaterialList) { -// List list = sysBomBcpAllList(bomRank,Double.valueOf(outsourceOrderMaterial.getQuantity()),new SysBomBcp(outsourceOrderMaterial.getMaterialCode())); -// if (list.size()>0){ -// materialRequisitionDetailList.addAll(list); -// } -// } -// return getDataTable(materialRequisitionDetailList); -// } -// -// @RequiresPermissions("manufacture:materialRequisitionInfo:export") -// @Log(title = "领料单", businessType = BusinessType.EXPORT) -// @PostMapping("/exportOutsource/{materialRequisitionId}") -// @ResponseBody -// public void exportOutsource(@PathVariable("materialRequisitionId") Long materialRequisitionId, HttpServletResponse response) throws IOException { -// //委外领料 -// MaterialRequisitionInfo materialRequisitionInfo = materialRequisitionInfoService.selectMaterialRequisitionInfoById(materialRequisitionId); -// //委外订单 -// List orderMaterialList = outsourceOrderMaterialService.selectOutsourceOrderMaterialList(new OutsourceOrderMaterial(materialRequisitionInfo.getOutsourceOrderNumber())); -// -// response.setCharacterEncoding("utf-8"); -// String fileName = URLEncoder.encode("委外领料单", "UTF-8").replaceAll("\\+", "%20"); -// response.setHeader("Content-disposition", "attachment;filename*=utf-8''" + fileName + ".xlsx"); -// String templateFileName = "C:\\exportTemplates\\exportMaterialRequisitionOutsource.xlsx"; -// -// ExcelFillCellMergePrevColUtils mergePrevColUtils = new ExcelFillCellMergePrevColUtils(); -// Map> map = new HashMap<>(); -// for (OutsourceOrderMaterial orderMaterial : orderMaterialList) { -// List materialRequisitionDetailList = exportOutsourceList(materialRequisitionInfo.getMaterialRequisitionNumber(), orderMaterial.getMaterialCode()); -// List materialRequisitionDetailDtoList = new ArrayList<>(); -// try { -// int number = 0; -// Iterator materialRequisitionDetailValues = materialRequisitionDetailList.iterator(); -// while (materialRequisitionDetailValues.hasNext()) { -// Object detailValues = materialRequisitionDetailValues.next(); -// MaterialRequisitionDetailDto detailDto = new MaterialRequisitionDetailDto(); -// BeanUtils.copyProperties(detailValues, detailDto); -// detailDto.setNumber(++number); -// materialRequisitionDetailDtoList.add(detailDto); -// } -// } catch (Exception e) { -// log.error(">>>>>>异常OutboundDetailDto<<<<<<", e); -// } -// map.put(orderMaterial,materialRequisitionDetailDtoList); -// } -// -// File file = new File(templateFileName); -// try(FileInputStream fileInputStream = new FileInputStream(file); ByteArrayOutputStream bos = new ByteArrayOutputStream()){ -// int sheetCount = map.size(); -// XSSFWorkbook workbook = new XSSFWorkbook(fileInputStream); -// for (int i = 1; i < sheetCount; i++) { -// workbook.cloneSheet(0,"sheet"+(i+1)); -// } -// workbook.write(bos); -// byte[] bArray = bos.toByteArray(); -// InputStream is = new ByteArrayInputStream(bArray); -// ExcelWriter excelWriter = EasyExcel.write(response.getOutputStream(), MaterialRequisitionDetailDto.class).withTemplate(is).registerWriteHandler(mergePrevColUtils).build(); -// int i = 0; -// for (OutsourceOrderMaterial orderMaterial : map.keySet()) { -// List finishProductList = sysFinishProductService.selectSysFinishProductList(new SysFinishProduct(orderMaterial.getMaterialCode())); -// List list=new ArrayList<>(); -// for (MaterialRequisitionDetailDto materialRequisitionDetailDto : map.get(orderMaterial)) { -// list.add(finishProductList.get(0)); -// } -// WriteSheet writeSheet = EasyExcel.writerSheet(i++).build(); -// FillConfig fillConfig = FillConfig.builder().forceNewRow(Boolean.TRUE).build(); -// excelWriter.fill(new FillWrapper("material",map.get(orderMaterial)), fillConfig, writeSheet); -// excelWriter.fill(new FillWrapper("finish",list), writeSheet); -// Map excelMap = MapUtils.newHashMap(); -// SimpleDateFormat format = new SimpleDateFormat("yyyy年MM月dd日"); -// excelMap.put("materialRequisitionNumber", materialRequisitionInfo.getMaterialRequisitionNumber()); -// excelMap.put("salesOrderNumber", materialRequisitionInfo.getOutsourceOrderNumber()); -// //暂时存在问题 -// excelMap.put("typeMachine",finishProductList.get(0).getTypeMachine()); -// excelMap.put("firstAddTime",format.format( new SimpleDateFormat("yyyy-MM-dd").parse(materialRequisitionInfo.getFirstAddTime()))); -// excelMap.put("quantity",orderMaterial.getQuantity()); -// excelMap.put("finishCode",orderMaterial.getMaterialCode()); -// excelMap.put("nowDate",format.format(new Date())); -// excelMap.put("deliveryDate",format.format(new SimpleDateFormat("yyyy-MM-dd").parse(orderMaterial.getDeliveryDate()))); -// excelMap.put("finishName",orderMaterial.getMaterialName()); -// excelWriter.fill(excelMap,writeSheet); -// } -// excelWriter.finish(); -// }catch (Exception e){ -// e.printStackTrace(); -// } -// } -// -// private List exportOutsourceList(String materialRequisitionNumber,String materialCode) { -// List result = new ArrayList<>(); -// List materialRequisitionDetailList = materialRequisitionDetailService.selectMaterialRequisitionDetailList(new MaterialRequisitionDetail(materialRequisitionNumber,materialCode)); -// if (materialRequisitionDetailList.size()>0){ -// result.addAll(materialRequisitionDetailList); -// for (MaterialRequisitionDetail materialRequisitionDetail : materialRequisitionDetailList) { -// result.addAll(exportOutsourceList(materialRequisitionNumber,materialRequisitionDetail.getMaterialCode())); -// } -// } -// return result; -// } -// -// private List sysBomBcpAllList(int bomRank,Double quantity,SysBomBcp sysBomBcp) { -// List materialRequisitionDetailList = new ArrayList<>(); -// List bomBcpList =sysBomBcpService.selectSysBomBcpList(sysBomBcp); -// List rawMaterialList = sysBomRawMaterialService.selectSysBomRawMaterialList(new SysBomRawMaterial(sysBomBcp.getFinishProductCode())); -// List subsidiaryMaterialList = sysBomSubsidiaryMaterialService.selectSysBomSubsidiaryMaterialList(new SysBomSubsidiaryMaterial(sysBomBcp.getFinishProductCode())); -// if(rawMaterialList.size()>0){ -// for (SysBomRawMaterial rawMaterial : rawMaterialList) { -// MaterialRequisitionDetail materialRequisitionDetail = new MaterialRequisitionDetail(); -// materialRequisitionDetail.setMaterialCode(rawMaterial.getRawMaterialCode()); //物料代码 -// materialRequisitionDetail.setMaterialName(rawMaterial.getRawMaterialName()); //物料名称 -// materialRequisitionDetail.setSpecificationModel(rawMaterial.getSpecificationModel()); //规格型号 -// materialRequisitionDetail.setItemNumber(rawMaterial.getSupplierNumber()); //料号 -// materialRequisitionDetail.setInventoryUnit(rawMaterial.getInventoryUnit()); //单位 -// materialRequisitionDetail.setUnitUsage(rawMaterial.getRawMaterialConsumption()); //单位用量 -// materialRequisitionDetail.setUpFinishProductCode(rawMaterial.getFinishProductCode()); //上级半成品代码 -// -// materialRequisitionDetail.setPlanQuantity(String.valueOf(Double.valueOf(rawMaterial.getRawMaterialConsumption()) * quantity)); //计划数量 -// materialRequisitionDetail.setMaterialType("原料"); //物料类别 -// materialRequisitionDetail.setBomRank(String.valueOf(bomRank)); //bom阶 -// materialRequisitionDetailList.add(materialRequisitionDetail); -// } -// } -// if (subsidiaryMaterialList.size()>0){ -// for (SysBomSubsidiaryMaterial subsidiaryMaterial : subsidiaryMaterialList) { -// MaterialRequisitionDetail materialRequisitionDetail = new MaterialRequisitionDetail(); -// materialRequisitionDetail.setMaterialCode(subsidiaryMaterial.getSubsidiaryMaterialCode()); //物料代码 -// materialRequisitionDetail.setMaterialName(subsidiaryMaterial.getSubsidiaryMaterialName()); //物料名称 -// materialRequisitionDetail.setSpecificationModel(subsidiaryMaterial.getSpecificationModel()); //规格型号 -// materialRequisitionDetail.setItemNumber(subsidiaryMaterial.getSupplierNumber()); //料号 -// materialRequisitionDetail.setInventoryUnit(subsidiaryMaterial.getInventoryUnit()); //单位 -// materialRequisitionDetail.setUnitUsage(subsidiaryMaterial.getSubsidiaryMaterialConsumption()); //单位用量 -// materialRequisitionDetail.setUpFinishProductCode(subsidiaryMaterial.getFinishProductCode()); //上级半成品代码 -// -// materialRequisitionDetail.setPlanQuantity(String.valueOf(Double.valueOf(subsidiaryMaterial.getSubsidiaryMaterialConsumption())*quantity)); //计划数量 -// materialRequisitionDetail.setMaterialType("辅料"); //物料类别 -// materialRequisitionDetail.setBomRank(String.valueOf(bomRank)); //bom阶 -// materialRequisitionDetailList.add(materialRequisitionDetail); -// } -// } -// -// if(bomBcpList.size()>0){ -// for (SysBomBcp bomBcp : bomBcpList) { -// quantity = Double.valueOf(bomBcp.getBcpMaterialConsumption())*quantity; -// -// MaterialRequisitionDetail materialRequisitionDetail = new MaterialRequisitionDetail(); -// materialRequisitionDetail.setMaterialCode(bomBcp.getBcpCode()); //物料代码 -// materialRequisitionDetail.setMaterialName(bomBcp.getBcpName()); //物料名称 -// materialRequisitionDetail.setSpecificationModel(bomBcp.getSpecificationModel()); //规格型号 -// materialRequisitionDetail.setItemNumber(bomBcp.getCustomerNumber()); //料号 -// materialRequisitionDetail.setInventoryUnit(bomBcp.getInventoryUnit()); //单位 -// materialRequisitionDetail.setUnitUsage(bomBcp.getBcpMaterialConsumption()); //单位用量 -// materialRequisitionDetail.setUpFinishProductCode(bomBcp.getFinishProductCode()); //上级半成品代码 -// -// materialRequisitionDetail.setPlanQuantity(String.valueOf(quantity)); //计划数量 -// materialRequisitionDetail.setMaterialType("半成品"); //物料类别 -// materialRequisitionDetail.setBomRank(String.valueOf(bomRank)); //bom阶 -// materialRequisitionDetailList.add(materialRequisitionDetail); -// -// List list = sysBomBcpAllList(bomRank+1,quantity,new SysBomBcp(bomBcp.getBomBcpId(),bomBcp.getBcpCode())); -// materialRequisitionDetailList.addAll(list); -// } -// } -// return materialRequisitionDetailList; -// } -//} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/manufacture/domain/MaterialRequisitionInfo.java b/ruoyi-admin/src/main/java/com/ruoyi/manufacture/domain/MaterialRequisitionInfo.java deleted file mode 100644 index 495b2a70..00000000 --- a/ruoyi-admin/src/main/java/com/ruoyi/manufacture/domain/MaterialRequisitionInfo.java +++ /dev/null @@ -1,369 +0,0 @@ -package com.ruoyi.manufacture.domain; - -import org.apache.commons.lang3.builder.ToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; -import com.ruoyi.common.annotation.Excel; -import com.ruoyi.common.core.domain.BaseEntity; - -/** - * 领料单对象 material_requisition_info - * - * @author ruoyi - * @date 2023-04-06 - */ -public class MaterialRequisitionInfo extends BaseEntity -{ - private static final long serialVersionUID = 1L; - - /** 领料单id */ - private Long materialRequisitionId; - - /** 领料单号 */ - @Excel(name = "领料单号") - private String materialRequisitionNumber; - - /** 订单号码 */ - @Excel(name = "订单号码") - private String salesOrderNumber; - - /** 制工单号 */ - @Excel(name = "制工单号") - private String workOrderNumber; - - /** 领料部门 */ - @Excel(name = "领料部门") - private String deptName; - - /** 领料人 */ - @Excel(name = "领料人") - private String materialRequisitionPerson; - - /** 部门编号 */ - @Excel(name = "部门编号") - private String deptNumber; - - /** 仓库编号 */ - @Excel(name = "仓库编号") - private String stockNumber; - - /** 仓库名称 */ - @Excel(name = "仓库名称") - private String stockName; - - /** 仓库管理员 */ - @Excel(name = "仓库管理员") - private String stockManager; - - /** 出库类型 */ - @Excel(name = "出库类型") - private String outputClass; - - /** 出库日期 */ - @Excel(name = "出库日期") - private String outputDate; - - /** 成品代码 */ - @Excel(name = "成品代码") - private String finishProductCode; - - /** 机种 */ - @Excel(name = "机种") - private String typeMachine; - - /** 工单数量 */ - @Excel(name = "工单数量") - private String workOrderQuantity; - - /** 备注内容 */ - @Excel(name = "备注内容") - private String remarkContent; - - /** 领料否 */ - @Excel(name = "领料否") - private String getMaterialFlag; - - /** 录入时间 */ - @Excel(name = "录入时间") - private String firstAddTime; - - /** 修改时间 */ - @Excel(name = "修改时间") - private String updateInfoTime; - - /** 备用一 */ - private String standbyOne; - - /** 备用二 */ - private String standbyTwo; - - - /** 委外单号 */ - @Excel(name = "委外单号") - private String outsourceOrderNumber; - - - /** 生产批号 */ - @Excel(name = "生产批号") - private String batchNumber; - - /** 厂商编号 */ - @Excel(name = "厂商编号") - private String supplierCode; - - /** 厂商名称 */ - @Excel(name = "厂商名称") - private String supplierName; - - public void setMaterialRequisitionId(Long materialRequisitionId) - { - this.materialRequisitionId = materialRequisitionId; - } - - public Long getMaterialRequisitionId() - { - return materialRequisitionId; - } - public void setMaterialRequisitionNumber(String materialRequisitionNumber) - { - this.materialRequisitionNumber = materialRequisitionNumber; - } - - public String getMaterialRequisitionNumber() - { - return materialRequisitionNumber; - } - public void setSalesOrderNumber(String salesOrderNumber) - { - this.salesOrderNumber = salesOrderNumber; - } - - public String getSalesOrderNumber() - { - return salesOrderNumber; - } - public void setWorkOrderNumber(String workOrderNumber) - { - this.workOrderNumber = workOrderNumber; - } - - public String getWorkOrderNumber() - { - return workOrderNumber; - } - public void setDeptName(String deptName) - { - this.deptName = deptName; - } - - public String getDeptName() - { - return deptName; - } - public void setMaterialRequisitionPerson(String materialRequisitionPerson) - { - this.materialRequisitionPerson = materialRequisitionPerson; - } - - public String getMaterialRequisitionPerson() - { - return materialRequisitionPerson; - } - public void setDeptNumber(String deptNumber) - { - this.deptNumber = deptNumber; - } - - public String getDeptNumber() - { - return deptNumber; - } - public void setStockNumber(String stockNumber) - { - this.stockNumber = stockNumber; - } - - public String getStockNumber() - { - return stockNumber; - } - public void setStockName(String stockName) - { - this.stockName = stockName; - } - - public String getStockName() - { - return stockName; - } - public void setStockManager(String stockManager) - { - this.stockManager = stockManager; - } - - public String getStockManager() - { - return stockManager; - } - public void setOutputClass(String outputClass) - { - this.outputClass = outputClass; - } - - public String getOutputClass() - { - return outputClass; - } - public void setOutputDate(String outputDate) - { - this.outputDate = outputDate; - } - - public String getOutputDate() - { - return outputDate; - } - public void setFinishProductCode(String finishProductCode) - { - this.finishProductCode = finishProductCode; - } - - public String getFinishProductCode() - { - return finishProductCode; - } - public void setTypeMachine(String typeMachine) - { - this.typeMachine = typeMachine; - } - - public String getTypeMachine() - { - return typeMachine; - } - public void setWorkOrderQuantity(String workOrderQuantity) - { - this.workOrderQuantity = workOrderQuantity; - } - - public String getWorkOrderQuantity() - { - return workOrderQuantity; - } - public void setRemarkContent(String remarkContent) - { - this.remarkContent = remarkContent; - } - - public String getRemarkContent() - { - return remarkContent; - } - public void setGetMaterialFlag(String getMaterialFlag) - { - this.getMaterialFlag = getMaterialFlag; - } - - public String getGetMaterialFlag() - { - return getMaterialFlag; - } - public void setFirstAddTime(String firstAddTime) - { - this.firstAddTime = firstAddTime; - } - - public String getFirstAddTime() - { - return firstAddTime; - } - public void setUpdateInfoTime(String updateInfoTime) - { - this.updateInfoTime = updateInfoTime; - } - - public String getUpdateInfoTime() - { - return updateInfoTime; - } - public void setStandbyOne(String standbyOne) - { - this.standbyOne = standbyOne; - } - - public String getStandbyOne() - { - return standbyOne; - } - public void setStandbyTwo(String standbyTwo) - { - this.standbyTwo = standbyTwo; - } - - public String getStandbyTwo() - { - return standbyTwo; - } - - public String getOutsourceOrderNumber() { - return outsourceOrderNumber; - } - - public void setOutsourceOrderNumber(String outsourceOrderNumber) { - this.outsourceOrderNumber = outsourceOrderNumber; - } - - public String getBatchNumber() { - return batchNumber; - } - - public void setBatchNumber(String batchNumber) { - this.batchNumber = batchNumber; - } - - public String getSupplierCode() { - return supplierCode; - } - - public void setSupplierCode(String supplierCode) { - this.supplierCode = supplierCode; - } - - public String getSupplierName() { - return supplierName; - } - - public void setSupplierName(String supplierName) { - this.supplierName = supplierName; - } - - @Override - public String toString() { - return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) - .append("materialRequisitionId", getMaterialRequisitionId()) - .append("materialRequisitionNumber", getMaterialRequisitionNumber()) - .append("salesOrderNumber", getSalesOrderNumber()) - .append("workOrderNumber", getWorkOrderNumber()) - .append("deptName", getDeptName()) - .append("materialRequisitionPerson", getMaterialRequisitionPerson()) - .append("deptNumber", getDeptNumber()) - .append("stockNumber", getStockNumber()) - .append("stockName", getStockName()) - .append("stockManager", getStockManager()) - .append("outputClass", getOutputClass()) - .append("outputDate", getOutputDate()) - .append("finishProductCode", getFinishProductCode()) - .append("typeMachine", getTypeMachine()) - .append("workOrderQuantity", getWorkOrderQuantity()) - .append("remarkContent", getRemarkContent()) - .append("getMaterialFlag", getGetMaterialFlag()) - .append("firstAddTime", getFirstAddTime()) - .append("updateInfoTime", getUpdateInfoTime()) - .append("standbyOne", getStandbyOne()) - .append("standbyTwo", getStandbyTwo()) - .append("outsourceOrderNumber", getOutsourceOrderNumber()) - .append("batchNumber", getBatchNumber()) - .append("supplierCode", getSupplierCode()) - .append("supplierName", getSupplierName()) - .toString(); - } -} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/manufacture/mapper/MaterialRequisitionInfoMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/manufacture/mapper/MaterialRequisitionInfoMapper.java deleted file mode 100644 index 194169c2..00000000 --- a/ruoyi-admin/src/main/java/com/ruoyi/manufacture/mapper/MaterialRequisitionInfoMapper.java +++ /dev/null @@ -1,91 +0,0 @@ -package com.ruoyi.manufacture.mapper; - -import com.ruoyi.manufacture.domain.MaterialRequisitionInfo; - -import java.util.List; - -/** - * 领料单Mapper接口 - * - * @author ruoyi - * @date 2023-04-06 - */ -public interface MaterialRequisitionInfoMapper -{ - /** - * 查询领料单 - * - * @param materialRequisitionId 领料单ID - * @return 领料单 - */ - public MaterialRequisitionInfo selectMaterialRequisitionInfoById(Long materialRequisitionId); - - /** - * 查询领料单列表 - * - * @param materialRequisitionInfo 领料单 - * @return 领料单集合 - */ - public List selectMaterialRequisitionInfoList(MaterialRequisitionInfo materialRequisitionInfo); - /** - * 查询领料单列表 - * - * @param materialRequisitionInfo 领料单 - * @return 领料单集合 - */ - public List selectMaterialRequisitionInfoListRaw(MaterialRequisitionInfo materialRequisitionInfo); - /** - * 查询领料单列表 - * - * @param materialRequisitionInfo 领料单 - * @return 领料单集合 - */ - public List selectMaterialRequisitionInfoListSubsidiary(MaterialRequisitionInfo materialRequisitionInfo); - /** - * 查询领料单列表 - * - * @param materialRequisitionInfo 领料单 - * @return 领料单集合 - */ - public List selectMaterialRequisitionInfoListBcp(MaterialRequisitionInfo materialRequisitionInfo); - /** - * 查询领料单列表 - * - * @param materialRequisitionInfo 领料单 - * @return 领料单集合 - */ - public List selectMaterialRequisitionInfoListOutsource(MaterialRequisitionInfo materialRequisitionInfo); - - /** - * 新增领料单 - * - * @param materialRequisitionInfo 领料单 - * @return 结果 - */ - public int insertMaterialRequisitionInfo(MaterialRequisitionInfo materialRequisitionInfo); - - /** - * 修改领料单 - * - * @param materialRequisitionInfo 领料单 - * @return 结果 - */ - public int updateMaterialRequisitionInfo(MaterialRequisitionInfo materialRequisitionInfo); - - /** - * 删除领料单 - * - * @param materialRequisitionId 领料单ID - * @return 结果 - */ - public int deleteMaterialRequisitionInfoById(Long materialRequisitionId); - - /** - * 批量删除领料单 - * - * @param materialRequisitionIds 需要删除的数据ID - * @return 结果 - */ - public int deleteMaterialRequisitionInfoByIds(String[] materialRequisitionIds); - -} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/manufacture/service/IMaterialRequisitionInfoService.java b/ruoyi-admin/src/main/java/com/ruoyi/manufacture/service/IMaterialRequisitionInfoService.java deleted file mode 100644 index 6bea7b9e..00000000 --- a/ruoyi-admin/src/main/java/com/ruoyi/manufacture/service/IMaterialRequisitionInfoService.java +++ /dev/null @@ -1,123 +0,0 @@ -package com.ruoyi.manufacture.service; - -import com.ruoyi.manufacture.domain.MaterialRequisitionInfo; - -import java.util.List; - -/** - * 领料单Service接口 - * - * @author ruoyi - * @date 2023-04-06 - */ -public interface IMaterialRequisitionInfoService -{ - /** - * 查询领料单 - * - * @param materialRequisitionId 领料单ID - * @return 领料单 - */ - public MaterialRequisitionInfo selectMaterialRequisitionInfoById(Long materialRequisitionId); - - /** - * 查询领料单列表 - * - * @param materialRequisitionInfo 领料单 - * @return 领料单集合 - */ - public List selectMaterialRequisitionInfoList(MaterialRequisitionInfo materialRequisitionInfo); - - /** - * 查询原料领料单列表 - * - * @param materialRequisitionInfo 原料领料单 - * @return 原料领料单集合 - */ - public List selectMaterialRequisitionInfoListRaw(MaterialRequisitionInfo materialRequisitionInfo); - - /** - * 查询辅料领料单列表 - * - * @param materialRequisitionInfo 辅料领料单 - * @return 辅料领料单集合 - */ - public List selectMaterialRequisitionInfoListSubsidiary(MaterialRequisitionInfo materialRequisitionInfo); - - /** - * 查询半成品领料单列表 - * - * @param materialRequisitionInfo 半成品领料单 - * @return 半成品领料单集合 - */ - public List selectMaterialRequisitionInfoListBcp(MaterialRequisitionInfo materialRequisitionInfo); - - /** - * 查询半成品领料单列表 - * - * @param materialRequisitionInfo 半成品领料单 - * @return 半成品领料单集合 - */ - public List selectMaterialRequisitionInfoListOutsource(MaterialRequisitionInfo materialRequisitionInfo); - - /** - * 新增领料单 - * - * @param materialRequisitionInfo 领料单 - * @return 结果 - */ - public int insertMaterialRequisitionInfo(MaterialRequisitionInfo materialRequisitionInfo); - - /** - * 修改领料单 - * - * @param materialRequisitionInfo 领料单 - * @return 结果 - */ - public int updateMaterialRequisitionInfo(MaterialRequisitionInfo materialRequisitionInfo); - - /** - * 批量删除领料单 - * - * @param ids 需要删除的数据ID - * @return 结果 - */ - public int deleteMaterialRequisitionInfoByIds(String ids); - - /** - * 删除领料单信息 - * - * @param materialRequisitionId 领料单ID - * @return 结果 - */ - public int deleteMaterialRequisitionInfoById(Long materialRequisitionId); - - /** - * 获取领料单号 - * @return - */ - public String getId(); - - /** - * 获取原料领料单号 - * @return - */ - public String getRawId(); - - /** - * 获取辅料领料单号 - * @return - */ - public String getSubsidiaryId(); - - /** - * 获取半成品领料单号 - * @return - */ - public String getBcpId(); - /** - * 获取委外领料单号 - * @return - */ - public String getOutsourceId(); -} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/manufacture/service/impl/MaterialRequisitionInfoServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/manufacture/service/impl/MaterialRequisitionInfoServiceImpl.java deleted file mode 100644 index f32121e7..00000000 --- a/ruoyi-admin/src/main/java/com/ruoyi/manufacture/service/impl/MaterialRequisitionInfoServiceImpl.java +++ /dev/null @@ -1,142 +0,0 @@ -package com.ruoyi.manufacture.service.impl; - -import com.ruoyi.common.core.text.Convert; -import com.ruoyi.manufacture.domain.MaterialRequisitionInfo; -import com.ruoyi.manufacture.mapper.MaterialRequisitionInfoMapper; -import com.ruoyi.manufacture.service.IMaterialRequisitionInfoService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -import java.text.SimpleDateFormat; -import java.util.List; - -/** - * 领料单Service业务层处理 - * - * @author ruoyi - * @date 2023-04-06 - */ -@Service -public class MaterialRequisitionInfoServiceImpl implements IMaterialRequisitionInfoService -{ - @Autowired - private MaterialRequisitionInfoMapper materialRequisitionInfoMapper; - - /** - * 查询领料单 - * - * @param materialRequisitionId 领料单ID - * @return 领料单 - */ - @Override - public MaterialRequisitionInfo selectMaterialRequisitionInfoById(Long materialRequisitionId) - { - return materialRequisitionInfoMapper.selectMaterialRequisitionInfoById(materialRequisitionId); - } - - /** - * 查询领料单列表 - * - * @param materialRequisitionInfo 领料单 - * @return 领料单 - */ - @Override - public List selectMaterialRequisitionInfoList(MaterialRequisitionInfo materialRequisitionInfo) - { - return materialRequisitionInfoMapper.selectMaterialRequisitionInfoList(materialRequisitionInfo); - } - @Override - public List selectMaterialRequisitionInfoListRaw(MaterialRequisitionInfo materialRequisitionInfo) - { - return materialRequisitionInfoMapper.selectMaterialRequisitionInfoListRaw(materialRequisitionInfo); - } - @Override - public List selectMaterialRequisitionInfoListSubsidiary(MaterialRequisitionInfo materialRequisitionInfo) - { - return materialRequisitionInfoMapper.selectMaterialRequisitionInfoListSubsidiary(materialRequisitionInfo); - } - @Override - public List selectMaterialRequisitionInfoListBcp(MaterialRequisitionInfo materialRequisitionInfo) - { - return materialRequisitionInfoMapper.selectMaterialRequisitionInfoListBcp(materialRequisitionInfo); - } - @Override - public List selectMaterialRequisitionInfoListOutsource(MaterialRequisitionInfo materialRequisitionInfo) - { - return materialRequisitionInfoMapper.selectMaterialRequisitionInfoListOutsource(materialRequisitionInfo); - } - - /** - * 新增领料单 - * - * @param materialRequisitionInfo 领料单 - * @return 结果 - */ - @Override - public int insertMaterialRequisitionInfo(MaterialRequisitionInfo materialRequisitionInfo) - { - return materialRequisitionInfoMapper.insertMaterialRequisitionInfo(materialRequisitionInfo); - } - - /** - * 修改领料单 - * - * @param materialRequisitionInfo 领料单 - * @return 结果 - */ - @Override - public int updateMaterialRequisitionInfo(MaterialRequisitionInfo materialRequisitionInfo) - { - return materialRequisitionInfoMapper.updateMaterialRequisitionInfo(materialRequisitionInfo); - } - - /** - * 删除领料单对象 - * - * @param ids 需要删除的数据ID - * @return 结果 - */ - @Override - public int deleteMaterialRequisitionInfoByIds(String ids) - { - return materialRequisitionInfoMapper.deleteMaterialRequisitionInfoByIds(Convert.toStrArray(ids)); - } - - /** - * 删除领料单信息 - * - * @param materialRequisitionId 领料单ID - * @return 结果 - */ - @Override - public int deleteMaterialRequisitionInfoById(Long materialRequisitionId) - { - return materialRequisitionInfoMapper.deleteMaterialRequisitionInfoById(materialRequisitionId); - } - - @Override - public String getId() { - String time = new SimpleDateFormat("yyyyMMddHHmmssSSS").format(System.currentTimeMillis()); - return "WLLL" + time.substring(2); - } - @Override - public String getRawId() { - String time = new SimpleDateFormat("yyyyMMddHHmmssSSS").format(System.currentTimeMillis()); - return "YLLL" + time.substring(2); - } - @Override - public String getSubsidiaryId() { - String time = new SimpleDateFormat("yyyyMMddHHmmssSSS").format(System.currentTimeMillis()); - return "FLLL" + time.substring(2); - } - @Override - public String getBcpId() { - String time = new SimpleDateFormat("yyyyMMddHHmmssSSS").format(System.currentTimeMillis()); - return "CPLL" + time.substring(2); - } - @Override - public String getOutsourceId() { - String time = new SimpleDateFormat("yyyyMMddHHmmssSSS").format(System.currentTimeMillis()); - return "OWLL" + time.substring(2); - } -} diff --git a/ruoyi-admin/src/main/resources/mapper/manufacture/MaterialRequisitionInfoMapper.xml b/ruoyi-admin/src/main/resources/mapper/manufacture/MaterialRequisitionInfoMapper.xml deleted file mode 100644 index 24288cef..00000000 --- a/ruoyi-admin/src/main/resources/mapper/manufacture/MaterialRequisitionInfoMapper.xml +++ /dev/null @@ -1,212 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - select material_requisition_id, material_requisition_number, sales_order_number, work_order_number, dept_name, material_requisition_person, dept_number, stock_number, stock_name, stock_manager, output_class, output_date, finish_product_code, type_machine, work_order_quantity, remark_content, get_material_flag, first_add_time, update_info_time, standby_one, standby_two, outsource_order_number, batch_number, supplier_code, supplier_name from material_requisition_info - - - - - - - - - - - - insert into material_requisition_info - - material_requisition_number, - sales_order_number, - work_order_number, - dept_name, - material_requisition_person, - dept_number, - stock_number, - stock_name, - stock_manager, - output_class, - output_date, - finish_product_code, - type_machine, - work_order_quantity, - remark_content, - get_material_flag, - standby_one, - standby_two, - outsource_order_number, - batch_number, - supplier_code, - supplier_name, - first_add_time, - - - #{materialRequisitionNumber}, - #{salesOrderNumber}, - #{workOrderNumber}, - #{deptName}, - #{materialRequisitionPerson}, - #{deptNumber}, - #{stockNumber}, - #{stockName}, - #{stockManager}, - #{outputClass}, - #{outputDate}, - #{finishProductCode}, - #{typeMachine}, - #{workOrderQuantity}, - #{remarkContent}, - #{getMaterialFlag}, - #{standbyOne}, - #{standbyTwo}, - #{outsourceOrderNumber}, - #{batchNumber}, - #{supplierCode}, - #{supplierName}, - now(), - - - - - update material_requisition_info - - material_requisition_number = #{materialRequisitionNumber}, - sales_order_number = #{salesOrderNumber}, - work_order_number = #{workOrderNumber}, - dept_name = #{deptName}, - material_requisition_person = #{materialRequisitionPerson}, - dept_number = #{deptNumber}, - stock_number = #{stockNumber}, - stock_name = #{stockName}, - stock_manager = #{stockManager}, - output_class = #{outputClass}, - output_date = #{outputDate}, - finish_product_code = #{finishProductCode}, - type_machine = #{typeMachine}, - work_order_quantity = #{workOrderQuantity}, - remark_content = #{remarkContent}, - get_material_flag = #{getMaterialFlag}, - standby_one = #{standbyOne}, - standby_two = #{standbyTwo}, - outsource_order_number = #{outsourceOrderNumber}, - batch_number = #{batchNumber}, - supplier_code = #{supplierCode}, - supplier_name = #{supplierName}, - update_info_time = CONCAT_WS(',',NOW(),update_info_time), - - where material_requisition_id = #{materialRequisitionId} - - - - delete from material_requisition_info where material_requisition_id = #{materialRequisitionId} - - - - delete from material_requisition_info where material_requisition_id in - - #{materialRequisitionId} - - - - \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/manufacture/materialRequisitionInfo/add.html b/ruoyi-admin/src/main/resources/templates/manufacture/materialRequisitionInfo/add.html deleted file mode 100644 index 69033b1f..00000000 --- a/ruoyi-admin/src/main/resources/templates/manufacture/materialRequisitionInfo/add.html +++ /dev/null @@ -1,1594 +0,0 @@ - - - - - - - - - - - -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- - -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
-
- - -
-
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
-
- -
-
-

-

物料信息

- - - - - - - - - - - - - - - - - - -
-
-
-
- - - -
- - - - - - - \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/manufacture/materialRequisitionInfo/edit.html b/ruoyi-admin/src/main/resources/templates/manufacture/materialRequisitionInfo/edit.html deleted file mode 100644 index ec3b1de4..00000000 --- a/ruoyi-admin/src/main/resources/templates/manufacture/materialRequisitionInfo/edit.html +++ /dev/null @@ -1,1555 +0,0 @@ - - - - - - - - - - - -
-
- -
- -
- -
-
-
- -
- -
-
-
- -
- - -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
-
- - -
-
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
-
-
-
-

-

物料信息

- - - - - - - - - - - - - - -
-
-
-
- - - -
- - - - - - - \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/manufacture/materialRequisitionInfo/materialRequisitionInfo.html b/ruoyi-admin/src/main/resources/templates/manufacture/materialRequisitionInfo/materialRequisitionInfo.html deleted file mode 100644 index 0bb543a4..00000000 --- a/ruoyi-admin/src/main/resources/templates/manufacture/materialRequisitionInfo/materialRequisitionInfo.html +++ /dev/null @@ -1,330 +0,0 @@ - - - - - - - - -
-
-
-
-
-
    -
  • - - -
  • -
  • - - -
  • -
  • - - -
  • -
  • - - -
  • -
  • - - -
  • -
  • - - -
  • -
  • - - - - - -
  • -
  • - - -
  • -
  • -  搜索 -  重置 -
  • -
-
-
-
- - -
-
-
-
-
- - - - - \ No newline at end of file