diff --git a/aucma-base/src/main/java/com/aucma/base/domain/BaseProductLine.java b/aucma-base/src/main/java/com/aucma/base/domain/BaseProductLine.java index e5f0dc0..4bade18 100644 --- a/aucma-base/src/main/java/com/aucma/base/domain/BaseProductLine.java +++ b/aucma-base/src/main/java/com/aucma/base/domain/BaseProductLine.java @@ -90,6 +90,19 @@ public class BaseProductLine extends BaseEntity { @Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") private Date updatedTime; + /** + * 工序编号 + */ + private String processCode; + + public String getProcessCode() { + return processCode; + } + + public void setProcessCode(String processCode) { + this.processCode = processCode; + } + public String getParentName() { return parentName; } diff --git a/aucma-base/src/main/resources/mapper/base/BaseProductLineMapper.xml b/aucma-base/src/main/resources/mapper/base/BaseProductLineMapper.xml index 27dd64c..9610cf2 100644 --- a/aucma-base/src/main/resources/mapper/base/BaseProductLineMapper.xml +++ b/aucma-base/src/main/resources/mapper/base/BaseProductLineMapper.xml @@ -5,19 +5,20 @@ - - - - - - - - - - - - - + + + + + + + + + + + + + + @@ -26,7 +27,7 @@ bpl.PRODUCT_LINE_NAME, bpl.PRODUCT_LINE_TYPE, bpl.plant_code, - bf.factory_name plantName, + bf.factory_name plantName, bpl.is_flag, bpl.created_by, bpl.created_time, @@ -41,78 +42,93 @@ - - SELECT seq_base_productline.NEXTVAL as objId FROM DUAL - + + SELECT seq_base_productline.NEXTVAL as objId FROM DUAL + insert into base_productline - obj_id, - product_line_code, - product_line_name, - product_line_type, - plant_code, - is_flag, - created_by, - created_time, - updated_by, - updated_time, - parent_id, + obj_id, + product_line_code, + product_line_name, + product_line_type, + plant_code, + is_flag, + created_by, + created_time, + updated_by, + updated_time, + parent_id, - #{objId}, - #{productLineCode}, - #{productLineName}, - #{productLineType}, - #{plantCode}, - #{isFlag}, - #{createdBy}, - #{createdTime}, - #{updatedBy}, - #{updatedTime}, - #{parentId}, + #{objId}, + #{productLineCode}, + #{productLineName}, + #{productLineType}, + #{plantCode}, + #{isFlag}, + #{createdBy}, + #{createdTime}, + #{updatedBy}, + #{updatedTime}, + #{parentId}, update base_productline - product_line_code = #{productLineCode}, - product_line_name = #{productLineName}, - product_line_type = #{productLineType}, - plant_code = #{plantCode}, - is_flag = #{isFlag}, - created_by = #{createdBy}, - created_time = #{createdTime}, - updated_by = #{updatedBy}, - updated_time = #{updatedTime}, - parent_id = #{parentId}, + product_line_code = #{productLineCode}, + product_line_name = #{productLineName}, + product_line_type = #{productLineType}, + plant_code = #{plantCode}, + is_flag = #{isFlag}, + created_by = #{createdBy}, + created_time = #{createdTime}, + updated_by = #{updatedBy}, + updated_time = #{updatedTime}, + parent_id = #{parentId}, where obj_id = #{objId} - delete from base_productline where obj_id = #{objId} + delete + from base_productline + where obj_id = #{objId} diff --git a/aucma-base/src/main/resources/mapper/base/BaseQualityInspectionItemMapper.xml b/aucma-base/src/main/resources/mapper/base/BaseQualityInspectionItemMapper.xml index a7b2d55..d455088 100644 --- a/aucma-base/src/main/resources/mapper/base/BaseQualityInspectionItemMapper.xml +++ b/aucma-base/src/main/resources/mapper/base/BaseQualityInspectionItemMapper.xml @@ -79,12 +79,17 @@ diff --git a/aucma-report/src/main/java/com/aucma/report/controller/ReportQualityInspectionController.java b/aucma-report/src/main/java/com/aucma/report/controller/ReportQualityInspectionController.java new file mode 100644 index 0000000..2c22c2d --- /dev/null +++ b/aucma-report/src/main/java/com/aucma/report/controller/ReportQualityInspectionController.java @@ -0,0 +1,101 @@ +package com.aucma.report.controller; + +import java.util.List; +import javax.servlet.http.HttpServletResponse; + +import com.aucma.common.utils.DateUtils; +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.aucma.common.annotation.Log; +import com.aucma.common.core.controller.BaseController; +import com.aucma.common.core.domain.AjaxResult; +import com.aucma.common.enums.BusinessType; +import com.aucma.report.domain.ReportQualityInspection; +import com.aucma.report.service.IReportQualityInspectionService; +import com.aucma.common.utils.poi.ExcelUtil; +import com.aucma.common.core.page.TableDataInfo; + +/** + * 质检记录管理Controller + * + * @author Yinq + * @date 2023-11-21 + */ +@RestController +@RequestMapping("/report/qualityInspection" ) +public class ReportQualityInspectionController extends BaseController { + @Autowired + private IReportQualityInspectionService reportQualityInspectionService; + + /** + * 查询质检记录管理列表 + */ + @PreAuthorize("@ss.hasPermi('report:qualityInspection:list')" ) + @GetMapping("/list" ) + public TableDataInfo list(ReportQualityInspection reportQualityInspection) { + startPage(); + List list = reportQualityInspectionService.selectReportQualityInspectionList(reportQualityInspection); + return getDataTable(list); + } + + /** + * 导出质检记录管理列表 + */ + @PreAuthorize("@ss.hasPermi('report:qualityInspection:export')" ) + @Log(title = "质检记录管理" , businessType = BusinessType.EXPORT) + @PostMapping("/export" ) + public void export(HttpServletResponse response, ReportQualityInspection reportQualityInspection) { + List list = reportQualityInspectionService.selectReportQualityInspectionList(reportQualityInspection); + ExcelUtil util = new ExcelUtil(ReportQualityInspection. class); + util.exportExcel(response, list, "质检记录管理数据" ); + } + + /** + * 获取质检记录管理详细信息 + */ + @PreAuthorize("@ss.hasPermi('report:qualityInspection:query')" ) + @GetMapping(value = "/{objId}" ) + public AjaxResult getInfo(@PathVariable("objId" ) Long objId) { + return success(reportQualityInspectionService.selectReportQualityInspectionByObjId(objId)); + } + + /** + * 新增质检记录管理 + */ + @PreAuthorize("@ss.hasPermi('report:qualityInspection:add')" ) + @Log(title = "质检记录管理" , businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody ReportQualityInspection reportQualityInspection) { + return toAjax(reportQualityInspectionService.insertReportQualityInspection(reportQualityInspection)); + } + + /** + * 修改质检记录管理 + */ + @PreAuthorize("@ss.hasPermi('report:qualityInspection:edit')" ) + @Log(title = "质检记录管理" , businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody ReportQualityInspection reportQualityInspection) { + reportQualityInspection.setUpdatedBy(getUsername()); + reportQualityInspection.setUpdatedTime(DateUtils.getNowDate()); + return toAjax(reportQualityInspectionService.updateReportQualityInspection(reportQualityInspection)); + } + + /** + * 删除质检记录管理 + */ + @PreAuthorize("@ss.hasPermi('report:qualityInspection:remove')" ) + @Log(title = "质检记录管理" , businessType = BusinessType.DELETE) + @DeleteMapping("/{objIds}" ) + public AjaxResult remove(@PathVariable Long[] objIds) { + return toAjax(reportQualityInspectionService.deleteReportQualityInspectionByObjIds(objIds)); + } +} diff --git a/aucma-report/src/main/java/com/aucma/report/domain/ReportQualityInspection.java b/aucma-report/src/main/java/com/aucma/report/domain/ReportQualityInspection.java new file mode 100644 index 0000000..2a02304 --- /dev/null +++ b/aucma-report/src/main/java/com/aucma/report/domain/ReportQualityInspection.java @@ -0,0 +1,280 @@ +package com.aucma.report.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.aucma.common.annotation.Excel; +import com.aucma.common.core.domain.BaseEntity; + +/** + * 质检记录管理对象 report_quality_inspection + * + * @author Yinq + * @date 2023-11-21 + */ +public class ReportQualityInspection extends BaseEntity + { +private static final long serialVersionUID=1L; + + /** 主键标识 */ + private Long objId; + + /** 产品条码 */ + @Excel(name = "产品条码") + private String barCode; + + /** 物料名称 */ + @Excel(name = "物料名称") + private String materialName; + + /** 工序编号 */ + @Excel(name = "工序编号") + private String processCode; + + /** 检测项编号 */ + @Excel(name = "检测项编号") + private String testItemCode; + + /** 质量缺陷编码 */ + @Excel(name = "质量缺陷编码") + private String qualityDefectCode; + + /** 质量缺陷名称 */ + @Excel(name = "质量缺陷名称") + private String qualityDefectName; + + /** 处理措施 */ + @Excel(name = "处理措施") + private String treatmentMeasure; + + /** 处理结果 */ + @Excel(name = "处理结果") + private String processResult; + + /** 是否下静态线(1-是;2-否) */ + @Excel(name = "是否下静态线", readConverterExp = "1=-是;2-否") + private String isLowerLine; + + /** 班组编号 */ + @Excel(name = "班组编号") + private String groupCode; + + /** 检测人员 */ + @Excel(name = "检测人员") + private String inspectorCode; + + /** 检测时间 */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @Excel(name = "检测时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") + private Date inspectorTime; + + /** 返修次数 */ + @Excel(name = "返修次数") + private Long reworkNumber; + + /** 完成时间 */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @Excel(name = "完成时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") + private Date finishTime; + + /** 是否标识 */ + @Excel(name = "是否标识") + private Long isFlag; + + /** 更新人 */ + @Excel(name = "更新人") + private String updatedBy; + + /** 更新时间 */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") + private Date updatedTime; + + public void setObjId(Long objId) + { + this.objId = objId; + } + + public Long getObjId() + { + return objId; + } + public void setBarCode(String barCode) + { + this.barCode = barCode; + } + + public String getBarCode() + { + return barCode; + } + public void setMaterialName(String materialName) + { + this.materialName = materialName; + } + + public String getMaterialName() + { + return materialName; + } + public void setProcessCode(String processCode) + { + this.processCode = processCode; + } + + public String getProcessCode() + { + return processCode; + } + public void setTestItemCode(String testItemCode) + { + this.testItemCode = testItemCode; + } + + public String getTestItemCode() + { + return testItemCode; + } + public void setQualityDefectCode(String qualityDefectCode) + { + this.qualityDefectCode = qualityDefectCode; + } + + public String getQualityDefectCode() + { + return qualityDefectCode; + } + public void setQualityDefectName(String qualityDefectName) + { + this.qualityDefectName = qualityDefectName; + } + + public String getQualityDefectName() + { + return qualityDefectName; + } + public void setTreatmentMeasure(String treatmentMeasure) + { + this.treatmentMeasure = treatmentMeasure; + } + + public String getTreatmentMeasure() + { + return treatmentMeasure; + } + public void setProcessResult(String processResult) + { + this.processResult = processResult; + } + + public String getProcessResult() + { + return processResult; + } + public void setIsLowerLine(String isLowerLine) + { + this.isLowerLine = isLowerLine; + } + + public String getIsLowerLine() + { + return isLowerLine; + } + public void setGroupCode(String groupCode) + { + this.groupCode = groupCode; + } + + public String getGroupCode() + { + return groupCode; + } + public void setInspectorCode(String inspectorCode) + { + this.inspectorCode = inspectorCode; + } + + public String getInspectorCode() + { + return inspectorCode; + } + public void setInspectorTime(Date inspectorTime) + { + this.inspectorTime = inspectorTime; + } + + public Date getInspectorTime() + { + return inspectorTime; + } + public void setReworkNumber(Long reworkNumber) + { + this.reworkNumber = reworkNumber; + } + + public Long getReworkNumber() + { + return reworkNumber; + } + public void setFinishTime(Date finishTime) + { + this.finishTime = finishTime; + } + + public Date getFinishTime() + { + return finishTime; + } + public void setIsFlag(Long isFlag) + { + this.isFlag = isFlag; + } + + public Long getIsFlag() + { + return isFlag; + } + public void setUpdatedBy(String updatedBy) + { + this.updatedBy = updatedBy; + } + + public String getUpdatedBy() + { + return updatedBy; + } + public void setUpdatedTime(Date updatedTime) + { + this.updatedTime = updatedTime; + } + + public Date getUpdatedTime() + { + return updatedTime; + } + +@Override +public String toString(){ + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("objId",getObjId()) + .append("barCode",getBarCode()) + .append("materialName",getMaterialName()) + .append("processCode",getProcessCode()) + .append("testItemCode",getTestItemCode()) + .append("qualityDefectCode",getQualityDefectCode()) + .append("qualityDefectName",getQualityDefectName()) + .append("treatmentMeasure",getTreatmentMeasure()) + .append("processResult",getProcessResult()) + .append("isLowerLine",getIsLowerLine()) + .append("groupCode",getGroupCode()) + .append("inspectorCode",getInspectorCode()) + .append("inspectorTime",getInspectorTime()) + .append("reworkNumber",getReworkNumber()) + .append("finishTime",getFinishTime()) + .append("isFlag",getIsFlag()) + .append("updatedBy",getUpdatedBy()) + .append("updatedTime",getUpdatedTime()) + .toString(); + } + } diff --git a/aucma-report/src/main/java/com/aucma/report/mapper/ReportQualityInspectionMapper.java b/aucma-report/src/main/java/com/aucma/report/mapper/ReportQualityInspectionMapper.java new file mode 100644 index 0000000..2492b16 --- /dev/null +++ b/aucma-report/src/main/java/com/aucma/report/mapper/ReportQualityInspectionMapper.java @@ -0,0 +1,61 @@ +package com.aucma.report.mapper; + +import java.util.List; +import com.aucma.report.domain.ReportQualityInspection; + +/** + * 质检记录管理Mapper接口 + * + * @author Yinq + * @date 2023-11-21 + */ +public interface ReportQualityInspectionMapper +{ + /** + * 查询质检记录管理 + * + * @param objId 质检记录管理主键 + * @return 质检记录管理 + */ + public ReportQualityInspection selectReportQualityInspectionByObjId(Long objId); + + /** + * 查询质检记录管理列表 + * + * @param reportQualityInspection 质检记录管理 + * @return 质检记录管理集合 + */ + public List selectReportQualityInspectionList(ReportQualityInspection reportQualityInspection); + + /** + * 新增质检记录管理 + * + * @param reportQualityInspection 质检记录管理 + * @return 结果 + */ + public int insertReportQualityInspection(ReportQualityInspection reportQualityInspection); + + /** + * 修改质检记录管理 + * + * @param reportQualityInspection 质检记录管理 + * @return 结果 + */ + public int updateReportQualityInspection(ReportQualityInspection reportQualityInspection); + + /** + * 删除质检记录管理 + * + * @param objId 质检记录管理主键 + * @return 结果 + */ + public int deleteReportQualityInspectionByObjId(Long objId); + + /** + * 批量删除质检记录管理 + * + * @param objIds 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteReportQualityInspectionByObjIds(Long[] objIds); +} diff --git a/aucma-report/src/main/java/com/aucma/report/service/IReportQualityInspectionService.java b/aucma-report/src/main/java/com/aucma/report/service/IReportQualityInspectionService.java new file mode 100644 index 0000000..28ace91 --- /dev/null +++ b/aucma-report/src/main/java/com/aucma/report/service/IReportQualityInspectionService.java @@ -0,0 +1,61 @@ +package com.aucma.report.service; + +import java.util.List; +import com.aucma.report.domain.ReportQualityInspection; + +/** + * 质检记录管理Service接口 + * + * @author Yinq + * @date 2023-11-21 + */ +public interface IReportQualityInspectionService +{ + /** + * 查询质检记录管理 + * + * @param objId 质检记录管理主键 + * @return 质检记录管理 + */ + public ReportQualityInspection selectReportQualityInspectionByObjId(Long objId); + + /** + * 查询质检记录管理列表 + * + * @param reportQualityInspection 质检记录管理 + * @return 质检记录管理集合 + */ + public List selectReportQualityInspectionList(ReportQualityInspection reportQualityInspection); + + /** + * 新增质检记录管理 + * + * @param reportQualityInspection 质检记录管理 + * @return 结果 + */ + public int insertReportQualityInspection(ReportQualityInspection reportQualityInspection); + + /** + * 修改质检记录管理 + * + * @param reportQualityInspection 质检记录管理 + * @return 结果 + */ + public int updateReportQualityInspection(ReportQualityInspection reportQualityInspection); + + /** + * 批量删除质检记录管理 + * + * @param objIds 需要删除的质检记录管理主键集合 + * @return 结果 + */ + public int deleteReportQualityInspectionByObjIds(Long[] objIds); + + /** + * 删除质检记录管理信息 + * + * @param objId 质检记录管理主键 + * @return 结果 + */ + public int deleteReportQualityInspectionByObjId(Long objId); +} diff --git a/aucma-report/src/main/java/com/aucma/report/service/impl/ReportQualityInspectionServiceImpl.java b/aucma-report/src/main/java/com/aucma/report/service/impl/ReportQualityInspectionServiceImpl.java new file mode 100644 index 0000000..3fe4a56 --- /dev/null +++ b/aucma-report/src/main/java/com/aucma/report/service/impl/ReportQualityInspectionServiceImpl.java @@ -0,0 +1,93 @@ +package com.aucma.report.service.impl; + +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.aucma.report.mapper.ReportQualityInspectionMapper; +import com.aucma.report.domain.ReportQualityInspection; +import com.aucma.report.service.IReportQualityInspectionService; + +/** + * 质检记录管理Service业务层处理 + * + * @author Yinq + * @date 2023-11-21 + */ +@Service +public class ReportQualityInspectionServiceImpl implements IReportQualityInspectionService +{ + @Autowired + private ReportQualityInspectionMapper reportQualityInspectionMapper; + + /** + * 查询质检记录管理 + * + * @param objId 质检记录管理主键 + * @return 质检记录管理 + */ + @Override + public ReportQualityInspection selectReportQualityInspectionByObjId(Long objId) + { + return reportQualityInspectionMapper.selectReportQualityInspectionByObjId(objId); + } + + /** + * 查询质检记录管理列表 + * + * @param reportQualityInspection 质检记录管理 + * @return 质检记录管理 + */ + @Override + public List selectReportQualityInspectionList(ReportQualityInspection reportQualityInspection) + { + return reportQualityInspectionMapper.selectReportQualityInspectionList(reportQualityInspection); + } + + /** + * 新增质检记录管理 + * + * @param reportQualityInspection 质检记录管理 + * @return 结果 + */ + @Override + public int insertReportQualityInspection(ReportQualityInspection reportQualityInspection) + { + return reportQualityInspectionMapper.insertReportQualityInspection(reportQualityInspection); + } + + /** + * 修改质检记录管理 + * + * @param reportQualityInspection 质检记录管理 + * @return 结果 + */ + @Override + public int updateReportQualityInspection(ReportQualityInspection reportQualityInspection) + { + return reportQualityInspectionMapper.updateReportQualityInspection(reportQualityInspection); + } + + /** + * 批量删除质检记录管理 + * + * @param objIds 需要删除的质检记录管理主键 + * @return 结果 + */ + @Override + public int deleteReportQualityInspectionByObjIds(Long[] objIds) + { + return reportQualityInspectionMapper.deleteReportQualityInspectionByObjIds(objIds); + } + + /** + * 删除质检记录管理信息 + * + * @param objId 质检记录管理主键 + * @return 结果 + */ + @Override + public int deleteReportQualityInspectionByObjId(Long objId) + { + return reportQualityInspectionMapper.deleteReportQualityInspectionByObjId(objId); + } +} diff --git a/aucma-report/src/main/resources/mapper/report/ReportQualityInspectionMapper.xml b/aucma-report/src/main/resources/mapper/report/ReportQualityInspectionMapper.xml new file mode 100644 index 0000000..fab4a47 --- /dev/null +++ b/aucma-report/src/main/resources/mapper/report/ReportQualityInspectionMapper.xml @@ -0,0 +1,170 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + select obj_id, + bar_code, + material_name, + process_code, + test_item_code, + quality_defect_code, + quality_defect_name, + treatment_measure, + process_result, + is_lower_line, + group_code, + inspector_code, + inspector_time, + rework_number, + finish_time, + is_flag, + updated_by, + updated_time + from report_quality_inspection + + + + + + + + + SELECT seq_report_quality_inspection.NEXTVAL as objId FROM DUAL + + insert into report_quality_inspection + + obj_id, + bar_code, + material_name, + process_code, + test_item_code, + quality_defect_code, + quality_defect_name, + treatment_measure, + process_result, + is_lower_line, + group_code, + inspector_code, + inspector_time, + rework_number, + finish_time, + is_flag, + updated_by, + updated_time, + + + #{objId}, + #{barCode}, + #{materialName}, + #{processCode}, + #{testItemCode}, + #{qualityDefectCode}, + #{qualityDefectName}, + #{treatmentMeasure}, + #{processResult}, + #{isLowerLine}, + #{groupCode}, + #{inspectorCode}, + #{inspectorTime}, + #{reworkNumber}, + #{finishTime}, + #{isFlag}, + #{updatedBy}, + #{updatedTime}, + + + + + update report_quality_inspection + + bar_code = #{barCode}, + material_name = #{materialName}, + process_code = #{processCode}, + test_item_code = #{testItemCode}, + quality_defect_code = #{qualityDefectCode}, + quality_defect_name = #{qualityDefectName}, + treatment_measure = #{treatmentMeasure}, + process_result = #{processResult}, + is_lower_line = #{isLowerLine}, + group_code = #{groupCode}, + inspector_code = #{inspectorCode}, + inspector_time = #{inspectorTime}, + rework_number = #{reworkNumber}, + finish_time = #{finishTime}, + is_flag = #{isFlag}, + updated_by = #{updatedBy}, + updated_time = #{updatedTime}, + + where obj_id = #{objId} + + + + delete + from report_quality_inspection + where obj_id = #{objId} + + + + delete from report_quality_inspection where obj_id in + + #{objId} + + + \ No newline at end of file