1\jsp
<%@ page language="java" pageEncoding="UTF-8" contentType="text/html;charset=utf-8"%>
<%@ include file="/includes/main.jsp"%>
<h2 class="contentTitle"><hi:text key="编辑页面" parameterLanguageKeys="公积金收缴"/></h2>
<form action="providentFundReceiveSave.action?navTabId=providentFundReceiveList&callbackType=closeCurrent&ajax=1" method="post" class="pageForm required-validate" enctype="multipart/form-data" onsubmit="return iframeCallback(this, navTabAjaxDone)">
<div class="pageContent">
<div class="pageFormContent" layoutH="97">
<dl>
<dt><hi:text key="收缴编号" entity="ProvidentFundReceive"/>:</dt><dd><input type="text" name="providentFundReceive.shoujiaobianhao" class="textInput required" value="${providentFundReceive.shoujiaobianhao}" maxlength="30"/></dd>
</dl>
<dl>
<dt><hi:text key="部门名称" entity="ProvidentFundReceive"/>:</dt>
<dd>
<input type="hidden" name="providentFundReceive.shoujiaodept.id" value="${providentFundReceive.shoujiaodept.id}"/>
<input type="text" class="textInput required" name="providentFundReceive.hi_shoujiaodept.orgName" value="${providentFundReceive.shoujiaodept.orgName}"
autocomplete="off" lookupGroup="providentFundReceive" lookupName="shoujiaodept" suggestClass="org.hi.base.organization.model.HiOrg" searchFields="orgName"/>
<a class="btnLook" href="<hi:url>hiOrgLookup.action?lookup=1</hi:url>" lookupGroup="providentFundReceive" lookupName="shoujiaodept"><hi:text key="查找带回"/></a>
</dd>
</dl>
<dl>
<dt><hi:text key="收缴年度" entity="ProvidentFundReceive"/>:</dt><dd><input type="text" name="providentFundReceive.shoujiaoniandu" class="textInput required integer" value="${providentFundReceive.shoujiaoniandu}" maxlength="4"/></dd>
</dl>
<dl>
<dt><hi:text key="收缴月份" entity="ProvidentFundReceive"/>:</dt><dd><input type="text" name="providentFundReceive.shoujiaoyuefen" class="textInput required integer" value="${providentFundReceive.shoujiaoyuefen}" maxlength="2"/></dd>
</dl>
<dl>
<dt><hi:text key="提交时间" entity="ProvidentFundReceive"/>:</dt>
<dd>
<input type="text" name="providentFundReceive.tijiaoshijian" class="textInput date" readonly="readonly"
value="<fmt:formatDate value='${providentFundReceive.tijiaoshijian}' pattern='yyyy-MM-dd'/>"/>
<a href="javascript:void(0)" class="inputDateButton"><hi:text key="选择"/></a>
</dd>
</dl>
<dl>
<dt><hi:text key="提交人" entity="ProvidentFundReceive"/>:</dt><dd><input type="text" name="providentFundReceive.tijiaoren" class="textInput" value="${providentFundReceive.tijiaoren}" maxlength="30"/></dd>
</dl>
<dl>
<dt><hi:text key="收缴总人数" entity="ProvidentFundReceive"/>:</dt><dd><input type="text" name="providentFundReceive.shoujiaozongrenshu" class="textInput integer" value="${providentFundReceive.shoujiaozongrenshu}" alt="<hi:text key="请输入整数"/>" readonly="readonly" /></dd>
</dl>
<dl>
<dt><hi:text key="收缴总金额" entity="ProvidentFundReceive"/>:</dt><dd><input type="text" name="providentFundReceive.shoujiaozongjine" class="textInput float" value="${providentFundReceive.shoujiaozongjine}" maxlength="30" readonly="readonly" /></dd>
</dl>
<dl>
<dt><hi:text key="转入总数" entity="ProvidentFundReceive"/>:</dt><dd><input type="text" name="providentFundReceive.zhuanruzongshu" class="textInput float" value="${providentFundReceive.zhuanruzongshu}" maxlength="30" readonly="readonly" /></dd>
</dl>
<dl>
<dt><hi:text key="转出总数" entity="ProvidentFundReceive"/>:</dt><dd><input type="text" name="providentFundReceive.zhuanchuzongshu" class="textInput float" value="${providentFundReceive.zhuanchuzongshu}" maxlength="30" readonly="readonly" /></dd>
</dl>
<dl>
<dt><hi:text key="提取总数" entity="ProvidentFundReceive"/>:</dt><dd><input type="text" name="providentFundReceive.tiquzongshu" class="textInput float" value="${providentFundReceive.tiquzongshu}" maxlength="30" readonly="readonly" /></dd>
</dl>
<dl>
<dt><hi:text key="备注" entity="ProvidentFundReceive"/>:</dt><dd><input type="text" name="providentFundReceive.beizhu" class="textInput" value="${providentFundReceive.beizhu}" maxlength="30"/></dd>
</dl>
<input type="hidden" name="providentFundReceive.id" value="${providentFundReceive.id}"/>
<input type="hidden" name="providentFundReceive.shoujiaoheji" value="${providentFundReceive.shoujiaoheji}"/>
<input type="hidden" name="providentFundReceive.creator.id" value="${providentFundReceive.creator.id}"/>
<input type="hidden" name="providentFundReceive.version" value="${providentFundReceive.version}"/>
<div class="divider"></div>
<div class="tabs">
<div class="tabsHeader">
<div class="tabsHeaderContent">
<ul>
<li><a href="javascript:void(0)"><span><hi:text key="公积金收缴明细"/></span></a></li>
</ul>
</div>
</div>
<div class="tabsContent" style="height:100px;">
<div align="center">
请上传本月单位公积金收缴数据,<a href="../web/excelmodel/hd.xls">详细输入请参照模板</a>
<div class="pageContent">
<div class="pageFormContent" layouth="97">
<dl>
<dt>附件:</dt><dd><input type="file" name="csvDataFile">
</dd>
</dl>
</div>
</div>
</div>
</div>
</div>
<div class="formBar">
<ul>
<li><div class="buttonActive"><div class="buttonContent"><button type="submit"><hi:text key="保存"/></button></div></div></li>
<li><div class="button"><div class="buttonContent"><button class="close" type="button"><hi:text key="关闭"/></button></div></div></li>
</ul>
</div>
</div>
</form>
2\xml
<action name="providentFundReceiveSave"
class="org.hi.providentfund.action.struts.ProvidentFundReceiveAction" method="saveProvidentFundReceive">
<result name="success" type="redirect-action">providentFundReceiveList</result>
<interceptor-ref name="fileUpload"/>
<interceptor-ref name="modelParamsStack"/>
<param name="maximumSize">52428800</param>
</action>
3/java
package org.hi.providentfund.action.struts;
import java.io.File;
import java.io.FileInputStream;
import java.io.InputStream;
import java.math.BigDecimal;
import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.List;
import org.apache.commons.lang.StringUtils;
import org.hi.SpringContextHolder;
import org.hi.framework.paging.PageInfo;
import org.hi.framework.web.PageInfoUtil;
import org.hi.framework.web.struts.BaseAction;
import org.hi.providentfund.action.ProvidentFundReceivePageInfo;
import org.hi.providentfund.model.ProvidentFundReceive;
import org.hi.providentfund.model.ProvidentFundReceiveDetails;
import org.hi.providentfund.service.ProvidentFundReceiveManager;
import org.hi.tool.ExtractExcelData;
public class ProvidentFundReceiveAction extends BaseAction{
private ProvidentFundReceive providentFundReceive;
private ProvidentFundReceivePageInfo pageInfo;
private List<ProvidentFundReceive> providentFundReceives;
private String orderIndexs;
/**
* 新增/修改保存公积金收缴
*/
public String saveProvidentFundReceive() throws Exception {
// 收缴年度
int shoujiaoniandu = -1;
// 收缴月份
int shoujiaoyuefen = -1;
// 个人代码
int gerendaima = -1;
// 姓名
int xingming = -1;
// 性别
int xingbie = -1;
// 身份证号
int shenfenzhenghao = -1;
// 收缴额
int shoujiaoe = -1;
// 转入数
int zhuanrushu = -1;
// 转出数
int zhuanchushu = -1;
// 合计
int heji = -1;
// 提取数
int tiqushu = -1;
// 备注
int note = -1;
// /**
// * 收缴总金额总数
// */
// double t_shoujiaozongjine=new Double("0")+0d;
// /**
// * 转入总数
// */
// double t_zhuanruzongshu=new Double("0")+0d;
// /**
// * 转出总数
// */
// double t_zhuanchuzongshu=new Double("0")+0d;
// /**
// * 提取总数
// */
double t_tiquzongshu=new Double("0")+0d;
double t_zhuanchushu=new Double("0")+0d;
double t_zhuanrushu=new Double("0")+0d;
double t_shoujiaoe=new Double("0")+0d;
int zongrenshu=0;
List<ProvidentFundReceiveDetails> providentFundReceiveDetailss = new ArrayList<ProvidentFundReceiveDetails>();
if (null != csvDataFile) {
InputStream in = new FileInputStream(csvDataFile);
ExtractExcelData exc = new ExtractExcelData();
exc.extract(in);
String[] title = exc.getHeaders();
List rows = exc.getData();
for (int m = 0; m < title.length; m++) {
String content = title[m].trim();
if ("收缴年度".equals(content)) {
shoujiaoniandu = m;
}
if ("收缴月份".equals(content)) {
shoujiaoyuefen = m;
}
if ("个人代码".equals(content)) {
gerendaima = m;
}
if ("姓名".equals(content)) {
xingming = m;
}
if ("性别".equals(content)) {
xingbie = m;
}
if ("身份证号".equals(content)) {
shenfenzhenghao = m;
}
if ("收缴额".equals(content)) {
shoujiaoe = m;
}
if ("转入数".equals(content)) {
zhuanrushu = m;
}
if ("转出数".equals(content)) {
zhuanchushu = m;
}
if ("提取数".equals(content)) {
tiqushu = m;
}
if ("合计".equals(content)) {
heji = m;
}
if ("备注".equals(content)) {
note = m;
}
}
for (int i = 0; i < rows.size(); i++) {
List row = (List) rows.get(i);
ProvidentFundReceiveDetails providentFundReceiveDetails = new ProvidentFundReceiveDetails();
providentFundReceiveDetails.setShoujiaoniandu(providentFundReceive.getShoujiaoniandu());
providentFundReceiveDetails.setShoujiaoyuefen(providentFundReceive.getShoujiaoyuefen());
if (-1 != gerendaima)
providentFundReceiveDetails.setGerendaima((String) row.get(gerendaima));
if (-1 != xingming)
providentFundReceiveDetails.setXingming((String) row.get(xingming));
if(-1!=xingbie)
providentFundReceiveDetails.setXingbie("女".equals((String) row.get(xingbie)) ? new Integer(1201) : new Integer(1200));
if (-1 != shenfenzhenghao)
providentFundReceiveDetails.setShenfenzhenghao((String) row.get(shenfenzhenghao));
if (-1 != shoujiaoe)
providentFundReceiveDetails.setShoujiaoe((String) row.get(shoujiaoe));
if (-1 != zhuanrushu)
providentFundReceiveDetails.setZhuanrushu((String) row.get(zhuanrushu));
if (-1 != zhuanchushu)
providentFundReceiveDetails.setZhuanchushu((String) row.get(zhuanchushu));
if (-1 != tiqushu)
providentFundReceiveDetails.setTiqushu((String) row.get(tiqushu));
if (-1 != note)
providentFundReceiveDetails.setNote((String) row.get(note));
providentFundReceiveDetailss.add(providentFundReceiveDetails);
/**
* 收缴总金额总数
*/
double heji_l=new Double("0")+0d;
BigDecimal heji_b = BigDecimal.valueOf(heji_l);
double temp=0;
if (-1 != shoujiaoe){
BigDecimal ba = BigDecimal.valueOf(t_shoujiaoe);
double rs=new Double(StringUtils.isBlank((String) row.get(shoujiaoe)) ? "0" : (String) row.get(shoujiaoe)).doubleValue();
BigDecimal bb= BigDecimal.valueOf(rs);
t_shoujiaoe =ba.add(bb).doubleValue();
heji_b=heji_b.add(bb) ;
temp=new Double(StringUtils.isBlank((String) row.get(shoujiaoe)) ? "0" : (String) row.get(shoujiaoe));
}
/**
* 转入总数
*/
if (-1 != zhuanrushu){
BigDecimal ba = BigDecimal.valueOf(t_zhuanrushu);
double rs=new Double(StringUtils.isBlank((String) row.get(zhuanrushu)) ? "0" : (String) row.get(zhuanrushu)).doubleValue();
BigDecimal bb= BigDecimal.valueOf(rs);
t_zhuanrushu =ba.add(bb).doubleValue();
heji_b=heji_b.add(bb) ;
temp=temp+new Double(StringUtils.isBlank((String) row.get(zhuanrushu)) ? "0" : (String) row.get(zhuanrushu));
}
/**
* 转出总数
*/
if (-1 != zhuanchushu){
BigDecimal ba = BigDecimal.valueOf(t_zhuanchushu);
double rs=new Double(StringUtils.isBlank((String) row.get(zhuanchushu)) ? "0" : (String) row.get(zhuanchushu)).doubleValue();
BigDecimal bb= BigDecimal.valueOf(rs);
t_zhuanchushu =ba.add(bb).doubleValue();
heji_b=heji_b.add(bb) ;
temp=temp+new Double(StringUtils.isBlank((String) row.get(zhuanchushu)) ? "0" : (String) row.get(zhuanchushu));
}
/**
* 提取总数
*/
if (-1 != tiqushu){
BigDecimal ba = BigDecimal.valueOf(t_tiquzongshu);
double rs=new Double(StringUtils.isBlank((String) row.get(tiqushu)) ? "0" : (String) row.get(tiqushu)).doubleValue();
BigDecimal bb= BigDecimal.valueOf(rs);
t_tiquzongshu =ba.add(bb).doubleValue();
heji_b=heji_b.add(bb) ;
temp=temp+new Double(StringUtils.isBlank((String) row.get(tiqushu)) ? "0" : (String) row.get(tiqushu));
}
if (0<temp) {
zongrenshu++;
}
heji_l=heji_b.doubleValue();
providentFundReceiveDetails.setHeji(""+heji_l);
providentFundReceiveDetailss.add(providentFundReceiveDetails);
}
}
ProvidentFundReceiveManager providentFundReceiveMgr = (ProvidentFundReceiveManager) SpringContextHolder.getBean(ProvidentFundReceive.class);
if (super.perExecute(providentFundReceive) != null)
return returnCommand();
if (null != providentFundReceiveDetailss) {
if (null != providentFundReceive.getProvidentFundReceiveDetailss()) {
providentFundReceive.getProvidentFundReceiveDetailss().clear();
} else {
providentFundReceive.setProvidentFundReceiveDetailss(new ArrayList());
}
providentFundReceive.getProvidentFundReceiveDetailss().addAll(
providentFundReceiveDetailss);
} else {
if (null != providentFundReceive.getProvidentFundReceiveDetailss()) {
providentFundReceive.getProvidentFundReceiveDetailss().clear();
} else {
providentFundReceive
.setProvidentFundReceiveDetailss(new ArrayList());
}
}
/**
* 收缴合计
*/
double t_shoujiaoheji=0d;
BigDecimal aa= BigDecimal.valueOf(t_shoujiaoe);
BigDecimal bb= BigDecimal.valueOf(t_zhuanrushu);
t_shoujiaoheji=aa.add(bb).doubleValue();
providentFundReceive.setShoujiaozongjine(""+t_shoujiaoe);
providentFundReceive.setZhuanruzongshu(""+t_zhuanrushu);
providentFundReceive.setZhuanchuzongshu(""+t_zhuanchushu);
providentFundReceive.setTiquzongshu(""+t_tiquzongshu);
providentFundReceive.setShoujiaoheji(""+t_shoujiaoheji);
providentFundReceive.setShoujiaozongrenshu(zongrenshu);
providentFundReceiveMgr.saveProvidentFundReceive(providentFundReceive);
super.postExecute(providentFundReceive);
return returnCommand();
}
/**
* 删除公积金收缴
*/
public String removeProvidentFundReceive() throws Exception {
ProvidentFundReceiveManager providentFundReceiveMgr = (ProvidentFundReceiveManager)SpringContextHolder.getBean(ProvidentFundReceive.class);
providentFundReceiveMgr.removeProvidentFundReceiveById(providentFundReceive.getId());
return returnCommand();
}
/**
* 删除指定的某些公积金收缴
*/
public String removeAllProvidentFundReceive() throws Exception {
ProvidentFundReceiveManager providentFundReceiveMgr = (ProvidentFundReceiveManager)SpringContextHolder.getBean(ProvidentFundReceive.class);
if (orderIndexs != null && orderIndexs.length()> 0 )
{
String[] ids= orderIndexs.split(",");
for( int i=0; i<ids.length; i++)
{
if (ids[i].length()>0)
{
Integer providentFundReceiveid = new Integer( ids[i] );
providentFundReceiveMgr.removeProvidentFundReceiveById(providentFundReceiveid);
}
}
}
return returnCommand();
}
/**
*查看公积金收缴
*/
public String viewProvidentFundReceive() throws Exception {
ProvidentFundReceiveManager providentFundReceiveMgr = (ProvidentFundReceiveManager)SpringContextHolder.getBean(ProvidentFundReceive.class);
providentFundReceive = providentFundReceiveMgr.getProvidentFundReceiveById(providentFundReceive.getId());
return returnCommand();
}
/**
* 公积金收缴列表
*/
public String providentFundReceiveList() throws Exception {
ProvidentFundReceiveManager providentFundReceiveMgr = (ProvidentFundReceiveManager)SpringContextHolder.getBean(ProvidentFundReceive.class);
pageInfo = pageInfo == null ? new ProvidentFundReceivePageInfo() : pageInfo;
PageInfo sarchPageInfo = PageInfoUtil.populate(pageInfo, this);
providentFundReceives = providentFundReceiveMgr.getSecurityProvidentFundReceiveList(sarchPageInfo);
return returnCommand();
}
public ProvidentFundReceive getProvidentFundReceive() {
return providentFundReceive;
}
public void setProvidentFundReceive(ProvidentFundReceive providentFundReceive) {
this.providentFundReceive = providentFundReceive;
}
public List<ProvidentFundReceive> getProvidentFundReceives() {
return providentFundReceives;
}
public void setProvidentFundReceives(List<ProvidentFundReceive> providentFundReceives) {
this.providentFundReceives = providentFundReceives;
}
public ProvidentFundReceivePageInfo getPageInfo() {
return pageInfo;
}
public void setPageInfo(ProvidentFundReceivePageInfo pageInfo) {
this.pageInfo = pageInfo;
}
public String getOrderIndexs() {
return orderIndexs;
}
public void setOrderIndexs(String orderIndexs) {
this.orderIndexs = orderIndexs;
}
File csvDataFile;
String csvDataFileContentType;
String csvDataFileFileName;
public File getCsvDataFile() {
return csvDataFile;
}
public void setCsvDataFile(File csvDataFile) {
this.csvDataFile = csvDataFile;
}
public String getCsvDataFileContentType() {
return csvDataFileContentType;
}
public void setCsvDataFileContentType(String csvDataFileContentType) {
this.csvDataFileContentType = csvDataFileContentType;
}
public String getCsvDataFileFileName() {
return csvDataFileFileName;
}
public void setCsvDataFileFileName(String csvDataFileFileName) {
this.csvDataFileFileName = csvDataFileFileName;
}
}
相关推荐
标题中的“j-ui dwz 好文件”很可能是指基于Java开发的一款名为“j-ui”的用户界面框架,其中“dwz”可能是该框架的一个特定版本或者一个子项目名称。DWZ全称可能为“Design Without Z-index”,它可能是一个专为...
离线安装包,亲测可用
dwz与spring集成的例子 DWZ Java (MyBiaits+SpringMVC) 示例 ...mysql -u root -p dwz4j < dwz4j.sql 2) JDK 1.6 3) 项目文件UTF-8编码,如果用eclipse打开项目,注意把工作空间编码设成UTF-8 4) 启动tomcat
6. **对话框与弹窗**:DWZ提供了多种类型的对话框,如提示框、确认框、信息框、加载框,以及可自定义的弹窗,这些对话框都支持Ajax加载内容,增强了用户体验。 7. **表单处理**:框架内置了表单验证和提交功能,...
离线安装包,亲测可用
【标题】"dwz-demo-1.1.6RC1.zip_DEMO_dwz php_dwz-demo_dwz-ria_php dwz" 指的是一个基于PHP的开源前端框架dwz的演示版本,版本号为1.1.6RC1。这个压缩包包含了一个名为“dwz-demo”的项目,是用于展示和学习dwz...
【标题】"dwz4j-demo-" 指的是一个基于DWZ Java框架的演示项目,这通常是为了展示DWZ框架的功能和用法而创建的一个实例应用。DWZ(Dynamic Web Zone)是一个开源的Java Web开发框架,它专注于提供前端UI和后端服务的...
dwz4j不仅仅是一个开发框架,还包括了一套完整的UI规范(包括前台UI规范和后台管理DWZ UI框架)、程序框架、开发流程、测试流程、版本控制、数据备份方案 dwz4j帮助开发人员搞定所有低级的基础代码——所有那些需要...
DWZ框架dwz4j-springmvc dwz-ria-1.4.4 dwz-user-guide.swf DWZ框架使用的实例简单介绍.doc DWZ框架使用手册.pdf
"dwz4j-demo-20111025.zip"可能是一个具体的演示项目,包含了2011年10月25日时的DWZ框架的使用示例,帮助开发者了解如何在实际项目中应用DWZ框架。 在使用"dwz4j-springmvc.zip"进行开发时,开发者可以期待以下关键...
"dwz" 是框架的简称,"dwz_demo" 和 "dwz-demo" 可能指的是框架的演示或示例代码,"dwz-ria" 强调了其与RIA的关联,而 "ria" 是Rich Internet Application的缩写,代表了这种类型的软件应用。 **压缩包子文件:** ...
j-ui原(DWZ富客户端框架),设计目标: 简单实用、扩展灵活、开发快速、RIA思路、轻量级;以HTML扩展的方式代替JavaScript代码,几乎可以达到用户不懂JavaScript也能很容易学会的使用,支持各种页面组件及Ajax相关...
【标题】"dwzteam-dwz_jui-master" 是一个开源项目,主要涉及的是DWZ UI框架的一个版本。DWZ UI(Dynamic Web Zone User Interface)是一个基于jQuery的前端交互框架,专为Web应用程序设计,提供了丰富的组件和交互...
### DWZ富客户端框架概述 DWZ是一款专为中国开发者打造的富客户端框架,它基于jQuery实现了RIA(Rich Internet Applications)的开发模式。该框架的主要设计理念是简单实用、易于扩展、加速开发过程,并遵循轻量级...
mysql -u root -p dwz4j < dwz4j.sql 2) JDK 1.6 3) 项目文件UTF-8编码,如果用eclipse打开项目,注意把工作空间编码设成UTF-8 4) 启动tomcat 功能演示: Ajax Search 分页 添加 删除 修改 导出Excel ...
J-HI(Java Web)快速开发平台 + jUI整合应用(Eclipse插件生成项目代码) ThinkPHP2.1 + jUI整合应用 YII + jUI整合应用 常见问题及解决: Error loading XML document: dwz.frag.xml 直接用IE打开index.html弹出一个...
【DWZ团队-DWZ_group-master】项目是一个基于DWZ框架和ThinkPHP开发的小组工作日志管理系统。这个系统的设计目标是提供一个简洁高效的工具,用于团队成员记录、分享和管理日常工作进度,促进团队协作与沟通。下面...
DWZ系列开源项目: dwz富客户端框架 - jUI dwz4j(Java Web)快速开发框架 + jUI整合应用 J-HI(Java Web)快速开发平台 + jUI整合应用(Eclipse插件生成项目代码) ThinkPHP2.1 + jUI整合应用 YII + jUI整合应用
DWZ富客户端框架dwz-ria-1.4.6是一款专为开发高效、美观的Web应用程序而设计的后台框架。这款框架集成了多种技术,旨在简化开发过程,让开发者无需深入理解AJAX和jQuery等复杂技术,也能快速构建出与专业级应用相...
### DWZ富客户端框架:深度解析与应用指南 #### 概述 DWZ富客户端框架,作为一款由国人自主研发的RIA(Rich Internet Application)框架,其核心构建在jQuery基础上,旨在提供一种简单实用、易于扩展且能快速进行...