diff --git a/ktg-mes/src/main/java/com/ktg/mes/gys/controller/SupplierAssessmentController.java b/ktg-mes/src/main/java/com/ktg/mes/gys/controller/SupplierAssessmentController.java new file mode 100644 index 0000000..ec56f0a --- /dev/null +++ b/ktg-mes/src/main/java/com/ktg/mes/gys/controller/SupplierAssessmentController.java @@ -0,0 +1,98 @@ +package com.ktg.mes.gys.controller; + +import com.ktg.common.annotation.Log; +import com.ktg.common.core.controller.BaseController; +import com.ktg.common.core.domain.AjaxResult; +import com.ktg.common.core.page.TableDataInfo; +import com.ktg.common.enums.BusinessType; +import com.ktg.common.utils.poi.ExcelUtil; +import com.ktg.mes.gys.domain.SupplierAssessment; +import com.ktg.mes.gys.service.ISupplierAssessmentService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; + +/** + * 供应商评估Controller + * + * @author yinjinlu + * @date 2025-02-21 + */ +@RestController +@RequestMapping("/md/assessment") +public class SupplierAssessmentController extends BaseController +{ + @Autowired + private ISupplierAssessmentService supplierAssessmentService; + + /** + * 查询供应商评估列表 + */ + @PreAuthorize("@ss.hasPermi('md:assessment:list')") + @GetMapping("/list") + public TableDataInfo list(SupplierAssessment supplierAssessment) + { + startPage(); + List list = supplierAssessmentService.selectSupplierAssessmentList(supplierAssessment); + return getDataTable(list); + } + + /** + * 导出供应商评估列表 + */ + @PreAuthorize("@ss.hasPermi('md:assessment:export')") + @Log(title = "供应商评估", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, SupplierAssessment supplierAssessment) + { + List list = supplierAssessmentService.selectSupplierAssessmentList(supplierAssessment); + ExcelUtil util = new ExcelUtil(SupplierAssessment.class); + util.exportExcel(response, list, "供应商评估数据"); + } + + /** + * 获取供应商评估详细信息 + */ + @PreAuthorize("@ss.hasPermi('md:assessment:query')") + @GetMapping(value = "/{assessmentId}") + public AjaxResult getInfo(@PathVariable("assessmentId") Long assessmentId) + { + return AjaxResult.success(supplierAssessmentService.selectSupplierAssessmentByAssessmentId(assessmentId)); + } + + /** + * 新增供应商评估 + */ + @PreAuthorize("@ss.hasPermi('md:assessment:add')") + @Log(title = "供应商评估", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody SupplierAssessment supplierAssessment) + { + return toAjax(supplierAssessmentService.insertSupplierAssessment(supplierAssessment)); + } + + /** + * 修改供应商评估 + */ + @PreAuthorize("@ss.hasPermi('md:assessment:edit')") + @Log(title = "供应商评估", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody SupplierAssessment supplierAssessment) + { + return toAjax(supplierAssessmentService.updateSupplierAssessment(supplierAssessment)); + } + + /** + * 删除供应商评估 + */ + @PreAuthorize("@ss.hasPermi('md:assessment:remove')") + @Log(title = "供应商评估", businessType = BusinessType.DELETE) + @DeleteMapping("/{assessmentIds}") + public AjaxResult remove(@PathVariable Long[] assessmentIds) + { + return toAjax(supplierAssessmentService.deleteSupplierAssessmentByAssessmentIds(assessmentIds)); + } +} diff --git a/ktg-mes/src/main/java/com/ktg/mes/gys/controller/SupplierCategoryController.java b/ktg-mes/src/main/java/com/ktg/mes/gys/controller/SupplierCategoryController.java new file mode 100644 index 0000000..f351e6c --- /dev/null +++ b/ktg-mes/src/main/java/com/ktg/mes/gys/controller/SupplierCategoryController.java @@ -0,0 +1,106 @@ +package com.ktg.mes.gys.controller; + +import java.util.List; +import javax.servlet.http.HttpServletResponse; + +import com.ktg.common.utils.poi.ExcelUtil; +import com.ktg.mes.gys.domain.SupplierCategory; +import com.ktg.mes.gys.service.ISupplierCategoryService; +import org.springframework.security.access.prepost.PreAuthorize; +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.ktg.common.annotation.Log; +import com.ktg.common.core.controller.BaseController; +import com.ktg.common.core.domain.AjaxResult; +import com.ktg.common.enums.BusinessType; + +import com.ktg.common.core.page.TableDataInfo; + +/** + * 供应商类别Controller + * + * @author yinjinlu + * @date 2025-02-21 + */ +@RestController +@RequestMapping("/md/category") +public class SupplierCategoryController extends BaseController +{ + @Autowired + private ISupplierCategoryService supplierCategoryService; + + /** + * 查询供应商类别列表 + */ + @PreAuthorize("@ss.hasPermi('md:category:list')") + @GetMapping("/list") + public TableDataInfo list(SupplierCategory supplierCategory) + { + startPage(); + List list = supplierCategoryService.selectSupplierCategoryList(supplierCategory); + return getDataTable(list); + } + + /** + * 导出供应商类别列表 + */ + @PreAuthorize("@ss.hasPermi('md:category:export')") + @Log(title = "供应商类别", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, SupplierCategory supplierCategory) + { + List list = supplierCategoryService.selectSupplierCategoryList(supplierCategory); + ExcelUtil util = new ExcelUtil(SupplierCategory.class); + util.exportExcel(response, list, "供应商类别数据"); + } + + /** + * 获取供应商类别详细信息 + */ + @PreAuthorize("@ss.hasPermi('md:category:query')") + @GetMapping(value = "/{categoryId}") + public AjaxResult getInfo(@PathVariable("categoryId") Long categoryId) + { + return AjaxResult.success(supplierCategoryService.selectSupplierCategoryByCategoryId(categoryId)); + } + + /** + * 新增供应商类别 + */ + @PreAuthorize("@ss.hasPermi('md:category:add')") + @Log(title = "供应商类别", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody SupplierCategory supplierCategory) + { + return toAjax(supplierCategoryService.insertSupplierCategory(supplierCategory)); + } + + /** + * 修改供应商类别 + */ + @PreAuthorize("@ss.hasPermi('md:category:edit')") + @Log(title = "供应商类别", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody SupplierCategory supplierCategory) + { + return toAjax(supplierCategoryService.updateSupplierCategory(supplierCategory)); + } + + /** + * 删除供应商类别 + */ + @PreAuthorize("@ss.hasPermi('md:category:remove')") + @Log(title = "供应商类别", businessType = BusinessType.DELETE) + @DeleteMapping("/{categoryIds}") + public AjaxResult remove(@PathVariable Long[] categoryIds) + { + return toAjax(supplierCategoryService.deleteSupplierCategoryByCategoryIds(categoryIds)); + } +} diff --git a/ktg-mes/src/main/java/com/ktg/mes/gys/controller/SupplierCooperationRecordController.java b/ktg-mes/src/main/java/com/ktg/mes/gys/controller/SupplierCooperationRecordController.java new file mode 100644 index 0000000..cae486b --- /dev/null +++ b/ktg-mes/src/main/java/com/ktg/mes/gys/controller/SupplierCooperationRecordController.java @@ -0,0 +1,98 @@ +package com.ktg.mes.gys.controller; + +import com.ktg.common.annotation.Log; +import com.ktg.common.core.controller.BaseController; +import com.ktg.common.core.domain.AjaxResult; +import com.ktg.common.core.page.TableDataInfo; +import com.ktg.common.enums.BusinessType; +import com.ktg.common.utils.poi.ExcelUtil; +import com.ktg.mes.gys.domain.SupplierCooperationRecord; +import com.ktg.mes.gys.service.ISupplierCooperationRecordService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; + +/** + * 供应商合作记录Controller + * + * @author yinjinlu + * @date 2025-02-21 + */ +@RestController +@RequestMapping("/md/record") +public class SupplierCooperationRecordController extends BaseController +{ + @Autowired + private ISupplierCooperationRecordService supplierCooperationRecordService; + + /** + * 查询供应商合作记录列表 + */ + @PreAuthorize("@ss.hasPermi('md:record:list')") + @GetMapping("/list") + public TableDataInfo list(SupplierCooperationRecord supplierCooperationRecord) + { + startPage(); + List list = supplierCooperationRecordService.selectSupplierCooperationRecordList(supplierCooperationRecord); + return getDataTable(list); + } + + /** + * 导出供应商合作记录列表 + */ + @PreAuthorize("@ss.hasPermi('md:record:export')") + @Log(title = "供应商合作记录", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, SupplierCooperationRecord supplierCooperationRecord) + { + List list = supplierCooperationRecordService.selectSupplierCooperationRecordList(supplierCooperationRecord); + ExcelUtil util = new ExcelUtil(SupplierCooperationRecord.class); + util.exportExcel(response, list, "供应商合作记录数据"); + } + + /** + * 获取供应商合作记录详细信息 + */ + @PreAuthorize("@ss.hasPermi('md:record:query')") + @GetMapping(value = "/{recordId}") + public AjaxResult getInfo(@PathVariable("recordId") Long recordId) + { + return AjaxResult.success(supplierCooperationRecordService.selectSupplierCooperationRecordByRecordId(recordId)); + } + + /** + * 新增供应商合作记录 + */ + @PreAuthorize("@ss.hasPermi('md:record:add')") + @Log(title = "供应商合作记录", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody SupplierCooperationRecord supplierCooperationRecord) + { + return toAjax(supplierCooperationRecordService.insertSupplierCooperationRecord(supplierCooperationRecord)); + } + + /** + * 修改供应商合作记录 + */ + @PreAuthorize("@ss.hasPermi('md:record:edit')") + @Log(title = "供应商合作记录", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody SupplierCooperationRecord supplierCooperationRecord) + { + return toAjax(supplierCooperationRecordService.updateSupplierCooperationRecord(supplierCooperationRecord)); + } + + /** + * 删除供应商合作记录 + */ + @PreAuthorize("@ss.hasPermi('md:record:remove')") + @Log(title = "供应商合作记录", businessType = BusinessType.DELETE) + @DeleteMapping("/{recordIds}") + public AjaxResult remove(@PathVariable Long[] recordIds) + { + return toAjax(supplierCooperationRecordService.deleteSupplierCooperationRecordByRecordIds(recordIds)); + } +} diff --git a/ktg-mes/src/main/java/com/ktg/mes/gys/controller/SupplierQualificationController.java b/ktg-mes/src/main/java/com/ktg/mes/gys/controller/SupplierQualificationController.java new file mode 100644 index 0000000..263a3e4 --- /dev/null +++ b/ktg-mes/src/main/java/com/ktg/mes/gys/controller/SupplierQualificationController.java @@ -0,0 +1,105 @@ +package com.ktg.mes.gys.controller; + +import java.util.List; +import javax.servlet.http.HttpServletResponse; + +import com.ktg.common.utils.poi.ExcelUtil; +import com.ktg.mes.gys.domain.SupplierQualification; +import com.ktg.mes.gys.service.ISupplierQualificationService; +import org.springframework.security.access.prepost.PreAuthorize; +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.ktg.common.annotation.Log; +import com.ktg.common.core.controller.BaseController; +import com.ktg.common.core.domain.AjaxResult; +import com.ktg.common.enums.BusinessType; +import com.ktg.common.core.page.TableDataInfo; + +/** + * 供应商资质Controller + * + * @author yinjinlu + * @date 2025-02-21 + */ +@RestController +@RequestMapping("/md/qualification") +public class SupplierQualificationController extends BaseController +{ + @Autowired + private ISupplierQualificationService supplierQualificationService; + + /** + * 查询供应商资质列表 + */ + @PreAuthorize("@ss.hasPermi('md:qualification:list')") + @GetMapping("/list") + public TableDataInfo list(SupplierQualification supplierQualification) + { + startPage(); + List list = supplierQualificationService.selectSupplierQualificationList(supplierQualification); + return getDataTable(list); + } + + /** + * 导出供应商资质列表 + */ + @PreAuthorize("@ss.hasPermi('md:qualification:export')") + @Log(title = "供应商资质", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, SupplierQualification supplierQualification) + { + List list = supplierQualificationService.selectSupplierQualificationList(supplierQualification); + ExcelUtil util = new ExcelUtil(SupplierQualification.class); + util.exportExcel(response, list, "供应商资质数据"); + } + + /** + * 获取供应商资质详细信息 + */ + @PreAuthorize("@ss.hasPermi('md:qualification:query')") + @GetMapping(value = "/{qualId}") + public AjaxResult getInfo(@PathVariable("qualId") Long qualId) + { + return AjaxResult.success(supplierQualificationService.selectSupplierQualificationByQualId(qualId)); + } + + /** + * 新增供应商资质 + */ + @PreAuthorize("@ss.hasPermi('md:qualification:add')") + @Log(title = "供应商资质", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody SupplierQualification supplierQualification) + { + return toAjax(supplierQualificationService.insertSupplierQualification(supplierQualification)); + } + + /** + * 修改供应商资质 + */ + @PreAuthorize("@ss.hasPermi('md:qualification:edit')") + @Log(title = "供应商资质", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody SupplierQualification supplierQualification) + { + return toAjax(supplierQualificationService.updateSupplierQualification(supplierQualification)); + } + + /** + * 删除供应商资质 + */ + @PreAuthorize("@ss.hasPermi('md:qualification:remove')") + @Log(title = "供应商资质", businessType = BusinessType.DELETE) + @DeleteMapping("/{qualIds}") + public AjaxResult remove(@PathVariable Long[] qualIds) + { + return toAjax(supplierQualificationService.deleteSupplierQualificationByQualIds(qualIds)); + } +} diff --git a/ktg-mes/src/main/java/com/ktg/mes/gys/domain/SupplierAssessment.java b/ktg-mes/src/main/java/com/ktg/mes/gys/domain/SupplierAssessment.java new file mode 100644 index 0000000..1cb1745 --- /dev/null +++ b/ktg-mes/src/main/java/com/ktg/mes/gys/domain/SupplierAssessment.java @@ -0,0 +1,126 @@ +package com.ktg.mes.gys.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.ktg.common.annotation.Excel; +import com.ktg.common.core.domain.BaseEntity; + +/** + * 供应商评估对象 supplier_assessment + * + * @author yinjinlu + * @date 2025-02-21 + */ +public class SupplierAssessment extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 评估ID */ + private Long assessmentId; + + /** 供应商名称 */ + @Excel(name = "供应商名称") + private String supplierName; + + /** 供应商ID */ + @Excel(name = "供应商ID") + private Long supplierId; + + /** 评估时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "评估时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date assessmentTime; + + /** 评分 */ + @Excel(name = "评分") + private String score; + + /** 评估备注 */ + @Excel(name = "评估备注") + private String remarks; + + /** 删除标记,0未删除,1已删除 */ + @Excel(name = "删除标记,0未删除,1已删除") + private String isDeleted; + + public void setAssessmentId(Long assessmentId) + { + this.assessmentId = assessmentId; + } + + public Long getAssessmentId() + { + return assessmentId; + } + public void setSupplierName(String supplierName) + { + this.supplierName = supplierName; + } + + public String getSupplierName() + { + return supplierName; + } + public void setSupplierId(Long supplierId) + { + this.supplierId = supplierId; + } + + public Long getSupplierId() + { + return supplierId; + } + public void setAssessmentTime(Date assessmentTime) + { + this.assessmentTime = assessmentTime; + } + + public Date getAssessmentTime() + { + return assessmentTime; + } + public void setScore(String score) + { + this.score = score; + } + + public String getScore() + { + return score; + } + public void setRemarks(String remarks) + { + this.remarks = remarks; + } + + public String getRemarks() + { + return remarks; + } + public void setIsDeleted(String isDeleted) + { + this.isDeleted = isDeleted; + } + + public String getIsDeleted() + { + return isDeleted; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("assessmentId", getAssessmentId()) + .append("supplierName", getSupplierName()) + .append("supplierId", getSupplierId()) + .append("assessmentTime", getAssessmentTime()) + .append("score", getScore()) + .append("remarks", getRemarks()) + .append("createTime", getCreateTime()) + .append("updateTime", getUpdateTime()) + .append("isDeleted", getIsDeleted()) + .toString(); + } +} diff --git a/ktg-mes/src/main/java/com/ktg/mes/gys/domain/SupplierCategory.java b/ktg-mes/src/main/java/com/ktg/mes/gys/domain/SupplierCategory.java new file mode 100644 index 0000000..ec1d65c --- /dev/null +++ b/ktg-mes/src/main/java/com/ktg/mes/gys/domain/SupplierCategory.java @@ -0,0 +1,81 @@ +package com.ktg.mes.gys.domain; + +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.ktg.common.annotation.Excel; +import com.ktg.common.core.domain.BaseEntity; + +/** + * 供应商类别对象 supplier_category + * + * @author yinjinlu + * @date 2025-02-21 + */ +public class SupplierCategory extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 类别ID */ + private Long categoryId; + + /** 类别名称 */ + @Excel(name = "类别名称") + private String categoryName; + + /** 类别描述 */ + @Excel(name = "类别描述") + private String description; + + /** 删除标记,0未删除,1已删除 */ + @Excel(name = "删除标记,0未删除,1已删除") + private String isDeleted; + + public void setCategoryId(Long categoryId) + { + this.categoryId = categoryId; + } + + public Long getCategoryId() + { + return categoryId; + } + public void setCategoryName(String categoryName) + { + this.categoryName = categoryName; + } + + public String getCategoryName() + { + return categoryName; + } + public void setDescription(String description) + { + this.description = description; + } + + public String getDescription() + { + return description; + } + public void setIsDeleted(String isDeleted) + { + this.isDeleted = isDeleted; + } + + public String getIsDeleted() + { + return isDeleted; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("categoryId", getCategoryId()) + .append("categoryName", getCategoryName()) + .append("description", getDescription()) + .append("createTime", getCreateTime()) + .append("updateTime", getUpdateTime()) + .append("isDeleted", getIsDeleted()) + .toString(); + } +} diff --git a/ktg-mes/src/main/java/com/ktg/mes/gys/domain/SupplierCooperationRecord.java b/ktg-mes/src/main/java/com/ktg/mes/gys/domain/SupplierCooperationRecord.java new file mode 100644 index 0000000..65dc579 --- /dev/null +++ b/ktg-mes/src/main/java/com/ktg/mes/gys/domain/SupplierCooperationRecord.java @@ -0,0 +1,140 @@ +package com.ktg.mes.gys.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.ktg.common.annotation.Excel; +import com.ktg.common.core.domain.BaseEntity; + +/** + * 供应商合作记录对象 supplier_cooperation_record + * + * @author yinjinlu + * @date 2025-02-21 + */ +public class SupplierCooperationRecord extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 记录ID */ + private Long recordId; + + /** 供应商名称 */ + @Excel(name = "供应商名称") + private String supplierName; + + /** 供应商ID */ + @Excel(name = "供应商ID") + private Long supplierId; + + /** 合作时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "合作时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date cooperationTime; + + /** 合作内容 */ + @Excel(name = " 合作内容") + private String content; + + /** 合作金额 */ + @Excel(name = " 合作金额") + private Long amount; + + /** 备注 */ + @Excel(name = "备注") + private String remarks; + + /** 删除标记,0未删除,1已删除 */ + @Excel(name = "删除标记,0未删除,1已删除") + private String isDeleted; + + public void setRecordId(Long recordId) + { + this.recordId = recordId; + } + + public Long getRecordId() + { + return recordId; + } + public void setSupplierName(String supplierName) + { + this.supplierName = supplierName; + } + + public String getSupplierName() + { + return supplierName; + } + public void setSupplierId(Long supplierId) + { + this.supplierId = supplierId; + } + + public Long getSupplierId() + { + return supplierId; + } + public void setCooperationTime(Date cooperationTime) + { + this.cooperationTime = cooperationTime; + } + + public Date getCooperationTime() + { + return cooperationTime; + } + public void setContent(String content) + { + this.content = content; + } + + public String getContent() + { + return content; + } + public void setAmount(Long amount) + { + this.amount = amount; + } + + public Long getAmount() + { + return amount; + } + public void setRemarks(String remarks) + { + this.remarks = remarks; + } + + public String getRemarks() + { + return remarks; + } + public void setIsDeleted(String isDeleted) + { + this.isDeleted = isDeleted; + } + + public String getIsDeleted() + { + return isDeleted; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("recordId", getRecordId()) + .append("supplierName", getSupplierName()) + .append("supplierId", getSupplierId()) + .append("cooperationTime", getCooperationTime()) + .append("content", getContent()) + .append("amount", getAmount()) + .append("remarks", getRemarks()) + .append("createTime", getCreateTime()) + .append("updateTime", getUpdateTime()) + .append("isDeleted", getIsDeleted()) + .toString(); + } +} diff --git a/ktg-mes/src/main/java/com/ktg/mes/gys/domain/SupplierQualification.java b/ktg-mes/src/main/java/com/ktg/mes/gys/domain/SupplierQualification.java new file mode 100644 index 0000000..9e42ff5 --- /dev/null +++ b/ktg-mes/src/main/java/com/ktg/mes/gys/domain/SupplierQualification.java @@ -0,0 +1,126 @@ +package com.ktg.mes.gys.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.ktg.common.annotation.Excel; +import com.ktg.common.core.domain.BaseEntity; + +/** + * 供应商资质对象 supplier_qualification + * + * @author yinjinlu + * @date 2025-02-21 + */ +public class SupplierQualification extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 资质ID */ + private Long qualId; + + /** 供应商ID */ + @Excel(name = "供应商ID") + private Long supplierId; + + /** 资质名称 */ + @Excel(name = "资质名称") + private String qualName; + + /** 资质类型 */ + @Excel(name = "资质类型") + private String qualType; + + /** 有效期 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "有效期", width = 30, dateFormat = "yyyy-MM-dd") + private Date validDate; + + /** 附件 */ + @Excel(name = "附件") + private String filePath; + + /** 删除标记,0未删除,1已删除 */ + @Excel(name = "删除标记,0未删除,1已删除") + private String isDeleted; + + public void setQualId(Long qualId) + { + this.qualId = qualId; + } + + public Long getQualId() + { + return qualId; + } + public void setSupplierId(Long supplierId) + { + this.supplierId = supplierId; + } + + public Long getSupplierId() + { + return supplierId; + } + public void setQualName(String qualName) + { + this.qualName = qualName; + } + + public String getQualName() + { + return qualName; + } + public void setQualType(String qualType) + { + this.qualType = qualType; + } + + public String getQualType() + { + return qualType; + } + public void setValidDate(Date validDate) + { + this.validDate = validDate; + } + + public Date getValidDate() + { + return validDate; + } + public void setFilePath(String filePath) + { + this.filePath = filePath; + } + + public String getFilePath() + { + return filePath; + } + public void setIsDeleted(String isDeleted) + { + this.isDeleted = isDeleted; + } + + public String getIsDeleted() + { + return isDeleted; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("qualId", getQualId()) + .append("supplierId", getSupplierId()) + .append("qualName", getQualName()) + .append("qualType", getQualType()) + .append("validDate", getValidDate()) + .append("filePath", getFilePath()) + .append("createTime", getCreateTime()) + .append("updateTime", getUpdateTime()) + .append("isDeleted", getIsDeleted()) + .toString(); + } +} diff --git a/ktg-mes/src/main/java/com/ktg/mes/gys/mapper/SupplierAssessmentMapper.java b/ktg-mes/src/main/java/com/ktg/mes/gys/mapper/SupplierAssessmentMapper.java new file mode 100644 index 0000000..72ec2da --- /dev/null +++ b/ktg-mes/src/main/java/com/ktg/mes/gys/mapper/SupplierAssessmentMapper.java @@ -0,0 +1,63 @@ +package com.ktg.mes.gys.mapper; + +import com.ktg.mes.gys.domain.SupplierAssessment; + +import java.util.List; + + +/** + * 供应商评估Mapper接口 + * + * @author yinjinlu + * @date 2025-02-21 + */ +public interface SupplierAssessmentMapper +{ + /** + * 查询供应商评估 + * + * @param assessmentId 供应商评估主键 + * @return 供应商评估 + */ + public SupplierAssessment selectSupplierAssessmentByAssessmentId(Long assessmentId); + + /** + * 查询供应商评估列表 + * + * @param supplierAssessment 供应商评估 + * @return 供应商评估集合 + */ + public List selectSupplierAssessmentList(SupplierAssessment supplierAssessment); + + /** + * 新增供应商评估 + * + * @param supplierAssessment 供应商评估 + * @return 结果 + */ + public int insertSupplierAssessment(SupplierAssessment supplierAssessment); + + /** + * 修改供应商评估 + * + * @param supplierAssessment 供应商评估 + * @return 结果 + */ + public int updateSupplierAssessment(SupplierAssessment supplierAssessment); + + /** + * 删除供应商评估 + * + * @param assessmentId 供应商评估主键 + * @return 结果 + */ + public int deleteSupplierAssessmentByAssessmentId(Long assessmentId); + + /** + * 批量删除供应商评估 + * + * @param assessmentIds 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteSupplierAssessmentByAssessmentIds(Long[] assessmentIds); +} diff --git a/ktg-mes/src/main/java/com/ktg/mes/gys/mapper/SupplierCategoryMapper.java b/ktg-mes/src/main/java/com/ktg/mes/gys/mapper/SupplierCategoryMapper.java new file mode 100644 index 0000000..677301d --- /dev/null +++ b/ktg-mes/src/main/java/com/ktg/mes/gys/mapper/SupplierCategoryMapper.java @@ -0,0 +1,63 @@ +package com.ktg.mes.gys.mapper; + +import com.ktg.mes.gys.domain.SupplierCategory; + +import java.util.List; + + +/** + * 供应商类别Mapper接口 + * + * @author yinjinlu + * @date 2025-02-21 + */ +public interface SupplierCategoryMapper +{ + /** + * 查询供应商类别 + * + * @param categoryId 供应商类别主键 + * @return 供应商类别 + */ + public SupplierCategory selectSupplierCategoryByCategoryId(Long categoryId); + + /** + * 查询供应商类别列表 + * + * @param supplierCategory 供应商类别 + * @return 供应商类别集合 + */ + public List selectSupplierCategoryList(SupplierCategory supplierCategory); + + /** + * 新增供应商类别 + * + * @param supplierCategory 供应商类别 + * @return 结果 + */ + public int insertSupplierCategory(SupplierCategory supplierCategory); + + /** + * 修改供应商类别 + * + * @param supplierCategory 供应商类别 + * @return 结果 + */ + public int updateSupplierCategory(SupplierCategory supplierCategory); + + /** + * 删除供应商类别 + * + * @param categoryId 供应商类别主键 + * @return 结果 + */ + public int deleteSupplierCategoryByCategoryId(Long categoryId); + + /** + * 批量删除供应商类别 + * + * @param categoryIds 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteSupplierCategoryByCategoryIds(Long[] categoryIds); +} diff --git a/ktg-mes/src/main/java/com/ktg/mes/gys/mapper/SupplierCooperationRecordMapper.java b/ktg-mes/src/main/java/com/ktg/mes/gys/mapper/SupplierCooperationRecordMapper.java new file mode 100644 index 0000000..d28be0e --- /dev/null +++ b/ktg-mes/src/main/java/com/ktg/mes/gys/mapper/SupplierCooperationRecordMapper.java @@ -0,0 +1,63 @@ +package com.ktg.mes.gys.mapper; + +import com.ktg.mes.gys.domain.SupplierCooperationRecord; + +import java.util.List; + + +/** + * 供应商合作记录Mapper接口 + * + * @author yinjinlu + * @date 2025-02-21 + */ +public interface SupplierCooperationRecordMapper +{ + /** + * 查询供应商合作记录 + * + * @param recordId 供应商合作记录主键 + * @return 供应商合作记录 + */ + public SupplierCooperationRecord selectSupplierCooperationRecordByRecordId(Long recordId); + + /** + * 查询供应商合作记录列表 + * + * @param supplierCooperationRecord 供应商合作记录 + * @return 供应商合作记录集合 + */ + public List selectSupplierCooperationRecordList(SupplierCooperationRecord supplierCooperationRecord); + + /** + * 新增供应商合作记录 + * + * @param supplierCooperationRecord 供应商合作记录 + * @return 结果 + */ + public int insertSupplierCooperationRecord(SupplierCooperationRecord supplierCooperationRecord); + + /** + * 修改供应商合作记录 + * + * @param supplierCooperationRecord 供应商合作记录 + * @return 结果 + */ + public int updateSupplierCooperationRecord(SupplierCooperationRecord supplierCooperationRecord); + + /** + * 删除供应商合作记录 + * + * @param recordId 供应商合作记录主键 + * @return 结果 + */ + public int deleteSupplierCooperationRecordByRecordId(Long recordId); + + /** + * 批量删除供应商合作记录 + * + * @param recordIds 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteSupplierCooperationRecordByRecordIds(Long[] recordIds); +} diff --git a/ktg-mes/src/main/java/com/ktg/mes/gys/mapper/SupplierQualificationMapper.java b/ktg-mes/src/main/java/com/ktg/mes/gys/mapper/SupplierQualificationMapper.java new file mode 100644 index 0000000..7e7a9ca --- /dev/null +++ b/ktg-mes/src/main/java/com/ktg/mes/gys/mapper/SupplierQualificationMapper.java @@ -0,0 +1,63 @@ +package com.ktg.mes.gys.mapper; + +import com.ktg.mes.gys.domain.SupplierQualification; + +import java.util.List; + + +/** + * 供应商资质Mapper接口 + * + * @author yinjinlu + * @date 2025-02-21 + */ +public interface SupplierQualificationMapper +{ + /** + * 查询供应商资质 + * + * @param qualId 供应商资质主键 + * @return 供应商资质 + */ + public SupplierQualification selectSupplierQualificationByQualId(Long qualId); + + /** + * 查询供应商资质列表 + * + * @param supplierQualification 供应商资质 + * @return 供应商资质集合 + */ + public List selectSupplierQualificationList(SupplierQualification supplierQualification); + + /** + * 新增供应商资质 + * + * @param supplierQualification 供应商资质 + * @return 结果 + */ + public int insertSupplierQualification(SupplierQualification supplierQualification); + + /** + * 修改供应商资质 + * + * @param supplierQualification 供应商资质 + * @return 结果 + */ + public int updateSupplierQualification(SupplierQualification supplierQualification); + + /** + * 删除供应商资质 + * + * @param qualId 供应商资质主键 + * @return 结果 + */ + public int deleteSupplierQualificationByQualId(Long qualId); + + /** + * 批量删除供应商资质 + * + * @param qualIds 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteSupplierQualificationByQualIds(Long[] qualIds); +} diff --git a/ktg-mes/src/main/java/com/ktg/mes/gys/service/ISupplierAssessmentService.java b/ktg-mes/src/main/java/com/ktg/mes/gys/service/ISupplierAssessmentService.java new file mode 100644 index 0000000..6c2e65c --- /dev/null +++ b/ktg-mes/src/main/java/com/ktg/mes/gys/service/ISupplierAssessmentService.java @@ -0,0 +1,63 @@ +package com.ktg.mes.gys.service; + +import com.ktg.mes.gys.domain.SupplierAssessment; + +import java.util.List; + + +/** + * 供应商评估Service接口 + * + * @author yinjinlu + * @date 2025-02-21 + */ +public interface ISupplierAssessmentService +{ + /** + * 查询供应商评估 + * + * @param assessmentId 供应商评估主键 + * @return 供应商评估 + */ + public SupplierAssessment selectSupplierAssessmentByAssessmentId(Long assessmentId); + + /** + * 查询供应商评估列表 + * + * @param supplierAssessment 供应商评估 + * @return 供应商评估集合 + */ + public List selectSupplierAssessmentList(SupplierAssessment supplierAssessment); + + /** + * 新增供应商评估 + * + * @param supplierAssessment 供应商评估 + * @return 结果 + */ + public int insertSupplierAssessment(SupplierAssessment supplierAssessment); + + /** + * 修改供应商评估 + * + * @param supplierAssessment 供应商评估 + * @return 结果 + */ + public int updateSupplierAssessment(SupplierAssessment supplierAssessment); + + /** + * 批量删除供应商评估 + * + * @param assessmentIds 需要删除的供应商评估主键集合 + * @return 结果 + */ + public int deleteSupplierAssessmentByAssessmentIds(Long[] assessmentIds); + + /** + * 删除供应商评估信息 + * + * @param assessmentId 供应商评估主键 + * @return 结果 + */ + public int deleteSupplierAssessmentByAssessmentId(Long assessmentId); +} diff --git a/ktg-mes/src/main/java/com/ktg/mes/gys/service/ISupplierCategoryService.java b/ktg-mes/src/main/java/com/ktg/mes/gys/service/ISupplierCategoryService.java new file mode 100644 index 0000000..172e6e7 --- /dev/null +++ b/ktg-mes/src/main/java/com/ktg/mes/gys/service/ISupplierCategoryService.java @@ -0,0 +1,63 @@ +package com.ktg.mes.gys.service; + +import com.ktg.mes.gys.domain.SupplierCategory; + +import java.util.List; + + +/** + * 供应商类别Service接口 + * + * @author yinjinlu + * @date 2025-02-21 + */ +public interface ISupplierCategoryService +{ + /** + * 查询供应商类别 + * + * @param categoryId 供应商类别主键 + * @return 供应商类别 + */ + public SupplierCategory selectSupplierCategoryByCategoryId(Long categoryId); + + /** + * 查询供应商类别列表 + * + * @param supplierCategory 供应商类别 + * @return 供应商类别集合 + */ + public List selectSupplierCategoryList(SupplierCategory supplierCategory); + + /** + * 新增供应商类别 + * + * @param supplierCategory 供应商类别 + * @return 结果 + */ + public int insertSupplierCategory(SupplierCategory supplierCategory); + + /** + * 修改供应商类别 + * + * @param supplierCategory 供应商类别 + * @return 结果 + */ + public int updateSupplierCategory(SupplierCategory supplierCategory); + + /** + * 批量删除供应商类别 + * + * @param categoryIds 需要删除的供应商类别主键集合 + * @return 结果 + */ + public int deleteSupplierCategoryByCategoryIds(Long[] categoryIds); + + /** + * 删除供应商类别信息 + * + * @param categoryId 供应商类别主键 + * @return 结果 + */ + public int deleteSupplierCategoryByCategoryId(Long categoryId); +} diff --git a/ktg-mes/src/main/java/com/ktg/mes/gys/service/ISupplierCooperationRecordService.java b/ktg-mes/src/main/java/com/ktg/mes/gys/service/ISupplierCooperationRecordService.java new file mode 100644 index 0000000..11bf0f3 --- /dev/null +++ b/ktg-mes/src/main/java/com/ktg/mes/gys/service/ISupplierCooperationRecordService.java @@ -0,0 +1,63 @@ +package com.ktg.mes.gys.service; + +import com.ktg.mes.gys.domain.SupplierCooperationRecord; + +import java.util.List; + + +/** + * 供应商合作记录Service接口 + * + * @author yinjinlu + * @date 2025-02-21 + */ +public interface ISupplierCooperationRecordService +{ + /** + * 查询供应商合作记录 + * + * @param recordId 供应商合作记录主键 + * @return 供应商合作记录 + */ + public SupplierCooperationRecord selectSupplierCooperationRecordByRecordId(Long recordId); + + /** + * 查询供应商合作记录列表 + * + * @param supplierCooperationRecord 供应商合作记录 + * @return 供应商合作记录集合 + */ + public List selectSupplierCooperationRecordList(SupplierCooperationRecord supplierCooperationRecord); + + /** + * 新增供应商合作记录 + * + * @param supplierCooperationRecord 供应商合作记录 + * @return 结果 + */ + public int insertSupplierCooperationRecord(SupplierCooperationRecord supplierCooperationRecord); + + /** + * 修改供应商合作记录 + * + * @param supplierCooperationRecord 供应商合作记录 + * @return 结果 + */ + public int updateSupplierCooperationRecord(SupplierCooperationRecord supplierCooperationRecord); + + /** + * 批量删除供应商合作记录 + * + * @param recordIds 需要删除的供应商合作记录主键集合 + * @return 结果 + */ + public int deleteSupplierCooperationRecordByRecordIds(Long[] recordIds); + + /** + * 删除供应商合作记录信息 + * + * @param recordId 供应商合作记录主键 + * @return 结果 + */ + public int deleteSupplierCooperationRecordByRecordId(Long recordId); +} diff --git a/ktg-mes/src/main/java/com/ktg/mes/gys/service/ISupplierQualificationService.java b/ktg-mes/src/main/java/com/ktg/mes/gys/service/ISupplierQualificationService.java new file mode 100644 index 0000000..05ba193 --- /dev/null +++ b/ktg-mes/src/main/java/com/ktg/mes/gys/service/ISupplierQualificationService.java @@ -0,0 +1,63 @@ +package com.ktg.mes.gys.service; + +import com.ktg.mes.gys.domain.SupplierQualification; + +import java.util.List; + + +/** + * 供应商资质Service接口 + * + * @author yinjinlu + * @date 2025-02-21 + */ +public interface ISupplierQualificationService +{ + /** + * 查询供应商资质 + * + * @param qualId 供应商资质主键 + * @return 供应商资质 + */ + public SupplierQualification selectSupplierQualificationByQualId(Long qualId); + + /** + * 查询供应商资质列表 + * + * @param supplierQualification 供应商资质 + * @return 供应商资质集合 + */ + public List selectSupplierQualificationList(SupplierQualification supplierQualification); + + /** + * 新增供应商资质 + * + * @param supplierQualification 供应商资质 + * @return 结果 + */ + public int insertSupplierQualification(SupplierQualification supplierQualification); + + /** + * 修改供应商资质 + * + * @param supplierQualification 供应商资质 + * @return 结果 + */ + public int updateSupplierQualification(SupplierQualification supplierQualification); + + /** + * 批量删除供应商资质 + * + * @param qualIds 需要删除的供应商资质主键集合 + * @return 结果 + */ + public int deleteSupplierQualificationByQualIds(Long[] qualIds); + + /** + * 删除供应商资质信息 + * + * @param qualId 供应商资质主键 + * @return 结果 + */ + public int deleteSupplierQualificationByQualId(Long qualId); +} diff --git a/ktg-mes/src/main/java/com/ktg/mes/gys/service/impl/SupplierAssessmentServiceImpl.java b/ktg-mes/src/main/java/com/ktg/mes/gys/service/impl/SupplierAssessmentServiceImpl.java new file mode 100644 index 0000000..48b09fa --- /dev/null +++ b/ktg-mes/src/main/java/com/ktg/mes/gys/service/impl/SupplierAssessmentServiceImpl.java @@ -0,0 +1,97 @@ +package com.ktg.mes.gys.service.impl; + +import java.util.List; +import com.ktg.common.utils.DateUtils; +import com.ktg.mes.gys.domain.SupplierAssessment; +import com.ktg.mes.gys.mapper.SupplierAssessmentMapper; +import com.ktg.mes.gys.service.ISupplierAssessmentService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + + +/** + * 供应商评估Service业务层处理 + * + * @author yinjinlu + * @date 2025-02-21 + */ +@Service +public class SupplierAssessmentServiceImpl implements ISupplierAssessmentService +{ + @Autowired + private SupplierAssessmentMapper supplierAssessmentMapper; + + /** + * 查询供应商评估 + * + * @param assessmentId 供应商评估主键 + * @return 供应商评估 + */ + @Override + public SupplierAssessment selectSupplierAssessmentByAssessmentId(Long assessmentId) + { + return supplierAssessmentMapper.selectSupplierAssessmentByAssessmentId(assessmentId); + } + + /** + * 查询供应商评估列表 + * + * @param supplierAssessment 供应商评估 + * @return 供应商评估 + */ + @Override + public List selectSupplierAssessmentList(SupplierAssessment supplierAssessment) + { + return supplierAssessmentMapper.selectSupplierAssessmentList(supplierAssessment); + } + + /** + * 新增供应商评估 + * + * @param supplierAssessment 供应商评估 + * @return 结果 + */ + @Override + public int insertSupplierAssessment(SupplierAssessment supplierAssessment) + { + supplierAssessment.setCreateTime(DateUtils.getNowDate()); + return supplierAssessmentMapper.insertSupplierAssessment(supplierAssessment); + } + + /** + * 修改供应商评估 + * + * @param supplierAssessment 供应商评估 + * @return 结果 + */ + @Override + public int updateSupplierAssessment(SupplierAssessment supplierAssessment) + { + supplierAssessment.setUpdateTime(DateUtils.getNowDate()); + return supplierAssessmentMapper.updateSupplierAssessment(supplierAssessment); + } + + /** + * 批量删除供应商评估 + * + * @param assessmentIds 需要删除的供应商评估主键 + * @return 结果 + */ + @Override + public int deleteSupplierAssessmentByAssessmentIds(Long[] assessmentIds) + { + return supplierAssessmentMapper.deleteSupplierAssessmentByAssessmentIds(assessmentIds); + } + + /** + * 删除供应商评估信息 + * + * @param assessmentId 供应商评估主键 + * @return 结果 + */ + @Override + public int deleteSupplierAssessmentByAssessmentId(Long assessmentId) + { + return supplierAssessmentMapper.deleteSupplierAssessmentByAssessmentId(assessmentId); + } +} diff --git a/ktg-mes/src/main/java/com/ktg/mes/gys/service/impl/SupplierCategoryServiceImpl.java b/ktg-mes/src/main/java/com/ktg/mes/gys/service/impl/SupplierCategoryServiceImpl.java new file mode 100644 index 0000000..93c0fe3 --- /dev/null +++ b/ktg-mes/src/main/java/com/ktg/mes/gys/service/impl/SupplierCategoryServiceImpl.java @@ -0,0 +1,97 @@ +package com.ktg.mes.gys.service.impl; + +import java.util.List; +import com.ktg.common.utils.DateUtils; +import com.ktg.mes.gys.domain.SupplierCategory; +import com.ktg.mes.gys.mapper.SupplierCategoryMapper; +import com.ktg.mes.gys.service.ISupplierCategoryService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + + +/** + * 供应商类别Service业务层处理 + * + * @author yinjinlu + * @date 2025-02-21 + */ +@Service +public class SupplierCategoryServiceImpl implements ISupplierCategoryService +{ + @Autowired + private SupplierCategoryMapper supplierCategoryMapper; + + /** + * 查询供应商类别 + * + * @param categoryId 供应商类别主键 + * @return 供应商类别 + */ + @Override + public SupplierCategory selectSupplierCategoryByCategoryId(Long categoryId) + { + return supplierCategoryMapper.selectSupplierCategoryByCategoryId(categoryId); + } + + /** + * 查询供应商类别列表 + * + * @param supplierCategory 供应商类别 + * @return 供应商类别 + */ + @Override + public List selectSupplierCategoryList(SupplierCategory supplierCategory) + { + return supplierCategoryMapper.selectSupplierCategoryList(supplierCategory); + } + + /** + * 新增供应商类别 + * + * @param supplierCategory 供应商类别 + * @return 结果 + */ + @Override + public int insertSupplierCategory(SupplierCategory supplierCategory) + { + supplierCategory.setCreateTime(DateUtils.getNowDate()); + return supplierCategoryMapper.insertSupplierCategory(supplierCategory); + } + + /** + * 修改供应商类别 + * + * @param supplierCategory 供应商类别 + * @return 结果 + */ + @Override + public int updateSupplierCategory(SupplierCategory supplierCategory) + { + supplierCategory.setUpdateTime(DateUtils.getNowDate()); + return supplierCategoryMapper.updateSupplierCategory(supplierCategory); + } + + /** + * 批量删除供应商类别 + * + * @param categoryIds 需要删除的供应商类别主键 + * @return 结果 + */ + @Override + public int deleteSupplierCategoryByCategoryIds(Long[] categoryIds) + { + return supplierCategoryMapper.deleteSupplierCategoryByCategoryIds(categoryIds); + } + + /** + * 删除供应商类别信息 + * + * @param categoryId 供应商类别主键 + * @return 结果 + */ + @Override + public int deleteSupplierCategoryByCategoryId(Long categoryId) + { + return supplierCategoryMapper.deleteSupplierCategoryByCategoryId(categoryId); + } +} diff --git a/ktg-mes/src/main/java/com/ktg/mes/gys/service/impl/SupplierCooperationRecordServiceImpl.java b/ktg-mes/src/main/java/com/ktg/mes/gys/service/impl/SupplierCooperationRecordServiceImpl.java new file mode 100644 index 0000000..b2063da --- /dev/null +++ b/ktg-mes/src/main/java/com/ktg/mes/gys/service/impl/SupplierCooperationRecordServiceImpl.java @@ -0,0 +1,97 @@ +package com.ktg.mes.gys.service.impl; + +import java.util.List; +import com.ktg.common.utils.DateUtils; +import com.ktg.mes.gys.domain.SupplierCooperationRecord; +import com.ktg.mes.gys.mapper.SupplierCooperationRecordMapper; +import com.ktg.mes.gys.service.ISupplierCooperationRecordService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + + +/** + * 供应商合作记录Service业务层处理 + * + * @author yinjinlu + * @date 2025-02-21 + */ +@Service +public class SupplierCooperationRecordServiceImpl implements ISupplierCooperationRecordService +{ + @Autowired + private SupplierCooperationRecordMapper supplierCooperationRecordMapper; + + /** + * 查询供应商合作记录 + * + * @param recordId 供应商合作记录主键 + * @return 供应商合作记录 + */ + @Override + public SupplierCooperationRecord selectSupplierCooperationRecordByRecordId(Long recordId) + { + return supplierCooperationRecordMapper.selectSupplierCooperationRecordByRecordId(recordId); + } + + /** + * 查询供应商合作记录列表 + * + * @param supplierCooperationRecord 供应商合作记录 + * @return 供应商合作记录 + */ + @Override + public List selectSupplierCooperationRecordList(SupplierCooperationRecord supplierCooperationRecord) + { + return supplierCooperationRecordMapper.selectSupplierCooperationRecordList(supplierCooperationRecord); + } + + /** + * 新增供应商合作记录 + * + * @param supplierCooperationRecord 供应商合作记录 + * @return 结果 + */ + @Override + public int insertSupplierCooperationRecord(SupplierCooperationRecord supplierCooperationRecord) + { + supplierCooperationRecord.setCreateTime(DateUtils.getNowDate()); + return supplierCooperationRecordMapper.insertSupplierCooperationRecord(supplierCooperationRecord); + } + + /** + * 修改供应商合作记录 + * + * @param supplierCooperationRecord 供应商合作记录 + * @return 结果 + */ + @Override + public int updateSupplierCooperationRecord(SupplierCooperationRecord supplierCooperationRecord) + { + supplierCooperationRecord.setUpdateTime(DateUtils.getNowDate()); + return supplierCooperationRecordMapper.updateSupplierCooperationRecord(supplierCooperationRecord); + } + + /** + * 批量删除供应商合作记录 + * + * @param recordIds 需要删除的供应商合作记录主键 + * @return 结果 + */ + @Override + public int deleteSupplierCooperationRecordByRecordIds(Long[] recordIds) + { + return supplierCooperationRecordMapper.deleteSupplierCooperationRecordByRecordIds(recordIds); + } + + /** + * 删除供应商合作记录信息 + * + * @param recordId 供应商合作记录主键 + * @return 结果 + */ + @Override + public int deleteSupplierCooperationRecordByRecordId(Long recordId) + { + return supplierCooperationRecordMapper.deleteSupplierCooperationRecordByRecordId(recordId); + } +} diff --git a/ktg-mes/src/main/java/com/ktg/mes/gys/service/impl/SupplierQualificationServiceImpl.java b/ktg-mes/src/main/java/com/ktg/mes/gys/service/impl/SupplierQualificationServiceImpl.java new file mode 100644 index 0000000..44113f4 --- /dev/null +++ b/ktg-mes/src/main/java/com/ktg/mes/gys/service/impl/SupplierQualificationServiceImpl.java @@ -0,0 +1,97 @@ +package com.ktg.mes.gys.service.impl; + +import java.util.List; +import com.ktg.common.utils.DateUtils; +import com.ktg.mes.gys.domain.SupplierQualification; +import com.ktg.mes.gys.mapper.SupplierQualificationMapper; +import com.ktg.mes.gys.service.ISupplierQualificationService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + + +/** + * 供应商资质Service业务层处理 + * + * @author yinjinlu + * @date 2025-02-21 + */ +@Service +public class SupplierQualificationServiceImpl implements ISupplierQualificationService +{ + @Autowired + private SupplierQualificationMapper supplierQualificationMapper; + + /** + * 查询供应商资质 + * + * @param qualId 供应商资质主键 + * @return 供应商资质 + */ + @Override + public SupplierQualification selectSupplierQualificationByQualId(Long qualId) + { + return supplierQualificationMapper.selectSupplierQualificationByQualId(qualId); + } + + /** + * 查询供应商资质列表 + * + * @param supplierQualification 供应商资质 + * @return 供应商资质 + */ + @Override + public List selectSupplierQualificationList(SupplierQualification supplierQualification) + { + return supplierQualificationMapper.selectSupplierQualificationList(supplierQualification); + } + + /** + * 新增供应商资质 + * + * @param supplierQualification 供应商资质 + * @return 结果 + */ + @Override + public int insertSupplierQualification(SupplierQualification supplierQualification) + { + supplierQualification.setCreateTime(DateUtils.getNowDate()); + return supplierQualificationMapper.insertSupplierQualification(supplierQualification); + } + + /** + * 修改供应商资质 + * + * @param supplierQualification 供应商资质 + * @return 结果 + */ + @Override + public int updateSupplierQualification(SupplierQualification supplierQualification) + { + supplierQualification.setUpdateTime(DateUtils.getNowDate()); + return supplierQualificationMapper.updateSupplierQualification(supplierQualification); + } + + /** + * 批量删除供应商资质 + * + * @param qualIds 需要删除的供应商资质主键 + * @return 结果 + */ + @Override + public int deleteSupplierQualificationByQualIds(Long[] qualIds) + { + return supplierQualificationMapper.deleteSupplierQualificationByQualIds(qualIds); + } + + /** + * 删除供应商资质信息 + * + * @param qualId 供应商资质主键 + * @return 结果 + */ + @Override + public int deleteSupplierQualificationByQualId(Long qualId) + { + return supplierQualificationMapper.deleteSupplierQualificationByQualId(qualId); + } +} diff --git a/ktg-mes/src/main/resources/mapper/gys/SupplierAssessmentMapper.xml b/ktg-mes/src/main/resources/mapper/gys/SupplierAssessmentMapper.xml new file mode 100644 index 0000000..9a96b17 --- /dev/null +++ b/ktg-mes/src/main/resources/mapper/gys/SupplierAssessmentMapper.xml @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + select assessment_id, supplier_name, supplier_id, assessment_time, score, remarks, create_time, update_time, is_deleted from supplier_assessment + + + + + + + + insert into supplier_assessment + + assessment_id, + supplier_name, + supplier_id, + assessment_time, + score, + remarks, + create_time, + update_time, + is_deleted, + + + #{assessmentId}, + #{supplierName}, + #{supplierId}, + #{assessmentTime}, + #{score}, + #{remarks}, + #{createTime}, + #{updateTime}, + #{isDeleted}, + + + + + update supplier_assessment + + supplier_name = #{supplierName}, + supplier_id = #{supplierId}, + assessment_time = #{assessmentTime}, + score = #{score}, + remarks = #{remarks}, + create_time = #{createTime}, + update_time = #{updateTime}, + is_deleted = #{isDeleted}, + + where assessment_id = #{assessmentId} + + + + delete from supplier_assessment where assessment_id = #{assessmentId} + + + + delete from supplier_assessment where assessment_id in + + #{assessmentId} + + + \ No newline at end of file diff --git a/ktg-mes/src/main/resources/mapper/gys/SupplierCategoryMapper.xml b/ktg-mes/src/main/resources/mapper/gys/SupplierCategoryMapper.xml new file mode 100644 index 0000000..11e4abe --- /dev/null +++ b/ktg-mes/src/main/resources/mapper/gys/SupplierCategoryMapper.xml @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + select category_id, category_name, description, create_time, update_time, is_deleted from supplier_category + + + + + + + + insert into supplier_category + + category_id, + category_name, + description, + create_time, + update_time, + is_deleted, + + + #{categoryId}, + #{categoryName}, + #{description}, + #{createTime}, + #{updateTime}, + #{isDeleted}, + + + + + update supplier_category + + category_name = #{categoryName}, + description = #{description}, + create_time = #{createTime}, + update_time = #{updateTime}, + is_deleted = #{isDeleted}, + + where category_id = #{categoryId} + + + + delete from supplier_category where category_id = #{categoryId} + + + + delete from supplier_category where category_id in + + #{categoryId} + + + \ No newline at end of file diff --git a/ktg-mes/src/main/resources/mapper/gys/SupplierCooperationRecordMapper.xml b/ktg-mes/src/main/resources/mapper/gys/SupplierCooperationRecordMapper.xml new file mode 100644 index 0000000..0c4fb54 --- /dev/null +++ b/ktg-mes/src/main/resources/mapper/gys/SupplierCooperationRecordMapper.xml @@ -0,0 +1,94 @@ + + + + + + + + + + + + + + + + + + + select record_id, supplier_name, supplier_id, cooperation_time, content, amount, remarks, create_time, update_time, is_deleted from supplier_cooperation_record + + + + + + + + insert into supplier_cooperation_record + + supplier_name, + supplier_id, + cooperation_time, + content, + amount, + remarks, + create_time, + update_time, + is_deleted, + + + #{supplierName}, + #{supplierId}, + #{cooperationTime}, + #{content}, + #{amount}, + #{remarks}, + #{createTime}, + #{updateTime}, + #{isDeleted}, + + + + + update supplier_cooperation_record + + supplier_name = #{supplierName}, + supplier_id = #{supplierId}, + cooperation_time = #{cooperationTime}, + content = #{content}, + amount = #{amount}, + remarks = #{remarks}, + create_time = #{createTime}, + update_time = #{updateTime}, + is_deleted = #{isDeleted}, + + where record_id = #{recordId} + + + + delete from supplier_cooperation_record where record_id = #{recordId} + + + + delete from supplier_cooperation_record where record_id in + + #{recordId} + + + \ No newline at end of file diff --git a/ktg-mes/src/main/resources/mapper/gys/SupplierQualificationMapper.xml b/ktg-mes/src/main/resources/mapper/gys/SupplierQualificationMapper.xml new file mode 100644 index 0000000..d4b3899 --- /dev/null +++ b/ktg-mes/src/main/resources/mapper/gys/SupplierQualificationMapper.xml @@ -0,0 +1,89 @@ + + + + + + + + + + + + + + + + + + select qual_id, supplier_id, qual_name, qual_type, valid_date, file_path, create_time, update_time, is_deleted from supplier_qualification + + + + + + + + insert into supplier_qualification + + supplier_id, + qual_name, + qual_type, + valid_date, + file_path, + create_time, + update_time, + is_deleted, + + + #{supplierId}, + #{qualName}, + #{qualType}, + #{validDate}, + #{filePath}, + #{createTime}, + #{updateTime}, + #{isDeleted}, + + + + + update supplier_qualification + + supplier_id = #{supplierId}, + qual_name = #{qualName}, + qual_type = #{qualType}, + valid_date = #{validDate}, + file_path = #{filePath}, + create_time = #{createTime}, + update_time = #{updateTime}, + is_deleted = #{isDeleted}, + + where qual_id = #{qualId} + + + + delete from supplier_qualification where qual_id = #{qualId} + + + + delete from supplier_qualification where qual_id in + + #{qualId} + + + \ No newline at end of file