diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/domain/ProcessIssueRecord.java b/ruoyi-admin/src/main/java/com/ruoyi/system/domain/ProcessIssueRecord.java new file mode 100644 index 00000000..49a59141 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/domain/ProcessIssueRecord.java @@ -0,0 +1,201 @@ +package com.ruoyi.system.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.ruoyi.common.annotation.Excel; +import com.ruoyi.common.core.domain.BaseEntity; + +/** + * 设备履历-问题清单列对象 process_issue_record + * + * @author ruoyi + * @date 2024-11-05 + */ +public class ProcessIssueRecord extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 主键 */ + private Long id; + + //生产订单号 + private String makeNo; + + //料号 + private String materialNo; + + /** 出货设备id */ + private String shippingDeviceId; + + /** 追踪码 */ + private String serialNo; + + /** 工序 */ + @Excel(name = "工序",sort = 1) + private String process; + + /** 异常时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "异常时间", dateFormat = "yyyy-MM-dd",sort = 2) + private Date abnormalTime; + + /** 问题描述 */ + @Excel(name = "问题描述",sort = 3) + private String questionDescribe; + + /** 解决办法 */ + @Excel(name = "解决办法",sort = 4) + private String solution; + + /** 解决时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "解决时间", dateFormat = "yyyy-MM-dd",sort = 5) + private Date resolveTime; + + @Excel(name = "记录人",sort = 6) + private String createBy; + + /** 审核人 */ + @Excel(name = "审核人",sort = 7) + private String approveBy; + + @Excel(name = "备注",sort = 8) + private String remark; + + public void setId(Long id) + { + this.id = id; + } + + public Long getId() + { + return id; + } + public void setShippingDeviceId(String shippingDeviceId) + { + this.shippingDeviceId = shippingDeviceId; + } + + public String getShippingDeviceId() + { + return shippingDeviceId; + } + public void setSerialNo(String serialNo) + { + this.serialNo = serialNo; + } + + public String getSerialNo() + { + return serialNo; + } + public void setProcess(String process) + { + this.process = process; + } + + public String getProcess() + { + return process; + } + public void setAbnormalTime(Date abnormalTime) + { + this.abnormalTime = abnormalTime; + } + + public Date getAbnormalTime() + { + return abnormalTime; + } + public void setQuestionDescribe(String questionDescribe) + { + this.questionDescribe = questionDescribe; + } + + public String getQuestionDescribe() + { + return questionDescribe; + } + public void setSolution(String solution) + { + this.solution = solution; + } + + public String getSolution() + { + return solution; + } + public void setResolveTime(Date resolveTime) + { + this.resolveTime = resolveTime; + } + + public Date getResolveTime() + { + return resolveTime; + } + public void setApproveBy(String approveBy) + { + this.approveBy = approveBy; + } + + public String getApproveBy() + { + return approveBy; + } + + @Override + public String getCreateBy() { + return createBy; + } + + @Override + public void setCreateBy(String createBy) { + this.createBy = createBy; + } + + @Override + public String getRemark() { + return remark; + } + + @Override + public void setRemark(String remark) { + this.remark = remark; + } + + public String getMakeNo() { + return makeNo; + } + + public void setMakeNo(String makeNo) { + this.makeNo = makeNo; + } + + public String getMaterialNo() { + return materialNo; + } + + public void setMaterialNo(String materialNo) { + this.materialNo = materialNo; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("shippingDeviceId", getShippingDeviceId()) + .append("serialNo", getSerialNo()) + .append("process", getProcess()) + .append("abnormalTime", getAbnormalTime()) + .append("questionDescribe", getQuestionDescribe()) + .append("solution", getSolution()) + .append("resolveTime", getResolveTime()) + .append("createBy", getCreateBy()) + .append("approveBy", getApproveBy()) + .append("remark", getRemark()) + .toString(); + } +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/mapper/ProcessIssueRecordMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/system/mapper/ProcessIssueRecordMapper.java new file mode 100644 index 00000000..ab97a04c --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/mapper/ProcessIssueRecordMapper.java @@ -0,0 +1,79 @@ +package com.ruoyi.system.mapper; + +import java.util.List; +import com.ruoyi.system.domain.ProcessIssueRecord; + +/** + * 设备履历-问题清单列Mapper接口 + * + * @author ruoyi + * @date 2024-11-05 + */ +public interface ProcessIssueRecordMapper +{ + /** + * 查询设备履历-问题清单列 + * + * @param id 设备履历-问题清单列ID + * @return 设备履历-问题清单列 + */ + public ProcessIssueRecord selectProcessIssueRecordById(Long id); + + /** + * 查询设备履历-问题清单列列表 + * + * @param processIssueRecord 设备履历-问题清单列 + * @return 设备履历-问题清单列集合 + */ + public List selectProcessIssueRecordList(ProcessIssueRecord processIssueRecord); + + /** + * 新增设备履历-问题清单列 + * + * @param processIssueRecord 设备履历-问题清单列 + * @return 结果 + */ + public int insertProcessIssueRecord(ProcessIssueRecord processIssueRecord); + + /** + * 修改设备履历-问题清单列 + * + * @param processIssueRecord 设备履历-问题清单列 + * @return 结果 + */ + public int updateProcessIssueRecord(ProcessIssueRecord processIssueRecord); + + /** + * 删除设备履历-问题清单列 + * + * @param id 设备履历-问题清单列ID + * @return 结果 + */ + public int deleteProcessIssueRecordById(Long id); + + /** + * 批量删除设备履历-问题清单列 + * + * @param ids 需要删除的数据ID + * @return 结果 + */ + public int deleteProcessIssueRecordByIds(String[] ids); + + /** + * 作废设备履历-问题清单列 + * + * @param id 设备履历-问题清单列ID + * @return 结果 + */ + public int cancelProcessIssueRecordById(Long id); + + /** + * 恢复设备履历-问题清单列 + * + * @param id 设备履历-问题清单列ID + * @return 结果 + */ + public int restoreProcessIssueRecordById(Long id); + + public int removeProcessIssueRecord(ProcessIssueRecord processIssueRecord); +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/service/IProcessIssueRecordService.java b/ruoyi-admin/src/main/java/com/ruoyi/system/service/IProcessIssueRecordService.java new file mode 100644 index 00000000..5e977392 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/service/IProcessIssueRecordService.java @@ -0,0 +1,80 @@ +package com.ruoyi.system.service; + +import java.util.List; +import com.ruoyi.system.domain.ProcessIssueRecord; + +/** + * 设备履历-问题清单列Service接口 + * + * @author ruoyi + * @date 2024-11-05 + */ +public interface IProcessIssueRecordService +{ + /** + * 查询设备履历-问题清单列 + * + * @param id 设备履历-问题清单列ID + * @return 设备履历-问题清单列 + */ + public ProcessIssueRecord selectProcessIssueRecordById(Long id); + + /** + * 查询设备履历-问题清单列列表 + * + * @param processIssueRecord 设备履历-问题清单列 + * @return 设备履历-问题清单列集合 + */ + public List selectProcessIssueRecordList(ProcessIssueRecord processIssueRecord); + + /** + * 新增设备履历-问题清单列 + * + * @param processIssueRecord 设备履历-问题清单列 + * @return 结果 + */ + public int insertProcessIssueRecord(ProcessIssueRecord processIssueRecord); + + /** + * 修改设备履历-问题清单列 + * + * @param processIssueRecord 设备履历-问题清单列 + * @return 结果 + */ + public int updateProcessIssueRecord(ProcessIssueRecord processIssueRecord); + + /** + * 批量删除设备履历-问题清单列 + * + * @param ids 需要删除的数据ID + * @return 结果 + */ + public int deleteProcessIssueRecordByIds(String ids); + + /** + * 删除设备履历-问题清单列信息 + * + * @param id 设备履历-问题清单列ID + * @return 结果 + */ + public int deleteProcessIssueRecordById(Long id); + + /** + * 作废设备履历-问题清单列 + * @param id 设备履历-问题清单列ID + * @return + */ + int cancelProcessIssueRecordById(Long id); + + /** + * 恢复设备履历-问题清单列 + * @param id 设备履历-问题清单列ID + * @return + */ + int restoreProcessIssueRecordById(Long id); + + public String importProcessIssueRecord(String serialNo,String materialNo,String makeNo,List processIssueRecords); + + public int removeProcessIssueRecord(ProcessIssueRecord processIssueRecord); + +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/ProcessIssueRecordServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/ProcessIssueRecordServiceImpl.java new file mode 100644 index 00000000..4c63be99 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/ProcessIssueRecordServiceImpl.java @@ -0,0 +1,154 @@ +package com.ruoyi.system.service.impl; + +import java.util.List; + +import com.ruoyi.aftersales.domain.AfterSalesShippingDevice; +import com.ruoyi.aftersales.mapper.AfterSalesShippingDeviceMapper; +import com.ruoyi.common.exception.BusinessException; +import com.ruoyi.common.utils.DateUtils; +import com.ruoyi.common.utils.ShiroUtils; +import com.ruoyi.common.utils.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.ruoyi.system.mapper.ProcessIssueRecordMapper; +import com.ruoyi.system.domain.ProcessIssueRecord; +import com.ruoyi.system.service.IProcessIssueRecordService; +import com.ruoyi.common.core.text.Convert; + +/** + * 设备履历-问题清单列Service业务层处理 + * + * @author ruoyi + * @date 2024-11-05 + */ +@Service +public class ProcessIssueRecordServiceImpl implements IProcessIssueRecordService +{ + @Autowired + private ProcessIssueRecordMapper processIssueRecordMapper; + + @Autowired + private AfterSalesShippingDeviceMapper shippingDeviceMapper; + + /** + * 查询设备履历-问题清单列 + * + * @param id 设备履历-问题清单列ID + * @return 设备履历-问题清单列 + */ + @Override + public ProcessIssueRecord selectProcessIssueRecordById(Long id) + { + return processIssueRecordMapper.selectProcessIssueRecordById(id); + } + + /** + * 查询设备履历-问题清单列列表 + * + * @param processIssueRecord 设备履历-问题清单列 + * @return 设备履历-问题清单列 + */ + @Override + public List selectProcessIssueRecordList(ProcessIssueRecord processIssueRecord) + { + return processIssueRecordMapper.selectProcessIssueRecordList(processIssueRecord); + } + + /** + * 新增设备履历-问题清单列 + * + * @param processIssueRecord 设备履历-问题清单列 + * @return 结果 + */ + @Override + public int insertProcessIssueRecord(ProcessIssueRecord processIssueRecord) + { + String loginName = ShiroUtils.getLoginName(); + processIssueRecord.setCreateBy(loginName); + return processIssueRecordMapper.insertProcessIssueRecord(processIssueRecord); + } + + /** + * 修改设备履历-问题清单列 + * + * @param processIssueRecord 设备履历-问题清单列 + * @return 结果 + */ + @Override + public int updateProcessIssueRecord(ProcessIssueRecord processIssueRecord) + { + return processIssueRecordMapper.updateProcessIssueRecord(processIssueRecord); + } + + /** + * 删除设备履历-问题清单列对象 + * + * @param ids 需要删除的数据ID + * @return 结果 + */ + @Override + public int deleteProcessIssueRecordByIds(String ids) + { + return processIssueRecordMapper.deleteProcessIssueRecordByIds(Convert.toStrArray(ids)); + } + + /** + * 删除设备履历-问题清单列信息 + * + * @param id 设备履历-问题清单列ID + * @return 结果 + */ + @Override + public int deleteProcessIssueRecordById(Long id) + { + return processIssueRecordMapper.deleteProcessIssueRecordById(id); + } + + /** + * 作废设备履历-问题清单列 + * + * @param id 设备履历-问题清单列ID + * @return 结果 + */ + @Override + public int cancelProcessIssueRecordById(Long id) + { + return processIssueRecordMapper.cancelProcessIssueRecordById(id); + } + + /** + * 恢复设备履历-问题清单列信息 + * + * @param id 设备履历-问题清单列ID + * @return 结果 + */ + @Override + public int restoreProcessIssueRecordById(Long id) + { + return processIssueRecordMapper.restoreProcessIssueRecordById(id); + } + + @Override + public String importProcessIssueRecord(String serialNo,String materialNo,String makeNo,List processIssueRecords) { + if(StringUtils.isEmpty(processIssueRecords)){ + throw new BusinessException("工序问题记录为空!"); + } + for (int i=0;i + + + + + + + + + + + + + + + + + + + + + + select id, shipping_device_id, serial_no, process, abnormal_time, question_describe, solution, resolve_time, create_by, approve_by, remark, material_no, make_no from process_issue_record + + + + + + + + insert into process_issue_record + + shipping_device_id, + serial_no, + process, + abnormal_time, + question_describe, + solution, + resolve_time, + create_by, + create_time, + approve_by, + remark, + material_no, + make_no, + + + #{shippingDeviceId}, + #{serialNo}, + #{process}, + #{abnormalTime}, + #{questionDescribe}, + #{solution}, + #{resolveTime}, + #{createBy}, + #{createTime}, + #{approveBy}, + #{remark}, + #{materialNo}, + #{makeNo}, + + + + + update process_issue_record + + shipping_device_id = #{shippingDeviceId}, + serial_no = #{serialNo}, + process = #{process}, + abnormal_time = #{abnormalTime}, + question_describe = #{questionDescribe}, + solution = #{solution}, + resolve_time = #{resolveTime}, + create_by = #{createBy}, + create_time = #{createTime}, + approve_by = #{approveBy}, + remark = #{remark}, + material_no = #{materialNo}, + make_no = #{makeNo}, + + where id = #{id} + + + + delete from process_issue_record where id = #{id} + + + + delete from process_issue_record where id in + + #{id} + + + + + update process_issue_record set del_flag = '1' where id = #{id} + + + + update process_issue_record set del_flag = '0' where id = #{id} + + + + delete from process_issue_record + + and serial_no = #{serialNo} + and material_no = #{materialNo} + and make_no = #{makeNo} + + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/system/makeorder/cgsh.html b/ruoyi-admin/src/main/resources/templates/system/makeorder/cgsh.html new file mode 100644 index 00000000..828b4e46 --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/system/makeorder/cgsh.html @@ -0,0 +1,217 @@ + + + + + + + + +
+
+ +
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+ +
+
+
+
+
+
+
+ +
+
+ + + + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/system/makeorder/editMakeOrderBom.html b/ruoyi-admin/src/main/resources/templates/system/makeorder/editMakeOrderBom.html new file mode 100644 index 00000000..4bfb76c5 --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/system/makeorder/editMakeOrderBom.html @@ -0,0 +1,421 @@ + + + + + + + + +
+
+ + + + +
+ + +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+ +
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+
+
+
+
+
+ + + + + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/system/makeorder/showRecords.html b/ruoyi-admin/src/main/resources/templates/system/makeorder/showRecords.html new file mode 100644 index 00000000..afcdffd6 --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/system/makeorder/showRecords.html @@ -0,0 +1,67 @@ + + + + + + +
+
+
+
+
+
+
+ + + + + \ No newline at end of file