Selaa lähdekoodia

添加模具履历列表,修改设备报警,模具维保列表

dkk 4 kuukautta sitten
vanhempi
commit
db173a6ec7

+ 15 - 0
src/main/java/com/jeesite/modules/mes/dao/MesMoldResumeDao.java

@@ -0,0 +1,15 @@
+package com.jeesite.modules.mes.dao;
+
+import com.jeesite.common.dao.CrudDao;
+import com.jeesite.common.mybatis.annotation.MyBatisDao;
+import com.jeesite.modules.mes.entity.MesMoldResume;
+
+/**
+ * 模具履历DAO接口
+ * @author mes
+ * @version 2026-06-27
+ */
+@MyBatisDao
+public interface MesMoldResumeDao extends CrudDao<MesMoldResume> {
+
+}

+ 62 - 2
src/main/java/com/jeesite/modules/mes/entity/MesDeviceAlarm.java

@@ -3,8 +3,11 @@ package com.jeesite.modules.mes.entity;
 import javax.validation.constraints.NotBlank;
 import javax.validation.constraints.Size;
 
+import com.fasterxml.jackson.annotation.JsonFormat;
 import com.jeesite.common.entity.DataEntity;
 import com.jeesite.common.mybatis.annotation.Column;
+import com.jeesite.common.mybatis.annotation.JoinTable;
+import com.jeesite.common.mybatis.annotation.JoinTable.Type;
 import com.jeesite.common.mybatis.annotation.Table;
 import com.jeesite.common.mybatis.mapper.query.QueryType;
 
@@ -18,23 +21,39 @@ import java.util.Date;
 @Table(name="mes_device_alarm", alias="a", label="设备报警记录信息", columns={
 		@Column(name="id", attrName="id", label="id", isPK=true),
 		@Column(name="device_sn", attrName="deviceSn", label="设备编号"),
+		@Column(name="device_id", attrName="deviceId", label="报警设备"),
 		@Column(name="type", attrName="type", label="报警类型"),
 		@Column(name="content", attrName="content", label="报警额外参数", isQuery=false),
 		@Column(name="state", attrName="state", label="状态"),
+		@Column(name="fault_time", attrName="faultTime", label="故障发生时间", isUpdateForce=true),
+		@Column(name="recovery_time", attrName="recoveryTime", label="恢复生产时间", isUpdateForce=true),
 		@Column(name="remark", attrName="remark", label="备注"),
 		@Column(name="create_by", attrName="createBy", label="create_by", isUpdate=false, isQuery=false),
 		@Column(name="create_date", attrName="createDate", label="创建时间", isUpdate=false, isUpdateForce=true),
 		@Column(name="update_by", attrName="updateBy", label="update_by", isQuery=false),
 		@Column(name="update_date", attrName="updateDate", label="处理时间", isQuery=false, isUpdateForce=true),
+	}, joinTable={
+		@JoinTable(type=Type.LEFT_JOIN, entity=MesDevice.class, attrName="device", alias="b",
+				on="a.device_id = b.tree_code", columns={
+				@Column(name="tree_name", attrName="deviceName", label="报警设备名称", isQuery=false),
+				@Column(name="sn", attrName="deviceOnlySn", label="设备唯一编号", isQuery=false),
+		}),
 	}, orderBy="a.update_date DESC"
 )
 public class MesDeviceAlarm extends DataEntity<MesDeviceAlarm> {
-	
+
 	private static final long serialVersionUID = 1L;
 	private String deviceSn;		// 设备编号
+	private String deviceId;		// 报警设备(设备结构ID,外键关联 mes_device.tree_code)
+	private String deviceName;		// 报警设备名称(关联查询)
+	private String deviceOnlySn;		// 设备唯一编号(关联查询 mes_device.sn)
 	private String type;		// 报警类型
 	private String content;		// 报警额外参数
 	private String state;		// 状态
+	@JsonFormat(pattern = "yyyy-MM-dd HH:mm")
+	private Date faultTime;		// 故障发生时间
+	@JsonFormat(pattern = "yyyy-MM-dd HH:mm")
+	private Date recoveryTime;		// 恢复生产时间
 	private String remark;		// 备注
 
 	public MesDeviceAlarm() {
@@ -54,7 +73,32 @@ public class MesDeviceAlarm extends DataEntity<MesDeviceAlarm> {
 	public void setDeviceSn(String deviceSn) {
 		this.deviceSn = deviceSn;
 	}
-	
+
+	@Size(min=0, max=64, message="报警设备长度不能超过 64 个字符")
+	public String getDeviceId() {
+		return deviceId;
+	}
+
+	public void setDeviceId(String deviceId) {
+		this.deviceId = deviceId;
+	}
+
+	public String getDeviceName() {
+		return deviceName;
+	}
+
+	public void setDeviceName(String deviceName) {
+		this.deviceName = deviceName;
+	}
+
+	public String getDeviceOnlySn() {
+		return deviceOnlySn;
+	}
+
+	public void setDeviceOnlySn(String deviceOnlySn) {
+		this.deviceOnlySn = deviceOnlySn;
+	}
+
 	@NotBlank(message="报警类型不能为空")
 	@Size(min=0, max=100, message="报警类型长度不能超过 100 个字符")
 	public String getType() {
@@ -81,6 +125,22 @@ public class MesDeviceAlarm extends DataEntity<MesDeviceAlarm> {
 	public void setState(String state) {
 		this.state = state;
 	}
+
+	public Date getFaultTime() {
+		return faultTime;
+	}
+
+	public void setFaultTime(Date faultTime) {
+		this.faultTime = faultTime;
+	}
+
+	public Date getRecoveryTime() {
+		return recoveryTime;
+	}
+
+	public void setRecoveryTime(Date recoveryTime) {
+		this.recoveryTime = recoveryTime;
+	}
 	
 	@Size(min=0, max=255, message="备注长度不能超过 255 个字符")
 	public String getRemark() {

+ 73 - 36
src/main/java/com/jeesite/modules/mes/entity/MesMoldMaintenance.java

@@ -6,38 +6,49 @@ import javax.validation.constraints.Size;
 import com.fasterxml.jackson.annotation.JsonFormat;
 import com.jeesite.common.entity.DataEntity;
 import com.jeesite.common.mybatis.annotation.Column;
+import com.jeesite.common.mybatis.annotation.JoinTable;
 import com.jeesite.common.mybatis.annotation.Table;
-import com.jeesite.common.mybatis.mapper.query.QueryType;
 
 /**
- * 模具保养Entity
+ * 模具维保Entity
  * @author mes
- * @version 2026-06-26
+ * @version 2026-06-27
  */
-@Table(name="mes_mold_maintenance", alias="a", label="模具保养信息", columns={
+@Table(name="mes_mold_maintenance", alias="a", label="模具维保信息", columns={
 		@Column(name="id", attrName="id", label="id", isPK=true),
-		@Column(name="name", attrName="name", label="名称", isQuery=true),
-		@Column(name="code", attrName="code", label="编号", isQuery=true),
-		@Column(name="maintenance_date", attrName="maintenanceDate", label="保养日期", isQuery=true),
-		@Column(name="content", attrName="content", label="保养内容"),
-		@Column(name="maintenance_user", attrName="maintenanceUser", label="保养人", isQuery=true),
-		@Column(name="maintenance_status", attrName="maintenanceStatus", label="保养状态", isQuery=true),
+		@Column(name="mold_resume_id", attrName="moldResumeId", label="模具履历"),
+		@Column(name="maintenance_date", attrName="maintenanceDate", label="维保日期", isQuery=true),
+		@Column(name="content", attrName="content", label="维保内容及过程"),
+		@Column(name="repair_type", attrName="repairType", label="修模类型", isQuery=true),
+		@Column(name="initiate_dept", attrName="initiateDept", label="发起部门"),
+		@Column(name="initiate_user", attrName="initiateUser", label="发起人", isQuery=true),
+		@Column(name="reason", attrName="reason", label="原因"),
+		@Column(name="accept_result", attrName="acceptResult", label="验收结果"),
 		@Column(name="remarks", attrName="remarks", label="备注"),
 		@Column(name="create_by", attrName="createBy", label="create_by", isUpdate=false, isQuery=false),
 		@Column(name="create_date", attrName="createDate", label="create_date", isUpdate=false, isQuery=false, isUpdateForce=true),
 		@Column(name="update_by", attrName="updateBy", label="update_by", isQuery=false),
 		@Column(name="update_date", attrName="updateDate", label="update_date", isQuery=false, isUpdateForce=true),
-}, orderBy="a.maintenance_date DESC"
+}, joinTable={
+		@JoinTable(type= JoinTable.Type.LEFT_JOIN, entity=MesMoldResume.class, attrName="this", alias="b",
+				on="a.mold_resume_id = b.id",
+				columns={
+						@Column(name="mold_name", attrName="moldName", label="模具名称", isQuery=true),
+				}),
+}, orderBy="a.update_date DESC"
 )
 public class MesMoldMaintenance extends DataEntity<MesMoldMaintenance> {
 
 	private static final long serialVersionUID = 1L;
-	private String name;				// 名称
-	private String code;				// 编号
-	private Date maintenanceDate;		// 保养日期
-	private String content;				// 保养内容
-	private String maintenanceUser;		// 保养人
-	private String maintenanceStatus;	// 保养状态
+	private String moldResumeId;		// 模具履历ID
+	private String moldName;			// 模具名称(关联模具履历表)
+	private Date maintenanceDate;		// 维保日期
+	private String content;				// 维保内容及过程
+	private String repairType;			// 修模类型
+	private String initiateDept;		// 发起部门
+	private String initiateUser;		// 发起人
+	private String reason;				// 原因
+	private String acceptResult;		// 验收结果
 
 	public MesMoldMaintenance() {
 		this(null);
@@ -47,22 +58,21 @@ public class MesMoldMaintenance extends DataEntity<MesMoldMaintenance> {
 		super(id);
 	}
 
-	@Size(min=0, max=255, message="名称长度不能超过 255 个字符")
-	public String getName() {
-		return name;
+	public String getMoldResumeId() {
+		return moldResumeId;
 	}
 
-	public void setName(String name) {
-		this.name = name;
+	public void setMoldResumeId(String moldResumeId) {
+		this.moldResumeId = moldResumeId;
 	}
 
-	@Size(min=0, max=100, message="编号长度不能超过 100 个字符")
-	public String getCode() {
-		return code;
+	@Size(min=0, max=255, message="模具名称长度不能超过 255 个字符")
+	public String getMoldName() {
+		return moldName;
 	}
 
-	public void setCode(String code) {
-		this.code = code;
+	public void setMoldName(String moldName) {
+		this.moldName = moldName;
 	}
 
 	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@@ -82,20 +92,47 @@ public class MesMoldMaintenance extends DataEntity<MesMoldMaintenance> {
 		this.content = content;
 	}
 
-	@Size(min=0, max=100, message="保养人长度不能超过 100 个字符")
-	public String getMaintenanceUser() {
-		return maintenanceUser;
+	@Size(min=0, max=100, message="修模类型长度不能超过 100 个字符")
+	public String getRepairType() {
+		return repairType;
 	}
 
-	public void setMaintenanceUser(String maintenanceUser) {
-		this.maintenanceUser = maintenanceUser;
+	public void setRepairType(String repairType) {
+		this.repairType = repairType;
 	}
 
-	public String getMaintenanceStatus() {
-		return maintenanceStatus;
+	@Size(min=0, max=100, message="发起部门长度不能超过 100 个字符")
+	public String getInitiateDept() {
+		return initiateDept;
 	}
 
-	public void setMaintenanceStatus(String maintenanceStatus) {
-		this.maintenanceStatus = maintenanceStatus;
+	public void setInitiateDept(String initiateDept) {
+		this.initiateDept = initiateDept;
+	}
+
+	@Size(min=0, max=100, message="发起人长度不能超过 100 个字符")
+	public String getInitiateUser() {
+		return initiateUser;
+	}
+
+	public void setInitiateUser(String initiateUser) {
+		this.initiateUser = initiateUser;
+	}
+
+	public String getReason() {
+		return reason;
+	}
+
+	public void setReason(String reason) {
+		this.reason = reason;
+	}
+
+	@Size(min=0, max=100, message="验收结果长度不能超过 100 个字符")
+	public String getAcceptResult() {
+		return acceptResult;
+	}
+
+	public void setAcceptResult(String acceptResult) {
+		this.acceptResult = acceptResult;
 	}
 }

+ 156 - 0
src/main/java/com/jeesite/modules/mes/entity/MesMoldResume.java

@@ -0,0 +1,156 @@
+package com.jeesite.modules.mes.entity;
+
+import java.util.Date;
+import javax.validation.constraints.Size;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.jeesite.common.entity.DataEntity;
+import com.jeesite.common.mybatis.annotation.Column;
+import com.jeesite.common.mybatis.annotation.Table;
+
+/**
+ * 模具履历Entity
+ * @author mes
+ * @version 2026-06-27
+ */
+@Table(name="mes_mold_resume", alias="a", label="模具履历信息", columns={
+		@Column(name="id", attrName="id", label="id", isPK=true),
+		@Column(name="mold_name", attrName="moldName", label="模具名称", isQuery=true),
+		@Column(name="mold_code", attrName="moldCode", label="模具编号", isQuery=true),
+		@Column(name="cavity_number", attrName="cavityNumber", label="模具穴数"),
+		@Column(name="entry_date", attrName="entryDate", label="进厂日期", isQuery=true),
+		@Column(name="manufacturer", attrName="manufacturer", label="制造厂家", isQuery=true),
+		@Column(name="product_name", attrName="productName", label="产品名称", isQuery=true),
+		@Column(name="product_drawing_no", attrName="productDrawingNo", label="产品图号"),
+		@Column(name="design_life", attrName="designLife", label="设计寿命"),
+		@Column(name="mold_size", attrName="moldSize", label="模具尺寸"),
+		@Column(name="applicable_machine", attrName="applicableMachine", label="适用机台"),
+		@Column(name="product_weight", attrName="productWeight", label="产品重量"),
+		@Column(name="remarks", attrName="remarks", label="备注"),
+		@Column(name="create_by", attrName="createBy", label="create_by", isUpdate=false, isQuery=false),
+		@Column(name="create_date", attrName="createDate", label="create_date", isUpdate=false, isQuery=false, isUpdateForce=true),
+		@Column(name="update_by", attrName="updateBy", label="update_by", isQuery=false),
+		@Column(name="update_date", attrName="updateDate", label="update_date", isQuery=false, isUpdateForce=true),
+}, orderBy="a.update_date DESC"
+)
+public class MesMoldResume extends DataEntity<MesMoldResume> {
+
+	private static final long serialVersionUID = 1L;
+	private String moldName;				// 模具名称
+	private String moldCode;				// 模具编号
+	private Integer cavityNumber;			// 模具穴数
+	private Date entryDate;					// 进厂日期
+	private String manufacturer;			// 制造厂家
+	private String productName;				// 产品名称
+	private String productDrawingNo;		// 产品图号
+	private String designLife;				// 设计寿命
+	private String moldSize;				// 模具尺寸
+	private String applicableMachine;		// 适用机台
+	private String productWeight;			// 产品重量
+
+	public MesMoldResume() {
+		this(null);
+	}
+
+	public MesMoldResume(String id){
+		super(id);
+	}
+
+	@Size(min=0, max=255, message="模具名称长度不能超过 255 个字符")
+	public String getMoldName() {
+		return moldName;
+	}
+
+	public void setMoldName(String moldName) {
+		this.moldName = moldName;
+	}
+
+	@Size(min=0, max=100, message="模具编号长度不能超过 100 个字符")
+	public String getMoldCode() {
+		return moldCode;
+	}
+
+	public void setMoldCode(String moldCode) {
+		this.moldCode = moldCode;
+	}
+
+	public Integer getCavityNumber() {
+		return cavityNumber;
+	}
+
+	public void setCavityNumber(Integer cavityNumber) {
+		this.cavityNumber = cavityNumber;
+	}
+
+	@JsonFormat(pattern = "yyyy-MM-dd")
+	public Date getEntryDate() {
+		return entryDate;
+	}
+
+	public void setEntryDate(Date entryDate) {
+		this.entryDate = entryDate;
+	}
+
+	@Size(min=0, max=255, message="制造厂家长度不能超过 255 个字符")
+	public String getManufacturer() {
+		return manufacturer;
+	}
+
+	public void setManufacturer(String manufacturer) {
+		this.manufacturer = manufacturer;
+	}
+
+	@Size(min=0, max=255, message="产品名称长度不能超过 255 个字符")
+	public String getProductName() {
+		return productName;
+	}
+
+	public void setProductName(String productName) {
+		this.productName = productName;
+	}
+
+	@Size(min=0, max=100, message="产品图号长度不能超过 100 个字符")
+	public String getProductDrawingNo() {
+		return productDrawingNo;
+	}
+
+	public void setProductDrawingNo(String productDrawingNo) {
+		this.productDrawingNo = productDrawingNo;
+	}
+
+	@Size(min=0, max=100, message="设计寿命长度不能超过 100 个字符")
+	public String getDesignLife() {
+		return designLife;
+	}
+
+	public void setDesignLife(String designLife) {
+		this.designLife = designLife;
+	}
+
+	@Size(min=0, max=255, message="模具尺寸长度不能超过 255 个字符")
+	public String getMoldSize() {
+		return moldSize;
+	}
+
+	public void setMoldSize(String moldSize) {
+		this.moldSize = moldSize;
+	}
+
+	@Size(min=0, max=100, message="适用机台长度不能超过 100 个字符")
+	public String getApplicableMachine() {
+		return applicableMachine;
+	}
+
+	public void setApplicableMachine(String applicableMachine) {
+		this.applicableMachine = applicableMachine;
+	}
+
+	@Size(min=0, max=100, message="产品重量长度不能超过 100 个字符")
+	public String getProductWeight() {
+		return productWeight;
+	}
+
+	public void setProductWeight(String productWeight) {
+		this.productWeight = productWeight;
+	}
+}

+ 12 - 3
src/main/java/com/jeesite/modules/mes/service/MesMoldMaintenanceService.java

@@ -9,12 +9,14 @@ import com.jeesite.common.entity.Page;
 import com.jeesite.common.service.CrudService;
 import com.jeesite.modules.mes.entity.MesMoldMaintenance;
 import com.jeesite.modules.mes.dao.MesMoldMaintenanceDao;
+import com.jeesite.modules.sys.entity.Office;
+import com.jeesite.modules.sys.utils.EmpUtils;
 import com.jeesite.modules.sys.utils.UserUtils;
 
 /**
- * 模具保养Service
+ * 模具维保Service
  * @author mes
- * @version 2026-06-26
+ * @version 2026-06-27
  */
 @Service
 public class MesMoldMaintenanceService extends CrudService<MesMoldMaintenanceDao, MesMoldMaintenance> {
@@ -52,6 +54,7 @@ public class MesMoldMaintenanceService extends CrudService<MesMoldMaintenanceDao
 
 	/**
 	 * 保存数据(插入或更新)
+	 * 发起部门和发起人从后端当前登录用户获取
 	 * @param mesMoldMaintenance
 	 */
 	@Override
@@ -59,7 +62,13 @@ public class MesMoldMaintenanceService extends CrudService<MesMoldMaintenanceDao
 	public void save(MesMoldMaintenance mesMoldMaintenance) {
 		if (mesMoldMaintenance.getIsNewRecord()) {
 			mesMoldMaintenance.setMaintenanceDate(new Date());
-			mesMoldMaintenance.setMaintenanceUser(UserUtils.getUser().getUserName());
+			// 发起人取当前登录用户
+			mesMoldMaintenance.setInitiateUser(UserUtils.getUser().getUserName());
+			// 发起部门取当前登录用户所属机构
+			Office office = EmpUtils.getOffice();
+			if (office != null) {
+				mesMoldMaintenance.setInitiateDept(office.getOfficeName());
+			}
 		}
 		super.save(mesMoldMaintenance);
 	}

+ 81 - 0
src/main/java/com/jeesite/modules/mes/service/MesMoldResumeService.java

@@ -0,0 +1,81 @@
+package com.jeesite.modules.mes.service;
+
+import java.util.List;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import com.jeesite.common.entity.Page;
+import com.jeesite.common.service.CrudService;
+import com.jeesite.modules.mes.entity.MesMoldResume;
+import com.jeesite.modules.mes.dao.MesMoldResumeDao;
+
+/**
+ * 模具履历Service
+ * @author mes
+ * @version 2026-06-27
+ */
+@Service
+public class MesMoldResumeService extends CrudService<MesMoldResumeDao, MesMoldResume> {
+
+	/**
+	 * 获取单条数据
+	 * @param mesMoldResume
+	 * @return
+	 */
+	@Override
+	public MesMoldResume get(MesMoldResume mesMoldResume) {
+		return super.get(mesMoldResume);
+	}
+
+	/**
+	 * 查询分页数据
+	 * @param mesMoldResume 查询条件
+	 * @param mesMoldResume.page 分页对象
+	 * @return
+	 */
+	@Override
+	public Page<MesMoldResume> findPage(MesMoldResume mesMoldResume) {
+		return super.findPage(mesMoldResume);
+	}
+
+	/**
+	 * 查询列表数据
+	 * @param mesMoldResume
+	 * @return
+	 */
+	@Override
+	public List<MesMoldResume> findList(MesMoldResume mesMoldResume) {
+		return super.findList(mesMoldResume);
+	}
+
+	/**
+	 * 保存数据(插入或更新)
+	 * @param mesMoldResume
+	 */
+	@Override
+	@Transactional
+	public void save(MesMoldResume mesMoldResume) {
+		super.save(mesMoldResume);
+	}
+
+	/**
+	 * 更新状态
+	 * @param mesMoldResume
+	 */
+	@Override
+	@Transactional
+	public void updateStatus(MesMoldResume mesMoldResume) {
+		super.updateStatus(mesMoldResume);
+	}
+
+	/**
+	 * 删除数据
+	 * @param mesMoldResume
+	 */
+	@Override
+	@Transactional
+	public void delete(MesMoldResume mesMoldResume) {
+		super.delete(mesMoldResume);
+	}
+
+}

+ 2 - 0
src/main/java/com/jeesite/modules/mes/web/MesDeviceAlarmController.java

@@ -55,6 +55,7 @@ public class MesDeviceAlarmController extends BaseController {
 	@RequiresPermissions("mes:mesDeviceAlarm:view")
 	@RequestMapping(value = {"list", ""})
 	public String list(MesDeviceAlarm mesDeviceAlarm, Model model) {
+		model.addAttribute("deviceList", mesDeviceService.findList(new MesDevice()));
 		model.addAttribute("mesDeviceAlarm", mesDeviceAlarm);
 		return "modules/mes/mesDeviceAlarmList";
 	}
@@ -77,6 +78,7 @@ public class MesDeviceAlarmController extends BaseController {
 	@RequiresPermissions("mes:mesDeviceAlarm:view")
 	@RequestMapping(value = "form")
 	public String form(MesDeviceAlarm mesDeviceAlarm, Model model) {
+		model.addAttribute("deviceList", mesDeviceService.findList(new MesDevice()));
 		model.addAttribute("mesDeviceAlarm", mesDeviceAlarm);
 		return "modules/mes/mesDeviceAlarmForm";
 	}

+ 1 - 1
src/main/java/com/jeesite/modules/mes/web/MesMaterialRkController.java

@@ -52,7 +52,7 @@ public class MesMaterialRkController extends BaseController {
 	 * 获取数据
 	 */
 	@ModelAttribute
-	public MesMaterialRk get(String id, boolean isNewRecord) {
+	public MesMaterialRk get(String id, boolean isNewRecord)  {
 		return mesMaterialRkService.get(id, isNewRecord);
 	}
 

+ 13 - 4
src/main/java/com/jeesite/modules/mes/web/MesMoldMaintenanceController.java

@@ -1,5 +1,6 @@
 package com.jeesite.modules.mes.web;
 
+import java.util.List;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
@@ -17,12 +18,14 @@ import com.jeesite.common.config.Global;
 import com.jeesite.common.entity.Page;
 import com.jeesite.common.web.BaseController;
 import com.jeesite.modules.mes.entity.MesMoldMaintenance;
+import com.jeesite.modules.mes.entity.MesMoldResume;
 import com.jeesite.modules.mes.service.MesMoldMaintenanceService;
+import com.jeesite.modules.mes.service.MesMoldResumeService;
 
 /**
- * 模具保养Controller
+ * 模具维保Controller
  * @author mes
- * @version 2026-06-26
+ * @version 2026-06-27
  */
 @Controller
 @RequestMapping(value = "${adminPath}/mes/mesMoldMaintenance")
@@ -31,6 +34,9 @@ public class MesMoldMaintenanceController extends BaseController {
 	@Autowired
 	private MesMoldMaintenanceService mesMoldMaintenanceService;
 
+	@Autowired
+	private MesMoldResumeService mesMoldResumeService;
+
 	/**
 	 * 获取数据
 	 */
@@ -68,6 +74,9 @@ public class MesMoldMaintenanceController extends BaseController {
 	@RequestMapping(value = "form")
 	public String form(MesMoldMaintenance mesMoldMaintenance, Model model) {
 		model.addAttribute("mesMoldMaintenance", mesMoldMaintenance);
+		// 查询模具履历列表,用于表单下拉选择模具
+		List<MesMoldResume> moldResumeList = mesMoldResumeService.findList(new MesMoldResume());
+		model.addAttribute("moldResumeList", moldResumeList);
 		return "modules/mes/mesMoldMaintenanceForm";
 	}
 
@@ -79,7 +88,7 @@ public class MesMoldMaintenanceController extends BaseController {
 	@ResponseBody
 	public String save(@Validated MesMoldMaintenance mesMoldMaintenance) {
 		mesMoldMaintenanceService.save(mesMoldMaintenance);
-		return renderResult(Global.TRUE, text("保存模具保养记录成功!"));
+		return renderResult(Global.TRUE, text("保存模具维保记录成功!"));
 	}
 
 	/**
@@ -90,7 +99,7 @@ public class MesMoldMaintenanceController extends BaseController {
 	@ResponseBody
 	public String delete(MesMoldMaintenance mesMoldMaintenance) {
 		mesMoldMaintenanceService.delete(mesMoldMaintenance);
-		return renderResult(Global.TRUE, text("删除模具保养记录成功!"));
+		return renderResult(Global.TRUE, text("删除模具维保记录成功!"));
 	}
 
 }

+ 96 - 0
src/main/java/com/jeesite/modules/mes/web/MesMoldResumeController.java

@@ -0,0 +1,96 @@
+package com.jeesite.modules.mes.web;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.Model;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.ModelAttribute;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+
+import com.jeesite.common.config.Global;
+import com.jeesite.common.entity.Page;
+import com.jeesite.common.web.BaseController;
+import com.jeesite.modules.mes.entity.MesMoldResume;
+import com.jeesite.modules.mes.service.MesMoldResumeService;
+
+/**
+ * 模具履历Controller
+ * @author mes
+ * @version 2026-06-27
+ */
+@Controller
+@RequestMapping(value = "${adminPath}/mes/mesMoldResume")
+public class MesMoldResumeController extends BaseController {
+
+	@Autowired
+	private MesMoldResumeService mesMoldResumeService;
+
+	/**
+	 * 获取数据
+	 */
+	@ModelAttribute
+	public MesMoldResume get(String id, boolean isNewRecord) {
+		return mesMoldResumeService.get(id, isNewRecord);
+	}
+
+	/**
+	 * 查询列表
+	 */
+	@RequiresPermissions("mes:mesMoldResume:view")
+	@RequestMapping(value = {"list", ""})
+	public String list(MesMoldResume mesMoldResume, Model model) {
+		model.addAttribute("mesMoldResume", mesMoldResume);
+		return "modules/mes/mesMoldResumeList";
+	}
+
+	/**
+	 * 查询列表数据
+	 */
+	@RequiresPermissions("mes:mesMoldResume:view")
+	@RequestMapping(value = "listData")
+	@ResponseBody
+	public Page<MesMoldResume> listData(MesMoldResume mesMoldResume, HttpServletRequest request, HttpServletResponse response) {
+		mesMoldResume.setPage(new Page<>(request, response));
+		Page<MesMoldResume> page = mesMoldResumeService.findPage(mesMoldResume);
+		return page;
+	}
+
+	/**
+	 * 查看编辑表单
+	 */
+	@RequiresPermissions("mes:mesMoldResume:view")
+	@RequestMapping(value = "form")
+	public String form(MesMoldResume mesMoldResume, Model model) {
+		model.addAttribute("mesMoldResume", mesMoldResume);
+		return "modules/mes/mesMoldResumeForm";
+	}
+
+	/**
+	 * 保存数据
+	 */
+	@RequiresPermissions("mes:mesMoldResume:edit")
+	@PostMapping(value = "save")
+	@ResponseBody
+	public String save(@Validated MesMoldResume mesMoldResume) {
+		mesMoldResumeService.save(mesMoldResume);
+		return renderResult(Global.TRUE, text("保存模具履历记录成功!"));
+	}
+
+	/**
+	 * 删除数据
+	 */
+	@RequiresPermissions("mes:mesMoldResume:edit")
+	@RequestMapping(value = "delete")
+	@ResponseBody
+	public String delete(MesMoldResume mesMoldResume) {
+		mesMoldResumeService.delete(mesMoldResume);
+		return renderResult(Global.TRUE, text("删除模具履历记录成功!"));
+	}
+
+}

+ 15 - 0
src/main/resources/mappings/modules/mes/MesMoldResumeDao.xml

@@ -0,0 +1,15 @@
+<?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.jeesite.modules.mes.dao.MesMoldResumeDao">
+
+	<!-- 查询数据
+	<select id="findList" resultType="MesMoldResume">
+		SELECT ${sqlMap.column.toSql()}
+		FROM ${sqlMap.table.toSql()}
+		<where>
+			${sqlMap.where.toSql()}
+		</where>
+		ORDER BY ${sqlMap.order.toSql()}
+	</select> -->
+
+</mapper>

+ 24 - 2
src/main/resources/views/modules/mes/mesDeviceAlarmForm.html

@@ -17,9 +17,9 @@
 					<div class="col-xs-6">
 						<div class="form-group">
 							<label class="control-label col-sm-4" title="">
-								<span class="required ">*</span> ${text('设备编号')}:<i class="fa icon-question hide"></i></label>
+								<span class="required ">*</span> ${text('报警设备')}:<i class="fa icon-question hide"></i></label>
 							<div class="col-sm-8">
-								<#form:input path="deviceSn" maxlength="100" class="form-control required"/>
+								<#form:select path="deviceId" blankOption="true" items="${deviceList}" itemLabel="treeName" itemValue="treeCode" class="form-control required"/>
 							</div>
 						</div>
 					</div>
@@ -48,6 +48,28 @@
 					<div class="col-xs-6">
 						<div class="form-group">
 							<label class="control-label col-sm-4" title="">
+								<span class="required hide">*</span> ${text('故障发生时间')}:<i class="fa icon-question hide"></i></label>
+							<div class="col-sm-8">
+								<#form:input path="faultTime" readonly="true" maxlength="20" class="form-control laydate"
+									dataFormat="datetime" data-type="datetime" data-format="yyyy-MM-dd HH:mm"/>
+							</div>
+						</div>
+					</div>
+					<div class="col-xs-6">
+						<div class="form-group">
+							<label class="control-label col-sm-4" title="">
+								<span class="required hide">*</span> ${text('恢复生产时间')}:<i class="fa icon-question hide"></i></label>
+							<div class="col-sm-8">
+								<#form:input path="recoveryTime" readonly="true" maxlength="20" class="form-control laydate"
+									dataFormat="datetime" data-type="datetime" data-format="yyyy-MM-dd HH:mm"/>
+							</div>
+						</div>
+					</div>
+				</div>
+				<div class="row">
+					<div class="col-xs-6">
+						<div class="form-group">
+							<label class="control-label col-sm-4" title="">
 								<span class="required hide">*</span> ${text('备注')}:<i class="fa icon-question hide"></i></label>
 							<div class="col-sm-8">
 								<#form:input path="remark" maxlength="255" class="form-control"/>

+ 10 - 2
src/main/resources/views/modules/mes/mesDeviceAlarmInfo.html

@@ -13,8 +13,8 @@
 			<div class="form-unit">${text('基本信息')}</div>
 			<table class="table table-bordered">
 				<tr>
-					<th class="mpc-header">设备编号</th>
-					<td>${mesDeviceAlarm.deviceSn}</td>
+					<th class="mpc-header">报警设备</th>
+					<td>${mesDeviceAlarm.deviceName}</td>
 				</tr>
 				<tr>
 					<th class="mpc-header">报警类型</th>
@@ -25,6 +25,14 @@
 					<td>${mesDeviceAlarm.content}</td>
 				</tr>
 				<tr>
+					<th class="mpc-header">故障发生时间</th>
+					<td>${@DateUtils.formatDate(mesDeviceAlarm.faultTime,'yyyy-MM-dd HH:mm')}</td>
+				</tr>
+				<tr>
+					<th class="mpc-header">恢复生产时间</th>
+					<td>${@DateUtils.formatDate(mesDeviceAlarm.recoveryTime,'yyyy-MM-dd HH:mm')}</td>
+				</tr>
+				<tr>
 					<th class="mpc-header">备注</th>
 					<td>${mesDeviceAlarm.remark}</td>
 				</tr>

+ 7 - 5
src/main/resources/views/modules/mes/mesDeviceAlarmList.html

@@ -17,9 +17,9 @@
 			<#form:form id="searchForm" model="${mesDeviceAlarm}" action="${ctx}/mes/mesDeviceAlarm/listData" method="post" class="form-inline hide"
 					data-page-no="${parameter.pageNo}" data-page-size="${parameter.pageSize}" data-order-by="${parameter.orderBy}">
 				<div class="form-group">
-					<label class="control-label">${text('设备编号')}:</label>
-					<div class="control-inline">
-						<#form:input path="deviceSn" maxlength="100" class="form-control width-120"/>
+					<label class="control-label">${text('报警设备')}:</label>
+					<div class="control-inline width-120">
+						<#form:select path="deviceId" blankOption="true" items="${deviceList}" itemLabel="treeName" itemValue="treeCode" class="form-control"/>
 					</div>
 				</div>
 				<div class="form-group">
@@ -66,14 +66,16 @@
 $('#dataGrid').dataGrid({
 	searchForm: $("#searchForm"),
 	columnModel: [
-		{header:'${text("设备编号")}', name:'deviceSn', index:'a.device_sn', width:150, align:"center", frozen:true, formatter: function(val, obj, row, act){
+		{header:'${text("设备编号")}', name:'deviceOnlySn', index:'b.sn', width:150, align:"center", frozen:true, formatter: function(val, obj, row, act){
 			return '<a href="${ctx}/mes/mesDeviceAlarm/info?id='+row.id+'" class="btnList" data-title="${text("编辑设备报警记录")}">'+(val||row.id)+'</a>';
 		}},
-		{header:'${text("报警类型")}', name:'type', index:'a.type', width:150, align:"center"},
+		{header:'${text("报警设备")}', name:'type', index:'a.type', width:150, align:"center"},
 		{header:'${text("报警额外参数")}', name:'content', index:'a.content', width:150, align:"center"},
 		{header:'${text("状态")}', name:'state', index:'a.state', width:150, align:"center", formatter: function(val, obj, row, act){
 			return js.getDictLabel(${@DictUtils.getDictListJson('mes_device_alarm_state')}, val, '${text("未知")}', true);
 		}},
+		{header:'${text("故障发生时间")}', name:'faultTime', index:'a.fault_time', width:160, align:"center"},
+		{header:'${text("恢复生产时间")}', name:'recoveryTime', index:'a.recovery_time', width:160, align:"center"},
 		{header:'${text("备注")}', name:'remark', index:'a.remark', width:150, align:"center"},
 		{header:'${text("创建时间")}', name:'createDate', index:'a.create_date', width:150, align:"center"},
 		// {header:'${text("处理时间")}', name:'updateDate', index:'a.update_date', width:150, align:"center"},

+ 35 - 14
src/main/resources/views/modules/mes/mesMoldMaintenanceForm.html

@@ -1,9 +1,9 @@
-<% layout('/layouts/default.html', {title: '模具保养管理', libs: ['validate','dataGrid']}){ %>
+<% layout('/layouts/default.html', {title: '模具维保管理', libs: ['validate','dataGrid']}){ %>
 <div class="main-content">
 	<div class="box box-main">
 		<div class="box-header with-border">
 			<div class="box-title">
-				<i class="fa icon-note"></i> ${text(mesMoldMaintenance.isNewRecord ? '新增模具保养记录' : '编辑模具保养记录')}
+				<i class="fa icon-note"></i> ${text(mesMoldMaintenance.isNewRecord ? '新增模具维保记录' : '编辑模具维保记录')}
 			</div>
 			<div class="box-tools pull-right">
 				<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>
@@ -17,38 +17,59 @@
 					<div class="col-xs-6">
 						<div class="form-group">
 							<label class="control-label col-sm-4" title="">
-								<span class="required hide">*</span> ${text('名称')}:<i class="fa icon-question hide"></i></label>
+								<span class="required">*</span> ${text('模具名称')}:<i class="fa icon-question hide"></i></label>
 							<div class="col-sm-8">
-								<#form:input path="name" maxlength="255" class="form-control required"/>
+								<#form:select path="moldResumeId" items="${moldResumeList}" itemLabel="moldName" itemValue="id" blankOption="true" class="form-control required"/>
 							</div>
 						</div>
 					</div>
 					<div class="col-xs-6">
 						<div class="form-group">
 							<label class="control-label col-sm-4" title="">
-								<span class="required hide">*</span> ${text('编号')}:<i class="fa icon-question hide"></i></label>
+								<span class="required hide">*</span> ${text('修模类型')}:<i class="fa icon-question hide"></i></label>
 							<div class="col-sm-8">
-								<#form:input path="code" maxlength="100" class="form-control required"/>
+								<#form:input path="repairType" maxlength="100" class="form-control"/>
 							</div>
 						</div>
 					</div>
 				</div>
 				<div class="row">
-				<div class="col-xs-6">
-					<div class="form-group">
-						<label class="control-label col-sm-4" title="">
-							<span class="required hide">*</span> ${text('保养状态')}:<i class="fa icon-question hide"></i></label>
-						<div class="col-sm-8">
-							<#form:select path="maintenanceStatus" dictType="mes_mold_maintenance_status" blankOption="true" class="form-control required"/>
+					<div class="col-xs-6">
+						<div class="form-group">
+							<label class="control-label col-sm-4" title="">
+								<span class="required hide">*</span> ${text('维保日期')}:<i class="fa icon-question hide"></i></label>
+							<div class="col-sm-8">
+								<#form:input path="maintenanceDate" readonly="true" maxlength="20" class="form-control laydate"
+									dataFormat="datetime" data-type="datetime" data-format="yyyy-MM-dd HH:mm"/>
+							</div>
+						</div>
+					</div>
+					<div class="col-xs-6">
+						<div class="form-group">
+							<label class="control-label col-sm-4" title="">
+								<span class="required hide">*</span> ${text('验收结果')}:<i class="fa icon-question hide"></i></label>
+							<div class="col-sm-8">
+								<#form:input path="acceptResult" maxlength="100" class="form-control"/>
+							</div>
+						</div>
+					</div>
+				</div>
+				<div class="row">
+					<div class="col-xs-12">
+						<div class="form-group">
+							<label class="control-label col-sm-2" title="">
+								<span class="required hide">*</span> ${text('原因')}:<i class="fa icon-question hide"></i></label>
+							<div class="col-sm-10">
+								<#form:textarea path="reason" rows="3" class="form-control"/>
+							</div>
 						</div>
 					</div>
 				</div>
-			</div>
 				<div class="row">
 					<div class="col-xs-12">
 						<div class="form-group">
 							<label class="control-label col-sm-2" title="">
-								<span class="required hide">*</span> ${text('保养内容')}:<i class="fa icon-question hide"></i></label>
+								<span class="required hide">*</span> ${text('维保内容及过程')}:<i class="fa icon-question hide"></i></label>
 							<div class="col-sm-10">
 								<#form:textarea path="content" rows="4" class="form-control"/>
 							</div>

+ 19 - 25
src/main/resources/views/modules/mes/mesMoldMaintenanceList.html

@@ -1,14 +1,14 @@
-<% layout('/layouts/default.html', {title: '模具保养管理', libs: ['dataGrid']}){ %>
+<% layout('/layouts/default.html', {title: '模具维保管理', libs: ['dataGrid']}){ %>
 <div class="main-content">
 	<div class="box box-main">
 		<div class="box-header">
 			<div class="box-title">
-				<i class="fa icon-notebook"></i> ${text('模具保养管理')}
+				<i class="fa icon-notebook"></i> ${text('模具维保管理')}
 			</div>
 			<div class="box-tools pull-right">
 				<a href="#" class="btn btn-default" id="btnSearch" title="${text('查询')}"><i class="fa fa-filter"></i> ${text('查询')}</a>
 				<% if(hasPermi('mes:mesMoldMaintenance:edit')){ %>
-					<a href="${ctx}/mes/mesMoldMaintenance/form" class="btn btn-default btnTool" title="${text('新增模具保养记录')}"><i class="fa fa-plus"></i> ${text('新增')}</a>
+					<a href="${ctx}/mes/mesMoldMaintenance/form" class="btn btn-default btnTool" title="${text('新增模具维保记录')}"><i class="fa fa-plus"></i> ${text('新增')}</a>
 				<% } %>
 				<a href="#" class="btn btn-default" id="btnSetting" title="${text('设置')}"><i class="fa fa-navicon"></i></a>
 			</div>
@@ -17,27 +17,21 @@
 			<#form:form id="searchForm" model="${mesMoldMaintenance}" action="${ctx}/mes/mesMoldMaintenance/listData" method="post" class="form-inline hide"
 					data-page-no="${parameter.pageNo}" data-page-size="${parameter.pageSize}" data-order-by="${parameter.orderBy}">
 				<div class="form-group">
-					<label class="control-label">${text('名称')}:</label>
+					<label class="control-label">${text('模具名称')}:</label>
 					<div class="control-inline">
-						<#form:input path="name" maxlength="255" class="form-control width-120"/>
+						<#form:input path="moldName" maxlength="255" class="form-control width-120"/>
 					</div>
 				</div>
 				<div class="form-group">
-					<label class="control-label">${text('编号')}:</label>
+					<label class="control-label">${text('修模类型')}:</label>
 					<div class="control-inline">
-						<#form:input path="code" maxlength="100" class="form-control width-120"/>
+						<#form:input path="repairType" maxlength="100" class="form-control width-120"/>
 					</div>
 				</div>
 				<div class="form-group">
-					<label class="control-label">${text('保养人')}:</label>
+					<label class="control-label">${text('发起人')}:</label>
 					<div class="control-inline">
-						<#form:input path="maintenanceUser" maxlength="100" class="form-control width-120"/>
-					</div>
-				</div>
-				<div class="form-group">
-					<label class="control-label">${text('保养状态')}:</label>
-					<div class="control-inline">
-						<#form:select path="maintenanceStatus" dictType="mes_mold_maintenance_status" class="form-control width-120"/>
+						<#form:input path="initiateUser" maxlength="100" class="form-control width-120"/>
 					</div>
 				</div>
 				<div class="form-group">
@@ -56,20 +50,20 @@
 $('#dataGrid').dataGrid({
 	searchForm: $("#searchForm"),
 	columnModel: [
-		{header:'${text("名称")}', name:'name', index:'a.name', width:150, align:"center"},
-		{header:'${text("编号")}', name:'code', index:'a.code', width:150, align:"center"},
-		{header:'${text("保养日期")}', name:'maintenanceDate', index:'a.maintenance_date', width:150, align:"center"},
-		{header:'${text("保养内容")}', name:'content', index:'a.content', width:200, align:"center"},
-		{header:'${text("保养人")}', name:'maintenanceUser', index:'a.maintenance_user', width:120, align:"center"},
-		{header:'${text("保养状态")}', name:'maintenanceStatus', index:'a.maintenance_status', width:100, align:"center", formatter: function(val){
-			return js.getDictLabel(${@DictUtils.getDictListJson('mes_mold_maintenance_status')}, val, '${text("未知")}', true);
-		}},
+		{header:'${text("模具名称")}', name:'moldName', index:'b.mold_name', width:150, align:"center"},
+		{header:'${text("维保日期")}', name:'maintenanceDate', index:'a.maintenance_date', width:150, align:"center"},
+		{header:'${text("维保内容及过程")}', name:'content', index:'a.content', width:200, align:"center"},
+		{header:'${text("修模类型")}', name:'repairType', index:'a.repair_type', width:120, align:"center"},
+		{header:'${text("发起部门")}', name:'initiateDept', index:'a.initiate_dept', width:120, align:"center"},
+		{header:'${text("发起人")}', name:'initiateUser', index:'a.initiate_user', width:120, align:"center"},
+		{header:'${text("原因")}', name:'reason', index:'a.reason', width:150, align:"center"},
+		{header:'${text("验收结果")}', name:'acceptResult', index:'a.accept_result', width:120, align:"center"},
 		{header:'${text("备注")}', name:'remarks', index:'a.remarks', width:150, align:"center"},
 		{header:'${text("操作")}', name:'actions', width:120, formatter: function(val, obj, row, act){
 			var actions = [];
 			//<% if(hasPermi('mes:mesMoldMaintenance:edit')){ %>
-				actions.push('<a href="${ctx}/mes/mesMoldMaintenance/form?id='+row.id+'" class="btnList" title="${text("编辑模具保养记录")}"><i class="fa fa-pencil"></i></a>&nbsp;');
-				actions.push('<a href="${ctx}/mes/mesMoldMaintenance/delete?id='+row.id+'" class="btnList" title="${text("删除模具保养记录")}" data-confirm="${text("确认要删除该模具保养记录吗?")}"><i class="fa fa-trash-o"></i></a>&nbsp;');
+				actions.push('<a href="${ctx}/mes/mesMoldMaintenance/form?id='+row.id+'" class="btnList" title="${text("编辑模具维保记录")}"><i class="fa fa-pencil"></i></a>&nbsp;');
+				actions.push('<a href="${ctx}/mes/mesMoldMaintenance/delete?id='+row.id+'" class="btnList" title="${text("删除模具维保记录")}" data-confirm="${text("确认要删除该模具维保记录吗?")}"><i class="fa fa-trash-o"></i></a>&nbsp;');
 			//<% } %>
 			return actions.join('');
 		}}

+ 167 - 0
src/main/resources/views/modules/mes/mesMoldResumeForm.html

@@ -0,0 +1,167 @@
+<% layout('/layouts/default.html', {title: '模具履历管理', libs: ['validate','dataGrid']}){ %>
+<div class="main-content">
+	<div class="box box-main">
+		<div class="box-header with-border">
+			<div class="box-title">
+				<i class="fa icon-note"></i> ${text(mesMoldResume.isNewRecord ? '新增模具履历记录' : '编辑模具履历记录')}
+			</div>
+			<div class="box-tools pull-right">
+				<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>
+			</div>
+		</div>
+		<#form:form id="inputForm" model="${mesMoldResume}" action="${ctx}/mes/mesMoldResume/save" method="post" class="form-horizontal">
+			<div class="box-body">
+				<div class="form-unit">${text('基本信息')}</div>
+				<#form:hidden path="id"/>
+				<div class="row">
+					<div class="col-xs-6">
+						<div class="form-group">
+							<label class="control-label col-sm-4" title="">
+								<span class="required hide">*</span> ${text('模具名称')}:<i class="fa icon-question hide"></i></label>
+							<div class="col-sm-8">
+								<#form:input path="moldName" maxlength="255" class="form-control required"/>
+							</div>
+						</div>
+					</div>
+					<div class="col-xs-6">
+						<div class="form-group">
+							<label class="control-label col-sm-4" title="">
+								<span class="required hide">*</span> ${text('模具编号')}:<i class="fa icon-question hide"></i></label>
+							<div class="col-sm-8">
+								<#form:input path="moldCode" maxlength="100" class="form-control required"/>
+							</div>
+						</div>
+					</div>
+				</div>
+				<div class="row">
+					<div class="col-xs-6">
+						<div class="form-group">
+							<label class="control-label col-sm-4" title="">
+								<span class="required hide">*</span> ${text('模具穴数')}:<i class="fa icon-question hide"></i></label>
+							<div class="col-sm-8">
+								<#form:input path="cavityNumber" maxlength="11" class="form-control digits"/>
+							</div>
+						</div>
+					</div>
+					<div class="col-xs-6">
+						<div class="form-group">
+							<label class="control-label col-sm-4" title="">
+								<span class="required hide">*</span> ${text('进厂日期')}:<i class="fa icon-question hide"></i></label>
+							<div class="col-sm-8">
+								<#form:input path="entryDate" readonly="true" maxlength="20" class="form-control laydate required"
+									dataFormat="date" data-type="date" data-format="yyyy-MM-dd"/>
+							</div>
+						</div>
+					</div>
+				</div>
+				<div class="row">
+					<div class="col-xs-6">
+						<div class="form-group">
+							<label class="control-label col-sm-4" title="">
+								<span class="required hide">*</span> ${text('制造厂家')}:<i class="fa icon-question hide"></i></label>
+							<div class="col-sm-8">
+								<#form:input path="manufacturer" maxlength="255" class="form-control"/>
+							</div>
+						</div>
+					</div>
+					<div class="col-xs-6">
+						<div class="form-group">
+							<label class="control-label col-sm-4" title="">
+								<span class="required hide">*</span> ${text('产品名称')}:<i class="fa icon-question hide"></i></label>
+							<div class="col-sm-8">
+								<#form:input path="productName" maxlength="255" class="form-control"/>
+							</div>
+						</div>
+					</div>
+				</div>
+				<div class="row">
+					<div class="col-xs-6">
+						<div class="form-group">
+							<label class="control-label col-sm-4" title="">
+								<span class="required hide">*</span> ${text('产品图号')}:<i class="fa icon-question hide"></i></label>
+							<div class="col-sm-8">
+								<#form:input path="productDrawingNo" maxlength="100" class="form-control"/>
+							</div>
+						</div>
+					</div>
+					<div class="col-xs-6">
+						<div class="form-group">
+							<label class="control-label col-sm-4" title="">
+								<span class="required hide">*</span> ${text('设计寿命')}:<i class="fa icon-question hide"></i></label>
+							<div class="col-sm-8">
+								<#form:input path="designLife" maxlength="100" class="form-control"/>
+							</div>
+						</div>
+					</div>
+				</div>
+				<div class="row">
+					<div class="col-xs-6">
+						<div class="form-group">
+							<label class="control-label col-sm-4" title="">
+								<span class="required hide">*</span> ${text('模具尺寸')}:<i class="fa icon-question hide"></i></label>
+							<div class="col-sm-8">
+								<#form:input path="moldSize" maxlength="255" class="form-control"/>
+							</div>
+						</div>
+					</div>
+					<div class="col-xs-6">
+						<div class="form-group">
+							<label class="control-label col-sm-4" title="">
+								<span class="required hide">*</span> ${text('适用机台')}:<i class="fa icon-question hide"></i></label>
+							<div class="col-sm-8">
+								<#form:input path="applicableMachine" maxlength="100" class="form-control"/>
+							</div>
+						</div>
+					</div>
+				</div>
+				<div class="row">
+					<div class="col-xs-6">
+						<div class="form-group">
+							<label class="control-label col-sm-4" title="">
+								<span class="required hide">*</span> ${text('产品重量')}:<i class="fa icon-question hide"></i></label>
+							<div class="col-sm-8">
+								<#form:input path="productWeight" maxlength="100" class="form-control"/>
+							</div>
+						</div>
+					</div>
+				</div>
+				<div class="row">
+					<div class="col-xs-12">
+						<div class="form-group">
+							<label class="control-label col-sm-2" title="">
+								<span class="required hide">*</span> ${text('备注')}:<i class="fa icon-question hide"></i></label>
+							<div class="col-sm-10">
+								<#form:textarea path="remarks" rows="3" class="form-control"/>
+							</div>
+						</div>
+					</div>
+				</div>
+			</div>
+			<div class="box-footer">
+				<div class="row">
+					<div class="col-sm-offset-2 col-sm-10">
+						<% if (hasPermi('mes:mesMoldResume:edit')){ %>
+							<button type="submit" class="btn btn-sm btn-primary" id="btnSubmit"><i class="fa fa-check"></i> ${text('保 存')}</button>&nbsp;
+						<% } %>
+						<button type="button" class="btn btn-sm btn-default" id="btnCancel" onclick="js.closeCurrentTabPage()"><i class="fa fa-reply-all"></i> ${text('关 闭')}</button>
+					</div>
+				</div>
+			</div>
+		</#form:form>
+	</div>
+</div>
+<% } %>
+<script>
+$("#inputForm").validate({
+	submitHandler: function(form){
+		js.ajaxSubmitForm($(form), function(data){
+			js.showMessage(data.message);
+			if(data.result == Global.TRUE){
+				js.closeCurrentTabPage(function(contentWindow){
+					contentWindow.page();
+				});
+			}
+		}, "json");
+    }
+});
+</script>

+ 85 - 0
src/main/resources/views/modules/mes/mesMoldResumeList.html

@@ -0,0 +1,85 @@
+<% layout('/layouts/default.html', {title: '模具履历管理', libs: ['dataGrid']}){ %>
+<div class="main-content">
+	<div class="box box-main">
+		<div class="box-header">
+			<div class="box-title">
+				<i class="fa icon-notebook"></i> ${text('模具履历管理')}
+			</div>
+			<div class="box-tools pull-right">
+				<a href="#" class="btn btn-default" id="btnSearch" title="${text('查询')}"><i class="fa fa-filter"></i> ${text('查询')}</a>
+				<% if(hasPermi('mes:mesMoldResume:edit')){ %>
+					<a href="${ctx}/mes/mesMoldResume/form" class="btn btn-default btnTool" title="${text('新增模具履历记录')}"><i class="fa fa-plus"></i> ${text('新增')}</a>
+				<% } %>
+				<a href="#" class="btn btn-default" id="btnSetting" title="${text('设置')}"><i class="fa fa-navicon"></i></a>
+			</div>
+		</div>
+		<div class="box-body">
+			<#form:form id="searchForm" model="${mesMoldResume}" action="${ctx}/mes/mesMoldResume/listData" method="post" class="form-inline hide"
+					data-page-no="${parameter.pageNo}" data-page-size="${parameter.pageSize}" data-order-by="${parameter.orderBy}">
+				<div class="form-group">
+					<label class="control-label">${text('模具名称')}:</label>
+					<div class="control-inline">
+						<#form:input path="moldName" maxlength="255" class="form-control width-120"/>
+					</div>
+				</div>
+				<div class="form-group">
+					<label class="control-label">${text('模具编号')}:</label>
+					<div class="control-inline">
+						<#form:input path="moldCode" maxlength="100" class="form-control width-120"/>
+					</div>
+				</div>
+				<div class="form-group">
+					<label class="control-label">${text('制造厂家')}:</label>
+					<div class="control-inline">
+						<#form:input path="manufacturer" maxlength="255" class="form-control width-120"/>
+					</div>
+				</div>
+				<div class="form-group">
+					<label class="control-label">${text('产品名称')}:</label>
+					<div class="control-inline">
+						<#form:input path="productName" maxlength="255" class="form-control width-120"/>
+					</div>
+				</div>
+				<div class="form-group">
+					<button type="submit" class="btn btn-primary btn-sm">${text('查询')}</button>
+					<button type="reset" class="btn btn-default btn-sm">${text('重置')}</button>
+				</div>
+			</#form:form>
+			<table id="dataGrid"></table>
+			<div id="dataGridPage"></div>
+		</div>
+	</div>
+</div>
+<% } %>
+<script>
+// 初始化DataGrid对象
+$('#dataGrid').dataGrid({
+	searchForm: $("#searchForm"),
+	columnModel: [
+		{header:'${text("模具名称")}', name:'moldName', index:'a.mold_name', width:150, align:"center"},
+		{header:'${text("模具编号")}', name:'moldCode', index:'a.mold_code', width:120, align:"center"},
+		{header:'${text("模具穴数")}', name:'cavityNumber', index:'a.cavity_number', width:100, align:"center"},
+		{header:'${text("进厂日期")}', name:'entryDate', index:'a.entry_date', width:120, align:"center"},
+		{header:'${text("制造厂家")}', name:'manufacturer', index:'a.manufacturer', width:150, align:"center"},
+		{header:'${text("产品名称")}', name:'productName', index:'a.product_name', width:150, align:"center"},
+		{header:'${text("产品图号")}', name:'productDrawingNo', index:'a.product_drawing_no', width:120, align:"center"},
+		{header:'${text("设计寿命")}', name:'designLife', index:'a.design_life', width:120, align:"center"},
+		{header:'${text("模具尺寸")}', name:'moldSize', index:'a.mold_size', width:150, align:"center"},
+		{header:'${text("适用机台")}', name:'applicableMachine', index:'a.applicable_machine', width:120, align:"center"},
+		{header:'${text("产品重量")}', name:'productWeight', index:'a.product_weight', width:120, align:"center"},
+		{header:'${text("备注")}', name:'remarks', index:'a.remarks', width:150, align:"center"},
+		{header:'${text("操作")}', name:'actions', width:120, formatter: function(val, obj, row, act){
+			var actions = [];
+			//<% if(hasPermi('mes:mesMoldResume:edit')){ %>
+				actions.push('<a href="${ctx}/mes/mesMoldResume/form?id='+row.id+'" class="btnList" title="${text("编辑模具履历记录")}"><i class="fa fa-pencil"></i></a>&nbsp;');
+				actions.push('<a href="${ctx}/mes/mesMoldResume/delete?id='+row.id+'" class="btnList" title="${text("删除模具履历记录")}" data-confirm="${text("确认要删除该模具履历记录吗?")}"><i class="fa fa-trash-o"></i></a>&nbsp;');
+			//<% } %>
+			return actions.join('');
+		}}
+	],
+	// 加载成功后执行事件
+	ajaxSuccess: function(data){
+
+	}
+});
+</script>