Commit a054f5b9 by liuyang

Merge branch 'dev' of http://git.pseer.com:8800/platform/hp-smart into dev-ly

parents 9542fb70 1e8f8ce7
......@@ -20,7 +20,6 @@ import com.baosight.hpjx.util.DateUtils;
import com.baosight.hpjx.util.EiInfoUtils;
import com.baosight.hpjx.util.LogUtils;
import com.baosight.hpjx.util.ObjectUtils;
import com.baosight.hpjx.util.StringUtil;
import com.baosight.iplat4j.core.data.DaoEPBase;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
......@@ -80,10 +79,9 @@ public class ServiceHPKC009 extends ServiceBase {
public EiInfo query(EiInfo inInfo) {
try {
Map queryRow = EiInfoUtils.getFirstRow(inInfo);
String receiptDate = MapUtils.getString(queryRow, "dateProc");
queryRow.put("dateProc", StringUtil.removeSpecifiedCharacter(receiptDate,
StringUtil.DEFAULT_CHARACTER_TO_BE_REMOVED));
queryRow.put("dateType", CommonConstant.DateType.MONTH);
String dateProc = MapUtils.getString(queryRow, HPKC009.FIELD_DATE_PROC);
queryRow.put(HPKC009.FIELD_DATE_PROC, DateUtils.formatShort(dateProc));
queryRow.put(HPKC009.FIELD_DATE_TYPE, CommonConstant.DateType.MONTH);
inInfo = super.query(inInfo, HPKC009.QUERY, new HPKC009());
List sum = dao.query(HPSqlConstant.HPKC009.QUERY_SUM, queryRow);
inInfo.getBlock(EiConstant.resultBlock).set(EiConstant.COLUMN_TOTAL_SUM, sum.get(0));
......
package com.baosight.hpjx.hp.pz.service;
import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation;
import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.hp.pz.domain.HPPZ022;
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 java.util.List;
import java.util.Map;
/**
* 抛帐管理
*
* @author:
* @date:2024/1/15,11:20
*/
public class ServiceHPPZ022 extends ServiceBase {
/**
* 画面初始化
*
* @param inInfo
* @return
*/
@Override
public EiInfo initLoad(EiInfo inInfo) {
try {
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPPZ022().eiMetadata);
} catch (PlatException e) {
logError("初始化失败", e.getMessage());
}
return inInfo;
}
/**
* 查询数据列表
*
* @param inInfo
* @return
*/
@Override
@OperationLogAnnotation(operModul = "抛帐管理", operType = "查询", operDesc = "查询")
public EiInfo query(EiInfo inInfo) {
try {
inInfo = super.query(inInfo, HPPZ022.QUERY, new HPPZ022());
} catch (Exception e) {
logError("查询失败", e.getMessage());
}
return inInfo;
}
/**
* 删除操作
*
* @param inInfo
* @return
*/
@Override
public EiInfo delete(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
for (Map resultRow : resultRows) {
HPPZ022 hppz022 = new HPPZ022();
hppz022.fromMap(resultRow);
DaoUtils.update(HPPZ022.DELETE, hppz022);
}
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据删除成功!");
} catch (Exception e) {
logError("删除失败", e.getMessage());
}
return inInfo;
}
/**
* 红冲操作
*
* @param inInfo
* @return
*/
public EiInfo redFlush(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
for (Map resultRow : resultRows) {
HPPZ022 hppz022 = new HPPZ022();
hppz022.fromMap(resultRow);
}
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据红冲成功!");
} catch (Exception e) {
logError("红冲失败", e.getMessage());
}
return inInfo;
}
/**
* 重抛操作
*
* @param inInfo
* @return
*/
public EiInfo againSend(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
for (Map resultRow : resultRows) {
HPPZ022 hppz022 = new HPPZ022();
hppz022.fromMap(resultRow);
}
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据重抛成功!");
} catch (Exception e) {
logError("重抛失败", e.getMessage());
}
return inInfo;
}
}
package com.baosight.hpjx.hp.pz.service;
import com.baosight.hpjx.hp.pz.domain.HPPZ022A;
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.ServiceEPBase;
/**
* 抛帐管理明细
*
* @author:songx
* @date:2024/1/25,15:25
*/
public class ServiceHPPZ022A extends ServiceEPBase {
/**
* 画面初始化
*
* @param inInfo
* @return
*/
public EiInfo initLoad(EiInfo inInfo) {
try {
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPPZ022A().eiMetadata);
} catch (PlatException e) {
logError("初始化失败", e.getMessage());
}
return inInfo;
}
/**
* 查询操作
*
* @param inInfo
* @return
*/
@Override
public EiInfo query(EiInfo inInfo) {
try {
inInfo = super.query(inInfo, "HPPZ022A.query", new HPPZ022A());
} catch (Throwable e) {
logError("查询失败", e.getMessage());
}
return inInfo;
}
}
......@@ -8,8 +8,8 @@
<EF:EFPage title="库存收发存">
<EF:EFRegion id="inqu" title="查询条件">
<div class="row">
<EF:EFDatePicker cname="单据日期" ename="inqu_status-0-receiptDate" colWidth="3"
role="date" format="yyyy-MM-dd" readonly="true"/>
<EF:EFDatePicker ename="dateProc" cname="日期" blockId="inqu_status" row="0" colWidth="3"
role="date" format="yyyy-MM" start="year" depth="year" readonly="true"/>
<EF:EFSelect cname="存货类型" ename="inqu_status-0-inventType" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hpjx.hpkc.inventType"/>
......@@ -31,11 +31,11 @@
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true">
<EF:EFRegion id="result" title="记录集" fitHeight="true">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" height="69vh">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="dateProc" cname="日期" enable="false" width="90" align="center"/>
<EF:EFComboColumn ename="inventType" cname="存货类型" enable="false" width="90" align="center">
<EF:EFColumn ename="dateProc" cname="日期" enable="false" width="100" align="center"/>
<EF:EFComboColumn ename="inventType" cname="存货类型" enable="false" width="100" align="center">
<EF:EFCodeOption codeName="hpjx.hpkc.inventType"/>
</EF:EFComboColumn>
<EF:EFComboColumn ename="whCode" cname="仓库名称" enable="false" width="100" align="center"
......@@ -52,39 +52,50 @@
</EF:EFComboColumn>
<EF:EFColumn ename="initAmount" cname="期初数量" enable="false" width="100" align="right" format="{0:N0}"
sumType="all"/>
<EF:EFColumn ename="initWeight" cname="期初重量(T)" enable="false" width="100" align="right" format="{0:N3}"
<EF:EFColumn ename="initWeight" cname="期初重量(T)" enable="false" width="100" align="right" format="{0:N3}"
sumType="all"/>
<EF:EFColumn ename="cgEnterAmount" cname="采购入库数量" enable="false" width="100" align="right" format="{0:N0}"
sumType="all"/>
<EF:EFColumn ename="cgEnterWeight" cname="采购入库重量(T)" enable="false" width="100" align="right" format="{0:N3}"
<EF:EFColumn ename="cgEnterWeight" cname="采购入库重量(T)" enable="false" width="120" align="right"
format="{0:N3}"
sumType="all"/>
<EF:EFColumn ename="qtEnterAmount" cname="其它入库数量" enable="false" width="90" align="right" format="{0:N0}"
<EF:EFColumn ename="qtEnterAmount" cname="其它入库数量" enable="false" width="100" align="right"
format="{0:N0}"
sumType="all"/>
<EF:EFColumn ename="qtEnterWeight" cname="其它入库重量(T)" enable="false" width="90" align="right" format="{0:N3}"
<EF:EFColumn ename="qtEnterWeight" cname="其它入库重量(T)" enable="false" width="120" align="right"
format="{0:N3}"
sumType="all"/>
<EF:EFColumn ename="enterAmount" cname="入库数量" enable="false" width="90" align="right" format="{0:N0}"
<EF:EFColumn ename="enterAmount" cname="入库数量" enable="false" width="100" align="right" format="{0:N0}"
sumType="all"/>
<EF:EFColumn ename="enterWeight" cname="入库重量(T)" enable="false" width="90" align="right" format="{0:N3}"
<EF:EFColumn ename="enterWeight" cname="入库重量(T)" enable="false" width="100" align="right"
format="{0:N3}"
sumType="all"/>
<EF:EFColumn ename="scOuterAmount" cname="生产领料数量" enable="false" width="90" align="right" format="{0:N0}"
<EF:EFColumn ename="scOuterAmount" cname="生产领料数量" enable="false" width="100" align="right"
format="{0:N0}"
sumType="all"/>
<EF:EFColumn ename="scOuterWeight" cname="生产领料重量(T)" enable="false" width="90" align="right" format="{0:N3}"
<EF:EFColumn ename="scOuterWeight" cname="生产领料重量(T)" enable="false" width="120" align="right"
format="{0:N3}"
sumType="all"/>
<EF:EFColumn ename="qtOuterAmount" cname="其它出库数量" enable="false" width="90" align="right" format="{0:N0}"
<EF:EFColumn ename="qtOuterAmount" cname="其它出库数量" enable="false" width="100" align="right"
format="{0:N0}"
sumType="all"/>
<EF:EFColumn ename="qtOuterWeight" cname="其它出库重量(T)" enable="false" width="90" align="right" format="{0:N3}"
<EF:EFColumn ename="qtOuterWeight" cname="其它出库重量(T)" enable="false" width="120" align="right"
format="{0:N3}"
sumType="all"/>
<EF:EFColumn ename="outerAmount" cname="出库数量" enable="false" width="90" align="right" format="{0:N0}"
<EF:EFColumn ename="outerAmount" cname="出库数量" enable="false" width="100" align="right" format="{0:N0}"
sumType="all"/>
<EF:EFColumn ename="outerWeight" cname="出库重量(T)" enable="false" width="90" align="right" format="{0:N3}"
<EF:EFColumn ename="outerWeight" cname="出库重量(T)" enable="false" width="100" align="right"
format="{0:N3}"
sumType="all"/>
<EF:EFColumn ename="pdDiffAmount" cname="盘点差异数量" enable="false" width="90" align="right" format="{0:N0}"
<EF:EFColumn ename="pdDiffAmount" cname="盘点差异数量" enable="false" width="100" align="right"
format="{0:N0}"
sumType="all"/>
<EF:EFColumn ename="pdDiffWeight" cname="盘点差异重量(T)" enable="false" width="90" align="right" format="{0:N3}"
<EF:EFColumn ename="pdDiffWeight" cname="盘点差异重量(T)" enable="false" width="120" align="right"
format="{0:N3}"
sumType="all"/>
<EF:EFColumn ename="endAmount" cname="期末数量" enable="false" width="90" align="right" format="{0:N0}"
<EF:EFColumn ename="endAmount" cname="期末数量" enable="false" width="100" align="right" format="{0:N0}"
sumType="all"/>
<EF:EFColumn ename="endWeight" cname="期末重量(T)" enable="false" width="90" align="right" format="{0:N3}"
<EF:EFColumn ename="endWeight" cname="期末重量(T)" enable="false" width="100" align="right" format="{0:N3}"
sumType="all"/>
</EF:EFGrid>
</EF:EFRegion>
......
$(function () {
// 查询
$("#QUERY").on("click", query);
IPLATUI.EFGrid.result = {
pageable: {
pageSize: 20,
pageSizes: [10, 20, 30, 50, 100, 200]
},
columns: [{
field: "operator",
template: function (item) {
let template = '';
// 抛帐详情
if (item.billMainId) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="showDetail(\'' + item.billMainId + '\')" >抛帐详情</a>';
}
return template
}
}],
loadComplete: function (grid) {
$("#RESEND").on("click", resend);
$("#REDFLUSH").on("click", redFlush);
},
onSuccess: function (e) {
if(e.eiInfo.extAttr.methodName == 'save'
||e.eiInfo.extAttr.methodName == 'delete'){
query();
}
},
onSave: function (e) {
// 阻止后台保存请求,使用自定义保存
e.preventDefault();
},
onDelete: function (e) {
// 阻止后台删除请求,使用自定义删除
e.preventDefault();
}
}
});
/**
* 页面加载时执行
*/
$(window).load(function () {
// 查询
query();
});
/**
* 抛帐明细
*
* @param id
*/
function showDetail(id) {
JSColorbox.open({
href: "HPPZ022A?methodName=initLoad&inqu_status-0-billMainId=" + id,
title: "<div style='text-align: center;'>抛帐明细</div>",
width: "80%",
height: "80%",
});
}
/**
* 查询
*/
let query = function () {
resultGrid.dataSource.page(1);
}
/**
* 重新抛帐
*/
function resend(){
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"重新抛帐\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result", "HPPZ022", "againSend", true,
function (ei) {
if (ei.getStatus() != -1){
query();
}
});
}
});
}
/**
* 红冲
*/
function redFlush(){
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"红冲\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result", "HPPZ022", "redFlush", true,
function (ei) {
if (ei.getStatus() != -1){
query();
}
});
}
});
}
<!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:EFInput ename="inqu_status-0-billMainNo" cname="抛帐单据号" colWidth="3" placeholder="模糊查询"/>
<EF:EFInput ename="inqu_status-0-sourceBillNo" cname="业务单据号" colWidth="3" placeholder="模糊查询"/>
<EF:EFSelect ename="inqu_status-0-billStatus" cname="抛帐状态" colWidth="3" valueTemplate="#=textField#">
<EF:EFOption label="全部" value=""/>
<EF:EFOption label="发送中" value="10"/>
<EF:EFOption label="抛帐成功" value="20"/>
<EF:EFOption label="抛帐失败" value="30"/>
</EF:EFSelect>
<EF:EFInput ename="inqu_status-0-voucherCode" cname="凭证号" colWidth="3" placeholder="模糊查询"/>
<EF:EFDatePicker ename="inqu_status-0-voucherDateStar" cname="凭证日期开始" colWidth="3" placeholder="凭证日期" role="date" readonly="true"
parseFormats="['yyyyMMdd','yyyy-MM-dd']"/>
<EF:EFDatePicker ename="inqu_status-0-voucherDateEnd" cname="凭证日期结束" colWidth="3" placeholder="凭证日期" role="date" readonly="true"
parseFormats="['yyyyMMdd','yyyy-MM-dd']"/>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="记录集" fitHeight="true" autoBind="false">
<EF:EFGrid blockId="result" autoDraw="false" checkMode="checkbox, row">
<EF:EFColumn ename="operator" cname="操作" enable="false" width="170" locked="true" align="center"/>
<EF:EFColumn cname="billMainId" ename="billMainId" width="100" align="left" fix="yes" enable="false" hidden="true"/>
<%-- <EF:EFColumn cname="账套" ename="inAccount" align="center" width="120" enable="false" />--%>
<EF:EFColumn cname="抛帐单据号" ename="billMainNo" align="center" width="120" enable="false" />
<EF:EFColumn cname="单据金额" ename="totalAmount" align="right" width="120" enable="false" data-rules="number" sumType="total"/>
<EF:EFColumn cname="摘要" ename="voucherSummary" align="left" width="120" enable="false"/>
<EF:EFComboColumn cname="抛帐状态" ename="billStatus" width="120" enable="false" readonly="true" >
<EF:EFOption label="" value=" "/>
<EF:EFOption label="发送中" value="10"/>
<EF:EFOption label="抛帐成功" value="20"/>
<EF:EFOption label="抛帐失败" value="30"/>
</EF:EFComboColumn>
<EF:EFColumn cname="标财反馈" ename="msgReturn" align="center" width="120" enable="false" />
<EF:EFColumn cname="凭证号" ename="voucherCode" align="center" width="90" enable="false" />
<EF:EFColumn cname="凭证日期" ename="voucherDate" align="left" enable="false" />
<EF:EFColumn cname="业务单据号" ename="sourceBillNo" align="left" enable="false" />
<%-- <EF:EFColumn cname="业务单据名称" ename="deptName" align="left" enable="false" />--%>
<EF:EFColumn cname="单据日期" ename="billDate" align="left" enable="false" />
</EF:EFGrid>
</EF:EFRegion>
<EF:EFWindow id="pzDetail" url=" " lazyload="true" width="90%" height="90%"></EF:EFWindow>
</EF:EFPage>
$(function () {
// 查询
$("#QUERY").on("click", query);
IPLATUI.EFGrid.result = {
pageable: {
pageSize: 20,
pageSizes: [10, 20, 30, 50, 100, 200]
},
columns: [
],
}
});
/**
* 页面加载时执行
*/
$(window).load(function () {
// 查询
query();
});
/**
* 查询
*/
let query = function () {
resultGrid.dataSource.page(1);
}
<!DOCTYPE html>
<%@ page language="java" 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" %>
<EF:EFPage title="抛帐管理明细">
<EF:EFInput blockId="inqu_status" row="0" ename="billMainId" type="hidden" colWidth="3"/>
<%-- <EF:EFRegion id="inqu" title="查询区">--%>
<%-- <div class="row">--%>
<%-- --%>
<%-- </div>--%>
<%-- </EF:EFRegion>--%>
<EF:EFRegion id="result" title="记录集" fitHeight="true" autoBind="false">
<EF:EFGrid blockId="result" autoDraw="false" checkMode="single, row">
<EF:EFColumn cname="billLineId" ename="billLineId" width="100" align="left" fix="yes" enable="false" hidden="true"/>
<EF:EFColumn cname="抛帐单据号" ename="billLineNo" align="center" width="120" enable="false" />
<EF:EFColumn cname="责任中心编码" ename="costCenter" align="center" width="120" enable="false"/>
<EF:EFColumn cname="责任中心名称" ename="costCenterName" align="center" width="120" enable="false"/>
<EF:EFColumn cname="项目编号" ename="projectCode" align="center" width="120" enable="false" />
<EF:EFColumn cname="金额" ename="functionalAmount" align="center" width="90" enable="false" />
<EF:EFColumn cname="抛帐辅助1" ename="detailReserveC1" align="left" enable="false" />
<EF:EFColumn cname="抛帐辅助2" ename="detailReserveC2" align="left" enable="false" />
<EF:EFColumn cname="抛帐辅助3" ename="detailReserveC3" align="left" enable="false" />
<EF:EFColumn cname="抛帐辅助4" ename="detailReserveC4" align="left" enable="false" />
<EF:EFColumn cname="抛帐辅助5" ename="detailReserveC5" align="left" enable="false" />
<EF:EFColumn cname="抛帐辅助6" ename="detailReserveC6" align="left" enable="false" />
<EF:EFColumn cname="抛帐数字1" ename="detailReserveN1" align="left" enable="false" />
<EF:EFColumn cname="抛帐数字2" ename="detailReserveN2" align="left" enable="false" />
<EF:EFColumn cname="抛帐数字3" ename="detailReserveN3" align="left" enable="false" />
<EF:EFColumn cname="抛帐数字4" ename="detailReserveN4" align="left" enable="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