Commit f93594d2 by 宋祥

1.数据统计单仅显示其他类型

parent 133f9bd8
...@@ -109,6 +109,18 @@ public class HPSqlConstant { ...@@ -109,6 +109,18 @@ public class HPSqlConstant {
} }
/** /**
* HPKC008 SQL 定义
*
* @author:songx
* @date:2024/1/20,16:45
*/
public class HPKC008 {
// 查询
public static final String QUERY_SUM = "HPKC008.querySum";
}
/**
* HPKC009 SQL 定义 * HPKC009 SQL 定义
* *
* @author:songx * @author:songx
......
...@@ -122,6 +122,7 @@ public class ServiceHPKC004A extends ServiceEPBase { ...@@ -122,6 +122,7 @@ public class ServiceHPKC004A extends ServiceEPBase {
newKc004.setAmount(applyAmount); newKc004.setAmount(applyAmount);
newKc004.setWeight(applyWeight); newKc004.setWeight(applyWeight);
newKc004.setRemark(applyRemark); newKc004.setRemark(applyRemark);
newKc004.setKcId(kcId);
newKc004.setDeleteFlag(CommonConstant.YesNo.NO_0); newKc004.setDeleteFlag(CommonConstant.YesNo.NO_0);
DaoUtils.insert(HPKC004.INSERT, newKc004); DaoUtils.insert(HPKC004.INSERT, newKc004);
// 修改库存数量 // 修改库存数量
......
package com.baosight.hpjx.hp.kc.service; package com.baosight.hpjx.hp.kc.service;
import com.baosight.hpjx.common.DdynamicEnum; import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.common.InventTypeEnun;
import com.baosight.hpjx.core.dao.DaoUtils; import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.hp.constant.HPConstant; import com.baosight.hpjx.hp.constant.HPConstant;
import com.baosight.hpjx.hp.constant.HPSqlConstant;
import com.baosight.hpjx.hp.kc.domain.HPKC008; import com.baosight.hpjx.hp.kc.domain.HPKC008;
import com.baosight.hpjx.hp.pz.tools.HPPZTools; import com.baosight.hpjx.hp.pz.tools.HPPZTools;
import com.baosight.hpjx.util.CommonMethod; import com.baosight.hpjx.util.CommonMethod;
...@@ -16,15 +18,20 @@ import com.baosight.iplat4j.ed.util.SequenceGenerator; ...@@ -16,15 +18,20 @@ import com.baosight.iplat4j.ed.util.SequenceGenerator;
import org.apache.commons.collections.MapUtils; import org.apache.commons.collections.MapUtils;
import java.util.Arrays; import java.util.Arrays;
import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
/** /**
* @author zjh * @author:songx
* @date 2024年01月09日 10:18 * @date:2024/1/26,0:03
*/ */
public class ServiceHPKC008 extends ServiceBase { public class ServiceHPKC008 extends ServiceBase {
// 指定存货类型
private static final Integer[] DEFAULT_INVENT_CODE = {InventTypeEnun.OTHER.getCode()};
/** /**
* 画面初始化 * 画面初始化
* *
...@@ -33,8 +40,10 @@ public class ServiceHPKC008 extends ServiceBase { ...@@ -33,8 +40,10 @@ public class ServiceHPKC008 extends ServiceBase {
*/ */
public EiInfo initLoad(EiInfo inInfo) { public EiInfo initLoad(EiInfo inInfo) {
try { try {
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.INVENT_NAME_BLOCK_ID), null); Map queryMap = new HashMap();
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.UNIT_NAME_BLOCK_ID), null, false); queryMap.put("inventTypes", DEFAULT_INVENT_CODE);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.INVENT_NAME_BLOCK_ID), queryMap);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.UNIT_NAME_BLOCK_ID), queryMap, false);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPKC008().eiMetadata); inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPKC008().eiMetadata);
} catch (Exception e) { } catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败"); LogUtils.setDetailMsg(inInfo, e, "初始化失败");
...@@ -55,8 +64,9 @@ public class ServiceHPKC008 extends ServiceBase { ...@@ -55,8 +64,9 @@ public class ServiceHPKC008 extends ServiceBase {
String dateMonth = MapUtils.getString(queryRow, "dateMonth"); String dateMonth = MapUtils.getString(queryRow, "dateMonth");
queryRow.put("dateMonth", StringUtil.removeSpecifiedCharacter(dateMonth, queryRow.put("dateMonth", StringUtil.removeSpecifiedCharacter(dateMonth,
StringUtil.DEFAULT_CHARACTER_TO_BE_REMOVED)); StringUtil.DEFAULT_CHARACTER_TO_BE_REMOVED));
inInfo = super.query(inInfo, "HPKC008.query", new HPKC008()); queryRow.put("inventTypes", DEFAULT_INVENT_CODE);
List sum = dao.query("HPKC008.querySum", queryRow); inInfo = super.query(inInfo, HPKC008.QUERY, new HPKC008());
List sum = dao.query(HPSqlConstant.HPKC008.QUERY_SUM, queryRow);
inInfo.getBlock(EiConstant.resultBlock).set(EiConstant.COLUMN_TOTAL_SUM, sum.get(0)); inInfo.getBlock(EiConstant.resultBlock).set(EiConstant.COLUMN_TOTAL_SUM, sum.get(0));
} catch (Exception e) { } catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败"); LogUtils.setDetailMsg(inInfo, e, "查询失败");
...@@ -83,8 +93,7 @@ public class ServiceHPKC008 extends ServiceBase { ...@@ -83,8 +93,7 @@ public class ServiceHPKC008 extends ServiceBase {
// 计算总金额 // 计算总金额
fKc008.setTotalPrice(fKc008.getAmount().multiply(fKc008.getPrice())); fKc008.setTotalPrice(fKc008.getAmount().multiply(fKc008.getPrice()));
// 生成单据号 // 生成单据号
fKc008.setStatNo(SequenceGenerator.getNextSequence( fKc008.setStatNo(SequenceGenerator.getNextSequence(HPConstant.SequenceId.HPKC008_NUMBER));
HPConstant.SequenceId.HPKC008_NUMBER));
DaoUtils.insert(HPKC008.INSERT, fKc008); DaoUtils.insert(HPKC008.INSERT, fKc008);
} }
inInfo = this.query(inInfo); inInfo = this.query(inInfo);
......
...@@ -21,6 +21,7 @@ $(function() { ...@@ -21,6 +21,7 @@ $(function() {
}, },
editor: function (container, options) { editor: function (container, options) {
let inInfo = new EiInfo(); let inInfo = new EiInfo();
inInfo.set("inqu_status-0-inventTypes", [6]);
inInfo.set("inqu_status-0-inventCode", options.model["inventCode"]); inInfo.set("inqu_status-0-inventCode", options.model["inventCode"]);
inInfo.set("serviceName", "HPPZ006"); inInfo.set("serviceName", "HPPZ006");
inInfo.set("methodName", "queryComboBoxUnit"); inInfo.set("methodName", "queryComboBoxUnit");
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
<EF:EFDatePicker cname="单据日期" ename="inqu_status-0-dateMonth" colWidth="3" <EF:EFDatePicker cname="单据日期" ename="inqu_status-0-dateMonth" colWidth="3"
format="yyyy-MM" start="year" depth="year" readonly="true" required="true"/> format="yyyy-MM" start="year" depth="year" readonly="true" required="true"/>
<EF:EFInput cname="统计单单号" ename="inqu_status-0-statNo" colWidth="3"/> <EF:EFInput cname="统计单单号" ename="inqu_status-0-statNo" colWidth="3"/>
<EF:EFSelect ename="inqu_status-0-inventCode" cname="存货名称" colWidth="3" filter="contains" defultValue=""> <EF:EFSelect cname="存货名称" ename="inqu_status-0-inventCode" colWidth="3" filter="contains">
<EF:EFOption label="请选择" value=""/> <EF:EFOption label="请选择" value=""/>
<EF:EFOptions blockId="invent_name_block_id" textField="textField" valueField="valueField"/> <EF:EFOptions blockId="invent_name_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect> </EF:EFSelect>
...@@ -24,8 +24,10 @@ ...@@ -24,8 +24,10 @@
<EF:EFColumn ename="statNo" cname="统计单单号" enable="false" width="140" align="center"/> <EF:EFColumn ename="statNo" cname="统计单单号" enable="false" width="140" align="center"/>
<EF:EFColumn ename="dateMonth" cname="月份" width="100" align="center" editType="date" <EF:EFColumn ename="dateMonth" cname="月份" width="100" align="center" editType="date"
dateFormat="yyyy-MM" parseFormats="['yyyyMM']" start="year" depth="year" required="true"/> dateFormat="yyyy-MM" parseFormats="['yyyyMM']" start="year" depth="year" required="true"/>
<EF:EFComboColumn ename="inventCode" cname="存货名称" width="120" align="center" required="true"> <EF:EFComboColumn ename="inventCode" cname="存货名称" width="120" align="center"
<EF:EFOptions blockId="invent_name_block_id" textField="textField" valueField="valueField"/> blockName="invent_name_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#"
required="true">
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFColumn ename="unit" cname="单位" width="100" align="center" required="true"/> <EF:EFColumn ename="unit" cname="单位" width="100" align="center" required="true"/>
<EF:EFColumn ename="amount" cname="数量" width="120" align="right" format="{0:N3}" sumType="all" <EF:EFColumn ename="amount" cname="数量" width="120" align="right" format="{0:N3}" 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