Commit 84aba567 by liuyang

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

parents 27366746 b6fa0187
...@@ -19,6 +19,7 @@ import com.baosight.iplat4j.core.resource.I18nMessages; ...@@ -19,6 +19,7 @@ import com.baosight.iplat4j.core.resource.I18nMessages;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase; import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import com.baosight.iplat4j.ed.util.SequenceGenerator; import com.baosight.iplat4j.ed.util.SequenceGenerator;
import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -35,7 +36,9 @@ public class ServiceHPCG004 extends ServiceEPBase { ...@@ -35,7 +36,9 @@ public class ServiceHPCG004 extends ServiceEPBase {
try { try {
CommonMethod.initBlock(inInfo, Arrays.asList( CommonMethod.initBlock(inInfo, Arrays.asList(
DdynamicEnum.SUPPLIER_RECORD_BLOCK_ID), null, false); DdynamicEnum.SUPPLIER_RECORD_BLOCK_ID,
DdynamicEnum.USER_BLOCK_ID), null, false);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPCG004().eiMetadata);
} catch (Exception e) { } catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败"); LogUtils.setDetailMsg(inInfo, e, "初始化失败");
} }
...@@ -87,6 +90,7 @@ public class ServiceHPCG004 extends ServiceEPBase { ...@@ -87,6 +90,7 @@ public class ServiceHPCG004 extends ServiceEPBase {
try { try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows(); List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
// 写入数据 // 写入数据
List<HPCG004> list = new ArrayList<>();
for (Map resultRow : resultRows) { for (Map resultRow : resultRows) {
HPCG004 hpcg004 = new HPCG004(); HPCG004 hpcg004 = new HPCG004();
hpcg004.fromMap(resultRow); hpcg004.fromMap(resultRow);
...@@ -96,7 +100,9 @@ public class ServiceHPCG004 extends ServiceEPBase { ...@@ -96,7 +100,9 @@ public class ServiceHPCG004 extends ServiceEPBase {
} else { } else {
this.modify(hpcg004); this.modify(hpcg004);
} }
list.add(hpcg004);
} }
inInfo.getBlock(EiConstant.resultBlock).setRows(list);
inInfo.setStatus(EiConstant.STATUS_DEFAULT); inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据保存成功!"); inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据保存成功!");
} catch (Exception e) { } catch (Exception e) {
......
...@@ -19,6 +19,7 @@ import com.baosight.iplat4j.core.resource.I18nMessages; ...@@ -19,6 +19,7 @@ import com.baosight.iplat4j.core.resource.I18nMessages;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase; import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import com.baosight.iplat4j.ed.util.SequenceGenerator; import com.baosight.iplat4j.ed.util.SequenceGenerator;
import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -79,6 +80,7 @@ public class ServiceHPCG004A extends ServiceEPBase { ...@@ -79,6 +80,7 @@ public class ServiceHPCG004A extends ServiceEPBase {
try { try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows(); List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
// 写入数据 // 写入数据
List<HPCG004A> list = new ArrayList<>();
for (Map resultRow : resultRows) { for (Map resultRow : resultRows) {
HPCG004A hpcg004a = new HPCG004A(); HPCG004A hpcg004a = new HPCG004A();
hpcg004a.fromMap(resultRow); hpcg004a.fromMap(resultRow);
...@@ -89,7 +91,9 @@ public class ServiceHPCG004A extends ServiceEPBase { ...@@ -89,7 +91,9 @@ public class ServiceHPCG004A extends ServiceEPBase {
} else { } else {
this.modify(hpcg004a); this.modify(hpcg004a);
} }
list.add(hpcg004a);
} }
inInfo.getBlock(EiConstant.resultBlock).setRows(list);
inInfo.setStatus(EiConstant.STATUS_DEFAULT); inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据保存成功!"); inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据保存成功!");
} catch (Exception e) { } catch (Exception e) {
......
...@@ -187,6 +187,9 @@ ...@@ -187,6 +187,9 @@
PRO_APPLY_STATUS <!-- 申请状态 --> PRO_APPLY_STATUS <!-- 申请状态 -->
) )
VALUES (#id#, #companyCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #inquiryDate#, #inquiryNumber#, #supplierName#, #inquiryType#, #inquiryPerson#, #deleteFlag#, #proApplyStatus#) VALUES (#id#, #companyCode#, #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 ${hpjxSchema}.T_HPCG004
</selectKey>
</insert> </insert>
<delete id="delete"> <delete id="delete">
......
...@@ -286,6 +286,9 @@ ...@@ -286,6 +286,9 @@
T_HPJG004_ID T_HPJG004_ID
) )
VALUES (#id#, #companyCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #productCode#, #productName#, #specification#, #unit#, #quantity#, #unitPrice#, #taxRate#, #invoiceType#, #discount#, #discountedPrice#, #taxInclusivePrice#, #taxInclusiveDiscountedPrice#, #nonTaxAmount#, #taxAmount#, #taxInclusiveAmount#, #deliveryDate#, #minPurchaseQuantity#, #deleteFlag#, #tHpjg004Id#) VALUES (#id#, #companyCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #productCode#, #productName#, #specification#, #unit#, #quantity#, #unitPrice#, #taxRate#, #invoiceType#, #discount#, #discountedPrice#, #taxInclusivePrice#, #taxInclusiveDiscountedPrice#, #nonTaxAmount#, #taxAmount#, #taxInclusiveAmount#, #deliveryDate#, #minPurchaseQuantity#, #deleteFlag#, #tHpjg004Id#)
<selectKey resultClass="java.lang.Long" keyProperty="id">
SELECT MAX(ID) as "id" FROM ${hpjxSchema}.T_HPCG004A
</selectKey>
</insert> </insert>
<delete id="delete"> <delete id="delete">
......
package com.baosight.hpjx.hp.ct.constant;
/**
* @author:songx
* @date:2024/9/24,17:53
*/
public class HpCtConst {
/**
* HPCT01 定义
*
* @author:songx
* @date:2024/9/24,17:54
*/
public static class HpCt001 {
/**
* 状态
*
* @author:songx
* @date:2024/5/15,15:18
*/
public static class Status {
// 未关闭
public static final String OPEN = "open";
// 已关闭
public static final String CLOSE = "close";
}
}
}
package com.baosight.hpjx.hp.ct.constant;
/**
* @author:songx
* @date:2024/9/24,18:09
*/
public class HpCtSqlConst {
/**
* @author:songx
* @date:2024/8/29,15:54
*/
public static class HpCt001 {
// 确认
public static final String CONFIRM = "HPCT001.confirm";
}
}
package com.baosight.hpjx.hp.ct.service;
import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.hp.ct.constant.HpCtConst;
import com.baosight.hpjx.hp.ct.constant.HpCtSqlConst;
import com.baosight.hpjx.hp.ct.domain.HPCT001;
import com.baosight.hpjx.hp.ct.tools.HpCtTools;
import com.baosight.hpjx.util.DateUtils;
import com.baosight.hpjx.util.EiInfoUtils;
import com.baosight.hpjx.util.LogUtils;
import com.baosight.hpjx.util.MapUtils;
import com.baosight.hpjx.util.ObjectUtils;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import com.baosight.iplat4j.core.web.threadlocal.UserSession;
import org.apache.commons.collections.CollectionUtils;
import java.util.List;
import java.util.Map;
/**
* 通知信息
*
* @author:songx
* @date:2021/10/15,16:46
*/
public class ServiceHPCT001 extends ServiceEPBase {
/**
* 页面加载调用.
*
* @param inInfo
*/
public EiInfo initLoad(EiInfo inInfo) {
try {
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPCT001().eiMetadata);
} catch (Exception e) {
LogUtils.setMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
/**
* 页面查询调用入口.
*
* @param inInfo
*/
public EiInfo query(EiInfo inInfo) {
try {
Map queryMap = EiInfoUtils.getFirstRow(inInfo);
// 只看自己的通知
queryMap.put(HPCT001.FIELD_USER_ENAME, UserSession.getLoginName());
inInfo = super.query(inInfo, HPCT001.QUERY);
} catch (Exception e) {
LogUtils.setMsg(inInfo, e, "查询失败");
}
return inInfo;
}
/**
* 查询待办
*
* @param inInfo
* @return
*/
public EiInfo queryTodo(EiInfo inInfo) {
try {
Map queryMap = EiInfoUtils.getFirstRow(inInfo);
queryMap.put(HPCT001.FIELD_STATUS, HpCtConst.HpCt001.Status.OPEN);
queryMap.put(HPCT001.FIELD_USER_ENAME, UserSession.getLoginName());
inInfo = super.query(inInfo, HPCT001.QUERY, new HPCT001());
// 查询总数量
List<Integer> counts = dao.query(HPCT001.COUNT, queryMap);
inInfo.set(EiConstant.countStr, CollectionUtils.isEmpty(counts) ? 0 : counts.get(0));
} catch (Exception e) {
LogUtils.setMsg(inInfo, e, "查询待办信息");
}
return inInfo;
}
/**
* 查询已办
*
* @param inInfo
* @return
*/
public EiInfo queryRecord(EiInfo inInfo) {
try {
Map queryMap = EiInfoUtils.getFirstRow(inInfo);
queryMap.put(HPCT001.FIELD_STATUS, HpCtConst.HpCt001.Status.CLOSE);
queryMap.put(HPCT001.FIELD_USER_ENAME, UserSession.getLoginName());
inInfo = super.query(inInfo, HPCT001.QUERY, new HPCT001());
// 查询总数量
List<Integer> counts = dao.query(HPCT001.COUNT, queryMap);
inInfo.set(EiConstant.countStr, CollectionUtils.isEmpty(counts) ? 0 : counts.get(0));
} catch (Exception e) {
LogUtils.setMsg(inInfo, e, "查询已办信息");
}
return inInfo;
}
/**
* 已读
*
* @param inInfo
* @return
*/
public EiInfo confirm(EiInfo inInfo) {
try {
Map resultRow = EiInfoUtils.getFirstRow(inInfo, EiConstant.resultBlock);
if (ObjectUtils.isEmpty(resultRow.get(HPCT001.FIELD_INTERNAL_CODE))) {
inInfo.setMsg("无效的待办消息");
return inInfo;
}
resultRow.put(HPCT001.FIELD_STATUS, HpCtConst.HpCt001.Status.CLOSE);
resultRow.put(HPCT001.FIELD_CLOSE_TIME, DateUtils.shortDateTime());
DaoUtils.update(HpCtSqlConst.HpCt001.CONFIRM, resultRow);
} catch (Exception e) {
LogUtils.setMsg(inInfo, e, "确认已办失败");
}
return inInfo;
}
/**
* 批量已读
*
* @param inInfo
* @return
*/
public EiInfo batchConfirm(EiInfo inInfo) {
try {
int successCount = 0;
List<HPCT001> fCt01s = MapUtils.toDaoEPBases(inInfo, HPCT001.class);
for (HPCT001 fCt01 : fCt01s) {
int result = HpCtTools.HpCt001.confirm(fCt01.getInternalCode());
successCount += result;
}
inInfo = this.query(inInfo);
inInfo.setMsg("操作成功!本次对[" + successCount + "]条数据确认已办成功!");
} catch (Exception e) {
LogUtils.setMsg(inInfo, e, "已办失败");
}
return inInfo;
}
}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://www.ibatis.com/dtd/sql-map-2.dtd">
<sqlMap namespace="HPCT001">
<sql id="column">
ID as "id", <!-- 主键id -->
CREATED_BY as "createdBy", <!-- 记录创建者 -->
CREATED_NAME as "createdName", <!-- 记录创建名称 -->
CREATED_TIME as "createdTime", <!-- 记录创建时间 -->
UPDATED_BY as "updatedBy", <!-- 记录修改者 -->
UPDATED_NAME as "updatedName", <!-- 记录修改名称 -->
UPDATED_TIME as "updatedTime", <!-- 记录修改时间 -->
DELETE_FLAG as "deleteFlag", <!-- 0-未删除,1-已删除 -->
STATUS as "status", <!-- 状态 -->
INTERNAL_CODE as "internalCode", <!-- 内码 -->
TITLE as "title", <!-- 标题 -->
CONTENT as "content", <!-- 内容 -->
USER_ENAME as "userEname", <!-- 用户ID -->
USER_CNAME as "userCname", <!-- 用户姓名 -->
FORM_ENAME as "formEname", <!-- 画面英文名 -->
FORM_PARAM as "formParam", <!-- 画面参数 -->
CLOSE_TIME as "closeTime" <!-- 关闭时间 -->
</sql>
<sql id="condition">
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</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="deleteFlag">
DELETE_FLAG = #deleteFlag#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="status">
STATUS = #status#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="internalCode">
INTERNAL_CODE = #internalCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="title">
TITLE = #title#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="content">
CONTENT = #content#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="userEname">
USER_ENAME = #userEname#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="userCname">
USER_CNAME = #userCname#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="formEname">
FORM_ENAME = #formEname#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="formParam">
FORM_PARAM = #formParam#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="closeTime">
CLOSE_TIME = #closeTime#
</isNotEmpty>
</sql>
<sql id="customCondition">
<include refid="condition"/>
<isNotEmpty prepend=" AND " property="createTimeFrom">
CREATED_TIME &gt;= REPLACE(REPLACE(REPLACE(#createTimeFrom#, '-', ''), ':', ''), ' ', '')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createTimeTo">
CREATED_TIME &lt;= REPLACE(REPLACE(REPLACE(#createTimeTo#, '-', ''), ':', ''), ' ', '')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="closeTimeFrom">
CLOSE_TIME &gt;= REPLACE(REPLACE(REPLACE(#closeTimeFrom#, '-', ''), ':', ''), ' ', '')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="closeTimeTo">
CLOSE_TIME &lt;= REPLACE(REPLACE(REPLACE(#closeTimeTo#, '-', ''), ':', ''), ' ', '')
</isNotEmpty>
</sql>
<sql id="orderBy">
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
STATUS ASC, CREATED_TIME DESC
</isEmpty>
</dynamic>
</sql>
<select id="query" resultClass="com.baosight.hpjx.hp.ct.domain.HPCT001">
SELECT
<include refid="column"/>
FROM ${hpjxSchema}.T_HPCT001 WHERE 1=1
<include refid="customCondition"/>
<include refid="orderBy"/>
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hpjxSchema}.T_HPCT001 WHERE 1=1
<include refid="customCondition"/>
</select>
<insert id="insert">
INSERT INTO ${hpjxSchema}.T_HPCT001 (
CREATED_BY, <!-- 记录创建者 -->
CREATED_NAME, <!-- 记录创建名称 -->
CREATED_TIME, <!-- 记录创建时间 -->
UPDATED_BY, <!-- 记录修改者 -->
UPDATED_NAME, <!-- 记录修改名称 -->
UPDATED_TIME, <!-- 记录修改时间 -->
DELETE_FLAG, <!-- 0-未删除,1-已删除 -->
STATUS, <!-- 状态 -->
INTERNAL_CODE, <!-- 内码 -->
TITLE, <!-- 标题 -->
CONTENT, <!-- 内容 -->
USER_ENAME, <!-- 用户ID -->
USER_CNAME, <!-- 用户姓名 -->
FORM_ENAME, <!-- 画面英文名 -->
FORM_PARAM, <!-- 画面参数 -->
CLOSE_TIME <!-- 关闭时间 -->
) VALUES (
#createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#,
#deleteFlag#, #status#, #internalCode#, #title#, #content#, #userEname#, #userCname#,
#formEname#, #formParam#, #closeTime#)
</insert>
<!-- 确认 -->
<update id="confirm">
UPDATE ${hggpSchema}.T_HPCT001
SET
STATUS = #status#,
CLOSE_TIME = #closeTime#,
<include refid="SqlBase.updateRevise"/>
WHERE INTERNAL_CODE = #internalCode#
AND STATUS = 'open'
</update>
</sqlMap>
package com.baosight.hpjx.hp.ct.tools;
import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.hp.ct.constant.HpCtConst;
import com.baosight.hpjx.hp.ct.constant.HpCtSqlConst;
import com.baosight.hpjx.hp.ct.domain.HPCT001;
import com.baosight.hpjx.util.DateUtils;
import com.baosight.hpjx.util.StringUtils;
import java.util.HashMap;
import java.util.Map;
/**
* @author:songx
* @date:2024/3/25,20:44
*/
public class HpCtTools {
/**
* HPCT001 sql 定义
*
* @author:songx
* @date:2024/3/25,21:04
*/
public static class HpCt001 {
/**
* 写入数据库
*
* @param ct00
*/
public static void insertDb(HPCT001 ct00) {
ct00.setStatus(HpCtConst.HpCt001.Status.OPEN);
DaoUtils.insert(HPCT001.INSERT, ct00);
}
/**
* 确认已办
*
* @param internalCode
*/
public static int confirm(String internalCode) {
if (StringUtils.isBlank(internalCode)) {
return 0;
}
Map paramMap = new HashMap();
paramMap.put(HPCT001.FIELD_INTERNAL_CODE, internalCode);
paramMap.put(HPCT001.FIELD_STATUS, HpCtConst.HpCt001.Status.CLOSE);
paramMap.put(HPCT001.FIELD_CLOSE_TIME, DateUtils.shortDateTime());
return DaoUtils.update(HpCtSqlConst.HpCt001.CONFIRM, paramMap);
}
}
}
package com.baosight.hpjx.hp.ct.utils;
import com.baosight.hpjx.hp.ct.domain.HPCT001;
import com.baosight.hpjx.hp.ct.tools.HpCtTools;
import com.baosight.hpjx.hp.xs.domain.User;
import com.baosight.hpjx.hp.xs.tools.HPXSTools;
import com.baosight.hpjx.util.AssertUtils;
import java.util.List;
import lombok.extern.slf4j.Slf4j;
/**
* @author:songx
* @date:2024/3/25,20:45
*/
@Slf4j
public class HpCtUtils {
/**
* @author:songx
* @date:2024/10/8,17:20
*/
public static class HpCt001 {
/**
* 发送通知
*
* @param ct00 消息体
*/
public static void send(HPCT001 ct00) {
AssertUtils.isNull(ct00, "待办内容不能为空");
AssertUtils.isEmpty(ct00.getTitle(), "待办标题不能为空");
AssertUtils.isEmpty(ct00.getContent(), "待办内容不能为空");
AssertUtils.isEmpty(ct00.getUserEname(), "待办对象不能为空");
// 设置通知对象名称
User user = HPXSTools.XsUser.get(ct00.getUserEname());
ct00.setUserCname(user.getUserName());
HpCtTools.HpCt001.insertDb(ct00);
}
/**
* 发送通知
*
* @param ct00 消息体
* @param loginNames loginNames
*/
public static void send(HPCT001 ct00, List<String> loginNames) {
AssertUtils.isNull(ct00, "待办内容不能为空");
AssertUtils.isEmpty(ct00.getTitle(), "待办标题不能为空");
AssertUtils.isEmpty(ct00.getContent(), "待办内容不能为空");
AssertUtils.isEmpty(loginNames, "待办对象不能为空");
try {
for (String loginName : loginNames) {
User user = HPXSTools.XsUser.get(loginName);
ct00.setUserCname(user.getUserName());
ct00.setUserEname(user.getLoginName());
HpCtTools.HpCt001.insertDb(ct00);
}
} catch (Exception e) {
log.error("发送通知消息失败:{}", e.getMessage(), e);
}
}
}
}
...@@ -36,6 +36,7 @@ public class HPXT002 extends DaoEPBase { ...@@ -36,6 +36,7 @@ public class HPXT002 extends DaoEPBase {
public static final String FIELD_LICENSE_PLATE_CODE = "licensePlateCode"; /* 车牌号*/ public static final String FIELD_LICENSE_PLATE_CODE = "licensePlateCode"; /* 车牌号*/
public static final String FIELD_DELETE_FLAG = "deleteFlag"; /* 是否删除0.否1.是*/ public static final String FIELD_DELETE_FLAG = "deleteFlag"; /* 是否删除0.否1.是*/
public static final String FIELD_APPLY_STATUS = "applyStatus"; /* 申请状态*/ 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_ID = "ID"; /* 主键id*/
public static final String COL_COMPANY_CODE = "COMPANY_CODE"; /* 企业编码 预留*/ public static final String COL_COMPANY_CODE = "COMPANY_CODE"; /* 企业编码 预留*/
...@@ -52,6 +53,7 @@ public class HPXT002 extends DaoEPBase { ...@@ -52,6 +53,7 @@ public class HPXT002 extends DaoEPBase {
public static final String COL_LICENSE_PLATE_CODE = "LICENSE_PLATE_CODE"; /* 车牌号*/ 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_DELETE_FLAG = "DELETE_FLAG"; /* 是否删除0.否1.是*/
public static final String COL_APPLY_STATUS = "APPLY_STATUS"; /* 申请状态*/ public static final String COL_APPLY_STATUS = "APPLY_STATUS"; /* 申请状态*/
public static final String COL_INSURANCE_COMPANY = "INSURANCE_COMPANY";
public static final String QUERY = "HPXT002.query"; public static final String QUERY = "HPXT002.query";
public static final String COUNT = "HPXT002.count"; public static final String COUNT = "HPXT002.count";
...@@ -59,6 +61,8 @@ public class HPXT002 extends DaoEPBase { ...@@ -59,6 +61,8 @@ public class HPXT002 extends DaoEPBase {
public static final String UPDATE = "HPXT002.update"; public static final String UPDATE = "HPXT002.update";
public static final String DELETE = "HPXT002.delete"; public static final String DELETE = "HPXT002.delete";
public static final String DELETE_FLAG = "HPXT002.deleteFlag"; public static final String DELETE_FLAG = "HPXT002.deleteFlag";
public static final String UPDATE_PRO_APPLY_STATUS = "HPXT002.updateProApplyStatus";
private Long id = new Long(0); /* 主键id*/ private Long id = new Long(0); /* 主键id*/
private String companyCode = " "; /* 企业编码 预留*/ private String companyCode = " "; /* 企业编码 预留*/
...@@ -75,6 +79,7 @@ public class HPXT002 extends DaoEPBase { ...@@ -75,6 +79,7 @@ public class HPXT002 extends DaoEPBase {
private String licensePlateCode = " "; /* 车牌号*/ private String licensePlateCode = " "; /* 车牌号*/
private Integer deleteFlag = 0; /* 是否删除0.否1.是*/ private Integer deleteFlag = 0; /* 是否删除0.否1.是*/
private Integer applyStatus = 0; /* 申请状态*/ private Integer applyStatus = 0; /* 申请状态*/
private String insuranceCompany = " "; /* 保险公司*/
/** /**
* initialize the metadata. * initialize the metadata.
...@@ -143,6 +148,10 @@ public class HPXT002 extends DaoEPBase { ...@@ -143,6 +148,10 @@ public class HPXT002 extends DaoEPBase {
eiColumn.setDescName("申请状态"); eiColumn.setDescName("申请状态");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_INSURANCE_COMPANY);
eiColumn.setDescName("保险公司");
eiMetadata.addMeta(eiColumn);
} }
...@@ -393,6 +402,15 @@ public class HPXT002 extends DaoEPBase { ...@@ -393,6 +402,15 @@ public class HPXT002 extends DaoEPBase {
public void setApplyStatus(Integer applyStatus) { public void setApplyStatus(Integer applyStatus) {
this.applyStatus = applyStatus; this.applyStatus = applyStatus;
} }
public String getInsuranceCompany() {
return insuranceCompany;
}
public void setInsuranceCompany(String insuranceCompany) {
this.insuranceCompany = insuranceCompany;
}
/** /**
* get the value from Map. * get the value from Map.
* *
...@@ -416,6 +434,7 @@ public class HPXT002 extends DaoEPBase { ...@@ -416,6 +434,7 @@ public class HPXT002 extends DaoEPBase {
setLicensePlateCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_LICENSE_PLATE_CODE)), licensePlateCode)); setLicensePlateCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_LICENSE_PLATE_CODE)), licensePlateCode));
setDeleteFlag(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_DELETE_FLAG)), deleteFlag)); setDeleteFlag(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_DELETE_FLAG)), deleteFlag));
setApplyStatus(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_APPLY_STATUS)), applyStatus)); setApplyStatus(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_APPLY_STATUS)), applyStatus));
setInsuranceCompany(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_INSURANCE_COMPANY)), insuranceCompany));
} }
/** /**
...@@ -440,6 +459,7 @@ public class HPXT002 extends DaoEPBase { ...@@ -440,6 +459,7 @@ public class HPXT002 extends DaoEPBase {
map.put(FIELD_LICENSE_PLATE_CODE, StringUtils.toString(licensePlateCode, eiMetadata.getMeta(FIELD_LICENSE_PLATE_CODE))); 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_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_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; return map;
} }
......
...@@ -2,8 +2,10 @@ package com.baosight.hpjx.hp.xt.service; ...@@ -2,8 +2,10 @@ package com.baosight.hpjx.hp.xt.service;
import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation; import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation;
import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.core.constant.CommonConstant; import com.baosight.hpjx.core.constant.CommonConstant;
import com.baosight.hpjx.core.dao.DaoUtils; import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.hp.bg.domain.HPBG002;
import com.baosight.hpjx.hp.constant.HPConstant; import com.baosight.hpjx.hp.constant.HPConstant;
import com.baosight.hpjx.hp.xt.domain.HPXT001; import com.baosight.hpjx.hp.xt.domain.HPXT001;
import com.baosight.hpjx.util.*; import com.baosight.hpjx.util.*;
...@@ -20,10 +22,7 @@ import org.apache.commons.collections.CollectionUtils; ...@@ -20,10 +22,7 @@ import org.apache.commons.collections.CollectionUtils;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.math.RoundingMode; import java.math.RoundingMode;
import java.util.Arrays; import java.util.*;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors; import java.util.stream.Collectors;
/** /**
...@@ -35,7 +34,14 @@ public class ServiceHPXT001 extends ServiceEPBase { ...@@ -35,7 +34,14 @@ public class ServiceHPXT001 extends ServiceEPBase {
@Override @Override
public EiInfo initLoad(EiInfo inInfo) { public EiInfo initLoad(EiInfo inInfo) {
try {
CommonMethod.initBlock(inInfo, Arrays.asList(
DdynamicEnum.USER_BLOCK_ID
), null, false);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPXT001().eiMetadata);
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo; return inInfo;
} }
...@@ -83,6 +89,7 @@ public class ServiceHPXT001 extends ServiceEPBase { ...@@ -83,6 +89,7 @@ public class ServiceHPXT001 extends ServiceEPBase {
try { try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows(); List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
// 写入数据 // 写入数据
List<HPXT001> list = new ArrayList<>();
for (Map resultRow : resultRows) { for (Map resultRow : resultRows) {
HPXT001 hpxt001 = new HPXT001(); HPXT001 hpxt001 = new HPXT001();
hpxt001.fromMap(resultRow); hpxt001.fromMap(resultRow);
...@@ -91,7 +98,9 @@ public class ServiceHPXT001 extends ServiceEPBase { ...@@ -91,7 +98,9 @@ public class ServiceHPXT001 extends ServiceEPBase {
} else { } else {
this.modify(hpxt001); this.modify(hpxt001);
} }
list.add(hpxt001);
} }
inInfo.getBlock(EiConstant.resultBlock).setRows(list);
inInfo.setStatus(EiConstant.STATUS_DEFAULT); inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据保存成功!"); inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据保存成功!");
} catch (Exception e) { } catch (Exception e) {
......
package com.baosight.hpjx.hp.xt.service; package com.baosight.hpjx.hp.xt.service;
import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation; import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation;
import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.core.constant.CommonConstant; import com.baosight.hpjx.core.constant.CommonConstant;
import com.baosight.hpjx.core.dao.DaoUtils; import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.hp.xt.domain.HPXT001;
import com.baosight.hpjx.hp.xt.domain.HPXT002; import com.baosight.hpjx.hp.xt.domain.HPXT002;
import com.baosight.hpjx.util.CommonMethod;
import com.baosight.hpjx.util.ErrorCodeUtils; import com.baosight.hpjx.util.ErrorCodeUtils;
import com.baosight.hpjx.util.LogUtils; import com.baosight.hpjx.util.LogUtils;
import com.baosight.hpjx.util.StringUtil; import com.baosight.hpjx.util.StringUtil;
...@@ -15,6 +18,8 @@ import com.baosight.iplat4j.core.exception.PlatException; ...@@ -15,6 +18,8 @@ import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.resource.I18nMessages; import com.baosight.iplat4j.core.resource.I18nMessages;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase; import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -27,7 +32,14 @@ public class ServiceHPXT002 extends ServiceEPBase { ...@@ -27,7 +32,14 @@ public class ServiceHPXT002 extends ServiceEPBase {
@Override @Override
public EiInfo initLoad(EiInfo inInfo) { public EiInfo initLoad(EiInfo inInfo) {
try {
CommonMethod.initBlock(inInfo, Arrays.asList(
DdynamicEnum.USER_BLOCK_ID
), null, false);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPXT002().eiMetadata);
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo; return inInfo;
} }
...@@ -75,6 +87,7 @@ public class ServiceHPXT002 extends ServiceEPBase { ...@@ -75,6 +87,7 @@ public class ServiceHPXT002 extends ServiceEPBase {
try { try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows(); List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
// 写入数据 // 写入数据
List<HPXT002> list = new ArrayList<>();
for (Map resultRow : resultRows) { for (Map resultRow : resultRows) {
HPXT002 hpxt002 = new HPXT002(); HPXT002 hpxt002 = new HPXT002();
hpxt002.fromMap(resultRow); hpxt002.fromMap(resultRow);
...@@ -83,7 +96,9 @@ public class ServiceHPXT002 extends ServiceEPBase { ...@@ -83,7 +96,9 @@ public class ServiceHPXT002 extends ServiceEPBase {
} else { } else {
this.modify(hpxt002); this.modify(hpxt002);
} }
list.add(hpxt002);
} }
inInfo.getBlock(EiConstant.resultBlock).setRows(list);
inInfo.setStatus(EiConstant.STATUS_DEFAULT); inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据保存成功!"); inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据保存成功!");
} catch (Exception e) { } catch (Exception e) {
...@@ -119,4 +134,29 @@ public class ServiceHPXT002 extends ServiceEPBase { ...@@ -119,4 +134,29 @@ public class ServiceHPXT002 extends ServiceEPBase {
DaoUtils.update(HPXT002.UPDATE, hpxt002); DaoUtils.update(HPXT002.UPDATE, hpxt002);
} }
@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) {
HPXT002 hpxt002 = new HPXT002();
hpxt002.fromMap(resultRow);
hpxt002.setApplyStatus(CommonConstant.YesNo.YES_1);
DaoUtils.update(HPXT002.UPDATE_PRO_APPLY_STATUS,hpxt002);
}
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;
}
} }
...@@ -3,6 +3,7 @@ package com.baosight.hpjx.hp.xt.service; ...@@ -3,6 +3,7 @@ package com.baosight.hpjx.hp.xt.service;
import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation; import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation;
import com.baosight.hpjx.core.constant.CommonConstant; import com.baosight.hpjx.core.constant.CommonConstant;
import com.baosight.hpjx.core.dao.DaoUtils; import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.hp.xt.domain.HPXT002;
import com.baosight.hpjx.hp.xt.domain.HPXT002A; import com.baosight.hpjx.hp.xt.domain.HPXT002A;
import com.baosight.hpjx.util.ErrorCodeUtils; import com.baosight.hpjx.util.ErrorCodeUtils;
import com.baosight.hpjx.util.LogUtils; import com.baosight.hpjx.util.LogUtils;
...@@ -15,6 +16,7 @@ import com.baosight.iplat4j.core.exception.PlatException; ...@@ -15,6 +16,7 @@ import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.resource.I18nMessages; import com.baosight.iplat4j.core.resource.I18nMessages;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase; import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -75,6 +77,7 @@ public class ServiceHPXT002A extends ServiceEPBase { ...@@ -75,6 +77,7 @@ public class ServiceHPXT002A extends ServiceEPBase {
try { try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows(); List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
// 写入数据 // 写入数据
List<HPXT002A> list = new ArrayList<>();
for (Map resultRow : resultRows) { for (Map resultRow : resultRows) {
HPXT002A hpxt002A = new HPXT002A(); HPXT002A hpxt002A = new HPXT002A();
hpxt002A.fromMap(resultRow); hpxt002A.fromMap(resultRow);
...@@ -85,7 +88,9 @@ public class ServiceHPXT002A extends ServiceEPBase { ...@@ -85,7 +88,9 @@ public class ServiceHPXT002A extends ServiceEPBase {
} else { } else {
this.modify(hpxt002A); this.modify(hpxt002A);
} }
list.add(hpxt002A);
} }
inInfo.getBlock(EiConstant.resultBlock).setRows(list);
inInfo.setStatus(EiConstant.STATUS_DEFAULT); inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据保存成功!"); inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据保存成功!");
} catch (Exception e) { } catch (Exception e) {
......
...@@ -17,6 +17,7 @@ import com.baosight.iplat4j.core.resource.I18nMessages; ...@@ -17,6 +17,7 @@ import com.baosight.iplat4j.core.resource.I18nMessages;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase; import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import com.baosight.iplat4j.ed.util.SequenceGenerator; import com.baosight.iplat4j.ed.util.SequenceGenerator;
import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -77,6 +78,7 @@ public class ServiceHPXT003 extends ServiceEPBase { ...@@ -77,6 +78,7 @@ public class ServiceHPXT003 extends ServiceEPBase {
try { try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows(); List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
// 写入数据 // 写入数据
List<HPXT003> list = new ArrayList<>();
for (Map resultRow : resultRows) { for (Map resultRow : resultRows) {
HPXT003 hpxt003 = new HPXT003(); HPXT003 hpxt003 = new HPXT003();
hpxt003.fromMap(resultRow); hpxt003.fromMap(resultRow);
...@@ -85,7 +87,9 @@ public class ServiceHPXT003 extends ServiceEPBase { ...@@ -85,7 +87,9 @@ public class ServiceHPXT003 extends ServiceEPBase {
} else { } else {
this.modify(hpxt003); this.modify(hpxt003);
} }
list.add(hpxt003);
} }
inInfo.getBlock(EiConstant.resultBlock).setRows(list);
inInfo.setStatus(EiConstant.STATUS_DEFAULT); inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据保存成功!"); inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据保存成功!");
} catch (Exception e) { } catch (Exception e) {
......
package com.baosight.hpjx.hp.xt.service; package com.baosight.hpjx.hp.xt.service;
import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation; import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation;
import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.core.constant.CommonConstant; import com.baosight.hpjx.core.constant.CommonConstant;
import com.baosight.hpjx.core.dao.DaoUtils; import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.hp.constant.HPConstant; 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.hp.xt.domain.HPXT004;
import com.baosight.hpjx.util.ErrorCodeUtils; import com.baosight.hpjx.util.*;
import com.baosight.hpjx.util.LogUtils;
import com.baosight.hpjx.util.StringUtil;
import com.baosight.hpjx.util.contants.ACConstants; import com.baosight.hpjx.util.contants.ACConstants;
import com.baosight.iplat4j.core.ei.EiBlock; import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant; import com.baosight.iplat4j.core.ei.EiConstant;
...@@ -18,8 +16,9 @@ import com.baosight.iplat4j.core.resource.I18nMessages; ...@@ -18,8 +16,9 @@ import com.baosight.iplat4j.core.resource.I18nMessages;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase; import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import com.baosight.iplat4j.ed.util.SequenceGenerator; import com.baosight.iplat4j.ed.util.SequenceGenerator;
import java.util.List; import java.text.ParseException;
import java.util.Map; import java.text.SimpleDateFormat;
import java.util.*;
/** /**
* *
...@@ -30,7 +29,14 @@ public class ServiceHPXT004 extends ServiceEPBase { ...@@ -30,7 +29,14 @@ public class ServiceHPXT004 extends ServiceEPBase {
@Override @Override
public EiInfo initLoad(EiInfo inInfo) { public EiInfo initLoad(EiInfo inInfo) {
try {
CommonMethod.initBlock(inInfo, Arrays.asList(
DdynamicEnum.USER_BLOCK_ID
), null, false);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPXT004().eiMetadata);
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo; return inInfo;
} }
...@@ -78,6 +84,7 @@ public class ServiceHPXT004 extends ServiceEPBase { ...@@ -78,6 +84,7 @@ public class ServiceHPXT004 extends ServiceEPBase {
try { try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows(); List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
// 写入数据 // 写入数据
List<HPXT004> list = new ArrayList<>();
for (Map resultRow : resultRows) { for (Map resultRow : resultRows) {
HPXT004 hpxt004 = new HPXT004(); HPXT004 hpxt004 = new HPXT004();
hpxt004.fromMap(resultRow); hpxt004.fromMap(resultRow);
...@@ -86,7 +93,9 @@ public class ServiceHPXT004 extends ServiceEPBase { ...@@ -86,7 +93,9 @@ public class ServiceHPXT004 extends ServiceEPBase {
} else { } else {
this.modify(hpxt004); this.modify(hpxt004);
} }
list.add(hpxt004);
} }
inInfo.getBlock(EiConstant.resultBlock).setRows(list);
inInfo.setStatus(EiConstant.STATUS_DEFAULT); inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据保存成功!"); inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据保存成功!");
} catch (Exception e) { } catch (Exception e) {
...@@ -102,6 +111,7 @@ public class ServiceHPXT004 extends ServiceEPBase { ...@@ -102,6 +111,7 @@ public class ServiceHPXT004 extends ServiceEPBase {
this.setBaseInfo(hpxt004); this.setBaseInfo(hpxt004);
//生成会议室管理申请 //生成会议室管理申请
hpxt004.setApplyNo(SequenceGenerator.getNextSequence(HPConstant.SequenceId.CONFERENCE_APPLY_NO)); hpxt004.setApplyNo(SequenceGenerator.getNextSequence(HPConstant.SequenceId.CONFERENCE_APPLY_NO));
DaoUtils.insert(HPXT004.INSERT, hpxt004); DaoUtils.insert(HPXT004.INSERT, hpxt004);
} }
...@@ -113,8 +123,8 @@ public class ServiceHPXT004 extends ServiceEPBase { ...@@ -113,8 +123,8 @@ public class ServiceHPXT004 extends ServiceEPBase {
private void setBaseInfo(HPXT004 hpxt004) { private void setBaseInfo(HPXT004 hpxt004) {
// 去除日期字符串中的- // 去除日期字符串中的-
hpxt004.setApplyDate(StringUtil.removeHorizontalLine(hpxt004.getApplyDate())); hpxt004.setApplyDate(StringUtil.removeHorizontalLine(hpxt004.getApplyDate()));
hpxt004.setStartTime(StringUtil.removeHorizontalLine(hpxt004.getStartTime())); hpxt004.setStartTime(DateUtils.formatShort(hpxt004.getStartTime()));
hpxt004.setEndTime(StringUtil.removeHorizontalLine(hpxt004.getEndTime())); hpxt004.setEndTime(DateUtils.formatShort(hpxt004.getEndTime()));
} }
/** /**
......
...@@ -136,7 +136,7 @@ ...@@ -136,7 +136,7 @@
$orderBy$ $orderBy$
</isNotEmpty> </isNotEmpty>
<isEmpty property="orderBy"> <isEmpty property="orderBy">
ID asc CREATED_TIME desc
</isEmpty> </isEmpty>
</dynamic> </dynamic>
...@@ -241,6 +241,9 @@ ...@@ -241,6 +241,9 @@
STATUS <!-- 返还状态 0-未返还 1-已返还 --> STATUS <!-- 返还状态 0-未返还 1-已返还 -->
) )
VALUES (#id#, #companyCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #applyDate#, #applyNo#, #applyPersonnel#, #licensePlateCode#, #driver#, #startTime#, #endTime#, #destination#, #mileage#, #reason#, #deleteFlag#, #proApplyStatus#, #status#) VALUES (#id#, #companyCode#, #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 ${hpjxSchema}.T_HPXT001
</selectKey>
</insert> </insert>
<delete id="delete"> <delete id="delete">
......
...@@ -90,6 +90,7 @@ ...@@ -90,6 +90,7 @@
UPDATED_TIME as "updatedTime", <!-- 更新时间 --> UPDATED_TIME as "updatedTime", <!-- 更新时间 -->
APPLY_DATE as "applyDate", <!-- 申请日期 --> APPLY_DATE as "applyDate", <!-- 申请日期 -->
APPLY_NO as "applyNo", <!-- 保险单号 --> APPLY_NO as "applyNo", <!-- 保险单号 -->
INSURANCE_COMPANY as "insuranceCompany", <!-- 保险公司 -->
APPLY_PERSONNEL as "applyPersonnel", <!-- 申请人 --> APPLY_PERSONNEL as "applyPersonnel", <!-- 申请人 -->
LICENSE_PLATE_CODE as "licensePlateCode", <!-- 车牌号 --> LICENSE_PLATE_CODE as "licensePlateCode", <!-- 车牌号 -->
DELETE_FLAG as "deleteFlag", <!-- 是否删除0.否1.是 --> DELETE_FLAG as "deleteFlag", <!-- 是否删除0.否1.是 -->
...@@ -101,7 +102,7 @@ ...@@ -101,7 +102,7 @@
$orderBy$ $orderBy$
</isNotEmpty> </isNotEmpty>
<isEmpty property="orderBy"> <isEmpty property="orderBy">
ID asc CREATED_TIME DESC
</isEmpty> </isEmpty>
</dynamic> </dynamic>
...@@ -175,9 +176,13 @@ ...@@ -175,9 +176,13 @@
APPLY_PERSONNEL, <!-- 申请人 --> APPLY_PERSONNEL, <!-- 申请人 -->
LICENSE_PLATE_CODE, <!-- 车牌号 --> LICENSE_PLATE_CODE, <!-- 车牌号 -->
DELETE_FLAG, <!-- 是否删除0.否1.是 --> DELETE_FLAG, <!-- 是否删除0.否1.是 -->
APPLY_STATUS <!-- 申请状态 --> APPLY_STATUS, <!-- 申请状态 -->
INSURANCE_COMPANY
) )
VALUES (#id#, #companyCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #applyDate#, #applyNo#, #applyPersonnel#, #licensePlateCode#, #deleteFlag#, #applyStatus#) VALUES (#id#, #companyCode#, #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 ${hpjxSchema}.T_HPXT002
</selectKey>
</insert> </insert>
<delete id="delete"> <delete id="delete">
...@@ -196,6 +201,18 @@ ...@@ -196,6 +201,18 @@
ID = #id# ID = #id#
</update> </update>
<!--修改提交状态-->
<update id="updateProApplyStatus">
UPDATE ${hpjxSchema}.T_HPXT002
SET
UPDATED_BY = #updatedBy#, <!-- 更新人 -->
UPDATED_NAME = #updatedName#, <!-- 更新人名称 -->
UPDATED_TIME = #updatedTime#, <!-- 更新时间 -->
APPLY_STATUS = #applyStatus# <!-- 提交状态 0-未提交 1-已提交 -->
WHERE
ID = #id#
</update>
<update id="update"> <update id="update">
UPDATE ${hpjxSchema}.T_HPXT002 UPDATE ${hpjxSchema}.T_HPXT002
SET SET
...@@ -212,7 +229,8 @@ ...@@ -212,7 +229,8 @@
APPLY_PERSONNEL = #applyPersonnel#, <!-- 申请人 --> APPLY_PERSONNEL = #applyPersonnel#, <!-- 申请人 -->
LICENSE_PLATE_CODE = #licensePlateCode#, <!-- 车牌号 --> LICENSE_PLATE_CODE = #licensePlateCode#, <!-- 车牌号 -->
DELETE_FLAG = #deleteFlag#, <!-- 是否删除0.否1.是 --> DELETE_FLAG = #deleteFlag#, <!-- 是否删除0.否1.是 -->
APPLY_STATUS = #applyStatus# <!-- 申请状态 --> APPLY_STATUS = #applyStatus#, <!-- 申请状态 -->
INSURANCE_COMPANY = #insuranceCompany#
WHERE WHERE
ID = #id# ID = #id#
</update> </update>
......
...@@ -104,7 +104,7 @@ ...@@ -104,7 +104,7 @@
$orderBy$ $orderBy$
</isNotEmpty> </isNotEmpty>
<isEmpty property="orderBy"> <isEmpty property="orderBy">
ID asc CREATED_TIME desc
</isEmpty> </isEmpty>
</dynamic> </dynamic>
...@@ -186,6 +186,9 @@ ...@@ -186,6 +186,9 @@
T_HPXT002_ID T_HPXT002_ID
) )
VALUES (#id#, #companyCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #licensePlateCode#, #insuranceType#, #insuranceCompany#, #insuranceStartDate#, #insuranceEndDate#, #insuranceAmount#, #deleteFlag#, #tHpxt002Id# ) VALUES (#id#, #companyCode#, #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 ${hpjxSchema}.T_HPXT002A
</selectKey>
</insert> </insert>
<delete id="delete"> <delete id="delete">
......
...@@ -105,7 +105,7 @@ ...@@ -105,7 +105,7 @@
$orderBy$ $orderBy$
</isNotEmpty> </isNotEmpty>
<isEmpty property="orderBy"> <isEmpty property="orderBy">
ID asc CREATED_TIME desc
</isEmpty> </isEmpty>
</dynamic> </dynamic>
...@@ -190,6 +190,9 @@ ...@@ -190,6 +190,9 @@
DELETE_FLAG <!-- 删除标记 --> DELETE_FLAG <!-- 删除标记 -->
) )
VALUES (#id#, #companyCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #maintenanceDate#, #maintenanceNumber#, #maintenanceType#, #licensePlate#, #handler#, #maintenanceCost#, #maintenanceReason#, #deleteFlag#) VALUES (#id#, #companyCode#, #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 ${hpjxSchema}.T_HPXT003
</selectKey>
</insert> </insert>
<delete id="delete"> <delete id="delete">
......
...@@ -131,7 +131,7 @@ ...@@ -131,7 +131,7 @@
$orderBy$ $orderBy$
</isNotEmpty> </isNotEmpty>
<isEmpty property="orderBy"> <isEmpty property="orderBy">
ID asc CREATED_TIME desc
</isEmpty> </isEmpty>
</dynamic> </dynamic>
...@@ -232,6 +232,9 @@ ...@@ -232,6 +232,9 @@
STATUS <!-- 返还状态 0-未返还 1-已返还 --> STATUS <!-- 返还状态 0-未返还 1-已返还 -->
) )
VALUES (#id#, #companyCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #applyDate#, #applyNo#, #applyPersonnel#, #meetingRoom#, #meetingSubject#, #meetingNature#, #importanceLevel#, #startTime#, #endTime#, #deleteFlag#, #proApplyStatus#, #status#) VALUES (#id#, #companyCode#, #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 ${hpjxSchema}.T_HPXT004
</selectKey>
</insert> </insert>
<delete id="delete"> <delete id="delete">
......
...@@ -139,7 +139,7 @@ ...@@ -139,7 +139,7 @@
<%@include file="/WEB-INF/fragments/kendo-ui-css.tagf" %> <%@include file="/WEB-INF/fragments/kendo-ui-css.tagf" %>
<link rel="shortcut icon" href="${iPlatStaticURL}/iplat.ico" type="image/x-icon"> <link rel="shortcut icon" href="${iPlatStaticURL}/iplat.ico" type="image/x-icon">
<%-- <link href="${iPlatStaticURL}/iPlatV7-index.css" rel="stylesheet" type="text/css"/>--%> <link href="${iPlatStaticURL}/iPlatV7-index.css" rel="stylesheet" type="text/css"/>
<link rel="stylesheet" href="${iPlatStaticURL}/iplatui/assets/js/plugins/slick/slick.min.css"> <link rel="stylesheet" href="${iPlatStaticURL}/iplatui/assets/js/plugins/slick/slick.min.css">
<link rel="stylesheet" href="${iPlatStaticURL}/iplatui/assets/js/plugins/slick/slick-theme.min.css" onload="this.rel='stylesheet'" rel="preload" as="style" > <link rel="stylesheet" href="${iPlatStaticURL}/iplatui/assets/js/plugins/slick/slick-theme.min.css" onload="this.rel='stylesheet'" rel="preload" as="style" >
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
<!-- 基础服务 --> <!-- 基础服务 -->
<sqlMap resource="com/baosight/hpjx/hp/dm/sql/HPDM099.xml"/> <sqlMap resource="com/baosight/hpjx/hp/dm/sql/HPDM099.xml"/>
<sqlMap resource="com/baosight/hpjx/hp/ct/sql/HPCT001.xml"/>
<!-- 用户服务 --> <!-- 用户服务 -->
<sqlMap resource="com/baosight/hpjx/hp/xs/sql/HPXS007A.xml"/> <sqlMap resource="com/baosight/hpjx/hp/xs/sql/HPXS007A.xml"/>
......
...@@ -43,7 +43,12 @@ ...@@ -43,7 +43,12 @@
textField="textField" valueField="valueField" textField="textField" valueField="valueField"
maxLength="16" readonly="false" width="160" required="true" maxLength="16" readonly="false" width="160" required="true"
align="center" filter="contains" sort="true" /> align="center" filter="contains" sort="true" />
<EF:EFColumn ename="inquiryPerson" cname="询价人员" width="140" align="center" required="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:EFComboColumn ename="inquiryType" cname="询价单类型" width="80" align="center" readonly="true">
<EF:EFCodeOption codeName="hpjx.hpcg.inquiryType"/> <EF:EFCodeOption codeName="hpjx.hpcg.inquiryType"/>
</EF:EFComboColumn> </EF:EFComboColumn>
......
$(function () {
IPLATUI.EFGrid = {
"result": {
exportGrid: false,
pageable: {
pageSize: 15,
pageSizes: [15, 50, 100, 200]
},
columns: [{
field: "operate",
template: function (options) {
let formEname = options.formEname;
if (isBlank(formEname)) {
return "";
}
let formParam = "todoInternalCode=" + options.internalCode
+ (isBlank(options.formParam) ? "" : "&" + options.formParam);
let params = '\'' + formEname + '\',\'' + formParam + '\'';
let template = '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="showDetail(' + params + ')">详情</a>';
return template;
}
}]
}
}
// 查询
$("#QUERY").on("click", query);
// 已读
$("#CONFIRM").on("click", confirm);
});
/**
* 页面加载时执行
*/
$(window).load(function () {
// 查询
query();
});
/**
* 查询
*/
let query = function () {
resultGrid.dataSource.page(1);
}
/**
* 已读
*/
let confirm = function () {
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"确认已办\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result", "HPCT001", "batchConfirm", true);
}
});
}
/**
* 展示详情
*
* @param formEname
* @param param
*/
let showDetail = function (formEname, param) {
IPLAT.openForm(formEname, param);
}
<!DOCTYPE html>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<EF:EFPage title="待办消息">
<EF:EFRegion id="inqu" title="条件区域">
<div class="row">
<EF:EFSelect cname="状态" blockId="inqu_status" ename="status" row="0" colWidth="3" optionLabel="全部">
<EF:EFCodeOption codeName="app.ct.status"/>
</EF:EFSelect>
<EF:EFInput cname="标题" blockId="inqu_status" ename="title" row="0" colWidth="3"/>
<EF:EFInput cname="内容" blockId="inqu_status" ename="content" row="0" colWidth="3"/>
</div>
<div class="row">
<EF:EFDateSpan startCname="创建日期(从)" endCname="至" blockId="inqu_status"
startName="createTimeFrom" endName="createTimeTo" row="0" role="datetime"
format="yyyy-MM-dd HH:mm:ss" ratio="3:3" satrtRatio="4:8" endRatio="4:8" readonly="true">
</EF:EFDateSpan>
<EF:EFDateSpan startCname="关闭日期(从)" endCname="至" blockId="inqu_status"
startName="closeTimeFrom" endName="closeTimeTo" row="0" role="datetime"
format="yyyy-MM-dd HH:mm:ss" ratio="3:3" satrtRatio="4:8" endRatio="4:8" readonly="true">
</EF:EFDateSpan>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="明细数据">
<EF:EFGrid blockId="result" autoDraw="override" showCount="true" checkMode="row" height="69vh">
<EF:EFColumn ename="internalCode" cname="内码" hidden="true"/>
<EF:EFColumn ename="formEname" cname="表单英文名" hidden="true"/>
<EF:EFColumn ename="formParam" cname="表单参数" hidden="true"/>
<EF:EFColumn ename="operate" cname="操作" enable="false" width="80" align="center"/>
<EF:EFComboColumn ename="status" cname="状态" enable="false" width="100" align="center">
<EF:EFCodeOption codeName="app.ct.status"/>
</EF:EFComboColumn>
<EF:EFColumn ename="title" cname="标题" enable="false" width="140" align="center"/>
<EF:EFColumn ename="content" cname="内容" enable="false" width="500" align="left" sort="true"/>
<EF:EFColumn ename="createdTime" cname="创建时间" enable="false" width="140" align="center"
editType="datetime" parseFormats="['yyyyMMddHHmmss','yyyy-MM-dd HH:mm:ss']"/>
<EF:EFColumn ename="closeTime" cname="关闭时间" enable="false" width="140" align="center"
editType="datetime" parseFormats="['yyyyMMddHHmmss','yyyy-MM-dd HH:mm:ss']"/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
...@@ -24,7 +24,7 @@ $(function () { ...@@ -24,7 +24,7 @@ $(function () {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="showUploadFile(' + item.id + ')" >附件清单</a>'; + 'onclick="showUploadFile(' + item.id + ')" >附件清单</a>';
} }
if (item.status==0 && item.id){ if (item.proApplyStatus == 1 && item.status == 0 && item.id) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' + template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' +
'onclick="approveFunc(' + item.id + ')" >返还</a>'; 'onclick="approveFunc(' + item.id + ')" >返还</a>';
} }
......
...@@ -55,7 +55,12 @@ ...@@ -55,7 +55,12 @@
<EF:EFColumn ename="applyDate" cname="申请日期" width="110" align="center" editType="date" <EF:EFColumn ename="applyDate" cname="申请日期" width="110" align="center" editType="date"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required="true" readonly="true"/> dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required="true" readonly="true"/>
<EF:EFColumn ename="applyNo" cname="申请单号" enable="false" width="130" align="center"/> <EF:EFColumn ename="applyNo" cname="申请单号" enable="false" width="130" align="center"/>
<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="100" 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="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="driver" cname="司机" enable="true" width="130" align="center" required="true"/>
<EF:EFColumn ename="startTime" cname="开始时间" width="110" align="center" editType="date" <EF:EFColumn ename="startTime" cname="开始时间" width="110" align="center" editType="date"
......
...@@ -62,9 +62,9 @@ $(function () { ...@@ -62,9 +62,9 @@ $(function () {
} }
} }
// $("#APPROVE").on("click",function () { $("#APPROVE").on("click",function () {
// approveFuncs(); approveFuncs();
// }) })
downKeyUp(); downKeyUp();
}) })
...@@ -99,18 +99,18 @@ let save = function (btnNode) { ...@@ -99,18 +99,18 @@ let save = function (btnNode) {
flag = false; flag = false;
return false; return false;
} }
let licensePlateCode= item.get("licensePlateCode"); // let licensePlateCode= item.get("licensePlateCode");
if(isBlank(licensePlateCode)){ // if(isBlank(licensePlateCode)){
message("选中的第"+(index+1)+"行\"车牌号\",不能为空!"); // message("选中的第"+(index+1)+"行\"车牌号\",不能为空!");
flag = false; // flag = false;
return false; // return false;
} // }
let applyNo= item.get("applyNo"); // let applyNo= item.get("applyNo");
if(isBlank(applyNo)){ // if(isBlank(applyNo)){
message("选中的第"+(index+1)+"行\"保险单号\",不能为空!"); // message("选中的第"+(index+1)+"行\"保险单号\",不能为空!");
flag = false; // flag = false;
return false; // return false;
} // }
}); });
if(flag) { if(flag) {
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"保存\"操作? ", { JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"保存\"操作? ", {
...@@ -128,29 +128,29 @@ let save = function (btnNode) { ...@@ -128,29 +128,29 @@ let save = function (btnNode) {
/** /**
* 提交 * 提交
*/ */
// function approveFuncs() { function approveFuncs() {
// let rows = resultGrid.getCheckedRows(); let rows = resultGrid.getCheckedRows();
// if (rows.length < 1) { if (rows.length < 1) {
// message("请选择数据"); message("请选择数据");
// return; return;
// } }
// let flag = true; let flag = true;
// $.each(rows, function(index, item) { $.each(rows, function(index, item) {
// let proApplyStatus= item.get("proApplyStatus"); let applyStatus= item.get("applyStatus");
// if(proApplyStatus=="1"){ if(applyStatus=="1"){
// message("选中的第"+(index+1)+"行\"数据已提交\",不能再次选中提交!"); message("选中的第"+(index+1)+"行\"数据已提交\",不能再次选中提交!");
// flag = false; flag = false;
// return false; return false;
// } }
// }); });
// if(flag) { if(flag) {
// JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"提交\"操作? ", { JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"提交\"操作? ", {
// ok: function () { ok: function () {
// JSUtils.submitGridsData("result", "HPXT001", "approve", true); JSUtils.submitGridsData("result", "HPXT002", "approve", true);
// } }
// }); });
// } }
// } }
/** /**
* 删除明细 * 删除明细
......
...@@ -55,10 +55,14 @@ ...@@ -55,10 +55,14 @@
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="120" align="center"/> <EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="120" align="center"/>
<EF:EFColumn ename="applyDate" cname="申请日期" width="110" align="center" editType="date" <EF:EFColumn ename="applyDate" cname="申请日期" width="110" align="center" editType="date"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required="true" readonly="true"/> dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required="true" readonly="true"/>
<EF:EFColumn ename="applyNo" cname="保险单号" enable="true" width="130" align="center"/> <EF:EFComboColumn ename="applyPersonnel" cname="申请人" columnTemplate="#=textField#" itemTemplate="#=textField#"
<EF:EFColumn ename="applyPersonnel" cname="申请人" enable="true" width="130" align="center" required="true"/> textField="textField" valueField="valueField" defaultValue="${loginName}"
<EF:EFColumn ename="licensePlateCode" cname="车牌号" enable="true" width="130" align="center" required="true"/> maxLength="16" width="100" readonly="false" required="true"
<EF:EFComboColumn ename="proApplyStatus" cname="申请状态" width="80" align="center" enable="false" defaultValue="0"> 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="hpjx.hpcg.proApplyStatus"/> <EF:EFCodeOption codeName="hpjx.hpcg.proApplyStatus"/>
</EF:EFComboColumn> </EF:EFComboColumn>
</EF:EFGrid> </EF:EFGrid>
......
...@@ -55,7 +55,6 @@ ...@@ -55,7 +55,6 @@
<%-- <EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="80" align="center"/>--%> <%-- <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="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="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}" <EF:EFColumn ename="insuranceAmount" cname="保险金额(元)" width="80" align="right" format="{0:N3}"
data-regex="/^-?[0-9]{1,12}([.][0-9]{1,3})?$/" data-regex="/^-?[0-9]{1,12}([.][0-9]{1,3})?$/"
data-errorprompt="请输入数字,该值最大可设置12位整数和3位小数!" required="true"/> data-errorprompt="请输入数字,该值最大可设置12位整数和3位小数!" required="true"/>
......
...@@ -24,10 +24,10 @@ $(function () { ...@@ -24,10 +24,10 @@ $(function () {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="showUploadFile(' + item.id + ')" >附件清单</a>'; + 'onclick="showUploadFile(' + item.id + ')" >附件清单</a>';
} }
if (item.id && item.status==0){ // if (item.id && item.status==0){
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' + // template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' +
'onclick="approveFunc(' + item.id + ')" >返还</a>'; // 'onclick="approveFunc(' + item.id + ')" >返还</a>';
} // }
return template; return template;
} }
}, { }, {
......
...@@ -30,7 +30,12 @@ ...@@ -30,7 +30,12 @@
<EF:EFColumn ename="applyDate" cname="申请日期" width="110" align="center" editType="date" <EF:EFColumn ename="applyDate" cname="申请日期" width="110" align="center" editType="date"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required="true" readonly="true"/> dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required="true" readonly="true"/>
<EF:EFColumn ename="applyNo" cname="申请单号" enable="false" width="130" align="center"/> <EF:EFColumn ename="applyNo" cname="申请单号" enable="false" width="130" align="center"/>
<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="100" 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="meetingRoom" cname="会议室" enable="true" width="130" align="center" required="true"/>
<EF:EFColumn ename="meetingSubject" 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:EFComboColumn ename="meetingNature" cname="会议性质" width="130" align="center" enable="true" required="true">
...@@ -39,18 +44,18 @@ ...@@ -39,18 +44,18 @@
<EF:EFComboColumn ename="importanceLevel" cname="重要程度" width="130" align="center" enable="true" required="true"> <EF:EFComboColumn ename="importanceLevel" cname="重要程度" width="130" align="center" enable="true" required="true">
<EF:EFCodeOption codeName="hpjx.hpxt.importanceLevel"/> <EF:EFCodeOption codeName="hpjx.hpxt.importanceLevel"/>
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFColumn ename="startTime" cname="开始时间" width="110" align="center" editType="date" <EF:EFColumn ename="startTime" cname="开始时间" parseFormats="['yyyyMMddHHmmss']" align="center" editType="datetime"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required="true"/> dateFormat="yyyy-MM-dd HH:mm:ss" width="140" required="true"/>
<EF:EFColumn ename="endTime" cname="结束时间" width="110" align="center" editType="date" <EF:EFColumn ename="endTime" cname="结束时间" parseFormats="['yyyyMMddHHmmss']" align="center" editType="datetime"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required="true"/> 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:EFComboColumn ename="proApplyStatus" cname="提交状态" width="80" align="center" enable="false" defaultValue="0">
<EF:EFCodeOption codeName="hpjx.hpcg.proApplyStatus"/> <EF:EFCodeOption codeName="hpjx.hpcg.proApplyStatus"/>
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFComboColumn ename="status" cname="返还状态" width="80" align="center" <%-- <EF:EFComboColumn ename="status" cname="返还状态" width="80" align="center"--%>
textField="textField" valueField="valueField" readonly="true" > <%-- textField="textField" valueField="valueField" readonly="true" >--%>
<EF:EFOption label="未返还" value="0"/> <%-- <EF:EFOption label="未返还" value="0"/>--%>
<EF:EFOption label="已返还" value="1"/> <%-- <EF:EFOption label="已返还" value="1"/>--%>
</EF:EFComboColumn> <%-- </EF:EFComboColumn>--%>
</EF:EFGrid> </EF:EFGrid>
</EF:EFRegion> </EF:EFRegion>
</EF:EFPage> </EF:EFPage>
...@@ -279,7 +279,8 @@ function currShortDate() { ...@@ -279,7 +279,8 @@ function currShortDate() {
const year = date.getFullYear(); const year = date.getFullYear();
const month = date.getMonth() + 1; // 月份从0开始,需要加1 const month = date.getMonth() + 1; // 月份从0开始,需要加1
const day = date.getDate(); const day = date.getDate();
return year + (month < 10 ? '0' + month : month.toString()) + (day < 10 ? '0' + day : day); return year.toString() + (month < 10 ? '0' + month : month.toString())
+ (day < 10 ? '0' + day : day.toString());
} }
/** /**
...@@ -291,7 +292,7 @@ function currShortMonth() { ...@@ -291,7 +292,7 @@ function currShortMonth() {
const date = new Date(); const date = new Date();
const year = date.getFullYear(); const year = date.getFullYear();
const month = date.getMonth() + 1; // 月份从0开始,需要加1 const month = date.getMonth() + 1; // 月份从0开始,需要加1
return year + (month < 10 ? '0' + month : month); return year.toString() + (month < 10 ? '0' + month : month.toString());
} }
/** /**
......
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