Commit cdcd5ab5 by liuyang

2024-06-10 销售退货

parent 5a49204e
......@@ -341,7 +341,14 @@ public enum DdynamicEnum {
/**
*
*/
PROJECT_CODE_BOX_BLOCK_ID("projectCodeBox_block_id","projCode","projName","HGSC001.queryProjectCodeBox")
PROJECT_CODE_BOX_BLOCK_ID("projectCodeBox_block_id","projCode","projName","HGSC001.queryProjectCodeBox"),
/**
* 模块: 销售发货
* 用途: 发单号下拉框
* 编写: ly
*/
DELIVERY_CODE_BOX_BLOCK_ID("deliveryCodeBox_block_id","deliveryCode","projName","id","HGYX001.queryReturnCodeBox"),
;
......
......@@ -128,6 +128,8 @@ public class HGConstant {
public static final String PLAN_MATERIAL_CODE = "PLAN_MATERIAL_CODE";
// 销售发货单号
public static final String DELIVERY_CODE = "DELIVERY_CODE";
//销售退货单号
public static final String RETURN_CODE = "RETURN_CODE";
}
......
package com.baosight.hggp.hg.yx.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:Hgyx002.java <br>
* Description: <br>
*
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
*
* @version 1.0
* @history 2024-06-07 14:37:36 create
*/
public class HGYX002 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_RETURN_CODE = "returnCode"; /* 退货单号*/
public static final String FIELD_DELIVERY_CODE = "deliveryCode"; /* 发货单号*/
public static final String FIELD_OUTBOUND_CODE = "outboundCode"; /* 出库单号*/
public static final String FIELD_CONS_CODE = "consCode"; /* 发货方编码*/
public static final String FIELD_CONS_NAME = "consName"; /* 发货方名称*/
public static final String FIELD_CONS_WH_CODE = "consWhCode"; /* 发货仓库编码*/
public static final String FIELD_CONS_WH_NAME = "consWhName"; /* 发货仓库名称*/
public static final String FIELD_CONS_ADDR = "consAddr"; /* 发货地址*/
public static final String FIELD_RECE_CODE = "receCode"; /* 收货方编码*/
public static final String FIELD_RECE_NAME = "receName"; /* 收货方名称*/
public static final String FIELD_RECE_USER_PHONE = "receUserPhone"; /* 收货人电话*/
public static final String FIELD_RETURN_QUANTITY = "returnQuantity"; /* 退货数量*/
public static final String FIELD_RETURN_WEIGHT = "returnWeight"; /* 退货重量*/
public static final String FIELD_REMARKS = "remarks"; /* 退货原因*/
public static final String FIELD_STATUS = "status"; /* 审批状态 0-未审核,1-已审核*/
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_RETURN_CODE = "RETURN_CODE"; /* 退货单号*/
public static final String COL_DELIVERY_CODE = "DELIVERY_CODE"; /* 发货单号*/
public static final String COL_CONS_CODE = "CONS_CODE"; /* 发货方编码*/
public static final String COL_CONS_NAME = "CONS_NAME"; /* 发货方名称*/
public static final String COL_CONS_ADDR = "CONS_ADDR"; /* 发货地址*/
public static final String COL_RECE_CODE = "RECE_CODE"; /* 收货方编码*/
public static final String COL_RECE_NAME = "RECE_NAME"; /* 收货方名称*/
public static final String COL_RECE_USER_PHONE = "RECE_USER_PHONE"; /* 收货人电话*/
public static final String COL_RETURN_QUANTITY = "RETURN_QUANTITY"; /* 退货数量*/
public static final String COL_RETURN_WEIGHT = "RETURN_WEIGHT"; /* 退货重量*/
public static final String COL_REMARKS = "REMARKS"; /* 退货原因*/
public static final String COL_STATUS = "STATUS"; /* 审批状态 0-未审核,1-已审核*/
public static final String QUERY = "HGYX002.query";
public static final String COUNT = "HGYX002.count";
public static final String INSERT = "HGYX002.insert";
public static final String UPDATE = "HGYX002.update";
public static final String DELETE = "HGYX002.delete";
public static final String DELETE_FLAG = "HGYX002.deleteFlag";
public static final String BATCH_COMMIT = "HGYX002.batchCommit";
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 = 0; /* 0-未删除,1-已删除*/
private String companyCode = " "; /* 公司编码*/
private String companyName = " "; /* 公司名称*/
private String projCode = " "; /* 项目编码*/
private String projName = " "; /* 项目名称*/
private String returnCode = " "; /* 退货单号*/
private String deliveryCode = " "; /* 发货单号*/
private String outboundCode = " "; /* 出库单号*/
private String consCode = " "; /* 发货方编码*/
private String consName = " "; /* 发货方名称*/
private String consWhCode = " "; /* 发货仓库编码*/
private String consWhName = " "; /* 发货仓库名称*/
private String consAddr = " "; /* 发货地址*/
private String receCode = " "; /* 收货方编码*/
private String receName = " "; /* 收货方名称*/
private String receUserPhone = " "; /* 收货人电话*/
private BigDecimal returnQuantity = new BigDecimal(0); /* 退货数量*/
private BigDecimal returnWeight = new BigDecimal("0.000"); /* 退货重量*/
private String remarks = " "; /* 退货原因*/
private Integer status = 0; /* 审批状态 0-未审核,1-已审核*/
/**
* 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_RETURN_CODE);
eiColumn.setDescName("退货单号");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DELIVERY_CODE);
eiColumn.setDescName("发货单号");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_OUTBOUND_CODE);
eiColumn.setDescName("出库单号");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CONS_CODE);
eiColumn.setDescName("发货方编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CONS_NAME);
eiColumn.setDescName("发货方名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CONS_WH_CODE);
eiColumn.setDescName("发货仓库编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CONS_WH_NAME);
eiColumn.setDescName("发货仓库名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CONS_ADDR);
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_RECE_USER_PHONE);
eiColumn.setDescName("收货人电话");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_RETURN_QUANTITY);
eiColumn.setType("N");
eiColumn.setScaleLength(0);
eiColumn.setFieldLength(20);
eiColumn.setDescName("退货数量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_RETURN_WEIGHT);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(17);
eiColumn.setDescName("退货重量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_REMARKS);
eiColumn.setDescName("退货原因");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_STATUS);
eiColumn.setDescName("审批状态 0-未审核,1-已审核");
eiMetadata.addMeta(eiColumn);
}
/**
* the constructor.
*/
public HGYX002() {
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 returnCode - 退货单号.
* @return the returnCode
*/
public String getReturnCode() {
return this.returnCode;
}
/**
* set the returnCode - 退货单号.
*
* @param returnCode - 退货单号
*/
public void setReturnCode(String returnCode) {
this.returnCode = returnCode;
}
/**
* 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;
}
public String getOutboundCode() {
return outboundCode;
}
public void setOutboundCode(String outboundCode) {
this.outboundCode = outboundCode;
}
/**
* get the consCode - 发货方编码.
* @return the consCode
*/
public String getConsCode() {
return this.consCode;
}
/**
* set the consCode - 发货方编码.
*
* @param consCode - 发货方编码
*/
public void setConsCode(String consCode) {
this.consCode = consCode;
}
/**
* get the consName - 发货方名称.
* @return the consName
*/
public String getConsName() {
return this.consName;
}
/**
* set the consName - 发货方名称.
*
* @param consName - 发货方名称
*/
public void setConsName(String consName) {
this.consName = consName;
}
public String getConsWhCode() {
return consWhCode;
}
public void setConsWhCode(String consWhCode) {
this.consWhCode = consWhCode;
}
public String getConsWhName() {
return consWhName;
}
public void setConsWhName(String consWhName) {
this.consWhName = consWhName;
}
/**
* get the consAddr - 发货地址.
* @return the consAddr
*/
public String getConsAddr() {
return this.consAddr;
}
/**
* set the consAddr - 发货地址.
*
* @param consAddr - 发货地址
*/
public void setConsAddr(String consAddr) {
this.consAddr = consAddr;
}
/**
* 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 receUserPhone - 收货人电话.
* @return the receUserPhone
*/
public String getReceUserPhone() {
return this.receUserPhone;
}
/**
* set the receUserPhone - 收货人电话.
*
* @param receUserPhone - 收货人电话
*/
public void setReceUserPhone(String receUserPhone) {
this.receUserPhone = receUserPhone;
}
/**
* get the returnQuantity - 退货数量.
* @return the returnQuantity
*/
public BigDecimal getReturnQuantity() {
return this.returnQuantity;
}
/**
* set the returnQuantity - 退货数量.
*
* @param returnQuantity - 退货数量
*/
public void setReturnQuantity(BigDecimal returnQuantity) {
this.returnQuantity = returnQuantity;
}
/**
* get the returnWeight - 退货重量.
* @return the returnWeight
*/
public BigDecimal getReturnWeight() {
return this.returnWeight;
}
/**
* set the returnWeight - 退货重量.
*
* @param returnWeight - 退货重量
*/
public void setReturnWeight(BigDecimal returnWeight) {
this.returnWeight = returnWeight;
}
/**
* get the remarks - 退货原因.
* @return the remarks
*/
public String getRemarks() {
return this.remarks;
}
/**
* set the remarks - 退货原因.
*
* @param remarks - 退货原因
*/
public void setRemarks(String remarks) {
this.remarks = remarks;
}
/**
* get the status - 审批状态 0-未审核,1-已审核.
* @return the status
*/
public Integer getStatus() {
return this.status;
}
/**
* set the status - 审批状态 0-未审核,1-已审核.
*
* @param status - 审批状态 0-未审核,1-已审核
*/
public void setStatus(Integer status) {
this.status = status;
}
/**
* 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));
setReturnCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_RETURN_CODE)), returnCode));
setDeliveryCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DELIVERY_CODE)), deliveryCode));
setOutboundCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_OUTBOUND_CODE)), outboundCode));
setConsCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CONS_CODE)), consCode));
setConsName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CONS_NAME)), consName));
setConsWhCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CONS_WH_CODE)), consWhCode));
setConsWhName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CONS_WH_NAME)), consWhName));
setConsAddr(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CONS_ADDR)), consAddr));
setReceCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_RECE_CODE)), receCode));
setReceName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_RECE_NAME)), receName));
setReceUserPhone(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_RECE_USER_PHONE)), receUserPhone));
setReturnQuantity(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_RETURN_QUANTITY)), returnQuantity));
setReturnWeight(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_RETURN_WEIGHT)), returnWeight));
setRemarks(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_REMARKS)), remarks));
setStatus(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_STATUS)), status));
}
/**
* 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_RETURN_CODE, StringUtils.toString(returnCode, eiMetadata.getMeta(FIELD_RETURN_CODE)));
map.put(FIELD_DELIVERY_CODE, StringUtils.toString(deliveryCode, eiMetadata.getMeta(FIELD_DELIVERY_CODE)));
map.put(FIELD_OUTBOUND_CODE, StringUtils.toString(outboundCode, eiMetadata.getMeta(FIELD_OUTBOUND_CODE)));
map.put(FIELD_CONS_CODE, StringUtils.toString(consCode, eiMetadata.getMeta(FIELD_CONS_CODE)));
map.put(FIELD_CONS_NAME, StringUtils.toString(consName, eiMetadata.getMeta(FIELD_CONS_NAME)));
map.put(FIELD_CONS_WH_CODE, StringUtils.toString(consWhCode, eiMetadata.getMeta(FIELD_CONS_WH_CODE)));
map.put(FIELD_CONS_WH_NAME, StringUtils.toString(consWhName, eiMetadata.getMeta(FIELD_CONS_WH_NAME)));
map.put(FIELD_CONS_ADDR, StringUtils.toString(consAddr, eiMetadata.getMeta(FIELD_CONS_ADDR)));
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_RECE_USER_PHONE, StringUtils.toString(receUserPhone, eiMetadata.getMeta(FIELD_RECE_USER_PHONE)));
map.put(FIELD_RETURN_QUANTITY, StringUtils.toString(returnQuantity, eiMetadata.getMeta(FIELD_RETURN_QUANTITY)));
map.put(FIELD_RETURN_WEIGHT, StringUtils.toString(returnWeight, eiMetadata.getMeta(FIELD_RETURN_WEIGHT)));
map.put(FIELD_REMARKS, StringUtils.toString(remarks, eiMetadata.getMeta(FIELD_REMARKS)));
map.put(FIELD_STATUS, StringUtils.toString(status, eiMetadata.getMeta(FIELD_STATUS)));
return map;
}
}
package com.baosight.hggp.hg.yx.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:Hgyx002a.java <br>
* Description: <br>
*
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
*
* @version 1.0
* @history 2024-06-07 14:37:36 create
*/
public class HGYX002A extends DaoEPBase {
private static final long serialVersionUID = 1L;
public static final String FIELD_ID = "id"; /* ID*/
public static final String FIELD_ACCOUNT_CODE = "accountCode"; /* 企业编码*/
public static final String FIELD_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_INVENT_RECORD_ID = "inventRecordId"; /* 存货档案id*/
public static final String FIELD_INVENT_TYPE = "inventType"; /* 存货类型*/
public static final String FIELD_INVENT_CODE = "inventCode"; /* 存货编码*/
public static final String FIELD_INVENT_NAME = "inventName"; /* 存货名称*/
public static final String FIELD_SPEC = "spec"; /* 规格*/
public static final String FIELD_LENGTH = "length"; /* 长*/
public static final String FIELD_WIDTH = "width"; /* 宽*/
public static final String FIELD_THICK = "thick"; /* 厚*/
public static final String FIELD_QUANTITY = "quantity"; /* 发货数量*/
public static final String FIELD_UNIT_WEIGHT = "unitWeight"; /* 单重*/
public static final String FIELD_WEIGHT = "weight"; /* 发货重量*/
public static final String FIELD_RETURN_QUANTITY = "returnQuantity"; /* 退货数量*/
public static final String FIELD_RETURN_WEIGHT = "returnWeight"; /* 退货重量*/
public static final String FIELD_PARENT_ID = "parentId"; /* 销售退货ID*/
public static final String COL_ID = "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_INVENT_RECORD_ID = "INVENT_RECORD_ID"; /* 存货档案id*/
public static final String COL_INVENT_TYPE = "INVENT_TYPE"; /* 存货类型*/
public static final String COL_INVENT_CODE = "INVENT_CODE"; /* 存货编码*/
public static final String COL_INVENT_NAME = "INVENT_NAME"; /* 存货名称*/
public static final String COL_SPEC = "SPEC"; /* 规格*/
public static final String COL_LENGTH = "LENGTH"; /* 长*/
public static final String COL_WIDTH = "WIDTH"; /* 宽*/
public static final String COL_THICK = "THICK"; /* 厚*/
public static final String COL_QUANTITY = "QUANTITY"; /* 发货数量*/
public static final String COL_UNIT_WEIGHT = "UNIT_WEIGHT"; /* 单重*/
public static final String COL_WEIGHT = "WEIGHT"; /* 发货重量*/
public static final String COL_RETURN_QUANTITY = "RETURN_QUANTITY"; /* 退货数量*/
public static final String COL_RETURN_WEIGHT = "RETURN_WEIGHT"; /* 退货重量*/
public static final String COL_PARENT_ID = "PARENT_ID"; /* 销售退货ID*/
public static final String QUERY = "HGYX002A.query";
public static final String COUNT = "HGYX002A.count";
public static final String INSERT = "HGYX002A.insert";
public static final String UPDATE = "HGYX002A.update";
public static final String DELETE = "HGYX002A.delete";
public static final String DELETE_FLAG = "HGYX002A.deleteFlag";
public static final String DELETE_BY_PARENT_ID = "HGYX002A.deleteByParentId";
private Long id = new Long(0); /* ID*/
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 = 0; /* 0-未删除,1-已删除*/
private Long inventRecordId = new Long(0); /* 存货档案id*/
private String inventType = " "; /* 存货类型*/
private String inventCode = " "; /* 存货编码*/
private String inventName = " "; /* 存货名称*/
private String spec = " "; /* 规格*/
private BigDecimal length = new BigDecimal("0"); /* 长*/
private BigDecimal width = new BigDecimal("0"); /* 宽*/
private BigDecimal thick = new BigDecimal("0"); /* 厚*/
private BigDecimal quantity = new BigDecimal("0"); /* 发货数量*/
private BigDecimal unitWeight = new BigDecimal("0"); /* 单重*/
private BigDecimal weight = new BigDecimal("0"); /* 发货重量*/
private BigDecimal returnQuantity = new BigDecimal(0); /* 退货数量*/
private BigDecimal returnWeight = new BigDecimal(0.000); /* 退货重量*/
private Long parentId = new Long(0); /* 销售退货ID*/
/**
* initialize the metadata.
*/
public void initMetaData() {
EiColumn eiColumn;
eiColumn = new EiColumn(FIELD_ID);
eiColumn.setPrimaryKey(true);
eiColumn.setDescName("ID");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_ACCOUNT_CODE);
eiColumn.setDescName("企业编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_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_INVENT_RECORD_ID);
eiColumn.setDescName("存货档案id");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_INVENT_TYPE);
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_SPEC);
eiColumn.setDescName("规格");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_LENGTH);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(12);
eiColumn.setDescName("长");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_WIDTH);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(12);
eiColumn.setDescName("宽");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_THICK);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(12);
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_UNIT_WEIGHT);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(17);
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_RETURN_QUANTITY);
eiColumn.setType("N");
eiColumn.setScaleLength(0);
eiColumn.setFieldLength(20);
eiColumn.setDescName("退货数量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_RETURN_WEIGHT);
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 HGYX002A() {
initMetaData();
}
/**
* get the id - ID.
* @return the id
*/
public Long getId() {
return this.id;
}
/**
* set the id - ID.
*
* @param id - ID
*/
public void setId(Long id) {
this.id = id;
}
/**
* get the accountCode - 企业编码.
* @return the accountCode
*/
public String getAccountCode() {
return this.accountCode;
}
/**
* set the accountCode - 企业编码.
*
* @param accountCode - 企业编码
*/
public void setAccountCode(String accountCode) {
this.accountCode = accountCode;
}
/**
* get the 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 inventRecordId - 存货档案id.
* @return the inventRecordId
*/
public Long getInventRecordId() {
return this.inventRecordId;
}
/**
* set the inventRecordId - 存货档案id.
*
* @param inventRecordId - 存货档案id
*/
public void setInventRecordId(Long inventRecordId) {
this.inventRecordId = inventRecordId;
}
/**
* get the inventType - 存货类型.
* @return the inventType
*/
public String getInventType() {
return this.inventType;
}
/**
* set the inventType - 存货类型.
*
* @param inventType - 存货类型
*/
public void setInventType(String inventType) {
this.inventType = inventType;
}
/**
* 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 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 length - 长.
* @return the length
*/
public BigDecimal getLength() {
return this.length;
}
/**
* set the length - 长.
*
* @param length - 长
*/
public void setLength(BigDecimal length) {
this.length = length;
}
/**
* get the width - 宽.
* @return the width
*/
public BigDecimal getWidth() {
return this.width;
}
/**
* set the width - 宽.
*
* @param width - 宽
*/
public void setWidth(BigDecimal width) {
this.width = width;
}
/**
* get the thick - 厚.
* @return the thick
*/
public BigDecimal getThick() {
return this.thick;
}
/**
* set the thick - 厚.
*
* @param thick - 厚
*/
public void setThick(BigDecimal thick) {
this.thick = thick;
}
/**
* 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 unitWeight - 单重.
* @return the unitWeight
*/
public BigDecimal getUnitWeight() {
return this.unitWeight;
}
/**
* set the unitWeight - 单重.
*
* @param unitWeight - 单重
*/
public void setUnitWeight(BigDecimal unitWeight) {
this.unitWeight = unitWeight;
}
/**
* 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 returnQuantity - 退货数量.
* @return the returnQuantity
*/
public BigDecimal getReturnQuantity() {
return this.returnQuantity;
}
/**
* set the returnQuantity - 退货数量.
*
* @param returnQuantity - 退货数量
*/
public void setReturnQuantity(BigDecimal returnQuantity) {
this.returnQuantity = returnQuantity;
}
/**
* get the returnWeight - 退货重量.
* @return the returnWeight
*/
public BigDecimal getReturnWeight() {
return this.returnWeight;
}
/**
* set the returnWeight - 退货重量.
*
* @param returnWeight - 退货重量
*/
public void setReturnWeight(BigDecimal returnWeight) {
this.returnWeight = returnWeight;
}
/**
* get the parentId - 销售退货ID.
* @return the parentId
*/
public Long getParentId() {
return this.parentId;
}
/**
* set the parentId - 销售退货ID.
*
* @param parentId - 销售退货ID
*/
public void setParentId(Long 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));
setInventRecordId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_INVENT_RECORD_ID)), inventRecordId));
setInventType(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_INVENT_TYPE)), inventType));
setInventCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_INVENT_CODE)), inventCode));
setInventName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_INVENT_NAME)), inventName));
setSpec(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_SPEC)), spec));
setLength(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_LENGTH)), length));
setWidth(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_WIDTH)), width));
setThick(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_THICK)), thick));
setQuantity(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_QUANTITY)), quantity));
setUnitWeight(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_UNIT_WEIGHT)), unitWeight));
setWeight(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_WEIGHT)), weight));
setReturnQuantity(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_RETURN_QUANTITY)), returnQuantity));
setReturnWeight(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_RETURN_WEIGHT)), returnWeight));
setParentId(NumberUtils.toLong(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_INVENT_RECORD_ID, StringUtils.toString(inventRecordId, eiMetadata.getMeta(FIELD_INVENT_RECORD_ID)));
map.put(FIELD_INVENT_TYPE, StringUtils.toString(inventType, eiMetadata.getMeta(FIELD_INVENT_TYPE)));
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_SPEC, StringUtils.toString(spec, eiMetadata.getMeta(FIELD_SPEC)));
map.put(FIELD_LENGTH, StringUtils.toString(length, eiMetadata.getMeta(FIELD_LENGTH)));
map.put(FIELD_WIDTH, StringUtils.toString(width, eiMetadata.getMeta(FIELD_WIDTH)));
map.put(FIELD_THICK, StringUtils.toString(thick, eiMetadata.getMeta(FIELD_THICK)));
map.put(FIELD_QUANTITY, StringUtils.toString(quantity, eiMetadata.getMeta(FIELD_QUANTITY)));
map.put(FIELD_UNIT_WEIGHT, StringUtils.toString(unitWeight, eiMetadata.getMeta(FIELD_UNIT_WEIGHT)));
map.put(FIELD_WEIGHT, StringUtils.toString(weight, eiMetadata.getMeta(FIELD_WEIGHT)));
map.put(FIELD_RETURN_QUANTITY, StringUtils.toString(returnQuantity, eiMetadata.getMeta(FIELD_RETURN_QUANTITY)));
map.put(FIELD_RETURN_WEIGHT, StringUtils.toString(returnWeight, eiMetadata.getMeta(FIELD_RETURN_WEIGHT)));
map.put(FIELD_PARENT_ID, StringUtils.toString(parentId, eiMetadata.getMeta(FIELD_PARENT_ID)));
return map;
}
}
......@@ -136,8 +136,8 @@ public class ServiceHGYX001 extends ServiceEPBase {
* 新增操作
*/
public void add(HGYX001 hgyx001) {
//生成工序编码
hgyx001.setDeliveryCode(SequenceGenerator.getNextSequence(HGConstant.SequenceId.PLAN_CODE));
//销售发货单号
hgyx001.setDeliveryCode(SequenceGenerator.getNextSequence(HGConstant.SequenceId.DELIVERY_CODE));
DaoUtils.insert(HGYX001.INSERT, hgyx001);
}
......@@ -188,6 +188,7 @@ public class ServiceHGYX001 extends ServiceEPBase {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
//List<Long> ids = ObjectUtils.listKey(resultRows, HGSC001.FIELD_id);
for (Map resultRow:resultRows) {
//销售出库单号
String outboundCode = SequenceGenerator.getNextSequence(HGConstant.SequenceId.SALE_OUT_CODE);
HGYX001 hgyx001 = new HGYX001();
hgyx001.fromMap(resultRow);
......
package com.baosight.hggp.hg.yx.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.hg.constant.HGConstant;
import com.baosight.hggp.hg.cw.tools.HGCWTools;
import com.baosight.hggp.hg.cw.vo.UserVO;
import com.baosight.hggp.hg.kc.domain.HGKC004;
import com.baosight.hggp.hg.kc.domain.HGKC004A;
import com.baosight.hggp.hg.yx.domain.HGYX002;
import com.baosight.hggp.hg.yx.domain.HGYX002A;
import com.baosight.hggp.hg.yx.tools.HGYXTools;
import com.baosight.hggp.util.AssertUtils;
import com.baosight.hggp.util.CommonMethod;
import com.baosight.hggp.util.DateUtils;
import com.baosight.hggp.util.LogUtils;
import com.baosight.hggp.util.contants.ACConstants;
import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.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 org.apache.commons.collections.CollectionUtils;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @author LiuYang
* @version 1.0 2024/6/7
*/
public class ServiceHGYX002 extends ServiceEPBase {
@Override
public EiInfo initLoad(EiInfo inInfo) {
EiInfo outInfo = super.initLoad(inInfo, EiConstant.resultBlock, new HGYX002());
UserVO userVO = HGCWTools.HgCw002.getUserCompany();
outInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGYX002.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
outInfo.getBlock(EiConstant.resultBlock).setBlockMeta(new HGYX002().eiMetadata);
CommonMethod.initBlock(outInfo, Arrays.asList(DdynamicEnum.COMPANY_BOX_BLOCK_ID,DdynamicEnum.PROJ_RECORD_BLOCK_ID,DdynamicEnum.WH_RECORD_BOX_BLOCK_ID,DdynamicEnum.CUSTOMER_RECORD_ALL_BLOCK_ID));
outInfo.set(HGYX002.FIELD_COMPANY_CODE, userVO.getUsercode());
return outInfo;
}
@Override
public EiInfo query(EiInfo inInfo) {
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGYX002.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
return super.query(inInfo,HGYX002.QUERY,new HGYX002());
}
/**
* 删除
* @param inInfo inInfo
* @return
*/
@OperationLogAnnotation(operModul = "销售退货",operType = "删除",operDesc = "删除操作")
@Override
public EiInfo delete(EiInfo inInfo) {
int i = 0;
try {
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
for (i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
HGYX002 hgyx002 = new HGYX002();
hgyx002.fromMap(map);
hgyx002.setDeleteFlag(CommonConstant.YesNo.YES_1);
if (hgyx002.getStatus()==1) {
throw new PlatException("已审核,无法删除!");
}
DaoUtils.update(HGYX002.DELETE_FLAG, hgyx002);
HGYX002A hgyx002A = new HGYX002A();
hgyx002A.setParentId(hgyx002.getId());
hgyx002A.setDeleteFlag(CommonConstant.YesNo.YES_1);
DaoUtils.update(HGYX002A.DELETE_BY_PARENT_ID, hgyx002A);
}
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsgByKey("ep.1000", new String[]{String.valueOf(i), I18nMessages.getText("label.delete", "删除")});
} catch (PlatException e) {
LogUtils.setMsg(inInfo, e,"删除失败");
}
return inInfo;
}
/**
* 保存操作
*/
@OperationLogAnnotation(operModul = "销售退货",operType = "保存",operDesc = "保存操作")
public EiInfo save(EiInfo inInfo) {
try {
List<Map> queryBlock = inInfo.getBlock(EiConstant.queryBlock).getRows();
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
for (Map queryRow:queryBlock) {
HGYX002 hgyx002 = new HGYX002();
hgyx002.fromMap(queryRow);
if (hgyx002.getId() == null || hgyx002.getId() == 0) {
this.add(hgyx002);
for (Map resultRow : resultRows) {
HGYX002A hgyx002A = new HGYX002A();
hgyx002A.fromMap(resultRow);
hgyx002A.setParentId(hgyx002.getId());
if (hgyx002A.getId() == null || hgyx002A.getId() == 0) {
this.addDatail(hgyx002A);
}
}
} else {
this.modify(hgyx002);
for (Map resultRow : resultRows) {
HGYX002A hgyx002A = new HGYX002A();
hgyx002A.fromMap(resultRow);
hgyx002A.setParentId(hgyx002.getId());
if (hgyx002A.getId() == null || hgyx002A.getId() == 0) {
this.addDatail(hgyx002A);
}else {
this.modifyDatail(hgyx002A);
}
}
}
}
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据保存成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "保存失败");
}
return inInfo;
}
/**
* 新增操作
*/
public void add(HGYX002 hgyx002) {
//销售退货单号
hgyx002.setReturnCode(SequenceGenerator.getNextSequence(HGConstant.SequenceId.RETURN_CODE));
DaoUtils.insert(HGYX002.INSERT, hgyx002);
}
public void addDatail(HGYX002A hgyx002A) {
//生成工序编码
//hgyx001A.setDeliveryCode(SequenceGenerator.getNextSequence(HGConstant.SequenceId.PLAN_CODE));
DaoUtils.insert(HGYX002A.INSERT, hgyx002A);
}
/**
* 修改操作
*/
public void modify(HGYX002 hgyx002) {
DaoUtils.update(HGYX002.UPDATE, hgyx002);
}
public void modifyDatail(HGYX002A hgyx002A) {
DaoUtils.update(HGYX002A.UPDATE, hgyx002A);
}
@OperationLogAnnotation(operModul = "销售退货", operType = "提交", operDesc = "提交")
public EiInfo commit(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
//List<Long> ids = ObjectUtils.listKey(resultRows, HGSC001.FIELD_id);
for (Map resultRow:resultRows) {
String outboundCode = SequenceGenerator.getNextSequence(HGConstant.SequenceId.SALE_OUT_CODE);
HGYX002 hgyx002 = new HGYX002();
hgyx002.fromMap(resultRow);
hgyx002.setStatus(1);
hgyx002.setOutboundCode(outboundCode);
/*销售出库*/
saveOutbound(resultRow, outboundCode);
DaoUtils.update(HGYX002.BATCH_COMMIT,hgyx002);
}
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据提交成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "操作失败");
}
return inInfo;
}
public void saveOutbound(Map resultRow, String outboundCode) {
// 写入数据
HGKC004 hgkc004 = new HGKC004();
String id = resultRow.get(HGYX002.FIELD_ID).toString();
hgkc004.setParentId(Long.parseLong(id));
hgkc004.setReceiptDate(DateUtils.formatShort(DateUtils.date()));
hgkc004.setCompanyCode(resultRow.get(HGYX002.FIELD_COMPANY_CODE).toString());
hgkc004.setCompanyName(resultRow.get(HGYX002.FIELD_COMPANY_NAME).toString());
hgkc004.setWhCode(resultRow.get(HGYX002.FIELD_CONS_WH_CODE).toString());
hgkc004.setWhName(resultRow.get(HGYX002.FIELD_CONS_WH_NAME).toString());
hgkc004.setSaleOutCode(outboundCode);
if (hgkc004.getId() == null || hgkc004.getId() == 0) {
this.add(hgkc004);
String parentId = resultRow.get(HGYX002.FIELD_ID).toString();
List<HGYX002A> hgyx002As = HGYXTools.Hgyx002.getParentId(Long.parseLong(parentId));
if (CollectionUtils.isEmpty(hgyx002As)){
throw new PlatException("销售退货详情不能为空!");
}
this.addDetail(hgyx002As, hgkc004.getId());
}
}
/**
* 新增销售退货
* @param hgkc004
*/
public void add(HGKC004 hgkc004) {
//生成工序编码
//hgkc004.setSaleOutCode(SequenceGenerator.getNextSequence(HGConstant.SequenceId.SALE_OUT_CODE));
//hgkc004.setReceiptDate(DateUtils.formatShort(DateUtils.date()));
DaoUtils.insert(HGKC004.INSERT, hgkc004);
}
/**
* 新增销售退货详情
*/
public void addDetail( List<HGYX002A> hgyx002As,Long parentId) {
for (HGYX002A hgyx002A : hgyx002As) {
HGKC004A hgkc004A = new HGKC004A();
hgkc004A.setInventType(hgyx002A.getInventType());
hgkc004A.setInventCode(hgyx002A.getInventCode());
hgkc004A.setInventName(hgyx002A.getInventName());
hgkc004A.setInventRecordId(hgyx002A.getInventRecordId());
hgkc004A.setSpec(hgyx002A.getSpec());
hgkc004A.setLength(hgyx002A.getLength());
hgkc004A.setThick(hgyx002A.getThick());
hgkc004A.setWidth(hgyx002A.getWidth());
hgkc004A.setQuantity(hgyx002A.getReturnQuantity());
hgkc004A.setUnitWeight(hgyx002A.getUnitWeight());
hgkc004A.setWeight(hgyx002A.getReturnWeight());
hgkc004A.setParentId(parentId);
DaoUtils.insert(HGKC004A.INSERT, hgkc004A);
}
}
@OperationLogAnnotation(operModul = "销售退货",operType = "保存并审核",operDesc = "保存操作")
public EiInfo saveStatus(EiInfo inInfo) {
try {
List<Map> queryBlock = inInfo.getBlock(EiConstant.queryBlock).getRows();
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
for (Map queryRow:queryBlock) {
HGYX002 hgyx002 = new HGYX002();
hgyx002.fromMap(queryRow);
hgyx002.setStatus(1);
String outboundCode = SequenceGenerator.getNextSequence(HGConstant.SequenceId.SALE_OUT_CODE);
if (hgyx002.getId() == null || hgyx002.getId() == 0) {
//String outboundCode = SequenceGenerator.getNextSequence(HGConstant.SequenceId.SALE_OUT_CODE);
//hgyx001.setOutboundCode(outboundCode);
this.add(hgyx002);
HGKC004 hgkc004 = new HGKC004();
hgkc004.setParentId(hgyx002.getId());
hgkc004.setReceiptDate(DateUtils.formatShort(DateUtils.date()));
hgkc004.setCompanyCode(hgyx002.getCompanyCode());
hgkc004.setCompanyName(hgyx002.getCompanyName());
hgkc004.setWhCode(hgyx002.getConsWhCode());
hgkc004.setWhName(hgyx002.getConsWhName());
hgkc004.setSaleOutCode(outboundCode);
DaoUtils.insert(HGKC004.INSERT, hgkc004);
for (Map resultRow : resultRows) {
HGYX002A hgyx002A = new HGYX002A();
hgyx002A.fromMap(resultRow);
hgyx002A.setParentId(hgyx002.getId());
if (hgyx002A.getId() == null || hgyx002A.getId() == 0) {
this.addDatail(hgyx002A);
HGKC004A hgkc004A = new HGKC004A();
hgkc004A.setInventType(hgyx002A.getInventType());
hgkc004A.setInventCode(hgyx002A.getInventCode());
hgkc004A.setInventName(hgyx002A.getInventName());
hgkc004A.setInventRecordId(hgyx002A.getInventRecordId());
hgkc004A.setSpec(hgyx002A.getSpec());
hgkc004A.setLength(hgyx002A.getLength());
hgkc004A.setThick(hgyx002A.getThick());
hgkc004A.setWidth(hgyx002A.getWidth());
hgkc004A.setQuantity(hgyx002A.getReturnQuantity());
hgkc004A.setUnitWeight(hgyx002A.getUnitWeight());
hgkc004A.setWeight(hgyx002A.getReturnWeight());
hgkc004A.setParentId(hgkc004.getId());
DaoUtils.insert(HGKC004A.INSERT, hgkc004A);
}
}
} else {
this.modify(hgyx002);
HGKC004 hgkc004 = new HGKC004();
hgkc004.setParentId(hgyx002.getId());
hgkc004.setReceiptDate(DateUtils.formatShort(DateUtils.date()));
hgkc004.setCompanyCode(hgyx002.getCompanyCode());
hgkc004.setCompanyName(hgyx002.getCompanyName());
hgkc004.setWhCode(hgyx002.getConsWhCode());
hgkc004.setWhName(hgyx002.getConsWhName());
hgkc004.setSaleOutCode(outboundCode);
DaoUtils.insert(HGKC004.INSERT, hgkc004);
for (Map resultRow : resultRows) {
HGYX002A hgyx002A = new HGYX002A();
hgyx002A.fromMap(resultRow);
hgyx002A.setParentId(hgyx002.getId());
if (hgyx002A.getId() == null || hgyx002A.getId() == 0) {
this.addDatail(hgyx002A);
}else {
this.modifyDatail(hgyx002A);
}
HGKC004A hgkc004A = new HGKC004A();
hgkc004A.setInventType(hgyx002A.getInventType());
hgkc004A.setInventCode(hgyx002A.getInventCode());
hgkc004A.setInventName(hgyx002A.getInventName());
hgkc004A.setInventRecordId(hgyx002A.getInventRecordId());
hgkc004A.setSpec(hgyx002A.getSpec());
hgkc004A.setLength(hgyx002A.getLength());
hgkc004A.setThick(hgyx002A.getThick());
hgkc004A.setWidth(hgyx002A.getWidth());
hgkc004A.setQuantity(hgyx002A.getReturnQuantity());
hgkc004A.setUnitWeight(hgyx002A.getUnitWeight());
hgkc004A.setWeight(hgyx002A.getReturnWeight());
hgkc004A.setParentId(hgkc004.getId());
DaoUtils.insert(HGKC004A.INSERT, hgkc004A);
}
}
}
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据保存成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "保存失败");
}
return inInfo;
}
}
package com.baosight.hggp.hg.yx.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.hg.cw.tools.HGCWTools;
import com.baosight.hggp.hg.cw.vo.UserVO;
import com.baosight.hggp.hg.kc.domain.HGKC013;
import com.baosight.hggp.hg.kc.domain.HGKC013A;
import com.baosight.hggp.hg.yx.domain.HGYX002;
import com.baosight.hggp.hg.yx.domain.HGYX002A;
import com.baosight.hggp.hg.yx.tools.HGYXTools;
import com.baosight.hggp.util.CommonMethod;
import com.baosight.hggp.util.LogUtils;
import com.baosight.hggp.util.contants.ACConstants;
import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.resource.I18nMessages;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
/**
* @author LiuYang
* @version 1.0 2024/6/7
*/
public class ServiceHGYX002A extends ServiceEPBase {
@Override
public EiInfo initLoad(EiInfo inInfo) {
String id = inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGYX002A.FIELD_PARENT_ID);
String type = inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0, "type");
EiInfo outInfo = super.initLoad(inInfo, new HGYX002A());
outInfo.getBlock(EiConstant.resultBlock).getRows().clear();
if (id != null) {
HGYX002 hgyx002 = HGYXTools.Hgyx002.getId(Long.valueOf(id));
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGYX002.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
outInfo = super.query(inInfo, HGYX002A.QUERY, new HGYX002A());
outInfo.getBlock(EiConstant.queryBlock).setRows(Collections.singletonList(hgyx002));
}
outInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, "type", type);
UserVO userVO = HGCWTools.HgCw002.getUserCompany();
outInfo.getBlock(EiConstant.resultBlock).setBlockMeta(new HGYX002A().eiMetadata);
CommonMethod.initBlock(outInfo,
Arrays.asList(
DdynamicEnum.COMPANY_BOX_BLOCK_ID,
DdynamicEnum.WH_RECORD_BOX_BLOCK_ID,
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),
new HashMap<String,Object>(){{
put(HGKC013.FIELD_COMPANY_CODE,userVO.getUsercode());
put(HGKC013A.FIELD_DELETE_FLAG,CommonConstant.YesNo.NO_0);
}}, false);
CommonMethod.initBlock(outInfo, Arrays.asList(DdynamicEnum.DELIVERY_CODE_BOX_BLOCK_ID),
new HashMap<String,Object>(){{
put(HGKC013.FIELD_COMPANY_CODE,userVO.getUsercode());
put(HGKC013A.FIELD_DELETE_FLAG,CommonConstant.YesNo.NO_0);
}
},false);
outInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0,HGYX002.FIELD_COMPANY_CODE, userVO.getUsercode());
outInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0,HGYX002.FIELD_COMPANY_NAME, userVO.getUsername());
//outInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0,HGYX002.FIELD_CONS_CODE, userVO.getUsercode());
//outInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0,HGYX002.FIELD_CONS_NAME, userVO.getUsername());
return outInfo;
}
@Override
public EiInfo query(EiInfo inInfo) {
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGYX002.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
return super.query(inInfo,HGYX002A.QUERY,new HGYX002A());
}
@OperationLogAnnotation(operModul = "销售退货详情",operType = "删除",operDesc = "删除操作")
@Override
public EiInfo delete(EiInfo inInfo) {
int i = 0;
try {
String status = inInfo.getCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGYX002.FIELD_STATUS).toString();
if ("1".equals(status)) {
String str = "已审核,无法删除!";
throw new PlatException(str);
}
HGYX002A hgyx002A = new HGYX002A();
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
for (i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
hgyx002A.fromMap(map);
hgyx002A.setDeleteFlag(CommonConstant.YesNo.YES_1);
DaoUtils.update(HGYX002A.DELETE_FLAG, hgyx002A);
}
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsgByKey("ep.1000", new String[]{String.valueOf(i), I18nMessages.getText("label.delete", "删除")});
} catch (PlatException e) {
LogUtils.setMsg(inInfo, e,"删除失败");
}
return inInfo;
}
}
package com.baosight.hggp.hg.yx.service;
import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.hg.cw.tools.HGCWTools;
import com.baosight.hggp.hg.cw.vo.UserVO;
import com.baosight.hggp.hg.kc.domain.HGKC013;
import com.baosight.hggp.hg.kc.domain.HGKC013A;
import com.baosight.hggp.hg.yx.domain.HGYX002;
import com.baosight.hggp.hg.yx.domain.HGYX002A;
import com.baosight.hggp.hg.yx.tools.HGYXTools;
import com.baosight.hggp.util.CommonMethod;
import com.baosight.hggp.util.StringUtils;
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.Collections;
import java.util.HashMap;
/**
* @author LiuYang
* @version 1.0 2024/6/7
*/
public class ServiceHGYX002B extends ServiceEPBase {
@Override
public EiInfo initLoad(EiInfo inInfo) {
String id = inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGYX002A.FIELD_PARENT_ID);
EiInfo outInfo = super.initLoad(inInfo, new HGYX002A());
outInfo.getBlock(EiConstant.resultBlock).getRows().clear();
if (id != null) {
HGYX002 hgyx002 = HGYXTools.Hgyx002.getId(Long.valueOf(id));
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGYX002.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
outInfo = super.query(inInfo, HGYX002A.QUERY, new HGYX002A());
outInfo.getBlock(EiConstant.queryBlock).setRows(Collections.singletonList(hgyx002));
}
UserVO userVO = HGCWTools.HgCw002.getUserCompany();
outInfo.getBlock(EiConstant.resultBlock).setBlockMeta(new HGYX002A().eiMetadata);
CommonMethod.initBlock(outInfo,
Arrays.asList(
DdynamicEnum.COMPANY_BOX_BLOCK_ID,
DdynamicEnum.WH_RECORD_BOX_BLOCK_ID,
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),
new HashMap<String,Object>(){{
put(HGKC013.FIELD_COMPANY_CODE,userVO.getUsercode());
put(HGKC013A.FIELD_DELETE_FLAG,CommonConstant.YesNo.NO_0);
}}, false);
outInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0,HGYX002.FIELD_COMPANY_CODE, userVO.getUsercode());
outInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0,HGYX002.FIELD_COMPANY_NAME, userVO.getUsername());
outInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0,HGYX002.FIELD_CONS_CODE, userVO.getUsercode());
outInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0,HGYX002.FIELD_CONS_NAME, userVO.getUsername());
return outInfo;
}
@Override
public EiInfo query(EiInfo inInfo) {
String id = inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGYX002A.FIELD_ID);
inInfo.getBlock(EiConstant.queryBlock).getRows().clear();
if (StringUtils.isNotEmpty(id)) {
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGYX002A.FIELD_PARENT_ID, id);
}
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGYX002.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
return super.query(inInfo,HGYX002A.QUERY,new HGYX002A());
}
}
package com.baosight.hggp.hg.yx.service;
import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.hg.yx.domain.HGYX001;
import com.baosight.hggp.hg.yx.domain.HGYX001A;
import com.baosight.hggp.hg.yx.domain.HGYX001C;
import com.baosight.hggp.hg.yx.tools.HGYXTools;
import com.baosight.hggp.util.AssertUtils;
import com.baosight.hggp.util.CommonMethod;
import com.baosight.hggp.util.MapUtils;
import com.baosight.hggp.util.StringUtils;
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;
import java.util.Map;
/**
* @author LiuYang
* @version 1.0 2024/6/7
*/
public class ServiceHGYX002C extends ServiceEPBase {
@Override
public EiInfo initLoad(EiInfo inInfo) {
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGYX001C.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
String ids = inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0, "ids");
String parentId = inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGYX001A.FIELD_PARENT_ID);
if (StringUtils.isNotEmpty(ids)) {
String[] idArray = ids.split(",");
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, "ids", idArray);
}
if (StringUtils.isEmpty(parentId)){
Map params = new HashMap<>();
params.put(HGYX001.FIELD_DELIVERY_CODE, inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGYX001.FIELD_DELIVERY_CODE));
params.put(HGYX001.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
List<HGYX001> hgYx001s = HGYXTools.Hgyx001.list(params);
AssertUtils.isEmpty(hgYx001s, "未找到对应发货单号");
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGYX001.FIELD_DELIVERY_CODE, hgYx001s.get(0).getDeliveryCode());
}
inInfo = super.query(inInfo, HGYX001A.QUERY, new HGYX001A());
CommonMethod.initBlock(inInfo,
Arrays.asList(
DdynamicEnum.INVENT_TYPE_BLOCK_ID,
DdynamicEnum.INVENT_RECORD_BLOCK_ID,
DdynamicEnum.SPEC_NAME_BLOCK_ID));
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGYX001A().eiMetadata);
return inInfo;
}
@Override
public EiInfo query(EiInfo inInfo) {
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGYX001.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
return super.query(inInfo, HGYX001C.QUERY,new HGYX001C());
}
}
......@@ -379,4 +379,15 @@
ID = #id#
</update>
<select id="queryReturnCodeBox" parameterClass="java.util.HashMap" resultClass="java.util.HashMap">
SELECT DISTINCT
ID as "id",
PROJ_NAME as "projName", <!-- 项目名称 -->
DELIVERY_CODE as "deliveryCode" <!-- 发货单号 -->
FROM
${hggpSchema}.HGYX001
WHERE DELETE_FLAG = 0 AND STATUS = 1
<include refid="condition" />
</select>
</sqlMap>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-2.dtd"> <!-- table information
Generate time : 2024-06-07 14:37:36
Version : 1.0
schema : hggp
tableName : HGYX002
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,
RETURN_CODE VARCHAR,
DELIVERY_CODE VARCHAR,
CONS_CODE VARCHAR,
CONS_NAME VARCHAR,
CONS_ADDR VARCHAR,
RECE_CODE VARCHAR,
RECE_NAME VARCHAR,
RECE_USER_PHONE VARCHAR,
RETURN_QUANTITY DECIMAL,
RETURN_WEIGHT DECIMAL,
REMARKS VARCHAR,
STATUS TINYINT
-->
<sqlMap namespace="HGYX002">
<typeAlias alias="HGYX002" type="com.baosight.hggp.hg.yx.domain.HGYX002"/>
<typeAlias alias="HashMap" type="java.util.HashMap"/>
<sql id="column">
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", <!-- 项目名称 -->
RETURN_CODE as "returnCode", <!-- 退货单号 -->
DELIVERY_CODE as "deliveryCode", <!-- 发货单号 -->
OUTBOUND_CODE as "outboundCode", <!-- 出库单号 -->
CONS_CODE as "consCode", <!-- 发货方编码 -->
CONS_NAME as "consName", <!-- 发货方名称 -->
CONS_WH_CODE as "consWhCode", <!-- 发货仓库编码 -->
CONS_WH_NAME as "consWhName", <!-- 发货仓库名称 -->
CONS_ADDR as "consAddr", <!-- 发货地址 -->
RECE_CODE as "receCode", <!-- 收货方编码 -->
RECE_NAME as "receName", <!-- 收货方名称 -->
RECE_USER_PHONE as "receUserPhone", <!-- 收货人电话 -->
RETURN_QUANTITY as "returnQuantity", <!-- 退货数量 -->
RETURN_WEIGHT as "returnWeight", <!-- 退货重量 -->
REMARKS as "remarks", <!-- 退货原因 -->
STATUS as "status" <!-- 审批状态 0-未审核,1-已审核 -->
</sql>
<sql id="condition">
<include refid="HGXSDataAuth.authCondition"/>
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="accountCode">
ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="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 LIKE CONCAT('%',#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="returnCode">
RETURN_CODE LIKE CONCAT('%',#returnCode#,'%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deliveryCode">
DELIVERY_CODE LIKE CONCAT('%',#deliveryCode#,'%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="consCode">
CONS_CODE = #consCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="consName">
CONS_NAME LIKE CONCAT('%',#consName#,'%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="consWhCode">
CONS_WH_CODE = #consWhCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="consWhName">
CONS_WH_NAME LIKE CONCAT('%',#consWhName#,'%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="consAddr">
CONS_ADDR = #consAddr#
</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="receUserPhone">
RECE_USER_PHONE = #receUserPhone#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="returnQuantity">
RETURN_QUANTITY = #returnQuantity#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="returnWeight">
RETURN_WEIGHT = #returnWeight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="remarks">
REMARKS = #remarks#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="status">
STATUS = #status#
</isNotEmpty>
</sql>
<select id="query" parameterClass="HashMap" resultClass="HGYX002">
SELECT
<include refid="column" />
FROM ${hggpSchema}.HGYX002 WHERE 1=1
<include refid="condition" />
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
CREATED_TIME desc, ID asc
</isEmpty>
</dynamic>
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hggpSchema}.HGYX002 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="returnCode">
RETURN_CODE = #returnCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deliveryCode">
DELIVERY_CODE = #deliveryCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="consCode">
CONS_CODE = #consCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="consName">
CONS_NAME = #consName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="consAddr">
CONS_ADDR = #consAddr#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="receCode">
RECE_CODE = #receCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="receName">
RECE_NAME = #receName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="receUserPhone">
RECE_USER_PHONE = #receUserPhone#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="returnQuantity">
RETURN_QUANTITY = #returnQuantity#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="returnWeight">
RETURN_WEIGHT = #returnWeight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="remarks">
REMARKS = #remarks#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="status">
STATUS = #status#
</isNotEmpty>
-->
<insert id="insert">
INSERT INTO ${hggpSchema}.HGYX002 (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, <!-- 项目名称 -->
RETURN_CODE, <!-- 退货单号 -->
DELIVERY_CODE, <!-- 发货单号 -->
OUTBOUND_CODE, <!-- 出库单号 -->
CONS_CODE, <!-- 发货方编码 -->
CONS_NAME, <!-- 发货方名称 -->
CONS_WH_CODE, <!-- 发货仓库编码 -->
CONS_WH_NAME, <!-- 发货仓库名称 -->
CONS_ADDR, <!-- 发货地址 -->
RECE_CODE, <!-- 收货方编码 -->
RECE_NAME, <!-- 收货方名称 -->
RECE_USER_PHONE, <!-- 收货人电话 -->
RETURN_QUANTITY, <!-- 退货数量 -->
RETURN_WEIGHT, <!-- 退货重量 -->
REMARKS, <!-- 退货原因 -->
STATUS <!-- 审批状态 0-未审核,1-已审核 -->
)
VALUES (#id#, #accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #deleteFlag#, #companyCode#, #companyName#, #projCode#, #projName#, #returnCode#, #deliveryCode#, #outboundCode#, #consCode#, #consName#, #consWhCode#, #consWhName#, #consAddr#, #receCode#, #receName#, #receUserPhone#, #returnQuantity#, #returnWeight#, #remarks#, #status#)
<selectKey resultClass="long" keyProperty="id">
SELECT MAX(ID) AS "id" FROM ${hggpSchema}.HGYX002
</selectKey>
</insert>
<delete id="delete">
DELETE FROM ${hggpSchema}.HGYX002 WHERE
ID = #id#
</delete>
<update id="deleteFlag">
UPDATE ${hggpSchema}.HGYX002
SET
UPDATED_BY = #updatedBy#, <!-- 记录修改者 -->
UPDATED_NAME = #updatedName#, <!-- 记录修改名称 -->
UPDATED_TIME = #updatedTime#, <!-- 记录修改时间 -->
DELETE_FLAG = #deleteFlag# <!-- 0-未删除,1-已删除 -->
WHERE
ID = #id#
</update>
<update id="update">
UPDATE ${hggpSchema}.HGYX002
SET
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#, <!-- 项目名称 -->
RETURN_CODE = #returnCode#, <!-- 退货单号 -->
DELIVERY_CODE = #deliveryCode#, <!-- 发货单号 -->
OUTBOUND_CODE = #outboundCode#,
CONS_CODE = #consCode#, <!-- 发货方编码 -->
CONS_NAME = #consName#, <!-- 发货方名称 -->
CONS_WH_CODE = #consWhCode#, <!-- 发货仓库编码 -->
CONS_WH_NAME = #consWhName#, <!-- 发货仓库名称 -->
CONS_ADDR = #consAddr#, <!-- 发货地址 -->
RECE_CODE = #receCode#, <!-- 收货方编码 -->
RECE_NAME = #receName#, <!-- 收货方名称 -->
RECE_USER_PHONE = #receUserPhone#, <!-- 收货人电话 -->
RETURN_QUANTITY = #returnQuantity#, <!-- 退货数量 -->
RETURN_WEIGHT = #returnWeight#, <!-- 退货重量 -->
REMARKS = #remarks#, <!-- 退货原因 -->
STATUS = #status# <!-- 审批状态 0-未审核,1-已审核 -->
WHERE
ID = #id#
</update>
<update id="batchCommit">
UPDATE ${hggpSchema}.HGYX002
SET
OUTBOUND_CODE = #outboundCode#, <!-- 出库单号 -->
STATUS = #status#, <!-- 审批状态 0-未审核,1-已审核 -->
UPDATED_BY = #updatedBy#, <!-- 记录修改者 -->
UPDATED_NAME = #updatedName#, <!-- 记录修改名称 -->
UPDATED_TIME = #updatedTime# <!-- 记录修改时间 -->
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-06-07 14:37:36
Version : 1.0
schema : hggp
tableName : HGYX002A
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,
INVENT_RECORD_ID BIGINT,
INVENT_TYPE VARCHAR,
INVENT_CODE VARCHAR NOT NULL,
INVENT_NAME VARCHAR NOT NULL,
SPEC VARCHAR,
LENGTH DECIMAL,
WIDTH DECIMAL,
THICK DECIMAL,
QUANTITY DECIMAL,
UNIT_WEIGHT DECIMAL,
WEIGHT DECIMAL,
RETURN_QUANTITY DECIMAL,
RETURN_WEIGHT DECIMAL,
PARENT_ID BIGINT
-->
<sqlMap namespace="HGYX002A">
<typeAlias alias="HGYX002A" type="com.baosight.hggp.hg.yx.domain.HGYX002A"/>
<typeAlias alias="HashMap" type="java.util.HashMap"/>
<sql id="column">
ID as "id", <!-- 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-已删除 -->
INVENT_RECORD_ID as "inventRecordId", <!-- 存货档案id -->
INVENT_TYPE as "inventType", <!-- 存货类型 -->
INVENT_CODE as "inventCode", <!-- 存货编码 -->
INVENT_NAME as "inventName", <!-- 存货名称 -->
SPEC as "spec", <!-- 规格 -->
LENGTH as "length", <!-- 长 -->
WIDTH as "width", <!-- 宽 -->
THICK as "thick", <!-- 厚 -->
QUANTITY as "quantity", <!-- 发货数量 -->
UNIT_WEIGHT as "unitWeight", <!-- 单重 -->
WEIGHT as "weight", <!-- 发货重量 -->
RETURN_QUANTITY as "returnQuantity", <!-- 退货数量 -->
RETURN_WEIGHT as "returnWeight", <!-- 退货重量 -->
PARENT_ID as "parentId" <!-- 销售退货ID -->
</sql>
<sql id="condition">
<include refid="HGXSDataAuth.authCondition"/>
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="accountCode">
ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="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="inventRecordId">
INVENT_RECORD_ID = #inventRecordId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventType">
INVENT_TYPE = #inventType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventCode">
INVENT_CODE = #inventCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventName">
INVENT_NAME = #inventName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="spec">
SPEC = #spec#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="length">
LENGTH = #length#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="width">
WIDTH = #width#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="thick">
THICK = #thick#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="quantity">
QUANTITY = #quantity#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="unitWeight">
UNIT_WEIGHT = #unitWeight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="weight">
WEIGHT = #weight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="returnQuantity">
RETURN_QUANTITY = #returnQuantity#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="returnWeight">
RETURN_WEIGHT = #returnWeight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="parentId">
PARENT_ID = #parentId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="ids">
ID IN <iterate close=")" open="(" conjunction="," property="ids">#ids[]#</iterate>
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventRecordIds">
INVENT_RECORD_ID NOT IN <iterate close=")" open="(" conjunction="," property="inventRecordIds">#inventRecordIds[]#</iterate>
</isNotEmpty>
</sql>
<select id="query" parameterClass="HashMap" resultClass="HGYX002A">
SELECT
<include refid="column" />
FROM ${hggpSchema}.HGYX002A WHERE 1=1
<include refid="condition" />
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
CREATED_TIME desc, ID asc
</isEmpty>
</dynamic>
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hggpSchema}.HGYX002A 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="inventRecordId">
INVENT_RECORD_ID = #inventRecordId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventType">
INVENT_TYPE = #inventType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventCode">
INVENT_CODE = #inventCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventName">
INVENT_NAME = #inventName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="spec">
SPEC = #spec#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="length">
LENGTH = #length#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="width">
WIDTH = #width#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="thick">
THICK = #thick#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="quantity">
QUANTITY = #quantity#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="unitWeight">
UNIT_WEIGHT = #unitWeight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="weight">
WEIGHT = #weight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="returnQuantity">
RETURN_QUANTITY = #returnQuantity#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="returnWeight">
RETURN_WEIGHT = #returnWeight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="parentId">
PARENT_ID = #parentId#
</isNotEmpty>
-->
<insert id="insert">
INSERT INTO ${hggpSchema}.HGYX002A (ID, <!-- ID -->
ACCOUNT_CODE, <!-- 企业编码 -->
DEP_CODE, <!-- 部门编码 -->
CREATED_BY, <!-- 记录创建者 -->
CREATED_NAME, <!-- 记录创建名称 -->
CREATED_TIME, <!-- 记录创建时间 -->
UPDATED_BY, <!-- 记录修改者 -->
UPDATED_NAME, <!-- 记录修改名称 -->
UPDATED_TIME, <!-- 记录修改时间 -->
DELETE_FLAG, <!-- 0-未删除,1-已删除 -->
INVENT_RECORD_ID, <!-- 存货档案id -->
INVENT_TYPE, <!-- 存货类型 -->
INVENT_CODE, <!-- 存货编码 -->
INVENT_NAME, <!-- 存货名称 -->
SPEC, <!-- 规格 -->
LENGTH, <!-- 长 -->
WIDTH, <!-- 宽 -->
THICK, <!-- 厚 -->
QUANTITY, <!-- 发货数量 -->
UNIT_WEIGHT, <!-- 单重 -->
WEIGHT, <!-- 发货重量 -->
RETURN_QUANTITY, <!-- 退货数量 -->
RETURN_WEIGHT, <!-- 退货重量 -->
PARENT_ID <!-- 销售退货ID -->
)
VALUES (#id#, #accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #deleteFlag#, #inventRecordId#, #inventType#, #inventCode#, #inventName#, #spec#, #length#, #width#, #thick#, #quantity#, #unitWeight#, #weight#, #returnQuantity#, #returnWeight#, #parentId#)
</insert>
<delete id="delete">
DELETE FROM ${hggpSchema}.HGYX002A WHERE
ID = #id#
</delete>
<update id="update">
UPDATE ${hggpSchema}.HGYX002A
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-已删除 -->
INVENT_RECORD_ID = #inventRecordId#, <!-- 存货档案id -->
INVENT_TYPE = #inventType#, <!-- 存货类型 -->
INVENT_CODE = #inventCode#, <!-- 存货编码 -->
INVENT_NAME = #inventName#, <!-- 存货名称 -->
SPEC = #spec#, <!-- 规格 -->
LENGTH = #length#, <!-- 长 -->
WIDTH = #width#, <!-- 宽 -->
THICK = #thick#, <!-- 厚 -->
QUANTITY = #quantity#, <!-- 发货数量 -->
UNIT_WEIGHT = #unitWeight#, <!-- 单重 -->
WEIGHT = #weight#, <!-- 发货重量 -->
RETURN_QUANTITY = #returnQuantity#, <!-- 退货数量 -->
RETURN_WEIGHT = #returnWeight#, <!-- 退货重量 -->
PARENT_ID = #parentId# <!-- 销售退货ID -->
WHERE
ID = #id#
</update>
<update id="deleteFlag">
UPDATE ${hggpSchema}.HGYX002A
SET
UPDATED_BY = #updatedBy#, <!-- 记录修改者 -->
UPDATED_NAME = #updatedName#, <!-- 记录修改名称 -->
UPDATED_TIME = #updatedTime#, <!-- 记录修改时间 -->
DELETE_FLAG = #deleteFlag# <!-- 0-未删除,1-已删除 -->
WHERE ID = #id#
</update>
<update id="deleteByParentId">
UPDATE ${hggpSchema}.HGYX002A
SET
UPDATED_BY = #updatedBy#, <!-- 记录修改者 -->
UPDATED_NAME = #updatedName#, <!-- 记录修改名称 -->
UPDATED_TIME = #updatedTime#, <!-- 记录修改时间 -->
DELETE_FLAG = #deleteFlag# <!-- 0-未删除,1-已删除 -->
WHERE PARENT_ID = #parentId#
</update>
</sqlMap>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://www.ibatis.com/dtd/sql-map-2.dtd">
<sqlMap namespace="HGYX002A">
<typeAlias alias="HGYX002A" type="com.baosight.hggp.hg.yx.domain.HGYX002A"/>
<sql id="column">
ID as "id", <!-- 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-已删除 -->
INVENT_RECORD_ID as "inventRecordId", <!-- 存货档案id -->
INVENT_TYPE as "inventType", <!-- 存货类型 -->
INVENT_CODE as "inventCode", <!-- 存货编码 -->
INVENT_NAME as "inventName", <!-- 存货名称 -->
SPEC as "spec", <!-- 规格 -->
LENGTH as "length", <!-- 长 -->
WIDTH as "width", <!-- 宽 -->
THICK as "thick", <!-- 厚 -->
QUANTITY as "quantity", <!-- 发货数量 -->
UNIT_WEIGHT as "unitWeight", <!-- 单重 -->
WEIGHT as "weight", <!-- 发货重量 -->
'0' as "returnQuantity", <!-- 退货数量 -->
'0' as "returnWeight", <!-- 退货重量 -->
PARENT_ID as "parentId" <!-- 销售退货ID -->
</sql>
<sql id="condition">
<include refid="HGXSDataAuth.authCondition"/>
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="accountCode">
ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="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="inventRecordId">
INVENT_RECORD_ID = #inventRecordId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventType">
INVENT_TYPE = #inventType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventCode">
INVENT_CODE = #inventCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventName">
INVENT_NAME = #inventName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="spec">
SPEC = #spec#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="length">
LENGTH = #length#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="width">
WIDTH = #width#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="thick">
THICK = #thick#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="quantity">
QUANTITY = #quantity#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="weight">
WEIGHT = #weight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="parentId">
PARENT_ID = #parentId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventRecordIds">
INVENT_RECORD_ID NOT IN <iterate close=")" open="(" conjunction="," property="inventRecordIds">#inventRecordIds[]#</iterate>
</isNotEmpty>
<isNotEmpty prepend=" AND " property="ids">
ID IN <iterate close=")" open="(" conjunction="," property="ids">#ids[]#</iterate>
</isNotEmpty>
</sql>
<select id="query" parameterClass="java.util.HashMap" resultClass="HGYX001A">
SELECT
<include refid="column" />
FROM ${hggpSchema}.HGYX001A WHERE 1=1
<include refid="condition" />
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
CREATED_TIME desc, ID asc
</isEmpty>
</dynamic>
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hggpSchema}.HGYX001A WHERE 1=1
<include refid="condition" />
</select>
</sqlMap>
\ No newline at end of file
......@@ -4,6 +4,8 @@ import com.baosight.hggp.core.dao.DaoBase;
import com.baosight.hggp.hg.sj.domain.HGSJ001;
import com.baosight.hggp.hg.yx.domain.HGYX001;
import com.baosight.hggp.hg.yx.domain.HGYX001A;
import com.baosight.hggp.hg.yx.domain.HGYX002;
import com.baosight.hggp.hg.yx.domain.HGYX002A;
import com.baosight.hggp.util.AssertUtils;
import com.baosight.hggp.util.MapUtils;
import org.apache.commons.collections.CollectionUtils;
......@@ -56,4 +58,41 @@ public class HGYXTools {
return hgyx001As;
}
}
public static class Hgyx002 {
public static HGYX002 getId(Long id){
HGYX002 hgyx002 = new HGYX002();
AssertUtils.isNull(id, "销售退货ID不能为空!");
Object object = DaoBase.getInstance().get(HGYX002.QUERY,HGYX002.FIELD_ID, id);
AssertUtils.isNull(object, "销售退货不存在!");
hgyx002.fromMap(MapUtils.toMap(object));
return hgyx002;
}
public static List<HGYX002> list(Map params){
List<HGYX002> hgyx002s = DaoBase.getInstance().query(HGYX002.QUERY, params);
AssertUtils.isNull(hgyx002s, "销售退货不存在!");
return hgyx002s;
}
public static List<HGYX001> list(List<Long> ids){
AssertUtils.isNull(ids, "销售退货ID不能为空!");
Map params = new HashMap<>();
params.put("ids", ids);
List<HGYX001> hgyx001s = DaoBase.getInstance().query(HGYX001.QUERY, params);
AssertUtils.isEmpty(hgyx001s, "销售退货不存在!");
return hgyx001s;
}
public static List<HGYX002A> getParentId(Long parentId){
AssertUtils.isNull(parentId, "销售退货ID不能为空!");
Map params = new HashMap<>();
params.put("parentId", parentId);
List<HGYX002A> hgyx002As = DaoBase.getInstance().query(HGYX002A.QUERY, params);
AssertUtils.isEmpty(hgyx002As, "销售退货明细不存在!");
return hgyx002As;
}
}
}
......@@ -75,5 +75,7 @@
<sqlMap resource="com/baosight/hggp/hg/yx/sql/HGYX001.xml"/>
<sqlMap resource="com/baosight/hggp/hg/yx/sql/HGYX001A.xml"/>
<sqlMap resource="com/baosight/hggp/hg/yx/sql/HGYX001C.xml"/>
<sqlMap resource="com/baosight/hggp/hg/yx/sql/HGYX002.xml"/>
<sqlMap resource="com/baosight/hggp/hg/yx/sql/HGYX002A.xml"/>
</sqlMapConfig>
......@@ -262,7 +262,7 @@ function remove() {
let flag = true;
$.each(rows, function(index, item) {
if(item.status > 0){
message2("审核","销售出库已审核不可删除!");
message2("审核","销售发货已审核不可删除!");
flag = false;
return false;
}
......
......@@ -76,7 +76,7 @@
<EF:EFColumn ename="consAddr" cname="发货地址" hidden="true" width="120" align="center"/>
<EF:EFColumn ename="consQuantity" cname="发货数量" width="120" align="center" format="{0:N0}" data-rules="number"/>
<EF:EFColumn ename="consWeight" cname="发货重量" width="120" align="center" format="{0:N3}" data-rules="number"/>
<EF:EFComboColumn ename="status" cname="审状态" width="80" align="center" enable="false" defaultValue="0" required="true">
<EF:EFComboColumn ename="status" cname="审状态" width="80" align="center" enable="false" defaultValue="0" required="true">
<EF:EFCodeOption codeName="hggp.hgsb.approveStatus" condition="ITEM_CODE IN ('0','1')"/>
</EF:EFComboColumn>
</EF:EFGrid>
......
$(function () {
$(".row").children().attr("class", "col-md-3");
var companyCode = __eiInfo.get("companyCode");
var companyCodeBox = __eiInfo.getBlock("companyBox_block_id").getMappedRows();
var whCodeBox = __eiInfo.getBlock("wh_record_box_block_id").getMappedRows();
IPLATUI.EFGrid = {
"result": {
columns: [{
field: "operator",
title: "操作",
template: function (item) {
let auditStatus = item.status;
let template = '';
if (!isBlank(item.id)){
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="showDetail(' + item.id + ')" >退货详情</a>';
/*if (auditStatus == 0) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' +
'onclick="updateStatus(' + item.id + ',1)" >审核</a>';
} else if (auditStatus == -1) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' +
'onclick="updateStatus(' + item.id + ',0)" >撤回</a>';
}*/
}
return template;
}
}],
loadComplete: function (grid) {
// 此 grid 对象
// 新增
$("#add").on("click",add);
//修改
$("#BNT_MODIFY").on("click", update);
//删除
$("#BNT_REMOVE").on("click", remove);
//提交
$("#BNT_COMMIT").on("click", commit);
},
onAdd: function(e) {
e.preventDefault();
},
onSave: function (e) {
// 阻止后台保存请求,使用自定义保存
e.preventDefault();
save();
},
onSuccess: function (e) {
if(e.eiInfo.extAttr.methodName == 'delete' ||e.eiInfo.extAttr.methodName == 'save'){
query();
}
}
},
}
// 查询
$("#QUERY").on("click", query);
downKeyUp();
// 导出打印
//$("#PRINT").on("click", exportPrint);
});
/**
* 页面加载时执行
*/
$(window).load(function () {
// 查询
query();
});
/**
* 查询
*/
let query = function () {
resultGrid.dataSource.page(1);
}
/**
* 显示详情
*/
function showDetail(id) {
JSColorbox.open({
href: "HGYX002B?methodName=initLoad&inqu_status-0-parentId=" + id+"&inqu_status-0-type=insert",
title: "<div style='text-align: center;'>退货详情</div>",
width: "80%",
height: "80%",
callbackName: windowCallback
});
}
function add() {
JSColorbox.open({
href: "HGYX002A?methodName=initLoad",
title: "<div style='text-align: center;'>新增销售退货</div>",
width: "80%",
height: "80%",
callbackName: windowCallback
});
}
function update() {
let rows = resultGrid.getCheckedRows()
if (rows.length < 1||rows.length > 1) {
message2("修改","请选择一条需要修改的数据");
return;
}
if(rows[0].status>0){
message2("修改","销售发货已审核不可修改!");
return;
}
let id = rows[0].id;
JSColorbox.open({
href: "HGYX002A??methodName=initLoad&inqu_status-0-parentId=" + id + "&inqu_status-0-type=update&efParentFormEname=HGYX002",
title: "<div style='text-align: center;'>修改销售退货</div>",
width: "80%",
height: "80%",
callbackName: windowCallback
});
}
function remove() {
let rows = resultGrid.getCheckedRows()
if (rows.length < 1) {
message2("删除","没有选中的行");
return;
}
let flag = true;
$.each(rows, function(index, item) {
if(item.status > 0){
message2("审核","销售退货已审核不可删除!");
flag = false;
return false;
}
});
if(flag) {
IPLAT.confirm({ title: '删除', message: '确认删除此数据么?',
okFn: function () {
var post = new EiInfo();
post.addBlock(resultGrid.getCheckedBlockData());
EiCommunicator.send("HGYX002", "delete", post, {
onSuccess: function (ei) {
if (ei.getStatus() >= 0) {
NotificationUtil(ei);
resultGrid.dataSource.query();
} else {
NotificationUtil(ei, "error");
}
},
onFail: function (ei) {
// 发生异常
NotificationUtil("操作失败,原因[" + ei + "]", "error");
}
});
}
});
}
}
function commit() {
let rows = resultGrid.getCheckedRows()
if (rows.length < 1) {
message2("提交","没有选中的行");
return;
}
let flag = true;
$.each(rows, function(index, item) {
//let companyCode= item.get("companyCode");
let status= item.get("status");
if(status > 0){
message2("提交","销售退货已审核不可重复提交!");
flag = false;
return false;
}
});
if (flag){
IPLAT.confirm({
title:'提交',
message:'确认提交此数据么?',
okFn:function () {
var post = new EiInfo();
post.addBlock(resultGrid.getCheckedBlockData());
post.set("recursion", true);
EiCommunicator.send("HGYX002","commit",post,{
onSuccess: function (ei) {
if (ei.getStatus() >= 0) {
NotificationUtil(ei);
resultGrid.dataSource.query();
} else {
NotificationUtil(ei, "error");
}
},
onFail: function (ei) {
// 发生异常
NotificationUtil("操作失败,原因[" + ei + "]", "error");
}
});
}
})
}
}
function windowCallback(ei) {
if (ei.getStatus() >= 0) {
// 刷新列表
resultGrid.dataSource.page(1);
// 关闭弹窗
JSColorbox.close();
}
}
\ No newline at end of file
<%--
Created by IntelliJ IDEA.
User: 1
Date: 2024/6/7
Time: 15:28
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:EFInput blockId="inqu_status" row="0" ename="projName" cname="项目名称" placeholder="模糊查询" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="returnCode" 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="consName" cname="发货方" placeholder="模糊查询" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="receName" cname="收货方" placeholder="模糊查询" colWidth="3"/>
<EF:EFSelect blockId="inqu_status" row="0" ename="status" cname="审核状态" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hggp.hgsb.approveStatus" condition="ITEM_CODE IN ('0','1')"/>
</EF:EFSelect>
<EF:EFInput blockId="inqu_status" row="0" ename="companyCode" cname="所属公司" placeholder="模糊查询" type="hidden" colWidth="3"/>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="row" copyToAdd="false">
<EF:EFColumn ename="id" cname="内码" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="120" align="center"/>
<EF:EFComboColumn ename="projCode" enable="true" cname="项目名称" width="110" align="center"
filter="contains" readonly="true" required="true">
<EF:EFOptions blockId="proj_record_block_id" valueField="valueField" textField="textField"/>
</EF:EFComboColumn>
<EF:EFColumn ename="returnCode" cname="退货单号" enable="false" width="120" align="center" required="true"/>
<EF:EFColumn ename="deliveryCode" cname="发货单号" enable="false" width="120" align="center" required="true"/>
<EF:EFComboColumn ename="consCode" enable="true" cname="发货方" width="110" align="center"
filter="contains" readonly="true" required="true">
<EF:EFOptions blockId="companyBox_block_id" valueField="valueField" textField="textField"/>
</EF:EFComboColumn>
<EF:EFComboColumn ename="receCode" enable="true" cname="收货方" width="110" align="center"
filter="contains" readonly="true" required="true">
<EF:EFOptions blockId="customer_record_all_block_id" valueField="valueField" textField="textField"/>
</EF:EFComboColumn>
<EF:EFColumn ename="receUserPhone" cname="收货人电话" width="120" align="center" readonly="true" data-rules="mobile_phone"/>
<EF:EFComboColumn ename="companyCode" enable="true" cname="所属公司" width="110" align="center"
filter="contains" readonly="true" required="true">
<EF:EFOptions blockId="companyBox_block_id" valueField="valueField" textField="textField"/>
</EF:EFComboColumn>
<EF:EFColumn ename="returnQuantity" cname="退货数量" width="120" readonly="true" align="center" format="{0:N0}" data-rules="number"/>
<EF:EFColumn ename="returnWeight" cname="退货重量" width="120" readonly="true" align="center" format="{0:N3}" data-rules="number"/>
<EF:EFComboColumn ename="status" cname="审批状态" width="80" align="center" enable="false" defaultValue="0" required="true">
<EF:EFCodeOption codeName="hggp.hgsb.approveStatus" condition="ITEM_CODE IN ('0','1')"/>
</EF:EFComboColumn>
<EF:EFColumn ename="companyCode" cname="公司编码" hidden="true"/>
<EF:EFColumn ename="companyName" cname="公司名称" hidden="true"/>
<EF:EFColumn ename="consWhCode" cname="仓库编码" hidden="true"/>
<EF:EFColumn ename="consWhName" cname="仓库名称" hidden="true"/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
$(function() {
/*$(".row").children().attr("class", "col-md-3");*/
var companyBox = __eiInfo.getBlock("companyBox_block_id").getMappedRows();
var projRecordBox = __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();
var deliveryCodeBox = __eiInfo.getBlock("deliveryCodeBox_block_id").getMappedRows();
// 查询
$("#QUERY").on("click", query);
IPLATUI.EFGrid.result = {
pageable: {
pageSize: 10,
pageSizes: [10, 20, 30, 50, 100, 200]
},
columns: [{
field: "inventType",
filter: function (options) {
return _.filter(inventTypeBox, function (item) {
return item["param1Field"]=="true";
})
},
editor: function (container, options) {
this.filter(options);
}
}, {
field: "inventCode",
title: "存货名称",
filter: function (options) {
let inventType = options.model["inventType"];
if (inventType){
return _.filter(inventCodedBox, function (item) {
return item["param1Field"] === inventType;
})
}
return options.values;
},
template: function (dataItem) {
for (let i = 0; i < inventCodedBox.length; i++) {
if (inventCodedBox[i]['valueField'] === dataItem['inventCode']){
dataItem['inventName'] = inventCodedBox[i]['textField']
dataItem['inventRecordId'] = inventCodedBox[i]['param2Field'];
return inventCodedBox[i]['textField'];
}
}
return dataItem["inventCode"];
}
}, {
field: "spec",
filter: function (options) {
let specId = options.model["inventRecordId"];
if (specId){
return _.filter(specIdBox, function (item) {
return item["param7Field"] === specId;
})
}
return options.values;
},
template: function (item) {
return $.trim(item.spec) == "" ? "" : item.spec;
}
}, {
field: "length",
template: function (item) {
return item.length == 0 ? "-" : item.length;
}
}, {
field: "width",
template: function (item) {
return item.width == 0 ? "-" : item.width;
}
}, {
field: "thick",
template: function (item) {
return item.thick == 0 ? "-" : item.thick;
}
}],
loadComplete: function(grid) {
// 此 grid 对象
// 处理父子级联动,通过监听 change 事件,判断父级节点是否发生变化
grid.dataSource.bind("change", function(e) {
// 判断父级节点是否发生变化
if (e.field === "returnQuantity"){
let returnQuantity = 0;
let returnWeight = 0;
for (let i = 0; i < e.items.length; i++) {
let quantity = parseInt(e.items[i]["returnQuantity"]);
let unitWeight = parseFloat(e.items[i]["unitWeight"]);
let weight = quantity*unitWeight;
returnQuantity += quantity;
returnWeight += weight;
resultGrid.setCellValue(e.items[i],"returnQuantity",convertToNegative(quantity));
resultGrid.setCellValue(e.items[i],"returnWeight",convertToNegative(weight));
}
//获取显示框的值
$("#inqu_status-0-returnQuantity_textField").val(convertToNegative(returnQuantity));
$("#inqu_status-0-returnQuantity").val(convertToNegative(returnQuantity));
$("#inqu_status-0-returnWeight_textField").val(convertToNegative(returnWeight));
$("#inqu_status-0-returnWeight").val(convertToNegative(returnWeight));
}
});
},
onSuccess: function (e) {
if(e.eiInfo.extAttr.methodName == 'save'
||e.eiInfo.extAttr.methodName == 'delete' ){
query();
}
},
onSave: function (e) {
// 阻止后台保存请求,使用自定义保存
e.preventDefault();
save();
},
onDelete: function(e) {
e.preventDefault();
resultGrid.removeRows(resultGrid.getCheckedRowsIndex())
},
}
$("#inqu_status-0-projCode").change(function () {
if ($("#inqu_status-0-type").val()=="update"){
NotificationUtil("无法修改项目名称!", "error");
parent.JSColorbox.close();
}
let projCode = $("#inqu_status-0-projCode");
let textField = IPLAT.EFSelect.text(projCode);
let valueField = IPLAT.EFSelect.value(projCode);
$("#inqu_status-0-projName").val(textField);
let proj = _.filter(projRecordBox, function (item) {
return item["valueField"] === valueField;
})
let whRecord = _.filter(whRecordBox, function (item) {
return item["param1Field"] === proj[0]["param1Field"];
})
IPLAT.EFSelect.setDataSource($("#inqu_status-0-consWhCode"),whRecord);
let company = _.filter(companyBox, function (item) {
return item["valueField"] === proj[0]["param1Field"];
})
IPLAT.EFSelect.setDataSource($("#inqu_status-0-consCode"),company);
})
$("#inqu_status-0-consCode").change(function () {
if ($("#inqu_status-0-type").val()=="update"){
NotificationUtil("无法修改发货方!", "error");
parent.JSColorbox.close();
}
})
$("#inqu_status-0-receCode").change(function () {
if ($("#inqu_status-0-type").val()=="update"){
NotificationUtil("无法修改收货方!", "error");
parent.JSColorbox.close();
}
let valueField = IPLAT.EFSelect.value($("#inqu_status-0-receCode"));
for (let i = 0; i < customerAllBox.length; i++) {
if (customerAllBox[i]["valueField"] === valueField){
$("#inqu_status-0-receName").val(customerAllBox[i]["textField"]);
$("#inqu_status-0-receUserPhone").val(isBlank(customerAllBox[i]["param1Field"].trim())?"":customerAllBox[i]["param1Field"]);
$("#inqu_status-0-receAddr").val(isBlank(customerAllBox[i]["param2Field"].trim())?"":customerAllBox[i]["param2Field"]);
}
}
});
$("#inqu_status-0-deliveryCode").change(function () {
if ($("#inqu_status-0-type").val()=="update"){
NotificationUtil("无法修改发货单号!", "error");
parent.JSColorbox.close();
}
let valueField = IPLAT.EFSelect.value($("#inqu_status-0-deliveryCode"));
for (let i = 0; i < deliveryCodeBox.length; i++) {
if (deliveryCodeBox[i]["valueField"] === valueField){
let id = deliveryCodeBox[i]["param1Field"];
$("#inqu_status-0-consId").val(id);
var inInfo=new EiInfo();
inInfo.set("inqu_status-0-id",id);
EiCommunicator.send("HGYX001", "query", inInfo, {
onSuccess: function (ei) {
let result = ei.getBlock("result").getMappedRows();
if (result.length > 0) {
$("#inqu_status-0-companyCode").val(result[0].companyCode);
$("#inqu_status-0-companyName").val(result[0].companyName);
$("#inqu_status-0-outboundCode").val(result[0].outboundCode);
IPLAT.EFSelect.value($("#inqu_status-0-projCode"),result[0].projCode);
//$("#inqu_status-0-projCode").val(result[0].projCode);
$("#inqu_status-0-projName").val(result[0].projName);
IPLAT.EFSelect.value($("#inqu_status-0-consCode"),result[0].consCode);
$("#inqu_status-0-consName").val(result[0].consName);
$("#inqu_status-0-consWhCode").val(result[0].consWhCode);
$("#inqu_status-0-consWhName").val(result[0].consWhName);
IPLAT.EFSelect.value($("#inqu_status-0-receCode"),result[0].receCode);
//$("#inqu_status-0-receCode").val(result[0].receCode);
$("#inqu_status-0-receName").val(result[0].receName);
$("#inqu_status-0-receUserPhone").val(result[0].receUserPhone);
}
}, onFail: function (ei) {
}
}, {async: false});
}
}
});
/*$("#inqu_status-0-deliveryCode").kendoAutoComplete({
dataSource: __eiInfo.getBlock("deliveryCodeBox_block_id").getMappedRows(),
filter: "contains",
template: "#:textField#",
dataValueField: "valueField",
dataTextField: "textField",
optionLabelTemplate: "#:valueField#",
valueTemplate: "#:valueField#",
});*/
/**
* 取消
*/
$('#cancel').on('click', function () {
// 关闭弹窗
parent.JSColorbox.close();
});
/**
* 选择明细
*/
$("#BNT_CHOICE").on("click", detail);
/**
* 保存
*/
$("#btn_save").on("click",function(){
let flag = true;
var validator1 = IPLAT.Validator({
id: "inqu"
});
// 点击按钮后校验
if (!validator1.validate()) {
var errorMsg = validator1.errors().toString();
var errs = errorMsg.split(',');
IPLAT.alert({
message: '<b>错误:<br>' + errs.join('<br>') + '</b>',
okFn: function (e) {
},
title: '错误'
});
return false;
}
let rows = resultGrid.getDataItems();
if (rows.length < 1) {
message("明细信息不能为空,请选择数据");
flag = false;
return false;
}
$.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");
let returnQuantity= item.get("returnQuantity");
let returnWeight= item.get("returnWeight");
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(isBlank(returnQuantity) || parseFloat(returnQuantity) == 0){
message("选中的第" + (index + 1) + "行\"退货数量\",必须是数值并且数量不等于0!");
flag = false;
return false;
}
if(Math.abs(parseFloat(returnQuantity)) > parseInt(quantity)){
message("选中的第" + (index + 1) + "行\"退货数量大于发货数量\"");
flag = false;
return false;
}
});
if(flag) {
JSUtils.confirm("确定对数据做\"保存\"操作? ", {
ok: function () {
JSUtils.submitGrid("result", "HGYX002", "save", {
isAlldata: true,
onSuccessCallback: parent.windowCallback
});
}
});
}
});
/**
* 保存并审核提交
*/
$("#btn_save_status").on("click",function(){
let flag = true;
var validator1 = IPLAT.Validator({
id: "inqu"
});
// 点击按钮后校验
if (!validator1.validate()) {
var errorMsg = validator1.errors().toString();
var errs = errorMsg.split(',');
IPLAT.alert({
message: '<b>错误:<br>' + errs.join('<br>') + '</b>',
okFn: function (e) {
},
title: '错误'
});
return false;
}
let rows = resultGrid.getDataItems();
if (rows.length < 1) {
message("明细信息不能为空,请选择数据");
flag = false;
return false;
}
$.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");
let returnQuantity= item.get("returnQuantity");
let returnWeight= item.get("returnWeight");
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(isBlank(returnQuantity) || parseFloat(returnQuantity) == 0){
message("选中的第" + (index + 1) + "行\"退货数量\",必须是数值并且数量不能等于0!");
flag = false;
return false;
}
if(Math.abs(parseFloat(returnQuantity)) > parseInt(quantity)){
message("选中的第" + (index + 1) + "行\"退货数量大于发货数量\"");
flag = false;
return false;
}
/*if(isBlank(returnWeight)){
message("选中的第" + (index + 1) + "行\"退货重量\",必须是数值并且数量必须大于0!");
flag = false;
return false;
}*/
});
if(flag) {
JSUtils.confirm("确定对数据做\"保存\"操作? ", {
ok: function () {
JSUtils.submitGrid("result", "HGYX002", "saveStatus", {
isAlldata: true,
onSuccessCallback: parent.windowCallback
});
}
});
}
})
downKeyUp();
});
/**
* 页面加载时执行
*/
$(window).load(function () {
// 查询
//query();
});
/**
* 查询
*/
let query = function () {
resultGrid.dataSource.page(1);
}
function detail() {
let ids = [];
let rows = resultGrid.getDataItems();
if (rows.length > 0){
$.each(rows, function(index, item) {
ids.push(item.inventRecordId)
});
}
let consId = $("#inqu_status-0-consId").val();
let deliveryCode = $("#inqu_status-0-deliveryCode").val();
if(isBlank(deliveryCode)){
message("请选择发货单号!");
return false;
}
JSColorbox.open({
href: "HGYX002C?methodName=initLoad&inqu_status-0-deliveryCode="+deliveryCode+"&inqu_status-0-ids="+ids.join(',')+"&inqu_status-0-parentId="+consId,
title: "<div style='text-align: center;'>选择退货明细</div>",
width: "90%",
height: "80%",
callbackName: detailCallback
});
}
function detailCallback(result) {
let rows = resultGrid.getDataItems();
if (result.length> 0) {
for (let i = 0; i < result.length; i++) {
let specId = rows.filter(row => row.inventRecordId == result[i].inventRecordId)
if (specId.length > 0){
message("无法重复添加!");
return false;
}
result[i].set("returnQuantity", 0);
result[i].set("returnWeight", 0);
resultGrid.addRows(result[i]);
}
}
}
function convertToNegative(number) {
if (number <= 0){
return number;
}
return -number;
}
\ No newline at end of file
<%--
Created by IntelliJ IDEA.
User: 1
Date: 2024/6/7
Time: 15:28
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:EFInput blockId="inqu_status" row="0" ename="id" cname="ID" type="hidden" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="companyCode" cname="公司编码" type="hidden" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="companyName" cname="公司名称" type="hidden" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="returnCode" cname="退货单号" disabled="true" colWidth="3"/>
<EF:EFSelect blockId="inqu_status" row="0" ename="deliveryCode" cname="发货单号"
valueTemplate="#=valueField#-#=textField#"
template="#=valueField#-#=textField#"
textField="#=valueField#-#=textField#"
valueField="valueField"
required="true" colWidth="3" filter="contains">
<EF:EFOption label="请选择" value=""/>
<EF:EFOptions blockId="deliveryCodeBox_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFInput blockId="inqu_status" row="0" ename="outboundCode" cname="出库单号" type="hidden" disabled="true" colWidth="3"/>
<EF:EFSelect blockId="inqu_status" row="0" ename="projCode" cname="项目名称" required="true" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="proj_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFInput blockId="inqu_status" row="0" ename="projName" cname="项目名称" type="hidden" colWidth="3"/>
<EF:EFSelect blockId="inqu_status" row="0" ename="consCode" cname="发货方" required="true" colWidth="3" filter="contains">
<EF:EFOption label="请选择" value=""/>
<EF:EFOptions blockId="companyBox_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFInput blockId="inqu_status" row="0" ename="consName" type="hidden" cname="发货方编码" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="consWhCode" type="hidden" cname="发货仓库名称" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="consWhName" type="hidden" cname="发货仓库名称" colWidth="3"/>
<EF:EFSelect blockId="inqu_status" row="0" ename="receCode" cname="收货方" required="true" colWidth="3" filter="contains">
<EF:EFOption label="请选择" value=""/>
<EF:EFOptions blockId="customer_record_all_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFInput blockId="inqu_status" row="0" ename="receName" type="hidden" cname="收货方名称" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="receUserPhone" cname="收货人电话" required="true" data-rules="mobile_phone" placeholder="请输入电话号码" colWidth="3"/>
<EF:EFSelect blockId="inqu_status" row="0" ename="status" cname="审核状态" colWidth="3" disabled="true" filter="contains" value="0">
<EF:EFCodeOption codeName="hggp.hgsb.approveStatus" condition="ITEM_CODE IN ('0','1')"/>
</EF:EFSelect>
</div>
<div class="row">
<EF:EFInput blockId="inqu_status" row="0" ename="returnQuantity" cname="退货数量" format="{0:N0}"
required="true" colWidth="3" disabled="true"
data-regex="/^-?[0-9]{1,15}?$/"
data-errorprompt="请输入数字,该值最大可设置15位整数"/>
<EF:EFInput blockId="inqu_status" row="0" ename="returnWeight" cname="退货重量" format="{0:N3}"
required="true" colWidth="3" disabled="true"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFInput blockId="inqu_status" row="0" ename="remarks" cname="退货原因" type="textarea" colWidth="8" ratio="2:8"/>
<EF:EFInput blockId="inqu_status" row="0" ename="consId" cname="发货方ID" type="hidden" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="type" cname="type" type="hidden" 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="inventType" cname="存货类型" enable="false" width="120" align="center" required="true"
blockName="invent_type_box_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="false"
filter="contains">
</EF:EFComboColumn>
<EF:EFComboColumn ename="inventCode" cname="存货名称" enable="false" width="120" align="center" required="true"
blockName="invent_code_box_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="false"
filter="contains">
</EF:EFComboColumn>
<EF:EFComboColumn ename="spec" cname="规格" enable="false" width="120" align="center" required="true"
blockName="spec_box_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="false"
filter="contains">
</EF:EFComboColumn>
<EF:EFColumn ename="inventRecordId" cname="规格ID" width="120" enable="true" readonly="true" align="center" hidden="true" maxLength="50"/>
<EF:EFColumn ename="length" cname="长度(MM)" enable="false" readonly="true" width="100" align="right" format="{0:N3}" maxLength="10"/>
<EF:EFColumn ename="width" cname="宽度(MM)" enable="false" readonly="true" width="100" align="right" format="{0:N3}" maxLength="10"/>
<EF:EFColumn ename="thick" cname="厚度(MM)" enable="false" readonly="true" width="100" align="right" format="{0:N3}" maxLength="10"/>
<EF:EFColumn ename="quantity" cname="发货数量" width="120" enable="false" format="{0:N0}" 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="unitWeight" cname="单重" width="120" enable="false" format="{0:N3}" hidden="true" 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: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:EFColumn ename="returnQuantity" cname="退货数量" width="120" enable="true" format="{0:N0}" editType="number"
displayType="0.000" sort="true" align="right" defaultValue="0"
data-regex="/^-?[0-9]{1,15}$/" maxLength="20" required="true"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFColumn ename="returnWeight" cname="退货重量" width="120" defaultValue="0" enable="false" readonly="true" format="{0:N3}" editType="number" required="true"/>
</EF:EFGrid>
</EF:EFRegion>
<div class="row" style="display:flex;justify-content:center;">
<EF:EFButton ename="btn_save" cname="保存" type="button" class="btn-center"/>
<EF:EFButton ename="btn_save_status" cname="保存&提交审核" type="button" class="btn-center"/>
<EF:EFButton ename="cancel" cname="取消" type="button" class="btn-center"/>
</div>
</EF:EFPage>
$(function () {
//$(".row").children().attr("class", "col-md-3");
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();
// 查询
$("#QUERY").on("click", query);
IPLATUI.EFGrid.result = {
pageable: {
pageSize: 10,
pageSizes: [10, 20, 30, 50, 100, 200]
},
columns: [],
loadComplete: function(grid) {
// 此 grid 对象
// 处理父子级联动,通过监听 change 事件,判断父级节点是否发生变化
grid.dataSource.bind("change", function(e) {
// 判断父级节点是否发生变化
if (e.field === "spec"){
for (let i = 0; i < specIdBox.length; i++) {
if (specIdBox[i]['param7Field'] === e.items[0]["inventRecordId"]){
e.items[0]["length"] = specIdBox[i]['param1Field'];
e.items[0]["width"] = specIdBox[i]['param2Field'];
e.items[0]["thick"] = specIdBox[i]['param3Field'];
e.items[0]["quantity"] = specIdBox[i]['param4Field'];
resultGrid.setCellValue(e.items[0],"unitWeight",specIdBox[i]['param5Field']);
resultGrid.setCellValue(e.items[0],"weight",specIdBox[i]['param6Field']);
//e.items[0]["unitWeight"] = specIdBox[i]['param5Field'];
//e.items[0]["weight"] = specIdBox[i]['param6Field'];
}
}
loadChange(grid,e,"length");
loadChange(grid,e,"width");
loadChange(grid,e,"thick");
//loadChange(grid,e,"unitWeight");
//loadChange(grid,e,"weight");
loadChange(grid,e,"quantity");
}else if (e.field === "quantity"){
if (e.items[0].quantity != 0 && e.items[0].unitWeight > 0){
e.items[0].weight = e.items[0].unitWeight*e.items[0].quantity;
resultGrid.setCellValue(e.items[0],"weight",e.items[0].unitWeight*e.items[0].quantity);
}
}else if (e.field === "inventCode"){
loadChange(grid,e,"spec");
}
});
},
onSuccess: function (e) {
if(e.eiInfo.extAttr.methodName == 'save'
||e.eiInfo.extAttr.methodName == 'delete' ){
query();
}
},
onSave: function (e) {
// 阻止后台保存请求,使用自定义保存
e.preventDefault();
save();
},
onDelete: function (e) {
// 阻止后台删除请求,使用自定义删除
//e.preventDefault();
//deleteFunc();
}
}
})
let query = function () {
resultGrid.dataSource.page(1);
}
\ No newline at end of file
<%--
Created by IntelliJ IDEA.
User: 1
Date: 2024/6/7
Time: 15:29
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:EFInput blockId="inqu_status" row="0" ename="id" cname="ID" type="hidden" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="companyCode" cname="公司编码" type="hidden" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="companyName" cname="公司名称" type="hidden" required="true" disabled="true" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="returnCode" cname="退货单号" disabled="true" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="deliveryCode" cname="发货单号" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="outboundCode" cname="出库单号" type="hidden" disabled="true" colWidth="3"/>
<EF:EFSelect blockId="inqu_status" row="0" ename="projCode" cname="项目名称" required="true" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="proj_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFInput blockId="inqu_status" row="0" ename="projName" cname="项目名称" type="hidden" colWidth="3"/>
<EF:EFSelect blockId="inqu_status" row="0" ename="consCode" cname="发货方" required="true" colWidth="3" filter="contains">
<EF:EFOption label="请选择" value=""/>
<EF:EFOptions blockId="companyBox_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFInput blockId="inqu_status" row="0" ename="consCode" type="hidden" cname="发货方编码" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="consWhName" type="hidden" cname="发货仓库名称" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="consWhName" type="hidden" cname="发货仓库名称" colWidth="3"/>
<EF:EFSelect blockId="inqu_status" row="0" ename="receCode" cname="收货方" required="true" colWidth="3" filter="contains">
<EF:EFOption label="请选择" value=""/>
<EF:EFOptions blockId="customer_record_all_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFInput blockId="inqu_status" row="0" ename="receName" type="hidden" cname="收货方名称" colWidth="3"/>
<EF:EFSelect blockId="inqu_status" row="0" ename="status" cname="审核状态" colWidth="3" disabled="true" filter="contains" value="0">
<EF:EFCodeOption codeName="hggp.hgsb.approveStatus" condition="ITEM_CODE IN ('0','1')"/>
</EF:EFSelect>
</div>
<div class="row">
<EF:EFInput blockId="inqu_status" row="0" ename="returnQuantity" cname="退货数量" format="{0:N0}"
required="true" colWidth="3" disabled="true"
data-regex="/^-?[0-9]{1,15}?$/"
data-errorprompt="请输入数字,该值最大可设置15位整数"/>
<EF:EFInput blockId="inqu_status" row="0" ename="returnWeight" cname="退货重量" format="{0:N3}"
required="true" colWidth="3" disabled="true"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
</div>
<div class="row">
<EF:EFInput blockId="inqu_status" row="0" ename="remarks" cname="退货原因" type="textarea" colWidth="8" ratio="2:8"/>
</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="inventType" cname="存货类型" enable="true" width="120" align="center" required="true"
blockName="invent_type_box_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="false"
filter="contains">
</EF:EFComboColumn>
<EF:EFComboColumn ename="inventCode" cname="存货名称" enable="true" width="120" align="center" required="true"
blockName="invent_code_box_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="false"
filter="contains">
</EF:EFComboColumn>
<EF:EFComboColumn ename="spec" cname="规格" enable="true" width="120" align="center" required="true"
blockName="spec_box_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="false"
filter="contains">
</EF:EFComboColumn>
<EF:EFColumn ename="inventRecordId" cname="规格ID" width="120" enable="true" readonly="true" align="center" hidden="true" maxLength="50"/>
<EF:EFColumn ename="length" cname="长度(MM)" enable="true" readonly="false" width="100" align="right" format="{0:N3}" maxLength="10"/>
<EF:EFColumn ename="width" cname="宽度(MM)" enable="true" readonly="false" width="100" align="right" format="{0:N3}" maxLength="10"/>
<EF:EFColumn ename="thick" cname="厚度(MM)" enable="true" readonly="false" width="100" align="right" format="{0:N3}" maxLength="10"/>
<EF:EFColumn ename="quantity" cname="数量" width="120" enable="true" format="{0:N0}" 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="unitWeight" 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: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:EFColumn ename="returnQuantity" cname="退货数量" width="120" enable="true" format="{0:N0}" 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="returnWeight" 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 () {
// 查询
$("#QUERY").on("click", query);
$("#BNT_CHOICE").on("click", choice)
})
/**
* 查询
*/
let query = function () {
resultGrid.dataSource.page(1);
}
let choice = function () {
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
parent.JSColorbox.setValueCallback(rows);
parent.JSColorbox.close();
}
\ No newline at end of file
<%--
Created by IntelliJ IDEA.
User: 1
Date: 2024/6/7
Time: 15:29
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:EFInput blockId="inqu_status" row="0" ename="inventName" cname="物料名称" placeholder="模糊查询" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="spec" cname="规格" placeholder="模糊查询" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="companyCode" cname="公司名称" type="hidden" required="true" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="whCode" cname="仓库名称" type="hidden" required="true" 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="inventType" cname="存货类型" enable="true" width="120" align="center" required="true"
blockName="invent_type_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="false"
filter="contains">
</EF:EFComboColumn>
<EF:EFComboColumn ename="inventCode" cname="存货名称" enable="true" width="120" align="center" required="true"
blockName="invent_record_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="false"
filter="contains">
</EF:EFComboColumn>
<EF:EFComboColumn ename="spec" cname="规格" enable="true" width="120" align="center" required="true"
blockName="spec_name_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="false"
filter="contains">
</EF:EFComboColumn>
<EF:EFColumn ename="inventRecordId" cname="规格ID" width="120" enable="true" readonly="true" align="center" hidden="true" maxLength="50"/>
<EF:EFColumn ename="length" cname="长度(MM)" enable="true" readonly="false" width="100" align="right" format="{0:N3}" maxLength="10"/>
<EF:EFColumn ename="width" cname="宽度(MM)" enable="true" readonly="false" width="100" align="right" format="{0:N3}" maxLength="10"/>
<EF:EFColumn ename="thick" cname="厚度(MM)" enable="true" readonly="false" width="100" align="right" format="{0:N3}" maxLength="10"/>
<EF:EFColumn ename="quantity" cname="数量" width="120" enable="true" format="{0:N0}" editType="text"
displayType="0.000" sort="true" align="right"
data-regex="/^-?[0-9]{1,20}([.][0-9]{1,3})?$/" maxLength="20" required="true"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFColumn ename="unitWeight" cname="单重" width="120" enable="true" format="{0:N0}" editType="text"
displayType="0.000" sort="true" align="right"
data-regex="/^-?[0-9]{1,20}([.][0-9]{1,3})?$/" 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:EFColumn ename="returnQuantity" cname="退货数量" width="120" enable="true" hidden="true" format="{0:N0}" editType="number"
displayType="0.000" sort="true" align="right"
data-regex="/^-?[0-9]{1,15}$/" maxLength="20" required="true"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFColumn ename="returnWeight" cname="退货重量" width="120" enable="true" hidden="true" format="{0:N3}" editType="number" required="true"/>
</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