From a4fd3e15c6aba1deca6f38c576e33faab1f5baa8 Mon Sep 17 00:00:00 2001
From: zhangsiqi <2825463979@qq.com>
Date: Tue, 16 Apr 2024 10:30:59 +0800
Subject: [PATCH] =?UTF-8?q?[fix]=E4=BA=A7=E5=93=81=E5=9E=8B=E5=8F=B7?=
=?UTF-8?q?=E7=AE=A1=E7=90=86=E9=A1=B5=E9=9D=A2=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../ruoyi/system/domain/SysProductModel.java | 53 +++++----
.../system/mapper/SysProductModelMapper.java | 20 ++--
.../impl/SysProductModelServiceImpl.java | 19 ++--
.../mapper/system/SysProductModelMapper.xml | 81 +++++++------
.../resources/templates/system/model/add.html | 8 +-
.../templates/system/model/edit.html | 5 +-
.../templates/system/model/model.html | 106 +++++-------------
7 files changed, 129 insertions(+), 163 deletions(-)
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysProductModel.java b/ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysProductModel.java
index 48153333..216a1d25 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysProductModel.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysProductModel.java
@@ -16,11 +16,11 @@ public class SysProductModel extends BaseEntity
private static final long serialVersionUID = 1L;
/** 产品型号管理表id */
- private Long Pid;
+ private Long pid;
/** 产品型号ID */
@Excel(name = "产品型号ID")
- private String Pcode;
+ private String pcode;
/** 设备型号 */
@Excel(name = "设备型号")
@@ -38,31 +38,32 @@ public class SysProductModel extends BaseEntity
@Excel(name = "差异说明")
private String differences;
- /** 更新人 */
- @Excel(name = "更新人")
- private String udpateBy;
+ @Excel(name = "工程员")
+ private String engineer;
+ @Excel(name = "使用状态")
+ private String useStatus;
/** 图片地址 */
@Excel(name = "图片地址")
private String photoUrl;
- public void setPid(Long Pid)
+ public void setPid(Long pid)
{
- this.Pid = Pid;
+ this.pid = pid;
}
public Long getPid()
{
- return Pid;
+ return pid;
}
- public void setPcode(String Pcode)
+ public void setPcode(String pcode)
{
- this.Pcode = Pcode;
+ this.pcode = pcode;
}
public String getPcode()
{
- return Pcode;
+ return pcode;
}
public void setEquipModel(String equipModel)
{
@@ -100,16 +101,24 @@ public class SysProductModel extends BaseEntity
{
return differences;
}
- public void setUdpateBy(String udpateBy)
- {
- this.udpateBy = udpateBy;
+
+ public String getEngineer() {
+ return engineer;
}
- public String getUdpateBy()
- {
- return udpateBy;
+ public void setEngineer(String engineer) {
+ this.engineer = engineer;
+ }
+
+ public String getUseStatus() {
+ return useStatus;
+ }
+
+ public void setUseStatus(String useStatus) {
+ this.useStatus = useStatus;
}
- public void setPhotoUrl(String photoUrl)
+
+ public void setPhotoUrl(String photoUrl)
{
this.photoUrl = photoUrl;
}
@@ -124,15 +133,17 @@ public class SysProductModel extends BaseEntity
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("Pid", getPid())
.append("Pcode", getPcode())
- .append("createBy", getCreateBy())
.append("equipModel", getEquipModel())
.append("equipName", getEquipName())
.append("specification", getSpecification())
.append("differences", getDifferences())
- .append("remark", getRemark())
+ .append("engineer", getEngineer())
+ .append("useStatus", getUseStatus())
+ .append("createBy", getCreateBy())
.append("createTime", getCreateTime())
- .append("udpateBy", getUdpateBy())
+ .append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
+ .append("remark", getRemark())
.append("photoUrl", getPhotoUrl())
.toString();
}
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysProductModelMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysProductModelMapper.java
index 22cea5fa..1ed1f04b 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysProductModelMapper.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysProductModelMapper.java
@@ -15,10 +15,10 @@ public interface SysProductModelMapper
/**
* 查询产品型号管理
*
- * @param Pid 产品型号管理ID
+ * @param pid 产品型号管理ID
* @return 产品型号管理
*/
- public SysProductModel selectSysProductModelById(Long Pid);
+ public SysProductModel selectSysProductModelById(Long pid);
/**
* 查询产品型号管理列表
@@ -47,32 +47,32 @@ public interface SysProductModelMapper
/**
* 删除产品型号管理
*
- * @param Pid 产品型号管理ID
+ * @param pid 产品型号管理ID
* @return 结果
*/
- public int deleteSysProductModelById(Long Pid);
+ public int deleteSysProductModelById(Long pid);
/**
* 批量删除产品型号管理
*
- * @param Pids 需要删除的数据ID
+ * @param pids 需要删除的数据ID
* @return 结果
*/
- public int deleteSysProductModelByIds(String[] Pids);
+ public int deleteSysProductModelByIds(String[] ids);
/**
* 作废产品型号管理
*
- * @param Pid 产品型号管理ID
+ * @param pid 产品型号管理ID
* @return 结果
*/
- public int cancelSysProductModelById(Long Pid);
+ public int cancelSysProductModelById(Long pid);
/**
* 恢复产品型号管理
*
- * @param Pid 产品型号管理ID
+ * @param pid 产品型号管理ID
* @return 结果
*/
- public int restoreSysProductModelById(Long Pid);
+ public int restoreSysProductModelById(Long pid);
}
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysProductModelServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysProductModelServiceImpl.java
index 9f26f151..3a36ad8c 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysProductModelServiceImpl.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysProductModelServiceImpl.java
@@ -32,9 +32,9 @@ public class SysProductModelServiceImpl implements ISysProductModelService
* @return 产品型号管理
*/
@Override
- public SysProductModel selectSysProductModelById(Long Pid)
+ public SysProductModel selectSysProductModelById(Long pid)
{
- return sysProductModelMapper.selectSysProductModelById(Pid);
+ return sysProductModelMapper.selectSysProductModelById(pid);
}
/**
@@ -60,8 +60,7 @@ public class SysProductModelServiceImpl implements ISysProductModelService
{
String loginName = ShiroUtils.getLoginName();
sysProductModel.setCreateBy(loginName);
- String cpxh = redisCache.generateNo("CPXH");
- sysProductModel.setPcode(cpxh);
+ sysProductModel.setPcode(redisCache.generateNo("CPXH"));
sysProductModel.setCreateTime(DateUtils.getNowDate());
return sysProductModelMapper.insertSysProductModel(sysProductModel);
}
@@ -98,9 +97,9 @@ public class SysProductModelServiceImpl implements ISysProductModelService
* @return 结果
*/
@Override
- public int deleteSysProductModelById(Long Pid)
+ public int deleteSysProductModelById(Long pid)
{
- return sysProductModelMapper.deleteSysProductModelById(Pid);
+ return sysProductModelMapper.deleteSysProductModelById(pid);
}
/**
@@ -110,9 +109,9 @@ public class SysProductModelServiceImpl implements ISysProductModelService
* @return 结果
*/
@Override
- public int cancelSysProductModelById(Long Pid)
+ public int cancelSysProductModelById(Long pid)
{
- return sysProductModelMapper.cancelSysProductModelById(Pid);
+ return sysProductModelMapper.cancelSysProductModelById(pid);
}
/**
@@ -122,8 +121,8 @@ public class SysProductModelServiceImpl implements ISysProductModelService
* @return 结果
*/
@Override
- public int restoreSysProductModelById(Long Pid)
+ public int restoreSysProductModelById(Long pid)
{
- return sysProductModelMapper.restoreSysProductModelById(Pid);
+ return sysProductModelMapper.restoreSysProductModelById(pid);
}
}
diff --git a/ruoyi-admin/src/main/resources/mapper/system/SysProductModelMapper.xml b/ruoyi-admin/src/main/resources/mapper/system/SysProductModelMapper.xml
index 74026c0b..1bed9c94 100644
--- a/ruoyi-admin/src/main/resources/mapper/system/SysProductModelMapper.xml
+++ b/ruoyi-admin/src/main/resources/mapper/system/SysProductModelMapper.xml
@@ -4,49 +4,54 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">