Commit dbaedf35 by 江和松

鸿鹏抛帐管理代码提交

parent 435eb41c
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;
}
}
$(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