Commit e3c69a01 by liuyang

2024-08-31 扣款单选择发货单

parent fdbbb9d5
......@@ -46,6 +46,7 @@ public class HGCW005 extends DaoEPBase {
public static final String FIELD_UPDATED_TIME = "updatedTime"; /* 记录修改时间*/
public static final String FIELD_DEP_CODE = "depCode"; /* 部门编码*/
public static final String FIELD_COMPANY_CODES = "companyCodes";
public static final String FIELD_DELIVERY_CODE = "deliveryCode"; /* 发货单号*/
public static final String COL_ID = "ID";
public static final String COL_ACCOUNT_CODE = "ACCOUNT_CODE"; /* 企业编码*/
......@@ -99,6 +100,7 @@ public class HGCW005 extends DaoEPBase {
private String updatedName = " "; /* 记录修改名称*/
private String updatedTime = " "; /* 记录修改时间*/
private String depCode = " "; /* 部门编码*/
private String deliveryCode = " "; /* 发货单号*/
/**
* initialize the metadata.
......@@ -194,6 +196,9 @@ public class HGCW005 extends DaoEPBase {
eiColumn.setDescName("部门编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DELIVERY_CODE);
eiColumn.setDescName("发货单号");
eiMetadata.addMeta(eiColumn);
}
......@@ -540,6 +545,15 @@ public class HGCW005 extends DaoEPBase {
public void setDepCode(String depCode) {
this.depCode = depCode;
}
public String getDeliveryCode() {
return deliveryCode;
}
public void setDeliveryCode(String deliveryCode) {
this.deliveryCode = deliveryCode;
}
/**
* get the value from Map.
*
......@@ -569,6 +583,7 @@ public class HGCW005 extends DaoEPBase {
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));
setDeliveryCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DELIVERY_CODE)), deliveryCode));
}
/**
......@@ -599,6 +614,7 @@ public class HGCW005 extends DaoEPBase {
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)));
map.put(FIELD_DELIVERY_CODE, StringUtils.toString(deliveryCode, eiMetadata.getMeta(FIELD_DELIVERY_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:Hgcw005a.java <br>
* Description: <br>
*
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
*
* @version 1.0
* @history 2024-08-31 14:07:12 create
*/
public class HGCW005A 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_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_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_DELIVERY_CODE = "deliveryCode"; /* 发货单号*/
public static final String FIELD_RECE_CODE = "receCode"; /* 收货方编码*/
public static final String FIELD_RECE_NAME = "receName"; /* 收货方名称*/
public static final String FIELD_SPEC = "spec"; /* 规格*/
public static final String FIELD_INVENT_CODE = "inventCode"; /* 存货编码*/
public static final String FIELD_INVENT_NAME = "inventName"; /* 存货名称*/
public static final String FIELD_INVENT_TYPE_DETAIL = "inventTypeDetail"; /* 存货类型大类*/
public static final String FIELD_QUANTITY = "quantity"; /* 数量*/
public static final String FIELD_WEIGHT = "weight"; /* 重量*/
public static final String FIELD_TOTAL_CONTRACT_PRICE_INCLUDING = "totalContractPriceIncluding"; /* 扣款金额*/
public static final String FIELD_PARENT_ID = "parentId"; /* 父ID*/
public static final String COL_ID = "ID";
public static final String COL_ACCOUNT_CODE = "ACCOUNT_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_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_DELIVERY_CODE = "DELIVERY_CODE"; /* 发货单号*/
public static final String COL_RECE_CODE = "RECE_CODE"; /* 收货方编码*/
public static final String COL_RECE_NAME = "RECE_NAME"; /* 收货方名称*/
public static final String COL_SPEC = "SPEC"; /* 规格*/
public static final String COL_INVENT_CODE = "INVENT_CODE"; /* 存货编码*/
public static final String COL_INVENT_NAME = "INVENT_NAME"; /* 存货名称*/
public static final String COL_INVENT_TYPE_DETAIL = "INVENT_TYPE_DETAIL"; /* 存货类型大类*/
public static final String COL_QUANTITY = "QUANTITY"; /* 数量*/
public static final String COL_WEIGHT = "WEIGHT"; /* 重量*/
public static final String COL_TOTAL_CONTRACT_PRICE_INCLUDING = "TOTAL_CONTRACT_PRICE_INCLUDING"; /* 扣款金额*/
public static final String QUERY = "HGCW005A.query";
public static final String COUNT = "HGCW005A.count";
public static final String INSERT = "HGCW005A.insert";
public static final String UPDATE = "HGCW005A.update";
public static final String DELETE = "HGCW005A.delete";
public static final String QUERY_HGYX001 = "HGCW005A.queryHgyx001";
private Long id = new Long(0);
private String accountCode = " "; /* 企业编码*/
private String depCode = " "; /* 部门编码*/
private String createdBy = " "; /* 记录创建者*/
private String createdName = " "; /* 记录创建名称*/
private String createdTime = " "; /* 记录创建时间*/
private String updatedBy = " "; /* 记录修改者*/
private String updatedName = " "; /* 记录修改名称*/
private String updatedTime = " "; /* 记录修改时间*/
private Integer deleteFlag = new Integer(0); /* 0-未删除,1-已删除*/
private String companyCode = " "; /* 公司编码*/
private String companyName = " "; /* 公司名称*/
private String projCode = " "; /* 项目编码*/
private String projName = " "; /* 项目名称*/
private String deliveryCode = " "; /* 发货单号*/
private String receCode = " "; /* 收货方编码*/
private String receName = " "; /* 收货方名称*/
private String spec = " "; /* 规格*/
private String inventCode = " "; /* 存货编码*/
private String inventName = " "; /* 存货名称*/
private Integer inventTypeDetail = new Integer(0); /* 存货类型大类*/
private BigDecimal quantity = new BigDecimal(0); /* 数量*/
private BigDecimal weight = new BigDecimal(0.000); /* 重量*/
private BigDecimal totalContractPriceIncluding = new BigDecimal("0"); /* 扣款金额*/
private String parentId = " ";
/**
* 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_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_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_DELIVERY_CODE);
eiColumn.setDescName("发货单号");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_RECE_CODE);
eiColumn.setDescName("收货方编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_RECE_NAME);
eiColumn.setDescName("收货方名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_SPEC);
eiColumn.setDescName("规格");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_INVENT_CODE);
eiColumn.setDescName("存货编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_INVENT_NAME);
eiColumn.setDescName("存货名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_INVENT_TYPE_DETAIL);
eiColumn.setDescName("存货类型大类");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_QUANTITY);
eiColumn.setType("N");
eiColumn.setScaleLength(0);
eiColumn.setFieldLength(20);
eiColumn.setDescName("数量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_WEIGHT);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(17);
eiColumn.setDescName("重量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_TOTAL_CONTRACT_PRICE_INCLUDING);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(17);
eiColumn.setDescName("扣款金额");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PARENT_ID);
eiColumn.setDescName("上级ID");
eiMetadata.addMeta(eiColumn);
}
/**
* the constructor.
*/
public HGCW005A() {
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 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 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 deliveryCode - 发货单号.
* @return the deliveryCode
*/
public String getDeliveryCode() {
return this.deliveryCode;
}
/**
* set the deliveryCode - 发货单号.
*
* @param deliveryCode - 发货单号
*/
public void setDeliveryCode(String deliveryCode) {
this.deliveryCode = deliveryCode;
}
/**
* get the receCode - 收货方编码.
* @return the receCode
*/
public String getReceCode() {
return this.receCode;
}
/**
* set the receCode - 收货方编码.
*
* @param receCode - 收货方编码
*/
public void setReceCode(String receCode) {
this.receCode = receCode;
}
/**
* get the receName - 收货方名称.
* @return the receName
*/
public String getReceName() {
return this.receName;
}
/**
* set the receName - 收货方名称.
*
* @param receName - 收货方名称
*/
public void setReceName(String receName) {
this.receName = receName;
}
/**
* get the spec - 规格.
* @return the spec
*/
public String getSpec() {
return this.spec;
}
/**
* set the spec - 规格.
*
* @param spec - 规格
*/
public void setSpec(String spec) {
this.spec = spec;
}
/**
* get the inventCode - 存货编码.
* @return the inventCode
*/
public String getInventCode() {
return this.inventCode;
}
/**
* set the inventCode - 存货编码.
*
* @param inventCode - 存货编码
*/
public void setInventCode(String inventCode) {
this.inventCode = inventCode;
}
/**
* get the inventName - 存货名称.
* @return the inventName
*/
public String getInventName() {
return this.inventName;
}
/**
* set the inventName - 存货名称.
*
* @param inventName - 存货名称
*/
public void setInventName(String inventName) {
this.inventName = inventName;
}
/**
* get the inventTypeDetail - 存货类型大类.
* @return the inventTypeDetail
*/
public Integer getInventTypeDetail() {
return this.inventTypeDetail;
}
/**
* set the inventTypeDetail - 存货类型大类.
*
* @param inventTypeDetail - 存货类型大类
*/
public void setInventTypeDetail(Integer inventTypeDetail) {
this.inventTypeDetail = inventTypeDetail;
}
/**
* get the quantity - 数量.
* @return the quantity
*/
public BigDecimal getQuantity() {
return this.quantity;
}
/**
* set the quantity - 数量.
*
* @param quantity - 数量
*/
public void setQuantity(BigDecimal quantity) {
this.quantity = quantity;
}
/**
* get the weight - 重量.
* @return the weight
*/
public BigDecimal getWeight() {
return this.weight;
}
/**
* set the weight - 重量.
*
* @param weight - 重量
*/
public void setWeight(BigDecimal weight) {
this.weight = weight;
}
/**
* get the totalContractPriceIncluding - 扣款金额.
* @return the totalContractPriceIncluding
*/
public BigDecimal getTotalContractPriceIncluding() {
return this.totalContractPriceIncluding;
}
/**
* set the totalContractPriceIncluding - 扣款金额.
*
* @param totalContractPriceIncluding - 扣款金额
*/
public void setTotalContractPriceIncluding(BigDecimal totalContractPriceIncluding) {
this.totalContractPriceIncluding = totalContractPriceIncluding;
}
public String getParentId() {
return parentId;
}
public void setParentId(String parentId) {
this.parentId = parentId;
}
/**
* 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));
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));
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));
setDeliveryCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DELIVERY_CODE)), deliveryCode));
setReceCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_RECE_CODE)), receCode));
setReceName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_RECE_NAME)), receName));
setSpec(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_SPEC)), spec));
setInventCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_INVENT_CODE)), inventCode));
setInventName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_INVENT_NAME)), inventName));
setInventTypeDetail(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_INVENT_TYPE_DETAIL)), inventTypeDetail));
setQuantity(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_QUANTITY)), quantity));
setWeight(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_WEIGHT)), weight));
setTotalContractPriceIncluding(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_TOTAL_CONTRACT_PRICE_INCLUDING)), totalContractPriceIncluding));
setParentId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PARENT_ID)), parentId));
}
/**
* 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_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_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_DELIVERY_CODE, StringUtils.toString(deliveryCode, eiMetadata.getMeta(FIELD_DELIVERY_CODE)));
map.put(FIELD_RECE_CODE, StringUtils.toString(receCode, eiMetadata.getMeta(FIELD_RECE_CODE)));
map.put(FIELD_RECE_NAME, StringUtils.toString(receName, eiMetadata.getMeta(FIELD_RECE_NAME)));
map.put(FIELD_SPEC, StringUtils.toString(spec, eiMetadata.getMeta(FIELD_SPEC)));
map.put(FIELD_INVENT_CODE, StringUtils.toString(inventCode, eiMetadata.getMeta(FIELD_INVENT_CODE)));
map.put(FIELD_INVENT_NAME, StringUtils.toString(inventName, eiMetadata.getMeta(FIELD_INVENT_NAME)));
map.put(FIELD_INVENT_TYPE_DETAIL, StringUtils.toString(inventTypeDetail, eiMetadata.getMeta(FIELD_INVENT_TYPE_DETAIL)));
map.put(FIELD_QUANTITY, StringUtils.toString(quantity, eiMetadata.getMeta(FIELD_QUANTITY)));
map.put(FIELD_WEIGHT, StringUtils.toString(weight, eiMetadata.getMeta(FIELD_WEIGHT)));
map.put(FIELD_TOTAL_CONTRACT_PRICE_INCLUDING, StringUtils.toString(totalContractPriceIncluding, eiMetadata.getMeta(FIELD_TOTAL_CONTRACT_PRICE_INCLUDING)));
map.put(FIELD_PARENT_ID, StringUtils.toString(parentId, eiMetadata.getMeta(FIELD_PARENT_ID)));
return map;
}
}
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.constant.CommonConstant;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.core.security.UserSessionUtils;
import com.baosight.hggp.hg.cw.domain.HGCW005;
import com.baosight.hggp.hg.cw.domain.HGCW005A;
import com.baosight.hggp.hg.sb.domain.HGSB001;
import com.baosight.hggp.hg.sb.tools.HGSBTools;
import com.baosight.hggp.hg.xs.domain.Company;
import com.baosight.hggp.util.*;
import com.baosight.hggp.util.contants.ACConstants;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import java.math.BigDecimal;
import java.util.*;
import java.util.stream.Collectors;
/**
* @author LiuYang
* @version 1.0 2024/8/31
* @description 选择发货单
*/
public class ServiceHGCW005A extends ServiceEPBase {
@Override
public EiInfo initLoad(EiInfo inInfo) {
try {
List<String> roleCompanyCode = HGSBTools.getRoleCompanyCode();
EiInfoUtils.addBlock(inInfo,"roleCompany", UserSessionUtils.getRoleCompany(), Company.class);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.CUSTOMER_RECORD_ALL_BLOCK_ID));
CommonMethod.initBlock(inInfo,
Arrays.asList(
DdynamicEnum.PROJ_RECORD_BLOCK_ID,
DdynamicEnum.INVENT_TYPE_BOX_BLOCK_ID,
DdynamicEnum.INVENT_CODE_BOX_BLOCK_ID,
DdynamicEnum.SPEC_BOX_BLOCK_ID,
DdynamicEnum.WH_RECORD_BOX_BLOCK_ID),
new HashMap<String,Object>(){{
put(HGSB001.FIELD_COMPANY_CODES,roleCompanyCode);
put(HGCW005A.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
}}, false);
}catch (Exception e){
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
@Override
public EiInfo query(EiInfo inInfo) {
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGCW005A.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
return super.query(inInfo, HGCW005A.QUERY,new HGCW005A());
}
/**
* 新增操作
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "扣款单",operType = "保存",operDesc = "保存")
public EiInfo save(EiInfo inInfo) {
try {
//List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
List<HGCW005A> hgcw005AList = MapUtils.toDaoEPBases(inInfo, HGCW005A.class);
Map<String, List<HGCW005A>> hgcw005Map = Optional.ofNullable(hgcw005AList).orElse(new ArrayList<>()).stream().collect(Collectors.groupingBy(HGCW005A::getDeliveryCode,Collectors.toList()));
Set<String> deliveryCodeSet = hgcw005Map.keySet();
for (String deliveryCode : deliveryCodeSet) {
List<HGCW005A> hgcw005As = hgcw005Map.get(deliveryCode);
BigDecimal totalContractPriceIncluding =hgcw005As.stream().map(HGCW005A::getTotalContractPriceIncluding).reduce(BigDecimal.ZERO, BigDecimal::add);
HGCW005 hgcw005 = new HGCW005();
hgcw005.setDeliveryCode(deliveryCode);
hgcw005.setCompanyCode(hgcw005As.get(0).getCompanyCode());
hgcw005.setCompanyName(hgcw005As.get(0).getCompanyName());
hgcw005.setProjCode(hgcw005As.get(0).getProjCode());
hgcw005.setProjName(hgcw005As.get(0).getProjName());
hgcw005.setPartyA(hgcw005As.get(0).getReceCode()+"-"+hgcw005As.get(0).getReceName());
hgcw005.setPartyB(hgcw005As.get(0).getCompanyCode()+"-"+hgcw005As.get(0).getCompanyName());
hgcw005.setContractContent("发货单扣款");
hgcw005.setSigningDate(DateUtils.date());
hgcw005.setReviewStatus(0);
hgcw005.setTotalContractPriceIncluding(totalContractPriceIncluding);
DaoUtils.insert(HGCW005.INSERT, hgcw005);
for (HGCW005A hgcw005A : hgcw005As) {
if (hgcw005A.getId() == null || hgcw005A.getId() == 0) {
hgcw005A.setParentId(hgcw005.getId().toString());
this.add(hgcw005A);
} else {
this.modify(hgcw005A);
}
}
}
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + hgcw005AList.size() + "]条数据保存成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "保存失败");
}
return inInfo;
}
/**
* 新增操作
*
* @param hgcw005A
* @return
*/
public void add(HGCW005A hgcw005A) {
DaoUtils.insert(HGCW005A.INSERT, hgcw005A);
}
/**
* 修改操作
*
* @param hgcw005A
* @return
*/
public void modify(HGCW005A hgcw005A) {
DaoUtils.update(HGCW005A.UPDATE, hgcw005A);
}
}
package com.baosight.hggp.hg.cw.service;
import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.security.UserSessionUtils;
import com.baosight.hggp.hg.cw.domain.HGCW005A;
import com.baosight.hggp.hg.sb.domain.HGSB001;
import com.baosight.hggp.hg.sb.tools.HGSBTools;
import com.baosight.hggp.hg.xs.domain.Company;
import com.baosight.hggp.util.CommonMethod;
import com.baosight.hggp.util.EiInfoUtils;
import com.baosight.hggp.util.LogUtils;
import com.baosight.hggp.util.contants.ACConstants;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
/**
* @author LiuYang
* @version 1.0 2024/8/31
* @description 发货明细
*/
public class ServiceHGCW005B extends ServiceEPBase {
@Override
public EiInfo initLoad(EiInfo inInfo) {
EiInfo outInfo = super.initLoad(inInfo, new HGCW005A());
try {
outInfo = super.query(inInfo, HGCW005A.QUERY_HGYX001, new HGCW005A());
List<String> roleCompanyCode = HGSBTools.getRoleCompanyCode();
EiInfoUtils.addBlock(outInfo,"roleCompany", UserSessionUtils.getRoleCompany(), Company.class);
CommonMethod.initBlock(outInfo, Arrays.asList(DdynamicEnum.CUSTOMER_RECORD_ALL_BLOCK_ID));
CommonMethod.initBlock(outInfo,
Arrays.asList(
DdynamicEnum.PROJ_RECORD_BLOCK_ID,
DdynamicEnum.INVENT_TYPE_BOX_BLOCK_ID,
DdynamicEnum.INVENT_CODE_BOX_BLOCK_ID,
DdynamicEnum.SPEC_BOX_BLOCK_ID,
DdynamicEnum.WH_RECORD_BOX_BLOCK_ID),
new HashMap<String,Object>(){{
put(HGSB001.FIELD_COMPANY_CODES,roleCompanyCode);
put(HGCW005A.FIELD_DELETE_FLAG,CommonConstant.YesNo.NO_0);
}}, false);
}catch (Exception e){
LogUtils.setDetailMsg(outInfo, e, "初始化失败");
}
return outInfo;
}
@Override
public EiInfo query(EiInfo inInfo) {
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGCW005A.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
return super.query(inInfo, HGCW005A.QUERY_HGYX001,new HGCW005A());
}
}
......@@ -98,6 +98,9 @@
<isNotEmpty prepend=" AND " property="companyCodes">
COMPANY_CODE IN <iterate close=")" open="(" conjunction="," property="companyCodes">#companyCodes[]#</iterate>
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deliveryCode">
DELIVERY_CODE like CONCAT('%',#deliveryCode#,'%')
</isNotEmpty>
</sql>
<select id="query" parameterClass="java.util.HashMap"
......@@ -123,7 +126,8 @@
UPDATED_BY as "updatedBy", <!-- 记录修改者 -->
UPDATED_NAME as "updatedName", <!-- 记录修改名称 -->
UPDATED_TIME as "updatedTime", <!-- 记录修改时间 -->
DEP_CODE as "depCode" <!-- 部门编码 -->
DEP_CODE as "depCode", <!-- 部门编码 -->
DELIVERY_CODE as "deliveryCode"
FROM ${hggpSchema}.HGCW005 WHERE 1=1
<include refid="condition" />
<dynamic prepend="ORDER BY">
......@@ -131,7 +135,7 @@
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
ID asc
SIGNING_DATE desc ,ID desc
</isEmpty>
</dynamic>
......@@ -229,9 +233,13 @@
UPDATED_BY, <!-- 记录修改者 -->
UPDATED_NAME, <!-- 记录修改名称 -->
UPDATED_TIME, <!-- 记录修改时间 -->
DEP_CODE <!-- 部门编码 -->
DEP_CODE, <!-- 部门编码 -->
DELIVERY_CODE
)
VALUES (#id#, #accountCode#, #companyCode#, #companyName#, #projName#, #projCode#, #contractNumber#, #contractName#, #signingDate#, #partyA#, #partyB#, #reviewStatus#, #contractContent#, #totalContractPriceIncluding#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #depCode#)
VALUES (#id#, #accountCode#, #companyCode#, #companyName#, #projName#, #projCode#, #contractNumber#, #contractName#, #signingDate#, #partyA#, #partyB#, #reviewStatus#, #contractContent#, #totalContractPriceIncluding#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #depCode#, #deliveryCode#)
<selectKey resultClass="java.lang.Long" keyProperty="id" >
SELECT MAX(ID) as "id" FROM ${hggpSchema}.HGCW005
</selectKey>
</insert>
<delete id="delete">
......@@ -261,7 +269,8 @@
UPDATED_BY = #updatedBy#, <!-- 记录修改者 -->
UPDATED_NAME = #updatedName#, <!-- 记录修改名称 -->
UPDATED_TIME = #updatedTime#, <!-- 记录修改时间 -->
DEP_CODE = #depCode# <!-- 部门编码 -->
DEP_CODE = #depCode#, <!-- 部门编码 -->
DELIVERY_CODE = #deliveryCode#
WHERE
ID = #id#
</update>
......
<?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-08-31 14:07:12
Version : 1.0
schema : hggp
tableName : HGCW005A
ID BIGINT NOT NULL primarykey,
ACCOUNT_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,
COMPANY_CODE VARCHAR,
COMPANY_NAME VARCHAR,
PROJ_CODE VARCHAR,
PROJ_NAME VARCHAR,
DELIVERY_CODE VARCHAR,
RECE_CODE VARCHAR,
RECE_NAME VARCHAR,
SPEC VARCHAR,
INVENT_CODE VARCHAR NOT NULL,
INVENT_NAME VARCHAR NOT NULL,
INVENT_TYPE_DETAIL TINYINT,
QUANTITY DECIMAL,
WEIGHT DECIMAL,
TOTAL_CONTRACT_PRICE_INCLUDING DECIMAL
-->
<sqlMap namespace="HGCW005A">
<sql id="condition">
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="accountCode">
ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="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="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 like concat('%',#projName#,'%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deliveryCode">
DELIVERY_CODE = #deliveryCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="receCode">
RECE_CODE = #receCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="receName">
RECE_NAME like concat('%',#receName#,'%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="spec">
SPEC = #spec#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventCode">
INVENT_CODE = #inventCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventName">
INVENT_NAME = #inventName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventTypeDetail">
INVENT_TYPE_DETAIL = #inventTypeDetail#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="quantity">
QUANTITY = #quantity#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="weight">
WEIGHT = #weight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="totalContractPriceIncluding">
TOTAL_CONTRACT_PRICE_INCLUDING = #totalContractPriceIncluding#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="parentId">
PARENT_ID = #parentId#
</isNotEmpty>
</sql>
<select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hggp.hg.cw.domain.HGCW005A">
SELECT
ID as "id",
ACCOUNT_CODE as "accountCode", <!-- 企业编码 -->
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-已删除 -->
COMPANY_CODE as "companyCode", <!-- 公司编码 -->
COMPANY_NAME as "companyName", <!-- 公司名称 -->
PROJ_CODE as "projCode", <!-- 项目编码 -->
PROJ_NAME as "projName", <!-- 项目名称 -->
DELIVERY_CODE as "deliveryCode", <!-- 发货单号 -->
RECE_CODE as "receCode", <!-- 收货方编码 -->
RECE_NAME as "receName", <!-- 收货方名称 -->
SPEC as "spec", <!-- 规格 -->
INVENT_CODE as "inventCode", <!-- 存货编码 -->
INVENT_NAME as "inventName", <!-- 存货名称 -->
INVENT_TYPE_DETAIL as "inventTypeDetail", <!-- 存货类型大类 -->
QUANTITY as "quantity", <!-- 数量 -->
WEIGHT as "weight", <!-- 重量 -->
TOTAL_CONTRACT_PRICE_INCLUDING as "totalContractPriceIncluding", <!-- 扣款金额 -->
PARENT_ID as "parentId"
FROM ${hggpSchema}.HGCW005A 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}.HGCW005A 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="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="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="deliveryCode">
DELIVERY_CODE = #deliveryCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="receCode">
RECE_CODE = #receCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="receName">
RECE_NAME = #receName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="spec">
SPEC = #spec#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventCode">
INVENT_CODE = #inventCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventName">
INVENT_NAME = #inventName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventTypeDetail">
INVENT_TYPE_DETAIL = #inventTypeDetail#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="quantity">
QUANTITY = #quantity#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="weight">
WEIGHT = #weight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="totalContractPriceIncluding">
TOTAL_CONTRACT_PRICE_INCLUDING = #totalContractPriceIncluding#
</isNotEmpty>
-->
<insert id="insert">
INSERT INTO ${hggpSchema}.HGCW005A (ID,
ACCOUNT_CODE, <!-- 企业编码 -->
DEP_CODE, <!-- 部门编码 -->
CREATED_BY, <!-- 记录创建者 -->
CREATED_NAME, <!-- 记录创建名称 -->
CREATED_TIME, <!-- 记录创建时间 -->
UPDATED_BY, <!-- 记录修改者 -->
UPDATED_NAME, <!-- 记录修改名称 -->
UPDATED_TIME, <!-- 记录修改时间 -->
DELETE_FLAG, <!-- 0-未删除,1-已删除 -->
COMPANY_CODE, <!-- 公司编码 -->
COMPANY_NAME, <!-- 公司名称 -->
PROJ_CODE, <!-- 项目编码 -->
PROJ_NAME, <!-- 项目名称 -->
DELIVERY_CODE, <!-- 发货单号 -->
RECE_CODE, <!-- 收货方编码 -->
RECE_NAME, <!-- 收货方名称 -->
SPEC, <!-- 规格 -->
INVENT_CODE, <!-- 存货编码 -->
INVENT_NAME, <!-- 存货名称 -->
INVENT_TYPE_DETAIL, <!-- 存货类型大类 -->
QUANTITY, <!-- 数量 -->
WEIGHT, <!-- 重量 -->
TOTAL_CONTRACT_PRICE_INCLUDING, <!-- 扣款金额 -->
PARENT_ID
)
VALUES (#id#, #accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #deleteFlag#, #companyCode#, #companyName#, #projCode#, #projName#, #deliveryCode#, #receCode#, #receName#, #spec#, #inventCode#, #inventName#, #inventTypeDetail#, #quantity#, #weight#, #totalContractPriceIncluding#,#parentId#)
</insert>
<delete id="delete">
DELETE FROM ${hggpSchema}.HGCW005A WHERE
ID = #id#
</delete>
<update id="update">
UPDATE ${hggpSchema}.HGCW005A
SET
ACCOUNT_CODE = #accountCode#, <!-- 企业编码 -->
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-已删除 -->
COMPANY_CODE = #companyCode#, <!-- 公司编码 -->
COMPANY_NAME = #companyName#, <!-- 公司名称 -->
PROJ_CODE = #projCode#, <!-- 项目编码 -->
PROJ_NAME = #projName#, <!-- 项目名称 -->
DELIVERY_CODE = #deliveryCode#, <!-- 发货单号 -->
RECE_CODE = #receCode#, <!-- 收货方编码 -->
RECE_NAME = #receName#, <!-- 收货方名称 -->
SPEC = #spec#, <!-- 规格 -->
INVENT_CODE = #inventCode#, <!-- 存货编码 -->
INVENT_NAME = #inventName#, <!-- 存货名称 -->
INVENT_TYPE_DETAIL = #inventTypeDetail#, <!-- 存货类型大类 -->
QUANTITY = #quantity#, <!-- 数量 -->
WEIGHT = #weight#, <!-- 重量 -->
TOTAL_CONTRACT_PRICE_INCLUDING = #totalContractPriceIncluding#, <!-- 扣款金额 -->
PARENT_ID = #parentId#
WHERE
ID = #id#
</update>
<select id="queryHgyx001" parameterClass="java.util.HashMap" resultClass="com.baosight.hggp.hg.cw.domain.HGCW005A">
SELECT
A.ACCOUNT_CODE as "accountCode",
A.COMPANY_CODE as "companyCode",
A.COMPANY_NAME as "companyName",
A.PROJ_CODE as "projCode",
A.PROJ_NAME as "projName",
A.DELIVERY_CODE as "deliveryCode",
A.RECE_CODE as "receCode",
A.RECE_NAME as "receName",
B.SPEC as "spec",
B.INVENT_CODE as "inventCode",
B.INVENT_NAME as "inventName",
B.INVENT_TYPE_DETAIL as "inventTypeDetail",
B.QUANTITY as "quantity",
DATE_FORMAT(CURDATE(), '%Y%m%d') as "signingDate",
B.WEIGHT as "weight"
FROM ${hggpSchema}.HGYX001 A inner join ${hggpSchema}.HGYX001A B on A.ID = B.PARENT_ID
WHERE A.DELETE_FLAG = 0 and A.IS_CONTRACT = 1
<isNotEmpty prepend=" AND " property="accountCode">
A.ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
A.DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
A.COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyName">
A.COMPANY_NAME LIKE concat('%',#companyName#,'%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projCode">
A.PROJ_CODE LIKE concat('%',#projCode#,'%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projName">
A.PROJ_NAME = #projName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deliveryCode">
A.DELIVERY_CODE = #deliveryCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="receCode">
A.RECE_CODE = #receCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="receName">
A.RECE_NAME LIKE concat('%',#receName#,'%')
</isNotEmpty>
</select>
</sqlMap>
......@@ -22,6 +22,10 @@ $(function() {
let auditStatus = item.status;
let template = '';
if (item.id) {
if (item.deliveryCode){
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="detailFunc(' + item.id + ',\'' + item.deliveryCode + '\')">扣款明细</a>';
}
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="fileDetailFunc(' + item.id + ')" >附件上传</a>';
}
......@@ -41,7 +45,16 @@ $(function() {
init: function (e, options) {
console.log(e);
},
},
},{
field: "signingDate",
editor: "date",
init: function (e, options) {
console.log(e);
},
defaultValue: function (e, options) {
return currDate()
},
}
],
onSave: function (e) {
......@@ -58,6 +71,7 @@ $(function() {
loadComplete: function (e) {
$("#BTN_SUBMIT").on("click",submitFunc);
$("#BTN_SELECT").on("click",selectFunc)
},
onSuccess: function (e) {
......@@ -68,15 +82,7 @@ $(function() {
}
window.document.addEventListener("keyup",function (event) {
if(event.keyCode === 13){
var grid = $("#ef_grid_result").data("kendoGrid");
// 回填
//grid.addRows(returnRows);
grid.closeCell();
}
})
downKeyUp();
});
$(window).load(function () {
......@@ -275,4 +281,49 @@ function fileDetailFunc(id) {
width: "80%",
height: "80%",
});
}
/**
* 选择发货单
*/
function selectFunc() {
JSColorbox.open({
href: "HGCW005B?methodName=initLoad",
title: "<div style='text-align: center;'>选择发货单</div>",
width: "80%",
height: "80%",
callbackName: windowCallback
});
}
/**
*
* @param deliveryCode 发货单
*/
function detailFunc(id,deliveryCode) {
/*let rows = resultGrid.getCheckedRows();
if (rows.length != 1) {
message("请选择一条数据");
return;
}
if (rows[0].reviewStatus == "3") {
message("已经审核的单据不能修改");
return;
}*/
JSColorbox.open({
href: "HGCW005A?methodName=initLoad&inqu_status-0-parentId=" + id + "&inqu_status-0-deliveryCode=" + deliveryCode + "&efParentFormEname=HGCW005",
title: "<div style='text-align: center;'>扣款明细</div>",
width: "80%",
height: "80%",
callbackName: windowCallback
});
}
function windowCallback(ei) {
if (ei.getStatus() >= 0) {
// 刷新列表
resultGrid.dataSource.page(1);
// 关闭弹窗
JSColorbox.close();
}
}
\ No newline at end of file
......@@ -23,6 +23,7 @@
format="yyyy-MM-dd" ratio="3:3" satrtRatio="4:8" endRatio="4:8" readonly="true">
</EF:EFDateSpan>
<EF:EFInput cname="主合同名称" ename="contractName" blockId="inqu_status" row="0" colWidth="3" />
<EF:EFInput blockId="inqu_status" row="0" ename="deliveryCode" cname="发货单号" colWidth="3"/>
<EF:EFSelect cname="审批状态" ename="inqu_status-0-reviewStatus" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hggp.cw.reviewStatus"/>
......@@ -33,18 +34,17 @@
<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="100" align="center"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="150" align="center"/>
<EF:EFColumn ename="companyName" cname="所属公司" width="120" enable="false" readonly="true" align="center"/>
<EF:EFPopupColumn ename="projCode" cname="项目编号" width="200"
serviceName="HGCW002" methodName="projectComboBox"
resultId="projcet_combo_box" popupType="ServiceGrid"
valueField="projCode" textField="projCode"
columnEnames="projCode,projName,contractNumber,contractName,partyA,partyB"
columnCnames="项目编码,项目名称,合同号,合同名称,甲方名称,乙方名称"
backFillColumnIds="projCode,projName,contractNumber,contractName,partyA,partyB"
backFillFieldIds="projCode,projName,contractNumber,contractName,partyA,partyB"
popupTitle="所属公司" popupWidth="800">
</EF:EFPopupColumn>
<EF:EFPopupColumn ename="projCode" cname="项目编号" width="200"
serviceName="HGCW002" methodName="projectComboBox"
resultId="projcet_combo_box" popupType="ServiceGrid"
valueField="projCode" textField="projCode"
columnEnames="projCode,projName,contractNumber,contractName,partyA,partyB"
columnCnames="项目编码,项目名称,合同号,合同名称,甲方名称,乙方名称"
backFillColumnIds="projCode,projName,contractNumber,contractName,partyA,partyB"
backFillFieldIds="projCode,projName,contractNumber,contractName,partyA,partyB"
popupTitle="所属公司" popupWidth="800"/>
<EF:EFColumn ename="projName" cname="项目名称" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="contractNumber" cname="主合同号" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="contractName" cname="主合同名称" width="120" enable="false" readonly="true" align="center"/>
......@@ -54,6 +54,7 @@
<EF:EFColumn ename="totalContractPriceIncluding" cname="扣款金额" width="120" enable="true" align="center" required="true"/>
<EF:EFColumn ename="signingDate" cname="扣款日期" width="120" enable="true" align="center" editType="date"
dateFormat="yyyy-MM-dd" parseFormats="['yyyy-MM-dd']" required="true"/>
<EF:EFColumn ename="deliveryCode" cname="发货单号" enable="false" width="130" align="center"/>
<EF:EFComboColumn ename="reviewStatus" cname="审批状态" width="100" align="center"
columnTemplate="#=textField#" itemTemplate="#=textField#" enable="false" >
<EF:EFCodeOption codeName="hggp.cw.reviewStatus"/>
......
$(function() {
var companyBox = __eiInfo.getBlock("roleCompany").getMappedRows();
var projCodeBox = __eiInfo.getBlock("proj_record_block_id").getMappedRows();
var inventTypeBox = __eiInfo.getBlock("invent_type_box_block_id").getMappedRows();
var inventCodedBox = __eiInfo.getBlock("invent_code_box_block_id").getMappedRows();
var specIdBox = __eiInfo.getBlock("spec_box_block_id").getMappedRows();
var customerAllBox = __eiInfo.getBlock("customer_record_all_block_id").getMappedRows();
var whRecordBox = __eiInfo.getBlock("wh_record_box_block_id").getMappedRows();
// 查询
$("#QUERY").on("click", query);
IPLATUI.EFGrid.result = {
pageable: {
pageSize: 10,
pageSizes: [10, 20, 30, 50, 100, 200]
},
columns: [{
field: "companyCode",
template: function (row) {
for (let i = 0; i < companyBox.length; i++) {
if (companyBox[i]['companyCode'] === row['companyCode']){
row['inventName'] = companyBox[i]['companyName']
return companyBox[i]['companyName'];
}
}
return row["companyCode"];
}
}, {
field: "projCode",
title: "存货名称",
template: function (row) {
for (let i = 0; i < projCodeBox.length; i++) {
if (projCodeBox[i]['valueField'] === row['projCode']){
row['projName'] = projCodeBox[i]['textField']
return projCodeBox[i]['textField'];
}
}
return row["projCode"];
}
}, {
field: "receCode",
template: function (row) {
for (let i = 0; i < customerAllBox.length; i++) {
if (customerAllBox[i]['valueField'] === row['receCode']){
row['receName'] = customerAllBox[i]['textField']
return customerAllBox[i]['textField'];
}
}
return row["receCode"];
}
}, {
field: "inventCode",
template: function (row) {
for (let i = 0; i < inventCodedBox.length; i++) {
if (inventCodedBox[i]['valueField'] === row['inventCode']){
row['inventName'] = inventCodedBox[i]['textField']
return inventCodedBox[i]['textField'];
}
}
return row["inventCode"];
}
}],
loadComplete: function(grid) {
// 此 grid 对象
// 处理父子级联动,通过监听 change 事件,判断父级节点是否发生变化
grid.dataSource.bind("change", function(e) {
// 判断父级节点是否发生变化
if (e.field === "quantity"){
for (let i = 0; i < e.items.length; i++) {
let quantity = e.items[i]["quantity"];
let unitWeight = e.items[i]["unitWeight"];
let weight = quantity*unitWeight;
resultGrid.setCellValue(e.items[i],"weight",weight);
$("#inqu_status-0-consQuantity_textField").val(quantity)
$("#inqu_status-0-consQuantity").val(quantity)
$("#inqu_status-0-consWeight_textField").val(weight)
$("#inqu_status-0-consWeight").val(weight)
}
}
});
},
onSuccess: function (e) {
},
onSave: function (e) {
// 阻止后台保存请求,使用自定义保存
e.preventDefault();
save();
},
onDelete: function(e) {
},
}
downKeyUp();
});
let query = function () {
resultGrid.dataSource.page(1);
}
/**
* 保存
*/
let save = function () {
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
let flag = true;
$.each(rows, function(index, item) {
let inventType= item.get("inventType");
let inventCode= item.get("inventCode");
let spec= item.get("spec");
let quantity= item.get("quantity");
if(isBlank(inventType)){
message("选中的第" + (index + 1) + "行\"存货类型\",不能为空!");
flag = false;
return false;
}
if(isBlank(inventCode)){
message("选中的第" + (index + 1) + "行\"存货编码\",不能为空!");
flag = false;
return false;
}
if(isBlank(spec)){
message("选中的第" + (index + 1) + "行\"规格\",不能为空!");
flag = false;
return false;
}
if(isBlank(quantity) || parseInt(quantity) <= 0){
message("选中的第" + (index + 1) + "行\"数量\",必须是数值并且数量必须大于0!");
flag = false;
return false;
}
});
if(flag) {
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"保存\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result", "HGCW005A", "save", true);
}
});
}
}
\ No newline at end of file
<%--
Created by IntelliJ IDEA.
User: 1
Date: 2024/8/31
Time: 12:11
To change this template use File | Settings | File Templates.
--%>
<!DOCTYPE html>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<script>
var ctx = "${ctx}";
</script>
<EF:EFPage title="扣款单明细s">
<EF:EFRegion id="inqu" title="查询条件">
<div class="row">
<EF:EFSelect blockId="inqu_status" row="0" ename="companyCode" cname="公司名称" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="roleCompany" textField="companyName" valueField="companyCode"/>
</EF:EFSelect>
<EF:EFInput blockId="inqu_status" row="0" ename="projName" cname="项目名称" placeholder="模糊查询" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="deliveryCode" cname="发货单号" readonly="true" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="receName" cname="收货方" placeholder="模糊查询" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="parentId" cname="上级ID" type="hidden" colWidth="3"/>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" autoBind="true" queryMethod="query">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFComboColumn ename="companyCode" enable="true" cname="公司名称" width="200" align="center"
filter="contains" readonly="true" required="true">
<EF:EFOptions blockId="roleCompany" textField="companyName" valueField="companyCode"/>
</EF:EFComboColumn>
<EF:EFComboColumn ename="projCode" cname="所属项目" blockName="proj_record_block_id"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
maxLength="16" readonly="true" width="160" required="true"
align="center" filter="contains" sort="true"/>
<EF:EFColumn ename="deliveryCode" cname="发货单号" enable="false" width="130" align="center"/>
<EF:EFComboColumn ename="receCode" cname="收货方" enable="true" width="160" required="true"
blockName="customer_record_all_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#"
maxLength="16" readonly="true" align="center" filter="contains" sort="true"/>
<EF:EFColumn ename="totalContractPriceIncluding" cname="扣款金额" width="120" enable="true" align="center" required="true"/>
<EF:EFComboColumn ename="inventCode" cname="存货名称" enable="true" width="120" align="center"
blockName="invent_code_box_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="false" required="true"
filter="contains"/>
<EF:EFColumn ename="spec" cname="规格" width="140" align="center" maxLength="50"/>
<EF:EFColumn ename="quantity" cname="数量" width="120" enable="true" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right"
data-regex="/^-?[0-9]{1,15}$/" maxLength="20" required="true"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFColumn ename="weight" cname="重量" width="120" enable="false" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/" maxLength="15" required="true"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
$(function() {
var companyBox = __eiInfo.getBlock("roleCompany").getMappedRows();
var projCodeBox = __eiInfo.getBlock("proj_record_block_id").getMappedRows();
var inventTypeBox = __eiInfo.getBlock("invent_type_box_block_id").getMappedRows();
var inventCodedBox = __eiInfo.getBlock("invent_code_box_block_id").getMappedRows();
var specIdBox = __eiInfo.getBlock("spec_box_block_id").getMappedRows();
var customerAllBox = __eiInfo.getBlock("customer_record_all_block_id").getMappedRows();
var whRecordBox = __eiInfo.getBlock("wh_record_box_block_id").getMappedRows();
// 查询
$("#QUERY").on("click", query);
IPLATUI.EFGrid.result = {
pageable: {
pageSize: 10,
pageSizes: [10, 20, 30, 50, 100, 200]
},
columns: [{
field: "companyCode",
template: function (row) {
for (let i = 0; i < companyBox.length; i++) {
if (companyBox[i]['companyCode'] === row['companyCode']){
row['inventName'] = companyBox[i]['companyName']
return companyBox[i]['companyName'];
}
}
return row["companyCode"];
}
}, {
field: "projCode",
template: function (row) {
for (let i = 0; i < projCodeBox.length; i++) {
if (projCodeBox[i]['valueField'] === row['projCode']){
row['projName'] = projCodeBox[i]['textField']
return projCodeBox[i]['textField'];
}
}
return row["projCode"];
}
}, {
field: "receCode",
template: function (row) {
for (let i = 0; i < customerAllBox.length; i++) {
if (customerAllBox[i]['valueField'] === row['receCode']){
row['receName'] = customerAllBox[i]['textField']
return customerAllBox[i]['textField'];
}
}
return row["receCode"];
}
}, {
field: "inventCode",
template: function (row) {
for (let i = 0; i < inventCodedBox.length; i++) {
if (inventCodedBox[i]['valueField'] === row['inventCode']){
row['inventName'] = inventCodedBox[i]['textField']
return inventCodedBox[i]['textField'];
}
}
return row["inventCode"];
}
}],
loadComplete: function(grid) {
// 此 grid 对象
// 处理父子级联动,通过监听 change 事件,判断父级节点是否发生变化
grid.dataSource.bind("change", function(e) {
// 判断父级节点是否发生变化
if (e.field === "quantity"){
for (let i = 0; i < e.items.length; i++) {
let quantity = e.items[i]["quantity"];
let unitWeight = e.items[i]["unitWeight"];
let weight = quantity*unitWeight;
resultGrid.setCellValue(e.items[i],"weight",weight);
$("#inqu_status-0-consQuantity_textField").val(quantity)
$("#inqu_status-0-consQuantity").val(quantity)
$("#inqu_status-0-consWeight_textField").val(weight)
$("#inqu_status-0-consWeight").val(weight)
}
}
});
},
onSuccess: function (e) {
},
onSave: function (e) {
// 阻止后台保存请求,使用自定义保存
e.preventDefault();
save();
},
onDelete: function(e) {
},
}
downKeyUp();
});
let query = function () {
resultGrid.dataSource.page(1);
}
/**
* 保存
*/
let save = function () {
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
let flag = true;
$.each(rows, function(index, item) {
let totalContractPriceIncluding= item.get("totalContractPriceIncluding");
if(isBlank(totalContractPriceIncluding) || parseInt(totalContractPriceIncluding) <= 0){
message("选中的第" + (index + 1) + "行\"扣款金额\",必须是数值并且数量必须大于0!");
flag = false;
return false;
}
});
if(flag) {
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"保存\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result", "HGCW005A", "save", true,
function (e) {
var status = e.getStatus();
if (status !== -1) {
parent.JSColorbox.setValueCallback(e);
}
});
}
});
}
}
\ No newline at end of file
<%--
Created by IntelliJ IDEA.
User: 1
Date: 2024/8/31
Time: 14:36
To change this template use File | Settings | File Templates.
--%>
<!DOCTYPE html>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<script>
var ctx = "${ctx}";
</script>
<EF:EFPage title="选择发货单">
<EF:EFRegion id="inqu" title="查询条件">
<div class="row">
<EF:EFSelect blockId="inqu_status" row="0" ename="companyCode" cname="公司名称" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="roleCompany" textField="companyName" valueField="companyCode"/>
</EF:EFSelect>
<EF:EFInput blockId="inqu_status" row="0" ename="projName" cname="项目名称" placeholder="模糊查询" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="deliveryCode" cname="发货单号" placeholder="模糊查询" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="receName" cname="收货方" placeholder="模糊查询" colWidth="3"/>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFComboColumn ename="companyCode" enable="false" cname="公司名称" width="200" align="center"
filter="contains" readonly="true" required="false">
<EF:EFOptions blockId="roleCompany" textField="companyName" valueField="companyCode"/>
</EF:EFComboColumn>
<EF:EFComboColumn ename="projCode" cname="项目名称" blockName="proj_record_block_id"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField" enable="false"
maxLength="16" readonly="true" width="160" required="false"
align="center" filter="contains" sort="true"/>
<EF:EFColumn ename="deliveryCode" cname="发货单号" enable="false" width="130" align="center"/>
<EF:EFComboColumn ename="receCode" cname="收货方" enable="false" width="160" required="false"
blockName="customer_record_all_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#"
maxLength="16" readonly="true" align="center" filter="contains" sort="true"/>
<EF:EFColumn ename="totalContractPriceIncluding" cname="扣款金额" width="120" enable="true" align="center" required="true"/>
<EF:EFComboColumn ename="inventCode" cname="存货名称" enable="false" width="120" align="center"
blockName="invent_code_box_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="false" required="false"
filter="contains"/>
<EF:EFColumn ename="spec" cname="规格" enable="false" width="140" align="center" maxLength="50"/>
<EF:EFColumn ename="quantity" cname="数量" width="120" enable="false" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right"
data-regex="/^-?[0-9]{1,15}$/" maxLength="20" required="false"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFColumn ename="weight" cname="重量" width="120" enable="false" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/" maxLength="15" required="false"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
</EF:EFGrid>
</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