Commit f0cd30e1 by 宋祥

Merge remote-tracking branch 'origin/dev' into dev

# Conflicts:
#	src/main/java/com/baosight/hpjx/hp/kc/service/ServiceHPKC001.java
#	src/main/java/com/baosight/hpjx/hp/kc/service/ServiceHPKC002.java
parents 9fe1ab9f 47f061eb
......@@ -16,6 +16,8 @@ public class HPSqlConstant {
// 统计
public static final String STAT_DATE = "HPKC001.statDate";
// 锁
public static final String LOCK = "HPKC001.lock";
}
/**
......
......@@ -34,6 +34,7 @@ public class HPKC001 extends DaoEPBase {
public static final String FIELD_UPDATED_NAME = "updatedName"; /* 更新人名称*/
public static final String FIELD_UPDATED_TIME = "updatedTime"; /* 更新时间*/
public static final String FIELD_PURCHASE_CODE = "purchaseCode"; /* 采购单号*/
public static final String FIELD_OLD_PURCHASE_CODE = "oldPurchaseCode"; /* 原采购单号*/
public static final String FIELD_RECEIPT_DATE = "receiptDate"; /* 单据日期*/
public static final String FIELD_WH_CODE = "whCode"; /* 仓库编码*/
public static final String FIELD_WH_NAME = "whName"; /* 仓库名称*/
......@@ -55,7 +56,7 @@ public class HPKC001 extends DaoEPBase {
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_PURCHASE_CODE = "PURCHASE_CODE"; /* 采购单号*/
public static final String COL_OLD_PURCHASE_CODE = "OLD_PURCHASE_CODE"; /* 原采购单号*/
public static final String COL_RECEIPT_DATE = "RECEIPT_DATE"; /* 单据日期*/
public static final String COL_WH_CODE = "WH_CODE"; /* 仓库编码*/
public static final String COL_WH_NAME = "WH_NAME"; /* 仓库名称*/
......@@ -84,6 +85,7 @@ public class HPKC001 extends DaoEPBase {
private String updatedName = " "; /* 更新人名称*/
private String updatedTime ; /* 更新时间*/
private String purchaseCode = " "; /* 采购单号*/
private String oldPurchaseCode = " "; /* 原采购单号*/
private String receiptDate ; /* 单据日期*/
private String whCode = " "; /* 仓库编码*/
private String whName = " "; /* 仓库名称*/
......@@ -143,6 +145,10 @@ public class HPKC001 extends DaoEPBase {
eiColumn.setDescName("采购单号");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_OLD_PURCHASE_CODE);
eiColumn.setDescName("原采购单号");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_RECEIPT_DATE);
eiColumn.setDescName("单据日期");
eiMetadata.addMeta(eiColumn);
......@@ -363,6 +369,23 @@ public class HPKC001 extends DaoEPBase {
public void setPurchaseCode(String purchaseCode) {
this.purchaseCode = purchaseCode;
}
/**
* set the oldPurchaseCode - 原采购单号.
*
* @param oldPurchaseCode - 原采购单号
*/
public void setOldPurchaseCode(String oldPurchaseCode) {
this.oldPurchaseCode = oldPurchaseCode;
}
/**
* get the oldPurchaseCode - 原采购单号.
* @return the oldPurchaseCode
*/
public String getOldPurchaseCode() {
return this.oldPurchaseCode;
}
/**
* get the receiptDate - 单据日期.
* @return the receiptDate
......@@ -557,6 +580,7 @@ public class HPKC001 extends DaoEPBase {
setUpdatedName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_NAME)), updatedName));
setUpdatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_TIME)), updatedTime));
setPurchaseCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PURCHASE_CODE)), purchaseCode));
setOldPurchaseCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_OLD_PURCHASE_CODE)), oldPurchaseCode));
setReceiptDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_RECEIPT_DATE)), receiptDate));
setWhCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_WH_CODE)), whCode));
setWhName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_WH_NAME)), whName));
......@@ -587,6 +611,7 @@ public class HPKC001 extends DaoEPBase {
map.put(FIELD_UPDATED_NAME, StringUtils.toString(updatedName, eiMetadata.getMeta(FIELD_UPDATED_NAME)));
map.put(FIELD_UPDATED_TIME, StringUtils.toString(updatedTime, eiMetadata.getMeta(FIELD_UPDATED_TIME)));
map.put(FIELD_PURCHASE_CODE, StringUtils.toString(purchaseCode, eiMetadata.getMeta(FIELD_PURCHASE_CODE)));
map.put(FIELD_OLD_PURCHASE_CODE, StringUtils.toString(oldPurchaseCode, eiMetadata.getMeta(FIELD_OLD_PURCHASE_CODE)));
map.put(FIELD_RECEIPT_DATE, StringUtils.toString(receiptDate, eiMetadata.getMeta(FIELD_RECEIPT_DATE)));
map.put(FIELD_WH_CODE, StringUtils.toString(whCode, eiMetadata.getMeta(FIELD_WH_CODE)));
map.put(FIELD_WH_NAME, StringUtils.toString(whName, eiMetadata.getMeta(FIELD_WH_NAME)));
......
......@@ -76,9 +76,9 @@ public class ServiceHPKC002 extends ServiceBase {
List query = dao.query("HPPZ007.queryByWhCode", params);
insertEntity.setWhName(((HPPZ007) query.get(0)).getWhName());
//存货类型
insertEntity.setInventName(InventTypeEnun.getNameByCode(insertEntity.getInventType()));
insertEntity.setInventType(InventTypeEnun.getNameByCode(insertEntity.getInventType()));
// 生成单据号
insertEntity.setReceiptDate(SequenceGenerator.getNextSequence(HPConstant.SequenceId.HPKC002_NUMBER));
insertEntity.setReqCode(SequenceGenerator.getNextSequence(HPConstant.SequenceId.HPKC002_NUMBER));
dao.insert("HPKC002.insert", insertEntity);
}
inInfo = this.query(inInfo);
......@@ -133,7 +133,7 @@ public class ServiceHPKC002 extends ServiceBase {
List query = dao.query("HPPZ007.queryByWhCode", params);
updateEntity.setWhName(((HPPZ007) query.get(0)).getWhName());
//存货类型
updateEntity.setInventName(InventTypeEnun.getNameByCode(updateEntity.getInventType()));
updateEntity.setInventType(InventTypeEnun.getNameByCode(updateEntity.getInventType()));
dao.insert("HPKC002.update", updateEntity);
}
inInfo = this.query(inInfo);
......
......@@ -13,6 +13,7 @@
UPDATED_NAME as "updatedName", <!-- 更新人名称 -->
UPDATED_TIME as "updatedTime", <!-- 更新时间 -->
PURCHASE_CODE as "purchaseCode", <!-- 采购单号 -->
OLD_PURCHASE_CODE as "oldPurchaseCode", <!-- 原采购单号 -->
RECEIPT_DATE as "receiptDate", <!-- 单据日期 -->
WH_CODE as "whCode", <!-- 仓库编码 -->
WH_NAME as "whName", <!-- 仓库名称 -->
......@@ -123,6 +124,7 @@
CREATED_NAME, <!-- 创建人名称 -->
CREATED_TIME, <!-- 创建时间 -->
PURCHASE_CODE, <!-- 采购单号 -->
OLD_PURCHASE_CODE, <!-- 原采购单号 -->
RECEIPT_DATE, <!-- 单据日期 -->
WH_CODE, <!-- 仓库编码 -->
WH_NAME, <!-- 仓库名称 -->
......@@ -136,7 +138,7 @@
DELETE_FLAG <!-- 是否删除0.否1.是 -->
) VALUES (
#companyCode#, #depCode#, #createdBy#, #createdName#, #createdTime#,
#purchaseCode#, #receiptDate#, #whCode#, #whName#, #inventType#,
#oldPurchaseCode#,#purchaseCode#, #receiptDate#, #whCode#, #whName#, #inventType#,
#inventCode#, #inventName#, #inventRecordId#, #amount#, #weight#,
#remarks#, #deleteFlag#
)
......
......@@ -2,10 +2,7 @@ package com.baosight.hpjx.hp.kc.tools;
import com.baosight.hpjx.core.dao.DaoBase;
import com.baosight.hpjx.hp.constant.HPSqlConstant;
import com.baosight.hpjx.hp.kc.domain.HPKC005;
import com.baosight.hpjx.hp.kc.domain.HPKC006;
import com.baosight.hpjx.hp.kc.domain.HPKC007;
import com.baosight.hpjx.hp.kc.domain.HPKC010;
import com.baosight.hpjx.hp.kc.domain.*;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException;
......@@ -67,6 +64,50 @@ public class HPKCTools {
}
return results.stream().collect(Collectors.toMap(HPKC005::getCheckNo, item -> item));
}
/**
* 锁
*
* @param otherEnterNos
* @return
*/
public static void lockKc001(List<String> otherEnterNos) {
if (CollectionUtils.isEmpty(otherEnterNos)) {
return;
}
Map queryMap = new HashMap();
queryMap.put("otherEnterNos", otherEnterNos);
DaoBase.getInstance().update(HPSqlConstant.HPKC001.LOCK, queryMap);
}
/**
* 查询其他入库信息
*
* @param otherEnterNos
* @return
*/
public static List<HPKC001> listKc001(List<String> otherEnterNos) {
if (CollectionUtils.isEmpty(otherEnterNos)) {
return null;
}
Map queryMap = new HashMap();
queryMap.put("otherEnterNos", otherEnterNos);
return DaoBase.getInstance().query(HPKC001.QUERY, queryMap);
}
/**
* 查询其他入库信息
*
* @param otherEnterNos
* @return
*/
public static Map<String, HPKC001> mapKc001(List<String> otherEnterNos) {
List<HPKC001> results = listKc001(otherEnterNos);
if (CollectionUtils.isEmpty(results)) {
return null;
}
return results.stream().collect(Collectors.toMap(HPKC001::getPurchaseCode, item -> item));
}
/**
* 锁
......
......@@ -9,49 +9,50 @@
<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 cname="存货类型" blockId="inqu_status" ename="materialType" row="0" colWidth="3">
<EF:EFDatePicker cname="单据日期" ename="inqu_status-0-receiptDate" colWidth="3"
role="date" format="yyyy-MM-dd" readonly="true"/>
<EF:EFInput cname="采购单号" ename="inqu_status-0-chpurchaseCodeeckNo" colWidth="3"/>
<EF:EFSelect cname="存货类型" ename="inqu_status-0-inventType" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hpjx.hpkc.inventType" />
<EF:EFCodeOption codeName="hpjx.hpkc.inventType"/>
</EF:EFSelect>
<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:EFSelect cname="仓库名称" ename="inqu_status-0-whCode" colWidth="3" filter="contains" defultValue="">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="wh_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFSelect ename="inqu_status-0-materialCode" cname="存货名称"
valueTemplate="#=textField#" filter="contains"
required="false" defultValue="ALL"
template="#=textField#">
<EF:EFOption label="请选择" value=""></EF:EFOption>
</div>
<div class="row">
<EF:EFSelect cname="存货名称" ename="inqu_status-0-inventCode" colWidth="3" filter="contains" defultValue="">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="invent_name_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFSelect cname="规格" ename="inqu_status-0-spec" colWidth="3" filter="contains" defultValue="">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="spec_name_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="false" enable="false" />
<EF:EFComboColumn ename="materialType" cname="存货类型" width="90" align="center">
<EF:EFCodeOption codeName="hpjx.hpkc.inventType" />
</EF:EFComboColumn>
<EF:EFColumn ename="whCode" cname="仓库名称" width="100" readonly="false" required="true"/>
<EF:EFColumn ename="whName" cname="仓库名称" width="100" readonly="false" hidden="true"/>
<EF:EFColumn ename="materialCode" cname="存货名称" width="100" readonly="false" required="true"/>
<EF:EFColumn ename="materialName" cname="存货名称" width="100" readonly="false" hidden="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" enable="false" required="true"/>
<EF:EFColumn ename="quantity" cname="数量" width="80" defaultValue="0" data-regex="/^[0-9]\\\d*$/" data-errorprompt="请输入正整数" 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:EFComboColumn ename="approvalStatus" cname="审批状态" width="90" align="center">
<EF:EFCodeOption codeName="hpjx.hpjx.approvalStatus" />
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="row">
<EF:EFColumn ename="id" cname="内码" hidden="true"/>
<EF:EFColumn ename="purchaseCode" cname="采购单号" enable="false" width="140" align="center"/>
<EF:EFColumn ename="receiptDate" cname="单据日期" width="90" align="center" editType="date"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required="true"/>
<EF:EFComboColumn ename="inventType" cname="存货类型" width="100" align="center" required="true">
<EF:EFCodeOption codeName="hpjx.hpkc.inventType"/>
</EF:EFComboColumn>
<EF:EFColumn ename="remarks" cname="备注" width="100" readonly="false"/>
<EF:EFColumn ename="whCode" cname="仓库名称" width="120" align="center" required="true" readonly="true"/>
<EF:EFColumn ename="inventCode" cname="存货名称" width="120" align="center" required="true" readonly="true"/>
<EF:EFColumn ename="spec" cname="规格" width="120" align="center"/>
<EF:EFColumn ename="material" cname="材质" width="120" align="center"/>
<EF:EFColumn ename="unit" cname="单位" width="120" align="center"/>
<EF:EFColumn ename="amount" cname="数量" format="{0:N3}" maxLength="20" width="90" align="right"/>
<EF:EFColumn ename="weight" cname="重量" format="{0:N3}" maxLength="20" width="90" align="right"/>
<EF:EFColumn ename="remark" cname="备注" width="150" readonly="true"/>
<EF:EFColumn ename="createdName" cname="创建人" enable="false" width="100" align="center"/>
<EF:EFColumn ename="createdTime" cname="创建时刻" enable="false" width="140" align="center"
editType="datetime" parseFormats="['yyyyMMddHHmmss']"/>
</EF:EFGrid>
</EF:EFRegion>
......
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