Commit e5a6ba39 by liuyang

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

parents ef50c515 f51a968b
...@@ -269,7 +269,7 @@ public class ServiceHGCW010 extends ServiceBase { ...@@ -269,7 +269,7 @@ public class ServiceHGCW010 extends ServiceBase {
/** /**
* 提交操作 * 审核操作
* @param inInfo * @param inInfo
* @return * @return
*/ */
...@@ -279,12 +279,12 @@ public class ServiceHGCW010 extends ServiceBase { ...@@ -279,12 +279,12 @@ public class ServiceHGCW010 extends ServiceBase {
for (int i = 0; i < resultRows.size(); i++) { for (int i = 0; i < resultRows.size(); i++) {
HGCW010 HGCW010 = new HGCW010(); HGCW010 HGCW010 = new HGCW010();
HGCW010.fromMap(resultRows.get(i)); HGCW010.fromMap(resultRows.get(i));
HGCW010.setReviewStatus(3); HGCW010.setReviewStatus(1);
DaoUtils.update("HGCW010.submit", HGCW010); DaoUtils.update("HGCW010.submit", HGCW010);
} }
inInfo = this.query(inInfo); inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT); inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据提交成功!"); inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据审核成功!");
} catch (Exception e) { } catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败"); LogUtils.setDetailMsg(inInfo, e, "查询失败");
} }
......
...@@ -56,7 +56,8 @@ public class ServiceHGCW010A extends ServiceBase { ...@@ -56,7 +56,8 @@ public class ServiceHGCW010A extends ServiceBase {
public EiInfo query(EiInfo inInfo) { public EiInfo query(EiInfo inInfo) {
try { try {
inInfo = super.query(inInfo, HGCW010A.QUERY, new HGCW010A()); inInfo = super.query(inInfo, HGCW010A.QUERY, new HGCW010A());
} catch (Exception e) { }
catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败"); LogUtils.setDetailMsg(inInfo, e, "查询失败");
} }
return inInfo; return inInfo;
......
...@@ -229,7 +229,7 @@ public class ServiceHGCW012 extends ServiceBase { ...@@ -229,7 +229,7 @@ public class ServiceHGCW012 extends ServiceBase {
} }
inInfo = this.query(inInfo); inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT); inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据提交成功!"); inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据审核成功!");
} catch (Exception e) { } catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "审核失败,发票类型未选!"); LogUtils.setDetailMsg(inInfo, e, "审核失败,发票类型未选!");
} }
......
...@@ -269,12 +269,12 @@ public class ServiceHGCW014 extends ServiceBase { ...@@ -269,12 +269,12 @@ public class ServiceHGCW014 extends ServiceBase {
for (int i = 0; i < resultRows.size(); i++) { for (int i = 0; i < resultRows.size(); i++) {
HGCW014 HGCW014 = new HGCW014(); HGCW014 HGCW014 = new HGCW014();
HGCW014.fromMap(resultRows.get(i)); HGCW014.fromMap(resultRows.get(i));
HGCW014.setReviewStatus(3); HGCW014.setReviewStatus(1);
DaoUtils.update("HGCW014.submit", HGCW014); DaoUtils.update("HGCW014.submit", HGCW014);
} }
inInfo = this.query(inInfo); inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT); inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据提交成功!"); inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据审核成功!");
} catch (Exception e) { } catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败"); LogUtils.setDetailMsg(inInfo, e, "查询失败");
} }
......
...@@ -249,7 +249,7 @@ public class ServiceHGCW016 extends ServiceBase { ...@@ -249,7 +249,7 @@ public class ServiceHGCW016 extends ServiceBase {
/** /**
* 提交操作 * 审核操作
* @param inInfo * @param inInfo
* @return * @return
*/ */
...@@ -259,12 +259,12 @@ public class ServiceHGCW016 extends ServiceBase { ...@@ -259,12 +259,12 @@ public class ServiceHGCW016 extends ServiceBase {
for (int i = 0; i < resultRows.size(); i++) { for (int i = 0; i < resultRows.size(); i++) {
HGCW016 HGCW016 = new HGCW016(); HGCW016 HGCW016 = new HGCW016();
HGCW016.fromMap(resultRows.get(i)); HGCW016.fromMap(resultRows.get(i));
HGCW016.setReviewStatus(3); HGCW016.setReviewStatus(1);
DaoUtils.update("HGCW016.submit", HGCW016); DaoUtils.update("HGCW016.submit", HGCW016);
} }
inInfo = this.query(inInfo); inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT); inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据提交成功!"); inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据审核成功!");
} catch (Exception e) { } catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败"); LogUtils.setDetailMsg(inInfo, e, "查询失败");
} }
......
package com.baosight.hggp.hg.cw.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.hg.cw.domain.HGCW051;
import com.baosight.hggp.util.CommonMethod;
import com.baosight.hggp.util.DateUtils;
import com.baosight.hggp.util.LogUtils;
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.service.impl.ServiceBase;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
/**
* @author yukang
* @date 2024年05月06日 18:22
*/
public class ServiceHGCW051 extends ServiceBase {
/**
* 画面初始化
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "费用归集主表",operType = "查询",operDesc = "初始化")
public EiInfo initLoad(EiInfo inInfo) {
try {
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.COMPANY_BOX_BLOCK_ID), null, false);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGCW051().eiMetadata);
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
/**
* 查询操作
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "费用归集",operType = "查询",operDesc = "查询")
@Override
public EiInfo query(EiInfo inInfo) {
try {
inInfo = super.query(inInfo, HGCW051.QUERY, new HGCW051());
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
/**
* 删除操作
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "费用归集",operType = "删除",operDesc = "删除")
public EiInfo delete(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
for (int i = 0; i < resultRows.size(); i++) {
DaoUtils.update("HGCW051.delete", resultRows.get(i));
}
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据删除成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "删除失败");
}
return inInfo;
}
}
package com.baosight.hggp.hg.cw.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.hg.cw.domain.HGCW052;
import com.baosight.hggp.util.CommonMethod;
import com.baosight.hggp.util.DateUtils;
import com.baosight.hggp.util.LogUtils;
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.service.impl.ServiceBase;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @author yukang
* @date 2024年05月06日 18:22
*/
public class ServiceHGCW052 extends ServiceBase {
/**
* 画面初始化
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "费用归集详情",operType = "查询",operDesc = "初始化")
public EiInfo initLoad(EiInfo inInfo) {
try {
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.COMPANY_BOX_BLOCK_ID), null, false);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGCW052().eiMetadata);
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
/**
* 查询操作
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "费用归集详情",operType = "查询",operDesc = "查询")
@Override
public EiInfo query(EiInfo inInfo) {
try {
inInfo = super.query(inInfo, HGCW052.QUERY, new HGCW052());
Map inqu_status_map = inInfo.getRow("inqu_status", 0);
Map map = new HashMap();
map.put("companyCode",inqu_status_map.get("companyCode"));
map.put("updateTime",inqu_status_map.get("month"));
List list = dao.query("HGCW052.query1",map,0,-999999);
EiBlock eiBlock1 = inInfo.addBlock("projName");
eiBlock1.setBlockMeta(new HGCW052().eiMetadata);
eiBlock1.setRows(list);
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
/**
* 新增操作
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "费用归集详情",operType = "保存",operDesc = "保存")
public EiInfo save(EiInfo inInfo) {
try {
Map map = inInfo.getRow("inqu_status", 0);
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
// 写入数据
for (int i = 0; i < resultRows.size(); i++) {
HGCW052 hgcw052 = new HGCW052();
hgcw052.fromMap(resultRows.get(i));
hgcw052.setHgcw051Id(Long.parseLong((String)map.get("hgcw051Id")));
hgcw052.setCompanyCode((String) map.get("companyCode"));
hgcw052.setCompanyName((String) map.get("companyName"));
hgcw052.setMonth((String) map.get("month"));
hgcw052.setYear((String) map.get("year"));
if (hgcw052.getId() == null || hgcw052.getId() == 0) {
this.add(hgcw052);
} else {
this.modify(hgcw052);
}
}
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据保存成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "保存失败");
}
return inInfo;
}
/**
* 新增操作
*
* @param hgcw052
* @return
*/
public void add(HGCW052 hgcw052) {
DaoUtils.insert("HGCW052.insert", hgcw052);
}
/**
* 修改操作
*
* @param HGCW052
* @return
*/
public void modify(HGCW052 HGCW052) {
DaoUtils.update("HGCW052.update", HGCW052);
}
/**
* 新增操作
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "费用归集详情",operType = "新增",operDesc = "新增")
@Override
public EiInfo insert(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
// 数据写入
for (int i = 0; i < resultRows.size(); i++) {
HGCW052 HGCW052 = new HGCW052();
HGCW052.fromMap(resultRows.get(i));
DaoUtils.insert("HGCW052.insert", HGCW052);
}
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据新增成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "新增失败");
}
return inInfo;
}
/**
* 修改操作
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "费用归集详情",operType = "修改",operDesc = "修改")
public EiInfo update(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
for (int i = 0; i < resultRows.size(); i++) {
HGCW052 HGCW052 = new HGCW052();
HGCW052.fromMap(resultRows.get(i));
DaoUtils.update("HGCW052.update", HGCW052);
}
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据修改成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "修改失败");
}
return inInfo;
}
/**
* 删除操作
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "费用归集详情",operType = "删除",operDesc = "删除")
public EiInfo delete(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
for (int i = 0; i < resultRows.size(); i++) {
DaoUtils.update("HGCW052.delete", resultRows.get(i));
}
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据删除成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "删除失败");
}
return inInfo;
}
}
...@@ -181,7 +181,7 @@ ...@@ -181,7 +181,7 @@
T1.CUMULATIVE_SETTLEMENT_AMOUNT as "cumulativeSettlementAmount", <!-- 累计结算金额 --> T1.CUMULATIVE_SETTLEMENT_AMOUNT as "cumulativeSettlementAmount", <!-- 累计结算金额 -->
T1.CUMULATIVE_SETTLEMENT_TAX as "cumulativeSettlementTax", <!-- 累计结算税金 --> T1.CUMULATIVE_SETTLEMENT_TAX as "cumulativeSettlementTax", <!-- 累计结算税金 -->
T1.CUMULATIVE_PRICE_TAX as "cumulativePriceTax", <!-- 累计结算价税合计金额 --> T1.CUMULATIVE_PRICE_TAX as "cumulativePriceTax", <!-- 累计结算价税合计金额 -->
T1.REMAINING_AMOUNT as "remainingAmount", <!-- 累计结算价税合计金额 --> T1.REMAINING_AMOUNT as "remainingAmount", <!-- 剩余开票金额-->
T1.REVIEW_STATUS as "reviewStatus", <!-- 审核状态 --> T1.REVIEW_STATUS as "reviewStatus", <!-- 审核状态 -->
T1.CREATED_BY as "createdBy", <!-- 记录创建者 --> T1.CREATED_BY as "createdBy", <!-- 记录创建者 -->
T1.CREATED_NAME as "createdName", <!-- 记录创建名称 --> T1.CREATED_NAME as "createdName", <!-- 记录创建名称 -->
...@@ -195,7 +195,7 @@ ...@@ -195,7 +195,7 @@
ON T1.PROJ_CODE = B.PROJ_CODE ON T1.PROJ_CODE = B.PROJ_CODE
AND T1.CONTRACT_NUMBER = B.CONTRACT_NUMBER AND T1.CONTRACT_NUMBER = B.CONTRACT_NUMBER
AND T1.COMPANY_CODE = B.COMPANY_CODE AND T1.COMPANY_CODE = B.COMPANY_CODE
WHERE 1=1 AND B.CONTRACT_TYPE = 1 WHERE 1=1 AND B.CONTRACT_TYPE = 1 AND T1.REMAINING_AMOUNT != 0
<include refid="condition" /> <include refid="condition" />
<dynamic prepend="ORDER BY"> <dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy"> <isNotEmpty property="orderBy">
...@@ -392,7 +392,7 @@ ...@@ -392,7 +392,7 @@
<update id="updateDeductionAmount"> <update id="updateDeductionAmount">
UPDATE ${hggpSchema}.HGCW008 UPDATE ${hggpSchema}.HGCW008
SET SET
REMAINING_AMOUNT = #remainingAmount#, <!-- 审核状态 --> REMAINING_AMOUNT = #remainingAmount#, <!-- 剩余开票金额 -->
UPDATED_BY = #updatedBy#, <!-- 记录修改者 --> UPDATED_BY = #updatedBy#, <!-- 记录修改者 -->
UPDATED_NAME = #updatedName#, <!-- 记录修改名称 --> UPDATED_NAME = #updatedName#, <!-- 记录修改名称 -->
UPDATED_TIME = #updatedTime# <!-- 记录修改时间 --> UPDATED_TIME = #updatedTime# <!-- 记录修改时间 -->
......
<?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-06-26 15:09:24
Version : 1.0
schema : hggp
tableName : HGCW051
ID BIGINT NOT NULL primarykey,
CREATED_BY VARCHAR NOT NULL,
CREATED_NAME VARCHAR NOT NULL,
CREATED_TIME VARCHAR NOT NULL,
UPDATED_BY VARCHAR NOT NULL,
UPDATED_NAME VARCHAR NOT NULL,
UPDATED_TIME VARCHAR NOT NULL,
DELETE_FLAG TINYINT,
COMPANY_CODE VARCHAR,
COMPANY_NAME VARCHAR,
YEAR VARCHAR NOT NULL,
MONTH VARCHAR NOT NULL,
AMOUNT DECIMAL
-->
<sqlMap namespace="HGCW051">
<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="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyName">
COMPANY_NAME = #companyName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="year">
YEAR = #year#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="month">
MONTH = #month#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="amount">
AMOUNT = #amount#
</isNotEmpty>
</sql>
<select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hggp.hg.cw.domain.HGCW051">
select A.COMPANY_CODE AS "companyCode",
A.COMPANY_NAME AS "companyName",
A.YEAR AS "year",
A.MONTH as "month",
A.ID AS "id",
SUM(B.AMOUNT) AS "amount"
from ${hggpSchema}.HGCW051 a,
${hggpSchema}.HGCW052 b
WHERE A.ID = B.HGCW051_ID
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="month">
MONTH = #month#
</isNotEmpty>
GROUP BY A.COMPANY_CODE,A.COMPANY_NAME,A.YEAR, A.MONTH,A.ID
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hggpSchema}.HGCW051 WHERE 1=1
<include refid="condition" />
</select>
<!--
<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="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyName">
COMPANY_NAME = #companyName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="year">
YEAR = #year#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="month">
MONTH = #month#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="amount">
AMOUNT = #amount#
</isNotEmpty>
-->
<insert id="insert">
INSERT INTO ${hggpSchema}.HGCW051 (ID,
CREATED_BY, <!-- 记录创建者 -->
CREATED_NAME, <!-- 记录创建�称 -->
CREATED_TIME, <!-- 记录创建时间 -->
UPDATED_BY, <!-- 记录修改者 -->
UPDATED_NAME, <!-- 记录修改�称 -->
UPDATED_TIME, <!-- 记录修改时间 -->
DELETE_FLAG, <!-- 0-未删除,1-已删除 -->
COMPANY_CODE, <!-- 公�编� -->
COMPANY_NAME, <!-- 公��称 -->
YEAR, <!-- 年份 -->
MONTH, <!-- 月份 -->
AMOUNT <!-- 费用金� -->
)
VALUES (#id#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #deleteFlag#, #companyCode#, #companyName#, #year#, #month#, #amount#)
</insert>
<delete id="delete">
DELETE FROM ${hggpSchema}.HGCW051 WHERE
ID = #id#
</delete>
<update id="update">
UPDATE ${hggpSchema}.HGCW051
SET
CREATED_BY = #createdBy#, <!-- 记录创建者 -->
CREATED_NAME = #createdName#, <!-- 记录创建�称 -->
CREATED_TIME = #createdTime#, <!-- 记录创建时间 -->
UPDATED_BY = #updatedBy#, <!-- 记录修改者 -->
UPDATED_NAME = #updatedName#, <!-- 记录修改�称 -->
UPDATED_TIME = #updatedTime#, <!-- 记录修改时间 -->
DELETE_FLAG = #deleteFlag#, <!-- 0-未删除,1-已删除 -->
COMPANY_CODE = #companyCode#, <!-- 公�编� -->
COMPANY_NAME = #companyName#, <!-- 公��称 -->
YEAR = #year#, <!-- 年份 -->
MONTH = #month#, <!-- 月份 -->
AMOUNT = #amount# <!-- 费用金� -->
WHERE
ID = #id#
</update>
</sqlMap>
...@@ -652,4 +652,19 @@ public class HGCWTools { ...@@ -652,4 +652,19 @@ public class HGCWTools {
} }
} }
public static class HgCw051{
public static void save(List<Map> rows, UserVO userVO) {
// AssertUtils.isNull(contractNumber, "合同号不能为空!");
rows.forEach(row -> {
HGCW051 hgcw051 = new HGCW051();
hgcw051.fromMap(row);
hgcw051.setCompanyCode(userVO.getUsercode());
hgcw051.setCompanyName(userVO.getUsername());
DaoUtils.insert(HGCW051.INSERT, hgcw051);
});
}
}
} }
...@@ -31,8 +31,8 @@ ...@@ -31,8 +31,8 @@
<EF:EFColumn ename="partyA" cname="客户名称" width="120" enable="false" readonly="true" align="center"/> <EF:EFColumn ename="partyA" cname="客户名称" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="projName" cname="项目名称" width="120" enable="false" readonly="true" align="center"/> <EF:EFColumn ename="projName" cname="项目名称" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="settlementNumber" cname="来源单号" width="120" enable="false" readonly="true" align="center"/> <EF:EFColumn ename="settlementNumber" cname="来源单号" width="120" enable="false" readonly="true" align="center"/>
<EF:EFComboColumn ename="billTybe" cname="票据类型" width="120" align="center" readonly="true" required="true" <EF:EFComboColumn ename="billTybe" cname="票据类型" width="120" align="center" required="true"
columnTemplate="#=textField#" itemTemplate="#=textField#" enable="false" > columnTemplate="#=textField#" itemTemplate="#=textField#" enable="true" >
<EF:EFCodeOption codeName="hggp.cw.billTybe"/> <EF:EFCodeOption codeName="hggp.cw.billTybe"/>
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFColumn ename="signingDate" cname="开票日期" width="120" enable="false" readonly="true" align="center"/> <EF:EFColumn ename="signingDate" cname="开票日期" width="120" enable="false" readonly="true" align="center"/>
......
$(function () {
// 查询
$("#QUERY").on("click", function () {
query();
});
IPLATUI.EFGrid.result = {
pageable: {
pageSize: 20,
pageSizes: [10, 20, 30, 50, 100, 200],
},
columns: [
{
field: "button",
title: "操作",
template: '<input value="费用详情" class="i-btn-sm" type="button" align="center" onclick="openButtonDetail(\'#:id#\',\'#:month#\',\'#:companyCode#\',\'#:year#\',\'#:companyName#\')" >'
,
width: 100
}
],
}
});
/**
* 查询
*/
let query = function () {
resultGrid.dataSource.page(1);
}
$(window).load(function () {
// 查
query();
});
function openButtonDetail(id, month,companyCode,year,companyName) {
//设置url
var url = "HGCW052?methodName=query&inqu_status-0-hgcw051Id=" + id + '&inqu_status-0-month=' + month + '&inqu_status-0-companyCode=' + companyCode + '&inqu_status-0-year=' + year + '&inqu_status-0-companyName=' + companyName;
// window.open(url);
JSColorbox.open({
href: url,
title: "<div style='text-align: center;'>费用归集详情</div>",
width: "90%",
height: "90%",
callbackName: windowCallback
});
}
function windowCallback() {
// 刷新列表
resultGrid.dataSource.page(1);
// 关闭弹窗
JSColorbox.close();
}
<!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:EFSelect cname="公司名称" blockId="inqu_status" ename="companyCode" row="0" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="companyBox_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFDatePicker cname="月份" blockId="inqu_status" ename="month" row="0" colWidth="3"
format="yyyyMM" start="year" depth="year"/>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="no" isFloat="true" autoBind="false">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="button" cname="操作" width="100" enable="false" align="center"/>
<EF:EFComboColumn ename="companyCode" cname="公司名称" width="110" align="center"
filter="contains" readonly="true">
<EF:EFOptions blockId="companyBox_block_id" valueField="valueField" textField="textField"/>
</EF:EFComboColumn>
<EF:EFColumn ename="companyName" cname="公司名称" align="center" hidden="true"
/>
<EF:EFColumn ename="year" cname="年份" width="120" align="center" start="decade" depth="decade"
editType="date" dateFormat="yyyy" parseFormats="['yyyy']"/>
<EF:EFColumn ename="month" cname="月份" width="120" align="center"
/>
<EF:EFColumn ename="amount" cname="费用金额" width="120" enable="false" readonly="true" align="center"/>
</EF:EFGrid>
</EF:EFRegion>
<EF:EFWindow id="window" url="" height="100%" width="100%" left="2%">
</EF:EFWindow>
</EF:EFPage>
<script>
var ctx = "${ctx}";
</script>
<script src="${ctx}/HG/CW/HGCW051.js"></script>
\ No newline at end of file
$(function() {
// 查询
$("#QUERY").on("click", function () {
query();
});
IPLATUI.EFGrid.result = {
pageable: {
pageSize: 20,
pageSizes: [10,20,30,50,100,200],
},
columns: [
],
onSave: function (e) {
// 阻止默认请求,使用自定义保存
e.preventDefault();
saveFunc();
},
onDelete: function (e) {
// 阻止默认请求,使用自定义删除
e.preventDefault();
deleteFunc();
},
}
});
/**
* 查询
*/
let query = function () {
resultGrid.dataSource.page(1);
}
$(window).load(function () {
// 查
query();
});
/**
* 保存
*/
function saveFunc() {
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
let flag = true;
$.each(rows, function(index, item) {
let itemCode= item.get("itemCode");
let isShare= item.get("isShare");
let costType= item.get("costType");
let costItem= item.get("costItem");
let amount= item.get("amount");
if(isBlank(itemCode)){
message("选中的第"+(index+1)+"行\"项目名称\",不能为空!");
flag = false;
return false;
}
if(isBlank(isShare)){
message("选中的第"+(index+1)+"行\"是否分摊到工序\",不能为空!");
flag = false;
return false;
}
if(isBlank(costType)){
message("选中的第"+(index+1)+"行\"费用类型\",不能为空!");
flag = false;
return false;
}
if(isBlank(costItem)){
message("选中的第"+(index+1)+"行\"费用项\",不能为空!");
flag = false;
return false;
}
if(isBlank(amount)){
message("选中的第"+(index+1)+"行\"费用金额\",不能为空!");
flag = false;
return false;
}
});
if(flag) {
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"保存\"操作? ", {
ok: function () {
var info = new EiInfo();
info.set("inqu_status-0-hgcw051Id", $('#inqu_status-0-hgcw051Id').val());
info.set("inqu_status-0-companyCode", $('#inqu_status-0-companyCode').val());
info.set("inqu_status-0-companyName", $('#inqu_status-0-companyName').val());
info.set("inqu_status-0-month", $('#inqu_status-0-month').val());
info.set("inqu_status-0-year", $('#inqu_status-0-year').val());
info.addBlock(JSUtils.checkedRows2Block("result"));
EiCommunicator.send("HGCW052", "save", info, {
onSuccess: function (ei) {
if (ei.getStatus() >= 0) {
try {
query();
} catch (e) {
// TODO: handle exception
}
if (ei.getStatus() == 0) {
NotificationUtil(ei, 'warning');
} else {
NotificationUtil(ei);
}
} else {
NotificationUtil(ei, "error");
}
},
onFail: function (ei) {
// 发生异常
NotificationUtil("操作失败,原因[" + ei + "]", "error");
}
});
//JSUtils.submitGridsData("result", "HPSC001", "save", true);
}
});
}
}
/**
* 删除
*/
function deleteFunc() {
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
let flag = true;
$.each(rows, function(index, item) {
let accountPeriodStatus= item.get("accountPeriodStatus");
if(accountPeriodStatus === "1"){
message("选中的第"+(index+1)+"行记录为开账状态,不能删除!");
flag = false;
return false;
}
});
if(flag){
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"删除\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result", "HGCW001", "delete", true);
}
});
}
}
<!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="inqu_status-0-hgcw051Id" cname="hgcw051Id" colWidth="3" type="hidden"/>
<EF:EFInput ename="inqu_status-0-companyCode" cname="公司编码" colWidth="3" type="hidden"/>
<EF:EFInput ename="inqu_status-0-companyName" cname="公司名称" colWidth="3" readonly="true"/>
<EF:EFInput ename="inqu_status-0-year" cname="year" colWidth="3" type="hidden"/>
<EF:EFDatePicker cname="月份" blockId="inqu_status" ename="month" row="0" colWidth="3"
format="yyyyMM" start="year" depth="year" readonly="true"/>
<EF:EFSelect cname="费用类型" ename="inqu_status-0-costType" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hggp.cw.costType" />
</EF:EFSelect>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="no" isFloat="true" autoBind="false">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFComboColumn ename="itemCode" cname="项目名称" width="150" align="center"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField" filter="contains" required="true">
<EF:EFOptions blockId="projName" valueField="projCode" textField="projName"/>
</EF:EFComboColumn>
<EF:EFComboColumn ename="isShare" cname="是否分摊到工序" width="80" align="center" required="true"
readonly="true">
<EF:EFOption label="是" value="0"/>
<EF:EFOption label="否" value="1"/>
</EF:EFComboColumn>
<EF:EFComboColumn ename="costType" cname="费用类型" width="80" align="center" required="true"
readonly="true">
<EF:EFCodeOption codeName="hggp.cw.costType"/>
</EF:EFComboColumn>
<EF:EFColumn ename="costItem" cname="费用项" width="120" align="center" required="true"
/>
<EF:EFColumn ename="amount" cname="费用金额" width="120" align="center" data-regex="/^-?[0-9]{1,17}([.][0-9]{1,3})?$/"
data-errorprompt="请输入数字,该值最大可设置17位整数和3位小数!" required="true"/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
<script>
var ctx = "${ctx}";
</script>
<script src="${ctx}/HG/CW/HGCW052.js"></script>
\ No newline at end of file
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