Commit 47a0bb58 by liuyang

Merge branch 'dev' of http://git.pseer.com:8800/platform/hp-smart into dev-ly

parents 279aa8a6 f0a45380
...@@ -127,6 +127,10 @@ public class HPConstant { ...@@ -127,6 +127,10 @@ public class HPConstant {
public static final String HPBG002_DEPOSIT_CODE = "HPBG002_DEPOSIT_CODE"; public static final String HPBG002_DEPOSIT_CODE = "HPBG002_DEPOSIT_CODE";
//办公用品领用单号 //办公用品领用单号
public static final String HPBG003_RECEIVE_CODE = "HPBG003_RECEIVE_CODE"; public static final String HPBG003_RECEIVE_CODE = "HPBG003_RECEIVE_CODE";
// 维保单号
public static final String MAINTENANCE_NUMBER = "MAINTENANCE_NUMBER";
//会议室管理申请单号
public static final String CONFERENCE_APPLY_NO = "CONFERENCE_APPLY_NO";
} }
/** /**
......
...@@ -100,7 +100,7 @@ ...@@ -100,7 +100,7 @@
$orderBy$ $orderBy$
</isNotEmpty> </isNotEmpty>
<isEmpty property="orderBy"> <isEmpty property="orderBy">
ID asc ID DESC
</isEmpty> </isEmpty>
</dynamic> </dynamic>
</sql> </sql>
......
package com.baosight.hpjx.hp.xt.domain;
import com.baosight.iplat4j.core.util.NumberUtils;
import java.math.BigDecimal;
import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.core.data.DaoEPBase;
import java.util.HashMap;
import java.util.Map;
import com.baosight.iplat4j.core.util.StringUtils;
/**
* Project: <br>
* Title:HPXT003.java <br>
* Description: <br>
*
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
*
* @version 1.0
* @history 2024-10-06 15:42:22 create
*/
public class HPXT003 extends DaoEPBase {
private static final long serialVersionUID = 1L;
public static final String FIELD_ID = "id"; /* 主键id*/
public static final String FIELD_COMPANY_CODE = "companyCode"; /* 企业编码 预留*/
public static final String FIELD_DEP_CODE = "depCode"; /* 部门编码*/
public static final String FIELD_CREATED_BY = "createdBy"; /* 创建人*/
public static final String FIELD_CREATED_NAME = "createdName"; /* 创建人名称*/
public static final String FIELD_CREATED_TIME = "createdTime"; /* 创建时间*/
public static final String FIELD_UPDATED_BY = "updatedBy"; /* 更新人*/
public static final String FIELD_UPDATED_NAME = "updatedName"; /* 更新人名称*/
public static final String FIELD_UPDATED_TIME = "updatedTime"; /* 更新时间*/
public static final String FIELD_MAINTENANCE_DATE = "maintenanceDate"; /* 维护日期*/
public static final String FIELD_MAINTENANCE_NUMBER = "maintenanceNumber"; /* 维保单号*/
public static final String FIELD_MAINTENANCE_TYPE = "maintenanceType"; /* 维保类型*/
public static final String FIELD_LICENSE_PLATE = "licensePlate"; /* 车牌号*/
public static final String FIELD_HANDLER = "handler"; /* 经办人*/
public static final String FIELD_MAINTENANCE_COST = "maintenanceCost"; /* 维保费用*/
public static final String FIELD_MAINTENANCE_REASON = "maintenanceReason"; /* 维保原因*/
public static final String FIELD_DELETE_FLAG = "deleteFlag"; /* 删除标记*/
public static final String COL_ID = "ID"; /* 主键id*/
public static final String COL_COMPANY_CODE = "COMPANY_CODE"; /* 企业编码 预留*/
public static final String COL_DEP_CODE = "DEP_CODE"; /* 部门编码*/
public static final String COL_CREATED_BY = "CREATED_BY"; /* 创建人*/
public static final String COL_CREATED_NAME = "CREATED_NAME"; /* 创建人名称*/
public static final String COL_CREATED_TIME = "CREATED_TIME"; /* 创建时间*/
public static final String COL_UPDATED_BY = "UPDATED_BY"; /* 更新人*/
public static final String COL_UPDATED_NAME = "UPDATED_NAME"; /* 更新人名称*/
public static final String COL_UPDATED_TIME = "UPDATED_TIME"; /* 更新时间*/
public static final String COL_MAINTENANCE_DATE = "MAINTENANCE_DATE"; /* 维护日期*/
public static final String COL_MAINTENANCE_NUMBER = "MAINTENANCE_NUMBER"; /* 维保单号*/
public static final String COL_MAINTENANCE_TYPE = "MAINTENANCE_TYPE"; /* 维保类型*/
public static final String COL_LICENSE_PLATE = "LICENSE_PLATE"; /* 车牌号*/
public static final String COL_HANDLER = "HANDLER"; /* 经办人*/
public static final String COL_MAINTENANCE_COST = "MAINTENANCE_COST"; /* 维保费用*/
public static final String COL_MAINTENANCE_REASON = "MAINTENANCE_REASON"; /* 维保原因*/
public static final String COL_DELETE_FLAG = "DELETE_FLAG"; /* 删除标记*/
public static final String QUERY = "HPXT003.query";
public static final String COUNT = "HPXT003.count";
public static final String INSERT = "HPXT003.insert";
public static final String UPDATE = "HPXT003.update";
public static final String DELETE = "HPXT003.delete";
public static final String DELETE_FLAG = "HPXT003.deleteFlag";
private Long id = new Long(0); /* 主键id*/
private String companyCode = " "; /* 企业编码 预留*/
private String depCode = " "; /* 部门编码*/
private String createdBy = " "; /* 创建人*/
private String createdName = " "; /* 创建人名称*/
private String createdTime = " "; /* 创建时间*/
private String updatedBy = " "; /* 更新人*/
private String updatedName = " "; /* 更新人名称*/
private String updatedTime = " "; /* 更新时间*/
private String maintenanceDate = " "; /* 维护日期*/
private String maintenanceNumber = " "; /* 维保单号*/
private Integer maintenanceType = 0; /* 维保类型*/
private String licensePlate = " "; /* 车牌号*/
private String handler = " "; /* 经办人*/
private BigDecimal maintenanceCost = new BigDecimal("0"); /* 维保费用*/
private String maintenanceReason = " "; /* 维保原因*/
private Integer deleteFlag = 0; /* 删除标记*/
/**
* initialize the metadata.
*/
public void initMetaData() {
EiColumn eiColumn;
eiColumn = new EiColumn(FIELD_ID);
eiColumn.setPrimaryKey(true);
eiColumn.setDescName("主键id");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_COMPANY_CODE);
eiColumn.setDescName("企业编码 预留");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DEP_CODE);
eiColumn.setDescName("部门编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CREATED_BY);
eiColumn.setDescName("创建人");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CREATED_NAME);
eiColumn.setDescName("创建人名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CREATED_TIME);
eiColumn.setDescName("创建时间");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UPDATED_BY);
eiColumn.setDescName("更新人");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UPDATED_NAME);
eiColumn.setDescName("更新人名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UPDATED_TIME);
eiColumn.setDescName("更新时间");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_MAINTENANCE_DATE);
eiColumn.setDescName("维护日期");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_MAINTENANCE_NUMBER);
eiColumn.setDescName("维保单号");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_MAINTENANCE_TYPE);
eiColumn.setDescName("维保类型");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_LICENSE_PLATE);
eiColumn.setDescName("车牌号");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_HANDLER);
eiColumn.setDescName("经办人");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_MAINTENANCE_COST);
eiColumn.setType("N");
eiColumn.setScaleLength(2);
eiColumn.setFieldLength(10);
eiColumn.setDescName("维保费用");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_MAINTENANCE_REASON);
eiColumn.setDescName("维保原因");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DELETE_FLAG);
eiColumn.setDescName("删除标记");
eiMetadata.addMeta(eiColumn);
}
/**
* the constructor.
*/
public HPXT003() {
initMetaData();
}
/**
* get the id - 主键id.
* @return the id
*/
public Long getId() {
return this.id;
}
/**
* set the id - 主键id.
*
* @param id - 主键id
*/
public void setId(Long id) {
this.id = id;
}
/**
* get the companyCode - 企业编码 预留.
* @return the companyCode
*/
public String getCompanyCode() {
return this.companyCode;
}
/**
* set the companyCode - 企业编码 预留.
*
* @param companyCode - 企业编码 预留
*/
public void setCompanyCode(String companyCode) {
this.companyCode = companyCode;
}
/**
* get the depCode - 部门编码.
* @return the depCode
*/
public String getDepCode() {
return this.depCode;
}
/**
* set the depCode - 部门编码.
*
* @param depCode - 部门编码
*/
public void setDepCode(String depCode) {
this.depCode = depCode;
}
/**
* get the createdBy - 创建人.
* @return the createdBy
*/
public String getCreatedBy() {
return this.createdBy;
}
/**
* set the createdBy - 创建人.
*
* @param createdBy - 创建人
*/
public void setCreatedBy(String createdBy) {
this.createdBy = createdBy;
}
/**
* get the createdName - 创建人名称.
* @return the createdName
*/
public String getCreatedName() {
return this.createdName;
}
/**
* set the createdName - 创建人名称.
*
* @param createdName - 创建人名称
*/
public void setCreatedName(String createdName) {
this.createdName = createdName;
}
/**
* get the createdTime - 创建时间.
* @return the createdTime
*/
public String getCreatedTime() {
return this.createdTime;
}
/**
* set the createdTime - 创建时间.
*
* @param createdTime - 创建时间
*/
public void setCreatedTime(String createdTime) {
this.createdTime = createdTime;
}
/**
* get the updatedBy - 更新人.
* @return the updatedBy
*/
public String getUpdatedBy() {
return this.updatedBy;
}
/**
* set the updatedBy - 更新人.
*
* @param updatedBy - 更新人
*/
public void setUpdatedBy(String updatedBy) {
this.updatedBy = updatedBy;
}
/**
* get the updatedName - 更新人名称.
* @return the updatedName
*/
public String getUpdatedName() {
return this.updatedName;
}
/**
* set the updatedName - 更新人名称.
*
* @param updatedName - 更新人名称
*/
public void setUpdatedName(String updatedName) {
this.updatedName = updatedName;
}
/**
* get the updatedTime - 更新时间.
* @return the updatedTime
*/
public String getUpdatedTime() {
return this.updatedTime;
}
/**
* set the updatedTime - 更新时间.
*
* @param updatedTime - 更新时间
*/
public void setUpdatedTime(String updatedTime) {
this.updatedTime = updatedTime;
}
/**
* get the maintenanceDate - 维护日期.
* @return the maintenanceDate
*/
public String getMaintenanceDate() {
return this.maintenanceDate;
}
/**
* set the maintenanceDate - 维护日期.
*
* @param maintenanceDate - 维护日期
*/
public void setMaintenanceDate(String maintenanceDate) {
this.maintenanceDate = maintenanceDate;
}
/**
* get the maintenanceNumber - 维保单号.
* @return the maintenanceNumber
*/
public String getMaintenanceNumber() {
return this.maintenanceNumber;
}
/**
* set the maintenanceNumber - 维保单号.
*
* @param maintenanceNumber - 维保单号
*/
public void setMaintenanceNumber(String maintenanceNumber) {
this.maintenanceNumber = maintenanceNumber;
}
/**
* get the maintenanceType - 维保类型.
* @return the maintenanceType
*/
public Integer getMaintenanceType() {
return this.maintenanceType;
}
/**
* set the maintenanceType - 维保类型.
*
* @param maintenanceType - 维保类型
*/
public void setMaintenanceType(Integer maintenanceType) {
this.maintenanceType = maintenanceType;
}
/**
* get the licensePlate - 车牌号.
* @return the licensePlate
*/
public String getLicensePlate() {
return this.licensePlate;
}
/**
* set the licensePlate - 车牌号.
*
* @param licensePlate - 车牌号
*/
public void setLicensePlate(String licensePlate) {
this.licensePlate = licensePlate;
}
/**
* get the handler - 经办人.
* @return the handler
*/
public String getHandler() {
return this.handler;
}
/**
* set the handler - 经办人.
*
* @param handler - 经办人
*/
public void setHandler(String handler) {
this.handler = handler;
}
/**
* get the maintenanceCost - 维保费用.
* @return the maintenanceCost
*/
public BigDecimal getMaintenanceCost() {
return this.maintenanceCost;
}
/**
* set the maintenanceCost - 维保费用.
*
* @param maintenanceCost - 维保费用
*/
public void setMaintenanceCost(BigDecimal maintenanceCost) {
this.maintenanceCost = maintenanceCost;
}
/**
* get the maintenanceReason - 维保原因.
* @return the maintenanceReason
*/
public String getMaintenanceReason() {
return this.maintenanceReason;
}
/**
* set the maintenanceReason - 维保原因.
*
* @param maintenanceReason - 维保原因
*/
public void setMaintenanceReason(String maintenanceReason) {
this.maintenanceReason = maintenanceReason;
}
/**
* get the deleteFlag - 删除标记.
* @return the deleteFlag
*/
public Integer getDeleteFlag() {
return this.deleteFlag;
}
/**
* set the deleteFlag - 删除标记.
*
* @param deleteFlag - 删除标记
*/
public void setDeleteFlag(Integer deleteFlag) {
this.deleteFlag = deleteFlag;
}
/**
* get the value from Map.
*
* @param map - source data map
*/
@Override
public void fromMap(Map map) {
setId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_ID)), id));
setCompanyCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_COMPANY_CODE)), companyCode));
setDepCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DEP_CODE)), depCode));
setCreatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_BY)), createdBy));
setCreatedName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_NAME)), createdName));
setCreatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_TIME)), createdTime));
setUpdatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_BY)), updatedBy));
setUpdatedName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_NAME)), updatedName));
setUpdatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_TIME)), updatedTime));
setMaintenanceDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_MAINTENANCE_DATE)), maintenanceDate));
setMaintenanceNumber(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_MAINTENANCE_NUMBER)), maintenanceNumber));
setMaintenanceType(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_MAINTENANCE_TYPE)), maintenanceType));
setLicensePlate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_LICENSE_PLATE)), licensePlate));
setHandler(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_HANDLER)), handler));
setMaintenanceCost(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_MAINTENANCE_COST)), maintenanceCost));
setMaintenanceReason(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_MAINTENANCE_REASON)), maintenanceReason));
setDeleteFlag(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_DELETE_FLAG)), deleteFlag));
}
/**
* set the value to Map.
*/
@Override
public Map toMap() {
Map map = new HashMap();
map.put(FIELD_ID, StringUtils.toString(id, eiMetadata.getMeta(FIELD_ID)));
map.put(FIELD_COMPANY_CODE, StringUtils.toString(companyCode, eiMetadata.getMeta(FIELD_COMPANY_CODE)));
map.put(FIELD_DEP_CODE, StringUtils.toString(depCode, eiMetadata.getMeta(FIELD_DEP_CODE)));
map.put(FIELD_CREATED_BY, StringUtils.toString(createdBy, eiMetadata.getMeta(FIELD_CREATED_BY)));
map.put(FIELD_CREATED_NAME, StringUtils.toString(createdName, eiMetadata.getMeta(FIELD_CREATED_NAME)));
map.put(FIELD_CREATED_TIME, StringUtils.toString(createdTime, eiMetadata.getMeta(FIELD_CREATED_TIME)));
map.put(FIELD_UPDATED_BY, StringUtils.toString(updatedBy, eiMetadata.getMeta(FIELD_UPDATED_BY)));
map.put(FIELD_UPDATED_NAME, StringUtils.toString(updatedName, eiMetadata.getMeta(FIELD_UPDATED_NAME)));
map.put(FIELD_UPDATED_TIME, StringUtils.toString(updatedTime, eiMetadata.getMeta(FIELD_UPDATED_TIME)));
map.put(FIELD_MAINTENANCE_DATE, StringUtils.toString(maintenanceDate, eiMetadata.getMeta(FIELD_MAINTENANCE_DATE)));
map.put(FIELD_MAINTENANCE_NUMBER, StringUtils.toString(maintenanceNumber, eiMetadata.getMeta(FIELD_MAINTENANCE_NUMBER)));
map.put(FIELD_MAINTENANCE_TYPE, StringUtils.toString(maintenanceType, eiMetadata.getMeta(FIELD_MAINTENANCE_TYPE)));
map.put(FIELD_LICENSE_PLATE, StringUtils.toString(licensePlate, eiMetadata.getMeta(FIELD_LICENSE_PLATE)));
map.put(FIELD_HANDLER, StringUtils.toString(handler, eiMetadata.getMeta(FIELD_HANDLER)));
map.put(FIELD_MAINTENANCE_COST, StringUtils.toString(maintenanceCost, eiMetadata.getMeta(FIELD_MAINTENANCE_COST)));
map.put(FIELD_MAINTENANCE_REASON, StringUtils.toString(maintenanceReason, eiMetadata.getMeta(FIELD_MAINTENANCE_REASON)));
map.put(FIELD_DELETE_FLAG, StringUtils.toString(deleteFlag, eiMetadata.getMeta(FIELD_DELETE_FLAG)));
return map;
}
}
package com.baosight.hpjx.hp.xt.domain;
import com.baosight.iplat4j.core.util.NumberUtils;
import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.core.data.DaoEPBase;
import java.util.HashMap;
import java.util.Map;
import com.baosight.iplat4j.core.util.StringUtils;
/**
* Project: <br>
* Title:HPXT004.java <br>
* Description: <br>
*
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
*
* @version 1.0
* @history 2024-10-06 16:55:04 create
*/
public class HPXT004 extends DaoEPBase {
private static final long serialVersionUID = 1L;
public static final String FIELD_ID = "id"; /* 主键id*/
public static final String FIELD_COMPANY_CODE = "companyCode"; /* 企业编码 预留*/
public static final String FIELD_DEP_CODE = "depCode"; /* 部门编码*/
public static final String FIELD_CREATED_BY = "createdBy"; /* 创建人*/
public static final String FIELD_CREATED_NAME = "createdName"; /* 创建人名称*/
public static final String FIELD_CREATED_TIME = "createdTime"; /* 创建时间*/
public static final String FIELD_UPDATED_BY = "updatedBy"; /* 更新人*/
public static final String FIELD_UPDATED_NAME = "updatedName"; /* 更新人名称*/
public static final String FIELD_UPDATED_TIME = "updatedTime"; /* 更新时间*/
public static final String FIELD_APPLY_DATE = "applyDate"; /* 申请日期*/
public static final String FIELD_APPLY_NO = "applyNo"; /* 申请单号*/
public static final String FIELD_APPLY_PERSONNEL = "applyPersonnel"; /* 申请人*/
public static final String FIELD_MEETING_ROOM = "meetingRoom"; /* 会议室*/
public static final String FIELD_MEETING_SUBJECT = "meetingSubject"; /* 会议主题*/
public static final String FIELD_MEETING_NATURE = "meetingNature"; /* 会议性质*/
public static final String FIELD_IMPORTANCE_LEVEL = "importanceLevel"; /* 重要程度*/
public static final String FIELD_START_TIME = "startTime"; /* 开始时间*/
public static final String FIELD_END_TIME = "endTime"; /* 结束时间*/
public static final String FIELD_DELETE_FLAG = "deleteFlag"; /* 是否删除0.否1.是*/
public static final String FIELD_PRO_APPLY_STATUS = "proApplyStatus"; /* 审批状态 0-未提交 1-已提交*/
public static final String FIELD_STATUS = "status"; /* 返还状态 0-未返还 1-已返还*/
public static final String COL_ID = "ID"; /* 主键id*/
public static final String COL_COMPANY_CODE = "COMPANY_CODE"; /* 企业编码 预留*/
public static final String COL_DEP_CODE = "DEP_CODE"; /* 部门编码*/
public static final String COL_CREATED_BY = "CREATED_BY"; /* 创建人*/
public static final String COL_CREATED_NAME = "CREATED_NAME"; /* 创建人名称*/
public static final String COL_CREATED_TIME = "CREATED_TIME"; /* 创建时间*/
public static final String COL_UPDATED_BY = "UPDATED_BY"; /* 更新人*/
public static final String COL_UPDATED_NAME = "UPDATED_NAME"; /* 更新人名称*/
public static final String COL_UPDATED_TIME = "UPDATED_TIME"; /* 更新时间*/
public static final String COL_APPLY_DATE = "APPLY_DATE"; /* 申请日期*/
public static final String COL_APPLY_NO = "APPLY_NO"; /* 申请单号*/
public static final String COL_APPLY_PERSONNEL = "APPLY_PERSONNEL"; /* 申请人*/
public static final String COL_MEETING_ROOM = "MEETING_ROOM"; /* 会议室*/
public static final String COL_MEETING_SUBJECT = "MEETING_SUBJECT"; /* 会议主题*/
public static final String COL_MEETING_NATURE = "MEETING_NATURE"; /* 会议性质*/
public static final String COL_IMPORTANCE_LEVEL = "IMPORTANCE_LEVEL"; /* 重要程度*/
public static final String COL_START_TIME = "START_TIME"; /* 开始时间*/
public static final String COL_END_TIME = "END_TIME"; /* 结束时间*/
public static final String COL_DELETE_FLAG = "DELETE_FLAG"; /* 是否删除0.否1.是*/
public static final String COL_PRO_APPLY_STATUS = "PRO_APPLY_STATUS"; /* 审批状态 0-未提交 1-已提交*/
public static final String COL_STATUS = "STATUS"; /* 返还状态 0-未返还 1-已返还*/
public static final String QUERY = "HPXT004.query";
public static final String COUNT = "HPXT004.count";
public static final String INSERT = "HPXT004.insert";
public static final String UPDATE = "HPXT004.update";
public static final String DELETE = "HPXT004.delete";
public static final String DELETE_FLAG = "HPXT004.deleteFlag";
public static final String UPDATE_STATUS = "HPXT004.updateStatus";
public static final String UPDATE_PRO_APPLY_STATUS = "HPXT004.updateProApplyStatus";
private Long id = new Long(0); /* 主键id*/
private String companyCode = " "; /* 企业编码 预留*/
private String depCode = " "; /* 部门编码*/
private String createdBy = " "; /* 创建人*/
private String createdName = " "; /* 创建人名称*/
private String createdTime = " "; /* 创建时间*/
private String updatedBy = " "; /* 更新人*/
private String updatedName = " "; /* 更新人名称*/
private String updatedTime = " "; /* 更新时间*/
private String applyDate = " "; /* 申请日期*/
private String applyNo = " "; /* 申请单号*/
private String applyPersonnel = " "; /* 申请人*/
private String meetingRoom = " "; /* 会议室*/
private String meetingSubject = " "; /* 会议主题*/
private String meetingNature = " "; /* 会议性质*/
private String importanceLevel = " "; /* 重要程度*/
private String startTime = " "; /* 开始时间*/
private String endTime = " "; /* 结束时间*/
private Integer deleteFlag = 0; /* 是否删除0.否1.是*/
private Integer proApplyStatus = 0; /* 审批状态 0-未提交 1-已提交*/
private Integer status = 0; /* 返还状态 0-未返还 1-已返还*/
/**
* initialize the metadata.
*/
public void initMetaData() {
EiColumn eiColumn;
eiColumn = new EiColumn(FIELD_ID);
eiColumn.setPrimaryKey(true);
eiColumn.setDescName("主键id");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_COMPANY_CODE);
eiColumn.setDescName("企业编码 预留");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DEP_CODE);
eiColumn.setDescName("部门编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CREATED_BY);
eiColumn.setDescName("创建人");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CREATED_NAME);
eiColumn.setDescName("创建人名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CREATED_TIME);
eiColumn.setDescName("创建时间");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UPDATED_BY);
eiColumn.setDescName("更新人");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UPDATED_NAME);
eiColumn.setDescName("更新人名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UPDATED_TIME);
eiColumn.setDescName("更新时间");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_APPLY_DATE);
eiColumn.setDescName("申请日期");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_APPLY_NO);
eiColumn.setDescName("申请单号");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_APPLY_PERSONNEL);
eiColumn.setDescName("申请人");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_MEETING_ROOM);
eiColumn.setDescName("会议室");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_MEETING_SUBJECT);
eiColumn.setDescName("会议主题");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_MEETING_NATURE);
eiColumn.setDescName("会议性质");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_IMPORTANCE_LEVEL);
eiColumn.setDescName("重要程度");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_START_TIME);
eiColumn.setDescName("开始时间");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_END_TIME);
eiColumn.setDescName("结束时间");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DELETE_FLAG);
eiColumn.setDescName("是否删除0.否1.是");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PRO_APPLY_STATUS);
eiColumn.setDescName("审批状态 0-未提交 1-已提交");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_STATUS);
eiColumn.setDescName("返还状态 0-未返还 1-已返还");
eiMetadata.addMeta(eiColumn);
}
/**
* the constructor.
*/
public HPXT004() {
initMetaData();
}
/**
* get the id - 主键id.
* @return the id
*/
public Long getId() {
return this.id;
}
/**
* set the id - 主键id.
*
* @param id - 主键id
*/
public void setId(Long id) {
this.id = id;
}
/**
* get the companyCode - 企业编码 预留.
* @return the companyCode
*/
public String getCompanyCode() {
return this.companyCode;
}
/**
* set the companyCode - 企业编码 预留.
*
* @param companyCode - 企业编码 预留
*/
public void setCompanyCode(String companyCode) {
this.companyCode = companyCode;
}
/**
* get the depCode - 部门编码.
* @return the depCode
*/
public String getDepCode() {
return this.depCode;
}
/**
* set the depCode - 部门编码.
*
* @param depCode - 部门编码
*/
public void setDepCode(String depCode) {
this.depCode = depCode;
}
/**
* get the createdBy - 创建人.
* @return the createdBy
*/
public String getCreatedBy() {
return this.createdBy;
}
/**
* set the createdBy - 创建人.
*
* @param createdBy - 创建人
*/
public void setCreatedBy(String createdBy) {
this.createdBy = createdBy;
}
/**
* get the createdName - 创建人名称.
* @return the createdName
*/
public String getCreatedName() {
return this.createdName;
}
/**
* set the createdName - 创建人名称.
*
* @param createdName - 创建人名称
*/
public void setCreatedName(String createdName) {
this.createdName = createdName;
}
/**
* get the createdTime - 创建时间.
* @return the createdTime
*/
public String getCreatedTime() {
return this.createdTime;
}
/**
* set the createdTime - 创建时间.
*
* @param createdTime - 创建时间
*/
public void setCreatedTime(String createdTime) {
this.createdTime = createdTime;
}
/**
* get the updatedBy - 更新人.
* @return the updatedBy
*/
public String getUpdatedBy() {
return this.updatedBy;
}
/**
* set the updatedBy - 更新人.
*
* @param updatedBy - 更新人
*/
public void setUpdatedBy(String updatedBy) {
this.updatedBy = updatedBy;
}
/**
* get the updatedName - 更新人名称.
* @return the updatedName
*/
public String getUpdatedName() {
return this.updatedName;
}
/**
* set the updatedName - 更新人名称.
*
* @param updatedName - 更新人名称
*/
public void setUpdatedName(String updatedName) {
this.updatedName = updatedName;
}
/**
* get the updatedTime - 更新时间.
* @return the updatedTime
*/
public String getUpdatedTime() {
return this.updatedTime;
}
/**
* set the updatedTime - 更新时间.
*
* @param updatedTime - 更新时间
*/
public void setUpdatedTime(String updatedTime) {
this.updatedTime = updatedTime;
}
/**
* get the applyDate - 申请日期.
* @return the applyDate
*/
public String getApplyDate() {
return this.applyDate;
}
/**
* set the applyDate - 申请日期.
*
* @param applyDate - 申请日期
*/
public void setApplyDate(String applyDate) {
this.applyDate = applyDate;
}
/**
* get the applyNo - 申请单号.
* @return the applyNo
*/
public String getApplyNo() {
return this.applyNo;
}
/**
* set the applyNo - 申请单号.
*
* @param applyNo - 申请单号
*/
public void setApplyNo(String applyNo) {
this.applyNo = applyNo;
}
/**
* get the applyPersonnel - 申请人.
* @return the applyPersonnel
*/
public String getApplyPersonnel() {
return this.applyPersonnel;
}
/**
* set the applyPersonnel - 申请人.
*
* @param applyPersonnel - 申请人
*/
public void setApplyPersonnel(String applyPersonnel) {
this.applyPersonnel = applyPersonnel;
}
/**
* get the meetingRoom - 会议室.
* @return the meetingRoom
*/
public String getMeetingRoom() {
return this.meetingRoom;
}
/**
* set the meetingRoom - 会议室.
*
* @param meetingRoom - 会议室
*/
public void setMeetingRoom(String meetingRoom) {
this.meetingRoom = meetingRoom;
}
/**
* get the meetingSubject - 会议主题.
* @return the meetingSubject
*/
public String getMeetingSubject() {
return this.meetingSubject;
}
/**
* set the meetingSubject - 会议主题.
*
* @param meetingSubject - 会议主题
*/
public void setMeetingSubject(String meetingSubject) {
this.meetingSubject = meetingSubject;
}
/**
* get the meetingNature - 会议性质.
* @return the meetingNature
*/
public String getMeetingNature() {
return this.meetingNature;
}
/**
* set the meetingNature - 会议性质.
*
* @param meetingNature - 会议性质
*/
public void setMeetingNature(String meetingNature) {
this.meetingNature = meetingNature;
}
/**
* get the importanceLevel - 重要程度.
* @return the importanceLevel
*/
public String getImportanceLevel() {
return this.importanceLevel;
}
/**
* set the importanceLevel - 重要程度.
*
* @param importanceLevel - 重要程度
*/
public void setImportanceLevel(String importanceLevel) {
this.importanceLevel = importanceLevel;
}
/**
* get the startTime - 开始时间.
* @return the startTime
*/
public String getStartTime() {
return this.startTime;
}
/**
* set the startTime - 开始时间.
*
* @param startTime - 开始时间
*/
public void setStartTime(String startTime) {
this.startTime = startTime;
}
/**
* get the endTime - 结束时间.
* @return the endTime
*/
public String getEndTime() {
return this.endTime;
}
/**
* set the endTime - 结束时间.
*
* @param endTime - 结束时间
*/
public void setEndTime(String endTime) {
this.endTime = endTime;
}
/**
* get the deleteFlag - 是否删除0.否1.是.
* @return the deleteFlag
*/
public Integer getDeleteFlag() {
return this.deleteFlag;
}
/**
* set the deleteFlag - 是否删除0.否1.是.
*
* @param deleteFlag - 是否删除0.否1.是
*/
public void setDeleteFlag(Integer deleteFlag) {
this.deleteFlag = deleteFlag;
}
/**
* get the proApplyStatus - 审批状态 0-未提交 1-已提交.
* @return the proApplyStatus
*/
public Integer getProApplyStatus() {
return this.proApplyStatus;
}
/**
* set the proApplyStatus - 审批状态 0-未提交 1-已提交.
*
* @param proApplyStatus - 审批状态 0-未提交 1-已提交
*/
public void setProApplyStatus(Integer proApplyStatus) {
this.proApplyStatus = proApplyStatus;
}
/**
* get the status - 返还状态 0-未返还 1-已返还.
* @return the status
*/
public Integer getStatus() {
return this.status;
}
/**
* set the status - 返还状态 0-未返还 1-已返还.
*
* @param status - 返还状态 0-未返还 1-已返还
*/
public void setStatus(Integer status) {
this.status = status;
}
/**
* get the value from Map.
*
* @param map - source data map
*/
@Override
public void fromMap(Map map) {
setId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_ID)), id));
setCompanyCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_COMPANY_CODE)), companyCode));
setDepCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DEP_CODE)), depCode));
setCreatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_BY)), createdBy));
setCreatedName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_NAME)), createdName));
setCreatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_TIME)), createdTime));
setUpdatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_BY)), updatedBy));
setUpdatedName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_NAME)), updatedName));
setUpdatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_TIME)), updatedTime));
setApplyDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_APPLY_DATE)), applyDate));
setApplyNo(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_APPLY_NO)), applyNo));
setApplyPersonnel(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_APPLY_PERSONNEL)), applyPersonnel));
setMeetingRoom(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_MEETING_ROOM)), meetingRoom));
setMeetingSubject(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_MEETING_SUBJECT)), meetingSubject));
setMeetingNature(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_MEETING_NATURE)), meetingNature));
setImportanceLevel(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_IMPORTANCE_LEVEL)), importanceLevel));
setStartTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_START_TIME)), startTime));
setEndTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_END_TIME)), endTime));
setDeleteFlag(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_DELETE_FLAG)), deleteFlag));
setProApplyStatus(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_PRO_APPLY_STATUS)), proApplyStatus));
setStatus(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_STATUS)), status));
}
/**
* set the value to Map.
*/
@Override
public Map toMap() {
Map map = new HashMap();
map.put(FIELD_ID, StringUtils.toString(id, eiMetadata.getMeta(FIELD_ID)));
map.put(FIELD_COMPANY_CODE, StringUtils.toString(companyCode, eiMetadata.getMeta(FIELD_COMPANY_CODE)));
map.put(FIELD_DEP_CODE, StringUtils.toString(depCode, eiMetadata.getMeta(FIELD_DEP_CODE)));
map.put(FIELD_CREATED_BY, StringUtils.toString(createdBy, eiMetadata.getMeta(FIELD_CREATED_BY)));
map.put(FIELD_CREATED_NAME, StringUtils.toString(createdName, eiMetadata.getMeta(FIELD_CREATED_NAME)));
map.put(FIELD_CREATED_TIME, StringUtils.toString(createdTime, eiMetadata.getMeta(FIELD_CREATED_TIME)));
map.put(FIELD_UPDATED_BY, StringUtils.toString(updatedBy, eiMetadata.getMeta(FIELD_UPDATED_BY)));
map.put(FIELD_UPDATED_NAME, StringUtils.toString(updatedName, eiMetadata.getMeta(FIELD_UPDATED_NAME)));
map.put(FIELD_UPDATED_TIME, StringUtils.toString(updatedTime, eiMetadata.getMeta(FIELD_UPDATED_TIME)));
map.put(FIELD_APPLY_DATE, StringUtils.toString(applyDate, eiMetadata.getMeta(FIELD_APPLY_DATE)));
map.put(FIELD_APPLY_NO, StringUtils.toString(applyNo, eiMetadata.getMeta(FIELD_APPLY_NO)));
map.put(FIELD_APPLY_PERSONNEL, StringUtils.toString(applyPersonnel, eiMetadata.getMeta(FIELD_APPLY_PERSONNEL)));
map.put(FIELD_MEETING_ROOM, StringUtils.toString(meetingRoom, eiMetadata.getMeta(FIELD_MEETING_ROOM)));
map.put(FIELD_MEETING_SUBJECT, StringUtils.toString(meetingSubject, eiMetadata.getMeta(FIELD_MEETING_SUBJECT)));
map.put(FIELD_MEETING_NATURE, StringUtils.toString(meetingNature, eiMetadata.getMeta(FIELD_MEETING_NATURE)));
map.put(FIELD_IMPORTANCE_LEVEL, StringUtils.toString(importanceLevel, eiMetadata.getMeta(FIELD_IMPORTANCE_LEVEL)));
map.put(FIELD_START_TIME, StringUtils.toString(startTime, eiMetadata.getMeta(FIELD_START_TIME)));
map.put(FIELD_END_TIME, StringUtils.toString(endTime, eiMetadata.getMeta(FIELD_END_TIME)));
map.put(FIELD_DELETE_FLAG, StringUtils.toString(deleteFlag, eiMetadata.getMeta(FIELD_DELETE_FLAG)));
map.put(FIELD_PRO_APPLY_STATUS, StringUtils.toString(proApplyStatus, eiMetadata.getMeta(FIELD_PRO_APPLY_STATUS)));
map.put(FIELD_STATUS, StringUtils.toString(status, eiMetadata.getMeta(FIELD_STATUS)));
return map;
}
}
package com.baosight.hpjx.hp.xt.service; package com.baosight.hpjx.hp.xt.service;
import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation; import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation;
import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.common.InventTypeEnum;
import com.baosight.hpjx.core.constant.CommonConstant; import com.baosight.hpjx.core.constant.CommonConstant;
import com.baosight.hpjx.core.dao.DaoUtils; import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.hp.cg.domain.HPCG001;
import com.baosight.hpjx.hp.cg.domain.HPCG002;
import com.baosight.hpjx.hp.cg.domain.HPCG002A;
import com.baosight.hpjx.hp.constant.HPConstant; import com.baosight.hpjx.hp.constant.HPConstant;
import com.baosight.hpjx.hp.kc.domain.HPKC010;
import com.baosight.hpjx.hp.pz.domain.HPPZ006;
import com.baosight.hpjx.hp.pz.tools.HPPZTools;
import com.baosight.hpjx.hp.sb.domain.HPSB003;
import com.baosight.hpjx.hp.xt.domain.HPXT001; import com.baosight.hpjx.hp.xt.domain.HPXT001;
import com.baosight.hpjx.util.*; import com.baosight.hpjx.util.*;
import com.baosight.hpjx.util.contants.ACConstants; import com.baosight.hpjx.util.contants.ACConstants;
...@@ -163,14 +155,18 @@ public class ServiceHPXT001 extends ServiceEPBase { ...@@ -163,14 +155,18 @@ public class ServiceHPXT001 extends ServiceEPBase {
@OperationLogAnnotation(operModul = "车辆申请",operType = "返还",operDesc = "返还操作") @OperationLogAnnotation(operModul = "车辆申请",operType = "返还",operDesc = "返还操作")
public EiInfo returnStatus(EiInfo inInfo){ public EiInfo returnStatus(EiInfo inInfo){
int i = 0;
try { try {
String id = String.valueOf(inInfo.getAttr().get("id")); List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
HPXT001 hpxt001 = new HPXT001(); for (Map resultRow : resultRows) {
hpxt001.setId(Long.parseLong(id)); HPXT001 hpxt001 = new HPXT001();
hpxt001.setStatus(CommonConstant.YesNo.YES_1); hpxt001.fromMap(resultRow);
DaoUtils.update(HPXT001.UPDATE_STATUS, hpxt001); hpxt001.setStatus(CommonConstant.YesNo.YES_1);
DaoUtils.update(HPXT001.UPDATE_STATUS, hpxt001);
}
inInfo.setStatus(EiConstant.STATUS_SUCCESS); inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsgByKey("ep.1000", new String[]{String.valueOf(i), I18nMessages.getText("label.returnStatus", "返还")});
} catch (PlatException e) { } catch (PlatException e) {
e.printStackTrace(); e.printStackTrace();
inInfo.setStatus(EiConstant.STATUS_FAILURE); inInfo.setStatus(EiConstant.STATUS_FAILURE);
......
package com.baosight.hpjx.hp.xt.service;
import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation;
import com.baosight.hpjx.core.constant.CommonConstant;
import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.hp.constant.HPConstant;
import com.baosight.hpjx.hp.xt.domain.HPXT003;
import com.baosight.hpjx.util.ErrorCodeUtils;
import com.baosight.hpjx.util.LogUtils;
import com.baosight.hpjx.util.StringUtil;
import com.baosight.hpjx.util.contants.ACConstants;
import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.resource.I18nMessages;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import com.baosight.iplat4j.ed.util.SequenceGenerator;
import java.util.List;
import java.util.Map;
/**
*
*/
public class ServiceHPXT003 extends ServiceEPBase {
@Override
public EiInfo initLoad(EiInfo inInfo) {
return inInfo;
}
@Override
public EiInfo query(EiInfo inInfo) {
try {
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HPXT003.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
inInfo = super.query(inInfo, HPXT003.QUERY, new HPXT003());
// List sum = dao.query(HPSqlConstant.HPKC001.QUERY_SUM, queryRow);
// inInfo.getBlock(EiConstant.resultBlock).set(EiConstant.COLUMN_TOTAL_SUM, sum.get(0));
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
@OperationLogAnnotation(operModul = "车辆维保",operType = "删除",operDesc = "删除操作")
@Override
public EiInfo delete(EiInfo inInfo) {
int i = 0;
try {
HPXT003 hpxt003 = new HPXT003();
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
for (i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
hpxt003.fromMap(map);
hpxt003.setDeleteFlag(CommonConstant.YesNo.YES_1);
DaoUtils.update(HPXT003.DELETE_FLAG, hpxt003);
}
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsgByKey("ep.1000", new String[]{String.valueOf(i), I18nMessages.getText("label.delete", "删除")});
} catch (PlatException e) {
e.printStackTrace();
inInfo.setStatus(EiConstant.STATUS_FAILURE);
ErrorCodeUtils.handleDeleteException(inInfo,i,e);
logError("删除失败", e.getMessage());
return inInfo;
}
return inInfo;
}
@OperationLogAnnotation(operModul = "车辆维保",operType = "保存",operDesc = "操作")
public EiInfo save(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
// 写入数据
for (Map resultRow : resultRows) {
HPXT003 hpxt003 = new HPXT003();
hpxt003.fromMap(resultRow);
if (hpxt003.getId() == null || hpxt003.getId() == 0) {
this.add(hpxt003);
} else {
this.modify(hpxt003);
}
}
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据保存成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "保存失败");
}
return inInfo;
}
/**
* 新增操作
*/
public void add(HPXT003 hpxt003) {
this.setBaseInfo(hpxt003);
DaoUtils.insert(HPXT003.INSERT, hpxt003);
}
/**
* 设置基础信息
*
* @param hpxt003
*/
private void setBaseInfo(HPXT003 hpxt003) {
// 去除日期字符串中的-
hpxt003.setMaintenanceDate(StringUtil.removeHorizontalLine(hpxt003.getMaintenanceDate()));
//生成维保单号
hpxt003.setMaintenanceNumber(SequenceGenerator.getNextSequence(HPConstant.SequenceId.MAINTENANCE_NUMBER));
}
/**
* 修改操作
*/
public void modify(HPXT003 hpxt003) {
DaoUtils.update(HPXT003.UPDATE, hpxt003);
}
}
package com.baosight.hpjx.hp.xt.service;
import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation;
import com.baosight.hpjx.core.constant.CommonConstant;
import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.hp.constant.HPConstant;
import com.baosight.hpjx.hp.xt.domain.HPXT001;
import com.baosight.hpjx.hp.xt.domain.HPXT004;
import com.baosight.hpjx.util.ErrorCodeUtils;
import com.baosight.hpjx.util.LogUtils;
import com.baosight.hpjx.util.StringUtil;
import com.baosight.hpjx.util.contants.ACConstants;
import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.resource.I18nMessages;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import com.baosight.iplat4j.ed.util.SequenceGenerator;
import java.util.List;
import java.util.Map;
/**
*
*/
public class ServiceHPXT004 extends ServiceEPBase {
@Override
public EiInfo initLoad(EiInfo inInfo) {
return inInfo;
}
@Override
public EiInfo query(EiInfo inInfo) {
try {
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HPXT004.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
inInfo = super.query(inInfo, HPXT004.QUERY, new HPXT004());
// List sum = dao.query(HPSqlConstant.HPKC001.QUERY_SUM, queryRow);
// inInfo.getBlock(EiConstant.resultBlock).set(EiConstant.COLUMN_TOTAL_SUM, sum.get(0));
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
@OperationLogAnnotation(operModul = "会议室管理",operType = "删除",operDesc = "删除操作")
@Override
public EiInfo delete(EiInfo inInfo) {
int i = 0;
try {
HPXT004 hpxt004 = new HPXT004();
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
for (i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
hpxt004.fromMap(map);
hpxt004.setDeleteFlag(CommonConstant.YesNo.YES_1);
DaoUtils.update(HPXT004.DELETE_FLAG, hpxt004);
}
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsgByKey("ep.1000", new String[]{String.valueOf(i), I18nMessages.getText("label.delete", "删除")});
} catch (PlatException e) {
e.printStackTrace();
inInfo.setStatus(EiConstant.STATUS_FAILURE);
ErrorCodeUtils.handleDeleteException(inInfo,i,e);
logError("删除失败", e.getMessage());
return inInfo;
}
return inInfo;
}
@OperationLogAnnotation(operModul = "会议室管理",operType = "保存",operDesc = "操作")
public EiInfo save(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
// 写入数据
for (Map resultRow : resultRows) {
HPXT004 hpxt004 = new HPXT004();
hpxt004.fromMap(resultRow);
if (hpxt004.getId() == null || hpxt004.getId() == 0) {
this.add(hpxt004);
} else {
this.modify(hpxt004);
}
}
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据保存成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "保存失败");
}
return inInfo;
}
/**
* 新增操作
*/
public void add(HPXT004 hpxt004) {
this.setBaseInfo(hpxt004);
//生成会议室管理申请
hpxt004.setApplyNo(SequenceGenerator.getNextSequence(HPConstant.SequenceId.CONFERENCE_APPLY_NO));
DaoUtils.insert(HPXT004.INSERT, hpxt004);
}
/**
* 设置基础信息
*
* @param hpxt004
*/
private void setBaseInfo(HPXT004 hpxt004) {
// 去除日期字符串中的-
hpxt004.setApplyDate(StringUtil.removeHorizontalLine(hpxt004.getApplyDate()));
hpxt004.setStartTime(StringUtil.removeHorizontalLine(hpxt004.getStartTime()));
hpxt004.setEndTime(StringUtil.removeHorizontalLine(hpxt004.getEndTime()));
}
/**
* 修改操作
*/
public void modify(HPXT004 hpxt004) {
DaoUtils.update(HPXT004.UPDATE, hpxt004);
}
@OperationLogAnnotation(operModul = "会议室管理",operType = "提交",operDesc = "提交审批操作")
public EiInfo approve(EiInfo inInfo){
int i = 0;
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
for (Map resultRow : resultRows) {
HPXT004 hpxt004 = new HPXT004();
hpxt004.fromMap(resultRow);
hpxt004.setProApplyStatus(CommonConstant.YesNo.YES_1);
DaoUtils.update(HPXT004.UPDATE_PRO_APPLY_STATUS,hpxt004);
}
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsgByKey("ep.1000", new String[]{String.valueOf(i), I18nMessages.getText("label.approve", "提交")});
} catch (PlatException e) {
e.printStackTrace();
inInfo.setStatus(EiConstant.STATUS_FAILURE);
ErrorCodeUtils.handleDeleteException(inInfo,i,e);
logError("提交失败", e.getMessage());
return inInfo;
}
return inInfo;
}
@OperationLogAnnotation(operModul = "会议室管理",operType = "返还",operDesc = "返还操作")
public EiInfo returnStatus(EiInfo inInfo){
int i = 0;
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
for (Map resultRow : resultRows) {
HPXT004 hpxt004 = new HPXT004();
hpxt004.fromMap(resultRow);
hpxt004.setStatus(CommonConstant.YesNo.YES_1);
DaoUtils.update(HPXT004.UPDATE_STATUS, hpxt004);
}
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsgByKey("ep.1000", new String[]{String.valueOf(i), I18nMessages.getText("label.returnStatus", "返还")});
} catch (PlatException e) {
e.printStackTrace();
inInfo.setStatus(EiConstant.STATUS_FAILURE);
logError("返还失败", e.getMessage());
return inInfo;
}
return inInfo;
}
}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-2.dtd"> <!-- table information
Generate time : 2024-10-06 15:42:22
Version : 1.0
schema : hpjx
tableName : T_HPXT003
ID BIGINT NOT NULL primarykey,
COMPANY_CODE VARCHAR NOT NULL,
DEP_CODE VARCHAR,
CREATED_BY VARCHAR,
CREATED_NAME VARCHAR,
CREATED_TIME VARCHAR,
UPDATED_BY VARCHAR,
UPDATED_NAME VARCHAR,
UPDATED_TIME VARCHAR,
MAINTENANCE_DATE VARCHAR,
MAINTENANCE_NUMBER VARCHAR,
MAINTENANCE_TYPE VARCHAR,
LICENSE_PLATE VARCHAR,
HANDLER VARCHAR,
MAINTENANCE_COST DECIMAL,
MAINTENANCE_REASON VARCHAR,
DELETE_FLAG TINYINT
-->
<sqlMap namespace="HPXT003">
<sql id="condition">
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdName">
CREATED_NAME = #createdName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
CREATED_TIME = #createdTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy">
UPDATED_BY = #updatedBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedName">
UPDATED_NAME = #updatedName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
UPDATED_TIME = #updatedTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="maintenanceDate">
MAINTENANCE_DATE = #maintenanceDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="maintenanceNumber">
MAINTENANCE_NUMBER = #maintenanceNumber#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="maintenanceType">
MAINTENANCE_TYPE = #maintenanceType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="licensePlate">
LICENSE_PLATE = #licensePlate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="handler">
HANDLER = #handler#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="maintenanceCost">
MAINTENANCE_COST = #maintenanceCost#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="maintenanceReason">
MAINTENANCE_REASON = #maintenanceReason#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deleteFlag">
DELETE_FLAG = #deleteFlag#
</isNotEmpty>
</sql>
<select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hpjx.hp.xt.domain.HPXT003">
SELECT
ID as "id", <!-- 主键id -->
COMPANY_CODE as "companyCode", <!-- 企业编码 预留 -->
DEP_CODE as "depCode", <!-- 部门编码 -->
CREATED_BY as "createdBy", <!-- 创建人 -->
CREATED_NAME as "createdName", <!-- 创建人名称 -->
CREATED_TIME as "createdTime", <!-- 创建时间 -->
UPDATED_BY as "updatedBy", <!-- 更新人 -->
UPDATED_NAME as "updatedName", <!-- 更新人名称 -->
UPDATED_TIME as "updatedTime", <!-- 更新时间 -->
MAINTENANCE_DATE as "maintenanceDate", <!-- 维护日期 -->
MAINTENANCE_NUMBER as "maintenanceNumber", <!-- 维保单号 -->
MAINTENANCE_TYPE as "maintenanceType", <!-- 维保类型 -->
LICENSE_PLATE as "licensePlate", <!-- 车牌号 -->
HANDLER as "handler", <!-- 经办人 -->
MAINTENANCE_COST as "maintenanceCost", <!-- 维保费用 -->
MAINTENANCE_REASON as "maintenanceReason", <!-- 维保原因 -->
DELETE_FLAG as "deleteFlag" <!-- 删除标记 -->
FROM ${hpjxSchema}.T_HPXT003 WHERE 1=1
<include refid="condition" />
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
ID asc
</isEmpty>
</dynamic>
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hpjxSchema}.T_HPXT003 WHERE 1=1
<include refid="condition" />
</select>
<!--
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdName">
CREATED_NAME = #createdName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
CREATED_TIME = #createdTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy">
UPDATED_BY = #updatedBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedName">
UPDATED_NAME = #updatedName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
UPDATED_TIME = #updatedTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="maintenanceDate">
MAINTENANCE_DATE = #maintenanceDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="maintenanceNumber">
MAINTENANCE_NUMBER = #maintenanceNumber#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="maintenanceType">
MAINTENANCE_TYPE = #maintenanceType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="licensePlate">
LICENSE_PLATE = #licensePlate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="handler">
HANDLER = #handler#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="maintenanceCost">
MAINTENANCE_COST = #maintenanceCost#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="maintenanceReason">
MAINTENANCE_REASON = #maintenanceReason#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deleteFlag">
DELETE_FLAG = #deleteFlag#
</isNotEmpty>
-->
<insert id="insert">
INSERT INTO ${hpjxSchema}.T_HPXT003 (ID, <!-- 主键id -->
COMPANY_CODE, <!-- 企业编码 预留 -->
DEP_CODE, <!-- 部门编码 -->
CREATED_BY, <!-- 创建人 -->
CREATED_NAME, <!-- 创建人名称 -->
CREATED_TIME, <!-- 创建时间 -->
UPDATED_BY, <!-- 更新人 -->
UPDATED_NAME, <!-- 更新人名称 -->
UPDATED_TIME, <!-- 更新时间 -->
MAINTENANCE_DATE, <!-- 维护日期 -->
MAINTENANCE_NUMBER, <!-- 维保单号 -->
MAINTENANCE_TYPE, <!-- 维保类型 -->
LICENSE_PLATE, <!-- 车牌号 -->
HANDLER, <!-- 经办人 -->
MAINTENANCE_COST, <!-- 维保费用 -->
MAINTENANCE_REASON, <!-- 维保原因 -->
DELETE_FLAG <!-- 删除标记 -->
)
VALUES (#id#, #companyCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #maintenanceDate#, #maintenanceNumber#, #maintenanceType#, #licensePlate#, #handler#, #maintenanceCost#, #maintenanceReason#, #deleteFlag#)
</insert>
<delete id="delete">
DELETE FROM ${hpjxSchema}.T_HPXT003 WHERE
ID = #id#
</delete>
<update id="deleteFlag">
UPDATE ${hpjxSchema}.T_HPXT003
SET
UPDATED_BY = #updatedBy#, <!-- 修改人 -->
UPDATED_NAME = #updatedName#, <!-- 修改人名称 -->
UPDATED_TIME = #updatedTime#, <!-- 修改时间 -->
DELETE_FLAG = #deleteFlag# <!-- 是否删除0:否1.是 -->
WHERE
ID = #id#
</update>
<update id="update">
UPDATE ${hpjxSchema}.T_HPXT003
SET
COMPANY_CODE = #companyCode#, <!-- 企业编码 预留 -->
DEP_CODE = #depCode#, <!-- 部门编码 -->
CREATED_BY = #createdBy#, <!-- 创建人 -->
CREATED_NAME = #createdName#, <!-- 创建人名称 -->
CREATED_TIME = #createdTime#, <!-- 创建时间 -->
UPDATED_BY = #updatedBy#, <!-- 更新人 -->
UPDATED_NAME = #updatedName#, <!-- 更新人名称 -->
UPDATED_TIME = #updatedTime#, <!-- 更新时间 -->
MAINTENANCE_DATE = #maintenanceDate#, <!-- 维护日期 -->
MAINTENANCE_NUMBER = #maintenanceNumber#, <!-- 维保单号 -->
MAINTENANCE_TYPE = #maintenanceType#, <!-- 维保类型 -->
LICENSE_PLATE = #licensePlate#, <!-- 车牌号 -->
HANDLER = #handler#, <!-- 经办人 -->
MAINTENANCE_COST = #maintenanceCost#, <!-- 维保费用 -->
MAINTENANCE_REASON = #maintenanceReason#, <!-- 维保原因 -->
DELETE_FLAG = #deleteFlag# <!-- 删除标记 -->
WHERE
ID = #id#
</update>
</sqlMap>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-2.dtd"> <!-- table information
Generate time : 2024-10-06 16:55:04
Version : 1.0
schema : hpjx
tableName : T_HPXT004
ID BIGINT NOT NULL primarykey,
COMPANY_CODE VARCHAR NOT NULL,
DEP_CODE VARCHAR,
CREATED_BY VARCHAR,
CREATED_NAME VARCHAR,
CREATED_TIME VARCHAR,
UPDATED_BY VARCHAR,
UPDATED_NAME VARCHAR,
UPDATED_TIME VARCHAR,
APPLY_DATE VARCHAR,
APPLY_NO VARCHAR,
APPLY_PERSONNEL VARCHAR,
MEETING_ROOM VARCHAR,
MEETING_SUBJECT VARCHAR,
MEETING_NATURE VARCHAR,
IMPORTANCE_LEVEL VARCHAR,
START_TIME VARCHAR,
END_TIME VARCHAR,
DELETE_FLAG TINYINT,
PRO_APPLY_STATUS TINYINT,
STATUS TINYINT
-->
<sqlMap namespace="HPXT004">
<sql id="condition">
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdName">
CREATED_NAME = #createdName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
CREATED_TIME = #createdTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy">
UPDATED_BY = #updatedBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedName">
UPDATED_NAME = #updatedName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
UPDATED_TIME = #updatedTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="applyDate">
APPLY_DATE = #applyDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="applyNo">
APPLY_NO = #applyNo#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="applyPersonnel">
APPLY_PERSONNEL = #applyPersonnel#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="meetingRoom">
MEETING_ROOM = #meetingRoom#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="meetingSubject">
MEETING_SUBJECT = #meetingSubject#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="meetingNature">
MEETING_NATURE = #meetingNature#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="importanceLevel">
IMPORTANCE_LEVEL = #importanceLevel#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="startTime">
START_TIME = #startTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="endTime">
END_TIME = #endTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deleteFlag">
DELETE_FLAG = #deleteFlag#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="proApplyStatus">
PRO_APPLY_STATUS = #proApplyStatus#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="status">
STATUS = #status#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdDateFrom">
CREATED_TIME &gt;= REPLACE(#createdDateFrom#, '-', '')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdDateTo">
CREATED_TIME &lt;= REPLACE(#createdDateTo#, '-', '')
</isNotEmpty>
</sql>
<select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hpjx.hp.xt.domain.HPXT004">
SELECT
ID as "id", <!-- 主键id -->
COMPANY_CODE as "companyCode", <!-- 企业编码 预留 -->
DEP_CODE as "depCode", <!-- 部门编码 -->
CREATED_BY as "createdBy", <!-- 创建人 -->
CREATED_NAME as "createdName", <!-- 创建人名称 -->
CREATED_TIME as "createdTime", <!-- 创建时间 -->
UPDATED_BY as "updatedBy", <!-- 更新人 -->
UPDATED_NAME as "updatedName", <!-- 更新人名称 -->
UPDATED_TIME as "updatedTime", <!-- 更新时间 -->
APPLY_DATE as "applyDate", <!-- 申请日期 -->
APPLY_NO as "applyNo", <!-- 申请单号 -->
APPLY_PERSONNEL as "applyPersonnel", <!-- 申请人 -->
MEETING_ROOM as "meetingRoom", <!-- 会议室 -->
MEETING_SUBJECT as "meetingSubject", <!-- 会议主题 -->
MEETING_NATURE as "meetingNature", <!-- 会议性质 -->
IMPORTANCE_LEVEL as "importanceLevel", <!-- 重要程度 -->
START_TIME as "startTime", <!-- 开始时间 -->
END_TIME as "endTime", <!-- 结束时间 -->
DELETE_FLAG as "deleteFlag", <!-- 是否删除0.否1.是 -->
PRO_APPLY_STATUS as "proApplyStatus", <!-- 审批状态 0-未提交 1-已提交 -->
STATUS as "status" <!-- 返还状态 0-未返还 1-已返还 -->
FROM ${hpjxSchema}.T_HPXT004 WHERE 1=1
<include refid="condition" />
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
ID asc
</isEmpty>
</dynamic>
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hpjxSchema}.T_HPXT004 WHERE 1=1
<include refid="condition" />
</select>
<!--
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdName">
CREATED_NAME = #createdName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
CREATED_TIME = #createdTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy">
UPDATED_BY = #updatedBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedName">
UPDATED_NAME = #updatedName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
UPDATED_TIME = #updatedTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="applyDate">
APPLY_DATE = #applyDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="applyNo">
APPLY_NO = #applyNo#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="applyPersonnel">
APPLY_PERSONNEL = #applyPersonnel#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="meetingRoom">
MEETING_ROOM = #meetingRoom#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="meetingSubject">
MEETING_SUBJECT = #meetingSubject#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="meetingNature">
MEETING_NATURE = #meetingNature#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="importanceLevel">
IMPORTANCE_LEVEL = #importanceLevel#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="startTime">
START_TIME = #startTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="endTime">
END_TIME = #endTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deleteFlag">
DELETE_FLAG = #deleteFlag#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="proApplyStatus">
PRO_APPLY_STATUS = #proApplyStatus#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="status">
STATUS = #status#
</isNotEmpty>
-->
<insert id="insert">
INSERT INTO ${hpjxSchema}.T_HPXT004 (ID, <!-- 主键id -->
COMPANY_CODE, <!-- 企业编码 预留 -->
DEP_CODE, <!-- 部门编码 -->
CREATED_BY, <!-- 创建人 -->
CREATED_NAME, <!-- 创建人名称 -->
CREATED_TIME, <!-- 创建时间 -->
UPDATED_BY, <!-- 更新人 -->
UPDATED_NAME, <!-- 更新人名称 -->
UPDATED_TIME, <!-- 更新时间 -->
APPLY_DATE, <!-- 申请日期 -->
APPLY_NO, <!-- 申请单号 -->
APPLY_PERSONNEL, <!-- 申请人 -->
MEETING_ROOM, <!-- 会议室 -->
MEETING_SUBJECT, <!-- 会议主题 -->
MEETING_NATURE, <!-- 会议性质 -->
IMPORTANCE_LEVEL, <!-- 重要程度 -->
START_TIME, <!-- 开始时间 -->
END_TIME, <!-- 结束时间 -->
DELETE_FLAG, <!-- 是否删除0.否1.是 -->
PRO_APPLY_STATUS, <!-- 审批状态 0-未提交 1-已提交 -->
STATUS <!-- 返还状态 0-未返还 1-已返还 -->
)
VALUES (#id#, #companyCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #applyDate#, #applyNo#, #applyPersonnel#, #meetingRoom#, #meetingSubject#, #meetingNature#, #importanceLevel#, #startTime#, #endTime#, #deleteFlag#, #proApplyStatus#, #status#)
</insert>
<delete id="delete">
DELETE FROM ${hpjxSchema}.T_HPXT004 WHERE
ID = #id#
</delete>
<update id="deleteFlag">
UPDATE ${hpjxSchema}.T_HPXT004
SET
UPDATED_BY = #updatedBy#, <!-- 修改人 -->
UPDATED_NAME = #updatedName#, <!-- 修改人名称 -->
UPDATED_TIME = #updatedTime#, <!-- 修改时间 -->
DELETE_FLAG = #deleteFlag# <!-- 是否删除0:否1.是 -->
WHERE
ID = #id#
</update>
<!--修改提交状态-->
<update id="updateProApplyStatus">
UPDATE ${hpjxSchema}.T_HPXT004
SET
UPDATED_BY = #updatedBy#, <!-- 更新人 -->
UPDATED_NAME = #updatedName#, <!-- 更新人名称 -->
UPDATED_TIME = #updatedTime#, <!-- 更新时间 -->
PRO_APPLY_STATUS = #proApplyStatus# <!-- 提交状态 0-未提交 1-已提交 -->
WHERE
ID = #id#
</update>
<!--修改返还状态-->
<update id="updateStatus">
UPDATE ${hpjxSchema}.T_HPXT004
SET
UPDATED_BY = #updatedBy#, <!-- 更新人 -->
UPDATED_NAME = #updatedName#, <!-- 更新人名称 -->
UPDATED_TIME = #updatedTime#, <!-- 更新时间 -->
STATUS = #status# <!-- 提交状态 0-未提交 1-已提交 -->
WHERE
ID = #id#
</update>
<update id="update">
UPDATE ${hpjxSchema}.T_HPXT004
SET
COMPANY_CODE = #companyCode#, <!-- 企业编码 预留 -->
DEP_CODE = #depCode#, <!-- 部门编码 -->
CREATED_BY = #createdBy#, <!-- 创建人 -->
CREATED_NAME = #createdName#, <!-- 创建人名称 -->
CREATED_TIME = #createdTime#, <!-- 创建时间 -->
UPDATED_BY = #updatedBy#, <!-- 更新人 -->
UPDATED_NAME = #updatedName#, <!-- 更新人名称 -->
UPDATED_TIME = #updatedTime#, <!-- 更新时间 -->
APPLY_DATE = #applyDate#, <!-- 申请日期 -->
APPLY_NO = #applyNo#, <!-- 申请单号 -->
APPLY_PERSONNEL = #applyPersonnel#, <!-- 申请人 -->
MEETING_ROOM = #meetingRoom#, <!-- 会议室 -->
MEETING_SUBJECT = #meetingSubject#, <!-- 会议主题 -->
MEETING_NATURE = #meetingNature#, <!-- 会议性质 -->
IMPORTANCE_LEVEL = #importanceLevel#, <!-- 重要程度 -->
START_TIME = #startTime#, <!-- 开始时间 -->
END_TIME = #endTime#, <!-- 结束时间 -->
DELETE_FLAG = #deleteFlag#, <!-- 是否删除0.否1.是 -->
PRO_APPLY_STATUS = #proApplyStatus#, <!-- 审批状态 0-未提交 1-已提交 -->
STATUS = #status# <!-- 返还状态 0-未返还 1-已返还 -->
WHERE
ID = #id#
</update>
</sqlMap>
...@@ -411,7 +411,7 @@ function deleteFunc() { ...@@ -411,7 +411,7 @@ function deleteFunc() {
if(flag){ if(flag){
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"删除\"操作? ", { JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"删除\"操作? ", {
ok: function () { ok: function () {
JSUtils.submitGridsData("result", "HPCG001", "delete", true, JSUtils.submitGridsData("result", "HPXT001", "delete", true,
function (e) { function (e) {
query(); query();
}); });
......
...@@ -24,8 +24,8 @@ $(function () { ...@@ -24,8 +24,8 @@ $(function () {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="showUploadFile(' + item.id + ')" >附件清单</a>'; + 'onclick="showUploadFile(' + item.id + ')" >附件清单</a>';
} }
if (item.status==0){ if (item.status==0 && item.id){
template = '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' + template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' +
'onclick="approveFunc(' + item.id + ')" >返还</a>'; 'onclick="approveFunc(' + item.id + ')" >返还</a>';
} }
return template; return template;
...@@ -205,20 +205,12 @@ function approveFunc(id) { ...@@ -205,20 +205,12 @@ function approveFunc(id) {
message("请选择数据"); message("请选择数据");
return; return;
} }
let inEiInfo = new EiInfo(); JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"返还\"操作? ", {
inEiInfo.set("id", id); ok: function () {
EiCommunicator.send('HPXT001', 'returnStatus', inEiInfo, { JSUtils.submitGridsData("result", "HPXT001", "returnStatus", true);
onSuccess(response) {
NotificationUtil(response.msg);
query();
},
onFail(errorMessage, status, e) {
NotificationUtil("执行失败!", "error");
}
}, {
async: false
} }
); });
} }
/** /**
* 显示附件清单 * 显示附件清单
......
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
<EF:EFRegion id="result" title="明细信息"> <EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="row"> <EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="row">
<EF:EFColumn ename="id" cname="内码" hidden="true"/> <EF:EFColumn ename="id" cname="内码" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="80" align="center"/> <EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="130" align="center"/>
<EF:EFColumn ename="applyDate" cname="申请日期" width="110" align="center" editType="date" <EF:EFColumn ename="applyDate" cname="申请日期" width="110" align="center" editType="date"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required="true" readonly="true"/> dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required="true" readonly="true"/>
<EF:EFColumn ename="applyNo" cname="申请单号" enable="false" width="130" align="center"/> <EF:EFColumn ename="applyNo" cname="申请单号" enable="false" width="130" align="center"/>
......
$(function () {
$(".row").children().attr("class", "col-md-3");
$("#QUERY").on("click", query);
/* 页面查询框的尺寸设置 */
$.extend(true, IPLATUI.Config, {
EFGrid: {
height: $(document).height() - $("#inqu").height() - $("#ef_form_head").height() - 100,
/*pageable: {
input: true,
numeric: false,
pageSizes: [10, 50 , 100 , 200]
}*/
}
});
IPLATUI.EFGrid= {
"result": {
columns: [{
field: "operator",
template: function (item) {
let template = '';
if (item.id) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="showUploadFile(' + item.id + ')" >附件清单</a>';
}
return template;
}
}, {
field: "maintenanceDate",
attributes: {
class: "i-input-readonly"
},
defaultValue: function () {
return currShortDate();
}
}],
onSave: function (e) {
// 阻止后台保存请求,使用自定义保存
e.preventDefault();
let btnNode = $(this);
//禁用按钮
btnNode.attr("disabled", true);
save(btnNode);
},
onDelete: function (e) {
// 阻止默认请求,使用自定义删除
e.preventDefault();
deleteFunc();
},
onSuccess: function (e) {
if(e.eiInfo.extAttr.methodName == 'save'
||e.eiInfo.extAttr.methodName == 'delete'
|| e.eiInfo.extAttr.methodName == 'approve'){
query();
}
}
}
}
// $("#APPROVE").on("click",function () {
// approveFuncs();
// })
downKeyUp();
})
/**
* 页面加载时执行
*/
$(window).load(function () {
// 查询
query();
});
let query = function () {
resultGrid.dataSource.page(1);
}
/**
* 保存
*/
let save = function (btnNode) {
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
let flag = true;
$.each(rows, function(index, item) {
let maintenanceType= item.get("maintenanceType");
if(isBlank(maintenanceType)){
message("选中的第"+(index+1)+"行\"维保类型\",不能为空!");
flag = false;
return false;
}
let licensePlate= item.get("licensePlate");
if(isBlank(licensePlate)){
message("选中的第"+(index+1)+"行\"车牌号\",不能为空!");
flag = false;
return false;
}
let maintenanceCost= item.get("maintenanceCost");
if(isBlank(maintenanceCost)){
message("选中的第"+(index+1)+"行\"维保费用\",不能为空!");
flag = false;
return false;
}
let maintenanceReason= item.get("maintenanceReason");
if(isBlank(maintenanceReason)){
message("选中的第"+(index+1)+"行\"维保原因\",不能为空!");
flag = false;
return false;
}
});
if(flag) {
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"保存\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result", "HPXT003", "save", true,
function (e) {
query();
});
btnNode.attr("disabled", false);
}
});
}
}
/**
* 提交
*/
// function approveFuncs() {
// let rows = resultGrid.getCheckedRows();
// if (rows.length < 1) {
// message("请选择数据");
// return;
// }
// let flag = true;
// $.each(rows, function(index, item) {
// let proApplyStatus= item.get("proApplyStatus");
// if(proApplyStatus=="1"){
// message("选中的第"+(index+1)+"行\"数据已提交\",不能再次选中提交!");
// flag = false;
// return false;
// }
// });
// if(flag) {
// JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"提交\"操作? ", {
// ok: function () {
// JSUtils.submitGridsData("result", "HPXT001", "approve", true);
// }
// });
// }
// }
/**
* 删除明细
*/
function deleteFunc() {
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
let flag = true;
$.each(rows, function(index, item) {
let status= item.get("proApplyStatus");
if(status=="1"){
message("选中的第"+(index+1)+"行记录已提交,不能删除!");
flag = false;
return false;
}
});
if(flag){
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"删除\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result", "HPXT003", "delete", true,
function (e) {
query();
});
}
});
}
}
/**
* 显示附件清单
*
* @param id
*/
function showUploadFile(id) {
JSColorbox.open({
href: "HPXT001A?methodName=initLoad&inqu_status-0-bizType=CLWB&inqu_status-0-matId=" + id,
title: "<div style='text-align: center;'>附件清单</div>",
width: "80%",
height: "80%",
});
}
\ No newline at end of file
<%--
Created by IntelliJ IDEA.
User: 1
Date: 2024/4/26
Time: 17:09
To change this template use File | Settings | File Templates.
--%>
<!DOCTYPE html>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<EF:EFPage title="车辆维保">
<EF:EFRegion id="inqu" title="查询条件">
<div class="row">
<EF:EFInput cname="车牌号" ename="inqu_status-0-licensePlateCode" colWidth="3"/>
<EF:EFSelect cname="维保类型" ename="inqu_status-0-maintenanceType" colWidth="3">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hpjx.hpxt.maintenanceType"/>
</EF:EFSelect>
<EF:EFInput cname="经办人" ename="inqu_status-0-applyPersonnel" colWidth="3"/>
</div>
<%--<div class="row">
<EF:EFSelect cname="存货名称" ename="inqu_status-0-inventCode" colWidth="3" filter="contains" defultValue="">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="invent_name_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFSelect cname="规格" ename="inqu_status-0-spec" colWidth="3" filter="contains" defultValue="">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="spec_name_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFDateSpan startCname="创建日期(从)" endCname="至" blockId="inqu_status"
startName="createdDateFrom" endName="createdDateTo" row="0" role="date"
format="yyyy-MM-dd" ratio="3:3" satrtRatio="4:8" endRatio="4:8" readonly="true">
</EF:EFDateSpan>
</div>--%>
<%--<div class="row">
<EF:EFInput cname="采购单号" ename="inqu_status-0-proApplyNo" colWidth="3"/>
<EF:EFSelect ename="inqu_status-0-factoryCode" cname="厂区" colWidth="3" filter="contains" defultValue="">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="factory_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFSelect cname="是否删除" ename="inqu_status-0-deleteFlag" colWidth="3" defaultValue="0">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hpjx.hpjx.deleteFlag"/>
</EF:EFSelect>
</div>--%>
</EF:EFRegion>
<EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="row">
<EF:EFColumn ename="id" cname="内码" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="120" align="center"/>
<EF:EFColumn ename="maintenanceDate" cname="维护日期" width="110" align="center" editType="date"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required="true" readonly="true"/>
<EF:EFColumn ename="maintenanceNumber" cname="维保单号" enable="false" width="130" align="center"/>
<EF:EFComboColumn ename="maintenanceType" cname="维保类型" width="80" align="center" enable="true" required="true">
<EF:EFCodeOption codeName="hpjx.hpxt.maintenanceType"/>
</EF:EFComboColumn>
<EF:EFColumn ename="licensePlate" cname="车牌号" enable="true" width="130" align="center" required="true"/>
<EF:EFColumn ename="handler" cname="经办人" enable="true" width="130" align="center" required="true"/>
<EF:EFColumn ename="maintenanceCost" cname="维保费用"
width="120" enable="true" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/" maxLength="15" required="true"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFColumn ename="maintenanceReason" cname="维保原因" width="80" align="center" enable="true" required="true"/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
$(function () {
$(".row").children().attr("class", "col-md-3");
$("#QUERY").on("click", query);
/* 页面查询框的尺寸设置 */
$.extend(true, IPLATUI.Config, {
EFGrid: {
height: $(document).height() - $("#inqu").height() - $("#ef_form_head").height() - 100,
/*pageable: {
input: true,
numeric: false,
pageSizes: [10, 50 , 100 , 200]
}*/
}
});
IPLATUI.EFGrid= {
"result": {
columns: [{
field: "operator",
template: function (item) {
let template = '';
if (item.id) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="showUploadFile(' + item.id + ')" >附件清单</a>';
}
if (item.id && item.status==0){
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' +
'onclick="approveFunc(' + item.id + ')" >返还</a>';
}
return template;
}
}, {
field: "applyDate",
attributes: {
class: "i-input-readonly"
},
defaultValue: function () {
return currShortDate();
}
}],
onSave: function (e) {
// 阻止后台保存请求,使用自定义保存
e.preventDefault();
let btnNode = $(this);
//禁用按钮
btnNode.attr("disabled", true);
save(btnNode);
},
onDelete: function (e) {
// 阻止默认请求,使用自定义删除
e.preventDefault();
deleteFunc();
},
onSuccess: function (e) {
if(e.eiInfo.extAttr.methodName == 'save'
||e.eiInfo.extAttr.methodName == 'delete'
|| e.eiInfo.extAttr.methodName == 'approve'){
query();
}
}
}
}
$("#APPROVE").on("click",function () {
approveFuncs();
})
downKeyUp();
})
/**
* 页面加载时执行
*/
$(window).load(function () {
// 查询
query();
});
let query = function () {
resultGrid.dataSource.page(1);
}
/**
* 保存
*/
let save = function (btnNode) {
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
let flag = true;
$.each(rows, function(index, item) {
let applyPersonnel= item.get("applyPersonnel");
if(isBlank(applyPersonnel)){
message("选中的第"+(index+1)+"行\"申请时人\",不能为空!");
flag = false;
return false;
}
let meetingRoom= item.get("meetingRoom");
if(isBlank(meetingRoom)){
message("选中的第"+(index+1)+"行\"会议室\",不能为空!");
flag = false;
return false;
}
let meetingSubject= item.get("meetingSubject");
if(isBlank(meetingSubject)){
message("选中的第"+(index+1)+"行\"会议主题\",不能为空!");
flag = false;
return false;
}
let startTime= item.get("startTime");
let endTime= item.get("endTime");
if (new Date(startTime) > new Date(endTime)){
message("开始时间\"不能大于\"\"结束时间\"!");
flag = false;
return false;
}
let meetingNature= item.get("meetingNature");
if(isBlank(meetingNature)){
message("选中的第"+(index+1)+"行\"会议性质\",不能为空!");
flag = false;
return false;
}
let importanceLevel= item.get("importanceLevel");
if(isBlank(importanceLevel)){
message("选中的第"+(index+1)+"行\"重要程度\",不能为空!");
flag = false;
return false;
}
let status= item.get("proApplyStatus");
if(status=="1"){
message("选中的第"+(index+1)+"行记录已提交,不能修改!");
flag = false;
return false;
}
});
if(flag) {
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"保存\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result", "HPXT004", "save", true,
function (e) {
query();
});
btnNode.attr("disabled", false);
}
});
}
}
/**
* 提交
*/
function approveFuncs() {
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
let flag = true;
$.each(rows, function(index, item) {
let proApplyStatus= item.get("proApplyStatus");
if(proApplyStatus=="1"){
message("选中的第"+(index+1)+"行\"数据已提交\",不能再次选中提交!");
flag = false;
return false;
}
});
if(flag) {
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"提交\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result", "HPXT004", "approve", true);
}
});
}
}
/**
* 删除明细
*/
function deleteFunc() {
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
let flag = true;
if(flag){
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"删除\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result", "HPXT004", "delete", true,
function (e) {
query();
});
}
});
}
}
function approveFunc(id) {
let rows = resultGrid.getDataItems();
if (rows.length < 1) {
message("请选择数据");
return;
}
let inEiInfo = new EiInfo();
JSUtils.confirm("确定对勾选中的数据做\"返还\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result", "HPXT004", "returnStatus", true,
function (e) {
query();
});
}
});
}
/**
* 显示附件清单
*
* @param id
*/
function showUploadFile(id) {
JSColorbox.open({
href: "HPXT001A?methodName=initLoad&inqu_status-0-bizType=HYSGL&inqu_status-0-matId=" + id,
title: "<div style='text-align: center;'>附件清单</div>",
width: "80%",
height: "80%",
});
}
\ No newline at end of file
<%--
Created by IntelliJ IDEA.
User: 1
Date: 2024/4/26
Time: 17:09
To change this template use File | Settings | File Templates.
--%>
<!DOCTYPE html>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<EF:EFPage title="会议室管理">
<EF:EFRegion id="inqu" title="查询条件">
<div class="row">
<EF:EFDateSpan startCname="申请日期(从)" endCname="至" blockId="inqu_status"
startName="createdDateFrom" endName="createdDateTo" row="0" role="date"
format="yyyy-MM-dd" ratio="3:3" satrtRatio="4:8" endRatio="4:8">
</EF:EFDateSpan>
<EF:EFInput cname="申请人" ename="inqu_status-0-applyPersonnel" colWidth="3"/>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="row">
<EF:EFColumn ename="id" cname="内码" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="130" align="center"/>
<EF:EFColumn ename="applyDate" cname="申请日期" width="110" align="center" editType="date"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required="true" readonly="true"/>
<EF:EFColumn ename="applyNo" cname="申请单号" enable="false" width="130" align="center"/>
<EF:EFColumn ename="applyPersonnel" cname="申请人" enable="true" width="130" align="center" required="true"/>
<EF:EFColumn ename="meetingRoom" cname="会议室" enable="true" width="130" align="center" required="true"/>
<EF:EFColumn ename="meetingSubject" cname="会议主题" enable="true" width="130" align="center" required="true"/>
<EF:EFComboColumn ename="meetingNature" cname="会议性质" width="130" align="center" enable="true" required="true">
<EF:EFCodeOption codeName="hpjx.hpxt.meetingNature"/>
</EF:EFComboColumn>
<EF:EFComboColumn ename="importanceLevel" cname="重要程度" width="130" align="center" enable="true" required="true">
<EF:EFCodeOption codeName="hpjx.hpxt.importanceLevel"/>
</EF:EFComboColumn>
<EF:EFColumn ename="startTime" cname="开始时间" width="110" align="center" editType="date"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required="true"/>
<EF:EFColumn ename="endTime" cname="结束时间" width="110" align="center" editType="date"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required="true"/>
<EF:EFComboColumn ename="proApplyStatus" cname="提交状态" width="80" align="center" enable="false" defaultValue="0">
<EF:EFCodeOption codeName="hpjx.hpcg.proApplyStatus"/>
</EF:EFComboColumn>
<EF:EFComboColumn ename="status" cname="返还状态" width="80" align="center"
textField="textField" valueField="valueField" readonly="true" >
<EF:EFOption label="未返还" value="0"/>
<EF:EFOption label="已返还" value="1"/>
</EF:EFComboColumn>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
...@@ -13,7 +13,7 @@ $(function () { ...@@ -13,7 +13,7 @@ $(function () {
let template = ''; let template = '';
if (status && status == 0) { if (status && status == 0) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;" ' template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;" '
+ 'onclick="modify(\'' + item.noticeNo + '\')" >详情</a>&nbsp;&nbsp;'; + 'onclick="modify(\'' + item.noticeNo + '\')" >修改</a>&nbsp;&nbsp;';
} }
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="showUploadFile(\'' + item.noticeNo + '\')" >附件清单</a>'; + 'onclick="showUploadFile(\'' + item.noticeNo + '\')" >附件清单</a>';
......
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