新增收支项目和结算账户功能
This commit is contained in:
335
src/com/jsh/action/basic/AccountAction.java
Normal file
335
src/com/jsh/action/basic/AccountAction.java
Normal file
@@ -0,0 +1,335 @@
|
||||
package com.jsh.action.basic;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.sql.Timestamp;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import net.sf.json.JSONArray;
|
||||
import net.sf.json.JSONObject;
|
||||
|
||||
import org.springframework.dao.DataAccessException;
|
||||
|
||||
import com.jsh.base.BaseAction;
|
||||
import com.jsh.base.Log;
|
||||
import com.jsh.model.po.Logdetails;
|
||||
import com.jsh.model.po.Account;
|
||||
import com.jsh.model.vo.basic.AccountModel;
|
||||
import com.jsh.service.basic.AccountIService;
|
||||
import com.jsh.util.common.PageUtil;
|
||||
/**
|
||||
* 结算账户
|
||||
* @author ji sheng hua
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class AccountAction extends BaseAction<AccountModel>
|
||||
{
|
||||
private AccountIService accountService;
|
||||
private AccountModel model = new AccountModel();
|
||||
|
||||
/**
|
||||
* 增加结算账户
|
||||
* @return
|
||||
*/
|
||||
public void create()
|
||||
{
|
||||
Log.infoFileSync("==================开始调用增加结算账户方法===================");
|
||||
Boolean flag = false;
|
||||
try
|
||||
{
|
||||
Account Account = new Account();
|
||||
Account.setName(model.getName());
|
||||
Account.setSerialNo(model.getSerialNo());
|
||||
Account.setInitialAmount(model.getInitialAmount());
|
||||
Account.setCurrentAmount(model.getCurrentAmount());
|
||||
Account.setRemark(model.getRemark());
|
||||
accountService.create(Account);
|
||||
|
||||
//========标识位===========
|
||||
flag = true;
|
||||
//记录操作日志使用
|
||||
tipMsg = "成功";
|
||||
tipType = 0;
|
||||
}
|
||||
catch (DataAccessException e)
|
||||
{
|
||||
Log.errorFileSync(">>>>>>>>>>>>>>>>>>>增加结算账户异常", e);
|
||||
flag = false;
|
||||
tipMsg = "失败";
|
||||
tipType = 1;
|
||||
}
|
||||
finally
|
||||
{
|
||||
try
|
||||
{
|
||||
toClient(flag.toString());
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
Log.errorFileSync(">>>>>>>>>>>>增加结算账户回写客户端结果异常", e);
|
||||
}
|
||||
}
|
||||
|
||||
logService.create(new Logdetails(getUser(), "增加结算账户", model.getClientIp(),
|
||||
new Timestamp(System.currentTimeMillis())
|
||||
, tipType, "增加结算账户名称为 "+ model.getName() + " " + tipMsg + "!", "增加结算账户" + tipMsg));
|
||||
Log.infoFileSync("==================结束调用增加结算账户方法===================");
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除结算账户
|
||||
* @return
|
||||
*/
|
||||
public String delete()
|
||||
{
|
||||
Log.infoFileSync("====================开始调用删除结算账户信息方法delete()================");
|
||||
try
|
||||
{
|
||||
accountService.delete(model.getAccountID());
|
||||
tipMsg = "成功";
|
||||
tipType = 0;
|
||||
}
|
||||
catch (DataAccessException e)
|
||||
{
|
||||
Log.errorFileSync(">>>>>>>>>>>删除ID为 " + model.getAccountID() + " 的结算账户异常", e);
|
||||
tipMsg = "失败";
|
||||
tipType = 1;
|
||||
}
|
||||
model.getShowModel().setMsgTip(tipMsg);
|
||||
logService.create(new Logdetails(getUser(), "删除结算账户", model.getClientIp(),
|
||||
new Timestamp(System.currentTimeMillis())
|
||||
, tipType, "删除结算账户ID为 "+ model.getAccountID() + ",名称为 " + model.getName() + tipMsg + "!", "删除结算账户" + tipMsg));
|
||||
Log.infoFileSync("====================结束调用删除结算账户信息方法delete()================");
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新结算账户
|
||||
* @return
|
||||
*/
|
||||
public void update()
|
||||
{
|
||||
Boolean flag = false;
|
||||
try
|
||||
{
|
||||
Account Account = accountService.get(model.getAccountID());
|
||||
Account.setName(model.getName());
|
||||
Account.setSerialNo(model.getSerialNo());
|
||||
Account.setInitialAmount(model.getInitialAmount());
|
||||
Account.setCurrentAmount(model.getCurrentAmount());
|
||||
Account.setRemark(model.getRemark());
|
||||
accountService.update(Account);
|
||||
|
||||
flag = true;
|
||||
tipMsg = "成功";
|
||||
tipType = 0;
|
||||
}
|
||||
catch (DataAccessException e)
|
||||
{
|
||||
Log.errorFileSync(">>>>>>>>>>>>>修改结算账户ID为 : " + model.getAccountID() + "信息失败", e);
|
||||
flag = false;
|
||||
tipMsg = "失败";
|
||||
tipType = 1;
|
||||
}
|
||||
finally
|
||||
{
|
||||
try
|
||||
{
|
||||
toClient(flag.toString());
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
Log.errorFileSync(">>>>>>>>>>>>修改结算账户回写客户端结果异常", e);
|
||||
}
|
||||
}
|
||||
logService.create(new Logdetails(getUser(), "更新结算账户", model.getClientIp(),
|
||||
new Timestamp(System.currentTimeMillis())
|
||||
, tipType, "更新结算账户ID为 "+ model.getAccountID() + " " + tipMsg + "!", "更新结算账户" + tipMsg));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除指定ID结算账户
|
||||
* @return
|
||||
*/
|
||||
public String batchDelete()
|
||||
{
|
||||
try
|
||||
{
|
||||
accountService.batchDelete(model.getAccountIDs());
|
||||
model.getShowModel().setMsgTip("成功");
|
||||
//记录操作日志使用
|
||||
tipMsg = "成功";
|
||||
tipType = 0;
|
||||
}
|
||||
catch (DataAccessException e)
|
||||
{
|
||||
Log.errorFileSync(">>>>>>>>>>>批量删除结算账户ID为:" + model.getAccountIDs() + "信息异常", e);
|
||||
tipMsg = "失败";
|
||||
tipType = 1;
|
||||
}
|
||||
|
||||
logService.create(new Logdetails(getUser(), "批量删除结算账户", model.getClientIp(),
|
||||
new Timestamp(System.currentTimeMillis())
|
||||
, tipType, "批量删除结算账户ID为 "+ model.getAccountIDs() + " " + tipMsg + "!", "批量删除结算账户" + tipMsg));
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
* 检查输入名称是否存在
|
||||
*/
|
||||
public void checkIsNameExist()
|
||||
{
|
||||
Boolean flag = false;
|
||||
try
|
||||
{
|
||||
flag = accountService.checkIsNameExist("name", model.getName(), "id", model.getAccountID());
|
||||
}
|
||||
catch (DataAccessException e)
|
||||
{
|
||||
Log.errorFileSync(">>>>>>>>>>>>>>>>>检查结算账户名称为:" + model.getName() + " ID为: " + model.getAccountID() + " 是否存在异常!");
|
||||
}
|
||||
finally
|
||||
{
|
||||
try
|
||||
{
|
||||
toClient(flag.toString());
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
Log.errorFileSync(">>>>>>>>>>>>回写检查结算账户名称为:" + model.getName() + " ID为: " + model.getAccountID() + " 是否存在异常!",e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 查找结算账户信息
|
||||
* @return
|
||||
*/
|
||||
public void findBy()
|
||||
{
|
||||
try
|
||||
{
|
||||
PageUtil<Account> pageUtil = new PageUtil<Account>();
|
||||
pageUtil.setPageSize(model.getPageSize());
|
||||
pageUtil.setCurPage(model.getPageNo());
|
||||
pageUtil.setAdvSearch(getCondition());
|
||||
accountService.find(pageUtil);
|
||||
List<Account> dataList = pageUtil.getPageList();
|
||||
|
||||
JSONObject outer = new JSONObject();
|
||||
outer.put("total", pageUtil.getTotalCount());
|
||||
//存放数据json数组
|
||||
JSONArray dataArray = new JSONArray();
|
||||
if(null != dataList)
|
||||
{
|
||||
for(Account account:dataList)
|
||||
{
|
||||
JSONObject item = new JSONObject();
|
||||
item.put("id", account.getId());
|
||||
//结算账户名称
|
||||
item.put("name", account.getName());
|
||||
item.put("serialNo", account.getSerialNo());
|
||||
item.put("initialAmount", account.getInitialAmount());
|
||||
item.put("currentAmount", account.getCurrentAmount());
|
||||
item.put("remark", account.getRemark());
|
||||
item.put("op", 1);
|
||||
dataArray.add(item);
|
||||
}
|
||||
}
|
||||
outer.put("rows", dataArray);
|
||||
//回写查询结果
|
||||
toClient(outer.toString());
|
||||
}
|
||||
catch (DataAccessException e)
|
||||
{
|
||||
Log.errorFileSync(">>>>>>>>>查找结算账户信息异常", e);
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
Log.errorFileSync(">>>>>>>>>回写查询结算账户信息结果异常", e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 查找结算账户信息-下拉框
|
||||
* @return
|
||||
*/
|
||||
public void findBySelect()
|
||||
{
|
||||
try
|
||||
{
|
||||
PageUtil<Account> pageUtil = new PageUtil<Account>();
|
||||
pageUtil.setPageSize(0);
|
||||
pageUtil.setCurPage(0);
|
||||
pageUtil.setAdvSearch(getCondition_select());
|
||||
accountService.find(pageUtil);
|
||||
List<Account> dataList = pageUtil.getPageList();
|
||||
//存放数据json数组
|
||||
JSONArray dataArray = new JSONArray();
|
||||
if(null != dataList)
|
||||
{
|
||||
for(Account account:dataList)
|
||||
{
|
||||
JSONObject item = new JSONObject();
|
||||
item.put("id", account.getId());
|
||||
//结算账户名称
|
||||
item.put("name", account.getName());
|
||||
dataArray.add(item);
|
||||
}
|
||||
}
|
||||
//回写查询结果
|
||||
toClient(dataArray.toString());
|
||||
}
|
||||
catch (DataAccessException e)
|
||||
{
|
||||
Log.errorFileSync(">>>>>>>>>查找结算账户信息异常", e);
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
Log.errorFileSync(">>>>>>>>>回写查询结算账户信息结果异常", e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 拼接搜索条件
|
||||
* @return
|
||||
*/
|
||||
private Map<String,Object> getCondition()
|
||||
{
|
||||
/**
|
||||
* 拼接搜索条件
|
||||
*/
|
||||
Map<String,Object> condition = new HashMap<String,Object>();
|
||||
condition.put("name_s_like", model.getName());
|
||||
condition.put("serialNo_s_like", model.getSerialNo());
|
||||
condition.put("remark_s_like", model.getRemark());
|
||||
condition.put("id_s_order", "desc");
|
||||
return condition;
|
||||
}
|
||||
|
||||
/**
|
||||
* 拼接搜索条件-下拉框-结算账户
|
||||
* @return
|
||||
*/
|
||||
private Map<String,Object> getCondition_select()
|
||||
{
|
||||
/**
|
||||
* 拼接搜索条件
|
||||
*/
|
||||
Map<String,Object> condition = new HashMap<String,Object>();
|
||||
condition.put("id_s_order", "desc");
|
||||
return condition;
|
||||
}
|
||||
|
||||
//=============以下spring注入以及Model驱动公共方法,与Action处理无关==================
|
||||
@Override
|
||||
public AccountModel getModel()
|
||||
{
|
||||
return model;
|
||||
}
|
||||
public void setAccountService(AccountIService accountService)
|
||||
{
|
||||
this.accountService = accountService;
|
||||
}
|
||||
}
|
||||
@@ -30,7 +30,10 @@ import com.jsh.service.basic.AppIService;
|
||||
import com.jsh.service.basic.UserBusinessIService;
|
||||
import com.jsh.util.common.PageUtil;
|
||||
//import com.opensymphony.xwork2.ActionContext;
|
||||
|
||||
/**
|
||||
* 应用
|
||||
* @author ji_sheng_hua
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class AppAction extends BaseAction<AppModel>
|
||||
{
|
||||
|
||||
328
src/com/jsh/action/basic/InOutItemAction.java
Normal file
328
src/com/jsh/action/basic/InOutItemAction.java
Normal file
@@ -0,0 +1,328 @@
|
||||
package com.jsh.action.basic;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.sql.Timestamp;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import net.sf.json.JSONArray;
|
||||
import net.sf.json.JSONObject;
|
||||
|
||||
import org.springframework.dao.DataAccessException;
|
||||
|
||||
import com.jsh.base.BaseAction;
|
||||
import com.jsh.base.Log;
|
||||
import com.jsh.model.po.Logdetails;
|
||||
import com.jsh.model.po.InOutItem;
|
||||
import com.jsh.model.vo.basic.InOutItemModel;
|
||||
import com.jsh.service.basic.InOutItemIService;
|
||||
import com.jsh.util.common.PageUtil;
|
||||
/**
|
||||
* 收支项目
|
||||
* @author ji*sheng*hua
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class InOutItemAction extends BaseAction<InOutItemModel>
|
||||
{
|
||||
private InOutItemIService inOutItemService;
|
||||
private InOutItemModel model = new InOutItemModel();
|
||||
|
||||
/**
|
||||
* 增加收支项目
|
||||
* @return
|
||||
*/
|
||||
public void create()
|
||||
{
|
||||
Log.infoFileSync("==================开始调用增加收支项目方法===================");
|
||||
Boolean flag = false;
|
||||
try
|
||||
{
|
||||
InOutItem inOutItem = new InOutItem();
|
||||
inOutItem.setName(model.getName());
|
||||
inOutItem.setType(model.getType());
|
||||
inOutItem.setRemark(model.getRemark());
|
||||
inOutItemService.create(inOutItem);
|
||||
|
||||
//========标识位===========
|
||||
flag = true;
|
||||
//记录操作日志使用
|
||||
tipMsg = "成功";
|
||||
tipType = 0;
|
||||
}
|
||||
catch (DataAccessException e)
|
||||
{
|
||||
Log.errorFileSync(">>>>>>>>>>>>>>>>>>>增加收支项目异常", e);
|
||||
flag = false;
|
||||
tipMsg = "失败";
|
||||
tipType = 1;
|
||||
}
|
||||
finally
|
||||
{
|
||||
try
|
||||
{
|
||||
toClient(flag.toString());
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
Log.errorFileSync(">>>>>>>>>>>>增加收支项目回写客户端结果异常", e);
|
||||
}
|
||||
}
|
||||
|
||||
logService.create(new Logdetails(getUser(), "增加收支项目", model.getClientIp(),
|
||||
new Timestamp(System.currentTimeMillis())
|
||||
, tipType, "增加收支项目名称为 "+ model.getName() + " " + tipMsg + "!", "增加收支项目" + tipMsg));
|
||||
Log.infoFileSync("==================结束调用增加收支项目方法===================");
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除收支项目
|
||||
* @return
|
||||
*/
|
||||
public String delete()
|
||||
{
|
||||
Log.infoFileSync("====================开始调用删除收支项目信息方法delete()================");
|
||||
try
|
||||
{
|
||||
inOutItemService.delete(model.getInOutItemID());
|
||||
tipMsg = "成功";
|
||||
tipType = 0;
|
||||
}
|
||||
catch (DataAccessException e)
|
||||
{
|
||||
Log.errorFileSync(">>>>>>>>>>>删除ID为 " + model.getInOutItemID() + " 的收支项目异常", e);
|
||||
tipMsg = "失败";
|
||||
tipType = 1;
|
||||
}
|
||||
model.getShowModel().setMsgTip(tipMsg);
|
||||
logService.create(new Logdetails(getUser(), "删除收支项目", model.getClientIp(),
|
||||
new Timestamp(System.currentTimeMillis())
|
||||
, tipType, "删除收支项目ID为 "+ model.getInOutItemID() + ",名称为 " + model.getName() + tipMsg + "!", "删除收支项目" + tipMsg));
|
||||
Log.infoFileSync("====================结束调用删除收支项目信息方法delete()================");
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新收支项目
|
||||
* @return
|
||||
*/
|
||||
public void update()
|
||||
{
|
||||
Boolean flag = false;
|
||||
try
|
||||
{
|
||||
InOutItem inOutItem = inOutItemService.get(model.getInOutItemID());
|
||||
inOutItem.setName(model.getName());
|
||||
inOutItem.setType(model.getType());
|
||||
inOutItem.setRemark(model.getRemark());
|
||||
inOutItemService.update(inOutItem);
|
||||
|
||||
flag = true;
|
||||
tipMsg = "成功";
|
||||
tipType = 0;
|
||||
}
|
||||
catch (DataAccessException e)
|
||||
{
|
||||
Log.errorFileSync(">>>>>>>>>>>>>修改收支项目ID为 : " + model.getInOutItemID() + "信息失败", e);
|
||||
flag = false;
|
||||
tipMsg = "失败";
|
||||
tipType = 1;
|
||||
}
|
||||
finally
|
||||
{
|
||||
try
|
||||
{
|
||||
toClient(flag.toString());
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
Log.errorFileSync(">>>>>>>>>>>>修改收支项目回写客户端结果异常", e);
|
||||
}
|
||||
}
|
||||
logService.create(new Logdetails(getUser(), "更新收支项目", model.getClientIp(),
|
||||
new Timestamp(System.currentTimeMillis())
|
||||
, tipType, "更新收支项目ID为 "+ model.getInOutItemID() + " " + tipMsg + "!", "更新收支项目" + tipMsg));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除指定ID收支项目
|
||||
* @return
|
||||
*/
|
||||
public String batchDelete()
|
||||
{
|
||||
try
|
||||
{
|
||||
inOutItemService.batchDelete(model.getInOutItemIDs());
|
||||
model.getShowModel().setMsgTip("成功");
|
||||
//记录操作日志使用
|
||||
tipMsg = "成功";
|
||||
tipType = 0;
|
||||
}
|
||||
catch (DataAccessException e)
|
||||
{
|
||||
Log.errorFileSync(">>>>>>>>>>>批量删除收支项目ID为:" + model.getInOutItemIDs() + "信息异常", e);
|
||||
tipMsg = "失败";
|
||||
tipType = 1;
|
||||
}
|
||||
|
||||
logService.create(new Logdetails(getUser(), "批量删除收支项目", model.getClientIp(),
|
||||
new Timestamp(System.currentTimeMillis())
|
||||
, tipType, "批量删除收支项目ID为 "+ model.getInOutItemIDs() + " " + tipMsg + "!", "批量删除收支项目" + tipMsg));
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
* 检查输入名称是否存在
|
||||
*/
|
||||
public void checkIsNameExist()
|
||||
{
|
||||
Boolean flag = false;
|
||||
try
|
||||
{
|
||||
flag = inOutItemService.checkIsNameExist("name",model.getName(),"id", model.getInOutItemID());
|
||||
}
|
||||
catch (DataAccessException e)
|
||||
{
|
||||
Log.errorFileSync(">>>>>>>>>>>>>>>>>检查收支项目名称为:" + model.getName() + " ID为: " + model.getInOutItemID() + " 是否存在异常!");
|
||||
}
|
||||
finally
|
||||
{
|
||||
try
|
||||
{
|
||||
toClient(flag.toString());
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
Log.errorFileSync(">>>>>>>>>>>>回写检查收支项目名称为:" + model.getName() + " ID为: " + model.getInOutItemID() + " 是否存在异常!",e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 查找收支项目信息
|
||||
* @return
|
||||
*/
|
||||
public void findBy()
|
||||
{
|
||||
try
|
||||
{
|
||||
PageUtil<InOutItem> pageUtil = new PageUtil<InOutItem>();
|
||||
pageUtil.setPageSize(model.getPageSize());
|
||||
pageUtil.setCurPage(model.getPageNo());
|
||||
pageUtil.setAdvSearch(getCondition());
|
||||
inOutItemService.find(pageUtil);
|
||||
List<InOutItem> dataList = pageUtil.getPageList();
|
||||
|
||||
JSONObject outer = new JSONObject();
|
||||
outer.put("total", pageUtil.getTotalCount());
|
||||
//存放数据json数组
|
||||
JSONArray dataArray = new JSONArray();
|
||||
if(null != dataList)
|
||||
{
|
||||
for(InOutItem inOutItem:dataList)
|
||||
{
|
||||
JSONObject item = new JSONObject();
|
||||
item.put("id", inOutItem.getId());
|
||||
//收支项目名称
|
||||
item.put("name", inOutItem.getName());
|
||||
item.put("type", inOutItem.getType());
|
||||
item.put("remark", inOutItem.getRemark());
|
||||
item.put("op", 1);
|
||||
dataArray.add(item);
|
||||
}
|
||||
}
|
||||
outer.put("rows", dataArray);
|
||||
//回写查询结果
|
||||
toClient(outer.toString());
|
||||
}
|
||||
catch (DataAccessException e)
|
||||
{
|
||||
Log.errorFileSync(">>>>>>>>>查找收支项目信息异常", e);
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
Log.errorFileSync(">>>>>>>>>回写查询收支项目信息结果异常", e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 查找收支项目信息-下拉框
|
||||
* @return
|
||||
*/
|
||||
public void findBySelect()
|
||||
{
|
||||
try
|
||||
{
|
||||
PageUtil<InOutItem> pageUtil = new PageUtil<InOutItem>();
|
||||
pageUtil.setPageSize(0);
|
||||
pageUtil.setCurPage(0);
|
||||
pageUtil.setAdvSearch(getCondition_select());
|
||||
inOutItemService.find(pageUtil);
|
||||
List<InOutItem> dataList = pageUtil.getPageList();
|
||||
//存放数据json数组
|
||||
JSONArray dataArray = new JSONArray();
|
||||
if(null != dataList)
|
||||
{
|
||||
for(InOutItem inOutItem:dataList)
|
||||
{
|
||||
JSONObject item = new JSONObject();
|
||||
item.put("id", inOutItem.getId());
|
||||
//收支项目名称
|
||||
item.put("name", inOutItem.getName());
|
||||
dataArray.add(item);
|
||||
}
|
||||
}
|
||||
//回写查询结果
|
||||
toClient(dataArray.toString());
|
||||
}
|
||||
catch (DataAccessException e)
|
||||
{
|
||||
Log.errorFileSync(">>>>>>>>>查找收支项目信息异常", e);
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
Log.errorFileSync(">>>>>>>>>回写查询收支项目信息结果异常", e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 拼接搜索条件
|
||||
* @return
|
||||
*/
|
||||
private Map<String,Object> getCondition()
|
||||
{
|
||||
/**
|
||||
* 拼接搜索条件
|
||||
*/
|
||||
Map<String,Object> condition = new HashMap<String,Object>();
|
||||
condition.put("name_s_like", model.getName());
|
||||
condition.put("remark_s_like", model.getRemark());
|
||||
condition.put("id_s_order", "desc");
|
||||
return condition;
|
||||
}
|
||||
|
||||
/**
|
||||
* 拼接搜索条件-下拉框-收支项目
|
||||
* @return
|
||||
*/
|
||||
private Map<String,Object> getCondition_select()
|
||||
{
|
||||
/**
|
||||
* 拼接搜索条件
|
||||
*/
|
||||
Map<String,Object> condition = new HashMap<String,Object>();
|
||||
condition.put("id_s_order", "desc");
|
||||
return condition;
|
||||
}
|
||||
|
||||
//=============以下spring注入以及Model驱动公共方法,与Action处理无关==================
|
||||
@Override
|
||||
public InOutItemModel getModel()
|
||||
{
|
||||
return model;
|
||||
}
|
||||
public void setInOutItemService(InOutItemIService inOutItemService)
|
||||
{
|
||||
this.inOutItemService = inOutItemService;
|
||||
}
|
||||
}
|
||||
17
src/com/jsh/dao/basic/AccountDAO.java
Normal file
17
src/com/jsh/dao/basic/AccountDAO.java
Normal file
@@ -0,0 +1,17 @@
|
||||
package com.jsh.dao.basic;
|
||||
|
||||
import com.jsh.base.BaseDAO;
|
||||
import com.jsh.model.po.Account;
|
||||
|
||||
public class AccountDAO extends BaseDAO<Account> implements AccountIDAO
|
||||
{
|
||||
/**
|
||||
* 设置dao映射基类
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Class<Account> getEntityClass()
|
||||
{
|
||||
return Account.class;
|
||||
}
|
||||
}
|
||||
9
src/com/jsh/dao/basic/AccountIDAO.java
Normal file
9
src/com/jsh/dao/basic/AccountIDAO.java
Normal file
@@ -0,0 +1,9 @@
|
||||
package com.jsh.dao.basic;
|
||||
|
||||
import com.jsh.base.BaseIDAO;
|
||||
import com.jsh.model.po.Account;
|
||||
|
||||
public interface AccountIDAO extends BaseIDAO<Account>
|
||||
{
|
||||
|
||||
}
|
||||
17
src/com/jsh/dao/basic/InOutItemDAO.java
Normal file
17
src/com/jsh/dao/basic/InOutItemDAO.java
Normal file
@@ -0,0 +1,17 @@
|
||||
package com.jsh.dao.basic;
|
||||
|
||||
import com.jsh.base.BaseDAO;
|
||||
import com.jsh.model.po.InOutItem;
|
||||
|
||||
public class InOutItemDAO extends BaseDAO<InOutItem> implements InOutItemIDAO
|
||||
{
|
||||
/**
|
||||
* 设置dao映射基类
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Class<InOutItem> getEntityClass()
|
||||
{
|
||||
return InOutItem.class;
|
||||
}
|
||||
}
|
||||
9
src/com/jsh/dao/basic/InOutItemIDAO.java
Normal file
9
src/com/jsh/dao/basic/InOutItemIDAO.java
Normal file
@@ -0,0 +1,9 @@
|
||||
package com.jsh.dao.basic;
|
||||
|
||||
import com.jsh.base.BaseIDAO;
|
||||
import com.jsh.model.po.InOutItem;
|
||||
|
||||
public interface InOutItemIDAO extends BaseIDAO<InOutItem>
|
||||
{
|
||||
|
||||
}
|
||||
@@ -36,24 +36,4 @@ public class DepotItemDAO extends BaseDAO<DepotItem> implements DepotItemIDAO
|
||||
pageUtil.setTotalCount(query.list().size());
|
||||
pageUtil.setPageList(query.list());
|
||||
}
|
||||
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void findOrderByMaterial(PageUtil<DepotItem> pageUtil) throws JshException
|
||||
{
|
||||
//多表联查,多表连查,此处用到了createSQLQuery,可以随便写sql语句,很方便
|
||||
Query query = this.getHibernateTemplate().getSessionFactory().getCurrentSession().createSQLQuery("select * from jsh_depotitem where 1=1 " + SearchConditionUtil.getCondition(pageUtil.getAdvSearch()));
|
||||
pageUtil.setTotalCount(query.list().size());
|
||||
|
||||
// 分页查询
|
||||
int pageNo = pageUtil.getCurPage();
|
||||
int pageSize = pageUtil.getPageSize();
|
||||
if (0 != pageNo && 0 != pageSize)
|
||||
{
|
||||
query.setFirstResult((pageNo - 1) * pageSize);
|
||||
query.setMaxResults(pageSize);
|
||||
}
|
||||
pageUtil.setPageList(query.list());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,7 +8,5 @@ import com.jsh.util.common.PageUtil;
|
||||
|
||||
public interface DepotItemIDAO extends BaseIDAO<DepotItem>
|
||||
{
|
||||
void findByType(PageUtil<DepotItem> pageUtil,String type,Long MId, String MonthTime,Boolean isPrev) throws JshException;
|
||||
|
||||
void findOrderByMaterial(PageUtil<DepotItem> pageUtil) throws JshException;
|
||||
void findByType(PageUtil<DepotItem> pageUtil,String type,Long MId, String MonthTime,Boolean isPrev) throws JshException;
|
||||
}
|
||||
|
||||
@@ -1,24 +1,24 @@
|
||||
package com.jsh.filter.common;
|
||||
|
||||
import org.hibernate.FlushMode;
|
||||
import org.hibernate.Session;
|
||||
import org.hibernate.SessionFactory;
|
||||
import org.springframework.dao.DataAccessResourceFailureException;
|
||||
import org.springframework.orm.hibernate3.support.OpenSessionInViewFilter;
|
||||
|
||||
public class OpenSessionInViewFilterExtend extends OpenSessionInViewFilter
|
||||
{
|
||||
@Override
|
||||
protected Session getSession(SessionFactory sessionFactory)
|
||||
throws DataAccessResourceFailureException
|
||||
{
|
||||
this.setFlushMode(FlushMode.AUTO);
|
||||
return super.getSession(sessionFactory);
|
||||
}
|
||||
@Override
|
||||
protected void closeSession(Session session, SessionFactory sessionFactory)
|
||||
{
|
||||
session.flush();
|
||||
super.closeSession(session, sessionFactory);
|
||||
}
|
||||
}
|
||||
package com.jsh.filter.common;
|
||||
|
||||
import org.hibernate.FlushMode;
|
||||
import org.hibernate.Session;
|
||||
import org.hibernate.SessionFactory;
|
||||
import org.springframework.dao.DataAccessResourceFailureException;
|
||||
import org.springframework.orm.hibernate3.support.OpenSessionInViewFilter;
|
||||
|
||||
public class OpenSessionInViewFilterExtend extends OpenSessionInViewFilter
|
||||
{
|
||||
@Override
|
||||
protected Session getSession(SessionFactory sessionFactory)
|
||||
throws DataAccessResourceFailureException
|
||||
{
|
||||
this.setFlushMode(FlushMode.AUTO);
|
||||
return super.getSession(sessionFactory);
|
||||
}
|
||||
@Override
|
||||
protected void closeSession(Session session, SessionFactory sessionFactory)
|
||||
{
|
||||
session.flush();
|
||||
super.closeSession(session, sessionFactory);
|
||||
}
|
||||
}
|
||||
|
||||
36
src/com/jsh/model/po/Account.hbm.xml
Normal file
36
src/com/jsh/model/po/Account.hbm.xml
Normal file
@@ -0,0 +1,36 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
|
||||
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
|
||||
<hibernate-mapping>
|
||||
<class name="com.jsh.model.po.Account" table="jsh_account">
|
||||
<id name="Id" type="java.lang.Long">
|
||||
<column name="Id"/>
|
||||
<generator class="native"/>
|
||||
</id>
|
||||
<property generated="never" lazy="false" name="Name" type="java.lang.String">
|
||||
<column length="50" name="Name">
|
||||
<comment>名称</comment>
|
||||
</column>
|
||||
</property>
|
||||
<property generated="never" lazy="false" name="SerialNo" type="java.lang.String">
|
||||
<column length="50" name="SerialNo">
|
||||
<comment>编号</comment>
|
||||
</column>
|
||||
</property>
|
||||
<property generated="never" lazy="false" name="InitialAmount" type="java.lang.Double">
|
||||
<column name="InitialAmount" precision="22" scale="3">
|
||||
<comment>期初金额</comment>
|
||||
</column>
|
||||
</property>
|
||||
<property generated="never" lazy="false" name="CurrentAmount" type="java.lang.Double">
|
||||
<column name="CurrentAmount" precision="22" scale="3">
|
||||
<comment>当前余额</comment>
|
||||
</column>
|
||||
</property>
|
||||
<property generated="never" lazy="false" name="Remark" type="java.lang.String">
|
||||
<column length="100" name="Remark">
|
||||
<comment>备注</comment>
|
||||
</column>
|
||||
</property>
|
||||
</class>
|
||||
</hibernate-mapping>
|
||||
90
src/com/jsh/model/po/Account.java
Normal file
90
src/com/jsh/model/po/Account.java
Normal file
@@ -0,0 +1,90 @@
|
||||
package com.jsh.model.po;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
public class Account implements java.io.Serializable
|
||||
{
|
||||
private Long Id;
|
||||
private String Name;
|
||||
private String SerialNo;
|
||||
private Double InitialAmount;
|
||||
private Double CurrentAmount;
|
||||
private String Remark;
|
||||
|
||||
public Account()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public Account(Long Id)
|
||||
{
|
||||
this.Id = Id;
|
||||
}
|
||||
|
||||
public Account(String name, String serialNo, Double initialAmount, Double currentAmount, String remark) {
|
||||
Name = name;
|
||||
SerialNo = serialNo;
|
||||
InitialAmount = initialAmount;
|
||||
CurrentAmount = currentAmount;
|
||||
Remark = remark;
|
||||
}
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
Id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return Id;
|
||||
}
|
||||
|
||||
public void setName(String name)
|
||||
{
|
||||
Name = name;
|
||||
}
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return Name;
|
||||
}
|
||||
|
||||
public void setSerialNo(String serialNo)
|
||||
{
|
||||
SerialNo = serialNo;
|
||||
}
|
||||
|
||||
public String getSerialNo()
|
||||
{
|
||||
return SerialNo;
|
||||
}
|
||||
|
||||
public void setInitialAmount(Double initialAmount)
|
||||
{
|
||||
InitialAmount = initialAmount;
|
||||
}
|
||||
|
||||
public Double getInitialAmount()
|
||||
{
|
||||
return InitialAmount;
|
||||
}
|
||||
|
||||
public void setCurrentAmount(Double currentAmount)
|
||||
{
|
||||
CurrentAmount = currentAmount;
|
||||
}
|
||||
|
||||
public Double getCurrentAmount()
|
||||
{
|
||||
return CurrentAmount;
|
||||
}
|
||||
|
||||
public void setRemark(String remark)
|
||||
{
|
||||
Remark = remark;
|
||||
}
|
||||
|
||||
public String getRemark()
|
||||
{
|
||||
return Remark;
|
||||
}
|
||||
}
|
||||
@@ -1,103 +1,103 @@
|
||||
package com.jsh.model.po;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
public class DepotItem implements java.io.Serializable
|
||||
{
|
||||
private Long Id;
|
||||
private DepotHead HeaderId;
|
||||
private Material MaterialId;
|
||||
private Double OperNumber;
|
||||
private Double UnitPrice;
|
||||
private Double Incidentals;
|
||||
private String Remark;
|
||||
private String Img;
|
||||
|
||||
public DepotItem()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public DepotItem(Long Id)
|
||||
{
|
||||
this.Id = Id ;
|
||||
}
|
||||
|
||||
public DepotItem(DepotHead headerId, Material materialId,
|
||||
Double operNumber, Double unitPrice, Double incidentals,
|
||||
String remark, String img) {
|
||||
super();
|
||||
HeaderId = headerId;
|
||||
MaterialId = materialId;
|
||||
OperNumber = operNumber;
|
||||
UnitPrice = unitPrice;
|
||||
Incidentals = incidentals;
|
||||
Remark = remark;
|
||||
Img = img;
|
||||
}
|
||||
|
||||
public Long getId() {
|
||||
return Id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
Id = id;
|
||||
}
|
||||
|
||||
public DepotHead getHeaderId() {
|
||||
return HeaderId;
|
||||
}
|
||||
|
||||
public void setHeaderId(DepotHead headerId) {
|
||||
HeaderId = headerId;
|
||||
}
|
||||
|
||||
public Material getMaterialId() {
|
||||
return MaterialId;
|
||||
}
|
||||
|
||||
public void setMaterialId(Material materialId) {
|
||||
MaterialId = materialId;
|
||||
}
|
||||
|
||||
public Double getOperNumber() {
|
||||
return OperNumber;
|
||||
}
|
||||
|
||||
public void setOperNumber(Double operNumber) {
|
||||
OperNumber = operNumber;
|
||||
}
|
||||
|
||||
public Double getUnitPrice() {
|
||||
return UnitPrice;
|
||||
}
|
||||
|
||||
public void setUnitPrice(Double unitPrice) {
|
||||
UnitPrice = unitPrice;
|
||||
}
|
||||
|
||||
public Double getIncidentals() {
|
||||
return Incidentals;
|
||||
}
|
||||
|
||||
public void setIncidentals(Double incidentals) {
|
||||
Incidentals = incidentals;
|
||||
}
|
||||
|
||||
public String getRemark() {
|
||||
return Remark;
|
||||
}
|
||||
|
||||
public void setRemark(String remark) {
|
||||
Remark = remark;
|
||||
}
|
||||
|
||||
public String getImg() {
|
||||
return Img;
|
||||
}
|
||||
|
||||
public void setImg(String img) {
|
||||
Img = img;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
package com.jsh.model.po;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
public class DepotItem implements java.io.Serializable
|
||||
{
|
||||
private Long Id;
|
||||
private DepotHead HeaderId;
|
||||
private Material MaterialId;
|
||||
private Double OperNumber;
|
||||
private Double UnitPrice;
|
||||
private Double Incidentals;
|
||||
private String Remark;
|
||||
private String Img;
|
||||
|
||||
public DepotItem()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public DepotItem(Long Id)
|
||||
{
|
||||
this.Id = Id ;
|
||||
}
|
||||
|
||||
public DepotItem(DepotHead headerId, Material materialId,
|
||||
Double operNumber, Double unitPrice, Double incidentals,
|
||||
String remark, String img) {
|
||||
super();
|
||||
HeaderId = headerId;
|
||||
MaterialId = materialId;
|
||||
OperNumber = operNumber;
|
||||
UnitPrice = unitPrice;
|
||||
Incidentals = incidentals;
|
||||
Remark = remark;
|
||||
Img = img;
|
||||
}
|
||||
|
||||
public Long getId() {
|
||||
return Id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
Id = id;
|
||||
}
|
||||
|
||||
public DepotHead getHeaderId() {
|
||||
return HeaderId;
|
||||
}
|
||||
|
||||
public void setHeaderId(DepotHead headerId) {
|
||||
HeaderId = headerId;
|
||||
}
|
||||
|
||||
public Material getMaterialId() {
|
||||
return MaterialId;
|
||||
}
|
||||
|
||||
public void setMaterialId(Material materialId) {
|
||||
MaterialId = materialId;
|
||||
}
|
||||
|
||||
public Double getOperNumber() {
|
||||
return OperNumber;
|
||||
}
|
||||
|
||||
public void setOperNumber(Double operNumber) {
|
||||
OperNumber = operNumber;
|
||||
}
|
||||
|
||||
public Double getUnitPrice() {
|
||||
return UnitPrice;
|
||||
}
|
||||
|
||||
public void setUnitPrice(Double unitPrice) {
|
||||
UnitPrice = unitPrice;
|
||||
}
|
||||
|
||||
public Double getIncidentals() {
|
||||
return Incidentals;
|
||||
}
|
||||
|
||||
public void setIncidentals(Double incidentals) {
|
||||
Incidentals = incidentals;
|
||||
}
|
||||
|
||||
public String getRemark() {
|
||||
return Remark;
|
||||
}
|
||||
|
||||
public void setRemark(String remark) {
|
||||
Remark = remark;
|
||||
}
|
||||
|
||||
public String getImg() {
|
||||
return Img;
|
||||
}
|
||||
|
||||
public void setImg(String img) {
|
||||
Img = img;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
26
src/com/jsh/model/po/InOutItem.hbm.xml
Normal file
26
src/com/jsh/model/po/InOutItem.hbm.xml
Normal file
@@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
|
||||
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
|
||||
<hibernate-mapping>
|
||||
<class name="com.jsh.model.po.InOutItem" table="jsh_inoutitem">
|
||||
<id name="Id" type="java.lang.Long">
|
||||
<column name="Id"/>
|
||||
<generator class="native"/>
|
||||
</id>
|
||||
<property generated="never" lazy="false" name="Name" type="java.lang.String">
|
||||
<column length="50" name="Name">
|
||||
<comment>名称</comment>
|
||||
</column>
|
||||
</property>
|
||||
<property generated="never" lazy="false" name="Type" type="java.lang.String">
|
||||
<column length="20" name="Type">
|
||||
<comment>类型</comment>
|
||||
</column>
|
||||
</property>
|
||||
<property generated="never" lazy="false" name="Remark" type="java.lang.String">
|
||||
<column length="100" name="Remark">
|
||||
<comment>备注</comment>
|
||||
</column>
|
||||
</property>
|
||||
</class>
|
||||
</hibernate-mapping>
|
||||
66
src/com/jsh/model/po/InOutItem.java
Normal file
66
src/com/jsh/model/po/InOutItem.java
Normal file
@@ -0,0 +1,66 @@
|
||||
package com.jsh.model.po;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
public class InOutItem implements java.io.Serializable
|
||||
{
|
||||
private Long Id;
|
||||
private String Name;
|
||||
private String Type;
|
||||
private String Remark;
|
||||
|
||||
public InOutItem()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public InOutItem(Long Id)
|
||||
{
|
||||
this.Id = Id;
|
||||
}
|
||||
|
||||
public InOutItem(String name, String type, String remark) {
|
||||
Name = name;
|
||||
Type = type;
|
||||
Remark = remark;
|
||||
}
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
Id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return Id;
|
||||
}
|
||||
|
||||
public void setName(String name)
|
||||
{
|
||||
Name = name;
|
||||
}
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return Name;
|
||||
}
|
||||
|
||||
public void setType(String type)
|
||||
{
|
||||
Type = type;
|
||||
}
|
||||
|
||||
public String getType()
|
||||
{
|
||||
return Type;
|
||||
}
|
||||
|
||||
public void setRemark(String remark)
|
||||
{
|
||||
Remark = remark;
|
||||
}
|
||||
|
||||
public String getRemark()
|
||||
{
|
||||
return Remark;
|
||||
}
|
||||
}
|
||||
170
src/com/jsh/model/vo/basic/AccountModel.java
Normal file
170
src/com/jsh/model/vo/basic/AccountModel.java
Normal file
@@ -0,0 +1,170 @@
|
||||
package com.jsh.model.vo.basic;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
public class AccountModel implements Serializable
|
||||
{
|
||||
private AccountShowModel showModel = new AccountShowModel();
|
||||
|
||||
/**======开始接受页面参数=================**/
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
private String name = "";
|
||||
|
||||
/**
|
||||
* 编号
|
||||
*/
|
||||
private String serialNo = "";
|
||||
|
||||
/**
|
||||
* 期初金额
|
||||
*/
|
||||
private Double initialAmount;
|
||||
|
||||
/**
|
||||
* 当前余额
|
||||
*/
|
||||
private Double currentAmount;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark = "";
|
||||
|
||||
/**
|
||||
* 分类ID
|
||||
*/
|
||||
private Long accountID = 0l;
|
||||
|
||||
/**
|
||||
* 分类IDs 批量操作使用
|
||||
*/
|
||||
private String accountIDs = "";
|
||||
|
||||
/**
|
||||
* 每页显示的个数
|
||||
*/
|
||||
private int pageSize = 10;
|
||||
|
||||
/**
|
||||
* 当前页码
|
||||
*/
|
||||
private int pageNo = 1;
|
||||
|
||||
/**
|
||||
* 用户IP,用户记录操作日志
|
||||
*/
|
||||
private String clientIp = "";
|
||||
|
||||
public void setShowModel(AccountShowModel showModel)
|
||||
{
|
||||
this.showModel = showModel;
|
||||
}
|
||||
|
||||
public AccountShowModel getShowModel()
|
||||
{
|
||||
return showModel;
|
||||
}
|
||||
|
||||
public void setName(String name)
|
||||
{
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setSerialNo(String serialNo)
|
||||
{
|
||||
this.serialNo = serialNo;
|
||||
}
|
||||
|
||||
public String getSerialNo()
|
||||
{
|
||||
return serialNo;
|
||||
}
|
||||
|
||||
public void setInitialAmount(Double initialAmount)
|
||||
{
|
||||
this.initialAmount = initialAmount;
|
||||
}
|
||||
|
||||
public Double getInitialAmount()
|
||||
{
|
||||
return initialAmount;
|
||||
}
|
||||
|
||||
public void setCurrentAmount(Double currentAmount)
|
||||
{
|
||||
this.currentAmount = currentAmount;
|
||||
}
|
||||
|
||||
public Double getCurrentAmount()
|
||||
{
|
||||
return currentAmount;
|
||||
}
|
||||
|
||||
public void setRemark(String remark)
|
||||
{
|
||||
this.remark = remark;
|
||||
}
|
||||
|
||||
public String getRemark()
|
||||
{
|
||||
return remark;
|
||||
}
|
||||
|
||||
public void setAccountID(Long accountID)
|
||||
{
|
||||
this.accountID = accountID;
|
||||
}
|
||||
|
||||
public Long getAccountID()
|
||||
{
|
||||
return accountID;
|
||||
}
|
||||
|
||||
public void setAccountIDs(String accountIDs)
|
||||
{
|
||||
this.accountIDs = accountIDs;
|
||||
}
|
||||
|
||||
public String getAccountIDs()
|
||||
{
|
||||
return accountIDs;
|
||||
}
|
||||
|
||||
public void setPageSize(int pageSize)
|
||||
{
|
||||
this.pageSize = pageSize;
|
||||
}
|
||||
|
||||
public int getPageSize()
|
||||
{
|
||||
return pageSize;
|
||||
}
|
||||
|
||||
public void setPageNo(int pageNo)
|
||||
{
|
||||
this.pageNo = pageNo;
|
||||
}
|
||||
|
||||
public int getPageNo()
|
||||
{
|
||||
return pageNo;
|
||||
}
|
||||
|
||||
public void setClientIp(String clientIp)
|
||||
{
|
||||
this.clientIp = clientIp;
|
||||
}
|
||||
|
||||
public String getClientIp()
|
||||
{
|
||||
return clientIp;
|
||||
}
|
||||
}
|
||||
43
src/com/jsh/model/vo/basic/AccountShowModel.java
Normal file
43
src/com/jsh/model/vo/basic/AccountShowModel.java
Normal file
@@ -0,0 +1,43 @@
|
||||
package com.jsh.model.vo.basic;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
public class AccountShowModel implements Serializable
|
||||
{
|
||||
/**
|
||||
* 提示信息
|
||||
*/
|
||||
private String msgTip = "";
|
||||
|
||||
/**
|
||||
* 系统数据
|
||||
*/
|
||||
@SuppressWarnings("rawtypes")
|
||||
private Map<String,List> map = new HashMap<String,List>();
|
||||
|
||||
public String getMsgTip()
|
||||
{
|
||||
return msgTip;
|
||||
}
|
||||
|
||||
public void setMsgTip(String msgTip)
|
||||
{
|
||||
this.msgTip = msgTip;
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
public Map<String, List> getMap() {
|
||||
return map;
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
public void setMap(Map<String, List> map) {
|
||||
this.map = map;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
140
src/com/jsh/model/vo/basic/InOutItemModel.java
Normal file
140
src/com/jsh/model/vo/basic/InOutItemModel.java
Normal file
@@ -0,0 +1,140 @@
|
||||
package com.jsh.model.vo.basic;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
public class InOutItemModel implements Serializable
|
||||
{
|
||||
private InOutItemShowModel showModel = new InOutItemShowModel();
|
||||
|
||||
/**======开始接受页面参数=================**/
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
private String name = "";
|
||||
|
||||
/**
|
||||
* 类型
|
||||
*/
|
||||
private String type = "";
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark = "";
|
||||
|
||||
/**
|
||||
* 分类ID
|
||||
*/
|
||||
private Long inOutItemID = 0l;
|
||||
|
||||
/**
|
||||
* 分类IDs 批量操作使用
|
||||
*/
|
||||
private String inOutItemIDs = "";
|
||||
|
||||
/**
|
||||
* 每页显示的个数
|
||||
*/
|
||||
private int pageSize = 10;
|
||||
|
||||
/**
|
||||
* 当前页码
|
||||
*/
|
||||
private int pageNo = 1;
|
||||
|
||||
/**
|
||||
* 用户IP,用户记录操作日志
|
||||
*/
|
||||
private String clientIp = "";
|
||||
|
||||
public void setShowModel(InOutItemShowModel showModel)
|
||||
{
|
||||
this.showModel = showModel;
|
||||
}
|
||||
|
||||
public InOutItemShowModel getShowModel()
|
||||
{
|
||||
return showModel;
|
||||
}
|
||||
|
||||
public void setName(String name)
|
||||
{
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setType(String type)
|
||||
{
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public String getType()
|
||||
{
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setRemark(String remark)
|
||||
{
|
||||
this.remark = remark;
|
||||
}
|
||||
|
||||
public String getRemark()
|
||||
{
|
||||
return remark;
|
||||
}
|
||||
|
||||
public void setInOutItemID(Long inOutItemID)
|
||||
{
|
||||
this.inOutItemID = inOutItemID;
|
||||
}
|
||||
|
||||
public Long getInOutItemID()
|
||||
{
|
||||
return inOutItemID;
|
||||
}
|
||||
|
||||
public void setInOutItemIDs(String inOutItemIDs)
|
||||
{
|
||||
this.inOutItemIDs = inOutItemIDs;
|
||||
}
|
||||
|
||||
public String getInOutItemIDs()
|
||||
{
|
||||
return inOutItemIDs;
|
||||
}
|
||||
|
||||
public void setPageSize(int pageSize)
|
||||
{
|
||||
this.pageSize = pageSize;
|
||||
}
|
||||
|
||||
public int getPageSize()
|
||||
{
|
||||
return pageSize;
|
||||
}
|
||||
|
||||
public void setPageNo(int pageNo)
|
||||
{
|
||||
this.pageNo = pageNo;
|
||||
}
|
||||
|
||||
public int getPageNo()
|
||||
{
|
||||
return pageNo;
|
||||
}
|
||||
|
||||
public void setClientIp(String clientIp)
|
||||
{
|
||||
this.clientIp = clientIp;
|
||||
}
|
||||
|
||||
public String getClientIp()
|
||||
{
|
||||
return clientIp;
|
||||
}
|
||||
}
|
||||
43
src/com/jsh/model/vo/basic/InOutItemShowModel.java
Normal file
43
src/com/jsh/model/vo/basic/InOutItemShowModel.java
Normal file
@@ -0,0 +1,43 @@
|
||||
package com.jsh.model.vo.basic;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
public class InOutItemShowModel implements Serializable
|
||||
{
|
||||
/**
|
||||
* 提示信息
|
||||
*/
|
||||
private String msgTip = "";
|
||||
|
||||
/**
|
||||
* 系统数据
|
||||
*/
|
||||
@SuppressWarnings("rawtypes")
|
||||
private Map<String,List> map = new HashMap<String,List>();
|
||||
|
||||
public String getMsgTip()
|
||||
{
|
||||
return msgTip;
|
||||
}
|
||||
|
||||
public void setMsgTip(String msgTip)
|
||||
{
|
||||
this.msgTip = msgTip;
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
public Map<String, List> getMap() {
|
||||
return map;
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
public void setMap(Map<String, List> map) {
|
||||
this.map = map;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
9
src/com/jsh/service/basic/AccountIService.java
Normal file
9
src/com/jsh/service/basic/AccountIService.java
Normal file
@@ -0,0 +1,9 @@
|
||||
package com.jsh.service.basic;
|
||||
|
||||
import com.jsh.base.BaseIService;
|
||||
import com.jsh.model.po.Account;
|
||||
|
||||
public interface AccountIService extends BaseIService<Account>
|
||||
{
|
||||
|
||||
}
|
||||
23
src/com/jsh/service/basic/AccountService.java
Normal file
23
src/com/jsh/service/basic/AccountService.java
Normal file
@@ -0,0 +1,23 @@
|
||||
package com.jsh.service.basic;
|
||||
|
||||
import com.jsh.base.BaseService;
|
||||
import com.jsh.dao.basic.AccountIDAO;
|
||||
import com.jsh.model.po.Account;
|
||||
|
||||
public class AccountService extends BaseService<Account> implements AccountIService
|
||||
{
|
||||
@SuppressWarnings("unused")
|
||||
private AccountIDAO accountDao;
|
||||
|
||||
public void setAccountDao(AccountIDAO accountDao)
|
||||
{
|
||||
this.accountDao = accountDao;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Class<Account> getEntityClass()
|
||||
{
|
||||
return Account.class;
|
||||
}
|
||||
|
||||
}
|
||||
9
src/com/jsh/service/basic/InOutItemIService.java
Normal file
9
src/com/jsh/service/basic/InOutItemIService.java
Normal file
@@ -0,0 +1,9 @@
|
||||
package com.jsh.service.basic;
|
||||
|
||||
import com.jsh.base.BaseIService;
|
||||
import com.jsh.model.po.InOutItem;
|
||||
|
||||
public interface InOutItemIService extends BaseIService<InOutItem>
|
||||
{
|
||||
|
||||
}
|
||||
23
src/com/jsh/service/basic/InOutItemService.java
Normal file
23
src/com/jsh/service/basic/InOutItemService.java
Normal file
@@ -0,0 +1,23 @@
|
||||
package com.jsh.service.basic;
|
||||
|
||||
import com.jsh.base.BaseService;
|
||||
import com.jsh.dao.basic.InOutItemIDAO;
|
||||
import com.jsh.model.po.InOutItem;
|
||||
|
||||
public class InOutItemService extends BaseService<InOutItem> implements InOutItemIService
|
||||
{
|
||||
@SuppressWarnings("unused")
|
||||
private InOutItemIDAO inOutItemDao;
|
||||
|
||||
public void setInOutItemDao(InOutItemIDAO inOutItemDao)
|
||||
{
|
||||
this.inOutItemDao = inOutItemDao;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Class<InOutItem> getEntityClass()
|
||||
{
|
||||
return InOutItem.class;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -16,8 +16,6 @@ public interface DepotItemIService extends BaseIService<DepotItem>
|
||||
{
|
||||
void findByType(PageUtil<DepotItem> depotItem, String type, Long MId, String MonthTime,Boolean isPrev)throws JshException;
|
||||
|
||||
void findOrderByMaterial(PageUtil<DepotItem> depotItem)throws JshException;
|
||||
|
||||
/**
|
||||
* 导出信息
|
||||
* @return
|
||||
|
||||
@@ -50,12 +50,6 @@ public class DepotItemService extends BaseService<DepotItem> implements DepotIte
|
||||
depotItemDao.findByType(pageUtil, type, MId, MonthTime,isPrev);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void findOrderByMaterial(PageUtil<DepotItem> pageUtil) throws JshException
|
||||
{
|
||||
depotItemDao.findOrderByMaterial(pageUtil);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出Excel表格
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user