From 8cc74feaba4856f96620e92af477df8b78adaaa0 Mon Sep 17 00:00:00 2001 From: dy <dingyang@lnfxkj.tech> Date: 星期五, 18 四月 2025 14:25:14 +0800 Subject: [PATCH] 工厂管理,车间管理后台功能提交 --- aps-modules/aps-core/src/main/java/com/aps/core/controller/basicData/ApsPlantController.java | 11 aps-modules/aps-core/src/main/java/com/aps/core/controller/basicData/ApsMaterialStorageManagementController.java | 105 ++++ aps-modules/aps-core/src/main/java/com/aps/core/mapper/ApsMaterialStorageManagementMapper.java | 63 ++ aps-modules/aps-core/src/main/java/com/aps/core/mapper/ApsMaterialManagementMapper.java | 63 ++ aps-modules/aps-core/src/main/java/com/aps/core/service/impl/ApsMaterialManagementServiceImpl.java | 96 ++++ aps-modules/aps-core/src/main/resources/mapper/core/ApsShopMapper.xml | 4 aps-modules/aps-core/src/main/resources/mapper/core/ApsMaterialManagementMapper.xml | 130 +++++ aps-modules/aps-core/src/main/java/com/aps/core/controller/basicData/ApsMaterialManagementController.java | 105 ++++ aps-modules/aps-core/src/main/java/com/aps/core/domain/ApsMaterialManagement.java | 271 ++++++++++++ aps-modules/aps-core/src/main/java/com/aps/core/service/IApsMaterialManagementService.java | 61 ++ aps-modules/aps-core/src/main/resources/mapper/core/ApsPlantMapper.xml | 4 aps-modules/aps-core/src/main/java/com/aps/core/domain/ApsMaterialStorageManagement.java | 119 +++++ aps-modules/aps-core/src/main/java/com/aps/core/controller/basicData/ApsShopController.java | 11 aps-modules/aps-core/src/main/resources/mapper/core/ApsMaterialStorageManagementMapper.xml | 90 ++++ aps-modules/aps-core/src/main/java/com/aps/core/service/impl/ApsMaterialStorageManagementServiceImpl.java | 96 ++++ aps-modules/aps-core/src/main/java/com/aps/core/service/IApsMaterialStorageManagementService.java | 61 ++ 16 files changed, 1,286 insertions(+), 4 deletions(-) diff --git a/aps-modules/aps-core/src/main/java/com/aps/core/controller/basicData/ApsMaterialManagementController.java b/aps-modules/aps-core/src/main/java/com/aps/core/controller/basicData/ApsMaterialManagementController.java new file mode 100644 index 0000000..8ceb00e --- /dev/null +++ b/aps-modules/aps-core/src/main/java/com/aps/core/controller/basicData/ApsMaterialManagementController.java @@ -0,0 +1,105 @@ +package com.aps.core.controller.basicData; + +import java.util.List; + +import jakarta.servlet.http.HttpServletResponse; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import com.aps.common.log.annotation.Log; +import com.aps.common.log.enums.BusinessType; +import com.aps.common.security.annotation.RequiresPermissions; +import com.aps.core.domain.ApsMaterialManagement; +import com.aps.core.service.IApsMaterialManagementService; +import com.aps.common.core.web.controller.BaseController; +import com.aps.common.core.web.domain.AjaxResult; +import com.aps.common.core.utils.poi.ExcelUtil; +import com.aps.common.core.web.page.TableDataInfo; + +/** + * 鐗╂枡绠$悊Controller + * + * @author dingYang + * @date 2025-04-17 + */ +@RestController +@RequestMapping("/materialManagement") +public class ApsMaterialManagementController extends BaseController +{ + @Autowired + private IApsMaterialManagementService apsMaterialManagementService; + + /** + * 鏌ヨ鐗╂枡绠$悊鍒楄〃 + */ + @RequiresPermissions("materialManagement:materialManagement:list") + @GetMapping("/list") + public TableDataInfo list(ApsMaterialManagement apsMaterialManagement) + { +// startPage(); + List<ApsMaterialManagement> list = apsMaterialManagementService.selectApsMaterialManagementList(apsMaterialManagement); + return getDataTable(list); + } + + /** + * 瀵煎嚭鐗╂枡绠$悊鍒楄〃 + */ + @RequiresPermissions("materialManagement:materialManagement:export") + @Log(title = "鐗╂枡绠$悊", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, ApsMaterialManagement apsMaterialManagement) + { + List<ApsMaterialManagement> list = apsMaterialManagementService.selectApsMaterialManagementList(apsMaterialManagement); + ExcelUtil<ApsMaterialManagement> util = new ExcelUtil<ApsMaterialManagement>(ApsMaterialManagement.class); + util.exportExcel(response, list, "鐗╂枡绠$悊鏁版嵁"); + } + + /** + * 鑾峰彇鐗╂枡绠$悊璇︾粏淇℃伅 + */ + @RequiresPermissions("materialManagement:materialManagement:query") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") String id) + { + return success(apsMaterialManagementService.selectApsMaterialManagementById(id)); + } + + /** + * 鏂板鐗╂枡绠$悊 + */ + @RequiresPermissions("materialManagement:materialManagement:add") + @Log(title = "鐗╂枡绠$悊", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody ApsMaterialManagement apsMaterialManagement) + { + return toAjax(apsMaterialManagementService.insertApsMaterialManagement(apsMaterialManagement)); + } + + /** + * 淇敼鐗╂枡绠$悊 + */ + @RequiresPermissions("materialManagement:materialManagement:edit") + @Log(title = "鐗╂枡绠$悊", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody ApsMaterialManagement apsMaterialManagement) + { + return toAjax(apsMaterialManagementService.updateApsMaterialManagement(apsMaterialManagement)); + } + + /** + * 鍒犻櫎鐗╂枡绠$悊 + */ + @RequiresPermissions("materialManagement:materialManagement:remove") + @Log(title = "鐗╂枡绠$悊", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable String[] ids) + { + return toAjax(apsMaterialManagementService.deleteApsMaterialManagementByIds(ids)); + } +} diff --git a/aps-modules/aps-core/src/main/java/com/aps/core/controller/basicData/ApsMaterialStorageManagementController.java b/aps-modules/aps-core/src/main/java/com/aps/core/controller/basicData/ApsMaterialStorageManagementController.java new file mode 100644 index 0000000..f7bd132 --- /dev/null +++ b/aps-modules/aps-core/src/main/java/com/aps/core/controller/basicData/ApsMaterialStorageManagementController.java @@ -0,0 +1,105 @@ +package com.aps.core.controller.basicData; + +import java.util.List; + +import com.aps.core.service.IApsMaterialStorageManagementService; +import jakarta.servlet.http.HttpServletResponse; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import com.aps.common.log.annotation.Log; +import com.aps.common.log.enums.BusinessType; +import com.aps.common.security.annotation.RequiresPermissions; +import com.aps.core.domain.ApsMaterialStorageManagement; +import com.aps.common.core.web.controller.BaseController; +import com.aps.common.core.web.domain.AjaxResult; +import com.aps.common.core.utils.poi.ExcelUtil; +import com.aps.common.core.web.page.TableDataInfo; + +/** + * 鐗╂枡搴撳瓨绠$悊Controller + * + * @author dingYang + * @date 2025-04-17 + */ +@RestController +@RequestMapping("/materialStorageManagement") +public class ApsMaterialStorageManagementController extends BaseController +{ + @Autowired + private IApsMaterialStorageManagementService apsMaterialStorageManagementService; + + /** + * 鏌ヨ鐗╂枡搴撳瓨绠$悊鍒楄〃 + */ + @RequiresPermissions("materialStorageManagement:materialStorageManagement:list") + @GetMapping("/list") + public TableDataInfo list(ApsMaterialStorageManagement apsMaterialStorageManagement) + { + startPage(); + List<ApsMaterialStorageManagement> list = apsMaterialStorageManagementService.selectApsMaterialStorageManagementList(apsMaterialStorageManagement); + return getDataTable(list); + } + + /** + * 瀵煎嚭鐗╂枡搴撳瓨绠$悊鍒楄〃 + */ + @RequiresPermissions("materialStorageManagement:materialStorageManagement:export") + @Log(title = "鐗╂枡搴撳瓨绠$悊", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, ApsMaterialStorageManagement apsMaterialStorageManagement) + { + List<ApsMaterialStorageManagement> list = apsMaterialStorageManagementService.selectApsMaterialStorageManagementList(apsMaterialStorageManagement); + ExcelUtil<ApsMaterialStorageManagement> util = new ExcelUtil<ApsMaterialStorageManagement>(ApsMaterialStorageManagement.class); + util.exportExcel(response, list, "鐗╂枡搴撳瓨绠$悊鏁版嵁"); + } + + /** + * 鑾峰彇鐗╂枡搴撳瓨绠$悊璇︾粏淇℃伅 + */ + @RequiresPermissions("materialStorageManagement:materialStorageManagement:query") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") String id) + { + return success(apsMaterialStorageManagementService.selectApsMaterialStorageManagementById(id)); + } + + /** + * 鏂板鐗╂枡搴撳瓨绠$悊 + */ + @RequiresPermissions("materialStorageManagement:materialStorageManagement:add") + @Log(title = "鐗╂枡搴撳瓨绠$悊", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody ApsMaterialStorageManagement apsMaterialStorageManagement) + { + return toAjax(apsMaterialStorageManagementService.insertApsMaterialStorageManagement(apsMaterialStorageManagement)); + } + + /** + * 淇敼鐗╂枡搴撳瓨绠$悊 + */ + @RequiresPermissions("materialStorageManagement:materialStorageManagement:edit") + @Log(title = "鐗╂枡搴撳瓨绠$悊", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody ApsMaterialStorageManagement apsMaterialStorageManagement) + { + return toAjax(apsMaterialStorageManagementService.updateApsMaterialStorageManagement(apsMaterialStorageManagement)); + } + + /** + * 鍒犻櫎鐗╂枡搴撳瓨绠$悊 + */ + @RequiresPermissions("materialStorageManagement:materialStorageManagement:remove") + @Log(title = "鐗╂枡搴撳瓨绠$悊", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable String[] ids) + { + return toAjax(apsMaterialStorageManagementService.deleteApsMaterialStorageManagementByIds(ids)); + } +} diff --git a/aps-modules/aps-core/src/main/java/com/aps/core/controller/basicData/ApsPlantController.java b/aps-modules/aps-core/src/main/java/com/aps/core/controller/basicData/ApsPlantController.java index 736f1b5..e3c2453 100644 --- a/aps-modules/aps-core/src/main/java/com/aps/core/controller/basicData/ApsPlantController.java +++ b/aps-modules/aps-core/src/main/java/com/aps/core/controller/basicData/ApsPlantController.java @@ -95,4 +95,15 @@ { return toAjax(apsPlantService.deleteApsPlantByIds(ids)); } + + /** + * 鏌ヨ宸ュ巶绠$悊鍒楄〃 + */ +// @RequiresPermissions("plant:list") + @GetMapping("/listAll") + public AjaxResult listAll(ApsPlant apsPlant) + { + List<ApsPlant> list = apsPlantService.selectApsPlantList(apsPlant); + return AjaxResult.success(list); + } } diff --git a/aps-modules/aps-core/src/main/java/com/aps/core/controller/basicData/ApsShopController.java b/aps-modules/aps-core/src/main/java/com/aps/core/controller/basicData/ApsShopController.java index 48f08bf..e7f7f87 100644 --- a/aps-modules/aps-core/src/main/java/com/aps/core/controller/basicData/ApsShopController.java +++ b/aps-modules/aps-core/src/main/java/com/aps/core/controller/basicData/ApsShopController.java @@ -95,4 +95,15 @@ { return toAjax(apsShopService.deleteApsShopByIds(ids)); } + + /** + * 鏌ヨ杞﹂棿鍒楄〃 + */ +// @RequiresPermissions("shop:list") + @GetMapping("/listAll") + public AjaxResult listAll(ApsShop apsShop) + { + List<ApsShop> list = apsShopService.selectApsShopList(apsShop); + return AjaxResult.success(list); + } } diff --git a/aps-modules/aps-core/src/main/java/com/aps/core/domain/ApsMaterialManagement.java b/aps-modules/aps-core/src/main/java/com/aps/core/domain/ApsMaterialManagement.java new file mode 100644 index 0000000..8edb675 --- /dev/null +++ b/aps-modules/aps-core/src/main/java/com/aps/core/domain/ApsMaterialManagement.java @@ -0,0 +1,271 @@ +package com.aps.core.domain; + +import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.aps.common.core.annotation.Excel; +import com.aps.common.core.web.domain.BaseEntity; + +/** + * 鐗╂枡绠$悊瀵硅薄 aps_material_management + * + * @author dingYang + * @date 2025-04-17 + */ +public class ApsMaterialManagement extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** id */ + private String id; + + /** 鏂欏彿 */ + @Excel(name = "鏂欏彿") + private String itemNumber; + + /** 鐗╂枡鎻忚堪 */ + @Excel(name = "鐗╂枡鎻忚堪") + private String materialDescription; + + /** 鐗╂枡鐘舵�� */ + @Excel(name = "鐗╂枡鐘舵��") + private String materialStatus; + + /** 鐗╂枡绫诲瀷 */ + @Excel(name = "鐗╂枡绫诲瀷") + private String materialType; + + /** 涓撲笟褰掑睘 */ + @Excel(name = "涓撲笟褰掑睘") + private String professionalAffiliation; + + /** 鍥惧彿 */ + @Excel(name = "鍥惧彿") + private String drawingNo; + + /** 鐗堟湰 */ + @Excel(name = "鐗堟湰") + private String versionNumber; + + /** 鏈�鏃╁彲鎻愬墠鐢熶骇澶╂暟 */ + @Excel(name = "鏈�鏃╁彲鎻愬墠鐢熶骇澶╂暟") + private String advanceProductionDays; + + /** 鎷嗗垎鎵归噺 */ + @Excel(name = "鎷嗗垎鎵归噺") + private Long splitBatch; + + /** 鏄惁鑷埗 */ + @Excel(name = "鏄惁鑷埗") + private String selfMade; + + /** 閫傜敤宸ュ巶 */ + @Excel(name = "閫傜敤宸ュ巶") + private String applicableFactories; + + /** 閫傜敤杞﹂棿 */ + @Excel(name = "閫傜敤杞﹂棿") + private String applicableWorkshop; + + /** 鐢熸晥鏃ユ湡 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "鐢熸晥鏃ユ湡", width = 30, dateFormat = "yyyy-MM-dd") + private Date effectiveDate; + + /** 澶辨晥鏃ユ湡 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "澶辨晥鏃ユ湡", width = 30, dateFormat = "yyyy-MM-dd") + private Date expiringDate; + + /** 闆嗘垚鏃ユ湡 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "闆嗘垚鏃ユ湡", width = 30, dateFormat = "yyyy-MM-dd") + private Date integrationDate; + + public void setId(String id) + { + this.id = id; + } + + public String getId() + { + return id; + } + + public void setItemNumber(String itemNumber) + { + this.itemNumber = itemNumber; + } + + public String getItemNumber() + { + return itemNumber; + } + + public void setMaterialDescription(String materialDescription) + { + this.materialDescription = materialDescription; + } + + public String getMaterialDescription() + { + return materialDescription; + } + + public void setMaterialStatus(String materialStatus) + { + this.materialStatus = materialStatus; + } + + public String getMaterialStatus() + { + return materialStatus; + } + + public void setMaterialType(String materialType) + { + this.materialType = materialType; + } + + public String getMaterialType() + { + return materialType; + } + + public void setProfessionalAffiliation(String professionalAffiliation) + { + this.professionalAffiliation = professionalAffiliation; + } + + public String getProfessionalAffiliation() + { + return professionalAffiliation; + } + + public void setDrawingNo(String drawingNo) + { + this.drawingNo = drawingNo; + } + + public String getDrawingNo() + { + return drawingNo; + } + + public void setVersionNumber(String versionNumber) + { + this.versionNumber = versionNumber; + } + + public String getVersionNumber() + { + return versionNumber; + } + + public void setAdvanceProductionDays(String advanceProductionDays) + { + this.advanceProductionDays = advanceProductionDays; + } + + public String getAdvanceProductionDays() + { + return advanceProductionDays; + } + + public void setSplitBatch(Long splitBatch) + { + this.splitBatch = splitBatch; + } + + public Long getSplitBatch() + { + return splitBatch; + } + + public void setSelfMade(String selfMade) + { + this.selfMade = selfMade; + } + + public String getSelfMade() + { + return selfMade; + } + + public void setApplicableFactories(String applicableFactories) + { + this.applicableFactories = applicableFactories; + } + + public String getApplicableFactories() + { + return applicableFactories; + } + + public void setApplicableWorkshop(String applicableWorkshop) + { + this.applicableWorkshop = applicableWorkshop; + } + + public String getApplicableWorkshop() + { + return applicableWorkshop; + } + + public void setEffectiveDate(Date effectiveDate) + { + this.effectiveDate = effectiveDate; + } + + public Date getEffectiveDate() + { + return effectiveDate; + } + + public void setExpiringDate(Date expiringDate) + { + this.expiringDate = expiringDate; + } + + public Date getExpiringDate() + { + return expiringDate; + } + + public void setIntegrationDate(Date integrationDate) + { + this.integrationDate = integrationDate; + } + + public Date getIntegrationDate() + { + return integrationDate; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("itemNumber", getItemNumber()) + .append("materialDescription", getMaterialDescription()) + .append("materialStatus", getMaterialStatus()) + .append("materialType", getMaterialType()) + .append("professionalAffiliation", getProfessionalAffiliation()) + .append("drawingNo", getDrawingNo()) + .append("versionNumber", getVersionNumber()) + .append("advanceProductionDays", getAdvanceProductionDays()) + .append("splitBatch", getSplitBatch()) + .append("selfMade", getSelfMade()) + .append("applicableFactories", getApplicableFactories()) + .append("applicableWorkshop", getApplicableWorkshop()) + .append("effectiveDate", getEffectiveDate()) + .append("expiringDate", getExpiringDate()) + .append("integrationDate", getIntegrationDate()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .toString(); + } +} diff --git a/aps-modules/aps-core/src/main/java/com/aps/core/domain/ApsMaterialStorageManagement.java b/aps-modules/aps-core/src/main/java/com/aps/core/domain/ApsMaterialStorageManagement.java new file mode 100644 index 0000000..5f2693d --- /dev/null +++ b/aps-modules/aps-core/src/main/java/com/aps/core/domain/ApsMaterialStorageManagement.java @@ -0,0 +1,119 @@ +package com.aps.core.domain; + +import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.aps.common.core.annotation.Excel; +import com.aps.common.core.web.domain.BaseEntity; + +/** + * 鐗╂枡搴撳瓨绠$悊瀵硅薄 aps_material_storage_management + * + * @author dingYang + * @date 2025-04-17 + */ +public class ApsMaterialStorageManagement extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** id */ + private String id; + + /** 鏂欏彿 */ + @Excel(name = "鏂欏彿") + private String itemNumber; + + /** 鏁伴噺 */ + @Excel(name = "鏁伴噺") + private Long num; + + /** 閫傜敤宸ュ巶 */ + @Excel(name = "閫傜敤宸ュ巶") + private String applicableFactories; + + /** 闆嗘垚鏃ユ湡 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "闆嗘垚鏃ユ湡", width = 30, dateFormat = "yyyy-MM-dd") + private Date integrationDate; + + /** 鍒锋柊鏃ユ湡 */ + @Excel(name = "鍒锋柊鏃ユ湡") + private String refreshDate; + + public void setId(String id) + { + this.id = id; + } + + public String getId() + { + return id; + } + + public void setItemNumber(String itemNumber) + { + this.itemNumber = itemNumber; + } + + public String getItemNumber() + { + return itemNumber; + } + + public void setNum(Long num) + { + this.num = num; + } + + public Long getNum() + { + return num; + } + + public void setApplicableFactories(String applicableFactories) + { + this.applicableFactories = applicableFactories; + } + + public String getApplicableFactories() + { + return applicableFactories; + } + + public void setIntegrationDate(Date integrationDate) + { + this.integrationDate = integrationDate; + } + + public Date getIntegrationDate() + { + return integrationDate; + } + + public void setRefreshDate(String refreshDate) + { + this.refreshDate = refreshDate; + } + + public String getRefreshDate() + { + return refreshDate; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("itemNumber", getItemNumber()) + .append("num", getNum()) + .append("applicableFactories", getApplicableFactories()) + .append("integrationDate", getIntegrationDate()) + .append("refreshDate", getRefreshDate()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .toString(); + } +} diff --git a/aps-modules/aps-core/src/main/java/com/aps/core/mapper/ApsMaterialManagementMapper.java b/aps-modules/aps-core/src/main/java/com/aps/core/mapper/ApsMaterialManagementMapper.java new file mode 100644 index 0000000..d649f7a --- /dev/null +++ b/aps-modules/aps-core/src/main/java/com/aps/core/mapper/ApsMaterialManagementMapper.java @@ -0,0 +1,63 @@ +package com.aps.core.mapper; + +import java.util.List; +import com.aps.core.domain.ApsMaterialManagement; +import org.apache.ibatis.annotations.Mapper; + +/** + * 鐗╂枡绠$悊Mapper鎺ュ彛 + * + * @author dingYang + * @date 2025-04-17 + */ +@Mapper +public interface ApsMaterialManagementMapper +{ + /** + * 鏌ヨ鐗╂枡绠$悊 + * + * @param id 鐗╂枡绠$悊涓婚敭 + * @return 鐗╂枡绠$悊 + */ + public ApsMaterialManagement selectApsMaterialManagementById(String id); + + /** + * 鏌ヨ鐗╂枡绠$悊鍒楄〃 + * + * @param apsMaterialManagement 鐗╂枡绠$悊 + * @return 鐗╂枡绠$悊闆嗗悎 + */ + public List<ApsMaterialManagement> selectApsMaterialManagementList(ApsMaterialManagement apsMaterialManagement); + + /** + * 鏂板鐗╂枡绠$悊 + * + * @param apsMaterialManagement 鐗╂枡绠$悊 + * @return 缁撴灉 + */ + public int insertApsMaterialManagement(ApsMaterialManagement apsMaterialManagement); + + /** + * 淇敼鐗╂枡绠$悊 + * + * @param apsMaterialManagement 鐗╂枡绠$悊 + * @return 缁撴灉 + */ + public int updateApsMaterialManagement(ApsMaterialManagement apsMaterialManagement); + + /** + * 鍒犻櫎鐗╂枡绠$悊 + * + * @param id 鐗╂枡绠$悊涓婚敭 + * @return 缁撴灉 + */ + public int deleteApsMaterialManagementById(String id); + + /** + * 鎵归噺鍒犻櫎鐗╂枡绠$悊 + * + * @param ids 闇�瑕佸垹闄ょ殑鏁版嵁涓婚敭闆嗗悎 + * @return 缁撴灉 + */ + public int deleteApsMaterialManagementByIds(String[] ids); +} diff --git a/aps-modules/aps-core/src/main/java/com/aps/core/mapper/ApsMaterialStorageManagementMapper.java b/aps-modules/aps-core/src/main/java/com/aps/core/mapper/ApsMaterialStorageManagementMapper.java new file mode 100644 index 0000000..befee88 --- /dev/null +++ b/aps-modules/aps-core/src/main/java/com/aps/core/mapper/ApsMaterialStorageManagementMapper.java @@ -0,0 +1,63 @@ +package com.aps.core.mapper; + +import java.util.List; +import com.aps.core.domain.ApsMaterialStorageManagement; +import org.apache.ibatis.annotations.Mapper; + +/** + * 鐗╂枡搴撳瓨绠$悊Mapper鎺ュ彛 + * + * @author dingYang + * @date 2025-04-17 + */ +@Mapper +public interface ApsMaterialStorageManagementMapper +{ + /** + * 鏌ヨ鐗╂枡搴撳瓨绠$悊 + * + * @param id 鐗╂枡搴撳瓨绠$悊涓婚敭 + * @return 鐗╂枡搴撳瓨绠$悊 + */ + public ApsMaterialStorageManagement selectApsMaterialStorageManagementById(String id); + + /** + * 鏌ヨ鐗╂枡搴撳瓨绠$悊鍒楄〃 + * + * @param apsMaterialStorageManagement 鐗╂枡搴撳瓨绠$悊 + * @return 鐗╂枡搴撳瓨绠$悊闆嗗悎 + */ + public List<ApsMaterialStorageManagement> selectApsMaterialStorageManagementList(ApsMaterialStorageManagement apsMaterialStorageManagement); + + /** + * 鏂板鐗╂枡搴撳瓨绠$悊 + * + * @param apsMaterialStorageManagement 鐗╂枡搴撳瓨绠$悊 + * @return 缁撴灉 + */ + public int insertApsMaterialStorageManagement(ApsMaterialStorageManagement apsMaterialStorageManagement); + + /** + * 淇敼鐗╂枡搴撳瓨绠$悊 + * + * @param apsMaterialStorageManagement 鐗╂枡搴撳瓨绠$悊 + * @return 缁撴灉 + */ + public int updateApsMaterialStorageManagement(ApsMaterialStorageManagement apsMaterialStorageManagement); + + /** + * 鍒犻櫎鐗╂枡搴撳瓨绠$悊 + * + * @param id 鐗╂枡搴撳瓨绠$悊涓婚敭 + * @return 缁撴灉 + */ + public int deleteApsMaterialStorageManagementById(String id); + + /** + * 鎵归噺鍒犻櫎鐗╂枡搴撳瓨绠$悊 + * + * @param ids 闇�瑕佸垹闄ょ殑鏁版嵁涓婚敭闆嗗悎 + * @return 缁撴灉 + */ + public int deleteApsMaterialStorageManagementByIds(String[] ids); +} diff --git a/aps-modules/aps-core/src/main/java/com/aps/core/service/IApsMaterialManagementService.java b/aps-modules/aps-core/src/main/java/com/aps/core/service/IApsMaterialManagementService.java new file mode 100644 index 0000000..608b908 --- /dev/null +++ b/aps-modules/aps-core/src/main/java/com/aps/core/service/IApsMaterialManagementService.java @@ -0,0 +1,61 @@ +package com.aps.core.service; + +import java.util.List; +import com.aps.core.domain.ApsMaterialManagement; + +/** + * 鐗╂枡绠$悊Service鎺ュ彛 + * + * @author dingYang + * @date 2025-04-17 + */ +public interface IApsMaterialManagementService +{ + /** + * 鏌ヨ鐗╂枡绠$悊 + * + * @param id 鐗╂枡绠$悊涓婚敭 + * @return 鐗╂枡绠$悊 + */ + public ApsMaterialManagement selectApsMaterialManagementById(String id); + + /** + * 鏌ヨ鐗╂枡绠$悊鍒楄〃 + * + * @param apsMaterialManagement 鐗╂枡绠$悊 + * @return 鐗╂枡绠$悊闆嗗悎 + */ + public List<ApsMaterialManagement> selectApsMaterialManagementList(ApsMaterialManagement apsMaterialManagement); + + /** + * 鏂板鐗╂枡绠$悊 + * + * @param apsMaterialManagement 鐗╂枡绠$悊 + * @return 缁撴灉 + */ + public int insertApsMaterialManagement(ApsMaterialManagement apsMaterialManagement); + + /** + * 淇敼鐗╂枡绠$悊 + * + * @param apsMaterialManagement 鐗╂枡绠$悊 + * @return 缁撴灉 + */ + public int updateApsMaterialManagement(ApsMaterialManagement apsMaterialManagement); + + /** + * 鎵归噺鍒犻櫎鐗╂枡绠$悊 + * + * @param ids 闇�瑕佸垹闄ょ殑鐗╂枡绠$悊涓婚敭闆嗗悎 + * @return 缁撴灉 + */ + public int deleteApsMaterialManagementByIds(String[] ids); + + /** + * 鍒犻櫎鐗╂枡绠$悊淇℃伅 + * + * @param id 鐗╂枡绠$悊涓婚敭 + * @return 缁撴灉 + */ + public int deleteApsMaterialManagementById(String id); +} diff --git a/aps-modules/aps-core/src/main/java/com/aps/core/service/IApsMaterialStorageManagementService.java b/aps-modules/aps-core/src/main/java/com/aps/core/service/IApsMaterialStorageManagementService.java new file mode 100644 index 0000000..8cb8ed1 --- /dev/null +++ b/aps-modules/aps-core/src/main/java/com/aps/core/service/IApsMaterialStorageManagementService.java @@ -0,0 +1,61 @@ +package com.aps.core.service; + +import java.util.List; +import com.aps.core.domain.ApsMaterialStorageManagement; + +/** + * 鐗╂枡搴撳瓨绠$悊Service鎺ュ彛 + * + * @author dingYang + * @date 2025-04-17 + */ +public interface IApsMaterialStorageManagementService +{ + /** + * 鏌ヨ鐗╂枡搴撳瓨绠$悊 + * + * @param id 鐗╂枡搴撳瓨绠$悊涓婚敭 + * @return 鐗╂枡搴撳瓨绠$悊 + */ + public ApsMaterialStorageManagement selectApsMaterialStorageManagementById(String id); + + /** + * 鏌ヨ鐗╂枡搴撳瓨绠$悊鍒楄〃 + * + * @param apsMaterialStorageManagement 鐗╂枡搴撳瓨绠$悊 + * @return 鐗╂枡搴撳瓨绠$悊闆嗗悎 + */ + public List<ApsMaterialStorageManagement> selectApsMaterialStorageManagementList(ApsMaterialStorageManagement apsMaterialStorageManagement); + + /** + * 鏂板鐗╂枡搴撳瓨绠$悊 + * + * @param apsMaterialStorageManagement 鐗╂枡搴撳瓨绠$悊 + * @return 缁撴灉 + */ + public int insertApsMaterialStorageManagement(ApsMaterialStorageManagement apsMaterialStorageManagement); + + /** + * 淇敼鐗╂枡搴撳瓨绠$悊 + * + * @param apsMaterialStorageManagement 鐗╂枡搴撳瓨绠$悊 + * @return 缁撴灉 + */ + public int updateApsMaterialStorageManagement(ApsMaterialStorageManagement apsMaterialStorageManagement); + + /** + * 鎵归噺鍒犻櫎鐗╂枡搴撳瓨绠$悊 + * + * @param ids 闇�瑕佸垹闄ょ殑鐗╂枡搴撳瓨绠$悊涓婚敭闆嗗悎 + * @return 缁撴灉 + */ + public int deleteApsMaterialStorageManagementByIds(String[] ids); + + /** + * 鍒犻櫎鐗╂枡搴撳瓨绠$悊淇℃伅 + * + * @param id 鐗╂枡搴撳瓨绠$悊涓婚敭 + * @return 缁撴灉 + */ + public int deleteApsMaterialStorageManagementById(String id); +} diff --git a/aps-modules/aps-core/src/main/java/com/aps/core/service/impl/ApsMaterialManagementServiceImpl.java b/aps-modules/aps-core/src/main/java/com/aps/core/service/impl/ApsMaterialManagementServiceImpl.java new file mode 100644 index 0000000..b3c39eb --- /dev/null +++ b/aps-modules/aps-core/src/main/java/com/aps/core/service/impl/ApsMaterialManagementServiceImpl.java @@ -0,0 +1,96 @@ +package com.aps.core.service.impl; + +import java.util.List; +import com.aps.common.core.utils.DateUtils; +import com.aps.core.mapper.ApsMaterialManagementMapper; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.aps.core.domain.ApsMaterialManagement; +import com.aps.core.service.IApsMaterialManagementService; + +/** + * 鐗╂枡绠$悊Service涓氬姟灞傚鐞� + * + * @author dingYang + * @date 2025-04-17 + */ +@Service +public class ApsMaterialManagementServiceImpl implements IApsMaterialManagementService +{ + @Autowired + private ApsMaterialManagementMapper apsMaterialManagementMapper; + + /** + * 鏌ヨ鐗╂枡绠$悊 + * + * @param id 鐗╂枡绠$悊涓婚敭 + * @return 鐗╂枡绠$悊 + */ + @Override + public ApsMaterialManagement selectApsMaterialManagementById(String id) + { + return apsMaterialManagementMapper.selectApsMaterialManagementById(id); + } + + /** + * 鏌ヨ鐗╂枡绠$悊鍒楄〃 + * + * @param apsMaterialManagement 鐗╂枡绠$悊 + * @return 鐗╂枡绠$悊 + */ + @Override + public List<ApsMaterialManagement> selectApsMaterialManagementList(ApsMaterialManagement apsMaterialManagement) + { + return apsMaterialManagementMapper.selectApsMaterialManagementList(apsMaterialManagement); + } + + /** + * 鏂板鐗╂枡绠$悊 + * + * @param apsMaterialManagement 鐗╂枡绠$悊 + * @return 缁撴灉 + */ + @Override + public int insertApsMaterialManagement(ApsMaterialManagement apsMaterialManagement) + { + apsMaterialManagement.setCreateTime(DateUtils.getNowDate()); + return apsMaterialManagementMapper.insertApsMaterialManagement(apsMaterialManagement); + } + + /** + * 淇敼鐗╂枡绠$悊 + * + * @param apsMaterialManagement 鐗╂枡绠$悊 + * @return 缁撴灉 + */ + @Override + public int updateApsMaterialManagement(ApsMaterialManagement apsMaterialManagement) + { + apsMaterialManagement.setUpdateTime(DateUtils.getNowDate()); + return apsMaterialManagementMapper.updateApsMaterialManagement(apsMaterialManagement); + } + + /** + * 鎵归噺鍒犻櫎鐗╂枡绠$悊 + * + * @param ids 闇�瑕佸垹闄ょ殑鐗╂枡绠$悊涓婚敭 + * @return 缁撴灉 + */ + @Override + public int deleteApsMaterialManagementByIds(String[] ids) + { + return apsMaterialManagementMapper.deleteApsMaterialManagementByIds(ids); + } + + /** + * 鍒犻櫎鐗╂枡绠$悊淇℃伅 + * + * @param id 鐗╂枡绠$悊涓婚敭 + * @return 缁撴灉 + */ + @Override + public int deleteApsMaterialManagementById(String id) + { + return apsMaterialManagementMapper.deleteApsMaterialManagementById(id); + } +} diff --git a/aps-modules/aps-core/src/main/java/com/aps/core/service/impl/ApsMaterialStorageManagementServiceImpl.java b/aps-modules/aps-core/src/main/java/com/aps/core/service/impl/ApsMaterialStorageManagementServiceImpl.java new file mode 100644 index 0000000..2cef867 --- /dev/null +++ b/aps-modules/aps-core/src/main/java/com/aps/core/service/impl/ApsMaterialStorageManagementServiceImpl.java @@ -0,0 +1,96 @@ +package com.aps.core.service.impl; + +import java.util.List; +import com.aps.common.core.utils.DateUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.aps.core.mapper.ApsMaterialStorageManagementMapper; +import com.aps.core.domain.ApsMaterialStorageManagement; +import com.aps.core.service.IApsMaterialStorageManagementService; + +/** + * 鐗╂枡搴撳瓨绠$悊Service涓氬姟灞傚鐞� + * + * @author dingYang + * @date 2025-04-17 + */ +@Service +public class ApsMaterialStorageManagementServiceImpl implements IApsMaterialStorageManagementService +{ + @Autowired + private ApsMaterialStorageManagementMapper apsMaterialStorageManagementMapper; + + /** + * 鏌ヨ鐗╂枡搴撳瓨绠$悊 + * + * @param id 鐗╂枡搴撳瓨绠$悊涓婚敭 + * @return 鐗╂枡搴撳瓨绠$悊 + */ + @Override + public ApsMaterialStorageManagement selectApsMaterialStorageManagementById(String id) + { + return apsMaterialStorageManagementMapper.selectApsMaterialStorageManagementById(id); + } + + /** + * 鏌ヨ鐗╂枡搴撳瓨绠$悊鍒楄〃 + * + * @param apsMaterialStorageManagement 鐗╂枡搴撳瓨绠$悊 + * @return 鐗╂枡搴撳瓨绠$悊 + */ + @Override + public List<ApsMaterialStorageManagement> selectApsMaterialStorageManagementList(ApsMaterialStorageManagement apsMaterialStorageManagement) + { + return apsMaterialStorageManagementMapper.selectApsMaterialStorageManagementList(apsMaterialStorageManagement); + } + + /** + * 鏂板鐗╂枡搴撳瓨绠$悊 + * + * @param apsMaterialStorageManagement 鐗╂枡搴撳瓨绠$悊 + * @return 缁撴灉 + */ + @Override + public int insertApsMaterialStorageManagement(ApsMaterialStorageManagement apsMaterialStorageManagement) + { + apsMaterialStorageManagement.setCreateTime(DateUtils.getNowDate()); + return apsMaterialStorageManagementMapper.insertApsMaterialStorageManagement(apsMaterialStorageManagement); + } + + /** + * 淇敼鐗╂枡搴撳瓨绠$悊 + * + * @param apsMaterialStorageManagement 鐗╂枡搴撳瓨绠$悊 + * @return 缁撴灉 + */ + @Override + public int updateApsMaterialStorageManagement(ApsMaterialStorageManagement apsMaterialStorageManagement) + { + apsMaterialStorageManagement.setUpdateTime(DateUtils.getNowDate()); + return apsMaterialStorageManagementMapper.updateApsMaterialStorageManagement(apsMaterialStorageManagement); + } + + /** + * 鎵归噺鍒犻櫎鐗╂枡搴撳瓨绠$悊 + * + * @param ids 闇�瑕佸垹闄ょ殑鐗╂枡搴撳瓨绠$悊涓婚敭 + * @return 缁撴灉 + */ + @Override + public int deleteApsMaterialStorageManagementByIds(String[] ids) + { + return apsMaterialStorageManagementMapper.deleteApsMaterialStorageManagementByIds(ids); + } + + /** + * 鍒犻櫎鐗╂枡搴撳瓨绠$悊淇℃伅 + * + * @param id 鐗╂枡搴撳瓨绠$悊涓婚敭 + * @return 缁撴灉 + */ + @Override + public int deleteApsMaterialStorageManagementById(String id) + { + return apsMaterialStorageManagementMapper.deleteApsMaterialStorageManagementById(id); + } +} diff --git a/aps-modules/aps-core/src/main/resources/mapper/core/ApsMaterialManagementMapper.xml b/aps-modules/aps-core/src/main/resources/mapper/core/ApsMaterialManagementMapper.xml new file mode 100644 index 0000000..6a5ebe5 --- /dev/null +++ b/aps-modules/aps-core/src/main/resources/mapper/core/ApsMaterialManagementMapper.xml @@ -0,0 +1,130 @@ +<?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.aps.core.mapper.ApsMaterialManagementMapper"> + + <resultMap type="ApsMaterialManagement" id="ApsMaterialManagementResult"> + <result property="id" column="id" /> + <result property="itemNumber" column="item_number" /> + <result property="materialDescription" column="material_description" /> + <result property="materialStatus" column="material_status" /> + <result property="materialType" column="material_type" /> + <result property="professionalAffiliation" column="professional_affiliation" /> + <result property="drawingNo" column="drawing_no" /> + <result property="versionNumber" column="version_number" /> + <result property="advanceProductionDays" column="advance_production_days" /> + <result property="splitBatch" column="split_batch" /> + <result property="selfMade" column="self_made" /> + <result property="applicableFactories" column="applicable_factories" /> + <result property="applicableWorkshop" column="applicable_workshop" /> + <result property="effectiveDate" column="effective_date" /> + <result property="expiringDate" column="expiring_date" /> + <result property="integrationDate" column="integration_date" /> + <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="selectApsMaterialManagementVo"> + select id, item_number, material_description, material_status, material_type, professional_affiliation, drawing_no, version_number, advance_production_days, split_batch, self_made, applicable_factories, applicable_workshop, effective_date, expiring_date, integration_date, create_by, create_time, update_by, update_time from aps_material_management + </sql> + + <select id="selectApsMaterialManagementList" parameterType="ApsMaterialManagement" resultMap="ApsMaterialManagementResult"> + <include refid="selectApsMaterialManagementVo"/> + <where> + <if test="itemNumber != null "> and item_number = #{itemNumber}</if> + </where> + </select> + + <select id="selectApsMaterialManagementById" parameterType="String" resultMap="ApsMaterialManagementResult"> + <include refid="selectApsMaterialManagementVo"/> + where id = #{id} + </select> + + <insert id="insertApsMaterialManagement" parameterType="ApsMaterialManagement"> + insert into aps_material_management + <trim prefix="(" suffix=")" suffixOverrides=","> + <if test="id != null">id,</if> + <if test="itemNumber != null">item_number,</if> + <if test="materialDescription != null">material_description,</if> + <if test="materialStatus != null">material_status,</if> + <if test="materialType != null">material_type,</if> + <if test="professionalAffiliation != null">professional_affiliation,</if> + <if test="drawingNo != null">drawing_no,</if> + <if test="versionNumber != null">version_number,</if> + <if test="advanceProductionDays != null">advance_production_days,</if> + <if test="splitBatch != null">split_batch,</if> + <if test="selfMade != null">self_made,</if> + <if test="applicableFactories != null">applicable_factories,</if> + <if test="applicableWorkshop != null">applicable_workshop,</if> + <if test="effectiveDate != null">effective_date,</if> + <if test="expiringDate != null">expiring_date,</if> + <if test="integrationDate != null">integration_date,</if> + <if test="createBy != null">create_by,</if> + <if test="createTime != null">create_time,</if> + <if test="updateBy != null">update_by,</if> + <if test="updateTime != null">update_time,</if> + </trim> + <trim prefix="values (" suffix=")" suffixOverrides=","> + <if test="id != null">#{id},</if> + <if test="itemNumber != null">#{itemNumber},</if> + <if test="materialDescription != null">#{materialDescription},</if> + <if test="materialStatus != null">#{materialStatus},</if> + <if test="materialType != null">#{materialType},</if> + <if test="professionalAffiliation != null">#{professionalAffiliation},</if> + <if test="drawingNo != null">#{drawingNo},</if> + <if test="versionNumber != null">#{versionNumber},</if> + <if test="advanceProductionDays != null">#{advanceProductionDays},</if> + <if test="splitBatch != null">#{splitBatch},</if> + <if test="selfMade != null">#{selfMade},</if> + <if test="applicableFactories != null">#{applicableFactories},</if> + <if test="applicableWorkshop != null">#{applicableWorkshop},</if> + <if test="effectiveDate != null">#{effectiveDate},</if> + <if test="expiringDate != null">#{expiringDate},</if> + <if test="integrationDate != null">#{integrationDate},</if> + <if test="createBy != null">#{createBy},</if> + <if test="createTime != null">#{createTime},</if> + <if test="updateBy != null">#{updateBy},</if> + <if test="updateTime != null">#{updateTime},</if> + </trim> + </insert> + + <update id="updateApsMaterialManagement" parameterType="ApsMaterialManagement"> + update aps_material_management + <trim prefix="SET" suffixOverrides=","> + <if test="itemNumber != null">item_number = #{itemNumber},</if> + <if test="materialDescription != null">material_description = #{materialDescription},</if> + <if test="materialStatus != null">material_status = #{materialStatus},</if> + <if test="materialType != null">material_type = #{materialType},</if> + <if test="professionalAffiliation != null">professional_affiliation = #{professionalAffiliation},</if> + <if test="drawingNo != null">drawing_no = #{drawingNo},</if> + <if test="versionNumber != null">version_number = #{versionNumber},</if> + <if test="advanceProductionDays != null">advance_production_days = #{advanceProductionDays},</if> + <if test="splitBatch != null">split_batch = #{splitBatch},</if> + <if test="selfMade != null">self_made = #{selfMade},</if> + <if test="applicableFactories != null">applicable_factories = #{applicableFactories},</if> + <if test="applicableWorkshop != null">applicable_workshop = #{applicableWorkshop},</if> + <if test="effectiveDate != null">effective_date = #{effectiveDate},</if> + <if test="expiringDate != null">expiring_date = #{expiringDate},</if> + <if test="integrationDate != null">integration_date = #{integrationDate},</if> + <if test="createBy != null">create_by = #{createBy},</if> + <if test="createTime != null">create_time = #{createTime},</if> + <if test="updateBy != null">update_by = #{updateBy},</if> + <if test="updateTime != null">update_time = #{updateTime},</if> + </trim> + where id = #{id} + </update> + + <delete id="deleteApsMaterialManagementById" parameterType="String"> + delete from aps_material_management where id = #{id} + </delete> + + <delete id="deleteApsMaterialManagementByIds" parameterType="String"> + delete from aps_material_management where id in + <foreach item="id" collection="array" open="(" separator="," close=")"> + #{id} + </foreach> + </delete> +</mapper> \ No newline at end of file diff --git a/aps-modules/aps-core/src/main/resources/mapper/core/ApsMaterialStorageManagementMapper.xml b/aps-modules/aps-core/src/main/resources/mapper/core/ApsMaterialStorageManagementMapper.xml new file mode 100644 index 0000000..02347ca --- /dev/null +++ b/aps-modules/aps-core/src/main/resources/mapper/core/ApsMaterialStorageManagementMapper.xml @@ -0,0 +1,90 @@ +<?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.aps.core.mapper.ApsMaterialStorageManagementMapper"> + + <resultMap type="ApsMaterialStorageManagement" id="ApsMaterialStorageManagementResult"> + <result property="id" column="id" /> + <result property="itemNumber" column="item_number" /> + <result property="num" column="num" /> + <result property="applicableFactories" column="applicable_factories" /> + <result property="integrationDate" column="integration_date" /> + <result property="refreshDate" column="refresh_date" /> + <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="selectApsMaterialStorageManagementVo"> + select id, item_number, num, applicable_factories, integration_date, refresh_date, create_by, create_time, update_by, update_time from aps_material_storage_management + </sql> + + <select id="selectApsMaterialStorageManagementList" parameterType="ApsMaterialStorageManagement" resultMap="ApsMaterialStorageManagementResult"> + <include refid="selectApsMaterialStorageManagementVo"/> + <where> + <if test="itemNumber != null and itemNumber != ''"> and item_number = #{itemNumber}</if> + </where> + </select> + + <select id="selectApsMaterialStorageManagementById" parameterType="String" resultMap="ApsMaterialStorageManagementResult"> + <include refid="selectApsMaterialStorageManagementVo"/> + where id = #{id} + </select> + + <insert id="insertApsMaterialStorageManagement" parameterType="ApsMaterialStorageManagement"> + insert into aps_material_storage_management + <trim prefix="(" suffix=")" suffixOverrides=","> + <if test="id != null">id,</if> + <if test="itemNumber != null">item_number,</if> + <if test="num != null">num,</if> + <if test="applicableFactories != null">applicable_factories,</if> + <if test="integrationDate != null">integration_date,</if> + <if test="refreshDate != null">refresh_date,</if> + <if test="createBy != null">create_by,</if> + <if test="createTime != null">create_time,</if> + <if test="updateBy != null">update_by,</if> + <if test="updateTime != null">update_time,</if> + </trim> + <trim prefix="values (" suffix=")" suffixOverrides=","> + <if test="id != null">#{id},</if> + <if test="itemNumber != null">#{itemNumber},</if> + <if test="num != null">#{num},</if> + <if test="applicableFactories != null">#{applicableFactories},</if> + <if test="integrationDate != null">#{integrationDate},</if> + <if test="refreshDate != null">#{refreshDate},</if> + <if test="createBy != null">#{createBy},</if> + <if test="createTime != null">#{createTime},</if> + <if test="updateBy != null">#{updateBy},</if> + <if test="updateTime != null">#{updateTime},</if> + </trim> + </insert> + + <update id="updateApsMaterialStorageManagement" parameterType="ApsMaterialStorageManagement"> + update aps_material_storage_management + <trim prefix="SET" suffixOverrides=","> + <if test="itemNumber != null">item_number = #{itemNumber},</if> + <if test="num != null">num = #{num},</if> + <if test="applicableFactories != null">applicable_factories = #{applicableFactories},</if> + <if test="integrationDate != null">integration_date = #{integrationDate},</if> + <if test="refreshDate != null">refresh_date = #{refreshDate},</if> + <if test="createBy != null">create_by = #{createBy},</if> + <if test="createTime != null">create_time = #{createTime},</if> + <if test="updateBy != null">update_by = #{updateBy},</if> + <if test="updateTime != null">update_time = #{updateTime},</if> + </trim> + where id = #{id} + </update> + + <delete id="deleteApsMaterialStorageManagementById" parameterType="String"> + delete from aps_material_storage_management where id = #{id} + </delete> + + <delete id="deleteApsMaterialStorageManagementByIds" parameterType="String"> + delete from aps_material_storage_management where id in + <foreach item="id" collection="array" open="(" separator="," close=")"> + #{id} + </foreach> + </delete> +</mapper> \ No newline at end of file diff --git a/aps-modules/aps-core/src/main/resources/mapper/core/ApsPlantMapper.xml b/aps-modules/aps-core/src/main/resources/mapper/core/ApsPlantMapper.xml index 0422ad4..0d24654 100644 --- a/aps-modules/aps-core/src/main/resources/mapper/core/ApsPlantMapper.xml +++ b/aps-modules/aps-core/src/main/resources/mapper/core/ApsPlantMapper.xml @@ -22,8 +22,8 @@ <select id="selectApsPlantList" parameterType="ApsPlant" resultMap="ApsPlantResult"> <include refid="selectApsPlantVo"/> <where> - <if test="plantName != null and plantName != ''"> and plant_name like '%' || #{plantName} || '%'</if> - <if test="plantCode != null and plantCode != ''"> and plant_code like '%' || #{plantCode} || '%'</if> + <if test="plantName != null and plantName != ''"> and plant_name = #{plantName}</if> + <if test="plantCode != null and plantCode != ''"> and plant_code = #{plantCode}</if> <if test="status != null and status != ''"> and status = #{status}</if> </where> </select> diff --git a/aps-modules/aps-core/src/main/resources/mapper/core/ApsShopMapper.xml b/aps-modules/aps-core/src/main/resources/mapper/core/ApsShopMapper.xml index 90ca081..dc82aa4 100644 --- a/aps-modules/aps-core/src/main/resources/mapper/core/ApsShopMapper.xml +++ b/aps-modules/aps-core/src/main/resources/mapper/core/ApsShopMapper.xml @@ -23,8 +23,8 @@ <select id="selectApsShopList" parameterType="ApsShop" resultMap="ApsShopResult"> <include refid="selectApsShopVo"/> <where> - <if test="shopName != null and shopName != ''"> and shop_name like concat('%', #{shopName}, '%')</if> - <if test="shopCode != null and shopCode != ''"> and shop_code like concat('%', #{shopCode}, '%')</if> + <if test="shopName != null and shopName != ''"> and shop_name = #{shopName}</if> + <if test="shopCode != null and shopCode != ''"> and shop_code = #{shopCode}</if> <if test="plantCode != null and plantCode != ''"> and plant_code = #{plantCode}</if> <if test="status != null and status != ''"> and status = #{status}</if> </where> -- Gitblit v1.9.3