Commit ba070d8f authored by liuna's avatar liuna

同步代码

parent 3d549e7b
package com.hp.cmsz.entity;
import javax.persistence.*;
@Entity
@Table(name = "GJFX_RELATED_INNER_WORKING_ORDER_T")
public class GjfxRelatedInsideWorkingOrder {
private Long gjfxRelatedInnerWorkingOrderId;
private String warningId;
private Long innerWorkingOrderId;
@Id
@GeneratedValue(strategy= GenerationType.SEQUENCE, generator="GjfxRelatedInsideWorkingOrderSequence")
@SequenceGenerator(name = "GjfxRelatedInsideWorkingOrderSequence", sequenceName = "GJFX_RELATED_INNER_WORKING_ORDER_ID_SEQ", allocationSize=1)
public Long getGjfxRelatedInnerWorkingOrderId() {
return gjfxRelatedInnerWorkingOrderId;
}
public void setGjfxRelatedInnerWorkingOrderId(Long gjfxRelatedInnerWorkingOrderId) {
this.gjfxRelatedInnerWorkingOrderId = gjfxRelatedInnerWorkingOrderId;
}
public String getWarningId() {
return warningId;
}
public void setWarningId(String warningId) {
this.warningId = warningId;
}
public Long getInnerWorkingOrderId() {
return innerWorkingOrderId;
}
public void setInnerWorkingOrderId(Long innerWorkingOrderId) {
this.innerWorkingOrderId = innerWorkingOrderId;
}
}
package com.hp.cmsz.entity;
import javax.persistence.*;
import java.sql.Timestamp;
import java.util.List;
/**
*INNER_XCD_WORKING_ORDER_INFO_T对应的实体类
*
* @author Afe
*
*/
@Entity
@Table(name = "inner_xcd_detail_info_v")
public class InsideXcdWorkingOrderInfoView {
private Long innerWorkingOrderId;//内部协查单ID自增长
private String title;//标题
private String dataSourceId;//数据来源
private String channelName;//渠道CHANNEL_NAME
private String warningSourceName;//WARNING_SOURCE_NAME
// private String provinceCode;//省份code PROVINCE_ID
private String provinceName;//省份名称
private String askname;//请求人姓名
private String kind;//事件性质
private String origin;//事件来源
private String suborigin;//事件子来源
private String incidence;//事件影响程度
private Timestamp eventHappenTime;//事件发生时间
private String priority;//事件优先级
private String systype;//事件所属系统类型
private String syssubtype;//事件所属系统子类
private String workingOrderDescription;//协查单描述
private String attachFlag;//是否有附件
private String attachMent;//文件名
private String fileAddress;//文件地址
private String workingOrderStatus;//协查单状态
private String providerName;//PROVIDER_NAME
private String ChannelId;
private String warningSourceId;
private String providerId;
private String provinceId;
private List<GjfxRelatedInsideWorkingOrder> alarmListRelation;
public String getDataSourceId() {
return dataSourceId;
}
public void setDataSourceId(String dataSourceId) {
this.dataSourceId = dataSourceId;
}
@Transient
public List<GjfxRelatedInsideWorkingOrder> getAlarmListRelation() {
return alarmListRelation;
}
public void setAlarmListRelation(List<GjfxRelatedInsideWorkingOrder> alarmListRelation) {
this.alarmListRelation = alarmListRelation;
}
public String getChannelId() {
return ChannelId;
}
public void setChannelId(String channelId) {
ChannelId = channelId;
}
public String getWarningSourceId() {
return warningSourceId;
}
public void setWarningSourceId(String warningSourceId) {
this.warningSourceId = warningSourceId;
}
public String getProviderId() {
return providerId;
}
public void setProviderId(String providerId) {
this.providerId = providerId;
}
public String getProvinceId() {
return provinceId;
}
public void setProvinceId(String provinceId) {
this.provinceId = provinceId;
}
public String getProviderName() {
return providerName;
}
public void setProviderName(String providerName) {
this.providerName = providerName;
}
public String getWarningSourceName() {
return warningSourceName;
}
public void setWarningSourceName(String warningSourceName) {
this.warningSourceName = warningSourceName;
}
public String getChannelName() {
return channelName;
}
public void setChannelName(String channelName) {
this.channelName = channelName;
}
public Timestamp getEventHappenTime() {
return eventHappenTime;
}
public void setEventHappenTime(Timestamp eventHappenTime) {
this.eventHappenTime = eventHappenTime;
}
@Id
@GeneratedValue(strategy= GenerationType.SEQUENCE, generator="XcdWorkingOrderInfoSequence")
@SequenceGenerator(name = "XcdWorkingOrderInfoSequence", sequenceName = "seq_inner_Working_Order_id", allocationSize=1)
public Long getInnerWorkingOrderId() {
return innerWorkingOrderId;
}
public void setInnerWorkingOrderId(Long innerWorkingOrderId) {
this.innerWorkingOrderId = innerWorkingOrderId;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getProvinceName() {
return provinceName;
}
public void setProvinceName(String provinceName) {
this.provinceName = provinceName;
}
public String getAskname() {
return askname;
}
public void setAskname(String askName) {
this.askname = askName;
}
public String getKind() {
return kind;
}
public void setKind(String kind) {
this.kind = kind;
}
public String getOrigin() {
return origin;
}
public void setOrigin(String origin) {
this.origin = origin;
}
public String getSuborigin() {
return suborigin;
}
public void setSuborigin(String subOrigin) {
this.suborigin = subOrigin;
}
public String getIncidence() {
return incidence;
}
public void setIncidence(String incidence) {
this.incidence = incidence;
}
public String getPriority() {
return priority;
}
public void setPriority(String priority) {
this.priority = priority;
}
public String getSystype() {
return systype;
}
public void setSystype(String systype) {
this.systype = systype;
}
public String getSyssubtype() {
return syssubtype;
}
public void setSyssubtype(String syssubtype) {
this.syssubtype = syssubtype;
}
public String getWorkingOrderDescription() {
return workingOrderDescription;
}
public void setWorkingOrderDescription(String workingOrderDescription) {
this.workingOrderDescription = workingOrderDescription;
}
public String getAttachFlag() {
return attachFlag;
}
public void setAttachFlag(String attachFlag) {
this.attachFlag = attachFlag;
}
public String getAttachMent() {
return attachMent;
}
public void setAttachMent(String attachMent) {
this.attachMent = attachMent;
}
public String getFileAddress() {
return fileAddress;
}
public void setFileAddress(String fileAddress) {
this.fileAddress = fileAddress;
}
public String getWorkingOrderStatus() {
return workingOrderStatus;
}
public void setWorkingOrderStatus(String workingOrderStatus) {
this.workingOrderStatus = workingOrderStatus;
}
}
package com.hp.cmsz.repository;
import com.hp.cmsz.entity.GjfxRelatedInsideWorkingOrder;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;
import java.util.List;
public interface GjfxRelatedInsideWorkingOrderDao extends PagingAndSortingRepository<GjfxRelatedInsideWorkingOrder, Long>,
JpaSpecificationExecutor<GjfxRelatedInsideWorkingOrder> {
List<GjfxRelatedInsideWorkingOrder> findAllByInnerWorkingOrderId(Long id);
}
package com.hp.cmsz.repository;
import com.hp.cmsz.entity.InsideXcdWorkingOrderInfoView;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;
import java.sql.Timestamp;
import java.util.List;
public interface InsideXcdWorkingOrderInfoViewDao extends PagingAndSortingRepository<InsideXcdWorkingOrderInfoView, Long>,
JpaSpecificationExecutor<InsideXcdWorkingOrderInfoView>
{
//通过协查单ID获取 Add by afe
List<InsideXcdWorkingOrderInfoView> findByInnerWorkingOrderId(Long workingOrderCode);
//通过参数和warningStatus查找 Add by Afe
List<InsideXcdWorkingOrderInfoView> findByDataSourceIdInAndChannelIdInAndWarningSourceIdInAndProviderIdInAndProvinceIdInAndEventHappenTimeBetweenOrderByEventHappenTimeDesc(
List<String> datasourceId,
List<String> channelId,
List<String> warningSourceId,
List<String> providerId,
List<String> provinceId,
Timestamp startTime,
Timestamp endTime
);
}
package com.hp.cmsz.service.monitoroperation;
import com.hp.cmsz.entity.InsideXcdWorkingOrderInfoView;
import com.hp.cmsz.repository.InsideXcdWorkingOrderInfoViewDao;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Sort;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.sql.Timestamp;
import java.util.List;
@Service
public class InsideXcdWorkingOrderInfoViewService {
@Resource
private InsideXcdWorkingOrderInfoViewDao InsideXcdWorkingOrderInfoViewDao;
//获取所有的告警(预警/隐患)
public List<InsideXcdWorkingOrderInfoView> getAllInsideXcdWarning(){
return (List<InsideXcdWorkingOrderInfoView>) InsideXcdWorkingOrderInfoViewDao.findAll();
}
//通过参数筛选出InsideXcdWorkingOrderInfoView对象
public List<InsideXcdWorkingOrderInfoView> getByParameters(
List<String> DataSource,
List<String> ChannelName,
List<String> warningSource,
List<String> providerName,
List<String> provinceName,
Timestamp startDate,
Timestamp endDate){
return (List<InsideXcdWorkingOrderInfoView>)InsideXcdWorkingOrderInfoViewDao.findByDataSourceIdInAndChannelIdInAndWarningSourceIdInAndProviderIdInAndProvinceIdInAndEventHappenTimeBetweenOrderByEventHappenTimeDesc(DataSource, ChannelName, warningSource, providerName,provinceName, startDate, endDate);
}
//通过协查单筛选处InsideXcdWorkingOrderInfoView对象
public List<InsideXcdWorkingOrderInfoView> findByInnerWorkingOrderId(String workingOrderCode){
return InsideXcdWorkingOrderInfoViewDao.findByInnerWorkingOrderId(Long.parseLong(workingOrderCode));
}
}
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