提交
This commit is contained in:
@@ -24,6 +24,7 @@ public class ConstructionController extends BaseController {
|
||||
@PreAuthorize("@ss.hasPermi('system:engineering:construction:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(Construction construction) {
|
||||
startPage();
|
||||
return constructionService.selectConstructionList(construction);
|
||||
}
|
||||
|
||||
|
||||
@@ -25,6 +25,7 @@ public class ContractController extends BaseController {
|
||||
@PreAuthorize("@ss.hasPermi('system:engineering:contract:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(Contract contract) {
|
||||
startPage();
|
||||
return contractService.selectContractList(contract);
|
||||
}
|
||||
|
||||
|
||||
@@ -8,6 +8,13 @@ import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.system.domain.engineering.Material;
|
||||
import com.ruoyi.system.domain.engineering.MaterialIn;
|
||||
import com.ruoyi.system.domain.engineering.MaterialOut;
|
||||
import com.ruoyi.system.domain.engineering.MaterialReturn;
|
||||
import com.ruoyi.system.domain.engineering.MaterialPick;
|
||||
import com.ruoyi.system.domain.engineering.MaterialReturnBack;
|
||||
import com.ruoyi.system.domain.engineering.MaterialTransfer;
|
||||
import com.ruoyi.system.domain.engineering.MaterialInventory;
|
||||
import com.ruoyi.system.domain.engineering.MaterialInventoryDetail;
|
||||
import com.ruoyi.system.domain.engineering.MaterialScrap;
|
||||
import com.ruoyi.system.service.engineering.IMaterialService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
@@ -25,6 +32,7 @@ public class MaterialController extends BaseController {
|
||||
@PreAuthorize("@ss.hasPermi('system:engineering:material:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(Material material) {
|
||||
startPage();
|
||||
return materialService.selectMaterialList(material);
|
||||
}
|
||||
|
||||
@@ -91,6 +99,7 @@ public class MaterialController extends BaseController {
|
||||
@PreAuthorize("@ss.hasPermi('system:engineering:material:in:list')")
|
||||
@GetMapping("/in/list")
|
||||
public TableDataInfo listMaterialIn(MaterialIn materialIn) {
|
||||
startPage();
|
||||
return materialService.selectMaterialInList(materialIn);
|
||||
}
|
||||
|
||||
@@ -131,6 +140,7 @@ public class MaterialController extends BaseController {
|
||||
@PreAuthorize("@ss.hasPermi('system:engineering:material:out:list')")
|
||||
@GetMapping("/out/list")
|
||||
public TableDataInfo listMaterialOut(MaterialOut materialOut) {
|
||||
startPage();
|
||||
return materialService.selectMaterialOutList(materialOut);
|
||||
}
|
||||
|
||||
@@ -139,4 +149,291 @@ public class MaterialController extends BaseController {
|
||||
public AjaxResult getMaterialOut(@PathVariable Long outId) {
|
||||
return AjaxResult.success(materialService.selectMaterialOutById(outId));
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('system:engineering:material:return:list')")
|
||||
@GetMapping("/return/list")
|
||||
public TableDataInfo listMaterialReturn(MaterialReturn materialReturn) {
|
||||
startPage();
|
||||
return materialService.selectMaterialReturnList(materialReturn);
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('system:engineering:material:return:query')")
|
||||
@GetMapping("/return/{returnId}")
|
||||
public AjaxResult getMaterialReturn(@PathVariable Long returnId) {
|
||||
return AjaxResult.success(materialService.selectMaterialReturnById(returnId));
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('system:engineering:material:return:add')")
|
||||
@Log(title = "退货单管理", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/return")
|
||||
public AjaxResult addMaterialReturn(@RequestBody MaterialReturn materialReturn) {
|
||||
return toAjax(materialService.insertMaterialReturn(materialReturn));
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('system:engineering:material:return:edit')")
|
||||
@Log(title = "退货单管理", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/return")
|
||||
public AjaxResult updateMaterialReturn(@RequestBody MaterialReturn materialReturn) {
|
||||
return toAjax(materialService.updateMaterialReturn(materialReturn));
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('system:engineering:material:return:approve')")
|
||||
@Log(title = "退货单审批", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/return/approve/{returnId}")
|
||||
public AjaxResult approveMaterialReturn(@PathVariable Long returnId) {
|
||||
return toAjax(materialService.approveMaterialReturn(returnId));
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('system:engineering:material:return:remove')")
|
||||
@Log(title = "退货单删除", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/return/{returnId}")
|
||||
public AjaxResult deleteMaterialReturn(@PathVariable Long returnId) {
|
||||
return toAjax(materialService.deleteMaterialReturnById(returnId));
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('system:engineering:material:pick:list')")
|
||||
@GetMapping("/pick/list")
|
||||
public TableDataInfo listMaterialPick(MaterialPick materialPick) {
|
||||
startPage();
|
||||
return materialService.selectMaterialPickList(materialPick);
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('system:engineering:material:pick:query')")
|
||||
@GetMapping("/pick/{pickId}")
|
||||
public AjaxResult getMaterialPick(@PathVariable Long pickId) {
|
||||
return AjaxResult.success(materialService.selectMaterialPickById(pickId));
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('system:engineering:material:pick:add')")
|
||||
@Log(title = "领料单管理", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/pick")
|
||||
public AjaxResult addMaterialPick(@RequestBody MaterialPick materialPick) {
|
||||
return toAjax(materialService.insertMaterialPick(materialPick));
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('system:engineering:material:pick:edit')")
|
||||
@Log(title = "领料单管理", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/pick")
|
||||
public AjaxResult updateMaterialPick(@RequestBody MaterialPick materialPick) {
|
||||
return toAjax(materialService.updateMaterialPick(materialPick));
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('system:engineering:material:pick:approve')")
|
||||
@Log(title = "领料单审批", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/pick/approve/{pickId}")
|
||||
public AjaxResult approveMaterialPick(@PathVariable Long pickId) {
|
||||
return toAjax(materialService.approveMaterialPick(pickId));
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('system:engineering:material:pick:issue')")
|
||||
@Log(title = "领料单发放", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/pick/issue/{pickId}")
|
||||
public AjaxResult issueMaterialPick(@PathVariable Long pickId) {
|
||||
return toAjax(materialService.issueMaterialPick(pickId));
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('system:engineering:material:pick:remove')")
|
||||
@Log(title = "领料单删除", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/pick/{pickId}")
|
||||
public AjaxResult deleteMaterialPick(@PathVariable Long pickId) {
|
||||
return toAjax(materialService.deleteMaterialPickById(pickId));
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('system:engineering:material:returnBack:list')")
|
||||
@GetMapping("/returnBack/list")
|
||||
public TableDataInfo listMaterialReturnBack(MaterialReturnBack materialReturnBack) {
|
||||
startPage();
|
||||
return materialService.selectMaterialReturnBackList(materialReturnBack);
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('system:engineering:material:returnBack:query')")
|
||||
@GetMapping("/returnBack/{returnBackId}")
|
||||
public AjaxResult getMaterialReturnBack(@PathVariable Long returnBackId) {
|
||||
return AjaxResult.success(materialService.selectMaterialReturnBackById(returnBackId));
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('system:engineering:material:returnBack:add')")
|
||||
@Log(title = "还料单管理", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/returnBack")
|
||||
public AjaxResult addMaterialReturnBack(@RequestBody MaterialReturnBack materialReturnBack) {
|
||||
return toAjax(materialService.insertMaterialReturnBack(materialReturnBack));
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('system:engineering:material:returnBack:edit')")
|
||||
@Log(title = "还料单管理", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/returnBack")
|
||||
public AjaxResult updateMaterialReturnBack(@RequestBody MaterialReturnBack materialReturnBack) {
|
||||
return toAjax(materialService.updateMaterialReturnBack(materialReturnBack));
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('system:engineering:material:returnBack:approve')")
|
||||
@Log(title = "还料单审批", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/returnBack/approve/{returnBackId}")
|
||||
public AjaxResult approveMaterialReturnBack(@PathVariable Long returnBackId) {
|
||||
return toAjax(materialService.approveMaterialReturnBack(returnBackId));
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('system:engineering:material:returnBack:remove')")
|
||||
@Log(title = "还料单删除", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/returnBack/{returnBackId}")
|
||||
public AjaxResult deleteMaterialReturnBack(@PathVariable Long returnBackId) {
|
||||
return toAjax(materialService.deleteMaterialReturnBackById(returnBackId));
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('system:engineering:material:transfer:list')")
|
||||
@GetMapping("/transfer/list")
|
||||
public TableDataInfo listMaterialTransfer(MaterialTransfer materialTransfer) {
|
||||
startPage();
|
||||
return materialService.selectMaterialTransferList(materialTransfer);
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('system:engineering:material:transfer:query')")
|
||||
@GetMapping("/transfer/{transferId}")
|
||||
public AjaxResult getMaterialTransfer(@PathVariable Long transferId) {
|
||||
return AjaxResult.success(materialService.selectMaterialTransferById(transferId));
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('system:engineering:material:transfer:add')")
|
||||
@Log(title = "调拨单管理", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/transfer")
|
||||
public AjaxResult addMaterialTransfer(@RequestBody MaterialTransfer materialTransfer) {
|
||||
return toAjax(materialService.insertMaterialTransfer(materialTransfer));
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('system:engineering:material:transfer:edit')")
|
||||
@Log(title = "调拨单管理", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/transfer")
|
||||
public AjaxResult updateMaterialTransfer(@RequestBody MaterialTransfer materialTransfer) {
|
||||
return toAjax(materialService.updateMaterialTransfer(materialTransfer));
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('system:engineering:material:transfer:approve')")
|
||||
@Log(title = "调拨单审批", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/transfer/approve/{transferId}")
|
||||
public AjaxResult approveMaterialTransfer(@PathVariable Long transferId) {
|
||||
return toAjax(materialService.approveMaterialTransfer(transferId));
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('system:engineering:material:transfer:remove')")
|
||||
@Log(title = "调拨单删除", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/transfer/{transferId}")
|
||||
public AjaxResult deleteMaterialTransfer(@PathVariable Long transferId) {
|
||||
return toAjax(materialService.deleteMaterialTransferById(transferId));
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('system:engineering:material:inventory:list')")
|
||||
@GetMapping("/inventory/list")
|
||||
public TableDataInfo listMaterialInventory(MaterialInventory materialInventory) {
|
||||
startPage();
|
||||
return materialService.selectMaterialInventoryList(materialInventory);
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('system:engineering:material:inventory:query')")
|
||||
@GetMapping("/inventory/{inventoryId}")
|
||||
public AjaxResult getMaterialInventory(@PathVariable Long inventoryId) {
|
||||
return AjaxResult.success(materialService.selectMaterialInventoryById(inventoryId));
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('system:engineering:material:inventory:add')")
|
||||
@Log(title = "盘点单管理", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/inventory")
|
||||
public AjaxResult addMaterialInventory(@RequestBody MaterialInventory materialInventory) {
|
||||
return toAjax(materialService.insertMaterialInventory(materialInventory));
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('system:engineering:material:inventory:edit')")
|
||||
@Log(title = "盘点单管理", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/inventory")
|
||||
public AjaxResult updateMaterialInventory(@RequestBody MaterialInventory materialInventory) {
|
||||
return toAjax(materialService.updateMaterialInventory(materialInventory));
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('system:engineering:material:inventory:complete')")
|
||||
@Log(title = "盘点单完成", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/inventory/complete/{inventoryId}")
|
||||
public AjaxResult completeMaterialInventory(@PathVariable Long inventoryId) {
|
||||
return toAjax(materialService.completeMaterialInventory(inventoryId));
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('system:engineering:material:inventory:adjust')")
|
||||
@Log(title = "盘点单调整", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/inventory/adjust/{inventoryId}")
|
||||
public AjaxResult adjustMaterialInventory(@PathVariable Long inventoryId) {
|
||||
return toAjax(materialService.adjustMaterialInventory(inventoryId));
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('system:engineering:material:inventory:remove')")
|
||||
@Log(title = "盘点单删除", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/inventory/{inventoryId}")
|
||||
public AjaxResult deleteMaterialInventory(@PathVariable Long inventoryId) {
|
||||
return toAjax(materialService.deleteMaterialInventoryById(inventoryId));
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('system:engineering:material:inventory:detail:list')")
|
||||
@GetMapping("/inventory/detail/{inventoryId}")
|
||||
public AjaxResult getMaterialInventoryDetail(@PathVariable Long inventoryId) {
|
||||
return AjaxResult.success(materialService.selectMaterialInventoryDetailList(inventoryId));
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('system:engineering:material:inventory:detail:add')")
|
||||
@Log(title = "盘点明细管理", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/inventory/detail")
|
||||
public AjaxResult addMaterialInventoryDetail(@RequestBody MaterialInventoryDetail detail) {
|
||||
return toAjax(materialService.insertMaterialInventoryDetail(detail));
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('system:engineering:material:inventory:detail:edit')")
|
||||
@Log(title = "盘点明细管理", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/inventory/detail")
|
||||
public AjaxResult updateMaterialInventoryDetail(@RequestBody MaterialInventoryDetail detail) {
|
||||
return toAjax(materialService.updateMaterialInventoryDetail(detail));
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('system:engineering:material:inventory:detail:adjust')")
|
||||
@Log(title = "盘点明细调整", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/inventory/detail/adjust/{detailId}")
|
||||
public AjaxResult adjustMaterialInventoryDetail(@PathVariable Long detailId) {
|
||||
return toAjax(materialService.adjustMaterialInventoryDetail(detailId));
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('system:engineering:material:scrap:list')")
|
||||
@GetMapping("/scrap/list")
|
||||
public TableDataInfo listMaterialScrap(MaterialScrap materialScrap) {
|
||||
startPage();
|
||||
return materialService.selectMaterialScrapList(materialScrap);
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('system:engineering:material:scrap:query')")
|
||||
@GetMapping("/scrap/{scrapId}")
|
||||
public AjaxResult getMaterialScrap(@PathVariable Long scrapId) {
|
||||
return AjaxResult.success(materialService.selectMaterialScrapById(scrapId));
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('system:engineering:material:scrap:add')")
|
||||
@Log(title = "报损报溢管理", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/scrap")
|
||||
public AjaxResult addMaterialScrap(@RequestBody MaterialScrap materialScrap) {
|
||||
return toAjax(materialService.insertMaterialScrap(materialScrap));
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('system:engineering:material:scrap:edit')")
|
||||
@Log(title = "报损报溢管理", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/scrap")
|
||||
public AjaxResult updateMaterialScrap(@RequestBody MaterialScrap materialScrap) {
|
||||
return toAjax(materialService.updateMaterialScrap(materialScrap));
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('system:engineering:material:scrap:approve')")
|
||||
@Log(title = "报损报溢审批", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/scrap/approve/{scrapId}")
|
||||
public AjaxResult approveMaterialScrap(@PathVariable Long scrapId) {
|
||||
return toAjax(materialService.approveMaterialScrap(scrapId));
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('system:engineering:material:scrap:remove')")
|
||||
@Log(title = "报损报溢删除", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/scrap/{scrapId}")
|
||||
public AjaxResult deleteMaterialScrap(@PathVariable Long scrapId) {
|
||||
return toAjax(materialService.deleteMaterialScrapById(scrapId));
|
||||
}
|
||||
}
|
||||
@@ -23,6 +23,7 @@ public class PaymentController extends BaseController {
|
||||
@PreAuthorize("@ss.hasPermi('system:engineering:payment:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(Payment payment) {
|
||||
startPage();
|
||||
return paymentService.selectPaymentList(payment);
|
||||
}
|
||||
|
||||
|
||||
@@ -25,6 +25,7 @@ public class SupplierController extends BaseController {
|
||||
@PreAuthorize("@ss.hasPermi('system:engineering:supplier:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(Supplier supplier) {
|
||||
startPage();
|
||||
return supplierService.selectSupplierList(supplier);
|
||||
}
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ public class Construction extends BaseEntity {
|
||||
@Excel(name = "阶段编码")
|
||||
private String phaseCode;
|
||||
|
||||
private Long parentPhaseId;
|
||||
private Long parentId;
|
||||
|
||||
private String constructionContent;
|
||||
|
||||
@@ -133,12 +133,12 @@ public class Construction extends BaseEntity {
|
||||
this.phaseCode = phaseCode;
|
||||
}
|
||||
|
||||
public Long getParentPhaseId() {
|
||||
return parentPhaseId;
|
||||
public Long getParentId() {
|
||||
return parentId;
|
||||
}
|
||||
|
||||
public void setParentPhaseId(Long parentPhaseId) {
|
||||
this.parentPhaseId = parentPhaseId;
|
||||
public void setParentId(Long parentId) {
|
||||
this.parentId = parentId;
|
||||
}
|
||||
|
||||
public String getConstructionContent() {
|
||||
@@ -346,6 +346,10 @@ public class Construction extends BaseEntity {
|
||||
.toString();
|
||||
}
|
||||
|
||||
private boolean getParentPhaseId() {
|
||||
return false;
|
||||
}
|
||||
|
||||
private Integer delFlag;
|
||||
|
||||
public Integer getDelFlag() {
|
||||
|
||||
@@ -29,7 +29,7 @@ public class Material extends BaseEntity {
|
||||
private String materialType;
|
||||
|
||||
@Excel(name = "物料分类")
|
||||
private String materialCategory;
|
||||
private String category;
|
||||
|
||||
@Size(max = 200, message = "规格型号长度不能超过200个字符")
|
||||
@Excel(name = "规格型号")
|
||||
@@ -123,12 +123,12 @@ public class Material extends BaseEntity {
|
||||
this.materialType = materialType;
|
||||
}
|
||||
|
||||
public String getMaterialCategory() {
|
||||
return materialCategory;
|
||||
public String getCategory() {
|
||||
return category;
|
||||
}
|
||||
|
||||
public void setMaterialCategory(String materialCategory) {
|
||||
this.materialCategory = materialCategory;
|
||||
public void setCategory(String category) {
|
||||
this.category = category;
|
||||
}
|
||||
|
||||
public String getSpecification() {
|
||||
@@ -317,6 +317,10 @@ public class Material extends BaseEntity {
|
||||
.toString();
|
||||
}
|
||||
|
||||
private boolean getMaterialCategory() {
|
||||
return false;
|
||||
}
|
||||
|
||||
private Integer delFlag;
|
||||
|
||||
public Integer getDelFlag() {
|
||||
|
||||
@@ -59,6 +59,14 @@ public class MaterialIn extends BaseEntity {
|
||||
@Excel(name = "状态", readConverterExp = "pending=待审核,approved=已审核,canceled=已取消")
|
||||
private String status;
|
||||
|
||||
private Long contractId;
|
||||
|
||||
@Excel(name = "合同编号")
|
||||
private String contractNo;
|
||||
|
||||
@Excel(name = "合同名称")
|
||||
private String contractName;
|
||||
|
||||
private String remark;
|
||||
|
||||
public Long getInId() {
|
||||
@@ -181,6 +189,30 @@ public class MaterialIn extends BaseEntity {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public Long getContractId() {
|
||||
return contractId;
|
||||
}
|
||||
|
||||
public void setContractId(Long contractId) {
|
||||
this.contractId = contractId;
|
||||
}
|
||||
|
||||
public String getContractNo() {
|
||||
return contractNo;
|
||||
}
|
||||
|
||||
public void setContractNo(String contractNo) {
|
||||
this.contractNo = contractNo;
|
||||
}
|
||||
|
||||
public String getContractName() {
|
||||
return contractName;
|
||||
}
|
||||
|
||||
public void setContractName(String contractName) {
|
||||
this.contractName = contractName;
|
||||
}
|
||||
|
||||
public String getRemark() {
|
||||
return remark;
|
||||
}
|
||||
@@ -207,6 +239,9 @@ public class MaterialIn extends BaseEntity {
|
||||
.append("warehouse", getWarehouse())
|
||||
.append("location", getLocation())
|
||||
.append("status", getStatus())
|
||||
.append("contractId", getContractId())
|
||||
.append("contractNo", getContractNo())
|
||||
.append("contractName", getContractName())
|
||||
.append("remark", getRemark())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
|
||||
@@ -0,0 +1,142 @@
|
||||
package com.ruoyi.system.domain.engineering;
|
||||
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
public class MaterialInventory extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private Long inventoryId;
|
||||
|
||||
@Excel(name = "盘点单号")
|
||||
private String inventoryNo;
|
||||
|
||||
@Excel(name = "盘点日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date inventoryDate;
|
||||
|
||||
@Excel(name = "仓库")
|
||||
private String warehouse;
|
||||
|
||||
@Excel(name = "盘点类型", readConverterExp = "full=全盘,partial=抽盘")
|
||||
private String inventoryType;
|
||||
|
||||
@Excel(name = "状态", readConverterExp = "pending=待盘点,in_progress=盘点中,completed=已完成,adjusted=已调整")
|
||||
private String status;
|
||||
|
||||
@Excel(name = "盘点人员")
|
||||
private String inventoryPerson;
|
||||
|
||||
@Excel(name = "差异数量")
|
||||
private BigDecimal diffQuantity;
|
||||
|
||||
@Excel(name = "差异金额")
|
||||
private BigDecimal diffAmount;
|
||||
|
||||
@Excel(name = "备注")
|
||||
private String remark;
|
||||
|
||||
public Long getInventoryId() {
|
||||
return inventoryId;
|
||||
}
|
||||
|
||||
public void setInventoryId(Long inventoryId) {
|
||||
this.inventoryId = inventoryId;
|
||||
}
|
||||
|
||||
public String getInventoryNo() {
|
||||
return inventoryNo;
|
||||
}
|
||||
|
||||
public void setInventoryNo(String inventoryNo) {
|
||||
this.inventoryNo = inventoryNo;
|
||||
}
|
||||
|
||||
public Date getInventoryDate() {
|
||||
return inventoryDate;
|
||||
}
|
||||
|
||||
public void setInventoryDate(Date inventoryDate) {
|
||||
this.inventoryDate = inventoryDate;
|
||||
}
|
||||
|
||||
public String getWarehouse() {
|
||||
return warehouse;
|
||||
}
|
||||
|
||||
public void setWarehouse(String warehouse) {
|
||||
this.warehouse = warehouse;
|
||||
}
|
||||
|
||||
public String getInventoryType() {
|
||||
return inventoryType;
|
||||
}
|
||||
|
||||
public void setInventoryType(String inventoryType) {
|
||||
this.inventoryType = inventoryType;
|
||||
}
|
||||
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(String status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getInventoryPerson() {
|
||||
return inventoryPerson;
|
||||
}
|
||||
|
||||
public void setInventoryPerson(String inventoryPerson) {
|
||||
this.inventoryPerson = inventoryPerson;
|
||||
}
|
||||
|
||||
public BigDecimal getDiffQuantity() {
|
||||
return diffQuantity;
|
||||
}
|
||||
|
||||
public void setDiffQuantity(BigDecimal diffQuantity) {
|
||||
this.diffQuantity = diffQuantity;
|
||||
}
|
||||
|
||||
public BigDecimal getDiffAmount() {
|
||||
return diffAmount;
|
||||
}
|
||||
|
||||
public void setDiffAmount(BigDecimal diffAmount) {
|
||||
this.diffAmount = diffAmount;
|
||||
}
|
||||
|
||||
public String getRemark() {
|
||||
return remark;
|
||||
}
|
||||
|
||||
public void setRemark(String remark) {
|
||||
this.remark = remark;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("inventoryId", getInventoryId())
|
||||
.append("inventoryNo", getInventoryNo())
|
||||
.append("inventoryDate", getInventoryDate())
|
||||
.append("warehouse", getWarehouse())
|
||||
.append("inventoryType", getInventoryType())
|
||||
.append("status", getStatus())
|
||||
.append("inventoryPerson", getInventoryPerson())
|
||||
.append("diffQuantity", getDiffQuantity())
|
||||
.append("diffAmount", getDiffAmount())
|
||||
.append("remark", getRemark())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,171 @@
|
||||
package com.ruoyi.system.domain.engineering;
|
||||
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
public class MaterialInventoryDetail extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private Long detailId;
|
||||
|
||||
private Long inventoryId;
|
||||
|
||||
private Long materialId;
|
||||
|
||||
@Excel(name = "物料编码")
|
||||
private String materialCode;
|
||||
|
||||
@Excel(name = "物料名称")
|
||||
private String materialName;
|
||||
|
||||
@Excel(name = "规格型号")
|
||||
private String specification;
|
||||
|
||||
@Excel(name = "计量单位")
|
||||
private String unit;
|
||||
|
||||
@Excel(name = "系统库存")
|
||||
private BigDecimal systemStock;
|
||||
|
||||
@Excel(name = "实际库存")
|
||||
private BigDecimal actualStock;
|
||||
|
||||
@Excel(name = "差异数量")
|
||||
private BigDecimal diffQuantity;
|
||||
|
||||
@Excel(name = "差异原因")
|
||||
private String diffReason;
|
||||
|
||||
@Excel(name = "处理状态", readConverterExp = "pending=待处理,adjusted=已调整")
|
||||
private String status;
|
||||
|
||||
@Excel(name = "备注")
|
||||
private String remark;
|
||||
|
||||
public Long getDetailId() {
|
||||
return detailId;
|
||||
}
|
||||
|
||||
public void setDetailId(Long detailId) {
|
||||
this.detailId = detailId;
|
||||
}
|
||||
|
||||
public Long getInventoryId() {
|
||||
return inventoryId;
|
||||
}
|
||||
|
||||
public void setInventoryId(Long inventoryId) {
|
||||
this.inventoryId = inventoryId;
|
||||
}
|
||||
|
||||
public Long getMaterialId() {
|
||||
return materialId;
|
||||
}
|
||||
|
||||
public void setMaterialId(Long materialId) {
|
||||
this.materialId = materialId;
|
||||
}
|
||||
|
||||
public String getMaterialCode() {
|
||||
return materialCode;
|
||||
}
|
||||
|
||||
public void setMaterialCode(String materialCode) {
|
||||
this.materialCode = materialCode;
|
||||
}
|
||||
|
||||
public String getMaterialName() {
|
||||
return materialName;
|
||||
}
|
||||
|
||||
public void setMaterialName(String materialName) {
|
||||
this.materialName = materialName;
|
||||
}
|
||||
|
||||
public String getSpecification() {
|
||||
return specification;
|
||||
}
|
||||
|
||||
public void setSpecification(String specification) {
|
||||
this.specification = specification;
|
||||
}
|
||||
|
||||
public String getUnit() {
|
||||
return unit;
|
||||
}
|
||||
|
||||
public void setUnit(String unit) {
|
||||
this.unit = unit;
|
||||
}
|
||||
|
||||
public BigDecimal getSystemStock() {
|
||||
return systemStock;
|
||||
}
|
||||
|
||||
public void setSystemStock(BigDecimal systemStock) {
|
||||
this.systemStock = systemStock;
|
||||
}
|
||||
|
||||
public BigDecimal getActualStock() {
|
||||
return actualStock;
|
||||
}
|
||||
|
||||
public void setActualStock(BigDecimal actualStock) {
|
||||
this.actualStock = actualStock;
|
||||
}
|
||||
|
||||
public BigDecimal getDiffQuantity() {
|
||||
return diffQuantity;
|
||||
}
|
||||
|
||||
public void setDiffQuantity(BigDecimal diffQuantity) {
|
||||
this.diffQuantity = diffQuantity;
|
||||
}
|
||||
|
||||
public String getDiffReason() {
|
||||
return diffReason;
|
||||
}
|
||||
|
||||
public void setDiffReason(String diffReason) {
|
||||
this.diffReason = diffReason;
|
||||
}
|
||||
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(String status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getRemark() {
|
||||
return remark;
|
||||
}
|
||||
|
||||
public void setRemark(String remark) {
|
||||
this.remark = remark;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("detailId", getDetailId())
|
||||
.append("inventoryId", getInventoryId())
|
||||
.append("materialId", getMaterialId())
|
||||
.append("materialCode", getMaterialCode())
|
||||
.append("materialName", getMaterialName())
|
||||
.append("specification", getSpecification())
|
||||
.append("unit", getUnit())
|
||||
.append("systemStock", getSystemStock())
|
||||
.append("actualStock", getActualStock())
|
||||
.append("diffQuantity", getDiffQuantity())
|
||||
.append("diffReason", getDiffReason())
|
||||
.append("status", getStatus())
|
||||
.append("remark", getRemark())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -62,6 +62,16 @@ public class MaterialOut extends BaseEntity {
|
||||
@Excel(name = "状态", readConverterExp = "pending=待审核,approved=已审核,canceled=已取消")
|
||||
private String status;
|
||||
|
||||
private Long constructionId;
|
||||
|
||||
@Excel(name = "施工节点")
|
||||
private String constructionName;
|
||||
|
||||
private Long contractId;
|
||||
|
||||
@Excel(name = "合同编号")
|
||||
private String contractNo;
|
||||
|
||||
private String remark;
|
||||
|
||||
public Long getOutId() {
|
||||
@@ -192,6 +202,38 @@ public class MaterialOut extends BaseEntity {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public Long getConstructionId() {
|
||||
return constructionId;
|
||||
}
|
||||
|
||||
public void setConstructionId(Long constructionId) {
|
||||
this.constructionId = constructionId;
|
||||
}
|
||||
|
||||
public String getConstructionName() {
|
||||
return constructionName;
|
||||
}
|
||||
|
||||
public void setConstructionName(String constructionName) {
|
||||
this.constructionName = constructionName;
|
||||
}
|
||||
|
||||
public Long getContractId() {
|
||||
return contractId;
|
||||
}
|
||||
|
||||
public void setContractId(Long contractId) {
|
||||
this.contractId = contractId;
|
||||
}
|
||||
|
||||
public String getContractNo() {
|
||||
return contractNo;
|
||||
}
|
||||
|
||||
public void setContractNo(String contractNo) {
|
||||
this.contractNo = contractNo;
|
||||
}
|
||||
|
||||
public String getRemark() {
|
||||
return remark;
|
||||
}
|
||||
@@ -219,6 +261,10 @@ public class MaterialOut extends BaseEntity {
|
||||
.append("warehouse", getWarehouse())
|
||||
.append("location", getLocation())
|
||||
.append("status", getStatus())
|
||||
.append("constructionId", getConstructionId())
|
||||
.append("constructionName", getConstructionName())
|
||||
.append("contractId", getContractId())
|
||||
.append("contractNo", getContractNo())
|
||||
.append("remark", getRemark())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
|
||||
@@ -0,0 +1,261 @@
|
||||
package com.ruoyi.system.domain.engineering;
|
||||
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
public class MaterialPick extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private Long pickId;
|
||||
|
||||
@Excel(name = "领料单号")
|
||||
private String pickNo;
|
||||
|
||||
@NotNull(message = "物料ID不能为空")
|
||||
private Long materialId;
|
||||
|
||||
@Excel(name = "物料编码")
|
||||
private String materialCode;
|
||||
|
||||
@Excel(name = "物料名称")
|
||||
private String materialName;
|
||||
|
||||
@NotNull(message = "领料数量不能为空")
|
||||
@Excel(name = "领料数量")
|
||||
private BigDecimal quantity;
|
||||
|
||||
@Excel(name = "单价")
|
||||
private BigDecimal unitPrice;
|
||||
|
||||
@Excel(name = "金额")
|
||||
private BigDecimal amount;
|
||||
|
||||
@Excel(name = "领料日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date pickDate;
|
||||
|
||||
@Excel(name = "使用部门")
|
||||
private String deptName;
|
||||
|
||||
@Excel(name = "领用人")
|
||||
private String receiver;
|
||||
|
||||
@Excel(name = "用途")
|
||||
private String purpose;
|
||||
|
||||
@Excel(name = "仓库")
|
||||
private String warehouse;
|
||||
|
||||
@Excel(name = "库位")
|
||||
private String location;
|
||||
|
||||
@Excel(name = "状态", readConverterExp = "pending=待审核,approved=已审核,issued=已发放,canceled=已取消")
|
||||
private String status;
|
||||
|
||||
private Long constructionId;
|
||||
|
||||
@Excel(name = "施工节点")
|
||||
private String constructionName;
|
||||
|
||||
private Long contractId;
|
||||
|
||||
@Excel(name = "合同编号")
|
||||
private String contractNo;
|
||||
|
||||
private String remark;
|
||||
|
||||
public Long getPickId() {
|
||||
return pickId;
|
||||
}
|
||||
|
||||
public void setPickId(Long pickId) {
|
||||
this.pickId = pickId;
|
||||
}
|
||||
|
||||
public String getPickNo() {
|
||||
return pickNo;
|
||||
}
|
||||
|
||||
public void setPickNo(String pickNo) {
|
||||
this.pickNo = pickNo;
|
||||
}
|
||||
|
||||
public Long getMaterialId() {
|
||||
return materialId;
|
||||
}
|
||||
|
||||
public void setMaterialId(Long materialId) {
|
||||
this.materialId = materialId;
|
||||
}
|
||||
|
||||
public String getMaterialCode() {
|
||||
return materialCode;
|
||||
}
|
||||
|
||||
public void setMaterialCode(String materialCode) {
|
||||
this.materialCode = materialCode;
|
||||
}
|
||||
|
||||
public String getMaterialName() {
|
||||
return materialName;
|
||||
}
|
||||
|
||||
public void setMaterialName(String materialName) {
|
||||
this.materialName = materialName;
|
||||
}
|
||||
|
||||
public BigDecimal getQuantity() {
|
||||
return quantity;
|
||||
}
|
||||
|
||||
public void setQuantity(BigDecimal quantity) {
|
||||
this.quantity = quantity;
|
||||
}
|
||||
|
||||
public BigDecimal getUnitPrice() {
|
||||
return unitPrice;
|
||||
}
|
||||
|
||||
public void setUnitPrice(BigDecimal unitPrice) {
|
||||
this.unitPrice = unitPrice;
|
||||
}
|
||||
|
||||
public BigDecimal getAmount() {
|
||||
return amount;
|
||||
}
|
||||
|
||||
public void setAmount(BigDecimal amount) {
|
||||
this.amount = amount;
|
||||
}
|
||||
|
||||
public Date getPickDate() {
|
||||
return pickDate;
|
||||
}
|
||||
|
||||
public void setPickDate(Date pickDate) {
|
||||
this.pickDate = pickDate;
|
||||
}
|
||||
|
||||
public String getDeptName() {
|
||||
return deptName;
|
||||
}
|
||||
|
||||
public void setDeptName(String deptName) {
|
||||
this.deptName = deptName;
|
||||
}
|
||||
|
||||
public String getReceiver() {
|
||||
return receiver;
|
||||
}
|
||||
|
||||
public void setReceiver(String receiver) {
|
||||
this.receiver = receiver;
|
||||
}
|
||||
|
||||
public String getPurpose() {
|
||||
return purpose;
|
||||
}
|
||||
|
||||
public void setPurpose(String purpose) {
|
||||
this.purpose = purpose;
|
||||
}
|
||||
|
||||
public String getWarehouse() {
|
||||
return warehouse;
|
||||
}
|
||||
|
||||
public void setWarehouse(String warehouse) {
|
||||
this.warehouse = warehouse;
|
||||
}
|
||||
|
||||
public String getLocation() {
|
||||
return location;
|
||||
}
|
||||
|
||||
public void setLocation(String location) {
|
||||
this.location = location;
|
||||
}
|
||||
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(String status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public Long getConstructionId() {
|
||||
return constructionId;
|
||||
}
|
||||
|
||||
public void setConstructionId(Long constructionId) {
|
||||
this.constructionId = constructionId;
|
||||
}
|
||||
|
||||
public String getConstructionName() {
|
||||
return constructionName;
|
||||
}
|
||||
|
||||
public void setConstructionName(String constructionName) {
|
||||
this.constructionName = constructionName;
|
||||
}
|
||||
|
||||
public Long getContractId() {
|
||||
return contractId;
|
||||
}
|
||||
|
||||
public void setContractId(Long contractId) {
|
||||
this.contractId = contractId;
|
||||
}
|
||||
|
||||
public String getContractNo() {
|
||||
return contractNo;
|
||||
}
|
||||
|
||||
public void setContractNo(String contractNo) {
|
||||
this.contractNo = contractNo;
|
||||
}
|
||||
|
||||
public String getRemark() {
|
||||
return remark;
|
||||
}
|
||||
|
||||
public void setRemark(String remark) {
|
||||
this.remark = remark;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("pickId", getPickId())
|
||||
.append("pickNo", getPickNo())
|
||||
.append("materialId", getMaterialId())
|
||||
.append("materialCode", getMaterialCode())
|
||||
.append("materialName", getMaterialName())
|
||||
.append("quantity", getQuantity())
|
||||
.append("unitPrice", getUnitPrice())
|
||||
.append("amount", getAmount())
|
||||
.append("pickDate", getPickDate())
|
||||
.append("deptName", getDeptName())
|
||||
.append("receiver", getReceiver())
|
||||
.append("purpose", getPurpose())
|
||||
.append("warehouse", getWarehouse())
|
||||
.append("location", getLocation())
|
||||
.append("status", getStatus())
|
||||
.append("constructionId", getConstructionId())
|
||||
.append("constructionName", getConstructionName())
|
||||
.append("contractId", getContractId())
|
||||
.append("contractNo", getContractNo())
|
||||
.append("remark", getRemark())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,237 @@
|
||||
package com.ruoyi.system.domain.engineering;
|
||||
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
public class MaterialReturn extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private Long returnId;
|
||||
|
||||
@Excel(name = "退货单号")
|
||||
private String returnNo;
|
||||
|
||||
@NotNull(message = "物料ID不能为空")
|
||||
private Long materialId;
|
||||
|
||||
@Excel(name = "物料编码")
|
||||
private String materialCode;
|
||||
|
||||
@Excel(name = "物料名称")
|
||||
private String materialName;
|
||||
|
||||
@NotNull(message = "退货数量不能为空")
|
||||
@Excel(name = "退货数量")
|
||||
private BigDecimal quantity;
|
||||
|
||||
@Excel(name = "单价")
|
||||
private BigDecimal unitPrice;
|
||||
|
||||
@Excel(name = "金额")
|
||||
private BigDecimal amount;
|
||||
|
||||
@Excel(name = "退货日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date returnDate;
|
||||
|
||||
@Excel(name = "退货原因")
|
||||
private String returnReason;
|
||||
|
||||
private Long supplierId;
|
||||
|
||||
@Excel(name = "供应商名称")
|
||||
private String supplierName;
|
||||
|
||||
@Excel(name = "仓库")
|
||||
private String warehouse;
|
||||
|
||||
@Excel(name = "库位")
|
||||
private String location;
|
||||
|
||||
@Excel(name = "状态", readConverterExp = "pending=待审核,approved=已审核,canceled=已取消")
|
||||
private String status;
|
||||
|
||||
private Long contractId;
|
||||
|
||||
@Excel(name = "合同编号")
|
||||
private String contractNo;
|
||||
|
||||
private String remark;
|
||||
|
||||
public Long getReturnId() {
|
||||
return returnId;
|
||||
}
|
||||
|
||||
public void setReturnId(Long returnId) {
|
||||
this.returnId = returnId;
|
||||
}
|
||||
|
||||
public String getReturnNo() {
|
||||
return returnNo;
|
||||
}
|
||||
|
||||
public void setReturnNo(String returnNo) {
|
||||
this.returnNo = returnNo;
|
||||
}
|
||||
|
||||
public Long getMaterialId() {
|
||||
return materialId;
|
||||
}
|
||||
|
||||
public void setMaterialId(Long materialId) {
|
||||
this.materialId = materialId;
|
||||
}
|
||||
|
||||
public String getMaterialCode() {
|
||||
return materialCode;
|
||||
}
|
||||
|
||||
public void setMaterialCode(String materialCode) {
|
||||
this.materialCode = materialCode;
|
||||
}
|
||||
|
||||
public String getMaterialName() {
|
||||
return materialName;
|
||||
}
|
||||
|
||||
public void setMaterialName(String materialName) {
|
||||
this.materialName = materialName;
|
||||
}
|
||||
|
||||
public BigDecimal getQuantity() {
|
||||
return quantity;
|
||||
}
|
||||
|
||||
public void setQuantity(BigDecimal quantity) {
|
||||
this.quantity = quantity;
|
||||
}
|
||||
|
||||
public BigDecimal getUnitPrice() {
|
||||
return unitPrice;
|
||||
}
|
||||
|
||||
public void setUnitPrice(BigDecimal unitPrice) {
|
||||
this.unitPrice = unitPrice;
|
||||
}
|
||||
|
||||
public BigDecimal getAmount() {
|
||||
return amount;
|
||||
}
|
||||
|
||||
public void setAmount(BigDecimal amount) {
|
||||
this.amount = amount;
|
||||
}
|
||||
|
||||
public Date getReturnDate() {
|
||||
return returnDate;
|
||||
}
|
||||
|
||||
public void setReturnDate(Date returnDate) {
|
||||
this.returnDate = returnDate;
|
||||
}
|
||||
|
||||
public String getReturnReason() {
|
||||
return returnReason;
|
||||
}
|
||||
|
||||
public void setReturnReason(String returnReason) {
|
||||
this.returnReason = returnReason;
|
||||
}
|
||||
|
||||
public Long getSupplierId() {
|
||||
return supplierId;
|
||||
}
|
||||
|
||||
public void setSupplierId(Long supplierId) {
|
||||
this.supplierId = supplierId;
|
||||
}
|
||||
|
||||
public String getSupplierName() {
|
||||
return supplierName;
|
||||
}
|
||||
|
||||
public void setSupplierName(String supplierName) {
|
||||
this.supplierName = supplierName;
|
||||
}
|
||||
|
||||
public String getWarehouse() {
|
||||
return warehouse;
|
||||
}
|
||||
|
||||
public void setWarehouse(String warehouse) {
|
||||
this.warehouse = warehouse;
|
||||
}
|
||||
|
||||
public String getLocation() {
|
||||
return location;
|
||||
}
|
||||
|
||||
public void setLocation(String location) {
|
||||
this.location = location;
|
||||
}
|
||||
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(String status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public Long getContractId() {
|
||||
return contractId;
|
||||
}
|
||||
|
||||
public void setContractId(Long contractId) {
|
||||
this.contractId = contractId;
|
||||
}
|
||||
|
||||
public String getContractNo() {
|
||||
return contractNo;
|
||||
}
|
||||
|
||||
public void setContractNo(String contractNo) {
|
||||
this.contractNo = contractNo;
|
||||
}
|
||||
|
||||
public String getRemark() {
|
||||
return remark;
|
||||
}
|
||||
|
||||
public void setRemark(String remark) {
|
||||
this.remark = remark;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("returnId", getReturnId())
|
||||
.append("returnNo", getReturnNo())
|
||||
.append("materialId", getMaterialId())
|
||||
.append("materialCode", getMaterialCode())
|
||||
.append("materialName", getMaterialName())
|
||||
.append("quantity", getQuantity())
|
||||
.append("unitPrice", getUnitPrice())
|
||||
.append("amount", getAmount())
|
||||
.append("returnDate", getReturnDate())
|
||||
.append("returnReason", getReturnReason())
|
||||
.append("supplierId", getSupplierId())
|
||||
.append("supplierName", getSupplierName())
|
||||
.append("warehouse", getWarehouse())
|
||||
.append("location", getLocation())
|
||||
.append("status", getStatus())
|
||||
.append("contractId", getContractId())
|
||||
.append("contractNo", getContractNo())
|
||||
.append("remark", getRemark())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,226 @@
|
||||
package com.ruoyi.system.domain.engineering;
|
||||
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
public class MaterialReturnBack extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private Long returnBackId;
|
||||
|
||||
@Excel(name = "还料单号")
|
||||
private String returnBackNo;
|
||||
|
||||
private Long pickId;
|
||||
|
||||
@Excel(name = "原领料单号")
|
||||
private String pickNo;
|
||||
|
||||
@NotNull(message = "物料ID不能为空")
|
||||
private Long materialId;
|
||||
|
||||
@Excel(name = "物料编码")
|
||||
private String materialCode;
|
||||
|
||||
@Excel(name = "物料名称")
|
||||
private String materialName;
|
||||
|
||||
@NotNull(message = "还料数量不能为空")
|
||||
@Excel(name = "还料数量")
|
||||
private BigDecimal quantity;
|
||||
|
||||
@Excel(name = "单价")
|
||||
private BigDecimal unitPrice;
|
||||
|
||||
@Excel(name = "金额")
|
||||
private BigDecimal amount;
|
||||
|
||||
@Excel(name = "还料日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date returnBackDate;
|
||||
|
||||
@Excel(name = "使用部门")
|
||||
private String deptName;
|
||||
|
||||
@Excel(name = "还料人")
|
||||
private String returnBackPerson;
|
||||
|
||||
@Excel(name = "仓库")
|
||||
private String warehouse;
|
||||
|
||||
@Excel(name = "库位")
|
||||
private String location;
|
||||
|
||||
@Excel(name = "状态", readConverterExp = "pending=待审核,approved=已审核,canceled=已取消")
|
||||
private String status;
|
||||
|
||||
private String remark;
|
||||
|
||||
public Long getReturnBackId() {
|
||||
return returnBackId;
|
||||
}
|
||||
|
||||
public void setReturnBackId(Long returnBackId) {
|
||||
this.returnBackId = returnBackId;
|
||||
}
|
||||
|
||||
public String getReturnBackNo() {
|
||||
return returnBackNo;
|
||||
}
|
||||
|
||||
public void setReturnBackNo(String returnBackNo) {
|
||||
this.returnBackNo = returnBackNo;
|
||||
}
|
||||
|
||||
public Long getPickId() {
|
||||
return pickId;
|
||||
}
|
||||
|
||||
public void setPickId(Long pickId) {
|
||||
this.pickId = pickId;
|
||||
}
|
||||
|
||||
public String getPickNo() {
|
||||
return pickNo;
|
||||
}
|
||||
|
||||
public void setPickNo(String pickNo) {
|
||||
this.pickNo = pickNo;
|
||||
}
|
||||
|
||||
public Long getMaterialId() {
|
||||
return materialId;
|
||||
}
|
||||
|
||||
public void setMaterialId(Long materialId) {
|
||||
this.materialId = materialId;
|
||||
}
|
||||
|
||||
public String getMaterialCode() {
|
||||
return materialCode;
|
||||
}
|
||||
|
||||
public void setMaterialCode(String materialCode) {
|
||||
this.materialCode = materialCode;
|
||||
}
|
||||
|
||||
public String getMaterialName() {
|
||||
return materialName;
|
||||
}
|
||||
|
||||
public void setMaterialName(String materialName) {
|
||||
this.materialName = materialName;
|
||||
}
|
||||
|
||||
public BigDecimal getQuantity() {
|
||||
return quantity;
|
||||
}
|
||||
|
||||
public void setQuantity(BigDecimal quantity) {
|
||||
this.quantity = quantity;
|
||||
}
|
||||
|
||||
public BigDecimal getUnitPrice() {
|
||||
return unitPrice;
|
||||
}
|
||||
|
||||
public void setUnitPrice(BigDecimal unitPrice) {
|
||||
this.unitPrice = unitPrice;
|
||||
}
|
||||
|
||||
public BigDecimal getAmount() {
|
||||
return amount;
|
||||
}
|
||||
|
||||
public void setAmount(BigDecimal amount) {
|
||||
this.amount = amount;
|
||||
}
|
||||
|
||||
public Date getReturnBackDate() {
|
||||
return returnBackDate;
|
||||
}
|
||||
|
||||
public void setReturnBackDate(Date returnBackDate) {
|
||||
this.returnBackDate = returnBackDate;
|
||||
}
|
||||
|
||||
public String getDeptName() {
|
||||
return deptName;
|
||||
}
|
||||
|
||||
public void setDeptName(String deptName) {
|
||||
this.deptName = deptName;
|
||||
}
|
||||
|
||||
public String getReturnBackPerson() {
|
||||
return returnBackPerson;
|
||||
}
|
||||
|
||||
public void setReturnBackPerson(String returnBackPerson) {
|
||||
this.returnBackPerson = returnBackPerson;
|
||||
}
|
||||
|
||||
public String getWarehouse() {
|
||||
return warehouse;
|
||||
}
|
||||
|
||||
public void setWarehouse(String warehouse) {
|
||||
this.warehouse = warehouse;
|
||||
}
|
||||
|
||||
public String getLocation() {
|
||||
return location;
|
||||
}
|
||||
|
||||
public void setLocation(String location) {
|
||||
this.location = location;
|
||||
}
|
||||
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(String status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getRemark() {
|
||||
return remark;
|
||||
}
|
||||
|
||||
public void setRemark(String remark) {
|
||||
this.remark = remark;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("returnBackId", getReturnBackId())
|
||||
.append("returnBackNo", getReturnBackNo())
|
||||
.append("pickId", getPickId())
|
||||
.append("pickNo", getPickNo())
|
||||
.append("materialId", getMaterialId())
|
||||
.append("materialCode", getMaterialCode())
|
||||
.append("materialName", getMaterialName())
|
||||
.append("quantity", getQuantity())
|
||||
.append("unitPrice", getUnitPrice())
|
||||
.append("amount", getAmount())
|
||||
.append("returnBackDate", getReturnBackDate())
|
||||
.append("deptName", getDeptName())
|
||||
.append("returnBackPerson", getReturnBackPerson())
|
||||
.append("warehouse", getWarehouse())
|
||||
.append("location", getLocation())
|
||||
.append("status", getStatus())
|
||||
.append("remark", getRemark())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,226 @@
|
||||
package com.ruoyi.system.domain.engineering;
|
||||
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
public class MaterialScrap extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private Long scrapId;
|
||||
|
||||
@Excel(name = "报损报溢单号")
|
||||
private String scrapNo;
|
||||
|
||||
@NotNull(message = "物料ID不能为空")
|
||||
private Long materialId;
|
||||
|
||||
@Excel(name = "物料编码")
|
||||
private String materialCode;
|
||||
|
||||
@Excel(name = "物料名称")
|
||||
private String materialName;
|
||||
|
||||
@NotNull(message = "数量不能为空")
|
||||
@Excel(name = "数量")
|
||||
private BigDecimal quantity;
|
||||
|
||||
@Excel(name = "单价")
|
||||
private BigDecimal unitPrice;
|
||||
|
||||
@Excel(name = "金额")
|
||||
private BigDecimal amount;
|
||||
|
||||
@Excel(name = "类型", readConverterExp = "scrap=报损,overflow=报溢")
|
||||
private String scrapType;
|
||||
|
||||
@Excel(name = "原因")
|
||||
private String reason;
|
||||
|
||||
@Excel(name = "日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date scrapDate;
|
||||
|
||||
@Excel(name = "仓库")
|
||||
private String warehouse;
|
||||
|
||||
@Excel(name = "库位")
|
||||
private String location;
|
||||
|
||||
@Excel(name = "状态", readConverterExp = "pending=待审核,approved=已审核,canceled=已取消")
|
||||
private String status;
|
||||
|
||||
private Long inventoryId;
|
||||
|
||||
@Excel(name = "关联盘点单号")
|
||||
private String inventoryNo;
|
||||
|
||||
private String remark;
|
||||
|
||||
public Long getScrapId() {
|
||||
return scrapId;
|
||||
}
|
||||
|
||||
public void setScrapId(Long scrapId) {
|
||||
this.scrapId = scrapId;
|
||||
}
|
||||
|
||||
public String getScrapNo() {
|
||||
return scrapNo;
|
||||
}
|
||||
|
||||
public void setScrapNo(String scrapNo) {
|
||||
this.scrapNo = scrapNo;
|
||||
}
|
||||
|
||||
public Long getMaterialId() {
|
||||
return materialId;
|
||||
}
|
||||
|
||||
public void setMaterialId(Long materialId) {
|
||||
this.materialId = materialId;
|
||||
}
|
||||
|
||||
public String getMaterialCode() {
|
||||
return materialCode;
|
||||
}
|
||||
|
||||
public void setMaterialCode(String materialCode) {
|
||||
this.materialCode = materialCode;
|
||||
}
|
||||
|
||||
public String getMaterialName() {
|
||||
return materialName;
|
||||
}
|
||||
|
||||
public void setMaterialName(String materialName) {
|
||||
this.materialName = materialName;
|
||||
}
|
||||
|
||||
public BigDecimal getQuantity() {
|
||||
return quantity;
|
||||
}
|
||||
|
||||
public void setQuantity(BigDecimal quantity) {
|
||||
this.quantity = quantity;
|
||||
}
|
||||
|
||||
public BigDecimal getUnitPrice() {
|
||||
return unitPrice;
|
||||
}
|
||||
|
||||
public void setUnitPrice(BigDecimal unitPrice) {
|
||||
this.unitPrice = unitPrice;
|
||||
}
|
||||
|
||||
public BigDecimal getAmount() {
|
||||
return amount;
|
||||
}
|
||||
|
||||
public void setAmount(BigDecimal amount) {
|
||||
this.amount = amount;
|
||||
}
|
||||
|
||||
public String getScrapType() {
|
||||
return scrapType;
|
||||
}
|
||||
|
||||
public void setScrapType(String scrapType) {
|
||||
this.scrapType = scrapType;
|
||||
}
|
||||
|
||||
public String getReason() {
|
||||
return reason;
|
||||
}
|
||||
|
||||
public void setReason(String reason) {
|
||||
this.reason = reason;
|
||||
}
|
||||
|
||||
public Date getScrapDate() {
|
||||
return scrapDate;
|
||||
}
|
||||
|
||||
public void setScrapDate(Date scrapDate) {
|
||||
this.scrapDate = scrapDate;
|
||||
}
|
||||
|
||||
public String getWarehouse() {
|
||||
return warehouse;
|
||||
}
|
||||
|
||||
public void setWarehouse(String warehouse) {
|
||||
this.warehouse = warehouse;
|
||||
}
|
||||
|
||||
public String getLocation() {
|
||||
return location;
|
||||
}
|
||||
|
||||
public void setLocation(String location) {
|
||||
this.location = location;
|
||||
}
|
||||
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(String status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public Long getInventoryId() {
|
||||
return inventoryId;
|
||||
}
|
||||
|
||||
public void setInventoryId(Long inventoryId) {
|
||||
this.inventoryId = inventoryId;
|
||||
}
|
||||
|
||||
public String getInventoryNo() {
|
||||
return inventoryNo;
|
||||
}
|
||||
|
||||
public void setInventoryNo(String inventoryNo) {
|
||||
this.inventoryNo = inventoryNo;
|
||||
}
|
||||
|
||||
public String getRemark() {
|
||||
return remark;
|
||||
}
|
||||
|
||||
public void setRemark(String remark) {
|
||||
this.remark = remark;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("scrapId", getScrapId())
|
||||
.append("scrapNo", getScrapNo())
|
||||
.append("materialId", getMaterialId())
|
||||
.append("materialCode", getMaterialCode())
|
||||
.append("materialName", getMaterialName())
|
||||
.append("quantity", getQuantity())
|
||||
.append("unitPrice", getUnitPrice())
|
||||
.append("amount", getAmount())
|
||||
.append("scrapType", getScrapType())
|
||||
.append("reason", getReason())
|
||||
.append("scrapDate", getScrapDate())
|
||||
.append("warehouse", getWarehouse())
|
||||
.append("location", getLocation())
|
||||
.append("status", getStatus())
|
||||
.append("inventoryId", getInventoryId())
|
||||
.append("inventoryNo", getInventoryNo())
|
||||
.append("remark", getRemark())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,238 @@
|
||||
package com.ruoyi.system.domain.engineering;
|
||||
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
public class MaterialTransfer extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private Long transferId;
|
||||
|
||||
@Excel(name = "调拨单号")
|
||||
private String transferNo;
|
||||
|
||||
@NotNull(message = "物料ID不能为空")
|
||||
private Long materialId;
|
||||
|
||||
@Excel(name = "物料编码")
|
||||
private String materialCode;
|
||||
|
||||
@Excel(name = "物料名称")
|
||||
private String materialName;
|
||||
|
||||
@NotNull(message = "调拨数量不能为空")
|
||||
@Excel(name = "调拨数量")
|
||||
private BigDecimal quantity;
|
||||
|
||||
@Excel(name = "单价")
|
||||
private BigDecimal unitPrice;
|
||||
|
||||
@Excel(name = "金额")
|
||||
private BigDecimal amount;
|
||||
|
||||
@Excel(name = "调拨日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date transferDate;
|
||||
|
||||
@Excel(name = "调出仓库")
|
||||
private String fromWarehouse;
|
||||
|
||||
@Excel(name = "调出库位")
|
||||
private String fromLocation;
|
||||
|
||||
@Excel(name = "调入仓库")
|
||||
private String toWarehouse;
|
||||
|
||||
@Excel(name = "调入库位")
|
||||
private String toLocation;
|
||||
|
||||
@Excel(name = "调拨类型", readConverterExp = "out=调拨出库,in=调拨入库")
|
||||
private String transferType;
|
||||
|
||||
@Excel(name = "状态", readConverterExp = "pending=待审核,approved=已审核,canceled=已取消")
|
||||
private String status;
|
||||
|
||||
private Long relatedTransferId;
|
||||
|
||||
@Excel(name = "关联调拨单号")
|
||||
private String relatedTransferNo;
|
||||
|
||||
private String remark;
|
||||
|
||||
public Long getTransferId() {
|
||||
return transferId;
|
||||
}
|
||||
|
||||
public void setTransferId(Long transferId) {
|
||||
this.transferId = transferId;
|
||||
}
|
||||
|
||||
public String getTransferNo() {
|
||||
return transferNo;
|
||||
}
|
||||
|
||||
public void setTransferNo(String transferNo) {
|
||||
this.transferNo = transferNo;
|
||||
}
|
||||
|
||||
public Long getMaterialId() {
|
||||
return materialId;
|
||||
}
|
||||
|
||||
public void setMaterialId(Long materialId) {
|
||||
this.materialId = materialId;
|
||||
}
|
||||
|
||||
public String getMaterialCode() {
|
||||
return materialCode;
|
||||
}
|
||||
|
||||
public void setMaterialCode(String materialCode) {
|
||||
this.materialCode = materialCode;
|
||||
}
|
||||
|
||||
public String getMaterialName() {
|
||||
return materialName;
|
||||
}
|
||||
|
||||
public void setMaterialName(String materialName) {
|
||||
this.materialName = materialName;
|
||||
}
|
||||
|
||||
public BigDecimal getQuantity() {
|
||||
return quantity;
|
||||
}
|
||||
|
||||
public void setQuantity(BigDecimal quantity) {
|
||||
this.quantity = quantity;
|
||||
}
|
||||
|
||||
public BigDecimal getUnitPrice() {
|
||||
return unitPrice;
|
||||
}
|
||||
|
||||
public void setUnitPrice(BigDecimal unitPrice) {
|
||||
this.unitPrice = unitPrice;
|
||||
}
|
||||
|
||||
public BigDecimal getAmount() {
|
||||
return amount;
|
||||
}
|
||||
|
||||
public void setAmount(BigDecimal amount) {
|
||||
this.amount = amount;
|
||||
}
|
||||
|
||||
public Date getTransferDate() {
|
||||
return transferDate;
|
||||
}
|
||||
|
||||
public void setTransferDate(Date transferDate) {
|
||||
this.transferDate = transferDate;
|
||||
}
|
||||
|
||||
public String getFromWarehouse() {
|
||||
return fromWarehouse;
|
||||
}
|
||||
|
||||
public void setFromWarehouse(String fromWarehouse) {
|
||||
this.fromWarehouse = fromWarehouse;
|
||||
}
|
||||
|
||||
public String getFromLocation() {
|
||||
return fromLocation;
|
||||
}
|
||||
|
||||
public void setFromLocation(String fromLocation) {
|
||||
this.fromLocation = fromLocation;
|
||||
}
|
||||
|
||||
public String getToWarehouse() {
|
||||
return toWarehouse;
|
||||
}
|
||||
|
||||
public void setToWarehouse(String toWarehouse) {
|
||||
this.toWarehouse = toWarehouse;
|
||||
}
|
||||
|
||||
public String getToLocation() {
|
||||
return toLocation;
|
||||
}
|
||||
|
||||
public void setToLocation(String toLocation) {
|
||||
this.toLocation = toLocation;
|
||||
}
|
||||
|
||||
public String getTransferType() {
|
||||
return transferType;
|
||||
}
|
||||
|
||||
public void setTransferType(String transferType) {
|
||||
this.transferType = transferType;
|
||||
}
|
||||
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(String status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public Long getRelatedTransferId() {
|
||||
return relatedTransferId;
|
||||
}
|
||||
|
||||
public void setRelatedTransferId(Long relatedTransferId) {
|
||||
this.relatedTransferId = relatedTransferId;
|
||||
}
|
||||
|
||||
public String getRelatedTransferNo() {
|
||||
return relatedTransferNo;
|
||||
}
|
||||
|
||||
public void setRelatedTransferNo(String relatedTransferNo) {
|
||||
this.relatedTransferNo = relatedTransferNo;
|
||||
}
|
||||
|
||||
public String getRemark() {
|
||||
return remark;
|
||||
}
|
||||
|
||||
public void setRemark(String remark) {
|
||||
this.remark = remark;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("transferId", getTransferId())
|
||||
.append("transferNo", getTransferNo())
|
||||
.append("materialId", getMaterialId())
|
||||
.append("materialCode", getMaterialCode())
|
||||
.append("materialName", getMaterialName())
|
||||
.append("quantity", getQuantity())
|
||||
.append("unitPrice", getUnitPrice())
|
||||
.append("amount", getAmount())
|
||||
.append("transferDate", getTransferDate())
|
||||
.append("fromWarehouse", getFromWarehouse())
|
||||
.append("fromLocation", getFromLocation())
|
||||
.append("toWarehouse", getToWarehouse())
|
||||
.append("toLocation", getToLocation())
|
||||
.append("transferType", getTransferType())
|
||||
.append("status", getStatus())
|
||||
.append("relatedTransferId", getRelatedTransferId())
|
||||
.append("relatedTransferNo", getRelatedTransferNo())
|
||||
.append("remark", getRemark())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -43,11 +43,11 @@ public class Supplier extends BaseEntity {
|
||||
|
||||
@Size(max = 100, message = "联系人长度不能超过100个字符")
|
||||
@Excel(name = "联系人")
|
||||
private String contact;
|
||||
private String contactPerson;
|
||||
|
||||
@Size(max = 50, message = "联系电话长度不能超过50个字符")
|
||||
@Excel(name = "联系电话")
|
||||
private String phone;
|
||||
private String contactPhone;
|
||||
|
||||
@Size(max = 50, message = "手机号长度不能超过50个字符")
|
||||
@Excel(name = "手机号")
|
||||
@@ -199,20 +199,20 @@ public class Supplier extends BaseEntity {
|
||||
this.legalPerson = legalPerson;
|
||||
}
|
||||
|
||||
public String getContact() {
|
||||
return contact;
|
||||
public String getContactPerson() {
|
||||
return contactPerson;
|
||||
}
|
||||
|
||||
public void setContact(String contact) {
|
||||
this.contact = contact;
|
||||
public void setContactPerson(String contactPerson) {
|
||||
this.contactPerson = contactPerson;
|
||||
}
|
||||
|
||||
public String getPhone() {
|
||||
return phone;
|
||||
public String getContactPhone() {
|
||||
return contactPhone;
|
||||
}
|
||||
|
||||
public void setPhone(String phone) {
|
||||
this.phone = phone;
|
||||
public void setContactPhone(String contactPhone) {
|
||||
this.contactPhone = contactPhone;
|
||||
}
|
||||
|
||||
public String getMobile() {
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.ruoyi.system.mapper.engineering;
|
||||
|
||||
import com.ruoyi.system.domain.engineering.MaterialInventoryDetail;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface MaterialInventoryDetailMapper {
|
||||
|
||||
List<MaterialInventoryDetail> selectMaterialInventoryDetailList(MaterialInventoryDetail detail);
|
||||
|
||||
MaterialInventoryDetail selectMaterialInventoryDetailById(Long detailId);
|
||||
|
||||
int insertMaterialInventoryDetail(MaterialInventoryDetail detail);
|
||||
|
||||
int updateMaterialInventoryDetail(MaterialInventoryDetail detail);
|
||||
|
||||
int updateMaterialInventoryDetailStatus(Long detailId, String status);
|
||||
|
||||
int deleteMaterialInventoryDetailById(Long detailId);
|
||||
|
||||
int deleteMaterialInventoryDetailByInventoryId(Long inventoryId);
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.ruoyi.system.mapper.engineering;
|
||||
|
||||
import com.ruoyi.system.domain.engineering.MaterialInventory;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface MaterialInventoryMapper {
|
||||
|
||||
List<MaterialInventory> selectMaterialInventoryList(MaterialInventory materialInventory);
|
||||
|
||||
MaterialInventory selectMaterialInventoryById(Long inventoryId);
|
||||
|
||||
int insertMaterialInventory(MaterialInventory materialInventory);
|
||||
|
||||
int updateMaterialInventory(MaterialInventory materialInventory);
|
||||
|
||||
int updateMaterialInventoryStatus(Long inventoryId, String status);
|
||||
|
||||
int deleteMaterialInventoryById(Long inventoryId);
|
||||
|
||||
int deleteMaterialInventoryByIds(Long[] inventoryIds);
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.ruoyi.system.mapper.engineering;
|
||||
|
||||
import com.ruoyi.system.domain.engineering.MaterialPick;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface MaterialPickMapper {
|
||||
|
||||
List<MaterialPick> selectMaterialPickList(MaterialPick materialPick);
|
||||
|
||||
MaterialPick selectMaterialPickById(Long pickId);
|
||||
|
||||
int insertMaterialPick(MaterialPick materialPick);
|
||||
|
||||
int updateMaterialPick(MaterialPick materialPick);
|
||||
|
||||
int updateMaterialPickStatus(Long pickId, String status);
|
||||
|
||||
int deleteMaterialPickById(Long pickId);
|
||||
|
||||
int deleteMaterialPickByIds(Long[] pickIds);
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.ruoyi.system.mapper.engineering;
|
||||
|
||||
import com.ruoyi.system.domain.engineering.MaterialReturnBack;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface MaterialReturnBackMapper {
|
||||
|
||||
List<MaterialReturnBack> selectMaterialReturnBackList(MaterialReturnBack materialReturnBack);
|
||||
|
||||
MaterialReturnBack selectMaterialReturnBackById(Long returnBackId);
|
||||
|
||||
int insertMaterialReturnBack(MaterialReturnBack materialReturnBack);
|
||||
|
||||
int updateMaterialReturnBack(MaterialReturnBack materialReturnBack);
|
||||
|
||||
int updateMaterialReturnBackStatus(Long returnBackId, String status);
|
||||
|
||||
int deleteMaterialReturnBackById(Long returnBackId);
|
||||
|
||||
int deleteMaterialReturnBackByIds(Long[] returnBackIds);
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.ruoyi.system.mapper.engineering;
|
||||
|
||||
import com.ruoyi.system.domain.engineering.MaterialReturn;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface MaterialReturnMapper {
|
||||
|
||||
List<MaterialReturn> selectMaterialReturnList(MaterialReturn materialReturn);
|
||||
|
||||
MaterialReturn selectMaterialReturnById(Long returnId);
|
||||
|
||||
int insertMaterialReturn(MaterialReturn materialReturn);
|
||||
|
||||
int updateMaterialReturn(MaterialReturn materialReturn);
|
||||
|
||||
int updateMaterialReturnStatus(Long returnId, String status);
|
||||
|
||||
int deleteMaterialReturnById(Long returnId);
|
||||
|
||||
int deleteMaterialReturnByIds(Long[] returnIds);
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.ruoyi.system.mapper.engineering;
|
||||
|
||||
import com.ruoyi.system.domain.engineering.MaterialScrap;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface MaterialScrapMapper {
|
||||
|
||||
List<MaterialScrap> selectMaterialScrapList(MaterialScrap materialScrap);
|
||||
|
||||
MaterialScrap selectMaterialScrapById(Long scrapId);
|
||||
|
||||
int insertMaterialScrap(MaterialScrap materialScrap);
|
||||
|
||||
int updateMaterialScrap(MaterialScrap materialScrap);
|
||||
|
||||
int updateMaterialScrapStatus(Long scrapId, String status);
|
||||
|
||||
int deleteMaterialScrapById(Long scrapId);
|
||||
|
||||
int deleteMaterialScrapByIds(Long[] scrapIds);
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.ruoyi.system.mapper.engineering;
|
||||
|
||||
import com.ruoyi.system.domain.engineering.MaterialTransfer;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface MaterialTransferMapper {
|
||||
|
||||
List<MaterialTransfer> selectMaterialTransferList(MaterialTransfer materialTransfer);
|
||||
|
||||
MaterialTransfer selectMaterialTransferById(Long transferId);
|
||||
|
||||
int insertMaterialTransfer(MaterialTransfer materialTransfer);
|
||||
|
||||
int updateMaterialTransfer(MaterialTransfer materialTransfer);
|
||||
|
||||
int updateMaterialTransferStatus(Long transferId, String status);
|
||||
|
||||
int deleteMaterialTransferById(Long transferId);
|
||||
|
||||
int deleteMaterialTransferByIds(Long[] transferIds);
|
||||
}
|
||||
@@ -1,9 +1,7 @@
|
||||
package com.ruoyi.system.service.engineering;
|
||||
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.system.domain.engineering.Material;
|
||||
import com.ruoyi.system.domain.engineering.MaterialIn;
|
||||
import com.ruoyi.system.domain.engineering.MaterialOut;
|
||||
import com.ruoyi.system.domain.engineering.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -45,4 +43,92 @@ public interface IMaterialService {
|
||||
public TableDataInfo selectMaterialOutList(MaterialOut materialOut);
|
||||
|
||||
public MaterialOut selectMaterialOutById(Long outId);
|
||||
|
||||
public List<Material> selectWarningMaterials();
|
||||
|
||||
public String calculateWarningStatus(Material material);
|
||||
|
||||
public int insertMaterialReturn(MaterialReturn materialReturn);
|
||||
|
||||
public int updateMaterialReturn(MaterialReturn materialReturn);
|
||||
|
||||
public int approveMaterialReturn(Long returnId);
|
||||
|
||||
public int deleteMaterialReturnById(Long returnId);
|
||||
|
||||
public TableDataInfo selectMaterialReturnList(MaterialReturn materialReturn);
|
||||
|
||||
public MaterialReturn selectMaterialReturnById(Long returnId);
|
||||
|
||||
public int insertMaterialPick(MaterialPick materialPick);
|
||||
|
||||
public int updateMaterialPick(MaterialPick materialPick);
|
||||
|
||||
public int approveMaterialPick(Long pickId);
|
||||
|
||||
public int issueMaterialPick(Long pickId);
|
||||
|
||||
public int deleteMaterialPickById(Long pickId);
|
||||
|
||||
public TableDataInfo selectMaterialPickList(MaterialPick materialPick);
|
||||
|
||||
public MaterialPick selectMaterialPickById(Long pickId);
|
||||
|
||||
public int insertMaterialReturnBack(MaterialReturnBack materialReturnBack);
|
||||
|
||||
public int updateMaterialReturnBack(MaterialReturnBack materialReturnBack);
|
||||
|
||||
public int approveMaterialReturnBack(Long returnBackId);
|
||||
|
||||
public int deleteMaterialReturnBackById(Long returnBackId);
|
||||
|
||||
public TableDataInfo selectMaterialReturnBackList(MaterialReturnBack materialReturnBack);
|
||||
|
||||
public MaterialReturnBack selectMaterialReturnBackById(Long returnBackId);
|
||||
|
||||
public int insertMaterialTransfer(MaterialTransfer materialTransfer);
|
||||
|
||||
public int updateMaterialTransfer(MaterialTransfer materialTransfer);
|
||||
|
||||
public int approveMaterialTransfer(Long transferId);
|
||||
|
||||
public int deleteMaterialTransferById(Long transferId);
|
||||
|
||||
public TableDataInfo selectMaterialTransferList(MaterialTransfer materialTransfer);
|
||||
|
||||
public MaterialTransfer selectMaterialTransferById(Long transferId);
|
||||
|
||||
public int insertMaterialInventory(MaterialInventory materialInventory);
|
||||
|
||||
public int updateMaterialInventory(MaterialInventory materialInventory);
|
||||
|
||||
public int completeMaterialInventory(Long inventoryId);
|
||||
|
||||
public int adjustMaterialInventory(Long inventoryId);
|
||||
|
||||
public int deleteMaterialInventoryById(Long inventoryId);
|
||||
|
||||
public TableDataInfo selectMaterialInventoryList(MaterialInventory materialInventory);
|
||||
|
||||
public MaterialInventory selectMaterialInventoryById(Long inventoryId);
|
||||
|
||||
public int insertMaterialInventoryDetail(MaterialInventoryDetail detail);
|
||||
|
||||
public int updateMaterialInventoryDetail(MaterialInventoryDetail detail);
|
||||
|
||||
public int adjustMaterialInventoryDetail(Long detailId);
|
||||
|
||||
public List<MaterialInventoryDetail> selectMaterialInventoryDetailList(Long inventoryId);
|
||||
|
||||
public int insertMaterialScrap(MaterialScrap materialScrap);
|
||||
|
||||
public int updateMaterialScrap(MaterialScrap materialScrap);
|
||||
|
||||
public int approveMaterialScrap(Long scrapId);
|
||||
|
||||
public int deleteMaterialScrapById(Long scrapId);
|
||||
|
||||
public TableDataInfo selectMaterialScrapList(MaterialScrap materialScrap);
|
||||
|
||||
public MaterialScrap selectMaterialScrapById(Long scrapId);
|
||||
}
|
||||
@@ -24,7 +24,8 @@ public class ConstructionServiceImpl implements IConstructionService {
|
||||
@Override
|
||||
public TableDataInfo selectConstructionList(Construction construction) {
|
||||
List<Construction> list = constructionMapper.selectConstructionList(construction);
|
||||
long total = PageHelper.getLocalPage().getTotal();
|
||||
com.github.pagehelper.Page<?> page = PageHelper.getLocalPage();
|
||||
long total = page != null ? page.getTotal() : list.size();
|
||||
return TableDataInfo.build(list, total);
|
||||
}
|
||||
|
||||
|
||||
@@ -37,7 +37,8 @@ public class ContractServiceImpl implements IContractService {
|
||||
for (Contract c : list) {
|
||||
c.setPaidAmount(sumPaymentAmountByContractId(c.getContractId()));
|
||||
}
|
||||
long total = PageHelper.getLocalPage().getTotal();
|
||||
com.github.pagehelper.Page<?> page = PageHelper.getLocalPage();
|
||||
long total = page != null ? page.getTotal() : list.size();
|
||||
return TableDataInfo.build(list, total);
|
||||
}
|
||||
|
||||
|
||||
@@ -3,12 +3,8 @@ package com.ruoyi.system.service.impl.engineering;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.system.domain.engineering.Material;
|
||||
import com.ruoyi.system.domain.engineering.MaterialIn;
|
||||
import com.ruoyi.system.domain.engineering.MaterialOut;
|
||||
import com.ruoyi.system.mapper.engineering.MaterialInMapper;
|
||||
import com.ruoyi.system.mapper.engineering.MaterialMapper;
|
||||
import com.ruoyi.system.mapper.engineering.MaterialOutMapper;
|
||||
import com.ruoyi.system.domain.engineering.*;
|
||||
import com.ruoyi.system.mapper.engineering.*;
|
||||
import com.ruoyi.system.service.engineering.IMaterialService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
@@ -29,10 +25,32 @@ public class MaterialServiceImpl implements IMaterialService {
|
||||
@Autowired
|
||||
private MaterialOutMapper materialOutMapper;
|
||||
|
||||
@Autowired
|
||||
private MaterialReturnMapper materialReturnMapper;
|
||||
|
||||
@Autowired
|
||||
private MaterialPickMapper materialPickMapper;
|
||||
|
||||
@Autowired
|
||||
private MaterialReturnBackMapper materialReturnBackMapper;
|
||||
|
||||
@Autowired
|
||||
private MaterialTransferMapper materialTransferMapper;
|
||||
|
||||
@Autowired
|
||||
private MaterialInventoryMapper materialInventoryMapper;
|
||||
|
||||
@Autowired
|
||||
private MaterialInventoryDetailMapper materialInventoryDetailMapper;
|
||||
|
||||
@Autowired
|
||||
private MaterialScrapMapper materialScrapMapper;
|
||||
|
||||
@Override
|
||||
public TableDataInfo selectMaterialList(Material material) {
|
||||
List<Material> list = materialMapper.selectMaterialList(material);
|
||||
long total = PageHelper.getLocalPage().getTotal();
|
||||
com.github.pagehelper.Page<?> page = PageHelper.getLocalPage();
|
||||
long total = page != null ? page.getTotal() : list.size();
|
||||
return TableDataInfo.build(list, total);
|
||||
}
|
||||
|
||||
@@ -122,7 +140,8 @@ public class MaterialServiceImpl implements IMaterialService {
|
||||
@Override
|
||||
public TableDataInfo selectMaterialInList(MaterialIn materialIn) {
|
||||
List<MaterialIn> list = materialInMapper.selectMaterialInList(materialIn);
|
||||
long total = PageHelper.getLocalPage().getTotal();
|
||||
com.github.pagehelper.Page<?> page = PageHelper.getLocalPage();
|
||||
long total = page != null ? page.getTotal() : list.size();
|
||||
return TableDataInfo.build(list, total);
|
||||
}
|
||||
|
||||
@@ -182,7 +201,8 @@ public class MaterialServiceImpl implements IMaterialService {
|
||||
@Override
|
||||
public TableDataInfo selectMaterialOutList(MaterialOut materialOut) {
|
||||
List<MaterialOut> list = materialOutMapper.selectMaterialOutList(materialOut);
|
||||
long total = PageHelper.getLocalPage().getTotal();
|
||||
com.github.pagehelper.Page<?> page = PageHelper.getLocalPage();
|
||||
long total = page != null ? page.getTotal() : list.size();
|
||||
return TableDataInfo.build(list, total);
|
||||
}
|
||||
|
||||
@@ -190,4 +210,486 @@ public class MaterialServiceImpl implements IMaterialService {
|
||||
public MaterialOut selectMaterialOutById(Long outId) {
|
||||
return materialOutMapper.selectMaterialOutById(outId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Material> selectWarningMaterials() {
|
||||
List<Material> allMaterials = materialMapper.selectMaterialList(new Material());
|
||||
List<Material> warningMaterials = new java.util.ArrayList<>();
|
||||
|
||||
for (Material material : allMaterials) {
|
||||
String status = calculateWarningStatus(material);
|
||||
if (!"normal".equals(status)) {
|
||||
material.setWarningStatus(status);
|
||||
warningMaterials.add(material);
|
||||
}
|
||||
}
|
||||
|
||||
return warningMaterials;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String calculateWarningStatus(Material material) {
|
||||
BigDecimal stock = material.getStock() != null ? material.getStock() : BigDecimal.ZERO;
|
||||
BigDecimal minStock = material.getMinStock() != null ? material.getMinStock() : BigDecimal.ZERO;
|
||||
BigDecimal safetyStock = material.getSafetyStock() != null ? material.getSafetyStock() : minStock;
|
||||
|
||||
if (safetyStock.compareTo(BigDecimal.ZERO) <= 0) {
|
||||
return "normal";
|
||||
}
|
||||
|
||||
if (stock.compareTo(BigDecimal.ZERO) <= 0) {
|
||||
return "urgent";
|
||||
}
|
||||
|
||||
if (stock.compareTo(safetyStock) < 0) {
|
||||
BigDecimal ratio = stock.divide(safetyStock, 2, java.math.RoundingMode.HALF_UP);
|
||||
if (ratio.compareTo(new BigDecimal("0.3")) < 0) {
|
||||
return "urgent";
|
||||
} else {
|
||||
return "warning";
|
||||
}
|
||||
}
|
||||
|
||||
return "normal";
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public int insertMaterialReturn(MaterialReturn materialReturn) {
|
||||
if (StringUtils.isBlank(materialReturn.getStatus())) {
|
||||
materialReturn.setStatus("pending");
|
||||
}
|
||||
return materialReturnMapper.insertMaterialReturn(materialReturn);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public int updateMaterialReturn(MaterialReturn materialReturn) {
|
||||
return materialReturnMapper.updateMaterialReturn(materialReturn);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public int approveMaterialReturn(Long returnId) {
|
||||
MaterialReturn materialReturn = materialReturnMapper.selectMaterialReturnById(returnId);
|
||||
if (materialReturn == null) {
|
||||
throw new RuntimeException("退货记录不存在");
|
||||
}
|
||||
|
||||
materialReturnMapper.updateMaterialReturnStatus(returnId, "approved");
|
||||
|
||||
Material material = materialMapper.selectMaterialById(materialReturn.getMaterialId());
|
||||
if (material != null) {
|
||||
BigDecimal currentStock = material.getStock() != null ? material.getStock() : BigDecimal.ZERO;
|
||||
BigDecimal newStock = currentStock.subtract(materialReturn.getQuantity() != null ? materialReturn.getQuantity() : BigDecimal.ZERO);
|
||||
if (newStock.compareTo(BigDecimal.ZERO) < 0) {
|
||||
newStock = BigDecimal.ZERO;
|
||||
}
|
||||
materialMapper.updateMaterialStock(materialReturn.getMaterialId(), newStock);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public int deleteMaterialReturnById(Long returnId) {
|
||||
return materialReturnMapper.deleteMaterialReturnById(returnId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TableDataInfo selectMaterialReturnList(MaterialReturn materialReturn) {
|
||||
List<MaterialReturn> list = materialReturnMapper.selectMaterialReturnList(materialReturn);
|
||||
com.github.pagehelper.Page<?> page = PageHelper.getLocalPage();
|
||||
long total = page != null ? page.getTotal() : list.size();
|
||||
return TableDataInfo.build(list, total);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MaterialReturn selectMaterialReturnById(Long returnId) {
|
||||
return materialReturnMapper.selectMaterialReturnById(returnId);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public int insertMaterialPick(MaterialPick materialPick) {
|
||||
if (StringUtils.isBlank(materialPick.getStatus())) {
|
||||
materialPick.setStatus("pending");
|
||||
}
|
||||
return materialPickMapper.insertMaterialPick(materialPick);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public int updateMaterialPick(MaterialPick materialPick) {
|
||||
return materialPickMapper.updateMaterialPick(materialPick);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public int approveMaterialPick(Long pickId) {
|
||||
MaterialPick materialPick = materialPickMapper.selectMaterialPickById(pickId);
|
||||
if (materialPick == null) {
|
||||
throw new RuntimeException("领料记录不存在");
|
||||
}
|
||||
|
||||
Material material = materialMapper.selectMaterialById(materialPick.getMaterialId());
|
||||
if (material == null) {
|
||||
throw new RuntimeException("物料不存在");
|
||||
}
|
||||
|
||||
BigDecimal currentStock = material.getStock() != null ? material.getStock() : BigDecimal.ZERO;
|
||||
BigDecimal pickQuantity = materialPick.getQuantity() != null ? materialPick.getQuantity() : BigDecimal.ZERO;
|
||||
|
||||
if (currentStock.compareTo(pickQuantity) < 0) {
|
||||
throw new RuntimeException("库存不足");
|
||||
}
|
||||
|
||||
materialPickMapper.updateMaterialPickStatus(pickId, "approved");
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public int issueMaterialPick(Long pickId) {
|
||||
MaterialPick materialPick = materialPickMapper.selectMaterialPickById(pickId);
|
||||
if (materialPick == null) {
|
||||
throw new RuntimeException("领料记录不存在");
|
||||
}
|
||||
|
||||
if (!"approved".equals(materialPick.getStatus())) {
|
||||
throw new RuntimeException("领料记录未通过审核");
|
||||
}
|
||||
|
||||
Material material = materialMapper.selectMaterialById(materialPick.getMaterialId());
|
||||
if (material != null) {
|
||||
BigDecimal currentStock = material.getStock() != null ? material.getStock() : BigDecimal.ZERO;
|
||||
BigDecimal newStock = currentStock.subtract(materialPick.getQuantity() != null ? materialPick.getQuantity() : BigDecimal.ZERO);
|
||||
materialMapper.updateMaterialStock(materialPick.getMaterialId(), newStock);
|
||||
}
|
||||
|
||||
materialPickMapper.updateMaterialPickStatus(pickId, "issued");
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public int deleteMaterialPickById(Long pickId) {
|
||||
return materialPickMapper.deleteMaterialPickById(pickId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TableDataInfo selectMaterialPickList(MaterialPick materialPick) {
|
||||
List<MaterialPick> list = materialPickMapper.selectMaterialPickList(materialPick);
|
||||
com.github.pagehelper.Page<?> page = PageHelper.getLocalPage();
|
||||
long total = page != null ? page.getTotal() : list.size();
|
||||
return TableDataInfo.build(list, total);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MaterialPick selectMaterialPickById(Long pickId) {
|
||||
return materialPickMapper.selectMaterialPickById(pickId);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public int insertMaterialReturnBack(MaterialReturnBack materialReturnBack) {
|
||||
if (StringUtils.isBlank(materialReturnBack.getStatus())) {
|
||||
materialReturnBack.setStatus("pending");
|
||||
}
|
||||
return materialReturnBackMapper.insertMaterialReturnBack(materialReturnBack);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public int updateMaterialReturnBack(MaterialReturnBack materialReturnBack) {
|
||||
return materialReturnBackMapper.updateMaterialReturnBack(materialReturnBack);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public int approveMaterialReturnBack(Long returnBackId) {
|
||||
MaterialReturnBack materialReturnBack = materialReturnBackMapper.selectMaterialReturnBackById(returnBackId);
|
||||
if (materialReturnBack == null) {
|
||||
throw new RuntimeException("还料记录不存在");
|
||||
}
|
||||
|
||||
materialReturnBackMapper.updateMaterialReturnBackStatus(returnBackId, "approved");
|
||||
|
||||
Material material = materialMapper.selectMaterialById(materialReturnBack.getMaterialId());
|
||||
if (material != null) {
|
||||
BigDecimal currentStock = material.getStock() != null ? material.getStock() : BigDecimal.ZERO;
|
||||
BigDecimal newStock = currentStock.add(materialReturnBack.getQuantity() != null ? materialReturnBack.getQuantity() : BigDecimal.ZERO);
|
||||
materialMapper.updateMaterialStock(materialReturnBack.getMaterialId(), newStock);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public int deleteMaterialReturnBackById(Long returnBackId) {
|
||||
return materialReturnBackMapper.deleteMaterialReturnBackById(returnBackId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TableDataInfo selectMaterialReturnBackList(MaterialReturnBack materialReturnBack) {
|
||||
List<MaterialReturnBack> list = materialReturnBackMapper.selectMaterialReturnBackList(materialReturnBack);
|
||||
com.github.pagehelper.Page<?> page = PageHelper.getLocalPage();
|
||||
long total = page != null ? page.getTotal() : list.size();
|
||||
return TableDataInfo.build(list, total);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MaterialReturnBack selectMaterialReturnBackById(Long returnBackId) {
|
||||
return materialReturnBackMapper.selectMaterialReturnBackById(returnBackId);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public int insertMaterialTransfer(MaterialTransfer materialTransfer) {
|
||||
if (StringUtils.isBlank(materialTransfer.getStatus())) {
|
||||
materialTransfer.setStatus("pending");
|
||||
}
|
||||
return materialTransferMapper.insertMaterialTransfer(materialTransfer);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public int updateMaterialTransfer(MaterialTransfer materialTransfer) {
|
||||
return materialTransferMapper.updateMaterialTransfer(materialTransfer);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public int approveMaterialTransfer(Long transferId) {
|
||||
MaterialTransfer materialTransfer = materialTransferMapper.selectMaterialTransferById(transferId);
|
||||
if (materialTransfer == null) {
|
||||
throw new RuntimeException("调拨记录不存在");
|
||||
}
|
||||
|
||||
materialTransferMapper.updateMaterialTransferStatus(transferId, "approved");
|
||||
|
||||
if ("out".equals(materialTransfer.getTransferType())) {
|
||||
Material material = materialMapper.selectMaterialById(materialTransfer.getMaterialId());
|
||||
if (material != null) {
|
||||
BigDecimal currentStock = material.getStock() != null ? material.getStock() : BigDecimal.ZERO;
|
||||
BigDecimal newStock = currentStock.subtract(materialTransfer.getQuantity() != null ? materialTransfer.getQuantity() : BigDecimal.ZERO);
|
||||
materialMapper.updateMaterialStock(materialTransfer.getMaterialId(), newStock);
|
||||
}
|
||||
} else if ("in".equals(materialTransfer.getTransferType())) {
|
||||
Material material = materialMapper.selectMaterialById(materialTransfer.getMaterialId());
|
||||
if (material != null) {
|
||||
BigDecimal currentStock = material.getStock() != null ? material.getStock() : BigDecimal.ZERO;
|
||||
BigDecimal newStock = currentStock.add(materialTransfer.getQuantity() != null ? materialTransfer.getQuantity() : BigDecimal.ZERO);
|
||||
materialMapper.updateMaterialStock(materialTransfer.getMaterialId(), newStock);
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public int deleteMaterialTransferById(Long transferId) {
|
||||
return materialTransferMapper.deleteMaterialTransferById(transferId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TableDataInfo selectMaterialTransferList(MaterialTransfer materialTransfer) {
|
||||
List<MaterialTransfer> list = materialTransferMapper.selectMaterialTransferList(materialTransfer);
|
||||
com.github.pagehelper.Page<?> page = PageHelper.getLocalPage();
|
||||
long total = page != null ? page.getTotal() : list.size();
|
||||
return TableDataInfo.build(list, total);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MaterialTransfer selectMaterialTransferById(Long transferId) {
|
||||
return materialTransferMapper.selectMaterialTransferById(transferId);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public int insertMaterialInventory(MaterialInventory materialInventory) {
|
||||
if (StringUtils.isBlank(materialInventory.getStatus())) {
|
||||
materialInventory.setStatus("pending");
|
||||
}
|
||||
return materialInventoryMapper.insertMaterialInventory(materialInventory);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public int updateMaterialInventory(MaterialInventory materialInventory) {
|
||||
return materialInventoryMapper.updateMaterialInventory(materialInventory);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public int completeMaterialInventory(Long inventoryId) {
|
||||
MaterialInventory inventory = materialInventoryMapper.selectMaterialInventoryById(inventoryId);
|
||||
if (inventory == null) {
|
||||
throw new RuntimeException("盘点记录不存在");
|
||||
}
|
||||
|
||||
materialInventoryMapper.updateMaterialInventoryStatus(inventoryId, "completed");
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public int adjustMaterialInventory(Long inventoryId) {
|
||||
MaterialInventory inventory = materialInventoryMapper.selectMaterialInventoryById(inventoryId);
|
||||
if (inventory == null) {
|
||||
throw new RuntimeException("盘点记录不存在");
|
||||
}
|
||||
|
||||
List<MaterialInventoryDetail> details = materialInventoryDetailMapper.selectMaterialInventoryDetailList(new MaterialInventoryDetail());
|
||||
for (MaterialInventoryDetail detail : details) {
|
||||
if ("pending".equals(detail.getStatus()) && detail.getDiffQuantity() != null && detail.getDiffQuantity().compareTo(BigDecimal.ZERO) != 0) {
|
||||
Material material = materialMapper.selectMaterialById(detail.getMaterialId());
|
||||
if (material != null) {
|
||||
BigDecimal currentStock = material.getStock() != null ? material.getStock() : BigDecimal.ZERO;
|
||||
BigDecimal newStock = currentStock.add(detail.getDiffQuantity());
|
||||
materialMapper.updateMaterialStock(detail.getMaterialId(), newStock);
|
||||
materialInventoryDetailMapper.updateMaterialInventoryDetailStatus(detail.getDetailId(), "adjusted");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
materialInventoryMapper.updateMaterialInventoryStatus(inventoryId, "adjusted");
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public int deleteMaterialInventoryById(Long inventoryId) {
|
||||
materialInventoryDetailMapper.deleteMaterialInventoryDetailByInventoryId(inventoryId);
|
||||
return materialInventoryMapper.deleteMaterialInventoryById(inventoryId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TableDataInfo selectMaterialInventoryList(MaterialInventory materialInventory) {
|
||||
List<MaterialInventory> list = materialInventoryMapper.selectMaterialInventoryList(materialInventory);
|
||||
com.github.pagehelper.Page<?> page = PageHelper.getLocalPage();
|
||||
long total = page != null ? page.getTotal() : list.size();
|
||||
return TableDataInfo.build(list, total);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MaterialInventory selectMaterialInventoryById(Long inventoryId) {
|
||||
return materialInventoryMapper.selectMaterialInventoryById(inventoryId);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public int insertMaterialInventoryDetail(MaterialInventoryDetail detail) {
|
||||
if (StringUtils.isBlank(detail.getStatus())) {
|
||||
detail.setStatus("pending");
|
||||
}
|
||||
if (detail.getDiffQuantity() == null) {
|
||||
BigDecimal systemStock = detail.getSystemStock() != null ? detail.getSystemStock() : BigDecimal.ZERO;
|
||||
BigDecimal actualStock = detail.getActualStock() != null ? detail.getActualStock() : BigDecimal.ZERO;
|
||||
detail.setDiffQuantity(actualStock.subtract(systemStock));
|
||||
}
|
||||
return materialInventoryDetailMapper.insertMaterialInventoryDetail(detail);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public int updateMaterialInventoryDetail(MaterialInventoryDetail detail) {
|
||||
if (detail.getDiffQuantity() == null) {
|
||||
BigDecimal systemStock = detail.getSystemStock() != null ? detail.getSystemStock() : BigDecimal.ZERO;
|
||||
BigDecimal actualStock = detail.getActualStock() != null ? detail.getActualStock() : BigDecimal.ZERO;
|
||||
detail.setDiffQuantity(actualStock.subtract(systemStock));
|
||||
}
|
||||
return materialInventoryDetailMapper.updateMaterialInventoryDetail(detail);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public int adjustMaterialInventoryDetail(Long detailId) {
|
||||
MaterialInventoryDetail detail = materialInventoryDetailMapper.selectMaterialInventoryDetailById(detailId);
|
||||
if (detail == null) {
|
||||
throw new RuntimeException("盘点明细不存在");
|
||||
}
|
||||
|
||||
if (detail.getDiffQuantity() != null && detail.getDiffQuantity().compareTo(BigDecimal.ZERO) != 0) {
|
||||
Material material = materialMapper.selectMaterialById(detail.getMaterialId());
|
||||
if (material != null) {
|
||||
BigDecimal currentStock = material.getStock() != null ? material.getStock() : BigDecimal.ZERO;
|
||||
BigDecimal newStock = currentStock.add(detail.getDiffQuantity());
|
||||
materialMapper.updateMaterialStock(detail.getMaterialId(), newStock);
|
||||
}
|
||||
}
|
||||
|
||||
materialInventoryDetailMapper.updateMaterialInventoryDetailStatus(detailId, "adjusted");
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<MaterialInventoryDetail> selectMaterialInventoryDetailList(Long inventoryId) {
|
||||
MaterialInventoryDetail query = new MaterialInventoryDetail();
|
||||
query.setInventoryId(inventoryId);
|
||||
return materialInventoryDetailMapper.selectMaterialInventoryDetailList(query);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public int insertMaterialScrap(MaterialScrap materialScrap) {
|
||||
if (StringUtils.isBlank(materialScrap.getStatus())) {
|
||||
materialScrap.setStatus("pending");
|
||||
}
|
||||
return materialScrapMapper.insertMaterialScrap(materialScrap);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public int updateMaterialScrap(MaterialScrap materialScrap) {
|
||||
return materialScrapMapper.updateMaterialScrap(materialScrap);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public int approveMaterialScrap(Long scrapId) {
|
||||
MaterialScrap materialScrap = materialScrapMapper.selectMaterialScrapById(scrapId);
|
||||
if (materialScrap == null) {
|
||||
throw new RuntimeException("报损报溢记录不存在");
|
||||
}
|
||||
|
||||
materialScrapMapper.updateMaterialScrapStatus(scrapId, "approved");
|
||||
|
||||
Material material = materialMapper.selectMaterialById(materialScrap.getMaterialId());
|
||||
if (material != null) {
|
||||
BigDecimal currentStock = material.getStock() != null ? material.getStock() : BigDecimal.ZERO;
|
||||
BigDecimal quantity = materialScrap.getQuantity() != null ? materialScrap.getQuantity() : BigDecimal.ZERO;
|
||||
|
||||
if ("scrap".equals(materialScrap.getScrapType())) {
|
||||
BigDecimal newStock = currentStock.subtract(quantity);
|
||||
if (newStock.compareTo(BigDecimal.ZERO) < 0) {
|
||||
newStock = BigDecimal.ZERO;
|
||||
}
|
||||
materialMapper.updateMaterialStock(materialScrap.getMaterialId(), newStock);
|
||||
} else if ("overflow".equals(materialScrap.getScrapType())) {
|
||||
BigDecimal newStock = currentStock.add(quantity);
|
||||
materialMapper.updateMaterialStock(materialScrap.getMaterialId(), newStock);
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public int deleteMaterialScrapById(Long scrapId) {
|
||||
return materialScrapMapper.deleteMaterialScrapById(scrapId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TableDataInfo selectMaterialScrapList(MaterialScrap materialScrap) {
|
||||
List<MaterialScrap> list = materialScrapMapper.selectMaterialScrapList(materialScrap);
|
||||
com.github.pagehelper.Page<?> page = PageHelper.getLocalPage();
|
||||
long total = page != null ? page.getTotal() : list.size();
|
||||
return TableDataInfo.build(list, total);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MaterialScrap selectMaterialScrapById(Long scrapId) {
|
||||
return materialScrapMapper.selectMaterialScrapById(scrapId);
|
||||
}
|
||||
}
|
||||
@@ -3,9 +3,11 @@ package com.ruoyi.system.service.impl.engineering;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.system.domain.engineering.Construction;
|
||||
import com.ruoyi.system.domain.engineering.Contract;
|
||||
import com.ruoyi.system.domain.engineering.Payment;
|
||||
import com.ruoyi.system.domain.engineering.SupplierPaymentRecord;
|
||||
import com.ruoyi.system.mapper.engineering.ConstructionMapper;
|
||||
import com.ruoyi.system.mapper.engineering.ContractMapper;
|
||||
import com.ruoyi.system.mapper.engineering.PaymentMapper;
|
||||
import com.ruoyi.system.mapper.engineering.SupplierPaymentRecordMapper;
|
||||
@@ -30,10 +32,14 @@ public class PaymentServiceImpl implements IPaymentService {
|
||||
@Autowired
|
||||
private SupplierPaymentRecordMapper supplierPaymentRecordMapper;
|
||||
|
||||
@Autowired
|
||||
private ConstructionMapper constructionMapper;
|
||||
|
||||
@Override
|
||||
public TableDataInfo selectPaymentList(Payment payment) {
|
||||
List<Payment> list = paymentMapper.selectPaymentList(payment);
|
||||
long total = PageHelper.getLocalPage().getTotal();
|
||||
com.github.pagehelper.Page<?> page = PageHelper.getLocalPage();
|
||||
long total = page != null ? page.getTotal() : list.size();
|
||||
return TableDataInfo.build(list, total);
|
||||
}
|
||||
|
||||
@@ -59,9 +65,69 @@ public class PaymentServiceImpl implements IPaymentService {
|
||||
throw new RuntimeException("付款金额超过合同未付金额");
|
||||
}
|
||||
|
||||
if ("progress".equals(payment.getPaymentType())) {
|
||||
validateProgressPayment(payment);
|
||||
} else if ("quality".equals(payment.getPaymentType())) {
|
||||
validateQualityPayment(payment, contract);
|
||||
}
|
||||
|
||||
return paymentMapper.insertPayment(payment);
|
||||
}
|
||||
|
||||
private void validateProgressPayment(Payment payment) {
|
||||
if (payment.getConstructionId() == null) {
|
||||
throw new RuntimeException("进度款必须关联施工节点");
|
||||
}
|
||||
|
||||
Construction construction = constructionMapper.selectConstructionById(payment.getConstructionId());
|
||||
if (construction == null) {
|
||||
throw new RuntimeException("施工节点不存在");
|
||||
}
|
||||
|
||||
if (!"approved".equals(construction.getAcceptanceStatus())) {
|
||||
throw new RuntimeException("施工节点未通过验收,无法申请进度款");
|
||||
}
|
||||
}
|
||||
|
||||
private void validateQualityPayment(Payment payment, Contract contract) {
|
||||
if (contract.getEndDate() == null) {
|
||||
throw new RuntimeException("合同未设置结束日期,无法申请质保金");
|
||||
}
|
||||
|
||||
Date endDate = contract.getEndDate();
|
||||
Date now = new Date();
|
||||
if (now.before(endDate)) {
|
||||
throw new RuntimeException("合同尚未到期,无法申请质保金");
|
||||
}
|
||||
|
||||
BigDecimal qualityAmount = contract.getQualityAmount();
|
||||
if (qualityAmount == null || qualityAmount.compareTo(BigDecimal.ZERO) <= 0) {
|
||||
throw new RuntimeException("合同未设置质保金金额");
|
||||
}
|
||||
|
||||
BigDecimal totalQualityPaid = sumQualityPaymentByContractId(contract.getContractId());
|
||||
BigDecimal remainingQuality = qualityAmount.subtract(totalQualityPaid);
|
||||
|
||||
if (payment.getAmount().compareTo(remainingQuality) > 0) {
|
||||
throw new RuntimeException("质保金申请金额超过剩余可申请金额");
|
||||
}
|
||||
}
|
||||
|
||||
private BigDecimal sumQualityPaymentByContractId(Long contractId) {
|
||||
Payment query = new Payment();
|
||||
query.setContractId(contractId);
|
||||
query.setPaymentType("quality");
|
||||
List<Payment> payments = paymentMapper.selectPaymentList(query);
|
||||
|
||||
BigDecimal sum = BigDecimal.ZERO;
|
||||
for (Payment p : payments) {
|
||||
if ("paid".equals(p.getStatus())) {
|
||||
sum = sum.add(p.getAmount() != null ? p.getAmount() : BigDecimal.ZERO);
|
||||
}
|
||||
}
|
||||
return sum;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public int updatePayment(Payment payment) {
|
||||
|
||||
@@ -43,7 +43,8 @@ public class SupplierServiceImpl implements ISupplierService {
|
||||
s.setTotalContractAmount(sumContractAmount(s.getSupplierId()));
|
||||
s.setTotalPaymentAmount(sumPaymentAmount(s.getSupplierId()));
|
||||
}
|
||||
long total = PageHelper.getLocalPage().getTotal();
|
||||
com.github.pagehelper.Page<?> page = PageHelper.getLocalPage();
|
||||
long total = page != null ? page.getTotal() : list.size();
|
||||
return TableDataInfo.build(list, total);
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,78 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.system.mapper.engineering.MaterialInventoryDetailMapper">
|
||||
|
||||
<resultMap type="MaterialInventoryDetail" id="MaterialInventoryDetailResult">
|
||||
<id property="detailId" column="detail_id" />
|
||||
<result property="inventoryId" column="inventory_id" />
|
||||
<result property="materialId" column="material_id" />
|
||||
<result property="systemQuantity" column="system_quantity" />
|
||||
<result property="actualQuantity" column="actual_quantity" />
|
||||
<result property="difference" column="difference" />
|
||||
<result property="status" column="status" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectMaterialInventoryDetailVo">
|
||||
SELECT detail_id, inventory_id, material_id, system_quantity, actual_quantity,
|
||||
difference, status, remark, create_by, create_time, update_by, update_time
|
||||
FROM engineering_material_inventory_detail
|
||||
</sql>
|
||||
|
||||
<select id="selectMaterialInventoryDetailList" parameterType="MaterialInventoryDetail" resultMap="MaterialInventoryDetailResult">
|
||||
<include refid="selectMaterialInventoryDetailVo"/>
|
||||
<where>
|
||||
<if test="inventoryId != null">AND inventory_id = #{inventoryId}</if>
|
||||
<if test="materialId != null">AND material_id = #{materialId}</if>
|
||||
<if test="status != null and status != ''">AND status = #{status}</if>
|
||||
</where>
|
||||
ORDER BY create_time DESC
|
||||
</select>
|
||||
|
||||
<select id="selectMaterialInventoryDetailById" parameterType="Long" resultMap="MaterialInventoryDetailResult">
|
||||
<include refid="selectMaterialInventoryDetailVo"/>
|
||||
WHERE detail_id = #{detailId}
|
||||
</select>
|
||||
|
||||
<insert id="insertMaterialInventoryDetail" parameterType="MaterialInventoryDetail" useGeneratedKeys="true" keyProperty="detailId">
|
||||
INSERT INTO engineering_material_inventory_detail (
|
||||
inventory_id, material_id, system_quantity, actual_quantity, difference,
|
||||
status, remark, create_by, create_time, update_by, update_time
|
||||
) VALUES (
|
||||
#{inventoryId}, #{materialId}, #{systemQuantity}, #{actualQuantity}, #{difference},
|
||||
#{status}, #{remark}, #{createBy}, #{createTime}, #{updateBy}, #{updateTime}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="updateMaterialInventoryDetail" parameterType="MaterialInventoryDetail">
|
||||
UPDATE engineering_material_inventory_detail
|
||||
SET inventory_id = #{inventoryId},
|
||||
material_id = #{materialId},
|
||||
system_quantity = #{systemQuantity},
|
||||
actual_quantity = #{actualQuantity},
|
||||
difference = #{difference},
|
||||
status = #{status},
|
||||
remark = #{remark},
|
||||
update_by = #{updateBy},
|
||||
update_time = #{updateTime}
|
||||
WHERE detail_id = #{detailId}
|
||||
</update>
|
||||
|
||||
<update id="updateMaterialInventoryDetailStatus">
|
||||
UPDATE engineering_material_inventory_detail
|
||||
SET status = #{status}
|
||||
WHERE detail_id = #{detailId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteMaterialInventoryDetailById" parameterType="Long">
|
||||
DELETE FROM engineering_material_inventory_detail WHERE detail_id = #{detailId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteMaterialInventoryDetailByInventoryId" parameterType="Long">
|
||||
DELETE FROM engineering_material_inventory_detail WHERE inventory_id = #{inventoryId}
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -0,0 +1,70 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.system.mapper.engineering.MaterialInventoryMapper">
|
||||
|
||||
<resultMap type="MaterialInventory" id="MaterialInventoryResult">
|
||||
<id property="inventoryId" column="inventory_id" />
|
||||
<result property="inventoryNo" column="inventory_no" />
|
||||
<result property="inventoryDate" column="inventory_date" />
|
||||
<result property="warehouse" column="warehouse" />
|
||||
<result property="status" column="status" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectMaterialInventoryVo">
|
||||
SELECT inventory_id, inventory_no, inventory_date, warehouse,
|
||||
status, remark, create_by, create_time, update_by, update_time
|
||||
FROM engineering_material_inventory
|
||||
</sql>
|
||||
|
||||
<select id="selectMaterialInventoryList" parameterType="MaterialInventory" resultMap="MaterialInventoryResult">
|
||||
<include refid="selectMaterialInventoryVo"/>
|
||||
<where>
|
||||
<if test="inventoryNo != null and inventoryNo != ''">AND inventory_no LIKE CONCAT('%', #{inventoryNo}, '%')</if>
|
||||
<if test="warehouse != null and warehouse != ''">AND warehouse LIKE CONCAT('%', #{warehouse}, '%')</if>
|
||||
<if test="status != null and status != ''">AND status = #{status}</if>
|
||||
</where>
|
||||
ORDER BY create_time DESC
|
||||
</select>
|
||||
|
||||
<select id="selectMaterialInventoryById" parameterType="Long" resultMap="MaterialInventoryResult">
|
||||
<include refid="selectMaterialInventoryVo"/>
|
||||
WHERE inventory_id = #{inventoryId}
|
||||
</select>
|
||||
|
||||
<insert id="insertMaterialInventory" parameterType="MaterialInventory" useGeneratedKeys="true" keyProperty="inventoryId">
|
||||
INSERT INTO engineering_material_inventory (
|
||||
inventory_no, inventory_date, warehouse, status, remark,
|
||||
create_by, create_time, update_by, update_time
|
||||
) VALUES (
|
||||
#{inventoryNo}, #{inventoryDate}, #{warehouse}, #{status}, #{remark},
|
||||
#{createBy}, #{createTime}, #{updateBy}, #{updateTime}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="updateMaterialInventory" parameterType="MaterialInventory">
|
||||
UPDATE engineering_material_inventory
|
||||
SET inventory_no = #{inventoryNo},
|
||||
inventory_date = #{inventoryDate},
|
||||
warehouse = #{warehouse},
|
||||
status = #{status},
|
||||
remark = #{remark},
|
||||
update_by = #{updateBy},
|
||||
update_time = #{updateTime}
|
||||
WHERE inventory_id = #{inventoryId}
|
||||
</update>
|
||||
|
||||
<update id="updateMaterialInventoryStatus">
|
||||
UPDATE engineering_material_inventory
|
||||
SET status = #{status}
|
||||
WHERE inventory_id = #{inventoryId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteMaterialInventoryById" parameterType="Long">
|
||||
DELETE FROM engineering_material_inventory WHERE inventory_id = #{inventoryId}
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -0,0 +1,79 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.system.mapper.engineering.MaterialPickMapper">
|
||||
|
||||
<resultMap type="MaterialPick" id="MaterialPickResult">
|
||||
<id property="pickId" column="pick_id" />
|
||||
<result property="pickNo" column="pick_no" />
|
||||
<result property="materialId" column="material_id" />
|
||||
<result property="quantity" column="quantity" />
|
||||
<result property="pickDate" column="pick_date" />
|
||||
<result property="department" column="department" />
|
||||
<result property="purpose" column="purpose" />
|
||||
<result property="picker" column="picker" />
|
||||
<result property="status" column="status" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectMaterialPickVo">
|
||||
SELECT pick_id, pick_no, material_id, quantity, pick_date, department,
|
||||
purpose, picker, status, remark, create_by, create_time, update_by, update_time
|
||||
FROM engineering_material_pick
|
||||
</sql>
|
||||
|
||||
<select id="selectMaterialPickList" parameterType="MaterialPick" resultMap="MaterialPickResult">
|
||||
<include refid="selectMaterialPickVo"/>
|
||||
<where>
|
||||
<if test="pickNo != null and pickNo != ''">AND pick_no LIKE CONCAT('%', #{pickNo}, '%')</if>
|
||||
<if test="materialId != null">AND material_id = #{materialId}</if>
|
||||
<if test="department != null and department != ''">AND department LIKE CONCAT('%', #{department}, '%')</if>
|
||||
<if test="status != null and status != ''">AND status = #{status}</if>
|
||||
</where>
|
||||
ORDER BY create_time DESC
|
||||
</select>
|
||||
|
||||
<select id="selectMaterialPickById" parameterType="Long" resultMap="MaterialPickResult">
|
||||
<include refid="selectMaterialPickVo"/>
|
||||
WHERE pick_id = #{pickId}
|
||||
</select>
|
||||
|
||||
<insert id="insertMaterialPick" parameterType="MaterialPick" useGeneratedKeys="true" keyProperty="pickId">
|
||||
INSERT INTO engineering_material_pick (
|
||||
pick_no, material_id, quantity, pick_date, department,
|
||||
purpose, picker, status, remark, create_by, create_time, update_by, update_time
|
||||
) VALUES (
|
||||
#{pickNo}, #{materialId}, #{quantity}, #{pickDate}, #{department},
|
||||
#{purpose}, #{picker}, #{status}, #{remark}, #{createBy}, #{createTime}, #{updateBy}, #{updateTime}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="updateMaterialPick" parameterType="MaterialPick">
|
||||
UPDATE engineering_material_pick
|
||||
SET pick_no = #{pickNo},
|
||||
material_id = #{materialId},
|
||||
quantity = #{quantity},
|
||||
pick_date = #{pickDate},
|
||||
department = #{department},
|
||||
purpose = #{purpose},
|
||||
picker = #{picker},
|
||||
status = #{status},
|
||||
remark = #{remark},
|
||||
update_by = #{updateBy},
|
||||
update_time = #{updateTime}
|
||||
WHERE pick_id = #{pickId}
|
||||
</update>
|
||||
|
||||
<update id="updateMaterialPickStatus">
|
||||
UPDATE engineering_material_pick
|
||||
SET status = #{status}
|
||||
WHERE pick_id = #{pickId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteMaterialPickById" parameterType="Long">
|
||||
DELETE FROM engineering_material_pick WHERE pick_id = #{pickId}
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -0,0 +1,74 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.system.mapper.engineering.MaterialReturnBackMapper">
|
||||
|
||||
<resultMap type="MaterialReturnBack" id="MaterialReturnBackResult">
|
||||
<id property="returnBackId" column="return_back_id" />
|
||||
<result property="returnBackNo" column="return_back_no" />
|
||||
<result property="materialId" column="material_id" />
|
||||
<result property="quantity" column="quantity" />
|
||||
<result property="returnBackDate" column="return_back_date" />
|
||||
<result property="originalPickId" column="original_pick_id" />
|
||||
<result property="status" column="status" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectMaterialReturnBackVo">
|
||||
SELECT return_back_id, return_back_no, material_id, quantity, return_back_date, original_pick_id,
|
||||
status, remark, create_by, create_time, update_by, update_time
|
||||
FROM engineering_material_return_back
|
||||
</sql>
|
||||
|
||||
<select id="selectMaterialReturnBackList" parameterType="MaterialReturnBack" resultMap="MaterialReturnBackResult">
|
||||
<include refid="selectMaterialReturnBackVo"/>
|
||||
<where>
|
||||
<if test="returnBackNo != null and returnBackNo != ''">AND return_back_no LIKE CONCAT('%', #{returnBackNo}, '%')</if>
|
||||
<if test="materialId != null">AND material_id = #{materialId}</if>
|
||||
<if test="status != null and status != ''">AND status = #{status}</if>
|
||||
</where>
|
||||
ORDER BY create_time DESC
|
||||
</select>
|
||||
|
||||
<select id="selectMaterialReturnBackById" parameterType="Long" resultMap="MaterialReturnBackResult">
|
||||
<include refid="selectMaterialReturnBackVo"/>
|
||||
WHERE return_back_id = #{returnBackId}
|
||||
</select>
|
||||
|
||||
<insert id="insertMaterialReturnBack" parameterType="MaterialReturnBack" useGeneratedKeys="true" keyProperty="returnBackId">
|
||||
INSERT INTO engineering_material_return_back (
|
||||
return_back_no, material_id, quantity, return_back_date, original_pick_id,
|
||||
status, remark, create_by, create_time, update_by, update_time
|
||||
) VALUES (
|
||||
#{returnBackNo}, #{materialId}, #{quantity}, #{returnBackDate}, #{originalPickId},
|
||||
#{status}, #{remark}, #{createBy}, #{createTime}, #{updateBy}, #{updateTime}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="updateMaterialReturnBack" parameterType="MaterialReturnBack">
|
||||
UPDATE engineering_material_return_back
|
||||
SET return_back_no = #{returnBackNo},
|
||||
material_id = #{materialId},
|
||||
quantity = #{quantity},
|
||||
return_back_date = #{returnBackDate},
|
||||
original_pick_id = #{originalPickId},
|
||||
status = #{status},
|
||||
remark = #{remark},
|
||||
update_by = #{updateBy},
|
||||
update_time = #{updateTime}
|
||||
WHERE return_back_id = #{returnBackId}
|
||||
</update>
|
||||
|
||||
<update id="updateMaterialReturnBackStatus">
|
||||
UPDATE engineering_material_return_back
|
||||
SET status = #{status}
|
||||
WHERE return_back_id = #{returnBackId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteMaterialReturnBackById" parameterType="Long">
|
||||
DELETE FROM engineering_material_return_back WHERE return_back_id = #{returnBackId}
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -0,0 +1,77 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.system.mapper.engineering.MaterialReturnMapper">
|
||||
|
||||
<resultMap type="MaterialReturn" id="MaterialReturnResult">
|
||||
<id property="returnId" column="return_id" />
|
||||
<result property="returnNo" column="return_no" />
|
||||
<result property="materialId" column="material_id" />
|
||||
<result property="quantity" column="quantity" />
|
||||
<result property="returnDate" column="return_date" />
|
||||
<result property="supplierId" column="supplier_id" />
|
||||
<result property="returnReason" column="return_reason" />
|
||||
<result property="status" column="status" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectMaterialReturnVo">
|
||||
SELECT return_id, return_no, material_id, quantity, return_date, supplier_id,
|
||||
return_reason, status, remark, create_by, create_time, update_by, update_time
|
||||
FROM engineering_material_return
|
||||
</sql>
|
||||
|
||||
<select id="selectMaterialReturnList" parameterType="MaterialReturn" resultMap="MaterialReturnResult">
|
||||
<include refid="selectMaterialReturnVo"/>
|
||||
<where>
|
||||
<if test="returnNo != null and returnNo != ''">AND return_no LIKE CONCAT('%', #{returnNo}, '%')</if>
|
||||
<if test="materialId != null">AND material_id = #{materialId}</if>
|
||||
<if test="supplierId != null">AND supplier_id = #{supplierId}</if>
|
||||
<if test="status != null and status != ''">AND status = #{status}</if>
|
||||
</where>
|
||||
ORDER BY create_time DESC
|
||||
</select>
|
||||
|
||||
<select id="selectMaterialReturnById" parameterType="Long" resultMap="MaterialReturnResult">
|
||||
<include refid="selectMaterialReturnVo"/>
|
||||
WHERE return_id = #{returnId}
|
||||
</select>
|
||||
|
||||
<insert id="insertMaterialReturn" parameterType="MaterialReturn" useGeneratedKeys="true" keyProperty="returnId">
|
||||
INSERT INTO engineering_material_return (
|
||||
return_no, material_id, quantity, return_date, supplier_id,
|
||||
return_reason, status, remark, create_by, create_time, update_by, update_time
|
||||
) VALUES (
|
||||
#{returnNo}, #{materialId}, #{quantity}, #{returnDate}, #{supplierId},
|
||||
#{returnReason}, #{status}, #{remark}, #{createBy}, #{createTime}, #{updateBy}, #{updateTime}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="updateMaterialReturn" parameterType="MaterialReturn">
|
||||
UPDATE engineering_material_return
|
||||
SET return_no = #{returnNo},
|
||||
material_id = #{materialId},
|
||||
quantity = #{quantity},
|
||||
return_date = #{returnDate},
|
||||
supplier_id = #{supplierId},
|
||||
return_reason = #{returnReason},
|
||||
status = #{status},
|
||||
remark = #{remark},
|
||||
update_by = #{updateBy},
|
||||
update_time = #{updateTime}
|
||||
WHERE return_id = #{returnId}
|
||||
</update>
|
||||
|
||||
<update id="updateMaterialReturnStatus">
|
||||
UPDATE engineering_material_return
|
||||
SET status = #{status}
|
||||
WHERE return_id = #{returnId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteMaterialReturnById" parameterType="Long">
|
||||
DELETE FROM engineering_material_return WHERE return_id = #{returnId}
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -0,0 +1,79 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.system.mapper.engineering.MaterialScrapMapper">
|
||||
|
||||
<resultMap type="MaterialScrap" id="MaterialScrapResult">
|
||||
<id property="scrapId" column="scrap_id" />
|
||||
<result property="scrapNo" column="scrap_no" />
|
||||
<result property="materialId" column="material_id" />
|
||||
<result property="quantity" column="quantity" />
|
||||
<result property="scrapDate" column="scrap_date" />
|
||||
<result property="scrapType" column="scrap_type" />
|
||||
<result property="reason" column="reason" />
|
||||
<result property="handleResult" column="handle_result" />
|
||||
<result property="status" column="status" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectMaterialScrapVo">
|
||||
SELECT scrap_id, scrap_no, material_id, quantity, scrap_date, scrap_type,
|
||||
reason, handle_result, status, remark, create_by, create_time, update_by, update_time
|
||||
FROM engineering_material_scrap
|
||||
</sql>
|
||||
|
||||
<select id="selectMaterialScrapList" parameterType="MaterialScrap" resultMap="MaterialScrapResult">
|
||||
<include refid="selectMaterialScrapVo"/>
|
||||
<where>
|
||||
<if test="scrapNo != null and scrapNo != ''">AND scrap_no LIKE CONCAT('%', #{scrapNo}, '%')</if>
|
||||
<if test="materialId != null">AND material_id = #{materialId}</if>
|
||||
<if test="scrapType != null and scrapType != ''">AND scrap_type = #{scrapType}</if>
|
||||
<if test="status != null and status != ''">AND status = #{status}</if>
|
||||
</where>
|
||||
ORDER BY create_time DESC
|
||||
</select>
|
||||
|
||||
<select id="selectMaterialScrapById" parameterType="Long" resultMap="MaterialScrapResult">
|
||||
<include refid="selectMaterialScrapVo"/>
|
||||
WHERE scrap_id = #{scrapId}
|
||||
</select>
|
||||
|
||||
<insert id="insertMaterialScrap" parameterType="MaterialScrap" useGeneratedKeys="true" keyProperty="scrapId">
|
||||
INSERT INTO engineering_material_scrap (
|
||||
scrap_no, material_id, quantity, scrap_date, scrap_type,
|
||||
reason, handle_result, status, remark, create_by, create_time, update_by, update_time
|
||||
) VALUES (
|
||||
#{scrapNo}, #{materialId}, #{quantity}, #{scrapDate}, #{scrapType},
|
||||
#{reason}, #{handleResult}, #{status}, #{remark}, #{createBy}, #{createTime}, #{updateBy}, #{updateTime}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="updateMaterialScrap" parameterType="MaterialScrap">
|
||||
UPDATE engineering_material_scrap
|
||||
SET scrap_no = #{scrapNo},
|
||||
material_id = #{materialId},
|
||||
quantity = #{quantity},
|
||||
scrap_date = #{scrapDate},
|
||||
scrap_type = #{scrapType},
|
||||
reason = #{reason},
|
||||
handle_result = #{handleResult},
|
||||
status = #{status},
|
||||
remark = #{remark},
|
||||
update_by = #{updateBy},
|
||||
update_time = #{updateTime}
|
||||
WHERE scrap_id = #{scrapId}
|
||||
</update>
|
||||
|
||||
<update id="updateMaterialScrapStatus">
|
||||
UPDATE engineering_material_scrap
|
||||
SET status = #{status}
|
||||
WHERE scrap_id = #{scrapId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteMaterialScrapById" parameterType="Long">
|
||||
DELETE FROM engineering_material_scrap WHERE scrap_id = #{scrapId}
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -0,0 +1,79 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.system.mapper.engineering.MaterialTransferMapper">
|
||||
|
||||
<resultMap type="MaterialTransfer" id="MaterialTransferResult">
|
||||
<id property="transferId" column="transfer_id" />
|
||||
<result property="transferNo" column="transfer_no" />
|
||||
<result property="materialId" column="material_id" />
|
||||
<result property="quantity" column="quantity" />
|
||||
<result property="transferDate" column="transfer_date" />
|
||||
<result property="fromProject" column="from_project" />
|
||||
<result property="toProject" column="to_project" />
|
||||
<result property="transferType" column="transfer_type" />
|
||||
<result property="status" column="status" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectMaterialTransferVo">
|
||||
SELECT transfer_id, transfer_no, material_id, quantity, transfer_date, from_project,
|
||||
to_project, transfer_type, status, remark, create_by, create_time, update_by, update_time
|
||||
FROM engineering_material_transfer
|
||||
</sql>
|
||||
|
||||
<select id="selectMaterialTransferList" parameterType="MaterialTransfer" resultMap="MaterialTransferResult">
|
||||
<include refid="selectMaterialTransferVo"/>
|
||||
<where>
|
||||
<if test="transferNo != null and transferNo != ''">AND transfer_no LIKE CONCAT('%', #{transferNo}, '%')</if>
|
||||
<if test="materialId != null">AND material_id = #{materialId}</if>
|
||||
<if test="transferType != null and transferType != ''">AND transfer_type = #{transferType}</if>
|
||||
<if test="status != null and status != ''">AND status = #{status}</if>
|
||||
</where>
|
||||
ORDER BY create_time DESC
|
||||
</select>
|
||||
|
||||
<select id="selectMaterialTransferById" parameterType="Long" resultMap="MaterialTransferResult">
|
||||
<include refid="selectMaterialTransferVo"/>
|
||||
WHERE transfer_id = #{transferId}
|
||||
</select>
|
||||
|
||||
<insert id="insertMaterialTransfer" parameterType="MaterialTransfer" useGeneratedKeys="true" keyProperty="transferId">
|
||||
INSERT INTO engineering_material_transfer (
|
||||
transfer_no, material_id, quantity, transfer_date, from_project,
|
||||
to_project, transfer_type, status, remark, create_by, create_time, update_by, update_time
|
||||
) VALUES (
|
||||
#{transferNo}, #{materialId}, #{quantity}, #{transferDate}, #{fromProject},
|
||||
#{toProject}, #{transferType}, #{status}, #{remark}, #{createBy}, #{createTime}, #{updateBy}, #{updateTime}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="updateMaterialTransfer" parameterType="MaterialTransfer">
|
||||
UPDATE engineering_material_transfer
|
||||
SET transfer_no = #{transferNo},
|
||||
material_id = #{materialId},
|
||||
quantity = #{quantity},
|
||||
transfer_date = #{transferDate},
|
||||
from_project = #{fromProject},
|
||||
to_project = #{toProject},
|
||||
transfer_type = #{transferType},
|
||||
status = #{status},
|
||||
remark = #{remark},
|
||||
update_by = #{updateBy},
|
||||
update_time = #{updateTime}
|
||||
WHERE transfer_id = #{transferId}
|
||||
</update>
|
||||
|
||||
<update id="updateMaterialTransferStatus">
|
||||
UPDATE engineering_material_transfer
|
||||
SET status = #{status}
|
||||
WHERE transfer_id = #{transferId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteMaterialTransferById" parameterType="Long">
|
||||
DELETE FROM engineering_material_transfer WHERE transfer_id = #{transferId}
|
||||
</delete>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user