Commit 31274fd6 by 宋祥

Merge branch 'dev' of http://129.211.46.84:8800/platform/hg-smart into master-dc

# Conflicts:
#	src/main/resources/application.properties
#	src/main/resources/quartz.properties
parents 3e01d464 1d9778cd
......@@ -6,28 +6,11 @@ package com.baosight.hggp.core.constant;
*/
public class CodesetConstant {
/**
* 动态表
*
* @author:songx
* @date:2024/3/1,17:36
*/
public static class HgPz {
// 项目来源
public static final String PROJECT_SOURCE = "app.sc.projectSource";
// 动态表
public static final String DYNAMIC_TABLE = "app.pz.dynamicTable";
}
/**
* 组织机构
*
* @author:songx
* @date:2024/3/1,17:36
*/
public static class XsOg {
// 组织机构类型
public static final String ORG_TYPE = "xs.og.orgType";
}
}
......@@ -132,6 +132,11 @@ public class CommonConstant {
public static final String ENAME = "ename";
// 动态列
public static final String DYNAMIC_COLUMN = "dynamicColumn";
// VALUE_FIELD
public static final String VALUE_FIELD = "valueField";
// TEXT_FIELD
public static final String TEXT_FIELD = "textField";
}
/**
......
......@@ -89,7 +89,7 @@ public class SbTokenApi {
*/
public static String getToken() {
try {
String param = JSON.toJSONString(buildValueJson("Q24022802","a123456"));
String param = JSON.toJSONString(buildValueJson("Q24022802","admin123!@#"));
String url = PlatApplicationContext.getProperty("hpjx.url");
String result = HttpUtils.post(url+"/S_XS_105", param, HttpUtils.JSON_MEDIA_TYPE);
if (StringUtils.isBlank(result)) {
......
package com.baosight.hggp.core.tools;
import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.util.MapUtils;
import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiBlockMeta;
import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.core.ei.EiInfo;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* 2021-04-27 迁移到此处
*
* @author:songx
* @date:2021/4/27,15:21
*/
public class CodeOptionTools {
/**
* 下拉框
*
* @param inInfo
* @param codeName
* @param blockId
* @param isSymbol
*/
public static void buildOption(EiInfo inInfo, String codeName, String blockId, boolean isSymbol) {
EiBlock newBlock = new EiBlock(blockId);
newBlock.addBlockMeta(initCodeMeta());
List<Map> results = CodeValueTools.getCodeValues(codeName);
for (Map result : results) {
Map<String, String> row = new HashMap<>();
String id = MapUtils.getString(result, "value");
String text = MapUtils.getString(result, "label");
row.put(CommonConstant.Field.VALUE_FIELD, id);
row.put(CommonConstant.Field.TEXT_FIELD, isSymbol ? id + "-" + text : text);
newBlock.addRow(row);
}
inInfo.addBlock(newBlock);
}
/**
* 构造下拉框的数据项.
*
* @return
*/
private static EiBlockMeta initCodeMeta() {
EiColumn eiColumn;
EiBlockMeta eiMetadata = new EiBlockMeta();
eiColumn = new EiColumn(CommonConstant.Field.TEXT_FIELD);
eiColumn.setFieldLength(150);
eiColumn.setDescName("描述");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(CommonConstant.Field.VALUE_FIELD);
eiColumn.setFieldLength(30);
eiColumn.setDescName("值");
eiMetadata.addMeta(eiColumn);
return eiMetadata;
}
}
package com.baosight.hggp.hg.bi.service;
import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.hg.pz.utils.HGPZUtils;
import com.baosight.hggp.hg.sc.util.HgScUtils;
import com.baosight.hggp.hg.xs.domain.Company;
import com.baosight.hggp.hg.xs.utils.HGXSUtils;
import com.baosight.hggp.util.CommonMethod;
import com.baosight.hggp.util.DateUtils;
import com.baosight.hggp.util.EiInfoUtils;
import com.baosight.hggp.util.LogUtils;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.service.impl.ServiceBase;
import java.util.Arrays;
import java.util.Map;
/**
* 采购执行情况
*
* @author songx
* @date 2024/11/16,19:22
*/
public class ServiceHGBI011 extends ServiceBase {
/**
* 画面初始化
*
* @param inInfo
* @return
*/
public EiInfo initLoad(EiInfo inInfo) {
try {
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.COMPANY_CODE_BLOCK_ID), null, true);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.PROJ_RECORD_BLOCK_ID), null, true);
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
/**
* 查询操作
*
* @param inInfo
* @return
*/
@Override
public EiInfo query(EiInfo inInfo) {
try {
Map queryMap = EiInfoUtils.getFirstRow(inInfo);
queryMap.put("receiptDate", DateUtils.formatShort(queryMap.get("receiptDate")));
inInfo = super.query(inInfo, "HGBI011.query");
// 设置公司名称
HGXSUtils.XsOrg.setInfo(inInfo, Company.FIELD_COMPANY_CODE, Company.FIELD_COMPANY_NAME);
// 设置项目名称
HgScUtils.HgSc001.setInfo(inInfo);
// 供应商名称
HGPZUtils.HgPz003.setInfo(inInfo);
} catch (Exception e) {
LogUtils.setDetailMsg(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="HGBI011">
<sql id="condition">
<isNotEmpty prepend=" AND " property="accountCode">
ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projCode">
PROJ_CODE = #projCode#
</isNotEmpty>
</sql>
<select id="query" parameterClass="java.util.HashMap" resultClass="java.util.HashMap">
SELECT
T.receiptDate, T.companyCode, T.supCode, T.projCode,
IFNULL(MAX(T.contractAmount), 0) as "contractAmount",
IFNULL(MAX(T.deliveryAmount), 0) as "deliveryAmount",
IFNULL(MAX(T.receiptAmount), 0) as "receiptAmount",
IFNULL(MAX(T.remainingAmount), 0) as "remainingAmount",
IFNULL(MAX(T.payAmount), 0) as "payAmount",
IFNULL(MAX(T.nonPayAmount), 0) as "nonPayAmount"
FROM (
SELECT
CONTRACT_DATE as "receiptDate",
COMPANY_CODE as "companyCode",
SUP_CODE as "supCode",
PROJ_CODE as "projCode",
SUM(TAX_INCLUDE_AMOUNT) as "contractAmount",
0 as "deliveryAmount",
0 as "receiptAmount",
0 as "remainingAmount",
0 as "payAmount",
0 as "nonPayAmount"
FROM HGGP.HGCG002
WHERE DELETE_FLAG = 0
<include refid="condition"/>
<isNotEmpty prepend=" AND " property="receiptDate">
CONTRACT_DATE = #receiptDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="supName">
SUP_NAME LIKE CONCAT("%", #supName#, "%")
</isNotEmpty>
GROUP BY CONTRACT_DATE, COMPANY_CODE, SUP_CODE, PROJ_CODE
UNION ALL
SELECT
RECEIVE_DATE as "receiptDate",
COMPANY_CODE as "companyCode",
SUP_CODE as "supCode",
PROJ_CODE as "projCode",
0 as "contractAmount",
SUM(TAX_INCLUDE_AMOUNT) as "deliveryAmount",
0 as "receiptAmount",
0 as "remainingAmount",
0 as "payAmount",
0 as "nonPayAmount"
FROM HGGP.HGCG003
WHERE DELETE_FLAG = 0
<include refid="condition"/>
<isNotEmpty prepend=" AND " property="receiptDate">
RECEIVE_DATE = #receiptDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="supName">
SUP_NAME LIKE CONCAT("%", #supName#, "%")
</isNotEmpty>
GROUP BY RECEIVE_DATE, COMPANY_CODE, SUP_CODE, PROJ_CODE
UNION ALL
SELECT
RECEIVE_DATE as "receiptDate",
COMPANY_CODE as "companyCode",
PARTY_A as "supCode",
PROJ_CODE as "projCode",
0 as "contractAmount",
0 as "deliveryAmount",
SUM(TOTAL_CONTRACT_PRICE_INCLUDING) as "receiptAmount",
SUM(REMAINING_AMOUNT) as "remainingAmount",
0 as "payAmount",
0 as "nonPayAmount"
FROM HGGP.HGCW012
WHERE 1=1
<include refid="condition"/>
<isNotEmpty prepend=" AND " property="receiptDate">
RECEIVE_DATE = #receiptDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="supName">
PARTY_A LIKE CONCAT("%", #supName#, "%")
</isNotEmpty>
GROUP BY RECEIVE_DATE, COMPANY_CODE, PARTY_A, PROJ_CODE
UNION ALL
SELECT
SIGNING_DATE as "receiptDate",
COMPANY_CODE as "companyCode",
PARTY_A as "supCode",
PROJ_CODE as "projCode",
0 as "contractAmount",
0 as "deliveryAmount",
0 as "receiptAmount",
0 as "remainingAmount",
SUM(CASE CANCEL_STATUS WHEN 2 THEN TOTAL_CONTRACT_PRICE_INCLUDING ELSE 0 END) as "payAmount",
SUM(CASE CANCEL_STATUS WHEN 1 THEN TOTAL_CONTRACT_PRICE_INCLUDING ELSE 0 END) as "nonPayAmount"
FROM HGGP.HGCW016
WHERE 1=1
<include refid="condition"/>
<isNotEmpty prepend=" AND " property="receiptDate">
SIGNING_DATE = #receiptDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="supName">
PARTY_A LIKE CONCAT("%", #supName#, "%")
</isNotEmpty>
GROUP BY SIGNING_DATE, COMPANY_CODE, PARTY_A, PROJ_CODE
) T
GROUP BY T.receiptDate, T.companyCode, T.supCode, T.projCode
ORDER BY T.receiptDate DESC
</select>
</sqlMap>
\ No newline at end of file
......@@ -125,9 +125,9 @@ public class ServiceHGCG002C extends ServiceEPBase {
String contractNo = fCg002.getContractNo();
AssertUtils.isNull(dbCg002, String.format("合同单【%s】不存在", contractNo));
AssertUtils.isNotEquals(dbCg002.getDeleteFlag(), CommonConstant.YesNo.NO_0,
String.format("建议单【%s】不是\"未删除\"状态,不允许操作", contractNo));
String.format("合同单【%s】不是\"未删除\"状态,不允许操作", contractNo));
AssertUtils.isNotEquals(dbCg002.getStatus(), HGConstant.DealStatus.S0,
String.format("建议单【%s】不是\"未审核\"状态,不允许操作", contractNo));
String.format("合同单【%s】不是\"未审核\"状态,不允许操作", contractNo));
}
}
package com.baosight.hggp.hg.cw.service;
import com.baosight.hggp.core.security.UserSessionUtils;
import com.baosight.hggp.hg.xs.domain.Company;
import com.baosight.hggp.util.EiInfoUtils;
import com.baosight.hggp.util.LogUtils;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
/**
* @author LiuYang
* @version 1.0 2024/11/17
* @description 销售执行情况表
*/
public class ServiceHGCW010F extends ServiceEPBase {
@Override
public EiInfo initLoad(EiInfo inInfo) {
try {
EiInfoUtils.addBlock(inInfo, "roleCompany", UserSessionUtils.getRoleCompany(), Company.class);
} catch (Exception e) {
LogUtils.setMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
@Override
public EiInfo query(EiInfo inInfo) {
try {
inInfo = super.query(inInfo, "HGCW010F.query");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
}
......@@ -11,16 +11,26 @@ import com.baosight.hggp.hg.constant.HGConstant;
import com.baosight.hggp.hg.constant.HGSqlConstant;
import com.baosight.hggp.hg.cw.tools.HGCWTools;
import com.baosight.hggp.hg.cw.vo.UserVO;
import com.baosight.hggp.hg.kc.domain.*;
import com.baosight.hggp.hg.kc.domain.HGKC005;
import com.baosight.hggp.hg.kc.domain.HGKC006;
import com.baosight.hggp.hg.kc.domain.HGKC006A;
import com.baosight.hggp.hg.kc.domain.HGKC007;
import com.baosight.hggp.hg.kc.domain.HGKC007A;
import com.baosight.hggp.hg.kc.tools.HGKCTools;
import com.baosight.hggp.hg.kc.utils.HGKCUtils;
import com.baosight.hggp.hg.pz.domain.HGPZ005;
import com.baosight.hggp.hg.pz.tools.HGPZTools;
import com.baosight.hggp.hg.sc.domain.HGSC004A;
import com.baosight.hggp.hg.sc.tools.HGSCTools;
import com.baosight.hggp.hg.xs.utils.HGXSUtils;
import com.baosight.hggp.hg.yx.domain.HGYX001;
import com.baosight.hggp.util.*;
import com.baosight.hggp.util.AssertUtils;
import com.baosight.hggp.util.CommonMethod;
import com.baosight.hggp.util.DateUtils;
import com.baosight.hggp.util.EiInfoUtils;
import com.baosight.hggp.util.ErrorCodeUtils;
import com.baosight.hggp.util.ExcelUtils;
import com.baosight.hggp.util.LogUtils;
import com.baosight.hggp.util.ObjectUtils;
import com.baosight.hggp.util.StringUtil;
import com.baosight.hggp.util.StringUtils;
import com.baosight.hggp.util.contants.ACConstants;
import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant;
......@@ -32,7 +42,11 @@ import com.baosight.iplat4j.ed.util.SequenceGenerator;
import org.apache.commons.collections.MapUtils;
import java.math.BigDecimal;
import java.util.*;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @author LiuYang
......@@ -62,9 +76,9 @@ public class ServiceHGKC005 extends ServiceEPBase {
DdynamicEnum.SPEC_RECORD_BLOCK_ID,
DdynamicEnum.INVENT_TYPE_BLOCK_ID), queryMap);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGKC005().eiMetadata);
UserVO userVO = HGCWTools.HgCw002.getUserCompany();
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGYX001.FIELD_COMPANY_CODE, userVO.getUsercode());
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0,HGYX001.FIELD_COMPANY_NAME, userVO.getUsername());
// UserVO userVO = HGCWTools.HgCw002.getUserCompany();
// inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGYX001.FIELD_COMPANY_CODE, userVO.getUsercode());
// inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0,HGYX001.FIELD_COMPANY_NAME, userVO.getUsername());
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
......
......@@ -110,7 +110,7 @@ public class ServiceHGPZ021 extends ServiceBase {
*/
private void checkImportData(List<HGPZ021> fPz021s) {
// 表名称小代码
List<Map> dynamicTables = CodeValueTools.getCodeValues(CodesetConstant.HgPz.DYNAMIC_TABLE);
List<Map> dynamicTables = CodeValueTools.getCodeValues(CodesetConstant.DYNAMIC_TABLE);
for (HGPZ021 fPz021 : fPz021s) {
AssertUtils.isEmpty(fPz021.getTableCode(), String.format("序号[%s]表英文名不能为空", fPz021.getId()));
for (Map dynamicTableMap : dynamicTables) {
......
package com.baosight.hggp.hg.pz.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.hg.pz.domain.HGPZ022;
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.List;
import java.util.Map;
/**
* 抛帐管理
*
* @author:
* @date:2024/1/15,11:20
*/
public class ServiceHGPZ022 extends ServiceBase {
/**
* 画面初始化
*
* @param inInfo
* @return
*/
@Override
@OperationLogAnnotation(operModul = "抛帐管理", operType = "查询", operDesc = "初始化")
public EiInfo initLoad(EiInfo inInfo) {
try {
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGPZ022().eiMetadata);
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
/**
* 查询数据列表
*
* @param inInfo
* @return
*/
@Override
@OperationLogAnnotation(operModul = "抛帐管理", operType = "查询", operDesc = "查询")
public EiInfo query(EiInfo inInfo) {
try {
inInfo = super.query(inInfo, HGPZ022.QUERY, new HGPZ022());
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
/**
* 删除操作
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "抛帐管理", operType = "删除", operDesc = "删除操作")
@Override
public EiInfo delete(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
for (Map resultRow : resultRows) {
HGPZ022 hgpz022 = new HGPZ022();
hgpz022.fromMap(resultRow);
DaoUtils.update(HGPZ022.DELETE, hgpz022);
}
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 redFlush(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
for (Map resultRow : resultRows) {
HGPZ022 hgpz022 = new HGPZ022();
hgpz022.fromMap(resultRow);
}
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 againSend(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
for (Map resultRow : resultRows) {
HGPZ022 hgpz022 = new HGPZ022();
hgpz022.fromMap(resultRow);
}
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.pz.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.hg.pz.domain.HGPZ022A;
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.ServiceEPBase;
/**
* 抛帐管理明细
*
* @author:songx
* @date:2024/1/25,15:25
*/
public class ServiceHGPZ022A extends ServiceEPBase {
/**
* 画面初始化
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "抛帐管理明细",operType = "查询",operDesc = "初始化")
public EiInfo initLoad(EiInfo inInfo) {
try {
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGPZ022A().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, "HGPZ022A.query", new HGPZ022A());
} catch (Throwable e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-2.dtd"> <!-- table information
Generate time : 2024-05-07 16:07:20
Version : 1.0
schema : hggp
tableName : HGPZ003
ID BIGINT NOT NULL primarykey,
ACCOUNT_CODE VARCHAR,
DEP_CODE VARCHAR,
SUP_TYPE TINYINT NOT NULL,
SUP_CLASS TINYINT NOT NULL,
SUP_CODE VARCHAR NOT NULL,
SUP_NAME VARCHAR NOT NULL,
HEAD_NAME VARCHAR,
PHONE_NAME VARCHAR,
ADDRESS VARCHAR NOT NULL,
OPEN_BANK_CODE VARCHAR,
OPEN_BANK_NAME VARCHAR,
ACCOUNT_NUM VARCHAR,
ASS_LEVEL VARCHAR,
SCORE DECIMAL NOT NULL,
FILE_PATH VARCHAR,
STATUS TINYINT NOT NULL,
CREATED_BY VARCHAR,
CREATED_NAME VARCHAR,
CREATED_TIME VARCHAR,
UPDATED_BY VARCHAR,
UPDATED_NAME VARCHAR,
UPDATED_TIME VARCHAR,
DELETE_FLAG TINYINT
-->
<!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://www.ibatis.com/dtd/sql-map-2.dtd">
<sqlMap namespace="HGPZ003">
<sql id="condition">
......@@ -109,28 +80,13 @@
</isNotEmpty>
</sql>
<!--<sql id="authCondition">
&lt;!&ndash; 无权限时使用 &ndash;&gt;
<isNotEmpty prepend=" AND " property="authDepCode">
DEP_CODE = #authDepCode#
<sql id="customCondition">
<isNotEmpty prepend=" AND " property="supCodes">
SUP_CODE IN <iterate close=")" open="(" conjunction="," property="supCodes">#supCodes[]#</iterate>
</isNotEmpty>
&lt;!&ndash; 仅本人和部门组合 &ndash;&gt;
<isEqual prepend=" AND " property="authCombination" compareValue="1">
(CREATED_BY = #authOnlyPeople# OR DEP_CODE IN <iterate close=")" open="(" conjunction="," property="authDepCodes">#authDepCodes[]#</iterate>)
</isEqual>
&lt;!&ndash; 仅本人或部门 &ndash;&gt;
<isNotEqual prepend=" AND " property="authCombination" compareValue="1">
<isNotEmpty property="authOnlyPeople">
CREATED_BY = #authOnlyPeople#
</isNotEmpty>
<isNotEmpty property="authDepCodes">
DEP_CODE IN <iterate close=")" open="(" conjunction="," property="authDepCodes">#authDepCodes[]#</iterate>
</isNotEmpty>
</isNotEqual>
</sql>-->
</sql>
<select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hggp.hg.pz.domain.HGPZ003">
<select id="query" resultClass="com.baosight.hggp.hg.pz.domain.HGPZ003">
SELECT
ID as "id",
ACCOUNT_CODE as "accountCode", <!-- 帐套编码 -->
......@@ -157,8 +113,10 @@
UPDATED_TIME as "updatedTime", <!-- 更新时间 -->
DELETE_FLAG as "deleteFlag", <!-- 是否删除0:否1.是 -->
TAX_CODE as "taxCode"
FROM ${hggpSchema}.HGPZ003 WHERE 1=1 AND DELETE_FLAG = 0
<include refid="condition" />
FROM ${hggpSchema}.HGPZ003
WHERE 1=1
AND DELETE_FLAG = 0
<include refid="customCondition"/>
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
......@@ -167,89 +125,13 @@
CREATED_TIME desc
</isEmpty>
</dynamic>
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hggpSchema}.HGPZ003 WHERE 1=1 AND DELETE_FLAG = 0
<include refid="condition" />
<include refid="customCondition" />
</select>
<!--
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="accountCode">
ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="supType">
SUP_TYPE = #supType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="supClass">
SUP_CLASS = #supClass#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="supCode">
SUP_CODE = #supCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="supName">
SUP_NAME = #supName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="headName">
HEAD_NAME = #headName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="phoneName">
PHONE_NAME = #phoneName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="address">
ADDRESS = #address#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="openBankCode">
OPEN_BANK_CODE = #openBankCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="openBankName">
OPEN_BANK_NAME = #openBankName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="accountNum">
ACCOUNT_NUM = #accountNum#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="assLevel">
ASS_LEVEL = #assLevel#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="score">
SCORE = #score#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="filePath">
FILE_PATH = #filePath#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="status">
STATUS = #status#
</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>
-->
<insert id="insert">
INSERT INTO ${hggpSchema}.HGPZ003 (ID,
ACCOUNT_CODE, <!-- 帐套编码 -->
......@@ -277,7 +159,9 @@
DELETE_FLAG, <!-- 是否删除0:否1.是 -->
TAX_CODE
)
VALUES (#id#, #accountCode#, #depCode#, #supType#, #supClass#, #supCode#, #supName#, #headName#, #phoneName#, #address#, #openBankCode#, #openBankName#, #accountNum#, #assLevel#, #score#, #filePath#, #status#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #deleteFlag#,#taxCode#)
VALUES (#id#, #accountCode#, #depCode#, #supType#, #supClass#, #supCode#, #supName#, #headName#, #phoneName#,
#address#, #openBankCode#, #openBankName#, #accountNum#, #assLevel#, #score#, #filePath#, #status#, #createdBy#,
#createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #deleteFlag#,#taxCode#)
</insert>
<delete id="delete">
......
......@@ -102,6 +102,36 @@ public class HGPZTools {
queryMap.put("supType", supType);
return DaoBase.getInstance().query(HGPZ003.QUERY, queryMap);
}
/**
* 查询存货信息
*
* @param supCodes
* @return
*/
public static List<HGPZ003> list(List<String> supCodes) {
if (CollectionUtils.isEmpty(supCodes)) {
return null;
}
Map queryMap = new HashMap();
queryMap.put("supCodes", supCodes);
return DaoBase.getInstance().query(HGPZ003.QUERY, queryMap);
}
/**
* 查询存货信息
*
* @param supCodes
* @return
*/
public static Map<String, HGPZ003> map(List<String> supCodes) {
List<HGPZ003> results = list(supCodes);
if (CollectionUtils.isEmpty(results)) {
return null;
}
return results.stream().collect(Collectors.toMap(HGPZ003::getSupCode, item -> item));
}
}
/**
......
package com.baosight.hggp.hg.pz.utils;
import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.hg.pz.domain.HGPZ003;
import com.baosight.hggp.hg.pz.domain.HGPZ020;
import com.baosight.hggp.hg.pz.domain.HGPZ020A;
import com.baosight.hggp.hg.pz.domain.HGPZ021;
......@@ -8,6 +9,7 @@ import com.baosight.hggp.hg.pz.enums.DynamicTableEnum;
import com.baosight.hggp.hg.pz.tools.HGPZTools;
import com.baosight.hggp.util.EiInfoUtils;
import com.baosight.hggp.util.MapUtils;
import com.baosight.hggp.util.ObjectUtils;
import com.baosight.hggp.util.StringUtils;
import com.baosight.iplat4j.core.data.DaoEPBase;
import com.baosight.iplat4j.core.ei.EiBlock;
......@@ -30,6 +32,38 @@ import java.util.stream.Collectors;
public class HGPZUtils {
/**
* HGPZ003 定义
*
* @author songx
* @date 2024/11/6,15:48
*/
public static class HgPz003 {
/**
* 设置信息
*
* @param inInfo
*/
public static void setInfo(EiInfo inInfo) {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
List<String> supCodes = ObjectUtils.listKey(resultRows, HGPZ003.FIELD_SUP_CODE);
if (CollectionUtils.isEmpty(supCodes)) {
return;
}
Map<String, HGPZ003> resultMap = HGPZTools.HgPz003.map(supCodes);
if (MapUtils.isEmpty(resultMap)) {
return;
}
for (Map resultRow : resultRows) {
String projCode = MapUtils.getString(resultRow, HGPZ003.FIELD_SUP_CODE);
HGPZ003 dbPz003 = resultMap.get(projCode);
resultRow.put(HGPZ003.FIELD_SUP_NAME, dbPz003 == null ? "" : dbPz003.getSupName());
}
}
}
/**
* HGPZ020 定义
*
* @author songx
......
......@@ -50,7 +50,8 @@ public class ServiceHGSB010 extends ServiceEPBase {
public EiInfo queryBySbStatus(EiInfo inInfo) {
Map params = EiInfoUtils.getFirstRow(inInfo);
if (params.containsKey("date")){
params.put("date", DateUtils.formatShort(params.get("date")));
params.remove("date");
//params.put("date", DateUtils.formatShort(params.get("date")));
}
List<Map> result = DaoBase.getInstance().query("HGSB010.queryBySbStatus", params);
inInfo.set("result",result);
......
......@@ -186,17 +186,18 @@
INNER join (
select EQUIPMENT_CODE, LOG_VALUE
from ${hggpSchema}.HGSB010 where EQUIPMENT_TYPE = 'STARUS_TYPE'
and CREATED_TIME =(
select MAX(CREATED_TIME) from ${hggpSchema}.HGSB010
where EQUIPMENT_TYPE = 'STARUS_TYPE'
<isNotEmpty prepend=" AND " property="accountCode">
ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="date">
CREATED_TIME =(
select MAX(CREATED_TIME) from ${hggpSchema}.HGSB010
where EQUIPMENT_TYPE = 'STARUS_TYPE' and left(CREATED_TIME,8) = #date#
<isNotEmpty prepend=" AND " property="accountCode">
ACCOUNT_CODE = #accountCode#
left(CREATED_TIME,8) = #date#
</isNotEmpty>
)
<isNotEmpty prepend=" AND " property="accountCode">
ACCOUNT_CODE = #accountCode#
</isNotEmpty>
) c on a.DEVICE_CODE = c.EQUIPMENT_CODE
where a.DELETE_FLAG = 0 and a.DEVICE_STATUS = 1
......
......@@ -317,10 +317,10 @@ public class ServiceHGSC007 extends ServiceEPBase {
if (queryRow.containsKey("depositDate")) {
queryRow.put("depositDate", DateUtils.formatShort(queryRow.get("depositDate")));
}
queryRow.put("processNames",Arrays.asList("切割下料","烧焊","车加工","铣加工","动平衡","装配"));
//queryRow.put("processNames",Arrays.asList("切割下料","烧焊","车加工","铣加工","动平衡","装配"));
// List<Map> result = DaoBase.getInstance().query("HGSC007.queryBySunWt", queryRow);
List<HashMap<String, Object>> result = (List<HashMap<String, Object>>)DaoBase.getInstance().query("HGSC007.queryBySunWt", queryRow);
List<String> processNamesList = Arrays.asList("切割下料","烧焊","车加工","铣加工","动平衡","装配"); //"组立", "油漆", "埋弧盖面", "抛丸除锈", "拼装", "焊接"
/*List<String> processNamesList = Arrays.asList("切割下料","烧焊","车加工","铣加工","动平衡","装配"); //"组立", "油漆", "埋弧盖面", "抛丸除锈", "拼装", "焊接"
List<Object> resultList = new ArrayList<>();
for (String processNames:processNamesList){
for(Map<String, Object> item :result){
......@@ -328,9 +328,9 @@ public class ServiceHGSC007 extends ServiceEPBase {
resultList.add(item.get("totalWeight"));
}
}
}
}*/
EiBlock block = new EiBlock("result");
block.set("processNameList",resultList);
block.set("processNameList",result);
inInfo.addBlock(block);
// Object processNames = queryRow.get("processNames");
// for(Object item:processNames){
......@@ -399,9 +399,15 @@ public class ServiceHGSC007 extends ServiceEPBase {
List<Org> factoryCodes = new ArrayList<>();
try {
List<String> roleCompanyCode = HGSBTools.getRoleCompanyCode();
String accountCode = UserSessionUtils.getAccountCode();
if ("Q24072514".equals(accountCode)){
factoryCodes.addAll(HGXSTools.XsOrg.queryByParent("R24072632", OrgTypeEnum.FACTORY.getCode()));
}else {
Optional.ofNullable(roleCompanyCode).orElse(new ArrayList<>()).stream().forEach(code -> {
factoryCodes.addAll(HGXSTools.XsOrg.queryByParent(code, OrgTypeEnum.FACTORY.getCode()));
});
}
List list = factoryCodes.stream()
.filter(o -> com.baosight.hggp.util.StringUtils.equals(o.getOrgType(), OrgTypeEnum.FACTORY.getCode()))
.map(item -> new Factory(item.getCompanyCode(), item.getCompanyName(), item.getOrgId(),
......
......@@ -1268,12 +1268,14 @@
<!--工序累计产量-->
<select id="queryBySunWt" parameterClass="java.util.HashMap" resultClass="java.util.HashMap">
select
A.SORT as "sort",
A.process_name as "processName",
ROUND(ifnull(SUM(B.INV_WEIGHT),0)/1000, 4) "totalWeight"
from ${hggpSchema}.HGGY001 A
join ${platSchema}.TXSOG01 C on A.FACTORY_CODE = C.COMPANY_CODE
left join (
select
h.COMPANY_CODE,
h2.process_code ,
ROUND(ifnull(SUM(h.INV_WEIGHT), 0)/ 1000, 4) "INV_WEIGHT"
from ${hggpSchema}.hgkc003 h
......@@ -1285,20 +1287,24 @@
<isNotEmpty prepend=" AND " property="depositDate">
left(h.DEPOSIT_DATE,6) = left(#depositDate#,6)
</isNotEmpty>
group by h2.process_code
) B on A.process_code = B.process_code
where 1=1 and DELETE_FLAG = '0'
group by h.COMPANY_CODE, h2.process_code
) B on A.FACTORY_CODE = B.COMPANY_CODE AND A.process_code = B.process_code
where 1=1 and DELETE_FLAG = '0' and reveal = 1
<isNotEmpty prepend=" AND " property="accountCode">
A.account_code = #accountCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="processNames">
A.process_name IN <iterate close=")" open="(" conjunction="," property="processNames">#processNames[]#</iterate>
</isNotEmpty>
<isNotEmpty prepend=" AND " property="factoryCode">
C.factory_code = #factoryCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="factoryName">
C.factory_name = #factoryName#
</isNotEmpty>
group by
A.process_name
A.SORT, A.process_name
order by A.SORT
</select>
<!--日期到条件7天日产量-->
<select id="queryByDayWt" parameterClass="java.util.HashMap" resultClass="java.util.HashMap">
......
......@@ -278,6 +278,17 @@ public class HGSCTools {
queryMap.put("projCodes", projCodes);
return DaoBase.getInstance().query(HGSC001.QUERY, queryMap);
}
/**
* 查询
*
* @param projCodes
* @return
*/
public static Map<String, HGSC001> map(List<String> projCodes) {
List<HGSC001> results = queryByCode(projCodes);
return results.stream().collect(Collectors.toMap(HGSC001::getProjCode, item -> item));
}
}
public static class Hgsc003 {
......
......@@ -4,19 +4,20 @@ import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.core.enums.DeleteFlagEnum;
import com.baosight.hggp.core.security.UserSessionUtils;
import com.baosight.hggp.hg.kc.domain.HGKC010;
import com.baosight.hggp.hg.kc.tools.HGKCTools;
import com.baosight.hggp.hg.sc.constant.HgScSqlConstant;
import com.baosight.hggp.hg.sc.domain.HGSC001;
import com.baosight.hggp.hg.sc.domain.HGSC004A;
import com.baosight.hggp.hg.sc.domain.HGSC007;
import com.baosight.hggp.hg.sc.domain.HGSC007B;
import com.baosight.hggp.hg.sc.domain.HGSC010A;
import com.baosight.hggp.hg.sc.tools.HGSCTools;
import com.baosight.hggp.hg.xs.domain.HGXS007;
import com.baosight.hggp.hg.xs.domain.User;
import com.baosight.hggp.hg.xs.tools.HGXSTools;
import com.baosight.hggp.util.BeanUtils;
import com.baosight.hggp.util.MapUtils;
import com.baosight.hggp.util.ObjectUtils;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.xservices.xs.util.LoginUserDetails;
import org.apache.commons.collections.CollectionUtils;
......@@ -32,6 +33,38 @@ import java.util.stream.Collectors;
public class HgScUtils {
/**
* HGSC001 定义
*
* @author songx
* @date 2024/11/17,15:55
*/
public static class HgSc001 {
/**
* 设置信息
*
* @param inInfo
*/
public static void setInfo(EiInfo inInfo) {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
List<String> projCodes = ObjectUtils.listKey(resultRows, HGSC001.FIELD_proj_code);
if (CollectionUtils.isEmpty(projCodes)) {
return;
}
Map<String, HGSC001> resultMap = HGSCTools.Hgsc001.map(projCodes);
if (MapUtils.isEmpty(resultMap)) {
return;
}
for (Map resultRow : resultRows) {
String projCode = MapUtils.getString(resultRow, HGSC001.FIELD_proj_code);
HGSC001 dbSc001 = resultMap.get(projCode);
resultRow.put(HGSC001.FIELD_proj_name, dbSc001 == null ? "" : dbSc001.getProjName());
}
}
}
/**
* @author:jhs
* @date:2024/10/27,16:17
*/
......
......@@ -47,6 +47,8 @@ public class HGSJ001 extends DaoEPBase {
public static final String FIELD_COMPUTE_TYPE = "computeType"; /* 计算类型*/
public static final String FIELD_COST_WEIGHT = "costWeight";
public static final String FIELD_OVERLAP_DAY = "overlapDay"; /* 前后工序重叠天数*/
public static final String FIELD_REVEAL = "reveal"; /*是否驾驶舱显示*/
public static final String FIELD_SORT = "sort"; /*排序*/
public static final String COL_ID = "ID"; /* 主键id*/
public static final String COL_ACCOUNT_CODE = "ACCOUNT_CODE"; /* 企业编码 预留*/
......@@ -102,6 +104,8 @@ public class HGSJ001 extends DaoEPBase {
private Integer computeType = 0;
private BigDecimal costWeight = new BigDecimal(0.000);
private Integer overlapDay = 0; /* 前后工序重叠天数*/
private Integer reveal = 0; /*是否驾驶舱显示*/
private Integer sort = 0; /*排序*/
/**
* initialize the metadata.
......@@ -219,6 +223,16 @@ public class HGSJ001 extends DaoEPBase {
eiColumn.setDescName("前后工序重叠天数");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_REVEAL);
eiColumn.setType("N");
eiColumn.setDescName("是否驾驶舱显示");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_SORT);
eiColumn.setType("N");
eiColumn.setDescName("排序");
eiMetadata.addMeta(eiColumn);
}
/**
......@@ -582,6 +596,22 @@ public class HGSJ001 extends DaoEPBase {
this.overlapDay = overlapDay;
}
public Integer getReveal() {
return reveal;
}
public void setReveal(Integer reveal) {
this.reveal = reveal;
}
public Integer getSort() {
return sort;
}
public void setSort(Integer sort) {
this.sort = sort;
}
/**
* get the value from Map.
*
......@@ -614,6 +644,8 @@ public class HGSJ001 extends DaoEPBase {
setComputeType(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_COMPUTE_TYPE)), computeType));
setCostWeight(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_COST_WEIGHT)), costWeight));
setOverlapDay(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_OVERLAP_DAY)), overlapDay));
setReveal(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_REVEAL)), reveal));
setSort(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_SORT)), sort));
}
/**
......@@ -647,6 +679,8 @@ public class HGSJ001 extends DaoEPBase {
map.put(FIELD_COMPUTE_TYPE, StringUtils.toString(computeType, eiMetadata.getMeta(FIELD_COMPUTE_TYPE)));
map.put(FIELD_COST_WEIGHT,StringUtils.toString(costWeight, eiMetadata.getMeta(FIELD_COST_WEIGHT)));
map.put(FIELD_OVERLAP_DAY,StringUtils.toString(overlapDay, eiMetadata.getMeta(FIELD_OVERLAP_DAY)));
map.put(FIELD_REVEAL,StringUtils.toString(reveal, eiMetadata.getMeta(FIELD_REVEAL)));
map.put(FIELD_SORT,StringUtils.toString(sort, eiMetadata.getMeta(FIELD_SORT)));
return map;
}
......
......@@ -26,7 +26,9 @@
STATUS as "status", <!-- 状态0.停止1.启动 -->
COMPUTE_TYPE as "computeType",
COST_WEIGHT as "costWeight", <!-- 费用权重 -->
OVERLAP_DAY as "overlapDay" <!-- 前后工序重叠天数 -->
OVERLAP_DAY as "overlapDay", <!-- 前后工序重叠天数 -->
REVEAL as "reveal",
SORT as "sort"
</sql>
<sql id="condition">
......@@ -107,6 +109,12 @@
<isNotEmpty prepend=" AND " property="computeType">
COMPUTE_TYPE = #computeType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="reveal">
REVEAL = #reveal#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="sort">
SORT = #sort#
</isNotEmpty>
</sql>
<sql id="orderBy">
......@@ -115,7 +123,7 @@
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
CREATED_TIME DESC, ID ASC
SORT, CREATED_TIME DESC, ID ASC
</isEmpty>
</dynamic>
</sql>
......@@ -152,12 +160,12 @@
PRINC, <!-- 负责人 -->
PRINC_NAME,
STATUS, <!-- 状态0.停止1.启动 -->
COMPUTE_TYPE, COST_WEIGHT, OVERLAP_DAY
COMPUTE_TYPE, COST_WEIGHT, OVERLAP_DAY, REVEAL, SORT
) VALUES (
#accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#,
#deleteFlag#, #factoryCode#, #factoryName#, #processCode#, #processName#,
#unit#, #standardJob#, #standardDays#, #standardNum#, #princ#, #princName#,
#status#, #computeType#, #costWeight#, #overlapDay#)
#status#, #computeType#, #costWeight#, #overlapDay#,#reveal#,#sort#)
</insert>
<delete id="delete">
......@@ -195,7 +203,9 @@
STATUS = #status#, <!-- 状态0.停止1.启动 -->
COMPUTE_TYPE = #computeType#,
COST_WEIGHT = #costWeight#,
OVERLAP_DAY = #overlapDay#
OVERLAP_DAY = #overlapDay#,
REVEAL = #reveal#,
SORT = #sort#
WHERE ID = #id#
</update>
......
package com.baosight.hggp.hg.wd.service;
import com.baosight.hggp.core.constant.CodesetConstant;
import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.dao.DaoBase;
import com.baosight.hggp.core.security.UserSessionUtils;
......@@ -31,6 +32,7 @@ import org.apache.commons.lang.StringUtils;
import org.springframework.util.CollectionUtils;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
......@@ -246,7 +248,7 @@ public class ServiceHGWD001D extends TreeService {
boolean isManager = HgWdUtils.HgWd009.isManager();
List<String> projectSources = isManager ? null : listTopNode();
// 项目来源小代码
List<Map> codesetMaps = CodeValueTools.getCodeValues("app.sc.projectSource");
List<Map> codesetMaps = CodeValueTools.getCodeValues(CodesetConstant.PROJECT_SOURCE);
for (Map codesetMap : codesetMaps) {
String id = MapUtils.getString(codesetMap, "value");
String text = MapUtils.getString(codesetMap, "label");
......@@ -400,8 +402,23 @@ public class ServiceHGWD001D extends TreeService {
if (!HgWdUtils.HgWd009.isManager()) {
queryMap.put("userId", UserSessionUtils.getLoginName());
}
queryMap.put(HGSC001.FIELD_approval_status, HGConstant.ApprovalStatus.YS);
List<HGWD001> nodeWds = dao.query(HGWD001.QUERY, queryMap);
// 查询父级结构
if (CollectionUtils.isEmpty(nodeWds)) {
return inInfo;
}
List<List<String>> allPath = new ArrayList<>();
for (HGWD001 nodeWd : nodeWds) {
String fileIdPath = nodeWd.getFileIdPath();
if (StringUtils.isBlank(fileIdPath)) {
continue;
}
List<String> fileIds = Arrays.stream(fileIdPath.split("/"))
.filter(StringUtils::isNotBlank).collect(Collectors.toList());
fileIds.add(nodeWd.getFileId());
allPath.add(fileIds);
}
inInfo.set("allPath", allPath);
} catch (Exception e) {
LogUtils.setMsg(inInfo, e, "搜索节点失败");
}
......
......@@ -96,7 +96,7 @@ public class ServiceHGWD001E extends ServiceEPBase {
hgwd001.setFileIdPath(setFileIdPath(hgsc001));
} else {
hgwd001.setFilePath(wd001.getFilePath() + "/" + hgwd001.getFileName());
hgwd001.setFileIdPath(wd001.getFilePath() + "/" + hgwd001.getFileId());
hgwd001.setFileIdPath(wd001.getFileIdPath() + "/" + wd001.getFileId());
}
if (hgwd001.getId() == null || hgwd001.getId() == 0) {
this.add(hgwd001);
......
......@@ -85,7 +85,7 @@ public class ServiceHGWD001F extends ServiceEPBase {
hgwd001.setFileIdPath(setFileIdPath(hgsc001));
} else {
hgwd001.setFilePath(wd001.getFilePath() + "/" + hgwd001.getFileName());
hgwd001.setFileIdPath(wd001.getFilePath() + "/" + hgwd001.getFileId());
hgwd001.setFileIdPath(wd001.getFileIdPath() + "/" + hgwd001.getFileId());
}
if (hgwd001.getId() == null || hgwd001.getId() == 0) {
this.add(hgwd001);
......
......@@ -2,7 +2,9 @@ package com.baosight.hggp.hg.wd.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.core.constant.CodesetConstant;
import com.baosight.hggp.core.security.UserSessionUtils;
import com.baosight.hggp.core.tools.CodeOptionTools;
import com.baosight.hggp.hg.sc.enums.ProjectSourceEnum;
import com.baosight.hggp.hg.wd.constant.HgWdConstant;
import com.baosight.hggp.hg.wd.domain.HGWD001;
......@@ -37,6 +39,7 @@ public class ServiceHGWD002 extends ServiceBase {
public EiInfo initLoad(EiInfo inInfo) {
try {
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.PROJ_RECORD_BLOCK_ID));
CodeOptionTools.buildOption(inInfo, CodesetConstant.PROJECT_SOURCE, "project_source", false);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGWD002().eiMetadata);
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
......
......@@ -420,7 +420,7 @@
'' as "FILE_TYPE", <!-- 文件类型 -->
'' as "FILE_NAME", <!-- 文件名称 -->
PROJECT_SOURCE as "FILE_PATH",
PROJ_CODE as "fileIdPath"
PROJ_CODE as "FILE_ID_PATH"
FROM ${hggpSchema}.HGSC001 T WHERE 1=1
<isNotEmpty prepend=" AND " property="accountCode">
ACCOUNT_CODE = #accountCode#
......
package com.baosight.hggp.hg.yx.domain;
import com.baosight.hggp.util.DateUtils;
import com.baosight.iplat4j.core.data.DaoEPBase;
import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.core.util.NumberUtils;
......@@ -558,7 +559,7 @@ public class HGYX010 extends DaoEPBase {
setUpdatedName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_NAME)), updatedName));
setUpdatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_TIME)), updatedTime));
setDeleteFlag(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_DELETE_FLAG)), deleteFlag));
setSellDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_SELL_DATE)), sellDate));
setSellDate(StringUtils.defaultIfEmpty(StringUtils.toString(DateUtils.formatShort(map.get(FIELD_SELL_DATE))), sellDate));
setSourceFunds(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_SOURCE_FUNDS)), sourceFunds));
setDistrict(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DISTRICT)), district));
setContent(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CONTENT)), content));
......
......@@ -85,7 +85,7 @@ public class ServiceHGZL003 extends ServiceBase {
List<HGZL003> fZl003s = MapUtils.toDaoEPBases(inInfo, HGZL003.class);
for (HGZL003 fZl003 : fZl003s) {
fZl003.setCheckDate(DateUtils.formatShort(fZl003.getCheckDate()));
if (StringUtils.isEmpty(fZl003.getCheckCode())) {
if (StringUtils.isBlank(fZl003.getCheckCode())) {
this.add(fZl003);
} else {
this.modify(fZl003);
......@@ -110,7 +110,12 @@ public class ServiceHGZL003 extends ServiceBase {
newZl003.setCheckCode(SequenceGenerator.getNextSequence(HGConstant.SequenceId.HGZL003_CHECK_CODE));
newZl003.setCheckBy(UserSessionUtils.getLoginName());
newZl003.setCheckName(UserSessionUtils.getLoginCName());
newZl003.setCheckDate(DateUtils.shortDate());
newZl003.setCheckDate(DateUtils.formatShort(fZl003.getCheckDate()));
newZl003.setQuantity(fZl003.getQuantity());
newZl003.setUnpassQuantity(fZl003.getUnpassQuantity());
newZl003.setPassQuantity(fZl003.getQuantity() - fZl003.getUnpassQuantity());
newZl003.setWorkBy(fZl003.getWorkBy());
newZl003.setWorkName(fZl003.getWorkName());
DaoUtils.insert(HGZL003.INSERT, newZl003);
// 生成整改通知单
HGZLTools.HgZl004.addByHGZL003(newZl003);
......
......@@ -67,7 +67,7 @@ public class ServiceXSOG0801A extends ServiceEPBase {
condition = " ITEM_CODE = 'NOT CODE'";
}
}
List<Map> orgTypes = CodeValueTools.getCodeValues(CodesetConstant.XsOg.ORG_TYPE, condition);
List<Map> orgTypes = CodeValueTools.getCodeValues(CodesetConstant.ORG_TYPE, condition);
inInfo.addBlock("orgTypeBlock").addRows(orgTypes);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new XSOG01().eiMetadata);
} catch (Exception e) {
......
......@@ -58,7 +58,7 @@ public class ServiceXSOG0801B extends ServiceEPBase {
}else {
condition = " ITEM_CODE = 'NOT CODE'";
}
List<Map> orgTypes = CodeValueTools.getCodeValues(CodesetConstant.XsOg.ORG_TYPE, condition);
List<Map> orgTypes = CodeValueTools.getCodeValues(CodesetConstant.ORG_TYPE, condition);
inInfo.addBlock("orgTypeBlock").addRows(orgTypes);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new XSOG01().eiMetadata);
} catch (Exception e) {
......
......@@ -211,7 +211,7 @@
},
mounted() {
setInterval(() => {
this.date = new Date(); // 更新日期时间
this.currentTime = dayjs().format("YYYY-MM-DD HH:mm:ss")
}, 1000);
this.getYesterdayDateFormatted();
this.getRoleFactory();
......@@ -393,22 +393,7 @@
]
}
},
formatTime(currentTime) {
const formattedTime =
currentTime.getFullYear() +
"-" +
(currentTime.getMonth() + 1) +
"-" +
currentTime.getDate() +
" " +
currentTime.getHours() +
":" +
currentTime.getMinutes() +
":" +
currentTime.getSeconds();
return formattedTime;
},
}
},
computed:{
baroption() {
......@@ -416,10 +401,7 @@
},
lineoption() {
return this.option2;
},
currentTime() {
return this.formatTime(this.date);
},
}
}
})
</script>
......
$(function () {
IPLATUI.EFGrid = {
"result": {
pageable: {
pageSize: 20,
pageSizes: [20, 50, 100, 200],
},
columns: [{
field: "supName",
template: function (item) {
let supName = item["supName"];
if (CommonUtils.isBlank(supName)) {
return item["supCode"];
}
return supName;
}
}]
}
}
// 查询
$("#QUERY").on("click", query);
// 键盘按键
downKeyUp();
});
/**
* 页面加载完成
*/
$(window).load(function () {
// 查询
query();
});
/**
* 查询
*/
let query = function () {
resultGrid.dataSource.page(1);
}
\ No newline at end of file
<!DOCTYPE html>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<EF:EFPage title="采购执行情况">
<EF:EFRegion id="inqu" title="查询条件">
<div class="row">
<EF:EFDatePicker ename="receiptDate" cname="日期" blockId="inqu_status" row="0" colWidth="3"
format="yyyy-MM-dd" readonly="true"/>
<EF:EFSelect ename="companyCode" cname="公司名称" blockId="inqu_status" row="0" colWidth="3"
optionLabel="全部" filter="contains">
<EF:EFOptions blockId="company_code_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFSelect ename="projCode" cname="项目名称" blockId="inqu_status" row="0" colWidth="3"
optionLabel="全部" filter="contains">
<EF:EFOptions blockId="proj_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFInput ename="supName" cname="供应商名称" blockId="inqu_status" row="0" colWidth="3"/>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="明细信息" fitHeight="true">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="row">
<EF:EFColumn ename="receiptDate" cname="日期" enable="false" width="100" align="center" editType="date"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']"/>
<EF:EFColumn ename="companyCode" cname="公司编码" enable="false" width="200" align="center" hidden="true"/>
<EF:EFColumn ename="companyName" cname="公司名称" enable="false" width="200" align="left"/>
<EF:EFColumn ename="supCode" cname="供应商编码" enable="false" width="160" align="center" hidden="true"/>
<EF:EFColumn ename="supName" cname="供应商名称" enable="false" width="160" align="left"/>
<EF:EFColumn ename="projCode" cname="项目编码" enable="false" width="120" align="center" hidden="true"/>
<EF:EFColumn ename="projName" cname="项目名称" enable="false" width="120" align="left"/>
<EF:EFColumn ename="contractAmount" cname="采购合同金额" enable="false" width="120" align="right"/>
<EF:EFColumn ename="deliveryAmount" cname="采购收货金额" enable="false" width="120" align="right"/>
<EF:EFColumn ename="receiptAmount" cname="采购收票金额" enable="false" width="120" align="right"/>
<EF:EFColumn ename="payAmount" cname="付款金额" enable="false" width="120" align="right"/>
<EF:EFColumn ename="nonPayAmount" cname="未付款金额" enable="false" width="120" align="right"/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
\ No newline at end of file
......@@ -35,7 +35,7 @@
<img :src="`${ctx}/common/img/device-img4-content.png`" class="device-img1-content img" style="margin: 0;" alt/>
</div>
<div style="width: 100%;height: 30%;display: flex;margin-top: 2vh;">
<div class="content-content-title" style="width: 40%;">激光焊接机</div>
<div class="content-content-title" style="width: 40%;">龙门加工中心</div>
<img :src="`${ctx}/common/img/device-img5-content.png`" class="device-img1-content img" style="margin: 0;" alt/>
</div>
</div>
......
......@@ -23,15 +23,15 @@
</div>
</div>
<div class="page-content-main" style="flex-wrap: wrap">
<div style="width: 45%;height: 30%;display: flex;flex-wrap: wrap;justify-content: space-between;" v-for="(item,index) in queryBySunWtDate"
<div style="width: 45%;height: 30%;display: flex;flex-wrap: wrap;justify-content: space-between;" v-for="(item,index) in queryBySunWtList"
:key="index"
>
<div class="page-content-left" style="position: relative">
<div class="data-title-span temp"> {{ queryBySunWtList[index] || 0 }}</div>
<div class="data-title-span temp"> {{ item.totalWeight || 0 }}</div>
<div style="width: 100%;display: flex;" class="temp">
<img :src="`${ctx}/common/img/produce-img.png`" class="produce-img " alt/>
</div>
<div class="content-main-footer temp" data-process="组立">{{ queryBySunWtDate[index] }}/ 吨</div>
<div class="content-main-footer temp" data-process="组立">{{ item.processName }}/ 吨</div>
<div style="width: 100%;display: flex;" class="temp">
<img :src="`${ctx}/common/img/produce-put.png`" v-if="index < 4" alt/>
</div>
......@@ -146,20 +146,18 @@ module.exports = {
inInfo.set('inqu_status-0-depositDate',this.datapicker)
IPLAT.EiCommunicator.send('HGSC007', 'getByProcessSumWt', inInfo, {
onSuccess: function (res) {
if(undefined != res.extAttr.result[0]){
_this.getByProcessSumWtList = [];
if(res.extAttr.result.length){
_this.getByProcessSumWtList = res.extAttr.result[0]
}else {
}else{
_this.getByProcessSumWtList.push({
dayWeight:0,
monthWeight:0,
yearWeight:0,
})
}
},
onFail: function (err) {
}
onFail: function (err) {}
},
{async: false}
);
......@@ -172,7 +170,14 @@ module.exports = {
inInfo.set('inqu_status-0-depositDate',this.dataPicker)
IPLAT.EiCommunicator.send('HGSC007', 'queryBySunWt', inInfo, {
onSuccess: function (res) {
_this.queryBySunWtList = res.blocks.result.extAttr.processNameList
console.log(res,'显示的数据')
if(res.extAttr.result.length){
_this.queryBySunWtList = res.extAttr.result
}else{
_this.queryBySunWtList =[]
}
_this.$forceUpdate();
},
onFail: function (err) {
}
......
......@@ -34,6 +34,7 @@
style="width: 100%">
<el-table-column
v-for="(colVal,i) in columns"
:key="i"
:prop="colVal.value"
:align="colVal.align"
:label="colVal.label"
......@@ -95,7 +96,7 @@ module.exports = {
label: '进度(%)',
align: 'center',
value: 'schedule',
width:'40'
width:'80'
}
]
};
......
......@@ -94,8 +94,8 @@ let checkParam = function () {
if (isBlank(supCode)) {
return "供应商不能为空";
}
let purUserId = $("#inqu_status-0-purUserId").val();
if (isBlank(purUserId)) {
let purUserName = $("#inqu_status-0-purUserName").val();
if (isBlank(purUserName)) {
return "采购员不能为空";
}
return "";
......
......@@ -45,13 +45,12 @@
type="hidden"/>
</div>
<div class="row">
<EF:EFSelect ename="purUserId" cname="采购员" blockId="inqu_status" row="0" colWidth="6" ratio="2:10"
filter="contains" required="true">
<EF:EFOption label="请选择" value=""/>
<EF:EFOptions blockId="user_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFInput ename="purUserName" cname="采购员姓名" blockId="inqu_status" row="0" colWidth="6" ratio="2:10"
type="hidden"/>
<%-- <EF:EFSelect ename="purUserId" cname="采购员" blockId="inqu_status" row="0" colWidth="6" ratio="2:10"--%>
<%-- filter="contains" required="true">--%>
<%-- <EF:EFOption label="请选择" value=""/>--%>
<%-- <EF:EFOptions blockId="user_block_id" textField="textField" valueField="valueField"/>--%>
<%-- </EF:EFSelect>--%>
<EF:EFInput ename="purUserName" cname="采购员姓名" blockId="inqu_status" row="0" colWidth="6" ratio="2:10"/>
</div>
<br/>
<span style="color: red; ">说明:合同号由系统自动生成</span><br>
......
......@@ -57,7 +57,7 @@
<EF:EFColumn ename="contractContent" cname="签证事由及内容" width="120" enable="true" align="center" required="true"/>
<EF:EFColumn ename="totalContractPriceIncluding" cname="含税金额" width="120" enable="true" format="{0:N2}" align="right" required="true"/>
<EF:EFColumn ename="signingDate" cname="签订日期" width="120" enable="true" align="center" editType="date"
dateFormat="yyyy-MM-dd" parseFormats="['yyyy-MM-dd']" required="true"/>
dateFormat="yyyy-MM-dd" parseFormats="['yyyy-MM-dd', 'yyyyMMdd']" required="true"/>
<EF:EFComboColumn ename="reviewStatus" cname="审批状态" width="100" align="center" required="true"
columnTemplate="#=textField#" itemTemplate="#=textField#" enable="false" >
<EF:EFCodeOption codeName="hggp.cw.reviewStatus"/>
......
......@@ -53,7 +53,7 @@
<EF:EFColumn ename="contractContent" cname="扣款事由" width="120" enable="true" align="center" required="true"/>
<EF:EFColumn ename="totalContractPriceIncluding" cname="扣款金额" width="120" enable="true" format="{0:N2}" align="right" required="true"/>
<EF:EFColumn ename="signingDate" cname="扣款日期" width="120" enable="true" align="center" editType="date"
dateFormat="yyyy-MM-dd" parseFormats="['yyyy-MM-dd']" required="true"/>
dateFormat="yyyy-MM-dd" parseFormats="['yyyy-MM-dd', 'yyyyMMdd']" required="true"/>
<EF:EFColumn ename="deliveryCode" cname="发货单号" enable="false" width="130" align="center"/>
<EF:EFComboColumn ename="reviewStatus" cname="审批状态" width="100" align="center"
columnTemplate="#=textField#" itemTemplate="#=textField#" enable="false" >
......
$(function() {
// 查询
$("#QUERY").on("click", function () {
query();
});
IPLATUI.EFGrid.result = {
pageable: {
pageSize: 20,
pageSizes: [10,20,30,50,100,200],
},
exportGrid:false,
columns: [],
onSuccess: function (e) {
if (e.eiInfo.extAttr.methodName == 'save' || e.eiInfo.extAttr.methodName == 'delete') {
query();
}
},
}
window.document.addEventListener("keyup",function (event) {
if(event.keyCode === 13){
var grid = $("#ef_grid_result").data("kendoGrid");
// 回填
//grid.addRows(returnRows);
grid.closeCell();
}
})
});
$(window).load(function () {
// 查
query();
});
/**
* 查询
*/
let query = function () {
resultGrid.dataSource.page(1);
}
<%--
Created by IntelliJ IDEA.
User: 1
Date: 2024/11/17
Time: 13:21
To change this template use File | Settings | File Templates.
--%>
<!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:EFDatePicker blockId="inqu_status" row="0" ename="date" cname="日期" role="date"
format="yyyy-MM-dd" parseFormats="['yyyyMMdd']" colWidth="3"/>
<EF:EFSelect blockId="inqu_status" row="0" ename="companyCode" cname="公司名称" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="roleCompany" textField="companyName" valueField="companyCode"/>
</EF:EFSelect>
<EF:EFInput cname="项目名称" blockId="inqu_status" ename="projName" row="0" colWidth="3" placeholder="模糊查询项目名称"/>
<EF:EFInput cname="客户名称" ename="partyA" blockId="inqu_status" row="0" colWidth="3" placeholder="模糊查询客户名称"/>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="no" isFloat="true" autoBind="false" sort="all">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<%--<EF:EFComboColumn ename="companyCode" cname="公司名称"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
maxLength="16" readonly="false" width="210" required="true"
align="center" filter="contains" sort="true">
<EF:EFOptions blockId="roleCompany" textField="companyName" valueField="companyCode"/>
</EF:EFComboColumn>--%>
<EF:EFColumn ename="date" cname="日期" width="120" enable="true" readonly="false" align="center" editType="date"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required="true"/>
<EF:EFColumn ename="companyName" cname="公司名称" width="200" align="center"/>
<EF:EFColumn ename="clientName" cname="客户名称" width="200" align="center"/>
<%--<EF:EFComboColumn ename="projCode" cname="项目名称" blockName="proj_record_block_id"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
maxLength="16" readonly="true" width="210" required="true"
align="center" filter="contains" sort="true">
</EF:EFComboColumn>--%>
<EF:EFColumn ename="projName" cname="项目名称" width="200" align="center"/>
<EF:EFColumn ename="contractAcount" cname="销售合同金额" width="120" enable="true" readonly="true" format="{0:C2}" editType="number"
displayType="0.00" sort="true" align="right" maxLength="15" required="true" defaultValue="0"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,2})?$/"
data-errorprompt="请输入数字,该值最大可设置15位整数和2位小数!"/>
<EF:EFColumn ename="sellAcount" cname="销售开票金额" width="120" enable="false" readonly="true" format="{0:C2}" editType="text"
displayType="0.00" sort="true" align="right" maxLength="15" required="false"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,2})?$/"
data-errorprompt="请输入数字,该值最大可设置15位整数和2位小数!"/>
<EF:EFColumn ename="notSellAcount" cname="未开票金额" width="120" enable="false" readonly="true" format="{0:C2}" editType="text"
displayType="0.00" sort="true" align="right" maxLength="15" required="false"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,2})?$/"
data-errorprompt="请输入数字,该值最大可设置15位整数和2位小数!"/>
<EF:EFColumn ename="collecAcount" cname="收款金额" width="120" enable="false" readonly="true" format="{0:C2}" editType="text"
displayType="0.00" sort="true" align="right" maxLength="15" required="false"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,2})?$/"
data-errorprompt="请输入数字,该值最大可设置15位整数和2位小数!"/>
<EF:EFColumn ename="notCollecAcount" cname="未收款金额" width="120" enable="false" readonly="true" format="{0:C2}" editType="text"
displayType="0.00" sort="true" align="right" maxLength="15" required="false"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,2})?$/"
data-errorprompt="请输入数字,该值最大可设置15位整数和2位小数!"/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
<script>
var ctx = "${ctx}";
</script>
......@@ -59,10 +59,10 @@
<EF:EFColumn ename="otherEnterNo" cname="其他入库单号" enable="false" width="140" align="center"/>
<EF:EFColumn ename="whCode" cname="仓库名称" width="120" align="center" required="true"/>
<EF:EFColumn ename="whName" cname="仓库名称" hidden="true"/>
<EF:EFComboColumn cname="状态" ename="submitStatus" width="90" align="center" enable="false">
<EF:EFComboColumn cname="状态" ename="submitStatus" width="90" align="center" enable="false" defaultValue="0">
<EF:EFCodeOption codeName="hggp.hpkc.submitStatus"/>
</EF:EFComboColumn>
<EF:EFComboColumn cname="数据来源" ename="source" width="90" align="center" enable="false">
<EF:EFComboColumn cname="数据来源" ename="source" width="90" align="center" enable="false" defaultValue="1">
<EF:EFCodeOption codeName="hggp.hpkc.source"/>
</EF:EFComboColumn>
</EF:EFGrid>
......
$(function () {
// 查询
$("#QUERY").on("click", query);
IPLATUI.EFGrid.result = {
pageable: {
pageSize: 20,
pageSizes: [10, 20, 30, 50, 100, 200]
},
columns: [{
field: "operator",
template: function (item) {
let template = '';
// 抛帐详情
if (item.billMainId) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="showDetail(\'' + item.billMainId + '\')" >抛帐详情</a>';
}
return template
}
}],
loadComplete: function (grid) {
$("#RESEND").on("click", resend);
$("#REDFLUSH").on("click", redFlush);
},
onSuccess: function (e) {
if(e.eiInfo.extAttr.methodName == 'save'
||e.eiInfo.extAttr.methodName == 'delete'){
query();
}
},
onSave: function (e) {
// 阻止后台保存请求,使用自定义保存
e.preventDefault();
},
onDelete: function (e) {
// 阻止后台删除请求,使用自定义删除
e.preventDefault();
}
}
});
/**
* 页面加载时执行
*/
$(window).load(function () {
// 查询
query();
});
/**
* 抛帐明细
*
* @param id
*/
function showDetail(id) {
JSColorbox.open({
href: "HGPZ022A?methodName=initLoad&inqu_status-0-billMainId=" + id,
title: "<div style='text-align: center;'>抛帐明细</div>",
width: "80%",
height: "80%",
});
}
/**
* 查询
*/
let query = function () {
resultGrid.dataSource.page(1);
}
/**
* 重新抛帐
*/
function resend(){
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"重新抛帐\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result", "HGPZ022", "againSend", true,
function (ei) {
if (ei.getStatus() != -1){
query();
}
});
}
});
}
/**
* 红冲
*/
function redFlush(){
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"红冲\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result", "HGPZ022", "redFlush", true,
function (ei) {
if (ei.getStatus() != -1){
query();
}
});
}
});
}
<!DOCTYPE html>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<EF:EFPage title="抛帐管理">
<EF:EFRegion id="inqu" title="查询区">
<div class="row">
<EF:EFInput ename="inqu_status-0-billMainNo" cname="抛帐单据号" colWidth="3" placeholder="模糊查询"/>
<EF:EFInput ename="inqu_status-0-sourceBillNo" cname="业务单据号" colWidth="3" placeholder="模糊查询"/>
<EF:EFSelect ename="inqu_status-0-billStatus" cname="抛帐状态" colWidth="3" valueTemplate="#=textField#">
<EF:EFOption label="全部" value=""/>
<EF:EFOption label="发送中" value="10"/>
<EF:EFOption label="抛帐成功" value="20"/>
<EF:EFOption label="抛帐失败" value="30"/>
</EF:EFSelect>
<EF:EFInput ename="inqu_status-0-voucherCode" cname="凭证号" colWidth="3" placeholder="模糊查询"/>
<EF:EFDatePicker ename="inqu_status-0-voucherDateStar" cname="凭证日期开始" colWidth="3" placeholder="凭证日期" role="date" readonly="true"
parseFormats="['yyyyMMdd','yyyy-MM-dd']"/>
<EF:EFDatePicker ename="inqu_status-0-voucherDateEnd" cname="凭证日期结束" colWidth="3" placeholder="凭证日期" role="date" readonly="true"
parseFormats="['yyyyMMdd','yyyy-MM-dd']"/>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="记录集" fitHeight="true" autoBind="false">
<EF:EFGrid blockId="result" autoDraw="false" checkMode="checkbox, row">
<EF:EFColumn ename="operator" cname="操作" enable="false" width="170" locked="true" align="center"/>
<EF:EFColumn cname="billMainId" ename="billMainId" width="100" align="left" fix="yes" enable="false" hidden="true"/>
<%-- <EF:EFColumn cname="账套" ename="inAccount" align="center" width="120" enable="false" />--%>
<EF:EFColumn cname="抛帐单据号" ename="billMainNo" align="center" width="120" enable="false" />
<EF:EFColumn cname="单据金额" ename="totalAmount" align="right" width="120" enable="false" data-rules="number" sumType="total"/>
<EF:EFColumn cname="摘要" ename="voucherSummary" align="left" width="120" enable="false"/>
<EF:EFComboColumn cname="抛帐状态" ename="billStatus" width="120" enable="false" readonly="true" >
<EF:EFOption label="" value=" "/>
<EF:EFOption label="发送中" value="10"/>
<EF:EFOption label="抛帐成功" value="20"/>
<EF:EFOption label="抛帐失败" value="30"/>
</EF:EFComboColumn>
<EF:EFColumn cname="标财反馈" ename="msgReturn" align="center" width="120" enable="false" />
<EF:EFColumn cname="凭证号" ename="voucherCode" align="center" width="90" enable="false" />
<EF:EFColumn cname="凭证日期" ename="voucherDate" align="left" enable="false" />
<EF:EFColumn cname="业务单据号" ename="sourceBillNo" align="left" enable="false" />
<%-- <EF:EFColumn cname="业务单据名称" ename="deptName" align="left" enable="false" />--%>
<EF:EFColumn cname="单据日期" ename="billDate" align="left" enable="false" />
</EF:EFGrid>
</EF:EFRegion>
<EF:EFWindow id="pzDetail" url=" " lazyload="true" width="90%" height="90%"></EF:EFWindow>
</EF:EFPage>
$(function () {
// 查询
$("#QUERY").on("click", query);
IPLATUI.EFGrid.result = {
pageable: {
pageSize: 20,
pageSizes: [10, 20, 30, 50, 100, 200]
},
columns: [
],
}
});
/**
* 页面加载时执行
*/
$(window).load(function () {
// 查询
query();
});
/**
* 查询
*/
let query = function () {
resultGrid.dataSource.page(1);
}
<!DOCTYPE html>
<%@ page language="java" 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" %>
<EF:EFPage title="抛帐管理明细">
<EF:EFInput blockId="inqu_status" row="0" ename="billMainId" type="hidden" colWidth="3"/>
<%-- <EF:EFRegion id="inqu" title="查询区">--%>
<%-- <div class="row">--%>
<%-- --%>
<%-- </div>--%>
<%-- </EF:EFRegion>--%>
<EF:EFRegion id="result" title="记录集" fitHeight="true" autoBind="false">
<EF:EFGrid blockId="result" autoDraw="false" checkMode="single, row">
<EF:EFColumn cname="billLineId" ename="billLineId" width="100" align="left" fix="yes" enable="false" hidden="true"/>
<EF:EFColumn cname="抛帐单据号" ename="billLineNo" align="center" width="120" enable="false" />
<EF:EFColumn cname="责任中心编码" ename="costCenter" align="center" width="120" enable="false"/>
<EF:EFColumn cname="责任中心名称" ename="costCenterName" align="center" width="120" enable="false"/>
<EF:EFColumn cname="项目编号" ename="projectCode" align="center" width="120" enable="false" />
<EF:EFColumn cname="金额" ename="functionalAmount" align="center" width="90" enable="false" />
<EF:EFColumn cname="抛帐辅助1" ename="detailReserveC1" align="left" enable="false" />
<EF:EFColumn cname="抛帐辅助2" ename="detailReserveC2" align="left" enable="false" />
<EF:EFColumn cname="抛帐辅助3" ename="detailReserveC3" align="left" enable="false" />
<EF:EFColumn cname="抛帐辅助4" ename="detailReserveC4" align="left" enable="false" />
<EF:EFColumn cname="抛帐辅助5" ename="detailReserveC5" align="left" enable="false" />
<EF:EFColumn cname="抛帐辅助6" ename="detailReserveC6" align="left" enable="false" />
<EF:EFColumn cname="抛帐数字1" ename="detailReserveN1" align="left" enable="false" />
<EF:EFColumn cname="抛帐数字2" ename="detailReserveN2" align="left" enable="false" />
<EF:EFColumn cname="抛帐数字3" ename="detailReserveN3" align="left" enable="false" />
<EF:EFColumn cname="抛帐数字4" ename="detailReserveN4" align="left" enable="false" />
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
......@@ -76,6 +76,11 @@
required="true" defaultValue="1">
<EF:EFCodeOption codeName="hpjx.hpjx.status"/>
</EF:EFComboColumn>
<EF:EFComboColumn ename="reveal" cname="驾驶舱显示" width="100" enable="true" readonly="false" align="center"
required="false" defaultValue="0">
<EF:EFCodeOption codeName="hggp.common.yesNo"/>
</EF:EFComboColumn>
<EF:EFColumn ename="sort" cname="排序" width="80" enable="true" readonly="false" align="center"/>
<EF:EFColumn cname="创建人" ename="createdName" align="center" width="100" readonly="true" required="false"
enable="false"/>
<EF:EFColumn cname="创建时间" ename="createdTime" parseFormats="['yyyyMMddHHmmss']" editType="datetime"
......
......@@ -94,8 +94,9 @@ $(function () {
IPLATUI.EFTree = {
"categoryTree": {
ROOT: {label: 'root', text: '目录结构'},
query: function (inInfo, model) {
if (model == null) {
if (model == null || model.id === "root") {
return inInfo;
}
let label = model.label;
......@@ -324,11 +325,12 @@ $(function () {
})
$("#categoryTree").mousedown(function (e) {
if (e.button !== 2) {
let title = e.target.title;
if (e.button !== 2 || CommonUtils.isBlank(title)) {
return
}
if ("engineering" === e.target.title || "foreign" === e.target.title
|| "spare" === e.target.title || "other" === e.target.title) {
if ("root" === title || "engineering" === title || "foreign" === title
|| "spare" === title || "other" === title) {
$("#isAdd").css('display', 'none');
$("#isDel").css('display', 'none');
$("#isEdit").css('display', 'none');
......
......@@ -86,15 +86,50 @@ $(function () {
}
init();
IPLATUI.EFGrid = {
"result": {
exportGrid: false, // 隐藏右侧自定义导出按钮
pageable: {
pageSize: 500,
pageSizes: [20, 50, 100, 200, 500],
},
columns: [{
field: "operator",
title: "操作",
template: function (model) {
let template = '';
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="showPreview(\'' + model.docId + '\')" >预览</a>';
return template;
}
}, {
field: "docVersion",
template: function (model) {
return "v" + model.docVersion;
}
}, {
field: "docType",
template: function (row) {
if (!isBlank(row.docType) && row.docType.startsWith(".")) {
return row.docType.substring(1);
}
return row.docType == null ? "" : row.docType;
}
}],
loadComplete: function (grid) {
}
}
}
IPLATUI.EFTree = {
"docTree": {
ROOT: {label: 'root', text: '目录结构'},
query: function (inInfo, model) {
if (model == null) {
if (model == null || model.id === "root") {
return inInfo;
}
let label = model.label;
// 选中树节点
selectTreeId(label);
selectTreeId(model.id);
// 设置选中节点
treeSelectClick(model);
inInfo.set("inqu_status-0-projCode", $("#inqu_status-0-projCode").val());
......@@ -106,10 +141,8 @@ $(function () {
// 设置选中节点
treeSelectClick(nodeData);
},
/*ROOT:{label: 'root',text: '组织机构'},*/
template: function (node) {
let item = node.item;
let title = item.text;
let icon = 'fa fa-globe'
if (item.label !== 'root') {
switch (item.leafType) {
......@@ -121,14 +154,15 @@ $(function () {
break;
}
}
return ' <span class="' + icon + '" style="padding-right: 8px"> </span> <span class="titleClass" title="' + item.label + '">' + title + '</span>'
return ' <span class="' + icon + '" style="padding-right: 8px"> </span> '
+ '<span class="titleClass" title="' + item.label + '">' + item.text + '</span>'
},
loadComplete: function (options) {
// 树节点查询
$("#search").on("click", treeSearch);
},
selectTreeNode: {
fileId: '',
treeId: '',
projCode: '',
leafType: '',
downloadFlag: '0'
......@@ -138,45 +172,10 @@ $(function () {
* 开启结点拖拽功能,默认dragAndDrop = false不开启,
* 若未开启拖拽,不会触发dragstart和dragend事件
*/
dragAndDrop: false,
dragAndDrop: false
}
};
IPLATUI.EFGrid = {
"result": {
exportGrid: false, // 隐藏右侧自定义导出按钮
pageable: {
pageSize: 500,
pageSizes: [20, 50, 100, 200, 500],
},
columns: [{
field: "operator",
title: "操作",
template: function (model) {
let template = '';
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="showPreview(\'' + model.docId + '\')" >预览</a>';
return template;
}
}, {
field: "docVersion",
template: function (model) {
return "v" + model.docVersion;
}
}, {
field: "docType",
template: function (row) {
if (!isBlank(row.docType) && row.docType.startsWith(".")) {
return row.docType.substring(1);
}
return row.docType == null ? "" : row.docType;
}
}],
loadComplete: function (grid) {
}
}
}
// 查询
$("#QUERY").on("click", query);
......@@ -294,12 +293,11 @@ let treeSelectClick = function (nodeData) {
* @param nodeData
*/
let setTreeNodeValue = function (nodeData) {
IPLATUI.EFTree.docTree.selectTreeNode.fileId = nodeData.id;
IPLATUI.EFTree.docTree.selectTreeNode.treeId = nodeData.id;
IPLATUI.EFTree.docTree.selectTreeNode.projCode = nodeData.projCode;
IPLATUI.EFTree.docTree.selectTreeNode.leafType = nodeData.leafType;
IPLATUI.EFTree.docTree.selectTreeNode.downloadFlag = nodeData.downloadFlag == null ? 0
: nodeData.downloadFlag;
$("[name = 'inqu_status-0-parentId']").val(nodeData.id);
$("[name = 'inqu_status-0-fileId']").val(nodeData.id);
$("[name = 'inqu_status-0-projCode']").val(nodeData.projCode);
}
......@@ -338,19 +336,20 @@ let preview = function () {
* @param docId
*/
let showPreview = function (docId) {
let fileId = IPLATUI.EFTree.docTree.selectTreeNode.fileId;
addRecordWindow(fileId, docId);
let treeId = IPLATUI.EFTree.docTree.selectTreeNode.treeId;
addRecordWindow(treeId, docId);
}
/**
* 树节点查询
*/
let treeSearch = function (){
let treeId = IPLATUI.EFTree.docTree.selectTreeNode.treeId;
let tree = $("#docTree").data("kendoTreeView");
let leafName = $("#searchText").val();
if (leafName == null || leafName.trim() === '') {
if (CommonUtils.isBlank(leafName)) {
tree.reload("root");
return
return;
}
let inInfo = new EiInfo();
inInfo.set("inqu_status-0-fileName", leafName);
......@@ -362,7 +361,7 @@ let treeSearch = function (){
}
// 获取所有满足条件的子节点路径
const allPath = res.get("allPath")
if (allPath.length <= 0) {
if (CommonUtils.isBlank(allPath) || allPath.length <= 0) {
return;
}
tree.reload("root");
......
......@@ -17,30 +17,29 @@
<%-- </div>--%>
<div id="menu" style="margin-top: 12px; margin-bottom: 8px">
<EF:EFTree bindId="docTree" ename="tree_name" textField="text" valueField="label"
hasChildren="leaf" pid="parentId" serviceName="HGWD001D" methodName="queryTree"
expandLevel="1">
hasChildren="leaf" pid="parentId" serviceName="HGWD001D" methodName="queryTree">
</EF:EFTree>
</div>
</EF:EFRegion>
</div>
<div id="right-pane" class="i-fit-height">
<EF:EFRegion id="inqu" title="查询条件">
<EF:EFInput cname="项目代码" ename="projCode" blockId="inqu_status" row="0" type="hidden"/>
<EF:EFInput cname="文档库id" ename="fileId" blockId="inqu_status" row="0" type="hidden"/>
<EF:EFInput ename="projCode" cname="项目代码" blockId="inqu_status" row="0" type="hidden"/>
<EF:EFInput ename="fileId" cname="文档库id" blockId="inqu_status" row="0" type="hidden"/>
<div class="row">
<EF:EFSelect blockId="inqu_status" row="0" ename="fileType" cname="附件分类" colWidth="3"
<EF:EFSelect ename="fileType" cname="附件分类" blockId="inqu_status" row="0" colWidth="3"
filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hggp.hgwd.fileType"/>
</EF:EFSelect>
<EF:EFInput cname="附件名称" ename="docName" blockId="inqu_status" row="0" colWidth="3"/>
<EF:EFInput ename="docName" cname="附件名称" blockId="inqu_status" row="0" colWidth="3"/>
<EF:EFDateSpan startCname="上传时间" endCname="至" blockId="inqu_status" row="0"
startName="createdDateFrom" endName="createdDateTo" role="date"
format="yyyy-MM-dd" ratio="3:3" satrtRatio="4:8" endRatio="4:8" readonly="false">
</EF:EFDateSpan>
</div>
<div class="row">
<EF:EFInput cname="文件路径" ename="filePath" blockId="inqu_status" row="0" colWidth="3"/>
<EF:EFInput ename="filePath" cname="文件路径" blockId="inqu_status" row="0" colWidth="3"/>
</div>
</EF:EFRegion>
......
......@@ -37,7 +37,7 @@
<EF:EFColumn ename="taskCode" cname="生产任务单号" width="130" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="checkCode" cname="质检单号" width="130" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="checkDate" cname="质检日期" width="120" align="center" editType="date"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required="true"/>
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd', 'yyyy-MM-dd']" required="true"/>
<EF:EFColumn ename="processName" cname="工序" width="100" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="productCode" cname="存货编码" width="90" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="productName" cname="存货名称" width="90" enable="false" readonly="true" align="center"/>
......
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