Merge remote-tracking branch 'origin/master'

master
philip 3 years ago
commit 5aa8b2c9c6

@ -10,6 +10,11 @@ spring:
username: wip
password: wip
driver-class-name: oracle.jdbc.OracleDriver
ods:
url: jdbc:oracle:thin:@113.98.201.217:1521/ORD
username: wip
password: wip
driver-class-name: oracle.jdbc.OracleDriver
druid:
filters: stat,wall,log4j2
initial-size: 5
@ -38,7 +43,7 @@ spring:
merge-sql: true
slow-sql-millis: 100
activemq:
enabled: false
enabled: true
brokerUrl: tcp://localhost:61616?wireFormat.maxInactivityDuration=0
password: admin
user: admin

@ -7,8 +7,13 @@ spring:
wip:
driver-class-name: com.sap.db.jdbc.Driver
jndi-name: jdbc/jts/wipPool
ods:
url: jdbc:oracle:thin:@172.16.251.133:1521/ORQ
username: ods
password: ods
driver-class-name: oracle.jdbc.OracleDriver
activemq:
enabled: false
enabled: true
brokerUrl: tcp://172.16.251.133:61616?wireFormat.maxInactivityDuration=0
password: admin
user: admin

@ -71,6 +71,7 @@ public class ResourceFaultReceiveController {
.or().like(ResourceFaultReceive::getSite, frontPage.getGlobalQuery())
.or().like(ResourceFaultReceive::getResrce, frontPage.getGlobalQuery())
.or().like(ResourceFaultReceive::getFaultCode, frontPage.getGlobalQuery())
.or().like(ResourceFaultReceive::getDescription, frontPage.getGlobalQuery())
.or().like(ResourceFaultReceive::getCreateUser, frontPage.getGlobalQuery())
.or().like(ResourceFaultReceive::getModifyUser, frontPage.getGlobalQuery())
);

@ -1,5 +1,6 @@
package com.foreverwin.mesnac.equip.mapper;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.foreverwin.mesnac.equip.model.EdcDataResource;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
@ -38,6 +39,7 @@ public interface EdcDataResourceMapper extends BaseMapper<EdcDataResource> {
* @param sqlStr
* @return
*/
@DS("ods")
int insertBySql(@Param(value="sqlStr") String sqlStr);
}

@ -12,11 +12,11 @@ import com.baomidou.mybatisplus.annotation.IdType;
/**
* <p>
* -
*
* </p>
*
* @author pavel.Liu
* @since 2021-07-13
* @author pavel.liu
* @since 2021-09-09
*/
@TableName("Z_RESOURCE_FAULT_RECEIVE")
@ -25,49 +25,24 @@ public class ResourceFaultReceive extends Model<ResourceFaultReceive> {
private static final long serialVersionUID = 1L;
/**
*
*/
@TableId(value = "HANDLE", type = IdType.INPUT)
private String handle;
/**
*
*/
@TableField("SITE")
private String site;
/**
*
*/
@TableField("RESRCE")
private String resrce;
/**
*
*/
@TableField("FAULT_CODE")
private String faultCode;
/**
*
*/
@TableField("DESCRIPTION")
private String description;
@TableField("FAULT_DATE")
private LocalDateTime faultDate;
/**
*
*/
@TableField("CREATE_USER")
private String createUser;
/**
*
*/
@TableField("CREATED_DATE_TIME")
private LocalDateTime createdDateTime;
/**
*
*/
@TableField("MODIFY_USER")
private String modifyUser;
/**
*
*/
@TableField("MODIFIED_DATE_TIME")
private LocalDateTime modifiedDateTime;
@ -104,6 +79,14 @@ public class ResourceFaultReceive extends Model<ResourceFaultReceive> {
this.faultCode = faultCode;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public LocalDateTime getFaultDate() {
return faultDate;
}
@ -152,6 +135,8 @@ public static final String RESRCE = "RESRCE";
public static final String FAULT_CODE = "FAULT_CODE";
public static final String DESCRIPTION = "DESCRIPTION";
public static final String FAULT_DATE = "FAULT_DATE";
public static final String CREATE_USER = "CREATE_USER";
@ -175,6 +160,7 @@ public static final String MODIFIED_DATE_TIME = "MODIFIED_DATE_TIME";
", site = " + site +
", resrce = " + resrce +
", faultCode = " + faultCode +
", description = " + description +
", faultDate = " + faultDate +
", createUser = " + createUser +
", createdDateTime = " + createdDateTime +

@ -12,11 +12,11 @@ import com.baomidou.mybatisplus.annotation.IdType;
/**
* <p>
* -
*
* </p>
*
* @author pavel.Liu
* @since 2021-07-13
* @author pavel.liu
* @since 2021-09-09
*/
@TableName("Z_RESOURCE_STATUS_RECEIVE")
@ -25,64 +25,20 @@ public class ResourceStatusReceive extends Model<ResourceStatusReceive> {
private static final long serialVersionUID = 1L;
/**
*
*/
@TableId(value = "HANDLE", type = IdType.INPUT)
private String handle;
/**
*
*/
@TableField("SITE")
private String site;
/**
*
*/
@TableField("RESRCE")
private String resrce;
/**
*
*/
@TableField("STATUS")
private String status;
/**
*
*/
@TableField("DATE_TIME")
private LocalDateTime dateTime;
/**
*
*/
@TableField("CHANGE_STATUS")
private String changeStatus;
/**
*
*/
@TableField("CHANGE_DATE_TIME")
private LocalDateTime changeDateTime;
/**
*
*/
@TableField("INTERVAL_TIME")
private Double intervalTime;
/**
*
*/
@TableField("CREATE_USER")
private String createUser;
/**
*
*/
@TableField("CREATED_DATE_TIME")
private LocalDateTime createdDateTime;
/**
*
*/
@TableField("MODIFY_USER")
private String modifyUser;
/**
*
*/
@TableField("MODIFIED_DATE_TIME")
private LocalDateTime modifiedDateTime;
@ -119,38 +75,6 @@ public class ResourceStatusReceive extends Model<ResourceStatusReceive> {
this.status = status;
}
public LocalDateTime getDateTime() {
return dateTime;
}
public void setDateTime(LocalDateTime dateTime) {
this.dateTime = dateTime;
}
public String getChangeStatus() {
return changeStatus;
}
public void setChangeStatus(String changeStatus) {
this.changeStatus = changeStatus;
}
public LocalDateTime getChangeDateTime() {
return changeDateTime;
}
public void setChangeDateTime(LocalDateTime changeDateTime) {
this.changeDateTime = changeDateTime;
}
public Double getIntervalTime() {
return intervalTime;
}
public void setIntervalTime(Double intervalTime) {
this.intervalTime = intervalTime;
}
public String getCreateUser() {
return createUser;
}
@ -191,14 +115,6 @@ public static final String RESRCE = "RESRCE";
public static final String STATUS = "STATUS";
public static final String DATE_TIME = "DATE_TIME";
public static final String CHANGE_STATUS = "CHANGE_STATUS";
public static final String CHANGE_DATE_TIME = "CHANGE_DATE_TIME";
public static final String INTERVAL_TIME = "INTERVAL_TIME";
public static final String CREATE_USER = "CREATE_USER";
public static final String CREATED_DATE_TIME = "CREATED_DATE_TIME";
@ -220,10 +136,6 @@ public static final String MODIFIED_DATE_TIME = "MODIFIED_DATE_TIME";
", site = " + site +
", resrce = " + resrce +
", status = " + status +
", dateTime = " + dateTime +
", changeStatus = " + changeStatus +
", changeDateTime = " + changeDateTime +
", intervalTime = " + intervalTime +
", createUser = " + createUser +
", createdDateTime = " + createdDateTime +
", modifyUser = " + modifyUser +

@ -116,6 +116,8 @@ public class ResourceFaultReceiveServiceImpl extends ServiceImpl<ResourceFaultRe
JSONObject jsonObj = (JSONObject) jsonArray.get(i);
String faultCode = jsonObj.getString("FAULT_CODE");
resourceFaultReceive.setFaultCode(faultCode);
String description = jsonObj.getString("DESCRIPTION");
resourceFaultReceive.setDescription(description);
String dateTime = jsonObj.getString("DATE_TIME");
LocalDateTime faultDate = LocalDateTime.parse(dateTime, dataFormatter);
resourceFaultReceive.setFaultDate(faultDate);

@ -100,35 +100,11 @@ public class ResourceStatusReceiveServiceImpl extends ServiceImpl<ResourceStatus
logger.error("设备状态不能为空!");
throw BusinessException.build("设备状态不能为空!");
}
LocalDateTime now = LocalDateTime.now();
String status = "301";
//设备状态转换
switch (sendStatus) {
case "RUN" :
status = "301"; break;
case "DOW" :
status = "302"; break;
case "SEAL" :
status = "303"; break;
case "FREE" :
status = "2"; break;
case "REPAIR" :
status = "4"; break;
default:
logger.info("发送的状态编码:" + sendStatus + ",未找到对应的状态!");
throw BusinessException.build("发送的状态编码:" + sendStatus + ",未找到对应的状态!");
}
// 获取最新数据
ResourceStatusReceive resourceStatus = resourceStatusReceiveMapper.getOneByMaxCreateDateTime(site,resource);
if (resourceStatus != null){
LocalDateTime oldDate = resourceStatus.getDateTime();
resourceStatus.setChangeStatus(status);
resourceStatus.setChangeDateTime(dateTime);
Duration between = Duration.between(oldDate, dateTime);
Long intervalTime = between.toMinutes();
resourceStatus.setIntervalTime(intervalTime.doubleValue());
resourceStatus.setModifiedDateTime(now);
resourceStatus.setModifiedDateTime(dateTime);
resourceStatus.setModifyUser(user);
resourceStatusReceiveMapper.updateById(resourceStatus);
}else{
@ -139,15 +115,10 @@ public class ResourceStatusReceiveServiceImpl extends ServiceImpl<ResourceStatus
resourceStatusReceive.setHandle(UUID.randomUUID().toString());
resourceStatusReceive.setSite(site);
resourceStatusReceive.setResrce(resource);
resourceStatusReceive.setStatus(status);
resourceStatusReceive.setDateTime(dateTime);
resourceStatusReceive.setStatus(sendStatus);
resourceStatusReceive.setCreateUser(user);
resourceStatusReceive.setCreatedDateTime(now);
resourceStatusReceive.setCreatedDateTime(dateTime);
resourceStatusReceiveMapper.insert(resourceStatusReceive);
// 修改设备状态
resourceById.setStatusBo(HandleEnum.STATUS.getHandle(site,status));
resourceById.setModifiedDateTime(now);
resrceService.updateById(resourceById);
return handle;
}

@ -8,6 +8,7 @@
<result column="SITE" property="site" />
<result column="RESRCE" property="resrce" />
<result column="FAULT_CODE" property="faultCode" />
<result column="DESCRIPTION" property="description" />
<result column="FAULT_DATE" property="faultDate" />
<result column="CREATE_USER" property="createUser" />
<result column="CREATED_DATE_TIME" property="createdDateTime" />
@ -17,7 +18,7 @@
<!-- 通用查询结果列 -->
<sql id="Base_Column_List">
HANDLE, SITE, RESRCE, FAULT_CODE, FAULT_DATE, CREATE_USER, CREATED_DATE_TIME, MODIFY_USER, MODIFIED_DATE_TIME
HANDLE, SITE, RESRCE, FAULT_CODE, DESCRIPTION, FAULT_DATE, CREATE_USER, CREATED_DATE_TIME, MODIFY_USER, MODIFIED_DATE_TIME
</sql>
<!-- BaseMapper标准查询/修改/删除 -->
@ -55,6 +56,7 @@
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.resrce!=null"> AND RESRCE=#{ew.entity.resrce}</if>
<if test="ew.entity.faultCode!=null"> AND FAULT_CODE=#{ew.entity.faultCode}</if>
<if test="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
<if test="ew.entity.faultDate!=null"> AND FAULT_DATE=#{ew.entity.faultDate}</if>
<if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
@ -74,6 +76,7 @@
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.resrce!=null"> AND RESRCE=#{ew.entity.resrce}</if>
<if test="ew.entity.faultCode!=null"> AND FAULT_CODE=#{ew.entity.faultCode}</if>
<if test="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
<if test="ew.entity.faultDate!=null"> AND FAULT_DATE=#{ew.entity.faultDate}</if>
<if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
@ -101,6 +104,7 @@
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.resrce!=null"> AND RESRCE=#{ew.entity.resrce}</if>
<if test="ew.entity.faultCode!=null"> AND FAULT_CODE=#{ew.entity.faultCode}</if>
<if test="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
<if test="ew.entity.faultDate!=null"> AND FAULT_DATE=#{ew.entity.faultDate}</if>
<if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
@ -128,6 +132,7 @@
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.resrce!=null"> AND RESRCE=#{ew.entity.resrce}</if>
<if test="ew.entity.faultCode!=null"> AND FAULT_CODE=#{ew.entity.faultCode}</if>
<if test="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
<if test="ew.entity.faultDate!=null"> AND FAULT_DATE=#{ew.entity.faultDate}</if>
<if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
@ -155,6 +160,7 @@
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.resrce!=null"> AND RESRCE=#{ew.entity.resrce}</if>
<if test="ew.entity.faultCode!=null"> AND FAULT_CODE=#{ew.entity.faultCode}</if>
<if test="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
<if test="ew.entity.faultDate!=null"> AND FAULT_DATE=#{ew.entity.faultDate}</if>
<if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
@ -182,6 +188,7 @@
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.resrce!=null"> AND RESRCE=#{ew.entity.resrce}</if>
<if test="ew.entity.faultCode!=null"> AND FAULT_CODE=#{ew.entity.faultCode}</if>
<if test="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
<if test="ew.entity.faultDate!=null"> AND FAULT_DATE=#{ew.entity.faultDate}</if>
<if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
@ -209,6 +216,7 @@
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.resrce!=null"> AND RESRCE=#{ew.entity.resrce}</if>
<if test="ew.entity.faultCode!=null"> AND FAULT_CODE=#{ew.entity.faultCode}</if>
<if test="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
<if test="ew.entity.faultDate!=null"> AND FAULT_DATE=#{ew.entity.faultDate}</if>
<if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
@ -232,6 +240,7 @@
<if test="site!=null">SITE,</if>
<if test="resrce!=null">RESRCE,</if>
<if test="faultCode!=null">FAULT_CODE,</if>
<if test="description!=null">DESCRIPTION,</if>
<if test="faultDate!=null">FAULT_DATE,</if>
<if test="createUser!=null">CREATE_USER,</if>
<if test="createdDateTime!=null">CREATED_DATE_TIME,</if>
@ -243,6 +252,7 @@
<if test="site!=null">#{site},</if>
<if test="resrce!=null">#{resrce},</if>
<if test="faultCode!=null">#{faultCode},</if>
<if test="description!=null">#{description},</if>
<if test="faultDate!=null">#{faultDate},</if>
<if test="createUser!=null">#{createUser},</if>
<if test="createdDateTime!=null">#{createdDateTime},</if>
@ -261,6 +271,7 @@
#{site},
#{resrce},
#{faultCode},
#{description},
#{faultDate},
#{createUser},
#{createdDateTime},
@ -275,6 +286,7 @@
<if test="et.site!=null">SITE=#{et.site},</if>
<if test="et.resrce!=null">RESRCE=#{et.resrce},</if>
<if test="et.faultCode!=null">FAULT_CODE=#{et.faultCode},</if>
<if test="et.description!=null">DESCRIPTION=#{et.description},</if>
<if test="et.faultDate!=null">FAULT_DATE=#{et.faultDate},</if>
<if test="et.createUser!=null">CREATE_USER=#{et.createUser},</if>
<if test="et.createdDateTime!=null">CREATED_DATE_TIME=#{et.createdDateTime},</if>
@ -289,6 +301,7 @@
SITE=#{et.site},
RESRCE=#{et.resrce},
FAULT_CODE=#{et.faultCode},
DESCRIPTION=#{et.description},
FAULT_DATE=#{et.faultDate},
CREATE_USER=#{et.createUser},
CREATED_DATE_TIME=#{et.createdDateTime},
@ -303,6 +316,7 @@
<if test="et.site!=null">SITE=#{et.site},</if>
<if test="et.resrce!=null">RESRCE=#{et.resrce},</if>
<if test="et.faultCode!=null">FAULT_CODE=#{et.faultCode},</if>
<if test="et.description!=null">DESCRIPTION=#{et.description},</if>
<if test="et.faultDate!=null">FAULT_DATE=#{et.faultDate},</if>
<if test="et.createUser!=null">CREATE_USER=#{et.createUser},</if>
<if test="et.createdDateTime!=null">CREATED_DATE_TIME=#{et.createdDateTime},</if>
@ -316,6 +330,7 @@
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.resrce!=null"> AND RESRCE=#{ew.entity.resrce}</if>
<if test="ew.entity.faultCode!=null"> AND FAULT_CODE=#{ew.entity.faultCode}</if>
<if test="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
<if test="ew.entity.faultDate!=null"> AND FAULT_DATE=#{ew.entity.faultDate}</if>
<if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
@ -360,6 +375,7 @@
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.resrce!=null"> AND RESRCE=#{ew.entity.resrce}</if>
<if test="ew.entity.faultCode!=null"> AND FAULT_CODE=#{ew.entity.faultCode}</if>
<if test="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
<if test="ew.entity.faultDate!=null"> AND FAULT_DATE=#{ew.entity.faultDate}</if>
<if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>

@ -8,10 +8,6 @@
<result column="SITE" property="site" />
<result column="RESRCE" property="resrce" />
<result column="STATUS" property="status" />
<result column="DATE_TIME" property="dateTime" />
<result column="CHANGE_STATUS" property="changeStatus" />
<result column="CHANGE_DATE_TIME" property="changeDateTime" />
<result column="INTERVAL_TIME" property="intervalTime" />
<result column="CREATE_USER" property="createUser" />
<result column="CREATED_DATE_TIME" property="createdDateTime" />
<result column="MODIFY_USER" property="modifyUser" />
@ -20,7 +16,7 @@
<!-- 通用查询结果列 -->
<sql id="Base_Column_List">
HANDLE, SITE, RESRCE, STATUS, DATE_TIME, CHANGE_STATUS, CHANGE_DATE_TIME, INTERVAL_TIME, CREATE_USER, CREATED_DATE_TIME, MODIFY_USER, MODIFIED_DATE_TIME
HANDLE, SITE, RESRCE, STATUS, CREATE_USER, CREATED_DATE_TIME, MODIFY_USER, MODIFIED_DATE_TIME
</sql>
<!-- BaseMapper标准查询/修改/删除 -->
@ -58,10 +54,6 @@
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.resrce!=null"> AND RESRCE=#{ew.entity.resrce}</if>
<if test="ew.entity.status!=null"> AND STATUS=#{ew.entity.status}</if>
<if test="ew.entity.dateTime!=null"> AND DATE_TIME=#{ew.entity.dateTime}</if>
<if test="ew.entity.changeStatus!=null"> AND CHANGE_STATUS=#{ew.entity.changeStatus}</if>
<if test="ew.entity.changeDateTime!=null"> AND CHANGE_DATE_TIME=#{ew.entity.changeDateTime}</if>
<if test="ew.entity.intervalTime!=null"> AND INTERVAL_TIME=#{ew.entity.intervalTime}</if>
<if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.modifyUser!=null"> AND MODIFY_USER=#{ew.entity.modifyUser}</if>
@ -80,10 +72,6 @@
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.resrce!=null"> AND RESRCE=#{ew.entity.resrce}</if>
<if test="ew.entity.status!=null"> AND STATUS=#{ew.entity.status}</if>
<if test="ew.entity.dateTime!=null"> AND DATE_TIME=#{ew.entity.dateTime}</if>
<if test="ew.entity.changeStatus!=null"> AND CHANGE_STATUS=#{ew.entity.changeStatus}</if>
<if test="ew.entity.changeDateTime!=null"> AND CHANGE_DATE_TIME=#{ew.entity.changeDateTime}</if>
<if test="ew.entity.intervalTime!=null"> AND INTERVAL_TIME=#{ew.entity.intervalTime}</if>
<if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.modifyUser!=null"> AND MODIFY_USER=#{ew.entity.modifyUser}</if>
@ -110,10 +98,6 @@
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.resrce!=null"> AND RESRCE=#{ew.entity.resrce}</if>
<if test="ew.entity.status!=null"> AND STATUS=#{ew.entity.status}</if>
<if test="ew.entity.dateTime!=null"> AND DATE_TIME=#{ew.entity.dateTime}</if>
<if test="ew.entity.changeStatus!=null"> AND CHANGE_STATUS=#{ew.entity.changeStatus}</if>
<if test="ew.entity.changeDateTime!=null"> AND CHANGE_DATE_TIME=#{ew.entity.changeDateTime}</if>
<if test="ew.entity.intervalTime!=null"> AND INTERVAL_TIME=#{ew.entity.intervalTime}</if>
<if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.modifyUser!=null"> AND MODIFY_USER=#{ew.entity.modifyUser}</if>
@ -140,10 +124,6 @@
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.resrce!=null"> AND RESRCE=#{ew.entity.resrce}</if>
<if test="ew.entity.status!=null"> AND STATUS=#{ew.entity.status}</if>
<if test="ew.entity.dateTime!=null"> AND DATE_TIME=#{ew.entity.dateTime}</if>
<if test="ew.entity.changeStatus!=null"> AND CHANGE_STATUS=#{ew.entity.changeStatus}</if>
<if test="ew.entity.changeDateTime!=null"> AND CHANGE_DATE_TIME=#{ew.entity.changeDateTime}</if>
<if test="ew.entity.intervalTime!=null"> AND INTERVAL_TIME=#{ew.entity.intervalTime}</if>
<if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.modifyUser!=null"> AND MODIFY_USER=#{ew.entity.modifyUser}</if>
@ -170,10 +150,6 @@
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.resrce!=null"> AND RESRCE=#{ew.entity.resrce}</if>
<if test="ew.entity.status!=null"> AND STATUS=#{ew.entity.status}</if>
<if test="ew.entity.dateTime!=null"> AND DATE_TIME=#{ew.entity.dateTime}</if>
<if test="ew.entity.changeStatus!=null"> AND CHANGE_STATUS=#{ew.entity.changeStatus}</if>
<if test="ew.entity.changeDateTime!=null"> AND CHANGE_DATE_TIME=#{ew.entity.changeDateTime}</if>
<if test="ew.entity.intervalTime!=null"> AND INTERVAL_TIME=#{ew.entity.intervalTime}</if>
<if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.modifyUser!=null"> AND MODIFY_USER=#{ew.entity.modifyUser}</if>
@ -200,10 +176,6 @@
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.resrce!=null"> AND RESRCE=#{ew.entity.resrce}</if>
<if test="ew.entity.status!=null"> AND STATUS=#{ew.entity.status}</if>
<if test="ew.entity.dateTime!=null"> AND DATE_TIME=#{ew.entity.dateTime}</if>
<if test="ew.entity.changeStatus!=null"> AND CHANGE_STATUS=#{ew.entity.changeStatus}</if>
<if test="ew.entity.changeDateTime!=null"> AND CHANGE_DATE_TIME=#{ew.entity.changeDateTime}</if>
<if test="ew.entity.intervalTime!=null"> AND INTERVAL_TIME=#{ew.entity.intervalTime}</if>
<if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.modifyUser!=null"> AND MODIFY_USER=#{ew.entity.modifyUser}</if>
@ -230,10 +202,6 @@
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.resrce!=null"> AND RESRCE=#{ew.entity.resrce}</if>
<if test="ew.entity.status!=null"> AND STATUS=#{ew.entity.status}</if>
<if test="ew.entity.dateTime!=null"> AND DATE_TIME=#{ew.entity.dateTime}</if>
<if test="ew.entity.changeStatus!=null"> AND CHANGE_STATUS=#{ew.entity.changeStatus}</if>
<if test="ew.entity.changeDateTime!=null"> AND CHANGE_DATE_TIME=#{ew.entity.changeDateTime}</if>
<if test="ew.entity.intervalTime!=null"> AND INTERVAL_TIME=#{ew.entity.intervalTime}</if>
<if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.modifyUser!=null"> AND MODIFY_USER=#{ew.entity.modifyUser}</if>
@ -256,10 +224,6 @@
<if test="site!=null">SITE,</if>
<if test="resrce!=null">RESRCE,</if>
<if test="status!=null">STATUS,</if>
<if test="dateTime!=null">DATE_TIME,</if>
<if test="changeStatus!=null">CHANGE_STATUS,</if>
<if test="changeDateTime!=null">CHANGE_DATE_TIME,</if>
<if test="intervalTime!=null">INTERVAL_TIME,</if>
<if test="createUser!=null">CREATE_USER,</if>
<if test="createdDateTime!=null">CREATED_DATE_TIME,</if>
<if test="modifyUser!=null">MODIFY_USER,</if>
@ -270,10 +234,6 @@
<if test="site!=null">#{site},</if>
<if test="resrce!=null">#{resrce},</if>
<if test="status!=null">#{status},</if>
<if test="dateTime!=null">#{dateTime},</if>
<if test="changeStatus!=null">#{changeStatus},</if>
<if test="changeDateTime!=null">#{changeDateTime},</if>
<if test="intervalTime!=null">#{intervalTime},</if>
<if test="createUser!=null">#{createUser},</if>
<if test="createdDateTime!=null">#{createdDateTime},</if>
<if test="modifyUser!=null">#{modifyUser},</if>
@ -291,10 +251,6 @@
#{site},
#{resrce},
#{status},
#{dateTime},
#{changeStatus},
#{changeDateTime},
#{intervalTime},
#{createUser},
#{createdDateTime},
#{modifyUser},
@ -308,10 +264,6 @@
<if test="et.site!=null">SITE=#{et.site},</if>
<if test="et.resrce!=null">RESRCE=#{et.resrce},</if>
<if test="et.status!=null">STATUS=#{et.status},</if>
<if test="et.dateTime!=null">DATE_TIME=#{et.dateTime},</if>
<if test="et.changeStatus!=null">CHANGE_STATUS=#{et.changeStatus},</if>
<if test="et.changeDateTime!=null">CHANGE_DATE_TIME=#{et.changeDateTime},</if>
<if test="et.intervalTime!=null">INTERVAL_TIME=#{et.intervalTime},</if>
<if test="et.createUser!=null">CREATE_USER=#{et.createUser},</if>
<if test="et.createdDateTime!=null">CREATED_DATE_TIME=#{et.createdDateTime},</if>
<if test="et.modifyUser!=null">MODIFY_USER=#{et.modifyUser},</if>
@ -325,10 +277,6 @@
SITE=#{et.site},
RESRCE=#{et.resrce},
STATUS=#{et.status},
DATE_TIME=#{et.dateTime},
CHANGE_STATUS=#{et.changeStatus},
CHANGE_DATE_TIME=#{et.changeDateTime},
INTERVAL_TIME=#{et.intervalTime},
CREATE_USER=#{et.createUser},
CREATED_DATE_TIME=#{et.createdDateTime},
MODIFY_USER=#{et.modifyUser},
@ -342,10 +290,6 @@
<if test="et.site!=null">SITE=#{et.site},</if>
<if test="et.resrce!=null">RESRCE=#{et.resrce},</if>
<if test="et.status!=null">STATUS=#{et.status},</if>
<if test="et.dateTime!=null">DATE_TIME=#{et.dateTime},</if>
<if test="et.changeStatus!=null">CHANGE_STATUS=#{et.changeStatus},</if>
<if test="et.changeDateTime!=null">CHANGE_DATE_TIME=#{et.changeDateTime},</if>
<if test="et.intervalTime!=null">INTERVAL_TIME=#{et.intervalTime},</if>
<if test="et.createUser!=null">CREATE_USER=#{et.createUser},</if>
<if test="et.createdDateTime!=null">CREATED_DATE_TIME=#{et.createdDateTime},</if>
<if test="et.modifyUser!=null">MODIFY_USER=#{et.modifyUser},</if>
@ -358,10 +302,6 @@
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.resrce!=null"> AND RESRCE=#{ew.entity.resrce}</if>
<if test="ew.entity.status!=null"> AND STATUS=#{ew.entity.status}</if>
<if test="ew.entity.dateTime!=null"> AND DATE_TIME=#{ew.entity.dateTime}</if>
<if test="ew.entity.changeStatus!=null"> AND CHANGE_STATUS=#{ew.entity.changeStatus}</if>
<if test="ew.entity.changeDateTime!=null"> AND CHANGE_DATE_TIME=#{ew.entity.changeDateTime}</if>
<if test="ew.entity.intervalTime!=null"> AND INTERVAL_TIME=#{ew.entity.intervalTime}</if>
<if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.modifyUser!=null"> AND MODIFY_USER=#{ew.entity.modifyUser}</if>
@ -405,10 +345,6 @@
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.resrce!=null"> AND RESRCE=#{ew.entity.resrce}</if>
<if test="ew.entity.status!=null"> AND STATUS=#{ew.entity.status}</if>
<if test="ew.entity.dateTime!=null"> AND DATE_TIME=#{ew.entity.dateTime}</if>
<if test="ew.entity.changeStatus!=null"> AND CHANGE_STATUS=#{ew.entity.changeStatus}</if>
<if test="ew.entity.changeDateTime!=null"> AND CHANGE_DATE_TIME=#{ew.entity.changeDateTime}</if>
<if test="ew.entity.intervalTime!=null"> AND INTERVAL_TIME=#{ew.entity.intervalTime}</if>
<if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.modifyUser!=null"> AND MODIFY_USER=#{ew.entity.modifyUser}</if>
@ -434,15 +370,14 @@
<!--自定义sql-->
<select id="getOneByMaxCreateDateTime" resultType="com.foreverwin.mesnac.equip.model.ResourceStatusReceive">
SELECT * FROM (
SELECT ROWNUM SEQ, RSR.*
FROM Z_RESOURCE_STATUS_RECEIVE RSR
WHERE RSR.CHANGE_STATUS IS NULL AND RSR.SITE = #{site} AND RSR.RESRCE = #{resrce}
ORDER BY RSR.CREATED_DATE_TIME DESC
) WHERE SEQ = 1
SELECT ROWNUM SEQ, RSR.*
FROM Z_RESOURCE_STATUS_RECEIVE RSR
WHERE RSR.MODIFIED_DATE_TIME IS NULL AND RSR.SITE = #{site} AND RSR.RESRCE = #{resrce}
ORDER BY RSR.CREATED_DATE_TIME DESC
) WHERE SEQ = 1
</select>
<!--自定义sql-->
</mapper>

Loading…
Cancel
Save