Commit f915bb66 by 宋祥

1.入库质检单功能

parent 848d08d2
...@@ -404,6 +404,17 @@ public class HPSqlConstant { ...@@ -404,6 +404,17 @@ public class HPSqlConstant {
public static final String DO_PROCESS2 = "HPZL001.doProcess2"; public static final String DO_PROCESS2 = "HPZL001.doProcess2";
} }
/**
* @author:songx
* @date:2024/8/13,10:24
*/
public class HpZl002 {
// 锁
public static final String LOCK = "HPZL002.lock";
// 确认
public static final String CONFIRM = "HPZL002.confirm";
}
/** /**
* @author:songx * @author:songx
......
package com.baosight.hpjx.hp.zl.constant;
/**
* @author songx
* @date 2024/11/16,15:39
*/
public class HpZlSqlConst {
/**
* @author:songx
* @date:2024/8/29,15:54
*/
public static class HpZl002 {
// 锁
public static final String LOCK = "HPZL002.lock";
// 修改
public static final String UPDATE_DEAL = "HPZL002.updateDeal";
}
}
package com.baosight.hpjx.hp.zl.domain;
import com.baosight.iplat4j.core.data.DaoEPBase;
import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.core.util.NumberUtils;
import com.baosight.iplat4j.core.util.StringUtils;
import java.math.BigDecimal;
import java.util.HashMap;
import java.util.Map;
/**
* Project: <br>
* Title:HPZL002.java <br>
* Description: <br>
*
* @author songx
* @date 2024-11-16 15:36:46
*/
public class HPZL002 extends DaoEPBase {
private static final long serialVersionUID = 1L;
public static final String FIELD_ID = "id"; /* */
public static final String FIELD_COMPANY_CODE = "companyCode"; /* 企业编码 预留 */
public static final String FIELD_DEP_CODE = "depCode"; /* 部门编码 */
public static final String FIELD_CREATED_BY = "createdBy"; /* 记录创建者 */
public static final String FIELD_CREATED_NAME = "createdName"; /* 记录创建名称 */
public static final String FIELD_CREATED_TIME = "createdTime"; /* 记录创建时间 */
public static final String FIELD_UPDATED_BY = "updatedBy"; /* 记录修改者 */
public static final String FIELD_UPDATED_NAME = "updatedName"; /* 记录修改名称 */
public static final String FIELD_UPDATED_TIME = "updatedTime"; /* 记录修改时间 */
public static final String FIELD_DELETE_FLAG = "deleteFlag"; /* 0-未删除,1-已删除 */
public static final String FIELD_STATUS = "status"; /* 状态:0-质检中,1-质检完成 */
public static final String FIELD_RECEIPT_DATE = "receiptDate"; /* 单据日期 */
public static final String FIELD_CHECK_NO = "checkNo"; /* 检查单号 */
public static final String FIELD_RECEIVE_NO = "receiveNo"; /* 收货单号 */
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_ID = "specId"; /* 规格ID */
public static final String FIELD_SPEC = "spec"; /* 规格 */
public static final String FIELD_MATERIAL = "material"; /* 材质 */
public static final String FIELD_UNIT = "unit"; /* 单位 */
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_RECEIVE_QTY = "receiveQty"; /* 收货数量 */
public static final String FIELD_QUALIFY_QTY = "qualifyQty"; /* 合格数量 */
public static final String FIELD_UNQUALIFY_QTY = "unqualifyQty"; /* 不合格数量 */
public static final String FIELD_RECEIVE_UNIT_WEIGHT = "receiveUnitWeight"; /* 收货单重 */
public static final String FIELD_RECEIVE_WEIGHT = "receiveWeight"; /* 收货重量 */
public static final String FIELD_DEAL_USER_ID = "dealUserId"; /* 处理人ID */
public static final String FIELD_DEAL_USER_NAME = "dealUserName"; /* 处理人姓名 */
public static final String FIELD_DEAL_DATE = "dealDate"; /* 处理时间 */
public static final String COL_ID = "ID"; /* */
public static final String COL_COMPANY_CODE = "COMPANY_CODE"; /* 企业编码 预留 */
public static final String COL_DEP_CODE = "DEP_CODE"; /* 部门编码 */
public static final String COL_CREATED_BY = "CREATED_BY"; /* 记录创建者 */
public static final String COL_CREATED_NAME = "CREATED_NAME"; /* 记录创建名称 */
public static final String COL_CREATED_TIME = "CREATED_TIME"; /* 记录创建时间 */
public static final String COL_UPDATED_BY = "UPDATED_BY"; /* 记录修改者 */
public static final String COL_UPDATED_NAME = "UPDATED_NAME"; /* 记录修改名称 */
public static final String COL_UPDATED_TIME = "UPDATED_TIME"; /* 记录修改时间 */
public static final String COL_DELETE_FLAG = "DELETE_FLAG"; /* 0-未删除,1-已删除 */
public static final String COL_STATUS = "STATUS"; /* 状态:0-质检中,1-质检完成 */
public static final String COL_RECEIPT_DATE = "RECEIPT_DATE"; /* 单据日期 */
public static final String COL_CHECK_NO = "CHECK_NO"; /* 检查单号 */
public static final String COL_RECEIVE_NO = "RECEIVE_NO"; /* 收货单号 */
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_ID = "SPEC_ID"; /* 规格ID */
public static final String COL_SPEC = "SPEC"; /* 规格 */
public static final String COL_MATERIAL = "MATERIAL"; /* 材质 */
public static final String COL_UNIT = "UNIT"; /* 单位 */
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_RECEIVE_QTY = "RECEIVE_QTY"; /* 收货数量 */
public static final String COL_QUALIFY_QTY = "QUALIFY_QTY"; /* 合格数量 */
public static final String COL_UNQUALIFY_QTY = "UNQUALIFY_QTY"; /* 不合格数量 */
public static final String COL_RECEIVE_UNIT_WEIGHT = "RECEIVE_UNIT_WEIGHT"; /* 收货单重 */
public static final String COL_RECEIVE_WEIGHT = "RECEIVE_WEIGHT"; /* 收货重量 */
public static final String COL_DEAL_USER_ID = "DEAL_USER_ID"; /* 处理人ID */
public static final String COL_DEAL_USER_NAME = "DEAL_USER_NAME"; /* 处理人姓名 */
public static final String COL_DEAL_DATE = "DEAL_DATE"; /* 处理时间 */
public static final String QUERY = "HPZL002.query";
public static final String COUNT = "HPZL002.count";
public static final String INSERT = "HPZL002.insert";
public static final String UPDATE = "HPZL002.update";
public static final String DELETE = "HPZL002.delete";
public Long id = new Long(0); /* */
public String companyCode = " "; /* 企业编码 预留 */
public String depCode = " "; /* 部门编码 */
public String createdBy = " "; /* 记录创建者 */
public String createdName = " "; /* 记录创建名称 */
public String createdTime = " "; /* 记录创建时间 */
public String updatedBy = " "; /* 记录修改者 */
public String updatedName = " "; /* 记录修改名称 */
public String updatedTime = " "; /* 记录修改时间 */
public Integer deleteFlag = new Integer(0); /* 0-未删除,1-已删除 */
public Integer status = new Integer(0); /* 状态:0-质检中,1-质检完成 */
public String receiptDate = " "; /* 单据日期 */
public String checkNo = " "; /* 检查单号 */
public String receiveNo = " "; /* 收货单号 */
public String inventType = " "; /* 存货类型 */
public String inventCode = " "; /* 存货编码 */
public String inventName = " "; /* 存货名称 */
public Long specId = new Long(0); /* 规格ID */
public String spec = " "; /* 规格 */
public String material = " "; /* 材质 */
public String unit = " "; /* 单位 */
public BigDecimal length = new BigDecimal(0); /* 长度 */
public BigDecimal width = new BigDecimal(0); /* 宽度 */
public BigDecimal thick = new BigDecimal(0); /* 厚度 */
public BigDecimal receiveQty = new BigDecimal(0); /* 收货数量 */
public BigDecimal qualifyQty = new BigDecimal(0); /* 合格数量 */
public BigDecimal unqualifyQty = new BigDecimal(0); /* 不合格数量 */
public BigDecimal receiveUnitWeight = new BigDecimal(0); /* 收货单重 */
public BigDecimal receiveWeight = new BigDecimal(0); /* 收货重量 */
public String dealUserId = " "; /* 处理人ID */
public String dealUserName = " "; /* 处理人姓名 */
public String dealDate = " "; /* 处理时间 */
/**
* initialize the metadata.
*/
public void initMetaData() {
EiColumn eiColumn;
eiColumn = new EiColumn(FIELD_ID);
eiColumn.setDescName("");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_COMPANY_CODE);
eiColumn.setDescName("企业编码 预留");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DEP_CODE);
eiColumn.setDescName("部门编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CREATED_BY);
eiColumn.setDescName("记录创建者");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CREATED_NAME);
eiColumn.setDescName("记录创建名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CREATED_TIME);
eiColumn.setDescName("记录创建时间");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UPDATED_BY);
eiColumn.setDescName("记录修改者");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UPDATED_NAME);
eiColumn.setDescName("记录修改名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UPDATED_TIME);
eiColumn.setDescName("记录修改时间");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DELETE_FLAG);
eiColumn.setDescName("0-未删除,1-已删除");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_STATUS);
eiColumn.setDescName("状态:0-质检中,1-质检完成");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_RECEIPT_DATE);
eiColumn.setDescName("单据日期");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CHECK_NO);
eiColumn.setDescName("检查单号");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_RECEIVE_NO);
eiColumn.setDescName("收货单号");
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_ID);
eiColumn.setDescName("规格ID");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_SPEC);
eiColumn.setDescName("规格");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_MATERIAL);
eiColumn.setDescName("材质");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UNIT);
eiColumn.setDescName("单位");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_LENGTH);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(20);
eiColumn.setDescName("长度");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_WIDTH);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(20);
eiColumn.setDescName("宽度");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_THICK);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(20);
eiColumn.setDescName("厚度");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_RECEIVE_QTY);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(20);
eiColumn.setDescName("收货数量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_QUALIFY_QTY);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(20);
eiColumn.setDescName("合格数量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UNQUALIFY_QTY);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(20);
eiColumn.setDescName("不合格数量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_RECEIVE_UNIT_WEIGHT);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(20);
eiColumn.setDescName("收货单重");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_RECEIVE_WEIGHT);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(20);
eiColumn.setDescName("收货重量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DEAL_USER_ID);
eiColumn.setDescName("处理人ID");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DEAL_USER_NAME);
eiColumn.setDescName("处理人姓名");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DEAL_DATE);
eiColumn.setDescName("处理时间");
eiMetadata.addMeta(eiColumn);
}
/**
* the constructor.
*/
public HPZL002() {
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 companyCode - 企业编码 预留.
* @return the companyCode
*/
public String getCompanyCode() {
return this.companyCode;
}
/**
* set the companyCode - 企业编码 预留.
*
* @param companyCode - 企业编码 预留
*/
public void setCompanyCode(String companyCode) {
this.companyCode = companyCode;
}
/**
* get the depCode - 部门编码.
* @return the depCode
*/
public String getDepCode() {
return this.depCode;
}
/**
* set the depCode - 部门编码.
*
* @param depCode - 部门编码
*/
public void setDepCode(String depCode) {
this.depCode = depCode;
}
/**
* get the createdBy - 记录创建者.
* @return the createdBy
*/
public String getCreatedBy() {
return this.createdBy;
}
/**
* set the createdBy - 记录创建者.
*
* @param createdBy - 记录创建者
*/
public void setCreatedBy(String createdBy) {
this.createdBy = createdBy;
}
/**
* get the createdName - 记录创建名称.
* @return the createdName
*/
public String getCreatedName() {
return this.createdName;
}
/**
* set the createdName - 记录创建名称.
*
* @param createdName - 记录创建名称
*/
public void setCreatedName(String createdName) {
this.createdName = createdName;
}
/**
* get the createdTime - 记录创建时间.
* @return the createdTime
*/
public String getCreatedTime() {
return this.createdTime;
}
/**
* set the createdTime - 记录创建时间.
*
* @param createdTime - 记录创建时间
*/
public void setCreatedTime(String createdTime) {
this.createdTime = createdTime;
}
/**
* get the updatedBy - 记录修改者.
* @return the updatedBy
*/
public String getUpdatedBy() {
return this.updatedBy;
}
/**
* set the updatedBy - 记录修改者.
*
* @param updatedBy - 记录修改者
*/
public void setUpdatedBy(String updatedBy) {
this.updatedBy = updatedBy;
}
/**
* get the updatedName - 记录修改名称.
* @return the updatedName
*/
public String getUpdatedName() {
return this.updatedName;
}
/**
* set the updatedName - 记录修改名称.
*
* @param updatedName - 记录修改名称
*/
public void setUpdatedName(String updatedName) {
this.updatedName = updatedName;
}
/**
* get the updatedTime - 记录修改时间.
* @return the updatedTime
*/
public String getUpdatedTime() {
return this.updatedTime;
}
/**
* set the updatedTime - 记录修改时间.
*
* @param updatedTime - 记录修改时间
*/
public void setUpdatedTime(String updatedTime) {
this.updatedTime = updatedTime;
}
/**
* get the deleteFlag - 0-未删除,1-已删除.
* @return the deleteFlag
*/
public Integer getDeleteFlag() {
return this.deleteFlag;
}
/**
* set the deleteFlag - 0-未删除,1-已删除.
*
* @param deleteFlag - 0-未删除,1-已删除
*/
public void setDeleteFlag(Integer deleteFlag) {
this.deleteFlag = deleteFlag;
}
/**
* get the 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 receiptDate - 单据日期.
* @return the receiptDate
*/
public String getReceiptDate() {
return this.receiptDate;
}
/**
* set the receiptDate - 单据日期.
*
* @param receiptDate - 单据日期
*/
public void setReceiptDate(String receiptDate) {
this.receiptDate = receiptDate;
}
/**
* get the checkNo - 检查单号.
* @return the checkNo
*/
public String getCheckNo() {
return this.checkNo;
}
/**
* set the checkNo - 检查单号.
*
* @param checkNo - 检查单号
*/
public void setCheckNo(String checkNo) {
this.checkNo = checkNo;
}
/**
* get the receiveNo - 收货单号.
* @return the receiveNo
*/
public String getReceiveNo() {
return this.receiveNo;
}
/**
* set the receiveNo - 收货单号.
*
* @param receiveNo - 收货单号
*/
public void setReceiveNo(String receiveNo) {
this.receiveNo = receiveNo;
}
/**
* 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 specId - 规格ID.
* @return the specId
*/
public Long getSpecId() {
return this.specId;
}
/**
* set the specId - 规格ID.
*
* @param specId - 规格ID
*/
public void setSpecId(Long specId) {
this.specId = specId;
}
/**
* 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 material - 材质.
* @return the material
*/
public String getMaterial() {
return this.material;
}
/**
* set the material - 材质.
*
* @param material - 材质
*/
public void setMaterial(String material) {
this.material = material;
}
/**
* get the unit - 单位.
* @return the unit
*/
public String getUnit() {
return this.unit;
}
/**
* set the unit - 单位.
*
* @param unit - 单位
*/
public void setUnit(String unit) {
this.unit = unit;
}
/**
* get the 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 receiveQty - 收货数量.
* @return the receiveQty
*/
public BigDecimal getReceiveQty() {
return this.receiveQty;
}
/**
* set the receiveQty - 收货数量.
*
* @param receiveQty - 收货数量
*/
public void setReceiveQty(BigDecimal receiveQty) {
this.receiveQty = receiveQty;
}
/**
* get the qualifyQty - 合格数量.
* @return the qualifyQty
*/
public BigDecimal getQualifyQty() {
return this.qualifyQty;
}
/**
* set the qualifyQty - 合格数量.
*
* @param qualifyQty - 合格数量
*/
public void setQualifyQty(BigDecimal qualifyQty) {
this.qualifyQty = qualifyQty;
}
/**
* get the unqualifyQty - 不合格数量.
* @return the unqualifyQty
*/
public BigDecimal getUnqualifyQty() {
return this.unqualifyQty;
}
/**
* set the unqualifyQty - 不合格数量.
*
* @param unqualifyQty - 不合格数量
*/
public void setUnqualifyQty(BigDecimal unqualifyQty) {
this.unqualifyQty = unqualifyQty;
}
/**
* get the receiveUnitWeight - 收货单重.
* @return the receiveUnitWeight
*/
public BigDecimal getReceiveUnitWeight() {
return this.receiveUnitWeight;
}
/**
* set the receiveUnitWeight - 收货单重.
*
* @param receiveUnitWeight - 收货单重
*/
public void setReceiveUnitWeight(BigDecimal receiveUnitWeight) {
this.receiveUnitWeight = receiveUnitWeight;
}
/**
* get the receiveWeight - 收货重量.
* @return the receiveWeight
*/
public BigDecimal getReceiveWeight() {
return this.receiveWeight;
}
/**
* set the receiveWeight - 收货重量.
*
* @param receiveWeight - 收货重量
*/
public void setReceiveWeight(BigDecimal receiveWeight) {
this.receiveWeight = receiveWeight;
}
/**
* get the dealUserId - 处理人ID.
* @return the dealUserId
*/
public String getDealUserId() {
return this.dealUserId;
}
/**
* set the dealUserId - 处理人ID.
*
* @param dealUserId - 处理人ID
*/
public void setDealUserId(String dealUserId) {
this.dealUserId = dealUserId;
}
/**
* get the dealUserName - 处理人姓名.
* @return the dealUserName
*/
public String getDealUserName() {
return this.dealUserName;
}
/**
* set the dealUserName - 处理人姓名.
*
* @param dealUserName - 处理人姓名
*/
public void setDealUserName(String dealUserName) {
this.dealUserName = dealUserName;
}
/**
* get the dealDate - 处理时间.
* @return the dealDate
*/
public String getDealDate() {
return this.dealDate;
}
/**
* set the dealDate - 处理时间.
*
* @param dealDate - 处理时间
*/
public void setDealDate(String dealDate) {
this.dealDate = dealDate;
}
/**
* get the value from Map.
*
* @param map - source data map
*/
@Override
public void fromMap(Map map) {
setId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_ID)), id));
setCompanyCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_COMPANY_CODE)), companyCode));
setDepCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DEP_CODE)), depCode));
setCreatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_BY)), createdBy));
setCreatedName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_NAME)), createdName));
setCreatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_TIME)), createdTime));
setUpdatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_BY)), updatedBy));
setUpdatedName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_NAME)), updatedName));
setUpdatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_TIME)), updatedTime));
setDeleteFlag(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_DELETE_FLAG)), deleteFlag));
setStatus(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_STATUS)), status));
setReceiptDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_RECEIPT_DATE)), receiptDate));
setCheckNo(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CHECK_NO)), checkNo));
setReceiveNo(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_RECEIVE_NO)), receiveNo));
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));
setSpecId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_SPEC_ID)), specId));
setSpec(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_SPEC)), spec));
setMaterial(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_MATERIAL)), material));
setUnit(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UNIT)), unit));
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));
setReceiveQty(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_RECEIVE_QTY)), receiveQty));
setQualifyQty(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_QUALIFY_QTY)), qualifyQty));
setUnqualifyQty(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_UNQUALIFY_QTY)), unqualifyQty));
setReceiveUnitWeight(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_RECEIVE_UNIT_WEIGHT)), receiveUnitWeight));
setReceiveWeight(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_RECEIVE_WEIGHT)), receiveWeight));
setDealUserId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DEAL_USER_ID)), dealUserId));
setDealUserName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DEAL_USER_NAME)), dealUserName));
setDealDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DEAL_DATE)), dealDate));
}
/**
* set the value to Map.
*/
@Override
public Map toMap() {
Map map = new HashMap();
map.put(FIELD_ID, StringUtils.toString(id, eiMetadata.getMeta(FIELD_ID)));
map.put(FIELD_COMPANY_CODE, StringUtils.toString(companyCode, eiMetadata.getMeta(FIELD_COMPANY_CODE)));
map.put(FIELD_DEP_CODE, StringUtils.toString(depCode, eiMetadata.getMeta(FIELD_DEP_CODE)));
map.put(FIELD_CREATED_BY, StringUtils.toString(createdBy, eiMetadata.getMeta(FIELD_CREATED_BY)));
map.put(FIELD_CREATED_NAME, StringUtils.toString(createdName, eiMetadata.getMeta(FIELD_CREATED_NAME)));
map.put(FIELD_CREATED_TIME, StringUtils.toString(createdTime, eiMetadata.getMeta(FIELD_CREATED_TIME)));
map.put(FIELD_UPDATED_BY, StringUtils.toString(updatedBy, eiMetadata.getMeta(FIELD_UPDATED_BY)));
map.put(FIELD_UPDATED_NAME, StringUtils.toString(updatedName, eiMetadata.getMeta(FIELD_UPDATED_NAME)));
map.put(FIELD_UPDATED_TIME, StringUtils.toString(updatedTime, eiMetadata.getMeta(FIELD_UPDATED_TIME)));
map.put(FIELD_DELETE_FLAG, StringUtils.toString(deleteFlag, eiMetadata.getMeta(FIELD_DELETE_FLAG)));
map.put(FIELD_STATUS, StringUtils.toString(status, eiMetadata.getMeta(FIELD_STATUS)));
map.put(FIELD_RECEIPT_DATE, StringUtils.toString(receiptDate, eiMetadata.getMeta(FIELD_RECEIPT_DATE)));
map.put(FIELD_CHECK_NO, StringUtils.toString(checkNo, eiMetadata.getMeta(FIELD_CHECK_NO)));
map.put(FIELD_RECEIVE_NO, StringUtils.toString(receiveNo, eiMetadata.getMeta(FIELD_RECEIVE_NO)));
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_ID, StringUtils.toString(specId, eiMetadata.getMeta(FIELD_SPEC_ID)));
map.put(FIELD_SPEC, StringUtils.toString(spec, eiMetadata.getMeta(FIELD_SPEC)));
map.put(FIELD_MATERIAL, StringUtils.toString(material, eiMetadata.getMeta(FIELD_MATERIAL)));
map.put(FIELD_UNIT, StringUtils.toString(unit, eiMetadata.getMeta(FIELD_UNIT)));
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_RECEIVE_QTY, StringUtils.toString(receiveQty, eiMetadata.getMeta(FIELD_RECEIVE_QTY)));
map.put(FIELD_QUALIFY_QTY, StringUtils.toString(qualifyQty, eiMetadata.getMeta(FIELD_QUALIFY_QTY)));
map.put(FIELD_UNQUALIFY_QTY, StringUtils.toString(unqualifyQty, eiMetadata.getMeta(FIELD_UNQUALIFY_QTY)));
map.put(FIELD_RECEIVE_UNIT_WEIGHT, StringUtils.toString(receiveUnitWeight, eiMetadata.getMeta(FIELD_RECEIVE_UNIT_WEIGHT)));
map.put(FIELD_RECEIVE_WEIGHT, StringUtils.toString(receiveWeight, eiMetadata.getMeta(FIELD_RECEIVE_WEIGHT)));
map.put(FIELD_DEAL_USER_ID, StringUtils.toString(dealUserId, eiMetadata.getMeta(FIELD_DEAL_USER_ID)));
map.put(FIELD_DEAL_USER_NAME, StringUtils.toString(dealUserName, eiMetadata.getMeta(FIELD_DEAL_USER_NAME)));
map.put(FIELD_DEAL_DATE, StringUtils.toString(dealDate, eiMetadata.getMeta(FIELD_DEAL_DATE)));
return map;
}
}
\ No newline at end of file
package com.baosight.hpjx.hp.zl.service;
import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation;
import com.baosight.hpjx.core.constant.CommonConstant;
import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.core.security.UserSessionUtils;
import com.baosight.hpjx.hp.constant.HPConstant;
import com.baosight.hpjx.hp.zl.constant.HpZlSqlConst;
import com.baosight.hpjx.hp.zl.domain.HPZL002;
import com.baosight.hpjx.hp.zl.utils.HpZlUtils;
import com.baosight.hpjx.util.AssertUtils;
import com.baosight.hpjx.util.DateUtils;
import com.baosight.hpjx.util.EiInfoUtils;
import com.baosight.hpjx.util.LogUtils;
import com.baosight.hpjx.util.MapUtils;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.service.impl.ServiceBase;
import java.util.List;
import java.util.Map;
/**
* 入库质检
*
* @author:songx
* @date:2024/9/24,17:47
*/
public class ServiceHPZL002 extends ServiceBase {
/**
* 画面初始化
*
* @param inInfo
* @return
*/
@Override
public EiInfo initLoad(EiInfo inInfo) {
try {
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPZL002().eiMetadata);
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
/**
* 查询操作.
*/
@Override
public EiInfo query(EiInfo inInfo) {
try {
Map queryMap = EiInfoUtils.getFirstRow(inInfo);
queryMap.put(HPZL002.FIELD_RECEIPT_DATE,
DateUtils.formatShort(queryMap.get(HPZL002.FIELD_RECEIPT_DATE)));
inInfo = super.query(inInfo, HPZL002.QUERY, new HPZL002());
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
/**
* 删除操作
*
* @param inInfo
* @return
*/
public EiInfo remove(EiInfo inInfo) {
try {
List<HPZL002> fZl002s = MapUtils.toDaoEPBases(inInfo, HPZL002.class);
// db数据
Map<String, HPZL002> dbZl002Map = HpZlUtils.HpZl002.lockGetDataEp(fZl002s);
// 数据校验
this.checkRemoveData(fZl002s, dbZl002Map);
// 保存数据
this.removeData(fZl002s);
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + fZl002s.size() + "]条数据删除成功!");
} catch (Exception e) {
LogUtils.setMsg(inInfo, e, "删除失败");
}
return inInfo;
}
/**
* 数据校验
*
* @param fZl002s
* @param dbFw002Map
*/
private void checkRemoveData(List<HPZL002> fZl002s, Map<String, HPZL002> dbFw002Map) {
for (HPZL002 fZl002 : fZl002s) {
String checkNo = fZl002.getCheckNo();
HPZL002 dbZl002 = dbFw002Map.get(checkNo);
this.checkData(checkNo, dbZl002);
}
}
/**
* 数据保存
*
* @param fZl002s
*/
private void removeData(List<HPZL002> fZl002s) {
for (HPZL002 fZl002 : fZl002s) {
fZl002.setDeleteFlag(CommonConstant.YesNo.YES_1);
DaoUtils.update(HPZL002.DELETE, fZl002.toMap());
}
}
/**
* 检查状态
*
* @param inInfo
* @return
*/
public EiInfo checkStatus(EiInfo inInfo) {
try {
Map queryMap = EiInfoUtils.getFirstRow(inInfo);
String checkNo = MapUtils.getString(queryMap, HPZL002.FIELD_CHECK_NO);
HPZL002 dbZl002 = HpZlUtils.HpZl002.lockGetData(checkNo);
this.checkData(checkNo, dbZl002);
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "操作失败");
}
return inInfo;
}
/**
* 处理
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "客户回访", operType = "审核")
public EiInfo deal(EiInfo inInfo) {
try {
Map queryMap = EiInfoUtils.getFirstRow(inInfo);
List<HPZL002> fZl002s = MapUtils.toDaoEPBases(inInfo, HPZL002.class);
// db数据
Map<String, HPZL002> dbZl002Map = HpZlUtils.HpZl002.lockGetDataEp(fZl002s);
// 数据校验
this.checkDealData(fZl002s, dbZl002Map);
// 保存数据
this.dealData(fZl002s);
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + fZl002s.size() + "]条数据处理成功!");
} catch (Exception e) {
LogUtils.setMsg(inInfo, e, "处理失败");
}
return inInfo;
}
/**
* 数据校验
*
* @param fZl002s
* @param dbZl002Map
*/
private void checkDealData(List<HPZL002> fZl002s, Map<String, HPZL002> dbZl002Map) {
for (HPZL002 fZl002 : fZl002s) {
String checkNo = fZl002.getCheckNo();
HPZL002 dbZl002 = dbZl002Map.get(checkNo);
this.checkData(checkNo, dbZl002);
}
}
/**
* 数据保存
*
* @param fZl002s
*/
private void dealData(List<HPZL002> fZl002s) {
for (HPZL002 fZl002 : fZl002s) {
fZl002.setStatus(HPConstant.dealStatus.S1);
fZl002.setDealUserId(UserSessionUtils.getLoginName());
fZl002.setDealUserName(UserSessionUtils.getLoginCName());
fZl002.setDealDate(DateUtils.shortDateTime());
DaoUtils.update(HpZlSqlConst.HpZl002.UPDATE_DEAL, fZl002.toMap());
}
}
/**
* 数据校验
*
* @param checkNo
* @param dbZl002
*/
private void checkData(String checkNo, HPZL002 dbZl002) {
AssertUtils.isNull(dbZl002, String.format("质检单号[%s]不存在", checkNo));
AssertUtils.isNotEquals(dbZl002.getDeleteFlag(), CommonConstant.YesNo.NO_0,
String.format("质检单号【%s】不是\"未删除\"状态,不允许操作", checkNo));
AssertUtils.isNotEquals(dbZl002.getStatus(), HPConstant.dealStatus.S0,
String.format("质检单号【%s】不是\"待处理\"状态,不允许操作", checkNo));
}
}
package com.baosight.hpjx.hp.zl.service;
import com.baosight.hpjx.core.constant.CommonConstant;
import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.hp.constant.HPConstant;
import com.baosight.hpjx.hp.zl.domain.HPZL002;
import com.baosight.hpjx.hp.zl.tools.HPZLTools;
import com.baosight.hpjx.hp.zl.utils.HpZlUtils;
import com.baosight.hpjx.util.AssertUtils;
import com.baosight.hpjx.util.DateUtils;
import com.baosight.hpjx.util.EiInfoUtils;
import com.baosight.hpjx.util.LogUtils;
import com.baosight.hpjx.util.MapUtils;
import com.baosight.hpjx.util.StringUtils;
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.service.impl.ServiceEPBase;
import com.baosight.iplat4j.ed.util.SequenceGenerator;
import java.util.Map;
/**
* 新增修改
*
* @author:songx
* @date:2022/7/11,11:08
*/
public class ServiceHPZL002A extends ServiceEPBase {
/**
* 初始化
*
* @param inInfo
* @return
*/
@Override
public EiInfo initLoad(EiInfo inInfo) {
try {
this.setBaseInfo(inInfo);
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
/**
* 保存操作.
*
* @param inInfo
* @return
*/
public EiInfo save(EiInfo inInfo) {
try {
HPZL002 fZl002 = MapUtils.toDaoEPBase(inInfo, HPZL002.class);
fZl002.setReceiptDate(DateUtils.formatShort(fZl002.getReceiptDate()));
// 计算不合格数量
fZl002.setUnqualifyQty(fZl002.getReceiveQty().subtract(fZl002.getQualifyQty()));
if (StringUtils.isBlank(fZl002.getCheckNo())) {
this.add(fZl002);
} else {
this.modify(fZl002);
}
// 回填实体信息,移动端更新数据使用
inInfo.set("detail", fZl002);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("保存成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "保存失败");
}
return inInfo;
}
/**
* 新增
*
* @param fZl002
*/
private void add(HPZL002 fZl002) {
fZl002.setCheckNo(SequenceGenerator.getNextSequence(HPConstant.SequenceId.CHECK_NO));
fZl002.setStatus(HPConstant.dealStatus.S0);
fZl002.setDeleteFlag(CommonConstant.YesNo.NO_0);
DaoUtils.insert(HPZL002.INSERT, fZl002);
}
/**
* 修改数据
*
* @param fZl002
*/
private void modify(HPZL002 fZl002) {
HPZL002 dbZl002 = HpZlUtils.HpZl002.lockGetData(fZl002.getCheckNo());
this.checkData(fZl002, dbZl002);
DaoUtils.update(HPZL002.UPDATE, fZl002);
}
/**
* 设置信息
*
* @param inInfo
*/
public void setBaseInfo(EiInfo inInfo) {
Map queryRow = EiInfoUtils.getFirstRow(inInfo);
String checkNo = MapUtils.getString(queryRow, HPZL002.FIELD_CHECK_NO);
if (StringUtils.isBlank(checkNo)) {
return;
}
EiBlock resultBlock = new EiBlock(EiConstant.resultBlock);
resultBlock.addRow(HPZLTools.HpZl002.get(checkNo));
resultBlock.addBlockMeta(new HPZL002().eiMetadata);
inInfo.setBlock(resultBlock);
}
/**
* 数据校验
*
* @param fZl002
* @param dbZl002
*/
private void checkData(HPZL002 fZl002, HPZL002 dbZl002) {
AssertUtils.isNull(dbZl002, String.format("售后服务单【%s】不存在", fZl002.getCheckNo()));
AssertUtils.isNotEquals(dbZl002.getDeleteFlag(), CommonConstant.YesNo.NO_0,
String.format("售后服务单【%s】不是\"未删除\"状态,不允许操作", fZl002.getCheckNo()));
AssertUtils.isNotEquals(dbZl002.getStatus(), HPConstant.dealStatus.S0,
String.format("售后服务单【%s】不是\"待处理\"状态,不允许操作", fZl002.getCheckNo()));
}
}
<?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="HPZL002">
<sql id="column">
ID as "id", <!-- -->
COMPANY_CODE as "companyCode", <!-- 企业编码 预留 -->
DEP_CODE as "depCode", <!-- 部门编码 -->
CREATED_BY as "createdBy", <!-- 记录创建者 -->
CREATED_NAME as "createdName", <!-- 记录创建名称 -->
CREATED_TIME as "createdTime", <!-- 记录创建时间 -->
UPDATED_BY as "updatedBy", <!-- 记录修改者 -->
UPDATED_NAME as "updatedName", <!-- 记录修改名称 -->
UPDATED_TIME as "updatedTime", <!-- 记录修改时间 -->
DELETE_FLAG as "deleteFlag", <!-- 0-未删除,1-已删除 -->
STATUS as "status", <!-- 状态:0-质检中,1-质检完成 -->
RECEIPT_DATE as "receiptDate", <!-- 单据日期 -->
CHECK_NO as "checkNo", <!-- 检查单号 -->
RECEIVE_NO as "receiveNo", <!-- 收货单号 -->
INVENT_TYPE as "inventType", <!-- 存货类型 -->
INVENT_CODE as "inventCode", <!-- 存货编码 -->
INVENT_NAME as "inventName", <!-- 存货名称 -->
SPEC_ID as "specId", <!-- 规格ID -->
SPEC as "spec", <!-- 规格 -->
MATERIAL as "material", <!-- 材质 -->
UNIT as "unit", <!-- 单位 -->
LENGTH as "length", <!-- 长度 -->
WIDTH as "width", <!-- 宽度 -->
THICK as "thick", <!-- 厚度 -->
RECEIVE_QTY as "receiveQty", <!-- 收货数量 -->
QUALIFY_QTY as "qualifyQty", <!-- 合格数量 -->
UNQUALIFY_QTY as "unqualifyQty", <!-- 不合格数量 -->
RECEIVE_UNIT_WEIGHT as "receiveUnitWeight", <!-- 收货单重 -->
RECEIVE_WEIGHT as "receiveWeight", <!-- 收货重量 -->
DEAL_USER_ID as "dealUserId", <!-- 处理人ID -->
DEAL_USER_NAME as "dealUserName", <!-- 处理人姓名 -->
DEAL_DATE as "dealDate" <!-- 处理时间 -->
</sql>
<sql id="condition">
AND DELETE_FLAG = 0
<include refid="idCondition"/>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdName">
CREATED_NAME = #createdName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
CREATED_TIME = #createdTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy">
UPDATED_BY = #updatedBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedName">
UPDATED_NAME = #updatedName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
UPDATED_TIME = #updatedTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="status">
STATUS = #status#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="receiptDate">
RECEIPT_DATE = #receiptDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="receiveNo">
RECEIVE_NO = #receiveNo#
</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="specId">
SPEC_ID = #specId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="spec">
SPEC = #spec#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="material">
MATERIAL = #material#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="unit">
UNIT = #unit#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="dealUserId">
DEAL_USER_ID = #dealUserId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="dealUserName">
DEAL_USER_NAME = #dealUserName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="dealDate">
DEAL_DATE = #dealDate#
</isNotEmpty>
</sql>
<sql id="idCondition">
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="ids">
ID IN <iterate close=")" open="(" conjunction="," property="ids">#ids[]#</iterate>
</isNotEmpty>
<isNotEmpty prepend=" AND " property="checkNo">
CHECK_NO = #checkNo#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="checkNos">
CHECK_NO IN <iterate close=")" open="(" conjunction="," property="checkNos">#checkNos[]#</iterate>
</isNotEmpty>
</sql>
<sql id="orderBy">
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
ID DESC
</isEmpty>
</dynamic>
</sql>
<select id="query" resultClass="com.baosight.hpjx.hp.zl.domain.HPZL002">
SELECT
<include refid="column"/>
FROM ${hpjxSchema}.T_HPZL002 WHERE 1=1
<include refid="condition"/>
<include refid="orderBy"/>
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hpjxSchema}.T_HPZL002 WHERE 1=1
<include refid="condition"/>
</select>
<insert id="insert">
INSERT INTO ${hpjxSchema}.T_HPZL002 (
COMPANY_CODE, <!-- 企业编码 预留 -->
DEP_CODE, <!-- 部门编码 -->
CREATED_BY, <!-- 记录创建者 -->
CREATED_NAME, <!-- 记录创建名称 -->
CREATED_TIME, <!-- 记录创建时间 -->
UPDATED_BY, <!-- 记录修改者 -->
UPDATED_NAME, <!-- 记录修改名称 -->
UPDATED_TIME, <!-- 记录修改时间 -->
DELETE_FLAG, <!-- 0-未删除,1-已删除 -->
STATUS, <!-- 状态:0-质检中,1-质检完成 -->
RECEIPT_DATE, <!-- 单据日期 -->
CHECK_NO, <!-- 检查单号 -->
RECEIVE_NO, <!-- 收货单号 -->
INVENT_TYPE, <!-- 存货类型 -->
INVENT_CODE, <!-- 存货编码 -->
INVENT_NAME, <!-- 存货名称 -->
SPEC_ID, <!-- 规格ID -->
SPEC, <!-- 规格 -->
MATERIAL, <!-- 材质 -->
UNIT, <!-- 单位 -->
LENGTH, <!-- 长度 -->
WIDTH, <!-- 宽度 -->
THICK, <!-- 厚度 -->
RECEIVE_QTY, <!-- 收货数量 -->
QUALIFY_QTY, <!-- 合格数量 -->
UNQUALIFY_QTY, <!-- 不合格数量 -->
RECEIVE_UNIT_WEIGHT, <!-- 收货单重 -->
RECEIVE_WEIGHT, <!-- 收货重量 -->
DEAL_USER_ID, <!-- 处理人ID -->
DEAL_USER_NAME, <!-- 处理人姓名 -->
DEAL_DATE <!-- 处理时间 -->
) VALUES (
#companyCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #deleteFlag#, #status#, #receiptDate#, #checkNo#, #receiveNo#, #inventType#, #inventCode#, #inventName#, #specId#, #spec#, #material#, #unit#, #length#, #width#, #thick#, #receiveQty#, #qualifyQty#, #unqualifyQty#, #receiveUnitWeight#, #receiveWeight#, #dealUserId#, #dealUserName#, #dealDate#
)
</insert>
<delete id="delete">
UPDATE ${hpjxSchema}.T_HPZL002 SET DELETE_FLAG = 1 WHERE ID = #id#
</delete>
<update id="update">
UPDATE ${hpjxSchema}.T_HPZL002
SET
RECEIPT_DATE = #receiptDate#, <!-- 单据日期 -->
RECEIVE_NO = #receiveNo#, <!-- 收货单号 -->
INVENT_NAME = #inventName#, <!-- 存货名称 -->
SPEC = #spec#, <!-- 规格 -->
MATERIAL = #material#, <!-- 材质 -->
UNIT = #unit#, <!-- 单位 -->
LENGTH = #length#, <!-- 长度 -->
WIDTH = #width#, <!-- 宽度 -->
THICK = #thick#, <!-- 厚度 -->
RECEIVE_QTY = #receiveQty#, <!-- 收货数量 -->
QUALIFY_QTY = #qualifyQty#, <!-- 合格数量 -->
UNQUALIFY_QTY = #unqualifyQty#, <!-- 不合格数量 -->
RECEIVE_UNIT_WEIGHT = #receiveUnitWeight#, <!-- 收货单重 -->
RECEIVE_WEIGHT = #receiveWeight#, <!-- 收货重量 -->
<include refid="SqlBase.updateRevise"/>
WHERE CHECK_NO = #checkNo#
</update>
<!-- 行锁 -->
<update id="lock">
UPDATE ${hpjxSchema}.T_HPZL002
SET CREATED_TIME = CREATED_TIME
WHERE 1=1
<include refid="idCondition"/>
</update>
<!-- 修改 -->
<update id="updateDeal">
UPDATE ${hpjxSchema}.T_HPZL002
SET
STATUS = #status#,
DEAL_USER_ID = #dealUserId#, <!-- 处理人ID -->
DEAL_USER_NAME = #dealUserName#, <!-- 处理人名称 -->
DEAL_DATE = #dealDate#,
<include refid="SqlBase.updateRevise"/>
WHERE CHECK_NO = #checkNo#
</update>
</sqlMap>
\ No newline at end of file
...@@ -2,7 +2,9 @@ package com.baosight.hpjx.hp.zl.tools; ...@@ -2,7 +2,9 @@ package com.baosight.hpjx.hp.zl.tools;
import com.baosight.hpjx.core.dao.DaoBase; import com.baosight.hpjx.core.dao.DaoBase;
import com.baosight.hpjx.hp.constant.HPSqlConstant; import com.baosight.hpjx.hp.constant.HPSqlConstant;
import com.baosight.hpjx.hp.zl.constant.HpZlSqlConst;
import com.baosight.hpjx.hp.zl.domain.HPZL001; import com.baosight.hpjx.hp.zl.domain.HPZL001;
import com.baosight.hpjx.hp.zl.domain.HPZL002;
import com.baosight.hpjx.hp.zl.domain.HPZL004; import com.baosight.hpjx.hp.zl.domain.HPZL004;
import com.baosight.hpjx.hp.zl.domain.HPZL004C; import com.baosight.hpjx.hp.zl.domain.HPZL004C;
import com.baosight.hpjx.util.AssertUtils; import com.baosight.hpjx.util.AssertUtils;
...@@ -67,6 +69,82 @@ public class HPZLTools { ...@@ -67,6 +69,82 @@ public class HPZLTools {
return CollectionUtils.isEmpty(results)? null:results; return CollectionUtils.isEmpty(results)? null:results;
} }
/**
* 入库质检单
*
* @author:songx
* @date:2024/8/13,10:20
*/
public static class HpZl002 {
/**
* 锁
*
* @param checkNo
* @return
*/
public static void lock(String checkNo) {
if (StringUtils.isBlank(checkNo)) {
return;
}
Map queryMap = new HashMap();
queryMap.put(HPZL002.FIELD_CHECK_NO, checkNo);
DaoBase.getInstance().update(HPSqlConstant.HpZl002.LOCK, queryMap);
}
/**
* 锁
*
* @param checkNos
* @return
*/
public static void lock(List<String> checkNos) {
if (CollectionUtils.isEmpty(checkNos)) {
return;
}
Map queryMap = new HashMap();
queryMap.put("checkNos", checkNos);
DaoBase.getInstance().update(HpZlSqlConst.HpZl002.LOCK, queryMap);
}
/**
* GET
*
* @param checkNo
*/
public static HPZL002 get(String checkNo) {
AssertUtils.isNull(checkNo, "质检单号不能为空");
Map paramMap = new HashMap();
paramMap.put(HPZL002.FIELD_CHECK_NO, checkNo);
List<HPZL002> results = DaoBase.getInstance().query(HPZL002.QUERY, paramMap);
return CollectionUtils.isEmpty(results) ? null : results.get(0);
}
/**
* 查询
*
* @param checkNos
* @return
*/
public static List<HPZL002> list(List<String> checkNos) {
AssertUtils.isEmpty(checkNos, "ID不能为空");
Map<String, Object> paramMap = new HashMap();
paramMap.put("checkNos", checkNos);
return DaoBase.getInstance().query(HPZL002.QUERY, paramMap);
}
/**
* 查询
*
* @param checkNos
* @return
*/
public static Map<String, HPZL002> map(List<String> checkNos) {
List<HPZL002> results = list(checkNos);
return results.stream().collect(Collectors.toMap(HPZL002::getCheckNo, item -> item));
}
}
/** /**
* 整改通知单 * 整改通知单
......
package com.baosight.hpjx.hp.zl.utils; package com.baosight.hpjx.hp.zl.utils;
import com.baosight.hpjx.hp.zl.domain.HPZL002;
import com.baosight.hpjx.hp.zl.domain.HPZL004; import com.baosight.hpjx.hp.zl.domain.HPZL004;
import com.baosight.hpjx.hp.zl.tools.HPZLTools; import com.baosight.hpjx.hp.zl.tools.HPZLTools;
import com.baosight.hpjx.util.ObjectUtils; import com.baosight.hpjx.util.ObjectUtils;
...@@ -17,6 +18,50 @@ public class HpZlUtils { ...@@ -17,6 +18,50 @@ public class HpZlUtils {
* @author:songx * @author:songx
* @date:2024/8/13,16:32 * @date:2024/8/13,16:32
*/ */
public static class HpZl002 {
/**
* 锁并且获取数据
*
* @param checkNo
* @return
*/
public static HPZL002 lockGetData(String checkNo) {
// 锁
HPZLTools.HpZl002.lock(checkNo);
// db数据
return HPZLTools.HpZl002.get(checkNo);
}
/**
* 锁并且获取数据
*
* @param zl002s
* @return
*/
public static Map<String, HPZL002> lockGetDataEp(List<? extends HPZL002> zl002s) {
return lockGetData(ObjectUtils.listEpKey(zl002s, HPZL002.FIELD_CHECK_NO));
}
/**
* 锁并且获取数据
*
* @param checkNos
* @return
*/
public static Map<String, HPZL002> lockGetData(List<String> checkNos) {
// 锁
HPZLTools.HpZl002.lock(checkNos);
// db数据
return HPZLTools.HpZl002.map(checkNos);
}
}
/**
* @author:songx
* @date:2024/8/13,16:32
*/
public static class HpZl004 { public static class HpZl004 {
/** /**
......
...@@ -45,6 +45,7 @@ ...@@ -45,6 +45,7 @@
<sqlMap resource="com/baosight/hpjx/hp/sb/sql/HPSB099.xml"/> <sqlMap resource="com/baosight/hpjx/hp/sb/sql/HPSB099.xml"/>
<!-- 质量管理 --> <!-- 质量管理 -->
<sqlMap resource="com/baosight/hpjx/hp/zl/sql/HPZL002.xml"/>
<sqlMap resource="com/baosight/hpjx/hp/zl/sql/HPZL004.xml"/> <sqlMap resource="com/baosight/hpjx/hp/zl/sql/HPZL004.xml"/>
<sqlMap resource="com/baosight/hpjx/hp/zl/sql/HPZL004A.xml"/> <sqlMap resource="com/baosight/hpjx/hp/zl/sql/HPZL004A.xml"/>
......
...@@ -8,16 +8,7 @@ $(function () { ...@@ -8,16 +8,7 @@ $(function () {
+ 'href="' + downloadHref(item.docId) + '" target="_blank">附件下载</a>'; + 'href="' + downloadHref(item.docId) + '" target="_blank">附件下载</a>';
return template; return template;
} }
}], }]
loadComplete: function (grid) {
// 附件上传
$("#UPLOAD_FILE").on("click", uploadFile);
// 删除
$("#BTN_DELETE").on("click", deleteFunc);
},
dataBound: function () {
}
} }
}; };
...@@ -25,6 +16,10 @@ $(function () { ...@@ -25,6 +16,10 @@ $(function () {
// 查询 // 查询
$("#QUERY").on("click", query); $("#QUERY").on("click", query);
// 附件上传
$("#UPLOAD_FILE").on("click", uploadFile);
// 删除
$("#REMOVE").on("click", remove);
}); });
...@@ -46,47 +41,23 @@ var query = function (e) { ...@@ -46,47 +41,23 @@ var query = function (e) {
/** /**
* 文件上传 * 文件上传
*
* @param id
*/ */
function uploadFile(id) { function uploadFile() {
JSColorbox.open({ let bizId = $("#inqu_status-0-bizId").val();
href: "HPDM099A", let bizType = $("#inqu_status-0-bizType").val();
title: "<div style='text-align: center;'>附件上传</div>", CommonUtils.uploadFile(bizType, bizId, function (res) {
width: "60%", // 刷新列表
height: "50%", resultGrid.dataSource.page(1);
callbackName: uploadFileCallback // 关闭弹窗
}); JSColorbox.close();
}
/**
* 附件上传回调
*
* @param docId
*/
function uploadFileCallback(res) {
let inEiInfo = new EiInfo();
inEiInfo.set("result-0-bizId", $("#inqu_status-0-bizId").val());
inEiInfo.set("result-0-bizType", $("#inqu_status-0-bizType").val());
inEiInfo.set("result-0-docId", res.docId);
inEiInfo.set("result-0-docName", res.docName);
EiCommunicator.send('HPDM099', 'upload', inEiInfo, {
onSuccess(response) {
resultGrid.dataSource.page(1);
},
onFail(errorMessage, status, e) {
NotificationUtil("执行失败!", "error");
}
}, {
async: false
}); });
} }
/** /**
* 删除 * 删除
*/ */
function deleteFunc() { function remove() {
var rows = resultGrid.getCheckedRows(); let rows = resultGrid.getCheckedRows();
if (rows.length == 0) { if (rows.length == 0) {
message("请先勾选数据!"); message("请先勾选数据!");
return; return;
......
...@@ -7,10 +7,10 @@ ...@@ -7,10 +7,10 @@
<EF:EFPage title="附件清单"> <EF:EFPage title="附件清单">
<EF:EFRegion id="inqu" title="查询区域" type="query"> <EF:EFRegion id="inqu" title="查询区域" type="query">
<EF:EFInput cname="业务ID" ename="bizId" blockId="inqu_status" row="0" type="hidden"/>
<EF:EFInput cname="业务类型" ename="bizType" blockId="inqu_status" row="0" type="hidden"/> <EF:EFInput cname="业务类型" ename="bizType" blockId="inqu_status" row="0" type="hidden"/>
<div class="row"> <div class="row">
<EF:EFInput cname="文件名称" ename="docName" blockId="inqu_status" row="0" colWidth="3" /> <EF:EFInput cname="业务ID" ename="bizId" blockId="inqu_status" row="0" colWidth="3" readonly="true"/>
<EF:EFInput cname="文件名称" ename="docName" blockId="inqu_status" row="0" colWidth="3"/>
</div> </div>
</EF:EFRegion> </EF:EFRegion>
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
</EF:EFRegion> </EF:EFRegion>
<EF:EFRegion id="result" title="记录集"> <EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="override" checkMode="single"> <EF:EFGrid blockId="result" autoDraw="override" checkMode="single,row">
<EF:EFColumn ename="id" cname="主键" hidden="true"/> <EF:EFColumn ename="id" cname="主键" hidden="true"/>
<%--<EF:EFColumn ename="docIdPc" cname="主键" hidden="true"/> <%--<EF:EFColumn ename="docIdPc" cname="主键" hidden="true"/>
<EF:EFColumn ename="docIdApp" cname="主键" hidden="true"/>--%> <EF:EFColumn ename="docIdApp" cname="主键" hidden="true"/>--%>
......
$(function () {
IPLATUI.EFGrid = {
"result": {
pageable: {
pageSize: 20,
pageSizes: [20, 50, 100, 200],
},
columns: [{
field: "operator",
template: function (item) {
let status = item.status;
let template = '';
if (status && status == 0) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;" '
+ 'onclick="modify(\'' + item.checkNo + '\')" >修改</a>&nbsp;&nbsp;';
}
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="showFile(\'' + item.checkNo + '\')" >附件清单</a>';
return template;
}
}],
loadComplete: function (grid) {
},
onSuccess: function (e) {
},
onRowClick: function (e) {
}
}
}
// 查询
$("#QUERY").on("click", query);
// 新增
$("#ADD").on("click", add);
// 删除
$("#REMOVE").on("click", remove);
// 处理
$("#DEAL").on("click", deal);
// 键盘按键
downKeyUp();
});
/**
* 页面加载完成
*/
$(window).load(function () {
// 查询
query();
});
/**
* 查询
*/
let query = function () {
resultGrid.dataSource.page(1);
}
/**
* 新增
*/
let add = function () {
addOrUpdate("");
}
/**
* 修改
*/
let modify = function (checkNo) {
let params = "inqu_status-0-checkNo=" + checkNo;
addOrUpdate(params);
}
/**
* 新增
*/
let addOrUpdate = function (params) {
JSColorbox.open({
href: "HPZL002A?" + params,
title: "<div style='text-align: center;'>" + (isBlank(params) ? "新增入库质检单" : "修改入库质检单") + "</div>",
width: "60%",
height: "90%",
callbackName: addOrUpdateCallback
});
}
/**
* 新增成功后回调
*/
let addOrUpdateCallback = function (res) {
// 消息
message(res.msg);
// 刷新列表
query();
// 关闭弹窗
JSColorbox.close();
}
/**
* 删除
*/
function remove() {
var rows = resultGrid.getCheckedRows();
if (rows.length == 0) {
message("请先勾选数据!");
return;
}
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"删除\"操作?", {
ok: function () {
JSUtils.submitGridsData("result", "HPZL002", "remove", true);
}
})
}
/**
* 处理
*/
function deal() {
var rows = resultGrid.getCheckedRows();
if (rows.length == 0) {
message("请先勾选数据!");
return;
}
JSUtils.submitGridsData("result", "HPZL002", "deal", true);
}
/**
* 附件清单
*
* @param bizId
*/
function showFile(bizId) {
CommonUtils.showFile("CONTRACT", bizId);
}
<!DOCTYPE html>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<EF:EFPage title="入库质检单">
<EF:EFRegion id="inqu" title="查询条件">
<div class="row">
<EF:EFDatePicker ename="receiptDate" cname="单据日期" blockId="inqu_status" row="0" colWidth="3"
format="yyyy-MM-dd" readonly="true"/>
<EF:EFSelect ename="status" cname="状态" blockId="inqu_status" row="0" colWidth="3">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="app.comm.dealStatus"/>
</EF:EFSelect>
<EF:EFInput ename="receiveNo" cname="收货单号" blockId="inqu_status" row="0" colWidth="3"/>
<EF:EFInput ename="inventName" cname="存货名称" blockId="inqu_status" row="0" colWidth="3"/>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="明细信息" fitHeight="true">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="row">
<EF:EFColumn ename="id" cname="ID" enable="false" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="120" align="center"/>
<EF:EFColumn ename="checkNo" cname="质检单号" enable="false" width="130" align="center"/>
<EF:EFColumn ename="receiptDate" cname="单据日期" enable="false" width="100" align="center"
editType="date" dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']"/>
<EF:EFComboColumn ename="status" cname="状态" enable="false" width="80" align="center">
<EF:EFCodeOption codeName="app.comm.dealStatus"/>
</EF:EFComboColumn>
<EF:EFColumn ename="receiveNo" cname="收货单号" enable="false" width="100" align="left"/>
<EF:EFColumn ename="inventName" cname="存货名称" enable="false" width="120" align="center" hidden="true"/>
<EF:EFColumn ename="spec" cname="规格" enable="false" width="120" align="center"/>
<EF:EFColumn ename="material" cname="材质" enable="false" width="100" align="left"/>
<EF:EFColumn ename="unit" cname="单位" enable="false" width="100" align="center"/>
<EF:EFColumn ename="length" cname="长度" enable="false" width="100" align="right"/>
<EF:EFColumn ename="width" cname="宽度" enable="false" width="100" align="right"/>
<EF:EFColumn ename="thick" cname="厚度" enable="false" width="100" align="right"/>
<EF:EFColumn ename="receiveQty" cname="收货数量" enable="false" width="100" align="right"/>
<EF:EFColumn ename="qualifyQty" cname="合格数量" enable="false" width="100" align="right"/>
<EF:EFColumn ename="unqualifyQty" cname="不合格数量" enable="false" width="100" align="right"/>
<EF:EFColumn ename="receiveUnitWeight" cname="单重" enable="false" width="100" align="right"/>
<EF:EFColumn ename="receiveWeight" cname="收货重量" enable="false" width="100" align="right"/>
<EF:EFColumn ename="dealUserId" cname="处理人ID" enable="false" width="120" align="center" hidden="true"/>
<EF:EFColumn ename="dealUserName" cname="处理人名称" enable="false" width="120" align="center"/>
<EF:EFColumn ename="dealDate" cname="处理时间" enable="false" width="150" align="center"
editType="datetime" parseFormats="['yyyyMMddHHmmss']" dateFormat="yyyy-MM-dd HH:mm:ss"/>
<EF:EFColumn ename="createdName" cname="创建人" enable="false" width="100" align="center"/>
<EF:EFColumn ename="createdTime" cname="创建时间" enable="false" width="150" align="center"
editType="datetime" parseFormats="['yyyyMMddHHmmss']" dateFormat="yyyy-MM-dd HH:mm:ss"/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
<EF:EFWindow id="dealWindow" title="处理内容" width="50%" height="30%">
<EF:EFRegion id="deal" title="">
<div class="row">
<EF:EFInput blockId="deal" row="0" ename="content" cname="处理内容" colWidth="12" ratio="2:10"
type="textarea" rows="4" required="true"/>
</div>
</EF:EFRegion>
</EF:EFWindow>
$(function () {
IPLATUI.EFGrid = {
"result": {
pageable: false,
exportGrid: false,
toolbarConfig: {
hidden: false,
},
columns: []
}
};
// 确认
$('#SAVE').on('click', save);
// 键盘按键
downKeyUp();
})
/**
* 保存
*/
let save = function () {
let receiptDate = $("#result-0-receiptDate").val();
if (isBlank(receiptDate)) {
message("单据日期不能为空");
return;
}
let receiveQty = $("#result-0-receiveQty").val();
if (!isPositiveNumber(receiveQty)) {
message("收货数量必须是大于的数字");
return;
}
let qualifyQty = $("#result-0-qualifyQty").val();
if (!isPositiveNumber(qualifyQty)) {
message("合格数量必须是大于的数字");
return;
}
let receiveUnitWeight = $("#result-0-receiveUnitWeight").val();
if (!isPositiveNumber(receiveUnitWeight)) {
message("单重必须是大于的数字");
return;
}
let receiveWeight = $("#result-0-receiveWeight").val();
if (!isPositiveNumber(receiveWeight)) {
message("收货重量必须是大于的数字");
return;
}
JSUtils.submitGridsData("", "HPZL002A", "save", true, function (res) {
if (res.status > -1) {
parent.JSColorbox.setValueCallback(res);
} else {
message(res.msg);
}
});
}
<!DOCTYPE html>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<EF:EFPage title="入库质检单详情">
<EF:EFRegion id="result" title="数据区域">
<EF:EFInput cname="ID" blockId="result" ename="id" row="0" type="hidden"/>
<div class="row">
<EF:EFInput ename="checkNo" cname="质检单号" blockId="result" row="0" colWidth="6" ratio="2:10"
required="true" readonly="true"/>
<EF:EFDatePicker ename="receiptDate" cname="单据日期" blockId="result" row="0" colWidth="6" ratio="2:10"
format="yyyy-MM-dd" readonly="true"/>
</div>
<div class="row">
<EF:EFInput ename="receiveNo" cname="收货单号" blockId="result" row="0" colWidth="6" ratio="2:10"/>
<EF:EFInput ename="inventName" cname="存货名称" blockId="result" row="0" colWidth="6" ratio="2:10"/>
</div>
<div class="row">
<EF:EFInput ename="spec" cname="规格" blockId="result" row="0" colWidth="6" ratio="2:10"/>
<EF:EFInput ename="material" cname="材质" blockId="result" row="0" colWidth="6" ratio="2:10"/>
</div>
<div class="row">
<EF:EFInput ename="unit" cname="单位" blockId="result" row="0" colWidth="6" ratio="2:10"/>
<EF:EFInput ename="length" cname="长度(MM)" blockId="result" row="0" colWidth="6" ratio="2:10"/>
</div>
<div class="row">
<EF:EFInput ename="width" cname="宽度(MM)" blockId="result" row="0" colWidth="6" ratio="2:10"/>
<EF:EFInput ename="thick" cname="厚度(MM)" blockId="result" row="0" colWidth="6" ratio="2:10"/>
</div>
<div class="row">
<EF:EFInput ename="receiveQty" cname="收货数量" blockId="result" row="0" colWidth="6" ratio="2:10"/>
<EF:EFInput ename="qualifyQty" cname="合格数量" blockId="result" row="0" colWidth="6" ratio="2:10"/>
</div>
<div class="row">
<EF:EFInput ename="receiveUnitWeight" cname="单重" blockId="result" row="0" colWidth="6" ratio="2:10"/>
<EF:EFInput ename="receiveWeight" cname="收货重量" blockId="result" row="0" colWidth="6" ratio="2:10"/>
</div>
<br/>
<span style="color: red; ">说明:质检单号由系统自动生成</span><br>
</EF:EFRegion>
</EF:EFPage>
...@@ -536,6 +536,26 @@ function loadChange(grid,e,field) { ...@@ -536,6 +536,26 @@ function loadChange(grid,e,field) {
(function ($) { (function ($) {
/** /**
* 附件清单
*
* @param bizType
* @param bizId
*/
function showFile(bizType, bizId) {
let params = {
"inqu_status-0-bizType": bizType,
"inqu_status-0-bizId": bizId
}
JSColorbox.open({
href: "HPDM099",
title: "<div style='text-align: center;'>附件清单-HPDM099</div>",
width: "80%",
height: "80%",
params: params
});
}
/**
* 上传文件 * 上传文件
* *
* @param bizType * @param bizType
...@@ -592,6 +612,7 @@ function loadChange(grid,e,field) { ...@@ -592,6 +612,7 @@ function loadChange(grid,e,field) {
// export 到全局作用域 window对象 // export 到全局作用域 window对象
$.extend(window, { $.extend(window, {
CommonUtils: { CommonUtils: {
showFile: showFile,
uploadFile: uploadFile, uploadFile: uploadFile,
isBlank: isBlank, isBlank: isBlank,
importData: importData importData: importData
......
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