Commit 957363dd by liuyang

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

parents 8d88e3de 94eb1b65
...@@ -239,8 +239,12 @@ public enum DdynamicEnum { ...@@ -239,8 +239,12 @@ public enum DdynamicEnum {
* 用途:工序下拉框 * 用途:工序下拉框
* 编写:wwl * 编写:wwl
*/ */
PLAN_PROCESS_BLOCK_ID("plan_process_block_id", "processName", "processName", "HGSC005A.queryProcessComboBox") PLAN_PROCESS_BLOCK_ID("plan_process_block_id", "processName", "processName", "HGSC005A.queryProcessComboBox"),
/**
*
*/
PROJECT_CODE_BOX_BLOCK_ID("projectCodeBox_block_id","projCode","projName","HGSC001.queryProjectCodeBox")
; ;
......
...@@ -5,7 +5,7 @@ package com.baosight.hggp.hg.constant; ...@@ -5,7 +5,7 @@ package com.baosight.hggp.hg.constant;
* @date:2024/1/18,17:16 * @date:2024/1/18,17:16
*/ */
public class HGConstant { public class HGConstant {
/** /**
* 序列号 * 序列号
* *
...@@ -13,7 +13,7 @@ public class HGConstant { ...@@ -13,7 +13,7 @@ public class HGConstant {
* @date:2021/8/17,15:22 * @date:2021/8/17,15:22
*/ */
public static class SequenceId { public static class SequenceId {
// 用户ID // 用户ID
public static final String USER_ID = "USER_ID"; public static final String USER_ID = "USER_ID";
// 组织机构编码 // 组织机构编码
...@@ -40,7 +40,7 @@ public class HGConstant { ...@@ -40,7 +40,7 @@ public class HGConstant {
public static final String WH_CODE = "HGPZ007_WH_CODE"; public static final String WH_CODE = "HGPZ007_WH_CODE";
// 项目性质编码 // 项目性质编码
public static final String NAT_CODE = "HGPZ008_NAT_CODE"; public static final String NAT_CODE = "HGPZ008_NAT_CODE";
//项目档案编号 //项目档案编号
public static final String PROJ_NUMBER = "PROJ_NUMBER"; public static final String PROJ_NUMBER = "PROJ_NUMBER";
// 盘点单号 // 盘点单号
...@@ -103,6 +103,8 @@ public class HGConstant { ...@@ -103,6 +103,8 @@ public class HGConstant {
public static final String UPKEEP_CODE = "UPKEEP_CODE"; public static final String UPKEEP_CODE = "UPKEEP_CODE";
// 蓝图编号 // 蓝图编号
public static final String BLUEPRINT_CODE = "BLUEPRINT_CODE"; public static final String BLUEPRINT_CODE = "BLUEPRINT_CODE";
public static final String CW_CONTRACT_NO = "CW_CONTRACT_NO";
} }
/** /**
...@@ -112,7 +114,7 @@ public class HGConstant { ...@@ -112,7 +114,7 @@ public class HGConstant {
* @date:2024/2/22,13:57 * @date:2024/2/22,13:57
*/ */
public static class CgPlanStatus { public static class CgPlanStatus {
// 待审核 // 待审核
public static final Integer S_0 = 0; public static final Integer S_0 = 0;
// 审核中 // 审核中
...@@ -124,7 +126,7 @@ public class HGConstant { ...@@ -124,7 +126,7 @@ public class HGConstant {
// 生成合同 // 生成合同
public static final Integer S_4 = 4; public static final Integer S_4 = 4;
} }
/** /**
* 采购合同状态 * 采购合同状态
* *
...@@ -132,7 +134,7 @@ public class HGConstant { ...@@ -132,7 +134,7 @@ public class HGConstant {
* @date:2024/2/22,13:57 * @date:2024/2/22,13:57
*/ */
public static class CgContractStatus { public static class CgContractStatus {
// 待审核 // 待审核
public static final Integer S_0 = 0; public static final Integer S_0 = 0;
// 审核中 // 审核中
...@@ -166,7 +168,7 @@ public class HGConstant { ...@@ -166,7 +168,7 @@ public class HGConstant {
// 已入库 // 已入库
public static final Integer S_5 = 5; public static final Integer S_5 = 5;
} }
/** /**
* 库存类型 * 库存类型
* *
...@@ -174,7 +176,7 @@ public class HGConstant { ...@@ -174,7 +176,7 @@ public class HGConstant {
* @date:2024/1/20,15:18 * @date:2024/1/20,15:18
*/ */
public static class KcType { public static class KcType {
// 采购 // 采购
public static final String CG = "CG"; public static final String CG = "CG";
// 生产 // 生产
......
...@@ -118,14 +118,14 @@ public class HGCW002 extends DaoEPBase { ...@@ -118,14 +118,14 @@ public class HGCW002 extends DaoEPBase {
private String projName = " "; /* 项目名称*/ private String projName = " "; /* 项目名称*/
private String contractNumber = " "; /* 合同号*/ private String contractNumber = " "; /* 合同号*/
private String contractName = " "; /* 合同名称*/ private String contractName = " "; /* 合同名称*/
private Boolean contractType; /* 合同类型;1销售合同2劳务合同3补充协议4合同外用工*/ private Integer contractType; /* 合同类型;1销售合同2劳务合同3补充协议4合同外用工*/
private Boolean contractCategory; /* 合同类别;1支出2收入*/ private Integer contractCategory; /* 合同类别;1支出2收入*/
private String partyA = " "; /* 甲方名称*/ private String partyA = " "; /* 甲方名称*/
private String partyB = " "; /* 乙方名称*/ private String partyB = " "; /* 乙方名称*/
private String partyC = " "; /* 丙方名称*/ private String partyC = " "; /* 丙方名称*/
private String planStartDate = " "; /* 计划开工日期*/ private String planStartDate = " "; /* 计划开工日期*/
private String planEndDate = " "; /* 计划竣工日期*/ private String planEndDate = " "; /* 计划竣工日期*/
private Boolean contractStatus; /* 合同状态;1草签2签约*/ private Integer contractStatus; /* 合同状态;1草签2签约*/
private String partyAName = " "; /* 甲方联系人姓名*/ private String partyAName = " "; /* 甲方联系人姓名*/
private String partyAPhoneNumber = " "; /* 甲方联系人电话*/ private String partyAPhoneNumber = " "; /* 甲方联系人电话*/
private String alreadyName = " "; /* 已方联系人姓名*/ private String alreadyName = " "; /* 已方联系人姓名*/
...@@ -135,14 +135,14 @@ public class HGCW002 extends DaoEPBase { ...@@ -135,14 +135,14 @@ public class HGCW002 extends DaoEPBase {
private String mainContractNumber = " "; /* 主合同号*/ private String mainContractNumber = " "; /* 主合同号*/
private String contractContent = " "; /* 合同内容*/ private String contractContent = " "; /* 合同内容*/
private String contractingMethod = " "; /* 承包方式*/ private String contractingMethod = " "; /* 承包方式*/
private Boolean paymentMethod; /* 付款方式;1一次性付款2分期付款*/ private Integer paymentMethod; /* 付款方式;1一次性付款2分期付款*/
private Boolean pricingMethod; /* 计价方式;1固定单价合同2固定总价合同*/ private Integer pricingMethod; /* 计价方式;1固定单价合同2固定总价合同*/
private BigDecimal taxPoints = new BigDecimal("0"); /* 税点*/ private Integer taxPoints; /* 税点*/
private BigDecimal totalContractPriceExcluding = new BigDecimal("0"); /* 合同总价(不含税)*/ private BigDecimal totalContractPriceExcluding = new BigDecimal("0"); /* 合同总价(不含税)*/
private BigDecimal valueAddedTax = new BigDecimal("0"); /* 税点*/ private BigDecimal valueAddedTax = new BigDecimal("0"); /* 税点*/
private BigDecimal totalContractPriceIncluding = new BigDecimal("0"); /* 合同总价(含税)*/ private BigDecimal totalContractPriceIncluding = new BigDecimal("0"); /* 合同总价(含税)*/
private Boolean reviewStatus; /* 审核状态*/ private Integer reviewStatus; /* 审核状态*/
private Boolean balanceStatus; /* 结算状态;1未结算2部分结算3最终结算*/ private Integer balanceStatus; /* 结算状态;1未结算2部分结算3最终结算*/
private String createdBy = " "; /* 记录创建者*/ private String createdBy = " "; /* 记录创建者*/
private String createdName = " "; /* 记录创建名称*/ private String createdName = " "; /* 记录创建名称*/
private String createdTime = " "; /* 记录创建时间*/ private String createdTime = " "; /* 记录创建时间*/
...@@ -267,9 +267,6 @@ public class HGCW002 extends DaoEPBase { ...@@ -267,9 +267,6 @@ public class HGCW002 extends DaoEPBase {
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_TAX_POINTS); eiColumn = new EiColumn(FIELD_TAX_POINTS);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(15);
eiColumn.setDescName("税点"); eiColumn.setDescName("税点");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
...@@ -472,7 +469,7 @@ public class HGCW002 extends DaoEPBase { ...@@ -472,7 +469,7 @@ public class HGCW002 extends DaoEPBase {
* get the contractType - 合同类型;1销售合同2劳务合同3补充协议4合同外用工. * get the contractType - 合同类型;1销售合同2劳务合同3补充协议4合同外用工.
* @return the contractType * @return the contractType
*/ */
public Boolean getContractType() { public Integer getContractType() {
return this.contractType; return this.contractType;
} }
...@@ -481,14 +478,14 @@ public class HGCW002 extends DaoEPBase { ...@@ -481,14 +478,14 @@ public class HGCW002 extends DaoEPBase {
* *
* @param contractType - 合同类型;1销售合同2劳务合同3补充协议4合同外用工 * @param contractType - 合同类型;1销售合同2劳务合同3补充协议4合同外用工
*/ */
public void setContractType(Boolean contractType) { public void setContractType(Integer contractType) {
this.contractType = contractType; this.contractType = contractType;
} }
/** /**
* get the contractCategory - 合同类别;1支出2收入. * get the contractCategory - 合同类别;1支出2收入.
* @return the contractCategory * @return the contractCategory
*/ */
public Boolean getContractCategory() { public Integer getContractCategory() {
return this.contractCategory; return this.contractCategory;
} }
...@@ -497,7 +494,7 @@ public class HGCW002 extends DaoEPBase { ...@@ -497,7 +494,7 @@ public class HGCW002 extends DaoEPBase {
* *
* @param contractCategory - 合同类别;1支出2收入 * @param contractCategory - 合同类别;1支出2收入
*/ */
public void setContractCategory(Boolean contractCategory) { public void setContractCategory(Integer contractCategory) {
this.contractCategory = contractCategory; this.contractCategory = contractCategory;
} }
/** /**
...@@ -584,7 +581,7 @@ public class HGCW002 extends DaoEPBase { ...@@ -584,7 +581,7 @@ public class HGCW002 extends DaoEPBase {
* get the contractStatus - 合同状态;1草签2签约. * get the contractStatus - 合同状态;1草签2签约.
* @return the contractStatus * @return the contractStatus
*/ */
public Boolean getContractStatus() { public Integer getContractStatus() {
return this.contractStatus; return this.contractStatus;
} }
...@@ -593,7 +590,7 @@ public class HGCW002 extends DaoEPBase { ...@@ -593,7 +590,7 @@ public class HGCW002 extends DaoEPBase {
* *
* @param contractStatus - 合同状态;1草签2签约 * @param contractStatus - 合同状态;1草签2签约
*/ */
public void setContractStatus(Boolean contractStatus) { public void setContractStatus(Integer contractStatus) {
this.contractStatus = contractStatus; this.contractStatus = contractStatus;
} }
/** /**
...@@ -744,7 +741,7 @@ public class HGCW002 extends DaoEPBase { ...@@ -744,7 +741,7 @@ public class HGCW002 extends DaoEPBase {
* get the paymentMethod - 付款方式;1一次性付款2分期付款. * get the paymentMethod - 付款方式;1一次性付款2分期付款.
* @return the paymentMethod * @return the paymentMethod
*/ */
public Boolean getPaymentMethod() { public Integer getPaymentMethod() {
return this.paymentMethod; return this.paymentMethod;
} }
...@@ -753,14 +750,14 @@ public class HGCW002 extends DaoEPBase { ...@@ -753,14 +750,14 @@ public class HGCW002 extends DaoEPBase {
* *
* @param paymentMethod - 付款方式;1一次性付款2分期付款 * @param paymentMethod - 付款方式;1一次性付款2分期付款
*/ */
public void setPaymentMethod(Boolean paymentMethod) { public void setPaymentMethod(Integer paymentMethod) {
this.paymentMethod = paymentMethod; this.paymentMethod = paymentMethod;
} }
/** /**
* get the pricingMethod - 计价方式;1固定单价合同2固定总价合同. * get the pricingMethod - 计价方式;1固定单价合同2固定总价合同.
* @return the pricingMethod * @return the pricingMethod
*/ */
public Boolean getPricingMethod() { public Integer getPricingMethod() {
return this.pricingMethod; return this.pricingMethod;
} }
...@@ -769,14 +766,14 @@ public class HGCW002 extends DaoEPBase { ...@@ -769,14 +766,14 @@ public class HGCW002 extends DaoEPBase {
* *
* @param pricingMethod - 计价方式;1固定单价合同2固定总价合同 * @param pricingMethod - 计价方式;1固定单价合同2固定总价合同
*/ */
public void setPricingMethod(Boolean pricingMethod) { public void setPricingMethod(Integer pricingMethod) {
this.pricingMethod = pricingMethod; this.pricingMethod = pricingMethod;
} }
/** /**
* get the taxPoints - 税点. * get the taxPoints - 税点.
* @return the taxPoints * @return the taxPoints
*/ */
public BigDecimal getTaxPoints() { public Integer getTaxPoints() {
return this.taxPoints; return this.taxPoints;
} }
...@@ -785,7 +782,7 @@ public class HGCW002 extends DaoEPBase { ...@@ -785,7 +782,7 @@ public class HGCW002 extends DaoEPBase {
* *
* @param taxPoints - 税点 * @param taxPoints - 税点
*/ */
public void setTaxPoints(BigDecimal taxPoints) { public void setTaxPoints(Integer taxPoints) {
this.taxPoints = taxPoints; this.taxPoints = taxPoints;
} }
/** /**
...@@ -840,7 +837,7 @@ public class HGCW002 extends DaoEPBase { ...@@ -840,7 +837,7 @@ public class HGCW002 extends DaoEPBase {
* get the reviewStatus - 审核状态. * get the reviewStatus - 审核状态.
* @return the reviewStatus * @return the reviewStatus
*/ */
public Boolean getReviewStatus() { public Integer getReviewStatus() {
return this.reviewStatus; return this.reviewStatus;
} }
...@@ -849,14 +846,14 @@ public class HGCW002 extends DaoEPBase { ...@@ -849,14 +846,14 @@ public class HGCW002 extends DaoEPBase {
* *
* @param reviewStatus - 审核状态 * @param reviewStatus - 审核状态
*/ */
public void setReviewStatus(Boolean reviewStatus) { public void setReviewStatus(Integer reviewStatus) {
this.reviewStatus = reviewStatus; this.reviewStatus = reviewStatus;
} }
/** /**
* get the balanceStatus - 结算状态;1未结算2部分结算3最终结算. * get the balanceStatus - 结算状态;1未结算2部分结算3最终结算.
* @return the balanceStatus * @return the balanceStatus
*/ */
public Boolean getBalanceStatus() { public Integer getBalanceStatus() {
return this.balanceStatus; return this.balanceStatus;
} }
...@@ -865,7 +862,7 @@ public class HGCW002 extends DaoEPBase { ...@@ -865,7 +862,7 @@ public class HGCW002 extends DaoEPBase {
* *
* @param balanceStatus - 结算状态;1未结算2部分结算3最终结算 * @param balanceStatus - 结算状态;1未结算2部分结算3最终结算
*/ */
public void setBalanceStatus(Boolean balanceStatus) { public void setBalanceStatus(Integer balanceStatus) {
this.balanceStatus = balanceStatus; this.balanceStatus = balanceStatus;
} }
/** /**
...@@ -996,14 +993,14 @@ public class HGCW002 extends DaoEPBase { ...@@ -996,14 +993,14 @@ public class HGCW002 extends DaoEPBase {
setProjName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROJ_NAME)), projName)); setProjName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROJ_NAME)), projName));
setContractNumber(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CONTRACT_NUMBER)), contractNumber)); setContractNumber(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CONTRACT_NUMBER)), contractNumber));
setContractName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CONTRACT_NAME)), contractName)); setContractName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CONTRACT_NAME)), contractName));
setContractType(NumberUtils.toBoolean(StringUtils.toString(map.get(FIELD_CONTRACT_TYPE)), contractType)); setContractType(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_CONTRACT_TYPE)), contractType));
setContractCategory(NumberUtils.toBoolean(StringUtils.toString(map.get(FIELD_CONTRACT_CATEGORY)), contractCategory)); setContractCategory(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_CONTRACT_CATEGORY)), contractCategory));
setPartyA(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PARTY_A)), partyA)); setPartyA(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PARTY_A)), partyA));
setPartyB(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PARTY_B)), partyB)); setPartyB(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PARTY_B)), partyB));
setPartyC(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PARTY_C)), partyC)); setPartyC(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PARTY_C)), partyC));
setPlanStartDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PLAN_START_DATE)), planStartDate)); setPlanStartDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PLAN_START_DATE)), planStartDate));
setPlanEndDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PLAN_END_DATE)), planEndDate)); setPlanEndDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PLAN_END_DATE)), planEndDate));
setContractStatus(NumberUtils.toBoolean(StringUtils.toString(map.get(FIELD_CONTRACT_STATUS)), contractStatus)); setContractStatus(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_CONTRACT_STATUS)), contractStatus));
setPartyAName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PARTY_A_NAME)), partyAName)); setPartyAName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PARTY_A_NAME)), partyAName));
setPartyAPhoneNumber(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PARTY_A_PHONE_NUMBER)), partyAPhoneNumber)); setPartyAPhoneNumber(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PARTY_A_PHONE_NUMBER)), partyAPhoneNumber));
setAlreadyName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_ALREADY_NAME)), alreadyName)); setAlreadyName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_ALREADY_NAME)), alreadyName));
...@@ -1013,14 +1010,14 @@ public class HGCW002 extends DaoEPBase { ...@@ -1013,14 +1010,14 @@ public class HGCW002 extends DaoEPBase {
setMainContractNumber(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_MAIN_CONTRACT_NUMBER)), mainContractNumber)); setMainContractNumber(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_MAIN_CONTRACT_NUMBER)), mainContractNumber));
setContractContent(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CONTRACT_CONTENT)), contractContent)); setContractContent(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CONTRACT_CONTENT)), contractContent));
setContractingMethod(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CONTRACTING_METHOD)), contractingMethod)); setContractingMethod(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CONTRACTING_METHOD)), contractingMethod));
setPaymentMethod(NumberUtils.toBoolean(StringUtils.toString(map.get(FIELD_PAYMENT_METHOD)), paymentMethod)); setPaymentMethod(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_PAYMENT_METHOD)), paymentMethod));
setPricingMethod(NumberUtils.toBoolean(StringUtils.toString(map.get(FIELD_PRICING_METHOD)), pricingMethod)); setPricingMethod(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_PRICING_METHOD)), pricingMethod));
setTaxPoints(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_TAX_POINTS)), taxPoints)); setTaxPoints(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_TAX_POINTS)), taxPoints));
setTotalContractPriceExcluding(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_TOTAL_CONTRACT_PRICE_EXCLUDING)), totalContractPriceExcluding)); setTotalContractPriceExcluding(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_TOTAL_CONTRACT_PRICE_EXCLUDING)), totalContractPriceExcluding));
setValueAddedTax(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_VALUE_ADDED_TAX)), valueAddedTax)); setValueAddedTax(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_VALUE_ADDED_TAX)), valueAddedTax));
setTotalContractPriceIncluding(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_TOTAL_CONTRACT_PRICE_INCLUDING)), totalContractPriceIncluding)); setTotalContractPriceIncluding(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_TOTAL_CONTRACT_PRICE_INCLUDING)), totalContractPriceIncluding));
setReviewStatus(NumberUtils.toBoolean(StringUtils.toString(map.get(FIELD_REVIEW_STATUS)), reviewStatus)); setReviewStatus(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_REVIEW_STATUS)), reviewStatus));
setBalanceStatus(NumberUtils.toBoolean(StringUtils.toString(map.get(FIELD_BALANCE_STATUS)), balanceStatus)); setBalanceStatus(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_BALANCE_STATUS)), balanceStatus));
setCreatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_BY)), createdBy)); setCreatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_BY)), createdBy));
setCreatedName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_NAME)), createdName)); setCreatedName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_NAME)), createdName));
setCreatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_TIME)), createdTime)); setCreatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_TIME)), createdTime));
......
...@@ -10,7 +10,7 @@ import com.baosight.iplat4j.core.util.StringUtils; ...@@ -10,7 +10,7 @@ import com.baosight.iplat4j.core.util.StringUtils;
/** /**
* Project: <br> * Project: <br>
* Title:Hgcw003.java <br> * Title:HGCW003.java <br>
* Description: <br> * Description: <br>
* *
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br> * Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
...@@ -66,11 +66,11 @@ public class HGCW003 extends DaoEPBase { ...@@ -66,11 +66,11 @@ public class HGCW003 extends DaoEPBase {
public static final String COL_UPDATED_TIME = "UPDATED_TIME"; /* 记录修改时间*/ public static final String COL_UPDATED_TIME = "UPDATED_TIME"; /* 记录修改时间*/
public static final String COL_DEP_CODE = "DEP_CODE"; /* 部门编码*/ public static final String COL_DEP_CODE = "DEP_CODE"; /* 部门编码*/
public static final String QUERY = "hgcw003.query"; public static final String QUERY = "HGCW003.query";
public static final String COUNT = "hgcw003.count"; public static final String COUNT = "HGCW003.count";
public static final String INSERT = "hgcw003.insert"; public static final String INSERT = "HGCW003.insert";
public static final String UPDATE = "hgcw003.update"; public static final String UPDATE = "HGCW003.update";
public static final String DELETE = "hgcw003.delete"; public static final String DELETE = "HGCW003.delete";
private Long id = new Long(0); private Long id = new Long(0);
private String accountCode = " "; /* 企业编码*/ private String accountCode = " "; /* 企业编码*/
...@@ -79,7 +79,7 @@ public class HGCW003 extends DaoEPBase { ...@@ -79,7 +79,7 @@ public class HGCW003 extends DaoEPBase {
private String contractNumber = " "; /* 合同号*/ private String contractNumber = " "; /* 合同号*/
private String inventory = " "; /* 清单*/ private String inventory = " "; /* 清单*/
private String unit = " "; /* 单位*/ private String unit = " "; /* 单位*/
private String provisionalQuantity = " "; /* 暂定工程量*/ private BigDecimal provisionalQuantity = new BigDecimal("0"); /* 暂定工程量*/
private String measurementMethod = " "; /* 计量方式*/ private String measurementMethod = " "; /* 计量方式*/
private String supplyMethod = " "; /* 材料供应方式*/ private String supplyMethod = " "; /* 材料供应方式*/
private BigDecimal unitPriceExcludingTax = new BigDecimal("0"); /* 除税单价/元*/ private BigDecimal unitPriceExcludingTax = new BigDecimal("0"); /* 除税单价/元*/
...@@ -323,7 +323,7 @@ public class HGCW003 extends DaoEPBase { ...@@ -323,7 +323,7 @@ public class HGCW003 extends DaoEPBase {
* get the provisionalQuantity - 暂定工程量. * get the provisionalQuantity - 暂定工程量.
* @return the provisionalQuantity * @return the provisionalQuantity
*/ */
public String getProvisionalQuantity() { public BigDecimal getProvisionalQuantity() {
return this.provisionalQuantity; return this.provisionalQuantity;
} }
...@@ -332,7 +332,7 @@ public class HGCW003 extends DaoEPBase { ...@@ -332,7 +332,7 @@ public class HGCW003 extends DaoEPBase {
* *
* @param provisionalQuantity - 暂定工程量 * @param provisionalQuantity - 暂定工程量
*/ */
public void setProvisionalQuantity(String provisionalQuantity) { public void setProvisionalQuantity(BigDecimal provisionalQuantity) {
this.provisionalQuantity = provisionalQuantity; this.provisionalQuantity = provisionalQuantity;
} }
/** /**
...@@ -558,7 +558,7 @@ public class HGCW003 extends DaoEPBase { ...@@ -558,7 +558,7 @@ public class HGCW003 extends DaoEPBase {
setContractNumber(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CONTRACT_NUMBER)), contractNumber)); setContractNumber(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CONTRACT_NUMBER)), contractNumber));
setInventory(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_INVENTORY)), inventory)); setInventory(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_INVENTORY)), inventory));
setUnit(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UNIT)), unit)); setUnit(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UNIT)), unit));
setProvisionalQuantity(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROVISIONAL_QUANTITY)), provisionalQuantity)); setProvisionalQuantity(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_PROVISIONAL_QUANTITY)), provisionalQuantity));
setMeasurementMethod(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_MEASUREMENT_METHOD)), measurementMethod)); setMeasurementMethod(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_MEASUREMENT_METHOD)), measurementMethod));
setSupplyMethod(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_SUPPLY_METHOD)), supplyMethod)); setSupplyMethod(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_SUPPLY_METHOD)), supplyMethod));
setUnitPriceExcludingTax(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_UNIT_PRICE_EXCLUDING_TAX)), unitPriceExcludingTax)); setUnitPriceExcludingTax(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_UNIT_PRICE_EXCLUDING_TAX)), unitPriceExcludingTax));
......
package com.baosight.hggp.hg.cw.domain;
import com.baosight.iplat4j.core.util.NumberUtils;
import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.core.data.DaoEPBase;
import java.util.HashMap;
import java.util.Map;
import com.baosight.iplat4j.core.util.StringUtils;
/**
* Project: <br>
* Title:HGCW999.java <br>
* Description: <br>
*
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
*
* @version 1.0
* @history 2024-05-14 14:08:59 create
*/
public class HGCW999 extends DaoEPBase {
private static final long serialVersionUID = 1L;
public static final String FIELD_ID = "id"; /* 主键ID*/
public static final String FIELD_ACCOUNT_CODE = "accountCode"; /* 企业编码*/
public static final String FIELD_COMPANY_CODE = "companyCode"; /* 公司编码*/
public static final String FIELD_COMPANY_NAME = "companyName"; /* 公司名称*/
public static final String FIELD_DEP_CODE = "depCode"; /* 部门编码 预留*/
public static final String FIELD_MAT_ID = "matId"; /* 物料ID*/
public static final String FIELD_DOC_ID = "docId"; /* 文件ID*/
public static final String FIELD_CREATED_BY = "createdBy"; /* 创建人*/
public static final String FIELD_CREATED_NAME = "createdName"; /* 创建人名称*/
public static final String FIELD_CREATED_TIME = "createdTime"; /* 创建时间*/
public static final String FIELD_UPDATED_BY = "updatedBy"; /* 修改人*/
public static final String FIELD_UPDATED_NAME = "updatedName"; /* 修改人名称*/
public static final String FIELD_UPDATED_TIME = "updatedTime"; /* 修改时间*/
public static final String FIELD_DOC_NAME = "docName"; /* 文件ID*/
public static final String FIELD_BIZ_TYPE = "bizType"; /* 业务类型*/
public static final String COL_ID = "ID"; /* 主键ID*/
public static final String COL_ACCOUNT_CODE = "ACCOUNT_CODE"; /* 企业编码*/
public static final String COL_COMPANY_CODE = "COMPANY_CODE"; /* 公司编码*/
public static final String COL_COMPANY_NAME = "COMPANY_NAME"; /* 公司名称*/
public static final String COL_DEP_CODE = "DEP_CODE"; /* 部门编码 预留*/
public static final String COL_MAT_ID = "MAT_ID"; /* 物料ID*/
public static final String COL_DOC_ID = "DOC_ID"; /* 文件ID*/
public static final String COL_DOC_NAME = "DOC_NAME"; /* 文件ID*/
public static final String COL_CREATED_BY = "CREATED_BY"; /* 创建人*/
public static final String COL_CREATED_NAME = "CREATED_NAME"; /* 创建人名称*/
public static final String COL_CREATED_TIME = "CREATED_TIME"; /* 创建时间*/
public static final String COL_UPDATED_BY = "UPDATED_BY"; /* 修改人*/
public static final String COL_UPDATED_NAME = "UPDATED_NAME"; /* 修改人名称*/
public static final String COL_UPDATED_TIME = "UPDATED_TIME"; /* 修改时间*/
public static final String COL_BIZ_TYPE = "BIZ_TYPE"; /* 业务类型*/
public static final String QUERY = "HGCW999.query";
public static final String COUNT = "HGCW999.count";
public static final String INSERT = "HGCW999.insert";
public static final String UPDATE = "HGCW999.update";
public static final String DELETE = "HGCW999.delete";
private Long id = new Long(0); /* 主键ID*/
private String accountCode = " "; /* 企业编码*/
private String companyCode = " "; /* 公司编码*/
private String companyName = " "; /* 公司名称*/
private String depCode = " "; /* 部门编码 预留*/
private Long matId = new Long(0); /* 物料ID*/
private String docId = " "; /* 文件ID*/
private String docName = " "; /* 文件ID*/
private String createdBy = " "; /* 创建人*/
private String createdName = " "; /* 创建人名称*/
private String createdTime = " "; /* 创建时间*/
private String updatedBy = " "; /* 修改人*/
private String updatedName = " "; /* 修改人名称*/
private String updatedTime = " "; /* 修改时间*/
private String bizType = " "; /* 业务类型*/
/**
* initialize the metadata.
*/
public void initMetaData() {
EiColumn eiColumn;
eiColumn = new EiColumn(FIELD_ID);
eiColumn.setPrimaryKey(true);
eiColumn.setDescName("主键ID");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_ACCOUNT_CODE);
eiColumn.setDescName("企业编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_COMPANY_CODE);
eiColumn.setDescName("公司编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_COMPANY_NAME);
eiColumn.setDescName("公司名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DEP_CODE);
eiColumn.setDescName("部门编码 预留");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_MAT_ID);
eiColumn.setDescName("物料ID");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DOC_ID);
eiColumn.setDescName("文件ID");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DOC_NAME);
eiColumn.setDescName("文件名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CREATED_BY);
eiColumn.setDescName("创建人");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CREATED_NAME);
eiColumn.setDescName("创建人名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CREATED_TIME);
eiColumn.setDescName("创建时间");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UPDATED_BY);
eiColumn.setDescName("修改人");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UPDATED_NAME);
eiColumn.setDescName("修改人名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UPDATED_TIME);
eiColumn.setDescName("修改时间");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_BIZ_TYPE);
eiColumn.setDescName("业务类型");
eiMetadata.addMeta(eiColumn);
}
/**
* the constructor.
*/
public HGCW999() {
initMetaData();
}
/**
* get the id - 主键ID.
* @return the id
*/
public Long getId() {
return this.id;
}
/**
* set the id - 主键ID.
*
* @param id - 主键ID
*/
public void setId(Long id) {
this.id = id;
}
/**
* get the accountCode - 企业编码.
* @return the accountCode
*/
public String getAccountCode() {
return this.accountCode;
}
/**
* set the accountCode - 企业编码.
*
* @param accountCode - 企业编码
*/
public void setAccountCode(String accountCode) {
this.accountCode = accountCode;
}
/**
* get the companyCode - 公司编码.
* @return the companyCode
*/
public String getCompanyCode() {
return this.companyCode;
}
/**
* set the companyCode - 公司编码.
*
* @param companyCode - 公司编码
*/
public void setCompanyCode(String companyCode) {
this.companyCode = companyCode;
}
/**
* get the companyName - 公司名称.
* @return the companyName
*/
public String getCompanyName() {
return this.companyName;
}
/**
* set the companyName - 公司名称.
*
* @param companyName - 公司名称
*/
public void setCompanyName(String companyName) {
this.companyName = companyName;
}
/**
* get the depCode - 部门编码 预留.
* @return the depCode
*/
public String getDepCode() {
return this.depCode;
}
/**
* set the depCode - 部门编码 预留.
*
* @param depCode - 部门编码 预留
*/
public void setDepCode(String depCode) {
this.depCode = depCode;
}
/**
* get the matId - 物料ID.
* @return the matId
*/
public Long getMatId() {
return this.matId;
}
/**
* set the matId - 物料ID.
*
* @param matId - 物料ID
*/
public void setMatId(Long matId) {
this.matId = matId;
}
/**
* get the docId - 文件ID.
* @return the docId
*/
public String getDocId() {
return this.docId;
}
/**
* set the docId - 文件ID.
*
* @param docId - 文件ID
*/
public void setDocId(String docId) {
this.docId = docId;
}
/**
* get the createdBy - 创建人.
* @return the createdBy
*/
public String getCreatedBy() {
return this.createdBy;
}
/**
* set the createdBy - 创建人.
*
* @param createdBy - 创建人
*/
public void setCreatedBy(String createdBy) {
this.createdBy = createdBy;
}
/**
* get the createdName - 创建人名称.
* @return the createdName
*/
public String getCreatedName() {
return this.createdName;
}
/**
* set the createdName - 创建人名称.
*
* @param createdName - 创建人名称
*/
public void setCreatedName(String createdName) {
this.createdName = createdName;
}
/**
* get the createdTime - 创建时间.
* @return the createdTime
*/
public String getCreatedTime() {
return this.createdTime;
}
/**
* set the createdTime - 创建时间.
*
* @param createdTime - 创建时间
*/
public void setCreatedTime(String createdTime) {
this.createdTime = createdTime;
}
/**
* get the updatedBy - 修改人.
* @return the updatedBy
*/
public String getUpdatedBy() {
return this.updatedBy;
}
/**
* set the updatedBy - 修改人.
*
* @param updatedBy - 修改人
*/
public void setUpdatedBy(String updatedBy) {
this.updatedBy = updatedBy;
}
/**
* get the updatedName - 修改人名称.
* @return the updatedName
*/
public String getUpdatedName() {
return this.updatedName;
}
/**
* set the updatedName - 修改人名称.
*
* @param updatedName - 修改人名称
*/
public void setUpdatedName(String updatedName) {
this.updatedName = updatedName;
}
/**
* get the updatedTime - 修改时间.
* @return the updatedTime
*/
public String getUpdatedTime() {
return this.updatedTime;
}
/**
* set the updatedTime - 修改时间.
*
* @param updatedTime - 修改时间
*/
public void setUpdatedTime(String updatedTime) {
this.updatedTime = updatedTime;
}
/**
* get the bizType - 业务类型.
* @return the bizType
*/
public String getBizType() {
return this.bizType;
}
/**
* set the bizType - 业务类型.
*
* @param bizType - 业务类型
*/
public void setBizType(String bizType) {
this.bizType = bizType;
}
/**
* get the value from Map.
*
* @param map - source data map
*/
@Override
public void fromMap(Map map) {
setId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_ID)), id));
setAccountCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_ACCOUNT_CODE)), accountCode));
setCompanyCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_COMPANY_CODE)), companyCode));
setCompanyName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_COMPANY_NAME)), companyName));
setDepCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DEP_CODE)), depCode));
setMatId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_MAT_ID)), matId));
setDocId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DOC_ID)), docId));
setDocName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DOC_NAME)), docName));
setCreatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_BY)), createdBy));
setCreatedName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_NAME)), createdName));
setCreatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_TIME)), createdTime));
setUpdatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_BY)), updatedBy));
setUpdatedName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_NAME)), updatedName));
setUpdatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_TIME)), updatedTime));
setBizType(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_BIZ_TYPE)), bizType));
}
/**
* set the value to Map.
*/
@Override
public Map toMap() {
Map map = new HashMap();
map.put(FIELD_ID, StringUtils.toString(id, eiMetadata.getMeta(FIELD_ID)));
map.put(FIELD_ACCOUNT_CODE, StringUtils.toString(accountCode, eiMetadata.getMeta(FIELD_ACCOUNT_CODE)));
map.put(FIELD_COMPANY_CODE, StringUtils.toString(companyCode, eiMetadata.getMeta(FIELD_COMPANY_CODE)));
map.put(FIELD_COMPANY_NAME, StringUtils.toString(companyName, eiMetadata.getMeta(FIELD_COMPANY_NAME)));
map.put(FIELD_DEP_CODE, StringUtils.toString(depCode, eiMetadata.getMeta(FIELD_DEP_CODE)));
map.put(FIELD_MAT_ID, StringUtils.toString(matId, eiMetadata.getMeta(FIELD_MAT_ID)));
map.put(FIELD_DOC_ID, StringUtils.toString(docId, eiMetadata.getMeta(FIELD_DOC_ID)));
map.put(FIELD_DOC_NAME, StringUtils.toString(docName, eiMetadata.getMeta(FIELD_DOC_NAME)));
map.put(FIELD_CREATED_BY, StringUtils.toString(createdBy, eiMetadata.getMeta(FIELD_CREATED_BY)));
map.put(FIELD_CREATED_NAME, StringUtils.toString(createdName, eiMetadata.getMeta(FIELD_CREATED_NAME)));
map.put(FIELD_CREATED_TIME, StringUtils.toString(createdTime, eiMetadata.getMeta(FIELD_CREATED_TIME)));
map.put(FIELD_UPDATED_BY, StringUtils.toString(updatedBy, eiMetadata.getMeta(FIELD_UPDATED_BY)));
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_BIZ_TYPE, StringUtils.toString(bizType, eiMetadata.getMeta(FIELD_BIZ_TYPE)));
return map;
}
public String getDocName() {
return docName;
}
public void setDocName(String docName) {
this.docName = docName;
}
}
...@@ -3,7 +3,10 @@ package com.baosight.hggp.hg.cw.service; ...@@ -3,7 +3,10 @@ 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.dao.DaoUtils; import com.baosight.hggp.core.dao.DaoUtils;
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.tools.HGCWTools;
import com.baosight.hggp.hg.cw.vo.UserVO;
import com.baosight.hggp.util.CommonMethod; import com.baosight.hggp.util.CommonMethod;
import com.baosight.hggp.util.DateUtils; import com.baosight.hggp.util.DateUtils;
import com.baosight.hggp.util.LogUtils; import com.baosight.hggp.util.LogUtils;
...@@ -11,6 +14,8 @@ import com.baosight.iplat4j.core.ei.EiConstant; ...@@ -11,6 +14,8 @@ 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 com.baosight.iplat4j.ed.util.SequenceGenerator;
import org.apache.commons.collections.CollectionUtils;
import java.util.Arrays; import java.util.Arrays;
import java.util.List; import java.util.List;
...@@ -66,13 +71,34 @@ public class ServiceHGCW002 extends ServiceBase { ...@@ -66,13 +71,34 @@ public class ServiceHGCW002 extends ServiceBase {
public EiInfo save(EiInfo inInfo) { public EiInfo save(EiInfo inInfo) {
try { try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows(); List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
// 写入数据 List<Map> detail1Rows = inInfo.getBlock("detail1").getRows();
for (int i = 0; i < resultRows.size(); i++) { List<Map> detail2Rows = inInfo.getBlock("detail2").getRows();
if (CollectionUtils.isNotEmpty(resultRows)) {
HGCW002 HGCW002 = new HGCW002(); HGCW002 HGCW002 = new HGCW002();
HGCW002.fromMap(resultRows.get(i)); HGCW002.fromMap(resultRows.get(0));
if (HGCW002.getId() == null || HGCW002.getId() == 0) { if (HGCW002.getId() == null || HGCW002.getId() == 0) {
UserVO userVO = HGCWTools.HgCw002.getUserCompany();
String contractNumber =userVO.getUsercode() +
HGCW002.getContractType() +
SequenceGenerator.getNextSequence(HGConstant.SequenceId.CW_CONTRACT_NO);
HGCW002.setCompanyCode(userVO.getUsercode());
HGCW002.setCompanyName(userVO.getUsername());
HGCW002.setContractNumber(contractNumber);
HGCW002.setReviewStatus(0);
HGCW002.setBalanceStatus(1);
HGCW002.setPlanStartDate(DateUtils.formatShort(HGCW002.getPlanStartDate()));
HGCW002.setPlanEndDate(DateUtils.formatShort(HGCW002.getPlanEndDate()));
HGCW002.setSigningDate(DateUtils.formatShort(HGCW002.getSigningDate()));
this.add(HGCW002); this.add(HGCW002);
// 写入其他数据
HGCWTools.HgCw003.save(detail1Rows,contractNumber,userVO);
HGCWTools.HgCw999.batchUpdate(detail2Rows,HGCW002.getId());
} else { } else {
HGCW002.setPlanStartDate(DateUtils.formatShort(HGCW002.getPlanStartDate()));
HGCW002.setPlanEndDate(DateUtils.formatShort(HGCW002.getPlanEndDate()));
HGCW002.setSigningDate(DateUtils.formatShort(HGCW002.getSigningDate()));
this.modify(HGCW002); this.modify(HGCW002);
} }
} }
......
package com.baosight.hggp.hg.cw.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.hg.cw.domain.HGCW002;
import com.baosight.hggp.hg.cw.vo.UserVO;
import com.baosight.hggp.hg.pz.domain.HGPZ002;
import com.baosight.hggp.hg.pz.domain.HGPZ003;
import com.baosight.hggp.hg.pz.tools.HGPZTools;
import com.baosight.hggp.hg.xs.domain.Org;
import com.baosight.hggp.hg.xs.tools.HGXSTools;
import com.baosight.hggp.util.CommonMethod;
import com.baosight.hggp.util.LogUtils;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.service.impl.ServiceBase;
import org.apache.commons.collections.CollectionUtils;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
/**
* @author yukang
* @date 2024年05月06日 18:22
*/
public class ServiceHGCW002A extends ServiceBase {
/**
* 画面初始化
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "账期维护",operType = "查询",operDesc = "初始化")
public EiInfo initLoad(EiInfo inInfo) {
try {
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.PROJECT_CODE_BOX_BLOCK_ID), null, false);
inInfo.addBlock("detail1").addBlockMeta(new HGCW002().eiMetadata);
inInfo.addBlock("detail2").addBlockMeta(new HGCW002().eiMetadata);
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
/**
* 甲方名称查询
* 合同类别为收入时,乙方为组织机构中的公司,甲方选择客户档案里的客户;数据提交之后需要把客户档案中的客户类别更新为正式客户
* 合同类别为支出时,甲方为组织机构中的公司,乙方选择供应商档案里面的供应商
* @param inInfo
* @return
*/
public EiInfo partyAQuery(EiInfo inInfo) {
try {
List<UserVO> userVOList = new ArrayList<>();
String contractCategory = inInfo.getString("contractCategory");
if (contractCategory.equals("1")) {
List<HGPZ002> hgpz002List = HGPZTools.HgPz002.list(1);
if (CollectionUtils.isNotEmpty(hgpz002List)) {
hgpz002List.forEach(hgpz002 -> {
UserVO userVO = new UserVO();
userVO.setUsercode(hgpz002.getCustCode());
userVO.setUsername(hgpz002.getCustName());
userVOList.add(userVO);
});
}
} else if (contractCategory.equals("2")) {
List<Org> orgList = HGXSTools.XsOrg.queryByUser();
if (CollectionUtils.isNotEmpty(orgList)) {
Org org = orgList.get(0);
if (!org.getOrgType().equals("company")) {
//如果不是公司公司,则找到上一级
Org org1 = HGXSTools.XsOrg.queryCompany(org.getOrgId());
UserVO userVO = new UserVO();
userVO.setUsercode(org1.getOrgId());
userVO.setUsername(org1.getOrgCname());
userVOList.add(userVO);
} else {
UserVO userVO = new UserVO();
userVO.setUsercode(org.getOrgId());
userVO.setUsername(org.getOrgCname());
userVOList.add(userVO);
}
}
}
inInfo.addBlock("partyAResult").addRows(userVOList);
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "甲方名称查询失败");
}
return inInfo;
}
/**
* 乙方名称查询
* @param inInfo
* @return
*/
public EiInfo partyBQuery(EiInfo inInfo) {
try {
List<UserVO> userVOList = new ArrayList<>();
String contractCategory = inInfo.getString("contractCategory");
if (contractCategory.equals("1")) {
List<Org> orgList = HGXSTools.XsOrg.queryByUser();
if (CollectionUtils.isNotEmpty(orgList)) {
Org org = orgList.get(0);
if (!org.getOrgType().equals("company")) {
//如果不是公司公司,则找到上一级
Org org1 = HGXSTools.XsOrg.queryCompany(org.getOrgId());
UserVO userVO = new UserVO();
userVO.setUsercode(org1.getOrgId());
userVO.setUsername(org1.getOrgCname());
userVOList.add(userVO);
} else {
UserVO userVO = new UserVO();
userVO.setUsercode(org.getOrgId());
userVO.setUsername(org.getOrgCname());
userVOList.add(userVO);
}
}
} else if (contractCategory.equals("2")) {
List<HGPZ003> hgpz003List = HGPZTools.HgPz003.list(4);
if (CollectionUtils.isNotEmpty(hgpz003List)) {
hgpz003List.forEach(hgpz003 -> {
UserVO userVO = new UserVO();
userVO.setUsercode(hgpz003.getSupCode());
userVO.setUsername(hgpz003.getSupName());
userVOList.add(userVO);
});
}
}
inInfo.addBlock("partyAResult").addRows(userVOList);
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "乙方名称查询失败");
}
return inInfo;
}
}
package com.baosight.hggp.hg.cw.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.hg.cw.domain.HGCW002;
import com.baosight.hggp.hg.cw.domain.HGCW003;
import com.baosight.hggp.hg.cw.domain.HGCW999;
import com.baosight.hggp.hg.cw.tools.HGCWTools;
import com.baosight.hggp.hg.cw.vo.UserVO;
import com.baosight.hggp.hg.pz.domain.HGPZ002;
import com.baosight.hggp.hg.pz.domain.HGPZ003;
import com.baosight.hggp.hg.pz.tools.HGPZTools;
import com.baosight.hggp.hg.xs.domain.Org;
import com.baosight.hggp.hg.xs.tools.HGXSTools;
import com.baosight.hggp.util.AssertUtils;
import com.baosight.hggp.util.CommonMethod;
import com.baosight.hggp.util.LogUtils;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.service.impl.ServiceBase;
import org.apache.commons.collections.CollectionUtils;
import java.util.*;
/**
* @author yukang
* @date 2024年05月06日 18:22
*/
public class ServiceHGCW002B extends ServiceBase {
/**
* 画面初始化
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "修改合同",operType = "查询",operDesc = "初始化")
public EiInfo initLoad(EiInfo inInfo) {
try {
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.PROJECT_CODE_BOX_BLOCK_ID), null, false);
String id = inInfo.getString("id");
HGCW002 HGCW002 = HGCWTools.HgCw002.getId(id);
inInfo.addBlock(EiConstant.resultBlock).addRow(HGCW002);
//获取清单
List<HGCW003> hgcw003List = HGCWTools.HgCw003.queryByContractNumber(HGCW002.getContractNumber());
inInfo.addBlock("detail1").addRows(hgcw003List);
List<HGCW999> hgcw999List = HGCWTools.HgCw999.queryByBiz(HGCW002.getId(),"HT");
inInfo.addBlock("detail2").addRows(hgcw999List);
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
}
package com.baosight.hggp.hg.cw.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.hg.cw.domain.HGCW003;
import com.baosight.hggp.hg.cw.tools.HGCWTools;
import com.baosight.hggp.util.CommonMethod;
import com.baosight.hggp.util.DateUtils;
import com.baosight.hggp.util.LogUtils;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.service.impl.ServiceBase;
import com.baosight.iplat4j.core.util.NumberUtils;
import java.math.BigDecimal;
import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
/**
* @author yukang
* @date 2024年05月06日 18:22
*/
public class ServiceHGCW003 extends ServiceBase {
/**
* 画面初始化
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "合同清单",operType = "查询",operDesc = "初始化")
public EiInfo initLoad(EiInfo inInfo) {
try {
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGCW003().eiMetadata);
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
/**
* 查询操作
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "合同清单",operType = "查询",operDesc = "查询")
@Override
public EiInfo query(EiInfo inInfo) {
try {
inInfo = super.query(inInfo, HGCW003.QUERY, new HGCW003());
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
/**
* 新增操作
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "合同清单",operType = "保存",operDesc = "保存")
public EiInfo save(EiInfo inInfo) {
EiInfo eiInfo = new EiInfo();
try {
List<Map> resultRows = inInfo.getBlock("detail1").getRows();
String contractNumber = "";
// 写入数据
for (int i = 0; i < resultRows.size(); i++) {
HGCW003 HGCW003 = new HGCW003();
HGCW003.fromMap(resultRows.get(i));
contractNumber = HGCW003.getContractNumber();
if (HGCW003.getId() == null || HGCW003.getId() == 0) {
this.add(HGCW003);
} else {
this.modify(HGCW003);
}
}
List<HGCW003> hgcw003List = HGCWTools.HgCw003.queryByContractNumber(contractNumber);
eiInfo.addBlock("detail1").addRows(hgcw003List);
eiInfo.setStatus(EiConstant.STATUS_DEFAULT);
eiInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据保存成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "保存失败");
}
return eiInfo;
}
/**
* 新增操作
*
* @param HGCW003
* @return
*/
public void add(HGCW003 HGCW003) {
DaoUtils.insert("HGCW003.insert", HGCW003);
}
/**
* 修改操作
*
* @param HGCW003
* @return
*/
public void modify(HGCW003 HGCW003) {
DaoUtils.update("HGCW003.update", HGCW003);
}
public void deleteEntity(HGCW003 HGCW003) {
DaoUtils.update("HGCW003.delete", HGCW003);
}
/**
* 删除操作
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "合同清单",operType = "删除",operDesc = "删除")
public EiInfo delete(EiInfo inInfo) {
EiInfo eiInfo = new EiInfo();
try {
List<Map> resultRows = inInfo.getBlock("detail1").getRows();
String contractNumber = "";
// 写入数据
for (int i = 0; i < resultRows.size(); i++) {
HGCW003 HGCW003 = new HGCW003();
HGCW003.fromMap(resultRows.get(i));
contractNumber = HGCW003.getContractNumber();
this.deleteEntity(HGCW003);
}
List<HGCW003> hgcw003List = HGCWTools.HgCw003.queryByContractNumber(contractNumber);
eiInfo.addBlock("detail1").addRows(hgcw003List);
eiInfo.setStatus(EiConstant.STATUS_DEFAULT);
eiInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据删除成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "删除失败");
}
return eiInfo;
}
/**
* 更新页面上的数据
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "合同清单",operType = "更新",operDesc = "更新")
public EiInfo dataUpdate(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock("result1").getRows();
List<HGCW003> hgcw003List = new ArrayList<>();
BigDecimal taxPoints = NumberUtils.toBigDecimal(inInfo.getString("taxPoints"));
DecimalFormat decimalFormat = new DecimalFormat("#.000");
for (int i = 0; i < resultRows.size(); i++) {
HGCW003 HGCW003 = new HGCW003();
HGCW003.fromMap(resultRows.get(i));
// 计算总金额
BigDecimal totalPriceExcluding = new BigDecimal(decimalFormat.format(HGCW003.getProvisionalQuantity().multiply(HGCW003.getUnitPriceExcludingTax())));
BigDecimal totalPriceIncluding = new BigDecimal(decimalFormat.format(totalPriceExcluding.multiply(taxPoints.add(new BigDecimal(1)))));
HGCW003.setTotalPriceExcluding(totalPriceExcluding);
HGCW003.setTotalPriceIncluding(totalPriceIncluding);
hgcw003List.add(HGCW003);
}
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据删除成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "删除失败");
}
return inInfo;
}
}
package com.baosight.hggp.hg.cw.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.service.impl.ServiceBase;
/**
*
*/
public class ServiceHGCW099 extends ServiceBase {
/**
* 画面初始化.
*/
@OperationLogAnnotation(operModul = "附件上传",operType = "查询",operDesc = "初始化")
public EiInfo initLoad(EiInfo inInfo) {
return inInfo;
}
/**
* 附件上传.
*/
@OperationLogAnnotation(operModul = "附件上传",operType = "上传",operDesc = "附件上传")
public EiInfo form(EiInfo inInfo) {
return inInfo;
}
}
package com.baosight.hggp.hg.cw.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.hg.cw.domain.HGCW003;
import com.baosight.hggp.hg.cw.domain.HGCW999;
import com.baosight.hggp.hg.cw.tools.HGCWTools;
import com.baosight.hggp.hg.ds.domain.HGDS002;
import com.baosight.hggp.util.FileUtils;
import com.baosight.hggp.util.LogUtils;
import com.baosight.iplat4j.core.ProjectInfo;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import com.baosight.iplat4j.core.service.soa.XServiceManager;
import org.apache.commons.collections.CollectionUtils;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @author:songx
* @date:2024/1/25,15:25
*/
public class ServiceHGCW999 extends ServiceEPBase {
/**
* 画面初始化
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "附件清单",operType = "查询",operDesc = "物料清单-附件清单A-初始化")
public EiInfo initLoad(EiInfo inInfo) {
try {
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGCW999().eiMetadata);
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
/**
* 查询操作
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "附件清单",operType = "查询",operDesc = "物料清单-附件清单A-查询")
@Override
public EiInfo query(EiInfo inInfo) {
try {
// 项目环境
String projectEnv = ProjectInfo.getProjectEnv();
if (CommonConstant.projectEnv.RUN.equalsIgnoreCase(projectEnv)) {
inInfo = super.query(inInfo, "HGCW999.queryRun", new HGCW999());
} else {
inInfo = super.query(inInfo, "HGCW999.queryDev", new HGCW999());
}
} catch (Throwable e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
public EiInfo queryDoc(EiInfo inInfo) {
try {
String docId = inInfo.getString("docId");
HGCW999 HGCW999 = new HGCW999();
List<HGCW999> list = new ArrayList<>();
Map<String,Object> map = new HashMap<>();
map.put("docId",docId);
// 项目环境
String projectEnv = ProjectInfo.getProjectEnv();
if (CommonConstant.projectEnv.RUN.equalsIgnoreCase(projectEnv)) {
list = this.dao.query("HGCW999.queryRun",map);
} else {
list = this.dao.query("HGCW999.queryDev",map);
}
if (CollectionUtils.isNotEmpty(list)) {
HGCW999 = list.get(0);
inInfo.set("data",HGCW999);
}
} catch (Throwable e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
public void add(HGCW999 HGCW999) {
DaoUtils.insert("HGCW999.insert", HGCW999);
}
public void deleteEntity(HGCW999 HGCW999) {
DaoUtils.update("HGCW999.delete", HGCW999);
}
/**
* 新增操作
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "附件清单",operType = "新增",operDesc = "物料清单-附件清单A-新增操作")
@Override
public EiInfo insert(EiInfo inInfo) {
EiInfo eiInfo = new EiInfo();
try {
Long matId = null;
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
for (int i = 0; i < resultRows.size(); i++) {
HGCW999 fSc002A = new HGCW999();
fSc002A.fromMap(resultRows.get(i));
matId = fSc002A.getMatId();
this.add(fSc002A);
}
List<HGCW999> hgcw999List = HGCWTools.HgCw999.queryByBiz(matId,"HT");
eiInfo.addBlock("detail2").addRows(hgcw999List);
eiInfo.setStatus(EiConstant.STATUS_DEFAULT);
eiInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据新增成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(eiInfo, e, "新增失败");
}
return eiInfo;
}
/**
* 删除操作
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "附件清单",operType = "删除",operDesc = "物料清单-附件清单A-删除操作")
public EiInfo delete(EiInfo inInfo) {
EiInfo eiInfo = new EiInfo();
try {
Long matId = null;
List<Map> resultRows = inInfo.getBlock("detail2").getRows();
for (int i = 0; i < resultRows.size(); i++) {
HGCW999 fSc002A = new HGCW999();
fSc002A.fromMap(resultRows.get(i));
matId = fSc002A.getMatId();
this.deleteEntity(fSc002A);
}
List<HGCW999> hgcw999List = HGCWTools.HgCw999.queryByBiz(matId,"HT");
eiInfo.addBlock("detail2").addRows(hgcw999List);
eiInfo.setStatus(EiConstant.STATUS_DEFAULT);
eiInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据删除成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(eiInfo, e, "删除失败");
}
return eiInfo;
}
/**
* 删除文件
* @param docId 文件ID
*/
@OperationLogAnnotation(operModul = "附件清单",operType = "删除",operDesc = "删除附件文件")
public void delectDoc(String docId){
Map<String,Object> map = new HashMap<>();
map.put("docId",docId);
List<HGDS002> list = this.dao.query(HGDS002.QUERY,map);
if (list.size() > 0) {
String realPath = list.get(0).getRealPath();
// 项目环境
String projectEnv = ProjectInfo.getProjectEnv();
if (projectEnv.equals(CommonConstant.projectEnv.RUN)) {
EiInfo queryInfo = new EiInfo();
queryInfo.set(HGCW999.FIELD_DOC_ID,list.get(0).getDocId());
//获取文档信息
queryInfo.set(EiConstant.serviceId,"S_EU_0102");
EiInfo docInfo = XServiceManager.call(queryInfo);
//数据库
Map docInfoMap = docInfo.getMap("docMap");
if (docInfoMap.size() > 0) {
EiInfo eiInfo = new EiInfo();
eiInfo.set("data",docInfoMap.get("url")+"-"+0);
eiInfo.set(EiConstant.serviceId,"S_EU_0105");
//调用接口
EiInfo outInfo = XServiceManager.call(eiInfo);
if(outInfo.getStatus() == EiConstant.STATUS_FAILURE){
LogUtils.setDetailMsg(outInfo, new Throwable(), "查询部件类型失败");
outInfo.setMsg("失败");
}
}
}else {
FileUtils.deleteFile(realPath);
}
this.dao.delete(HGDS002.DELETE,map);
}
}
}
...@@ -23,27 +23,8 @@ ...@@ -23,27 +23,8 @@
--> -->
<sqlMap namespace="HGCW001"> <sqlMap namespace="HGCW001">
<sql id="authCondition">
<!-- 无权限时使用 -->
<isNotEmpty prepend=" AND " property="authDepCode">
DEP_CODE = #authDepCode#
</isNotEmpty>
<!-- 仅本人和部门组合 -->
<isEqual prepend=" AND " property="authCombination" compareValue="1">
(CREATED_BY = #authOnlyPeople# OR DEP_CODE IN <iterate close=")" open="(" conjunction="," property="authDepCodes">#authDepCodes[]#</iterate>)
</isEqual>
<!-- 仅本人或部门 -->
<isNotEqual prepend=" AND " property="authCombination" compareValue="1">
<isNotEmpty property="authOnlyPeople">
CREATED_BY = #authOnlyPeople#
</isNotEmpty>
<isNotEmpty property="authDepCodes">
DEP_CODE IN <iterate close=")" open="(" conjunction="," property="authDepCodes">#authDepCodes[]#</iterate>
</isNotEmpty>
</isNotEqual>
</sql>
<sql id="condition"> <sql id="condition">
<include refid="HGXSDataAuth.authCondition"/>
<isNotEmpty prepend=" AND " property="id"> <isNotEmpty prepend=" AND " property="id">
ID = #id# ID = #id#
</isNotEmpty> </isNotEmpty>
......
...@@ -47,27 +47,9 @@ ...@@ -47,27 +47,9 @@
--> -->
<sqlMap namespace="HGCW002"> <sqlMap namespace="HGCW002">
<sql id="authCondition">
<!-- 无权限时使用 -->
<isNotEmpty prepend=" AND " property="authDepCode">
DEP_CODE = #authDepCode#
</isNotEmpty>
<!-- 仅本人和部门组合 -->
<isEqual prepend=" AND " property="authCombination" compareValue="1">
(CREATED_BY = #authOnlyPeople# OR DEP_CODE IN <iterate close=")" open="(" conjunction="," property="authDepCodes">#authDepCodes[]#</iterate>)
</isEqual>
<!-- 仅本人或部门 -->
<isNotEqual prepend=" AND " property="authCombination" compareValue="1">
<isNotEmpty property="authOnlyPeople">
CREATED_BY = #authOnlyPeople#
</isNotEmpty>
<isNotEmpty property="authDepCodes">
DEP_CODE IN <iterate close=")" open="(" conjunction="," property="authDepCodes">#authDepCodes[]#</iterate>
</isNotEmpty>
</isNotEqual>
</sql>
<sql id="condition"> <sql id="condition">
<include refid="HGXSDataAuth.authCondition"/>
<isNotEmpty prepend=" AND " property="id"> <isNotEmpty prepend=" AND " property="id">
ID = #id# ID = #id#
</isNotEmpty> </isNotEmpty>
...@@ -417,6 +399,9 @@ ...@@ -417,6 +399,9 @@
DEP_CODE <!-- 部门编码 --> DEP_CODE <!-- 部门编码 -->
) )
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#) 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#)
<selectKey resultClass="long" keyProperty="id">
SELECT MAX(ID) AS "id" FROM ${hggpSchema}.HGCW002
</selectKey>
</insert> </insert>
<delete id="delete"> <delete id="delete">
......
...@@ -28,27 +28,9 @@ ...@@ -28,27 +28,9 @@
--> -->
<sqlMap namespace="HGCW003"> <sqlMap namespace="HGCW003">
<sql id="authCondition">
<!-- 无权限时使用 -->
<isNotEmpty prepend=" AND " property="authDepCode">
DEP_CODE = #authDepCode#
</isNotEmpty>
<!-- 仅本人和部门组合 -->
<isEqual prepend=" AND " property="authCombination" compareValue="1">
(CREATED_BY = #authOnlyPeople# OR DEP_CODE IN <iterate close=")" open="(" conjunction="," property="authDepCodes">#authDepCodes[]#</iterate>)
</isEqual>
<!-- 仅本人或部门 -->
<isNotEqual prepend=" AND " property="authCombination" compareValue="1">
<isNotEmpty property="authOnlyPeople">
CREATED_BY = #authOnlyPeople#
</isNotEmpty>
<isNotEmpty property="authDepCodes">
DEP_CODE IN <iterate close=")" open="(" conjunction="," property="authDepCodes">#authDepCodes[]#</iterate>
</isNotEmpty>
</isNotEqual>
</sql>
<sql id="condition"> <sql id="condition">
<include refid="HGXSDataAuth.authCondition"/>
<isNotEmpty prepend=" AND " property="id"> <isNotEmpty prepend=" AND " property="id">
ID = #id# ID = #id#
</isNotEmpty> </isNotEmpty>
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-2.dtd"> <!-- table information
Generate time : 2024-05-14 14:08:59
Version : 1.0
schema : hggp
tableName : HGCW999
ID BIGINT NOT NULL primarykey,
ACCOUNT_CODE VARCHAR,
COMPANY_CODE VARCHAR,
COMPANY_NAME VARCHAR,
DEP_CODE VARCHAR NOT NULL,
MAT_ID BIGINT,
DOC_ID VARCHAR,
CREATED_BY VARCHAR,
CREATED_NAME VARCHAR,
CREATED_TIME VARCHAR,
UPDATED_BY VARCHAR,
UPDATED_NAME VARCHAR,
UPDATED_TIME VARCHAR,
BIZ_TYPE VARCHAR
-->
<sqlMap namespace="HGCW999">
<sql id="column">
A.ID as "id", <!-- 主键ID -->
A.ACCOUNT_CODE as "accountCode", <!-- 企业编码 -->
A.COMPANY_CODE as "companyCode", <!-- 公司编码 -->
A.COMPANY_NAME as "companyName", <!-- 公司名称 -->
A.DEP_CODE as "depCode", <!-- 部门编码 预留 -->
A.MAT_ID as "matId", <!-- 物料ID -->
A.DOC_ID as "docId", <!-- 文件ID -->
A.CREATED_BY as "createdBy", <!-- 创建人 -->
A.CREATED_NAME as "createdName", <!-- 创建人名称 -->
A.CREATED_TIME as "createdTime", <!-- 创建时间 -->
A.UPDATED_BY as "updatedBy", <!-- 修改人 -->
A.UPDATED_NAME as "updatedName", <!-- 修改人名称 -->
A.UPDATED_TIME as "updatedTime", <!-- 修改时间 -->
A.BIZ_TYPE as "bizType" <!-- 业务类型 -->
</sql>
<sql id="columnDev">
<include refid="column"/>,
B.DOC_NAME as "docName" <!-- 文件名称 -->
</sql>
<sql id="columnRun">
<include refid="column"/>,
B.RES_CNAME as "docName" <!-- 文件名称 -->
</sql>
<sql id="condition">
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="accountCode">
ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyName">
COMPANY_NAME = #companyName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="matId">
MAT_ID = #matId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="docId">
DOC_ID = #docId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdName">
CREATED_NAME = #createdName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
CREATED_TIME = #createdTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy">
UPDATED_BY = #updatedBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedName">
UPDATED_NAME = #updatedName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
UPDATED_TIME = #updatedTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="bizType">
BIZ_TYPE = #bizType#
</isNotEmpty>
</sql>
<!-- 开发环境 -->
<sql id="conditionDev">
AND A.DOC_ID = B.DOC_ID
<include refid="condition"/>
<isNotEmpty prepend=" AND " property="docName">
B.DOC_NAME LIKE CONCAT('%', #docName#, '%')
</isNotEmpty>
</sql>
<!-- 正式环境 -->
<sql id="conditionRun">
AND A.DOC_ID = B.RES_ID
<include refid="condition"/>
<isNotEmpty prepend=" AND " property="docName">
B.RES_CNAME LIKE CONCAT('%', #docName#, '%')
</isNotEmpty>
</sql>
<sql id="customCondition">
<isNotEmpty prepend=" AND " property="createdDateFrom">
A.CREATED_TIME &gt;= CONCAT(REPLACE(#createdDateFrom#, '-', ''), '000000')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdDateTo">
A.CREATED_TIME &lt;= CONCAT(REPLACE(#createdDateTo#, '-', ''), '235959')
</isNotEmpty>
</sql>
<sql id="order">
<dynamic prepend="ORDER BY">
<isNotEmpty property="order">
$order$
</isNotEmpty>
<isEmpty property="order">
A.ID DESC
</isEmpty>
</dynamic>
</sql>
<select id="queryDev" resultClass="com.baosight.hggp.hg.cw.domain.HGCW999">
SELECT
<include refid="columnDev"/>
FROM ${hggpSchema}.HGCW999 A, ${platSchema}.TEUDM02 B
WHERE 1=1
<include refid="conditionDev"/>
<include refid="customCondition"/>
<include refid="order"/>
</select>
<select id="countDev" resultClass="int">
SELECT COUNT(*) FROM ${hggpSchema}.HGCW999 A, ${platSchema}.TEUDM02 B
WHERE 1=1
<include refid="conditionDev"/>
<include refid="customCondition"/>
</select>
<select id="queryRun" resultClass="com.baosight.hggp.hg.cw.domain.HGCW999">
SELECT
<include refid="columnRun"/>
FROM ${hggpSchema}.HGCW999 A, ${platSchema}.TEUDM05 B
WHERE 1=1
<include refid="conditionRun"/>
<include refid="customCondition"/>
<include refid="order"/>
</select>
<select id="countRun" resultClass="int">
SELECT COUNT(*) FROM ${hggpSchema}.HGCW999 A, ${platSchema}.TEUDM05 B
WHERE 1=1
<include refid="conditionRun"/>
<include refid="customCondition"/>
</select>
<insert id="insert">
INSERT INTO ${hggpSchema}.HGCW999 (ID, <!-- 主键ID -->
ACCOUNT_CODE, <!-- 企业编码 -->
COMPANY_CODE, <!-- 公司编码 -->
COMPANY_NAME, <!-- 公司名称 -->
DEP_CODE, <!-- 部门编码 预留 -->
MAT_ID, <!-- 物料ID -->
DOC_ID, <!-- 文件ID -->
CREATED_BY, <!-- 创建人 -->
CREATED_NAME, <!-- 创建人名称 -->
CREATED_TIME, <!-- 创建时间 -->
UPDATED_BY, <!-- 修改人 -->
UPDATED_NAME, <!-- 修改人名称 -->
UPDATED_TIME, <!-- 修改时间 -->
BIZ_TYPE <!-- 业务类型 -->
)
VALUES (#id#, #accountCode#, #companyCode#, #companyName#, #depCode#, #matId#, #docId#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #bizType#)
</insert>
<delete id="delete">
DELETE FROM ${hggpSchema}.HGCW999 WHERE
ID = #id#
</delete>
<update id="update">
UPDATE ${hggpSchema}.HGCW999
SET
ACCOUNT_CODE = #accountCode#, <!-- 企业编码 -->
COMPANY_CODE = #companyCode#, <!-- 公司编码 -->
COMPANY_NAME = #companyName#, <!-- 公司名称 -->
DEP_CODE = #depCode#, <!-- 部门编码 预留 -->
MAT_ID = #matId#, <!-- 物料ID -->
DOC_ID = #docId#, <!-- 文件ID -->
CREATED_BY = #createdBy#, <!-- 创建人 -->
CREATED_NAME = #createdName#, <!-- 创建人名称 -->
CREATED_TIME = #createdTime#, <!-- 创建时间 -->
UPDATED_BY = #updatedBy#, <!-- 修改人 -->
UPDATED_NAME = #updatedName#, <!-- 修改人名称 -->
UPDATED_TIME = #updatedTime#, <!-- 修改时间 -->
BIZ_TYPE = #bizType# <!-- 业务类型 -->
WHERE
ID = #id#
</update>
<update id="batchUpdate">
UPDATE ${hggpSchema}.HGCW999
SET
MAT_ID = #matId#, <!-- 物料ID -->
UPDATED_BY = #updatedBy#, <!-- 修改人 -->
UPDATED_NAME = #updatedName#, <!-- 修改人名称 -->
UPDATED_TIME = #updatedTime# <!-- 修改时间 -->
WHERE
DOC_ID IN <iterate close=")" open="(" conjunction="," property="docIds">#docIds[]#</iterate>
</update>
</sqlMap>
package com.baosight.hggp.hg.cw.tools;
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.hg.cw.domain.HGCW002;
import com.baosight.hggp.hg.cw.domain.HGCW003;
import com.baosight.hggp.hg.cw.domain.HGCW999;
import com.baosight.hggp.hg.cw.vo.UserVO;
import com.baosight.hggp.hg.sc.domain.HGSC001A;
import com.baosight.hggp.hg.xs.domain.Org;
import com.baosight.hggp.hg.xs.tools.HGXSTools;
import com.baosight.hggp.util.AssertUtils;
import com.baosight.iplat4j.core.ProjectInfo;
import org.apache.commons.collections.CollectionUtils;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class HGCWTools {
public static class HgCw002 {
public static UserVO getUserCompany() {
UserVO userVO = new UserVO();
List<Org> orgList = HGXSTools.XsOrg.queryByUser();
if (CollectionUtils.isNotEmpty(orgList)) {
Org org = orgList.get(0);
if (!org.getOrgType().equals("company")) {
//如果不是公司公司,则找到上一级
Org org1 = HGXSTools.XsOrg.queryCompany(org.getOrgId());
userVO.setUsercode(org1.getOrgId());
userVO.setUsername(org1.getOrgCname());
} else {
userVO.setUsercode(org.getOrgId());
userVO.setUsername(org.getOrgCname());
}
}
return userVO;
}
public static HGCW002 getId(String id) {
AssertUtils.isNull(id, "合同ID不能为空!");
List<HGCW002> results = DaoBase.getInstance().query(HGCW002.QUERY,new HashMap<String,Object>(){
{put("id",id);}
});
return results.get(0);
}
}
public static class HgCw003{
public static void save(List<Map> rows, String contractNumber, UserVO userVO) {
AssertUtils.isNull(contractNumber, "合同号不能为空!");
rows.forEach(row -> {
HGCW003 HGCW003 = new HGCW003();
HGCW003.fromMap(row);
HGCW003.setCompanyCode(userVO.getUsercode());
HGCW003.setCompanyName(userVO.getUsername());
HGCW003.setContractNumber(contractNumber);
DaoUtils.insert(HGCW003.INSERT, HGCW003);
});
}
/**
* 根据合同号获取合同清单
* @param contractNumber
* @return
*/
public static List<HGCW003> queryByContractNumber(String contractNumber) {
AssertUtils.isNull(contractNumber, "合同号不能为空!");
List<HGCW003> results = DaoBase.getInstance().query(HGCW003.QUERY,new HashMap<String,Object>(){
{put("contractNumber",contractNumber);}
});
return results;
}
}
public static class HgCw999 {
public static void batchUpdate(List<Map> rows, Long id) {
AssertUtils.isNull(id, "业务ID不能为空!");
String[] docIds = rows.stream().map(row -> row.get("docId").toString()).toArray(String[]::new);
DaoUtils.update("HGCW999.batchUpdate", new HashMap<String,Object>(){
{put("docIds",docIds);}
{put("matId",id);}
});
}
public static List<HGCW999> queryByBiz(Long matId, String bizType) {
AssertUtils.isNull(matId, "业务ID不能为空!");
AssertUtils.isNull(bizType, "业务类型不能为空!");
List<HGCW999> results = new ArrayList<>();
// 项目环境
String projectEnv = ProjectInfo.getProjectEnv();
if (CommonConstant.projectEnv.RUN.equalsIgnoreCase(projectEnv)) {
results = DaoBase.getInstance().query("HGCW999.queryRun",new HashMap<String,Object>(){
{put("matId",matId);}
{put("bizType",bizType);}
});
} else {
results = DaoBase.getInstance().query("HGCW999.queryDev",new HashMap<String,Object>(){
{put("matId",matId);}
{put("bizType",bizType);}
});
}
return results;
}
}
}
package com.baosight.hggp.hg.cw.vo;
public class UserVO {
private String username;
private String usercode;
public String getUsercode() {
return usercode;
}
public void setUsercode(String usercode) {
this.usercode = usercode;
}
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
}
...@@ -12,6 +12,15 @@ import com.baosight.hggp.hg.sc.domain.HGSC005A; ...@@ -12,6 +12,15 @@ import com.baosight.hggp.hg.sc.domain.HGSC005A;
import com.baosight.hggp.hg.sj.domain.HGSJ003; import com.baosight.hggp.hg.sj.domain.HGSJ003;
import com.baosight.hggp.util.*; import com.baosight.hggp.util.*;
import com.baosight.iplat4j.common.ed.domain.TEDCM01; import com.baosight.iplat4j.common.ed.domain.TEDCM01;
import com.baosight.hggp.hg.pz.domain.HGPZ002;
import com.baosight.hggp.hg.pz.domain.HGPZ003;
import com.baosight.hggp.hg.pz.domain.HGPZ005;
import com.baosight.hggp.hg.pz.domain.HGPZ007;
import com.baosight.hggp.hg.pz.domain.HGPZ009;
import com.baosight.hggp.util.AssertUtils;
import com.baosight.hggp.util.MapUtils;
import com.baosight.hggp.util.ObjectUtils;
import com.baosight.hggp.util.StringUtils;
import com.baosight.iplat4j.core.data.DaoEPBase; import com.baosight.iplat4j.core.data.DaoEPBase;
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;
...@@ -35,7 +44,42 @@ import lombok.extern.slf4j.Slf4j; ...@@ -35,7 +44,42 @@ import lombok.extern.slf4j.Slf4j;
*/ */
@Slf4j @Slf4j
public class HGPZTools { public class HGPZTools {
public static class HgPz002 {
/**
* 查询
*
* @param status
* @return
*/
public static List<HGPZ002> list(Integer status) {
if (status == null) {
return null;
}
Map queryMap = new HashMap();
queryMap.put("status", status);
return DaoBase.getInstance().query(HGPZ002.QUERY, queryMap);
}
}
public static class HgPz003 {
/**
* 查询
*
* @param supType
* @return
*/
public static List<HGPZ003> list(Integer supType) {
if (supType == null) {
return null;
}
Map queryMap = new HashMap();
queryMap.put("status", 1);
queryMap.put("supType", supType);
return DaoBase.getInstance().query(HGPZ003.QUERY, queryMap);
}
}
/** /**
* 仓库管理 * 仓库管理
* HPPZ007 公共DAO定义 * HPPZ007 公共DAO定义
...@@ -391,20 +435,21 @@ public class HGPZTools { ...@@ -391,20 +435,21 @@ public class HGPZTools {
} }
} }
public static class HgPz005A{ public static class HgPz005A {
/** /**
* 通过存货编码查询存货工序* * 通过存货编码查询存货工序*
*
* @param inventCode * @param inventCode
* @return * @return
*/ */
public static List<HGPZ005A> queryByInventCode(String inventCode){ public static List<HGPZ005A> queryByInventCode(String inventCode) {
AssertUtils.isEmpty(inventCode, "存货编码不能为空!"); AssertUtils.isEmpty(inventCode, "存货编码不能为空!");
Map paramMap = new HashMap(); Map paramMap = new HashMap();
paramMap.put(HGPZ005A.FIELD_INVENT_CODE, inventCode); paramMap.put(HGPZ005A.FIELD_INVENT_CODE, inventCode);
List<HGPZ005A> results = DaoBase.getInstance().query(HGPZ005A.QUERY, paramMap); List<HGPZ005A> results = DaoBase.getInstance().query(HGPZ005A.QUERY, paramMap);
return CollectionUtils.isEmpty(results) ? null : results; return CollectionUtils.isEmpty(results) ? null : results;
} }
} }
} }
...@@ -211,5 +211,17 @@ public class ServiceHGSC001 extends ServiceBase { ...@@ -211,5 +211,17 @@ public class ServiceHGSC001 extends ServiceBase {
return inInfo; return inInfo;
} }
/**
* 项目下拉
* @param inInfo
* @return
*/
public EiInfo projectComboBox(EiInfo inInfo){
CommonMethod.comboBoxDefaultValue(inInfo,DdynamicEnum.PROJECT_CODE_BOX_BLOCK_ID.getBlockId(),"projCode","projCode");
return inInfo;
}
} }
...@@ -381,4 +381,11 @@ ...@@ -381,4 +381,11 @@
</isNotEmpty> </isNotEmpty>
ORDER BY PROJ_CODE ORDER BY PROJ_CODE
</select> </select>
<select id="queryProjectCodeBox" parameterClass="java.util.HashMap" resultClass="java.util.HashMap">
SELECT distinct
proj_code as "projCode", <!-- 项目编码 -->
CONCAT(proj_code,"-",proj_name) as "projName" <!-- 项目名称 -->
FROM ${hggpSchema}.HGSC001 WHERE approval_status = 2
<include refid="condition" />
</select>
</sqlMap> </sqlMap>
...@@ -300,6 +300,18 @@ public class HGXSTools { ...@@ -300,6 +300,18 @@ public class HGXSTools {
List<Org> results = DaoBase.getInstance().query(HGSqlConstant.HgXsOrg.QUERY_PARENT, queryMap); List<Org> results = DaoBase.getInstance().query(HGSqlConstant.HgXsOrg.QUERY_PARENT, queryMap);
return CollectionUtils.isEmpty(results) ? null : results.get(results.size() - 1); return CollectionUtils.isEmpty(results) ? null : results.get(results.size() - 1);
} }
/**
* 查询所有公司
*
* @return
*/
public static List<Org> queryCompanyAll() {
Map queryMap = new HashMap();
queryMap.put("orgType", OrgTypeEnum.COMPANY.getCode());
List<Org> results = DaoBase.getInstance().query(HGSqlConstant.HgXsOrg.QUERY_PARENT, queryMap);
return CollectionUtils.isEmpty(results) ? null : results;
}
/** /**
* 查询所属厂区 * 查询所属厂区
......
...@@ -32,6 +32,11 @@ ...@@ -32,6 +32,11 @@
<sqlMap resource="com/baosight/hggp/hg/sc/sql/HGSC005A.xml"/> <sqlMap resource="com/baosight/hggp/hg/sc/sql/HGSC005A.xml"/>
<!-- 財務 -->
<sqlMap resource="com/baosight/hggp/hg/cw/sql/HGCW001.xml"/>
<sqlMap resource="com/baosight/hggp/hg/cw/sql/HGCW002.xml"/>
<sqlMap resource="com/baosight/hggp/hg/cw/sql/HGCW003.xml"/>
<!--配置--> <!--配置-->
<sqlMap resource="com/baosight/hggp/hg/pz/sql/HGPZ005A.xml"/> <sqlMap resource="com/baosight/hggp/hg/pz/sql/HGPZ005A.xml"/>
......
...@@ -51,4 +51,4 @@ ...@@ -51,4 +51,4 @@
<script> <script>
var ctx = "${ctx}"; var ctx = "${ctx}";
</script> </script>
<script src="${ctx}/HP/PZ/HGCW001.js"></script> <script src="${ctx}/HG/CW/HGCW001.js"></script>
\ No newline at end of file \ No newline at end of file
$(function() { $(function() {
// 查询 // 查询
...@@ -11,7 +12,16 @@ $(function() { ...@@ -11,7 +12,16 @@ $(function() {
pageSize: 20, pageSize: 20,
pageSizes: [10,20,30,50,100,200], pageSizes: [10,20,30,50,100,200],
}, },
columns: [ columns: [{
field: "operator",
template: function (item) {
let template = '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'href="' + contractDetailFunc(item.id) + '" target="_blank">合同详情</a>';
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'href="' + fileDetailFunc(item.id) + '" target="_blank">附件详情</a>';
return template;
}
}
], ],
loadComplete: function (e) { loadComplete: function (e) {
$("#BTN_INSERT").on("click",addFunc); $("#BTN_INSERT").on("click",addFunc);
...@@ -56,14 +66,31 @@ let query = function () { ...@@ -56,14 +66,31 @@ let query = function () {
* 新增 * 新增
*/ */
function addFunc() { function addFunc() {
console.log("新增"); JSColorbox.open({
href: "HGCW002A?methodName=initLoad&efParentFormEname=HGCW002",
title: "<div style='text-align: center;'>新增合同</div>",
width: "90%",
height: "90%",
callbackName: windowCallback
});
} }
/** /**
* 修改 * 修改
*/ */
function updateFunc() { function updateFunc() {
console.log("修改"); let rows = resultGrid.getCheckedRows();
if (rows.length != 1) {
message("请选择一条数据");
return;
}
JSColorbox.open({
href: "HGCW002B?methodName=initLoad&id=" + rows[0].id + "&efParentFormEname=HGCW002",
title: "<div style='text-align: center;'>修改合同</div>",
width: "90%",
height: "90%",
callbackName: windowCallback
});
} }
/** /**
* 删除 * 删除
...@@ -92,4 +119,18 @@ function deleteFunc() { ...@@ -92,4 +119,18 @@ function deleteFunc() {
} }
} }
function windowCallback() {
// 刷新列表
resultGrid.dataSource.page(1);
// 关闭弹窗
JSColorbox.close();
}
function contractDetailFunc(id) {
return "";
}
function fileDetailFunc(id) {
return "";
}
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,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="200" align="center"/>
<EF:EFColumn ename="companyName" cname="所属公司" align="center" enable="false"/> <EF:EFColumn ename="companyName" cname="所属公司" align="center" enable="false"/>
<EF:EFColumn ename="projCode" cname="项目编号" align="center" enable="false"/> <EF:EFColumn ename="projCode" cname="项目编号" align="center" enable="false"/>
<EF:EFColumn ename="projName" cname="项目名称" align="center" enable="false"/> <EF:EFColumn ename="projName" cname="项目名称" align="center" enable="false"/>
...@@ -90,4 +90,4 @@ ...@@ -90,4 +90,4 @@
<script> <script>
var ctx = "${ctx}"; var ctx = "${ctx}";
</script> </script>
<script src="${ctx}/HP/PZ/HGCW002.js"></script> <script src="${ctx}/HG/CW/HGCW002.js"></script>
\ No newline at end of file \ No newline at end of file
$(function() {
$("#cancel").on("click", function () {
cancelFunc();
});
$("#btn_save").on("click", function () {
btnSaveFunc();
});
IPLATUI.EFGrid.detail1 = {
pageable: {
pageSize: 20,
pageSizes: [10,20,30,50,100,200],
},
columns: [
],
loadComplete: function (grid) {
grid.dataSource.bind("change", function(e) {
if (e.field == "unitPriceExcludingTax") {
var tr,index;
// 获取此model元素信息
var item = e.items[0];
// 计算总金额
var taxPoints = $("#result-0-taxPoints").val() ? $("#result-0-taxPoints").val() / 100 : 0;
var totalPriceExcluding = item.provisionalQuantity * item.unitPriceExcludingTax;
var totalPriceIncluding = totalPriceExcluding * (1 + parseFloat(taxPoints));
detail1Grid.setCellValue(item, 'totalPriceExcluding', totalPriceExcluding);
detail1Grid.setCellValue(item, 'totalPriceIncluding', totalPriceIncluding);
console.log(grid.dataSource._data);
console.log(detail1Grid.getDataItems());
var allRows = detail1Grid.getDataItems();
var totalPriceExcluding = 0;
var totalPriceIncluding = 0;
var valueAddedTax = 0;
allRows.forEach(function (row, index) {
totalPriceExcluding += parseFloat(row.totalPriceExcluding);
totalPriceIncluding += parseFloat(row.totalPriceIncluding);
});
valueAddedTax = parseFloat(totalPriceIncluding) - parseFloat(totalPriceExcluding);
$("#result-0-totalContractPriceExcluding").val(totalPriceExcluding.toFixed(3))
$("#result-0-totalContractPriceIncluding").val(totalPriceIncluding.toFixed(3))
$("#result-0-valueAddedTax").val(valueAddedTax.toFixed(3))
}
});
},
onSave: function (e) {
// 阻止默认请求,使用自定义保存
e.preventDefault();
saveResult1Func();
},
onDelete: function (e) {
// 阻止默认请求,使用自定义删除
e.preventDefault();
deleteResult1Func();
},
}
$("#UPLOAD_FILE").on("click", function () {
uploadFileFunc();
});
$("#DELETE_FILE").on("click", function () {
deleteFileFunc();
});
IPLATUI.EFGrid.detail2 = {
pageable: {
pageSize: 20,
pageSizes: [10,20,30,50,100,200],
},
columns: [
]
}
/**
* 下拉框事件
* @type {{"result-0-contractType": {select: IPLATUI.EFSelect.result-0-contractType.select}, projCodeBox: {select: IPLATUI.EFSelect.projCodeBox.select}}}
*/
IPLATUI.EFSelect = {
"projCodeBox": {
// 点击下拉选项时触发
select: function (e) { //获取勾选值
var dataItem = e.dataItem;
console.log(dataItem)
var valueField = dataItem['valueField'];
var textField = "";
if (valueField) {
textField = dataItem['textField'].split("-")[1];
$("#result-0-projCode").val(valueField);
$("#result-0-projName").val(textField);
} else {
$("#result-0-projName").val(textField);
}
}
},
"result-0-contractType": {
/**
* 销售合同和补充协议合同类别为收入,其余的为支出
* @param e
*/
select: function (e) {
var dataItem = e.dataItem;
console.log(dataItem)
var valueField = dataItem['valueField'];
if (valueField == "1" || valueField == "3") {
$("#result-0-contractCategory").val("1");
$("#contractCategoryName").val("收入");
} else if (valueField == "2" || valueField == "4"){
$("#result-0-contractCategory").val("2");
$("#contractCategoryName").val("支出");
} else {
$("#result-0-contractCategory").val("");
}
//清除甲乙方
IPLAT.EFPopupInput.clear(("#popupInputPartyA"), true)
IPLAT.EFPopupInput.clear(("#popupInputPartyB"), true)
$("#result-0-partyA").val("");
$("#result-0-partyB").val("");
}
}
}
IPLATUI.EFPopupInput = {
"popupInputPartyA": {
/**
* EFGrid 查询时触发的事件,通常在此处,设置查询条件
* 注意: 必须返回一个EiInfo,作为初始查询条件
* 配置了query时,默认每次打开窗口都会进行一次查询
*/
query: function (e) {
console.log("Step" + (++i) + ": ----query----");
// 将自定义div中的字段构造成查询条件 EiInfo
// var queryInfo = EiInfo.build("#result-0-contractCategory");
var contractCategory = $("#result-0-contractCategory").val();
if (!contractCategory) {
message("请先选择合同类型!");
// 阻止弹窗
e.preventDefault();
}
var info = new EiInfo();
info.set("contractCategory",contractCategory)
return info;
},
/**
* grid中的数据回填时触发的事件
* @param e 回填数据事件
* e.sender 弹出窗口对象
* e.grid 弹出的grid对象
* e.model 选中的数据行model
*/
backFill: function (e) {
console.log("Step" + (++i) + ": ----backFill----");
// 回填数据
var model = e.model;
// var data = model.toJSON();
console.log(model);
var partyA = model.usercode + "-" + model.username;
$("#result-0-partyA").val(partyA);
IPLAT.EFPopupInput.text( $("#popupInputPartyA") , partyA)
e.preventDefault(); // 不使用默认的回填逻辑
}
},
"popupInputPartyB": {
/**
* EFGrid 查询时触发的事件,通常在此处,设置查询条件
* 注意: 必须返回一个EiInfo,作为初始查询条件
* 配置了query时,默认每次打开窗口都会进行一次查询
*/
query: function (e) {
console.log("Step" + (++i) + ": ----query----");
// 将自定义div中的字段构造成查询条件 EiInfo
// var queryInfo = EiInfo.build("#result-0-contractCategory");
var contractCategory = $("#result-0-contractCategory").val();
if (!contractCategory) {
message("请先选择合同类型!");
// 阻止弹窗
e.preventDefault();
}
var info = new EiInfo();
info.set("contractCategory",contractCategory)
return info;
},
/**
* grid中的数据回填时触发的事件
* @param e 回填数据事件
* e.sender 弹出窗口对象
* e.grid 弹出的grid对象
* e.model 选中的数据行model
*/
backFill: function (e) {
console.log("Step" + (++i) + ": ----backFill----");
// 回填数据
var model = e.model;
// var data = model.toJSON();
console.log(model);
var partyB = model.usercode + "-" + model.username;
$("#result-0-partyB").val(partyB);
IPLAT.EFPopupInput.text( $("#popupInputPartyB") , partyB)
e.preventDefault(); // 不使用默认的回填逻辑
}
}
};
window.document.addEventListener("keyup",function (event) {
if(event.keyCode === 13){
var grid = $("#ef_grid_result").data("kendoGrid");
// 回填
//grid.addRows(returnRows);
grid.closeCell();
}
})
});
function saveResult1Func() {
}
function uploadFileFunc() {
JSColorbox.open({
href: "HGCW099?methodName=initLoad&inqu_status-0-bizType=HT",
title: "<div style='text-align: center;'>附件上传</div>",
width: "60%",
height: "50%",
callbackName: uploadFileCallback
});
}
/**
* 附件上传回调
*
* @param docId
*/
function uploadFileCallback(data) {
let inEiInfo = new EiInfo();
inEiInfo.set("result-0-docId", data.docId);
inEiInfo.set("result-0-bizType", data.bizType);
EiCommunicator.send('HGCW999', 'insert', inEiInfo, {
onSuccess(response) {
if (response.status === 0) {
EiCommunicator.send('HGCW999', 'queryDoc', inEiInfo, {
onSuccess(e) {
console.log(e);
if (e.status === 0) {
let data = e.extAttr.data;
detail2Grid.dataSource.insert();
detail2Grid.setCellValue(0, "rowNo", 0);
detail2Grid.setCellValue(0, "id", data.id);
detail2Grid.setCellValue(0, "docId", data.docId);
detail2Grid.setCellValue(0, "docName", data.docName);
detail2Grid.setCellValue(0, "createdTime", data.createdTime);
detail2Grid.refresh();
} else {
NotificationUtil("执行失败!", "error");
}
},
onFail(errorMessage, status, e) {
NotificationUtil("执行失败!", "error");
}
}, {
async: false
});
} else {
NotificationUtil("执行失败!", "error");
}
},
onFail(errorMessage, status, e) {
NotificationUtil("执行失败!", "error");
}
}, {
async: false
});
}
function cancelFunc() {
// 关闭弹窗
parent.JSColorbox.setValueCallback();
}
function btnSaveFunc() {
JSUtils.confirm("确定对数据做\"保存\"操作? ", {
ok: function () {
JSUtils.submitGrid("detail1,detail2", "HGCW002", "save", {isAlldata:true,onSuccessCallback:parent.windowCallback});
}
});
}
function deleteFileFunc() {
let rows = detail2Grid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
rows.forEach(function (row) {
detail2Grid.removeRows([rows.rowNo]);// 刷新行号
})
refreshRowNo();
}
function deleteResult1Func() {
let rows = detail1Grid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
rows.forEach(function (row) {
detail1Grid.removeRows([rows.rowNo]);// 刷新行号
})
refreshRowNo();
}
let refreshRowNo = function () {
let allRows = detail1Grid.getDataItems();
for (let i = 0; i < allRows.length; i++) {
detail1Grid.setCellValue(i, "rowNo", i);
detail1Grid.refresh();
}
}
$(window).load(function () {
refreshRowNo();
});
...@@ -9,82 +9,139 @@ ...@@ -9,82 +9,139 @@
<EF:EFPage title="新增合同"> <EF:EFPage title="新增合同">
<EF:EFRegion id="inqu1" title="基本信息"> <EF:EFRegion id="inqu1" title="基本信息">
<div class="row"> <div class="row">
<EF:EFInput ename="detail-0-projCode" cname="项目编号" colWidth="4" required="true" /> <EF:EFSelect cname="项目编号" ename="projCodeBox" colWidth="4" required="true" filter="contains">
<EF:EFInput ename="detail-0-projName" cname="项目简称" colWidth="4" /> <EF:EFOption label="-- 请选择 --" value="" />
<EF:EFInput ename="detail-0-prodOrderNo" cname="合同号" colWidth="4" readonly="true" /> <EF:EFOptions
blockId="projectCodeBox_block_id" valueField="valueField" textField="textField"/>
</EF:EFSelect>
<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-contractNumber" cname="合同号" colWidth="4" readonly="true" />
</div> </div>
<div class="row"> <div class="row">
<EF:EFInput ename="detail-0-prdtName" cname="合同名称*" colWidth="4" /> <EF:EFInput ename="result-0-contractName" cname="合同名称" colWidth="4" required="true"/>
<EF:EFInput ename="detail-0-partName" cname="合同类型*" colWidth="4" /> <EF:EFSelect cname="合同类型" ename="result-0-contractType" colWidth="4" filter="contains" required="true">
<EF:EFInput ename="detail-0-deliveryDate" cname="合同类别*" colWidth="4" /> <EF:EFOption label="-- 请选择 --" value=""/>
<EF:EFCodeOption codeName="hggp.cw.contractType"/>
</EF:EFSelect>
<EF:EFInput ename="result-0-contractCategory" cname="合同类别" type="hidden"/>
<EF:EFInput ename="contractCategoryName" cname="合同类别" colWidth="4" readonly="true"/>
<%-- <EF:EFSelect cname="合同类别" ename="result-0-contractCategory" colWidth="4" filter="contains" readonly="true" required="true">--%>
<%-- <EF:EFOption label="-- 请选择 --" value=""/>--%>
<%-- <EF:EFCodeOption codeName="hggp.cw.contractCategory"/>--%>
<%-- </EF:EFSelect>--%>
</div> </div>
<div class="row"> <div class="row">
<EF:EFInput ename="detail-0-planCompletionDate" cname="甲方*名称" colWidth="4" /> <EF:EFPopupInput ename="popupInputPartyA" cname="甲方名称" colWidth="4"
<EF:EFInput ename="detail-0-num" cname="乙方名称" colWidth="4" /> serviceName="HGCW002A" methodName="partyAQuery"
<EF:EFInput ename="detail-0-totalWt" cname="丙方" colWidth="4" /> resultId="partyAResult"
required="true" save="false" popupType="ServiceGrid"
valueField="username" textField="username"
columnEnames="username,usercode"
columnCnames="名称,编码"
readonly="true"
resizable="true" popupTitle="甲方名称" popupWidth="400">
</EF:EFPopupInput>
<EF:EFInput ename="result-0-partyA" cname="甲方名称" type="hidden" />
<EF:EFPopupInput ename="popupInputPartyB" cname="乙方名称" colWidth="4"
serviceName="HGCW002A" methodName="partyBQuery"
resultId="partyAResult"
save="false" popupType="ServiceGrid"
valueField="username" textField="username"
columnEnames="username,usercode"
columnCnames="名称,编码"
readonly="true"
resizable="true" popupTitle="乙方名称" popupWidth="400">
</EF:EFPopupInput>
<EF:EFInput ename="result-0-partyB" cname="乙方名称" type="hidden"/>
<EF:EFInput ename="result-0-partyC" cname="丙方" colWidth="4" />
</div> </div>
<div class="row"> <div class="row">
<EF:EFInput ename="detail-0-assignedNum" cname="计划开工日期*" colWidth="4" /> <EF:EFDateSpan startCname="计划开工/竣工日期" endCname="至" required="true" colWidth="8" blockId="result"
<EF:EFInput ename="detail-0-unassignedNum" cname="计划竣工日期*" colWidth="4" /> startName="planStartDate" endName="planEndDate" row="0" role="date"
<EF:EFInput ename="detail-0-unassignedNum" cname="合同状态" colWidth="4" /> format="yyyy-MM-dd" ratio="4:4" satrtRatio="4:8" endRatio="4:8">
</EF:EFDateSpan>
<EF:EFSelect cname="合同状态" ename="result-0-contractStatus" colWidth="4" filter="contains">
<EF:EFOption label="-- 请选择 --" value=""/>
<EF:EFCodeOption codeName="hggp.cw.contractStatus"/>
</EF:EFSelect>
</div> </div>
<div class="row"> <div class="row">
<EF:EFInput ename="detail-0-assignedNum" cname="甲方联系人姓名" colWidth="4" /> <EF:EFInput ename="result-0-partyAName" cname="甲方联系人姓名" colWidth="4" />
<EF:EFInput ename="detail-0-unassignedNum" cname="甲方联系人电话" colWidth="4" /> <EF:EFInput ename="result-0-partyAPhoneNumber" cname="甲方联系人电话" colWidth="4" />
<EF:EFInput ename="detail-0-unassignedNum" cname="已方联系人姓名" colWidth="4" /> <EF:EFInput ename="result-0-alreadyName" cname="已方联系人姓名" colWidth="4" />
</div> </div>
<div class="row"> <div class="row">
<EF:EFInput ename="detail-0-assignedNum" cname="已方联系人电话" colWidth="4" /> <EF:EFInput ename="result-0-alreadyPhoneNumber" cname="已方联系人电话" colWidth="4" />
<EF:EFInput ename="detail-0-unassignedNum" cname="工程地址*" colWidth="8" /> <EF:EFInput ename="result-0-engineeringAddress" cname="工程地址" colWidth="8" ratio="2:10" required="true"/>
</div> </div>
<div class="row"> <div class="row">
<EF:EFInput ename="detail-0-assignedNum" cname="签约日期" colWidth="4" /> <EF:EFDatePicker cname="签约日期" ename="result-0-signingDate" colWidth="4"
<EF:EFInput ename="detail-0-unassignedNum" cname="主合同号" colWidth="4" /> format="yyyy-MM-dd" parseFormats="['yyyyMMdd']"/>
<EF:EFInput ename="result-0-mainContractNumber" cname="主合同号" colWidth="8" ratio="2:10"/>
</div> </div>
<div class="row"> <div class="row">
<EF:EFTExtarea ename="detail-0-assignedNum" cname="合同内容*" colWidth="12" /> <EF:EFInput type="textarea" ename="result-0-contractContent" cname="合同内容" colWidth="8" ratio="2:10" required="true"/>
</div> </div>
</EF:EFRegion> </EF:EFRegion>
<EF:EFRegion id="inqu2" title="承包方式及合同价款"> <EF:EFRegion id="inqu2" title="承包方式及合同价款">
<div class="row"> <div class="row">
<EF:EFInput ename="detail-0-projCode" cname="承包方式" colWidth="4" /> <EF:EFInput ename="result-0-contractingMethod" cname="承包方式" colWidth="4" />
<EF:EFInput ename="detail-0-projName" cname="付款方式" colWidth="4" /> <EF:EFSelect cname="付款方式" ename="result-0-paymentMethod" colWidth="4" filter="contains">
<EF:EFInput ename="detail-0-prodOrderNo" cname="计价方式" colWidth="4" /> <EF:EFOption label="-- 请选择 --" value=""/>
<EF:EFCodeOption codeName="hggp.cw.paymentMethod"/>
</EF:EFSelect>
<EF:EFSelect cname="计价方式" ename="result-0-pricingMethod" colWidth="4" filter="contains">
<EF:EFOption label="-- 请选择 --" value=""/>
<EF:EFCodeOption codeName="hggp.cw.pricingMethod"/>
</EF:EFSelect>
</div> </div>
<div class="row"> <div class="row">
<EF:EFInput ename="detail-0-prdtName" cname="税点" colWidth="4" /> <EF:EFSelect cname="税点" ename="result-0-taxPoints" colWidth="4" filter="contains">
<EF:EFInput ename="detail-0-partName" cname="合同总价(不含税)" colWidth="4" /> <EF:EFOption label="-- 请选择 --" value=""/>
<EF:EFInput ename="detail-0-deliveryDate" cname="增值税" colWidth="4" /> <EF:EFCodeOption codeName="hggp.cw.taxPoints"/>
</EF:EFSelect>
<EF:EFInput ename="result-0-totalContractPriceExcluding" cname="合同总价(不含税)" colWidth="4" readonly="true"/>
<EF:EFInput ename="result-0-valueAddedTax" cname="增值税" colWidth="4" readonly="true"/>
</div> </div>
<div class="row"> <div class="row">
<EF:EFInput ename="detail-0-planCompletionDate" cname="合同总价(含税)" colWidth="4" /> <EF:EFInput ename="result-0-totalContractPriceIncluding" cname="合同总价(含税)" colWidth="4" readonly="true"/>
</div> </div>
</EF:EFRegion> </EF:EFRegion>
<EF:EFRegion id="result1" title="合同清单"> <EF:EFRegion id="detail1" title="合同清单">
<EF:EFGrid blockId="result1" autoDraw="override" checkMode="row" isFloat="true"> <EF:EFGrid blockId="detail1" autoDraw="override" checkMode="row" isFloat="true">
<EF:EFColumn ename="rowNo" cname="行号" hidden="true"/>
<EF:EFColumn ename="orgName" cname="清单" enable="false" align="center" hidden="true"/> <EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="orgName" cname="单位" enable="false" align="center" hidden="true"/> <EF:EFColumn ename="inventory" cname="清单" align="center" />
<EF:EFColumn ename="orgName" cname="暂定工程量" enable="false" align="center" hidden="true"/> <EF:EFColumn ename="unit" cname="单位" align="center" />
<EF:EFColumn ename="orgName" cname="计量方式" enable="false" align="center" hidden="true"/> <EF:EFColumn ename="provisionalQuantity" cname="暂定工程量" format="{0:N3}" align="center"/>
<EF:EFColumn ename="orgName" cname="材料供应方式" enable="false" align="center" hidden="true"/> <EF:EFColumn ename="measurementMethod" cname="计量方式" align="center" />
<EF:EFColumn ename="totalWt" cname="除税单价/元" enable="false" format="{0:N3}"/> <EF:EFColumn ename="supplyMethod" cname="材料供应方式" align="center"/>
<EF:EFColumn ename="totalWt" cname="不含税总价" enable="false" format="{0:N3}"/> <EF:EFColumn ename="unitPriceExcludingTax" cname="除税单价/元" format="{0:N3}" align="center"/>
<EF:EFColumn ename="totalWt" cname="含税总价" enable="false" format="{0:N3}"/> <EF:EFColumn ename="totalPriceExcluding" cname="不含税总价" enable="false" format="{0:N3}" align="center"/>
<EF:EFColumn ename="totalWt" cname="其中人工费、元" enable="false" format="{0:N3}"/> <EF:EFColumn ename="totalPriceIncluding" cname="含税总价" enable="false" format="{0:N3}" align="center"/>
<EF:EFColumn ename="laborCosts" cname="其中人工费、元" format="{0:N3}" align="center"/>
</EF:EFGrid> </EF:EFGrid>
</EF:EFRegion> </EF:EFRegion>
<EF:EFRegion id="result2" title="附件信息"> <EF:EFRegion id="detail2" title="附件信息">
<EF:EFGrid blockId="result1" autoDraw="override" checkMode="row" isFloat="true"> <EF:EFGrid blockId="detail2" autoDraw="override" checkMode="row" isFloat="true">
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="100" align="center"/> <EF:EFColumn ename="rowNo" cname="行号" hidden="true"/>
<EF:EFColumn ename="docName" cname="附件类别" enable="false" width="150"/> <EF:EFColumn ename="id" cname="ID" hidden="true"/>
<EF:EFColumn ename="docName" cname="附件名称" enable="false" width="150"/> <EF:EFColumn ename="docId" cname="文件ID" enable="false" width="150"/>
<EF:EFColumn ename="docName" cname="文件名称" enable="false" width="150"/>
<EF:EFColumn ename="createdTime" cname="创建时间" enable="false" width="140" align="center"
parseFormats="['yyyyMMddHHmmss']" editType="datetime" dateFormat="yyyy-MM-dd HH:mm:ss"/>
</EF:EFGrid> </EF:EFGrid>
</EF:EFRegion> </EF:EFRegion>
<div class="row" style="display:flex;justify-content:center;">
<EF:EFButton ename="cancel" cname="取消" type="button" class="btn-center"/>
<EF:EFButton ename="btn_save" cname="保存" type="button" class="btn-center"/>
</div>
</EF:EFPage> </EF:EFPage>
<script> <script>
var ctx = "${ctx}"; var ctx = "${ctx}";
</script> </script>
<script src="${ctx}/HP/PZ/HGCW002A.js"></script> <script src="${ctx}/HG/CW/HGCW002A.js"></script>
\ No newline at end of file \ No newline at end of file
$(function() {
$("#cancel").on("click", function () {
cancelFunc();
});
$("#btn_save").on("click", function () {
btnSaveFunc();
});
IPLATUI.EFGrid.detail1 = {
pageable: {
pageSize: 20,
pageSizes: [10,20,30,50,100,200],
},
columns: [
],
loadComplete: function (grid) {
grid.dataSource.bind("change", function(e) {
if (e.field == "unitPriceExcludingTax") {
var tr,index;
// 获取此model元素信息
var item = e.items[0];
// 计算总金额
var taxPoints = $("#result-0-taxPoints").val() ? $("#result-0-taxPoints").val() / 100 : 0;
var totalPriceExcluding = item.provisionalQuantity * item.unitPriceExcludingTax;
var totalPriceIncluding = totalPriceExcluding * (1 + parseFloat(taxPoints));
detail1Grid.setCellValue(item, 'totalPriceExcluding', totalPriceExcluding);
detail1Grid.setCellValue(item, 'totalPriceIncluding', totalPriceIncluding);
calculateAmount();
}
});
setTimeout(function() {
initDate();
}, 1000);
},
onAdd: function (e) {
var contractNumber = $("#result-0-contractNumber").val();
$.each(e.items, function (index, item) {
item['contractNumber'] = contractNumber;
});
},
onSave: function (e) {
// 阻止默认请求,使用自定义保存
e.preventDefault();
let btnNode = $(this);
//禁用按钮
btnNode.attr("disabled", true);
saveResult1Func(btnNode);
},
onDelete: function (e) {
// 阻止默认请求,使用自定义删除
e.preventDefault();
deleteResult1Func();
},
}
$("#UPLOAD_FILE").on("click", function () {
uploadFileFunc();
});
$("#DELETE_FILE").on("click", function () {
// let btnNode = $(this);
//禁用按钮
// btnNode.attr("disabled", true);
deleteFileFunc();
});
IPLATUI.EFGrid.detail2 = {
pageable: {
pageSize: 20,
pageSizes: [10,20,30,50,100,200],
},
columns: [
]
}
/**
* 下拉框事件
* @type {{"result-0-contractType": {select: IPLATUI.EFSelect.result-0-contractType.select}, projCodeBox: {select: IPLATUI.EFSelect.projCodeBox.select}}}
*/
IPLATUI.EFSelect = {
"projCodeBox": {
// 点击下拉选项时触发
select: function (e) { //获取勾选值
var dataItem = e.dataItem;
console.log(dataItem)
var valueField = dataItem['valueField'];
var textField = "";
if (valueField) {
textField = dataItem['textField'].split("-")[1];
$("#result-0-projCode").val(valueField);
$("#result-0-projName").val(textField);
} else {
$("#result-0-projName").val(textField);
}
}
},
"result-0-contractType": {
/**
* 销售合同和补充协议合同类别为收入,其余的为支出
* @param e
*/
select: function (e) {
var dataItem = e.dataItem;
console.log(dataItem)
var valueField = dataItem['valueField'];
if (valueField == "1" || valueField == "3") {
$("#result-0-contractCategory").val("1");
$("#contractCategoryName").val("收入");
} else if (valueField == "2" || valueField == "4"){
$("#result-0-contractCategory").val("2");
$("#contractCategoryName").val("支出");
} else {
$("#result-0-contractCategory").val("");
}
//清除甲乙方
IPLAT.EFPopupInput.clear(("#popupInputPartyA"), true)
IPLAT.EFPopupInput.clear(("#popupInputPartyB"), true)
$("#result-0-partyA").val("");
$("#result-0-partyB").val("");
}
}
}
IPLATUI.EFPopupInput = {
"popupInputPartyA": {
/**
* EFGrid 查询时触发的事件,通常在此处,设置查询条件
* 注意: 必须返回一个EiInfo,作为初始查询条件
* 配置了query时,默认每次打开窗口都会进行一次查询
*/
query: function (e) {
console.log("Step" + (++i) + ": ----query----");
// 将自定义div中的字段构造成查询条件 EiInfo
// var queryInfo = EiInfo.build("#result-0-contractCategory");
var contractCategory = $("#result-0-contractCategory").val();
if (!contractCategory) {
message("请先选择合同类型!");
// 阻止弹窗
e.preventDefault();
}
var info = new EiInfo();
info.set("contractCategory",contractCategory)
return info;
},
/**
* grid中的数据回填时触发的事件
* @param e 回填数据事件
* e.sender 弹出窗口对象
* e.grid 弹出的grid对象
* e.model 选中的数据行model
*/
backFill: function (e) {
console.log("Step" + (++i) + ": ----backFill----");
// 回填数据
var model = e.model;
// var data = model.toJSON();
console.log(model);
var partyA = model.usercode + "-" + model.username;
$("#result-0-partyA").val(partyA);
IPLAT.EFPopupInput.text( $("#popupInputPartyA") , partyA)
e.preventDefault(); // 不使用默认的回填逻辑
}
},
"popupInputPartyB": {
/**
* EFGrid 查询时触发的事件,通常在此处,设置查询条件
* 注意: 必须返回一个EiInfo,作为初始查询条件
* 配置了query时,默认每次打开窗口都会进行一次查询
*/
query: function (e) {
console.log("Step" + (++i) + ": ----query----");
// 将自定义div中的字段构造成查询条件 EiInfo
// var queryInfo = EiInfo.build("#result-0-contractCategory");
var contractCategory = $("#result-0-contractCategory").val();
if (!contractCategory) {
message("请先选择合同类型!");
// 阻止弹窗
e.preventDefault();
}
var info = new EiInfo();
info.set("contractCategory",contractCategory)
return info;
},
/**
* grid中的数据回填时触发的事件
* @param e 回填数据事件
* e.sender 弹出窗口对象
* e.grid 弹出的grid对象
* e.model 选中的数据行model
*/
backFill: function (e) {
console.log("Step" + (++i) + ": ----backFill----");
// 回填数据
var model = e.model;
// var data = model.toJSON();
console.log(model);
var partyB = model.usercode + "-" + model.username;
$("#result-0-partyB").val(partyB);
IPLAT.EFPopupInput.text( $("#popupInputPartyB") , partyB)
e.preventDefault(); // 不使用默认的回填逻辑
}
}
};
window.document.addEventListener("keyup",function (event) {
if(event.keyCode === 13){
var grid = $("#ef_grid_result").data("kendoGrid");
// 回填
//grid.addRows(returnRows);
grid.closeCell();
}
})
});
function initDate() {
var projCode = $("#result-0-projCode").val();
$("#projCodeBox").data("kendoDropDownList").value(projCode);
var contractCategory = $("#result-0-contractCategory").val()
if (contractCategory == "1" || contractCategory == "3") {
$("#contractCategoryName").val("收入");
} else if (contractCategory == "2" || contractCategory == "4"){
$("#contractCategoryName").val("支出");
} else {
$("#contractCategoryName").val("");
}
var partyA = $("#result-0-partyA").val();
var partyB = $("#result-0-partyB").val();
IPLAT.EFPopupInput.text( $("#popupInputPartyA") , partyA)
IPLAT.EFPopupInput.text( $("#popupInputPartyB") , partyB)
}
function saveResult1Func(btn) {
let rows = detail1Grid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"保存\"操作? ", {
ok: function () {
var info = new EiInfo();
info.addBlock(JSUtils.checkedRows2Block("detail1"));
EiCommunicator.send("HGCW003", "save", info, {
onSuccess: function (ei) {
if (ei.getStatus() >= 0) {
try {
NotificationUtil(response.msg);
} catch (e) {
// TODO: handle exception
}
if (IPLAT.isAvailable("detail1")) {
window['detail1Grid'].setEiInfo(ei);
}
if (ei.getStatus() == 0) {
NotificationUtil(ei, 'warning');
} else {
NotificationUtil(ei);
}
} else {
NotificationUtil(ei, "error");
}
},
onFail: function (ei) {
// 发生异常
NotificationUtil("操作失败,原因[" + ei + "]", "error");
}
});
//释放禁用按钮
btn.attr("disabled", false);
}
});
}
function uploadFileFunc() {
var id = $("#result-0-id").val();
JSColorbox.open({
href: "HGCW099?methodName=initLoad&inqu_status-0-bizType=HT&inqu_status-0-matId=" + id,
title: "<div style='text-align: center;'>附件上传</div>",
width: "60%",
height: "50%",
callbackName: uploadFileCallback
});
}
/**
* 附件上传回调
*
* @param docId
*/
function uploadFileCallback(data) {
debugger;
console.log("uploadFileCallback")
let inEiInfo = new EiInfo();
inEiInfo.set("result-0-matId", data.matId);
inEiInfo.set("result-0-docId", data.docId);
inEiInfo.set("result-0-bizType", data.bizType);
EiCommunicator.send('HGCW999', 'insert', inEiInfo, {
onSuccess(ei) {
if (ei.status === 0) {
try {
NotificationUtil(ei.msg);
} catch (e) {
// TODO: handle exception
}
if (IPLAT.isAvailable("detail2")) {
window['detail2Grid'].setEiInfo(ei);
}
if (ei.getStatus() == 0) {
NotificationUtil(ei, 'warning');
} else {
NotificationUtil(ei);
}
} else {
NotificationUtil("执行失败!", "error");
}
},
onFail(errorMessage, status, e) {
NotificationUtil("执行失败!", "error");
}
}, {
async: false
});
}
function cancelFunc() {
// 关闭弹窗
parent.JSColorbox.setValueCallback();
}
function btnSaveFunc() {
JSUtils.confirm("确定对数据做\"保存\"操作? ", {
ok: function () {
JSUtils.submitGrid("result", "HGCW002", "save", {isAlldata:true,onSuccessCallback:parent.windowCallback});
}
});
}
function deleteFileFunc() {
let rows = detail2Grid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"删除\"操作? ", {
ok: function () {
var info = new EiInfo();
info.addBlock(JSUtils.checkedRows2Block("detail2"));
EiCommunicator.send("HGCW999", "delete", info, {
onSuccess: function (ei) {
if (ei.getStatus() >= 0) {
try {
NotificationUtil(ei.msg);
} catch (e) {
// TODO: handle exception
}
if (IPLAT.isAvailable("detail2")) {
window['detail2Grid'].setEiInfo(ei);
}
if (ei.getStatus() == 0) {
NotificationUtil(ei, 'warning');
} else {
NotificationUtil(ei);
}
} else {
NotificationUtil(ei, "error");
}
},
onFail: function (ei) {
// 发生异常
NotificationUtil("操作失败,原因[" + ei + "]", "error");
}
});
//释放禁用按钮
// btn.attr("disabled", false);
}
});
}
function deleteResult1Func() {
let rows = detail1Grid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"删除1\"操作? ", {
ok: function () {
var info = new EiInfo();
info.addBlock(JSUtils.checkedRows2Block("detail1"));
EiCommunicator.send("HGCW003", "delete", info, {
onSuccess: function (ei) {
if (ei.getStatus() >= 0) {
try {
NotificationUtil(response.msg);
} catch (e) {
// TODO: handle exception
}
if (IPLAT.isAvailable("detail1")) {
window['detail1Grid'].setEiInfo(ei);
calculateAmount();
}
if (ei.getStatus() == 0) {
NotificationUtil(ei, 'warning');
} else {
NotificationUtil(ei);
}
} else {
NotificationUtil(ei, "error");
}
},
onFail: function (ei) {
// 发生异常
NotificationUtil("操作失败,原因[" + ei + "]", "error");
}
});
}
});
}
function calculateAmount() {
var allRows = detail1Grid.getDataItems();
var totalPriceExcluding = 0;
var totalPriceIncluding = 0;
var valueAddedTax = 0;
allRows.forEach(function (row, index) {
totalPriceExcluding += parseFloat(row.totalPriceExcluding);
totalPriceIncluding += parseFloat(row.totalPriceIncluding);
});
valueAddedTax = parseFloat(totalPriceIncluding) - parseFloat(totalPriceExcluding);
$("#result-0-totalContractPriceExcluding").val(totalPriceExcluding.toFixed(3))
$("#result-0-totalContractPriceIncluding").val(totalPriceIncluding.toFixed(3))
$("#result-0-valueAddedTax").val(valueAddedTax.toFixed(3))
}
<!DOCTYPE html>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<head>
</head>
<EF:EFPage title="修改合同">
<EF:EFRegion id="inqu1" title="基本信息">
<div class="row">
<EF:EFInput ename="result-0-id" cname="id" type="hidden"/>
<EF:EFSelect cname="项目编号" ename="projCodeBox" colWidth="4" required="true" filter="contains">
<EF:EFOption label="-- 请选择 --" value="" />
<EF:EFOptions
blockId="projectCodeBox_block_id" valueField="valueField" textField="textField"/>
</EF:EFSelect>
<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-contractNumber" cname="合同号" colWidth="4" readonly="true" />
</div>
<div class="row">
<EF:EFInput ename="result-0-contractName" cname="合同名称" colWidth="4" required="true"/>
<EF:EFSelect cname="合同类型" ename="result-0-contractType" colWidth="4" filter="contains" required="true">
<EF:EFOption label="-- 请选择 --" value=""/>
<EF:EFCodeOption codeName="hggp.cw.contractType"/>
</EF:EFSelect>
<EF:EFInput ename="result-0-contractCategory" cname="合同类别" type="hidden"/>
<EF:EFInput ename="contractCategoryName" cname="合同类别" colWidth="4" readonly="true"/>
<%-- <EF:EFSelect cname="合同类别" ename="result-0-contractCategory" colWidth="4" filter="contains" readonly="true" required="true">--%>
<%-- <EF:EFOption label="-- 请选择 --" value=""/>--%>
<%-- <EF:EFCodeOption codeName="hggp.cw.contractCategory"/>--%>
<%-- </EF:EFSelect>--%>
</div>
<div class="row">
<EF:EFPopupInput ename="popupInputPartyA" cname="甲方名称" colWidth="4"
serviceName="HGCW002A" methodName="partyAQuery"
resultId="partyAResult"
required="true" save="false" popupType="ServiceGrid"
valueField="username" textField="username"
columnEnames="username,usercode"
columnCnames="名称,编码"
readonly="true"
resizable="true" popupTitle="甲方名称" popupWidth="400">
</EF:EFPopupInput>
<EF:EFInput ename="result-0-partyA" cname="甲方名称" type="hidden" />
<EF:EFPopupInput ename="popupInputPartyB" cname="乙方名称" colWidth="4"
serviceName="HGCW002A" methodName="partyBQuery"
resultId="partyAResult"
save="false" popupType="ServiceGrid"
valueField="username" textField="username"
columnEnames="username,usercode"
columnCnames="名称,编码"
readonly="true"
resizable="true" popupTitle="乙方名称" popupWidth="400">
</EF:EFPopupInput>
<EF:EFInput ename="result-0-partyB" cname="乙方名称" type="hidden"/>
<EF:EFInput ename="result-0-partyC" cname="丙方" colWidth="4" />
</div>
<div class="row">
<EF:EFDateSpan startCname="计划开工/竣工日期" endCname="至" required="true" colWidth="8" blockId="result"
startName="planStartDate" endName="planEndDate" row="0" role="date"
format="yyyy-MM-dd" ratio="4:4" satrtRatio="4:8" endRatio="4:8">
</EF:EFDateSpan>
<EF:EFSelect cname="合同状态" ename="result-0-contractStatus" colWidth="4" filter="contains">
<EF:EFOption label="-- 请选择 --" value=""/>
<EF:EFCodeOption codeName="hggp.cw.contractStatus"/>
</EF:EFSelect>
</div>
<div class="row">
<EF:EFInput ename="result-0-partyAName" cname="甲方联系人姓名" colWidth="4" />
<EF:EFInput ename="result-0-partyAPhoneNumber" cname="甲方联系人电话" colWidth="4" />
<EF:EFInput ename="result-0-alreadyName" cname="已方联系人姓名" colWidth="4" />
</div>
<div class="row">
<EF:EFInput ename="result-0-alreadyPhoneNumber" cname="已方联系人电话" colWidth="4" />
<EF:EFInput ename="result-0-engineeringAddress" cname="工程地址" colWidth="8" ratio="2:10" required="true"/>
</div>
<div class="row">
<EF:EFDatePicker cname="签约日期" ename="result-0-signingDate" colWidth="4"
format="yyyy-MM-dd" parseFormats="['yyyyMMdd']"/>
<EF:EFInput ename="result-0-mainContractNumber" cname="主合同号" colWidth="8" ratio="2:10"/>
</div>
<div class="row">
<EF:EFInput type="textarea" ename="result-0-contractContent" cname="合同内容" colWidth="8" ratio="2:10" required="true"/>
</div>
</EF:EFRegion>
<EF:EFRegion id="inqu2" title="承包方式及合同价款">
<div class="row">
<EF:EFInput ename="result-0-contractingMethod" cname="承包方式" colWidth="4" />
<EF:EFSelect cname="付款方式" ename="result-0-paymentMethod" colWidth="4" filter="contains">
<EF:EFOption label="-- 请选择 --" value=""/>
<EF:EFCodeOption codeName="hggp.cw.paymentMethod"/>
</EF:EFSelect>
<EF:EFSelect cname="计价方式" ename="result-0-pricingMethod" colWidth="4" filter="contains">
<EF:EFOption label="-- 请选择 --" value=""/>
<EF:EFCodeOption codeName="hggp.cw.pricingMethod"/>
</EF:EFSelect>
</div>
<div class="row">
<EF:EFSelect cname="税点" ename="result-0-taxPoints" colWidth="4" filter="contains">
<EF:EFOption label="-- 请选择 --" value=""/>
<EF:EFCodeOption codeName="hggp.cw.taxPoints"/>
</EF:EFSelect>
<EF:EFInput ename="result-0-totalContractPriceExcluding" cname="合同总价(不含税)" colWidth="4" readonly="true"/>
<EF:EFInput ename="result-0-valueAddedTax" cname="增值税" colWidth="4" readonly="true"/>
</div>
<div class="row">
<EF:EFInput ename="result-0-totalContractPriceIncluding" cname="合同总价(含税)" colWidth="4" readonly="true"/>
</div>
</EF:EFRegion>
<EF:EFRegion id="detail1" title="合同清单">
<EF:EFGrid blockId="detail1" autoDraw="override" checkMode="row" isFloat="true">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="contractNumber" cname="合同号" hidden="true"/>
<EF:EFColumn ename="inventory" cname="清单" align="center" />
<EF:EFColumn ename="unit" cname="单位" align="center" />
<EF:EFColumn ename="provisionalQuantity" cname="暂定工程量" format="{0:N3}" align="center"/>
<EF:EFColumn ename="measurementMethod" cname="计量方式" align="center" />
<EF:EFColumn ename="supplyMethod" cname="材料供应方式" align="center"/>
<EF:EFColumn ename="unitPriceExcludingTax" cname="除税单价/元" format="{0:N3}" align="center"/>
<EF:EFColumn ename="totalPriceExcluding" cname="不含税总价" enable="false" format="{0:N3}" align="center"/>
<EF:EFColumn ename="totalPriceIncluding" cname="含税总价" enable="false" format="{0:N3}" align="center"/>
<EF:EFColumn ename="laborCosts" cname="其中人工费、元" format="{0:N3}" align="center"/>
</EF:EFGrid>
</EF:EFRegion>
<EF:EFRegion id="detail2" title="附件信息">
<EF:EFGrid blockId="detail2" autoDraw="override" checkMode="row" isFloat="true">
<EF:EFColumn ename="id" cname="ID" hidden="true"/>
<EF:EFColumn ename="matId" cname="matId" hidden="true"/>
<EF:EFColumn ename="docId" cname="文件ID" enable="false" width="150"/>
<EF:EFColumn ename="docName" cname="文件名称" enable="false" width="150"/>
<EF:EFColumn ename="createdTime" cname="创建时间" enable="false" width="140" align="center"
parseFormats="['yyyyMMddHHmmss']" editType="datetime" dateFormat="yyyy-MM-dd HH:mm:ss"/>
</EF:EFGrid>
</EF:EFRegion>
<div class="row" style="display:flex;justify-content:center;">
<EF:EFButton ename="cancel" cname="取消" type="button" class="btn-center"/>
<EF:EFButton ename="btn_save" cname="保存" type="button" class="btn-center"/>
</div>
</EF:EFPage>
<script>
var ctx = "${ctx}";
</script>
<script src="${ctx}/HG/CW/HGCW002B.js"></script>
\ No newline at end of file
$(function () {
IPLATUI.EFUpload = {
uploadFile: {
success: function(e) {
let docId = e.response.docId;
if (isBlank(docId)) {
return;
}
$("#fileDocId").val(docId);
NotificationUtil("附件上传成功");
var matId = $("#inqu_status-0-matId").val();
var bizType = $("#inqu_status-0-bizType").val();
console.log($("#fileDocId").val())
console.log($("#inqu_status-0-matId").val())
console.log($("#inqu_status-0-bizType").val())
var data = {
docId: docId,
matId: matId,
bizType: bizType
}
// saveTemp(e);
try {
parent.JSColorbox.setValueCallback(data);
} catch (e){
}
},
}
};
function saveTemp(e) {
let docId = e.response.docId;
let docName = e.response.docName;
let docSize = e.response.docSize;
let docTag = e.response.docTag;
let docUrl = e.response.docUrl;
let result = new EiInfo();
result.set("result-0-docId",docId);
result.set("result-0-docName",docName);
result.set("result-0-docSize",docSize);
result.set("result-0-docTag",docTag);
result.set("result-0-realPath",docUrl);
result.set("result-0-bizType",$("#inqu_status-0-bizType").val());
result.set("result-0-matId",$("#inqu_status-0-matId").val());
EiCommunicator.send("HGDS002", "insert", result, {
onSuccess: function (ei) {
if (ei.getStatus() >= 0) {
if (ei.getStatus() == 0) {
NotificationUtil(ei, 'warning');
} else {
NotificationUtil(ei);
}
} else {
NotificationUtil(ei, "error");
}
},
onFail: function (ei) {
// 发生异常
NotificationUtil("操作失败,原因[" + ei + "]", "error");
}
});
}
});
<!DOCTYPE html>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<EF:EFPage title="附件上传">
<EF:EFInput cname="物料ID" ename="matId" blockId="inqu_status" row="0" type="hidden"/>
<EF:EFInput cname="业务类型" ename="bizType" blockId="inqu_status" row="0" type="hidden"/>
<EF:EFRegion id="result">
<EF:EFUpload blockId="result" ename="uploadFile" docTag="hk_file11" path="A"/>
</EF:EFRegion>
<EF:EFInput ename="fileDocId" cname="" hidden="true"/>
</EF:EFPage>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment