Commit 86778943 by 江和松

1.物料清单对象复用导致id重复修改

parent 7921ea2e
......@@ -142,9 +142,6 @@ public class ServiceHGKC005 extends ServiceEPBase {
// 生成单据号
fKc005.setCheckNo(SequenceGenerator.getNextSequence(HGConstant.SequenceId.CHECK_NO));
DaoUtils.insert(HGKC005.INSERT, fKc005);
// 修改库存
HGKCTools.updateStock(fKc005.getWhCode(), fKc005.getInventRecordId(),
fKc005.getDiffAmount(), fKc005.getDiffWeight(),fKc005.getCompanyCode(),fKc005.getCompanyName());
}
/**
......
......@@ -673,6 +673,9 @@ public class HGKCTools {
AssertUtils.isEmpty(paramMap, "时间不能为空");
return DaoBase.getInstance().query("HGKC007.queryCheckList", paramMap);
}
}
public static class HgKc007A {
......
......@@ -429,7 +429,6 @@ public class ServiceHGSC004A extends ServiceBase {
public EiInfo updateProductStatus(EiInfo inInfo){
int i = 0;
try {
HGSC004A hgsc004a = new HGSC004A();
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
String materialId = eiBlock.getCellStr(ACConstants.ROW_CODE_0, HGSC004A.FIELD_material_id);
//获取主表信息
......@@ -442,6 +441,7 @@ public class ServiceHGSC004A extends ServiceBase {
List<HGSC004A> submitEntityList = new LinkedList<>();
for (i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
HGSC004A hgsc004a = new HGSC004A();
//前端传参不完全,但是肯定有id
hgsc004a.fromMap(map);
Long id = hgsc004a.getId();
......@@ -471,8 +471,11 @@ public class ServiceHGSC004A extends ServiceBase {
});
}
}
//批量勾选时,List中有的则不需要往里放了
HGSC004A filterEntity = hgsc004AList.stream().filter(o -> o.getId().compareTo(entity.getId()) == 0).findAny().orElse(null);
if(Objects.isNull(filterEntity)){
hgsc004AList.add(entity);
DaoUtils.updateBatch(HGSC004A.UPDATE_PRODUCT_STATUS, hgsc004AList);
}
}
//全部提交后的操作,如新增的提交、替换的提交
if(hgsc004.getMaterialStatus().intValue() == HGConstant.MaterialStatus.QBTJ){
......@@ -499,7 +502,9 @@ public class ServiceHGSC004A extends ServiceBase {
submitPlanEntity(hgsc004, true,hgsc004AList);
}
}
hgsc004a.setProductStatus(HGConstant.ProductStatus.YTJ);
hgsc004AList.forEach(o->{
o.setProductStatus(HGConstant.ProductStatus.YTJ);
});
DaoUtils.updateBatch(HGSC004A.UPDATE_PRODUCT_STATUS, hgsc004AList);
}
}
......
......@@ -50,26 +50,6 @@ $(function() {
refreshSelect(container, inInfo);
}
}, {
field: "inventCode",
template: function (dataItem) {
for (let i = 0; i < inventNameGlobalData.length; i++) {
if (inventNameGlobalData[i]['valueField'] === dataItem['inventCode']) {
return inventNameGlobalData[i]['textField'];
}
}
return "";
},
editor: function (container, options) {
let inInfo = new EiInfo();
inInfo.set("inqu_status-0-inventType", options.model["inventType"]);
inInfo.set("inqu_status-0-isSplicingSymbol", false);
inInfo.set("serviceName", "HGPZ005");
inInfo.set("methodName", "queryMaterialComboBox");
inInfo.set("blockId", "material_record_block_id");
inInfo.set("field", options.field);
refreshSelect(container, inInfo);
}
}, {
field: "inventRecordId",
template: function (dataItem) {
for (let i = 0; i < specGlobalData.length; i++) {
......@@ -124,10 +104,38 @@ $(window).load(function () {
//initSpec()
// 查询
query();
//存货编号
initInventCode();
});
/**
* 存货编号
*/
let initInventCode = function () {
//物料信息下拉
var inInfo=new EiInfo();
EiCommunicator.send("HGPZ005", "queryComboBox", inInfo, {
onSuccess: function (ei) {
let dataSource;
var input=$("#inqu_status-0-inventCode");
dataSource=ei.getBlock("invent_record_block_id").getMappedRows();
input.kendoDropDownList({
valuePrimitive: true,
dataTextField: "valueField",
dataValueField: "valueField",
optionLabel:"请选择",
dataSource: dataSource,
template: "[#:valueField#]#:textField#|#:param2Field#",
filter: "contains"
});
}, onFail: function (ei) {
}
}, {async: false});
}
/**
* 初始化仓库
*/
let initWh = function () {
......
......@@ -28,24 +28,24 @@
</EF:EFSelect>
</div>
<div class="row">
<EF:EFSelect cname="存货名称" ename="inqu_status-0-inventCode" colWidth="3" filter="contains" defultValue="">
<EF:EFOption label="全部" value=""/>
<EF:EFSelect cname="存货编号" blockId="inqu_status" ename="inventCode" row="0" colWidth="3"
filter="contains" optionLabel="全部" defultValue="" template="[#=valueField#]#=textField#">
<EF:EFOptions blockId="invent_record_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_record_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_record_block_id" textField="textField" valueField="valueField"/>--%>
<%-- </EF:EFSelect>--%>
<EF:EFDateSpan startCname="创建日期(从)" endCname="至" blockId="inqu_status"
startName="createdDateFrom" endName="createdDateTo" row="0" role="date"
format="yyyy-MM-dd" ratio="3:3" satrtRatio="4:8" endRatio="4:8">
</EF:EFDateSpan>
</div>
<div class="row">
<EF:EFSelect cname="是否删除" ename="inqu_status-0-deleteFlag" colWidth="3" defaultValue="0">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hpjx.hpjx.deleteFlag"/>
</EF:EFSelect>
</div>
<div class="row">
<EF:EFInput blockId="inqu_status" row="0" ename="companyCode" cname="公司编码" type="hidden" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="companyName" cname="公司名称" type="hidden" colWidth="3"/>
</div>
......@@ -68,20 +68,19 @@
blockName="wh_record_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#">
</EF:EFComboColumn>
<EF:EFComboColumn ename="inventCode" cname="存货名称" enable="true" readonly="true" width="120" align="center"
blockName="invent_record_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#">
</EF:EFComboColumn>
<EF:EFColumn ename="inventCode" cname="存货编码" enable="false" width="100" align="center"/>
<EF:EFColumn ename="inventName" cname="存货名称" enable="false" width="100" align="center"/>
<EF:EFComboColumn ename="inventRecordId" cname="规格" enable="true" readonly="true" width="120" align="center"
blockName="spec_record_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#">
</EF:EFComboColumn>
<EF:EFColumn ename="bookAmount" cname="账面数量" format="{0:N0}" maxLength="20" width="120" align="right"
sumType="all" required="true" readonly="true"/>
sumType="all" required="true" enable="true"/>
<EF:EFColumn ename="bookWeight" cname="账面重量(KG)" enable="false" format="{0:N3}" maxLength="20" width="120"
align="right" sumType="all"/>
<EF:EFColumn ename="entityAmount" cname="实物数量" format="{0:N0}" maxLength="20" width="120" align="right"
sumType="all" required="true" readonly="true"/>
sumType="all" required="true" enable="true"/>
<EF:EFColumn ename="entityWeight" cname="实物重量(KG)" enable="false" format="{0:N3}" maxLength="20" width="120"
align="right" sumType="all"/>
<EF:EFColumn ename="diffAmount" cname="差异数量" enable="false" format="{0:N0}" maxLength="20" width="120"
......
......@@ -66,7 +66,6 @@ let select = function () {
}
for (let i = 0; i < rows.length; i++) {
let entityAmount = rows[i]['entityAmount'];
let amount = rows[i]['amount'];
if (!isPositiveInteger(entityAmount)) {
message("勾选的第" + (i + 1) + "行实物数量必须是大于0的整数");
return;
......
......@@ -51,7 +51,7 @@
blockName="spec_record_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#">
</EF:EFComboColumn>
<EF:EFColumn ename="entityAmount" cname="实物数量" width="120" align="right" format="{0:N0}" required="true"/>
<EF:EFColumn ename="entityAmount" cname="实物数量" width="120" align="right" format="{0:N0}" hidden="true" defaultValue="0"/>
<EF:EFColumn ename="entityRemark" cname="盘点说明" width="150" editType="textarea" copy="true"/>
<EF:EFColumn ename="invQty" cname="库存数量" enable="false" width="120" align="right" format="{0:N0}"
sumType="all"/>
......
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