Browse Source

2026-06-23

停机原因维护增加加工中心
master
fengyuan_yang 1 month ago
parent
commit
2beb1e22b8
  1. 12
      src/main/java/com/gaotao/modules/base/entity/DowntimeReasonData.java
  2. 9
      src/main/resources/mapper/base/BaseMapper.xml

12
src/main/java/com/gaotao/modules/base/entity/DowntimeReasonData.java

@ -25,6 +25,10 @@ public class DowntimeReasonData {
*
*/
private String active;
/**
* 加工中心
*/
private String workCenterNo;
private String user;
private int add;
@ -68,6 +72,14 @@ public class DowntimeReasonData {
this.active = active;
}
public String getWorkCenterNo() {
return workCenterNo;
}
public void setWorkCenterNo(String workCenterNo) {
this.workCenterNo = workCenterNo;
}
public String getUser() {
return user;
}

9
src/main/resources/mapper/base/BaseMapper.xml

@ -594,7 +594,7 @@
</select>
<!-- 停机原因 -->
<select id="getShutDownReasonData" resultType="com.gaotao.modules.base.entity.DowntimeReasonData">
Select Site, ReasonCode, Area, ReasonDescription, Active
Select Site, ReasonCode, Area, ReasonDescription, Active, WorkCenter_No as WorkCenterNo
from DowntimeReason as T
where T.Site in (Select Site from AccessSite where upper(UserID) = #{user})
</select>
@ -606,14 +606,15 @@
and Site = #{site}
</select>
<insert id="saveShutDownReasonData" parameterType="com.gaotao.modules.base.entity.DowntimeReasonData">
INSERT INTO DowntimeReason (Site, ReasonCode, Area, ReasonDescription, Active)
values (#{site}, #{reasonCode}, #{area}, #{reasonDescription}, #{active})
INSERT INTO DowntimeReason (Site, ReasonCode, Area, ReasonDescription, Active, WorkCenter_No)
values (#{site}, #{reasonCode}, #{area}, #{reasonDescription}, #{active}, #{workCenterNo})
</insert>
<update id="editShutDownReasonData" parameterType="com.gaotao.modules.base.entity.DowntimeReasonData">
UPDATE DowntimeReason
SET Active=#{active},
Area=#{area},
ReasonDescription=#{reasonDescription}
ReasonDescription=#{reasonDescription},
WorkCenter_No=#{workCenterNo}
where ReasonCode = #{reasonCode}
and Site = #{site}
</update>

Loading…
Cancel
Save