Commit d4281e48 by liuyang

2024-06-28 调拨单和其他出库添加存货类型大类

parent ad2a1979
...@@ -2,6 +2,7 @@ package com.baosight.hggp.hg.kc.service; ...@@ -2,6 +2,7 @@ package com.baosight.hggp.hg.kc.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation; import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.common.DdynamicEnum; import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.common.InventTypeDetailEnum;
import com.baosight.hggp.core.dao.DaoUtils; import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.core.security.UserSessionUtils; import com.baosight.hggp.core.security.UserSessionUtils;
import com.baosight.hggp.hg.constant.HGConstant; import com.baosight.hggp.hg.constant.HGConstant;
...@@ -11,6 +12,7 @@ import com.baosight.hggp.hg.kc.domain.HGKC007; ...@@ -11,6 +12,7 @@ import com.baosight.hggp.hg.kc.domain.HGKC007;
import com.baosight.hggp.hg.kc.domain.HGKC007A; import com.baosight.hggp.hg.kc.domain.HGKC007A;
import com.baosight.hggp.hg.kc.tools.HGKCTools; import com.baosight.hggp.hg.kc.tools.HGKCTools;
import com.baosight.hggp.hg.kc.utils.HGKCUtils; import com.baosight.hggp.hg.kc.utils.HGKCUtils;
import com.baosight.hggp.hg.pz.domain.HGPZ004;
import com.baosight.hggp.hg.xs.tools.HGXSTools; import com.baosight.hggp.hg.xs.tools.HGXSTools;
import com.baosight.hggp.util.AssertUtils; import com.baosight.hggp.util.AssertUtils;
import com.baosight.hggp.util.CommonMethod; import com.baosight.hggp.util.CommonMethod;
...@@ -49,8 +51,12 @@ public class ServiceHGKC007A extends ServiceBase { ...@@ -49,8 +51,12 @@ public class ServiceHGKC007A extends ServiceBase {
map.put(HGKC007A.FIELD_ACCOUNT_CODE, UserSessionUtils.getAccountCode()); map.put(HGKC007A.FIELD_ACCOUNT_CODE, UserSessionUtils.getAccountCode());
map.put(HGKC007A.FIELD_WH_CODE, whCode); map.put(HGKC007A.FIELD_WH_CODE, whCode);
map.put(HGKC007A.FIELD_COMPANY_CODE, companyCode); map.put(HGKC007A.FIELD_COMPANY_CODE, companyCode);
map.put(HGPZ004.FIELD_INVENT_TYPE_DETAILS, InventTypeDetailEnum.getProdTypeFour());
CommonMethod.initBlock(inInfo, CommonMethod.initBlock(inInfo,
Arrays.asList(DdynamicEnum.INVENT_TYPE_BOX_BLOCK_ID,DdynamicEnum.INVENT_CODE_BOX_BLOCK_ID,DdynamicEnum.SPEC_BOX_BLOCK_ID),map,false Arrays.asList(
DdynamicEnum.INVENT_TYPE_BOX_BLOCK_ID,
DdynamicEnum.INVENT_CODE_BOX_BLOCK_ID,
DdynamicEnum.SPEC_BOX_BLOCK_ID),map,false
); );
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGKC007A().eiMetadata); inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGKC007A().eiMetadata);
} catch (PlatException e) { } catch (PlatException e) {
......
...@@ -189,6 +189,7 @@ public class ServiceHGKC013 extends ServiceEPBase { ...@@ -189,6 +189,7 @@ public class ServiceHGKC013 extends ServiceEPBase {
hgkc006A.setPartThick(hgkc013A.getThick()); hgkc006A.setPartThick(hgkc013A.getThick());
hgkc006A.setPartSpec(hgkc013A.getSpec()); hgkc006A.setPartSpec(hgkc013A.getSpec());
hgkc006A.setSource(InventorySource.ALLOCATION.getCode()); hgkc006A.setSource(InventorySource.ALLOCATION.getCode());
hgkc006A.setInventTypeDetail(hgkc013A.getInventTypeDetail());
DaoUtils.insert(HGKC006A.INSERT, hgkc006A); DaoUtils.insert(HGKC006A.INSERT, hgkc006A);
} }
} }
...@@ -230,6 +231,7 @@ public class ServiceHGKC013 extends ServiceEPBase { ...@@ -230,6 +231,7 @@ public class ServiceHGKC013 extends ServiceEPBase {
hgkc007A.setPartThick(hgkc013A.getThick()); hgkc007A.setPartThick(hgkc013A.getThick());
hgkc007A.setPartSpec(hgkc013A.getSpec()); hgkc007A.setPartSpec(hgkc013A.getSpec());
hgkc007A.setSource(InventorySource.ALLOCATION.getCode()); hgkc007A.setSource(InventorySource.ALLOCATION.getCode());
hgkc007A.setInventTypeDetail(hgkc013A.getInventTypeDetail());
DaoUtils.insert(HGKC007A.INSERT, hgkc007A); DaoUtils.insert(HGKC007A.INSERT, hgkc007A);
} }
} }
......
...@@ -2,12 +2,14 @@ package com.baosight.hggp.hg.kc.service; ...@@ -2,12 +2,14 @@ package com.baosight.hggp.hg.kc.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation; import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.common.DdynamicEnum; import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.common.InventTypeDetailEnum;
import com.baosight.hggp.core.constant.CommonConstant; import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.dao.DaoUtils; import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.hg.kc.domain.HGKC010; import com.baosight.hggp.hg.kc.domain.HGKC010;
import com.baosight.hggp.hg.kc.domain.HGKC013; import com.baosight.hggp.hg.kc.domain.HGKC013;
import com.baosight.hggp.hg.kc.domain.HGKC013A; import com.baosight.hggp.hg.kc.domain.HGKC013A;
import com.baosight.hggp.hg.kc.tools.HGKCTools; import com.baosight.hggp.hg.kc.tools.HGKCTools;
import com.baosight.hggp.hg.pz.domain.HGPZ004;
import com.baosight.hggp.util.CommonMethod; import com.baosight.hggp.util.CommonMethod;
import com.baosight.hggp.util.EiInfoUtils; import com.baosight.hggp.util.EiInfoUtils;
import com.baosight.hggp.util.LogUtils; import com.baosight.hggp.util.LogUtils;
...@@ -33,12 +35,15 @@ public class ServiceHGKC013A extends ServiceEPBase { ...@@ -33,12 +35,15 @@ public class ServiceHGKC013A extends ServiceEPBase {
Map map = EiInfoUtils.getFirstRow(inInfo); Map map = EiInfoUtils.getFirstRow(inInfo);
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGKC013A.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0); inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGKC013A.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
inInfo = super.query(inInfo, HGKC013A.QUERY, new HGKC013A()); inInfo = super.query(inInfo, HGKC013A.QUERY, new HGKC013A());
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.WH_RECORD_BLOCK_ID,DdynamicEnum.INVENT_TYPE_BOX_BLOCK_ID)); Map<String, Object> params = new HashMap<>();
params.put(HGPZ004.FIELD_INVENT_TYPE_DETAILS, InventTypeDetailEnum.getProdTypeFour());
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.WH_RECORD_BLOCK_ID,DdynamicEnum.INVENT_TYPE_BOX_BLOCK_ID),params);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.INVENT_CODE_BOX_BLOCK_ID,DdynamicEnum.SPEC_BOX_BLOCK_ID), CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.INVENT_CODE_BOX_BLOCK_ID,DdynamicEnum.SPEC_BOX_BLOCK_ID),
new HashMap<String,Object>(){{ new HashMap<String,Object>(){{
put(HGKC013.FIELD_COMPANY_CODE,map.get(HGKC013.FIELD_CALLOUT_COMPANY_CODE)); put(HGKC013.FIELD_COMPANY_CODE,map.get(HGKC013.FIELD_CALLOUT_COMPANY_CODE));
put(HGKC010.FIELD_WH_CODE,map.get(HGKC013A.FIELD_CALLOUT_WH_CODE)); put(HGKC010.FIELD_WH_CODE,map.get(HGKC013A.FIELD_CALLOUT_WH_CODE));
put(HGKC013A.FIELD_DELETE_FLAG,CommonConstant.YesNo.NO_0); put(HGKC013A.FIELD_DELETE_FLAG,CommonConstant.YesNo.NO_0);
put(HGPZ004.FIELD_INVENT_TYPE_DETAILS, InventTypeDetailEnum.getProdTypeFour());
}}, false); }}, false);
return inInfo; return inInfo;
} }
...@@ -107,6 +112,7 @@ public class ServiceHGKC013A extends ServiceEPBase { ...@@ -107,6 +112,7 @@ public class ServiceHGKC013A extends ServiceEPBase {
if ( result > 0){ if ( result > 0){
throw new PlatException("实时库存数量不够,无法保存!"); throw new PlatException("实时库存数量不够,无法保存!");
} }
hgkc013a.setInventTypeDetail(Integer.parseInt(hgkc010.getInventTypeDetail()));
} }
if (hgkc013a.getId() == null || hgkc013a.getId() == 0) { if (hgkc013a.getId() == null || hgkc013a.getId() == 0) {
this.add(hgkc013a); this.add(hgkc013a);
......
...@@ -242,7 +242,8 @@ ...@@ -242,7 +242,8 @@
THICK as "thick", <!-- 厚度 --> THICK as "thick", <!-- 厚度 -->
INV_QTY as "invQty", <!-- 库存数量 --> INV_QTY as "invQty", <!-- 库存数量 -->
INV_UNIT_WEIGHT as "invUnitWeight", <!-- 库存单重 --> INV_UNIT_WEIGHT as "invUnitWeight", <!-- 库存单重 -->
INV_WEIGHT as "invWeight" <!-- 库存重量 --> INV_WEIGHT as "invWeight", <!-- 库存重量 -->
INVENT_TYPE_DETAIL as "inventTypeDetail"
FROM ${hggpSchema}.HGKC010 FROM ${hggpSchema}.HGKC010
WHERE 1=1 WHERE 1=1
<include refid="condition"/> <include refid="condition"/>
......
...@@ -640,15 +640,24 @@ ...@@ -640,15 +640,24 @@
<!--项目产量--> <!--项目产量-->
<select id="queryProjCodeWt" parameterClass="java.util.HashMap" resultClass="java.util.HashMap"> <select id="queryProjCodeWt" parameterClass="java.util.HashMap" resultClass="java.util.HashMap">
select select
h2.factory_code as factoryCode , a.proj_code as projCode,
h2.factory_name as factoryName , a.proj_name as projName,
h.proj_code as projCode, a.plan_end_date as completeDate,
h.proj_name as projName, sum(a.total_weight) as totalWeight,
h.finish_date as completeDate, sum(a.finish_weight) as finishWeight,
sum(h.total_weight) as totalWeight, a.updated_time as updatedTime
sum(h.finish_weight) as finishWeight from (
from ${hggpSchema}.HGSC005a h inner join ${hggpSchema}.HGSC007 h2 on h.company_code = h2.company_code AND h.proj_code = h2.proj_code select
where 1 = 1 h.proj_code,
h.proj_name,
h.plan_end_date,
h.total_weight,
0 as finish_weight,
left(h1.updated_time,8) as updated_time
from ${hggpSchema}.HGSC005a h
inner join ${hggpSchema}.HGSC005 h1 on h.company_code = h1.company_code and h.plan_code = h1.plan_code
inner join ${hggpSchema}.HGSC007 h2 on h.company_code = h2.company_code AND h.proj_code = h2.proj_code
where 1 = 1 and h1.commit_status = 2
<include refid="appCondition"/> <include refid="appCondition"/>
<isNotEmpty prepend=" AND " property="accountCode"> <isNotEmpty prepend=" AND " property="accountCode">
h.account_code = #accountCode# h.account_code = #accountCode#
...@@ -665,10 +674,42 @@ ...@@ -665,10 +674,42 @@
<isNotEmpty prepend=" AND " property="factoryName"> <isNotEmpty prepend=" AND " property="factoryName">
h2.factory_name = #factoryName# h2.factory_name = #factoryName#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="finishDate"> <isNotEmpty prepend=" AND " property="updatedTime">
h.finish_date = #finishDate# left(h1.updated_time,8) = #updatedTime#
</isNotEmpty>
union all
select
h.proj_code,
h.proj_name,
h.plan_end_date,
0 as totalWeight,
h.finish_weight,
left(h1.updated_time,8) as updated_time
from ${hggpSchema}.HGSC005a h
inner join ${hggpSchema}.HGSC005 h1 on h.plan_code = h1.plan_code
inner join ${hggpSchema}.HGSC007 h2 on h.company_code = h2.company_code AND h.proj_code = h2.proj_code
where 1 = 1 and h1.commit_status = 2
<include refid="appCondition"/>
<isNotEmpty prepend=" AND " property="accountCode">
h.account_code = #accountCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
h.company_code = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyName">
h.company_name = #companyName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="factoryCode">
h2.factory_code = #factoryCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="factoryName">
h2.factory_name = #factoryName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
left(h1.updated_time,8) = #updatedTime#
</isNotEmpty> </isNotEmpty>
group by h2.factory_code, h2.factory_name, h.proj_code, h.proj_name, h.finish_date )a
order by h.finish_date desc group by a.proj_code, a.proj_name, a.plan_end_date, a.updated_time
order by a.updated_time desc
</select> </select>
</sqlMap> </sqlMap>
...@@ -171,6 +171,7 @@ $(function () { ...@@ -171,6 +171,7 @@ $(function () {
resultGrid.setCellValue(item, 'invQty', inventRecordBoxBlocks[i]['param7Field']); resultGrid.setCellValue(item, 'invQty', inventRecordBoxBlocks[i]['param7Field']);
resultGrid.setCellValue(item, 'invUnitWeight', inventRecordBoxBlocks[i]['param8Field']); resultGrid.setCellValue(item, 'invUnitWeight', inventRecordBoxBlocks[i]['param8Field']);
resultGrid.setCellValue(item, 'invWeight', inventRecordBoxBlocks[i]['param9Field']); resultGrid.setCellValue(item, 'invWeight', inventRecordBoxBlocks[i]['param9Field']);
resultGrid.setCellValue(item, 'inventTypeDetail', inventRecordBoxBlocks[i]['param10Field']);
} }
} }
loadChange(grid,e,"price"); loadChange(grid,e,"price");
......
...@@ -35,6 +35,7 @@ ...@@ -35,6 +35,7 @@
columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="false" columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="false"
filter="contains"> filter="contains">
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFColumn ename="inventTypeDetail" cname="存货类型大类" hidden="true"/>
<EF:EFColumn ename="inventCode" cname="存货编码" width="220" align="center" required="true" readonly="true"/> <EF:EFColumn ename="inventCode" cname="存货编码" width="220" align="center" required="true" readonly="true"/>
<EF:EFColumn ename="inventName" cname="存货名称" width="160" align="center" required="true" enable="false"/> <EF:EFColumn ename="inventName" cname="存货名称" width="160" align="center" required="true" enable="false"/>
<EF:EFColumn ename="partSpec" cname="规格" width="120" align="center" enable="true" required="true"/> <EF:EFColumn ename="partSpec" cname="规格" width="120" align="center" enable="true" required="true"/>
......
...@@ -29,11 +29,11 @@ $(function() { ...@@ -29,11 +29,11 @@ $(function() {
title: "存货名称", title: "存货名称",
filter: function (options) { filter: function (options) {
let inventType = options.model["inventType"]; let inventType = options.model["inventType"];
if (inventType){ /*if (inventType){
return _.filter(inventCodedBox, function (item) { return _.filter(inventCodedBox, function (item) {
return item["param1Field"] === inventType; return item["param1Field"] === inventType;
}) })
} }*/
return options.values; return options.values;
}, },
template: function (dataItem) { template: function (dataItem) {
...@@ -104,7 +104,7 @@ $(function() { ...@@ -104,7 +104,7 @@ $(function() {
e.items[0]["width"] = specIdBox[i]['param2Field']; e.items[0]["width"] = specIdBox[i]['param2Field'];
e.items[0]["thick"] = specIdBox[i]['param3Field']; e.items[0]["thick"] = specIdBox[i]['param3Field'];
e.items[0]["quantity"] = specIdBox[i]['param4Field']; e.items[0]["quantity"] = specIdBox[i]['param4Field'];
resultGrid.setCellValue(e.items[0],"unitWeight",specIdBox[i]['param5Field']); resultGrid.setCellValue(e.items[0],"unitWeight",specIdBox[i]['param5Field']=="null"?0:specIdBox[i]['param5Field']);
resultGrid.setCellValue(e.items[0],"weight",specIdBox[i]['param6Field']); resultGrid.setCellValue(e.items[0],"weight",specIdBox[i]['param6Field']);
} }
} }
...@@ -130,8 +130,9 @@ $(function() { ...@@ -130,8 +130,9 @@ $(function() {
resultGrid.setCellValue(e.items[0],"width",inventCodedBox[i]['param5Field']); resultGrid.setCellValue(e.items[0],"width",inventCodedBox[i]['param5Field']);
resultGrid.setCellValue(e.items[0],"thick",inventCodedBox[i]['param6Field']); resultGrid.setCellValue(e.items[0],"thick",inventCodedBox[i]['param6Field']);
resultGrid.setCellValue(e.items[0],"quantity",inventCodedBox[i]['param7Field']); resultGrid.setCellValue(e.items[0],"quantity",inventCodedBox[i]['param7Field']);
resultGrid.setCellValue(e.items[0],"unitWeight",inventCodedBox[i]['param8Field']); resultGrid.setCellValue(e.items[0],"unitWeight",inventCodedBox[i]['param8Field']=="null"?0:inventCodedBox[i]['param8Field']);
resultGrid.setCellValue(e.items[0],"weight",inventCodedBox[i]['param9Field']); resultGrid.setCellValue(e.items[0],"weight",inventCodedBox[i]['param9Field']);
resultGrid.setCellValue(e.items[0],"inventTypeDetail",inventCodedBox[i]['param10Field']);
} }
} }
loadChange(grid,e,"quantity"); loadChange(grid,e,"quantity");
......
...@@ -40,6 +40,7 @@ ...@@ -40,6 +40,7 @@
columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="false" columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="false"
filter="contains"> filter="contains">
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFColumn ename="inventTypeDetail" cname="存货类型大类" hidden="true"/>
<EF:EFComboColumn ename="spec" cname="规格" enable="true" width="120" align="center" required="true" <EF:EFComboColumn ename="spec" cname="规格" enable="true" width="120" align="center" required="true"
blockName="spec_box_block_id" textField="textField" valueField="valueField" blockName="spec_box_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="false" columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="false"
......
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