Commit 01b933a4 by liuyang

2024-05-14 设备台账详情

parent ffe45f56
...@@ -74,6 +74,7 @@ public class HGSB001 extends DaoEPBase { ...@@ -74,6 +74,7 @@ public class HGSB001 extends DaoEPBase {
public static final String INSERT = "HGSB001.insert"; public static final String INSERT = "HGSB001.insert";
public static final String UPDATE = "HGSB001.update"; public static final String UPDATE = "HGSB001.update";
public static final String UPDATE_STATUS = "HGSB001.updateStatus"; public static final String UPDATE_STATUS = "HGSB001.updateStatus";
public static final String UPDATE_MAINTAIN_DATE = "HGSB001.updateMaintainDate";
public static final String DELETE = "HGSB001.delete"; public static final String DELETE = "HGSB001.delete";
public static final String DELETE_FLAG = "HGSB001.deleteFlag"; public static final String DELETE_FLAG = "HGSB001.deleteFlag";
......
...@@ -72,11 +72,13 @@ public class ServiceHGSB004B extends ServiceEPBase { ...@@ -72,11 +72,13 @@ public class ServiceHGSB004B extends ServiceEPBase {
hgsb002A = HGSBTools.Hgsb002.getDetails(hgsb002.getId()); hgsb002A = HGSBTools.Hgsb002.getDetails(hgsb002.getId());
addHgsb004a(hgsb002A,hgsb004.getId()); addHgsb004a(hgsb002A,hgsb004.getId());
}else if ("HGSB005".equals(pageNumber)){ }else if ("HGSB005".equals(pageNumber)){
//添加设备点检 //添加设备保养
HGSB005 hgsb005 = addHgsb005(hgsb002,map); HGSB005 hgsb005 = addHgsb005(hgsb002,map);
hgsb002A = HGSBTools.Hgsb002.getDetails(hgsb002.getId()); hgsb002A = HGSBTools.Hgsb002.getDetails(hgsb002.getId());
addHgsb005a(hgsb002A,hgsb005.getId()); addHgsb005a(hgsb002A,hgsb005.getId());
//修改保养日期
updateMaintainDate(hgsb002A,hgsb002);
} }
hgsb002.setTaskStatus(1); hgsb002.setTaskStatus(1);
DaoUtils.update(HGSB002.UPDATE,hgsb002); DaoUtils.update(HGSB002.UPDATE,hgsb002);
...@@ -175,4 +177,18 @@ public class ServiceHGSB004B extends ServiceEPBase { ...@@ -175,4 +177,18 @@ public class ServiceHGSB004B extends ServiceEPBase {
DaoUtils.insert(HGSB005A.INSERT, hgsb005A); DaoUtils.insert(HGSB005A.INSERT, hgsb005A);
} }
} }
/**
* 修改保养日期
*/
private void updateMaintainDate(List<HGSB002A> hgsb002AList,HGSB002 hgsb002){
for (HGSB002A hgsb002a: hgsb002AList) {
HGSB001 hgsb001=new HGSB001();
hgsb001.fromMap(hgsb002a.toMap());
hgsb001.setCompanyCode(hgsb002.getCompanyCode());
hgsb001.setCompanyName(hgsb002.getCompanyName());
hgsb001.setMaintainDate(DateUtils.formatShort(DateUtils.date()));
DaoUtils.update(HGSB001.UPDATE_MAINTAIN_DATE,hgsb001);
}
}
} }
...@@ -340,6 +340,34 @@ ...@@ -340,6 +340,34 @@
ID = #id# ID = #id#
</update> </update>
<update id="updateMaintainDate">
UPDATE ${hggpSchema}.HGSB001
SET
UPDATED_BY = #updatedBy#, <!-- 修改人 -->
UPDATED_NAME = #updatedName#, <!-- 修改人名称 -->
UPDATED_TIME = #updatedTime#, <!-- 修改时间 -->
MAINTAIN_DATE = #maintainDate# <!-- 保养日期 -->
WHERE DEVICE_CODE = #deviceCode#
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyName">
COMPANY_NAME = #companyName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="groupCode">
GROUP_CODE = #groupCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="groupName">
GROUP_NAME = #groupName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deviceType">
DEVICE_TYPE = #deviceType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deviceName">
DEVICE_NAME = #deviceName#
</isNotEmpty>
</update>
<select id="queryDeviceCodeBox" parameterClass="java.util.HashMap" resultClass="java.util.HashMap"> <select id="queryDeviceCodeBox" parameterClass="java.util.HashMap" resultClass="java.util.HashMap">
SELECT distinct SELECT distinct
DEVICE_CODE as "deviceCode", <!-- 设备编码 --> DEVICE_CODE as "deviceCode", <!-- 设备编码 -->
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment