Merge remote-tracking branch 'origin/master'

master
赵嘉伟 3 years ago
commit 9da5cd6c4e

@ -16,7 +16,7 @@ import java.util.List;
/**
*
* @author pavel.liu
* @since 2021-09-27
* @since 2021-10-09
*/
@RestController
@RequestMapping("/Z-RESOURCE-RUN-TIME")
@ -69,6 +69,7 @@ public class ResourceRunTimeController {
queryWrapper.lambda().and(wrapper -> wrapper
.like(ResourceRunTime::getHandle, frontPage.getGlobalQuery())
.or().like(ResourceRunTime::getSite, frontPage.getGlobalQuery())
.or().like(ResourceRunTime::getSendDate, frontPage.getGlobalQuery())
.or().like(ResourceRunTime::getResrce, frontPage.getGlobalQuery())
.or().like(ResourceRunTime::getCreatedUser, frontPage.getGlobalQuery())
.or().like(ResourceRunTime::getModifiedUser, frontPage.getGlobalQuery())

@ -16,7 +16,7 @@ import com.baomidou.mybatisplus.annotation.IdType;
* </p>
*
* @author pavel.liu
* @since 2021-09-27
* @since 2021-10-09
*/
@TableName("Z_RESOURCE_RUN_TIME")
@ -30,11 +30,13 @@ public class ResourceRunTime extends Model<ResourceRunTime> {
@TableField("SITE")
private String site;
@TableField("SEND_DATE")
private LocalDateTime sendDate;
private String sendDate;
@TableField("RESRCE")
private String resrce;
@TableField("RUN_TIME")
private Double runTime;
@TableField("UP_TIME")
private LocalDateTime upTime;
@TableField("CREATED_USER")
private String createdUser;
@TableField("CREATED_DATA_TIME")
@ -61,11 +63,11 @@ public class ResourceRunTime extends Model<ResourceRunTime> {
this.site = site;
}
public LocalDateTime getSendDate() {
public String getSendDate() {
return sendDate;
}
public void setSendDate(LocalDateTime sendDate) {
public void setSendDate(String sendDate) {
this.sendDate = sendDate;
}
@ -85,6 +87,14 @@ public class ResourceRunTime extends Model<ResourceRunTime> {
this.runTime = runTime;
}
public LocalDateTime getUpTime() {
return upTime;
}
public void setUpTime(LocalDateTime upTime) {
this.upTime = upTime;
}
public String getCreatedUser() {
return createdUser;
}
@ -127,6 +137,8 @@ public static final String RESRCE = "RESRCE";
public static final String RUN_TIME = "RUN_TIME";
public static final String UP_TIME = "UP_TIME";
public static final String CREATED_USER = "CREATED_USER";
public static final String CREATED_DATA_TIME = "CREATED_DATA_TIME";
@ -149,6 +161,7 @@ public static final String MODIFIED_DATE_TIME = "MODIFIED_DATE_TIME";
", sendDate = " + sendDate +
", resrce = " + resrce +
", runTime = " + runTime +
", upTime = " + upTime +
", createdUser = " + createdUser +
", createdDataTime = " + createdDataTime +
", modifiedUser = " + modifiedUser +

@ -62,9 +62,7 @@ public class ResourceRunTimeServiceImpl extends ServiceImpl<ResourceRunTimeMappe
DateTimeFormatter dataFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
LocalDateTime dateTime = LocalDateTime.parse(sendTime,dataFormatter);
// 设备运行时间的日期
DateTimeFormatter dataFormatter2 = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
String sendDate = jsonObject.getString("SENE_DATE");
LocalDateTime dateDay = LocalDateTime.parse(sendDate + " 08:00:00",dataFormatter2);
if (StringUtil.isBlank(site)) {
throw BusinessException.build("站点不能为空!");
@ -79,13 +77,18 @@ public class ResourceRunTimeServiceImpl extends ServiceImpl<ResourceRunTimeMappe
resourceRunTime.setSite(site);
resourceRunTime.setCreatedDataTime(dateTime);
resourceRunTime.setCreatedUser(user);
resourceRunTime.setSendDate(dateDay);
resourceRunTime.setSendDate(sendDate);
JSONObject jsonObj = (JSONObject) jsonArray.get(i);
String runTime = jsonObj.getString("RUN_TIME");
String resource = jsonObj.getString("RESOURCE");
resourceRunTime.setRunTime(Double.valueOf(runTime));
resourceRunTime.setResrce(resource);
String upTime = jsonObj.getString("UP_TIME");
if (upTime != null && !upTime.equals("")){
LocalDateTime upDate = LocalDateTime.parse(upTime,dataFormatter);
resourceRunTime.setUpTime(upDate);
}
resourceRunTime.setHandle(UUID.randomUUID().toString());
list.add(resourceRunTime);
}

@ -9,6 +9,7 @@
<result column="SEND_DATE" property="sendDate" />
<result column="RESRCE" property="resrce" />
<result column="RUN_TIME" property="runTime" />
<result column="UP_TIME" property="upTime" />
<result column="CREATED_USER" property="createdUser" />
<result column="CREATED_DATA_TIME" property="createdDataTime" />
<result column="MODIFIED_USER" property="modifiedUser" />
@ -17,7 +18,7 @@
<!-- 通用查询结果列 -->
<sql id="Base_Column_List">
HANDLE, SITE, SEND_DATE, RESRCE, RUN_TIME, CREATED_USER, CREATED_DATA_TIME, MODIFIED_USER, MODIFIED_DATE_TIME
HANDLE, SITE, SEND_DATE, RESRCE, RUN_TIME, UP_TIME, CREATED_USER, CREATED_DATA_TIME, MODIFIED_USER, MODIFIED_DATE_TIME
</sql>
<!-- BaseMapper标准查询/修改/删除 -->
@ -56,6 +57,7 @@
<if test="ew.entity.sendDate!=null"> AND SEND_DATE=#{ew.entity.sendDate}</if>
<if test="ew.entity.resrce!=null"> AND RESRCE=#{ew.entity.resrce}</if>
<if test="ew.entity.runTime!=null"> AND RUN_TIME=#{ew.entity.runTime}</if>
<if test="ew.entity.upTime!=null"> AND UP_TIME=#{ew.entity.upTime}</if>
<if test="ew.entity.createdUser!=null"> AND CREATED_USER=#{ew.entity.createdUser}</if>
<if test="ew.entity.createdDataTime!=null"> AND CREATED_DATA_TIME=#{ew.entity.createdDataTime}</if>
<if test="ew.entity.modifiedUser!=null"> AND MODIFIED_USER=#{ew.entity.modifiedUser}</if>
@ -75,6 +77,7 @@
<if test="ew.entity.sendDate!=null"> AND SEND_DATE=#{ew.entity.sendDate}</if>
<if test="ew.entity.resrce!=null"> AND RESRCE=#{ew.entity.resrce}</if>
<if test="ew.entity.runTime!=null"> AND RUN_TIME=#{ew.entity.runTime}</if>
<if test="ew.entity.upTime!=null"> AND UP_TIME=#{ew.entity.upTime}</if>
<if test="ew.entity.createdUser!=null"> AND CREATED_USER=#{ew.entity.createdUser}</if>
<if test="ew.entity.createdDataTime!=null"> AND CREATED_DATA_TIME=#{ew.entity.createdDataTime}</if>
<if test="ew.entity.modifiedUser!=null"> AND MODIFIED_USER=#{ew.entity.modifiedUser}</if>
@ -102,6 +105,7 @@
<if test="ew.entity.sendDate!=null"> AND SEND_DATE=#{ew.entity.sendDate}</if>
<if test="ew.entity.resrce!=null"> AND RESRCE=#{ew.entity.resrce}</if>
<if test="ew.entity.runTime!=null"> AND RUN_TIME=#{ew.entity.runTime}</if>
<if test="ew.entity.upTime!=null"> AND UP_TIME=#{ew.entity.upTime}</if>
<if test="ew.entity.createdUser!=null"> AND CREATED_USER=#{ew.entity.createdUser}</if>
<if test="ew.entity.createdDataTime!=null"> AND CREATED_DATA_TIME=#{ew.entity.createdDataTime}</if>
<if test="ew.entity.modifiedUser!=null"> AND MODIFIED_USER=#{ew.entity.modifiedUser}</if>
@ -129,6 +133,7 @@
<if test="ew.entity.sendDate!=null"> AND SEND_DATE=#{ew.entity.sendDate}</if>
<if test="ew.entity.resrce!=null"> AND RESRCE=#{ew.entity.resrce}</if>
<if test="ew.entity.runTime!=null"> AND RUN_TIME=#{ew.entity.runTime}</if>
<if test="ew.entity.upTime!=null"> AND UP_TIME=#{ew.entity.upTime}</if>
<if test="ew.entity.createdUser!=null"> AND CREATED_USER=#{ew.entity.createdUser}</if>
<if test="ew.entity.createdDataTime!=null"> AND CREATED_DATA_TIME=#{ew.entity.createdDataTime}</if>
<if test="ew.entity.modifiedUser!=null"> AND MODIFIED_USER=#{ew.entity.modifiedUser}</if>
@ -156,6 +161,7 @@
<if test="ew.entity.sendDate!=null"> AND SEND_DATE=#{ew.entity.sendDate}</if>
<if test="ew.entity.resrce!=null"> AND RESRCE=#{ew.entity.resrce}</if>
<if test="ew.entity.runTime!=null"> AND RUN_TIME=#{ew.entity.runTime}</if>
<if test="ew.entity.upTime!=null"> AND UP_TIME=#{ew.entity.upTime}</if>
<if test="ew.entity.createdUser!=null"> AND CREATED_USER=#{ew.entity.createdUser}</if>
<if test="ew.entity.createdDataTime!=null"> AND CREATED_DATA_TIME=#{ew.entity.createdDataTime}</if>
<if test="ew.entity.modifiedUser!=null"> AND MODIFIED_USER=#{ew.entity.modifiedUser}</if>
@ -183,6 +189,7 @@
<if test="ew.entity.sendDate!=null"> AND SEND_DATE=#{ew.entity.sendDate}</if>
<if test="ew.entity.resrce!=null"> AND RESRCE=#{ew.entity.resrce}</if>
<if test="ew.entity.runTime!=null"> AND RUN_TIME=#{ew.entity.runTime}</if>
<if test="ew.entity.upTime!=null"> AND UP_TIME=#{ew.entity.upTime}</if>
<if test="ew.entity.createdUser!=null"> AND CREATED_USER=#{ew.entity.createdUser}</if>
<if test="ew.entity.createdDataTime!=null"> AND CREATED_DATA_TIME=#{ew.entity.createdDataTime}</if>
<if test="ew.entity.modifiedUser!=null"> AND MODIFIED_USER=#{ew.entity.modifiedUser}</if>
@ -210,6 +217,7 @@
<if test="ew.entity.sendDate!=null"> AND SEND_DATE=#{ew.entity.sendDate}</if>
<if test="ew.entity.resrce!=null"> AND RESRCE=#{ew.entity.resrce}</if>
<if test="ew.entity.runTime!=null"> AND RUN_TIME=#{ew.entity.runTime}</if>
<if test="ew.entity.upTime!=null"> AND UP_TIME=#{ew.entity.upTime}</if>
<if test="ew.entity.createdUser!=null"> AND CREATED_USER=#{ew.entity.createdUser}</if>
<if test="ew.entity.createdDataTime!=null"> AND CREATED_DATA_TIME=#{ew.entity.createdDataTime}</if>
<if test="ew.entity.modifiedUser!=null"> AND MODIFIED_USER=#{ew.entity.modifiedUser}</if>
@ -233,6 +241,7 @@
<if test="sendDate!=null">SEND_DATE,</if>
<if test="resrce!=null">RESRCE,</if>
<if test="runTime!=null">RUN_TIME,</if>
<if test="upTime!=null">UP_TIME,</if>
<if test="createdUser!=null">CREATED_USER,</if>
<if test="createdDataTime!=null">CREATED_DATA_TIME,</if>
<if test="modifiedUser!=null">MODIFIED_USER,</if>
@ -244,6 +253,7 @@
<if test="sendDate!=null">#{sendDate},</if>
<if test="resrce!=null">#{resrce},</if>
<if test="runTime!=null">#{runTime},</if>
<if test="upTime!=null">#{upTime},</if>
<if test="createdUser!=null">#{createdUser},</if>
<if test="createdDataTime!=null">#{createdDataTime},</if>
<if test="modifiedUser!=null">#{modifiedUser},</if>
@ -262,6 +272,7 @@
#{sendDate},
#{resrce},
#{runTime},
#{upTime},
#{createdUser},
#{createdDataTime},
#{modifiedUser},
@ -276,6 +287,7 @@
<if test="et.sendDate!=null">SEND_DATE=#{et.sendDate},</if>
<if test="et.resrce!=null">RESRCE=#{et.resrce},</if>
<if test="et.runTime!=null">RUN_TIME=#{et.runTime},</if>
<if test="et.upTime!=null">UP_TIME=#{et.upTime},</if>
<if test="et.createdUser!=null">CREATED_USER=#{et.createdUser},</if>
<if test="et.createdDataTime!=null">CREATED_DATA_TIME=#{et.createdDataTime},</if>
<if test="et.modifiedUser!=null">MODIFIED_USER=#{et.modifiedUser},</if>
@ -290,6 +302,7 @@
SEND_DATE=#{et.sendDate},
RESRCE=#{et.resrce},
RUN_TIME=#{et.runTime},
UP_TIME=#{et.upTime},
CREATED_USER=#{et.createdUser},
CREATED_DATA_TIME=#{et.createdDataTime},
MODIFIED_USER=#{et.modifiedUser},
@ -304,6 +317,7 @@
<if test="et.sendDate!=null">SEND_DATE=#{et.sendDate},</if>
<if test="et.resrce!=null">RESRCE=#{et.resrce},</if>
<if test="et.runTime!=null">RUN_TIME=#{et.runTime},</if>
<if test="et.upTime!=null">UP_TIME=#{et.upTime},</if>
<if test="et.createdUser!=null">CREATED_USER=#{et.createdUser},</if>
<if test="et.createdDataTime!=null">CREATED_DATA_TIME=#{et.createdDataTime},</if>
<if test="et.modifiedUser!=null">MODIFIED_USER=#{et.modifiedUser},</if>
@ -317,6 +331,7 @@
<if test="ew.entity.sendDate!=null"> AND SEND_DATE=#{ew.entity.sendDate}</if>
<if test="ew.entity.resrce!=null"> AND RESRCE=#{ew.entity.resrce}</if>
<if test="ew.entity.runTime!=null"> AND RUN_TIME=#{ew.entity.runTime}</if>
<if test="ew.entity.upTime!=null"> AND UP_TIME=#{ew.entity.upTime}</if>
<if test="ew.entity.createdUser!=null"> AND CREATED_USER=#{ew.entity.createdUser}</if>
<if test="ew.entity.createdDataTime!=null"> AND CREATED_DATA_TIME=#{ew.entity.createdDataTime}</if>
<if test="ew.entity.modifiedUser!=null"> AND MODIFIED_USER=#{ew.entity.modifiedUser}</if>
@ -361,6 +376,7 @@
<if test="ew.entity.sendDate!=null"> AND SEND_DATE=#{ew.entity.sendDate}</if>
<if test="ew.entity.resrce!=null"> AND RESRCE=#{ew.entity.resrce}</if>
<if test="ew.entity.runTime!=null"> AND RUN_TIME=#{ew.entity.runTime}</if>
<if test="ew.entity.upTime!=null"> AND UP_TIME=#{ew.entity.upTime}</if>
<if test="ew.entity.createdUser!=null"> AND CREATED_USER=#{ew.entity.createdUser}</if>
<if test="ew.entity.createdDataTime!=null"> AND CREATED_DATA_TIME=#{ew.entity.createdDataTime}</if>
<if test="ew.entity.modifiedUser!=null"> AND MODIFIED_USER=#{ew.entity.modifiedUser}</if>

Loading…
Cancel
Save