Commit 1e7d9205 by YG6494

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

parents 051a6d1c 073808df
...@@ -70,7 +70,7 @@ public class HGConstant { ...@@ -70,7 +70,7 @@ public class HGConstant {
//生产订单 //生产订单
public static final String HGSC006_ORDER_CODE = "HGSC006_ORDER_CODE"; public static final String HGSC006_ORDER_CODE = "HGSC006_ORDER_CODE";
//生产任务 //生产任务
public static final String HGSC007_TASCK_CODE = "HGSC007_TASCK_CODE"; public static final String HGSC007_TASK_CODE = "HGSC007_TASK_CODE";
//生产任务订单 //生产任务订单
public static final String PROD_TASK_NO = "PROD_TASK_NO"; public static final String PROD_TASK_NO = "PROD_TASK_NO";
//售后维修单号 //售后维修单号
...@@ -107,6 +107,8 @@ public class HGConstant { ...@@ -107,6 +107,8 @@ public class HGConstant {
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"; public static final String CW_CONTRACT_NO = "CW_CONTRACT_NO";
public static final String CW_SETTLEMENT_NO = "CW_SETTLEMENT_NO";
} }
/** /**
......
package com.baosight.hggp.hg.cw.domain;
import com.baosight.iplat4j.core.util.NumberUtils;
import java.math.BigDecimal;
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:HGCW008.java <br>
* Description: <br>
*
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
*
* @version 1.0
* @history 2024-05-22 13:50:20 create
*/
public class HGCW008 extends DaoEPBase {
private static final long serialVersionUID = 1L;
public static final String FIELD_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_PROJ_CODE = "projCode"; /* 项目编码*/
public static final String FIELD_PROJ_NAME = "projName"; /* 项目名称*/
public static final String FIELD_CONTRACT_NUMBER = "contractNumber"; /* 合同号*/
public static final String FIELD_CONTRACT_NAME = "contractName"; /* 合同名称*/
public static final String FIELD_SETTLEMENT_NUMBER = "settlementNumber"; /* 结算编号*/
public static final String FIELD_SETTLEMENT_TYPE = "settlementType"; /* 结算类别;1部分结算2最终结算*/
public static final String FIELD_CONTRACT_DATE = "contractDate"; /* 结算日期*/
public static final String FIELD_TAX_POINTS = "taxPoints"; /* 税点*/
public static final String FIELD_PRICE_TAX_SEPARATION = "priceTaxSeparation"; /* 价税分离;1是2否*/
public static final String FIELD_THIS_SETTLEMENT_AMOUNT = "thisSettlementAmount"; /* 本次结算金额*/
public static final String FIELD_THIS_SETTLEMENT_TAX = "thisSettlementTax"; /* 本次结算税金*/
public static final String FIELD_THIS_PRICE_TAX = "thisPriceTax"; /* 本次结算价税合计金额*/
public static final String FIELD_TOTAL_CONTRACT_PRICE = "totalContractPrice"; /* 合同金额(元)*/
public static final String FIELD_CUMULATIVE_SETTLEMENT_AMOUNT = "cumulativeSettlementAmount"; /* 累计结算金额*/
public static final String FIELD_CUMULATIVE_SETTLEMENT_TAX = "cumulativeSettlementTax"; /* 累计结算税金*/
public static final String FIELD_CUMULATIVE_PRICE_TAX = "cumulativePriceTax"; /* 累计结算价税合计金额*/
public static final String FIELD_REVIEW_STATUS = "reviewStatus"; /* 审核状态*/
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_DEP_CODE = "depCode"; /* 部门编码*/
public static final String COL_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_PROJ_CODE = "PROJ_CODE"; /* 项目编码*/
public static final String COL_PROJ_NAME = "PROJ_NAME"; /* 项目名称*/
public static final String COL_CONTRACT_NUMBER = "CONTRACT_NUMBER"; /* 合同号*/
public static final String COL_CONTRACT_NAME = "CONTRACT_NAME"; /* 合同名称*/
public static final String COL_SETTLEMENT_NUMBER = "SETTLEMENT_NUMBER"; /* 结算编号*/
public static final String COL_SETTLEMENT_TYPE = "SETTLEMENT_TYPE"; /* 结算类别;1部分结算2最终结算*/
public static final String COL_CONTRACT_DATE = "CONTRACT_DATE"; /* 结算日期*/
public static final String COL_TAX_POINTS = "TAX_POINTS"; /* 税点*/
public static final String COL_PRICE_TAX_SEPARATION = "PRICE_TAX_SEPARATION"; /* 价税分离;1是2否*/
public static final String COL_THIS_SETTLEMENT_AMOUNT = "THIS_SETTLEMENT_AMOUNT"; /* 本次结算金额*/
public static final String COL_THIS_SETTLEMENT_TAX = "THIS_SETTLEMENT_TAX"; /* 本次结算税金*/
public static final String COL_THIS_PRICE_TAX = "THIS_PRICE_TAX"; /* 本次结算价税合计金额*/
public static final String COL_TOTAL_CONTRACT_PRICE = "TOTAL_CONTRACT_PRICE"; /* 合同金额(元)*/
public static final String COL_CUMULATIVE_SETTLEMENT_AMOUNT = "CUMULATIVE_SETTLEMENT_AMOUNT"; /* 累计结算金额*/
public static final String COL_CUMULATIVE_SETTLEMENT_TAX = "CUMULATIVE_SETTLEMENT_TAX"; /* 累计结算税金*/
public static final String COL_CUMULATIVE_PRICE_TAX = "CUMULATIVE_PRICE_TAX"; /* 累计结算价税合计金额*/
public static final String COL_REVIEW_STATUS = "REVIEW_STATUS"; /* 审核状态*/
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_DEP_CODE = "DEP_CODE"; /* 部门编码*/
public static final String QUERY = "HGCW008.query";
public static final String COUNT = "HGCW008.count";
public static final String INSERT = "HGCW008.insert";
public static final String UPDATE = "HGCW008.update";
public static final String DELETE = "HGCW008.delete";
private Long id = new Long(0);
private String accountCode = " "; /* 企业编码*/
private String companyCode = " "; /* 公司编码*/
private String companyName = " "; /* 公司名称*/
private String projCode = " "; /* 项目编码*/
private String projName = " "; /* 项目名称*/
private String contractNumber = " "; /* 合同号*/
private String contractName = " "; /* 合同名称*/
private String settlementNumber = " "; /* 结算编号*/
private Integer settlementType; /* 结算类别;1部分结算2最终结算*/
private String contractDate = " "; /* 结算日期*/
private Integer taxPoints = new Integer(0); /* 税点*/
private Integer priceTaxSeparation = new Integer(0); /* 价税分离;1是2否*/
private BigDecimal thisSettlementAmount = new BigDecimal("0"); /* 本次结算金额*/
private BigDecimal thisSettlementTax = new BigDecimal("0"); /* 本次结算税金*/
private BigDecimal thisPriceTax = new BigDecimal("0"); /* 本次结算价税合计金额*/
private BigDecimal totalContractPrice = new BigDecimal("0"); /* 合同金额(元)*/
private BigDecimal cumulativeSettlementAmount = new BigDecimal("0"); /* 累计结算金额*/
private BigDecimal cumulativeSettlementTax = new BigDecimal("0"); /* 累计结算税金*/
private BigDecimal cumulativePriceTax = new BigDecimal("0"); /* 累计结算价税合计金额*/
private Integer reviewStatus; /* 审核状态*/
private String createdBy = " "; /* 记录创建者*/
private String createdName = " "; /* 记录创建名称*/
private String createdTime = " "; /* 记录创建时间*/
private String updatedBy = " "; /* 记录修改者*/
private String updatedName = " "; /* 记录修改名称*/
private String updatedTime = " "; /* 记录修改时间*/
private String depCode = " "; /* 部门编码*/
/**
* initialize the metadata.
*/
public void initMetaData() {
EiColumn eiColumn;
eiColumn = new EiColumn(FIELD_ID);
eiColumn.setPrimaryKey(true);
eiColumn.setDescName(" ");
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_PROJ_CODE);
eiColumn.setDescName("项目编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PROJ_NAME);
eiColumn.setDescName("项目名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CONTRACT_NUMBER);
eiColumn.setDescName("合同号");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CONTRACT_NAME);
eiColumn.setDescName("合同名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_SETTLEMENT_NUMBER);
eiColumn.setDescName("结算编号");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_SETTLEMENT_TYPE);
eiColumn.setDescName("结算类别;1部分结算2最终结算");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CONTRACT_DATE);
eiColumn.setDescName("结算日期");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_TAX_POINTS);
eiColumn.setDescName("税点");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PRICE_TAX_SEPARATION);
eiColumn.setDescName("价税分离;1是2否");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_THIS_SETTLEMENT_AMOUNT);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(15);
eiColumn.setDescName("本次结算金额");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_THIS_SETTLEMENT_TAX);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(15);
eiColumn.setDescName("本次结算税金");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_THIS_PRICE_TAX);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(15);
eiColumn.setDescName("本次结算价税合计金额");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_TOTAL_CONTRACT_PRICE);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(15);
eiColumn.setDescName("合同金额(元)");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CUMULATIVE_SETTLEMENT_AMOUNT);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(15);
eiColumn.setDescName("累计结算金额");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CUMULATIVE_SETTLEMENT_TAX);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(15);
eiColumn.setDescName("累计结算税金");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CUMULATIVE_PRICE_TAX);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(15);
eiColumn.setDescName("累计结算价税合计金额");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_REVIEW_STATUS);
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_DEP_CODE);
eiColumn.setDescName("部门编码");
eiMetadata.addMeta(eiColumn);
}
/**
* the constructor.
*/
public HGCW008() {
initMetaData();
}
/**
* get the id .
* @return the id
*/
public Long getId() {
return this.id;
}
/**
* set the id .
*
* @param 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 projCode - 项目编码.
* @return the projCode
*/
public String getProjCode() {
return this.projCode;
}
/**
* set the projCode - 项目编码.
*
* @param projCode - 项目编码
*/
public void setProjCode(String projCode) {
this.projCode = projCode;
}
/**
* get the projName - 项目名称.
* @return the projName
*/
public String getProjName() {
return this.projName;
}
/**
* set the projName - 项目名称.
*
* @param projName - 项目名称
*/
public void setProjName(String projName) {
this.projName = projName;
}
/**
* get the contractNumber - 合同号.
* @return the contractNumber
*/
public String getContractNumber() {
return this.contractNumber;
}
/**
* set the contractNumber - 合同号.
*
* @param contractNumber - 合同号
*/
public void setContractNumber(String contractNumber) {
this.contractNumber = contractNumber;
}
/**
* get the contractName - 合同名称.
* @return the contractName
*/
public String getContractName() {
return this.contractName;
}
/**
* set the contractName - 合同名称.
*
* @param contractName - 合同名称
*/
public void setContractName(String contractName) {
this.contractName = contractName;
}
/**
* get the settlementNumber - 结算编号.
* @return the settlementNumber
*/
public String getSettlementNumber() {
return this.settlementNumber;
}
/**
* set the settlementNumber - 结算编号.
*
* @param settlementNumber - 结算编号
*/
public void setSettlementNumber(String settlementNumber) {
this.settlementNumber = settlementNumber;
}
/**
* get the settlementType - 结算类别;1部分结算2最终结算.
* @return the settlementType
*/
public Integer getSettlementType() {
return this.settlementType;
}
/**
* set the settlementType - 结算类别;1部分结算2最终结算.
*
* @param settlementType - 结算类别;1部分结算2最终结算
*/
public void setSettlementType(Integer settlementType) {
this.settlementType = settlementType;
}
/**
* get the contractDate - 结算日期.
* @return the contractDate
*/
public String getContractDate() {
return this.contractDate;
}
/**
* set the contractDate - 结算日期.
*
* @param contractDate - 结算日期
*/
public void setContractDate(String contractDate) {
this.contractDate = contractDate;
}
/**
* get the taxPoints - 税点.
* @return the taxPoints
*/
public Integer getTaxPoints() {
return this.taxPoints;
}
/**
* set the taxPoints - 税点.
*
* @param taxPoints - 税点
*/
public void setTaxPoints(Integer taxPoints) {
this.taxPoints = taxPoints;
}
/**
* get the priceTaxSeparation - 价税分离;1是2否.
* @return the priceTaxSeparation
*/
public Integer getPriceTaxSeparation() {
return this.priceTaxSeparation;
}
/**
* set the priceTaxSeparation - 价税分离;1是2否.
*
* @param priceTaxSeparation - 价税分离;1是2否
*/
public void setPriceTaxSeparation(Integer priceTaxSeparation) {
this.priceTaxSeparation = priceTaxSeparation;
}
/**
* get the thisSettlementAmount - 本次结算金额.
* @return the thisSettlementAmount
*/
public BigDecimal getThisSettlementAmount() {
return this.thisSettlementAmount;
}
/**
* set the thisSettlementAmount - 本次结算金额.
*
* @param thisSettlementAmount - 本次结算金额
*/
public void setThisSettlementAmount(BigDecimal thisSettlementAmount) {
this.thisSettlementAmount = thisSettlementAmount;
}
/**
* get the thisSettlementTax - 本次结算税金.
* @return the thisSettlementTax
*/
public BigDecimal getThisSettlementTax() {
return this.thisSettlementTax;
}
/**
* set the thisSettlementTax - 本次结算税金.
*
* @param thisSettlementTax - 本次结算税金
*/
public void setThisSettlementTax(BigDecimal thisSettlementTax) {
this.thisSettlementTax = thisSettlementTax;
}
/**
* get the thisPriceTax - 本次结算价税合计金额.
* @return the thisPriceTax
*/
public BigDecimal getThisPriceTax() {
return this.thisPriceTax;
}
/**
* set the thisPriceTax - 本次结算价税合计金额.
*
* @param thisPriceTax - 本次结算价税合计金额
*/
public void setThisPriceTax(BigDecimal thisPriceTax) {
this.thisPriceTax = thisPriceTax;
}
/**
* get the totalContractPrice - 合同金额(元).
* @return the totalContractPrice
*/
public BigDecimal getTotalContractPrice() {
return this.totalContractPrice;
}
/**
* set the totalContractPrice - 合同金额(元).
*
* @param totalContractPrice - 合同金额(元)
*/
public void setTotalContractPrice(BigDecimal totalContractPrice) {
this.totalContractPrice = totalContractPrice;
}
/**
* get the cumulativeSettlementAmount - 累计结算金额.
* @return the cumulativeSettlementAmount
*/
public BigDecimal getCumulativeSettlementAmount() {
return this.cumulativeSettlementAmount;
}
/**
* set the cumulativeSettlementAmount - 累计结算金额.
*
* @param cumulativeSettlementAmount - 累计结算金额
*/
public void setCumulativeSettlementAmount(BigDecimal cumulativeSettlementAmount) {
this.cumulativeSettlementAmount = cumulativeSettlementAmount;
}
/**
* get the cumulativeSettlementTax - 累计结算税金.
* @return the cumulativeSettlementTax
*/
public BigDecimal getCumulativeSettlementTax() {
return this.cumulativeSettlementTax;
}
/**
* set the cumulativeSettlementTax - 累计结算税金.
*
* @param cumulativeSettlementTax - 累计结算税金
*/
public void setCumulativeSettlementTax(BigDecimal cumulativeSettlementTax) {
this.cumulativeSettlementTax = cumulativeSettlementTax;
}
/**
* get the cumulativePriceTax - 累计结算价税合计金额.
* @return the cumulativePriceTax
*/
public BigDecimal getCumulativePriceTax() {
return this.cumulativePriceTax;
}
/**
* set the cumulativePriceTax - 累计结算价税合计金额.
*
* @param cumulativePriceTax - 累计结算价税合计金额
*/
public void setCumulativePriceTax(BigDecimal cumulativePriceTax) {
this.cumulativePriceTax = cumulativePriceTax;
}
/**
* get the reviewStatus - 审核状态.
* @return the reviewStatus
*/
public Integer getReviewStatus() {
return this.reviewStatus;
}
/**
* set the reviewStatus - 审核状态.
*
* @param reviewStatus - 审核状态
*/
public void setReviewStatus(Integer reviewStatus) {
this.reviewStatus = reviewStatus;
}
/**
* 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 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 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));
setProjCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROJ_CODE)), projCode));
setProjName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROJ_NAME)), projName));
setContractNumber(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CONTRACT_NUMBER)), contractNumber));
setContractName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CONTRACT_NAME)), contractName));
setSettlementNumber(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_SETTLEMENT_NUMBER)), settlementNumber));
setSettlementType(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_SETTLEMENT_TYPE)), settlementType));
setContractDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CONTRACT_DATE)), contractDate));
setTaxPoints(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_TAX_POINTS)), taxPoints));
setPriceTaxSeparation(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_PRICE_TAX_SEPARATION)), priceTaxSeparation));
setThisSettlementAmount(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_THIS_SETTLEMENT_AMOUNT)), thisSettlementAmount));
setThisSettlementTax(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_THIS_SETTLEMENT_TAX)), thisSettlementTax));
setThisPriceTax(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_THIS_PRICE_TAX)), thisPriceTax));
setTotalContractPrice(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_TOTAL_CONTRACT_PRICE)), totalContractPrice));
setCumulativeSettlementAmount(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_CUMULATIVE_SETTLEMENT_AMOUNT)), cumulativeSettlementAmount));
setCumulativeSettlementTax(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_CUMULATIVE_SETTLEMENT_TAX)), cumulativeSettlementTax));
setCumulativePriceTax(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_CUMULATIVE_PRICE_TAX)), cumulativePriceTax));
setReviewStatus(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_REVIEW_STATUS)), reviewStatus));
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));
setDepCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DEP_CODE)), depCode));
}
/**
* 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_PROJ_CODE, StringUtils.toString(projCode, eiMetadata.getMeta(FIELD_PROJ_CODE)));
map.put(FIELD_PROJ_NAME, StringUtils.toString(projName, eiMetadata.getMeta(FIELD_PROJ_NAME)));
map.put(FIELD_CONTRACT_NUMBER, StringUtils.toString(contractNumber, eiMetadata.getMeta(FIELD_CONTRACT_NUMBER)));
map.put(FIELD_CONTRACT_NAME, StringUtils.toString(contractName, eiMetadata.getMeta(FIELD_CONTRACT_NAME)));
map.put(FIELD_SETTLEMENT_NUMBER, StringUtils.toString(settlementNumber, eiMetadata.getMeta(FIELD_SETTLEMENT_NUMBER)));
map.put(FIELD_SETTLEMENT_TYPE, StringUtils.toString(settlementType, eiMetadata.getMeta(FIELD_SETTLEMENT_TYPE)));
map.put(FIELD_CONTRACT_DATE, StringUtils.toString(contractDate, eiMetadata.getMeta(FIELD_CONTRACT_DATE)));
map.put(FIELD_TAX_POINTS, StringUtils.toString(taxPoints, eiMetadata.getMeta(FIELD_TAX_POINTS)));
map.put(FIELD_PRICE_TAX_SEPARATION, StringUtils.toString(priceTaxSeparation, eiMetadata.getMeta(FIELD_PRICE_TAX_SEPARATION)));
map.put(FIELD_THIS_SETTLEMENT_AMOUNT, StringUtils.toString(thisSettlementAmount, eiMetadata.getMeta(FIELD_THIS_SETTLEMENT_AMOUNT)));
map.put(FIELD_THIS_SETTLEMENT_TAX, StringUtils.toString(thisSettlementTax, eiMetadata.getMeta(FIELD_THIS_SETTLEMENT_TAX)));
map.put(FIELD_THIS_PRICE_TAX, StringUtils.toString(thisPriceTax, eiMetadata.getMeta(FIELD_THIS_PRICE_TAX)));
map.put(FIELD_TOTAL_CONTRACT_PRICE, StringUtils.toString(totalContractPrice, eiMetadata.getMeta(FIELD_TOTAL_CONTRACT_PRICE)));
map.put(FIELD_CUMULATIVE_SETTLEMENT_AMOUNT, StringUtils.toString(cumulativeSettlementAmount, eiMetadata.getMeta(FIELD_CUMULATIVE_SETTLEMENT_AMOUNT)));
map.put(FIELD_CUMULATIVE_SETTLEMENT_TAX, StringUtils.toString(cumulativeSettlementTax, eiMetadata.getMeta(FIELD_CUMULATIVE_SETTLEMENT_TAX)));
map.put(FIELD_CUMULATIVE_PRICE_TAX, StringUtils.toString(cumulativePriceTax, eiMetadata.getMeta(FIELD_CUMULATIVE_PRICE_TAX)));
map.put(FIELD_REVIEW_STATUS, StringUtils.toString(reviewStatus, eiMetadata.getMeta(FIELD_REVIEW_STATUS)));
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_DEP_CODE, StringUtils.toString(depCode, eiMetadata.getMeta(FIELD_DEP_CODE)));
return map;
}
}
package com.baosight.hggp.hg.cw.domain;
import com.baosight.iplat4j.core.util.NumberUtils;
import java.math.BigDecimal;
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:HGCW009.java <br>
* Description: <br>
*
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
*
* @version 1.0
* @history 2024-05-22 10:58:05 create
*/
public class HGCW009 extends DaoEPBase {
private static final long serialVersionUID = 1L;
public static final String FIELD_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_SETTLEMENT_NUMBER = "settlementNumber"; /* 结算编号*/
public static final String FIELD_SETTLEMENT_BASIS = "settlementBasis"; /* 结算依据*/
public static final String FIELD_TASK_NAME = "taskName"; /* 任务名称*/
public static final String FIELD_ENGINEERING_CONTENT = "engineeringContent"; /* 工程内容*/
public static final String FIELD_THIS_ENGINEERING_QUANTITY = "thisEngineeringQuantity"; /* 本次结算工程量*/
public static final String FIELD_CUMULATIVE_ENGINEERING_QUANTITY = "cumulativeEngineeringQuantity"; /* 至本次累计结算工程量*/
public static final String FIELD_UNIT = "unit"; /* 单位*/
public static final String FIELD_UNIT_PRICE = "unitPrice"; /* 单价*/
public static final String FIELD_TOTAL_PRICE = "totalPrice"; /* 总价*/
public static final String FIELD_INVENTORY_ID = "inventoryId"; /* 清单ID*/
public static final String FIELD_REMARKS = "remarks"; /* 备注*/
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_DEP_CODE = "depCode"; /* 部门编码*/
public static final String COL_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_SETTLEMENT_NUMBER = "SETTLEMENT_NUMBER"; /* 结算编号*/
public static final String COL_SETTLEMENT_BASIS = "SETTLEMENT_BASIS"; /* 结算依据*/
public static final String COL_TASK_NAME = "TASK_NAME"; /* 任务名称*/
public static final String COL_ENGINEERING_CONTENT = "ENGINEERING_CONTENT"; /* 工程内容*/
public static final String COL_THIS_ENGINEERING_QUANTITY = "THIS_ENGINEERING_QUANTITY"; /* 本次结算工程量*/
public static final String COL_CUMULATIVE_ENGINEERING_QUANTITY = "CUMULATIVE_ENGINEERING_QUANTITY"; /* 至本次累计结算工程量*/
public static final String COL_UNIT = "UNIT"; /* 单位*/
public static final String COL_UNIT_PRICE = "UNIT_PRICE"; /* 单价*/
public static final String COL_TOTAL_PRICE = "TOTAL_PRICE"; /* 总价*/
public static final String COL_INVENTORY_ID = "INVENTORY_ID"; /* 清单ID*/
public static final String COL_REMARKS = "REMARKS"; /* 结算依据*/
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_DEP_CODE = "DEP_CODE"; /* 部门编码*/
public static final String QUERY = "HGCW009.query";
public static final String COUNT = "HGCW009.count";
public static final String INSERT = "HGCW009.insert";
public static final String UPDATE = "HGCW009.update";
public static final String DELETE = "HGCW009.delete";
private Long id = new Long(0);
private String accountCode = " "; /* 企业编码*/
private String companyCode = " "; /* 公司编码*/
private String companyName = " "; /* 公司名称*/
private String settlementNumber = " "; /* 结算编号*/
private String settlementBasis = " "; /* 结算依据*/
private String taskName = " "; /* 任务名称*/
private String engineeringContent = " "; /* 工程内容*/
private BigDecimal thisEngineeringQuantity = new BigDecimal("0"); /* 本次结算工程量*/
private BigDecimal cumulativeEngineeringQuantity = new BigDecimal("0"); /* 至本次累计结算工程量*/
private String unit = " "; /* 单位*/
private BigDecimal unitPrice = new BigDecimal("0"); /* 单价*/
private BigDecimal totalPrice = new BigDecimal("0"); /* 总价*/
private Long inventoryId = new Long(0); /* 清单ID*/
private String remarks = " "; /* 结算依据*/
private String createdBy = " "; /* 记录创建者*/
private String createdName = " "; /* 记录创建名称*/
private String createdTime = " "; /* 记录创建时间*/
private String updatedBy = " "; /* 记录修改者*/
private String updatedName = " "; /* 记录修改名称*/
private String updatedTime = " "; /* 记录修改时间*/
private String depCode = " "; /* 部门编码*/
/**
* initialize the metadata.
*/
public void initMetaData() {
EiColumn eiColumn;
eiColumn = new EiColumn(FIELD_ID);
eiColumn.setPrimaryKey(true);
eiColumn.setDescName(" ");
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_SETTLEMENT_NUMBER);
eiColumn.setDescName("结算编号");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_SETTLEMENT_BASIS);
eiColumn.setDescName("结算依据");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_TASK_NAME);
eiColumn.setDescName("任务名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_ENGINEERING_CONTENT);
eiColumn.setDescName("工程内容");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_THIS_ENGINEERING_QUANTITY);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(15);
eiColumn.setDescName("本次结算工程量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CUMULATIVE_ENGINEERING_QUANTITY);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(15);
eiColumn.setDescName("至本次累计结算工程量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UNIT);
eiColumn.setDescName("单位");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UNIT_PRICE);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(15);
eiColumn.setDescName("单价");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_TOTAL_PRICE);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(15);
eiColumn.setDescName("总价");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_INVENTORY_ID);
eiColumn.setDescName("清单ID");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_REMARKS);
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_DEP_CODE);
eiColumn.setDescName("部门编码");
eiMetadata.addMeta(eiColumn);
}
/**
* the constructor.
*/
public HGCW009() {
initMetaData();
}
/**
* get the id .
* @return the id
*/
public Long getId() {
return this.id;
}
/**
* set the id .
*
* @param 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 settlementNumber - 结算编号.
* @return the settlementNumber
*/
public String getSettlementNumber() {
return this.settlementNumber;
}
/**
* set the settlementNumber - 结算编号.
*
* @param settlementNumber - 结算编号
*/
public void setSettlementNumber(String settlementNumber) {
this.settlementNumber = settlementNumber;
}
/**
* get the settlementBasis - 结算依据.
* @return the settlementBasis
*/
public String getSettlementBasis() {
return this.settlementBasis;
}
/**
* set the settlementBasis - 结算依据.
*
* @param settlementBasis - 结算依据
*/
public void setSettlementBasis(String settlementBasis) {
this.settlementBasis = settlementBasis;
}
/**
* get the taskName - 任务名称.
* @return the taskName
*/
public String getTaskName() {
return this.taskName;
}
/**
* set the taskName - 任务名称.
*
* @param taskName - 任务名称
*/
public void setTaskName(String taskName) {
this.taskName = taskName;
}
/**
* get the engineeringContent - 工程内容.
* @return the engineeringContent
*/
public String getEngineeringContent() {
return this.engineeringContent;
}
/**
* set the engineeringContent - 工程内容.
*
* @param engineeringContent - 工程内容
*/
public void setEngineeringContent(String engineeringContent) {
this.engineeringContent = engineeringContent;
}
/**
* get the thisEngineeringQuantity - 本次结算工程量.
* @return the thisEngineeringQuantity
*/
public BigDecimal getThisEngineeringQuantity() {
return this.thisEngineeringQuantity;
}
/**
* set the thisEngineeringQuantity - 本次结算工程量.
*
* @param thisEngineeringQuantity - 本次结算工程量
*/
public void setThisEngineeringQuantity(BigDecimal thisEngineeringQuantity) {
this.thisEngineeringQuantity = thisEngineeringQuantity;
}
/**
* get the cumulativeEngineeringQuantity - 至本次累计结算工程量.
* @return the cumulativeEngineeringQuantity
*/
public BigDecimal getCumulativeEngineeringQuantity() {
return this.cumulativeEngineeringQuantity;
}
/**
* set the cumulativeEngineeringQuantity - 至本次累计结算工程量.
*
* @param cumulativeEngineeringQuantity - 至本次累计结算工程量
*/
public void setCumulativeEngineeringQuantity(BigDecimal cumulativeEngineeringQuantity) {
this.cumulativeEngineeringQuantity = cumulativeEngineeringQuantity;
}
/**
* get the unit - 单位.
* @return the unit
*/
public String getUnit() {
return this.unit;
}
/**
* set the unit - 单位.
*
* @param unit - 单位
*/
public void setUnit(String unit) {
this.unit = unit;
}
/**
* get the unitPrice - 单价.
* @return the unitPrice
*/
public BigDecimal getUnitPrice() {
return this.unitPrice;
}
/**
* set the unitPrice - 单价.
*
* @param unitPrice - 单价
*/
public void setUnitPrice(BigDecimal unitPrice) {
this.unitPrice = unitPrice;
}
/**
* get the totalPrice - 总价.
* @return the totalPrice
*/
public BigDecimal getTotalPrice() {
return this.totalPrice;
}
/**
* set the totalPrice - 总价.
*
* @param totalPrice - 总价
*/
public void setTotalPrice(BigDecimal totalPrice) {
this.totalPrice = totalPrice;
}
/**
* get the inventoryId - 清单ID.
* @return the inventoryId
*/
public Long getInventoryId() {
return this.inventoryId;
}
/**
* set the inventoryId - 清单ID.
*
* @param inventoryId - 清单ID
*/
public void setInventoryId(Long inventoryId) {
this.inventoryId = inventoryId;
}
/**
* get the remarks - 结算依据.
* @return the remarks
*/
public String getRemarks() {
return this.remarks;
}
/**
* set the remarks - 结算依据.
*
* @param remarks - 结算依据
*/
public void setRemarks(String remarks) {
this.remarks = remarks;
}
/**
* 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 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 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));
setSettlementNumber(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_SETTLEMENT_NUMBER)), settlementNumber));
setSettlementBasis(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_SETTLEMENT_BASIS)), settlementBasis));
setTaskName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_TASK_NAME)), taskName));
setEngineeringContent(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_ENGINEERING_CONTENT)), engineeringContent));
setThisEngineeringQuantity(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_THIS_ENGINEERING_QUANTITY)), thisEngineeringQuantity));
setCumulativeEngineeringQuantity(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_CUMULATIVE_ENGINEERING_QUANTITY)), cumulativeEngineeringQuantity));
setUnit(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UNIT)), unit));
setUnitPrice(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_UNIT_PRICE)), unitPrice));
setTotalPrice(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_TOTAL_PRICE)), totalPrice));
setInventoryId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_INVENTORY_ID)), inventoryId));
setRemarks(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_REMARKS)), remarks));
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));
setDepCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DEP_CODE)), depCode));
}
/**
* 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_SETTLEMENT_NUMBER, StringUtils.toString(settlementNumber, eiMetadata.getMeta(FIELD_SETTLEMENT_NUMBER)));
map.put(FIELD_SETTLEMENT_BASIS, StringUtils.toString(settlementBasis, eiMetadata.getMeta(FIELD_SETTLEMENT_BASIS)));
map.put(FIELD_TASK_NAME, StringUtils.toString(taskName, eiMetadata.getMeta(FIELD_TASK_NAME)));
map.put(FIELD_ENGINEERING_CONTENT, StringUtils.toString(engineeringContent, eiMetadata.getMeta(FIELD_ENGINEERING_CONTENT)));
map.put(FIELD_THIS_ENGINEERING_QUANTITY, StringUtils.toString(thisEngineeringQuantity, eiMetadata.getMeta(FIELD_THIS_ENGINEERING_QUANTITY)));
map.put(FIELD_CUMULATIVE_ENGINEERING_QUANTITY, StringUtils.toString(cumulativeEngineeringQuantity, eiMetadata.getMeta(FIELD_CUMULATIVE_ENGINEERING_QUANTITY)));
map.put(FIELD_UNIT, StringUtils.toString(unit, eiMetadata.getMeta(FIELD_UNIT)));
map.put(FIELD_UNIT_PRICE, StringUtils.toString(unitPrice, eiMetadata.getMeta(FIELD_UNIT_PRICE)));
map.put(FIELD_TOTAL_PRICE, StringUtils.toString(totalPrice, eiMetadata.getMeta(FIELD_TOTAL_PRICE)));
map.put(FIELD_INVENTORY_ID, StringUtils.toString(inventoryId, eiMetadata.getMeta(FIELD_INVENTORY_ID)));
map.put(FIELD_REMARKS, StringUtils.toString(remarks, eiMetadata.getMeta(FIELD_REMARKS)));
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_DEP_CODE, StringUtils.toString(depCode, eiMetadata.getMeta(FIELD_DEP_CODE)));
return map;
}
}
...@@ -22,10 +22,7 @@ import org.apache.commons.collections.CollectionUtils; ...@@ -22,10 +22,7 @@ import org.apache.commons.collections.CollectionUtils;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.text.DecimalFormat; import java.text.DecimalFormat;
import java.util.Arrays; import java.util.*;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/** /**
* @author yukang * @author yukang
...@@ -262,15 +259,34 @@ public class ServiceHGCW002 extends ServiceBase { ...@@ -262,15 +259,34 @@ public class ServiceHGCW002 extends ServiceBase {
public EiInfo projectComboBox(EiInfo inInfo){ public EiInfo projectComboBox(EiInfo inInfo){
Map<String, Object> map = new HashMap<>(); Map<String, Object> map = new HashMap<>();
List<String> contractTypArray = new ArrayList<>();
if (StringUtils.isNotEmpty(inInfo.getString("reviewStatus"))) { if (StringUtils.isNotEmpty(inInfo.getString("reviewStatus"))) {
map.put("reviewStatus", inInfo.getString("reviewStatus")); map.put("reviewStatus", inInfo.getString("reviewStatus"));
} }
if (StringUtils.isNotEmpty(inInfo.getString("contractType"))) { if (StringUtils.isNotEmpty(inInfo.getString("contractType"))) {
map.put("contractType", inInfo.getString("contractType")); map.put("contractType", inInfo.getString("contractType"));
} }
if (StringUtils.isNotEmpty(inInfo.getString("contractTyps"))) {
String[] contractTyps = inInfo.getString("contractTyps").split(",");
for (String c : contractTyps) {
contractTypArray.add(c);
}
map.put("contractTyps", contractTypArray);
}
List<HGCW002> HGCW002List = dao.query("HGCW002.queryProjectComboBox", map); List<HGCW002> HGCW002List = dao.query("HGCW002.queryProjectComboBox", map);
inInfo.addBlock("projcet_combo_box").setRows(HGCW002List); inInfo.addBlock("projcet_combo_box").setRows(HGCW002List);
return inInfo; return inInfo;
} }
public EiInfo queryContractByType(EiInfo inInfo){
Map<String, Object> map = new HashMap<>();
if (StringUtils.isNotEmpty(inInfo.getString("reviewStatus"))) {
map.put("reviewStatus", "3");
}
List<HGCW002> HGCW002List = dao.query("HGCW002.queryContractByType",map);
inInfo.addBlock("contract_combo_box").setRows(HGCW002List);
return inInfo;
}
} }
...@@ -193,10 +193,7 @@ public class ServiceHGCW004 extends ServiceBase { ...@@ -193,10 +193,7 @@ public class ServiceHGCW004 extends ServiceBase {
// * 上传附件 // * 上传附件
// * @param inInfo // * @param inInfo
// * @return // * @return
// */ // *
// @OperationLogAnnotation(operModul = "账期维护",operType = "上传附件",operDesc = "上传附件")
// public EiInfo form(EiInfo inInfo) {
// return inInfo;
// } // }
@OperationLogAnnotation(operModul = "账期维护",operType = "上传附件",operDesc = "上传附件操作") @OperationLogAnnotation(operModul = "账期维护",operType = "上传附件",operDesc = "上传附件操作")
public EiInfo updateDocId(EiInfo inInfo){ public EiInfo updateDocId(EiInfo 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.constant.HGConstant;
import com.baosight.hggp.hg.cw.domain.HGCW008;
import com.baosight.hggp.hg.cw.domain.HGCW007;
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.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.ed.util.SequenceGenerator;
import org.apache.commons.collections.CollectionUtils;
import java.math.BigDecimal;
import java.text.DecimalFormat;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @author yukang
* @date 2024年05月06日 18:22
*/
public class ServiceHGCW008 extends ServiceBase {
/**
* 画面初始化
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "租赁合同",operType = "查询",operDesc = "初始化")
public EiInfo initLoad(EiInfo inInfo) {
try {
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.COMPANY_BOX_BLOCK_ID), null, false);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGCW008().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, HGCW008.QUERY, new HGCW008());
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
/**
* 新增操作
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "租赁合同",operType = "保存",operDesc = "保存")
public EiInfo save(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
List<Map> detail1Rows = inInfo.getBlock("detail1").getRows();
if (CollectionUtils.isNotEmpty(resultRows)) {
HGCW008 HGCW008 = new HGCW008();
HGCW008.fromMap(resultRows.get(0));
if (HGCW008.getId() == null || HGCW008.getId() == 0) {
UserVO userVO = HGCWTools.HgCw002.getUserCompany();
String settlementNumber = SequenceGenerator.getNextSequence(HGConstant.SequenceId.CW_SETTLEMENT_NO);
HGCW008.setCompanyCode(userVO.getUsercode());
HGCW008.setCompanyName(userVO.getUsername());
HGCW008.setSettlementNumber(settlementNumber);
HGCW008.setReviewStatus(0);
HGCW008.setContractDate(DateUtils.formatShort(HGCW008.getContractDate()));
this.add(HGCW008);
// 写入其他数据
HGCWTools.HgCw009.save(detail1Rows,settlementNumber,userVO);
// 更新合同结算状态
HGCWTools.HgCw002.updateBalanceStatus(HGCW008.getContractNumber(),HGCW008.getSettlementType() + 1);
} else {
BigDecimal totalContractPriceExcluding = new BigDecimal(0);
BigDecimal totalContractPriceIncluding = new BigDecimal(0);
BigDecimal valueAddedTax = new BigDecimal(0);
BigDecimal totalQuantity = new BigDecimal(0);
//计算合同清单金额
for (int i = 0; i < detail1Rows.size(); i++) {
HGCW007 hgcw007 = new HGCW007();
hgcw007.fromMap(detail1Rows.get(i));
totalContractPriceExcluding = totalContractPriceExcluding.add(hgcw007.getTotalPrice());
totalQuantity = totalQuantity.add(hgcw007.getDeviceNumber());
}
BigDecimal taxPoints = new BigDecimal(HGCW008.getTaxPoints() / 100);
totalContractPriceIncluding = totalContractPriceExcluding.multiply(taxPoints.add(new BigDecimal(1)));
valueAddedTax = totalContractPriceIncluding.subtract(totalContractPriceExcluding);
DecimalFormat decimalFormat = new DecimalFormat("#.000");
this.modify(HGCW008);
// 更新合同结算状态
HGCWTools.HgCw002.updateBalanceStatus(HGCW008.getContractNumber(),HGCW008.getSettlementType() + 1);
}
}
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据保存成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "保存失败");
}
return inInfo;
}
/**
* 新增操作
*
* @param HGCW008
* @return
*/
public void add(HGCW008 HGCW008) {
DaoUtils.insert("HGCW008.insert", HGCW008);
}
/**
* 修改操作
*
* @param HGCW008
* @return
*/
public void modify(HGCW008 HGCW008) {
DaoUtils.update("HGCW008.update", HGCW008);
}
/**
* 删除操作
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "租赁合同",operType = "删除",operDesc = "删除")
public EiInfo delete(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
for (int i = 0; i < resultRows.size(); i++) {
DaoUtils.update("HGCW008.delete", resultRows.get(i));
}
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据删除成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "删除失败");
}
return inInfo;
}
/**
* 提交操作
* @param inInfo
* @return
*/
public EiInfo submit(EiInfo inInfo){
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
for (int i = 0; i < resultRows.size(); i++) {
HGCW008 HGCW008 = new HGCW008();
HGCW008.fromMap(resultRows.get(i));
HGCW008.setReviewStatus(3);
DaoUtils.update("HGCW008.submit", HGCW008);
}
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据提交成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
public EiInfo queryCalculateAmount(EiInfo inInfo) {
try {
Map map = new HashMap();
String contractNumber = inInfo.getString("contractNumber");
map.put("contractNumber", contractNumber);
List result = dao.query("HGCW008.queryCalculateAmount", map);
inInfo.set("result", result);
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
}
package com.baosight.hggp.hg.cw.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.hg.cw.domain.HGCW008;
import com.baosight.hggp.hg.cw.vo.UserVO;
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.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;
/**
* @author yukang
* @date 2024年05月06日 18:22
*/
public class ServiceHGCW008A 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 HGCW008().eiMetadata);
} 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.HGCW008;
import com.baosight.hggp.hg.cw.domain.HGCW007;
import com.baosight.hggp.hg.cw.domain.HGCW009;
import com.baosight.hggp.hg.cw.domain.HGCW999;
import com.baosight.hggp.hg.cw.tools.HGCWTools;
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 java.util.Arrays;
import java.util.List;
/**
* @author yukang
* @date 2024年05月06日 18:22
*/
public class ServiceHGCW008B extends ServiceBase {
/**
* 画面初始化
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "修改合同",operType = "查询",operDesc = "初始化")
public EiInfo initLoad(EiInfo inInfo) {
try {
String id = inInfo.getString("id");
HGCW008 HGCW008 = HGCWTools.HgCw008.getId(id);
inInfo.addBlock(EiConstant.resultBlock).addRow(HGCW008);
//获取清单
List<HGCW009> hgcw009List = HGCWTools.HgCw009.queryBySettlementNumber(HGCW008.getSettlementNumber());
inInfo.addBlock("detail1").addRows(hgcw009List);
} 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.hg.cw.domain.HGCW006;
import com.baosight.hggp.hg.cw.domain.HGCW007;
import com.baosight.hggp.hg.cw.domain.HGCW999;
import com.baosight.hggp.hg.cw.tools.HGCWTools;
import com.baosight.hggp.util.LogUtils;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.service.impl.ServiceBase;
import java.util.List;
/**
* @author yukang
* @date 2024年05月06日 18:22
*/
public class ServiceHGCW008C 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");
HGCW006 HGCW006 = HGCWTools.HgCw006.getId(id);
inInfo.addBlock(EiConstant.resultBlock).addRow(HGCW006);
//获取清单
List<HGCW007> hgcw007List = HGCWTools.HgCw007.queryByContractNumber(HGCW006.getContractNumber());
inInfo.addBlock("detail1").addRows(hgcw007List);
List<HGCW999> hgcw999List = HGCWTools.HgCw999.queryByBiz(HGCW006.getId(),"ZL");
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.hg.cw.domain.HGCW003;
import com.baosight.hggp.hg.cw.domain.HGCW006;
import com.baosight.hggp.hg.cw.domain.HGCW007;
import com.baosight.hggp.hg.cw.domain.HGCW999;
import com.baosight.hggp.hg.cw.tools.HGCWTools;
import com.baosight.hggp.util.LogUtils;
import com.baosight.hggp.util.StringUtils;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.service.impl.ServiceBase;
import java.util.ArrayList;
import java.util.List;
/**
* @author yukang
* @date 2024年05月06日 18:22
*/
public class ServiceHGCW008D 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 {
List<String> ids = new ArrayList<>();
String inventoryIds = inInfo.getString("inqu_status-0-inventoryIds");
if (StringUtils.isNotEmpty(inventoryIds)) {
String[] inventoryIdsArr = inventoryIds.split(",");
for (String id : inventoryIdsArr) {
ids.add(id);
}
inInfo.set("inqu_status-0-ids", ids);
}
inInfo = super.query(inInfo, HGCW003.QUERY, new HGCW003());
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
}
package com.baosight.hggp.hg.cw.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.hg.cw.domain.HGCW003;
import com.baosight.hggp.hg.cw.domain.HGCW005;
import com.baosight.hggp.util.LogUtils;
import com.baosight.hggp.util.StringUtils;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.service.impl.ServiceBase;
import java.util.ArrayList;
import java.util.List;
/**
* @author yukang
* @date 2024年05月06日 18:22
*/
public class ServiceHGCW008E extends ServiceBase {
/**
* 画面初始化
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "合同清单",operType = "查询",operDesc = "初始化")
public EiInfo initLoad(EiInfo inInfo) {
try {
inInfo.addBlock("result1").addBlockMeta(new HGCW003().eiMetadata);
inInfo.addBlock("result2").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 {
List<String> ids = new ArrayList<>();
List<String> dids = new ArrayList<>();
String inventoryIds = inInfo.getString("inqu_status-0-inventoryIds");
String deductionIds = inInfo.getString("inqu_status-0-deductionIds");
if (StringUtils.isNotEmpty(inventoryIds)) {
String[] inventoryIdsArr = inventoryIds.split(",");
for (String id : inventoryIdsArr) {
ids.add(id);
}
inInfo.set("inqu_status-0-ids", ids);
}
inInfo = super.query(inInfo, HGCW003.QUERY, new HGCW003(),new HGCW003().eiMetadata,"","","result1",false);
if (StringUtils.isNotEmpty(deductionIds)) {
String[] deductionIdsArr = deductionIds.split(",");
for (String id : deductionIdsArr) {
dids.add(id);
}
inInfo.set("inqu_status-0-dids", dids);
}
inInfo = super.query(inInfo, HGCW005.QUERY, new HGCW005(),new HGCW005().eiMetadata,"","","result2",false);
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
}
package com.baosight.hggp.hg.cw.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.hg.cw.domain.HGCW007;
import com.baosight.hggp.hg.cw.tools.HGCWTools;
import com.baosight.hggp.util.LogUtils;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.service.impl.ServiceBase;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @author yukang
* @date 2024年05月06日 18:22
*/
public class ServiceHGCW009 extends ServiceBase {
/**
* 画面初始化
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "合同清单",operType = "查询",operDesc = "初始化")
public EiInfo initLoad(EiInfo inInfo) {
try {
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGCW007().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, HGCW007.QUERY, new HGCW007());
} 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++) {
HGCW007 HGCW007 = new HGCW007();
HGCW007.fromMap(resultRows.get(i));
contractNumber = HGCW007.getContractNumber();
if (HGCW007.getId() == null || HGCW007.getId() == 0) {
this.add(HGCW007);
} else {
this.modify(HGCW007);
}
}
List<HGCW007> HGCW007List = HGCWTools.HgCw007.queryByContractNumber(contractNumber);
eiInfo.addBlock("detail1").addRows(HGCW007List);
eiInfo.setStatus(EiConstant.STATUS_DEFAULT);
eiInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据保存成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "保存失败");
}
return eiInfo;
}
/**
* 新增操作
*
* @param HGCW007
* @return
*/
public void add(HGCW007 HGCW007) {
DaoUtils.insert("HGCW007.insert", HGCW007);
}
/**
* 修改操作
*
* @param HGCW007
* @return
*/
public void modify(HGCW007 HGCW007) {
DaoUtils.update("HGCW007.update", HGCW007);
}
public void deleteEntity(HGCW007 HGCW007) {
DaoUtils.update("HGCW007.delete", HGCW007);
}
/**
* 删除操作
*
* @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++) {
HGCW007 HGCW007 = new HGCW007();
HGCW007.fromMap(resultRows.get(i));
contractNumber = HGCW007.getContractNumber();
this.deleteEntity(HGCW007);
}
List<HGCW007> HGCW007List = HGCWTools.HgCw007.queryByContractNumber(contractNumber);
eiInfo.addBlock("detail1").addRows(HGCW007List);
eiInfo.setStatus(EiConstant.STATUS_DEFAULT);
eiInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据删除成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "删除失败");
}
return eiInfo;
}
public EiInfo queryEngineeringQuantity(EiInfo inInfo) {
try {
Map map = new HashMap();
String inventoryId = inInfo.getString("inventoryId");
map.put("inventoryId", inventoryId);
List result = dao.query("HGCW009.queryEngineeringQuantity", map);
inInfo.set("result", result.get(0));
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
}
...@@ -510,9 +510,24 @@ ...@@ -510,9 +510,24 @@
<isNotEmpty prepend=" AND " property="contractType"> <isNotEmpty prepend=" AND " property="contractType">
CONTRACT_TYPE = #contractType# CONTRACT_TYPE = #contractType#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="contractTyps">
CONTRACT_TYPE IN <iterate close=")" open="(" conjunction="," property="contractTyps">#contractTyps[]#</iterate>
</isNotEmpty>
ORDER BY CONTRACT_NUMBER ORDER BY CONTRACT_NUMBER
</select> </select>
<update id="updateBalanceStatus">
UPDATE ${hggpSchema}.HGCW002
SET
BALANCE_STATUS = #balanceStatus#, <!-- 审核状态 -->
UPDATED_BY = #updatedBy#, <!-- 记录修改者 -->
UPDATED_NAME = #updatedName#, <!-- 记录修改名称 -->
UPDATED_TIME = #updatedTime# <!-- 记录修改时间 -->
WHERE
CONTRACT_NUMBER = #contractNumber#
</update>
<update id="submit"> <update id="submit">
UPDATE ${hggpSchema}.HGCW002 UPDATE ${hggpSchema}.HGCW002
SET SET
...@@ -524,4 +539,28 @@ ...@@ -524,4 +539,28 @@
ID = #id# ID = #id#
</update> </update>
<select id="queryContractByType" parameterClass="java.util.HashMap"
resultClass="com.baosight.hggp.hg.cw.domain.HGCW002">
SELECT DISTINCT
PROJ_CODE as "projCode", <!-- 项目编码 -->
PROJ_NAME as "projName", <!-- 项目名称 -->
CONTRACT_NUMBER as "contractNumber", <!-- 合同号 -->
CONTRACT_NAME as "contractName", <!-- 合同名称 -->
TOTAL_CONTRACT_PRICE_EXCLUDING as "totalContractPriceExcluding", <!-- 合同总价(不含税) -->
CONTRACT_TYPE as contractType, <!-- 合同类型;1销售合同2劳务合同3补充协议4合同外用工 -->
PARTY_A as "partyA", <!-- 甲方名称 -->
PARTY_B as "partyB" <!-- 乙方名称 -->
FROM ${hggpSchema}.HGCW002
WHERE 1=1 AND REVIEW_STATUS= 3 AND CONTRACT_TYPE IN (1,2)
<isNotEmpty prepend=" AND " property="accountCode">
ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCodes">
COMPANY_CODE IN <iterate close=")" open="(" conjunction="," property="companyCodes">#companyCodes[]#</iterate>
</isNotEmpty>
ORDER BY CONTRACT_NUMBER
</select>
</sqlMap> </sqlMap>
...@@ -94,6 +94,9 @@ ...@@ -94,6 +94,9 @@
<isNotEmpty prepend=" AND " property="depCode"> <isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode# DEP_CODE = #depCode#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="ids">
ID NOT IN <iterate close=")" open="(" conjunction="," property="ids">#ids[]#</iterate>
</isNotEmpty>
</sql> </sql>
<select id="query" parameterClass="java.util.HashMap" <select id="query" parameterClass="java.util.HashMap"
......
...@@ -92,6 +92,9 @@ ...@@ -92,6 +92,9 @@
<isNotEmpty prepend=" AND " property="depCode"> <isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode# DEP_CODE = #depCode#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="dids">
ID NOT IN <iterate close=")" open="(" conjunction="," property="dids">#dids[]#</iterate>
</isNotEmpty>
</sql> </sql>
<select id="query" parameterClass="java.util.HashMap" <select id="query" parameterClass="java.util.HashMap"
......
<?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-22 13:50:20
Version : 1.0
schema : hggp
tableName : HGCW008
ID BIGINT NOT NULL primarykey,
ACCOUNT_CODE VARCHAR,
COMPANY_CODE VARCHAR,
COMPANY_NAME VARCHAR,
PROJ_CODE VARCHAR,
PROJ_NAME VARCHAR,
CONTRACT_NUMBER VARCHAR,
CONTRACT_NAME VARCHAR,
SETTLEMENT_NUMBER VARCHAR,
SETTLEMENT_TYPE TINYINT,
CONTRACT_DATE VARCHAR,
TAX_POINTS INTEGER,
PRICE_TAX_SEPARATION INTEGER,
THIS_SETTLEMENT_AMOUNT DECIMAL,
THIS_SETTLEMENT_TAX DECIMAL,
THIS_PRICE_TAX DECIMAL,
TOTAL_CONTRACT_PRICE DECIMAL,
CUMULATIVE_SETTLEMENT_AMOUNT DECIMAL,
CUMULATIVE_SETTLEMENT_TAX DECIMAL,
CUMULATIVE_PRICE_TAX DECIMAL,
REVIEW_STATUS TINYINT,
CREATED_BY VARCHAR NOT NULL,
CREATED_NAME VARCHAR NOT NULL,
CREATED_TIME VARCHAR NOT NULL,
UPDATED_BY VARCHAR NOT NULL,
UPDATED_NAME VARCHAR NOT NULL,
UPDATED_TIME VARCHAR NOT NULL,
DEP_CODE VARCHAR
-->
<sqlMap namespace="HGCW008">
<sql id="condition">
<include refid="HGXSDataAuth.authCondition"/>
<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="projCode">
PROJ_CODE = #projCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projName">
PROJ_NAME = #projName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="contractNumber">
CONTRACT_NUMBER = #contractNumber#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="contractName">
CONTRACT_NAME = #contractName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="settlementNumber">
SETTLEMENT_NUMBER = #settlementNumber#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="settlementType">
SETTLEMENT_TYPE = #settlementType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="contractDate">
CONTRACT_DATE = #contractDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="taxPoints">
TAX_POINTS = #taxPoints#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="priceTaxSeparation">
PRICE_TAX_SEPARATION = #priceTaxSeparation#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="thisSettlementAmount">
THIS_SETTLEMENT_AMOUNT = #thisSettlementAmount#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="thisSettlementTax">
THIS_SETTLEMENT_TAX = #thisSettlementTax#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="thisPriceTax">
THIS_PRICE_TAX = #thisPriceTax#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="totalContractPrice">
TOTAL_CONTRACT_PRICE = #totalContractPrice#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="cumulativeSettlementAmount">
CUMULATIVE_SETTLEMENT_AMOUNT = #cumulativeSettlementAmount#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="cumulativeSettlementTax">
CUMULATIVE_SETTLEMENT_TAX = #cumulativeSettlementTax#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="cumulativePriceTax">
CUMULATIVE_PRICE_TAX = #cumulativePriceTax#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="reviewStatus">
REVIEW_STATUS = #reviewStatus#
</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="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
</sql>
<select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hggp.hg.cw.domain.HGCW008">
SELECT
ID as "id",
ACCOUNT_CODE as "accountCode", <!-- 企业编码 -->
COMPANY_CODE as "companyCode", <!-- 公司编码 -->
COMPANY_NAME as "companyName", <!-- 公司名称 -->
PROJ_CODE as "projCode", <!-- 项目编码 -->
PROJ_NAME as "projName", <!-- 项目名称 -->
CONTRACT_NUMBER as "contractNumber", <!-- 合同号 -->
CONTRACT_NAME as "contractName", <!-- 合同名称 -->
SETTLEMENT_NUMBER as "settlementNumber", <!-- 结算编号 -->
SETTLEMENT_TYPE as "settlementType", <!-- 结算类别;1部分结算2最终结算 -->
CONTRACT_DATE as "contractDate", <!-- 结算日期 -->
TAX_POINTS as "taxPoints", <!-- 税点 -->
PRICE_TAX_SEPARATION as "priceTaxSeparation", <!-- 价税分离;1是2否 -->
THIS_SETTLEMENT_AMOUNT as "thisSettlementAmount", <!-- 本次结算金额 -->
THIS_SETTLEMENT_TAX as "thisSettlementTax", <!-- 本次结算税金 -->
THIS_PRICE_TAX as "thisPriceTax", <!-- 本次结算价税合计金额 -->
TOTAL_CONTRACT_PRICE as "totalContractPrice", <!-- 合同金额(元) -->
CUMULATIVE_SETTLEMENT_AMOUNT as "cumulativeSettlementAmount", <!-- 累计结算金额 -->
CUMULATIVE_SETTLEMENT_TAX as "cumulativeSettlementTax", <!-- 累计结算税金 -->
CUMULATIVE_PRICE_TAX as "cumulativePriceTax", <!-- 累计结算价税合计金额 -->
REVIEW_STATUS as "reviewStatus", <!-- 审核状态 -->
CREATED_BY as "createdBy", <!-- 记录创建者 -->
CREATED_NAME as "createdName", <!-- 记录创建名称 -->
CREATED_TIME as "createdTime", <!-- 记录创建时间 -->
UPDATED_BY as "updatedBy", <!-- 记录修改者 -->
UPDATED_NAME as "updatedName", <!-- 记录修改名称 -->
UPDATED_TIME as "updatedTime", <!-- 记录修改时间 -->
DEP_CODE as "depCode" <!-- 部门编码 -->
FROM ${hggpSchema}.HGCW008 WHERE 1=1
<include refid="condition" />
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
ID asc
</isEmpty>
</dynamic>
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hggpSchema}.HGCW008 WHERE 1=1
<include refid="condition" />
</select>
<!--
<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="projCode">
PROJ_CODE = #projCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projName">
PROJ_NAME = #projName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="contractNumber">
CONTRACT_NUMBER = #contractNumber#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="contractName">
CONTRACT_NAME = #contractName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="settlementNumber">
SETTLEMENT_NUMBER = #settlementNumber#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="settlementType">
SETTLEMENT_TYPE = #settlementType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="contractDate">
CONTRACT_DATE = #contractDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="taxPoints">
TAX_POINTS = #taxPoints#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="priceTaxSeparation">
PRICE_TAX_SEPARATION = #priceTaxSeparation#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="thisSettlementAmount">
THIS_SETTLEMENT_AMOUNT = #thisSettlementAmount#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="thisSettlementTax">
THIS_SETTLEMENT_TAX = #thisSettlementTax#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="thisPriceTax">
THIS_PRICE_TAX = #thisPriceTax#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="totalContractPrice">
TOTAL_CONTRACT_PRICE = #totalContractPrice#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="cumulativeSettlementAmount">
CUMULATIVE_SETTLEMENT_AMOUNT = #cumulativeSettlementAmount#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="cumulativeSettlementTax">
CUMULATIVE_SETTLEMENT_TAX = #cumulativeSettlementTax#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="cumulativePriceTax">
CUMULATIVE_PRICE_TAX = #cumulativePriceTax#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="reviewStatus">
REVIEW_STATUS = #reviewStatus#
</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="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
-->
<insert id="insert">
INSERT INTO ${hggpSchema}.HGCW008 (ID,
ACCOUNT_CODE, <!-- 企业编码 -->
COMPANY_CODE, <!-- 公司编码 -->
COMPANY_NAME, <!-- 公司名称 -->
PROJ_CODE, <!-- 项目编码 -->
PROJ_NAME, <!-- 项目名称 -->
CONTRACT_NUMBER, <!-- 合同号 -->
CONTRACT_NAME, <!-- 合同名称 -->
SETTLEMENT_NUMBER, <!-- 结算编号 -->
SETTLEMENT_TYPE, <!-- 结算类别;1部分结算2最终结算 -->
CONTRACT_DATE, <!-- 结算日期 -->
TAX_POINTS, <!-- 税点 -->
PRICE_TAX_SEPARATION, <!-- 价税分离;1是2否 -->
THIS_SETTLEMENT_AMOUNT, <!-- 本次结算金额 -->
THIS_SETTLEMENT_TAX, <!-- 本次结算税金 -->
THIS_PRICE_TAX, <!-- 本次结算价税合计金额 -->
TOTAL_CONTRACT_PRICE, <!-- 合同金额(元) -->
CUMULATIVE_SETTLEMENT_AMOUNT, <!-- 累计结算金额 -->
CUMULATIVE_SETTLEMENT_TAX, <!-- 累计结算税金 -->
CUMULATIVE_PRICE_TAX, <!-- 累计结算价税合计金额 -->
REVIEW_STATUS, <!-- 审核状态 -->
CREATED_BY, <!-- 记录创建者 -->
CREATED_NAME, <!-- 记录创建名称 -->
CREATED_TIME, <!-- 记录创建时间 -->
UPDATED_BY, <!-- 记录修改者 -->
UPDATED_NAME, <!-- 记录修改名称 -->
UPDATED_TIME, <!-- 记录修改时间 -->
DEP_CODE <!-- 部门编码 -->
)
VALUES (#id#, #accountCode#, #companyCode#, #companyName#, #projCode#, #projName#, #contractNumber#, #contractName#, #settlementNumber#, #settlementType#, #contractDate#, #taxPoints#, #priceTaxSeparation#, #thisSettlementAmount#, #thisSettlementTax#, #thisPriceTax#, #totalContractPrice#, #cumulativeSettlementAmount#, #cumulativeSettlementTax#, #cumulativePriceTax#, #reviewStatus#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #depCode#)
<selectKey resultClass="long" keyProperty="id">
SELECT MAX(ID) AS "id" FROM ${hggpSchema}.HGCW008
</selectKey>
</insert>
<delete id="delete">
DELETE FROM ${hggpSchema}.HGCW008 WHERE
ID = #id#
</delete>
<update id="update">
UPDATE ${hggpSchema}.HGCW008
SET
ACCOUNT_CODE = #accountCode#, <!-- 企业编码 -->
COMPANY_CODE = #companyCode#, <!-- 公司编码 -->
COMPANY_NAME = #companyName#, <!-- 公司名称 -->
PROJ_CODE = #projCode#, <!-- 项目编码 -->
PROJ_NAME = #projName#, <!-- 项目名称 -->
CONTRACT_NUMBER = #contractNumber#, <!-- 合同号 -->
CONTRACT_NAME = #contractName#, <!-- 合同名称 -->
SETTLEMENT_NUMBER = #settlementNumber#, <!-- 结算编号 -->
SETTLEMENT_TYPE = #settlementType#, <!-- 结算类别;1部分结算2最终结算 -->
CONTRACT_DATE = #contractDate#, <!-- 结算日期 -->
TAX_POINTS = #taxPoints#, <!-- 税点 -->
PRICE_TAX_SEPARATION = #priceTaxSeparation#, <!-- 价税分离;1是2否 -->
THIS_SETTLEMENT_AMOUNT = #thisSettlementAmount#, <!-- 本次结算金额 -->
THIS_SETTLEMENT_TAX = #thisSettlementTax#, <!-- 本次结算税金 -->
THIS_PRICE_TAX = #thisPriceTax#, <!-- 本次结算价税合计金额 -->
TOTAL_CONTRACT_PRICE = #totalContractPrice#, <!-- 合同金额(元) -->
CUMULATIVE_SETTLEMENT_AMOUNT = #cumulativeSettlementAmount#, <!-- 累计结算金额 -->
CUMULATIVE_SETTLEMENT_TAX = #cumulativeSettlementTax#, <!-- 累计结算税金 -->
CUMULATIVE_PRICE_TAX = #cumulativePriceTax#, <!-- 累计结算价税合计金额 -->
REVIEW_STATUS = #reviewStatus#, <!-- 审核状态 -->
CREATED_BY = #createdBy#, <!-- 记录创建者 -->
CREATED_NAME = #createdName#, <!-- 记录创建名称 -->
CREATED_TIME = #createdTime#, <!-- 记录创建时间 -->
UPDATED_BY = #updatedBy#, <!-- 记录修改者 -->
UPDATED_NAME = #updatedName#, <!-- 记录修改名称 -->
UPDATED_TIME = #updatedTime#, <!-- 记录修改时间 -->
DEP_CODE = #depCode# <!-- 部门编码 -->
WHERE
ID = #id#
</update>
<select id="queryCalculateAmount" resultClass="java.util.HashMap">
SELECT
IFNULL(SUM( CUMULATIVE_SETTLEMENT_AMOUNT ),0) as "sumCumulativeSettlementAmount",
IFNULL(SUM( CUMULATIVE_SETTLEMENT_TAX ),0) as "sumCumulativeSettlementTax"
FROM ${hggpSchema}.HGCW008 WHERE 1=1
<include refid="condition" />
</select>
</sqlMap>
<?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-22 10:58:05
Version : 1.0
schema : hggp
tableName : HGCW009
ID BIGINT NOT NULL primarykey,
ACCOUNT_CODE VARCHAR,
COMPANY_CODE VARCHAR,
COMPANY_NAME VARCHAR,
SETTLEMENT_NUMBER VARCHAR,
SETTLEMENT_BASIS VARCHAR,
TASK_NAME VARCHAR,
ENGINEERING_CONTENT VARCHAR,
THIS_ENGINEERING_QUANTITY DECIMAL,
CUMULATIVE_ENGINEERING_QUANTITY DECIMAL,
UNIT VARCHAR,
UNIT_PRICE DECIMAL,
TOTAL_PRICE DECIMAL,
INVENTORY_ID BIGINT,
CREATED_BY VARCHAR NOT NULL,
CREATED_NAME VARCHAR NOT NULL,
CREATED_TIME VARCHAR NOT NULL,
UPDATED_BY VARCHAR NOT NULL,
UPDATED_NAME VARCHAR NOT NULL,
UPDATED_TIME VARCHAR NOT NULL,
DEP_CODE VARCHAR
-->
<sqlMap namespace="HGCW009">
<sql id="condition">
<include refid="HGXSDataAuth.authCondition"/>
<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="settlementNumber">
SETTLEMENT_NUMBER = #settlementNumber#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="settlementBasis">
SETTLEMENT_BASIS = #settlementBasis#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="taskName">
TASK_NAME = #taskName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="engineeringContent">
ENGINEERING_CONTENT = #engineeringContent#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="thisEngineeringQuantity">
THIS_ENGINEERING_QUANTITY = #thisEngineeringQuantity#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="cumulativeEngineeringQuantity">
CUMULATIVE_ENGINEERING_QUANTITY = #cumulativeEngineeringQuantity#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="unit">
UNIT = #unit#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="unitPrice">
UNIT_PRICE = #unitPrice#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="totalPrice">
TOTAL_PRICE = #totalPrice#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventoryId">
INVENTORY_ID = #inventoryId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="remarks">
REMARKS = #remarks#
</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="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
</sql>
<select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hggp.hg.cw.domain.HGCW009">
SELECT
ID as "id",
ACCOUNT_CODE as "accountCode", <!-- 企业编码 -->
COMPANY_CODE as "companyCode", <!-- 公司编码 -->
COMPANY_NAME as "companyName", <!-- 公司名称 -->
SETTLEMENT_NUMBER as "settlementNumber", <!-- 结算编号 -->
SETTLEMENT_BASIS as "settlementBasis", <!-- 结算依据 -->
TASK_NAME as "taskName", <!-- 任务名称 -->
ENGINEERING_CONTENT as "engineeringContent", <!-- 工程内容 -->
THIS_ENGINEERING_QUANTITY as "thisEngineeringQuantity", <!-- 本次结算工程量 -->
CUMULATIVE_ENGINEERING_QUANTITY as "cumulativeEngineeringQuantity", <!-- 至本次累计结算工程量 -->
UNIT as "unit", <!-- 单位 -->
UNIT_PRICE as "unitPrice", <!-- 单价 -->
TOTAL_PRICE as "totalPrice", <!-- 总价 -->
INVENTORY_ID as "inventoryId", <!-- 清单ID -->
REMARKS as "remarks", <!-- 结算依据 -->
CREATED_BY as "createdBy", <!-- 记录创建者 -->
CREATED_NAME as "createdName", <!-- 记录创建名称 -->
CREATED_TIME as "createdTime", <!-- 记录创建时间 -->
UPDATED_BY as "updatedBy", <!-- 记录修改者 -->
UPDATED_NAME as "updatedName", <!-- 记录修改名称 -->
UPDATED_TIME as "updatedTime", <!-- 记录修改时间 -->
DEP_CODE as "depCode" <!-- 部门编码 -->
FROM ${hggpSchema}.HGCW009 WHERE 1=1
<include refid="condition" />
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
ID asc
</isEmpty>
</dynamic>
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hggpSchema}.HGCW009 WHERE 1=1
<include refid="condition" />
</select>
<!--
<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="settlementNumber">
SETTLEMENT_NUMBER = #settlementNumber#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="settlementBasis">
SETTLEMENT_BASIS = #settlementBasis#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="taskName">
TASK_NAME = #taskName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="engineeringContent">
ENGINEERING_CONTENT = #engineeringContent#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="thisEngineeringQuantity">
THIS_ENGINEERING_QUANTITY = #thisEngineeringQuantity#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="cumulativeEngineeringQuantity">
CUMULATIVE_ENGINEERING_QUANTITY = #cumulativeEngineeringQuantity#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="unit">
UNIT = #unit#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="unitPrice">
UNIT_PRICE = #unitPrice#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="totalPrice">
TOTAL_PRICE = #totalPrice#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventoryId">
INVENTORY_ID = #inventoryId#
</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="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
-->
<insert id="insert">
INSERT INTO ${hggpSchema}.HGCW009 (ID,
ACCOUNT_CODE, <!-- 企业编码 -->
COMPANY_CODE, <!-- 公司编码 -->
COMPANY_NAME, <!-- 公司名称 -->
SETTLEMENT_NUMBER, <!-- 结算编号 -->
SETTLEMENT_BASIS, <!-- 结算依据 -->
TASK_NAME, <!-- 任务名称 -->
ENGINEERING_CONTENT, <!-- 工程内容 -->
THIS_ENGINEERING_QUANTITY, <!-- 本次结算工程量 -->
CUMULATIVE_ENGINEERING_QUANTITY, <!-- 至本次累计结算工程量 -->
UNIT, <!-- 单位 -->
UNIT_PRICE, <!-- 单价 -->
TOTAL_PRICE, <!-- 总价 -->
INVENTORY_ID, <!-- 清单ID -->
REMARKS, <!-- 结算依据 -->
CREATED_BY, <!-- 记录创建者 -->
CREATED_NAME, <!-- 记录创建名称 -->
CREATED_TIME, <!-- 记录创建时间 -->
UPDATED_BY, <!-- 记录修改者 -->
UPDATED_NAME, <!-- 记录修改名称 -->
UPDATED_TIME, <!-- 记录修改时间 -->
DEP_CODE <!-- 部门编码 -->
)
VALUES (#id#, #accountCode#, #companyCode#, #companyName#, #settlementNumber#, #settlementBasis#, #taskName#, #engineeringContent#, #thisEngineeringQuantity#, #cumulativeEngineeringQuantity#, #unit#, #unitPrice#, #totalPrice#, #inventoryId#, #remarks#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #depCode#)
</insert>
<delete id="delete">
DELETE FROM ${hggpSchema}.HGCW009 WHERE
ID = #id#
</delete>
<update id="update">
UPDATE ${hggpSchema}.HGCW009
SET
ACCOUNT_CODE = #accountCode#, <!-- 企业编码 -->
COMPANY_CODE = #companyCode#, <!-- 公司编码 -->
COMPANY_NAME = #companyName#, <!-- 公司名称 -->
SETTLEMENT_NUMBER = #settlementNumber#, <!-- 结算编号 -->
SETTLEMENT_BASIS = #settlementBasis#, <!-- 结算依据 -->
TASK_NAME = #taskName#, <!-- 任务名称 -->
ENGINEERING_CONTENT = #engineeringContent#, <!-- 工程内容 -->
THIS_ENGINEERING_QUANTITY = #thisEngineeringQuantity#, <!-- 本次结算工程量 -->
CUMULATIVE_ENGINEERING_QUANTITY = #cumulativeEngineeringQuantity#, <!-- 至本次累计结算工程量 -->
UNIT = #unit#, <!-- 单位 -->
UNIT_PRICE = #unitPrice#, <!-- 单价 -->
TOTAL_PRICE = #totalPrice#, <!-- 总价 -->
INVENTORY_ID = #inventoryId#, <!-- 清单ID -->
REMARKS = #remarks#, <!-- 结算依据 -->
CREATED_BY = #createdBy#, <!-- 记录创建者 -->
CREATED_NAME = #createdName#, <!-- 记录创建名称 -->
CREATED_TIME = #createdTime#, <!-- 记录创建时间 -->
UPDATED_BY = #updatedBy#, <!-- 记录修改者 -->
UPDATED_NAME = #updatedName#, <!-- 记录修改名称 -->
UPDATED_TIME = #updatedTime#, <!-- 记录修改时间 -->
DEP_CODE = #depCode# <!-- 部门编码 -->
WHERE
ID = #id#
</update>
<select id="queryEngineeringQuantity" resultClass="int">
SELECT IFNULL(SUM( THIS_ENGINEERING_QUANTITY ),0) as "sumEngineeringQuantity" FROM ${hggpSchema}.HGCW009 WHERE 1=1
<include refid="condition" />
</select>
</sqlMap>
...@@ -45,6 +45,15 @@ public class HGCWTools { ...@@ -45,6 +45,15 @@ public class HGCWTools {
}); });
return results.get(0); return results.get(0);
} }
public static void updateBalanceStatus(String contractNumber, Integer balanceStatus ) {
AssertUtils.isNull(contractNumber, "合同号不能为空!");
AssertUtils.isNull(balanceStatus, "结算状态不能为空!");
DaoUtils.update("HGCW002.updateBalanceStatus", new HashMap<String,Object>(){
{put("contractNumber",contractNumber);}
{put("balanceStatus",balanceStatus);}
});
}
} }
public static class HgCw003{ public static class HgCw003{
...@@ -112,6 +121,44 @@ public class HGCWTools { ...@@ -112,6 +121,44 @@ public class HGCWTools {
} }
} }
public static class HgCw008 {
public static HGCW008 getId(String id) {
AssertUtils.isNull(id, "结算单ID不能为空!");
List<HGCW008> results = DaoBase.getInstance().query(HGCW008.QUERY,new HashMap<String,Object>(){
{put("id",id);}
});
return results.get(0);
}
}
public static class HgCw009 {
public static void save(List<Map> rows, String settlementNumber, UserVO userVO) {
AssertUtils.isNull(settlementNumber, "结算单号不能为空!");
rows.forEach(row -> {
HGCW009 hgcw009 = new HGCW009();
hgcw009.fromMap(row);
hgcw009.setCompanyCode(userVO.getUsercode());
hgcw009.setCompanyName(userVO.getUsername());
hgcw009.setSettlementNumber(settlementNumber);
DaoUtils.insert(HGCW009.INSERT, hgcw009);
});
}
/**
* 根据合同号获取合同清单
* @param settlementNumber
* @return
*/
public static List<HGCW009> queryBySettlementNumber(String settlementNumber) {
AssertUtils.isNull(settlementNumber, "结算单号不能为空!");
List<HGCW009> results = DaoBase.getInstance().query(HGCW009.QUERY,new HashMap<String,Object>(){
{put("contractNumber",settlementNumber);}
});
return results;
}
}
public static class HgCw999 { public static class HgCw999 {
public static void batchUpdate(List<Map> rows, Long id) { public static void batchUpdate(List<Map> rows, Long id) {
......
...@@ -32,6 +32,7 @@ public class HGSB007 extends DaoEPBase { ...@@ -32,6 +32,7 @@ public class HGSB007 extends DaoEPBase {
public static final String FIELD_UPKEEP_CODE = "upkeepCode"; /* 保养单号*/ public static final String FIELD_UPKEEP_CODE = "upkeepCode"; /* 保养单号*/
public static final String FIELD_GROUP_CODE = "groupCode"; /* 设备区域编码*/ public static final String FIELD_GROUP_CODE = "groupCode"; /* 设备区域编码*/
public static final String FIELD_GROUP_NAME = "groupName"; /* 设备区域名称*/ public static final String FIELD_GROUP_NAME = "groupName"; /* 设备区域名称*/
public static final String FIELD_PLAN_CODE = "planCode"; /* 计划单号*/
public static final String FIELD_PLAN_START_DATE = "planStartDate"; /* 计划开始日期*/ public static final String FIELD_PLAN_START_DATE = "planStartDate"; /* 计划开始日期*/
public static final String FIELD_PLAN_END_DATE = "planEndDate"; /* 计划结束日期*/ public static final String FIELD_PLAN_END_DATE = "planEndDate"; /* 计划结束日期*/
public static final String FIELD_DEVICE_TYPE = "deviceType"; /* 设备类型*/ public static final String FIELD_DEVICE_TYPE = "deviceType"; /* 设备类型*/
...@@ -90,6 +91,7 @@ public class HGSB007 extends DaoEPBase { ...@@ -90,6 +91,7 @@ public class HGSB007 extends DaoEPBase {
private String upkeepCode = " "; /* 保养单号*/ private String upkeepCode = " "; /* 保养单号*/
private String groupCode = " "; /* 设备区域编码*/ private String groupCode = " "; /* 设备区域编码*/
private String groupName = " "; /* 设备区域名称*/ private String groupName = " "; /* 设备区域名称*/
private String planCode = " "; /* 计划单号*/
private String planStartDate = " "; /* 计划开始日期*/ private String planStartDate = " "; /* 计划开始日期*/
private String planEndDate = " "; /* 计划结束日期*/ private String planEndDate = " "; /* 计划结束日期*/
private String deviceType = " "; /* 设备类型*/ private String deviceType = " "; /* 设备类型*/
...@@ -170,6 +172,10 @@ public class HGSB007 extends DaoEPBase { ...@@ -170,6 +172,10 @@ public class HGSB007 extends DaoEPBase {
eiColumn.setDescName("保养单号"); eiColumn.setDescName("保养单号");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PLAN_CODE);
eiColumn.setDescName("计划单号");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PLAN_START_DATE); eiColumn = new EiColumn(FIELD_PLAN_START_DATE);
eiColumn.setDescName("计划开始日期"); eiColumn.setDescName("计划开始日期");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
...@@ -634,6 +640,14 @@ public class HGSB007 extends DaoEPBase { ...@@ -634,6 +640,14 @@ public class HGSB007 extends DaoEPBase {
this.planEndDate = planEndDate; this.planEndDate = planEndDate;
} }
public String getPlanCode() {
return planCode;
}
public void setPlanCode(String planCode) {
this.planCode = planCode;
}
/** /**
* get the value from Map. * get the value from Map.
* *
...@@ -671,6 +685,7 @@ public class HGSB007 extends DaoEPBase { ...@@ -671,6 +685,7 @@ public class HGSB007 extends DaoEPBase {
setRemainderDays(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_REMAINDER_DAYS)), remainderDays)); setRemainderDays(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_REMAINDER_DAYS)), remainderDays));
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));
setPlanCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PLAN_CODE)), planCode));
} }
/** /**
...@@ -709,6 +724,7 @@ public class HGSB007 extends DaoEPBase { ...@@ -709,6 +724,7 @@ public class HGSB007 extends DaoEPBase {
map.put(FIELD_REMAINDER_DAYS, StringUtils.toString(remainderDays, eiMetadata.getMeta(FIELD_REMAINDER_DAYS))); map.put(FIELD_REMAINDER_DAYS, StringUtils.toString(remainderDays, eiMetadata.getMeta(FIELD_REMAINDER_DAYS)));
map.put(FIELD_PLAN_START_DATE, StringUtils.toString(planStartDate, eiMetadata.getMeta(FIELD_PLAN_START_DATE))); map.put(FIELD_PLAN_START_DATE, StringUtils.toString(planStartDate, eiMetadata.getMeta(FIELD_PLAN_START_DATE)));
map.put(FIELD_PLAN_END_DATE, StringUtils.toString(planEndDate, eiMetadata.getMeta(FIELD_PLAN_END_DATE))); map.put(FIELD_PLAN_END_DATE, StringUtils.toString(planEndDate, eiMetadata.getMeta(FIELD_PLAN_END_DATE)));
map.put(FIELD_PLAN_CODE, StringUtils.toString(planCode, eiMetadata.getMeta(FIELD_PLAN_CODE)));
return map; return map;
} }
......
...@@ -91,6 +91,7 @@ public class ServiceHGSB004 extends ServiceEPBase { ...@@ -91,6 +91,7 @@ public class ServiceHGSB004 extends ServiceEPBase {
map1.put(HGSB002.FIELD_PLAN_CODE,hgsb004.getPlanCode()); map1.put(HGSB002.FIELD_PLAN_CODE,hgsb004.getPlanCode());
map1.put(HGSB002.FIELD_PLAN_START_DATE,hgsb004.getPlanStartDate()); map1.put(HGSB002.FIELD_PLAN_START_DATE,hgsb004.getPlanStartDate());
map1.put(HGSB002.FIELD_PLAN_END_DATE,hgsb004.getPlanEndDate()); map1.put(HGSB002.FIELD_PLAN_END_DATE,hgsb004.getPlanEndDate());
map1.put(HGSB002.FIELD_PLAN_TYPE,1);
List<HGSB002> list = DaoBase.getInstance().query(HGSB002.QUERY, map1); List<HGSB002> list = DaoBase.getInstance().query(HGSB002.QUERY, map1);
for (HGSB002 hgsb002 : list){ for (HGSB002 hgsb002 : list){
hgsb002.setTaskStatus(0); hgsb002.setTaskStatus(0);
......
...@@ -3,6 +3,7 @@ package com.baosight.hggp.hg.sb.service; ...@@ -3,6 +3,7 @@ package com.baosight.hggp.hg.sb.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation; import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.common.DdynamicEnum; import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.core.constant.CommonConstant; import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.dao.DaoBase;
import com.baosight.hggp.core.dao.DaoUtils; import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.core.security.UserSessionUtils; import com.baosight.hggp.core.security.UserSessionUtils;
import com.baosight.hggp.hg.constant.HGConstant; import com.baosight.hggp.hg.constant.HGConstant;
...@@ -77,26 +78,32 @@ public class ServiceHGSB005 extends ServiceEPBase { ...@@ -77,26 +78,32 @@ public class ServiceHGSB005 extends ServiceEPBase {
public EiInfo delete(EiInfo inInfo) { public EiInfo delete(EiInfo inInfo) {
int i = 0; int i = 0;
try { try {
HGSB005 hgsb005 = new HGSB005();
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock); EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
for (i = 0; i < eiBlock.getRowCount(); i++) { for (i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i); Map<?, ?> map = eiBlock.getRow(i);
HGSB005 hgsb005 = new HGSB005();
hgsb005.fromMap(map); hgsb005.fromMap(map);
hgsb005.setDeleteFlag(CommonConstant.YesNo.YES_1); hgsb005.setDeleteFlag(CommonConstant.YesNo.YES_1);
if (hgsb005.getCheckStatus()==1) { if (hgsb005.getCheckStatus()==1) {
String str = "设备保养已审批完成,无法删除!"; throw new PlatException("设备保养已审批完成,无法删除!");
throw new PlatException(str); }
Map map1 = new HashMap<>();
map1.put(HGSB002.FIELD_COMPANY_CODE,hgsb005.getCompanyCode());
map1.put(HGSB002.FIELD_PLAN_CODE,hgsb005.getPlanCode());
map1.put(HGSB002.FIELD_PLAN_START_DATE,hgsb005.getPlanStartDate());
map1.put(HGSB002.FIELD_PLAN_END_DATE,hgsb005.getPlanEndDate());
map1.put(HGSB002.FIELD_PLAN_TYPE,2);
List<HGSB002> list = DaoBase.getInstance().query(HGSB002.QUERY, map1);
for (HGSB002 hgsb002 : list){
hgsb002.setTaskStatus(0);
DaoUtils.update(HGSB002.UPDATE, hgsb002);
} }
DaoUtils.update(HGSB005.DELETE_FLAG, hgsb005.toMap()); DaoUtils.update(HGSB005.DELETE_FLAG, hgsb005.toMap());
} }
inInfo.setStatus(EiConstant.STATUS_SUCCESS); inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsgByKey("ep.1000", new String[]{String.valueOf(i), I18nMessages.getText("label.delete", "删除")}); inInfo.setMsgByKey("ep.1000", new String[]{String.valueOf(i), I18nMessages.getText("label.delete", "删除")});
} catch (PlatException e) { } catch (PlatException e) {
e.printStackTrace(); LogUtils.setDetailMsg(inInfo, e, "删除失败");
inInfo.setStatus(EiConstant.STATUS_FAILURE);
ErrorCodeUtils.handleDeleteException(inInfo,i,e);
logError("删除失败", e.getMessage());
return inInfo;
} }
return inInfo; return inInfo;
} }
...@@ -157,11 +164,7 @@ public class ServiceHGSB005 extends ServiceEPBase { ...@@ -157,11 +164,7 @@ public class ServiceHGSB005 extends ServiceEPBase {
inInfo.setStatus(EiConstant.STATUS_SUCCESS); inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsgByKey("ep.1000", new String[]{String.valueOf(i), I18nMessages.getText("label.update", "修改")}); inInfo.setMsgByKey("ep.1000", new String[]{String.valueOf(i), I18nMessages.getText("label.update", "修改")});
} catch (PlatException e) { } catch (PlatException e) {
e.printStackTrace(); LogUtils.setDetailMsg(inInfo, e, "修改失败");
inInfo.setStatus(EiConstant.STATUS_FAILURE);
ErrorCodeUtils.handleUpdateException(inInfo,i,e);
logError("修改失败", e.getMessage());
return inInfo;
} }
return inInfo; return inInfo;
} }
......
...@@ -4,9 +4,7 @@ import com.baosight.hggp.aspect.annotation.OperationLogAnnotation; ...@@ -4,9 +4,7 @@ import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.common.DdynamicEnum; import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.core.constant.CommonConstant; import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.dao.DaoUtils; import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.hg.sb.domain.HGSB002; import com.baosight.hggp.hg.sb.domain.*;
import com.baosight.hggp.hg.sb.domain.HGSB005A;
import com.baosight.hggp.hg.sb.domain.HGSB005;
import com.baosight.hggp.hg.sb.tools.HGSBTools; import com.baosight.hggp.hg.sb.tools.HGSBTools;
import com.baosight.hggp.hg.xs.domain.Org; import com.baosight.hggp.hg.xs.domain.Org;
import com.baosight.hggp.util.CommonMethod; import com.baosight.hggp.util.CommonMethod;
...@@ -63,10 +61,16 @@ public class ServiceHGSB005A extends ServiceEPBase { ...@@ -63,10 +61,16 @@ public class ServiceHGSB005A extends ServiceEPBase {
public EiInfo delete(EiInfo inInfo) { public EiInfo delete(EiInfo inInfo) {
int i = 0; int i = 0;
try { try {
HGSB005A hgsb005a = new HGSB005A(); Long parentId = Long.valueOf(inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGSB005A.FIELD_PARENT_ID));
HGSB005 hgsb005 = HGSBTools.Hgsb005.getId(parentId);
if (hgsb005.getCheckStatus().equals(CommonConstant.PlanStatus.UN_PLAN)){
throw new PlatException("设备保养审批完成,无法删除");
}
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock); EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
for (i = 0; i < eiBlock.getRowCount(); i++) { for (i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i); Map<?, ?> map = eiBlock.getRow(i);
HGSB005A hgsb005a = new HGSB005A();
hgsb005a.fromMap(map); hgsb005a.fromMap(map);
hgsb005a.setDeleteFlag(CommonConstant.YesNo.YES_1); hgsb005a.setDeleteFlag(CommonConstant.YesNo.YES_1);
DaoUtils.update(HGSB005A.DELETE_FLAG, hgsb005a.toMap()); DaoUtils.update(HGSB005A.DELETE_FLAG, hgsb005a.toMap());
...@@ -74,11 +78,7 @@ public class ServiceHGSB005A extends ServiceEPBase { ...@@ -74,11 +78,7 @@ public class ServiceHGSB005A extends ServiceEPBase {
inInfo.setStatus(EiConstant.STATUS_SUCCESS); inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsgByKey("ep.1000", new String[]{String.valueOf(i), I18nMessages.getText("label.delete", "删除")}); inInfo.setMsgByKey("ep.1000", new String[]{String.valueOf(i), I18nMessages.getText("label.delete", "删除")});
} catch (PlatException e) { } catch (PlatException e) {
e.printStackTrace(); LogUtils.setDetailMsg(inInfo, e, "删除失败");
inInfo.setStatus(EiConstant.STATUS_FAILURE);
ErrorCodeUtils.handleDeleteException(inInfo,i,e);
logError("删除失败", e.getMessage());
return inInfo;
} }
return inInfo; return inInfo;
} }
...@@ -88,9 +88,9 @@ public class ServiceHGSB005A extends ServiceEPBase { ...@@ -88,9 +88,9 @@ public class ServiceHGSB005A extends ServiceEPBase {
try { try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows(); List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
// 写入数据 // 写入数据
for (int i = 0; i < resultRows.size(); i++) { for (Map resultRow : resultRows) {
HGSB005A hgsb005a = new HGSB005A(); HGSB005A hgsb005a = new HGSB005A();
hgsb005a.fromMap(resultRows.get(i)); hgsb005a.fromMap(resultRow);
if (hgsb005a.getId() == null || hgsb005a.getId() == 0) { if (hgsb005a.getId() == null || hgsb005a.getId() == 0) {
hgsb005a.setParentId(Long.valueOf(inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGSB005A.FIELD_PARENT_ID))); hgsb005a.setParentId(Long.valueOf(inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGSB005A.FIELD_PARENT_ID)));
this.add(hgsb005a); this.add(hgsb005a);
......
...@@ -31,7 +31,7 @@ public class ServiceHGSB007 extends ServiceEPBase { ...@@ -31,7 +31,7 @@ public class ServiceHGSB007 extends ServiceEPBase {
EiInfo outInfo = super.initLoad(inInfo,new HGSB007()); EiInfo outInfo = super.initLoad(inInfo,new HGSB007());
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGSB007.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0); inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGSB007.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGSB005.FIELD_CHECK_STATUS, CommonConstant.YesNo.YES_1); inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGSB005.FIELD_CHECK_STATUS, CommonConstant.YesNo.YES_1);
outInfo = super.query(inInfo, HGSB007.QUERY, new HGSB007(),false, new EiBlockMeta(), EiConstant.queryBlock, CommonConstant.Field.DETAIL, CommonConstant.Field.DETAIL); outInfo = super.query(inInfo, HGSB007.QUERY, new HGSB007(),false, new HGSB007().eiMetadata, EiConstant.queryBlock, CommonConstant.Field.DETAIL, CommonConstant.Field.DETAIL);
Map qarma = new HashMap(); Map qarma = new HashMap();
if (!HGSBTools.getRoleDataAuth()){ if (!HGSBTools.getRoleDataAuth()){
String userId = "admin".equals(UserSessionUtils.getUserId())?"":UserSessionUtils.getUserId(); String userId = "admin".equals(UserSessionUtils.getUserId())?"":UserSessionUtils.getUserId();
......
...@@ -5,36 +5,52 @@ ...@@ -5,36 +5,52 @@
<typeAlias alias="HGSB006" type="com.baosight.hggp.hg.sb.domain.HGSB006"/> <typeAlias alias="HGSB006" type="com.baosight.hggp.hg.sb.domain.HGSB006"/>
<typeAlias alias="HashMap" type="java.util.HashMap"/> <typeAlias alias="HashMap" type="java.util.HashMap"/>
<sql id="column"> <sql id="column">
A.ID as "id", <!-- ID -->
A.ACCOUNT_CODE as "accountCode", <!-- 账套 --> A.ACCOUNT_CODE as "accountCode", <!-- 账套 -->
A.DEP_CODE as "depCode", <!-- 部门编码 --> A.DEP_CODE as "depCode", <!-- 部门编码 -->
A.CREATED_BY as "createdBy", <!-- 创建人 --> A.COMPANY_CODE as "companyCode", <!-- 公司编码 -->
A.CREATED_NAME as "createdName", <!-- 创建人名称 --> A.COMPANY_NAME as "companyName", <!-- 公司名称 -->
A.CREATED_TIME as "createdTime", <!-- 创建时间 -->
A.UPDATED_BY as "updatedBy", <!-- 修改人 -->
A.UPDATED_NAME as "updatedName", <!-- 修改人名称 -->
A.UPDATED_TIME as "updatedTime", <!-- 修改时间 -->
A.DELETE_FLAG as "deleteFlag", <!-- 是否删除 0-否1-是 -->
A.PARENT_ID as "parentId", <!-- 父级ID -->
B.COMPANY_CODE as "companyCode", <!-- 公司编码 -->
B.COMPANY_NAME as "companyName", <!-- 公司名称 -->
B.INSPEC_DATE as "inspecDate", <!-- 点检日期 -->
B.INSPEC_CODE as "inspecCode", <!-- 点检单号 -->
A.GROUP_CODE as "groupCode", <!-- 设备区域编码 --> A.GROUP_CODE as "groupCode", <!-- 设备区域编码 -->
A.GROUP_NAME as "groupName", <!-- 设备区域名称 --> A.GROUP_NAME as "groupName", <!-- 设备区域名称 -->
B.PLAN_CODE as "planCode", <!-- 计划单号 --> A.PLAN_CODE as "planCode", <!-- 计划单号 -->
B.PLAN_START_DATE as "planStartDate", <!-- 计划开始日期 --> A.PLAN_START_DATE as "planStartDate", <!-- 计划开始日期 -->
B.PLAN_END_DATE as "planEndDate", <!-- 计划结束日期 --> A.PLAN_END_DATE as "planEndDate", <!-- 计划结束日期 -->
A.DEVICE_TYPE as "deviceType", <!-- 设备类型 -->
A.DEVICE_CODE as "deviceCode", <!-- 设备编码 --> A.DEVICE_CODE as "deviceCode", <!-- 设备编码 -->
A.DEVICE_NAME as "deviceName", <!-- 设备名称 --> A.DEVICE_NAME as "deviceName", <!-- 设备名称 -->
A.DEVICE_MODEL as "deviceModel", <!-- 设备型号 -->
A.CHECK_ITEM as "checkItem", <!-- 检查项 -->
A.CHECK_DESCRIP as "checkDescrip", <!-- 检查描述 -->
A.CHECK_RESULT as "checkResult", <!-- 检查描述结果 --> A.CHECK_RESULT as "checkResult", <!-- 检查描述结果 -->
DATEDIFF(DATE_FORMAT(B.PLAN_END_DATE, '%Y-%m-%d'), CURDATE()) as "remainderDays", DATEDIFF(DATE_FORMAT(A.PLAN_END_DATE, '%Y-%m-%d'), CURDATE()) as "remainderDays",
A.DOC_ID as "docId", <!-- 附件ID --> A.DOC_ID as "docId" <!-- 附件ID -->
A.DOC_NAME as "docName" </sql>
<sql id="column001">
A.ACCOUNT_CODE, <!-- 账套 -->
A.DEP_CODE, <!-- 部门编码 -->
B.COMPANY_CODE, <!-- 公司编码 -->
B.COMPANY_NAME, <!-- 公司名称 -->
A.GROUP_CODE, <!-- 设备区域编码 -->
A.GROUP_NAME, <!-- 设备区域名称 -->
B.PLAN_CODE, <!-- 计划单号 -->
B.PLAN_START_DATE, <!-- 计划开始日期 -->
B.PLAN_END_DATE, <!-- 计划结束日期 -->
A.DEVICE_CODE, <!-- 设备编码 -->
A.DEVICE_NAME, <!-- 设备名称 -->
A.CHECK_RESULT, <!-- 检查描述结果 -->
A.DOC_ID <!-- 附件ID -->
</sql>
<sql id="column002">
A.ACCOUNT_CODE, <!-- 账套 -->
A.DEP_CODE, <!-- 部门编码 -->
B.COMPANY_CODE, <!-- 公司编码 -->
B.COMPANY_NAME, <!-- 公司名称 -->
A.GROUP_CODE, <!-- 设备区域编码 -->
A.GROUP_NAME, <!-- 设备区域名称 -->
B.PLAN_CODE, <!-- 计划单号 -->
B.PLAN_START_DATE, <!-- 计划开始日期 -->
B.PLAN_END_DATE, <!-- 计划结束日期 -->
A.DEVICE_CODE, <!-- 设备编码 -->
A.DEVICE_NAME, <!-- 设备名称 -->
'' as CHECK_RESULT, <!-- 检查描述结果 -->
'' as DOC_ID <!-- 附件ID -->
</sql> </sql>
<sql id="authCondition"> <sql id="authCondition">
...@@ -142,23 +158,83 @@ ...@@ -142,23 +158,83 @@
<select id="query" parameterClass="HashMap" resultClass="HGSB006"> <select id="query" parameterClass="HashMap" resultClass="HGSB006">
SELECT SELECT
<include refid="column"/> <include refid="column"/>
from (
SELECT
<include refid="column001"/>
FROM ${hggpSchema}.HGSB004A A FROM ${hggpSchema}.HGSB004A A
LEFT JOIN ${hggpSchema}.HGSB004 B ON A.PARENT_ID = B.ID WHERE 1=1 LEFT JOIN ${hggpSchema}.HGSB004 B ON A.PARENT_ID = B.ID WHERE 1=1
<include refid="condition" /> <include refid="condition" />
UNION ALL
SELECT
<include refid="column002"/>
from ${hggpSchema}.HGSB002A A
join ${hggpSchema}.HGSB002 B on A.PARENT_ID = B.ID AND B.DELETE_FLAG = '0'
where 1 = 1
and PLAN_END_DATE &lt; DATE_FORMAT(CURDATE(), '%Y%m%d')
AND TASK_STATUS = '0' AND B.PLAN_TYPE = '1'
<include refid="authCondition"/>
<isNotEmpty prepend=" AND " property="companyCode">
B.COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyName">
B.COMPANY_NAME LIKE CONCAT('%', #companyName#, '%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deviceName">
A.DEVICE_NAME LIKE CONCAT('%', #deviceName#, '%')
</isNotEmpty>
) A
where 1=1
<isEqual prepend=" AND " property="checkStatus" compareValue="1">
trim(A.DOC_ID) ='' and trim(A.CHECK_RESULT) = ''
</isEqual>
<isEqual prepend=" AND " property="checkStatus" compareValue="2">
(trim(A.DOC_ID) !='' or trim(A.CHECK_RESULT) != '')
</isEqual>
<dynamic prepend="ORDER BY"> <dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy"> <isNotEmpty property="orderBy">
$orderBy$ $orderBy$
</isNotEmpty> </isNotEmpty>
<isEmpty property="orderBy"> <isEmpty property="orderBy">
B.PLAN_START_DATE desc,B.PLAN_END_DATE desc, A.ID asc A.PLAN_START_DATE desc,A.PLAN_END_DATE desc
</isEmpty> </isEmpty>
</dynamic> </dynamic>
</select> </select>
<select id="count" resultClass="int"> <select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hggpSchema}.HGSB004A A SELECT
COUNT(*)
from (
SELECT
<include refid="column001"/>
FROM ${hggpSchema}.HGSB004A A
LEFT JOIN ${hggpSchema}.HGSB004 B ON A.PARENT_ID = B.ID WHERE 1=1 LEFT JOIN ${hggpSchema}.HGSB004 B ON A.PARENT_ID = B.ID WHERE 1=1
<include refid="condition" /> <include refid="condition" />
UNION ALL
SELECT
<include refid="column002"/>
from ${hggpSchema}.HGSB002A A
join ${hggpSchema}.HGSB002 B on A.PARENT_ID = B.ID AND B.DELETE_FLAG = '0'
where 1 = 1
and PLAN_END_DATE &lt; DATE_FORMAT(CURDATE(), '%Y%m%d')
AND TASK_STATUS = '0' AND B.PLAN_TYPE = '1'
<include refid="authCondition"/>
<isNotEmpty prepend=" AND " property="companyCode">
B.COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyName">
B.COMPANY_NAME LIKE CONCAT('%', #companyName#, '%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deviceName">
A.DEVICE_NAME LIKE CONCAT('%', #deviceName#, '%')
</isNotEmpty>
) A
where 1=1
<isEqual prepend=" AND " property="checkStatus" compareValue="1">
trim(A.DOC_ID) ='' and trim(A.CHECK_RESULT) = ''
</isEqual>
<isEqual prepend=" AND " property="checkStatus" compareValue="2">
(trim(A.DOC_ID) !='' or trim(A.CHECK_RESULT) != '')
</isEqual>
</select> </select>
</sqlMap> </sqlMap>
\ No newline at end of file
...@@ -6,35 +6,52 @@ ...@@ -6,35 +6,52 @@
<typeAlias alias="HashMap" type="java.util.HashMap"/> <typeAlias alias="HashMap" type="java.util.HashMap"/>
<sql id="column"> <sql id="column">
A.ID as "id", <!-- ID -->
A.ACCOUNT_CODE as "accountCode", <!-- 账套 --> A.ACCOUNT_CODE as "accountCode", <!-- 账套 -->
A.DEP_CODE as "depCode", <!-- 部门编码 --> A.DEP_CODE as "depCode", <!-- 部门编码 -->
A.CREATED_BY as "createdBy", <!-- 创建人 --> A.COMPANY_CODE as "companyCode", <!-- 公司编码 -->
A.CREATED_NAME as "createdName", <!-- 创建人名称 --> A.COMPANY_NAME as "companyName", <!-- 公司名称 -->
A.CREATED_TIME as "createdTime", <!-- 创建时间 -->
A.UPDATED_BY as "updatedBy", <!-- 修改人 -->
A.UPDATED_NAME as "updatedName", <!-- 修改人名称 -->
A.UPDATED_TIME as "updatedTime", <!-- 修改时间 -->
A.DELETE_FLAG as "deleteFlag", <!-- 是否删除 0-否1-是 -->
A.PARENT_ID as "parentId", <!-- 父级ID -->
B.COMPANY_CODE as "companyCode", <!-- 公司编码 -->
B.COMPANY_NAME as "companyName", <!-- 公司名称 -->
A.GROUP_CODE as "groupCode", <!-- 设备区域编码 --> A.GROUP_CODE as "groupCode", <!-- 设备区域编码 -->
A.GROUP_NAME as "groupName", <!-- 设备区域名称 --> A.GROUP_NAME as "groupName", <!-- 设备区域名称 -->
B.UPKEEP_DATE as "upkeepDate", <!-- 保养日期 --> A.PLAN_CODE as "planCode", <!-- 计划单号 -->
B.UPKEEP_CODE as "upkeepCode", <!-- 保养单号 --> A.PLAN_START_DATE as "planStartDate", <!-- 计划开始日期 -->
B.PLAN_START_DATE as "planStartDate", <!-- 计划开始日期 --> A.PLAN_END_DATE as "planEndDate", <!-- 计划结束日期 -->
B.PLAN_END_DATE as "planEndDate", <!-- 计划结束日期 -->
A.DEVICE_TYPE as "deviceType", <!-- 设备类型 -->
A.DEVICE_CODE as "deviceCode", <!-- 设备编码 --> A.DEVICE_CODE as "deviceCode", <!-- 设备编码 -->
A.DEVICE_NAME as "deviceName", <!-- 设备名称 --> A.DEVICE_NAME as "deviceName", <!-- 设备名称 -->
A.DEVICE_MODEL as "deviceModel", <!-- 设备型号 -->
A.CHECK_ITEM as "checkItem", <!-- 检查项 -->
A.CHECK_DESCRIP as "checkDescrip", <!-- 检查描述 -->
A.CHECK_RESULT as "checkResult", <!-- 检查描述结果 --> A.CHECK_RESULT as "checkResult", <!-- 检查描述结果 -->
A.DOC_ID as "docId", <!-- 附件ID --> A.DOC_ID as "docId", <!-- 附件ID -->
A.DOC_NAME as "docName", DATEDIFF(DATE_FORMAT(A.PLAN_END_DATE, '%Y-%m-%d'), CURDATE()) as "remainderDays"
DATEDIFF(DATE_FORMAT(B.PLAN_END_DATE, '%Y-%m-%d'), CURDATE()) as "remainderDays" </sql>
<sql id="column001">
A.ACCOUNT_CODE,
A.DEP_CODE,
B.COMPANY_CODE,
B.COMPANY_NAME,
A.GROUP_CODE,
A.GROUP_NAME,
B.PLAN_CODE,
B.PLAN_START_DATE,
B.PLAN_END_DATE,
A.DEVICE_CODE,
A.DEVICE_NAME,
A.CHECK_RESULT,
A.DOC_ID
</sql>
<sql id="column002">
A.ACCOUNT_CODE,
A.DEP_CODE,
B.COMPANY_CODE,
B.COMPANY_NAME,
A.GROUP_CODE,
A.GROUP_NAME,
B.PLAN_CODE,
B.PLAN_START_DATE,
B.PLAN_END_DATE,
A.DEVICE_CODE,
A.DEVICE_NAME,
'' as CHECK_RESULT,
'' as DOC_ID
</sql> </sql>
<sql id="authCondition"> <sql id="authCondition">
...@@ -58,7 +75,6 @@ ...@@ -58,7 +75,6 @@
</sql> </sql>
<sql id="condition"> <sql id="condition">
<include refid="authCondition"/>
<isNotEmpty prepend=" AND " property="id"> <isNotEmpty prepend=" AND " property="id">
A.ID = #id# A.ID = #id#
</isNotEmpty> </isNotEmpty>
...@@ -148,23 +164,85 @@ ...@@ -148,23 +164,85 @@
<select id="query" parameterClass="HashMap" resultClass="HGSB007"> <select id="query" parameterClass="HashMap" resultClass="HGSB007">
SELECT SELECT
<include refid="column"/> <include refid="column"/>
FROM (
SELECT
<include refid="column001"/>
FROM ${hggpSchema}.HGSB005A A FROM ${hggpSchema}.HGSB005A A
LEFT JOIN ${hggpSchema}.HGSB005 B ON A.PARENT_ID = B.ID WHERE 1=1 JOIN ${hggpSchema}.HGSB005 B ON A.PARENT_ID = B.ID AND B.DELETE_FLAG = '0' WHERE 1=1
<include refid="authCondition"/>
<include refid="condition" /> <include refid="condition" />
UNION ALL
SELECT
<include refid="column002"/>
from ${hggpSchema}.HGSB002A A
join ${hggpSchema}.HGSB002 B on A.PARENT_ID = B.ID AND B.DELETE_FLAG = '0'
where 1 = 1
and PLAN_END_DATE &lt; DATE_FORMAT(CURDATE(), '%Y%m%d')
AND TASK_STATUS = '0' AND B.PLAN_TYPE = '2'
<include refid="authCondition"/>
<isNotEmpty prepend=" AND " property="companyCode">
B.COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyName">
B.COMPANY_NAME LIKE CONCAT('%', #companyName#, '%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deviceName">
A.DEVICE_NAME LIKE CONCAT('%', #deviceName#, '%')
</isNotEmpty>
) A
WHERE 1=1
<isEqual prepend=" AND " property="upkeepStatus" compareValue="1">
trim(A.DOC_ID) ='' and trim(A.CHECK_RESULT) = ''
</isEqual>
<isEqual prepend=" AND " property="upkeepStatus" compareValue="2">
(trim(A.DOC_ID) !='' or trim(A.CHECK_RESULT) != '')
</isEqual>
<dynamic prepend="ORDER BY"> <dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy"> <isNotEmpty property="orderBy">
$orderBy$ $orderBy$
</isNotEmpty> </isNotEmpty>
<isEmpty property="orderBy"> <isEmpty property="orderBy">
B.UPKEEP_DATE desc, A.CREATED_TIME desc, A.ID asc A.PLAN_START_DATE desc, A.PLAN_END_DATE desc
</isEmpty> </isEmpty>
</dynamic> </dynamic>
</select> </select>
<select id="count" resultClass="int"> <select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hggpSchema}.HGSB005A A SELECT
LEFT JOIN ${hggpSchema}.HGSB005 B ON A.PARENT_ID = B.ID WHERE 1=1 COUNT(*)
FROM (
SELECT
<include refid="column001"/>
FROM ${hggpSchema}.HGSB005A A
JOIN ${hggpSchema}.HGSB005 B ON A.PARENT_ID = B.ID AND B.DELETE_FLAG = '0' WHERE 1=1
<include refid="authCondition"/>
<include refid="condition" /> <include refid="condition" />
UNION ALL
SELECT
<include refid="column002"/>
from ${hggpSchema}.HGSB002A A
join ${hggpSchema}.HGSB002 B on A.PARENT_ID = B.ID AND B.DELETE_FLAG = '0'
where 1 = 1
and PLAN_END_DATE &lt; DATE_FORMAT(CURDATE(), '%Y%m%d')
AND TASK_STATUS = '0' AND B.PLAN_TYPE = '2'
<include refid="authCondition"/>
<isNotEmpty prepend=" AND " property="companyCode">
B.COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyName">
B.COMPANY_NAME LIKE CONCAT('%', #companyName#, '%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deviceName">
A.DEVICE_NAME LIKE CONCAT('%', #deviceName#, '%')
</isNotEmpty>
) A
WHERE 1=1
<isEqual prepend=" AND " property="upkeepStatus" compareValue="1">
trim(A.DOC_ID) ='' and trim(A.CHECK_RESULT) = ''
</isEqual>
<isEqual prepend=" AND " property="upkeepStatus" compareValue="2">
(trim(A.DOC_ID) !='' or trim(A.CHECK_RESULT) != '')
</isEqual>
</select> </select>
</sqlMap> </sqlMap>
\ No newline at end of file
...@@ -5,10 +5,7 @@ import com.baosight.hggp.core.constant.CommonConstant; ...@@ -5,10 +5,7 @@ import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.dao.DaoBase; import com.baosight.hggp.core.dao.DaoBase;
import com.baosight.hggp.core.dao.DaoUtils; import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.core.security.UserSessionUtils; import com.baosight.hggp.core.security.UserSessionUtils;
import com.baosight.hggp.hg.sb.domain.HGSB002; import com.baosight.hggp.hg.sb.domain.*;
import com.baosight.hggp.hg.sb.domain.HGSB002A;
import com.baosight.hggp.hg.sb.domain.HGSB004;
import com.baosight.hggp.hg.sb.domain.HGSB004A;
import com.baosight.hggp.hg.xs.domain.Org; import com.baosight.hggp.hg.xs.domain.Org;
import com.baosight.hggp.hg.xs.domain.UserGroup; import com.baosight.hggp.hg.xs.domain.UserGroup;
import com.baosight.hggp.hg.xs.tools.HGXSTools; import com.baosight.hggp.hg.xs.tools.HGXSTools;
...@@ -168,4 +165,26 @@ public class HGSBTools { ...@@ -168,4 +165,26 @@ public class HGSBTools {
return results; return results;
} }
} }
public static class Hgsb005 {
public static HGSB005 getId(Long id) {
AssertUtils.isNull(id, "设备保养不能为空");
Map queryMap = new HashMap();
queryMap.put(HGSB005.FIELD_ID, id);
queryMap.put(HGSB005.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
List<HGSB005> results = DaoBase.getInstance().query(HGSB005.QUERY, queryMap);
AssertUtils.isEmpty(results, "设备保养不存在");
return results.get(0);
}
public static List<HGSB005A> getDetails(Long parentId) {
AssertUtils.isNull(parentId, "设备保养不能为空");
Map queryMap = new HashMap();
queryMap.put(HGSB005A.FIELD_PARENT_ID, parentId);
queryMap.put(HGSB005A.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
List<HGSB005A> results = DaoBase.getInstance().query(HGSB005A.QUERY, queryMap);
return results;
}
}
} }
...@@ -63,6 +63,7 @@ public class HGSC001A extends DaoEPBase { ...@@ -63,6 +63,7 @@ public class HGSC001A extends DaoEPBase {
public static final String DELETE = "HGSC001A.delete"; public static final String DELETE = "HGSC001A.delete";
public static final String DELETE_BY_PROJID = "HGSC001A.deleteByProjId"; public static final String DELETE_BY_PROJID = "HGSC001A.deleteByProjId";
public static final String DELETE_BY_PROJIDS = "HGSC001A.deleteByProjIds"; public static final String DELETE_BY_PROJIDS = "HGSC001A.deleteByProjIds";
public static final String DELETE_NOT_IDS = "HGSC001A.deleteNotIds";
private Long id = new Long(0); private Long id = new Long(0);
private Long projId = new Long(0); /* 项目ID*/ private Long projId = new Long(0); /* 项目ID*/
......
...@@ -156,7 +156,7 @@ public class ServiceHGSC001 extends ServiceBase { ...@@ -156,7 +156,7 @@ public class ServiceHGSC001 extends ServiceBase {
AssertUtils.isEmpty(hgsc001.getStartDate(), "请选择开工日期!"); AssertUtils.isEmpty(hgsc001.getStartDate(), "请选择开工日期!");
AssertUtils.isEmpty(hgsc001.getEndDate(), "请选择完工日期!"); AssertUtils.isEmpty(hgsc001.getEndDate(), "请选择完工日期!");
AssertUtils.isTrue(DateUtil.toDate(hgsc001.getEndDate(),DateUtil.DATE10_PATTERN).compareTo( AssertUtils.isTrue(DateUtil.toDate(hgsc001.getEndDate(),DateUtil.DATE10_PATTERN).compareTo(
DateUtil.toDate(hgsc001.getStartDate(),DateUtil.DATE10_PATTERN))>0,"完工日期不能大于开工日期!"); DateUtil.toDate(hgsc001.getStartDate(),DateUtil.DATE10_PATTERN))<0,"完工日期不能大于开工日期!");
AssertUtils.isNull(hgsc001.getProjStatus(), "请选择项目状态!"); AssertUtils.isNull(hgsc001.getProjStatus(), "请选择项目状态!");
AssertUtils.isEmpty(hgsc001.getContractWorkTxt(), "请填写合同工作量!"); AssertUtils.isEmpty(hgsc001.getContractWorkTxt(), "请填写合同工作量!");
......
...@@ -71,9 +71,18 @@ public class ServiceHGSC005A extends ServiceBase { ...@@ -71,9 +71,18 @@ public class ServiceHGSC005A extends ServiceBase {
} }
private void checkSaveData(List<HGSC005A> hgsc005AList) { private void checkSaveData(List<HGSC005A> hgsc005AList) {
AssertUtils.isEmpty(hgsc005AList,"保存数据为空,请勾选后修改保存!");
AssertUtils.isEmpty(hgsc005AList.get(0).getPlanCode(),"生产计划详情数据异常,请联系管理员!");
HGSC005 hgsc005 = HGSCTools.THGSC005.queryByPlanCode(hgsc005AList.get(0).getPlanCode());
AssertUtils.isTrue(Objects.isNull(hgsc005.getCommitStatus()),"生产计划状态异常,请联系管理员!");
AssertUtils.isTrue(hgsc005.getCommitStatus().compareTo(CommonConstant.YesNo.NO_0)>0,"生产计划已提交,不可修改!");
for (HGSC005A hgsc005a : hgsc005AList) { for (HGSC005A hgsc005a : hgsc005AList) {
AssertUtils.isEmpty(hgsc005a.getPlanStartDate(), String.format("产品[%s]计划开工日期为空!", hgsc005a.getProductName())); AssertUtils.isEmpty(hgsc005a.getPlanStartDate(), String.format("产品[%s]计划开工日期为空!", hgsc005a.getProductName()));
AssertUtils.isEmpty(hgsc005a.getPlanEndDate(), String.format("产品[%s]计划开始完工日期为空!", hgsc005a.getProductName())); AssertUtils.isEmpty(hgsc005a.getPlanEndDate(), String.format("产品[%s]计划完工日期为空!", hgsc005a.getProductName()));
AssertUtils.isTrue(DateUtil.toDate(hgsc005a.getPlanEndDate(),DateUtil.DATE10_PATTERN).compareTo(
DateUtil.toDate(hgsc005a.getPlanStartDate(),DateUtil.DATE10_PATTERN))<0,String.format("产品[%s]计划完工日期不能大于开工日期!", hgsc005a.getProductName()));
} }
} }
......
...@@ -84,7 +84,8 @@ public class ServiceHGSC006A extends ServiceBase { ...@@ -84,7 +84,8 @@ public class ServiceHGSC006A extends ServiceBase {
HGSC007 hgsc007 = new HGSC007(); HGSC007 hgsc007 = new HGSC007();
BeanUtils.copyProperties(hgsc006A,hgsc007); BeanUtils.copyProperties(hgsc006A,hgsc007);
cleanBaseInfo(hgsc007); cleanBaseInfo(hgsc007);
hgsc007.setTaskCode(SequenceGenerator.getNextSequence(HGConstant.SequenceId.HGSC007_TASCK_CODE)); hgsc007.setTaskCode(SequenceGenerator.getNextSequence(HGConstant.SequenceId.HGSC007_TASK_CODE));
hgsc007.setMatId(hgsc006.getMatId());
hgsc007.setOrderId(hgsc006.getId()); hgsc007.setOrderId(hgsc006.getId());
hgsc007.setOrderDetailId(hgsc006A.getId()); hgsc007.setOrderDetailId(hgsc006A.getId());
hgsc007.setQuantity(assignQuantity); hgsc007.setQuantity(assignQuantity);
......
...@@ -30,7 +30,7 @@ import java.util.stream.Collectors; ...@@ -30,7 +30,7 @@ import java.util.stream.Collectors;
* 拆单派工 * 拆单派工
* *
*/ */
public class ServiceHGSC006C extends ServiceBase { public class ServiceHGSC006B extends ServiceBase {
/** /**
* 画面初始化. * 画面初始化.
...@@ -185,7 +185,8 @@ public class ServiceHGSC006C extends ServiceBase { ...@@ -185,7 +185,8 @@ public class ServiceHGSC006C extends ServiceBase {
HGSC007 add007 = new HGSC007(); HGSC007 add007 = new HGSC007();
BeanUtils.copyProperties(hgsc006A,add007); BeanUtils.copyProperties(hgsc006A,add007);
cleanBaseInfo(add007); cleanBaseInfo(add007);
add007.setTaskCode(SequenceGenerator.getNextSequence(HGConstant.SequenceId.HGSC007_TASCK_CODE)); add007.setTaskCode(SequenceGenerator.getNextSequence(HGConstant.SequenceId.HGSC007_TASK_CODE));
add007.setMatId(hgsc006.getMatId());
add007.setOrderId(hgsc006.getId()); add007.setOrderId(hgsc006.getId());
add007.setOrderDetailId(hgsc006A.getId()); add007.setOrderDetailId(hgsc006A.getId());
add007.setQuantity(hgsc007.getQuantity()); add007.setQuantity(hgsc007.getQuantity());
......
...@@ -200,6 +200,15 @@ ...@@ -200,6 +200,15 @@
proj_id IN <iterate close=")" open="(" conjunction="," property="projIds">#projIds[]#</iterate> proj_id IN <iterate close=")" open="(" conjunction="," property="projIds">#projIds[]#</iterate>
</delete> </delete>
<delete id="deleteNotIds">
DELETE FROM ${hggpSchema}.HGSC001A WHERE
proj_id = #projId#
<isNotEmpty prepend=" AND " property="notIds">
id NOT IN <iterate close=")" open="(" conjunction="," property="notIds">#notIds[]#</iterate>
</isNotEmpty>
</delete>
<update id="update"> <update id="update">
UPDATE ${hggpSchema}.HGSC001A UPDATE ${hggpSchema}.HGSC001A
SET SET
......
...@@ -199,7 +199,7 @@ ...@@ -199,7 +199,7 @@
$orderBy$ $orderBy$
</isNotEmpty> </isNotEmpty>
<isEmpty property="orderBy"> <isEmpty property="orderBy">
product_type asc ,process_order desc product_type asc , product_name, process_order desc
</isEmpty> </isEmpty>
</dynamic> </dynamic>
......
...@@ -239,8 +239,6 @@ ...@@ -239,8 +239,6 @@
UPDATE ${hggpSchema}.HGSC006 UPDATE ${hggpSchema}.HGSC006
SET SET
assign_status = #assignStatus#, <!-- 派工状态 0待派工;1部分派工;2已派工 --> assign_status = #assignStatus#, <!-- 派工状态 0待派工;1部分派工;2已派工 -->
assign_quantity = #assignQuantity#, <!-- 派工数量 -->
unassign_quantity = #unassignQuantity#, <!-- 未派工数量 -->
<include refid="updateRevise"/> <include refid="updateRevise"/>
WHERE order_code = #orderCode# WHERE order_code = #orderCode#
</update> </update>
......
...@@ -245,7 +245,7 @@ ...@@ -245,7 +245,7 @@
$orderBy$ $orderBy$
</isNotEmpty> </isNotEmpty>
<isEmpty property="orderBy"> <isEmpty property="orderBy">
product_type asc ,process_order desc product_type asc, product_name, process_order desc
</isEmpty> </isEmpty>
</dynamic> </dynamic>
...@@ -481,10 +481,10 @@ ...@@ -481,10 +481,10 @@
assign_quantity = #assignQuantity#, <!-- 派工数量 --> assign_quantity = #assignQuantity#, <!-- 派工数量 -->
unassign_quantity = #unassignQuantity#, <!-- 未派工数量 --> unassign_quantity = #unassignQuantity#, <!-- 未派工数量 -->
<isNotEmpty property="assignWeight"> <isNotEmpty property="assignWeight">
assign_weight = #assignWeight# assign_weight = #assignWeight#,
</isNotEmpty> </isNotEmpty>
<isNotEmpty property="unassignWeight"> <isNotEmpty property="unassignWeight">
unassign_weight = #unassignWeight# unassign_weight = #unassignWeight#,
</isNotEmpty> </isNotEmpty>
<include refid="updateRevise"/> <include refid="updateRevise"/>
WHERE id = #id# WHERE id = #id#
......
...@@ -225,7 +225,7 @@ ...@@ -225,7 +225,7 @@
$orderBy$ $orderBy$
</isNotEmpty> </isNotEmpty>
<isEmpty property="orderBy"> <isEmpty property="orderBy">
id desc, product_type asc ,process_order desc id desc, product_type asc, product_name, process_order desc
</isEmpty> </isEmpty>
</dynamic> </dynamic>
......
...@@ -64,7 +64,7 @@ public class HGSCTools { ...@@ -64,7 +64,7 @@ public class HGSCTools {
AssertUtils.isGt(new BigDecimal(totalNum), new BigDecimal(jhNum), "拆单的分派数量不能大于生产订单数量!"); AssertUtils.isGt(new BigDecimal(totalNum), new BigDecimal(jhNum), "拆单的分派数量不能大于生产订单数量!");
Map updateMap = new HashMap(); Map updateMap = new HashMap();
updateMap.put(hgsc006A.FIELD_id, hgsc006A.getId()); updateMap.put(hgsc006A.FIELD_id, hgsc006A.getId());
updateMap.put(HGSC006A.FIELD_quantity, totalNum); updateMap.put(HGSC006A.FIELD_assign_quantity, totalNum);
updateMap.put(HGSC006A.FIELD_unassign_quantity, jhNum - totalNum); updateMap.put(HGSC006A.FIELD_unassign_quantity, jhNum - totalNum);
if(Objects.nonNull(hgsc006A.getSingleWeight())&&hgsc006A.getSingleWeight().compareTo(BigDecimal.ZERO)>0) { if(Objects.nonNull(hgsc006A.getSingleWeight())&&hgsc006A.getSingleWeight().compareTo(BigDecimal.ZERO)>0) {
BigDecimal assignWeight = hgsc006A.getSingleWeight().multiply(new BigDecimal(totalNum)); BigDecimal assignWeight = hgsc006A.getSingleWeight().multiply(new BigDecimal(totalNum));
...@@ -162,6 +162,9 @@ public class HGSCTools { ...@@ -162,6 +162,9 @@ public class HGSCTools {
} }
public static List<HGSC001A> save(List<HGSC001A> hgsc001AList, Long projId){ public static List<HGSC001A> save(List<HGSC001A> hgsc001AList, Long projId){
THGSC001A.deleteNotIds(Optional.ofNullable(hgsc001AList).orElse(new ArrayList<>())
.stream().filter(o -> Objects.nonNull(o.getId())&&o.getId()>0)
.map(HGSC001A::getId).collect(Collectors.toList()),projId);
if(CollectionUtils.isNotEmpty(hgsc001AList)&&Objects.nonNull(projId)) { if(CollectionUtils.isNotEmpty(hgsc001AList)&&Objects.nonNull(projId)) {
hgsc001AList.forEach(obj -> { hgsc001AList.forEach(obj -> {
if(Objects.nonNull(obj.getId())&&obj.getId()>0){ if(Objects.nonNull(obj.getId())&&obj.getId()>0){
...@@ -181,6 +184,22 @@ public class HGSCTools { ...@@ -181,6 +184,22 @@ public class HGSCTools {
DaoUtils.update(HGSC001A.DELETE_BY_PROJIDS, new HashMap<String,Object>(){{put("projIds",projIds);}}); DaoUtils.update(HGSC001A.DELETE_BY_PROJIDS, new HashMap<String,Object>(){{put("projIds",projIds);}});
} }
} }
public static void deleteNotIds(List<Long> notIds, Long projId){
if(CollectionUtils.isNotEmpty(notIds)) {
//删除历史数据
DaoUtils.update(HGSC001A.DELETE_NOT_IDS, new HashMap<String,Object>(){{
put(HGSC001A.FIELD_proj_id,projId);
put("notIds",notIds);
}});
}
}
public static void deleteByProId(Long projId){
AssertUtils.isTrue(Objects.isNull(projId)||projId<=0, "项目ID不能为空!");
//删除历史数据
DaoUtils.update(HGSC001A.DELETE_BY_PROJID, new HashMap<String,Object>(){{put(HGSC001A.FIELD_proj_id,projId);}});
}
} }
public static class THGSC004A{ public static class THGSC004A{
public static void checkFatherSubmitStatus(Long matId) { public static void checkFatherSubmitStatus(Long matId) {
...@@ -468,7 +487,7 @@ public class HGSCTools { ...@@ -468,7 +487,7 @@ public class HGSCTools {
public static int schedule(String planCode) { public static int schedule(String planCode) {
List<HGSC005A> hgsc005AList = queryByPlanCode(planCode); List<HGSC005A> hgsc005AList = queryByPlanCode(planCode);
hgsc005AList.sort(Comparator.comparing(HGSC005A::getProductType).thenComparing(HGSC005A::getProcessOrder,Comparator.reverseOrder())); // hgsc005AList.sort(Comparator.comparing(HGSC005A::getProductType).thenComparing(HGSC005A::getProcessOrder,Comparator.reverseOrder()));
//通过工序编码查询工序设置 //通过工序编码查询工序设置
List<String> processCodes = hgsc005AList.stream().map(HGSC005A::getProcessCode).collect(Collectors.toList()); List<String> processCodes = hgsc005AList.stream().map(HGSC005A::getProcessCode).collect(Collectors.toList());
List<HGSJ001> hgsj001List = HGSJTools.Hgsj001.queryByProcessCodes(processCodes); List<HGSJ001> hgsj001List = HGSJTools.Hgsj001.queryByProcessCodes(processCodes);
...@@ -524,7 +543,7 @@ public class HGSCTools { ...@@ -524,7 +543,7 @@ public class HGSCTools {
ComputeTypeEnum computeType = ComputeTypeEnum.getEnumByCode(sj.getComputeType()); ComputeTypeEnum computeType = ComputeTypeEnum.getEnumByCode(sj.getComputeType());
switch (computeType){ switch (computeType){
case CD: case CD:
workHour.set(product.getLength().multiply(new BigDecimal(planInfo.getQuantity())).multiply(unitConver).multiply(composingCoeff) workHour.set(product.getLength().multiply(new BigDecimal(planInfo.getQuantity())).divide(unitConver, 2, ROUND_DOWN).multiply(composingCoeff)
.divide(timing,2, ROUND_DOWN) .divide(timing,2, ROUND_DOWN)
.multiply(baseWorkHour).add(finalRemainder)); .multiply(baseWorkHour).add(finalRemainder));
break; break;
...@@ -545,7 +564,7 @@ public class HGSCTools { ...@@ -545,7 +564,7 @@ public class HGSCTools {
BigDecimal day = workHour.get().divide(baseWorkHour, 0, ROUND_DOWN); BigDecimal day = workHour.get().divide(baseWorkHour, 0, ROUND_DOWN);
remainder = workHour.get().remainder(baseWorkHour); remainder = workHour.get().remainder(baseWorkHour);
if(day.compareTo(new BigDecimal(0))>0) { if(day.compareTo(new BigDecimal(0))>0) {
endDate = DateUtil.toDateStr(DateUtils.addDays(DateUtil.toDate(endDate,DateUtil.DATE10_PATTERN),day.intValue()),DateUtil.DATE10_PATTERN); endDate = DateUtil.toDateStr(DateUtils.addDays(DateUtil.toDate(endDate,DateUtil.DATE10_PATTERN),day.negate().intValue()),DateUtil.DATE10_PATTERN);
} }
planInfo.setPlanStartDate(endDate); planInfo.setPlanStartDate(endDate);
return remainder; return remainder;
...@@ -663,7 +682,7 @@ public class HGSCTools { ...@@ -663,7 +682,7 @@ public class HGSCTools {
public static class THGSC007{ public static class THGSC007{
public static HGSC007 getById(Long taskId){ public static HGSC007 getById(Long taskId){
AssertUtils.isTrue(Objects.isNull(taskId)||taskId<=0, "生产任务ID不能为空!"); AssertUtils.isTrue(Objects.isNull(taskId)||taskId<=0, "生产任务ID不能为空!");
HGSC007 results = (HGSC007)DaoBase.getInstance().get(HGSC006A.QUERY, HGSC007.FIELD_id, taskId); HGSC007 results = (HGSC007)DaoBase.getInstance().get(HGSC007.QUERY, HGSC007.FIELD_id, taskId);
return results; return results;
} }
/** /**
......
...@@ -37,8 +37,11 @@ ...@@ -37,8 +37,11 @@
<sqlMap resource="com/baosight/hggp/hg/cw/sql/HGCW001.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/HGCW002.xml"/>
<sqlMap resource="com/baosight/hggp/hg/cw/sql/HGCW003.xml"/> <sqlMap resource="com/baosight/hggp/hg/cw/sql/HGCW003.xml"/>
<sqlMap resource="com/baosight/hggp/hg/cw/sql/HGCW004.xml"/>
<sqlMap resource="com/baosight/hggp/hg/cw/sql/HGCW006.xml"/> <sqlMap resource="com/baosight/hggp/hg/cw/sql/HGCW006.xml"/>
<sqlMap resource="com/baosight/hggp/hg/cw/sql/HGCW007.xml"/> <sqlMap resource="com/baosight/hggp/hg/cw/sql/HGCW007.xml"/>
<sqlMap resource="com/baosight/hggp/hg/cw/sql/HGCW008.xml"/>
<sqlMap resource="com/baosight/hggp/hg/cw/sql/HGCW009.xml"/>
<!--配置--> <!--配置-->
......
...@@ -24,8 +24,8 @@ $(function() { ...@@ -24,8 +24,8 @@ $(function() {
let auditStatus = item.status; let auditStatus = item.status;
let template = ''; let template = '';
if (item.id) { if (item.id) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' let template = '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="uploadFile(' + item.id + ')" >附件上传</a>'; + 'onclick="fileDetailFunc(' + item.id + ')">附件详情</a>';
} }
return template; return template;
...@@ -254,67 +254,13 @@ function updateStatus(id,deviceStatus) { ...@@ -254,67 +254,13 @@ function updateStatus(id,deviceStatus) {
} }
); );
} }
/**
* 文件上传
*
* @param id
*/
function uploadFile(id) {
JSColorbox.open({
href: "HGCW004A?methodName=initLoad&inqu_status-0-id="+id,
title: "<div style='text-align: center;'>附件上传</div>",
width: "60%",
height: "50%",
callbackName: uploadFileCallback
});
}
/**
* 附件上传回调
*
* @param docId
*/
function uploadFileCallback(result) {
let inEiInfo = new EiInfo();
inEiInfo.set("result-0-id", result.id);
inEiInfo.set("result-0-docId", result.docId);
inEiInfo.set("result-0-docName", result.docName);
EiCommunicator.send('HGCW004', 'updateDocId', inEiInfo, {
onSuccess(ei) {
if (ei.status == "-1") {
NotificationUtil({msg: ei.msg, detailMsg: ei.detailMsg}, "error");
} else {
NotificationUtil(ei.msg);
query();
}
},
onFail(errorMessage, status, e) {
NotificationUtil("执行失败!", "error");
}
}, {
async: false
});
}
function loadChange(grid,e,field) { function fileDetailFunc(id) {
var cell_label = field,that = grid; JSColorbox.open({
// locked 表示是否为固定列 href: "HGCW999?methodName=initLoad&inqu_status-0-bizType=QZ&inqu_status-0-matId=" + id + "&efParentFormEname=HGCW004",
var locked = that.isCellLocked(cell_label); title: "<div style='text-align: center;'>附件清单</div>",
// tr 表示 locked 和非 locked 的行,index 表示此行的第几列 width: "80%",
var tr,index; height: "80%",
// 获取此 model 元素信息 });
var item = e.items[0];
var _uid = item.uid;
if (locked) {
tr = $(".k-grid-content-locked tr[data-uid="+ _uid +"]");
index = $("th[data-field='"+cell_label+"']").data("index");
} else {
tr = $(".k-grid-content tr[data-uid="+ _uid +"]");
index = parseInt($("th[data-field='"+cell_label+"']").data("index")) - that.lockedHeader.find("th").length;
}
// 获取子 cell(td)
var td = tr.children("td:eq("+index+")");
// 触发 td.click 事件,
td.trigger("click");
} }
...@@ -23,7 +23,7 @@ $(function() { ...@@ -23,7 +23,7 @@ $(function() {
let template = ''; let template = '';
if (item.id) { if (item.id) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="uploadFile(' + item.id + ')" >附件上传</a>'; + 'onclick="fileDetailFunc(' + item.id + ')" >附件上传</a>';
} }
return template; return template;
...@@ -35,7 +35,7 @@ $(function() { ...@@ -35,7 +35,7 @@ $(function() {
query: function (container, params) { query: function (container, params) {
var queryInfo = new EiInfo(); var queryInfo = new EiInfo();
// info.set("reviewStatus","3") // info.set("reviewStatus","3")
queryInfo.set("contractType","2") queryInfo.set("contractTyps","2,4")
return queryInfo; return queryInfo;
}, },
init: function (e, options) { init: function (e, options) {
...@@ -104,39 +104,7 @@ function saveFunc() { ...@@ -104,39 +104,7 @@ function saveFunc() {
return; return;
} }
let flag = true; let flag = true;
// $.each(rows, function(index, item) {
// let companyCode= item.get("companyCode");
// let accountYear= item.get("accountYear");
// let accountPeriod= item.get("accountPeriod");
// let accountPeriodDateStart= item.get("accountPeriodStatus");
// let accountPeriodDateEnd= item.get("accountPeriodStatus");
//
// if(isBlank(companyCode)){
// message("选中的第"+(index+1)+"行\"公司名称\",不能为空!");
// flag = false;
// return false;
// }
// if(isBlank(accountYear)){
// message("选中的第"+(index+1)+"行\"会计年度\",不能为空!");
// flag = false;
// return false;
// }
// if(isBlank(accountPeriod)){
// message("选中的第"+(index+1)+"行\"会计期\",不能为空!");
// flag = false;
// return false;
// }
// if(isBlank(accountPeriodDateStart)){
// message("选中的第"+(index+1)+"行\"账期开始日期\",不能为空!");
// flag = false;
// return false;
// }
// if(isBlank(accountPeriodDateEnd)){
// message("选中的第"+(index+1)+"行\"账期结束日期\",不能为空!");
// flag = false;
// return false;
// }
// });
if(flag) { if(flag) {
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"保存\"操作? ", { JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"保存\"操作? ", {
ok: function () { ok: function () {
...@@ -220,70 +188,6 @@ function updateStatus(id,deviceStatus) { ...@@ -220,70 +188,6 @@ function updateStatus(id,deviceStatus) {
} }
); );
} }
/**
* 文件上传
*
* @param id
*/
function uploadFile(id) {
JSColorbox.open({
href: "HGCW005A?methodName=initLoad&inqu_status-0-id="+id,
title: "<div style='text-align: center;'>附件上传</div>",
width: "60%",
height: "50%",
callbackName: uploadFileCallback
});
}
/**
* 附件上传回调
*
* @param docId
*/
function uploadFileCallback(result) {
let inEiInfo = new EiInfo();
inEiInfo.set("result-0-id", result.id);
inEiInfo.set("result-0-docId", result.docId);
inEiInfo.set("result-0-docName", result.docName);
EiCommunicator.send('HGCW005', 'updateDocId', inEiInfo, {
onSuccess(ei) {
if (ei.status == "-1") {
NotificationUtil({msg: ei.msg, detailMsg: ei.detailMsg}, "error");
} else {
NotificationUtil(ei.msg);
query();
}
},
onFail(errorMessage, status, e) {
NotificationUtil("执行失败!", "error");
}
}, {
async: false
});
}
function loadChange(grid,e,field) {
var cell_label = field,that = grid;
// locked 表示是否为固定列
var locked = that.isCellLocked(cell_label);
// tr 表示 locked 和非 locked 的行,index 表示此行的第几列
var tr,index;
// 获取此 model 元素信息
var item = e.items[0];
var _uid = item.uid;
if (locked) {
tr = $(".k-grid-content-locked tr[data-uid="+ _uid +"]");
index = $("th[data-field='"+cell_label+"']").data("index");
} else {
tr = $(".k-grid-content tr[data-uid="+ _uid +"]");
index = parseInt($("th[data-field='"+cell_label+"']").data("index")) - that.lockedHeader.find("th").length;
}
// 获取子 cell(td)
var td = tr.children("td:eq("+index+")");
// 触发 td.click 事件,
td.trigger("click");
}
function submitFunc() { function submitFunc() {
let rows = resultGrid.getCheckedRows(); let rows = resultGrid.getCheckedRows();
if (rows.length != 1) { if (rows.length != 1) {
...@@ -331,3 +235,11 @@ function submitFunc() { ...@@ -331,3 +235,11 @@ function submitFunc() {
} }
} }
function fileDetailFunc(id) {
JSColorbox.open({
href: "HGCW999?methodName=initLoad&inqu_status-0-bizType=KK&inqu_status-0-matId=" + id + "&efParentFormEname=HGCW005",
title: "<div style='text-align: center;'>附件清单</div>",
width: "80%",
height: "80%",
});
}
\ No newline at end of file
$(function() {
// 查询
$("#QUERY").on("click", function () {
query();
});
IPLATUI.EFGrid.result = {
pageable: {
pageSize: 20,
pageSizes: [10,20,30,50,100,200],
},
columns: [{
field: "operator",
template: function (item) {
let template = '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="contractDetailFunc(' + item.id + ')">结算单详情</a>';
return template;
}
}
],
loadComplete: function (e) {
$("#BTN_INSERT").on("click",addFunc);
$("#BTN_UPDATE").on("click",updateFunc);
$("#BTN_SUBMIT").on("click",submitFunc);
},
onSuccess: function (e) {
if (e.eiInfo.extAttr.methodName == 'save' || e.eiInfo.extAttr.methodName == 'delete') {
query();
}
},
}
window.document.addEventListener("keyup",function (event) {
if(event.keyCode === 13){
var grid = $("#ef_grid_result").data("kendoGrid");
// 回填
//grid.addRows(returnRows);
grid.closeCell();
}
})
});
$(window).load(function () {
// 查
query();
});
/**
* 查询
*/
let query = function () {
resultGrid.dataSource.page(1);
}
/**
* 新增
*/
function addFunc() {
JSColorbox.open({
href: "HGCW008A?methodName=initLoad&efParentFormEname=HGCW008",
title: "<div style='text-align: center;'>新增结算单</div>",
width: "90%",
height: "90%",
callbackName: windowCallback
});
}
/**
* 修改
*/
function updateFunc() {
let rows = resultGrid.getCheckedRows();
if (rows.length != 1) {
message("请选择一条数据");
return;
}
JSColorbox.open({
href: "HGCW008B?methodName=initLoad&id=" + rows[0].id + "&efParentFormEname=HGCW008",
title: "<div style='text-align: center;'>修改结算单</div>",
width: "90%",
height: "90%",
callbackName: windowCallback
});
}
function windowCallback() {
// 刷新列表
resultGrid.dataSource.page(1);
// 关闭弹窗
JSColorbox.close();
}
function contractDetailFunc(id) {
JSColorbox.open({
href: "HGCW008C?methodName=initLoad&id=" + id + "&efParentFormEname=HGCW008",
title: "<div style='text-align: center;'>结算单详情</div>",
width: "90%",
height: "90%",
callbackName: windowCallback
});
}
function submitFunc() {
let rows = resultGrid.getCheckedRows();
if (rows.length != 1) {
message("请选择一条数据");
return;
}
var flag = true;
rows.forEach(function (row) {
if (row.reviewStatus == "3") {
message("勾选的数据中有已经提交的结算单!");
flag = false;
}
})
if (flag) {
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"提交\"操作? ", {
ok: function () {
var info = new EiInfo();
info.addBlock(JSUtils.checkedRows2Block("result"));
EiCommunicator.send("HGCW008", "submit", info, {
onSuccess: function (ei) {
if (ei.getStatus() >= 0) {
try {
query();
} catch (e) {
// TODO: handle exception
}
if (ei.getStatus() == 0) {
NotificationUtil(ei, 'warning');
} else {
NotificationUtil(ei);
}
} else {
NotificationUtil(ei, "error");
}
},
onFail: function (ei) {
// 发生异常
NotificationUtil("操作失败,原因[" + ei + "]", "error");
}
});
}
});
}
}
<!DOCTYPE html>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<head>
</head>
<EF:EFPage title="合同管理">
<EF:EFRegion id="inqu" title="查询条件">
<div class="row">
<EF:EFSelect cname="所属公司" blockId="inqu_status" ename="companyCode" row="0" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="companyBox_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFInput cname="项目名称" ename="projName" blockId="inqu_status" row="0" colWidth="3" />
<EF:EFInput cname="合同号" ename="contractNumber" blockId="inqu_status" row="0" colWidth="3" />
<EF:EFInput cname="合同名称" ename="contractName" blockId="inqu_status" row="0" colWidth="3" />
<EF:EFDateSpan startCname="结算日期(从)" endCname="至" blockId="inqu_status"
startName="contractDateFrom" endName="contractDateTo" row="0" role="date"
format="yyyy-MM-dd" ratio="3:3" satrtRatio="4:8" endRatio="4:8" readonly="true">
</EF:EFDateSpan>
<EF:EFInput cname="结算编号" ename="settlementNumber" blockId="inqu_status" row="0" colWidth="3" />
<EF:EFSelect cname="结算类别" ename="inqu_status-0-settlementType" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hggp.cw.settlementType"/>
</EF:EFSelect>
<EF:EFSelect cname="审批状态" ename="inqu_status-0-reviewStatus" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hggp.cw.reviewStatus"/>
</EF:EFSelect>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="no" isFloat="true" autoBind="false">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="200" align="center"/>
<EF:EFColumn ename="companyName" 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="contractNumber" cname="合同号" align="center" enable="false"/>
<EF:EFColumn ename="contractName" cname="合同名称" align="center" enable="false"/>
<EF:EFColumn ename="settlementNumber" cname="结算编号" align="center" enable="false"/>
<EF:EFComboColumn ename="settlementType" cname="结算类别" width="100" align="center"
columnTemplate="#=textField#" itemTemplate="#=textField#" enable="false" >
<EF:EFCodeOption codeName="hggp.cw.settlementType"/>
</EF:EFComboColumn>
<EF:EFColumn ename="thisSettlementAmount" cname="本次结算金额" align="center" enable="false"/>
<EF:EFColumn ename="thisSettlementTax" cname="本次结算税金" align="center" enable="false"/>
<EF:EFColumn ename="contractDate" cname="结算日期" align="center" enable="false"/>
<EF:EFComboColumn ename="reviewStatus" cname="审批状态" width="100" align="center"
columnTemplate="#=textField#" itemTemplate="#=textField#" enable="false" >
<EF:EFCodeOption codeName="hggp.cw.reviewStatus"/>
</EF:EFComboColumn>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
<script>
var ctx = "${ctx}";
</script>
<script src="${ctx}/HG/CW/HGCW008.js"></script>
\ No newline at end of file
var sumCumulativeSettlementAmount = 0;
var sumCumulativeSettlementTax = 0;
$(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) {
$("#BTN_CHOICE").on("click",choiceFunc);
grid.dataSource.bind("change", function(e) {
if (e.field == "thisEngineeringQuantity") {
var tr,index;
// 获取此model元素信息
var item = e.items[0];
var inventoryId = item.inventoryId;
var thisEngineeringQuantity = parseFloat(item.thisEngineeringQuantity) || 0; // 工程量
var unitPrice = parseFloat(item.unitPrice) || 0; // 单价
var totalPrice = thisEngineeringQuantity * unitPrice; // 总价
detail1Grid.setCellValue(item, 'totalPrice', parseFloat(totalPrice));
var cumulativeEngineeringQuantity = queryCumulativeEngineeringQuantity(inventoryId);
detail1Grid.setCellValue(item, 'cumulativeEngineeringQuantity', thisEngineeringQuantity + cumulativeEngineeringQuantity);
// 计算总金额
calculateAmount(detail1Grid.getDataItems());
}
});
grid.dataSource.bind("change", function(e) {
if (e.field == "unitPrice") {
var tr,index;
// 获取此model元素信息
var item = e.items[0];
var inventoryId = item.inventoryId;
var thisEngineeringQuantity = parseFloat(item.thisEngineeringQuantity) || 0; // 工程量
var unitPrice = parseFloat(item.unitPrice) || 0; // 单价
var totalPrice = thisEngineeringQuantity * unitPrice; // 总价
detail1Grid.setCellValue(item, 'totalPrice', parseFloat(totalPrice));
// 计算总金额
calculateAmount(detail1Grid.getDataItems());
}
});
},
beforeAdd :function (e) {
console.log("新增前");
var contractType = $("#contractType").val();
if (contractType == "1") {
} else {
message("劳务合同不可新增!");
e.preventDefault();
}
},
onAdd: function (e) {
var contractType = $("#contractType").val();
if (contractType == "1") {
$.each(e.items, function (index, item) {
item['settlementBasis'] = "罚款";
});
}
},
onSave: function (e) {
// 阻止默认请求,使用自定义保存
e.preventDefault();
saveResult1Func();
},
onDelete: function (e) {
// 阻止默认请求,使用自定义删除
e.preventDefault();
deleteResult1Func();
},
}
/**
* 下拉框事件
* @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);
}
}
}
}
IPLATUI.EFPopupInput = {
"popupInputProjCode": {
/**
* grid中的数据回填时触发的事件
* @param e 回填数据事件
* e.sender 弹出窗口对象
* e.grid 弹出的grid对象
* e.model 选中的数据行model
*/
backFill: function (e) {
console.log("Step" + (++i) + ": ----backFill----");
// 回填数据
var model = e.model;
var contractNumber = model.contractNumber;
var info = new EiInfo();
info.set("contractNumber", contractNumber);
EiCommunicator.send("HGCW008", "queryCalculateAmount", info, {
onSuccess: function (ei) {
if (ei.getStatus() >= 0) {
var data = ei.extAttr.result;
sumCumulativeSettlementAmount = data[0].sumCumulativeSettlementAmount;
sumCumulativeSettlementTax = data[0].sumCumulativeSettlementTax;
} else {
NotificationUtil(ei, "error");
return 0;
}
},
onFail: function (ei) {
// 发生异常
NotificationUtil("操作失败,原因[" + ei + "]", "error");
return 0;
}
});
}
}
};
window.document.addEventListener("keyup",function (event) {
if(event.keyCode === 13){
var grid = $("#ef_grid_result").data("kendoGrid");
// 回填
//grid.addRows(returnRows);
grid.closeCell();
}
})
});
function choiceFunc() {
var contractType = $("#contractType").val();
var contractNumber = $("#result-0-contractNumber").val();
if (contractNumber) {
//获取已经加载的合同清单数据
var inventoryIds = [];
var deductionIds = [];
let allRows = new Array();
allRows = detail1Grid.getDataItems();
if (allRows) {
allRows.forEach(function (row, index) {
if (row.settlementBasis == "合同内") {
inventoryIds.push(row.inventoryId);
} else {
if (row.inventoryId) {
deductionIds.push(row.inventoryId);
}
}
})
}
if (contractType == "1") {
JSColorbox.open({
href: "HGCW008D?methodName=initLoad&inqu_status-0-contractNumber=" + contractNumber +
"&inqu_status-0-inventoryIds=" + inventoryIds.join(","),
title: "<div style='text-align: center;'>合同清单</div>",
width: "80%",
height: "80%",
dispaly: "flex",
callbackName: choiceCallbackFunc
});
$("#JSColorboxWin").css({"height": "100%"})
} else {
JSColorbox.open({
href: "HGCW008E?methodName=initLoad&inqu_status-0-contractNumber=" + contractNumber +
"&inqu_status-0-inventoryIds=" + inventoryIds.join(",") +
"&inqu_status-0-deductionIds=" + deductionIds.join(","),
title: "<div style='text-align: center;'>合同清单</div>",
width: "80%",
height: "80%",
dispaly: "flex",
callbackName: choiceCallbackFunc
});
$("#JSColorboxWin").css({"height": "100%"})
}
} else {
message("请先选择合同!");
}
}
function choiceCallbackFunc(result) {
$.each(result, function(index, item) {
detail1Grid.dataSource.insert();
detail1Grid.setCellValue(0, "rowNo", 0);
detail1Grid.setCellValue(0, "settlementBasis", "合同内");
detail1Grid.setCellValue(0, "taskName", item.inventory);
detail1Grid.setCellValue(0, "unit", item.unit);
detail1Grid.setCellValue(0, "unitPrice", item.unitPriceExcludingTax);
detail1Grid.setCellValue(0, "inventoryId", item.id);
detail1Grid.refresh();
})
JSColorbox.close();
}
function cancelFunc() {
// 关闭弹窗
parent.JSColorbox.setValueCallback();
}
function btnSaveFunc() {
fieldValidation();
JSUtils.confirm("确定对数据做\"保存\"操作? ", {
ok: function () {
JSUtils.submitGrid("detail1", "HGCW008", "save", {isAlldata:true,onSuccessCallback:parent.windowCallback});
}
});
}
function deleteResult1Func() {
let rows = detail1Grid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
rows.forEach(function (row) {
detail1Grid.removeRows([rows.rowNo]);// 刷新行号
})
refreshRowNo();
calculateAmount(detail1Grid.getDataItems());
}
let refreshRowNo = function () {
let allRows = detail1Grid.getDataItems();
for (let i = 0; i < allRows.length; i++) {
detail1Grid.setCellValue(i, "rowNo", i);
detail1Grid.refresh();
}
}
function queryCumulativeEngineeringQuantity(inventoryId) {
if (inventoryId) {
var info = new EiInfo();
info.set("inventoryId", inventoryId);
EiCommunicator.send("HGCW009", "queryEngineeringQuantity", info, {
onSuccess: function (ei) {
if (ei.getStatus() >= 0) {
return ei.result
} else {
NotificationUtil(ei, "error");
return 0;
}
},
onFail: function (ei) {
// 发生异常
NotificationUtil("操作失败,原因[" + ei + "]", "error");
return 0;
}
});
}
return 0;
}
/**
* 本次结算金额: 明细的本次结算求和
* 累计结算金额: 当前合同的所有结算单本次结算金额求和
* 本次结算税金: 明细的本次结算求和(不含扣款 )*税率
* 累计结算税金:当前合同的所有结算单的“本次结算税金”求和
* 本次价税合计=本次结算金额+本次结算税金
* 累计价税合计=累计结算金额+累计结算税金
* 劳务合同的本次结算税金: 明细的本次结算求和(不含扣款 )*税率
* 销售合同的本次结算税金: 明细的本次结算求和*税率
* @param rows
*/
function calculateAmount(rows) {
var contractType = $("#contractType").val();
var totalPrice = 0;
var deductionPrice= 0;
rows.forEach(function (row, index) {
if (row.settlementBasis == "合同内") {
totalPrice += parseFloat(row.totalPrice);
} else {
deductionPrice += parseFloat(row.totalPrice);
}
});
//税点
var taxPoints = $("#result-0-taxPoints").val() ? $("#result-0-taxPoints").val() / 100 : 0;
//本次结算金额
var thisSettlementAmount = totalPrice + deductionPrice;
//累计结算金额
var cumulativeSettlementAmount = sumCumulativeSettlementAmount + thisSettlementAmount;
//本次结算税金
var thisSettlementTax = 0;
if (contractType == "1") {
thisSettlementTax = thisSettlementAmount * taxPoints;
} else {
thisSettlementTax = totalPrice * taxPoints;
}
//累计结算税金
var cumulativeSettlementTax = sumCumulativeSettlementTax + thisSettlementTax;
//本次价税合计=本次结算金额+本次结算税金
var thisPriceTax = parseFloat(thisSettlementAmount) + parseFloat(thisSettlementTax);
//累计价税合计=累计结算金额+累计结算税金
var cumulativePriceTax = parseFloat(cumulativeSettlementAmount) + parseFloat(cumulativeSettlementTax);
$("#result-0-thisSettlementAmount").val(parseFloat(thisSettlementAmount).toFixed(3))
$("#result-0-cumulativeSettlementAmount").val(parseFloat(cumulativeSettlementAmount).toFixed(3))
$("#result-0-thisSettlementTax").val(parseFloat(thisSettlementTax).toFixed(3))
$("#result-0-cumulativeSettlementTax").val(parseFloat(cumulativeSettlementTax).toFixed(3))
$("#result-0-thisPriceTax").val(parseFloat(thisPriceTax).toFixed(3))
$("#result-0-cumulativePriceTax").val(parseFloat(cumulativePriceTax).toFixed(3))
}
function fieldValidation() {
}
$(window).load(function () {
refreshRowNo();
});
<!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:EFPopupInput ename="popupInputProjCode" cname="项目编号" colWidth="4"
serviceName="HGCW002" methodName="queryContractByType"
resultId="contract_combo_box"
save="false" popupType="ServiceGrid"
valueField="projCode" textField="projCode"
columnEnames="projCode,projName,contractNumber,contractName,totalContractPriceExcluding"
columnCnames="项目编码,项目名称,合同号,合同名称,合同总价"
backFillColumnIds="projCode,projName,contractNumber,contractName,totalContractPriceExcluding,contractType"
backFillFieldIds="result-0-projCode,result-0-projName,result-0-contractNumber,result-0-contractName,result-0-totalContractPrice,contractType"
readonly="true" required="true"
resizable="true" popupTitle="项目信息" popupWidth="800">
</EF:EFPopupInput>
<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" />
<EF:EFInput ename="contractType" cname="合同类型" type="hidden"/>
</div>
<div class="row">
<EF:EFInput ename="result-0-contractName" cname="合同名称" colWidth="4" readonly="true"/>
<EF:EFInput ename="result-0-settlementNumber" cname="结算编号" colWidth="4" readonly="true"/>
<EF:EFSelect cname="结算类别" ename="result-0-settlementType" colWidth="4" filter="contains">
<EF:EFOption label="-- 请选择 --" value=""/>
<EF:EFCodeOption codeName="hggp.cw.settlementType"/>
</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:EFSelect cname="价税分离" ename="result-0-priceTaxSeparation" colWidth="4" filter="contains">
<EF:EFOption label="-- 请选择 --" value=""/>
<EF:EFCodeOption codeName="hggp.cw.priceTaxSeparation"/>
</EF:EFSelect>
<EF:EFDatePicker cname="结算日期" ename="result-0-contractDate" colWidth="4"
format="yyyy-MM-dd" parseFormats="['yyyyMMdd']"/>
</div>
<div class="row">
<EF:EFInput ename="result-0-thisSettlementAmount" cname="本次结算金额(元)" colWidth="4" readonly="true"/>
<EF:EFInput ename="result-0-thisSettlementTax" cname="本次结算税金(元)" colWidth="4" readonly="true"/>
<EF:EFInput ename="result-0-thisPriceTax" cname="本次结算价税合计金额(元)" colWidth="4" readonly="true"/>
</div>
<div class="row">
<EF:EFInput ename="result-0-totalContractPrice" cname="合同金额(元)" colWidth="4" readonly="true"/>
<EF:EFInput ename="result-0-cumulativeSettlementAmount" cname="累计结算金额(元)" colWidth="4" readonly="true"/>
<EF:EFInput ename="result-0-cumulativeSettlementTax" cname="累计结算税金(元)" colWidth="4" readonly="true"/>
</div>
<div class="row">
<EF:EFInput ename="result-0-cumulativePriceTax" cname="累计结算价税合计金额(元)" colWidth="4" readonly="true"/>
</div>
</EF:EFRegion>
<EF:EFRegion id="detail1" title="合同清单">
<EF:EFGrid blockId="detail1" autoDraw="override" checkMode="row" isFloat="true" copyToAdd="false">
<EF:EFColumn ename="rowNo" cname="行号" hidden="true"/>
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="settlementBasis" cname="结算依据" align="center" />
<EF:EFColumn ename="taskName" cname="任务名称" align="center" />
<EF:EFColumn ename="engineeringContent" cname="工程内容" align="center" />
<EF:EFColumn ename="thisEngineeringQuantity" cname="本次结算工程量" format="{0:N3}" align="center"/>
<EF:EFColumn ename="cumulativeEngineeringQuantity" cname="至本次累计结算工程量" format="{0:N3}" align="center" enable="false"/>
<EF:EFColumn ename="unit" cname="单位" align="center" />
<EF:EFColumn ename="unitPrice" cname="单价" format="{0:N3}" align="center"/>
<EF:EFColumn ename="totalPrice" cname="合价" enable="false" format="{0:N3}" align="center"/>
<EF:EFColumn ename="remarks" cname="备注" align="center" />
<EF:EFColumn ename="inventoryId" cname="清单id" hidden="true"/>
</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/HGCW008A.js"></script>
\ 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 == "dayNumber") {
var tr,index;
// 获取此model元素信息
var item = e.items[0];
// 计算总金额
var taxPoints = $("#result-0-taxPoints").val() ? $("#result-0-taxPoints").val() / 100 : 0;
var deviceNumber = parseFloat(item.deviceNumber) || 0;
var unitPrice = parseFloat(item.unitPrice) || 0;
var dayNumber = parseFloat(item.dayNumber) || 0;
var totalPrice = deviceNumber * unitPrice * dayNumber;
detail1Grid.setCellValue(item, 'totalPrice', parseFloat(totalPrice));
console.log(grid.dataSource._data);
console.log(detail1Grid.getDataItems());
var allRows = detail1Grid.getDataItems();
var totalPriceExcluding = 0;
var totalPriceIncluding = 0;
var valueAddedTax = 0;
totalPrice = 0;
deviceNumber = 0
allRows.forEach(function (row, index) {
totalPrice += parseFloat(row.totalPrice);
deviceNumber += parseFloat(row.deviceNumber);
});
totalPriceExcluding = totalPrice;
totalPriceIncluding = totalPriceExcluding * (1 + parseFloat(taxPoints));
valueAddedTax = parseFloat(totalPriceIncluding) - parseFloat(totalPriceExcluding);
$("#result-0-totalContractPriceExcluding").val(parseFloat(totalPriceExcluding).toFixed(3))
$("#result-0-totalContractPriceIncluding").val(parseFloat(totalPriceIncluding).toFixed(3))
$("#result-0-valueAddedTax").val(parseFloat(valueAddedTax).toFixed(3))
$("#result-0-totalQuantity").val(parseFloat(deviceNumber).toFixed(3))
}
});
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);
}
}
}
}
IPLATUI.EFPopupInput = {
"popupInputPartyA": {
/**
* EFGrid 查询时触发的事件,通常在此处,设置查询条件
* 注意: 必须返回一个EiInfo,作为初始查询条件
* 配置了query时,默认每次打开窗口都会进行一次查询
*/
query: function (e) {
console.log("Step" + (++i) + ": ----query----");
var info = new EiInfo();
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(); // 不使用默认的回填逻辑
}
}
};
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 partyA = $("#result-0-partyA").val();
IPLAT.EFPopupInput.text( $("#popupInputPartyA") , partyA)
}
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=ZL&inqu_status-0-matId=" + id,
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-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() {
fieldValidation();
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;
}
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))
}
function fieldValidation() {
var contractType = $("#result-0-contractType").val();
if (contractType == "3") {
var mainContractNumber = $("#result-0-mainContractNumber").val();
if (!mainContractNumber) {
message("请填写主合同号!");
return;
}
}
}
<!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:EFPopupInput ename="popupInputProjCode" cname="项目编号" colWidth="4"
serviceName="HGCW002" methodName="queryContractByType"
resultId="contract_combo_box"
save="false" popupType="ServiceGrid"
valueField="projCode" textField="projCode"
columnEnames="projCode,projName,contractNumber,contractName,totalContractPriceExcluding"
columnCnames="项目编码,项目名称,合同号,合同名称,合同总价"
backFillColumnIds="projCode,projName,contractNumber,contractName,totalContractPriceExcluding,contractType"
backFillFieldIds="result-0-projCode,result-0-projName,result-0-contractNumber,result-0-contractName,result-0-totalContractPrice,contractType"
readonly="true" required="true"
resizable="true" popupTitle="项目信息" popupWidth="800">
</EF:EFPopupInput>
<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" />
<EF:EFInput ename="contractType" cname="合同类型" type="hidden"/>
</div>
<div class="row">
<EF:EFInput ename="result-0-contractName" cname="合同名称" colWidth="4" readonly="true"/>
<EF:EFInput ename="result-0-settlementNumber" cname="结算编号" colWidth="4" readonly="true"/>
<EF:EFSelect cname="结算类别" ename="result-0-settlementType" colWidth="4" filter="contains">
<EF:EFOption label="-- 请选择 --" value=""/>
<EF:EFCodeOption codeName="hggp.cw.settlementType"/>
</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:EFSelect cname="价税分离" ename="result-0-priceTaxSeparation" colWidth="4" filter="contains">
<EF:EFOption label="-- 请选择 --" value=""/>
<EF:EFCodeOption codeName="hggp.cw.priceTaxSeparation"/>
</EF:EFSelect>
<EF:EFDatePicker cname="结算日期" ename="result-0-contractDate" colWidth="4"
format="yyyy-MM-dd" parseFormats="['yyyyMMdd']"/>
</div>
<div class="row">
<EF:EFInput ename="result-0-thisSettlementAmount" cname="本次结算金额(元)" colWidth="4" readonly="true"/>
<EF:EFInput ename="result-0-thisSettlementTax" cname="本次结算税金(元)" colWidth="4" readonly="true"/>
<EF:EFInput ename="result-0-thisPriceTax" cname="本次结算价税合计金额(元)" colWidth="4" readonly="true"/>
</div>
<div class="row">
<EF:EFInput ename="result-0-totalContractPrice" cname="合同金额(元)" colWidth="4" readonly="true"/>
<EF:EFInput ename="result-0-cumulativeSettlementAmount" cname="累计结算金额(元)" colWidth="4" readonly="true"/>
<EF:EFInput ename="result-0-cumulativeSettlementTax" cname="累计结算税金(元)" colWidth="4" readonly="true"/>
</div>
<div class="row">
<EF:EFInput ename="result-0-cumulativePriceTax" cname="累计结算价税合计金额(元)" colWidth="4" readonly="true"/>
</div>
</EF:EFRegion>
<EF:EFRegion id="detail1" title="合同清单">
<EF:EFGrid blockId="detail1" autoDraw="override" checkMode="row" isFloat="true" copyToAdd="false">
<EF:EFColumn ename="rowNo" cname="行号" hidden="true"/>
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="settlementBasis" cname="结算依据" align="center" />
<EF:EFColumn ename="taskName" cname="任务名称" align="center" />
<EF:EFColumn ename="engineeringContent" cname="工程内容" align="center" />
<EF:EFColumn ename="thisEngineeringQuantity" cname="本次结算工程量" format="{0:N3}" align="center"/>
<EF:EFColumn ename="cumulativeEngineeringQuantity" cname="至本次累计结算工程量" format="{0:N3}" align="center" enable="false"/>
<EF:EFColumn ename="unit" cname="单位" align="center" />
<EF:EFColumn ename="unitPrice" cname="单价" format="{0:N3}" align="center"/>
<EF:EFColumn ename="totalPrice" cname="合价" enable="false" format="{0:N3}" align="center"/>
<EF:EFColumn ename="remarks" cname="备注" align="center" />
<EF:EFColumn ename="inventoryId" cname="清单id" hidden="true"/>
</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/HGCW008B.js"></script>
\ No newline at end of file
$(function () {
IPLATUI.EFGrid = {
"result": {
toolbarConfig: {
hidden: true, // true时,不显示功能按钮,但保留setting导出按钮
},
columns: []
}
}
/**
* 取消
*/
$('#cancel').on('click', function () {
// 关闭弹窗
parent.JSColorbox.close();
})
/**
* 确认
*/
$('#confirm').on('click', function () {
let allRows = new Array();
allRows = resultGrid.getCheckedRows();
if (allRows.length > 0) {
parent.JSColorbox.setValueCallback(allRows);
} else {
message("请选择至少一条合同清单!");
return;
}
})
});
/**
* 查询
*/
function query() {
resultGrid.dataSource.page(1);
}
$(window).load(function () {
// 查
query();
});
<!DOCTYPE html>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<EF:EFPage title="合同清单">
<EF:EFInput cname="合同号" ename="contractNumber" blockId="inqu_status" row="0" type="hidden" />
<EF:EFInput cname="IDS" ename="inventoryIds" blockId="inqu_status" row="0" type="hidden" />
<EF:EFRegion id="result" title="合同清单">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="inventory" cname="清单" align="center" enable="false"/>
<EF:EFColumn ename="unit" cname="单位" align="center" enable="false"/>
<EF:EFColumn ename="provisionalQuantity" cname="暂定工程量" format="{0:N3}" align="center" enable="false"/>
<EF:EFColumn ename="measurementMethod" cname="计量方式" align="center" enable="false"/>
<EF:EFColumn ename="supplyMethod" cname="材料供应方式" align="center" enable="false"/>
<EF:EFColumn ename="unitPriceExcludingTax" cname="除税单价/元" format="{0:N3}" align="center" enable="false"/>
<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" enable="false"/>
</EF:EFGrid>
</EF:EFRegion>
<div class="row">
<EF:EFButton ename="cancel" cname="取消" type="button" class="btn-align-right"/>
<EF:EFButton ename="confirm" cname="确认" type="button" class="btn-align-right"/>
</div>
</EF:EFPage>
$(function () {
IPLATUI.EFGrid = {
"result": {
toolbarConfig: {
hidden: true, // true时,不显示功能按钮,但保留setting导出按钮
},
columns: []
}
}
/**
* 取消
*/
$('#cancel').on('click', function () {
// 关闭弹窗
parent.JSColorbox.close();
})
/**
* 确认
*/
$('#confirm').on('click', function () {
let allRows = new Array();
allRows = resultGrid.getCheckedRows();
if (allRows.length > 0) {
parent.JSColorbox.setValueCallback(allRows);
} else {
message("请选择至少一条合同清单!");
return;
}
})
});
/**
* 查询
*/
function query() {
resultGrid.dataSource.page(1);
}
$(window).load(function () {
// 查
query();
});
<!DOCTYPE html>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<EF:EFPage title="合同清单">
<EF:EFInput cname="合同号" ename="contractNumber" blockId="inqu_status" row="0" type="hidden" />
<EF:EFInput cname="IDS" ename="inventoryIds" blockId="inqu_status" row="0" type="hidden" />
<EF:EFInput cname="DIDS" ename="deductionIds" blockId="inqu_status" row="0" type="hidden" />
<EF:EFRegion id="result1" title="合同清单">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="inventory" cname="清单" align="center" enable="false"/>
<EF:EFColumn ename="unit" cname="单位" align="center" enable="false"/>
<EF:EFColumn ename="provisionalQuantity" cname="暂定工程量" format="{0:N3}" align="center" enable="false"/>
<EF:EFColumn ename="measurementMethod" cname="计量方式" align="center" enable="false"/>
<EF:EFColumn ename="supplyMethod" cname="材料供应方式" align="center" enable="false"/>
<EF:EFColumn ename="unitPriceExcludingTax" cname="除税单价/元" format="{0:N3}" align="center" enable="false"/>
<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" enable="false"/>
</EF:EFGrid>
</EF:EFRegion>
<EF:EFRegion id="result2" title="扣款单">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="projCode" cname="项目编号" align="center" enable="false"/>
<EF:EFColumn ename="projName" cname="项目名称" align="center" enable="false"/>
<EF:EFColumn ename="contractNumber" cname="主合同号" format="{0:N3}" align="center" enable="false"/>
<EF:EFColumn ename="contractName" cname="主合同名称" align="center" enable="false"/>
<EF:EFColumn ename="partyA" cname="甲方名称" align="center" enable="false"/>
<EF:EFColumn ename="partyB" cname="乙方名称" align="center" enable="false"/>
<EF:EFColumn ename="contractContent" cname="扣款事由" enable="false" align="center"/>
<EF:EFColumn ename="totalContractPriceIncluding" cname="扣款金额" enable="false" align="center"/>
<EF:EFColumn ename="signingDate" cname="扣款日期" align="center" enable="false"/>
</EF:EFGrid>
</EF:EFRegion>
<div class="row">
<EF:EFButton ename="cancel" cname="取消" type="button" class="btn-align-right"/>
<EF:EFButton ename="confirm" cname="确认" type="button" class="btn-align-right"/>
</div>
</EF:EFPage>
...@@ -30,10 +30,8 @@ $(function () { ...@@ -30,10 +30,8 @@ $(function () {
let auditStatus = item["checkStatus"]; let auditStatus = item["checkStatus"];
let template = ''; let template = '';
if (item.companyCode) { if (item.companyCode) {
if (auditStatus == 1){
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="showDetail(' + item.id + ',\''+item.companyCode+'\',\''+item.companyName+'\')" >点检详情</a>'; + 'onclick="showDetail(' + item.id + ',\''+item.companyCode+'\',\''+item.companyName+'\')" >点检详情</a>';
}
if (auditStatus == 0) { if (auditStatus == 0) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' + template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' +
'onclick="updateStatus(' + item.id + ',1)" >审批完成</a>'; 'onclick="updateStatus(' + item.id + ',1)" >审批完成</a>';
......
...@@ -30,10 +30,8 @@ $(function () { ...@@ -30,10 +30,8 @@ $(function () {
let auditStatus = item["checkStatus"]; let auditStatus = item["checkStatus"];
let template = ''; let template = '';
if (item.companyCode) { if (item.companyCode) {
if (auditStatus == 1){
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="showDetail(' + item.id + ',\''+item.companyCode+'\',\''+item.companyName+'\')" >保养详情</a>'; + 'onclick="showDetail(' + item.id + ',\''+item.companyCode+'\',\''+item.companyName+'\')" >保养详情</a>';
}
if (auditStatus == 0) { if (auditStatus == 0) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' + template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' +
'onclick="updateStatus(' + item.id + ',1)" >审批完成</a>'; 'onclick="updateStatus(' + item.id + ',1)" >审批完成</a>';
......
...@@ -39,6 +39,7 @@ ...@@ -39,6 +39,7 @@
align="center" filter="contains" sort="true"> align="center" filter="contains" sort="true">
<EF:EFOptions blockId="companyBox_block_id" textField="textField" valueField="valueField"/> <EF:EFOptions blockId="companyBox_block_id" textField="textField" valueField="valueField"/>
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFColumn ename="planCode" cname="计划单号" width="120" align="center" readonly="true" required="true"/>
<EF:EFComboColumn ename="deviceCode" cname="设备名称" <EF:EFComboColumn ename="deviceCode" cname="设备名称"
columnTemplate="#=textField#" itemTemplate="#=textField#" columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField" textField="textField" valueField="valueField"
...@@ -46,8 +47,6 @@ ...@@ -46,8 +47,6 @@
align="center" filter="contains" sort="true"> align="center" filter="contains" sort="true">
<EF:EFOptions blockId="deviceCodeBox_block_id" textField="textField" valueField="valueField"/> <EF:EFOptions blockId="deviceCodeBox_block_id" textField="textField" valueField="valueField"/>
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFColumn ename="upkeepDate" cname="保养日期" width="120" align="center" editType="date"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" readonly="true" required="true"/>
<EF:EFColumn ename="planStartDate" cname="计划开始日期" width="120" align="center" editType="date" <EF:EFColumn ename="planStartDate" cname="计划开始日期" width="120" align="center" editType="date"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" readonly="true" required="true"/> dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" readonly="true" required="true"/>
<EF:EFColumn ename="planEndDate" cname="计划结束日期" width="120" align="center" editType="date" <EF:EFColumn ename="planEndDate" cname="计划结束日期" width="120" align="center" editType="date"
......
...@@ -57,6 +57,10 @@ $(function () { ...@@ -57,6 +57,10 @@ $(function () {
return; return;
} }
}, },
onDelete: function(e) {
detailGrid.removeRows(detailGrid.getCheckedRowsIndex())
e.preventDefault();
},
onSuccess: function (e) { onSuccess: function (e) {
if(e.eiInfo.extAttr.methodName == 'save'||e.eiInfo.extAttr.methodName == 'delete' ){ if(e.eiInfo.extAttr.methodName == 'save'||e.eiInfo.extAttr.methodName == 'delete' ){
query(); query();
......
...@@ -57,6 +57,10 @@ $(function () { ...@@ -57,6 +57,10 @@ $(function () {
return; return;
} }
}, },
onDelete: function(e) {
detailGrid.removeRows(detailGrid.getCheckedRowsIndex())
e.preventDefault();
},
onSuccess: function (e) { onSuccess: function (e) {
if(e.eiInfo.extAttr.methodName == 'save'||e.eiInfo.extAttr.methodName == 'delete' ){ if(e.eiInfo.extAttr.methodName == 'save'||e.eiInfo.extAttr.methodName == 'delete' ){
query(); query();
......
...@@ -68,6 +68,7 @@ ...@@ -68,6 +68,7 @@
<EF:EFRegion id="detail" title="部门负责人信息"> <EF:EFRegion id="detail" title="部门负责人信息">
<EF:EFGrid blockId="detail" autoDraw="no" isFloat="true"> <EF:EFGrid blockId="detail" autoDraw="no" isFloat="true">
<EF:EFColumn ename="id" cname="主键" hidden="true"/> <EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="projId" cname="项目ID" hidden="true"/>
<EF:EFColumn ename="userName" cname="负责人名称" required="true" hidden="true"/> <EF:EFColumn ename="userName" cname="负责人名称" required="true" hidden="true"/>
<EF:EFColumn ename="userDepCode" cname="负责人部门编码" required="true" hidden="true"/> <EF:EFColumn ename="userDepCode" cname="负责人部门编码" required="true" hidden="true"/>
<EF:EFColumn ename="userCode" cname="负责人名称" required="true" align="center"/> <EF:EFColumn ename="userCode" cname="负责人名称" required="true" align="center"/>
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
<c:set var="ctx" value="${pageContext.request.contextPath}"/> <c:set var="ctx" value="${pageContext.request.contextPath}"/>
<EF:EFPage title="变更详情"> <EF:EFPage title="变更详情">
<EF:EFInput ename="inqu_status-0-materialDetailId" type="hidden"/>
<EF:EFRegion id="result" title="变更详情信息"> <EF:EFRegion id="result" title="变更详情信息">
<EF:EFGrid blockId="result" autoDraw="override" checkMode="row" isFloat="true"> <EF:EFGrid blockId="result" autoDraw="override" checkMode="row" isFloat="true">
<EF:EFColumn ename="id" cname="主键" hidden="true"/> <EF:EFColumn ename="id" cname="主键" hidden="true"/>
......
...@@ -37,10 +37,10 @@ ...@@ -37,10 +37,10 @@
dateFormat="yyyy-MM-dd" parseFormats="['yyyy-MM-dd']" required="true"/> dateFormat="yyyy-MM-dd" parseFormats="['yyyy-MM-dd']" required="true"/>
<EF:EFColumn ename="planEndDate" cname="计划完工日期" width="120" enable="true" align="center" editType="date" <EF:EFColumn ename="planEndDate" cname="计划完工日期" width="120" enable="true" align="center" editType="date"
dateFormat="yyyy-MM-dd" parseFormats="['yyyy-MM-dd']" required="true"/> dateFormat="yyyy-MM-dd" parseFormats="['yyyy-MM-dd']" required="true"/>
<EF:EFColumn ename="singleWeight" cname="单重" width="120" enable="true" align="center" readOnly="true"/> <EF:EFColumn ename="singleWeight" cname="单重(kg)" format="{0:0.00}" editType="text" width="120" enable="true" align="center" readOnly="true"/>
<EF:EFColumn ename="totalWeight" cname="计划重量" width="120" enable="true" align="center" readOnly="true"/> <EF:EFColumn ename="totalWeight" cname="计划重量(kg)" format="{0:0.00}" editType="text" width="120" enable="true" align="center" readOnly="true"/>
<EF:EFColumn ename="finishWeight" cname="完成重量" width="120" enable="true" align="center" readOnly="true"/> <EF:EFColumn ename="finishWeight" cname="完成重量(kg)" format="{0:0.00}" editType="text" width="120" enable="true" align="center" readOnly="true"/>
<EF:EFColumn ename="unfinishWeight" cname="未完成重量" width="120" enable="true" align="center" readOnly="true"/> <EF:EFColumn ename="unfinishWeight" cname="未完成重量(kg)" format="{0:0.00}" editType="text" width="120" enable="true" align="center" readOnly="true"/>
<EF:EFColumn ename="quantity" cname="计划数量" width="120" enable="true" align="center" readOnly="true"/> <EF:EFColumn ename="quantity" cname="计划数量" width="120" enable="true" align="center" readOnly="true"/>
<EF:EFColumn ename="finishQuantity" cname="完成数量" width="120" enable="true" align="center" readOnly="true"/> <EF:EFColumn ename="finishQuantity" cname="完成数量" width="120" enable="true" align="center" readOnly="true"/>
<EF:EFColumn ename="unfinishQuantity" cname="未完成数量" width="120" enable="true" align="center" readOnly="true"/> <EF:EFColumn ename="unfinishQuantity" cname="未完成数量" width="120" enable="true" align="center" readOnly="true"/>
......
...@@ -16,7 +16,7 @@ $(function () { ...@@ -16,7 +16,7 @@ $(function () {
let template = ""; let template = "";
if(item.unassignQuantity > 0 ){ if(item.unassignQuantity > 0 ){
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="separateAssign(\'' + item.orderCode + '\')" >拆单派工</a>'; + 'onclick="separateAssign(' + item.id + ')" >拆单派工</a>';
} }
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' + template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' +
'onclick="showTaskInfo(' + item.id + ')" >任务详情</a>'; 'onclick="showTaskInfo(' + item.id + ')" >任务详情</a>';
...@@ -102,11 +102,11 @@ function assign() { ...@@ -102,11 +102,11 @@ function assign() {
} }
function separateAssign(id){ function separateAssign(orderDetailId){
JSColorbox.open({ JSColorbox.open({
href: "HGSC006B?methodName=initLoad&inqu_status-0-orderCode=" + orderCode, href: "HGSC006B?methodName=initLoad&inqu_status-0-id=" + orderDetailId,
title: "<div style='text-align: center;'>拆单派工</div>", title: "<div style='text-align: center;'>拆单派工</div>",
width: "80%", width: "90%",
height: "90%", height: "90%",
callbackName: separateAssignCallback callbackName: separateAssignCallback
}); });
......
...@@ -18,8 +18,6 @@ ...@@ -18,8 +18,6 @@
<EF:EFInput ename="inqu_status-0-projName" cname="项目名称" colWidth="3"/> <EF:EFInput ename="inqu_status-0-projName" cname="项目名称" colWidth="3"/>
<EF:EFDatePicker cname="生产订单" ename="inqu_status-0-createdTime" colWidth="3" <EF:EFDatePicker cname="生产订单" ename="inqu_status-0-createdTime" colWidth="3"
format="yyyy-MM-dd" readonly="false"/> format="yyyy-MM-dd" readonly="false"/>
<EF:EFDatePicker cname="派工日期" ename="inqu_status-0-assignDate" colWidth="3"
format="yyyy-MM-dd" readonly="false"/>
</div> </div>
</EF:EFRegion> </EF:EFRegion>
<EF:EFRegion id="result" title="记录集"> <EF:EFRegion id="result" title="记录集">
...@@ -36,10 +34,10 @@ ...@@ -36,10 +34,10 @@
<EF:EFColumn ename="processName" cname="工序" width="120" enable="true" align="center" readOnly="true"/> <EF:EFColumn ename="processName" cname="工序" width="120" enable="true" align="center" readOnly="true"/>
<EF:EFColumn ename="planEndDate" cname="计划完工日期" width="120" enable="true" align="center" editType="date" <EF:EFColumn ename="planEndDate" cname="计划完工日期" width="120" enable="true" align="center" editType="date"
dateFormat="yyyy-MM-dd" parseFormats="['yyyy-MM-dd']" /> dateFormat="yyyy-MM-dd" parseFormats="['yyyy-MM-dd']" />
<EF:EFColumn ename="singleWeight" cname="单重" width="120" enable="true" align="center" readOnly="true"/> <EF:EFColumn ename="singleWeight" cname="单重(kg)" format="{0:0.00}" editType="text" width="120" enable="true" align="center" readOnly="true"/>
<EF:EFColumn ename="totalWeight" cname="订单重量" width="120" enable="true" align="center" readOnly="true"/> <EF:EFColumn ename="totalWeight" cname="订单重量(kg)" format="{0:0.00}" editType="text" width="120" enable="true" align="center" readOnly="true"/>
<EF:EFColumn ename="assignWeight" cname="派工重量" width="120" enable="true" align="center" readOnly="true"/> <EF:EFColumn ename="assignWeight" cname="派工重量(kg)" format="{0:0.00}" editType="text" width="120" enable="true" align="center" readOnly="true"/>
<EF:EFColumn ename="unassignWeight" cname="待派工重量" width="120" enable="true" align="center" readOnly="true"/> <EF:EFColumn ename="unassignWeight" cname="待派工重量(kg)" format="{0:0.00}" editType="text" width="120" enable="true" align="center" readOnly="true"/>
<EF:EFColumn ename="quantity" cname="订单数量" width="120" enable="true" align="center" readOnly="true"/> <EF:EFColumn ename="quantity" cname="订单数量" width="120" enable="true" align="center" readOnly="true"/>
<EF:EFColumn ename="assignQuantity" cname="派工数量" width="120" enable="true" align="center" readOnly="true"/> <EF:EFColumn ename="assignQuantity" cname="派工数量" width="120" enable="true" align="center" readOnly="true"/>
<EF:EFColumn ename="unassignQuantity" cname="待派工数量" width="120" enable="true" align="center" readOnly="true"/> <EF:EFColumn ename="unassignQuantity" cname="待派工数量" width="120" enable="true" align="center" readOnly="true"/>
......
let factoryGroupGlobalData = [];
$(function () { $(function () {
let factoryGlobalData = __eiInfo.getBlock("factory_record_block_id").getMappedRows();
let groupGlobalData = __eiInfo.getBlock("group_record_block_id").getMappedRows();
IPLATUI.EFGrid = { IPLATUI.EFGrid = {
"result" : { "result" : {
...@@ -8,30 +9,84 @@ $(function () { ...@@ -8,30 +9,84 @@ $(function () {
pageSizes: [10, 20, 50, 70, 100], pageSizes: [10, 20, 50, 70, 100],
}, },
columns: [{ columns: [{
field: "orgName", field: "groupName",
attributes: { attributes: {
class: "i-input-readonly" class: "i-input-readonly"
} }
}, { }, {
field: "orgNo", field: "factoryCode",
template: function (dataItem) { template: function (dataItem) {
for (let i = 0; i < factoryGroupGlobalData.length; i++) { for (let i = 0; i < factoryGlobalData.length; i++) {
if (factoryGroupGlobalData[i]['valueField'] === dataItem['orgNo']) { if (factoryGlobalData[i]['factoryCode'] === dataItem['factoryCode']) {
return factoryGroupGlobalData[i]['textField']; dataItem['factoryName'] = factoryGlobalData[i]['factoryName'];
return factoryGlobalData[i]['factoryName'];
} }
} }
return ""; return "";
}, },
editor: function (container, options) { editor: function (container, options) {
var input = $('<input />');
input.attr("name", options.field);
input.attr("id", options.field);
input.appendTo(container);
input.kendoDropDownList({
dataSource: factoryGlobalData,
minLength: 0,
dataTextField: "factoryName",
dataValueField: "factoryCode",
optionLabelTemplate: "#:factoryName#",
valueTemplate: "#:factoryName#",
template: "#:factoryName#",
filter: "contains"
});
}
}, {
field: "groupCode",
template: function (dataItem) {
for (let i = 0; i < groupGlobalData.length; i++) {
if (groupGlobalData[i]['groupCode'] === dataItem['groupCode']) {
dataItem['groupName'] = groupGlobalData[i]['groupName'];
return groupGlobalData[i]['groupName'];
}
}
return "";
},
editor: function (container, options) {
let dataSource;
let inInfo = new EiInfo(); let inInfo = new EiInfo();
inInfo.set("inqu_status-0-factoryCode", options.model["factoryCode"]); inInfo.set("inqu_status-0-factoryCode", options.model["factoryCode"]);
// 1:生产组 inInfo.set("inqu_status-0-productType", $("#detail-0-productType").val());
inInfo.set("inqu_status-0-groupType", 1);
inInfo.set("serviceName", "HPPZ011");
inInfo.set("methodName", "queryGroupComboBox");
inInfo.set("blockId", "group_record_block_id");
inInfo.set("field", options.field); inInfo.set("field", options.field);
refreshSelect(container, inInfo); EiCommunicator.send("HGSC006B", "groupRecordComboBox", inInfo, {
onSuccess: function (ei) {
dataSource = ei.getBlock("group_record_block_id").getMappedRows();
},
onFail: function (ei) {
}
}, {async: false});
let grid = container.closest(".k-grid").data("kendoGrid");
let cellIndex = grid.cellIndex(container);
let input = $('<input />');
let field = inInfo.get("field");
input.attr("name", field);
input.attr("id", field);
input.appendTo(container);
input.kendoDropDownList({
valuePrimitive: true,
dataTextField: "groupName",
dataValueField: "groupCode",
dataSource: dataSource,
template: "#=groupName#",
filter: "contains"
});
}
},{
field: "createdTime",
attributes: {
class: "i-input-readonly"
},
defaultValue: function () {
return currShortDate();
} }
}], }],
onSave: function (e) { onSave: function (e) {
...@@ -43,13 +98,82 @@ $(function () { ...@@ -43,13 +98,82 @@ $(function () {
// 阻止后台删除请求,使用自定义删除 // 阻止后台删除请求,使用自定义删除
e.preventDefault(); e.preventDefault();
deleteFunc(); deleteFunc();
},
onSuccess: function (e) {
if(e.eiInfo.extAttr.methodName == 'save'
||e.eiInfo.extAttr.methodName == 'delete' ){
query();
}
} }
} }
} }
// $("#QUERY").on("click", query);
downKeyUp();
}); });
/**
* 查询
*/
function query() {
resultGrid.dataSource.page(1);
}
/**
* 页面加载时执行
*/
$(window).load(function () {
// 查询
query();
})
/**
* 保存
*/
let save = function () {
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
for (let i = 0; i < rows.length; i++) {
if (isBlank(rows[i]['factoryCode'])) {
message("勾选的第" + (i + 1) + "行\"厂区\",不能为空");
return;
}
if (isBlank(rows[i]['groupCode'])) {
message("勾选的第" + (i + 1) + "行\"生产组\",不能为空");
return;
}
if (isBlank(rows[i]['quantity'])) {
message("勾选的第" + (i + 1) + "行\"分派数量\",不能为空");
return;
}
if (!isPositiveInteger(rows[i]['quantity'])) {
message("勾选的第" + (i + 1) + "行\"分派数量\"必须是大于0的整数");
return;
}
}
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"保存\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result", "HGSC006B", "save", true);
}
});
}
/**
* 删除
*/
let deleteFunc = function () {
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"删除\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result", "HGSC006B", "delete", true);
}
});
}
...@@ -7,54 +7,61 @@ ...@@ -7,54 +7,61 @@
<EF:EFPage title="拆单派工"> <EF:EFPage title="拆单派工">
<EF:EFRegion id="inqu" title="订单详情"> <EF:EFRegion id="inqu" title="订单详情">
<EF:EFInput ename="inqu_status-0-prodOrderNo" cname="项目号" type="hidden"/> <EF:EFInput ename="detail-0-projCode" cname="项目号" type="hidden"/>
<EF:EFInput ename="detail-0-productType" cname="产品类型" type="hidden"/>
<EF:EFInput ename="detail-0-id" cname="订单明细ID" type="hidden"/>
<EF:EFInput ename="detail-0-companyCode" cname="公司编码" type="hidden"/>
<div class="row"> <div class="row">
<EF:EFInput ename="detail-0-productionOrderNo" cname="生产订单号" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-projCode" cname="项目号" colWidth="4" readonly="true"/> <EF:EFInput ename="detail-0-projCode" cname="项目号" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-projName" cname="项目名称" colWidth="4" readonly="true"/> <EF:EFInput ename="detail-0-projName" cname="项目名称" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-orderCode" cname="生产订单号" colWidth="4" readonly="true"/>
</div> </div>
<div class="row"> <div class="row">
<EF:EFInput ename="detail-0-prdtName" cname="部件名称" colWidth="4" readonly="true"/> <EF:EFInput ename="detail-0-productCode" cname="产品编码" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-prdtLength" cname="部件长(MM)" colWidth="4" readonly="true"/> <EF:EFInput ename="detail-0-productName" cname="产品名称" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-prdtWidth" cname="部件宽(MM)" colWidth="4" readonly="true"/> <EF:EFInput ename="detail-0-processName" cname="工序" colWidth="4" readonly="true"/>
</div>
<div class="row">
<EF:EFInput ename="detail-0-prdtThick" cname="部件厚(MM)" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-num" cname="部件数量" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-unitWt" cname="部件重量(T)" colWidth="4" readonly="true"/>
</div> </div>
<div class="row"> <div class="row">
<EF:EFInput ename="detail-0-remark" cname="部件备注" colWidth="4" readonly="true"/> <EF:EFInput ename="detail-0-planEndDate" cname="计划完成日期" colWidth="4" readonly="true"/>
<EF:EFSelect ename="detail-0-partType" cname="零件类型" colWidth="4" readonly="true"> <EF:EFInput ename="detail-0-singleWeight" cname="单量(kg)" format="{0:0.00}" colWidth="4" readonly="true"/>
<EF:EFCodeOption codeName="hpjx.hpkc.inventType"/> <EF:EFInput ename="detail-0-totalWeight" cname="订单重量(kg)" format="{0:0.00}" colWidth="4" readonly="true"/>
</EF:EFSelect>
<EF:EFInput ename="detail-0-partName" cname="零件名称" colWidth="4" readonly="true"/>
</div> </div>
<div class="row"> <div class="row">
<EF:EFInput ename="detail-0-partLength" cname="零件长(MM)" colWidth="4" readonly="true"/> <EF:EFInput ename="detail-0-assignWeight" cname="派工重量(kg)" format="{0:0.00}" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-partWidth" cname="零件宽(MM)" colWidth="4" readonly="true"/> <EF:EFInput ename="detail-0-unassignWeight" cname="待派工重量(kg)" format="{0:0.00}" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-partThick" cname="零件厚(MM)" colWidth="4" readonly="true"/> <EF:EFInput ename="detail-0-quantity" cname="订单数量" colWidth="4" readonly="true"/>
</div> </div>
<div class="row"> <div class="row">
<EF:EFInput ename="detail-0-remark1" cname="零件备注" colWidth="4" readonly="true"/> <EF:EFInput ename="detail-0-assignQuantity" cname="已派工数量" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-num" cname="零件数量" colWidth="4" readonly="true"/> <EF:EFInput ename="detail-0-unassignQuantity" cname="待派工数量" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-unitWt" cname="零件重量(T)" colWidth="4" readonly="true"/> <EF:EFSelect ename="detail-0-assignStatus" cname="状态" colWidth="4" readonly="true">
</div> <EF:EFCodeOption codeName="hggp.assignStatus"/>
<div class="row"> </EF:EFSelect>
<EF:EFDatePicker ename="detail-0-workDate" cname="派工时间" role="date" format="yyyy-MM-dd" parseFormats="['yyyyMMdd']" colWidth="4" readonly="true" />
<EF:EFInput ename="detail-0-assignedNum" cname="派工数量" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-totalWt" cname="派工重量(T)" colWidth="4" readonly="true"/>
</div>
<div class="row">
<EF:EFInput ename="detail-0-unassignedNum" cname="剩余数量" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-unTotalWt" cname="剩余重量(T)" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-completeNum" cname="完成数量" colWidth="4" readonly="true"/>
</div>
<div class="row">
<EF:EFInput ename="detail-0-actualCompletionTotalWt" cname="完成重量(T)" colWidth="4" readonly="true"/>
<EF:EFDatePicker ename="detail-0-deliveryDate" cname="交货日期" role="date" format="yyyy-MM-dd" parseFormats="['yyyyMMdd']" colWidth="4" readonly="true" />
<EF:EFDatePicker ename="detail-0-planCompletionDate" cname="计划完成日期" role="date" format="yyyy-MM-dd" parseFormats="['yyyyMMdd']" colWidth="4" readonly="true" />
<EF:EFDatePicker ename="detail-0-actualCompletionDate" cname="实际完成时间" role="date" format="yyyy-MM-dd" parseFormats="['yyyyMMdd']" colWidth="4" readonly="true" />
</div> </div>
</EF:EFRegion> </EF:EFRegion>
<EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="override" checkMode="row" isFloat="true">
<EF:EFColumn ename="id" cname="任务ID" hidden="true"/>
<EF:EFColumn ename="taskCode" cname="任务单号" enable="false" hidden="true"/>
<%-- <EF:EFComboColumn ename="factoryCode" cname="厂区" width="110" align="center" defaultValue="" required="true"--%>
<%-- filter="contains" readonly="true">--%>
<%-- <EF:EFOptions blockId="factory_record_block_id" valueField="factoryCode" textField="factoryName"/>--%>
<%-- </EF:EFComboColumn>--%>
<EF:EFColumn ename="factoryCode" cname="厂区" width="100" align="center" />
<EF:EFColumn ename="factoryName" cname="工厂名称" enable="false" align="center" hidden="true"/>
<%-- <EF:EFComboColumn ename="groupCode" cname="生产组" width="110" align="center" defaultValue="" required="true"--%>
<%-- filter="contains" readonly="true">--%>
<%-- <EF:EFOptions blockId="group_record_block_id" valueField="groupCode" textField="groupName"/>--%>
<%-- </EF:EFComboColumn>--%>
<EF:EFColumn ename="groupCode" cname="生产组" width="100" align="center" />
<EF:EFColumn ename="groupName" cname="生产组名称" enable="false" align="center" hidden="true"/>
<EF:EFColumn ename="createdTime" cname="派工时间" enable="false" width="100" align="center"
editType="date" dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required="true"/>
<EF:EFColumn ename="quantity" cname="分派数量" format="{0:N0}" required="true"/>
</EF:EFGrid>
<br/>
<span style='color: red;font-size: 13px;'>说明:厂区和生产组仅新增的时候可以编辑</span>
</EF:EFRegion>
</EF:EFPage> </EF:EFPage>
$(function () {
var factoryGlobalData = __eiInfo.getBlock("factory_record_block_id").getMappedRows();
let groupGlobalData = __eiInfo.getBlock("group_record_block_id").getMappedRows();
IPLATUI.EFGrid = {
"result" : {
pageable: {
pageSize: 20,
pageSizes: [10, 20, 50, 70, 100],
},
columns: [{
field: "groupName",
attributes: {
class: "i-input-readonly"
}
}, {
field: "factoryCode",
template: function (dataItem) {
for (let i = 0; i < factoryGlobalData.length; i++) {
if (factoryGlobalData[i]['factoryCode'] === dataItem['factoryCode']) {
return factoryGlobalData[i]['factoryName'];
}
}
return "";
},
editor: function (container, options) {
var input = $('<input />');
input.attr("name", options.field);
input.attr("id", options.field);
input.appendTo(container);
input.kendoDropDownList({
dataSource: factoryGlobalData,
minLength: 0,
dataTextField: "factoryName",
dataValueField: "factoryCode",
optionLabelTemplate: "#:factoryName#",
valueTemplate: "#:factoryName#",
template: "#:factoryName#",
filter: "contains"
});
}
}, {
field: "groupCode",
template: function (dataItem) {
for (let i = 0; i < groupGlobalData.length; i++) {
if (groupGlobalData[i]['groupCode'] === dataItem['groupCode']) {
return groupGlobalData[i]['groupName'];
}
}
return "";
},
editor: function (container, options) {
let dataSource;
let inInfo = new EiInfo();
inInfo.set("inqu_status-0-factoryCode", options.model["factoryCode"]);
inInfo.set("inqu_status-0-productType", $("#detail-0-productType").val());
inInfo.set("field", options.field);
EiCommunicator.send(HGSC006C, groupRecordComboBox, inInfo, {
onSuccess: function (ei) {
dataSource = ei.getBlock("group_record_block_id").getMappedRows();
},
onFail: function (ei) {
}
}, {async: false});
let grid = container.closest(".k-grid").data("kendoGrid");
let cellIndex = grid.cellIndex(container);
let input = $('<input />');
let field = inInfo.get("field");
input.attr("name", field);
input.attr("id", field);
input.appendTo(container);
input.kendoDropDownList({
valuePrimitive: true,
dataTextField: "groupName",
dataValueField: "groupCode",
dataSource: dataSource,
template: "#=groupName#",
filter: "contains"
});
}
},{
field: "createdTime",
attributes: {
class: "i-input-readonly"
},
defaultValue: function () {
return currShortDate();
}
}],
onSave: function (e) {
// 阻止后台保存请求,使用自定义保存
e.preventDefault();
save();
},
onDelete: function (e) {
// 阻止后台删除请求,使用自定义删除
e.preventDefault();
deleteFunc();
},
onSuccess: function (e) {
if(e.eiInfo.extAttr.methodName == 'save'
||e.eiInfo.extAttr.methodName == 'delete' ){
query();
}
}
}
}
$("#QUERY").on("click", query);
downKeyUp();
});
/**
* 查询
*/
function query() {
resultGrid.dataSource.page(1);
}
/**
* 保存
*/
let save = function () {
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
for (let i = 0; i < rows.length; i++) {
if (isBlank(rows[i]['factoryCode'])) {
message("勾选的第" + (i + 1) + "行\"厂区\",不能为空");
return;
}
if (isBlank(rows[i]['groupCode'])) {
message("勾选的第" + (i + 1) + "行\"生产组\",不能为空");
return;
}
if (isBlank(rows[i]['quantity'])) {
message("勾选的第" + (i + 1) + "行\"分派数量\",不能为空");
return;
}
if (!isPositiveInteger(rows[i]['quantity'])) {
message("勾选的第" + (i + 1) + "行\"分派数量\"必须是大于0的整数");
return;
}
}
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"保存\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result", "HGSC006C", "save", true);
}
});
}
/**
* 删除
*/
let deleteFunc = function () {
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"删除\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result", "HGSC006C", "delete", true);
}
});
}
<!DOCTYPE html>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<EF:EFPage title="拆单派工">
<EF:EFRegion id="inqu" title="订单详情">
<EF:EFInput ename="detail-0-projCode" cname="项目号" type="hidden"/>
<EF:EFInput ename="detail-0-productType" cname="产品类型" type="hidden"/>
<EF:EFInput ename="detail-0-id" cname="订单明细ID" type="hidden"/>
<EF:EFInput ename="detail-0-companyCode" cname="公司编码" type="hidden"/>
<div class="row">
<EF:EFInput ename="detail-0-projCode" cname="项目号" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-projName" cname="项目名称" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-orderNo" cname="生产订单号" colWidth="4" readonly="true"/>
</div>
<div class="row">
<EF:EFInput ename="detail-0-productCode" cname="产品编码" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-productName" cname="产品名称" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-processName" cname="工序" colWidth="4" readonly="true"/>
</div>
<div class="row">
<EF:EFInput ename="detail-0-planCompletionDate" cname="计划完成日期" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-quantity" cname="计划数量" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-totalWeight" cname="计划重量(kg)" colWidth="4" readonly="true"/>
</div>
<div class="row">
<EF:EFInput ename="detail-0-assignQuantity" cname="已派工数量" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-unassignQuantity" cname="待派工数量" colWidth="4" readonly="true"/>
<EF:EFSelect ename="detail-0-assignStatus" cname="状态" colWidth="4" readonly="true">
<EF:EFCodeOption codeName="hggp.assignStatus"/>
</EF:EFSelect>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="override" checkMode="row" isFloat="true">
<EF:EFColumn ename="id" cname="任务ID" enable="false" width="80" align="center"/>
<EF:EFColumn ename="taskCode" cname="任务单号" enable="false" hidden="true"/>
<EF:EFComboColumn ename="factoryCode" cname="厂区" width="110" align="center" defaultValue="" required="true"
filter="contains" readonly="true">
<EF:EFOptions blockId="factory_record_block_id" valueField="valueField" textField="textField"/>
</EF:EFComboColumn>
<EF:EFColumn ename="factoryName" cname="工厂" enable="false" align="center" hidden="true"/>
<EF:EFComboColumn ename="groupCode" cname="生产组" width="110" align="center" defaultValue="" required="true"
filter="contains" readonly="true">
<EF:EFOptions blockId="group_record_block_id" valueField="valueField" textField="textField"/>
</EF:EFComboColumn>
<EF:EFColumn ename="groupName" cname="生产组名称" enable="false" align="center" hidden="true"/>
<EF:EFColumn ename="createdTime" cname="派工时间" enable="false" width="100" align="center"
editType="date" dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required="true"/>
<EF:EFColumn ename="quantity" cname="分派数量" format="{0:N0}" required="true"/>
</EF:EFGrid>
<br/>
<span style='color: red;font-size: 13px;'>说明:厂区和生产组仅新增的时候可以编辑</span>
</EF:EFRegion>
</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