Commit f49f4aea by yukang

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

parents 34f11413 79916d91
......@@ -383,7 +383,10 @@ public enum DdynamicEnum {
* 用途:工人管理下拉框
* 编写:wwl
*/
WORKER_BLOCK_ID("worker_block_id","userId","userName","HPPZ013.queryComboBox");
WORKER_BLOCK_ID("worker_block_id","userId","userName","HPPZ013.queryComboBox"),
PLAN_SALES_CODE_BLOCK_ID("planSalesCode_block_id","planSalesCode","yearMonth","HPPZ018.queryPlanSalesCode"),
;
/** 将结果集放入的块名 */
......
......@@ -21,7 +21,7 @@ public class CutterbarWarning {
private String errorCode;
/**
* 异常登记
* 异常等级
*/
private String prio;
......
package com.baosight.hpjx.hp.pz.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:THppz019.java <br>
* Description: <br>
*
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
*
* @version 1.0
* @history 2024-04-23 18:29:24 create
*/
public class HPPZ019 extends DaoEPBase {
private static final long serialVersionUID = 1L;
public static final String FIELD_ID = "id"; /* ID*/
public static final String FIELD_COMPANY_CODE = "companyCode"; /* 企业编码*/
public static final String FIELD_DEP_CODE = "depCode"; /* 部门编码*/
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_DELETE_FLAG = "deleteFlag"; /* 是否删除0:否1.是*/
public static final String FIELD_CONTRACT_DATE = "contractDate"; /* 合同日期*/
public static final String FIELD_CONTRACT_CODE = "contractCode"; /* 合同号*/
public static final String FIELD_CONTRACT_NAME = "contractName"; /* 合同名称*/
public static final String FIELD_PLAN_SALES_CODE = "planSalesCode"; /* 销售计划单号*/
public static final String FIELD_CUST_CODE = "custCode"; /* 客户编码*/
public static final String FIELD_CONTRACT_AMOUNT = "contractAmount"; /* 合同金额*/
public static final String FIELD_CONTRACT_STATUS = "contractStatus"; /* 合同状态*/
public static final String FIELD_APPROVE_STATUS = "approveStatus"; /* 审批状态*/
public static final String COL_ID = "ID"; /* ID*/
public static final String COL_COMPANY_CODE = "COMPANY_CODE"; /* 企业编码*/
public static final String COL_DEP_CODE = "DEP_CODE"; /* 部门编码*/
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_DELETE_FLAG = "DELETE_FLAG"; /* 是否删除0:否1.是*/
public static final String COL_CONTRACT_DATE = "CONTRACT_DATE"; /* 合同日期*/
public static final String COL_CONTRACT_CODE = "CONTRACT_CODE"; /* 合同号*/
public static final String COL_CONTRACT_NAME = "CONTRACT_NAME"; /* 合同名称*/
public static final String COL_PLAN_SALES_CODE = "PLAN_SALES_CODE"; /* 销售计划单号*/
public static final String COL_CUST_CODE = "CUST_CODE"; /* 客户编码*/
public static final String COL_CONTRACT_AMOUNT = "CONTRACT_AMOUNT"; /* 合同金额*/
public static final String COL_CONTRACT_STATUS = "CONTRACT_STATUS"; /* 合同状态*/
public static final String COL_APPROVE_STATUS = "APPROVE_STATUS"; /* 审批状态*/
public static final String QUERY = "HPPZ019.query";
public static final String COUNT = "HPPZ019.count";
public static final String INSERT = "HPPZ019.insert";
public static final String UPDATE = "HPPZ019.update";
public static final String DELETE = "HPPZ019.delete";
public static final String DELETE_FLAG = "HPPZ019.deleteFlag";
public static final String UPDATE_CONTRACT_STATUS = "HPPZ019.updateContractStatus";
public static final String UPDATE_APPROVE_STATUS = "HPPZ019.updateApproveStatus";
private Long id = new Long(0); /* ID*/
private String companyCode = " "; /* 企业编码*/
private String depCode = " "; /* 部门编码*/
private String createdBy = " "; /* 创建人*/
private String createdName = " "; /* 创建人名称*/
private String createdTime = " "; /* 创建时间*/
private String updatedBy = " "; /* 修改人*/
private String updatedName = " "; /* 修改人名称*/
private String updatedTime = " "; /* 修改时间*/
private Integer deleteFlag = 0; /* 是否删除0:否1.是*/
private String contractDate = " "; /* 合同日期*/
private String contractCode = " "; /* 合同号*/
private String contractName = " "; /* 合同名称*/
private String planSalesCode = " "; /* 销售计划单号*/
private String custCode = " "; /* 客户编码*/
private BigDecimal contractAmount = new BigDecimal("0"); /* 合同金额*/
private Integer contractStatus = 0; /* 合同状态*/
private Integer approveStatus = 0; /* 审批状态*/
/**
* initialize the metadata.
*/
public void initMetaData() {
EiColumn eiColumn;
eiColumn = new EiColumn(FIELD_ID);
eiColumn.setPrimaryKey(true);
eiColumn.setDescName("ID");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_COMPANY_CODE);
eiColumn.setDescName("企业编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DEP_CODE);
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_DELETE_FLAG);
eiColumn.setDescName("是否删除0:否1.是");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CONTRACT_DATE);
eiColumn.setDescName("合同日期");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CONTRACT_CODE);
eiColumn.setDescName("合同号");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CONTRACT_NAME);
eiColumn.setDescName("合同名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PLAN_SALES_CODE);
eiColumn.setDescName("销售计划单号");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CUST_CODE);
eiColumn.setDescName("客户编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CONTRACT_AMOUNT);
eiColumn.setType("N");
eiColumn.setScaleLength(2);
eiColumn.setFieldLength(20);
eiColumn.setDescName("合同金额");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CONTRACT_STATUS);
eiColumn.setDescName("合同状态");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_APPROVE_STATUS);
eiColumn.setDescName("审批状态");
eiMetadata.addMeta(eiColumn);
}
/**
* the constructor.
*/
public HPPZ019() {
initMetaData();
}
/**
* get the id - ID.
* @return the id
*/
public Long getId() {
return this.id;
}
/**
* set the id - ID.
*
* @param id - ID
*/
public void setId(Long id) {
this.id = id;
}
/**
* get the 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 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 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 deleteFlag - 是否删除0:否1.是.
* @return the deleteFlag
*/
public Integer getDeleteFlag() {
return this.deleteFlag;
}
/**
* set the deleteFlag - 是否删除0:否1.是.
*
* @param deleteFlag - 是否删除0:否1.是
*/
public void setDeleteFlag(Integer deleteFlag) {
this.deleteFlag = deleteFlag;
}
/**
* 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 contractCode - 合同号.
* @return the contractCode
*/
public String getContractCode() {
return this.contractCode;
}
/**
* set the contractCode - 合同号.
*
* @param contractCode - 合同号
*/
public void setContractCode(String contractCode) {
this.contractCode = contractCode;
}
/**
* 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 planSalesCode - 销售计划单号.
* @return the planSalesCode
*/
public String getPlanSalesCode() {
return this.planSalesCode;
}
/**
* set the planSalesCode - 销售计划单号.
*
* @param planSalesCode - 销售计划单号
*/
public void setPlanSalesCode(String planSalesCode) {
this.planSalesCode = planSalesCode;
}
/**
* get the custCode - 客户编码.
* @return the custCode
*/
public String getCustCode() {
return this.custCode;
}
/**
* set the custCode - 客户编码.
*
* @param custCode - 客户编码
*/
public void setCustCode(String custCode) {
this.custCode = custCode;
}
/**
* get the contractAmount - 合同金额.
* @return the contractAmount
*/
public BigDecimal getContractAmount() {
return this.contractAmount;
}
/**
* set the contractAmount - 合同金额.
*
* @param contractAmount - 合同金额
*/
public void setContractAmount(BigDecimal contractAmount) {
this.contractAmount = contractAmount;
}
/**
* get the contractStatus - 合同状态.
* @return the contractStatus
*/
public Integer getContractStatus() {
return this.contractStatus;
}
/**
* set the contractStatus - 合同状态.
*
* @param contractStatus - 合同状态
*/
public void setContractStatus(Integer contractStatus) {
this.contractStatus = contractStatus;
}
/**
* get the approveStatus - 审批状态.
* @return the approveStatus
*/
public Integer getApproveStatus() {
return this.approveStatus;
}
/**
* set the approveStatus - 审批状态.
*
* @param approveStatus - 审批状态
*/
public void setApproveStatus(Integer approveStatus) {
this.approveStatus = approveStatus;
}
/**
* 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));
setCompanyCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_COMPANY_CODE)), companyCode));
setDepCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DEP_CODE)), depCode));
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));
setDeleteFlag(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_DELETE_FLAG)), deleteFlag));
setContractDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CONTRACT_DATE)), contractDate));
setContractCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CONTRACT_CODE)), contractCode));
setContractName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CONTRACT_NAME)), contractName));
setPlanSalesCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PLAN_SALES_CODE)), planSalesCode));
setCustCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CUST_CODE)), custCode));
setContractAmount(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_CONTRACT_AMOUNT)), contractAmount));
setContractStatus(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_CONTRACT_STATUS)), contractStatus));
setApproveStatus(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_APPROVE_STATUS)), approveStatus));
}
/**
* 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_COMPANY_CODE, StringUtils.toString(companyCode, eiMetadata.getMeta(FIELD_COMPANY_CODE)));
map.put(FIELD_DEP_CODE, StringUtils.toString(depCode, eiMetadata.getMeta(FIELD_DEP_CODE)));
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_DELETE_FLAG, StringUtils.toString(deleteFlag, eiMetadata.getMeta(FIELD_DELETE_FLAG)));
map.put(FIELD_CONTRACT_DATE, StringUtils.toString(contractDate, eiMetadata.getMeta(FIELD_CONTRACT_DATE)));
map.put(FIELD_CONTRACT_CODE, StringUtils.toString(contractCode, eiMetadata.getMeta(FIELD_CONTRACT_CODE)));
map.put(FIELD_CONTRACT_NAME, StringUtils.toString(contractName, eiMetadata.getMeta(FIELD_CONTRACT_NAME)));
map.put(FIELD_PLAN_SALES_CODE, StringUtils.toString(planSalesCode, eiMetadata.getMeta(FIELD_PLAN_SALES_CODE)));
map.put(FIELD_CUST_CODE, StringUtils.toString(custCode, eiMetadata.getMeta(FIELD_CUST_CODE)));
map.put(FIELD_CONTRACT_AMOUNT, StringUtils.toString(contractAmount, eiMetadata.getMeta(FIELD_CONTRACT_AMOUNT)));
map.put(FIELD_CONTRACT_STATUS, StringUtils.toString(contractStatus, eiMetadata.getMeta(FIELD_CONTRACT_STATUS)));
map.put(FIELD_APPROVE_STATUS, StringUtils.toString(approveStatus, eiMetadata.getMeta(FIELD_APPROVE_STATUS)));
return map;
}
}
package com.baosight.hpjx.hp.pz.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:THppz020.java <br>
* Description: <br>
*
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
*
* @version 1.0
* @history 2024-04-23 18:29:24 create
*/
public class HPPZ020 extends DaoEPBase {
private static final long serialVersionUID = 1L;
public static final String FIELD_ID = "id"; /* ID*/
public static final String FIELD_COMPANY_CODE = "companyCode"; /* 企业编码*/
public static final String FIELD_DEP_CODE = "depCode"; /* 部门编码*/
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_DELETE_FLAG = "deleteFlag"; /* 是否删除0:否1.是*/
public static final String FIELD_CONTRACT_CODE = "contractCode"; /* 合同号*/
public static final String FIELD_SERIAL_NUM = "serialNum"; /* 序号*/
public static final String FIELD_PRDT_CODE = "prdtCode"; /* 产品编码*/
public static final String FIELD_QUANTITY = "quantity"; /* 数量*/
public static final String FIELD_TAX_RATE = "taxRate"; /* 税率*/
public static final String FIELD_NOTAX_PRICE = "notaxPrice"; /* 不含税单价*/
public static final String FIELD_NOTAX_AMOUNT = "notaxAmount"; /* 不含税金额*/
public static final String FIELD_THE_AMOUNT = "theAmount"; /* 税额*/
public static final String FIELD_TAX_AMOUNT = "taxAmount"; /* 含税金额*/
public static final String COL_ID = "ID"; /* ID*/
public static final String COL_COMPANY_CODE = "COMPANY_CODE"; /* 企业编码*/
public static final String COL_DEP_CODE = "DEP_CODE"; /* 部门编码*/
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_DELETE_FLAG = "DELETE_FLAG"; /* 是否删除0:否1.是*/
public static final String COL_CONTRACT_CODE = "CONTRACT_CODE"; /* 合同号*/
public static final String COL_SERIAL_NUM = "SERIAL_NUM"; /* 序号*/
public static final String COL_PRDT_CODE = "PRDT_CODE"; /* 产品编码*/
public static final String COL_QUANTITY = "QUANTITY"; /* 数量*/
public static final String COL_TAX_RATE = "TAX_RATE"; /* 税率*/
public static final String COL_NOTAX_PRICE = "NOTAX_PRICE"; /* 不含税单价*/
public static final String COL_NOTAX_AMOUNT = "NOTAX_AMOUNT"; /* 不含税金额*/
public static final String COL_THE_AMOUNT = "THE_AMOUNT"; /* 税额*/
public static final String COL_TAX_AMOUNT = "TAX_AMOUNT"; /* 含税金额*/
public static final String QUERY = "HPPZ020.query";
public static final String COUNT = "HPPZ020.count";
public static final String INSERT = "HPPZ020.insert";
public static final String UPDATE = "HPPZ020.update";
public static final String DELETE = "HPPZ020.delete";
public static final String DELETE_FLAG = "HPPZ020.deleteFlag";
public static final String QUERY_MAX = "HPPZ020.queryMax";
private Long id = new Long(0); /* ID*/
private String companyCode = " "; /* 企业编码*/
private String depCode = " "; /* 部门编码*/
private String createdBy = " "; /* 创建人*/
private String createdName = " "; /* 创建人名称*/
private String createdTime = " "; /* 创建时间*/
private String updatedBy = " "; /* 修改人*/
private String updatedName = " "; /* 修改人名称*/
private String updatedTime = " "; /* 修改时间*/
private Integer deleteFlag = 0; /* 是否删除0:否1.是*/
private String contractCode = " "; /* 合同号*/
private Long serialNum = new Long(0); /* 序号*/
private String prdtCode = " "; /* 产品编码*/
private Long quantity = new Long(0); /* 数量*/
private BigDecimal taxRate = new BigDecimal("0"); /* 税率*/
private BigDecimal notaxPrice = new BigDecimal("0"); /* 不含税单价*/
private BigDecimal notaxAmount = new BigDecimal("0"); /* 不含税金额*/
private BigDecimal theAmount = new BigDecimal("0"); /* 税额*/
private BigDecimal taxAmount = new BigDecimal("0"); /* 含税金额*/
/**
* initialize the metadata.
*/
public void initMetaData() {
EiColumn eiColumn;
eiColumn = new EiColumn(FIELD_ID);
eiColumn.setPrimaryKey(true);
eiColumn.setDescName("ID");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_COMPANY_CODE);
eiColumn.setDescName("企业编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DEP_CODE);
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_DELETE_FLAG);
eiColumn.setDescName("是否删除0:否1.是");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CONTRACT_CODE);
eiColumn.setDescName("合同号");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_SERIAL_NUM);
eiColumn.setDescName("序号");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PRDT_CODE);
eiColumn.setDescName("产品编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_QUANTITY);
eiColumn.setDescName("数量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_TAX_RATE);
eiColumn.setType("N");
eiColumn.setScaleLength(6);
eiColumn.setFieldLength(10);
eiColumn.setDescName("税率");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_NOTAX_PRICE);
eiColumn.setType("N");
eiColumn.setScaleLength(6);
eiColumn.setFieldLength(14);
eiColumn.setDescName("不含税单价");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_NOTAX_AMOUNT);
eiColumn.setType("N");
eiColumn.setScaleLength(2);
eiColumn.setFieldLength(18);
eiColumn.setDescName("不含税金额");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_THE_AMOUNT);
eiColumn.setType("N");
eiColumn.setScaleLength(2);
eiColumn.setFieldLength(18);
eiColumn.setDescName("税额");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_TAX_AMOUNT);
eiColumn.setType("N");
eiColumn.setScaleLength(2);
eiColumn.setFieldLength(18);
eiColumn.setDescName("含税金额");
eiMetadata.addMeta(eiColumn);
}
/**
* the constructor.
*/
public HPPZ020() {
initMetaData();
}
/**
* get the id - ID.
* @return the id
*/
public Long getId() {
return this.id;
}
/**
* set the id - ID.
*
* @param id - ID
*/
public void setId(Long id) {
this.id = id;
}
/**
* get the 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 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 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 deleteFlag - 是否删除0:否1.是.
* @return the deleteFlag
*/
public Integer getDeleteFlag() {
return this.deleteFlag;
}
/**
* set the deleteFlag - 是否删除0:否1.是.
*
* @param deleteFlag - 是否删除0:否1.是
*/
public void setDeleteFlag(Integer deleteFlag) {
this.deleteFlag = deleteFlag;
}
/**
* get the contractCode - 合同号.
* @return the contractCode
*/
public String getContractCode() {
return this.contractCode;
}
/**
* set the contractCode - 合同号.
*
* @param contractCode - 合同号
*/
public void setContractCode(String contractCode) {
this.contractCode = contractCode;
}
/**
* get the serialNum - 序号.
* @return the serialNum
*/
public Long getSerialNum() {
return this.serialNum;
}
/**
* set the serialNum - 序号.
*
* @param serialNum - 序号
*/
public void setSerialNum(Long serialNum) {
this.serialNum = serialNum;
}
/**
* get the prdtCode - 产品编码.
* @return the prdtCode
*/
public String getPrdtCode() {
return this.prdtCode;
}
/**
* set the prdtCode - 产品编码.
*
* @param prdtCode - 产品编码
*/
public void setPrdtCode(String prdtCode) {
this.prdtCode = prdtCode;
}
/**
* get the quantity - 数量.
* @return the quantity
*/
public Long getQuantity() {
return this.quantity;
}
/**
* set the quantity - 数量.
*
* @param quantity - 数量
*/
public void setQuantity(Long quantity) {
this.quantity = quantity;
}
/**
* get the taxRate - 税率.
* @return the taxRate
*/
public BigDecimal getTaxRate() {
return this.taxRate;
}
/**
* set the taxRate - 税率.
*
* @param taxRate - 税率
*/
public void setTaxRate(BigDecimal taxRate) {
this.taxRate = taxRate;
}
/**
* get the notaxPrice - 不含税单价.
* @return the notaxPrice
*/
public BigDecimal getNotaxPrice() {
return this.notaxPrice;
}
/**
* set the notaxPrice - 不含税单价.
*
* @param notaxPrice - 不含税单价
*/
public void setNotaxPrice(BigDecimal notaxPrice) {
this.notaxPrice = notaxPrice;
}
/**
* get the notaxAmount - 不含税金额.
* @return the notaxAmount
*/
public BigDecimal getNotaxAmount() {
return this.notaxAmount;
}
/**
* set the notaxAmount - 不含税金额.
*
* @param notaxAmount - 不含税金额
*/
public void setNotaxAmount(BigDecimal notaxAmount) {
this.notaxAmount = notaxAmount;
}
/**
* get the theAmount - 税额.
* @return the theAmount
*/
public BigDecimal getTheAmount() {
return this.theAmount;
}
/**
* set the theAmount - 税额.
*
* @param theAmount - 税额
*/
public void setTheAmount(BigDecimal theAmount) {
this.theAmount = theAmount;
}
/**
* get the taxAmount - 含税金额.
* @return the taxAmount
*/
public BigDecimal getTaxAmount() {
return this.taxAmount;
}
/**
* set the taxAmount - 含税金额.
*
* @param taxAmount - 含税金额
*/
public void setTaxAmount(BigDecimal taxAmount) {
this.taxAmount = taxAmount;
}
/**
* 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));
setCompanyCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_COMPANY_CODE)), companyCode));
setDepCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DEP_CODE)), depCode));
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));
setDeleteFlag(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_DELETE_FLAG)), deleteFlag));
setContractCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CONTRACT_CODE)), contractCode));
setSerialNum(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_SERIAL_NUM)), serialNum));
setPrdtCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PRDT_CODE)), prdtCode));
setQuantity(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_QUANTITY)), quantity));
setTaxRate(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_TAX_RATE)), taxRate));
setNotaxPrice(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_NOTAX_PRICE)), notaxPrice));
setNotaxAmount(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_NOTAX_AMOUNT)), notaxAmount));
setTheAmount(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_THE_AMOUNT)), theAmount));
setTaxAmount(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_TAX_AMOUNT)), taxAmount));
}
/**
* 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_COMPANY_CODE, StringUtils.toString(companyCode, eiMetadata.getMeta(FIELD_COMPANY_CODE)));
map.put(FIELD_DEP_CODE, StringUtils.toString(depCode, eiMetadata.getMeta(FIELD_DEP_CODE)));
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_DELETE_FLAG, StringUtils.toString(deleteFlag, eiMetadata.getMeta(FIELD_DELETE_FLAG)));
map.put(FIELD_CONTRACT_CODE, StringUtils.toString(contractCode, eiMetadata.getMeta(FIELD_CONTRACT_CODE)));
map.put(FIELD_SERIAL_NUM, StringUtils.toString(serialNum, eiMetadata.getMeta(FIELD_SERIAL_NUM)));
map.put(FIELD_PRDT_CODE, StringUtils.toString(prdtCode, eiMetadata.getMeta(FIELD_PRDT_CODE)));
map.put(FIELD_QUANTITY, StringUtils.toString(quantity, eiMetadata.getMeta(FIELD_QUANTITY)));
map.put(FIELD_TAX_RATE, StringUtils.toString(taxRate, eiMetadata.getMeta(FIELD_TAX_RATE)));
map.put(FIELD_NOTAX_PRICE, StringUtils.toString(notaxPrice, eiMetadata.getMeta(FIELD_NOTAX_PRICE)));
map.put(FIELD_NOTAX_AMOUNT, StringUtils.toString(notaxAmount, eiMetadata.getMeta(FIELD_NOTAX_AMOUNT)));
map.put(FIELD_THE_AMOUNT, StringUtils.toString(theAmount, eiMetadata.getMeta(FIELD_THE_AMOUNT)));
map.put(FIELD_TAX_AMOUNT, StringUtils.toString(taxAmount, eiMetadata.getMeta(FIELD_TAX_AMOUNT)));
return map;
}
}
......@@ -99,7 +99,7 @@ public class ServiceHPPZ017 extends ServiceEPBase {
public void add(HPPZ017 hppz017) {
hppz017.setSalesCode(SequenceGenerator.getNextSequence(HPConstant.SequenceId.HPPZ017_SALES_CODE));
List<HPPZ017> hppz017s = HPPZTools.HpPz017.getYear(hppz017.getYear());
AssertUtils.isNotEmpty(hppz017s, String.format("年度[%s]已存在", hppz017.getYear()));
AssertUtils.isNotEmpty(hppz017s, String.format("年度[%s]销售目标已存在,添加失败!", hppz017.getYear()));
DaoUtils.insert(HPPZ017.INSERT, hppz017);
}
......
package com.baosight.hpjx.hp.pz.service;
import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation;
import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.common.HPConstants;
import com.baosight.hpjx.core.constant.CommonConstant;
import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.hp.constant.HPConstant;
import com.baosight.hpjx.hp.pz.domain.*;
import com.baosight.hpjx.hp.pz.tools.HPPZTools;
import com.baosight.hpjx.hp.sc.domain.HPSC003;
import com.baosight.hpjx.hp.sc.domain.HPSC004;
import com.baosight.hpjx.hp.sc.tools.HPSCTools;
import com.baosight.hpjx.util.*;
import com.baosight.hpjx.util.contants.ACConstants;
import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.resource.I18nMessages;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import com.baosight.iplat4j.ed.util.SequenceGenerator;
import java.math.BigDecimal;
import java.util.*;
/**
* @author LiuYang
* @version 1.0 2024/4/23
*/
public class ServiceHPPZ019 extends ServiceEPBase {
@Override
public EiInfo initLoad(EiInfo inInfo) {
//增加主表 resultBlock 块
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HPPZ019.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
final EiInfo outEiInfo = super.query(inInfo, HPPZ019.QUERY, new HPPZ019());
//增加明细表 detailBlock 块
EiBlock detailBlock = outEiInfo.addBlock(HPConstants.BLOCK_DETAIL);
detailBlock.addBlockMeta(new HPPZ020().eiMetadata);
CommonMethod.initBlock(outEiInfo, Arrays.asList(DdynamicEnum.CUSTOMER_RECORD_BLOCK_ID,DdynamicEnum.PLAN_SALES_CODE_BLOCK_ID,DdynamicEnum.INVENT_NAME_BLOCK_ID), null);
return outEiInfo;
}
@Override
public EiInfo query(EiInfo inInfo) {
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HPPZ019.FIELD_CONTRACT_DATE,
DateUtils.formatShort(inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HPPZ019.FIELD_CONTRACT_DATE)));
return super.query(inInfo, HPPZ019.QUERY);
}
public EiInfo queryDetail(EiInfo inInfo){
HashMap params = new HashMap();
params.put(HPPZ019.FIELD_DELETE_FLAG,CommonConstant.YesNo.NO_0);
params.put(HPPZ020.FIELD_CONTRACT_CODE,inInfo.getCellStr(EiConstant.queryBlock,ACConstants.ROW_CODE_0,HPPZ020.FIELD_CONTRACT_CODE));
List list = dao.query(HPPZ020.QUERY,params,0,-999999);
inInfo.addBlock(HPConstants.BLOCK_DETAIL).addBlockMeta(new HPPZ020().eiMetadata);
inInfo.addBlock(HPConstants.BLOCK_DETAIL).addRows(list);
inInfo.getBlock(HPConstants.BLOCK_DETAIL).set(EiConstant.limitStr, list.size());
return inInfo;
//添加返回到前台的块,块名和前台的对应
/*EiInfo outInfo = super.query(inInfo, HPPZ020.QUERY, new HPPZ020(), false, new HPPZ020().eiMetadata,
EiConstant.queryBlock, HPConstants.BLOCK_DETAIL, HPConstants.BLOCK_DETAIL);*/
}
@OperationLogAnnotation(operModul = "销售合同",operType = "删除",operDesc = "删除操作")
@Override
public EiInfo delete(EiInfo inInfo) {
int i = 0;
try {
HPPZ019 hppz019 = new HPPZ019();
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
for (i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
hppz019.fromMap(map);
hppz019.setDeleteFlag(CommonConstant.YesNo.YES_1);
DaoUtils.update(HPPZ019.DELETE_FLAG, hppz019);
}
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsgByKey("ep.1000", new String[]{String.valueOf(i), I18nMessages.getText("label.delete", "删除")});
} catch (PlatException e) {
e.printStackTrace();
inInfo.setStatus(EiConstant.STATUS_FAILURE);
ErrorCodeUtils.handleDeleteException(inInfo,i,e);
logError("删除失败", e.getMessage());
return inInfo;
}
return inInfo;
}
@OperationLogAnnotation(operModul = "销售合同",operType = "保存",operDesc = "操作")
public EiInfo save(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
// 写入数据
for (Map resultRow : resultRows) {
HPPZ019 hppz019 = new HPPZ019();
hppz019.fromMap(resultRow);
if (hppz019.getId() == null || hppz019.getId() == 0) {
this.add(hppz019);
} else {
this.modify(hppz019);
}
}
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据保存成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "保存失败");
}
return inInfo;
}
/**
* 新增操作
*/
public void add(HPPZ019 hppz019) {
//hppz019.setPlanSalesCode(SequenceGenerator.getNextSequence(HPConstant.SequenceId.PLAN_SALES_CODE));
List<HPPZ019> hppz018s = this.dao.query(HPPZ020.QUERY,new HashMap<String,Object>(){{
put(HPPZ019.FIELD_CONTRACT_CODE,hppz019.getContractCode());
//put(HPPZ019.FIELD_DELETE_FLAG,CommonConstant.YesNo.NO_0);
}});
AssertUtils.isNotEmpty(hppz018s, String.format("合同号[%s]已存在,添加失败", hppz019.getContractCode()));
DaoUtils.insert(HPPZ019.INSERT, hppz019);
}
/**
* 修改操作
*/
public void modify(HPPZ019 hppz019) {
DaoUtils.update(HPPZ019.UPDATE, hppz019);
}
@OperationLogAnnotation(operModul = "销售合同",operType = "保存",operDesc = "保存明细操作")
public EiInfo saveDetail(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(HPConstants.BLOCK_DETAIL).getRows();
String contractCode = inInfo.get(HPPZ020.FIELD_CONTRACT_CODE).toString();
// 写入数据
for (Map resultRow : resultRows) {
HPPZ020 hppz020 = new HPPZ020();
hppz020.fromMap(resultRow);
hppz020.setContractCode(contractCode);
if (hppz020.getId() == null || hppz020.getId() == 0) {
this.addDetail(hppz020);
} else {
this.modifyDetail(hppz020);
}
}
Map map = new HashMap();
map.put(HPPZ020.FIELD_CONTRACT_CODE,contractCode);
map.put(HPPZ019.FIELD_DELETE_FLAG,CommonConstant.YesNo.NO_0);
List<HPPZ020> hppz020s = this.dao.query(HPPZ020.QUERY,map);
BigDecimal sum = new BigDecimal(0);
for (int i = 0; i < hppz020s.size(); i++) {
sum = sum.add(hppz020s.get(i).getTaxAmount());
}
map.put(HPPZ019.FIELD_CONTRACT_AMOUNT,sum);
map.put(HPPZ019.FIELD_CONTRACT_STATUS,CommonConstant.YesNo.YES_1);
DaoUtils.update(HPPZ019.UPDATE_CONTRACT_STATUS,map);
inInfo.getBlock(HPConstants.BLOCK_DETAIL).setBlockMeta(new HPPZ020().eiMetadata);
inInfo.getBlock(HPConstants.BLOCK_DETAIL).setRows(hppz020s);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据保存成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "保存失败");
}
return inInfo;
}
/**
* 新增明细操作
*/
public void addDetail(HPPZ020 hppz020) {
List<HPPZ020> list = this.dao.query(HPPZ020.QUERY_MAX,new HashMap<String,Object>(){{
put(HPPZ020.FIELD_CONTRACT_CODE,hppz020.getContractCode());
put(HPPZ019.FIELD_DELETE_FLAG,CommonConstant.YesNo.NO_0);
}});
if (list.size() > 0 && list.get(0).getSerialNum()!=null) {
hppz020.setSerialNum(list.get(0).getSerialNum()+1);
}else {
hppz020.setSerialNum(1L);
}
BigDecimal notaxPrice = hppz020.getNotaxPrice(); //不含税单价
BigDecimal taxRate = hppz020.getTaxRate(); //税率
BigDecimal quantity = BigDecimal.valueOf(hppz020.getQuantity());
BigDecimal nottaxAmount = notaxPrice.multiply(quantity); //不含税金额
BigDecimal taxAmount = nottaxAmount.multiply(taxRate.add(BigDecimal.valueOf(1)));
hppz020.setNotaxAmount(nottaxAmount); //不含税金额
hppz020.setTaxAmount(taxAmount); //含税金额
hppz020.setTheAmount(taxAmount.subtract(nottaxAmount)); //税额
DaoUtils.insert(HPPZ020.INSERT, hppz020);
}
/**
* 修改明细操作
*/
public void modifyDetail(HPPZ020 hppz020) {
BigDecimal notaxPrice = hppz020.getNotaxPrice(); //不含税单价
BigDecimal taxRate = hppz020.getTaxRate(); //税率
BigDecimal quantity = BigDecimal.valueOf(hppz020.getQuantity());
BigDecimal nottaxAmount = notaxPrice.multiply(quantity); //不含税金额
BigDecimal taxAmount = nottaxAmount.multiply(taxRate.add(BigDecimal.valueOf(1)));
hppz020.setNotaxAmount(nottaxAmount); //不含税金额
hppz020.setTaxAmount(taxAmount); //含税金额
hppz020.setTheAmount(taxAmount.subtract(nottaxAmount)); //税额
DaoUtils.update(HPPZ020.UPDATE, hppz020);
}
@OperationLogAnnotation(operModul = "销售合同",operType = "删除",operDesc = "删除明细操作")
public EiInfo deleteDetail(EiInfo inInfo) {
int i = 0;
try {
HPPZ020 hppz020 = new HPPZ020();
EiBlock eiBlock = inInfo.getBlock(HPConstants.BLOCK_DETAIL);
String contractCode = inInfo.get(HPPZ020.FIELD_CONTRACT_CODE).toString();
for (i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
hppz020.fromMap(map);
hppz020.setDeleteFlag(CommonConstant.YesNo.YES_1);
DaoUtils.update(HPPZ020.DELETE_FLAG, hppz020);
}
Map map = new HashMap();
map.put(HPPZ020.FIELD_CONTRACT_CODE,contractCode);
map.put(HPPZ019.FIELD_DELETE_FLAG,CommonConstant.YesNo.NO_0);
List<HPPZ020> hppz020s = this.dao.query(HPPZ020.QUERY,map);
BigDecimal sum = new BigDecimal(0);
for (HPPZ020 hppz20: hppz020s) {
sum = sum.add(hppz20.getTaxAmount());
}
map.put(HPPZ019.FIELD_CONTRACT_AMOUNT,sum);
map.put(HPPZ019.FIELD_CONTRACT_STATUS,CommonConstant.YesNo.YES_1);
DaoUtils.update(HPPZ019.UPDATE_CONTRACT_STATUS,map);
inInfo.getBlock(HPConstants.BLOCK_DETAIL).setBlockMeta(new HPPZ020().eiMetadata);
inInfo.getBlock(HPConstants.BLOCK_DETAIL).setRows(hppz020s);
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsgByKey("ep.1000", new String[]{String.valueOf(i), I18nMessages.getText("label.delete", "删除")});
} catch (PlatException e) {
e.printStackTrace();
inInfo.setStatus(EiConstant.STATUS_FAILURE);
ErrorCodeUtils.handleDeleteException(inInfo,i,e);
logError("删除失败", e.getMessage());
return inInfo;
}
return inInfo;
}
@OperationLogAnnotation(operModul = "销售合同",operType = "合同状态",operDesc = "合同状态操作")
public EiInfo updateContractStatus(EiInfo inInfo){
int i = 0;
try {
HPPZ019 hppz018 = new HPPZ019();
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
for (i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
hppz018.fromMap(map);
DaoUtils.update(HPPZ019.UPDATE_CONTRACT_STATUS, hppz018);
}
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsgByKey("ep.1000", new String[]{String.valueOf(i), I18nMessages.getText("label.update", "修改")});
} catch (PlatException e) {
e.printStackTrace();
inInfo.setStatus(EiConstant.STATUS_FAILURE);
ErrorCodeUtils.handleUpdateException(inInfo,i,e);
logError("修改失败", e.getMessage());
return inInfo;
}
return inInfo;
}
@OperationLogAnnotation(operModul = "销售合同",operType = "审批合同",operDesc = "审批合同操作")
public EiInfo updateApproveStatus(EiInfo inInfo){
int i = 0;
try {
HPPZ019 hppz019 = new HPPZ019();
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
for (i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
hppz019.fromMap(map);
DaoUtils.update(HPPZ019.UPDATE_APPROVE_STATUS, hppz019);
}
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsgByKey("ep.1000", new String[]{String.valueOf(i), I18nMessages.getText("label.update", "修改")});
} catch (PlatException e) {
e.printStackTrace();
inInfo.setStatus(EiConstant.STATUS_FAILURE);
ErrorCodeUtils.handleUpdateException(inInfo,i,e);
logError("修改失败", e.getMessage());
return inInfo;
}
return inInfo;
}
}
......@@ -32,6 +32,9 @@
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCodes">
DEP_CODE IN <iterate close=")" open="(" conjunction="," property="depCodes">#depCodes[]#</iterate>
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
CREATED_BY = #createdBy#
</isNotEmpty>
......@@ -230,4 +233,30 @@
ID = #id#
</update>
<select id="queryPlanSalesCode" parameterClass="java.util.HashMap" resultClass="java.util.HashMap">
SELECT
CONCAT(YEAR,MONTH) as "yearMonth",
PLAN_SALES_CODE AS "planSalesCode"
FROM ${hpjxSchema}.T_HPPZ018
WHERE 1=1
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="status">
STATUS = #status#
</isNotEmpty>
<isEmpty prepend=" AND " property="status">
STATUS = 1
</isEmpty>
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
YEAR DESC ,MONTH DESC
</isEmpty>
</dynamic>
</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-04-23 18:29:24
Version : 1.0
schema : hpjx
tableName : T_HPPZ019
ID BIGINT NOT NULL primarykey,
COMPANY_CODE VARCHAR,
DEP_CODE VARCHAR,
CREATED_BY VARCHAR,
CREATED_NAME VARCHAR,
CREATED_TIME VARCHAR,
UPDATED_BY VARCHAR,
UPDATED_NAME VARCHAR,
UPDATED_TIME VARCHAR,
DELETE_FLAG TINYINT,
CONTRACT_DATE VARCHAR,
CONTRACT_CODE VARCHAR,
CONTRACT_NAME VARCHAR,
PLAN_SALES_CODE VARCHAR,
CUST_CODE VARCHAR,
CONTRACT_AMOUNT DECIMAL,
CONTRACT_STATUS TINYINT,
APPROVE_STATUS TINYINT
-->
<sqlMap namespace="HPPZ019">
<sql id="condition">
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCodes">
DEP_CODE IN <iterate close=")" open="(" conjunction="," property="depCodes">#depCodes[]#</iterate>
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdName">
CREATED_NAME = #createdName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
CREATED_TIME = #createdTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy">
UPDATED_BY = #updatedBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedName">
UPDATED_NAME = #updatedName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
UPDATED_TIME = #updatedTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deleteFlag">
DELETE_FLAG = #deleteFlag#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="contractDate">
CONTRACT_DATE = #contractDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="contractCode">
CONTRACT_CODE LIKE CONCAT('%', #contractCode#, '%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="contractName">
CONTRACT_NAME LIKE CONCAT('%', #contractName#, '%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="planSalesCode">
PLAN_SALES_CODE LIKE CONCAT('%', #planSalesCode#, '%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="custCode">
CUST_CODE = #custCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="contractAmount">
CONTRACT_AMOUNT = #contractAmount#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="contractStatus">
CONTRACT_STATUS = #contractStatus#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="approveStatus">
APPROVE_STATUS = #approveStatus#
</isNotEmpty>
</sql>
<select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hpjx.hp.pz.domain.HPPZ019">
SELECT
ID as "id", <!-- ID -->
COMPANY_CODE as "companyCode", <!-- 企业编码 -->
DEP_CODE as "depCode", <!-- 部门编码 -->
CREATED_BY as "createdBy", <!-- 创建人 -->
CREATED_NAME as "createdName", <!-- 创建人名称 -->
CREATED_TIME as "createdTime", <!-- 创建时间 -->
UPDATED_BY as "updatedBy", <!-- 修改人 -->
UPDATED_NAME as "updatedName", <!-- 修改人名称 -->
UPDATED_TIME as "updatedTime", <!-- 修改时间 -->
DELETE_FLAG as "deleteFlag", <!-- 是否删除0:否1.是 -->
CONTRACT_DATE as "contractDate", <!-- 合同日期 -->
CONTRACT_CODE as "contractCode", <!-- 合同号 -->
CONTRACT_NAME as "contractName", <!-- 合同名称 -->
PLAN_SALES_CODE as "planSalesCode", <!-- 销售计划单号 -->
CUST_CODE as "custCode", <!-- 客户编码 -->
CONTRACT_AMOUNT as "contractAmount", <!-- 合同金额 -->
CONTRACT_STATUS as "contractStatus", <!-- 合同状态 -->
APPROVE_STATUS as "approveStatus" <!-- 审批状态 -->
FROM ${hpjxSchema}.T_HPPZ019 WHERE 1=1
<include refid="condition" />
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
CONTRACT_DATE DESC, CREATED_TIME DESC
</isEmpty>
</dynamic>
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hpjxSchema}.T_HPPZ019 WHERE 1=1
<include refid="condition" />
</select>
<!--
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdName">
CREATED_NAME = #createdName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
CREATED_TIME = #createdTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy">
UPDATED_BY = #updatedBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedName">
UPDATED_NAME = #updatedName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
UPDATED_TIME = #updatedTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deleteFlag">
DELETE_FLAG = #deleteFlag#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="contractDate">
CONTRACT_DATE = #contractDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="contractCode">
CONTRACT_CODE = #contractCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="contractName">
CONTRACT_NAME = #contractName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="planSalesCode">
PLAN_SALES_CODE = #planSalesCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="custCode">
CUST_CODE = #custCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="contractAmount">
CONTRACT_AMOUNT = #contractAmount#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="contractStatus">
CONTRACT_STATUS = #contractStatus#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="approveStatus">
APPROVE_STATUS = #approveStatus#
</isNotEmpty>
-->
<insert id="insert">
INSERT INTO ${hpjxSchema}.T_HPPZ019 (ID, <!-- ID -->
COMPANY_CODE, <!-- 企业编码 -->
DEP_CODE, <!-- 部门编码 -->
CREATED_BY, <!-- 创建人 -->
CREATED_NAME, <!-- 创建人名称 -->
CREATED_TIME, <!-- 创建时间 -->
UPDATED_BY, <!-- 修改人 -->
UPDATED_NAME, <!-- 修改人名称 -->
UPDATED_TIME, <!-- 修改时间 -->
DELETE_FLAG, <!-- 是否删除0:否1.是 -->
CONTRACT_DATE, <!-- 合同日期 -->
CONTRACT_CODE, <!-- 合同号 -->
CONTRACT_NAME, <!-- 合同名称 -->
PLAN_SALES_CODE, <!-- 销售计划单号 -->
CUST_CODE, <!-- 客户编码 -->
CONTRACT_AMOUNT, <!-- 合同金额 -->
CONTRACT_STATUS, <!-- 合同状态 -->
APPROVE_STATUS <!-- 审批状态 -->
)
VALUES (#id#, #companyCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #deleteFlag#, #contractDate#, #contractCode#, #contractName#, #planSalesCode#, #custCode#, #contractAmount#, #contractStatus#, #approveStatus#)
</insert>
<delete id="delete">
DELETE FROM ${hpjxSchema}.T_HPPZ019 WHERE
ID = #id#
</delete>
<update id="daleteFlag">
UPDATE ${hpjxSchema}.T_HPPZ019
SET
UPDATED_BY = #updatedBy#, <!-- 修改人 -->
UPDATED_NAME = #updatedName#, <!-- 修改人名称 -->
UPDATED_TIME = #updatedTime#, <!-- 修改时间 -->
DELETE_FLAG = #deleteFlag# <!-- 是否删除0:否1.是 -->
WHERE
ID = #id#
</update>
<update id="update">
UPDATE ${hpjxSchema}.T_HPPZ019
SET
COMPANY_CODE = #companyCode#, <!-- 企业编码 -->
DEP_CODE = #depCode#, <!-- 部门编码 -->
CREATED_BY = #createdBy#, <!-- 创建人 -->
CREATED_NAME = #createdName#, <!-- 创建人名称 -->
CREATED_TIME = #createdTime#, <!-- 创建时间 -->
UPDATED_BY = #updatedBy#, <!-- 修改人 -->
UPDATED_NAME = #updatedName#, <!-- 修改人名称 -->
UPDATED_TIME = #updatedTime#, <!-- 修改时间 -->
DELETE_FLAG = #deleteFlag#, <!-- 是否删除0:否1.是 -->
CONTRACT_DATE = #contractDate#, <!-- 合同日期 -->
CONTRACT_CODE = #contractCode#, <!-- 合同号 -->
CONTRACT_NAME = #contractName#, <!-- 合同名称 -->
PLAN_SALES_CODE = #planSalesCode#, <!-- 销售计划单号 -->
CUST_CODE = #custCode#, <!-- 客户编码 -->
CONTRACT_AMOUNT = #contractAmount#, <!-- 合同金额 -->
CONTRACT_STATUS = #contractStatus#, <!-- 合同状态 -->
APPROVE_STATUS = #approveStatus# <!-- 审批状态 -->
WHERE
ID = #id#
</update>
<!--修改合同状态-->
<update id="updateContractStatus">
UPDATE ${hpjxSchema}.T_HPPZ019
SET
UPDATED_BY = #updatedBy#, <!-- 修改人 -->
UPDATED_NAME = #updatedName#, <!-- 修改人名称 -->
UPDATED_TIME = #updatedTime#, <!-- 修改时间 -->
CONTRACT_AMOUNT = #contractAmount#, <!-- 合同金额 -->
CONTRACT_STATUS = #contractStatus# <!-- 合同状态 -->
WHERE CONTRACT_CODE = #contractCode#
</update>
<!--修改审批状态-->
<update id="updateApproveStatus">
UPDATE ${hpjxSchema}.T_HPPZ019
SET
UPDATED_BY = #updatedBy#, <!-- 修改人 -->
UPDATED_NAME = #updatedName#, <!-- 修改人名称 -->
UPDATED_TIME = #updatedTime#, <!-- 修改时间 -->
APPROVE_STATUS = #approveStatus# <!-- 审批状态 -->
WHERE
ID = #id#
</update>
</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-04-23 18:29:24
Version : 1.0
schema : hpjx
tableName : T_HPPZ020
ID BIGINT NOT NULL primarykey,
COMPANY_CODE VARCHAR,
DEP_CODE VARCHAR,
CREATED_BY VARCHAR,
CREATED_NAME VARCHAR,
CREATED_TIME VARCHAR,
UPDATED_BY VARCHAR,
UPDATED_NAME VARCHAR,
UPDATED_TIME VARCHAR,
DELETE_FLAG TINYINT,
CONTRACT_CODE VARCHAR,
SERIAL_NUM BIGINT,
PRDT_CODE VARCHAR,
QUANTITY BIGINT,
TAX_RATE DECIMAL,
NOTAX_PRICE DECIMAL,
NOTAX_AMOUNT DECIMAL,
THE_AMOUNT DECIMAL,
TAX_AMOUNT DECIMAL
-->
<sqlMap namespace="HPPZ020">
<sql id="condition">
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCodes">
DEP_CODE IN <iterate close=")" open="(" conjunction="," property="depCodes">#depCodes[]#</iterate>
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdName">
CREATED_NAME = #createdName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
CREATED_TIME = #createdTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy">
UPDATED_BY = #updatedBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedName">
UPDATED_NAME = #updatedName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
UPDATED_TIME = #updatedTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deleteFlag">
DELETE_FLAG = #deleteFlag#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="contractCode">
CONTRACT_CODE = #contractCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="serialNum">
SERIAL_NUM = #serialNum#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtCode">
PRDT_CODE = #prdtCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="quantity">
QUANTITY = #quantity#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="taxRate">
TAX_RATE = #taxRate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="notaxPrice">
NOTAX_PRICE = #notaxPrice#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="notaxAmount">
NOTAX_AMOUNT = #notaxAmount#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="theAmount">
THE_AMOUNT = #theAmount#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="taxAmount">
TAX_AMOUNT = #taxAmount#
</isNotEmpty>
</sql>
<select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hpjx.hp.pz.domain.HPPZ020">
SELECT
ID as "id", <!-- ID -->
COMPANY_CODE as "companyCode", <!-- 企业编码 -->
DEP_CODE as "depCode", <!-- 部门编码 -->
CREATED_BY as "createdBy", <!-- 创建人 -->
CREATED_NAME as "createdName", <!-- 创建人名称 -->
CREATED_TIME as "createdTime", <!-- 创建时间 -->
UPDATED_BY as "updatedBy", <!-- 修改人 -->
UPDATED_NAME as "updatedName", <!-- 修改人名称 -->
UPDATED_TIME as "updatedTime", <!-- 修改时间 -->
DELETE_FLAG as "deleteFlag", <!-- 是否删除0:否1.是 -->
CONTRACT_CODE as "contractCode", <!-- 合同号 -->
SERIAL_NUM as "serialNum", <!-- 序号 -->
PRDT_CODE as "prdtCode", <!-- 产品编码 -->
QUANTITY as "quantity", <!-- 数量 -->
TAX_RATE as "taxRate", <!-- 税率 -->
NOTAX_PRICE as "notaxPrice", <!-- 不含税单价 -->
NOTAX_AMOUNT as "notaxAmount", <!-- 不含税金额 -->
THE_AMOUNT as "theAmount", <!-- 税额 -->
TAX_AMOUNT as "taxAmount" <!-- 含税金额 -->
FROM ${hpjxSchema}.T_HPPZ020 WHERE 1=1
<include refid="condition" />
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
SERIAL_NUM asc ,CREATED_TIME DESC
</isEmpty>
</dynamic>
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hpjxSchema}.T_HPPZ020 WHERE 1=1
<include refid="condition" />
</select>
<select id="queryMax" parameterClass="java.util.HashMap"
resultClass="com.baosight.hpjx.hp.pz.domain.HPPZ020">
SELECT
ID as "id", <!-- ID -->
COMPANY_CODE as "companyCode", <!-- 企业编码 -->
DEP_CODE as "depCode", <!-- 部门编码 -->
CREATED_BY as "createdBy", <!-- 创建人 -->
CREATED_NAME as "createdName", <!-- 创建人名称 -->
CREATED_TIME as "createdTime", <!-- 创建时间 -->
UPDATED_BY as "updatedBy", <!-- 修改人 -->
UPDATED_NAME as "updatedName", <!-- 修改人名称 -->
UPDATED_TIME as "updatedTime", <!-- 修改时间 -->
DELETE_FLAG as "deleteFlag", <!-- 是否删除0:否1.是 -->
CONTRACT_CODE as "contractCode", <!-- 合同号 -->
MAX(SERIAL_NUM) as "serialNum", <!-- 序号 -->
PRDT_CODE as "prdtCode", <!-- 产品编码 -->
QUANTITY as "quantity", <!-- 数量 -->
TAX_RATE as "taxRate", <!-- 税率 -->
NOTAX_PRICE as "notaxPrice", <!-- 不含税单价 -->
NOTAX_AMOUNT as "notaxAmount", <!-- 不含税金额 -->
THE_AMOUNT as "theAmount", <!-- 税额 -->
TAX_AMOUNT as "taxAmount" <!-- 含税金额 -->
FROM ${hpjxSchema}.T_HPPZ020 WHERE 1=1
<include refid="condition" />
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
CREATED_TIME DESC
</isEmpty>
</dynamic>
</select>
<!--
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdName">
CREATED_NAME = #createdName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
CREATED_TIME = #createdTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy">
UPDATED_BY = #updatedBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedName">
UPDATED_NAME = #updatedName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
UPDATED_TIME = #updatedTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deleteFlag">
DELETE_FLAG = #deleteFlag#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="contractCode">
CONTRACT_CODE = #contractCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="serialNum">
SERIAL_NUM = #serialNum#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtCode">
PRDT_CODE = #prdtCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="quantity">
QUANTITY = #quantity#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="taxRate">
TAX_RATE = #taxRate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="notaxPrice">
NOTAX_PRICE = #notaxPrice#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="notaxAmount">
NOTAX_AMOUNT = #notaxAmount#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="theAmount">
THE_AMOUNT = #theAmount#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="taxAmount">
TAX_AMOUNT = #taxAmount#
</isNotEmpty>
-->
<insert id="insert">
INSERT INTO ${hpjxSchema}.T_HPPZ020 (ID, <!-- ID -->
COMPANY_CODE, <!-- 企业编码 -->
DEP_CODE, <!-- 部门编码 -->
CREATED_BY, <!-- 创建人 -->
CREATED_NAME, <!-- 创建人名称 -->
CREATED_TIME, <!-- 创建时间 -->
UPDATED_BY, <!-- 修改人 -->
UPDATED_NAME, <!-- 修改人名称 -->
UPDATED_TIME, <!-- 修改时间 -->
DELETE_FLAG, <!-- 是否删除0:否1.是 -->
CONTRACT_CODE, <!-- 合同号 -->
SERIAL_NUM, <!-- 序号 -->
PRDT_CODE, <!-- 产品编码 -->
QUANTITY, <!-- 数量 -->
TAX_RATE, <!-- 税率 -->
NOTAX_PRICE, <!-- 不含税单价 -->
NOTAX_AMOUNT, <!-- 不含税金额 -->
THE_AMOUNT, <!-- 税额 -->
TAX_AMOUNT <!-- 含税金额 -->
)
VALUES (#id#, #companyCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #deleteFlag#, #contractCode#, #serialNum#, #prdtCode#, #quantity#, #taxRate#, #notaxPrice#, #notaxAmount#, #theAmount#, #taxAmount#)
</insert>
<delete id="delete">
DELETE FROM ${hpjxSchema}.T_HPPZ020 WHERE
ID = #id#
</delete>
<update id="deleteFlag">
UPDATE ${hpjxSchema}.T_HPPZ020
SET
UPDATED_BY = #updatedBy#, <!-- 修改人 -->
UPDATED_NAME = #updatedName#, <!-- 修改人名称 -->
UPDATED_TIME = #updatedTime#, <!-- 修改时间 -->
DELETE_FLAG = #deleteFlag# <!-- 是否删除0:否1.是 -->
WHERE
ID = #id#
</update>
<update id="update">
UPDATE ${hpjxSchema}.T_HPPZ020
SET
COMPANY_CODE = #companyCode#, <!-- 企业编码 -->
DEP_CODE = #depCode#, <!-- 部门编码 -->
CREATED_BY = #createdBy#, <!-- 创建人 -->
CREATED_NAME = #createdName#, <!-- 创建人名称 -->
CREATED_TIME = #createdTime#, <!-- 创建时间 -->
UPDATED_BY = #updatedBy#, <!-- 修改人 -->
UPDATED_NAME = #updatedName#, <!-- 修改人名称 -->
UPDATED_TIME = #updatedTime#, <!-- 修改时间 -->
DELETE_FLAG = #deleteFlag#, <!-- 是否删除0:否1.是 -->
CONTRACT_CODE = #contractCode#, <!-- 合同号 -->
SERIAL_NUM = #serialNum#, <!-- 序号 -->
PRDT_CODE = #prdtCode#, <!-- 产品编码 -->
QUANTITY = #quantity#, <!-- 数量 -->
TAX_RATE = #taxRate#, <!-- 税率 -->
NOTAX_PRICE = #notaxPrice#, <!-- 不含税单价 -->
NOTAX_AMOUNT = #notaxAmount#, <!-- 不含税金额 -->
THE_AMOUNT = #theAmount#, <!-- 税额 -->
TAX_AMOUNT = #taxAmount# <!-- 含税金额 -->
WHERE
ID = #id#
</update>
</sqlMap>
......@@ -205,10 +205,10 @@ public class ServiceHPSB003 extends ServiceEPBase {
public void queryDeviceCode(HPSB003 hpsb001){
Map<String,Object> map = new HashMap<>();
map.put(HPSB003.FIELD_FACTORY_CODE,hpsb001.getFactoryCode());
//map.put(HPSB003.FIELD_FACTORY_CODE,hpsb001.getFactoryCode());
map.put("deviceCodeStr",hpsb001.getDeviceCode());
map.put(HPSB003.FIELD_DELETE_FLAG,hpsb001.getDeleteFlag());
List<HPSB003> hpsb003List = this.dao.query(HPSB003.QUERY,map);
AssertUtils.isNotEmpty(hpsb003List, String.format("设备编码[%s]在当前工厂已存在,添加失败", map.get(HPSB003.FIELD_DEVICE_CODE)));
AssertUtils.isNotEmpty(hpsb003List, String.format("设备编码[%s]已存在,添加失败!", hpsb001.getDeviceCode()));
}
}
......@@ -291,6 +291,29 @@ public class ServiceHPSC003 extends ServiceBase {
}
/**
* 生成二维码
*
* @param inInfo
* @return
*/
public EiInfo generateQrcode(EiInfo inInfo) {
try {
String planInfoNo = inInfo.getString(HPSC003.FIELD_PLAN_INFO_NO);
// 已经生成过,不在重复生产
HPSC003 dbSc003 = HPSCTools.HpSc003.getByNo(planInfoNo);
AssertUtils.isNotEmpty(dbSc003.getQrcodeDocId(), "该计划已存在二维码,请勿重复生成");
// 生成新的二维码
HPSCTools.HpSc003.createQrCode(planInfoNo);
// 刷新页面数据
inInfo = this.query(inInfo);
inInfo.setMsg("生成二维码成功");
} catch (Exception e) {
LogUtils.setMsg(inInfo, e, "生成二维码失败");
}
return inInfo;
}
/**
* 扫码显示计划明细
*
* @param inInfo
......
......@@ -28,10 +28,10 @@
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="120" align="center"/>
<EF:EFColumn ename="year" cname="年度" align="center" width="120" editType="date" start="decade" depth="decade"
readonly="true" dateFormat="yyyy" parseFormats="['yyyy']"/>
readonly="true" dateFormat="yyyy" parseFormats="['yyyy']" required="true"/>
<EF:EFColumn ename="salesCode" cname="单号" enable="false" align="center" width="160"/>
<EF:EFColumn ename="salesAmount" cname="营业额" width="120" format="{0:N2}"
displayType="0.000" sort="true" align="right" maxLength="20"
displayType="0.000" sort="true" align="right" maxLength="20" defaultValue="0"
data-regex="/^-?[0-9]{1,18}([.][0-9]{1,2})?$/"
data-errorprompt="请输入数字,该值最大可设置17位整数和3位小数!"/>
<EF:EFColumn ename="targetExplain" cname="目标说明" align="center" width="200" editType="textarea"/>
......
var pageOffset = 1; //当前主页数
var prdtCodeNameGlobalData = [];
$(function () {
$("#QUERY").on("click", query);
IPLATUI.EFGrid = {
"result": {
pageable: {
pageSize: 5,
pageSizes: [5, 10, 20, 50, 100],
},
columns: [{
field: "operator",
template: function (item) {
//console.log(item)
let contractStatus = item.contractStatus;
let template = '';
if (contractStatus == 1 && item.approveStatus==0) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;" '
+
'onclick="updateApproveStatus(' + item.id + ',1)" >审批</a>';
}
else if (contractStatus == 1 && item.approveStatus==1){
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;" ' +
'onclick="updateApproveStatus(' + item.id + ',0)" >撤回</a>';
}
return template;
}
},{
field: "contractDate",
defaultValue: function () {
return currShortDate();
}
}],
/**
* 翻页事件,点翻页按钮,输入页数跳转时触发
* @param e 事件对象
* e.sender Grid对象
* e.page 期望翻到的页数
*/
page: function (e) {
// 禁止翻页
//e.preventDefault();
pageOffset = e.page;
console.log(e.page);
},
onSave: function (e) {
// 阻止默认请求,使用自定义保存
e.preventDefault();
let btnNode = $(this);
//禁用按钮
btnNode.attr("disabled", true);
saveResult(btnNode);
},
onSuccess: function (e) {
if (e.eiInfo.extAttr.methodName == 'save' || e.eiInfo.extAttr.methodName == 'delete') {
query();
}
},
onRowClick: function (e) {
var block = detailGrid.getEiBlock();
if (block != null) {
block.setRows([]);
detailGrid.setEiBlock(block);
}
var info = new EiInfo()
var contractCode = e.model['contractCode'];
if (contractCode.length>0){
info.set("inqu_status-0-contractCode", contractCode);
$("#contractCode").val(contractCode);
$("#approveStatus").val(e.model['approveStatus']);
$("#parentId").val(e.model['id']);
EiCommunicator.send("HPPZ019", "queryDetail", info, {
onSuccess: function (ei) {//返回结果集
detailGrid.setEiInfo(ei);
}, onFail: function (ei) {
}
}, {async: false});
}
},
exportGrid : {
exportFileName: function (gridInstance) {
// 导出的文件名包含时间戳 yyyy-MM-dd HH:mm:ss
return "销售合同_" + kendo.toString(new Date(), IPLAT.FORMAT.DATE_14_PR);
},
exportFileType: "xls",
exportBlockId: "result",
}
},
"detail":{
pageable:false,
onSave: function (e) {
// 阻止默认请求,使用自定义保存
e.preventDefault();
let btnNode = $(this);
//禁用按钮
btnNode.attr("disabled", true);
if ($("#approveStatus").val()==0){
saveDetail(btnNode);
}else {
message("已审批,无法新增");
}
},
onSuccess: function (e) {
if (e.eiInfo.extAttr.methodName == 'update'
|| e.eiInfo.extAttr.methodName == 'deleteDetail') {
query();
}
},
onDelete:function (e) {
// 阻止后台删除请求,使用自定义删除
e.preventDefault();
if ($("#approveStatus").val()==0){
deleteDetail();
}else {
message("已审批,无法删除");
}
},
exportGrid : {
exportFileName: function (gridInstance) {
// 导出的文件名包含时间戳 yyyy-MM-dd HH:mm:ss
return "销售合同明细_" + kendo.toString(new Date(), IPLAT.FORMAT.DATE_14_PR);
},
exportFileType: "xls",
exportBlockId: "detail",
},
columns: [/*{
field: "prdtCode",
template: function (dataItem) {
for (let i = 0; i < prdtCodeNameGlobalData.length; i++) {
if (prdtCodeNameGlobalData[i]['valueField'] === dataItem['prdtCode']) {
return prdtCodeNameGlobalData[i]['textField'];
}
}
return "";
},
editor: function (container, options) {
let inInfo = new EiInfo();
inInfo.set("inqu_status-0-inventType", options.model["inventType"]);
inInfo.set("serviceName", "HPPZ004");
inInfo.set("methodName", "queryComboBox");
inInfo.set("blockId", "invent_name_block_id");
inInfo.set("field", options.field);
refreshSelect(container, inInfo);
}
}*/]
}
}
downKeyUp();
});
/**
* 销售合同审批
*
* @param id
*/
function updateApproveStatus(id,status) {
let inEiInfo = new EiInfo();
inEiInfo.set("result-0-id", id);
inEiInfo.set("result-0-approveStatus", status);
EiCommunicator.send('HPPZ019', 'updateApproveStatus', inEiInfo, {
onSuccess(response) {
NotificationUtil(response.msg);
query();
},
onFail(errorMessage, status, e) {
NotificationUtil("执行失败!", "error");
}
}, {
async: false
}
);
}
let query = function (page) {
let offset = page!=undefined?page:1;
resultGrid.dataSource.page(offset);
}
function check_time(model,rows){
for (var i=0;i<rows.length;i++){
if (model.planInfoNo == rows[i][5]) {
var start_time = rows[i][22];
var end_time = rows[i][23];
if (end_time < start_time) {
return false;
}
}
}
return true;
}
/**
* 保存汇总
*/
function saveResult(btn) {
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
let flag = true;
/*$.each(rows, function(index, item) {
let planCompletionDate= item.get("planCompletionDate");
if(isBlank(planCompletionDate)){
message("选中的第"+(index+1)+"行\"计划结束时间\",不能为空!");
flag = false;
return false;
}
});*/
if(flag) {
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"保存\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result", "HPPZ019", "save", true);
//释放禁用按钮
btn.attr("disabled", false);
query();
}
});
}
}
let queryDetail = function () { detailGrid.dataSource.page(1);}
/**
* 保存明细
*/
function saveDetail(btn) {
let rows = detailGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
let flag = true;
/*$.each(rows, function(index, item) {
let planCommentDate= item.get("planCompletionDate"); //item.get("planCommentDate");
let planCompletionDate= item.get("planCompletionDate");
if(isBlank(planCommentDate)){
message("选中的第"+(index+1)+"行\"计划开始时间\",不能为空!");
flag = false;
return false;
}
if(isBlank(planCompletionDate)){
message("选中的第"+(index+1)+"行\"计划结束时间\",不能为空!");
flag = false;
return false;
}
let startT = new Date(planCommentDate).getTime();
let endT = new Date(planCompletionDate).getTime();
if (startT > endT) {
message("选中的第"+(index+1)+"行\"计划开始时间\"不能大于\"计划结束时间\"!");
flag = false;
return false;
}
});*/
if(flag) {
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"保存\"操作? ", {
ok: function () {
JSUtils.submitGridsData("detail", "HPPZ019", "saveDetail", true,
function (e) {
detailGrid.setEiInfo(e);
query(pageOffset);
});
//let reslu = JSUtils.submitGridsData("detail", "HPSC003", "updatePlanDetail", true);
//释放禁用按钮
btn.attr("disabled", false);
}
});
}
}
/**
* 删除明细
*/
function deleteDetail() {
let rows = detailGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
let flag = true;
$.each(rows, function(index, item) {
let status= item.get("status");
if(status==="1"){
message("选中的第"+(index+1)+"行记录已提交,不能删除!");
flag = false;
return false;
}
});
if(flag){
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"删除\"操作? ", {
ok: function () {
JSUtils.submitGridsData("detail", "HPPZ019", "deleteDetail", true,
function (e) {
detailGrid.setEiInfo(e);
query(pageOffset);
});
//JSUtils.submitGridsData("detail", "HPSC002", "deleteDetail", true);
/* var info = new EiInfo();
info.addBlock(JSUtils.checkedRows2Block("detail"));
EiCommunicator.send("HPPZ019", "deleteDetail", info, {
onSuccess: function (ei) {
if (ei.getStatus() >= 0) {
detailGrid.setEiInfo(ei);
var info = new EiInfo()
//info.set("inqu_status-0-projCode", resultRows.projCode);
//info.set("inqu_status-0-lv", 2);
queryDetail();
} else {
NotificationUtil(ei, "error");
}
},
onFail: function (ei) {
// 发生异常
NotificationUtil("操作失败,原因[" + ei + "]", "error");
}
});*/
}
});
}
}
\ No newline at end of file
<%--
Created by IntelliJ IDEA.
User: 1
Date: 2024/4/24
Time: 9:40
To change this template use File | Settings | File Templates.
--%>
<!DOCTYPE html>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<EF:EFPage title="销售合同">
<EF:EFRegion id="inqu" title="查询条件">
<div class="row">
<EF:EFDatePicker ename="inqu_status-0-contractDate" cname="合同日期" role="date"
format="yyyy-MM-dd" parseFormats="['yyyyMMdd']" colWidth="3"/>
<EF:EFInput ename="inqu_status-0-contractCode" cname="合同号" colWidth="3"/>
<EF:EFInput ename="inqu_status-0-contractName" cname="合同名称" colWidth="3"/>
<EF:EFInput ename="inqu_status-0-planSalesCode" cname="销售计划单号" colWidth="3" readonly="false"/>
<EF:EFSelect ename="inqu_status-0-custCode" cname="客户名称" colWidth="3"
valueTemplate="#=textField#" template="#=textField#"
textField="textField" valueField="valueField"
filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="customer_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFSelect ename="inqu_status-0-contractStatus" cname="合同状态" colWidth="3">
<EF:EFOption label="全部" value=""/>
<EF:EFOption label="未录入" value="0"/>
<EF:EFOption label="已录入" value="1"/>
</EF:EFSelect>
<EF:EFSelect ename="inqu_status-0-approveStatus" cname="审批状态" colWidth="3">
<EF:EFOption label="全部" value=""/>
<EF:EFOption label="未审批" value="0"/>
<EF:EFOption label="已审批" value="1"/>
</EF:EFSelect>
<EF:EFInput ename="contractCode" type="hidden"/>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="基本信息">
<EF:EFGrid blockId="result" autoDraw="no" isFloat="true">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="100" align="center"/>
<EF:EFColumn ename="contractDate" cname="合同日期" width="100" align="center" readonly="true"
editType="date" dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required="true"/>
<EF:EFColumn ename="contractCode" cname="合同号" width="100" align="center" readonly="true" required="true"/>
<EF:EFColumn ename="contractName" cname="合同名称" width="120" align="center" readonly="true" required="true"/>
<EF:EFComboColumn ename="planSalesCode" cname="销售计划单号" blockName="planSalesCode_block_id"
columnTemplate="#=textField#-#=valueField#" itemTemplate="#=textField#-#=valueField#"
textField="#=textField#" valueField="valueField"
maxLength="16" width="120" required="true"
align="center" sort="true">
</EF:EFComboColumn>
<EF:EFComboColumn ename="custCode" cname="客户名称" blockName="customer_record_block_id"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
maxLength="16" width="120" required="true"
align="center" filter="contains" sort="true">
</EF:EFComboColumn>
<EF:EFColumn ename="contractAmount" cname="合同金额" width="120" enable="false" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right" maxLength="20" required="true"
data-regex="/^-?[0-9]{1,17}([.][0-9]{1,3})?$/"
data-errorprompt="请输入数字,该值最大可设置17位整数和3位小数!"/>
<EF:EFComboColumn ename="contractStatus" cname="合同状态" enable="false" width="60" align="center" defaultValue="0">
<EF:EFOption label="未录入" value="0"/>
<EF:EFOption label="已录入" value="1"/>
</EF:EFComboColumn>
<EF:EFComboColumn ename="approveStatus" cname="审批状态" enable="false" width="60" align="center" defaultValue="0">
<EF:EFOption label="未审批" value="0"/>
<EF:EFOption label="已审批" value="1"/>
</EF:EFComboColumn>
</EF:EFGrid>
</EF:EFRegion>
<EF:EFRegion id="detail" title="明细信息">
<EF:EFInput ename="approveStatus" type="hidden"/>
<EF:EFInput ename="parentId" type="hidden"/>
<EF:EFGrid blockId="detail" autoDraw="no" isFloat="true">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="contractCode" cname="合同号" hidden="true"/>
<EF:EFColumn enable="false" ename="serialNum" cname="序号" align="center" width="30"/>
<EF:EFComboColumn ename="prdtCode" cname="产品名称" blockName="invent_name_block_id"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
maxLength="16" width="120" required="true" readonly="true"
align="center" filter="contains" sort="true">
</EF:EFComboColumn>
<EF:EFColumn ename="quantity" cname="数量" width="120" format="{0:N0}" editType="text"
displayType="0.000" sort="true" align="right" defaultValue="0" required="true"
data-regex="/^-?[0-9]{1,20}?$/" maxLength="20"
data-errorprompt="请输入数字,该值最大可设置20位整数!"/>
<EF:EFColumn ename="taxRate" cname="税率" width="120" format="{0:0.00%}" editType="text"
displayType="0.000" sort="true" align="right" defaultValue="0" required="true"
data-regex="/^-?[0-9]{1,16}([.][0-9]{1,3})?$/" maxLength="20"
data-errorprompt="请输入数字,该值最大可设置17位整数和3位小数!"/>
<EF:EFColumn ename="notaxPrice" cname="不含税单价" width="120" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right" defaultValue="0" required="true"
data-regex="/^-?[0-9]{1,16}([.][0-9]{1,3})?$/" maxLength="20"
data-errorprompt="请输入数字,该值最大可设置17位整数和3位小数!"/>
<EF:EFColumn ename="notaxAmount" cname="不含税金额" width="120" enable="false" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right" defaultValue="0"
data-regex="/^-?[0-9]{1,16}([.][0-9]{1,3})?$/" maxLength="20"
data-errorprompt="请输入数字,该值最大可设置17位整数和3位小数!"/>
<EF:EFColumn ename="theAmount" cname="税额" width="120" enable="false" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right" defaultValue="0"
data-regex="/^-?[0-9]{1,16}([.][0-9]{1,3})?$/" maxLength="20"
data-errorprompt="请输入数字,该值最大可设置17位整数和3位小数!"/>
<EF:EFColumn ename="taxAmount" cname="含税金额" width="120" enable="false" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right" defaultValue="0"
data-regex="/^-?[0-9]{1,16}([.][0-9]{1,3})?$/" maxLength="20"
data-errorprompt="请输入数字,该值最大可设置17位整数和3位小数!"/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
......@@ -20,8 +20,8 @@ $(function () {
}
if (auditStatus == 0) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;" '
+
'onclick="check(' + item.id + ',1, \'' + item.planInfoNo + '\',\'' + item.factoryCode + '\')" >提交</a>';
+ 'onclick="check(' + item.id + ',1, \'' + item.planInfoNo + '\',\''
+ item.factoryCode + '\')" >提交</a>';
}
/*else {
template += '<a hidden="hidden" style="cursor: pointer;display: inline-flex;justify-content: center;" ' +
......@@ -42,12 +42,16 @@ $(function () {
}, {
field: "qrcodeDocId",
template: function (item) {
if (isBlank(item.qrcodeDocId)) {
return "";
} else {
let auditStatus = item.status;
if (!isBlank(item.qrcodeDocId)) {
return '<img src="' + downloadHref(item.qrcodeDocId) + '" width="20px" height="20px"'
+ ' onclick="imgClick(\'' + item.qrcodeDocId + '\')" />';
}
if (auditStatus != 0) {
return '<a style="cursor: pointer;display: inline-flex;justify-content: center;" '
+ 'onclick="generateQrcode(\'' + item.planInfoNo + '\')" >生成</a>';
}
return "";
}
}],
/**
......@@ -422,6 +426,21 @@ function saveDetail(btn) {
}
/**
* 生成二维码
*
* @param planInfoNo
*/
let generateQrcode = function (planInfoNo) {
let inInfo = __eiInfo;
inInfo.set("planInfoNo", planInfoNo);
JSUtils.submitGridsData("result", "HPSC003", "generateQrcode",
true, function (res) {
message(res.msg);
}, inInfo
);
}
/**
* 图片放大
*/
let imgClick = function (docId) {
......
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