From d08bd8b18fe96f360250604bb4d8adbd1656edb9 Mon Sep 17 00:00:00 2001 From: liuxiaoxu <1793812695@qq.com> Date: Mon, 21 Oct 2024 11:24:51 +0800 Subject: [PATCH] =?UTF-8?q?[delete]=20=E5=88=A0=E9=99=A4=E6=97=A7=E7=89=88?= =?UTF-8?q?=E6=97=A0=E7=94=A8=E7=9A=84=E9=A2=86=E6=96=99=E5=8D=95=E5=AF=B9?= =?UTF-8?q?=E8=B1=A1=20material=5Frequisition=5Fhead=E5=92=8C=E7=B3=BB?= =?UTF-8?q?=E7=BB=9F=E4=B8=AD=E5=AF=B9=E5=BA=94=E7=9A=84=E5=89=8D=E7=AB=AF?= =?UTF-8?q?=E6=89=80=E6=9C=89=E4=BB=A3=E7=A0=81=E5=92=8C=E5=90=8E=E7=AB=AF?= =?UTF-8?q?=E6=89=80=E6=9C=89=E4=BB=A3=E7=A0=81=20=E5=92=8C=E5=AF=B9?= =?UTF-8?q?=E5=BA=94=E7=9A=84=E7=B3=BB=E7=BB=9F=E8=8F=9C=E5=8D=95=E6=95=B0?= =?UTF-8?q?=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../MaterialRequisitionHeadController.java | 195 --- .../domain/MaterialRequisitionHead.java | 462 ------- .../mapper/MaterialRequisitionHeadMapper.java | 66 - .../IMaterialRequisitionHeadService.java | 68 - .../MaterialRequisitionHeadServiceImpl.java | 150 -- .../produce/MaterialRequisitionHeadMapper.xml | 209 --- .../produce/materialRequisitionHead/add.html | 1224 ----------------- .../produce/materialRequisitionHead/edit.html | 1224 ----------------- .../materialRequisitionHead.html | 430 ------ 9 files changed, 4028 deletions(-) delete mode 100644 ruoyi-admin/src/main/java/com/ruoyi/produce/controller/MaterialRequisitionHeadController.java delete mode 100644 ruoyi-admin/src/main/java/com/ruoyi/produce/domain/MaterialRequisitionHead.java delete mode 100644 ruoyi-admin/src/main/java/com/ruoyi/produce/mapper/MaterialRequisitionHeadMapper.java delete mode 100644 ruoyi-admin/src/main/java/com/ruoyi/produce/service/IMaterialRequisitionHeadService.java delete mode 100644 ruoyi-admin/src/main/java/com/ruoyi/produce/service/impl/MaterialRequisitionHeadServiceImpl.java delete mode 100644 ruoyi-admin/src/main/resources/mapper/produce/MaterialRequisitionHeadMapper.xml delete mode 100644 ruoyi-admin/src/main/resources/templates/produce/materialRequisitionHead/add.html delete mode 100644 ruoyi-admin/src/main/resources/templates/produce/materialRequisitionHead/edit.html delete mode 100644 ruoyi-admin/src/main/resources/templates/produce/materialRequisitionHead/materialRequisitionHead.html diff --git a/ruoyi-admin/src/main/java/com/ruoyi/produce/controller/MaterialRequisitionHeadController.java b/ruoyi-admin/src/main/java/com/ruoyi/produce/controller/MaterialRequisitionHeadController.java deleted file mode 100644 index 614040cd..00000000 --- a/ruoyi-admin/src/main/java/com/ruoyi/produce/controller/MaterialRequisitionHeadController.java +++ /dev/null @@ -1,195 +0,0 @@ -package com.ruoyi.produce.controller; - -import com.alibaba.druid.util.StringUtils; -import com.alibaba.fastjson.JSONObject; -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.produce.domain.MaterialRequisitionHead; -import com.ruoyi.produce.domain.MaterialRequisitionHeadWithList; -import com.ruoyi.produce.domain.MaterialRequisitionList; -import com.ruoyi.produce.service.IMaterialRequisitionHeadService; -import com.ruoyi.produce.service.IMaterialRequisitionListService; -import org.apache.shiro.authz.annotation.RequiresPermissions; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Controller; -import org.springframework.ui.ModelMap; -import org.springframework.web.bind.annotation.*; - -import java.util.List; - -/** - * 领料单Controller - * - * @author ruoyi - * @date 2022-01-06 - */ -@Controller -@RequestMapping("/produce/materialRequisitionHead") -public class MaterialRequisitionHeadController extends BaseController { - private String prefix = "produce/materialRequisitionHead"; - - @Autowired - private IMaterialRequisitionHeadService materialRequisitionHeadService; - - @Autowired - private IMaterialRequisitionListService materialRequisitionListService; - - @RequiresPermissions("produce:materialRequisitionHead:view") - @GetMapping() - public String materialRequisitionHead() { - return prefix + "/materialRequisitionHead"; - } - - /** - * 查询领料单列表 - */ - @RequiresPermissions("produce:materialRequisitionHead:list") - @PostMapping("/list") - @ResponseBody - public TableDataInfo list(MaterialRequisitionHead materialRequisitionHead) { - startPage(); - List list = materialRequisitionHeadService.selectMaterialRequisitionHeadList(materialRequisitionHead); - return getDataTable(list); - } - - /** - * 导出领料单列表 - */ - @RequiresPermissions("produce:materialRequisitionHead:export") - @Log(title = "领料单", businessType = BusinessType.EXPORT) - @PostMapping("/export") - @ResponseBody - public AjaxResult export(MaterialRequisitionHead materialRequisitionHead) { - List list = materialRequisitionHeadService.selectMaterialRequisitionHeadList(materialRequisitionHead); - ExcelUtil util = new ExcelUtil(MaterialRequisitionHead.class); - return util.exportExcel(list, "领料单数据"); - } - - /** - * 新增领料单 - */ - @GetMapping("/add") - public String add() { - return prefix + "/add"; - } - - /** - * 新增保存领料单 - */ - @RequiresPermissions("produce:materialRequisitionHead:add") - @Log(title = "领料单", businessType = BusinessType.INSERT) - @PostMapping("/add") - @ResponseBody - public Result addSave(String jsonStr) throws Exception { - JSONObject jsonObject = JSONObject.parseObject(jsonStr); - MaterialRequisitionHead materialRequisitionHead = jsonObject.toJavaObject(MaterialRequisitionHead.class); - String materialRequisitionNo = materialRequisitionHead.getMaterialRequisitionNo(); - if (StringUtils.isEmpty(materialRequisitionNo)) { - return Result.getFailResult("请输入领料单号!", null); - } - String workOrderNo = materialRequisitionHead.getWorkOrderNo(); - String outsourceOrderNo = materialRequisitionHead.getOutsourceOrderNo(); - if (StringUtils.isEmpty(workOrderNo) && StringUtils.isEmpty(outsourceOrderNo)) { - return Result.getFailResult("请选择制工单或委外单!", null); - } - List list = materialRequisitionHead.getMaterialRequisitionLists(); - for (MaterialRequisitionList each : list) { - Long planQty = each.getPlanQty(); - if (planQty == null || planQty <= 0) { - return Result.getFailResult("计划数量不能小于0!", null); - } - String spare2 = each.getSpare2(); - if (Integer.parseInt(spare2) <= 0) { - return Result.getFailResult("使用量不能小于0!", null); - } - } - int i = materialRequisitionHeadService.insertMaterialRequisitionHead(materialRequisitionHead); - return Result.getSuccessResult(i); - } - - /** - * 修改领料单 - */ - @GetMapping("/edit/{materialRequisitionNo}") - public String edit(@PathVariable("materialRequisitionNo") String materialRequisitionNo, ModelMap mmap) { - MaterialRequisitionHead materialRequisitionHead = materialRequisitionHeadService.selectMaterialRequisitionHeadById(materialRequisitionNo); - MaterialRequisitionList materialRequisitionList = new MaterialRequisitionList(); - materialRequisitionList.setMaterialRequisitionNo(materialRequisitionNo); - List list = materialRequisitionListService.selectMaterialRequisitionListList(materialRequisitionList); - mmap.put("materialRequisitionHead", materialRequisitionHead); - mmap.put("list", list); - return prefix + "/edit"; - } - - /** - * 修改保存领料单 - */ - @RequiresPermissions("produce:materialRequisitionHead:edit") - @Log(title = "领料单", businessType = BusinessType.UPDATE) - @PostMapping("/edit") - @ResponseBody - public Result editSave(String jsonStr) throws Exception { - JSONObject jsonObject = JSONObject.parseObject(jsonStr); - MaterialRequisitionHead materialRequisitionHead = jsonObject.toJavaObject(MaterialRequisitionHead.class); - String materialRequisitionNo = materialRequisitionHead.getMaterialRequisitionNo(); - if (StringUtils.isEmpty(materialRequisitionNo)) { - return Result.getFailResult("请输入领料单号!", null); - } - String workOrderNo = materialRequisitionHead.getWorkOrderNo(); - String outsourceOrderNo = materialRequisitionHead.getOutsourceOrderNo(); - if (StringUtils.isEmpty(workOrderNo) && StringUtils.isEmpty(outsourceOrderNo)) { - return Result.getFailResult("请选择制工单或委外单!", null); - } - List list = materialRequisitionHead.getMaterialRequisitionLists(); - for (MaterialRequisitionList each : list) { - Long planQty = each.getPlanQty(); - if (planQty == null || planQty <= 0) { - return Result.getFailResult("计划数量不能小于0!", null); - } - String spare2 = each.getSpare2(); - if (Integer.parseInt(spare2) <= 0) { - return Result.getFailResult("使用量不能小于0!", null); - } - } - int i = materialRequisitionHeadService.updateMaterialRequisitionHead(materialRequisitionHead); - return Result.getSuccessResult(i); - } - - /** - * 删除领料单 - */ - @RequiresPermissions("produce:materialRequisitionHead:remove") - @Log(title = "领料单", businessType = BusinessType.DELETE) - @PostMapping("/remove") - @ResponseBody - public AjaxResult remove(String ids) { - return toAjax(materialRequisitionHeadService.deleteMaterialRequisitionHeadByIds(ids)); - } - - @PostMapping("/headWithList") - @ResponseBody - public TableDataInfo selectHeadWithList(MaterialRequisitionHeadWithList materialRequisitionHeadWithList) throws Exception { - startPage(); - List list = materialRequisitionHeadService.selectHeadWithList(materialRequisitionHeadWithList); - System.out.println(list); - return getDataTable(list); - } - - @PostMapping("/end") - @ResponseBody - public Result end(MaterialRequisitionHead materialRequisitionHead) throws Exception { - materialRequisitionHead.setEndFlag("1"); - return Result.getSuccessResult(materialRequisitionHeadService.updateMaterialRequisitionHead(materialRequisitionHead)); - } - - @PostMapping("/id") - @ResponseBody - public Result getId() throws Exception { - return Result.getSuccessResult(materialRequisitionHeadService.getId()); - } -} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/produce/domain/MaterialRequisitionHead.java b/ruoyi-admin/src/main/java/com/ruoyi/produce/domain/MaterialRequisitionHead.java deleted file mode 100644 index 8ad9f969..00000000 --- a/ruoyi-admin/src/main/java/com/ruoyi/produce/domain/MaterialRequisitionHead.java +++ /dev/null @@ -1,462 +0,0 @@ -package com.ruoyi.produce.domain; - -import com.fasterxml.jackson.annotation.JsonFormat; -import com.ruoyi.common.annotation.Excel; -import com.ruoyi.common.core.domain.BaseEntity; - -import java.util.Date; -import java.util.List; - -/** - * 领料单对象 material_requisition_head - * - * @author ruoyi - * @date 2022-01-06 - */ -public class MaterialRequisitionHead extends BaseEntity -{ - private static final long serialVersionUID = 1L; - - /** 领料单号 */ - @Excel(name = "领料单号") - private String materialRequisitionNo; - - /** 制工单号 */ - @Excel(name = "制工单号") - private String workOrderNo; - - /** 部门名称 */ - @Excel(name = "部门名称") - private String departmentName; - - /** 领料人 */ - @Excel(name = "领料人") - private String linkman; - - /** 仓库号 */ - @Excel(name = "仓库号") - private String stockNo; - - /** 仓库名称 */ - @Excel(name = "仓库名称") - private String stockName; - - /** 出库类型 */ - @Excel(name = "出库类型") - private String outputClass; - - /** 领料日期 */ - @JsonFormat(pattern = "yyyy-MM-dd") - @Excel(name = "领料日期", width = 30, dateFormat = "yyyy-MM-dd") - private Date outputDate; - - /** 结案否 */ - @Excel(name = "结案否") - private String endFlag; - - /** 物料类别 */ - @Excel(name = "物料类别") - private String itemClass; - - /** 确认否 */ - @Excel(name = "确认否") - private String confirmFlag; - - /** 确认人 */ - @Excel(name = "确认人") - private String confirmMan; - - /** 确认时间 */ - @JsonFormat(pattern = "yyyy-MM-dd") - @Excel(name = "确认时间", width = 30, dateFormat = "yyyy-MM-dd") - private Date confirmDate; - - /** 审核否 */ - @Excel(name = "审核否") - private String auditingFlag; - - /** 审核人 */ - @Excel(name = "审核人") - private String auditingMan; - - /** 审核日期 */ - @JsonFormat(pattern = "yyyy-MM-dd") - @Excel(name = "审核日期", width = 30, dateFormat = "yyyy-MM-dd") - private Date auditingDate; - - /** 核准否 */ - @Excel(name = "核准否") - private String approveFlag; - - /** 核准人 */ - @Excel(name = "核准人") - private String approveMan; - - /** 核准日期 */ - @JsonFormat(pattern = "yyyy-MM-dd") - @Excel(name = "核准日期", width = 30, dateFormat = "yyyy-MM-dd") - private Date spproveDate; - - /** 开单日期 */ - @JsonFormat(pattern = "yyyy-MM-dd") - @Excel(name = "开单日期", width = 30, dateFormat = "yyyy-MM-dd") - private Date createDate; - - /** 委外单号 */ - @Excel(name = "委外单号") - private String outsourceOrderNo; - - /** 领料否 */ - @Excel(name = "领料否") - private String getFlag; - - /** 订单号 */ - @Excel(name = "订单号") - private String orderNo; - - /** 生产批号 */ - @Excel(name = "生产批号") - private String batchNum; - - /** 成品代码 */ - @Excel(name = "成品代码") - private String spare1; - - /** 工单数量 */ - @Excel(name = "工单数量") - private String spare2; - - /** */ - @Excel(name = "") - private String spare3; - - /** */ - @Excel(name = "") - private String spare4; - - /** */ - @Excel(name = "") - private String spare5; - - /** */ - @Excel(name = "") - private String spare6; - - private List materialRequisitionLists; - - public List getMaterialRequisitionLists() { - return materialRequisitionLists; - } - - public void setMaterialRequisitionLists(List materialRequisitionLists) { - this.materialRequisitionLists = materialRequisitionLists; - } - - public void setMaterialRequisitionNo(String materialRequisitionNo) - { - this.materialRequisitionNo = materialRequisitionNo; - } - - public String getMaterialRequisitionNo() - { - return materialRequisitionNo; - } - public void setWorkOrderNo(String workOrderNo) - { - this.workOrderNo = workOrderNo; - } - - public String getWorkOrderNo() - { - return workOrderNo; - } - public void setDepartmentName(String departmentName) - { - this.departmentName = departmentName; - } - - public String getDepartmentName() - { - return departmentName; - } - public void setLinkman(String linkman) - { - this.linkman = linkman; - } - - public String getLinkman() - { - return linkman; - } - public void setStockNo(String stockNo) - { - this.stockNo = stockNo; - } - - public String getStockNo() - { - return stockNo; - } - public void setStockName(String stockName) - { - this.stockName = stockName; - } - - public String getStockName() - { - return stockName; - } - public void setOutputClass(String outputClass) - { - this.outputClass = outputClass; - } - - public String getOutputClass() - { - return outputClass; - } - public void setOutputDate(Date outputDate) - { - this.outputDate = outputDate; - } - - public Date getOutputDate() - { - return outputDate; - } - public void setEndFlag(String endFlag) - { - this.endFlag = endFlag; - } - - public String getEndFlag() - { - return endFlag; - } - public void setItemClass(String itemClass) - { - this.itemClass = itemClass; - } - - public String getItemClass() - { - return itemClass; - } - public void setConfirmFlag(String confirmFlag) - { - this.confirmFlag = confirmFlag; - } - - public String getConfirmFlag() - { - return confirmFlag; - } - public void setConfirmMan(String confirmMan) - { - this.confirmMan = confirmMan; - } - - public String getConfirmMan() - { - return confirmMan; - } - public void setConfirmDate(Date confirmDate) - { - this.confirmDate = confirmDate; - } - - public Date getConfirmDate() - { - return confirmDate; - } - public void setAuditingFlag(String auditingFlag) - { - this.auditingFlag = auditingFlag; - } - - public String getAuditingFlag() - { - return auditingFlag; - } - public void setAuditingMan(String auditingMan) - { - this.auditingMan = auditingMan; - } - - public String getAuditingMan() - { - return auditingMan; - } - public void setAuditingDate(Date auditingDate) - { - this.auditingDate = auditingDate; - } - - public Date getAuditingDate() - { - return auditingDate; - } - public void setApproveFlag(String approveFlag) - { - this.approveFlag = approveFlag; - } - - public String getApproveFlag() - { - return approveFlag; - } - public void setApproveMan(String approveMan) - { - this.approveMan = approveMan; - } - - public String getApproveMan() - { - return approveMan; - } - public void setSpproveDate(Date spproveDate) - { - this.spproveDate = spproveDate; - } - - public Date getSpproveDate() - { - return spproveDate; - } - public void setCreateDate(Date createDate) - { - this.createDate = createDate; - } - - public Date getCreateDate() - { - return createDate; - } - public void setOutsourceOrderNo(String outsourceOrderNo) - { - this.outsourceOrderNo = outsourceOrderNo; - } - - public String getOutsourceOrderNo() - { - return outsourceOrderNo; - } - public void setGetFlag(String getFlag) - { - this.getFlag = getFlag; - } - - public String getGetFlag() - { - return getFlag; - } - public void setOrderNo(String orderNo) - { - this.orderNo = orderNo; - } - - public String getOrderNo() - { - return orderNo; - } - public void setBatchNum(String batchNum) - { - this.batchNum = batchNum; - } - - public String getBatchNum() - { - return batchNum; - } - public void setSpare1(String spare1) - { - this.spare1 = spare1; - } - - public String getSpare1() - { - return spare1; - } - public void setSpare2(String spare2) - { - this.spare2 = spare2; - } - - public String getSpare2() - { - return spare2; - } - public void setSpare3(String spare3) - { - this.spare3 = spare3; - } - - public String getSpare3() - { - return spare3; - } - public void setSpare4(String spare4) - { - this.spare4 = spare4; - } - - public String getSpare4() - { - return spare4; - } - public void setSpare5(String spare5) - { - this.spare5 = spare5; - } - - public String getSpare5() - { - return spare5; - } - public void setSpare6(String spare6) - { - this.spare6 = spare6; - } - - public String getSpare6() - { - return spare6; - } - - @Override - public String toString() { - return "MaterialRequisitionHead{" + - "materialRequisitionNo='" + materialRequisitionNo + '\'' + - ", workOrderNo='" + workOrderNo + '\'' + - ", departmentName='" + departmentName + '\'' + - ", linkman='" + linkman + '\'' + - ", stockNo='" + stockNo + '\'' + - ", stockName='" + stockName + '\'' + - ", outputClass='" + outputClass + '\'' + - ", outputDate=" + outputDate + - ", endFlag='" + endFlag + '\'' + - ", itemClass='" + itemClass + '\'' + - ", confirmFlag='" + confirmFlag + '\'' + - ", confirmMan='" + confirmMan + '\'' + - ", confirmDate=" + confirmDate + - ", auditingFlag='" + auditingFlag + '\'' + - ", auditingMan='" + auditingMan + '\'' + - ", auditingDate=" + auditingDate + - ", approveFlag='" + approveFlag + '\'' + - ", approveMan='" + approveMan + '\'' + - ", spproveDate=" + spproveDate + - ", createDate=" + createDate + - ", outsourceOrderNo='" + outsourceOrderNo + '\'' + - ", getFlag='" + getFlag + '\'' + - ", orderNo='" + orderNo + '\'' + - ", batchNum='" + batchNum + '\'' + - ", spare1='" + spare1 + '\'' + - ", spare2='" + spare2 + '\'' + - ", spare3='" + spare3 + '\'' + - ", spare4='" + spare4 + '\'' + - ", spare5='" + spare5 + '\'' + - ", spare6='" + spare6 + '\'' + - ", materialRequisitionLists=" + materialRequisitionLists + - '}'; - } -} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/produce/mapper/MaterialRequisitionHeadMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/produce/mapper/MaterialRequisitionHeadMapper.java deleted file mode 100644 index b4edf64e..00000000 --- a/ruoyi-admin/src/main/java/com/ruoyi/produce/mapper/MaterialRequisitionHeadMapper.java +++ /dev/null @@ -1,66 +0,0 @@ -package com.ruoyi.produce.mapper; - -import com.ruoyi.produce.domain.MaterialRequisitionHead; -import com.ruoyi.produce.domain.MaterialRequisitionHeadWithList; - -import java.util.List; - -/** - * 领料单Mapper接口 - * - * @author ruoyi - * @date 2022-01-06 - */ -public interface MaterialRequisitionHeadMapper { - /** - * 查询领料单 - * - * @param materialRequisitionNo 领料单ID - * @return 领料单 - */ - public MaterialRequisitionHead selectMaterialRequisitionHeadById(String materialRequisitionNo); - - /** - * 查询领料单列表 - * - * @param materialRequisitionHead 领料单 - * @return 领料单集合 - */ - public List selectMaterialRequisitionHeadList(MaterialRequisitionHead materialRequisitionHead); - - /** - * 新增领料单 - * - * @param materialRequisitionHead 领料单 - * @return 结果 - */ - public int insertMaterialRequisitionHead(MaterialRequisitionHead materialRequisitionHead); - - /** - * 修改领料单 - * - * @param materialRequisitionHead 领料单 - * @return 结果 - */ - public int updateMaterialRequisitionHead(MaterialRequisitionHead materialRequisitionHead); - - /** - * 删除领料单 - * - * @param materialRequisitionNo 领料单ID - * @return 结果 - */ - public int deleteMaterialRequisitionHeadById(String materialRequisitionNo); - - /** - * 批量删除领料单 - * - * @param materialRequisitionNos 需要删除的数据ID - * @return 结果 - */ - public int deleteMaterialRequisitionHeadByIds(String[] materialRequisitionNos); - - public List selectHeadWithList(MaterialRequisitionHeadWithList materialRequisitionHeadWithList); - - public Integer selectCountByDay(); -} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/produce/service/IMaterialRequisitionHeadService.java b/ruoyi-admin/src/main/java/com/ruoyi/produce/service/IMaterialRequisitionHeadService.java deleted file mode 100644 index 79b8e4ae..00000000 --- a/ruoyi-admin/src/main/java/com/ruoyi/produce/service/IMaterialRequisitionHeadService.java +++ /dev/null @@ -1,68 +0,0 @@ -package com.ruoyi.produce.service; - -import com.ruoyi.produce.domain.MaterialRequisitionHead; -import com.ruoyi.produce.domain.MaterialRequisitionHeadWithList; - -import java.util.List; - -/** - * 领料单Service接口 - * - * @author ruoyi - * @date 2022-01-06 - */ -public interface IMaterialRequisitionHeadService -{ - /** - * 查询领料单 - * - * @param materialRequisitionNo 领料单ID - * @return 领料单 - */ - public MaterialRequisitionHead selectMaterialRequisitionHeadById(String materialRequisitionNo); - - /** - * 查询领料单列表 - * - * @param materialRequisitionHead 领料单 - * @return 领料单集合 - */ - public List selectMaterialRequisitionHeadList(MaterialRequisitionHead materialRequisitionHead); - - /** - * 新增领料单 - * - * @param materialRequisitionHead 领料单 - * @return 结果 - */ - public int insertMaterialRequisitionHead(MaterialRequisitionHead materialRequisitionHead); - - /** - * 修改领料单 - * - * @param materialRequisitionHead 领料单 - * @return 结果 - */ - public int updateMaterialRequisitionHead(MaterialRequisitionHead materialRequisitionHead); - - /** - * 批量删除领料单 - * - * @param ids 需要删除的数据ID - * @return 结果 - */ - public int deleteMaterialRequisitionHeadByIds(String ids); - - /** - * 删除领料单信息 - * - * @param materialRequisitionNo 领料单ID - * @return 结果 - */ - public int deleteMaterialRequisitionHeadById(String materialRequisitionNo); - - public List selectHeadWithList(MaterialRequisitionHeadWithList materialRequisitionHeadWithList); - - public String getId(); - -} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/produce/service/impl/MaterialRequisitionHeadServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/produce/service/impl/MaterialRequisitionHeadServiceImpl.java deleted file mode 100644 index 0f224e4e..00000000 --- a/ruoyi-admin/src/main/java/com/ruoyi/produce/service/impl/MaterialRequisitionHeadServiceImpl.java +++ /dev/null @@ -1,150 +0,0 @@ -package com.ruoyi.produce.service.impl; - -import com.ruoyi.common.core.text.Convert; -import com.ruoyi.produce.domain.MaterialRequisitionHead; -import com.ruoyi.produce.domain.MaterialRequisitionHeadWithList; -import com.ruoyi.produce.domain.MaterialRequisitionList; -import com.ruoyi.produce.mapper.MaterialRequisitionHeadMapper; -import com.ruoyi.produce.mapper.MaterialRequisitionListMapper; -import com.ruoyi.produce.service.IMaterialRequisitionHeadService; -import com.ruoyi.stock.domain.StockInfo; -import com.ruoyi.stock.mapper.StockInfoMapper; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -import java.time.LocalDate; -import java.util.Date; -import java.util.List; - -/** - * 领料单Service业务层处理 - * - * @author ruoyi - * @date 2022-01-06 - */ -@Service -public class MaterialRequisitionHeadServiceImpl implements IMaterialRequisitionHeadService { - @Autowired - private MaterialRequisitionHeadMapper materialRequisitionHeadMapper; - - @Autowired - private MaterialRequisitionListMapper materialRequisitionListMapper; - - @Autowired - private StockInfoMapper stockInfoMapper; - - /** - * 查询领料单 - * - * @param materialRequisitionNo 领料单ID - * @return 领料单 - */ - @Override - public MaterialRequisitionHead selectMaterialRequisitionHeadById(String materialRequisitionNo) { - return materialRequisitionHeadMapper.selectMaterialRequisitionHeadById(materialRequisitionNo); - } - - /** - * 查询领料单列表 - * - * @param materialRequisitionHead 领料单 - * @return 领料单 - */ - @Override - public List selectMaterialRequisitionHeadList(MaterialRequisitionHead materialRequisitionHead) { - return materialRequisitionHeadMapper.selectMaterialRequisitionHeadList(materialRequisitionHead); - } - - /** - * 新增领料单 - * - * @param materialRequisitionHead 领料单 - * @return 结果 - */ - @Override - public int insertMaterialRequisitionHead(MaterialRequisitionHead materialRequisitionHead) { - List list = materialRequisitionHead.getMaterialRequisitionLists(); - String no = materialRequisitionHead.getMaterialRequisitionNo(); - for (int i = 0; i < list.size(); i++) { - MaterialRequisitionList each = list.get(i); - each.setBatchNum(i + 1 + ""); - each.setMaterialRequisitionNo(no); - materialRequisitionListMapper.insertMaterialRequisitionList(each); - } - materialRequisitionHead.setOutputDate(new Date()); - materialRequisitionHead.setEndFlag("0"); - materialRequisitionHead.setGetFlag("0"); - StockInfo stockInfo = new StockInfo(); - stockInfo.setStockName(materialRequisitionHead.getStockName()); - stockInfo = stockInfoMapper.selectStockInfoList(stockInfo).get(0); - materialRequisitionHead.setStockNo(stockInfo.getStockNO()); - return materialRequisitionHeadMapper.insertMaterialRequisitionHead(materialRequisitionHead); - } - - /** - * 修改领料单 - * - * @param materialRequisitionHead 领料单 - * @return 结果 - */ - @Override - public int updateMaterialRequisitionHead(MaterialRequisitionHead materialRequisitionHead) { - String no = materialRequisitionHead.getMaterialRequisitionNo(); - materialRequisitionListMapper.deleteMaterialRequisitionListById(no); - List list = materialRequisitionHead.getMaterialRequisitionLists(); - for (int i = 0; i < list.size(); i++) { - MaterialRequisitionList each = list.get(i); - each.setBatchNum(i + 1 + ""); - each.setMaterialRequisitionNo(no); - materialRequisitionListMapper.insertMaterialRequisitionList(each); - } - StockInfo stockInfo = new StockInfo(); - stockInfo.setStockName(materialRequisitionHead.getStockName()); - stockInfo = stockInfoMapper.selectStockInfoList(stockInfo).get(0); - materialRequisitionHead.setStockNo(stockInfo.getStockNO()); - return materialRequisitionHeadMapper.updateMaterialRequisitionHead(materialRequisitionHead); - } - - /** - * 删除领料单对象 - * - * @param ids 需要删除的数据ID - * @return 结果 - */ - @Override - public int deleteMaterialRequisitionHeadByIds(String ids) { - return materialRequisitionHeadMapper.deleteMaterialRequisitionHeadByIds(Convert.toStrArray(ids)); - } - - /** - * 删除领料单信息 - * - * @param materialRequisitionNo 领料单ID - * @return 结果 - */ - @Override - public int deleteMaterialRequisitionHeadById(String materialRequisitionNo) { - return materialRequisitionHeadMapper.deleteMaterialRequisitionHeadById(materialRequisitionNo); - } - - @Override - public List selectHeadWithList(MaterialRequisitionHeadWithList materialRequisitionHeadWithList) { - return materialRequisitionHeadMapper.selectHeadWithList(materialRequisitionHeadWithList); - } - - @Override - public String getId() { - int count = materialRequisitionHeadMapper.selectCountByDay() + 1; - LocalDate now = LocalDate.now(); - String s = now.toString().replaceAll("-", ""); - String id = "WLLL" + s; - if (count >= 100) { - id += count; - } else if (count >= 10) { - id += "0" + count; - } else { - id += "00" + count; - } - return id; - } -} diff --git a/ruoyi-admin/src/main/resources/mapper/produce/MaterialRequisitionHeadMapper.xml b/ruoyi-admin/src/main/resources/mapper/produce/MaterialRequisitionHeadMapper.xml deleted file mode 100644 index 339165bb..00000000 --- a/ruoyi-admin/src/main/resources/mapper/produce/MaterialRequisitionHeadMapper.xml +++ /dev/null @@ -1,209 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - select materialRequisitionNo, workOrderNo, departmentName, linkman, stockNo, stockName, outputClass, outputDate, remark, endFlag, itemClass, confirmFlag, confirmMan, confirmDate, auditingFlag, auditingMan, auditingDate, approveFlag, approveMan, spproveDate, createDate, outsourceOrderNo, getFlag, orderNo, batchNum, spare1, spare2, spare3, spare4, spare5, spare6 from material_requisition_head - - - - - - - - insert into material_requisition_head - - materialRequisitionNo, - workOrderNo, - departmentName, - linkman, - stockNo, - stockName, - outputClass, - outputDate, - remark, - endFlag, - itemClass, - confirmFlag, - confirmMan, - confirmDate, - auditingFlag, - auditingMan, - auditingDate, - approveFlag, - approveMan, - spproveDate, - createDate, - outsourceOrderNo, - getFlag, - orderNo, - batchNum, - spare1, - spare2, - spare3, - spare4, - spare5, - spare6, - - - #{materialRequisitionNo}, - #{workOrderNo}, - #{departmentName}, - #{linkman}, - #{stockNo}, - #{stockName}, - #{outputClass}, - #{outputDate}, - #{remark}, - #{endFlag}, - #{itemClass}, - #{confirmFlag}, - #{confirmMan}, - #{confirmDate}, - #{auditingFlag}, - #{auditingMan}, - #{auditingDate}, - #{approveFlag}, - #{approveMan}, - #{spproveDate}, - #{createDate}, - #{outsourceOrderNo}, - #{getFlag}, - #{orderNo}, - #{batchNum}, - #{spare1}, - #{spare2}, - #{spare3}, - #{spare4}, - #{spare5}, - #{spare6}, - - - - - update material_requisition_head - - workOrderNo = #{workOrderNo}, - departmentName = #{departmentName}, - linkman = #{linkman}, - stockNo = #{stockNo}, - stockName = #{stockName}, - outputClass = #{outputClass}, - outputDate = #{outputDate}, - remark = #{remark}, - endFlag = #{endFlag}, - itemClass = #{itemClass}, - confirmFlag = #{confirmFlag}, - confirmMan = #{confirmMan}, - confirmDate = #{confirmDate}, - auditingFlag = #{auditingFlag}, - auditingMan = #{auditingMan}, - auditingDate = #{auditingDate}, - approveFlag = #{approveFlag}, - approveMan = #{approveMan}, - spproveDate = #{spproveDate}, - createDate = #{createDate}, - outsourceOrderNo = #{outsourceOrderNo}, - getFlag = #{getFlag}, - orderNo = #{orderNo}, - batchNum = #{batchNum}, - spare1 = #{spare1}, - spare2 = #{spare2}, - spare3 = #{spare3}, - spare4 = #{spare4}, - spare5 = #{spare5}, - spare6 = #{spare6}, - - where materialRequisitionNo = #{materialRequisitionNo} - - - - delete from material_requisition_head where materialRequisitionNo = #{materialRequisitionNo} - - - - delete from material_requisition_head where materialRequisitionNo in - - #{materialRequisitionNo} - - - - - - \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/produce/materialRequisitionHead/add.html b/ruoyi-admin/src/main/resources/templates/produce/materialRequisitionHead/add.html deleted file mode 100644 index e6e55869..00000000 --- a/ruoyi-admin/src/main/resources/templates/produce/materialRequisitionHead/add.html +++ /dev/null @@ -1,1224 +0,0 @@ - - - - - - - - - -
-
-
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
- - - - - - - -
- -
- -
-
-
- -
- -
-
-
- -
-
- - -
-
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- - - - -
-
-
-
-
- -
-
-
- - - - - - -
- - - - - -
-
- - - - - - - \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/produce/materialRequisitionHead/edit.html b/ruoyi-admin/src/main/resources/templates/produce/materialRequisitionHead/edit.html deleted file mode 100644 index 9ccbdef2..00000000 --- a/ruoyi-admin/src/main/resources/templates/produce/materialRequisitionHead/edit.html +++ /dev/null @@ -1,1224 +0,0 @@ - - - - - - - - - -
-
-
- -
-
- -
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
- - - - - - - - - -
- -
- -
-
-
- -
- -
-
-
- -
-
- - -
-
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- - - - -
-
-
-
-
- -
-
-
- - - - - - -
- - - - - -
-
- - - - - - - \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/produce/materialRequisitionHead/materialRequisitionHead.html b/ruoyi-admin/src/main/resources/templates/produce/materialRequisitionHead/materialRequisitionHead.html deleted file mode 100644 index 88f17cf9..00000000 --- a/ruoyi-admin/src/main/resources/templates/produce/materialRequisitionHead/materialRequisitionHead.html +++ /dev/null @@ -1,430 +0,0 @@ - - - - - - - - -
-
-
-
-
-
    -
  • - - -
  • -
  • - - -
  • -
  • - - -
  • -
  • - - -
  • -
  • - - -
  • -
  • - - -
  • - - - - - - - -
  • - - -
  • -
  • - - -
  • -
  • - - - - - -
  • - - - - -
  • - - -
  • -
  • - - -
  • - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  • -  搜索 -  重置 -
  • -
-
-
-
- - -
-
-
-
-
- - - - - \ No newline at end of file