Commit fbe06779 by liuyang

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

parents 28ce2d0a 916b7bf6
package com.baosight.hggp.hg.cg.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.hg.cg.domain.HGCG005;
import com.baosight.hggp.hg.constant.HGConstant;
import com.baosight.hggp.util.CommonMethod;
import com.baosight.hggp.util.ErrorCodeUtils;
import com.baosight.hggp.util.LogUtils;
import com.baosight.hggp.util.StringUtil;
import com.baosight.hggp.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.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
/**
*
*/
public class ServiceHGCG005 extends ServiceEPBase {
@Override
public EiInfo initLoad(EiInfo inInfo) {
try {
CommonMethod.initBlock(inInfo, Arrays.asList(
DdynamicEnum.SUPPLIER_RECORD_BLOCK_ID,
DdynamicEnum.USER_BLOCK_ID), null, false);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGCG005().eiMetadata);
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
@Override
public EiInfo query(EiInfo inInfo) {
try {
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGCG005.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
inInfo = super.query(inInfo, HGCG005.QUERY, new HGCG005());
// 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 {
HGCG005 hpcg005 = new HGCG005();
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
for (i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
hpcg005.fromMap(map);
hpcg005.setDeleteFlag(CommonConstant.YesNo.YES_1);
DaoUtils.update(HGCG005.DELETE_FLAG, hpcg005);
}
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();
// 写入数据
List<HGCG005> list = new ArrayList<>();
for (Map resultRow : resultRows) {
HGCG005 hpcg005 = new HGCG005();
hpcg005.fromMap(resultRow);
if (hpcg005.getId() == null || hpcg005.getId() == 0) {
hpcg005.setDeleteFlag(CommonConstant.YesNo.NO_0);
this.add(hpcg005);
} else {
this.modify(hpcg005);
}
list.add(hpcg005);
}
inInfo.getBlock(EiConstant.resultBlock).setRows(list);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据保存成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "保存失败");
}
return inInfo;
}
/**
* 新增操作
*/
public void add(HGCG005 hpcg005) {
this.setBaseInfo(hpcg005);
//生成采购询价单号
hpcg005.setInquiryNumber(SequenceGenerator.getNextSequence(HGConstant.SequenceId.INQUIRY_NUMBER));
DaoUtils.insert(HGCG005.INSERT, hpcg005);
}
/**
* 设置基础信息
*
* @param hpcg005
*/
private void setBaseInfo(HGCG005 hpcg005) {
// 去除日期字符串中的-
hpcg005.setInquiryDate(StringUtil.removeHorizontalLine(hpcg005.getInquiryDate()));
}
/**
* 修改操作
*/
public void modify(HGCG005 hpcg005) {
DaoUtils.update(HGCG005.UPDATE, hpcg005);
}
@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) {
HGCG005 hpcg005 = new HGCG005();
hpcg005.fromMap(resultRow);
hpcg005.setProApplyStatus(CommonConstant.YesNo.YES_1);
DaoUtils.update(HGCG005.UPDATE_PRO_APPLY_STATUS,hpcg005);
}
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;
}
}
package com.baosight.hggp.hg.cg.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.hg.cg.domain.HGCG005A;
import com.baosight.hggp.util.ErrorCodeUtils;
import com.baosight.hggp.util.LogUtils;
import com.baosight.hggp.util.StringUtil;
import com.baosight.hggp.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 java.util.ArrayList;
import java.util.List;
import java.util.Map;
/**
*
*/
public class ServiceHGCG005A 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, HGCG005A.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
inInfo = super.query(inInfo, HGCG005A.QUERY, new HGCG005A());
// 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 {
HGCG005A hgcg005A = new HGCG005A();
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
for (i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
hgcg005A.fromMap(map);
hgcg005A.setDeleteFlag(CommonConstant.YesNo.YES_1);
DaoUtils.update(HGCG005A.DELETE_FLAG, hgcg005A);
}
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();
// 写入数据
List<HGCG005A> list = new ArrayList<>();
for (Map resultRow : resultRows) {
HGCG005A hgcg005A = new HGCG005A();
hgcg005A.fromMap(resultRow);
if (hgcg005A.getId() == null || hgcg005A.getId() == 0) {
String hgcg005Id = inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGCG005A.FIELD_HGCG005_ID);
hgcg005A.setHgcg005Id(Long.valueOf(hgcg005Id));
this.add(hgcg005A);
} else {
this.modify(hgcg005A);
}
list.add(hgcg005A);
}
inInfo.getBlock(EiConstant.resultBlock).setRows(list);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据保存成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "保存失败");
}
return inInfo;
}
/**
* 新增操作
*/
public void add(HGCG005A hgcg005A) {
this.setBaseInfo(hgcg005A);
//生成采购询价单号
DaoUtils.insert(HGCG005A.INSERT, hgcg005A);
}
/**
* 设置基础信息
*
* @param hgcg005A
*/
private void setBaseInfo(HGCG005A hgcg005A) {
// 去除日期字符串中的-
hgcg005A.setDeliveryDate(StringUtil.removeHorizontalLine(hgcg005A.getDeliveryDate()));
}
/**
* 修改操作
*/
public void modify(HGCG005A hpcg004a) {
DaoUtils.update(HGCG005A.UPDATE, hpcg004a);
}
}
<?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-10 14:27:43
Version : 1.0
schema : hggp
tableName : HGCG005
ID BIGINT NOT NULL primarykey,
ACCOUNT_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,
INQUIRY_DATE VARCHAR,
INQUIRY_NUMBER VARCHAR,
SUPPLIER_NAME VARCHAR,
INQUIRY_TYPE VARCHAR,
INQUIRY_PERSON VARCHAR,
DELETE_FLAG TINYINT,
PRO_APPLY_STATUS TINYINT
-->
<sqlMap namespace="HGCG005">
<sql id="condition">
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="accountCode">
ACCOUNT_CODE = #accountCode#
</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="inquiryDate">
INQUIRY_DATE = #inquiryDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inquiryNumber">
INQUIRY_NUMBER = #inquiryNumber#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="supplierName">
SUPPLIER_NAME = #supplierName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inquiryType">
INQUIRY_TYPE = #inquiryType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inquiryPerson">
INQUIRY_PERSON = #inquiryPerson#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deleteFlag">
DELETE_FLAG = #deleteFlag#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="proApplyStatus">
PRO_APPLY_STATUS = #proApplyStatus#
</isNotEmpty>
</sql>
<select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hggp.hg.cg.domain.HGCG005">
SELECT
ID as "id", <!-- 主键id -->
ACCOUNT_CODE as "accountCode", <!-- 企业编码 预留 -->
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", <!-- 更新时间 -->
INQUIRY_DATE as "inquiryDate", <!-- 询价日期 -->
INQUIRY_NUMBER as "inquiryNumber", <!-- 询价单号 -->
SUPPLIER_NAME as "supplierName", <!-- 供应商名称 -->
INQUIRY_TYPE as "inquiryType", <!-- 询价单类型 -->
INQUIRY_PERSON as "inquiryPerson", <!-- 询价单申请人 -->
DELETE_FLAG as "deleteFlag", <!-- 是否删除0.否1.是 -->
PRO_APPLY_STATUS as "proApplyStatus" <!-- 申请状态 -->
FROM ${hggpSchema}.HGCG005 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 ${hggpSchema}.HGCG005 WHERE 1=1
<include refid="condition" />
</select>
<!--
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="accountCode">
ACCOUNT_CODE = #accountCode#
</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="inquiryDate">
INQUIRY_DATE = #inquiryDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inquiryNumber">
INQUIRY_NUMBER = #inquiryNumber#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="supplierName">
SUPPLIER_NAME = #supplierName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inquiryType">
INQUIRY_TYPE = #inquiryType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inquiryPerson">
INQUIRY_PERSON = #inquiryPerson#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deleteFlag">
DELETE_FLAG = #deleteFlag#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="proApplyStatus">
PRO_APPLY_STATUS = #proApplyStatus#
</isNotEmpty>
-->
<insert id="insert">
INSERT INTO ${hggpSchema}.HGCG005 (ID, <!-- 主键id -->
ACCOUNT_CODE, <!-- 企业编码 预留 -->
DEP_CODE, <!-- 部门编码 -->
CREATED_BY, <!-- 创建人 -->
CREATED_NAME, <!-- 创建人名称 -->
CREATED_TIME, <!-- 创建时间 -->
UPDATED_BY, <!-- 更新人 -->
UPDATED_NAME, <!-- 更新人名称 -->
UPDATED_TIME, <!-- 更新时间 -->
INQUIRY_DATE, <!-- 询价日期 -->
INQUIRY_NUMBER, <!-- 询价单号 -->
SUPPLIER_NAME, <!-- 供应商名称 -->
INQUIRY_TYPE, <!-- 询价单类型 -->
INQUIRY_PERSON, <!-- 询价单申请人 -->
DELETE_FLAG, <!-- 是否删除0.否1.是 -->
PRO_APPLY_STATUS <!-- 申请状态 -->
)
VALUES (#id#, #accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #inquiryDate#, #inquiryNumber#, #supplierName#, #inquiryType#, #inquiryPerson#, #deleteFlag#, #proApplyStatus#)
<selectKey resultClass="java.lang.Long" keyProperty="id">
SELECT MAX(ID) as "id" FROM ${hggpSchema}.HGCG005
</selectKey>
</insert>
<delete id="delete">
DELETE FROM ${hggpSchema}.HGCG005 WHERE
ID = #id#
</delete>
<update id="deleteFlag">
UPDATE ${hggpSchema}.HGCG005
SET
UPDATED_BY = #updatedBy#, <!-- 修改人 -->
UPDATED_NAME = #updatedName#, <!-- 修改人名称 -->
UPDATED_TIME = #updatedTime#, <!-- 修改时间 -->
DELETE_FLAG = #deleteFlag# <!-- 是否删除0:否1.是 -->
WHERE
ID = #id#
</update>
<!--修改提交状态-->
<update id="updateProApplyStatus">
UPDATE ${hggpSchema}.HGCG005
SET
UPDATED_BY = #updatedBy#, <!-- 更新人 -->
UPDATED_NAME = #updatedName#, <!-- 更新人名称 -->
UPDATED_TIME = #updatedTime#, <!-- 更新时间 -->
PRO_APPLY_STATUS = #proApplyStatus# <!-- 提交状态 0-未提交 1-已提交 -->
WHERE
ID = #id#
</update>
<update id="update">
UPDATE ${hggpSchema}.HGCG005
SET
ACCOUNT_CODE = #accountCode#, <!-- 企业编码 预留 -->
DEP_CODE = #depCode#, <!-- 部门编码 -->
CREATED_BY = #createdBy#, <!-- 创建人 -->
CREATED_NAME = #createdName#, <!-- 创建人名称 -->
CREATED_TIME = #createdTime#, <!-- 创建时间 -->
UPDATED_BY = #updatedBy#, <!-- 更新人 -->
UPDATED_NAME = #updatedName#, <!-- 更新人名称 -->
UPDATED_TIME = #updatedTime#, <!-- 更新时间 -->
INQUIRY_DATE = #inquiryDate#, <!-- 询价日期 -->
INQUIRY_NUMBER = #inquiryNumber#, <!-- 询价单号 -->
SUPPLIER_NAME = #supplierName#, <!-- 供应商名称 -->
INQUIRY_TYPE = #inquiryType#, <!-- 询价单类型 -->
INQUIRY_PERSON = #inquiryPerson#, <!-- 询价单申请人 -->
DELETE_FLAG = #deleteFlag#, <!-- 是否删除0.否1.是 -->
PRO_APPLY_STATUS = #proApplyStatus# <!-- 申请状态 -->
WHERE
ID = #id#
</update>
</sqlMap>
......@@ -193,6 +193,8 @@ public class HGConstant {
//办公用品领用单号
public static final String HGBG003_RECEIVE_CODE = "HGBG003_RECEIVE_CODE";
//采购询价单号
public static final String INQUIRY_NUMBER = "INQUIRY_NUMBER";
}
/**
......
package com.baosight.hggp.hg.sc.constant;
/**
* @author:songx
* @date:2024/8/22,10:09
*/
public class HgScConst {
/**
* 项目管理
*
* @author:songx
* @date:2024/5/7,16:36
*/
public static class HgSc001 {
}
}
package com.baosight.hggp.hg.sc.enums;
/**
* @author:songx
* @date:2024/3/1,17:29
*/
public enum ProjectTypeEnum {
ENGINEERING("engineering", "工程设计图"),
FOREIGN("foreign", "外来制造图"),
OTHER("other", "其他"),
;
/**
* 编码
*/
private String code;
/**
* 名称
*/
private String name;
/**
* code 是否存在
*
* @param code
* @return
*/
public static boolean contains(String code) {
for (ProjectTypeEnum value : values()) {
if (value.getCode().equals(code)) {
return true;
}
}
return false;
}
ProjectTypeEnum(String code, String name) {
this.code = code;
this.name = name;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
......@@ -7,8 +7,10 @@ import com.baosight.hggp.core.model.Pager;
import com.baosight.hggp.core.utils.ThreadUtils;
import com.baosight.hggp.hg.pz.domain.HGPZ009;
import com.baosight.hggp.hg.pz.tools.HGPZTools;
import com.baosight.hggp.hg.sc.constant.HgScConst;
import com.baosight.hggp.hg.sc.constant.HgScSqlConstant;
import com.baosight.hggp.hg.sc.domain.HGSC001;
import com.baosight.hggp.hg.sc.enums.ProjectTypeEnum;
import com.baosight.hggp.hg.sc.tools.HGSCTools;
import com.baosight.hggp.util.AssertUtils;
import com.baosight.hggp.util.EiInfoUtils;
......@@ -157,6 +159,8 @@ public class ServiceHGSC101 extends ServiceEPBase {
dbSc001.setDepName(dbPz009.getAccountName());
dbSc001.setProjCode(projCode);
dbSc001.setProjName(dcContractList.getTitle());
// TODO 默认其他,需要根据智邦的接口返回值确定
dbSc001.setProjType(ProjectTypeEnum.OTHER.getCode());
dbSc001.setContractNo(dcContractList.getHtid());
DaoUtils.insert(HGSC001.INSERT, dbSc001);
} else {
......
......@@ -78,6 +78,7 @@ public class ServiceHGSC101A extends ServiceEPBase {
*/
private void checkData(HGSC001 fSc001) {
AssertUtils.isEmpty(fSc001.getProjName(), "项目名称不能为空!");
AssertUtils.isEmpty(fSc001.getProjType(), "项目类型不能为空!");
}
/**
......
......@@ -324,6 +324,7 @@
COMPANY_CODE = #companyCode#,
COMPANY_NAME = #companyName#,
PROJ_NAME = #projName#,
PROJ_TYPE = #projType#,
<include refid="SqlBase.updateRevise"/>
WHERE PROJ_CODE = #projCode#
</update>
......
......@@ -50,6 +50,9 @@
<isNotEmpty prepend=" AND " property="depName">
dep_name = #depName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="contractNo">
contract_no like concat('%', #contractNo#, '%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projCode">
proj_code = #projCode#
</isNotEmpty>
......
......@@ -16,6 +16,8 @@ public class HgWdSqlConstant {
// 根据父节点统计
public static final String COUNT_BY_PARENT = "HGWD001.countByParent";
// 根据类型统计
public static final String COUNT_BY_TYPE = "HGWD001.countByType";
// 搜索树节点
public static final String SEARCH_TREE_NODE = "HGWD001.searchTreeNode";
}
......
......@@ -35,6 +35,7 @@ public class HGWD001 extends DaoEPBase {
public static final String FIELD_COMPANY_NAME = "companyName"; /* 公司名称*/
public static final String FIELD_PROJ_CODE = "projCode"; /* 项目编码*/
public static final String FIELD_PROJ_NAME = "projName"; /* 项目名称*/
public static final String FIELD_PROJ_TYPE = "projType"; /* 项目类型*/
public static final String FIELD_LEAF_LEVEL = "leafLevel"; /* 节点层级*/
public static final String FIELD_PARENT_ID = "parentId"; /* 父级ID*/
public static final String FIELD_FILE_ID = "fileId"; /* 文件ID*/
......@@ -59,6 +60,7 @@ public class HGWD001 extends DaoEPBase {
public static final String COL_COMPANY_NAME = "COMPANY_NAME"; /* 公司名称*/
public static final String COL_PROJ_CODE = "PROJ_CODE"; /* 项目编码*/
public static final String COL_PROJ_NAME = "PROJ_NAME"; /* 项目名称*/
public static final String COL_PROJ_TYPE = "PROJ_TYPE"; /* 项目类型*/
public static final String COL_PARENT_ID = "PARENT_ID"; /* 节点层级*/
public static final String COL_LEAF_LEVEL = "LEAF_LEVEL"; /* 父级ID*/
public static final String COL_FILE_ID = "FILE_ID"; /* 文件ID*/
......@@ -90,6 +92,7 @@ public class HGWD001 extends DaoEPBase {
private String companyName = " "; /* 公司名称*/
private String projCode = " "; /* 项目编码*/
private String projName = " "; /* 项目名称*/
private String projType = " "; /* 项目类型*/
private Integer leafLevel = new Integer(0);
private String parentId = " ";
private String fileId = " "; /* 文件ID*/
......@@ -163,6 +166,10 @@ public class HGWD001 extends DaoEPBase {
eiColumn.setDescName("项目名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PROJ_TYPE);
eiColumn.setDescName("项目类型");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_LEAF_LEVEL);
eiColumn.setDescName("节点层级");
eiMetadata.addMeta(eiColumn);
......@@ -434,6 +441,14 @@ public class HGWD001 extends DaoEPBase {
this.projName = projName;
}
public String getProjType() {
return projType;
}
public void setProjType(String projType) {
this.projType = projType;
}
/**
* get the leafLevel - 层级
* @return 层级
......@@ -598,6 +613,7 @@ public class HGWD001 extends DaoEPBase {
setCompanyName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_COMPANY_NAME)), companyName));
setProjCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROJ_CODE)), projCode));
setProjName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROJ_NAME)), projName));
setProjType(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROJ_TYPE)), projType));
setLeafLevel(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_LEAF_LEVEL)), leafLevel));
setParentId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PARENT_ID)), parentId));
setFileId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_FILE_ID)), fileId));
......@@ -630,6 +646,7 @@ public class HGWD001 extends DaoEPBase {
map.put(FIELD_COMPANY_NAME, StringUtils.toString(companyName, eiMetadata.getMeta(FIELD_COMPANY_NAME)));
map.put(FIELD_PROJ_CODE, StringUtils.toString(projCode, eiMetadata.getMeta(FIELD_PROJ_CODE)));
map.put(FIELD_PROJ_NAME, StringUtils.toString(projName, eiMetadata.getMeta(FIELD_PROJ_NAME)));
map.put(FIELD_PROJ_TYPE, StringUtils.toString(projType, eiMetadata.getMeta(FIELD_PROJ_TYPE)));
map.put(FIELD_LEAF_LEVEL, StringUtils.toString(leafLevel, eiMetadata.getMeta(FIELD_LEAF_LEVEL)));
map.put(FIELD_PARENT_ID, StringUtils.toString(parentId, eiMetadata.getMeta(FIELD_PARENT_ID)));
map.put(FIELD_FILE_ID, StringUtils.toString(fileId, eiMetadata.getMeta(FIELD_FILE_ID)));
......
......@@ -3,7 +3,9 @@ package com.baosight.hggp.hg.wd.service;
import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.dao.DaoBase;
import com.baosight.hggp.core.security.UserSessionUtils;
import com.baosight.hggp.core.tools.CodeValueTools;
import com.baosight.hggp.hg.sc.domain.HGSC001;
import com.baosight.hggp.hg.sc.enums.ProjectTypeEnum;
import com.baosight.hggp.hg.wd.constant.HgWdConstant;
import com.baosight.hggp.hg.wd.domain.HGWD001;
import com.baosight.hggp.hg.wd.tools.HGWDTools;
......@@ -214,9 +216,11 @@ public class ServiceHGWD001D extends TreeService {
String node = MapUtils.getString(queryMap, CommonConstant.Field.NODE);
String ename = MapUtils.getString(queryMap, CommonConstant.Field.ENAME);
if (CommonConstant.Field.ROOT.equals(node) || CommonConstant.Field.ROOT2.equals(node)) {
inInfo.addBlock(node).setRows(queryTopNode(node, ename));
inInfo.addBlock(node).setRows(queryTopNode(node));
} else if (ProjectTypeEnum.contains(node)) {
inInfo.addBlock(node).setRows(queryFirstNode(node, ename));
} else {
inInfo.addBlock(node).setRows(queryChildNode(node,ename));
inInfo.addBlock(node).setRows(queryChildNode(node, ename));
}
} catch (Exception e) {
LogUtils.setMsg(inInfo, e, "查询节点失败");
......@@ -229,10 +233,37 @@ public class ServiceHGWD001D extends TreeService {
*
* @return
*/
public List queryTopNode(String parentId,String ename) {
public List queryTopNode(String parentId) {
List<Map> results = new ArrayList();
List<Map> codesetMaps = CodeValueTools.getCodeValues("app.sc.projType");
if (CollectionUtils.isEmpty(codesetMaps)) {
return results;
}
for (Map codesetMap : codesetMaps) {
String label = MapUtils.getString(codesetMap, "value");
String text = MapUtils.getString(codesetMap, "label");
Map leafMap = buildLeaf(parentId, label, text, HgWdConstant.LeafType.P);
leafMap.put("type", "-1");
leafMap.put("leafLevel", "-1");
results.add(leafMap);
}
// 设置叶子节点
setTreeNodeLeaf(results, true);
return results;
}
/**
* 查询一级节点
*
* @param parentId
* @param ename
* @return
*/
public List queryFirstNode(String parentId, String ename) {
List<Map> results = new ArrayList();
Map queryMap = new HashMap<>();
queryMap.put("ename", ename);
queryMap.put("projType", parentId);
// 非管理员仅查询自己有权限的项目
String userId = UserSessionUtils.getLoginName();
if (!HgWdUtils.HgWd009.isManager(userId)) {
......@@ -253,7 +284,7 @@ public class ServiceHGWD001D extends TreeService {
results.add(leafMap);
}
// 设置叶子节点
setTreeNodeLeaf(results);
setTreeNodeLeaf(results, false);
return results;
}
......@@ -263,7 +294,7 @@ public class ServiceHGWD001D extends TreeService {
* @param parentId
* @return
*/
public List queryChildNode(String parentId,String ename) {
public List queryChildNode(String parentId, String ename) {
List<Map> results = new ArrayList();
Map queryMap = new HashMap();
queryMap.put("parentId", parentId);
......@@ -282,7 +313,7 @@ public class ServiceHGWD001D extends TreeService {
results.add(leafMap);
}
// 设置叶子节点
setTreeNodeLeaf(results);
setTreeNodeLeaf(results, false);
return results;
}
......@@ -290,13 +321,19 @@ public class ServiceHGWD001D extends TreeService {
* 设置叶子节点是否可以展开
*
* @param nodes
* @param isType
*/
private void setTreeNodeLeaf(List<Map> nodes) {
private void setTreeNodeLeaf(List<Map> nodes, boolean isType) {
if (CollectionUtils.isEmpty(nodes)) {
return;
}
List<String> labels = ObjectUtils.listKey(nodes, "label");
Map<String, Integer> resultMap = HGWDTools.HgWd001.countByParent(labels);
Map<String, Integer> resultMap = null;
if (isType) {
resultMap = HGWDTools.HgWd001.countByType(labels);
} else {
resultMap = HGWDTools.HgWd001.countByParent(labels);
}
for (Map node : nodes) {
Integer cnt = resultMap == null ? null : resultMap.get(node.get("label"));
node.put("leaf", cnt == null || cnt == 0 ? 1 : 0);
......
......@@ -17,6 +17,7 @@
COMPANY_NAME as "companyName", <!-- 公司名称 -->
PROJ_CODE as "projCode", <!-- 项目编码 -->
PROJ_NAME as "projName", <!-- 项目名称 -->
PROJ_TYPE as "projType", <!-- 项目类型 -->
LEAF_LEVEL as "leafLevel", <!--节点层级-->
PARENT_ID as "parentId", <!--父级ID-->
FILE_ID as "fileId", <!-- 文件ID -->
......@@ -156,6 +157,17 @@
GROUP BY PARENT_ID
</select>
<!-- 更具父级节点统计 -->
<select id="countByType" resultClass="java.util.HashMap">
SELECT B.PROJ_TYPE, COUNT(1) AS CNT
FROM ${hggpSchema}.HGWD001 A, ${hggpSchema}.HGSC001 B
WHERE 1=1
AND A.PROJ_CODE = B.PROJ_CODE
AND A.DELETE_FLAG = 0
AND B.PROJ_TYPE IN <iterate close=")" open="(" conjunction="," property="projTypes">#projTypes[]#</iterate>
GROUP BY B.PROJ_TYPE
</select>
<!-- 搜索树节点 -->
<select id="searchTreeNode" resultClass="com.baosight.hggp.hg.wd.domain.HGWD001">
SELECT DISTINCT
......@@ -194,6 +206,7 @@
COMPANY_NAME, <!-- 公司名称 -->
PROJ_CODE, <!-- 项目编码 -->
PROJ_NAME, <!-- 项目名称 -->
PROJ_TYPE, <!-- 项目类型 -->
LEAF_LEVEL, <!--节点层级-->
PARENT_ID, <!--父级ID-->
FILE_ID, <!-- 文件ID -->
......@@ -205,8 +218,8 @@
RELEASE_DATE
) VALUES (
#accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#,
#deleteFlag#, #companyCode#, #companyName#, #projCode#, #projName#,#leafLevel#,#parentId#,
#fileId#, #fileType#, #fileName#,
#deleteFlag#, #companyCode#, #companyName#, #projCode#, #projName#, #projType#,
#leafLevel#, #parentId#, #fileId#, #fileType#, #fileName#,
#docVersion#, #status#, #remark#, #releaseDate#
<selectKey resultClass="long" keyProperty="id">
SELECT MAX(ID) AS "id" FROM ${hggpSchema}.HGWD001
......@@ -258,6 +271,7 @@
COMPANY_NAME as "companyName", <!-- 公司名称 -->
PROJ_CODE as "projCode", <!-- 项目编码 -->
PROJ_NAME as "projName", <!-- 项目名称 -->
PROJ_TYPE as "projType", <!-- 项目类型 -->
LEAF_LEVEL as "leafLevel", <!--节点层级-->
PARENT_ID as "pId", <!--父级ID-->
FILE_ID as "fileId", <!-- 文件ID -->
......
......@@ -121,6 +121,24 @@ public class HGWDTools {
}
/**
* 根据类型统计
*
* @param projTypes
* @return
*/
public static Map<String, Integer> countByType(List<String> projTypes) {
AssertUtils.isEmpty(projTypes, "项目类型不能为空");
Map queryMap = new HashMap();
queryMap.put("projTypes", projTypes);
List<Map> results = DaoBase.getInstance().query(HgWdSqlConstant.HgWd001.COUNT_BY_TYPE, queryMap);
if (CollectionUtils.isEmpty(results)) {
return null;
}
return results.stream().collect(Collectors.toMap(item -> MapUtils.getString(item, HGWD001.COL_PROJ_TYPE),
item -> MapUtils.getInteger(item, "CNT")));
}
/**
* 搜索树节点
*
* @param fileName
......
......@@ -37,6 +37,7 @@ public class HGXT002 extends DaoEPBase {
public static final String FIELD_LICENSE_PLATE_CODE = "licensePlateCode"; /* 车牌号*/
public static final String FIELD_DELETE_FLAG = "deleteFlag"; /* 是否删除0.否1.是*/
public static final String FIELD_APPLY_STATUS = "applyStatus"; /* 申请状态*/
public static final String FIELD_INSURANCE_COMPANY = "insuranceCompany";
public static final String COL_ID = "ID"; /* 主键id*/
public static final String COL_ACCOUNT_CODE = "ACCOUNT_CODE"; /* 企业编码 预留*/
......@@ -53,6 +54,7 @@ public class HGXT002 extends DaoEPBase {
public static final String COL_LICENSE_PLATE_CODE = "LICENSE_PLATE_CODE"; /* 车牌号*/
public static final String COL_DELETE_FLAG = "DELETE_FLAG"; /* 是否删除0.否1.是*/
public static final String COL_APPLY_STATUS = "APPLY_STATUS"; /* 申请状态*/
public static final String COL_INSURANCE_COMPANY = "INSURANCE_COMPANY";
public static final String QUERY = "HGXT002.query";
public static final String COUNT = "HGXT002.count";
......@@ -78,6 +80,7 @@ public class HGXT002 extends DaoEPBase {
private String licensePlateCode = " "; /* 车牌号*/
private Integer deleteFlag = 0; /* 是否删除0.否1.是*/
private Integer applyStatus = 0; /* 申请状态*/
private String insuranceCompany = " "; /* 保险公司*/
/**
* initialize the metadata.
......@@ -146,6 +149,10 @@ public class HGXT002 extends DaoEPBase {
eiColumn.setDescName("申请状态");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_INSURANCE_COMPANY);
eiColumn.setDescName("保险公司");
eiMetadata.addMeta(eiColumn);
}
......@@ -396,6 +403,15 @@ public class HGXT002 extends DaoEPBase {
public void setApplyStatus(Integer applyStatus) {
this.applyStatus = applyStatus;
}
public String getInsuranceCompany() {
return insuranceCompany;
}
public void setInsuranceCompany(String insuranceCompany) {
this.insuranceCompany = insuranceCompany;
}
/**
* get the value from Map.
*
......@@ -419,6 +435,7 @@ public class HGXT002 extends DaoEPBase {
setLicensePlateCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_LICENSE_PLATE_CODE)), licensePlateCode));
setDeleteFlag(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_DELETE_FLAG)), deleteFlag));
setApplyStatus(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_APPLY_STATUS)), applyStatus));
setInsuranceCompany(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_INSURANCE_COMPANY)), insuranceCompany));
}
/**
......@@ -443,6 +460,7 @@ public class HGXT002 extends DaoEPBase {
map.put(FIELD_LICENSE_PLATE_CODE, StringUtils.toString(licensePlateCode, eiMetadata.getMeta(FIELD_LICENSE_PLATE_CODE)));
map.put(FIELD_DELETE_FLAG, StringUtils.toString(deleteFlag, eiMetadata.getMeta(FIELD_DELETE_FLAG)));
map.put(FIELD_APPLY_STATUS, StringUtils.toString(applyStatus, eiMetadata.getMeta(FIELD_APPLY_STATUS)));
map.put(FIELD_INSURANCE_COMPANY, StringUtils.toString(insuranceCompany, eiMetadata.getMeta(FIELD_INSURANCE_COMPANY)));
return map;
}
......
package com.baosight.hggp.hg.xt.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.hg.bg.domain.HGBG002;
import com.baosight.hggp.hg.constant.HGConstant;
import com.baosight.hggp.hg.xt.domain.HGXT001;
import com.baosight.hggp.util.CommonMethod;
import com.baosight.hggp.util.ErrorCodeUtils;
import com.baosight.hggp.util.LogUtils;
import com.baosight.hggp.util.StringUtil;
......@@ -17,6 +20,8 @@ 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.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
......@@ -29,7 +34,14 @@ public class ServiceHGXT001 extends ServiceEPBase {
@Override
public EiInfo initLoad(EiInfo inInfo) {
try {
CommonMethod.initBlock(inInfo, Arrays.asList(
DdynamicEnum.USER_BLOCK_ID
), null, false);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGXT001().eiMetadata);
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
......@@ -77,6 +89,7 @@ public class ServiceHGXT001 extends ServiceEPBase {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
// 写入数据
List<HGXT001> list = new ArrayList<>();
for (Map resultRow : resultRows) {
HGXT001 hpxt001 = new HGXT001();
hpxt001.fromMap(resultRow);
......@@ -85,7 +98,9 @@ public class ServiceHGXT001 extends ServiceEPBase {
} else {
this.modify(hpxt001);
}
list.add(hpxt001);
}
inInfo.getBlock(EiConstant.resultBlock).setRows(list);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据保存成功!");
} catch (Exception e) {
......
package com.baosight.hggp.hg.xt.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.hg.xt.domain.HGXT001;
import com.baosight.hggp.hg.xt.domain.HGXT002;
import com.baosight.hggp.util.CommonMethod;
import com.baosight.hggp.util.ErrorCodeUtils;
import com.baosight.hggp.util.LogUtils;
import com.baosight.hggp.util.StringUtil;
......@@ -16,6 +18,8 @@ import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.resource.I18nMessages;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
......@@ -28,7 +32,14 @@ public class ServiceHGXT002 extends ServiceEPBase {
@Override
public EiInfo initLoad(EiInfo inInfo) {
try {
CommonMethod.initBlock(inInfo, Arrays.asList(
DdynamicEnum.USER_BLOCK_ID
), null, false);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGXT002().eiMetadata);
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
......@@ -51,13 +62,13 @@ public class ServiceHGXT002 extends ServiceEPBase {
public EiInfo delete(EiInfo inInfo) {
int i = 0;
try {
HGXT002 HGXT002 = new HGXT002();
HGXT002 hgxt002 = new HGXT002();
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
for (i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
HGXT002.fromMap(map);
HGXT002.setDeleteFlag(CommonConstant.YesNo.YES_1);
DaoUtils.update(HGXT002.DELETE_FLAG, HGXT002);
hgxt002.fromMap(map);
hgxt002.setDeleteFlag(CommonConstant.YesNo.YES_1);
DaoUtils.update(HGXT002.DELETE_FLAG, hgxt002);
}
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsgByKey("ep.1000", new String[]{String.valueOf(i), I18nMessages.getText("label.delete", "删除")});
......@@ -76,15 +87,18 @@ public class ServiceHGXT002 extends ServiceEPBase {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
// 写入数据
List<HGXT002> list = new ArrayList<>();
for (Map resultRow : resultRows) {
HGXT002 HGXT002 = new HGXT002();
HGXT002.fromMap(resultRow);
if (HGXT002.getId() == null || HGXT002.getId() == 0) {
this.add(HGXT002);
HGXT002 hgxt002 = new HGXT002();
hgxt002.fromMap(resultRow);
if (hgxt002.getId() == null || hgxt002.getId() == 0) {
this.add(hgxt002);
} else {
this.modify(HGXT002);
this.modify(hgxt002);
}
list.add(hgxt002);
}
inInfo.getBlock(EiConstant.resultBlock).setRows(list);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据保存成功!");
} catch (Exception e) {
......@@ -104,20 +118,20 @@ public class ServiceHGXT002 extends ServiceEPBase {
/**
* 设置基础信息
*
* @param HGXT002
* @param hgxt002
*/
private void setBaseInfo(HGXT002 HGXT002) {
private void setBaseInfo(HGXT002 hgxt002) {
// 去除日期字符串中的-
HGXT002.setApplyDate(StringUtil.removeHorizontalLine(HGXT002.getApplyDate()));
HGXT002.setApplyStatus(CommonConstant.YesNo.NO_0);
hgxt002.setApplyDate(StringUtil.removeHorizontalLine(hgxt002.getApplyDate()));
hgxt002.setApplyStatus(CommonConstant.YesNo.NO_0);
}
/**
* 修改操作
*/
public void modify(HGXT002 HGXT002) {
public void modify(HGXT002 hgxt002) {
DaoUtils.update(HGXT002.UPDATE, HGXT002);
DaoUtils.update(HGXT002.UPDATE, hgxt002);
}
@OperationLogAnnotation(operModul = "车辆申请",operType = "提交",operDesc = "提交审批操作")
......
......@@ -17,6 +17,7 @@ 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.ArrayList;
import java.util.List;
import java.util.Map;
......@@ -52,13 +53,13 @@ public class ServiceHGXT003 extends ServiceEPBase {
public EiInfo delete(EiInfo inInfo) {
int i = 0;
try {
HGXT003 HGXT003 = new HGXT003();
HGXT003 hgxt003 = new HGXT003();
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
for (i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
HGXT003.fromMap(map);
HGXT003.setDeleteFlag(CommonConstant.YesNo.YES_1);
DaoUtils.update(HGXT003.DELETE_FLAG, HGXT003);
hgxt003.fromMap(map);
hgxt003.setDeleteFlag(CommonConstant.YesNo.YES_1);
DaoUtils.update(HGXT003.DELETE_FLAG, hgxt003);
}
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsgByKey("ep.1000", new String[]{String.valueOf(i), I18nMessages.getText("label.delete", "删除")});
......@@ -77,15 +78,18 @@ public class ServiceHGXT003 extends ServiceEPBase {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
// 写入数据
List<HGXT003> list = new ArrayList<>();
for (Map resultRow : resultRows) {
HGXT003 HGXT003 = new HGXT003();
HGXT003.fromMap(resultRow);
if (HGXT003.getId() == null || HGXT003.getId() == 0) {
this.add(HGXT003);
HGXT003 hgxt003 = new HGXT003();
hgxt003.fromMap(resultRow);
if (hgxt003.getId() == null || hgxt003.getId() == 0) {
this.add(hgxt003);
} else {
this.modify(HGXT003);
this.modify(hgxt003);
}
list.add(hgxt003);
}
inInfo.getBlock(EiConstant.resultBlock).setRows(list);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据保存成功!");
} catch (Exception e) {
......
package com.baosight.hggp.hg.xt.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.hg.constant.HGConstant;
import com.baosight.hggp.hg.xt.domain.HGXT004;
import com.baosight.hggp.util.ErrorCodeUtils;
import com.baosight.hggp.util.LogUtils;
import com.baosight.hggp.util.StringUtil;
import com.baosight.hggp.util.*;
import com.baosight.hggp.util.contants.ACConstants;
import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant;
......@@ -17,6 +16,8 @@ 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.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
......@@ -29,7 +30,14 @@ public class ServiceHGXT004 extends ServiceEPBase {
@Override
public EiInfo initLoad(EiInfo inInfo) {
try {
CommonMethod.initBlock(inInfo, Arrays.asList(
DdynamicEnum.USER_BLOCK_ID
), null, false);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGXT004().eiMetadata);
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
......@@ -52,13 +60,13 @@ public class ServiceHGXT004 extends ServiceEPBase {
public EiInfo delete(EiInfo inInfo) {
int i = 0;
try {
HGXT004 HGXT004 = new HGXT004();
HGXT004 hgxt004 = new HGXT004();
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
for (i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
HGXT004.fromMap(map);
HGXT004.setDeleteFlag(CommonConstant.YesNo.YES_1);
DaoUtils.update(HGXT004.DELETE_FLAG, HGXT004);
hgxt004.fromMap(map);
hgxt004.setDeleteFlag(CommonConstant.YesNo.YES_1);
DaoUtils.update(HGXT004.DELETE_FLAG, hgxt004);
}
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsgByKey("ep.1000", new String[]{String.valueOf(i), I18nMessages.getText("label.delete", "删除")});
......@@ -77,15 +85,18 @@ public class ServiceHGXT004 extends ServiceEPBase {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
// 写入数据
List<HGXT004> list = new ArrayList<>();
for (Map resultRow : resultRows) {
HGXT004 HGXT004 = new HGXT004();
HGXT004.fromMap(resultRow);
if (HGXT004.getId() == null || HGXT004.getId() == 0) {
this.add(HGXT004);
HGXT004 hgxt004 = new HGXT004();
hgxt004.fromMap(resultRow);
if (hgxt004.getId() == null || hgxt004.getId() == 0) {
this.add(hgxt004);
} else {
this.modify(HGXT004);
this.modify(hgxt004);
}
list.add(hgxt004);
}
inInfo.getBlock(EiConstant.resultBlock).setRows(list);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据保存成功!");
} catch (Exception e) {
......@@ -97,31 +108,31 @@ public class ServiceHGXT004 extends ServiceEPBase {
/**
* 新增操作
*/
public void add(HGXT004 HGXT004) {
this.setBaseInfo(HGXT004);
public void add(HGXT004 hgxt004) {
this.setBaseInfo(hgxt004);
//生成会议室管理申请
HGXT004.setApplyNo(SequenceGenerator.getNextSequence(HGConstant.SequenceId.CONFERENCE_APPLY_NO));
DaoUtils.insert(HGXT004.INSERT, HGXT004);
hgxt004.setApplyNo(SequenceGenerator.getNextSequence(HGConstant.SequenceId.CONFERENCE_APPLY_NO));
DaoUtils.insert(HGXT004.INSERT, hgxt004);
}
/**
* 设置基础信息
*
* @param HGXT004
* @param hgxt004
*/
private void setBaseInfo(HGXT004 HGXT004) {
private void setBaseInfo(HGXT004 hgxt004) {
// 去除日期字符串中的-
HGXT004.setApplyDate(StringUtil.removeHorizontalLine(HGXT004.getApplyDate()));
HGXT004.setStartTime(StringUtil.removeHorizontalLine(HGXT004.getStartTime()));
HGXT004.setEndTime(StringUtil.removeHorizontalLine(HGXT004.getEndTime()));
hgxt004.setApplyDate(StringUtil.removeHorizontalLine(hgxt004.getApplyDate()));
hgxt004.setStartTime(DateUtils.formatShort(hgxt004.getStartTime()));
hgxt004.setEndTime(DateUtils.formatShort(hgxt004.getEndTime()));
}
/**
* 修改操作
*/
public void modify(HGXT004 HGXT004) {
public void modify(HGXT004 hgxt004) {
DaoUtils.update(HGXT004.UPDATE, HGXT004);
DaoUtils.update(HGXT004.UPDATE, hgxt004);
}
@OperationLogAnnotation(operModul = "会议室管理",operType = "提交",operDesc = "提交审批操作")
public EiInfo approve(EiInfo inInfo){
......@@ -129,10 +140,10 @@ public class ServiceHGXT004 extends ServiceEPBase {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
for (Map resultRow : resultRows) {
HGXT004 HGXT004 = new HGXT004();
HGXT004.fromMap(resultRow);
HGXT004.setProApplyStatus(CommonConstant.YesNo.YES_1);
DaoUtils.update(HGXT004.UPDATE_PRO_APPLY_STATUS, HGXT004);
HGXT004 hgxt004 = new HGXT004();
hgxt004.fromMap(resultRow);
hgxt004.setProApplyStatus(CommonConstant.YesNo.YES_1);
DaoUtils.update(HGXT004.UPDATE_PRO_APPLY_STATUS, hgxt004);
}
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsgByKey("ep.1000", new String[]{String.valueOf(i), I18nMessages.getText("label.approve", "提交")});
......@@ -154,10 +165,10 @@ public class ServiceHGXT004 extends ServiceEPBase {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
for (Map resultRow : resultRows) {
HGXT004 HGXT004 = new HGXT004();
HGXT004.fromMap(resultRow);
HGXT004.setStatus(CommonConstant.YesNo.YES_1);
DaoUtils.update(HGXT004.UPDATE_STATUS, HGXT004);
HGXT004 hgxt004 = new HGXT004();
hgxt004.fromMap(resultRow);
hgxt004.setStatus(CommonConstant.YesNo.YES_1);
DaoUtils.update(HGXT004.UPDATE_STATUS, hgxt004);
}
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsgByKey("ep.1000", new String[]{String.valueOf(i), I18nMessages.getText("label.returnStatus", "返还")});
......
......@@ -136,7 +136,7 @@
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
ID asc
CREATED_TIME DESC
</isEmpty>
</dynamic>
......@@ -241,6 +241,9 @@
STATUS <!-- 返还状态 0-未返还 1-已返还 -->
)
VALUES (#id#, #accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #applyDate#, #applyNo#, #applyPersonnel#, #licensePlateCode#, #driver#, #startTime#, #endTime#, #destination#, #mileage#, #reason#, #deleteFlag#, #proApplyStatus#, #status#)
<selectKey resultClass="java.lang.Long" keyProperty="id" >
SELECT MAX(ID) as "id" FROM ${hggpSchema}.HGXT001
</selectKey>
</insert>
<delete id="delete">
......
......@@ -90,6 +90,7 @@
UPDATED_TIME as "updatedTime", <!-- 更新时间 -->
APPLY_DATE as "applyDate", <!-- 申请日期 -->
APPLY_NO as "applyNo", <!-- 保险单号 -->
INSURANCE_COMPANY as "insuranceCompany", <!-- 保险公司 -->
APPLY_PERSONNEL as "applyPersonnel", <!-- 申请人 -->
LICENSE_PLATE_CODE as "licensePlateCode", <!-- 车牌号 -->
DELETE_FLAG as "deleteFlag", <!-- 是否删除0.否1.是 -->
......@@ -101,7 +102,7 @@
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
ID asc
CREATED_TIME DESC
</isEmpty>
</dynamic>
......@@ -175,9 +176,13 @@
APPLY_PERSONNEL, <!-- 申请人 -->
LICENSE_PLATE_CODE, <!-- 车牌号 -->
DELETE_FLAG, <!-- 是否删除0.否1.是 -->
APPLY_STATUS <!-- 申请状态 -->
APPLY_STATUS, <!-- 申请状态 -->
INSURANCE_COMPANY
)
VALUES (#id#, #accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #applyDate#, #applyNo#, #applyPersonnel#, #licensePlateCode#, #deleteFlag#, #applyStatus#)
VALUES (#id#, #accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #applyDate#, #applyNo#, #applyPersonnel#, #licensePlateCode#, #deleteFlag#, #applyStatus#, #insuranceCompany#)
<selectKey resultClass="java.lang.Long" keyProperty="id" >
SELECT MAX(ID) as "id" FROM ${hggpSchema}.HGXT002
</selectKey>
</insert>
<delete id="delete">
......@@ -224,7 +229,8 @@
APPLY_PERSONNEL = #applyPersonnel#, <!-- 申请人 -->
LICENSE_PLATE_CODE = #licensePlateCode#, <!-- 车牌号 -->
DELETE_FLAG = #deleteFlag#, <!-- 是否删除0.否1.是 -->
APPLY_STATUS = #applyStatus# <!-- 申请状态 -->
APPLY_STATUS = #applyStatus#, <!-- 申请状态 -->
INSURANCE_COMPANY = #insuranceCompany#
WHERE
ID = #id#
</update>
......
......@@ -104,7 +104,7 @@
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
ID asc
CREATED_TIME DESC
</isEmpty>
</dynamic>
......@@ -186,6 +186,9 @@
T_HPXT002_ID
)
VALUES (#id#, #accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #licensePlateCode#, #insuranceType#, #insuranceCompany#, #insuranceStartDate#, #insuranceEndDate#, #insuranceAmount#, #deleteFlag#, #tHpxt002Id# )
<selectKey resultClass="java.lang.Long" keyProperty="id" >
SELECT MAX(ID) as "id" FROM ${hggpSchema}.HGXT002A
</selectKey>
</insert>
<delete id="delete">
......
......@@ -105,7 +105,7 @@
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
ID asc
CREATED_TIME DESC
</isEmpty>
</dynamic>
......@@ -190,6 +190,9 @@
DELETE_FLAG <!-- 删除标记 -->
)
VALUES (#id#, #accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #maintenanceDate#, #maintenanceNumber#, #maintenanceType#, #licensePlate#, #handler#, #maintenanceCost#, #maintenanceReason#, #deleteFlag#)
<selectKey resultClass="java.lang.Long" keyProperty="id" >
SELECT MAX(ID) as "id" FROM ${hggpSchema}.HGXT003
</selectKey>
</insert>
<delete id="delete">
......
......@@ -131,7 +131,7 @@
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
ID asc
CREATED_TIME DESC
</isEmpty>
</dynamic>
......@@ -232,6 +232,9 @@
STATUS <!-- 返还状态 0-未返还 1-已返还 -->
)
VALUES (#id#, #accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #applyDate#, #applyNo#, #applyPersonnel#, #meetingRoom#, #meetingSubject#, #meetingNature#, #importanceLevel#, #startTime#, #endTime#, #deleteFlag#, #proApplyStatus#, #status#)
<selectKey resultClass="java.lang.Long" keyProperty="id" >
SELECT MAX(ID) as "id" FROM ${hggpSchema}.HGXT004
</selectKey>
</insert>
<delete id="delete">
......
$(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) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="details(' + item.id + ',' + item.proApplyStatus + ')" >详情</a>';
}
return template;
}
}, {
field: "inquiryDate",
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 supplierName= item.get("supplierName");
if(isBlank(supplierName)){
message("选中的第"+(index+1)+"行\"供应商名称\",不能为空!");
flag = false;
return false;
}
let inquiryPerson= item.get("inquiryPerson");
if(isBlank(inquiryPerson)){
message("选中的第"+(index+1)+"行\"询价人员\",不能为空!");
flag = false;
return false;
}
let inquiryType= item.get("inquiryType");
if(isBlank(inquiryType)){
message("选中的第"+(index+1)+"行\"询价单类型\",不能为空!");
flag = false;
return false;
}
});
if(flag) {
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"保存\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result", "HGCG005", "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", "HGCG005", "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", "HGCG005", "delete", true,
function (e) {
query();
});
}
});
}
}
/**
* 显示附件清单
*
* @param id
*/
function showUploadFile(id) {
JSColorbox.open({
href: "HGXT001A?methodName=initLoad&inqu_status-0-matId=" + id,
title: "<div style='text-align: center;'>附件清单</div>",
width: "80%",
height: "80%",
});
}
/**
* 显示详情清单
*
* @param id
*/
function details(id,proApplyStatus) {
JSColorbox.open({
href: "HGCG005A?methodName=initLoad&inqu_status-0-hgcg005Id=" + id + "&inqu_status-0-proApplyStatus=" + proApplyStatus,
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/3/25
Time: 16:17
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}"/>
<script>
var ctx = "${ctx}";
</script>
<EF:EFPage title="询价管理">
<EF:EFRegion id="inqu" title="查询条件">
<div class="row">
<EF:EFDateSpan startCname="询价日期(从)" endCname="至" blockId="inqu_status"
startName="inquiryDateFrom" endName="inquiryDateTo" 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-inquiryPerson" colWidth="3"/>
<EF:EFInput cname="供应商名称" ename="inqu_status-0-supplierName" colWidth="3"/>
</div>
<%-- <div class="row">--%>
<%-- <EF:EFInput cname="产品名称" ename="inqu_status-0-inquiryPerson" colWidth="3"/>--%>
<%-- <EF:EFInput cname="产品规格" ename="inqu_status-0-inquiryPerson" colWidth="3"/>--%>
<%-- <EF:EFInput cname="规格" ename="inqu_status-0-inquiryPerson" colWidth="3"/>--%>
<%-- </div>--%>
</EF:EFRegion>
<EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="row">
<EF:EFColumn ename="id" primaryKey="true" cname="主键" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="130" align="center"/>
<EF:EFColumn ename="inquiryDate" cname="询价日期" align="center" width="150" readonly="true" editType="date"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required="true"/>
<EF:EFColumn ename="inquiryNumber" cname="询价单号" enable="false" width="130" align="center" />
<EF:EFComboColumn ename="supplierName" cname="供应商名称" blockName="supplier_record_block_id"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
maxLength="16" readonly="false" width="160" required="true"
align="center" filter="contains" sort="true" />
<EF:EFComboColumn ename="inquiryPerson" cname="询价人员" columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField" defaultValue="${loginName}"
maxLength="16" width="140" readonly="false" required="true"
align="center" filter="contains" sort="true">
<EF:EFOptions blockId="user_block_id" textField="textField" valueField="valueField"/>
</EF:EFComboColumn>
<EF:EFComboColumn ename="inquiryType" cname="询价类型" width="80" align="center" readonly="true">
<EF:EFCodeOption codeName="hggp.hgcg.inquiryType"/>
</EF:EFComboColumn>
<EF:EFComboColumn ename="proApplyStatus" cname="提交状态" width="80" align="center" enable="false" defaultValue="0">
<EF:EFCodeOption codeName="hggp.hgxt.proApplyStatus"/>
</EF:EFComboColumn>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
$(function() {
// 查询
$("#QUERY").on("click", function () {
query();
});
IPLATUI.EFGrid.result = {
pageable: {
pageSize: 20,
pageSizes: [10,20,30,50,100,200],
},
columns: [
],
loadComplete: function (grid) {
grid.dataSource.bind("change",function(e){
var item = e.items[0];
if(e.field == "invoiceType"){
if(item.invoiceType ){
/*
折扣:discount,
单价:unitPrice,
数量:quantity,
税率:taxRate,
折后单价:discountedPrice,
含税单价:taxInclusivePrice,
含税折后单价:taxInclusiveDiscountedPrice,
不含税金额:nonTaxAmount,
税额:taxAmount,
含税金额:taxInclusiveAmount,
*/
//折后单价
let discountedPrice = item.unitPrice * item.discount;
//含税单价
let taxInclusivePrice = item.unitPrice * (item.taxRate / 100 + 1);
//含税折后单价
let taxInclusiveDiscountedPrice = taxInclusivePrice * item.discount;
//不含税金额
let nonTaxAmount = discountedPrice * item.quantity;
//含税金额
let taxInclusiveAmount = discountedPrice * item.quantity * (item.taxRate / 100 + 1);
//税额
let taxAmount = taxInclusiveAmount - nonTaxAmount;
// 使用toFixed方法四舍五入到两位小数,并转换为数字
discountedPrice = Number(discountedPrice.toFixed(2));
// 使用toFixed方法四舍五入到两位小数,并转换为数字
taxInclusivePrice = Number(taxInclusivePrice.toFixed(2));
taxInclusiveDiscountedPrice = Number(taxInclusiveDiscountedPrice.toFixed(2));
nonTaxAmount = Number(nonTaxAmount.toFixed(2));
taxInclusiveAmount = Number(taxInclusiveAmount.toFixed(2));
taxAmount = Number(taxAmount.toFixed(2));
resultGrid.setCellValue(item,'discountedPrice',discountedPrice)
resultGrid.setCellValue(item,'taxInclusivePrice',taxInclusivePrice)
resultGrid.setCellValue(item,'taxInclusiveDiscountedPrice',taxInclusiveDiscountedPrice)
resultGrid.setCellValue(item,'nonTaxAmount',nonTaxAmount)
resultGrid.setCellValue(item,'taxInclusiveAmount',taxInclusiveAmount)
resultGrid.setCellValue(item,'taxAmount',taxAmount)
}
loadChange(grid,e,"price");
}
})
},
onSave: function (e) {
// 阻止默认请求,使用自定义保存
e.preventDefault();
let btnNode = $(this);
//禁用按钮
btnNode.attr("disabled", true);
saveFunc(btnNode);
},
onDelete: function (e) {
// 阻止默认请求,使用自定义删除
e.preventDefault();
deleteFunc();
},
onSuccess: function (e) {
if (e.eiInfo.extAttr.methodName == 'save' || e.eiInfo.extAttr.methodName == 'delete') {
query();
}
},
}
downKeyUp();
});
$(window).load(function () {
// 查
//query();
});
/**
* 查询
*/
let query = function () {
resultGrid.dataSource.page(1);
}
/**
* 保存
*/
function saveFunc() {
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
let flag = true;
$.each(rows, function(index, item) {
let deliveryDate= item.get("deliveryDate");
let minPurchaseQuantity = item.get("minPurchaseQuantity");
let productCode= item.get("productCode");
let productName= item.get("productName");
let specification= item.get("specification");
let unit= item.get("unit");
let quantity= item.get("quantity");
let unitPrice= item.get("unitPrice");
let discount= item.get("discount");
let taxRate= item.get("taxRate");
let invoiceType= item.get("invoiceType");
if(isBlank(deliveryDate)){
message("选中的第"+(index+1)+"行\"交货日期\",不能为空!");
flag = false;
return false;
}
if(isBlank(minPurchaseQuantity)){
message("选中的第"+(index+1)+"行\"最小采购量\",不能为空!");
flag = false;
return false;
}
if(isBlank(productCode)){
message("选中的第"+(index+1)+"行\"产品编码\",不能为空!");
flag = false;
return false;
}
if(isBlank(productName)){
message("选中的第"+(index+1)+"行\"产品名称\",不能为空!");
flag = false;
return false;
}
if(isBlank(specification)){
message("选中的第"+(index+1)+"行\"规格\",不能为空!");
flag = false;
return false;
}
if(isBlank(unit)){
message("选中的第"+(index+1)+"行\"单位\",不能为空!");
flag = false;
return false;
}
if(isBlank(quantity)){
message("选中的第"+(index+1)+"行\"数量\",不能为空!");
flag = false;
return false;
}
if(isBlank(unitPrice)){
message("选中的第"+(index+1)+"行\"单价\",不能为空!");
flag = false;
return false;
}
if(isBlank(discount)){
message("选中的第"+(index+1)+"行\"折扣\",不能为空!");
flag = false;
return false;
}
if(isBlank(taxRate)){
message("选中的第"+(index+1)+"行\"税率\",不能为空!");
flag = false;
return false;
}
if(isBlank(invoiceType)){
message("选中的第"+(index+1)+"行\"票据类型\",不能为空!");
flag = false;
return false;
}
});
if(flag) {
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"保存\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result", "HGCG005A", "save", true,
function (e) {
//detailGrid.setEiInfo(e);
query();
});
}
});
}
}
/**
* 删除明细
*/
function deleteFunc() {
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
let flag = true;
let status= $("#inqu_status-0-proApplyStatus").val();
if(status=="1"){
message("记录已提交,不能删除!");
flag = false;
return false;
}
if(flag){
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"删除\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result", "HGCG005A", "delete", true,
function (e) {
query();
});
}
});
}
}
<!DOCTYPE html>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ 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}"/>
<head>
</head>
<EF:EFPage title="询价管理详情">
<EF:EFRegion id="inqu" title="查询条件">
<div class="row">
<EF:EFInput ename="proApplyStatus" blockId="inqu_status" row="0" type="hidden" />
<EF:EFInput ename="hgcg005Id" blockId="inqu_status" row="0" type="hidden" />
<EF:EFInput cname="产品编码" ename="productCode" blockId="inqu_status" row="0" colWidth="3" />
<EF:EFInput cname="产品名称" ename="productName" blockId="inqu_status" row="0" colWidth="3" />
<EF:EFInput cname="规格" ename="specification" blockId="inqu_status" row="0" 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="deliveryDate" cname="交货日期" align="center" width="150" editType="date"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required="true"/>
<EF:EFColumn ename="minPurchaseQuantity" cname="最小采购量" width="100" enable="true" required="true" align="center"/>
<EF:EFColumn ename="productCode" cname="产品编码" width="100" enable="true" required="true" align="center" />
<EF:EFColumn ename="productName" cname="产品名称" width="100" enable="true" required="true" align="center" />
<EF:EFColumn ename="specification" cname="规格" width="70" enable="true" required="true" align="center"/>
<EF:EFColumn ename="unit" cname="单位" width="70" enable="true" required="true" align="center"/>
<EF:EFColumn ename="quantity" cname="数量" format="{0:N0}" maxLength="20" width="70" align="right"
required="true" readonly="true"/>
<EF:EFColumn ename="unitPrice" cname="单价" width="70" enable="true" required="true" align="center"/>
<EF:EFColumn ename="discount" cname="折扣" width="70" enable="true" required="true" align="center"/>
<EF:EFComboColumn ename="taxRate" cname="税率" width="120" required="true" align="center"
columnTemplate="#=textField#" itemTemplate="#=textField#" enable="true">
<EF:EFCodeOption codeName="hggp.cw.taxPoints"/>
</EF:EFComboColumn>
<EF:EFComboColumn ename="invoiceType" cname="票据类型" width="120" required="true" align="center"
columnTemplate="#=textField#" itemTemplate="#=textField#" enable="true">
<EF:EFCodeOption codeName="hggp.cw.billTybe"/>
</EF:EFComboColumn>
<EF:EFColumn ename="discountedPrice" cname="折后单价"
width="120" enable="false" 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="false"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFColumn ename="taxInclusivePrice" cname="含税单价"
width="120" enable="false" 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="false"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFColumn ename="taxInclusiveDiscountedPrice" cname="含税折后单价"
width="120" enable="false" 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="false"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFColumn ename="nonTaxAmount" cname="不含税金额"
width="120" enable="false" 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="false"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFColumn ename="taxAmount" cname="税额"
width="120" enable="false" 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="false"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFColumn ename="taxInclusiveAmount" cname="含税金额"
width="120" enable="false" 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="false"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
<script>
var ctx = "${ctx}";
</script>
$(function () {
IPLATUI.EFGrid.result = {
IPLATUI.EFGrid = {
"result": {
exportGrid: false, // 隐藏右侧自定义导出按钮
pageable: {
pageSize: 20,
pageSizes: [10, 20, 50, 70, 100],
pageSizes: [20, 100, 250, 500],
},
columns: [{
field: "operator",
......@@ -18,13 +20,6 @@ $(function () {
$("#ADD").on("click", add);
//删除
$("#REMOVE").on("click", remove);
},
onAdd: function (e) {
e.preventDefault();
},
onSuccess: function (e) {
if (e.eiInfo.extAttr.methodName == 'save' || e.eiInfo.extAttr.methodName == 'delete') {
query();
}
}
}
......
......@@ -6,18 +6,22 @@
<EF:EFPage title="项目管理">
<EF:EFRegion id="inqu" title="查询条件">
<div class="row">
<EF:EFInput ename="inqu_status-0-companyName" cname="公司名称" placeholder="模糊查询" colWidth="3"/>
<EF:EFInput ename="inqu_status-0-contractNo" cname="合同号" placeholder="模糊查询" colWidth="3"/>
<EF:EFInput ename="inqu_status-0-projName" cname="项目名称" placeholder="模糊查询" colWidth="3"/>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="no" isFloat="true" copyToAdd="false">
<EF:EFRegion id="result" title="记录集" fitHeight="true">
<EF:EFGrid blockId="result" autoDraw="override" showCount="true" height="74vh">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="100" align="center"/>
<EF:EFColumn ename="companyName" cname="公司名称" enable="false" width="120" align="left"/>
<EF:EFColumn ename="companyName" cname="公司名称" enable="false" width="120" align="left" hidden="true"/>
<EF:EFColumn ename="projCode" cname="项目编码" enable="false" width="120" align="left"/>
<EF:EFColumn ename="contractNo" cname="合同号" enable="false" width="120" align="left"/>
<EF:EFColumn ename="projName" cname="项目名称" enable="false" width="220" align="left"/>
<EF:EFComboColumn ename="projType" cname="项目类型" enable="false" width="100" align="center">
<EF:EFCodeOption codeName="app.sc.projType"/>
</EF:EFComboColumn>
<EF:EFColumn ename="createdBy" cname="创建人" enable="false" width="100" align="center"/>
<EF:EFColumn ename="createdTime" cname="创建时间" enable="false" width="140" align="center"
editType="datetime" parseFormats="['yyyyMMddHHmmss','yyyy-MM-dd HH:mm:ss']"/>
......
......@@ -39,8 +39,6 @@ let save = function () {
message(msg);
return;
}
JSUtils.confirm("确定\"保存\"操作? ", {
ok: function () {
JSUtils.submitGridsData("", "HGSC101A", "save", true,
function (e) {
if (e.getStatus() !== -1) {
......@@ -48,8 +46,6 @@ let save = function () {
}
}
);
}
});
}
/**
......@@ -60,9 +56,13 @@ let checkParams = function () {
if (isBlank(projName)) {
return "项目名称不能为空";
}
let companyCode = $("#result-0-companyCode").val();
let projType = $("#result-0-projType").val();
if (isBlank(projType)) {
return "项目类型不能为空";
}
/*let companyCode = $("#result-0-companyCode").val();
if (isBlank(companyCode)) {
return "请选择公司";
}
}*/
return null;
}
......@@ -11,10 +11,9 @@
<EF:EFInput cname="项目号" blockId="result" ename="projCode" row="0" colWidth="6" ratio="2:10" required="true"
readonly="true"/>
</div>
<div class="row">
<div class="row" style="display: none">
<EF:EFSelect cname="公司" blockId="result" ename="companyCode" row="0" colWidth="6" ratio="2:10"
filter="contains">
<EF:EFOption label="请选择" value=""/>
<EF:EFOptions blockId="company_code_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFInput cname="公司名称" blockId="result" ename="companyName" row="0" colWidth="6" ratio="2:10"
......@@ -24,6 +23,13 @@
<EF:EFInput cname="项目名称" blockId="result" ename="projName" row="0" colWidth="6" required="true"
ratio="2:10" maxLength="200"/>
</div>
<div class="row">
<EF:EFSelect cname="项目类型" blockId="result" ename="projType" row="0" colWidth="6" ratio="2:10"
filter="contains">
<EF:EFOption label="请选择" value=""/>
<EF:EFCodeOption codeName="app.sc.projType"/>
</EF:EFSelect>
</div>
<br/>
<span style="color: red; ">说明:项目号由系统自动生成</span><br>
</EF:EFRegion>
......
......@@ -243,7 +243,7 @@ let showAuthButton = function () {
let label = IPLATUI.EFTree.docTree.selectNode.treeId;
let leafType = IPLATUI.EFTree.docTree.selectNode.leafType;
// C:目录
if (!leafType && leafType != 'C') {
if (isBlank(leafType) || leafType != 'C') {
$("#AUTH").hide();
$("#REMOVE_USER").hide();
$("#COPY_USER").hide();
......
......@@ -24,7 +24,7 @@ $(function () {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="showUploadFile(' + item.id + ')" >附件清单</a>';
}
if (item.status==0 && item.id){
if (item.status == 0 && item.proApplyStatus == 1 && item.id) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' +
'onclick="approveFunc(' + item.id + ')" >返还</a>';
}
......
......@@ -55,7 +55,12 @@
<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:EFComboColumn ename="applyPersonnel" cname="申请人" columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField" defaultValue="${loginName}"
maxLength="16" width="130" readonly="false" required="true"
align="center" filter="contains" sort="true">
<EF:EFOptions blockId="user_block_id" textField="textField" valueField="valueField"/>
</EF:EFComboColumn>
<EF:EFColumn ename="licensePlateCode" cname="车牌号" enable="true" width="130" align="center" required="true"/>
<EF:EFColumn ename="driver" cname="司机" enable="true" width="130" align="center" required="true"/>
<EF:EFColumn ename="startTime" cname="开始时间" width="110" align="center" editType="date"
......
......@@ -99,18 +99,18 @@ let save = function (btnNode) {
flag = false;
return false;
}
let licensePlateCode= item.get("licensePlateCode");
if(isBlank(licensePlateCode)){
message("选中的第"+(index+1)+"行\"车牌号\",不能为空!");
flag = false;
return false;
}
let applyNo= item.get("applyNo");
if(isBlank(applyNo)){
message("选中的第"+(index+1)+"行\"保险单号\",不能为空!");
flag = false;
return false;
}
// let licensePlateCode= item.get("licensePlateCode");
// if(isBlank(licensePlateCode)){
// message("选中的第"+(index+1)+"行\"车牌号\",不能为空!");
// flag = false;
// return false;
// }
// let applyNo= item.get("applyNo");
// if(isBlank(applyNo)){
// message("选中的第"+(index+1)+"行\"保险单号\",不能为空!");
// flag = false;
// return false;
// }
});
if(flag) {
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"保存\"操作? ", {
......
......@@ -55,9 +55,13 @@
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="120" 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="true" width="130" align="center"/>
<EF:EFColumn ename="applyPersonnel" cname="申请人" enable="true" width="130" align="center" required="true"/>
<EF:EFColumn ename="licensePlateCode" cname="车牌号" enable="true" width="130" align="center" required="true"/>
<EF:EFComboColumn ename="applyPersonnel" cname="申请人" columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField" defaultValue="${loginName}"
maxLength="16" width="130" readonly="false" required="true"
align="center" filter="contains" sort="true">
<EF:EFOptions blockId="user_block_id" textField="textField" valueField="valueField"/>
</EF:EFComboColumn>
<EF:EFColumn ename="insuranceCompany" cname="保险公司" enable="true" width="130" align="center" required="true"/>
<EF:EFComboColumn ename="applyStatus" cname="申请状态" width="80" align="center" enable="false" defaultValue="0">
<EF:EFCodeOption codeName="hggp.hgxt.proApplyStatus"/>
</EF:EFComboColumn>
......
......@@ -103,12 +103,12 @@ let save = function (btnNode) {
flag = false;
return false;
}
let insuranceCompany= item.get("insuranceCompany");
if(isBlank(insuranceCompany)){
message("选中的第"+(index+1)+"行\"保险公司\",不能为空!");
flag = false;
return false;
}
// let insuranceCompany= item.get("insuranceCompany");
// if(isBlank(insuranceCompany)){
// message("选中的第"+(index+1)+"行\"保险公司\",不能为空!");
// flag = false;
// return false;
// }
let insuranceAmount= item.get("insuranceAmount");
if(isBlank(insuranceAmount)){
......@@ -119,7 +119,7 @@ let save = function (btnNode) {
let insuranceStartDate= item.get("insuranceStartDate");
let insuranceEndDate= item.get("insuranceEndDate");
if (new Date(insuranceStartDate) > new Date(insuranceEndDate)){
message("投保时间\"不能大于\"\"结束时间\"!");
message("投保开始时间\"不能大于\"\"结束时间\"!");
flag = false;
return false;
}
......
......@@ -55,7 +55,6 @@
<%-- <EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="80" align="center"/>--%>
<EF:EFColumn ename="licensePlateCode" cname="车牌号" enable="true" width="130" align="center" required="true"/>
<EF:EFColumn ename="insuranceType" cname="车险险种" enable="true" width="130" align="center" required="true"/>
<EF:EFColumn ename="insuranceCompany" cname="保险公司" enable="true" width="130" align="center" required="true"/>
<EF:EFColumn ename="insuranceAmount" cname="保险金额(元)" width="80" align="right" format="{0:N3}"
data-regex="/^-?[0-9]{1,12}([.][0-9]{1,3})?$/"
data-errorprompt="请输入数字,该值最大可设置12位整数和3位小数!" required="true"/>
......
......@@ -24,10 +24,10 @@ $(function () {
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>';
}
// 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;
}
}, {
......
......@@ -30,7 +30,12 @@
<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:EFComboColumn ename="applyPersonnel" cname="申请人" columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField" defaultValue="${loginName}"
maxLength="16" width="130" readonly="false" required="true"
align="center" filter="contains" sort="true">
<EF:EFOptions blockId="user_block_id" textField="textField" valueField="valueField"/>
</EF:EFComboColumn>
<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">
......@@ -39,18 +44,18 @@
<EF:EFComboColumn ename="importanceLevel" cname="重要程度" width="130" align="center" enable="true" required="true">
<EF:EFCodeOption codeName="hggp.hgxt.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:EFColumn ename="startTime" cname="开始时间" parseFormats="['yyyyMMddHHmmss']" align="center" editType="datetime"
dateFormat="yyyy-MM-dd HH:mm:ss" width="140" required="true"/>
<EF:EFColumn ename="endTime" cname="结束时间" parseFormats="['yyyyMMddHHmmss']" align="center" editType="datetime"
dateFormat="yyyy-MM-dd HH:mm:ss" width="140" required="true"/>
<EF:EFComboColumn ename="proApplyStatus" cname="提交状态" width="80" align="center" enable="false" defaultValue="0">
<EF:EFCodeOption codeName="hggp.hgxt.proApplyStatus"/>
</EF:EFComboColumn>
<EF:EFComboColumn ename="status" cname="返还状态" width="80" align="center"
textField="textField" valueField="valueField" readonly="true" defaultValue="0">
<EF:EFOption label="未返还" value="0"/>
<EF:EFOption label="已返还" value="1"/>
</EF:EFComboColumn>
<%-- <EF:EFComboColumn ename="status" cname="返还状态" width="80" align="center"--%>
<%-- textField="textField" valueField="valueField" readonly="true" defaultValue="0">--%>
<%-- <EF:EFOption label="未返还" value="0"/>--%>
<%-- <EF:EFOption label="已返还" value="1"/>--%>
<%-- </EF:EFComboColumn>--%>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
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