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 {
public static final String HPBG002_DEPOSIT_CODE = "HPBG002_DEPOSIT_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 @@
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
ID asc
ID DESC
</isEmpty>
</dynamic>
</sql>
......
package com.baosight.hpjx.hp.xt.service;
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.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.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.util.*;
import com.baosight.hpjx.util.contants.ACConstants;
......@@ -163,14 +155,18 @@ public class ServiceHPXT001 extends ServiceEPBase {
@OperationLogAnnotation(operModul = "车辆申请",operType = "返还",operDesc = "返还操作")
public EiInfo returnStatus(EiInfo inInfo){
int i = 0;
try {
String id = String.valueOf(inInfo.getAttr().get("id"));
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
for (Map resultRow : resultRows) {
HPXT001 hpxt001 = new HPXT001();
hpxt001.setId(Long.parseLong(id));
hpxt001.fromMap(resultRow);
hpxt001.setStatus(CommonConstant.YesNo.YES_1);
DaoUtils.update(HPXT001.UPDATE_STATUS, hpxt001);
}
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);
......
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>
......@@ -411,7 +411,7 @@ function deleteFunc() {
if(flag){
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"删除\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result", "HPCG001", "delete", true,
JSUtils.submitGridsData("result", "HPXT001", "delete", true,
function (e) {
query();
});
......
......@@ -24,8 +24,8 @@ $(function () {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="showUploadFile(' + item.id + ')" >附件清单</a>';
}
if (item.status==0){
template = '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' +
if (item.status==0 && item.id){
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' +
'onclick="approveFunc(' + item.id + ')" >返还</a>';
}
return template;
......@@ -205,20 +205,12 @@ function approveFunc(id) {
message("请选择数据");
return;
}
let inEiInfo = new EiInfo();
inEiInfo.set("id", id);
EiCommunicator.send('HPXT001', 'returnStatus', inEiInfo, {
onSuccess(response) {
NotificationUtil(response.msg);
query();
},
onFail(errorMessage, status, e) {
NotificationUtil("执行失败!", "error");
}
}, {
async: false
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"返还\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result", "HPXT001", "returnStatus", true);
}
);
});
}
/**
* 显示附件清单
......
......@@ -51,7 +51,7 @@
<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="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"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required="true" readonly="true"/>
<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 () {
let template = '';
if (status && status == 0) {
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" '
+ '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