Commit e0739bbb by 江和松

1.采购入库单功能提交

2.生产领料单功能提交
parent 674abb63
package com.baosight.hpjx.hp.kc.service;
import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.common.HPConstants;
import com.baosight.hpjx.common.InventTypeEnun;
import com.baosight.hpjx.hp.kc.domain.HPKC001;
import com.baosight.hpjx.hp.kc.domain.HPKC001;
import com.baosight.hpjx.hp.pz.domain.HPPZ007;
import com.baosight.hpjx.hp.pz.domain.THppz004;
import com.baosight.hpjx.util.CommonMethod;
import com.baosight.hpjx.util.StringUtil;
import com.baosight.hpjx.util.contants.ACConstants;
import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.service.impl.ServiceBase;
import org.apache.commons.lang3.StringUtils;
import java.util.*;
import java.util.stream.Collectors;
/**
* @author YK
* @date 2024年01月09日 10:18
*/
public class ServiceHPKC001 extends ServiceBase {
/**
* 画面初始化.
*/
@Override
public EiInfo initLoad(EiInfo inInfo) {
HPKC001 HPKC001 = new HPKC001();
EiInfo outInfo = super.initLoad(inInfo, HPKC001);
outInfo.getBlock(EiConstant.resultBlock).getRows().clear();
CommonMethod.initBlock(outInfo, Arrays.asList(DdynamicEnum.WH_RECORD_BLOCK_ID), null);
CommonMethod.initBlock(outInfo, Arrays.asList(DdynamicEnum.WH_RECORD_QUERY_BLOCK_ID), null);
EiBlock block = outInfo.addBlock(EiConstant.queryBlock);
block.setCell(ACConstants.ROW_CODE_0, ACConstants.PARAM_WH_CODE, outInfo.getBlock(ACConstants.WH_CODE_BLOCK_ID).getRow(ACConstants.ROW_CODE_0).get(ACConstants.FIELD_VALUE));
block.setCell(ACConstants.ROW_CODE_0, ACConstants.PARAM_WH_CODE, outInfo.getBlock(ACConstants.WH_CODE_QUERY_BLOCK_ID).getRow(ACConstants.ROW_CODE_0).get(ACConstants.FIELD_VALUE));
outInfo.setBlock(InventTypeEnun.generatorEiBlock());
return outInfo;
}
/**
* 查询操作.
*/
@Override
public EiInfo query(EiInfo inInfo) {
String documentTime = inInfo.getCellStr(EiConstant.queryBlock,0,"documentTime");
if(StringUtils.isNotBlank(documentTime)){
inInfo.setCell(EiConstant.queryBlock,0,"documentTime", StringUtil.removeHorizontalLine(documentTime));
}
/* 调用EI查询方法.*/
return super.query(inInfo, "HPKC001.query", new HPKC001());
}
/**
* 新增操作.
*/
@Override
public EiInfo insert(EiInfo inInfo) {
try {
CommonMethod.creatorInfo(inInfo,EiConstant.resultBlock);
for (int i = 0; i < inInfo.getBlock(EiConstant.resultBlock).getRowCount(); i++) {
String documentTime = inInfo.getCellStr(EiConstant.resultBlock,i,"documentTime");
if(StringUtils.isNotBlank(documentTime)){
inInfo.setCell(EiConstant.resultBlock,i,"documentTime", StringUtil.removeHorizontalLine(documentTime));
}
inInfo.setCell(EiConstant.resultBlock,i,"status", 1);
inInfo.setCell(EiConstant.resultBlock,i,"approvalStatus", 0);
super.insert(inInfo,"HPKC001.insert");
}
} catch (PlatException e) {
inInfo.setStatus(EiConstant.STATUS_FAILURE);
inInfo.setMsg("操作失败!原因参见详细错误描述!");
inInfo.setDetailMsg(e.getMessage());
logError("新增失败", e.getMessage());
return inInfo;
}
return query(inInfo);
}
/**
* 修改操作.
*/
@Override
public EiInfo update(EiInfo inInfo) {
try {
CommonMethod.creatorInfo(inInfo,EiConstant.resultBlock);
HPKC001 hpkc001 = new HPKC001();
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
for (int i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
hpkc001.fromMap(map);
String documentTime = inInfo.getCellStr(EiConstant.resultBlock,i,"documentTime");
if(StringUtils.isNotBlank(documentTime)){
inInfo.setCell(EiConstant.resultBlock,i,"documentTime", StringUtil.removeHorizontalLine(documentTime));
}
this.dao.update("HPKC001.update", hpkc001.toMap());
}
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsg("修改成功!");
} catch (PlatException e) {
inInfo.setStatus(EiConstant.STATUS_FAILURE);
inInfo.setMsg("操作失败!原因参见详细错误描述!");
inInfo.setDetailMsg(e.getMessage());
logError("修改失败", e.getMessage());
return inInfo;
}
return query(inInfo);
}
/**
* 删除操作.
*/
@Override
public EiInfo delete(EiInfo eiInfo) {
HPKC001 HPKC001 = new HPKC001();
EiBlock eiBlock = eiInfo.getBlock(EiConstant.resultBlock);
try {
for (int i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
HPKC001.fromMap(map);
this.dao.delete("HPKC001.delete", HPKC001.toMap());
}
} catch (PlatException e) {
eiInfo.setStatus(EiConstant.STATUS_FAILURE);
eiInfo.setMsg("删除失败,原因参见详细错误描述!");
eiInfo.setDetailMsg(e.getMessage());
logError("删除失败!", e.getMessage());
return eiInfo;
}
eiInfo.setStatus(EiConstant.STATUS_SUCCESS);
eiInfo.setMsg("删除成功!");
return eiInfo;
}
public EiInfo queryMaterialTypeSetName(EiInfo eiInfo) {
eiInfo.setBlock(InventTypeEnun.generatorEiBlock());
return eiInfo;
}
public EiInfo queryWhCodeSetName(EiInfo eiInfo) {
CommonMethod.initBlock(eiInfo, Arrays.asList(DdynamicEnum.WH_RECORD_BLOCK_ID), null);
return eiInfo;
}
}
package com.baosight.hpjx.hp.kc.service;
import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.common.InventTypeEnun;
import com.baosight.hpjx.hp.kc.domain.HPKC002;
import com.baosight.hpjx.util.CommonMethod;
import com.baosight.hpjx.util.StringUtil;
import com.baosight.hpjx.util.contants.ACConstants;
import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.service.impl.ServiceBase;
import org.apache.commons.lang3.StringUtils;
import java.util.Arrays;
import java.util.Map;
/**
* @author YK
* @date 2024年01月09日 10:18
*/
public class ServiceHPKC002 extends ServiceBase {
/**
* 画面初始化.
*/
@Override
public EiInfo initLoad(EiInfo inInfo) {
HPKC002 HPKC002 = new HPKC002();
EiInfo outInfo = super.initLoad(inInfo, HPKC002);
outInfo.getBlock(EiConstant.resultBlock).getRows().clear();
CommonMethod.initBlock(outInfo, Arrays.asList(DdynamicEnum.WH_RECORD_BLOCK_ID), null);
CommonMethod.initBlock(outInfo, Arrays.asList(DdynamicEnum.WH_RECORD_QUERY_BLOCK_ID), null);
EiBlock block = outInfo.addBlock(EiConstant.queryBlock);
block.setCell(ACConstants.ROW_CODE_0, ACConstants.PARAM_WH_CODE, outInfo.getBlock(ACConstants.WH_CODE_BLOCK_ID).getRow(ACConstants.ROW_CODE_0).get(ACConstants.FIELD_VALUE));
block.setCell(ACConstants.ROW_CODE_0, ACConstants.PARAM_WH_CODE, outInfo.getBlock(ACConstants.WH_CODE_QUERY_BLOCK_ID).getRow(ACConstants.ROW_CODE_0).get(ACConstants.FIELD_VALUE));
outInfo.setBlock(InventTypeEnun.generatorEiBlock());
return outInfo;
}
/**
* 查询操作.
*/
@Override
public EiInfo query(EiInfo inInfo) {
String documentTime = inInfo.getCellStr(EiConstant.queryBlock,0,"documentTime");
if(StringUtils.isNotBlank(documentTime)){
inInfo.setCell(EiConstant.queryBlock,0,"documentTime", StringUtil.removeHorizontalLine(documentTime));
}
/* 调用EI查询方法.*/
return super.query(inInfo, "HPKC002.query", new HPKC002());
}
/**
* 新增操作.
*/
@Override
public EiInfo insert(EiInfo inInfo) {
try {
CommonMethod.creatorInfo(inInfo,EiConstant.resultBlock);
for (int i = 0; i < inInfo.getBlock(EiConstant.resultBlock).getRowCount(); i++) {
String documentTime = inInfo.getCellStr(EiConstant.resultBlock,i,"documentTime");
if(StringUtils.isNotBlank(documentTime)){
inInfo.setCell(EiConstant.resultBlock,i,"documentTime", StringUtil.removeHorizontalLine(documentTime));
}
inInfo.setCell(EiConstant.resultBlock,i,"status", 1);
inInfo.setCell(EiConstant.resultBlock,i,"approvalStatus", 0);
super.insert(inInfo,"HPKC002.insert");
}
} catch (PlatException e) {
inInfo.setStatus(EiConstant.STATUS_FAILURE);
inInfo.setMsg("操作失败!原因参见详细错误描述!");
inInfo.setDetailMsg(e.getMessage());
logError("新增失败", e.getMessage());
return inInfo;
}
return query(inInfo);
}
/**
* 修改操作.
*/
@Override
public EiInfo update(EiInfo inInfo) {
try {
CommonMethod.creatorInfo(inInfo,EiConstant.resultBlock);
HPKC002 hpkc002 = new HPKC002();
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
for (int i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
hpkc002.fromMap(map);
String documentTime = inInfo.getCellStr(EiConstant.resultBlock,i,"documentTime");
if(StringUtils.isNotBlank(documentTime)){
inInfo.setCell(EiConstant.resultBlock,i,"documentTime", StringUtil.removeHorizontalLine(documentTime));
}
this.dao.update("HPKC002.update", hpkc002.toMap());
}
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsg("修改成功!");
} catch (PlatException e) {
inInfo.setStatus(EiConstant.STATUS_FAILURE);
inInfo.setMsg("操作失败!原因参见详细错误描述!");
inInfo.setDetailMsg(e.getMessage());
logError("修改失败", e.getMessage());
return inInfo;
}
return query(inInfo);
}
/**
* 删除操作.
*/
@Override
public EiInfo delete(EiInfo eiInfo) {
HPKC002 HPKC002 = new HPKC002();
EiBlock eiBlock = eiInfo.getBlock(EiConstant.resultBlock);
try {
for (int i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
HPKC002.fromMap(map);
this.dao.delete("HPKC002.delete", HPKC002.toMap());
}
} catch (PlatException e) {
eiInfo.setStatus(EiConstant.STATUS_FAILURE);
eiInfo.setMsg("删除失败,原因参见详细错误描述!");
eiInfo.setDetailMsg(e.getMessage());
logError("删除失败!", e.getMessage());
return eiInfo;
}
eiInfo.setStatus(EiConstant.STATUS_SUCCESS);
eiInfo.setMsg("删除成功!");
return eiInfo;
}
public EiInfo queryMaterialTypeSetName(EiInfo eiInfo) {
eiInfo.setBlock(InventTypeEnun.generatorEiBlock());
return eiInfo;
}
public EiInfo queryWhCodeSetName(EiInfo eiInfo) {
CommonMethod.initBlock(eiInfo, Arrays.asList(DdynamicEnum.WH_RECORD_BLOCK_ID), null);
return eiInfo;
}
}
<?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="HPKC001">
<select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hpjx.hp.kc.domain.HPKC001">
SELECT
ID as "id",
COMPANY_CODE as "companyCode", <!-- 企业编码 预留 -->
CREATED_BY as "createdBy", <!-- 创建人 -->
CREATED_NAME as "createdName", <!-- 创建人名称 -->
CREATED_TIME as "createdTime", <!-- 创建时间 -->
UPDATED_BY as "updatedBy", <!-- 更新人 -->
UPDATED_NAME as "updatedName", <!-- 更新人名称 -->
UPDATED_TIME as "updatedTime", <!-- 更新时间 -->
DEP_CODE as "depCode", <!-- 部门编码 -->
STATUS as "status", <!-- 数据状态 1正常 0删除 -->
DOCUMENT_CODE as "documentCode", <!-- 采购入库单号 -->
DOCUMENT_TIME as "documentTime", <!-- 单据日期 -->
WH_CODE as "whCode", <!-- 仓库编码 -->
WH_NAME as "whName", <!-- 仓库名称 -->
MATERIAL_TYPE as "materialType", <!-- 物料类型编码 -->
MATERIAL_TYPE_NAME as "materialTypeName", <!-- 物料类型名称 -->
MATERIAL_CODE as "materialCode", <!-- 物料编码 -->
MATERIAL_NAME as "materialName", <!-- 物料名称 -->
SPEC as "spec", <!-- 规格 -->
UNIT as "unit", <!-- 单位 -->
QUANTITY as "quantity", <!-- 数量 -->
WEIGHT as "weight", <!-- 重量 -->
REMARKS as "remarks", <!-- 备注 -->
APPROVAL_STATUS as "approvalStatus", <!-- 审批状态:0-未审核,1-已审核 -->
CUST_CODE as "custCode", <!-- 供应商编码 -->
CUST_NAME as "custName" <!-- 供应商名称 -->
FROM hpjx.t_hpkc001 WHERE 1=1
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="documentTime">
DOCUMENT_TIME = #documentTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="documentCode">
DOCUMENT_CODE LIKE CONCAT('%',CONCAT( #documentCode#,'%'))
</isNotEmpty>
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
ID asc
</isEmpty>
</dynamic>
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM hpjx.t_hpkc001 WHERE 1=1
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="documentTime">
DOCUMENT_TIME = #documentTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="documentCode">
DOCUMENT_CODE LIKE CONCAT('%',CONCAT( #documentCode#,'%'))
</isNotEmpty>
</select>
<insert id="insert">
INSERT INTO hpjx.t_hpkc001 (
COMPANY_CODE, <!-- 企业编码 预留 -->
CREATED_BY, <!-- 创建人 -->
CREATED_NAME, <!-- 创建人名称 -->
CREATED_TIME, <!-- 创建时间 -->
UPDATED_BY, <!-- 更新人 -->
UPDATED_NAME, <!-- 更新人名称 -->
UPDATED_TIME, <!-- 更新时间 -->
DEP_CODE, <!-- 部门编码 -->
STATUS, <!-- 数据状态 1正常 0删除 -->
DOCUMENT_CODE, <!-- 采购入库单号 -->
DOCUMENT_TIME, <!-- 单据日期 -->
WH_CODE, <!-- 仓库编码 -->
WH_NAME, <!-- 仓库名称 -->
MATERIAL_TYPE, <!-- 物料类型编码 -->
MATERIAL_TYPE_NAME, <!-- 物料类型名称 -->
MATERIAL_CODE, <!-- 物料编码 -->
MATERIAL_NAME, <!-- 物料名称 -->
SPEC, <!-- 规格 -->
UNIT, <!-- 单位 -->
QUANTITY, <!-- 数量 -->
WEIGHT, <!-- 重量 -->
REMARKS, <!-- 备注 -->
APPROVAL_STATUS, <!-- 审批状态:0-未审核,1-已审核 -->
CUST_CODE, <!-- 供应商编码 -->
CUST_NAME <!-- 供应商名称 -->
)
VALUES (#companyCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#,
#updatedName#, #updatedTime#,#depCode#, #status#, #documentCode#,
#documentTime#, #whCode#, #whName#, #materialType#, #materialTypeName#,
#materialCode#, #materialName#, #spec#, #unit#, #quantity#,
#weight#, #remarks#, #approvalStatus#, #custCode#, #custName#)
</insert>
<delete id="delete">
DELETE FROM hpjx.t_hpkc001 WHERE ID = #id#
</delete>
<update id="update">
UPDATE hpjx.t_hpkc001
SET
UPDATED_BY = #updatedBy#,
UPDATED_BY = #updatedBy#,
UPDATED_BY = #updatedBy#
<isNotEmpty property="companyCode">
,COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty property="depCode">
,DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty property="STATUS">
,STATUS = #status#
</isNotEmpty>
<isNotEmpty property="documentCode">
,DOCUMENT_CODE = #documentCode#
</isNotEmpty>
<isNotEmpty property="documentTime">
,DOCUMENT_TIME = #documentTime#
</isNotEmpty>
<isNotEmpty property="whCode">
,WH_CODE = #whCode#
</isNotEmpty>
<isNotEmpty property="whName">
,WH_NAME = #whName#
</isNotEmpty>
<isNotEmpty property="materialType">
,MATERIAL_TYPE = #materialType#
</isNotEmpty>
<isNotEmpty property="materialTypeName">
,MATERIAL_TYPE_NAME = #materialTypeName#
</isNotEmpty>
<isNotEmpty property="materialCode">
,MATERIAL_CODE = #materialCode#
</isNotEmpty>
<isNotEmpty property="materialName">
,MATERIAL_NAME = #materialName#
</isNotEmpty>
<isNotEmpty property="spec">
,SPEC = #spec#
</isNotEmpty>
<isNotEmpty property="unit">
,UNIT = #unit#
</isNotEmpty>
<isNotEmpty property="quantity">
,QUANTITY = #quantity#
</isNotEmpty>
<isNotEmpty property="weight">
,WEIGHT = #weight#
</isNotEmpty>
<isNotEmpty property="remarks">
,REMARKS = #remarks#
</isNotEmpty>
<isNotEmpty property="approvalStatus">
,APPROVAL_STATUS = #approvalStatus#
</isNotEmpty>
<isNotEmpty property="custCode">
,CUST_CODE = #custCode#
</isNotEmpty>
<isNotEmpty property="custName">
,CUST_NAME = #custName#
</isNotEmpty>
WHERE ID = #id#
</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="HPKC002">
<select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hpjx.hp.kc.domain.HPKC002">
SELECT
ID as "id",
COMPANY_CODE as "companyCode", <!-- 企业编码 预留 -->
CREATED_BY as "createdBy", <!-- 创建人 -->
CREATED_NAME as "createdName", <!-- 创建人名称 -->
CREATED_TIME as "createdTime", <!-- 创建时间 -->
UPDATED_BY as "updatedBy", <!-- 更新人 -->
UPDATED_NAME as "updatedName", <!-- 更新人名称 -->
UPDATED_TIME as "updatedTime", <!-- 更新时间 -->
DEP_CODE as "depCode", <!-- 部门编码 -->
STATUS as "status", <!-- 数据状态 1正常 0删除 -->
DOCUMENT_CODE as "documentCode", <!-- 采购入库单号 -->
DOCUMENT_TIME as "documentTime", <!-- 单据日期 -->
WH_CODE as "whCode", <!-- 仓库编码 -->
WH_NAME as "whName", <!-- 仓库名称 -->
MATERIAL_TYPE as "materialType", <!-- 物料类型编码 -->
MATERIAL_TYPE_NAME as "materialTypeName", <!-- 物料类型名称 -->
MATERIAL_CODE as "materialCode", <!-- 物料编码 -->
MATERIAL_NAME as "materialName", <!-- 物料名称 -->
SPEC as "spec", <!-- 规格 -->
UNIT as "unit", <!-- 单位 -->
QUANTITY as "quantity", <!-- 数量 -->
WEIGHT as "weight", <!-- 重量 -->
REMARKS as "remarks", <!-- 备注 -->
APPROVAL_STATUS as "approvalStatus", <!-- 审批状态:0-未审核,1-已审核 -->
CUST_CODE as "custCode", <!-- 供应商编码 -->
CUST_NAME as "custName" <!-- 供应商名称 -->
FROM hpjx.t_hpkc002 WHERE 1=1
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="documentTime">
DOCUMENT_TIME = #documentTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="documentCode">
DOCUMENT_CODE LIKE CONCAT('%',CONCAT( #documentCode#,'%'))
</isNotEmpty>
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
ID asc
</isEmpty>
</dynamic>
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM hpjx.t_hpkc002 WHERE 1=1
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="documentTime">
DOCUMENT_TIME = #documentTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="documentCode">
DOCUMENT_CODE LIKE CONCAT('%',CONCAT( #documentCode#,'%'))
</isNotEmpty>
</select>
<insert id="insert">
INSERT INTO hpjx.t_hpkc002 (
COMPANY_CODE, <!-- 企业编码 预留 -->
CREATED_BY, <!-- 创建人 -->
CREATED_NAME, <!-- 创建人名称 -->
CREATED_TIME, <!-- 创建时间 -->
UPDATED_BY, <!-- 更新人 -->
UPDATED_NAME, <!-- 更新人名称 -->
UPDATED_TIME, <!-- 更新时间 -->
DEP_CODE, <!-- 部门编码 -->
STATUS, <!-- 数据状态 1正常 0删除 -->
DOCUMENT_CODE, <!-- 采购入库单号 -->
DOCUMENT_TIME, <!-- 单据日期 -->
WH_CODE, <!-- 仓库编码 -->
WH_NAME, <!-- 仓库名称 -->
MATERIAL_TYPE, <!-- 物料类型编码 -->
MATERIAL_TYPE_NAME, <!-- 物料类型名称 -->
MATERIAL_CODE, <!-- 物料编码 -->
MATERIAL_NAME, <!-- 物料名称 -->
SPEC, <!-- 规格 -->
UNIT, <!-- 单位 -->
QUANTITY, <!-- 数量 -->
WEIGHT, <!-- 重量 -->
REMARKS, <!-- 备注 -->
APPROVAL_STATUS, <!-- 审批状态:0-未审核,1-已审核 -->
CUST_CODE, <!-- 供应商编码 -->
CUST_NAME <!-- 供应商名称 -->
)
VALUES (#companyCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#,
#updatedName#, #updatedTime#,#depCode#, #status#, #documentCode#,
#documentTime#, #whCode#, #whName#, #materialType#, #materialTypeName#,
#materialCode#, #materialName#, #spec#, #unit#, #quantity#,
#weight#, #remarks#, #approvalStatus#, #custCode#, #custName#)
</insert>
<delete id="delete">
DELETE FROM hpjx.t_hpkc002 WHERE ID = #id#
</delete>
<update id="update">
UPDATE hpjx.t_hpkc002
SET
UPDATED_BY = #updatedBy#,
UPDATED_BY = #updatedBy#,
UPDATED_BY = #updatedBy#
<isNotEmpty property="companyCode">
,COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty property="depCode">
,DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty property="STATUS">
,STATUS = #status#
</isNotEmpty>
<isNotEmpty property="documentCode">
,DOCUMENT_CODE = #documentCode#
</isNotEmpty>
<isNotEmpty property="documentTime">
,DOCUMENT_TIME = #documentTime#
</isNotEmpty>
<isNotEmpty property="whCode">
,WH_CODE = #whCode#
</isNotEmpty>
<isNotEmpty property="whName">
,WH_NAME = #whName#
</isNotEmpty>
<isNotEmpty property="materialType">
,MATERIAL_TYPE = #materialType#
</isNotEmpty>
<isNotEmpty property="materialTypeName">
,MATERIAL_TYPE_NAME = #materialTypeName#
</isNotEmpty>
<isNotEmpty property="materialCode">
,MATERIAL_CODE = #materialCode#
</isNotEmpty>
<isNotEmpty property="materialName">
,MATERIAL_NAME = #materialName#
</isNotEmpty>
<isNotEmpty property="spec">
,SPEC = #spec#
</isNotEmpty>
<isNotEmpty property="unit">
,UNIT = #unit#
</isNotEmpty>
<isNotEmpty property="quantity">
,QUANTITY = #quantity#
</isNotEmpty>
<isNotEmpty property="weight">
,WEIGHT = #weight#
</isNotEmpty>
<isNotEmpty property="remarks">
,REMARKS = #remarks#
</isNotEmpty>
<isNotEmpty property="approvalStatus">
,APPROVAL_STATUS = #approvalStatus#
</isNotEmpty>
<isNotEmpty property="custCode">
,CUST_CODE = #custCode#
</isNotEmpty>
<isNotEmpty property="custName">
,CUST_NAME = #custName#
</isNotEmpty>
WHERE ID = #id#
</update>
</sqlMap>
<!DOCTYPE html>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<EF:EFPage title="采购入库单">
<EF:EFRegion id="inqu" title="查询条件">
<div class="row">
<EF:EFDatePicker ename="inqu_status-0-documentTime" cname="单据日期" format="yyyy-MM-dd" required="true"/>
<EF:EFInput ename="inqu_status-0-documentCode" cname="采购入库单号" colWidth="4" readonly="false"/>
<EF:EFSelect ename="inqu_status-0-whCode" cname="仓库名称"
valueTemplate="#=textField#" filter="contains"
required="false" defultValue="ALL"
template="#=textField#">
<EF:EFOption label="请选择" value=""></EF:EFOption>
<EF:EFOptions blockId="whName_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="false" isFloat="true" autoFit="true">
<EF:EFColumn ename="id" cname="主键id" hidden="true"/>
<EF:EFColumn ename="documentTime" cname="单据日期" editType="date" dateFormat="yyyy-MM-dd" parseFormats="['yyyy-MM-dd']" width="100" required="true"/>
<EF:EFColumn ename="documentCode" cname="采购入库单号" width="100" readonly="false" align="center" required="true"/>
<EF:EFComboColumn ename="whCode"
cname="仓库编码"
columnTemplate="#=textField#"
itemTemplate="#=textField#"
blockName="wh_record_block_id"
textField="textField"
valueField="valueField"
align="center"
filter="contains"
width="100"
required="true"
>
</EF:EFComboColumn>
<EF:EFColumn ename="whName" cname="仓库名称" width="120" readonly="true" align="center" enable="false" required="true"/>
<EF:EFComboColumn ename="materialType"
cname="物料类型"
columnTemplate="#=textField#"
itemTemplate="#=textField#"
blockName="customer_type_block_id"
textField="textField"
valueField="textField"
align="center"
filter="contains"
width="100"
required="true"
>
</EF:EFComboColumn>
<EF:EFColumn ename="materialTypeName" cname="物料类型名称" width="100" readonly="true" enable="false" required="true" />
<EF:EFColumn ename="materialCode" cname="物料编码" width="100" readonly="false" required="true"/>
<EF:EFColumn ename="materialName" cname="物料名称" width="100" readonly="false" required="true"/>
<EF:EFColumn ename="spec" cname="规格" width="120" readonly="false" align="center" required="true"/>
<EF:EFColumn ename="unit" cname="单位" width="80" readonly="false" align="center" required="true"/>
<EF:EFColumn ename="quantity" cname="数量" width="80" readonly="false" align="right" required="true"/>
<EF:EFColumn ename="weight" cname="重量" defaultValue="0" data-rules="number" maxLength="20" width="100" align="right" readonly="false"/>
<EF:EFColumn ename="remarks" cname="备注" width="100" readonly="false"/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
<!DOCTYPE html>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<EF:EFPage title="生产领料单">
<EF:EFRegion id="inqu" title="查询条件">
<div class="row">
<EF:EFDatePicker ename="inqu_status-0-documentTime" cname="单据日期" format="yyyy-MM-dd" required="true"/>
<EF:EFInput ename="inqu_status-0-documentCode" cname="生产领料单号" colWidth="4" readonly="false"/>
<EF:EFSelect ename="inqu_status-0-whCode" cname="仓库名称"
valueTemplate="#=textField#" filter="contains"
required="false" defultValue="ALL"
template="#=textField#">
<EF:EFOption label="请选择" value=""></EF:EFOption>
<EF:EFOptions blockId="whName_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="false" isFloat="true" autoFit="true">
<EF:EFColumn ename="id" cname="主键id" hidden="true"/>
<EF:EFColumn ename="documentTime" cname="单据日期" editType="date" dateFormat="yyyy-MM-dd" parseFormats="['yyyy-MM-dd']" width="100" required="true"/>
<EF:EFColumn ename="documentCode" cname="生产领料单号" width="100" readonly="false" align="center" required="true"/>
<EF:EFComboColumn ename="whCode"
cname="仓库编码"
columnTemplate="#=textField#"
itemTemplate="#=textField#"
blockName="wh_record_block_id"
textField="textField"
valueField="valueField"
align="center"
filter="contains"
width="100"
required="true"
>
</EF:EFComboColumn>
<EF:EFColumn ename="whName" cname="仓库名称" width="120" readonly="true" align="center" enable="false" required="true"/>
<EF:EFComboColumn ename="materialType"
cname="物料类型"
columnTemplate="#=textField#"
itemTemplate="#=textField#"
blockName="customer_type_block_id"
textField="textField"
valueField="textField"
align="center"
filter="contains"
width="100"
required="true"
>
</EF:EFComboColumn>
<EF:EFColumn ename="materialTypeName" cname="物料类型名称" width="100" readonly="true" enable="false" required="true" />
<EF:EFColumn ename="materialCode" cname="物料编码" width="100" readonly="false" required="true"/>
<EF:EFColumn ename="materialName" cname="物料名称" width="100" readonly="false" required="true"/>
<EF:EFColumn ename="spec" cname="规格" width="120" readonly="false" align="center" required="true"/>
<EF:EFColumn ename="unit" cname="单位" width="80" readonly="false" align="center" required="true"/>
<EF:EFColumn ename="quantity" cname="数量" width="80" readonly="false" align="right" required="true"/>
<EF:EFColumn ename="weight" cname="重量" defaultValue="0" data-rules="number" maxLength="20" width="100" align="right" readonly="false"/>
<EF:EFColumn ename="remarks" cname="备注" width="100" readonly="false"/>
</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