Commit 48a49f27 by liuyang

2024-04-25 设备日志和设备异常显示优化和调整

parent 97317e0e
...@@ -48,16 +48,16 @@ public class ServiceHPTCP001 extends ServiceBase { ...@@ -48,16 +48,16 @@ public class ServiceHPTCP001 extends ServiceBase {
hpsb002.setCompanyCode(list.get(0).getCompanyCode()); hpsb002.setCompanyCode(list.get(0).getCompanyCode());
} }
if (StringUtils.isNotEmpty(equipmentType)) { if (StringUtils.isNotEmpty(equipmentType)) {
hpsb002.setEquipmentCode(hpsb00A.getEquipmentCode());
hpsb002.setEquipmentType(hpsb00A.getEquipmentType());
hpsb002.setCreatedBy("自动化中转程序");
hpsb002.setCreatedTime(DateUtils.shortDateTime());
if (equipmentType.equals(HPConstants.STARUS_TYPE)) { if (equipmentType.equals(HPConstants.STARUS_TYPE)) {
//解析设备状态 //解析设备状态
List<CutterbarStatus> cutterbarStatusList = XmlUtils.readXml(hpsb00A.getDataContent(), CutterbarStatus.class); List<CutterbarStatus> cutterbarStatusList = XmlUtils.readXml(hpsb00A.getDataContent(), CutterbarStatus.class);
//hpsb002.setId(StringUtils.uuid()); //hpsb002.setId(StringUtils.uuid());
hpsb002.setEquipmentCode(hpsb00A.getEquipmentCode());
hpsb002.setEquipmentType(hpsb00A.getEquipmentType());
hpsb002.setLogValue(cutterbarStatusList.get(0).getStatus().toString()); hpsb002.setLogValue(cutterbarStatusList.get(0).getStatus().toString());
hpsb002.setLogInivalue(formatStatus(cutterbarStatusList.get(0).getStatus().toString())); hpsb002.setLogInivalue(formatStatus(cutterbarStatusList.get(0).getStatus().toString()));
hpsb002.setCreatedBy("自动化中转程序");
hpsb002.setCreatedTime(DateUtils.shortDateTime());
this.dao.insert("HPSB002.insert",hpsb002); this.dao.insert("HPSB002.insert",hpsb002);
inInfo.setStatus(EiConstant.STATUS_SUCCESS); inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsg(outInfo.getMsg()); inInfo.setMsg(outInfo.getMsg());
...@@ -67,12 +67,8 @@ public class ServiceHPTCP001 extends ServiceBase { ...@@ -67,12 +67,8 @@ public class ServiceHPTCP001 extends ServiceBase {
//解析开机时间 //解析开机时间
List<CutterbarTime> cutterbarTimeList = XmlUtils.readXml(hpsb00A.getDataContent(), CutterbarTime.class); List<CutterbarTime> cutterbarTimeList = XmlUtils.readXml(hpsb00A.getDataContent(), CutterbarTime.class);
//hpsb002.setId(StringUtils.uuid()); //hpsb002.setId(StringUtils.uuid());
hpsb002.setEquipmentCode(hpsb00A.getEquipmentCode());
hpsb002.setEquipmentType(hpsb00A.getEquipmentType());
hpsb002.setLogValue(cutterbarTimeList.get(0).getTime()); hpsb002.setLogValue(cutterbarTimeList.get(0).getTime());
hpsb002.setLogInivalue(String.format("开机启动时间[%s]", cutterbarTimeList.get(0).getTime())); hpsb002.setLogInivalue(String.format("开机启动时间[%s]", cutterbarTimeList.get(0).getTime()));
hpsb002.setCreatedBy("自动化中转程序");
hpsb002.setCreatedTime(DateUtils.shortDateTime());
this.dao.insert("HPSB002.insert",hpsb002); this.dao.insert("HPSB002.insert",hpsb002);
inInfo.setStatus(EiConstant.STATUS_SUCCESS); inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsg(outInfo.getMsg()); inInfo.setMsg(outInfo.getMsg());
...@@ -98,14 +94,19 @@ public class ServiceHPTCP001 extends ServiceBase { ...@@ -98,14 +94,19 @@ public class ServiceHPTCP001 extends ServiceBase {
if(errorCode.compareTo(new Integer(200))>=0 && errorCode.compareTo(new Integer(299))<=0){ if(errorCode.compareTo(new Integer(200))>=0 && errorCode.compareTo(new Integer(299))<=0){
hpsb001.setErrorText(String.format("(程序号:%s,行号 %s)goto 跳转行%s 不存在", cutterbarWarning.getProgramNo(), hpsb001.setErrorText(String.format("(程序号:%s,行号 %s)goto 跳转行%s 不存在", cutterbarWarning.getProgramNo(),
cutterbarWarning.getRowNo(),cutterbarWarning.getGotoRowNone())); cutterbarWarning.getRowNo(),cutterbarWarning.getGotoRowNone()));
hpsb002.setLogInivalue(String.format("(程序号:%s,行号 %s)goto 跳转行%s 不存在", cutterbarWarning.getProgramNo(),
cutterbarWarning.getRowNo(),cutterbarWarning.getGotoRowNone()));
}else if(errorCode.compareTo(new Integer(300))>=0 && errorCode.compareTo(new Integer(399))<=0){ }else if(errorCode.compareTo(new Integer(300))>=0 && errorCode.compareTo(new Integer(399))<=0){
hpsb001.setErrorText(String.format(" (文件:%s,行号 %s)括号不匹配", cutterbarWarning.getFileName(), hpsb001.setErrorText(String.format(" (文件:%s,行号 %s)括号不匹配", cutterbarWarning.getFileName(),
cutterbarWarning.getRowNo())); cutterbarWarning.getRowNo()));
hpsb002.setLogInivalue(String.format(" (文件:%s,行号 %s)括号不匹配", cutterbarWarning.getFileName(),
cutterbarWarning.getRowNo()));
} }
hpsb001.setCreatedBy("自动化中转程序"); hpsb001.setCreatedBy("自动化中转程序");
hpsb001.setCreatedTime(DateUtils.shortDateTime()); hpsb001.setCreatedTime(DateUtils.shortDateTime());
this.dao.insert("HPSB001.insert",hpsb001); this.dao.insert("HPSB001.insert",hpsb001);
this.dao.insert("HPSB002.insert",hpsb002);
inInfo.setStatus(EiConstant.STATUS_SUCCESS); inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsg(outInfo.getMsg()); inInfo.setMsg(outInfo.getMsg());
return inInfo; return inInfo;
......
...@@ -19,8 +19,7 @@ ...@@ -19,8 +19,7 @@
<EF:EFColumn ename="id" cname="主键id" hidden="true"/> <EF:EFColumn ename="id" cname="主键id" hidden="true"/>
<%--<EF:EFColumn ename="createdBy" cname="操作人" enable="false" readonly="true" width="150" align="center"/>--%> <%--<EF:EFColumn ename="createdBy" cname="操作人" enable="false" readonly="true" width="150" align="center"/>--%>
<EF:EFComboColumn ename="equipmentType" cname="日志类型" enable="false" readonly="true" width="100" align="center"> <EF:EFComboColumn ename="equipmentType" cname="日志类型" enable="false" readonly="true" width="100" align="center">
<EF:EFOption label="" value=""/> <EF:EFCodeOption codeName="hpjx.hppz.equipmentType" />
<EF:EFOption label="异常报警" value="WARNING_TYPE"/>
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFComboColumn ename="equipmentCode" cname="设备编码" blockName="deviceCode_block_id" <EF:EFComboColumn ename="equipmentCode" cname="设备编码" blockName="deviceCode_block_id"
columnTemplate="#=valueField#-#=textField#" itemTemplate="#=valueField#-#=textField#" columnTemplate="#=valueField#-#=textField#" itemTemplate="#=valueField#-#=textField#"
......
...@@ -19,8 +19,7 @@ ...@@ -19,8 +19,7 @@
<%--<EF:EFColumn ename="createdBy" cname="操作人" enable="false" readonly="true" width="150" align="center"/>--%> <%--<EF:EFColumn ename="createdBy" cname="操作人" enable="false" readonly="true" width="150" align="center"/>--%>
<EF:EFColumn ename="equipmentType" cname="日志类型" enable="false" readonly="true" width="100" align="center"/> <EF:EFColumn ename="equipmentType" cname="日志类型" enable="false" readonly="true" width="100" align="center"/>
<EF:EFComboColumn ename="equipmentType" cname="日志类型" enable="false" readonly="true" width="100" align="center"> <EF:EFComboColumn ename="equipmentType" cname="日志类型" enable="false" readonly="true" width="100" align="center">
<EF:EFOption label="设备状态" value="STARUS_TYPE"/> <EF:EFCodeOption codeName="hpjx.hppz.equipmentType" />
<EF:EFOption label="开机时间" value="TIME_TYPE"/>
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFComboColumn ename="equipmentCode" cname="设备编码" blockName="deviceCode_block_id" <EF:EFComboColumn ename="equipmentCode" cname="设备编码" blockName="deviceCode_block_id"
columnTemplate="#=valueField#-#=textField#" itemTemplate="#=valueField#-#=textField#" columnTemplate="#=valueField#-#=textField#" itemTemplate="#=valueField#-#=textField#"
......
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