Commit 7c8d71cb by liuyang

2024-10-23 合同添加分支单位,采购收票,付款单添加合同号

parent 8d13ba90
...@@ -367,7 +367,7 @@ public enum DdynamicEnum { ...@@ -367,7 +367,7 @@ public enum DdynamicEnum {
* *
*/ */
PROJECT_CODE_BOX_BLOCK_ID("projectCodeBox_block_id","projCode","projName","genralContractCode", "genralContractName", PROJECT_CODE_BOX_BLOCK_ID("projectCodeBox_block_id","projCode","projName","genralContractCode", "genralContractName",
"subcontractCode", "subcontractName", "startDate","endDate","partyPmName","partyPmHpone","HGSC001.queryProjectCodeBox"), "subcontractCode", "subcontractName", "startDate","endDate","partyPmName","partyPmHpone", "branchUnit","HGSC001.queryProjectCodeBox"),
/** /**
* 模块: 销售发货 * 模块: 销售发货
......
...@@ -519,4 +519,18 @@ public class HGConstant { ...@@ -519,4 +519,18 @@ public class HGConstant {
//超报工 //超报工
public static final Integer S3 = 3; public static final Integer S3 = 3;
} }
/**
* 开票状态
*
* @author:songx
* @date:2024/2/22,13:57
*/
public static class BillStatus {
// 未开票
public static final Integer S1 = 1;
// 已开票
public static final Integer S2 = 2;
}
} }
...@@ -64,6 +64,7 @@ public class HGCW002 extends DaoEPBase { ...@@ -64,6 +64,7 @@ public class HGCW002 extends DaoEPBase {
public static final String FIELD_DEP_CODE = "depCode"; /* 部门编码*/ public static final String FIELD_DEP_CODE = "depCode"; /* 部门编码*/
public static final String FIELD_COMPANY_CODES = "companyCodes"; public static final String FIELD_COMPANY_CODES = "companyCodes";
public static final String FIELD_REMAINING_AMOUNT = "remainingAmount"; /* 剩余开票/收票金额*/ public static final String FIELD_REMAINING_AMOUNT = "remainingAmount"; /* 剩余开票/收票金额*/
public static final String FIELD_BRANCH_UNIT = "branchUnit";
public static final String COL_ID = "ID"; public static final String COL_ID = "ID";
public static final String COL_ACCOUNT_CODE = "ACCOUNT_CODE"; /* 企业编码*/ public static final String COL_ACCOUNT_CODE = "ACCOUNT_CODE"; /* 企业编码*/
...@@ -156,6 +157,7 @@ public class HGCW002 extends DaoEPBase { ...@@ -156,6 +157,7 @@ public class HGCW002 extends DaoEPBase {
private String depCode = " "; /* 部门编码*/ private String depCode = " "; /* 部门编码*/
private BigDecimal remainingAmount = new BigDecimal("0"); /* 剩余开票/收票金额*/ private BigDecimal remainingAmount = new BigDecimal("0"); /* 剩余开票/收票金额*/
private String contractTypeStr = ""; /* 合同类型;1销售合同2劳务合同3补充协议4合同外用工*/ private String contractTypeStr = ""; /* 合同类型;1销售合同2劳务合同3补充协议4合同外用工*/
private String branchUnit = " ";
/** /**
* initialize the metadata. * initialize the metadata.
...@@ -343,6 +345,10 @@ public class HGCW002 extends DaoEPBase { ...@@ -343,6 +345,10 @@ public class HGCW002 extends DaoEPBase {
eiColumn = new EiColumn("contractTypeStr"); eiColumn = new EiColumn("contractTypeStr");
eiColumn.setDescName("合同类型"); eiColumn.setDescName("合同类型");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_BRANCH_UNIT);
eiColumn.setDescName("分支单位");
eiMetadata.addMeta(eiColumn);
} }
/** /**
...@@ -1009,6 +1015,14 @@ public class HGCW002 extends DaoEPBase { ...@@ -1009,6 +1015,14 @@ public class HGCW002 extends DaoEPBase {
this.contractTypeStr = contractTypeStr; this.contractTypeStr = contractTypeStr;
} }
public String getBranchUnit() {
return branchUnit;
}
public void setBranchUnit(String branchUnit) {
this.branchUnit = branchUnit;
}
/** /**
* get the value from Map. * get the value from Map.
* *
...@@ -1059,6 +1073,7 @@ public class HGCW002 extends DaoEPBase { ...@@ -1059,6 +1073,7 @@ public class HGCW002 extends DaoEPBase {
setDepCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DEP_CODE)), depCode)); setDepCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DEP_CODE)), depCode));
setRemainingAmount(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_REMAINING_AMOUNT)), remainingAmount)); setRemainingAmount(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_REMAINING_AMOUNT)), remainingAmount));
setContractTypeStr(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("contractTypeStr")), contractTypeStr)); setContractTypeStr(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("contractTypeStr")), contractTypeStr));
setBranchUnit(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("branchUnit")), branchUnit));
} }
/** /**
...@@ -1110,6 +1125,7 @@ public class HGCW002 extends DaoEPBase { ...@@ -1110,6 +1125,7 @@ public class HGCW002 extends DaoEPBase {
map.put(FIELD_DEP_CODE, StringUtils.toString(depCode, eiMetadata.getMeta(FIELD_DEP_CODE))); map.put(FIELD_DEP_CODE, StringUtils.toString(depCode, eiMetadata.getMeta(FIELD_DEP_CODE)));
map.put(FIELD_REMAINING_AMOUNT, StringUtils.toString(remainingAmount, eiMetadata.getMeta(FIELD_REMAINING_AMOUNT))); map.put(FIELD_REMAINING_AMOUNT, StringUtils.toString(remainingAmount, eiMetadata.getMeta(FIELD_REMAINING_AMOUNT)));
map.put("contractTypeStr", StringUtils.toString(contractTypeStr, eiMetadata.getMeta("contractTypeStr"))); map.put("contractTypeStr", StringUtils.toString(contractTypeStr, eiMetadata.getMeta("contractTypeStr")));
map.put("branchUnit", StringUtils.toString(branchUnit, eiMetadata.getMeta("branchUnit")));
return map; return map;
} }
......
...@@ -51,6 +51,7 @@ public class HGCW010 extends DaoEPBase { ...@@ -51,6 +51,7 @@ public class HGCW010 extends DaoEPBase {
public static final String FIELD_DEP_CODE = "depCode"; /* 部门编码*/ public static final String FIELD_DEP_CODE = "depCode"; /* 部门编码*/
public static final String FIELD_REMAINING_AMOUNT = "remainingAmount"; /* 剩余开票/收票金额*/ public static final String FIELD_REMAINING_AMOUNT = "remainingAmount"; /* 剩余开票/收票金额*/
public static final String FIELD_COMPANY_CODES = "companyCodes"; public static final String FIELD_COMPANY_CODES = "companyCodes";
public static final String FIELD_BRANCH_UNIT = "branchUnit";
public static final String COL_ID = "ID"; public static final String COL_ID = "ID";
public static final String COL_ACCOUNT_CODE = "ACCOUNT_CODE"; /* 企业编码*/ public static final String COL_ACCOUNT_CODE = "ACCOUNT_CODE"; /* 企业编码*/
...@@ -112,6 +113,7 @@ public class HGCW010 extends DaoEPBase { ...@@ -112,6 +113,7 @@ public class HGCW010 extends DaoEPBase {
private String updatedTime = " "; /* 记录修改时间*/ private String updatedTime = " "; /* 记录修改时间*/
private String depCode = " "; /* 部门编码*/ private String depCode = " "; /* 部门编码*/
private BigDecimal remainingAmount = new BigDecimal("0"); /* 累计结算价税合计金额*/ private BigDecimal remainingAmount = new BigDecimal("0"); /* 累计结算价税合计金额*/
private String branchUnit = " ";
/** /**
* initialize the metadata. * initialize the metadata.
...@@ -235,6 +237,9 @@ public class HGCW010 extends DaoEPBase { ...@@ -235,6 +237,9 @@ public class HGCW010 extends DaoEPBase {
eiColumn.setDescName("剩余开票/收票金额"); eiColumn.setDescName("剩余开票/收票金额");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_BRANCH_UNIT);
eiColumn.setDescName("分支单位");
eiMetadata.addMeta(eiColumn);
} }
/** /**
...@@ -636,6 +641,15 @@ public class HGCW010 extends DaoEPBase { ...@@ -636,6 +641,15 @@ public class HGCW010 extends DaoEPBase {
public void setRemainingAmount(BigDecimal remainingAmount) { public void setRemainingAmount(BigDecimal remainingAmount) {
this.remainingAmount = remainingAmount; this.remainingAmount = remainingAmount;
} }
public String getBranchUnit() {
return branchUnit;
}
public void setBranchUnit(String branchUnit) {
this.branchUnit = branchUnit;
}
/** /**
* get the value from Map. * get the value from Map.
* *
...@@ -669,6 +683,7 @@ public class HGCW010 extends DaoEPBase { ...@@ -669,6 +683,7 @@ public class HGCW010 extends DaoEPBase {
setUpdatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_TIME)), updatedTime)); setUpdatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_TIME)), updatedTime));
setDepCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DEP_CODE)), depCode)); setDepCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DEP_CODE)), depCode));
setRemainingAmount(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_REMAINING_AMOUNT)), remainingAmount)); setRemainingAmount(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_REMAINING_AMOUNT)), remainingAmount));
setBranchUnit(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("branchUnit")), branchUnit));
} }
/** /**
...@@ -703,6 +718,7 @@ public class HGCW010 extends DaoEPBase { ...@@ -703,6 +718,7 @@ public class HGCW010 extends DaoEPBase {
map.put(FIELD_UPDATED_TIME, StringUtils.toString(updatedTime, eiMetadata.getMeta(FIELD_UPDATED_TIME))); map.put(FIELD_UPDATED_TIME, StringUtils.toString(updatedTime, eiMetadata.getMeta(FIELD_UPDATED_TIME)));
map.put(FIELD_DEP_CODE, StringUtils.toString(depCode, eiMetadata.getMeta(FIELD_DEP_CODE))); map.put(FIELD_DEP_CODE, StringUtils.toString(depCode, eiMetadata.getMeta(FIELD_DEP_CODE)));
map.put(FIELD_REMAINING_AMOUNT, StringUtils.toString(remainingAmount, eiMetadata.getMeta(FIELD_REMAINING_AMOUNT))); map.put(FIELD_REMAINING_AMOUNT, StringUtils.toString(remainingAmount, eiMetadata.getMeta(FIELD_REMAINING_AMOUNT)));
map.put(FIELD_BRANCH_UNIT, StringUtils.toString(branchUnit, eiMetadata.getMeta(FIELD_BRANCH_UNIT)));
return map; return map;
} }
......
...@@ -46,6 +46,7 @@ public class HGCW011 extends DaoEPBase { ...@@ -46,6 +46,7 @@ public class HGCW011 extends DaoEPBase {
public static final String FIELD_UPDATED_TIME = "updatedTime"; /* 记录修改时间*/ public static final String FIELD_UPDATED_TIME = "updatedTime"; /* 记录修改时间*/
public static final String FIELD_DEP_CODE = "depCode"; /* 部门编码*/ public static final String FIELD_DEP_CODE = "depCode"; /* 部门编码*/
public static final String FIELD_COMPANY_CODES = "companyCodes";/*用户角色权限*/ public static final String FIELD_COMPANY_CODES = "companyCodes";/*用户角色权限*/
public static final String FIELD_BRANCH_UNIT = "branchUnit";
public static final String COL_ID = "ID"; public static final String COL_ID = "ID";
public static final String COL_MAIN_ID = "MAIN_ID"; /* 主表ID*/ public static final String COL_MAIN_ID = "MAIN_ID"; /* 主表ID*/
...@@ -96,6 +97,7 @@ public class HGCW011 extends DaoEPBase { ...@@ -96,6 +97,7 @@ public class HGCW011 extends DaoEPBase {
private String updatedName = " "; /* 记录修改名称*/ private String updatedName = " "; /* 记录修改名称*/
private String updatedTime = " "; /* 记录修改时间*/ private String updatedTime = " "; /* 记录修改时间*/
private String depCode = " "; /* 部门编码*/ private String depCode = " "; /* 部门编码*/
private String branchUnit = " ";
/** /**
* initialize the metadata. * initialize the metadata.
...@@ -191,7 +193,9 @@ public class HGCW011 extends DaoEPBase { ...@@ -191,7 +193,9 @@ public class HGCW011 extends DaoEPBase {
eiColumn.setDescName("部门编码"); eiColumn.setDescName("部门编码");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_BRANCH_UNIT);
eiColumn.setDescName("分支单位");
eiMetadata.addMeta(eiColumn);
} }
/** /**
...@@ -537,6 +541,15 @@ public class HGCW011 extends DaoEPBase { ...@@ -537,6 +541,15 @@ public class HGCW011 extends DaoEPBase {
public void setDepCode(String depCode) { public void setDepCode(String depCode) {
this.depCode = depCode; this.depCode = depCode;
} }
public String getBranchUnit() {
return branchUnit;
}
public void setBranchUnit(String branchUnit) {
this.branchUnit = branchUnit;
}
/** /**
* get the value from Map. * get the value from Map.
* *
...@@ -566,6 +579,7 @@ public class HGCW011 extends DaoEPBase { ...@@ -566,6 +579,7 @@ public class HGCW011 extends DaoEPBase {
setUpdatedName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_NAME)), updatedName)); setUpdatedName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_NAME)), updatedName));
setUpdatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_TIME)), updatedTime)); setUpdatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_TIME)), updatedTime));
setDepCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DEP_CODE)), depCode)); setDepCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DEP_CODE)), depCode));
setBranchUnit(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("branchUnit")), branchUnit));
} }
/** /**
...@@ -596,6 +610,7 @@ public class HGCW011 extends DaoEPBase { ...@@ -596,6 +610,7 @@ public class HGCW011 extends DaoEPBase {
map.put(FIELD_UPDATED_NAME, StringUtils.toString(updatedName, eiMetadata.getMeta(FIELD_UPDATED_NAME))); map.put(FIELD_UPDATED_NAME, StringUtils.toString(updatedName, eiMetadata.getMeta(FIELD_UPDATED_NAME)));
map.put(FIELD_UPDATED_TIME, StringUtils.toString(updatedTime, eiMetadata.getMeta(FIELD_UPDATED_TIME))); map.put(FIELD_UPDATED_TIME, StringUtils.toString(updatedTime, eiMetadata.getMeta(FIELD_UPDATED_TIME)));
map.put(FIELD_DEP_CODE, StringUtils.toString(depCode, eiMetadata.getMeta(FIELD_DEP_CODE))); map.put(FIELD_DEP_CODE, StringUtils.toString(depCode, eiMetadata.getMeta(FIELD_DEP_CODE)));
map.put(FIELD_BRANCH_UNIT, StringUtils.toString(branchUnit, eiMetadata.getMeta(FIELD_BRANCH_UNIT)));
return map; return map;
} }
......
...@@ -58,6 +58,7 @@ public class HGCW012 extends DaoEPBase { ...@@ -58,6 +58,7 @@ public class HGCW012 extends DaoEPBase {
public static final String FIELD_SPEC = "spec"; /* 规格*/ public static final String FIELD_SPEC = "spec"; /* 规格*/
public static final String FIELD_DEPOSIT_QTY = "depositQty"; /* 入库数量*/ public static final String FIELD_DEPOSIT_QTY = "depositQty"; /* 入库数量*/
public static final String FIELD_RECEIVE_WEIGHT = "receiveWeight"; /* 收货重量*/ public static final String FIELD_RECEIVE_WEIGHT = "receiveWeight"; /* 收货重量*/
public static final String FIELD_CONTRACT_NO = "contractNo"; /* 合同号*/
public static final String COL_ID = "ID"; public static final String COL_ID = "ID";
public static final String COL_ACCOUNT_CODE = "ACCOUNT_CODE"; /* 企业编码*/ public static final String COL_ACCOUNT_CODE = "ACCOUNT_CODE"; /* 企业编码*/
...@@ -130,6 +131,7 @@ public class HGCW012 extends DaoEPBase { ...@@ -130,6 +131,7 @@ public class HGCW012 extends DaoEPBase {
private String spec = " "; /* 规格*/ private String spec = " "; /* 规格*/
private BigDecimal depositQty = new BigDecimal("0"); /* 入库数量*/ private BigDecimal depositQty = new BigDecimal("0"); /* 入库数量*/
private BigDecimal receiveWeight = new BigDecimal("0"); /* 收货重量*/ private BigDecimal receiveWeight = new BigDecimal("0"); /* 收货重量*/
private String contractNo = " "; /* 合同号*/
/** /**
* initialize the metadata. * initialize the metadata.
...@@ -282,6 +284,9 @@ public class HGCW012 extends DaoEPBase { ...@@ -282,6 +284,9 @@ public class HGCW012 extends DaoEPBase {
eiColumn.setDescName("收货重量"); eiColumn.setDescName("收货重量");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CONTRACT_NO);
eiColumn.setDescName("合同号");
eiMetadata.addMeta(eiColumn);
} }
...@@ -804,6 +809,14 @@ public class HGCW012 extends DaoEPBase { ...@@ -804,6 +809,14 @@ public class HGCW012 extends DaoEPBase {
public void setReceiveWeight(BigDecimal receiveWeight) { public void setReceiveWeight(BigDecimal receiveWeight) {
this.receiveWeight = receiveWeight; this.receiveWeight = receiveWeight;
} }
public String getContractNo() {
return contractNo;
}
public void setContractNo(String contractNo) {
this.contractNo = contractNo;
}
/** /**
* get the value from Map. * get the value from Map.
* *
...@@ -845,6 +858,7 @@ public class HGCW012 extends DaoEPBase { ...@@ -845,6 +858,7 @@ public class HGCW012 extends DaoEPBase {
setSpec(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_SPEC)), spec)); setSpec(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_SPEC)), spec));
setDepositQty(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_DEPOSIT_QTY)), depositQty)); setDepositQty(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_DEPOSIT_QTY)), depositQty));
setReceiveWeight(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_RECEIVE_WEIGHT)), receiveWeight)); setReceiveWeight(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_RECEIVE_WEIGHT)), receiveWeight));
setContractNo(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CONTRACT_NO)), contractNo));
} }
/** /**
...@@ -887,6 +901,7 @@ public class HGCW012 extends DaoEPBase { ...@@ -887,6 +901,7 @@ public class HGCW012 extends DaoEPBase {
map.put(FIELD_SPEC, StringUtils.toString(spec, eiMetadata.getMeta(FIELD_SPEC))); map.put(FIELD_SPEC, StringUtils.toString(spec, eiMetadata.getMeta(FIELD_SPEC)));
map.put(FIELD_DEPOSIT_QTY, StringUtils.toString(depositQty, eiMetadata.getMeta(FIELD_DEPOSIT_QTY))); map.put(FIELD_DEPOSIT_QTY, StringUtils.toString(depositQty, eiMetadata.getMeta(FIELD_DEPOSIT_QTY)));
map.put(FIELD_RECEIVE_WEIGHT, StringUtils.toString(receiveWeight, eiMetadata.getMeta(FIELD_RECEIVE_WEIGHT))); map.put(FIELD_RECEIVE_WEIGHT, StringUtils.toString(receiveWeight, eiMetadata.getMeta(FIELD_RECEIVE_WEIGHT)));
map.put(FIELD_CONTRACT_NO, StringUtils.toString(contractNo, eiMetadata.getMeta(FIELD_CONTRACT_NO)));
return map; return map;
} }
......
...@@ -49,6 +49,7 @@ public class HGCW013 extends DaoEPBase { ...@@ -49,6 +49,7 @@ public class HGCW013 extends DaoEPBase {
public static final String FIELD_INVENT_CODE = "inventCode"; /* 存货编码*/ public static final String FIELD_INVENT_CODE = "inventCode"; /* 存货编码*/
public static final String FIELD_INVENT_NAME = "inventName"; /* 存货名称*/ public static final String FIELD_INVENT_NAME = "inventName"; /* 存货名称*/
public static final String FIELD_SPEC = "spec"; /* 规格*/ public static final String FIELD_SPEC = "spec"; /* 规格*/
public static final String FIELD_CONTRACT_NO = "contractNo"; /* 合同号*/
public static final String COL_ID = "ID"; public static final String COL_ID = "ID";
public static final String COL_MAIN_ID = "MAIN_ID"; /* 主表ID*/ public static final String COL_MAIN_ID = "MAIN_ID"; /* 主表ID*/
...@@ -101,6 +102,7 @@ public class HGCW013 extends DaoEPBase { ...@@ -101,6 +102,7 @@ public class HGCW013 extends DaoEPBase {
private String inventCode = " "; /* 存货编码*/ private String inventCode = " "; /* 存货编码*/
private String inventName = " "; /* 存货名称*/ private String inventName = " "; /* 存货名称*/
private String spec = " "; /* 规格*/ private String spec = " "; /* 规格*/
private String contractNo = " "; /* 合同号*/
/** /**
* initialize the metadata. * initialize the metadata.
...@@ -207,6 +209,10 @@ public class HGCW013 extends DaoEPBase { ...@@ -207,6 +209,10 @@ public class HGCW013 extends DaoEPBase {
eiColumn = new EiColumn(FIELD_SPEC); eiColumn = new EiColumn(FIELD_SPEC);
eiColumn.setDescName("规格"); eiColumn.setDescName("规格");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CONTRACT_NO);
eiColumn.setDescName("合同号");
eiMetadata.addMeta(eiColumn);
} }
/** /**
...@@ -562,6 +568,14 @@ public class HGCW013 extends DaoEPBase { ...@@ -562,6 +568,14 @@ public class HGCW013 extends DaoEPBase {
this.spec = spec; this.spec = spec;
} }
public String getContractNo() {
return contractNo;
}
public void setContractNo(String contractNo) {
this.contractNo = contractNo;
}
/** /**
* get the value from Map. * get the value from Map.
* *
...@@ -594,6 +608,7 @@ public class HGCW013 extends DaoEPBase { ...@@ -594,6 +608,7 @@ public class HGCW013 extends DaoEPBase {
setInventCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_INVENT_CODE)), inventCode)); setInventCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_INVENT_CODE)), inventCode));
setInventName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_INVENT_NAME)), inventName)); setInventName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_INVENT_NAME)), inventName));
setSpec(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_SPEC)), spec)); setSpec(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_SPEC)), spec));
setContractNo(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CONTRACT_NO)), contractNo));
} }
/** /**
...@@ -627,6 +642,7 @@ public class HGCW013 extends DaoEPBase { ...@@ -627,6 +642,7 @@ public class HGCW013 extends DaoEPBase {
map.put(FIELD_INVENT_CODE, StringUtils.toString(inventCode, eiMetadata.getMeta(FIELD_INVENT_CODE))); map.put(FIELD_INVENT_CODE, StringUtils.toString(inventCode, eiMetadata.getMeta(FIELD_INVENT_CODE)));
map.put(FIELD_INVENT_NAME, StringUtils.toString(inventName, eiMetadata.getMeta(FIELD_INVENT_NAME))); map.put(FIELD_INVENT_NAME, StringUtils.toString(inventName, eiMetadata.getMeta(FIELD_INVENT_NAME)));
map.put(FIELD_SPEC, StringUtils.toString(spec, eiMetadata.getMeta(FIELD_SPEC))); map.put(FIELD_SPEC, StringUtils.toString(spec, eiMetadata.getMeta(FIELD_SPEC)));
map.put(FIELD_CONTRACT_NO, StringUtils.toString(contractNo, eiMetadata.getMeta(FIELD_CONTRACT_NO)));
return map; return map;
} }
......
...@@ -40,6 +40,7 @@ public class HGCW017 extends DaoEPBase { ...@@ -40,6 +40,7 @@ public class HGCW017 extends DaoEPBase {
public static final String FIELD_COMPANY_CODES = "companyCodes";/*用户角色权限*/ public static final String FIELD_COMPANY_CODES = "companyCodes";/*用户角色权限*/
public static final String FIELD_PROJ_NAME = "projName"; /* 项目名称*/ public static final String FIELD_PROJ_NAME = "projName"; /* 项目名称*/
public static final String FIELD_PROJ_CODE = "projCode"; /* 项目编号*/ public static final String FIELD_PROJ_CODE = "projCode"; /* 项目编号*/
public static final String FIELD_CONTRACT_NO = "contractNo"; /* 合同号*/
public static final String COL_ID = "ID"; public static final String COL_ID = "ID";
public static final String COL_MAIN_ID = "MAIN_ID"; /* 主表ID*/ public static final String COL_MAIN_ID = "MAIN_ID"; /* 主表ID*/
...@@ -83,6 +84,7 @@ public class HGCW017 extends DaoEPBase { ...@@ -83,6 +84,7 @@ public class HGCW017 extends DaoEPBase {
private String depCode = " "; /* 部门编码*/ private String depCode = " "; /* 部门编码*/
private String projName = " "; /* 项目名称*/ private String projName = " "; /* 项目名称*/
private String projCode = " "; /* 项目编号*/ private String projCode = " "; /* 项目编号*/
private String contractNo = " "; /* 合同号*/
/** /**
* initialize the metadata. * initialize the metadata.
...@@ -161,6 +163,10 @@ public class HGCW017 extends DaoEPBase { ...@@ -161,6 +163,10 @@ public class HGCW017 extends DaoEPBase {
eiColumn = new EiColumn(FIELD_PROJ_NAME); eiColumn = new EiColumn(FIELD_PROJ_NAME);
eiColumn.setDescName("项目名称"); eiColumn.setDescName("项目名称");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CONTRACT_NO);
eiColumn.setDescName("合同号");
eiMetadata.addMeta(eiColumn);
} }
/** /**
...@@ -427,6 +433,15 @@ public class HGCW017 extends DaoEPBase { ...@@ -427,6 +433,15 @@ public class HGCW017 extends DaoEPBase {
this.projCode = projCode; this.projCode = projCode;
} }
public String getContractNo() {
return contractNo;
}
public void setContractNo(String contractNo) {
this.contractNo = contractNo;
}
/** /**
* get the value from Map. * get the value from Map.
* *
...@@ -452,6 +467,7 @@ public class HGCW017 extends DaoEPBase { ...@@ -452,6 +467,7 @@ public class HGCW017 extends DaoEPBase {
setDepCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DEP_CODE)), depCode)); setDepCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DEP_CODE)), depCode));
setProjName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROJ_NAME)), projName)); setProjName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROJ_NAME)), projName));
setProjCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROJ_CODE)), projCode)); setProjCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROJ_CODE)), projCode));
setContractNo(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CONTRACT_NO)), contractNo));
} }
/** /**
...@@ -478,6 +494,7 @@ public class HGCW017 extends DaoEPBase { ...@@ -478,6 +494,7 @@ public class HGCW017 extends DaoEPBase {
map.put(FIELD_DEP_CODE, StringUtils.toString(depCode, eiMetadata.getMeta(FIELD_DEP_CODE))); map.put(FIELD_DEP_CODE, StringUtils.toString(depCode, eiMetadata.getMeta(FIELD_DEP_CODE)));
map.put(FIELD_PROJ_NAME, StringUtils.toString(projName, eiMetadata.getMeta(FIELD_PROJ_NAME))); map.put(FIELD_PROJ_NAME, StringUtils.toString(projName, eiMetadata.getMeta(FIELD_PROJ_NAME)));
map.put(FIELD_PROJ_CODE, StringUtils.toString(projCode, eiMetadata.getMeta(FIELD_PROJ_CODE))); map.put(FIELD_PROJ_CODE, StringUtils.toString(projCode, eiMetadata.getMeta(FIELD_PROJ_CODE)));
map.put(FIELD_CONTRACT_NO, StringUtils.toString(contractNo, eiMetadata.getMeta(FIELD_CONTRACT_NO)));
return map; return map;
} }
......
...@@ -3,6 +3,7 @@ package com.baosight.hggp.hg.cw.service; ...@@ -3,6 +3,7 @@ package com.baosight.hggp.hg.cw.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation; import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.common.DdynamicEnum; import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.common.ReviewStatusEnum; import com.baosight.hggp.common.ReviewStatusEnum;
import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.dao.DaoBase; import com.baosight.hggp.core.dao.DaoBase;
import com.baosight.hggp.core.dao.DaoUtils; import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.core.security.UserSessionUtils; import com.baosight.hggp.core.security.UserSessionUtils;
...@@ -10,6 +11,7 @@ import com.baosight.hggp.hg.constant.HGConstant; ...@@ -10,6 +11,7 @@ import com.baosight.hggp.hg.constant.HGConstant;
import com.baosight.hggp.hg.cw.domain.*; import com.baosight.hggp.hg.cw.domain.*;
import com.baosight.hggp.hg.cw.tools.HGCWTools; import com.baosight.hggp.hg.cw.tools.HGCWTools;
import com.baosight.hggp.hg.cw.vo.UserVO; import com.baosight.hggp.hg.cw.vo.UserVO;
import com.baosight.hggp.hg.pz.domain.HGPZ001;
import com.baosight.hggp.hg.pz.domain.HGPZ002; import com.baosight.hggp.hg.pz.domain.HGPZ002;
import com.baosight.hggp.hg.sb.tools.HGSBTools; import com.baosight.hggp.hg.sb.tools.HGSBTools;
import com.baosight.hggp.hg.sc.domain.HGSC001; import com.baosight.hggp.hg.sc.domain.HGSC001;
...@@ -55,6 +57,17 @@ public class ServiceHGCW002 extends ServiceBase { ...@@ -55,6 +57,17 @@ public class ServiceHGCW002 extends ServiceBase {
Map<String, Object> qarma = new HashMap<>(); Map<String, Object> qarma = new HashMap<>();
EiInfoUtils.addBlock(outInfo, "roleCompany", UserSessionUtils.getRoleCompany(), Company.class); EiInfoUtils.addBlock(outInfo, "roleCompany", UserSessionUtils.getRoleCompany(), Company.class);
CommonMethod.initBlock(outInfo, Arrays.asList(DdynamicEnum.GROUP_RECORD_BLOCK_ID, DdynamicEnum.CONTRACT_BLOCK_ID)); CommonMethod.initBlock(outInfo, Arrays.asList(DdynamicEnum.GROUP_RECORD_BLOCK_ID, DdynamicEnum.CONTRACT_BLOCK_ID));
Map map1 = new HashMap<>();
map1.put("status", CommonConstant.YesNo.YES_1);
List<HGPZ001> list = DaoBase.getInstance().query(HGPZ001.QUERY,map1);
List<HGPZ001> list1 = Optional.ofNullable(list).orElse(new ArrayList<>()).stream().filter(hgpz001 -> "分支单位".equals(hgpz001.getCustTypeName())).collect(Collectors.toList());
if (list1.size() > 0){
list1 = list1.stream().filter(hgpz001 -> "分支单位".equals(hgpz001.getCustTypeName())).collect(Collectors.toList());
List<String> custTypeList = list1.stream().map(HGPZ001::getCustType).collect(Collectors.toList());
CommonMethod.initBlock(outInfo, Arrays.asList(DdynamicEnum.CUSTOMER_RECORD_BLOCK_ID),
new HashMap<String, Object>(){{put("custTypes", custTypeList);}},false);
CommonMethod.comboBoxDefaultValue(outInfo,DdynamicEnum.CUSTOMER_RECORD_BLOCK_ID.getBlockId());
}
//角色公司 //角色公司
List<String> roleCompanyCode = HGSBTools.getRoleCompanyCode(); List<String> roleCompanyCode = HGSBTools.getRoleCompanyCode();
qarma.put(Org.FIELD_ORG_ID, roleCompanyCode); qarma.put(Org.FIELD_ORG_ID, roleCompanyCode);
...@@ -116,16 +129,19 @@ public class ServiceHGCW002 extends ServiceBase { ...@@ -116,16 +129,19 @@ public class ServiceHGCW002 extends ServiceBase {
HGCW002.setPlanEndDate(DateUtils.formatShort(HGCW002.getPlanEndDate())); HGCW002.setPlanEndDate(DateUtils.formatShort(HGCW002.getPlanEndDate()));
HGCW002.setSigningDate(DateUtils.formatShort(HGCW002.getSigningDate())); HGCW002.setSigningDate(DateUtils.formatShort(HGCW002.getSigningDate()));
if (HGCW002.getId() == null || HGCW002.getId() == 0) { if (HGCW002.getId() == null || HGCW002.getId() == 0) {
if (HGCW002.getContractNumber().trim().isEmpty()){
String contractNumber = HGCW002.getCompanyCode() + String contractNumber = HGCW002.getCompanyCode() +
HGCW002.getContractType() + HGCW002.getContractType() +
SequenceGenerator.getNextSequence(HGConstant.SequenceId.CW_CONTRACT_NO); SequenceGenerator.getNextSequence(HGConstant.SequenceId.CW_CONTRACT_NO);
HGCW002.setContractNumber(contractNumber); HGCW002.setContractNumber(contractNumber);
}
HGCW002.setReviewStatus(0); HGCW002.setReviewStatus(0);
HGCW002.setBalanceStatus(1); HGCW002.setBalanceStatus(1);
this.add(HGCW002); this.add(HGCW002);
// 写入其他数据 // 写入其他数据
HGCWTools.HgCw003.save(detail1Rows, contractNumber, HGCW002); HGCWTools.HgCw003.save(detail1Rows, HGCW002.getContractNumber(), HGCW002);
HGCWTools.HgCw999.batchUpdate(detail2Rows, HGCW002.getId()); HGCWTools.HgCw999.batchUpdate(detail2Rows, HGCW002.getId());
} else { } else {
......
...@@ -2,15 +2,19 @@ package com.baosight.hggp.hg.cw.service; ...@@ -2,15 +2,19 @@ package com.baosight.hggp.hg.cw.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation; import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.common.DdynamicEnum; import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.dao.DaoBase;
import com.baosight.hggp.core.dao.DaoUtils; import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.core.security.UserSessionUtils; import com.baosight.hggp.core.security.UserSessionUtils;
import com.baosight.hggp.hg.cw.domain.HGCW002; import com.baosight.hggp.hg.cw.domain.HGCW002;
import com.baosight.hggp.hg.cw.domain.HGCW003; import com.baosight.hggp.hg.cw.domain.HGCW003;
import com.baosight.hggp.hg.cw.tools.HGCWTools; import com.baosight.hggp.hg.cw.tools.HGCWTools;
import com.baosight.hggp.hg.cw.vo.UserVO; import com.baosight.hggp.hg.cw.vo.UserVO;
import com.baosight.hggp.hg.pz.domain.HGPZ001;
import com.baosight.hggp.hg.pz.domain.HGPZ002; import com.baosight.hggp.hg.pz.domain.HGPZ002;
import com.baosight.hggp.hg.pz.domain.HGPZ003; import com.baosight.hggp.hg.pz.domain.HGPZ003;
import com.baosight.hggp.hg.pz.tools.HGPZTools; import com.baosight.hggp.hg.pz.tools.HGPZTools;
import com.baosight.hggp.hg.sc.domain.HGSC001;
import com.baosight.hggp.hg.sc.domain.HGSC004A; import com.baosight.hggp.hg.sc.domain.HGSC004A;
import com.baosight.hggp.hg.sj.domain.HGSJ003; import com.baosight.hggp.hg.sj.domain.HGSJ003;
import com.baosight.hggp.hg.xs.domain.Company; import com.baosight.hggp.hg.xs.domain.Company;
...@@ -47,6 +51,17 @@ public class ServiceHGCW002A extends ServiceBase { ...@@ -47,6 +51,17 @@ public class ServiceHGCW002A extends ServiceBase {
public EiInfo initLoad(EiInfo inInfo) { public EiInfo initLoad(EiInfo inInfo) {
try { try {
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.PROJECT_CODE_BOX_BLOCK_ID), null, false); CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.PROJECT_CODE_BOX_BLOCK_ID), null, false);
Map map1 = new HashMap<>();
map1.put("status", CommonConstant.YesNo.YES_1);
List<HGPZ001> list = DaoBase.getInstance().query(HGPZ001.QUERY,map1);
List<HGPZ001> list1 = Optional.ofNullable(list).orElse(new ArrayList<>()).stream().filter(hgpz001 -> "分支单位".equals(hgpz001.getCustTypeName())).collect(Collectors.toList());
if (list1.size() > 0){
list1 = list1.stream().filter(hgpz001 -> "分支单位".equals(hgpz001.getCustTypeName())).collect(Collectors.toList());
List<String> custTypeList = list1.stream().map(HGPZ001::getCustType).collect(Collectors.toList());
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.CUSTOMER_RECORD_BLOCK_ID),
new HashMap<String, Object>(){{put("custTypes", custTypeList);}},false);
CommonMethod.comboBoxDefaultValue(inInfo,DdynamicEnum.CUSTOMER_RECORD_BLOCK_ID.getBlockId());
}
inInfo.addBlock("detail1").addBlockMeta(new HGCW002().eiMetadata); inInfo.addBlock("detail1").addBlockMeta(new HGCW002().eiMetadata);
inInfo.addBlock("detail2").addBlockMeta(new HGCW002().eiMetadata); inInfo.addBlock("detail2").addBlockMeta(new HGCW002().eiMetadata);
} catch (PlatException e) { } catch (PlatException e) {
......
...@@ -2,11 +2,14 @@ package com.baosight.hggp.hg.cw.service; ...@@ -2,11 +2,14 @@ package com.baosight.hggp.hg.cw.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation; import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.common.DdynamicEnum; import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.dao.DaoBase;
import com.baosight.hggp.hg.cw.domain.HGCW002; import com.baosight.hggp.hg.cw.domain.HGCW002;
import com.baosight.hggp.hg.cw.domain.HGCW003; import com.baosight.hggp.hg.cw.domain.HGCW003;
import com.baosight.hggp.hg.cw.domain.HGCW999; import com.baosight.hggp.hg.cw.domain.HGCW999;
import com.baosight.hggp.hg.cw.tools.HGCWTools; import com.baosight.hggp.hg.cw.tools.HGCWTools;
import com.baosight.hggp.hg.cw.vo.UserVO; import com.baosight.hggp.hg.cw.vo.UserVO;
import com.baosight.hggp.hg.pz.domain.HGPZ001;
import com.baosight.hggp.hg.pz.domain.HGPZ002; import com.baosight.hggp.hg.pz.domain.HGPZ002;
import com.baosight.hggp.hg.pz.domain.HGPZ003; import com.baosight.hggp.hg.pz.domain.HGPZ003;
import com.baosight.hggp.hg.pz.tools.HGPZTools; import com.baosight.hggp.hg.pz.tools.HGPZTools;
...@@ -22,6 +25,7 @@ import com.baosight.iplat4j.core.service.impl.ServiceBase; ...@@ -22,6 +25,7 @@ import com.baosight.iplat4j.core.service.impl.ServiceBase;
import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.CollectionUtils;
import java.util.*; import java.util.*;
import java.util.stream.Collectors;
/** /**
* @author yukang * @author yukang
...@@ -42,6 +46,16 @@ public class ServiceHGCW002B extends ServiceBase { ...@@ -42,6 +46,16 @@ public class ServiceHGCW002B extends ServiceBase {
String id = inInfo.getString("id"); String id = inInfo.getString("id");
HGCW002 HGCW002 = HGCWTools.HgCw002.getId(id); HGCW002 HGCW002 = HGCWTools.HgCw002.getId(id);
inInfo.addBlock(EiConstant.resultBlock).addRow(HGCW002); inInfo.addBlock(EiConstant.resultBlock).addRow(HGCW002);
Map map1 = new HashMap<>();
map1.put("status", CommonConstant.YesNo.YES_1);
List<HGPZ001> list = DaoBase.getInstance().query(HGPZ001.QUERY,map1);
List<HGPZ001> list1 = Optional.ofNullable(list).orElse(new ArrayList<>()).stream().filter(hgpz001 -> "分支单位".equals(hgpz001.getCustTypeName())).collect(Collectors.toList());
if (list1.size() > 0){
list1 = list1.stream().filter(hgpz001 -> "分支单位".equals(hgpz001.getCustTypeName())).collect(Collectors.toList());
List<String> custTypeList = list1.stream().map(HGPZ001::getCustType).collect(Collectors.toList());
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.CUSTOMER_RECORD_BLOCK_ID),
new HashMap<String, Object>(){{put("custTypes", custTypeList);}},false);
}
//获取清单 //获取清单
List<HGCW003> hgcw003List = HGCWTools.HgCw003.queryByContractNumber(HGCW002.getContractNumber()); List<HGCW003> hgcw003List = HGCWTools.HgCw003.queryByContractNumber(HGCW002.getContractNumber());
inInfo.addBlock("detail1").addRows(hgcw003List); inInfo.addBlock("detail1").addRows(hgcw003List);
......
...@@ -2,19 +2,24 @@ package com.baosight.hggp.hg.cw.service; ...@@ -2,19 +2,24 @@ package com.baosight.hggp.hg.cw.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation; import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.common.DdynamicEnum; import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.dao.DaoBase;
import com.baosight.hggp.hg.cw.domain.HGCW002; import com.baosight.hggp.hg.cw.domain.HGCW002;
import com.baosight.hggp.hg.cw.domain.HGCW003; import com.baosight.hggp.hg.cw.domain.HGCW003;
import com.baosight.hggp.hg.cw.domain.HGCW999; import com.baosight.hggp.hg.cw.domain.HGCW999;
import com.baosight.hggp.hg.cw.tools.HGCWTools; import com.baosight.hggp.hg.cw.tools.HGCWTools;
import com.baosight.hggp.hg.pz.domain.HGPZ001;
import com.baosight.hggp.hg.sc.domain.HGSC001;
import com.baosight.hggp.util.CommonMethod; import com.baosight.hggp.util.CommonMethod;
import com.baosight.hggp.util.LogUtils; 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.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo; import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException; import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.service.impl.ServiceBase; import com.baosight.iplat4j.core.service.impl.ServiceBase;
import java.util.Arrays; import java.util.*;
import java.util.List; import java.util.stream.Collectors;
/** /**
* @author yukang * @author yukang
...@@ -35,6 +40,16 @@ public class ServiceHGCW002C extends ServiceBase { ...@@ -35,6 +40,16 @@ public class ServiceHGCW002C extends ServiceBase {
String id = inInfo.getString("id"); String id = inInfo.getString("id");
HGCW002 HGCW002 = HGCWTools.HgCw002.getId(id); HGCW002 HGCW002 = HGCWTools.HgCw002.getId(id);
inInfo.addBlock(EiConstant.resultBlock).addRow(HGCW002); inInfo.addBlock(EiConstant.resultBlock).addRow(HGCW002);
Map map1 = new HashMap<>();
map1.put("status", CommonConstant.YesNo.YES_1);
List<HGPZ001> list = DaoBase.getInstance().query(HGPZ001.QUERY,map1);
List<HGPZ001> list1 = Optional.ofNullable(list).orElse(new ArrayList<>()).stream().filter(hgpz001 -> "分支单位".equals(hgpz001.getCustTypeName())).collect(Collectors.toList());
if (list1.size() > 0){
list1 = list1.stream().filter(hgpz001 -> "分支单位".equals(hgpz001.getCustTypeName())).collect(Collectors.toList());
List<String> custTypeList = list1.stream().map(HGPZ001::getCustType).collect(Collectors.toList());
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.CUSTOMER_RECORD_BLOCK_ID),
new HashMap<String, Object>(){{put("custTypes", custTypeList);}},false);
}
//获取清单 //获取清单
List<HGCW003> hgcw003List = HGCWTools.HgCw003.queryByContractNumber(HGCW002.getContractNumber()); List<HGCW003> hgcw003List = HGCWTools.HgCw003.queryByContractNumber(HGCW002.getContractNumber());
inInfo.addBlock("detail1").addRows(hgcw003List); inInfo.addBlock("detail1").addRows(hgcw003List);
......
...@@ -3,6 +3,9 @@ package com.baosight.hggp.hg.cw.service; ...@@ -3,6 +3,9 @@ package com.baosight.hggp.hg.cw.service;
import com.baosight.eplat.utils.StringUtils; import com.baosight.eplat.utils.StringUtils;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation; import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.common.DdynamicEnum; import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.common.ReviewStatusEnum;
import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.dao.DaoBase;
import com.baosight.hggp.core.dao.DaoUtils; import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.core.security.UserSessionUtils; import com.baosight.hggp.core.security.UserSessionUtils;
import com.baosight.hggp.hg.constant.HGConstant; import com.baosight.hggp.hg.constant.HGConstant;
...@@ -10,12 +13,14 @@ import com.baosight.hggp.hg.cw.domain.*; ...@@ -10,12 +13,14 @@ import com.baosight.hggp.hg.cw.domain.*;
import com.baosight.hggp.hg.cw.domain.HGCW010; import com.baosight.hggp.hg.cw.domain.HGCW010;
import com.baosight.hggp.hg.cw.tools.HGCWTools; import com.baosight.hggp.hg.cw.tools.HGCWTools;
import com.baosight.hggp.hg.cw.vo.UserVO; import com.baosight.hggp.hg.cw.vo.UserVO;
import com.baosight.hggp.hg.pz.domain.HGPZ001;
import com.baosight.hggp.hg.sb.domain.HGSB001; import com.baosight.hggp.hg.sb.domain.HGSB001;
import com.baosight.hggp.hg.sb.tools.HGSBTools; import com.baosight.hggp.hg.sb.tools.HGSBTools;
import com.baosight.hggp.hg.sc.domain.HGSC001; import com.baosight.hggp.hg.sc.domain.HGSC001;
import com.baosight.hggp.hg.sc.tools.HGSCTools; import com.baosight.hggp.hg.sc.tools.HGSCTools;
import com.baosight.hggp.hg.xs.domain.Company; import com.baosight.hggp.hg.xs.domain.Company;
import com.baosight.hggp.util.*; import com.baosight.hggp.util.*;
import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant; import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo; import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException; import com.baosight.iplat4j.core.exception.PlatException;
...@@ -26,10 +31,8 @@ import org.apache.commons.collections.CollectionUtils; ...@@ -26,10 +31,8 @@ import org.apache.commons.collections.CollectionUtils;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.text.DecimalFormat; import java.text.DecimalFormat;
import java.util.Arrays; import java.util.*;
import java.util.HashMap; import java.util.stream.Collectors;
import java.util.List;
import java.util.Map;
/** /**
* @author yukang * @author yukang
...@@ -50,11 +53,34 @@ public class ServiceHGCW010 extends ServiceBase { ...@@ -50,11 +53,34 @@ public class ServiceHGCW010 extends ServiceBase {
/*CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.SUP_RECORD_BLOCK_ID, /*CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.SUP_RECORD_BLOCK_ID,
DdynamicEnum.PROJ_RECORD_BLOCK_ID), null, false);*/ DdynamicEnum.PROJ_RECORD_BLOCK_ID), null, false);*/
List<String> roleCompanyCode = HGSBTools.getRoleCompanyCode(); List<String> roleCompanyCode = HGSBTools.getRoleCompanyCode();
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.PROJ_RECORD_BLOCK_ID,DdynamicEnum.CUSTOMER_RECORD_BLOCK_ID), CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.PROJ_RECORD_BLOCK_ID),
new HashMap<String,Object>(){{ new HashMap<String,Object>(){{
put(HGSB001.FIELD_COMPANY_CODES,roleCompanyCode); put(HGSB001.FIELD_COMPANY_CODES,roleCompanyCode);
}} }}
); );
Map map1 = new HashMap<>();
map1.put("status", CommonConstant.YesNo.YES_1);
List<HGPZ001> list = DaoBase.getInstance().query(HGPZ001.QUERY,map1);
List<HGPZ001> list1 = Optional.ofNullable(list).orElse(new ArrayList<>()).stream().filter(hgpz001 -> "分支单位".equals(hgpz001.getCustTypeName())).collect(Collectors.toList());
if (list1.size() > 0){
list1 = list1.stream().filter(hgpz001 -> "分支单位".equals(hgpz001.getCustTypeName())).collect(Collectors.toList());
List<String> custTypeList = list1.stream().map(HGPZ001::getCustType).collect(Collectors.toList());
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.CUSTOMER_RECORD_BLOCK_ID),
new HashMap<String, Object>(){{put("custTypes", custTypeList);}},false);
List<Map> info = inInfo.getBlock("customer_record_block_id").getRows();
EiBlock block = new EiBlock("customer1_record_block_id");
block.setRows(info);
inInfo.setBlock(block);
CommonMethod.comboBoxDefaultValue(inInfo,"customer1_record_block_id");
}
List<HGPZ001> list2 = Optional.ofNullable(list).orElse(new ArrayList<>()).stream().filter(hgpz001 -> !"分支单位".equals(hgpz001.getCustTypeName())).collect(Collectors.toList());
if (list2.size() > 0){
list2 = list2.stream().filter(hgpz001 -> !"分支单位".equals(hgpz001.getCustTypeName())).collect(Collectors.toList());
List<String> custTypeList = list2.stream().map(HGPZ001::getCustType).collect(Collectors.toList());
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.CUSTOMER_RECORD_BLOCK_ID),
new HashMap<String, Object>(){{put("custTypes", custTypeList);}},false);
CommonMethod.comboBoxDefaultValue(inInfo,DdynamicEnum.CUSTOMER_RECORD_BLOCK_ID.getBlockId());
}
EiInfoUtils.addBlock(inInfo,"roleCompany", UserSessionUtils.getRoleCompany(), Company.class); EiInfoUtils.addBlock(inInfo,"roleCompany", UserSessionUtils.getRoleCompany(), Company.class);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGCW010().eiMetadata); inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGCW010().eiMetadata);
} catch (Exception e) { } catch (Exception e) {
...@@ -91,26 +117,30 @@ public class ServiceHGCW010 extends ServiceBase { ...@@ -91,26 +117,30 @@ public class ServiceHGCW010 extends ServiceBase {
try { try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows(); List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
// 写入数据 // 写入数据
for (int i = 0; i < resultRows.size(); i++) { for (Map resultRow : resultRows) {
HGCW010 hgcw010 = new HGCW010(); HGCW010 hgcw010 = new HGCW010();
hgcw010.fromMap(resultRows.get(i)); hgcw010.fromMap(resultRow);
if (StringUtils.isEmpty(hgcw010.getCompanyCode())){ if (StringUtils.isEmpty(hgcw010.getCompanyCode())) {
UserVO userVO = HGCWTools.HgCw002.getUserCompany(); UserVO userVO = HGCWTools.HgCw002.getUserCompany();
hgcw010.setCompanyCode(userVO.getUsercode()); hgcw010.setCompanyCode(userVO.getUsercode());
hgcw010.setCompanyName(userVO.getUsername()); hgcw010.setCompanyName(userVO.getUsername());
} }
if (StringUtils.isEmpty(hgcw010.getProjName())){ if (StringUtils.isEmpty(hgcw010.getProjName())) {
// 获取项目名称 // 获取项目名称
HGSC001 HGSC001 = HGSCTools.Hgsc001.queryByCode(hgcw010.getProjCode()); HGSC001 HGSC001 = HGSCTools.Hgsc001.queryByCode(hgcw010.getProjCode());
AssertUtils.isNull(HGSC001, "项目编码[" + hgcw010.getProjCode() + "]不存在"); AssertUtils.isNull(HGSC001, "项目编码[" + hgcw010.getProjCode() + "]不存在");
hgcw010.setProjName(HGSC001.getProjName()); hgcw010.setProjName(HGSC001.getProjName());
} }
hgcw010.setBillState(1);
hgcw010.setReviewStatus(0);
hgcw010.setSigningDate(DateUtils.formatShort(hgcw010.getSigningDate())); hgcw010.setSigningDate(DateUtils.formatShort(hgcw010.getSigningDate()));
if (hgcw010.getId() == null || hgcw010.getId() == 0) { if (hgcw010.getId() == null || hgcw010.getId() == 0) {
hgcw010.setBillState(HGConstant.BillStatus.S1);
hgcw010.setReviewStatus(ReviewStatusEnum.UNREVIEWED.getCode());
this.add(hgcw010); this.add(hgcw010);
} else { } else {
List<HGCW011> hgcw011List = HGCWTools.HgCw011.getMainId(hgcw010.getId());
if (hgcw011List.size() > 0 && StringUtils.isNotEmpty(hgcw010.getBillNumber())){
hgcw010.setBillState(HGConstant.BillStatus.S2);
}
this.modify(hgcw010); this.modify(hgcw010);
} }
} }
......
...@@ -2,20 +2,24 @@ package com.baosight.hggp.hg.cw.service; ...@@ -2,20 +2,24 @@ package com.baosight.hggp.hg.cw.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation; import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.common.DdynamicEnum; import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.dao.DaoBase;
import com.baosight.hggp.hg.cw.domain.HGCW010; import com.baosight.hggp.hg.cw.domain.HGCW010;
import com.baosight.hggp.hg.cw.domain.HGCW011; import com.baosight.hggp.hg.cw.domain.HGCW011;
import com.baosight.hggp.hg.cw.domain.HGCW015; import com.baosight.hggp.hg.cw.domain.HGCW015;
import com.baosight.hggp.hg.pz.domain.HGPZ001;
import com.baosight.hggp.util.CommonMethod; import com.baosight.hggp.util.CommonMethod;
import com.baosight.hggp.util.EiInfoUtils; import com.baosight.hggp.util.EiInfoUtils;
import com.baosight.hggp.util.LogUtils; import com.baosight.hggp.util.LogUtils;
import com.baosight.hggp.util.contants.ACConstants; import com.baosight.hggp.util.contants.ACConstants;
import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant; import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo; import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException; import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.service.impl.ServiceBase; import com.baosight.iplat4j.core.service.impl.ServiceBase;
import java.util.Arrays; import java.util.*;
import java.util.Map; import java.util.stream.Collectors;
/** /**
* @author yukang * @author yukang
...@@ -35,6 +39,21 @@ public class ServiceHGCW010B extends ServiceBase { ...@@ -35,6 +39,21 @@ public class ServiceHGCW010B extends ServiceBase {
try { try {
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.FACTORY_RECORD_BLOCK_ID, CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.FACTORY_RECORD_BLOCK_ID,
DdynamicEnum.COMPANY_BOX_BLOCK_ID,DdynamicEnum.PROJ_RECORD_BLOCK_ID), null, false); DdynamicEnum.COMPANY_BOX_BLOCK_ID,DdynamicEnum.PROJ_RECORD_BLOCK_ID), null, false);
Map map1 = new HashMap<>();
map1.put("status", CommonConstant.YesNo.YES_1);
List<HGPZ001> list = DaoBase.getInstance().query(HGPZ001.QUERY,map1);
List<HGPZ001> list1 = Optional.ofNullable(list).orElse(new ArrayList<>()).stream().filter(hgpz001 -> "分支单位".equals(hgpz001.getCustTypeName())).collect(Collectors.toList());
if (list1.size() > 0){
list1 = list1.stream().filter(hgpz001 -> "分支单位".equals(hgpz001.getCustTypeName())).collect(Collectors.toList());
List<String> custTypeList = list1.stream().map(HGPZ001::getCustType).collect(Collectors.toList());
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.CUSTOMER_RECORD_BLOCK_ID),
new HashMap<String, Object>(){{put("custTypes", custTypeList);}},false);
List<Map> info = inInfo.getBlock("customer_record_block_id").getRows();
EiBlock block = new EiBlock("customer1_record_block_id");
block.setRows(info);
inInfo.setBlock(block);
CommonMethod.comboBoxDefaultValue(inInfo,"customer1_record_block_id");
}
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGCW015().eiMetadata); inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGCW015().eiMetadata);
} catch (PlatException e) { } catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败"); LogUtils.setDetailMsg(inInfo, e, "初始化失败");
......
...@@ -2,18 +2,26 @@ package com.baosight.hggp.hg.cw.service; ...@@ -2,18 +2,26 @@ package com.baosight.hggp.hg.cw.service;
import com.baosight.eplat.utils.StringUtils; import com.baosight.eplat.utils.StringUtils;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation; import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.common.ReviewStatusEnum;
import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.dao.DaoBase;
import com.baosight.hggp.core.dao.DaoUtils; import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.core.security.UserSessionUtils; import com.baosight.hggp.core.security.UserSessionUtils;
import com.baosight.hggp.hg.constant.HGConstant;
import com.baosight.hggp.hg.cw.domain.HGCW002; import com.baosight.hggp.hg.cw.domain.HGCW002;
import com.baosight.hggp.hg.cw.domain.HGCW010; import com.baosight.hggp.hg.cw.domain.HGCW010;
import com.baosight.hggp.hg.cw.domain.HGCW010A; import com.baosight.hggp.hg.cw.domain.HGCW010A;
import com.baosight.hggp.hg.cw.domain.HGCW011; import com.baosight.hggp.hg.cw.domain.HGCW011;
import com.baosight.hggp.hg.cw.tools.HGCWTools; import com.baosight.hggp.hg.cw.tools.HGCWTools;
import com.baosight.hggp.hg.cw.vo.UserVO; import com.baosight.hggp.hg.cw.vo.UserVO;
import com.baosight.hggp.hg.pz.domain.HGPZ001;
import com.baosight.hggp.hg.xs.domain.Company; import com.baosight.hggp.hg.xs.domain.Company;
import com.baosight.hggp.util.CommonMethod;
import com.baosight.hggp.util.DateUtils; import com.baosight.hggp.util.DateUtils;
import com.baosight.hggp.util.EiInfoUtils; import com.baosight.hggp.util.EiInfoUtils;
import com.baosight.hggp.util.LogUtils; 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.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo; import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase; import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
...@@ -23,10 +31,8 @@ import org.apache.commons.collections.CollectionUtils; ...@@ -23,10 +31,8 @@ import org.apache.commons.collections.CollectionUtils;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.math.RoundingMode; import java.math.RoundingMode;
import java.text.DecimalFormat; import java.text.DecimalFormat;
import java.util.ArrayList; import java.util.*;
import java.util.HashMap; import java.util.stream.Collectors;
import java.util.List;
import java.util.Map;
/** /**
* @author LiuYang * @author LiuYang
...@@ -47,6 +53,29 @@ public class ServiceHGCW010D extends ServiceEPBase { ...@@ -47,6 +53,29 @@ public class ServiceHGCW010D extends ServiceEPBase {
public EiInfo initLoad(EiInfo inInfo) { public EiInfo initLoad(EiInfo inInfo) {
try { try {
EiInfoUtils.addBlock(inInfo,"roleCompany", UserSessionUtils.getRoleCompany(), Company.class); EiInfoUtils.addBlock(inInfo,"roleCompany", UserSessionUtils.getRoleCompany(), Company.class);
Map map1 = new HashMap<>();
map1.put("status", CommonConstant.YesNo.YES_1);
List<HGPZ001> list = DaoBase.getInstance().query(HGPZ001.QUERY,map1);
List<HGPZ001> list1 = Optional.ofNullable(list).orElse(new ArrayList<>()).stream().filter(hgpz001 -> "分支单位".equals(hgpz001.getCustTypeName())).collect(Collectors.toList());
if (list1.size() > 0){
list1 = list1.stream().filter(hgpz001 -> "分支单位".equals(hgpz001.getCustTypeName())).collect(Collectors.toList());
List<String> custTypeList = list1.stream().map(HGPZ001::getCustType).collect(Collectors.toList());
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.CUSTOMER_RECORD_BLOCK_ID),
new HashMap<String, Object>(){{put("custTypes", custTypeList);}},false);
List<Map> info = inInfo.getBlock("customer_record_block_id").getRows();
EiBlock block = new EiBlock("customer1_record_block_id");
block.setRows(info);
inInfo.setBlock(block);
CommonMethod.comboBoxDefaultValue(inInfo,"customer1_record_block_id");
}
List<HGPZ001> list2 = Optional.ofNullable(list).orElse(new ArrayList<>()).stream().filter(hgpz001 -> !"分支单位".equals(hgpz001.getCustTypeName())).collect(Collectors.toList());
if (list2.size() > 0){
list2 = list2.stream().filter(hgpz001 -> !"分支单位".equals(hgpz001.getCustTypeName())).collect(Collectors.toList());
List<String> custTypeList = list2.stream().map(HGPZ001::getCustType).collect(Collectors.toList());
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.CUSTOMER_RECORD_BLOCK_ID),
new HashMap<String, Object>(){{put("custTypes", custTypeList);}},false);
CommonMethod.comboBoxDefaultValue(inInfo,DdynamicEnum.CUSTOMER_RECORD_BLOCK_ID.getBlockId());
}
//inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGCW010A().eiMetadata); //inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGCW010A().eiMetadata);
} catch (Exception e) { } catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败"); LogUtils.setDetailMsg(inInfo, e, "初始化失败");
...@@ -93,8 +122,8 @@ public class ServiceHGCW010D extends ServiceEPBase { ...@@ -93,8 +122,8 @@ public class ServiceHGCW010D extends ServiceEPBase {
hgcw010.setCompanyCode(userVO.getUsercode()); hgcw010.setCompanyCode(userVO.getUsercode());
hgcw010.setCompanyName(userVO.getUsername()); hgcw010.setCompanyName(userVO.getUsername());
hgcw010.setBillTybe(1); hgcw010.setBillTybe(1);
hgcw010.setReviewStatus(0); hgcw010.setReviewStatus(ReviewStatusEnum.UNREVIEWED.getCode());
hgcw010.setBillState(1); hgcw010.setBillState(HGConstant.BillStatus.S1);
hgcw010.setSigningDate(DateUtils.shortDate()); hgcw010.setSigningDate(DateUtils.shortDate());
BigDecimal totalContractPriceIncluding = BigDecimal.ZERO; BigDecimal totalContractPriceIncluding = BigDecimal.ZERO;
StringBuffer settlementNumber = new StringBuffer(); StringBuffer settlementNumber = new StringBuffer();
...@@ -117,6 +146,7 @@ public class ServiceHGCW010D extends ServiceEPBase { ...@@ -117,6 +146,7 @@ public class ServiceHGCW010D extends ServiceEPBase {
hgcw010.setThisSettlementAmount(hgcw011List.get(0).getThisSettlementAmount()); hgcw010.setThisSettlementAmount(hgcw011List.get(0).getThisSettlementAmount());
hgcw010.setSettlementNumber(settlementNumber.toString().substring(0, settlementNumber.length() - 1)); hgcw010.setSettlementNumber(settlementNumber.toString().substring(0, settlementNumber.length() - 1));
hgcw010.setRemainingAmount(new BigDecimal(decimalFormat.format(totalContractPriceIncluding))); hgcw010.setRemainingAmount(new BigDecimal(decimalFormat.format(totalContractPriceIncluding)));
hgcw010.setBranchUnit(hgcw011List.get(0).getBranchUnit());
this.add(hgcw010); this.add(hgcw010);
//生成明细表 //生成明细表
......
...@@ -14,10 +14,7 @@ import com.baosight.hggp.hg.cg.domain.HGCG003B; ...@@ -14,10 +14,7 @@ import com.baosight.hggp.hg.cg.domain.HGCG003B;
import com.baosight.hggp.hg.cg.tools.HGCGTools; import com.baosight.hggp.hg.cg.tools.HGCGTools;
import com.baosight.hggp.hg.constant.HGConstant; import com.baosight.hggp.hg.constant.HGConstant;
import com.baosight.hggp.hg.constant.HGSqlConstant; import com.baosight.hggp.hg.constant.HGSqlConstant;
import com.baosight.hggp.hg.cw.domain.HGCW006; import com.baosight.hggp.hg.cw.domain.*;
import com.baosight.hggp.hg.cw.domain.HGCW008;
import com.baosight.hggp.hg.cw.domain.HGCW012;
import com.baosight.hggp.hg.cw.domain.HGCW013;
import com.baosight.hggp.hg.cw.tools.HGCWTools; import com.baosight.hggp.hg.cw.tools.HGCWTools;
import com.baosight.hggp.hg.cw.vo.UserVO; import com.baosight.hggp.hg.cw.vo.UserVO;
import com.baosight.hggp.hg.xs.domain.Company; import com.baosight.hggp.hg.xs.domain.Company;
...@@ -391,6 +388,8 @@ public class ServiceHGCW012 extends ServiceBase { ...@@ -391,6 +388,8 @@ public class ServiceHGCW012 extends ServiceBase {
//StringBuffer settlementNumber = new StringBuffer(); //StringBuffer settlementNumber = new StringBuffer();
Map<String, BigDecimal> rowMap = new HashMap<>(); Map<String, BigDecimal> rowMap = new HashMap<>();
HGCWTools.HgCw013.countTaxAmount(resultRows, hgcw012, rowMap); HGCWTools.HgCw013.countTaxAmount(resultRows, hgcw012, rowMap);
String contractNo =hgcw013List.stream().map(HGCW013::getContractNo).distinct().collect(Collectors.joining());
hgcw012.setContractNo(contractNo);
/*for (HGCW013 hgcw013 : hgcw013List) { /*for (HGCW013 hgcw013 : hgcw013List) {
settlementNumber.append(hgcw013.getSettlementNumber()).append(","); settlementNumber.append(hgcw013.getSettlementNumber()).append(",");
} }
...@@ -591,13 +590,15 @@ public class ServiceHGCW012 extends ServiceBase { ...@@ -591,13 +590,15 @@ public class ServiceHGCW012 extends ServiceBase {
*/ */
public EiInfo submit(EiInfo inInfo){ public EiInfo submit(EiInfo inInfo){
try { try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows(); //List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
for (Map resultRow : resultRows) { List<HGCW012> resultRows = MapUtils.toDaoEPBases(inInfo, HGCW012.class);
List<Long> ids = resultRows.stream().map(HGCW012::getId).collect(Collectors.toList());
List<HGCW013> hgcw013s = HGCWTools.HgCw013.getMainId(ids);
for (HGCW012 resultRow : resultRows) {
HGCW012 hgcw012 = new HGCW012(); HGCW012 hgcw012 = new HGCW012();
hgcw012.fromMap(resultRow); hgcw012.fromMap(resultRow.toMap());
if (hgcw012.getBillState() == 0) { long count = hgcw013s.stream().filter(hgcw013 -> hgcw013.getMainId().equals(resultRow.getId())).count();
throw new PlatException("数据未开票,请先开票!"); AssertUtils.isTrue(count <= 0, "请添加明细数据!");
}
hgcw012.setReviewStatus(ReviewStatusEnum.REVIEWED.getCode()); hgcw012.setReviewStatus(ReviewStatusEnum.REVIEWED.getCode());
DaoUtils.update("HGCW012.submit", hgcw012); DaoUtils.update("HGCW012.submit", hgcw012);
} }
......
...@@ -3,6 +3,7 @@ package com.baosight.hggp.hg.cw.service; ...@@ -3,6 +3,7 @@ package com.baosight.hggp.hg.cw.service;
import com.baosight.eplat.utils.StringUtils; import com.baosight.eplat.utils.StringUtils;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation; import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.common.DdynamicEnum; import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.common.ReviewStatusEnum;
import com.baosight.hggp.core.dao.DaoUtils; import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.core.security.UserSessionUtils; import com.baosight.hggp.core.security.UserSessionUtils;
import com.baosight.hggp.hg.constant.HGConstant; import com.baosight.hggp.hg.constant.HGConstant;
...@@ -273,7 +274,7 @@ public class ServiceHGCW014 extends ServiceBase { ...@@ -273,7 +274,7 @@ 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(1); HGCW014.setReviewStatus(ReviewStatusEnum.REVIEWED.getCode());
DaoUtils.update("HGCW014.submit", HGCW014); DaoUtils.update("HGCW014.submit", HGCW014);
} }
inInfo = this.query(inInfo); inInfo = this.query(inInfo);
...@@ -291,6 +292,9 @@ public class ServiceHGCW014 extends ServiceBase { ...@@ -291,6 +292,9 @@ 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));
if (!HGCW014.getReviewStatus().equals(ReviewStatusEnum.UNREVIEWED.getCode())){
throw new RuntimeException("当前状态为未审核提交,请先审核提交!");
}
HGCW014.setCancelStatus(2); HGCW014.setCancelStatus(2);
DaoUtils.update("HGCW014.writeoff", HGCW014); DaoUtils.update("HGCW014.writeoff", HGCW014);
} }
......
...@@ -13,10 +13,7 @@ import com.baosight.hggp.hg.cw.domain.HGCW017; ...@@ -13,10 +13,7 @@ import com.baosight.hggp.hg.cw.domain.HGCW017;
import com.baosight.hggp.hg.cw.tools.HGCWTools; import com.baosight.hggp.hg.cw.tools.HGCWTools;
import com.baosight.hggp.hg.cw.vo.UserVO; import com.baosight.hggp.hg.cw.vo.UserVO;
import com.baosight.hggp.hg.xs.domain.Company; import com.baosight.hggp.hg.xs.domain.Company;
import com.baosight.hggp.util.CommonMethod; import com.baosight.hggp.util.*;
import com.baosight.hggp.util.DateUtils;
import com.baosight.hggp.util.EiInfoUtils;
import com.baosight.hggp.util.LogUtils;
import com.baosight.iplat4j.core.ei.EiConstant; import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo; import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException; import com.baosight.iplat4j.core.exception.PlatException;
...@@ -31,6 +28,7 @@ import java.util.Arrays; ...@@ -31,6 +28,7 @@ import java.util.Arrays;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.stream.Collectors;
/** /**
* @author yukang * @author yukang
...@@ -265,12 +263,16 @@ public class ServiceHGCW016 extends ServiceBase { ...@@ -265,12 +263,16 @@ public class ServiceHGCW016 extends ServiceBase {
*/ */
public EiInfo submit(EiInfo inInfo){ public EiInfo submit(EiInfo inInfo){
try { try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows(); List<HGCW016> resultRows = MapUtils.toDaoEPBases(inInfo, HGCW016.class);
for (int i = 0; i < resultRows.size(); i++) { List<Long> ids = resultRows.stream().map(HGCW016::getId).collect(Collectors.toList());
HGCW016 HGCW016 = new HGCW016(); List<HGCW017> hgcw017s = HGCWTools.HgCw017.getMainId(ids);
HGCW016.fromMap(resultRows.get(i)); for (HGCW016 resultRow : resultRows) {
HGCW016.setReviewStatus(1); HGCW016 hgcw016 = new HGCW016();
DaoUtils.update("HGCW016.submit", HGCW016); hgcw016.fromMap(resultRow.toMap());
long count = hgcw017s.stream().filter(hgcw017 -> hgcw017.getMainId().equals(resultRow.getId())).count();
AssertUtils.isTrue(count <= 0, "请添加明细数据!");
hgcw016.setReviewStatus(1);
DaoUtils.update("HGCW016.submit", hgcw016);
} }
inInfo.setStatus(EiConstant.STATUS_DEFAULT); inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据审核成功!"); inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据审核成功!");
...@@ -282,14 +284,18 @@ public class ServiceHGCW016 extends ServiceBase { ...@@ -282,14 +284,18 @@ public class ServiceHGCW016 extends ServiceBase {
public EiInfo writeoff(EiInfo inInfo){ public EiInfo writeoff(EiInfo inInfo){
try { try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows(); List<HGCW016> resultRows = MapUtils.toDaoEPBases(inInfo, HGCW016.class);
for (int i = 0; i < resultRows.size(); i++) { List<Long> ids = resultRows.stream().map(HGCW016::getId).collect(Collectors.toList());
List<HGCW017> hgcw017s = HGCWTools.HgCw017.getMainId(ids);
for (HGCW016 resultRow : resultRows) {
HGCW016 hgcw016 = new HGCW016(); HGCW016 hgcw016 = new HGCW016();
hgcw016.fromMap(resultRows.get(i)); hgcw016.fromMap(resultRow.toMap());
hgcw016.setCancelStatus(2); long count = hgcw017s.stream().filter(hgcw017 -> hgcw017.getMainId().equals(resultRow.getId())).count();
if (hgcw016.getReviewStatus() == 0){ AssertUtils.isTrue(count <= 0, "请添加明细数据!");
if (hgcw016.getReviewStatus() == 0) {
throw new PlatException("请先审核!"); throw new PlatException("请先审核!");
} }
hgcw016.setCancelStatus(2);
DaoUtils.update("HGCW016.writeoff", hgcw016); DaoUtils.update("HGCW016.writeoff", hgcw016);
} }
inInfo.setStatus(EiConstant.STATUS_DEFAULT); inInfo.setStatus(EiConstant.STATUS_DEFAULT);
......
package com.baosight.hggp.hg.cw.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
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/10/23
* @description
*/
public class ServiceHGCW999A extends ServiceEPBase {
@Override
public EiInfo initLoad(EiInfo inInfo) {
try {
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
}
...@@ -45,7 +45,8 @@ ...@@ -45,7 +45,8 @@
UPDATED_NAME as "updatedName", <!-- 记录修改名称 --> UPDATED_NAME as "updatedName", <!-- 记录修改名称 -->
UPDATED_TIME as "updatedTime", <!-- 记录修改时间 --> UPDATED_TIME as "updatedTime", <!-- 记录修改时间 -->
DEP_CODE as "depCode", <!-- 部门编码 --> DEP_CODE as "depCode", <!-- 部门编码 -->
REMAINING_AMOUNT as "remainingAmount" REMAINING_AMOUNT as "remainingAmount",
BRANCH_UNIT as "branchUnit"
</sql> </sql>
<sql id="condition"> <sql id="condition">
...@@ -176,6 +177,9 @@ ...@@ -176,6 +177,9 @@
<isNotEmpty prepend=" AND " property="companyCodes"> <isNotEmpty prepend=" AND " property="companyCodes">
COMPANY_CODE IN <iterate close=")" open="(" conjunction="," property="companyCodes">#companyCodes[]#</iterate> COMPANY_CODE IN <iterate close=")" open="(" conjunction="," property="companyCodes">#companyCodes[]#</iterate>
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="branchUnit">
BRANCH_UNIT = #branchUnit#
</isNotEmpty>
</sql> </sql>
<sql id="customCondition"> <sql id="customCondition">
...@@ -190,7 +194,7 @@ ...@@ -190,7 +194,7 @@
$orderBy$ $orderBy$
</isNotEmpty> </isNotEmpty>
<isEmpty property="orderBy"> <isEmpty property="orderBy">
ID asc ID DESC
</isEmpty> </isEmpty>
</dynamic> </dynamic>
</sql> </sql>
...@@ -253,9 +257,16 @@ ...@@ -253,9 +257,16 @@
UPDATED_NAME, <!-- 记录修改名称 --> UPDATED_NAME, <!-- 记录修改名称 -->
UPDATED_TIME, <!-- 记录修改时间 --> UPDATED_TIME, <!-- 记录修改时间 -->
DEP_CODE, <!-- 部门编码 --> DEP_CODE, <!-- 部门编码 -->
REMAINING_AMOUNT REMAINING_AMOUNT,
BRANCH_UNIT
) )
VALUES (#id#, #accountCode#, #companyCode#, #companyName#, #projCode#, #projName#, #contractNumber#, #contractName#, #contractType#, #contractCategory#, #partyA#, #partyB#, #partyC#, #planStartDate#, #planEndDate#, #contractStatus#, #partyAName#, #partyAPhoneNumber#, #alreadyName#, #alreadyPhoneNumber#, #engineeringAddress#, #signingDate#, #mainContractNumber#, #contractContent#, #contractingMethod#, #paymentMethod#, #pricingMethod#, #taxPoints#, #totalContractPriceExcluding#, #valueAddedTax#, #totalContractPriceIncluding#, #reviewStatus#, #balanceStatus#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #depCode#, #remainingAmount#) VALUES (#id#, #accountCode#, #companyCode#, #companyName#, #projCode#, #projName#, #contractNumber#,
#contractName#, #contractType#, #contractCategory#, #partyA#, #partyB#, #partyC#, #planStartDate#,
#planEndDate#, #contractStatus#, #partyAName#, #partyAPhoneNumber#, #alreadyName#, #alreadyPhoneNumber#,
#engineeringAddress#, #signingDate#, #mainContractNumber#, #contractContent#, #contractingMethod#,
#paymentMethod#, #pricingMethod#, #taxPoints#, #totalContractPriceExcluding#, #valueAddedTax#,
#totalContractPriceIncluding#, #reviewStatus#, #balanceStatus#, #createdBy#, #createdName#, #createdTime#,
#updatedBy#, #updatedName#, #updatedTime#, #depCode#, #remainingAmount#, #branchUnit#)
<selectKey resultClass="long" keyProperty="id"> <selectKey resultClass="long" keyProperty="id">
SELECT MAX(ID) AS "id" FROM ${hggpSchema}.HGCW002 SELECT MAX(ID) AS "id" FROM ${hggpSchema}.HGCW002
</selectKey> </selectKey>
...@@ -307,7 +318,8 @@ ...@@ -307,7 +318,8 @@
UPDATED_BY = #updatedBy#, <!-- 记录修改者 --> UPDATED_BY = #updatedBy#, <!-- 记录修改者 -->
UPDATED_NAME = #updatedName#, <!-- 记录修改名称 --> UPDATED_NAME = #updatedName#, <!-- 记录修改名称 -->
UPDATED_TIME = #updatedTime#, <!-- 记录修改时间 --> UPDATED_TIME = #updatedTime#, <!-- 记录修改时间 -->
REMAINING_AMOUNT = #remainingAmount# REMAINING_AMOUNT = #remainingAmount#,
BRANCH_UNIT = #branchUnit#
<!-- DEP_CODE = #depCode# 部门编码 --> <!-- DEP_CODE = #depCode# 部门编码 -->
WHERE WHERE
ID = #id# ID = #id#
......
...@@ -116,6 +116,9 @@ ...@@ -116,6 +116,9 @@
<isNotEmpty prepend=" AND " property="signingDateTo"> <isNotEmpty prepend=" AND " property="signingDateTo">
SIGNING_DATE &lt;= REPLACE(#signingDateTo#, '-', '') SIGNING_DATE &lt;= REPLACE(#signingDateTo#, '-', '')
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="branchUnit">
BRANCH_UNIT = #branchUnit#
</isNotEmpty>
</sql> </sql>
<select id="query" parameterClass="java.util.HashMap" <select id="query" parameterClass="java.util.HashMap"
...@@ -145,7 +148,8 @@ ...@@ -145,7 +148,8 @@
UPDATED_BY as "updatedBy", <!-- 记录修改者 --> UPDATED_BY as "updatedBy", <!-- 记录修改者 -->
UPDATED_NAME as "updatedName", <!-- 记录修改名称 --> UPDATED_NAME as "updatedName", <!-- 记录修改名称 -->
UPDATED_TIME as "updatedTime", <!-- 记录修改时间 --> UPDATED_TIME as "updatedTime", <!-- 记录修改时间 -->
DEP_CODE as "depCode" <!-- 部门编码 --> DEP_CODE as "depCode", <!-- 部门编码 -->
BRANCH_UNIT as "branchUnit"
FROM ${hggpSchema}.HGCW010 WHERE 1=1 FROM ${hggpSchema}.HGCW010 WHERE 1=1
<include refid="condition" /> <include refid="condition" />
<dynamic prepend="ORDER BY"> <dynamic prepend="ORDER BY">
...@@ -264,9 +268,13 @@ ...@@ -264,9 +268,13 @@
UPDATED_BY, <!-- 记录修改者 --> UPDATED_BY, <!-- 记录修改者 -->
UPDATED_NAME, <!-- 记录修改名称 --> UPDATED_NAME, <!-- 记录修改名称 -->
UPDATED_TIME, <!-- 记录修改时间 --> UPDATED_TIME, <!-- 记录修改时间 -->
DEP_CODE <!-- 部门编码 --> DEP_CODE, <!-- 部门编码 -->
BRANCH_UNIT
) )
VALUES (#id#, #accountCode#, #companyCode#, #companyName#, #projName#, #projCode#, #settlementNumber#, #billTybe#, #billNumber#, #billState#, #signingDate#, #partyA#, #reviewStatus#, #thisSettlementTax#, #thisSettlementAmount#, #taxPoints#, #totalContractPriceIncluding#,#remainingAmount#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #depCode#) VALUES (#id#, #accountCode#, #companyCode#, #companyName#, #projName#, #projCode#, #settlementNumber#,
#billTybe#, #billNumber#, #billState#, #signingDate#, #partyA#, #reviewStatus#, #thisSettlementTax#,
#thisSettlementAmount#, #taxPoints#, #totalContractPriceIncluding#,#remainingAmount#, #createdBy#,
#createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #depCode#, #branchUnit#)
<selectKey resultClass="long" keyProperty="id"> <selectKey resultClass="long" keyProperty="id">
SELECT MAX(ID) AS "id" FROM ${hggpSchema}.HGCW010 SELECT MAX(ID) AS "id" FROM ${hggpSchema}.HGCW010
</selectKey> </selectKey>
...@@ -302,7 +310,8 @@ ...@@ -302,7 +310,8 @@
UPDATED_BY = #updatedBy#, <!-- 记录修改者 --> UPDATED_BY = #updatedBy#, <!-- 记录修改者 -->
UPDATED_NAME = #updatedName#, <!-- 记录修改名称 --> UPDATED_NAME = #updatedName#, <!-- 记录修改名称 -->
UPDATED_TIME = #updatedTime#, <!-- 记录修改时间 --> UPDATED_TIME = #updatedTime#, <!-- 记录修改时间 -->
DEP_CODE = #depCode# <!-- 部门编码 --> DEP_CODE = #depCode#, <!-- 部门编码 -->
BRANCH_UNIT = #branchUnit#
WHERE WHERE
ID = #id# ID = #id#
</update> </update>
......
...@@ -130,6 +130,9 @@ ...@@ -130,6 +130,9 @@
<isNotEmpty prepend=" AND " property="companyCodes"> <isNotEmpty prepend=" AND " property="companyCodes">
COMPANY_CODE IN <iterate close=")" open="(" conjunction="," property="companyCodes">#companyCodes[]#</iterate> COMPANY_CODE IN <iterate close=")" open="(" conjunction="," property="companyCodes">#companyCodes[]#</iterate>
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="branchUnit">
BRANCH_UNIT = #branchUnit#
</isNotEmpty>
</sql> </sql>
<select id="query" parameterClass="java.util.HashMap" <select id="query" parameterClass="java.util.HashMap"
...@@ -175,7 +178,8 @@ ...@@ -175,7 +178,8 @@
UPDATED_NAME as "updatedName", <!-- 记录修改名称 --> UPDATED_NAME as "updatedName", <!-- 记录修改名称 -->
UPDATED_TIME as "updatedTime", <!-- 记录修改时间 --> UPDATED_TIME as "updatedTime", <!-- 记录修改时间 -->
DEP_CODE as "depCode", <!-- 部门编码 --> DEP_CODE as "depCode", <!-- 部门编码 -->
REMAINING_AMOUNT as "remainingAmount" REMAINING_AMOUNT as "remainingAmount",
BRANCH_UNIT as "branchUnit"
FROM ${hggpSchema}.HGCW002 WHERE 1=1 AND CONTRACT_TYPE in (1,5) AND REMAINING_AMOUNT > 0 AND REVIEW_STATUS = '3' FROM ${hggpSchema}.HGCW002 WHERE 1=1 AND CONTRACT_TYPE in (1,5) AND REMAINING_AMOUNT > 0 AND REVIEW_STATUS = '3'
<include refid="condition" /> <include refid="condition" />
<dynamic prepend="ORDER BY"> <dynamic prepend="ORDER BY">
......
...@@ -98,6 +98,9 @@ ...@@ -98,6 +98,9 @@
<isNotEmpty prepend=" AND " property="settlementNumbers"> <isNotEmpty prepend=" AND " property="settlementNumbers">
SETTLEMENT_NUMBER IN <iterate close=")" open="(" conjunction="," property="settlementNumbers">#settlementNumbers[]#</iterate> SETTLEMENT_NUMBER IN <iterate close=")" open="(" conjunction="," property="settlementNumbers">#settlementNumbers[]#</iterate>
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="branchUnit">
BRANCH_UNIT = #branchUnit#
</isNotEmpty>
</sql> </sql>
<select id="query" parameterClass="java.util.HashMap" <select id="query" parameterClass="java.util.HashMap"
...@@ -123,7 +126,8 @@ ...@@ -123,7 +126,8 @@
UPDATED_BY as "updatedBy", <!-- 记录修改者 --> UPDATED_BY as "updatedBy", <!-- 记录修改者 -->
UPDATED_NAME as "updatedName", <!-- 记录修改名称 --> UPDATED_NAME as "updatedName", <!-- 记录修改名称 -->
UPDATED_TIME as "updatedTime", <!-- 记录修改时间 --> UPDATED_TIME as "updatedTime", <!-- 记录修改时间 -->
DEP_CODE as "depCode" <!-- 部门编码 --> DEP_CODE as "depCode", <!-- 部门编码 -->
BRANCH_UNIT as "branchUnit"
FROM ${hggpSchema}.HGCW011 WHERE 1=1 FROM ${hggpSchema}.HGCW011 WHERE 1=1
<include refid="condition" /> <include refid="condition" />
<dynamic prepend="ORDER BY"> <dynamic prepend="ORDER BY">
...@@ -229,9 +233,12 @@ ...@@ -229,9 +233,12 @@
UPDATED_BY, <!-- 记录修改者 --> UPDATED_BY, <!-- 记录修改者 -->
UPDATED_NAME, <!-- 记录修改名称 --> UPDATED_NAME, <!-- 记录修改名称 -->
UPDATED_TIME, <!-- 记录修改时间 --> UPDATED_TIME, <!-- 记录修改时间 -->
DEP_CODE <!-- 部门编码 --> DEP_CODE, <!-- 部门编码 -->
BRANCH_UNIT
) )
VALUES (#id#, #mainId#, #accountCode#, #companyCode#, #companyName#, #projName#, #projCode#, #settlementNumber#, #billNumber#, #partyA#, #thisSettlementTax#, #thisSettlementAmount#, #taxPoints#, #totalContractPriceIncluding#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #depCode#) VALUES (#id#, #mainId#, #accountCode#, #companyCode#, #companyName#, #projName#, #projCode#, #settlementNumber#,
#billNumber#, #partyA#, #thisSettlementTax#, #thisSettlementAmount#, #taxPoints#, #totalContractPriceIncluding#,
#createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #depCode#, #branchUnit#)
</insert> </insert>
<delete id="delete"> <delete id="delete">
...@@ -261,7 +268,8 @@ ...@@ -261,7 +268,8 @@
UPDATED_BY = #updatedBy#, <!-- 记录修改者 --> UPDATED_BY = #updatedBy#, <!-- 记录修改者 -->
UPDATED_NAME = #updatedName#, <!-- 记录修改名称 --> UPDATED_NAME = #updatedName#, <!-- 记录修改名称 -->
UPDATED_TIME = #updatedTime#, <!-- 记录修改时间 --> UPDATED_TIME = #updatedTime#, <!-- 记录修改时间 -->
DEP_CODE = #depCode# <!-- 部门编码 --> DEP_CODE = #depCode#, <!-- 部门编码 -->
BRANCH_UNIT = #branchUnit#
WHERE WHERE
ID = #id# ID = #id#
</update> </update>
......
...@@ -71,7 +71,8 @@ ...@@ -71,7 +71,8 @@
INVENT_NAME as "inventName", <!-- 存货名称 --> INVENT_NAME as "inventName", <!-- 存货名称 -->
SPEC as "spec", <!-- 规格 --> SPEC as "spec", <!-- 规格 -->
DEPOSIT_QTY as "depositQty", <!-- 入库数量 --> DEPOSIT_QTY as "depositQty", <!-- 入库数量 -->
RECEIVE_WEIGHT as "receiveWeight" <!-- 收货重量 --> RECEIVE_WEIGHT as "receiveWeight", <!-- 收货重量 -->
CONTRACT_NO as "contractNo"
</sql> </sql>
<sql id="condition"> <sql id="condition">
<isNotEmpty prepend=" AND " property="id"> <isNotEmpty prepend=" AND " property="id">
...@@ -176,6 +177,9 @@ ...@@ -176,6 +177,9 @@
<isNotEmpty prepend=" AND " property="notRemainingAmount"> <isNotEmpty prepend=" AND " property="notRemainingAmount">
REMAINING_AMOUNT != #notRemainingAmount# REMAINING_AMOUNT != #notRemainingAmount#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="contractNo">
CONTRACT_NO like concat('%' , #contractNo# , '%')
</isNotEmpty>
</sql> </sql>
<select id="query" parameterClass="java.util.HashMap" <select id="query" parameterClass="java.util.HashMap"
...@@ -329,13 +333,14 @@ ...@@ -329,13 +333,14 @@
INVENT_NAME, <!-- 存货名称 --> INVENT_NAME, <!-- 存货名称 -->
SPEC, <!-- 规格 --> SPEC, <!-- 规格 -->
DEPOSIT_QTY, <!-- 入库数量 --> DEPOSIT_QTY, <!-- 入库数量 -->
RECEIVE_WEIGHT <!-- 收货重量 --> RECEIVE_WEIGHT, <!-- 收货重量 -->
CONTRACT_NO
) )
VALUES (#id#, #accountCode#, #companyCode#, #companyName#, #projCode#, #projName#, #settlementNumber#, VALUES (#id#, #accountCode#, #companyCode#, #companyName#, #projCode#, #projName#, #settlementNumber#,
#billTybe#, #billNumber#, #billState#, #signingDate#, #partyA#, #reviewStatus#, #taxPoints#, #billTybe#, #billNumber#, #billState#, #signingDate#, #partyA#, #reviewStatus#, #taxPoints#,
#thisSettlementTax#, #thisSettlementAmount#, #totalContractPriceIncluding#, #createdBy#, #createdName#, #thisSettlementTax#, #thisSettlementAmount#, #totalContractPriceIncluding#, #createdBy#, #createdName#,
#createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #depCode#, #remainingAmount#, #receiveDate#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #depCode#, #remainingAmount#, #receiveDate#,
#contractType#, #inventTypeDetail#, #inventCode#, #inventName#, #spec#, #depositQty#, #receiveWeight#) #contractType#, #inventTypeDetail#, #inventCode#, #inventName#, #spec#, #depositQty#, #receiveWeight#,#contractNo#)
<selectKey resultClass="long" keyProperty="id"> <selectKey resultClass="long" keyProperty="id">
SELECT MAX(ID) AS "id" FROM ${hggpSchema}.HGCW012 SELECT MAX(ID) AS "id" FROM ${hggpSchema}.HGCW012
</selectKey> </selectKey>
...@@ -380,7 +385,8 @@ ...@@ -380,7 +385,8 @@
INVENT_NAME = #inventName#, <!-- 存货名称 --> INVENT_NAME = #inventName#, <!-- 存货名称 -->
SPEC = #spec#, <!-- 规格 --> SPEC = #spec#, <!-- 规格 -->
DEPOSIT_QTY = #depositQty#, <!-- 入库数量 --> DEPOSIT_QTY = #depositQty#, <!-- 入库数量 -->
RECEIVE_WEIGHT = #receiveWeight# <!-- 收货重量 --> RECEIVE_WEIGHT = #receiveWeight#, <!-- 收货重量 -->
CONTRACT_NO = #contractNo#
WHERE WHERE
ID = #id# ID = #id#
</update> </update>
......
...@@ -50,7 +50,8 @@ ...@@ -50,7 +50,8 @@
DEP_CODE as "depCode", <!-- 部门编码 --> DEP_CODE as "depCode", <!-- 部门编码 -->
INVENT_CODE as "inventCode", INVENT_CODE as "inventCode",
INVENT_NAME as "inventName", INVENT_NAME as "inventName",
SPEC as "spec" SPEC as "spec",
CONTRACT_NO as "contractNo"
</sql> </sql>
<sql id="condition"> <sql id="condition">
<include refid="HGXSDataAuth.authCondition"/> <include refid="HGXSDataAuth.authCondition"/>
...@@ -129,6 +130,12 @@ ...@@ -129,6 +130,12 @@
<isNotEmpty prepend=" AND " property="spec"> <isNotEmpty prepend=" AND " property="spec">
SPEC = #spec# SPEC = #spec#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="contractNo">
CONTRACT_NO like concat('%' , #contractNo# , '%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="mainIds">
MAIN_ID IN <iterate close=")" open="(" conjunction="," property="mainIds">#mainIds[]#</iterate>
</isNotEmpty>
</sql> </sql>
<select id="query" parameterClass="java.util.HashMap" <select id="query" parameterClass="java.util.HashMap"
...@@ -237,9 +244,13 @@ ...@@ -237,9 +244,13 @@
DEP_CODE, <!-- 部门编码 --> DEP_CODE, <!-- 部门编码 -->
INVENT_CODE, <!-- 存货编码 --> INVENT_CODE, <!-- 存货编码 -->
INVENT_NAME, <!-- 存货名称 --> INVENT_NAME, <!-- 存货名称 -->
SPEC <!-- 规格 --> SPEC, <!-- 规格 -->
CONTRACT_NO
) )
VALUES (#id#, #mainId#, #accountCode#, #companyCode#, #companyName#, #projCode#, #projName#, #settlementNumber#, #billNumber#, #partyA#, #taxPoints#, #thisSettlementTax#, #thisSettlementAmount#, #totalContractPriceIncluding#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #depCode#, #inventCode#, #inventName#, #spec#) VALUES (#id#, #mainId#, #accountCode#, #companyCode#, #companyName#, #projCode#, #projName#, #settlementNumber#,
#billNumber#, #partyA#, #taxPoints#, #thisSettlementTax#, #thisSettlementAmount#, #totalContractPriceIncluding#,
#createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #depCode#, #inventCode#,
#inventName#, #spec#,#contractNo#)
</insert> </insert>
<delete id="delete"> <delete id="delete">
...@@ -275,7 +286,8 @@ ...@@ -275,7 +286,8 @@
DEP_CODE = #depCode#, <!-- 部门编码 --> DEP_CODE = #depCode#, <!-- 部门编码 -->
INVENT_CODE = #inventCode#, <!-- 存货编码 --> INVENT_CODE = #inventCode#, <!-- 存货编码 -->
INVENT_NAME = #inventName#, <!-- 存货名称 --> INVENT_NAME = #inventName#, <!-- 存货名称 -->
SPEC = #spec# <!-- 规格 --> SPEC = #spec#, <!-- 规格 -->
CONTRACT_NO = #contractNo#
WHERE WHERE
ID = #id# ID = #id#
</update> </update>
......
...@@ -77,6 +77,12 @@ ...@@ -77,6 +77,12 @@
<isNotEmpty prepend=" AND " property="projName"> <isNotEmpty prepend=" AND " property="projName">
PROJ_NAME like CONCAT('%',#projName#,'%') PROJ_NAME like CONCAT('%',#projName#,'%')
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="mainIds">
MAIN_ID IN <iterate close=")" open="(" conjunction="," property="mainIds">#mainIds[]#</iterate>
</isNotEmpty>
<isNotEmpty prepend=" AND " property="contractNo">
CONTRACT_NO like concat('%' , #contractNo# , '%')
</isNotEmpty>
</sql> </sql>
<sql id="condition"> <sql id="condition">
...@@ -103,7 +109,8 @@ ...@@ -103,7 +109,8 @@
UPDATED_TIME as "updatedTime", <!-- 记录修改时间 --> UPDATED_TIME as "updatedTime", <!-- 记录修改时间 -->
DEP_CODE as "depCode", <!-- 部门编码 --> DEP_CODE as "depCode", <!-- 部门编码 -->
PROJ_CODE as "projCode", <!-- 项目编码 --> PROJ_CODE as "projCode", <!-- 项目编码 -->
PROJ_NAME as "projName" PROJ_NAME as "projName",
CONTRACT_NO as "contractNo"
FROM ${hggpSchema}.HGCW017 WHERE 1=1 FROM ${hggpSchema}.HGCW017 WHERE 1=1
<include refid="condition" /> <include refid="condition" />
<dynamic prepend="ORDER BY"> <dynamic prepend="ORDER BY">
...@@ -136,7 +143,8 @@ ...@@ -136,7 +143,8 @@
UPDATED_TIME as "updatedTime", <!-- 记录修改时间 --> UPDATED_TIME as "updatedTime", <!-- 记录修改时间 -->
DEP_CODE as "depCode", <!-- 部门编码 --> DEP_CODE as "depCode", <!-- 部门编码 -->
PROJ_CODE as "projCode", <!-- 项目编码 --> PROJ_CODE as "projCode", <!-- 项目编码 -->
PROJ_NAME as "projName" <!-- 项目名称 --> PROJ_NAME as "projName", <!-- 项目名称 -->
CONTRACT_NO as "contractNo"
FROM ${hggpSchema}.HGCW017 WHERE 1=1 FROM ${hggpSchema}.HGCW017 WHERE 1=1
<include refid="condition_no_auth" /> <include refid="condition_no_auth" />
<dynamic prepend="ORDER BY"> <dynamic prepend="ORDER BY">
...@@ -220,11 +228,12 @@ ...@@ -220,11 +228,12 @@
UPDATED_TIME, <!-- 记录修改时间 --> UPDATED_TIME, <!-- 记录修改时间 -->
DEP_CODE, <!-- 部门编码 --> DEP_CODE, <!-- 部门编码 -->
PROJ_CODE, <!-- 项目编码 --> PROJ_CODE, <!-- 项目编码 -->
PROJ_NAME <!-- 项目名称 --> PROJ_NAME, <!-- 项目名称 -->
CONTRACT_NO
) )
VALUES (#mainId#, #accountCode#, #companyCode#, #companyName#, #contractNumber#, #partyA#, VALUES (#mainId#, #accountCode#, #companyCode#, #companyName#, #contractNumber#, #partyA#,
#totalContractPriceIncluding#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #totalContractPriceIncluding#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#,
#updatedTime#, #depCode#, #projCode#, #projName#) #updatedTime#, #depCode#, #projCode#, #projName#, #contractNo#)
</insert> </insert>
<delete id="delete"> <delete id="delete">
...@@ -250,7 +259,8 @@ ...@@ -250,7 +259,8 @@
UPDATED_TIME = #updatedTime#, <!-- 记录修改时间 --> UPDATED_TIME = #updatedTime#, <!-- 记录修改时间 -->
DEP_CODE = #depCode#, <!-- 部门编码 --> DEP_CODE = #depCode#, <!-- 部门编码 -->
PROJ_CODE = #projCode#, PROJ_CODE = #projCode#,
PROJ_NAME = #projName# PROJ_NAME = #projName#,
CONTRACT_NO = #contractNo#
WHERE WHERE
ID = #id# ID = #id#
</update> </update>
......
...@@ -985,7 +985,7 @@ public class HGCWTools { ...@@ -985,7 +985,7 @@ public class HGCWTools {
HGCW012 HGCW012 = results.get(0); HGCW012 HGCW012 = results.get(0);
BigDecimal remainingAmount = new BigDecimal(decimalFormat.format(HGCW012.getRemainingAmount().subtract(cutAmount))); BigDecimal remainingAmount = new BigDecimal(decimalFormat.format(HGCW012.getRemainingAmount().subtract(cutAmount)));
if (remainingAmount.compareTo(new BigDecimal(BigInteger.ZERO)) < 0) { if (remainingAmount.compareTo(new BigDecimal(BigInteger.ZERO)) < 0) {
throw new PlatException("款金额不能大于采购收票剩余金额!"); throw new PlatException("本次付款金额不能大于采购收票剩余金额!");
} }
HGCW012.setRemainingAmount(remainingAmount); HGCW012.setRemainingAmount(remainingAmount);
DaoUtils.update("HGCW012.updateDeductionAmount", HGCW012); DaoUtils.update("HGCW012.updateDeductionAmount", HGCW012);
...@@ -1110,6 +1110,14 @@ public class HGCWTools { ...@@ -1110,6 +1110,14 @@ public class HGCWTools {
return results; return results;
} }
public static List<HGCW013> getMainId(List<Long> mainIds) {
AssertUtils.isNull(mainIds, "主表ID不能为空!");
List<HGCW013> results = DaoBase.getInstance().query(HGCW013.QUERY,new HashMap<String,Object>(){
{put("mainIds",mainIds);}
});
return results;
}
public static void countTaxAmount(List<Map> rows,HGCW012 hgcw012,Map<String, BigDecimal> rowMap) { public static void countTaxAmount(List<Map> rows,HGCW012 hgcw012,Map<String, BigDecimal> rowMap) {
DecimalFormat decimalFormat = new DecimalFormat("#.00"); DecimalFormat decimalFormat = new DecimalFormat("#.00");
StringBuffer settlementNumber = new StringBuffer(); StringBuffer settlementNumber = new StringBuffer();
...@@ -1272,6 +1280,14 @@ public class HGCWTools { ...@@ -1272,6 +1280,14 @@ public class HGCWTools {
}); });
return results; return results;
} }
public static List<HGCW017> getMainId(List<Long> mainIds) {
AssertUtils.isNull(mainIds, "主表ID不能为空!");
List<HGCW017> results = DaoBase.getInstance().query(HGCW017.QUERY,new HashMap<String,Object>(){
{put("mainIds",mainIds);}
});
return results;
}
} }
/** /**
......
...@@ -39,7 +39,7 @@ public class ServiceHGSC001 extends ServiceBase { ...@@ -39,7 +39,7 @@ public class ServiceHGSC001 extends ServiceBase {
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGSC001().eiMetadata); inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGSC001().eiMetadata);
Map map = new HashMap(); Map map = new HashMap();
map.put(HGSC001.FIELD_account_code, UserSessionUtils.getAccountCode()); map.put(HGSC001.FIELD_account_code, UserSessionUtils.getAccountCode());
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.PROJ_TYPE_BLOCK_ID), map,false); CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.PROJ_TYPE_BLOCK_ID,DdynamicEnum.CUSTOMER_RECORD_BLOCK_ID), map,false);
} catch (PlatException e) { } catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败"); LogUtils.setDetailMsg(inInfo, e, "初始化失败");
} }
......
...@@ -300,9 +300,13 @@ ...@@ -300,9 +300,13 @@
start_date as "startDate", <!-- 开工日期 --> start_date as "startDate", <!-- 开工日期 -->
end_date as "endDate", <!-- 竣工日期 --> end_date as "endDate", <!-- 竣工日期 -->
party_pm_name as "partyPmName", <!-- 甲方项目经理名称 --> party_pm_name as "partyPmName", <!-- 甲方项目经理名称 -->
party_pm_hpone as "partyPmHpone" <!-- 甲方项目经理联系电话--> party_pm_hpone as "partyPmHpone", <!-- 甲方项目经理联系电话-->
branch_unit as "branchUnit"
FROM ${hggpSchema}.HGSC001 WHERE approval_status = 2 and proj_status = 0 FROM ${hggpSchema}.HGSC001 WHERE approval_status = 2 and proj_status = 0
<include refid="condition" /> <include refid="condition" />
<isNotEmpty prepend=" AND " property="companyCodes">
COMPANY_CODE IN <iterate close=")" open="(" conjunction="," property="companyCodes">#companyCodes[]#</iterate>
</isNotEmpty>
</select> </select>
<select id="queryProjectByRoleBox" parameterClass="java.util.HashMap" <select id="queryProjectByRoleBox" parameterClass="java.util.HashMap"
......
...@@ -412,11 +412,32 @@ let remove = function () { ...@@ -412,11 +412,32 @@ let remove = function () {
message("请选择数据"); message("请选择数据");
return; return;
} }
let flag = true;
rows.forEach(function (item, index) {
if(item.status == 2){
message("勾选的第" + (index + 1) + "行数据已经审核通过,不能删除");
flag = false;
return;
}
if(item.status == 4){
message("勾选的第" + (index + 1) + "行数据已经收货中,不能删除");
flag = false;
return;
}
if(item.status == 5){
message("勾选的第" + (index + 1) + "行数据已经收货完成,不能删除");
flag = false;
return;
}
})
if (flag){
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"删除\"操作? ", { JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"删除\"操作? ", {
ok: function () { ok: function () {
JSUtils.submitGridsData("result", "HGCG002", "remove", true); JSUtils.submitGridsData("result", "HGCG002", "remove", true);
} }
}); });
}
} }
/** /**
......
...@@ -53,6 +53,7 @@ ...@@ -53,6 +53,7 @@
<EF:EFColumn ename="companyName" cname="公司名称" enable="false" width="200" align="left"/> <EF:EFColumn ename="companyName" cname="公司名称" enable="false" width="200" align="left"/>
<EF:EFColumn ename="projCode" cname="项目编码" width="140" align="center" required="true"/> <EF:EFColumn ename="projCode" cname="项目编码" width="140" align="center" required="true"/>
<EF:EFColumn ename="projName" cname="项目名称" width="120" align="center" enable="false"/> <EF:EFColumn ename="projName" cname="项目名称" width="120" align="center" enable="false"/>
<EF:EFColumn ename="contractNo" cname="合同号" width="120" align="center" enable="false"/>
<EF:EFColumn ename="receiveDate" cname="收货日期" width="100" align="center" editType="date" <EF:EFColumn ename="receiveDate" cname="收货日期" width="100" align="center" editType="date"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required="true"/> dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required="true"/>
<EF:EFColumn ename="receiveNo" cname="收货单号" enable="false" width="120" align="center"/> <EF:EFColumn ename="receiveNo" cname="收货单号" enable="false" width="120" align="center"/>
......
...@@ -32,6 +32,9 @@ ...@@ -32,6 +32,9 @@
</EF:EFDateSpan> </EF:EFDateSpan>
<EF:EFInput cname="甲方名称" ename="partyA" blockId="inqu_status" row="0" colWidth="3" /> <EF:EFInput cname="甲方名称" ename="partyA" blockId="inqu_status" row="0" colWidth="3" />
<EF:EFInput cname="乙方名称" ename="partyB" blockId="inqu_status" row="0" colWidth="3" /> <EF:EFInput cname="乙方名称" ename="partyB" blockId="inqu_status" row="0" colWidth="3" />
<EF:EFSelect cname="分支单位" ename="inqu_status-0-branchUnit" colWidth="3" filter="contains">
<EF:EFOptions blockId="customer_record_block_id" valueField="valueField" textField="textField"/>
</EF:EFSelect>
<EF:EFInput cname="主合同号" ename="mainContractNumber" blockId="inqu_status" row="0" colWidth="3" /> <EF:EFInput cname="主合同号" ename="mainContractNumber" blockId="inqu_status" row="0" colWidth="3" />
<EF:EFSelect cname="合同状态" ename="inqu_status-0-contractStatus" colWidth="3" filter="contains"> <EF:EFSelect cname="合同状态" ename="inqu_status-0-contractStatus" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/> <EF:EFOption label="全部" value=""/>
...@@ -61,6 +64,11 @@ ...@@ -61,6 +64,11 @@
<EF:EFColumn ename="contractName" cname="合同名称" align="center" enable="false"/> <EF:EFColumn ename="contractName" cname="合同名称" align="center" enable="false"/>
<EF:EFColumn ename="partyA" cname="甲方名称" align="center" enable="false"/> <EF:EFColumn ename="partyA" cname="甲方名称" align="center" enable="false"/>
<EF:EFColumn ename="partyB" cname="乙方名称" align="center" enable="false"/> <EF:EFColumn ename="partyB" cname="乙方名称" align="center" enable="false"/>
<EF:EFComboColumn ename="branchUnit" cname="分支单位" enable="false" width="160" align="center" required="false"
blockName="customer_record_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="false"
filter="contains">
</EF:EFComboColumn>
<EF:EFColumn ename="mainContractNumber" cname="主合同号" align="center" enable="false"/> <EF:EFColumn ename="mainContractNumber" cname="主合同号" align="center" enable="false"/>
<EF:EFComboColumn ename="mainContractNumber" cname="主合同名称" enable="false" width="160" align="center" required="false" <EF:EFComboColumn ename="mainContractNumber" cname="主合同名称" enable="false" width="160" align="center" required="false"
blockName="contract_block_id" textField="textField" valueField="valueField" blockName="contract_block_id" textField="textField" valueField="valueField"
......
...@@ -143,9 +143,17 @@ $(function() { ...@@ -143,9 +143,17 @@ $(function() {
if (contractType == "2"){ if (contractType == "2"){
$("#result-0-partyA").val(projectCodeBox[i]['param3Field']+"-"+projectCodeBox[i]['param4Field']); $("#result-0-partyA").val(projectCodeBox[i]['param3Field']+"-"+projectCodeBox[i]['param4Field']);
IPLAT.EFPopupInput.text( $("#popupInputPartyA") , projectCodeBox[i]['param3Field']+"-"+projectCodeBox[i]['param4Field']); IPLAT.EFPopupInput.text( $("#popupInputPartyA") , projectCodeBox[i]['param3Field']+"-"+projectCodeBox[i]['param4Field']);
IPLAT.EFPopupInput.value( $("#popupInputPartyA") , projectCodeBox[i]['param3Field']+"-"+projectCodeBox[i]['param4Field']);
$("#result-0-partyB").val(projectCodeBox[i]['param1Field']+"-"+projectCodeBox[i]['param2Field']);
IPLAT.EFPopupInput.text( $("#popupInputPartyB") , projectCodeBox[i]['param1Field']+"-"+projectCodeBox[i]['param2Field']);
IPLAT.EFPopupInput.value( $("#popupInputPartyB") , projectCodeBox[i]['param1Field']+"-"+projectCodeBox[i]['param2Field']);
}else { }else {
$("#result-0-partyA").val(projectCodeBox[i]['param1Field']+"-"+projectCodeBox[i]['param2Field']);
$("#result-0-partyB").val(projectCodeBox[i]['param3Field']+"-"+projectCodeBox[i]['param4Field']); $("#result-0-partyB").val(projectCodeBox[i]['param3Field']+"-"+projectCodeBox[i]['param4Field']);
IPLAT.EFPopupInput.text( $("#popupInputPartyA") , projectCodeBox[i]['param1Field']+"-"+projectCodeBox[i]['param2Field']);
IPLAT.EFPopupInput.value( $("#popupInputPartyA") , projectCodeBox[i]['param1Field']+"-"+projectCodeBox[i]['param2Field']);
IPLAT.EFPopupInput.text( $("#popupInputPartyB") , projectCodeBox[i]['param3Field']+"-"+projectCodeBox[i]['param4Field']); IPLAT.EFPopupInput.text( $("#popupInputPartyB") , projectCodeBox[i]['param3Field']+"-"+projectCodeBox[i]['param4Field']);
IPLAT.EFPopupInput.value( $("#popupInputPartyB") , projectCodeBox[i]['param3Field']+"-"+projectCodeBox[i]['param4Field']);
} }
var planStartDate = $("#result-0-planStartDate").data("kendoDatePicker"); var planStartDate = $("#result-0-planStartDate").data("kendoDatePicker");
planStartDate.value(projectCodeBox[i]['param5Field'], "d"); planStartDate.value(projectCodeBox[i]['param5Field'], "d");
...@@ -153,10 +161,10 @@ $(function() { ...@@ -153,10 +161,10 @@ $(function() {
planEndDate.value(projectCodeBox[i]['param6Field'], "d"); planEndDate.value(projectCodeBox[i]['param6Field'], "d");
IPLAT.EFInput.value($("#result-0-partyAName"), projectCodeBox[i]['param7Field']); IPLAT.EFInput.value($("#result-0-partyAName"), projectCodeBox[i]['param7Field']);
IPLAT.EFInput.value($("#result-0-partyAPhoneNumber"), projectCodeBox[i]['param8Field']); IPLAT.EFInput.value($("#result-0-partyAPhoneNumber"), projectCodeBox[i]['param8Field']);
IPLAT.EFSelect.value($("#result-0-branchUnit"), projectCodeBox[i]['param9Field']);
break; break;
} }
} }
} }
} }
} }
...@@ -182,8 +190,8 @@ $(function() { ...@@ -182,8 +190,8 @@ $(function() {
$("#result-0-mainContractNumber").val(""); $("#result-0-mainContractNumber").val("");
var valueField = dataItem['valueField']; var valueField = dataItem['valueField'];
if (valueField == "1" || valueField == "" || valueField == "3" || valueField == "5") { if (valueField == "1" || valueField == "" || valueField == "3" || valueField == "5") {
$("#result-0-contractCategory").val("1"); $("#result-0-contractCategory").val("2");
$("#contractCategoryName").val("收入"); IPLAT.EFInput.value($("#contractCategory"),"收入");
for (let i = 0; i < projectCodeBox.length; i++) { for (let i = 0; i < projectCodeBox.length; i++) {
let projCode = $("#result-0-projCode").val() let projCode = $("#result-0-projCode").val()
if (!isBlank(projCode)){ if (!isBlank(projCode)){
...@@ -197,11 +205,10 @@ $(function() { ...@@ -197,11 +205,10 @@ $(function() {
break; break;
} }
} }
} }
} else if (valueField == "2" || valueField == "4"){ } else if (valueField == "2" || valueField == "4"){
$("#result-0-contractCategory").val("2"); $("#result-0-contractCategory").val("1");
$("#contractCategoryName").val("支出"); IPLAT.EFInput.value($("#contractCategory"),"支出");
for (let i = 0; i < projectCodeBox.length; i++) { for (let i = 0; i < projectCodeBox.length; i++) {
let projCode = $("#result-0-projCode").val() let projCode = $("#result-0-projCode").val()
if (!isBlank(projCode)){ if (!isBlank(projCode)){
...@@ -214,14 +221,10 @@ $(function() { ...@@ -214,14 +221,10 @@ $(function() {
IPLAT.EFInput.value($("#result-0-partyAPhoneNumber"), projectCodeBox[i]['param8Field']) IPLAT.EFInput.value($("#result-0-partyAPhoneNumber"), projectCodeBox[i]['param8Field'])
} }
} }
} }
} else { } else {
$("#result-0-contractCategory").val(""); $("#result-0-contractCategory").val("");
} }
} }
}, },
"result-0-taxPoints": { "result-0-taxPoints": {
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
</EF:EFSelect> </EF:EFSelect>
<EF:EFInput ename="result-0-projCode" cname="项目编号" type="hidden"/> <EF:EFInput ename="result-0-projCode" cname="项目编号" type="hidden"/>
<EF:EFInput ename="result-0-projName" cname="项目简称" colWidth="4" readonly="true"/> <EF:EFInput ename="result-0-projName" cname="项目简称" colWidth="4" readonly="true"/>
<EF:EFInput ename="result-0-contractNumber" cname="合同号" colWidth="4" readonly="true" /> <EF:EFInput ename="result-0-contractNumber" cname="合同号" colWidth="4" readonly="false" />
</div> </div>
<div class="row"> <div class="row">
<EF:EFInput ename="result-0-contractName" cname="合同名称" colWidth="4" required="true"/> <EF:EFInput ename="result-0-contractName" cname="合同名称" colWidth="4" required="true"/>
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
<%-- </EF:EFSelect>--%> <%-- </EF:EFSelect>--%>
</div> </div>
<div class="row"> <div class="row">
<EF:EFPopupInput ename="popupInputPartyA" cname="甲方名称" colWidth="4" <EF:EFPopupInput ename="popupInputPartyA" cname="甲方名称" colWidth="3"
serviceName="HGCW002A" methodName="partyAQuery" resultId="partyAResult" serviceName="HGCW002A" methodName="partyAQuery" resultId="partyAResult"
required="true" save="false" popupType="ServiceGrid" required="true" save="false" popupType="ServiceGrid"
valueField="username" textField="username" valueField="username" textField="username"
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
resizable="true" popupTitle="甲方名称" popupWidth="400"> resizable="true" popupTitle="甲方名称" popupWidth="400">
</EF:EFPopupInput> </EF:EFPopupInput>
<EF:EFInput ename="result-0-partyA" cname="甲方名称" type="hidden" /> <EF:EFInput ename="result-0-partyA" cname="甲方名称" type="hidden" />
<EF:EFPopupInput ename="popupInputPartyB" cname="乙方名称" colWidth="4" <EF:EFPopupInput ename="popupInputPartyB" cname="乙方名称" colWidth="3"
serviceName="HGCW002A" methodName="partyBQuery" resultId="partyAResult" serviceName="HGCW002A" methodName="partyBQuery" resultId="partyAResult"
save="false" popupType="ServiceGrid" save="false" popupType="ServiceGrid"
valueField="username" textField="username" valueField="username" textField="username"
...@@ -54,14 +54,17 @@ ...@@ -54,14 +54,17 @@
resizable="true" popupTitle="乙方名称" popupWidth="400"> resizable="true" popupTitle="乙方名称" popupWidth="400">
</EF:EFPopupInput> </EF:EFPopupInput>
<EF:EFInput ename="result-0-partyB" cname="乙方名称" type="hidden"/> <EF:EFInput ename="result-0-partyB" cname="乙方名称" type="hidden"/>
<EF:EFInput ename="result-0-partyC" cname="丙方" colWidth="4" /> <EF:EFSelect cname="分支单位" ename="result-0-branchUnit" colWidth="3" filter="contains">
<EF:EFOptions blockId="customer_record_block_id" valueField="valueField" textField="textField"/>
</EF:EFSelect>
<EF:EFInput ename="result-0-partyC" cname="丙方" colWidth="3" />
</div> </div>
<div class="row"> <div class="row">
<EF:EFDateSpan startCname="计划开工/竣工日期" endCname="至" required="true" colWidth="8" blockId="result" <EF:EFDateSpan startCname="计划开工/竣工日期" endCname="至" required="true" colWidth="8" blockId="result"
startName="planStartDate" endName="planEndDate" row="0" role="date" startName="planStartDate" endName="planEndDate" row="0" role="date"
format="yyyy-MM-dd" ratio="4:4" satrtRatio="4:8" endRatio="4:8"> format="yyyy-MM-dd" ratio="4:4" satrtRatio="4:8" endRatio="4:8">
</EF:EFDateSpan> </EF:EFDateSpan>
<EF:EFSelect cname="合同状态" ename="result-0-contractStatus" colWidth="4" filter="contains"> <EF:EFSelect cname="合同状态" ename="result-0-contractStatus" colWidth="4" defaultValue="1" filter="contains">
<EF:EFOption label="-- 请选择 --" value=""/> <EF:EFOption label="-- 请选择 --" value=""/>
<EF:EFCodeOption codeName="hggp.cw.contractStatus"/> <EF:EFCodeOption codeName="hggp.cw.contractStatus"/>
</EF:EFSelect> </EF:EFSelect>
......
...@@ -160,12 +160,12 @@ $(function() { ...@@ -160,12 +160,12 @@ $(function() {
var dataItem = e.dataItem; var dataItem = e.dataItem;
console.log(dataItem) console.log(dataItem)
var valueField = dataItem['valueField']; var valueField = dataItem['valueField'];
if (valueField == "1" || valueField == "3") { if (valueField == "1" || valueField == "3" || valueField == "5") {
$("#result-0-contractCategory").val("1");
$("#contractCategoryName").val("收入");
} else if (valueField == "2" || valueField == "4"){
$("#result-0-contractCategory").val("2"); $("#result-0-contractCategory").val("2");
$("#contractCategoryName").val("支出"); IPLAT.EFInput.value($("#contractCategory"),"收入");
} else if (valueField == "2" || valueField == "4"){
$("#result-0-contractCategory").val("1");
IPLAT.EFInput.value($("#contractCategory"),"支出");
} else { } else {
$("#result-0-contractCategory").val(""); $("#result-0-contractCategory").val("");
} }
......
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
<%-- </EF:EFSelect>--%> <%-- </EF:EFSelect>--%>
</div> </div>
<div class="row"> <div class="row">
<EF:EFPopupInput ename="popupInputPartyA" cname="甲方名称" colWidth="4" <EF:EFPopupInput ename="popupInputPartyA" cname="甲方名称" colWidth="3"
serviceName="HGCW002A" methodName="partyAQuery" serviceName="HGCW002A" methodName="partyAQuery"
resultId="partyAResult" resultId="partyAResult"
required="true" save="false" popupType="ServiceGrid" required="true" save="false" popupType="ServiceGrid"
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
resizable="true" popupTitle="甲方名称" popupWidth="400"> resizable="true" popupTitle="甲方名称" popupWidth="400">
</EF:EFPopupInput> </EF:EFPopupInput>
<EF:EFInput ename="result-0-partyA" cname="甲方名称" type="hidden" /> <EF:EFInput ename="result-0-partyA" cname="甲方名称" type="hidden" />
<EF:EFPopupInput ename="popupInputPartyB" cname="乙方名称" colWidth="4" <EF:EFPopupInput ename="popupInputPartyB" cname="乙方名称" colWidth="3"
serviceName="HGCW002A" methodName="partyBQuery" serviceName="HGCW002A" methodName="partyBQuery"
resultId="partyAResult" resultId="partyAResult"
save="false" popupType="ServiceGrid" save="false" popupType="ServiceGrid"
...@@ -60,7 +60,10 @@ ...@@ -60,7 +60,10 @@
resizable="true" popupTitle="乙方名称" popupWidth="400"> resizable="true" popupTitle="乙方名称" popupWidth="400">
</EF:EFPopupInput> </EF:EFPopupInput>
<EF:EFInput ename="result-0-partyB" cname="乙方名称" type="hidden"/> <EF:EFInput ename="result-0-partyB" cname="乙方名称" type="hidden"/>
<EF:EFInput ename="result-0-partyC" cname="丙方" colWidth="4" /> <EF:EFSelect cname="分支单位" ename="result-0-branchUnit" colWidth="3" filter="contains" readonly="true">
<EF:EFOptions blockId="customer_record_block_id" valueField="valueField" textField="textField"/>
</EF:EFSelect>
<EF:EFInput ename="result-0-partyC" cname="丙方" colWidth="3" />
</div> </div>
<div class="row"> <div class="row">
<EF:EFDateSpan startCname="计划开工/竣工日期" endCname="至" required="true" colWidth="8" blockId="result" <EF:EFDateSpan startCname="计划开工/竣工日期" endCname="至" required="true" colWidth="8" blockId="result"
......
...@@ -29,9 +29,12 @@ ...@@ -29,9 +29,12 @@
</EF:EFSelect> </EF:EFSelect>
</div> </div>
<div class="row"> <div class="row">
<EF:EFInput ename="result-0-partyA" cname="甲方名称" colWidth="4" readonly="true"/> <EF:EFInput ename="result-0-partyA" cname="甲方名称" colWidth="3" readonly="true"/>
<EF:EFInput ename="result-0-partyB" cname="乙方名称" colWidth="4" readonly="true"/> <EF:EFInput ename="result-0-partyB" cname="乙方名称" colWidth="3" readonly="true"/>
<EF:EFInput ename="result-0-partyC" cname="丙方" colWidth="4" readonly="true"/> <EF:EFSelect cname="分支单位" ename="result-0-branchUnit" colWidth="3" filter="contains" readonly="true">
<EF:EFOptions blockId="customer_record_block_id" valueField="valueField" textField="textField"/>
</EF:EFSelect>
<EF:EFInput ename="result-0-partyC" cname="丙方" colWidth="3" readonly="true"/>
</div> </div>
<div class="row"> <div class="row">
<EF:EFInput ename="result-0-planStartDate" cname="计划开工日期" colWidth="4" readonly="true"/> <EF:EFInput ename="result-0-planStartDate" cname="计划开工日期" colWidth="4" readonly="true"/>
......
...@@ -24,6 +24,9 @@ ...@@ -24,6 +24,9 @@
format="yyyy-MM-dd" ratio="3:3" satrtRatio="4:8" endRatio="4:8" readonly="true"> format="yyyy-MM-dd" ratio="3:3" satrtRatio="4:8" endRatio="4:8" readonly="true">
</EF:EFDateSpan> </EF:EFDateSpan>
<EF:EFInput cname="客户名称" ename="partyA" blockId="inqu_status" row="0" colWidth="3" placeholder="模糊查询客户名称"/> <EF:EFInput cname="客户名称" ename="partyA" blockId="inqu_status" row="0" colWidth="3" placeholder="模糊查询客户名称"/>
<EF:EFSelect cname="分支单位" ename="inqu_status-0-branchUnit" colWidth="3" filter="contains">
<EF:EFOptions blockId="customer1_record_block_id" valueField="valueField" textField="textField"/>
</EF:EFSelect>
<EF:EFSelect cname="票据类型" ename="inqu_status-0-billTybe" colWidth="3" filter="contains"> <EF:EFSelect cname="票据类型" ename="inqu_status-0-billTybe" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/> <EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hggp.cw.billTybe"/> <EF:EFCodeOption codeName="hggp.cw.billTybe"/>
...@@ -65,6 +68,12 @@ ...@@ -65,6 +68,12 @@
maxLength="16" readonly="true" width="210" required="true" maxLength="16" readonly="true" width="210" required="true"
align="center" filter="contains" sort="true"> align="center" filter="contains" sort="true">
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFComboColumn ename="branchUnit" cname="分支单位" blockName="customer1_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="settlementNumber" cname="来源单号" width="140" enable="false" readonly="true" align="center"/> <EF:EFColumn ename="settlementNumber" cname="来源单号" width="140" enable="false" readonly="true" align="center"/>
<EF:EFComboColumn ename="billTybe" cname="票据类型" width="120" align="center" required="true" <EF:EFComboColumn ename="billTybe" cname="票据类型" width="120" align="center" required="true"
columnTemplate="#=textField#" itemTemplate="#=textField#" enable="true" defaultValue="1"> columnTemplate="#=textField#" itemTemplate="#=textField#" enable="true" defaultValue="1">
......
...@@ -13,6 +13,12 @@ ...@@ -13,6 +13,12 @@
<EF:EFColumn ename="id" cname="主键" hidden="true"/> <EF:EFColumn ename="id" cname="主键" hidden="true"/>
<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="partyA" cname="客户名称" width="120" enable="false" readonly="true" align="center"/> <EF:EFColumn ename="partyA" cname="客户名称" width="120" enable="false" readonly="true" align="center"/>
<EF:EFComboColumn ename="branchUnit" cname="分支单位" blockName="customer1_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="settlementNumber" 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="totalContractPriceIncluding" cname="开票金额" width="120" format="{0:N2}" align="right"/> <EF:EFColumn ename="totalContractPriceIncluding" cname="开票金额" width="120" format="{0:N2}" align="right"/>
</EF:EFGrid> </EF:EFGrid>
......
...@@ -47,6 +47,12 @@ ...@@ -47,6 +47,12 @@
<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="contractNumber" cname="合同号" width="120" enable="false" readonly="true" align="center"/> <EF:EFColumn ename="contractNumber" cname="合同号" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="contractName" cname="合同名称" width="120" enable="false" readonly="true" align="center"/> <EF:EFColumn ename="contractName" cname="合同名称" width="120" enable="false" readonly="true" align="center"/>
<EF:EFComboColumn ename="branchUnit" cname="分支单位" blockName="customer1_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="signingDate" cname="签订日期" width="120" enable="true" readonly="false" align="center" <EF:EFColumn ename="signingDate" cname="签订日期" width="120" enable="true" readonly="false" align="center"
editType="date" parseFormats="['yyyyMMdd']" parseFormat="yyyy-MM-dd"/> editType="date" parseFormats="['yyyyMMdd']" parseFormat="yyyy-MM-dd"/>
<EF:EFColumn ename="taxPoints" cname="税率(%)" width="80" enable="false" readonly="true" align="center"/> <EF:EFColumn ename="taxPoints" cname="税率(%)" width="80" enable="false" readonly="true" align="center"/>
......
...@@ -295,7 +295,7 @@ function submitFunc() { ...@@ -295,7 +295,7 @@ function submitFunc() {
flag = false; flag = false;
} }
if (row.reviewStatus == "3") { if (row.reviewStatus == "3") {
message("选中的第"+(index+1)+"行已经提交的合同!"); message("选中的第"+(index+1)+"行已经提交的数据!");
flag = false; flag = false;
} }
}) })
......
...@@ -51,6 +51,7 @@ ...@@ -51,6 +51,7 @@
align="center" filter="contains" sort="true"> align="center" filter="contains" sort="true">
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFColumn ename="projName" cname="项目名称" hidden="true"/> <EF:EFColumn ename="projName" cname="项目名称" hidden="true"/>
<EF:EFColumn ename="contractNo" cname="合同号" width="120" enable="false" readonly="true" align="center"/>
<EF:EFComboColumn ename="partyA" cname="供应商名称" blockName="sup_record_block_id" <EF:EFComboColumn ename="partyA" cname="供应商名称" blockName="sup_record_block_id"
columnTemplate="#=textField#" itemTemplate="#=textField#" columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField" textField="textField" valueField="valueField"
......
...@@ -80,12 +80,12 @@ function btnSaveFunc(btnNode, gridNode) { ...@@ -80,12 +80,12 @@ function btnSaveFunc(btnNode, gridNode) {
let thisAmount = item['thisAmount']; let thisAmount = item['thisAmount'];
let remainingAmount = item['remainingAmount']; let remainingAmount = item['remainingAmount'];
if (!isNumber(thisAmount) && !isPositiveNumber(thisAmount)) { if (!isNumber(thisAmount) && !isPositiveNumber(thisAmount)) {
message("勾选的第" + (index + 1) + "行本次收票金额必须是大于0的数字"); message("勾选的第" + (index + 1) + "行本次付款金额必须是大于0的数字");
flag = false; flag = false;
return false; return false;
} }
if (parseFloat(thisAmount) > parseFloat(remainingAmount)) { if (parseFloat(thisAmount) > parseFloat(remainingAmount)) {
message("第" + (index + 1) + "行本次收票金额不能大于剩余收票金额"); message("第" + (index + 1) + "行本次付款金额不能大于剩余采购收票金额");
flag = false; flag = false;
return false; return false;
} }
...@@ -184,6 +184,13 @@ $(function () { ...@@ -184,6 +184,13 @@ $(function () {
locked: false locked: false
}, },
{ {
field: "contractNo",
title: "合同号",
headerTemplate: "<span style='color: '>合同号 </span>",
enable: false,
locked: false
},
{
field: "receiveNo", field: "receiveNo",
title: "收货编号", title: "收货编号",
headerTemplate: "<span style='color: '>收货编号 </span>", headerTemplate: "<span style='color: '>收货编号 </span>",
...@@ -259,8 +266,8 @@ $(function () { ...@@ -259,8 +266,8 @@ $(function () {
}, },
{ {
field: "thisSettlementAmount", field: "thisSettlementAmount",
title: "票总额", title: "票总额",
headerTemplate: "<span style='color: '>票总额 </span>", headerTemplate: "<span style='color: '>票总额 </span>",
format:"{0:C2}", format:"{0:C2}",
align:"right", align:"right",
locked: false, locked: false,
...@@ -377,7 +384,7 @@ $(function () { ...@@ -377,7 +384,7 @@ $(function () {
}, },
{ {
field: "thisAmount", field: "thisAmount",
title: "本次票金额", title: "本次票金额",
headerTemplate: "<span style='color: '>本次收票金额 </span>", headerTemplate: "<span style='color: '>本次收票金额 </span>",
format:"{0:C2}", format:"{0:C2}",
locked: false locked: false
...@@ -495,7 +502,7 @@ $(function () { ...@@ -495,7 +502,7 @@ $(function () {
locked: false locked: false
},{ },{
field: "thisAmount", field: "thisAmount",
title: "本次票金额", title: "本次票金额",
headerTemplate: "<span style='color: '>本次收票金额 </span>", headerTemplate: "<span style='color: '>本次收票金额 </span>",
format:"{0:C2}", format:"{0:C2}",
locked: false locked: false
......
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
<EF:EFGrid blockId="result" autoDraw="no" isFloat="true" autoBind="false" checkMode="row"> <EF:EFGrid blockId="result" autoDraw="no" isFloat="true" autoBind="false" checkMode="row">
<EF:EFColumn ename="id" cname="主键" hidden="true"/> <EF:EFColumn ename="id" cname="主键" hidden="true"/>
<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="contractNo" cname="合同号" width="200" enable="false" readonly="true" align="center"/>
<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="settlementNumber" 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="totalContractPriceIncluding" cname="付款总额" width="120" format="{0:C2}" align="center"/> <EF:EFColumn ename="totalContractPriceIncluding" cname="付款总额" width="120" format="{0:C2}" align="center"/>
......
...@@ -19,9 +19,10 @@ ...@@ -19,9 +19,10 @@
maxLength="16" readonly="false" width="200" required="true" maxLength="16" readonly="false" width="200" required="true"
align="center" filter="contains" sort="true"> align="center" filter="contains" sort="true">
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFColumn ename="contractNo" cname="合同号" width="200" enable="false" readonly="true" align="center"/>
<%--<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="settlementNumber" 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="totalContractPriceIncluding" cname="收款总额" width="120" format="{0:C2}" align="right" enable="false" readonly="true"/> <EF:EFColumn ename="totalContractPriceIncluding" cname="发票总额" width="120" format="{0:C2}" align="right" enable="false" readonly="true"/>
</EF:EFGrid> </EF:EFGrid>
</EF:EFRegion> </EF:EFRegion>
</EF:EFPage> </EF:EFPage>
......
...@@ -17,6 +17,8 @@ $(function() { ...@@ -17,6 +17,8 @@ $(function() {
template: function (item) { template: function (item) {
let template = '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' let template = '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="contractDetailFunc(' + item.id + ')">收款清单</a>'; + 'onclick="contractDetailFunc(' + item.id + ')">收款清单</a>';
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="fileDetailFunc(' + item.id + ')">附件详情</a>';
return template; return template;
} }
} }
...@@ -175,11 +177,6 @@ function submitFunc() { ...@@ -175,11 +177,6 @@ function submitFunc() {
message("选中的第"+(index+1)+"行未保存的数据,请先保存!"); message("选中的第"+(index+1)+"行未保存的数据,请先保存!");
flag = false; flag = false;
} }
if (row.cancelStatus == "1") {
message("勾选的数据中有未核销的单据!");
flag = false;
return;
}
if (row.reviewStatus == "3") { if (row.reviewStatus == "3") {
message("勾选的数据中有已经提交的单据!"); message("勾选的数据中有已经提交的单据!");
flag = false; flag = false;
...@@ -237,6 +234,11 @@ function writeoffFunc() { ...@@ -237,6 +234,11 @@ function writeoffFunc() {
flag = false; flag = false;
return; return;
} }
if (row.reviewStatus == "0") {
message("勾选的第"+(index+1)+"行中有未审核提交的单据,请先审核提交!");
flag = false;
return;
}
}) })
if (flag) { if (flag) {
...@@ -306,3 +308,11 @@ function contractDetailFunc(id) { ...@@ -306,3 +308,11 @@ function contractDetailFunc(id) {
}); });
} }
function fileDetailFunc(id) {
JSColorbox.open({
href: "HGCW999?methodName=initLoad&inqu_status-0-bizType=KP&inqu_status-0-matId=" + id + "&efParentFormEname=HGCW014",
title: "<div style='text-align: center;'>附件清单</div>",
width: "80%",
height: "80%",
});
}
\ No newline at end of file
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
<EF:EFRegion id="result" title="记录集"> <EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="no" isFloat="true" autoBind="false"> <EF:EFGrid blockId="result" autoDraw="no" isFloat="true" autoBind="false">
<EF:EFColumn ename="id" cname="主键" hidden="true"/> <EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="100" align="center"/> <EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="140" align="center"/>
<EF:EFComboColumn ename="companyCode" cname="公司名称" <EF:EFComboColumn ename="companyCode" cname="公司名称"
columnTemplate="#=textField#" itemTemplate="#=textField#" columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField" textField="textField" valueField="valueField"
......
...@@ -20,6 +20,8 @@ $(function() { ...@@ -20,6 +20,8 @@ $(function() {
template: function (item) { template: function (item) {
let template = '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' let template = '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="contractDetailFunc(' + item.id + ')">付款清单</a>'; + 'onclick="contractDetailFunc(' + item.id + ')">付款清单</a>';
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="fileDetailFunc(' + item.id + ')">附件详情</a>';
return template; return template;
} }
}, },
...@@ -363,3 +365,12 @@ function contractDetailFunc(id) { ...@@ -363,3 +365,12 @@ function contractDetailFunc(id) {
}); });
} }
function fileDetailFunc(id) {
JSColorbox.open({
href: "HGCW999?methodName=initLoad&inqu_status-0-bizType=FK&inqu_status-0-matId=" + id + "&efParentFormEname=HGCW014",
title: "<div style='text-align: center;'>附件清单</div>",
width: "80%",
height: "80%",
});
}
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
<EF:EFRegion id="result" title="记录集"> <EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="no" isFloat="true" autoBind="false"> <EF:EFGrid blockId="result" autoDraw="no" isFloat="true" autoBind="false">
<EF:EFColumn ename="id" cname="主键" hidden="true"/> <EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="100" align="center"/> <EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="140" align="center"/>
<EF:EFComboColumn ename="companyCode" cname="公司名称" <EF:EFComboColumn ename="companyCode" cname="公司名称"
columnTemplate="#=textField#" itemTemplate="#=textField#" columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField" textField="textField" valueField="valueField"
......
...@@ -47,6 +47,7 @@ ...@@ -47,6 +47,7 @@
maxLength="16" readonly="true" width="210" required="true" maxLength="16" readonly="true" width="210" required="true"
align="center" filter="contains" sort="true"> align="center" filter="contains" sort="true">
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFColumn ename="contractNo" cname="合同号" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="thisAmount" cname="本次付款金额" width="120" enable="true" format="{0:C2}" editType="text" <EF:EFColumn ename="thisAmount" cname="本次付款金额" width="120" enable="true" format="{0:C2}" editType="text"
displayType="0.00" sort="true" align="right" displayType="0.00" sort="true" align="right"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,2})?$/" maxLength="15" required="true" data-regex="/^-?[0-9]{1,15}([.][0-9]{1,2})?$/" maxLength="15" required="true"
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<c:set var="ctx" value="${pageContext.request.contextPath}"/> <c:set var="ctx" value="${pageContext.request.contextPath}"/>
<head> <head>
</head> </head>
<EF:EFPage title="款清单"> <EF:EFPage title="款清单">
<EF:EFInput cname="隐藏条件" ename="mainId" blockId="inqu_status" row="0" type="hidden"/> <EF:EFInput cname="隐藏条件" ename="mainId" blockId="inqu_status" row="0" type="hidden"/>
<EF:EFRegion id="result" title="记录集"> <EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="no" isFloat="true" autoBind="false" checkMode="row"> <EF:EFGrid blockId="result" autoDraw="no" isFloat="true" autoBind="false" checkMode="row">
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
maxLength="16" width="200" readonly="true" required="true" maxLength="16" width="200" readonly="true" required="true"
align="center" filter="contains" sort="true"> align="center" filter="contains" sort="true">
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFColumn ename="contractNo" cname="合同号" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="contractNumber" cname="来源单号" width="120" enable="false" readonly="true" align="center"/> <EF:EFColumn ename="contractNumber" cname="来源单号" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="totalContractPriceIncluding" cname="付款总额" width="120" enable="true" format="{0:C2}" editType="text" <EF:EFColumn ename="totalContractPriceIncluding" cname="付款总额" width="120" enable="true" format="{0:C2}" editType="text"
displayType="0.00" sort="true" align="right" displayType="0.00" sort="true" align="right"
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<c:set var="ctx" value="${pageContext.request.contextPath}"/> <c:set var="ctx" value="${pageContext.request.contextPath}"/>
<head> <head>
</head> </head>
<EF:EFPage title="款清单"> <EF:EFPage title="款清单">
<EF:EFInput cname="隐藏条件" ename="mainId" blockId="inqu_status" row="0" type="hidden"/> <EF:EFInput cname="隐藏条件" ename="mainId" blockId="inqu_status" row="0" type="hidden"/>
<EF:EFRegion id="result" title="记录集"> <EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="no" isFloat="true" autoBind="false" checkMode="row"> <EF:EFGrid blockId="result" autoDraw="no" isFloat="true" autoBind="false" checkMode="row">
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
maxLength="16" width="200" readonly="true" required="true" maxLength="16" width="200" readonly="true" required="true"
align="center" filter="contains" sort="true"> align="center" filter="contains" sort="true">
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFColumn ename="contractNo" cname="合同号" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="contractNumber" cname="来源单号" width="120" enable="false" readonly="true" align="center"/> <EF:EFColumn ename="contractNumber" cname="来源单号" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="totalContractPriceIncluding" cname="付款总额" width="120" enable="false" format="{0:C2}" editType="text" <EF:EFColumn ename="totalContractPriceIncluding" cname="付款总额" width="120" enable="false" format="{0:C2}" editType="text"
displayType="0.00" sort="true" align="right" readonly="true" displayType="0.00" sort="true" align="right" readonly="true"
......
...@@ -6,6 +6,8 @@ $(function () { ...@@ -6,6 +6,8 @@ $(function () {
template: function (item) { template: function (item) {
let template = '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' let template = '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'href="' + downloadHref(item.docId) + '" target="_blank">附件下载</a>'; + 'href="' + downloadHref(item.docId) + '" target="_blank">附件下载</a>';
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="showPreview(\'' + item.docId + '\',\''+ item.docName + '\')" >预览</a>';
return template; return template;
} }
}], }],
...@@ -101,3 +103,17 @@ function deleteFunc() { ...@@ -101,3 +103,17 @@ function deleteFunc() {
} }
}) })
} }
/**
* 预览
*
* @param fileId
* @param docId
* @param docType
* @param docName
*/
let showPreview = function (docId, docName) {
let typeIndex = docName.lastIndexOf(".");
let docType = typeIndex == -1 ? "" : docName.substring(typeIndex+1);
addCwRecordWindow(docId, docType, docName);
}
...@@ -4,7 +4,9 @@ ...@@ -4,7 +4,9 @@
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %> <%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/> <c:set var="ctx" value="${pageContext.request.contextPath}"/>
<script>
var ctx = "${ctx}";
</script>
<EF:EFPage title="附件清单"> <EF:EFPage title="附件清单">
<EF:EFRegion id="inqu" title="查询区域" type="query"> <EF:EFRegion id="inqu" title="查询区域" type="query">
<EF:EFInput cname="物料ID" ename="matId" blockId="inqu_status" row="0" type="hidden"/> <EF:EFInput cname="物料ID" ename="matId" blockId="inqu_status" row="0" type="hidden"/>
...@@ -25,3 +27,5 @@ ...@@ -25,3 +27,5 @@
</EF:EFGrid> </EF:EFGrid>
</EF:EFRegion> </EF:EFRegion>
</EF:EFPage> </EF:EFPage>
<jsp:include page="HGCW999A.jsp" />
\ No newline at end of file
/**
* 弹窗预览
*
* @param fileId
* @param docId
* @param docType
* @param docName
*/
function addCwRecordWindow(docId, docType, docName) {
$("#previewFile").data("kendoWindow").center();
$("#previewFile").data("kendoWindow").open();
//var herf = ctx + "/web/HGCW999A?methodName=initLoad";
//window.open(herf, "_blank");
addRecord(docId, docType, docName);
}
/**
* 新增预览记录
*
* @param docId
* @param docType
* @param docName
*/
function addRecord(docId, docType, docName) {
if (isBlank(docId)) {
message("附件类型或ID不能为空");
return;
}
// 隐藏预览区域
hideHtml();
//IPLAT.progress($("body"), true);
previewFile(docId, docType, docName);
}
/**
* 新增记录后回调
*
* @param docId
* @param docType
* @param docName
*/
function previewFile(docId, docType, docName) {
// 隐藏文本描述
$("#descDiv").css('display', 'none');
if (isXml(docType)) {
previewXml(docId);
} else if (isExcel(docType)) {
previewExcel(docId);
} else if (true) {
previewOnline(docId, docName);
} else if (isText(docType)) {
previewText(docId);
} else if (isWord(docType)) {
previewDocx(docId);
} else if (isImage(docType)) {
previewImage(docId);
} else if (isFrame(docType)) {
previewFrame(docId);
} else {
otherDownload(false, docId);
}
}
/**
* 隐藏显示区域
*/
function hideHtml() {
$("#textContainer").css('display', 'none');
$("#textSpan").html("");
$("#docxContainer").css('display', 'none');
$("#imageContainer").css('display', 'none');
$("#image").attr('src', "");
$("#previewFrame").css('display', 'none');
$("#previewFrame").attr("src", "");
}
/**
* 是否文本
*
* @param fileName
* @returns {boolean}
*/
function isText(docType) {
if (isBlank(docType)) {
return false;
}
const extensions = ['txt'];
return extensions.includes(docType.toLowerCase());
}
/**
* 文件预览
*
* @param docId
*/
function previewText(docId) {
fetch(downloadHref(docId, true)).then(res => {
return res.text();
}).then(data => {
let container = document.getElementById("textContainer");
container.style.display = 'block';
// 使用new TextDecoder()指定编码
// let textDecoder;
// try {
// textDecoder = new TextDecoder('GBK', {ignoreBOM: true});
// } catch (e) {
// textDecoder = new TextDecoder('UTF-8', {ignoreBOM: true});
// }
// let dataDecoder = textDecoder.decode(data);
$("#textSpan").text(data);
});
}
/**
* 是否文本
*
* @param fileName
* @returns {boolean}
*/
function isXml(docType) {
if (isBlank(docType)) {
return false;
}
const extensions = ['xml'];
return extensions.includes(docType.toLowerCase());
}
/**
* xml文件预览
*
* @param docId
*/
function previewXml(docId) {
fetch(downloadHref(docId, true)).then(res => {
return res.text();
}).then(data => {
let container = document.getElementById("textContainer");
container.style.display = 'block';
$("#textSpan").text(data);
});
}
/**
* 是否excel
*
* @param fileName
* @returns {boolean}
*/
function isExcel(docType) {
if (isBlank(docType)) {
return false;
}
const extensions = ['xls'];
return extensions.includes(docType.toLowerCase());
}
/**
* 文件预览
*
* @param docId
*/
function previewExcel(docId) {
fetch(downloadHref(docId, true)).then(res => {
return res.blob();
}).then(blob => {
let container = document.getElementById("textContainer");
container.style.display = 'block';
// 使用new TextDecoder()指定编码
// const utf8Decoder = new TextDecoder('GBK', {ignoreBOM: true});
// const text = utf8Decoder.decode(arrayBuffer);
// $("#textSpan").html(text.replace(/\r\n?/g, '\n').replace(/\n/g, '<br/>'));
const reader = new FileReader();
reader.readAsArrayBuffer(blob);
reader.onload = function(e) {
let textSpan = document.getElementById('textSpan');
// 清空内容
textSpan.innerHTML = "";
let result = new Uint8Array(e.target.result);
let workbook = XLSX.read(result, {type: 'array'});
let sheetNames = workbook.SheetNames;
for (let i = 0; i < sheetNames.length; i++) {
// 假设我们只需要第一个工作表
var worksheet = workbook.Sheets[sheetNames[i]];
var data = XLSX.utils.sheet_to_html(worksheet);
// 在页面上显示JSON数据
textSpan.innerHTML += data + "<br/>";
}
};
});
}
/**
* 是否WORD
*
* @param fileName
* @returns {boolean}
*/
function isWord(docType) {
if (isBlank(docType)) {
return false;
}
const extensions = ['docx'];
return extensions.includes(docType.toLowerCase());
}
/**
* docx预览
*
* @param docId
*/
function previewDocx(docId) {
fetch(downloadHref(docId, true)).then(res => {
return res.arrayBuffer();
}).then(arrayBuffer => {
let container = document.getElementById("docxContainer");
container.style.display = 'block';
docx.renderAsync(arrayBuffer, container).then((x) => {
console.log("docx: finished")
});
});
}
/**
* 判断是否是图片
*
* @param fileName
* @returns {boolean}
*/
function isImage(docType) {
if (isBlank(docType)) {
return false;
}
const extensions = ['jpg', 'jpeg', 'png', 'gif', 'webp', 'bmp'];
return extensions.includes(docType.toLowerCase());
}
/**
* image预览
*
* @param docId
*/
function previewImage(docId) {
$("#image").attr('src', downloadHref(docId, true));
$("#imageContainer").css('display', '');
}
/**
* 判断是否frame预览
*
* @param fileName
* @returns {boolean}
*/
function isFrame(docType) {
if (isBlank(docType)) {
return false;
}
const extensions = ['pdf'];
return extensions.includes(docType.toLowerCase());
}
/**
* frame预览
*
* @param docId
*/
function previewFrame(docId) {
$("#previewFrame").css('display', '');
$("#previewFrame").attr("src", downloadHref(docId, true));
}
/**
* 在线预览
*
* @param docId
* @param fileName
*/
function previewOnline(docId, fileName) {
$("#previewFrame").css('display', '');
$("#previewFrame").attr("src", CommonUtils.previewFile(docId, fileName));
}
/**
* 监听iframe
*/
function iframeLoad() {
$('#previewFrame').on('load', function() {
// 当iframe加载完成后,获取iframe中的元素
let iframeBody = document.getElementById('previewFrame');
// 获取iframe的document对象
let iframeDoc = iframeBody.contentDocument || iframeBody.contentWindow.document;
// 例如,获取iframe中的一个具有特定类的元素
let viewer = iframeDoc.querySelector("#viewer")
let download = viewer.shadowRoot.querySelector("#toolbar")
.shadowRoot.querySelector("#downloads")
.shadowRoot.querySelector("#download");
// let download = iframeBody.find('#download');
download.css('display', 'none');
});
}
/**
* 其他下载
*
* @param isRoot
* @param docId
*/
function otherDownload(isRoot, docId) {
// 隐藏预览区域
hideHtml();
$("#descDiv").css('display', '');
if (isRoot) {
$("#descSpan").html("文件预览区域...");
} else {
$("#descSpan").html("该文件暂不支持预览");
// $("#descSpan").html("该文件暂不支持预览,点击<a href='" + downloadHref(docId, false)
// + "' target='_blank'>下载</a>");
}
}
/**
* 实现图片点击放大、拖拽、滚轴滚动焦点缩放功能,相关参数、函数声明
*/
let imgWidth, imgHeight; // 图片点击放大初始尺寸参数
let maxZoom = 4; //最大缩放倍数
let minReduce = 0.5; // 最小缩放倍数
let initScale = 1; //滚动缩放初始倍数,并不是图片点击放大的倍数
let isPointerdown = false; //鼠标按下的标识
//记录鼠标按下坐标和按下移动时坐标
let lastPointermove = {
x: 0,
y: 0,
};
//移动过程从上一个坐标到下一个坐标之间的差值
let diff = {
x: 0,
y: 0,
};
//图片放大后左上角的坐标,主要结合diff参数用于鼠标焦点缩放时图片偏移坐标
let x = 0;
let y = 0;
// 记录节点
let imageOuterDiv = null;
let realImage = null;
let bigImage = null;
window.onload = function () {
// 监听iframe
// iframeLoad();
imageOuterDiv = document.querySelector("#imageOuterDiv");
realImage = document.querySelector("#image");
bigImage = document.querySelector("#bigImage");
// 添加事件监听器来拦截右键点击事件
document.addEventListener('contextmenu', function (e) {
// 阻止默认的右键菜单
e.preventDefault();
});
document.getElementById("image").addEventListener("click", (e) => {
const that = e.target;
bigImage.style.transform = "scale(1)";
// 图片放大展示函数调用
clickImageShow(that);
// 监听鼠标滚动事件
window.addEventListener("wheel", handleStopWheel, {
passive: false,
});
// 拖转事件调用
imgDrag();
});
};
/**
* 点击图片放大
*/
function clickImageShow(that) {
let src = that.getAttribute("src");
fetch(src).then(response => {
if (!response.ok) {
throw new Error('Network response was not ok ' + response.statusText);
}
return response.blob();
}).then(blob => {
// 创建一个指向Blob的URL
bigImage.setAttribute("src", URL.createObjectURL(blob));
// 展示大图
imageShow();
}).catch(error => {
console.error('There has been a problem with your fetch operation:', error);
});
}
/**
* 放大图片展示
*/
function imageShow() {
// 设置尺寸和调整比例
let windowW = document.documentElement.clientWidth;
let windowH = document.documentElement.clientHeight;
let realWidth = realImage.naturalWidth; //获取图片的原始宽度
let realHeight = realImage.naturalHeight; //获取图片的原始高度
let outsideScale = 0.8;
let belowScale = 1.4;
let realRatio = realWidth / realHeight;
let windowRatio = windowW / windowH;
// 说明:下面是我自己的一些判断逻辑,大致意思就是图片的真实尺寸大于屏幕尺寸则使用屏幕尺寸,如果小于屏幕尺寸就使用自己本身的尺寸;并根据大于或者小于的比例对图片的尺寸进一步调整。coder可以根据自己的要求进行修改。
if (realRatio >= windowRatio) {
if (realWidth > windowW) {
imgWidth = windowH * outsideScale;
imgHeight = (imgWidth / realWidth) * realHeight;
} else {
if (realWidth * belowScale < windowW) {
imgWidth = realWidth * (belowScale - 0.2);
imgHeight = (imgWidth / realWidth) * realHeight;
} else {
imgWidth = realWidth;
imgHeight = realHeight;
}
}
} else {
if (realHeight > windowH) {
imgHeight = windowH * outsideScale;
imgWidth = (imgHeight / realHeight) * realWidth;
} else {
if (realHeight * belowScale < windowW) {
imgHeight = realHeight * (belowScale - 0.2);
imgWidth = (imgHeight / realHeight) * realWidth;
} else {
imgWidth = realWidth;
imgHeight = realHeight;
}
}
}
//设置放大图片的尺寸、偏移量并展示
bigImage.style.width = imgWidth + "px";
bigImage.style.height = imgHeight + "px";
x = (windowW - imgWidth) * 0.5;
y = (windowH - imgHeight) * 0.5;
bigImage.style.transform = `translate3d(${x}px, ${y}px, 0)`;
imageOuterDiv.style.display = "block";
// 点击蒙版及外面区域放大图片关闭
imageOuterDiv.onclick = () => {
imageOuterDiv.style.display = "none";
initScale = 1;
window.removeEventListener("wheel", handleStopWheel);
};
// 阻止事件冒泡
bigImage.onclick = (e) => {
e.stopPropagation();
};
}
/**
* 鼠标滚轮
*
* @param e
*/
function handleStopWheel(e) {
let itemSizeChange = 1.1; //每一次滚动放大的倍数
if (e.target.id == "bigImage") {
// 说明:e.dataY如果大于0则表示鼠标向下滚动,反之则向上滚动,这里设计为向上滚动为放大,向下滚动为缩小
if (e.deltaY > 0) {
itemSizeChange = 1 / 1.1;
}
let _initScale = initScale * itemSizeChange;
// 说明:在超过或低于临界值时,虽然让initScale等于maxZoom或minreduce,但是在后续的判断中放大图片的最终倍数并没有达到maxZoom或minreduce,而是跳过。
if (_initScale > maxZoom) {
initScale = maxZoom;
} else if (_initScale < minReduce) {
initScale = minReduce;
} else {
initScale = _initScale;
}
const origin = {
x: (itemSizeChange - 1) * imgWidth * 0.5,
y: (itemSizeChange - 1) * imgHeight * 0.5,
};
// 计算偏移量
if (_initScale < maxZoom && _initScale > minReduce) {
x -= (itemSizeChange - 1) * (e.clientX - x) - origin.x;
y -= (itemSizeChange - 1) * (e.clientY - y) - origin.y;
e.target.style.transform = `translate3d(${x}px, ${y}px, 0) scale(${initScale})`;
}
}
// 阻止默认事件
e.preventDefault();
}
function imgDrag() {
// 绑定 鼠标按下事件
bigImage.addEventListener("pointerdown", pointerdown);
// 绑定 鼠标移动事件
bigImage.addEventListener("pointermove", pointermove);
bigImage.addEventListener("pointerup", function (e) {
if (isPointerdown) {
isPointerdown = false;
}
});
bigImage.addEventListener("pointercancel", function (e) {
if (isPointerdown) {
isPointerdown = false;
}
});
}
function pointerdown(e) {
isPointerdown = true;
// 说明:Element.setPointerCapture()将特定元素指定为未来指针事件的捕获目标。指针的后续事件将以捕获元素为目标,直到捕获被释放。可以理解为:在窗口不是全屏情况下,我在拖动放大图片时即使鼠标移出可窗口之外,此时事件还是捕获在该放大图片上。
bigImage.setPointerCapture(e.pointerId);
lastPointermove = {
x: e.clientX,
y: e.clientY,
};
}
function pointermove(e) {
if (isPointerdown) {
const current1 = {
x: e.clientX,
y: e.clientY,
};
diff.x = current1.x - lastPointermove.x;
diff.y = current1.y - lastPointermove.y;
lastPointermove = {
x: current1.x,
y: current1.y,
};
x += diff.x;
y += diff.y;
bigImage.style.transform = `translate3d(${x}px, ${y}px, 0) scale(${initScale})`;
}
e.preventDefault();
}
<%--
Created by IntelliJ IDEA.
User: 1
Date: 2024/10/23
Time: 16:02
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}"/>
<script src="${ctx}/common/docxjs/jszip.min.js"></script>
<script src="${ctx}/common/docxjs/docx-preview.js"></script>
<script src="${ctx}/common/js/xlsx.full.min.js"></script>
<script src="${ctx}/HG/WD/HGWD001C1.js"></script>
<script src="${ctx}/HG/CW/HGCW999A.js"></script>
<link rel="stylesheet" href="${ctx}/HG/WD/HGWD002A1.css">
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<script>
var ctx = "${ctx}";
</script>
<%-- 预览文件 --%>
<EF:EFWindow id="previewFile" title="附件预览" height="90%" width="90%">
<div id="descDiv" class="center-flex">
<span id="descSpan" style="font-weight: bold;font-size: 18px">附件预览区域...</span>
</div>
<%-- 文本预览 --%>
<div id="textContainer" class="left-flex" style="display: none;">
<pre id="textSpan" class="textSpan"></pre>
</div>
<%-- docx文件预览--%>
<div id="docxContainer" style="display: none;"></div>
<%-- IMAGE文件预览--%>
<div id="imageContainer" class="left-flex" style="display: none;">
<img id="image" src="" style="border: 1px solid gray;width: 100%;height: 100%;"/>
</div>
<%-- other --%>
<iframe id="previewFrame" src="" style="display: none;"></iframe>
</EF:EFWindow>
<%-- 图片放大区域 --%>
<div id="imageOuterDiv" class="imageOuterDiv">
<img id="bigImage" src=""/>
</div>
...@@ -40,6 +40,13 @@ ...@@ -40,6 +40,13 @@
<EF:EFColumn ename="projName" cname="项目名称" enable="false" width="120" align="center"/> <EF:EFColumn ename="projName" cname="项目名称" enable="false" width="120" align="center"/>
<EF:EFColumn ename="subcontractName" cname="分包方" enable="false" width="120" align="center"/> <EF:EFColumn ename="subcontractName" cname="分包方" enable="false" width="120" align="center"/>
<EF:EFColumn ename="genralContractName" cname="总包方" enable="false" width="120" align="center"/> <EF:EFColumn ename="genralContractName" cname="总包方" enable="false" width="120" align="center"/>
<EF:EFComboColumn ename="branchUnit" cname="分支单位" enable="false"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
maxLength="16" readonly="false" width="100" required="true"
align="center" filter="contains" sort="true">
<EF:EFOptions blockId="customer_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFComboColumn>
<EF:EFColumn ename="projType" cname="项目性质" enable="false" width="120" align="center"/> <EF:EFColumn ename="projType" cname="项目性质" enable="false" width="120" align="center"/>
<EF:EFColumn ename="permissStartDate" cname="准许开工日期" enable="false" width="120" align="center"/> <EF:EFColumn ename="permissStartDate" cname="准许开工日期" enable="false" width="120" align="center"/>
<EF:EFColumn ename="startDate" cname="开工日期" enable="false" width="120" align="center"/> <EF:EFColumn ename="startDate" cname="开工日期" enable="false" width="120" align="center"/>
......
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
<EF:EFColumn ename="inventTypeDetail" cname="存货类型大类" hidden="true"/> <EF:EFColumn ename="inventTypeDetail" cname="存货类型大类" hidden="true"/>
<EF:EFComboColumn ename="inventCode" cname="存货编码" enable="true" width="120" align="center" required="true" <EF:EFComboColumn ename="inventCode" cname="存货编码" enable="true" width="120" align="center" required="true"
blockName="invent_record_block_id" textField="textField" valueField="valueField" blockName="invent_record_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=valueField#-#=textField#" readonly="true" columnTemplate="#=valueField#" itemTemplate="#=valueField#-#=textField#" readonly="true"
filter="contains"> filter="contains">
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFColumn ename="inventName" cname="存货名称" enable="false" width="120"/> <EF:EFColumn ename="inventName" cname="存货名称" enable="false" width="120"/>
......
...@@ -67,6 +67,15 @@ $(function (){ ...@@ -67,6 +67,15 @@ $(function (){
}, },
afterEdit:function (e) { afterEdit:function (e) {
}, },
onAdd: function (e) {
$.each(e.items, function (index, item) {
let rowsDate = resultGrid.getDataItems();
let maxProcessOrder = rowsDate.reduce((prev, current) => {
return (prev.processOrder || 0) > (current.processOrder || 0) ? prev : current;
});
item['processOrder'] = Number(maxProcessOrder.processOrder)+1;
});
},
onSave: function (e) { onSave: function (e) {
// 阻止默认请求,使用自定义保存 // 阻止默认请求,使用自定义保存
e.preventDefault(); e.preventDefault();
......
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFColumn ename="flowCode" cname="流程编码" enable="false" width="100" align="center"/> <EF:EFColumn ename="flowCode" cname="流程编码" enable="false" width="100" align="center"/>
<EF:EFColumn ename="flowName" cname="流程名称" width="120" enable="true" readonly="false" align="center" required="true"/>--%> <EF:EFColumn ename="flowName" cname="流程名称" width="120" enable="true" readonly="false" align="center" required="true"/>--%>
<EF:EFColumn ename="processOrder" cname="加工顺序" width="120" enable="true" format="{0:N3}" editType="number" <EF:EFColumn ename="processOrder" cname="加工顺序" width="120" enable="true" format="{0:N0}" editType="number"
displayType="0" sort="true" align="center" required="true" displayType="0" sort="true" align="center" required="true"
data-regex="/^-?[0-9]{1,15}?$/" maxLength="15" data-regex="/^-?[0-9]{1,15}?$/" maxLength="15"
data-errorprompt="请输入数字,该值最大可设置15位整数!"/> data-errorprompt="请输入数字,该值最大可设置15位整数!"/>
......
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