Commit 07259995 authored by AlanGao's avatar AlanGao
Browse files

update

parent 458409b4
...@@ -21,7 +21,10 @@ import java.io.IOException; ...@@ -21,7 +21,10 @@ import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
import java.sql.Timestamp; import java.sql.Timestamp;
import java.text.ParseException; import java.text.ParseException;
import java.util.*; import java.util.Calendar;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@SuppressWarnings("serial") @SuppressWarnings("serial")
public class AssetAction extends BaseAction<AssetModel> { public class AssetAction extends BaseAction<AssetModel> {
......
package com.jsh.action.basic; 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.BaseAction;
import com.jsh.base.Log; import com.jsh.base.Log;
import com.jsh.model.po.Assetname; import com.jsh.model.po.Assetname;
...@@ -16,79 +8,77 @@ import com.jsh.model.po.Logdetails; ...@@ -16,79 +8,77 @@ import com.jsh.model.po.Logdetails;
import com.jsh.model.vo.basic.AssetNameModel; import com.jsh.model.vo.basic.AssetNameModel;
import com.jsh.service.basic.AssetNameIService; import com.jsh.service.basic.AssetNameIService;
import com.jsh.util.PageUtil; import com.jsh.util.PageUtil;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
import org.springframework.dao.DataAccessException;
import java.io.IOException;
import java.sql.Timestamp;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@SuppressWarnings("serial") @SuppressWarnings("serial")
public class AssetNameAction extends BaseAction<AssetNameModel> public class AssetNameAction extends BaseAction<AssetNameModel> {
{
private AssetNameModel model = new AssetNameModel(); private AssetNameModel model = new AssetNameModel();
private AssetNameIService assetnameService; private AssetNameIService assetnameService;
/** /**
* 增加资产名称 * 增加资产名称
*
* @return * @return
*/ */
public void create() public void create() {
{
Log.infoFileSync("==================开始调用增加资产名称方法create()==================="); Log.infoFileSync("==================开始调用增加资产名称方法create()===================");
Boolean flag = false; Boolean flag = false;
try try {
{
Assetname assetname = new Assetname(); Assetname assetname = new Assetname();
assetname.setAssetname(model.getAssetName()); assetname.setAssetname(model.getAssetName());
//增加资产类型 //增加资产类型
assetname.setCategory(new Category(model.getCategoryID())); assetname.setCategory(new Category(model.getCategoryID()));
assetname.setIsystem((short)1); assetname.setIsystem((short) 1);
assetname.setIsconsumables(model.getConsumable()); assetname.setIsconsumables(model.getConsumable());
assetname.setDescription(model.getDescription()); assetname.setDescription(model.getDescription());
assetnameService.create(assetname); assetnameService.create(assetname);
//========标识位=========== //========标识位===========
flag = true; flag = true;
//记录操作日志使用 //记录操作日志使用
tipMsg = "成功"; tipMsg = "成功";
tipType = 0; tipType = 0;
} } catch (DataAccessException e) {
catch (DataAccessException e)
{
Log.errorFileSync(">>>>>>>>>>>>>>>>>>>增加资产名称异常", e); Log.errorFileSync(">>>>>>>>>>>>>>>>>>>增加资产名称异常", e);
flag = false; flag = false;
tipMsg = "失败"; tipMsg = "失败";
tipType = 1; tipType = 1;
} } finally {
finally try {
{
try
{
toClient(flag.toString()); toClient(flag.toString());
} } catch (IOException e) {
catch (IOException e)
{
Log.errorFileSync(">>>>>>>>>>>>增加资产名称回写客户端结果异常", e); Log.errorFileSync(">>>>>>>>>>>>增加资产名称回写客户端结果异常", e);
} }
} }
logService.create(new Logdetails(getUser(), "增加资产名称", model.getClientIp(), logService.create(new Logdetails(getUser(), "增加资产名称", model.getClientIp(),
new Timestamp(System.currentTimeMillis()) new Timestamp(System.currentTimeMillis())
, tipType, "增加资产名称名称为 "+ model.getAssetName() + " " + tipMsg + "!", "增加资产名称" + tipMsg)); , tipType, "增加资产名称名称为 " + model.getAssetName() + " " + tipMsg + "!", "增加资产名称" + tipMsg));
Log.infoFileSync("==================结束调用增加资产名称方法create()==================="); Log.infoFileSync("==================结束调用增加资产名称方法create()===================");
} }
/** /**
* 删除资产名称 * 删除资产名称
*
* @return * @return
*/ */
public String delete() public String delete() {
{
Log.infoFileSync("====================开始调用删除资产名称信息方法delete()================"); Log.infoFileSync("====================开始调用删除资产名称信息方法delete()================");
try try {
{
assetnameService.delete(model.getAssetNameID()); assetnameService.delete(model.getAssetNameID());
tipMsg = "成功"; tipMsg = "成功";
tipType = 0; tipType = 0;
} } catch (DataAccessException e) {
catch (DataAccessException e)
{
Log.errorFileSync(">>>>>>>>>>>删除ID为 " + model.getAssetNameID() + " 的资产名称异常", e); Log.errorFileSync(">>>>>>>>>>>删除ID为 " + model.getAssetNameID() + " 的资产名称异常", e);
tipMsg = "失败"; tipMsg = "失败";
tipType = 1; tipType = 1;
...@@ -96,20 +86,19 @@ public class AssetNameAction extends BaseAction<AssetNameModel> ...@@ -96,20 +86,19 @@ public class AssetNameAction extends BaseAction<AssetNameModel>
model.getShowModel().setMsgTip(tipMsg); model.getShowModel().setMsgTip(tipMsg);
logService.create(new Logdetails(getUser(), "删除资产名称", model.getClientIp(), logService.create(new Logdetails(getUser(), "删除资产名称", model.getClientIp(),
new Timestamp(System.currentTimeMillis()) new Timestamp(System.currentTimeMillis())
, tipType, "删除资产名称ID为 "+ model.getAssetNameID() + " " + tipMsg + "!", "删除资产名称" + tipMsg)); , tipType, "删除资产名称ID为 " + model.getAssetNameID() + " " + tipMsg + "!", "删除资产名称" + tipMsg));
Log.infoFileSync("====================结束调用删除资产名称信息方法delete()================"); Log.infoFileSync("====================结束调用删除资产名称信息方法delete()================");
return SUCCESS; return SUCCESS;
} }
/** /**
* 更新资产名称 * 更新资产名称
*
* @return * @return
*/ */
public void update() public void update() {
{
Boolean flag = false; Boolean flag = false;
try try {
{
Assetname assetname = assetnameService.get(model.getAssetNameID()); Assetname assetname = assetnameService.get(model.getAssetNameID());
//增加资产类型 //增加资产类型
assetname.setCategory(new Category(model.getCategoryID())); assetname.setCategory(new Category(model.getCategoryID()));
...@@ -117,103 +106,83 @@ public class AssetNameAction extends BaseAction<AssetNameModel> ...@@ -117,103 +106,83 @@ public class AssetNameAction extends BaseAction<AssetNameModel>
assetname.setIsconsumables(model.getConsumable()); assetname.setIsconsumables(model.getConsumable());
assetname.setDescription(model.getDescription()); assetname.setDescription(model.getDescription());
assetnameService.update(assetname); assetnameService.update(assetname);
flag = true; flag = true;
tipMsg = "成功"; tipMsg = "成功";
tipType = 0; tipType = 0;
} } catch (DataAccessException e) {
catch (DataAccessException e)
{
Log.errorFileSync(">>>>>>>>>>>>>修改资产名称ID为 : " + model.getAssetNameID() + "信息失败", e); Log.errorFileSync(">>>>>>>>>>>>>修改资产名称ID为 : " + model.getAssetNameID() + "信息失败", e);
flag = false; flag = false;
tipMsg = "失败"; tipMsg = "失败";
tipType = 1; tipType = 1;
} } finally {
finally try {
{
try
{
toClient(flag.toString()); toClient(flag.toString());
} } catch (IOException e) {
catch (IOException e)
{
Log.errorFileSync(">>>>>>>>>>>>修改资产名称回写客户端结果异常", e); Log.errorFileSync(">>>>>>>>>>>>修改资产名称回写客户端结果异常", e);
} }
} }
logService.create(new Logdetails(getUser(), "更新资产名称", model.getClientIp(), logService.create(new Logdetails(getUser(), "更新资产名称", model.getClientIp(),
new Timestamp(System.currentTimeMillis()) new Timestamp(System.currentTimeMillis())
, tipType, "更新资产名称ID为 "+ model.getAssetNameID() + " " + tipMsg + "!", "更新资产名称" + tipMsg)); , tipType, "更新资产名称ID为 " + model.getAssetNameID() + " " + tipMsg + "!", "更新资产名称" + tipMsg));
} }
/** /**
* 批量删除指定ID资产名称 * 批量删除指定ID资产名称
*
* @return * @return
*/ */
public String batchDelete() public String batchDelete() {
{ try {
try
{
assetnameService.batchDelete(model.getAssetNameIDs()); assetnameService.batchDelete(model.getAssetNameIDs());
model.getShowModel().setMsgTip("成功"); model.getShowModel().setMsgTip("成功");
//记录操作日志使用 //记录操作日志使用
tipMsg = "成功"; tipMsg = "成功";
tipType = 0; tipType = 0;
} } catch (DataAccessException e) {
catch (DataAccessException e)
{
Log.errorFileSync(">>>>>>>>>>>批量删除资产名称ID为:" + model.getAssetNameIDs() + "信息异常", e); Log.errorFileSync(">>>>>>>>>>>批量删除资产名称ID为:" + model.getAssetNameIDs() + "信息异常", e);
tipMsg = "失败"; tipMsg = "失败";
tipType = 1; tipType = 1;
} }
logService.create(new Logdetails(getUser(), "批量删除资产名称", model.getClientIp(), logService.create(new Logdetails(getUser(), "批量删除资产名称", model.getClientIp(),
new Timestamp(System.currentTimeMillis()) new Timestamp(System.currentTimeMillis())
, tipType, "批量删除资产名称ID为 "+ model.getAssetNameIDs() + " " + tipMsg + "!", "批量删除资产名称" + tipMsg)); , tipType, "批量删除资产名称ID为 " + model.getAssetNameIDs() + " " + tipMsg + "!", "批量删除资产名称" + tipMsg));
return SUCCESS; return SUCCESS;
} }
/** /**
* 检查输入名称是否存在 * 检查输入名称是否存在
*/ */
public void checkIsNameExist() public void checkIsNameExist() {
{
Boolean flag = false; Boolean flag = false;
try try {
{ flag = assetnameService.checkIsNameExist("assetname", model.getAssetName(), "id", model.getAssetNameID());
flag = assetnameService.checkIsNameExist("assetname",model.getAssetName(),"id", model.getAssetNameID()); } catch (DataAccessException e) {
}
catch (DataAccessException e)
{
Log.errorFileSync(">>>>>>>>>>>>>>>>>检查资产名称名称为:" + model.getAssetName() + " ID为: " + model.getAssetNameID() + " 是否存在异常!"); Log.errorFileSync(">>>>>>>>>>>>>>>>>检查资产名称名称为:" + model.getAssetName() + " ID为: " + model.getAssetNameID() + " 是否存在异常!");
} } finally {
finally try {
{
try
{
toClient(flag.toString()); toClient(flag.toString());
} } catch (IOException e) {
catch (IOException e) Log.errorFileSync(">>>>>>>>>>>>回写检查资产名称名称为:" + model.getAssetName() + " ID为: " + model.getAssetNameID() + " 是否存在异常!", e);
{
Log.errorFileSync(">>>>>>>>>>>>回写检查资产名称名称为:" + model.getAssetName() + " ID为: " + model.getAssetNameID() + " 是否存在异常!",e);
} }
} }
} }
/** /**
* 查找供应商信息 * 查找供应商信息
*
* @return * @return
*/ */
public void findBy() public void findBy() {
{ try {
try PageUtil<Assetname> pageUtil = new PageUtil<Assetname>();
{
PageUtil<Assetname> pageUtil = new PageUtil<Assetname>();
pageUtil.setPageSize(model.getPageSize()); pageUtil.setPageSize(model.getPageSize());
pageUtil.setCurPage(model.getPageNo()); pageUtil.setCurPage(model.getPageNo());
pageUtil.setAdvSearch(getCondition()); pageUtil.setAdvSearch(getCondition());
assetnameService.find(pageUtil); assetnameService.find(pageUtil);
List<Assetname> dataList = pageUtil.getPageList(); List<Assetname> dataList = pageUtil.getPageList();
//开始拼接json数据 //开始拼接json数据
// {"total":28,"rows":[ // {"total":28,"rows":[
// {"productid":"AV-CB-01","attr1":"Adult Male","itemid":"EST-18"} // {"productid":"AV-CB-01","attr1":"Adult Male","itemid":"EST-18"}
...@@ -222,16 +191,14 @@ public class AssetNameAction extends BaseAction<AssetNameModel> ...@@ -222,16 +191,14 @@ public class AssetNameAction extends BaseAction<AssetNameModel>
outer.put("total", pageUtil.getTotalCount()); outer.put("total", pageUtil.getTotalCount());
//存放数据json数组 //存放数据json数组
JSONArray dataArray = new JSONArray(); JSONArray dataArray = new JSONArray();
if(null != dataList) if (null != dataList) {
{ for (Assetname assetname : dataList) {
for(Assetname assetname:dataList)
{
JSONObject item = new JSONObject(); JSONObject item = new JSONObject();
item.put("id", assetname.getId()); item.put("id", assetname.getId());
//供应商名称 //供应商名称
item.put("assetname", assetname.getAssetname()); item.put("assetname", assetname.getAssetname());
item.put("isystem", assetname.getIsystem() == (short)0?"是":"否"); item.put("isystem", assetname.getIsystem() == (short) 0 ? "是" : "否");
item.put("consumable", assetname.getIsconsumables() == (short)0?"是":"否"); item.put("consumable", assetname.getIsconsumables() == (short) 0 ? "是" : "否");
item.put("consumableStatus", assetname.getIsconsumables()); item.put("consumableStatus", assetname.getIsconsumables());
item.put("description", assetname.getDescription()); item.put("description", assetname.getDescription());
item.put("categoryID", assetname.getCategory().getId()); item.put("categoryID", assetname.getCategory().getId());
...@@ -243,27 +210,23 @@ public class AssetNameAction extends BaseAction<AssetNameModel> ...@@ -243,27 +210,23 @@ public class AssetNameAction extends BaseAction<AssetNameModel>
outer.put("rows", dataArray); outer.put("rows", dataArray);
//回写查询结果 //回写查询结果
toClient(outer.toString()); toClient(outer.toString());
} } catch (DataAccessException e) {
catch (DataAccessException e)
{
Log.errorFileSync(">>>>>>>>>>>>>>>>>>>查找资产名称信息异常", e); Log.errorFileSync(">>>>>>>>>>>>>>>>>>>查找资产名称信息异常", e);
} } catch (IOException e) {
catch (IOException e)
{
Log.errorFileSync(">>>>>>>>>>>>>>>>>>>回写查询资产名称信息结果异常", e); Log.errorFileSync(">>>>>>>>>>>>>>>>>>>回写查询资产名称信息结果异常", e);
} }
} }
/** /**
* 拼接搜索条件 * 拼接搜索条件
*
* @return * @return
*/ */
private Map<String,Object> getCondition() private Map<String, Object> getCondition() {
{
/** /**
* 拼接搜索条件 * 拼接搜索条件
*/ */
Map<String,Object> condition = new HashMap<String,Object>(); Map<String, Object> condition = new HashMap<String, Object>();
condition.put("assetname_s_like", model.getAssetName()); condition.put("assetname_s_like", model.getAssetName());
condition.put("isconsumables_n_eq", model.getConsumable()); condition.put("isconsumables_n_eq", model.getConsumable());
condition.put("description_s_like", model.getDescription()); condition.put("description_s_like", model.getDescription());
...@@ -271,16 +234,14 @@ public class AssetNameAction extends BaseAction<AssetNameModel> ...@@ -271,16 +234,14 @@ public class AssetNameAction extends BaseAction<AssetNameModel>
condition.put("id_s_order", "desc"); condition.put("id_s_order", "desc");
return condition; return condition;
} }
//=============以下spring注入以及Model驱动公共方法,与Action处理无关================== //=============以下spring注入以及Model驱动公共方法,与Action处理无关==================
@Override @Override
public AssetNameModel getModel() public AssetNameModel getModel() {
{
return model; return model;
} }
public void setAssetnameService(AssetNameIService assetnameService) public void setAssetnameService(AssetNameIService assetnameService) {
{
this.assetnameService = assetnameService; this.assetnameService = assetnameService;
} }
} }
package com.jsh.action.basic; 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.BaseAction;
import com.jsh.base.Log; import com.jsh.base.Log;
import com.jsh.model.po.Category; import com.jsh.model.po.Category;
...@@ -15,198 +7,176 @@ import com.jsh.model.po.Logdetails; ...@@ -15,198 +7,176 @@ import com.jsh.model.po.Logdetails;
import com.jsh.model.vo.basic.CategoryModel; import com.jsh.model.vo.basic.CategoryModel;
import com.jsh.service.basic.CategoryIService; import com.jsh.service.basic.CategoryIService;
import com.jsh.util.PageUtil; import com.jsh.util.PageUtil;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
import org.springframework.dao.DataAccessException;
import java.io.IOException;
import java.sql.Timestamp;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/* /*
* @author jishenghua qq:7-5-2-7-1-8-9-2-0 * @author jishenghua qq:7-5-2-7-1-8-9-2-0
*/ */
@SuppressWarnings("serial") @SuppressWarnings("serial")
public class CategoryAction extends BaseAction<CategoryModel> public class CategoryAction extends BaseAction<CategoryModel> {
{
private CategoryIService categoryService; private CategoryIService categoryService;
private CategoryModel model = new CategoryModel(); private CategoryModel model = new CategoryModel();
/**
* 增加资产类型 /**
* @return * 增加资产类型
*/ *
public void create() * @return
{ */
Log.infoFileSync("==================开始调用增加资产类型方法create()==================="); public void create() {
Boolean flag = false; Log.infoFileSync("==================开始调用增加资产类型方法create()===================");
try Boolean flag = false;
{ try {
Category category = new Category(); Category category = new Category();
category.setAssetname(model.getCategoryName()); category.setAssetname(model.getCategoryName());
category.setIsystem((short)1); category.setIsystem((short) 1);
category.setDescription(model.getDescription()); category.setDescription(model.getDescription());
categoryService.create(category); categoryService.create(category);
//========标识位=========== //========标识位===========
flag = true; flag = true;
//记录操作日志使用 //记录操作日志使用
tipMsg = "成功"; tipMsg = "成功";
tipType = 0; tipType = 0;
} } catch (DataAccessException e) {
catch (DataAccessException e) Log.errorFileSync(">>>>>>>>>>>>>>>>>>>增加资产类型异常", e);
{ flag = false;
Log.errorFileSync(">>>>>>>>>>>>>>>>>>>增加资产类型异常", e); tipMsg = "失败";
flag = false;
tipMsg = "失败";
tipType = 1; tipType = 1;
} } finally {
finally try {
{
try
{
toClient(flag.toString()); toClient(flag.toString());
} } catch (IOException e) {
catch (IOException e)
{
Log.errorFileSync(">>>>>>>>>>>>增加资产类型回写客户端结果异常", e); Log.errorFileSync(">>>>>>>>>>>>增加资产类型回写客户端结果异常", e);
} }
} }
logService.create(new Logdetails(getUser(), "增加资产类型", model.getClientIp(), logService.create(new Logdetails(getUser(), "增加资产类型", model.getClientIp(),
new Timestamp(System.currentTimeMillis()) new Timestamp(System.currentTimeMillis())
, tipType, "增加资产类型名称为 "+ model.getCategoryName() + " " + tipMsg + "!", "增加资产类型" + tipMsg)); , tipType, "增加资产类型名称为 " + model.getCategoryName() + " " + tipMsg + "!", "增加资产类型" + tipMsg));
Log.infoFileSync("==================结束调用增加资产类型方法create()==================="); Log.infoFileSync("==================结束调用增加资产类型方法create()===================");
} }
/** /**
* 删除资产类型 * 删除资产类型
* @return *
*/ * @return
public String delete() */
{ public String delete() {
Log.infoFileSync("====================开始调用删除资产类型信息方法delete()================"); Log.infoFileSync("====================开始调用删除资产类型信息方法delete()================");
try try {
{ categoryService.delete(model.getCategoryID());
categoryService.delete(model.getCategoryID());
tipMsg = "成功"; tipMsg = "成功";
tipType = 0; tipType = 0;
} } catch (DataAccessException e) {
catch (DataAccessException e) Log.errorFileSync(">>>>>>>>>>>删除ID为 " + model.getCategoryID() + " 的资产类型异常", e);
{ tipMsg = "失败";
Log.errorFileSync(">>>>>>>>>>>删除ID为 " + model.getCategoryID() + " 的资产类型异常", e);
tipMsg = "失败";
tipType = 1; tipType = 1;
} }
model.getShowModel().setMsgTip(tipMsg); model.getShowModel().setMsgTip(tipMsg);
logService.create(new Logdetails(getUser(), "删除资产类型", model.getClientIp(), logService.create(new Logdetails(getUser(), "删除资产类型", model.getClientIp(),
new Timestamp(System.currentTimeMillis()) new Timestamp(System.currentTimeMillis())
, tipType, "删除资产类型ID为 "+ model.getCategoryID() + " " + tipMsg + "!", "删除资产类型" + tipMsg)); , tipType, "删除资产类型ID为 " + model.getCategoryID() + " " + tipMsg + "!", "删除资产类型" + tipMsg));
Log.infoFileSync("====================结束调用删除资产类型信息方法delete()================"); Log.infoFileSync("====================结束调用删除资产类型信息方法delete()================");
return SUCCESS; return SUCCESS;
} }
/** /**
* 更新资产类型 * 更新资产类型
* @return *
*/ * @return
public void update() */
{ public void update() {
Boolean flag = false; Boolean flag = false;
try try {
{
Category category = categoryService.get(model.getCategoryID()); Category category = categoryService.get(model.getCategoryID());
category.setAssetname(model.getCategoryName()); category.setAssetname(model.getCategoryName());
category.setDescription(model.getDescription()); category.setDescription(model.getDescription());
categoryService.update(category); categoryService.update(category);
flag = true; flag = true;
tipMsg = "成功"; tipMsg = "成功";
tipType = 0; tipType = 0;
} } catch (DataAccessException e) {
catch (DataAccessException e)
{
Log.errorFileSync(">>>>>>>>>>>>>修改资产类型ID为 : " + model.getCategoryID() + "信息失败", e); Log.errorFileSync(">>>>>>>>>>>>>修改资产类型ID为 : " + model.getCategoryID() + "信息失败", e);
flag = false; flag = false;
tipMsg = "失败"; tipMsg = "失败";
tipType = 1; tipType = 1;
} } finally {
finally try {
{
try
{
toClient(flag.toString()); toClient(flag.toString());
} } catch (IOException e) {
catch (IOException e)
{
Log.errorFileSync(">>>>>>>>>>>>修改资产类型回写客户端结果异常", e); Log.errorFileSync(">>>>>>>>>>>>修改资产类型回写客户端结果异常", e);
} }
} }
logService.create(new Logdetails(getUser(), "更新资产类型", model.getClientIp(), logService.create(new Logdetails(getUser(), "更新资产类型", model.getClientIp(),
new Timestamp(System.currentTimeMillis()) new Timestamp(System.currentTimeMillis())
, tipType, "更新资产类型ID为 "+ model.getCategoryID() + " " + tipMsg + "!", "更新资产类型" + tipMsg)); , tipType, "更新资产类型ID为 " + model.getCategoryID() + " " + tipMsg + "!", "更新资产类型" + tipMsg));
} }
/** /**
* 批量删除指定ID资产类型 * 批量删除指定ID资产类型
* @return *
*/ * @return
public String batchDelete() */
{ public String batchDelete() {
try try {
{ categoryService.batchDelete(model.getCategoryIDs());
categoryService.batchDelete(model.getCategoryIDs());
model.getShowModel().setMsgTip("成功"); model.getShowModel().setMsgTip("成功");
//记录操作日志使用 //记录操作日志使用
tipMsg = "成功"; tipMsg = "成功";
tipType = 0; tipType = 0;
} } catch (DataAccessException e) {
catch (DataAccessException e) Log.errorFileSync(">>>>>>>>>>>批量删除资产类型ID为:" + model.getCategoryIDs() + "信息异常", e);
{ tipMsg = "失败";
Log.errorFileSync(">>>>>>>>>>>批量删除资产类型ID为:" + model.getCategoryIDs() + "信息异常", e);
tipMsg = "失败";
tipType = 1; tipType = 1;
} }
logService.create(new Logdetails(getUser(), "批量删除资产类型", model.getClientIp(), logService.create(new Logdetails(getUser(), "批量删除资产类型", model.getClientIp(),
new Timestamp(System.currentTimeMillis()) new Timestamp(System.currentTimeMillis())
, tipType, "批量删除资产类型ID为 "+ model.getCategoryIDs() + " " + tipMsg + "!", "批量删除资产类型" + tipMsg)); , tipType, "批量删除资产类型ID为 " + model.getCategoryIDs() + " " + tipMsg + "!", "批量删除资产类型" + tipMsg));
return SUCCESS; return SUCCESS;
} }
/** /**
* 检查输入名称是否存在 * 检查输入名称是否存在
*/ */
public void checkIsNameExist() public void checkIsNameExist() {
{ Boolean flag = false;
Boolean flag = false; try {
try flag = categoryService.checkIsNameExist("assetname", model.getCategoryName(), "id", model.getCategoryID());
{ } catch (DataAccessException e) {
flag = categoryService.checkIsNameExist("assetname",model.getCategoryName(),"id", model.getCategoryID());
}
catch (DataAccessException e)
{
Log.errorFileSync(">>>>>>>>>>>>>>>>>检查资产类型名称为:" + model.getCategoryName() + " ID为: " + model.getCategoryID() + " 是否存在异常!"); Log.errorFileSync(">>>>>>>>>>>>>>>>>检查资产类型名称为:" + model.getCategoryName() + " ID为: " + model.getCategoryID() + " 是否存在异常!");
} } finally {
finally try {
{
try
{
toClient(flag.toString()); toClient(flag.toString());
} catch (IOException e) {
Log.errorFileSync(">>>>>>>>>>>>回写检查资产类型名称为:" + model.getCategoryName() + " ID为: " + model.getCategoryID() + " 是否存在异常!", e);
} }
catch (IOException e) }
{ }
Log.errorFileSync(">>>>>>>>>>>>回写检查资产类型名称为:" + model.getCategoryName() + " ID为: " + model.getCategoryID() + " 是否存在异常!",e);
} /**
} * 查找供应商信息
} *
* @return
/** */
* 查找供应商信息 public void findBy() {
* @return try {
*/ PageUtil<Category> pageUtil = new PageUtil<Category>();
public void findBy()
{
try
{
PageUtil<Category> pageUtil = new PageUtil<Category>();
pageUtil.setPageSize(model.getPageSize()); pageUtil.setPageSize(model.getPageSize());
pageUtil.setCurPage(model.getPageNo()); pageUtil.setCurPage(model.getPageNo());
pageUtil.setAdvSearch(getCondition()); pageUtil.setAdvSearch(getCondition());
categoryService.find(pageUtil); categoryService.find(pageUtil);
List<Category> dataList = pageUtil.getPageList(); List<Category> dataList = pageUtil.getPageList();
//开始拼接json数据 //开始拼接json数据
// {"total":28,"rows":[ // {"total":28,"rows":[
// {"productid":"AV-CB-01","attr1":"Adult Male","itemid":"EST-18"} // {"productid":"AV-CB-01","attr1":"Adult Male","itemid":"EST-18"}
...@@ -215,15 +185,13 @@ public class CategoryAction extends BaseAction<CategoryModel> ...@@ -215,15 +185,13 @@ public class CategoryAction extends BaseAction<CategoryModel>
outer.put("total", pageUtil.getTotalCount()); outer.put("total", pageUtil.getTotalCount());
//存放数据json数组 //存放数据json数组
JSONArray dataArray = new JSONArray(); JSONArray dataArray = new JSONArray();
if(null != dataList) if (null != dataList) {
{ for (Category category : dataList) {
for(Category category:dataList)
{
JSONObject item = new JSONObject(); JSONObject item = new JSONObject();
item.put("id", category.getId()); item.put("id", category.getId());
//供应商名称 //供应商名称
item.put("categoryname", category.getAssetname()); item.put("categoryname", category.getAssetname());
item.put("isystem", category.getIsystem() == (short)0?"是":"否"); item.put("isystem", category.getIsystem() == (short) 0 ? "是" : "否");
item.put("description", category.getDescription()); item.put("description", category.getDescription());
item.put("op", category.getIsystem()); item.put("op", category.getIsystem());
dataArray.add(item); dataArray.add(item);
...@@ -232,41 +200,36 @@ public class CategoryAction extends BaseAction<CategoryModel> ...@@ -232,41 +200,36 @@ public class CategoryAction extends BaseAction<CategoryModel>
outer.put("rows", dataArray); outer.put("rows", dataArray);
//回写查询结果 //回写查询结果
toClient(outer.toString()); toClient(outer.toString());
} } catch (DataAccessException e) {
catch (DataAccessException e) Log.errorFileSync(">>>>>>>>>>>>>>>>>>>查找资产类型信息异常", e);
{ } catch (IOException e) {
Log.errorFileSync(">>>>>>>>>>>>>>>>>>>查找资产类型信息异常", e);
}
catch (IOException e)
{
Log.errorFileSync(">>>>>>>>>>>>>>>>>>>回写查询资产类型信息结果异常", e); Log.errorFileSync(">>>>>>>>>>>>>>>>>>>回写查询资产类型信息结果异常", e);
} }
} }
/** /**
* 拼接搜索条件 * 拼接搜索条件
* @return *
*/ * @return
private Map<String,Object> getCondition() */
{ private Map<String, Object> getCondition() {
/** /**
* 拼接搜索条件 * 拼接搜索条件
*/ */
Map<String,Object> condition = new HashMap<String,Object>(); Map<String, Object> condition = new HashMap<String, Object>();
condition.put("assetname_s_like", model.getCategoryName()); condition.put("assetname_s_like", model.getCategoryName());
condition.put("description_s_like", model.getDescription()); condition.put("description_s_like", model.getDescription());
condition.put("id_s_order", "desc"); condition.put("id_s_order", "desc");
return condition; return condition;
} }
//=============以下spring注入以及Model驱动公共方法,与Action处理无关================== //=============以下spring注入以及Model驱动公共方法,与Action处理无关==================
@Override @Override
public CategoryModel getModel() public CategoryModel getModel() {
{ return model;
return model; }
}
public void setCategoryService(CategoryIService categoryService) public void setCategoryService(CategoryIService categoryService) {
{
this.categoryService = categoryService; this.categoryService = categoryService;
} }
} }
package com.jsh.action.basic; 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.BaseAction;
import com.jsh.base.Log; import com.jsh.base.Log;
import com.jsh.model.po.Logdetails;
import com.jsh.model.po.InOutItem; import com.jsh.model.po.InOutItem;
import com.jsh.model.po.Logdetails;
import com.jsh.model.vo.basic.InOutItemModel; import com.jsh.model.vo.basic.InOutItemModel;
import com.jsh.service.basic.InOutItemIService; import com.jsh.service.basic.InOutItemIService;
import com.jsh.util.PageUtil; import com.jsh.util.PageUtil;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
import org.springframework.dao.DataAccessException;
import java.io.IOException;
import java.sql.Timestamp;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/** /**
* 收支项目 * 收支项目
*
* @author ji*sheng*hua qq 7.5.2.7.1.8.9.2.0 * @author ji*sheng*hua qq 7.5.2.7.1.8.9.2.0
*/ */
@SuppressWarnings("serial") @SuppressWarnings("serial")
public class InOutItemAction extends BaseAction<InOutItemModel> public class InOutItemAction extends BaseAction<InOutItemModel> {
{
private InOutItemIService inOutItemService; private InOutItemIService inOutItemService;
private InOutItemModel model = new InOutItemModel(); private InOutItemModel model = new InOutItemModel();
/** /**
* 增加收支项目 * 增加收支项目
*
* @return * @return
*/ */
public void create() public void create() {
{
Log.infoFileSync("==================开始调用增加收支项目方法==================="); Log.infoFileSync("==================开始调用增加收支项目方法===================");
Boolean flag = false; Boolean flag = false;
try try {
{
InOutItem inOutItem = new InOutItem(); InOutItem inOutItem = new InOutItem();
inOutItem.setName(model.getName()); inOutItem.setName(model.getName());
inOutItem.setType(model.getType()); inOutItem.setType(model.getType());
...@@ -46,68 +47,57 @@ public class InOutItemAction extends BaseAction<InOutItemModel> ...@@ -46,68 +47,57 @@ public class InOutItemAction extends BaseAction<InOutItemModel>
//记录操作日志使用 //记录操作日志使用
tipMsg = "成功"; tipMsg = "成功";
tipType = 0; tipType = 0;
} } catch (DataAccessException e) {
catch (DataAccessException e)
{
Log.errorFileSync(">>>>>>>>>>>>>>>>>>>增加收支项目异常", e); Log.errorFileSync(">>>>>>>>>>>>>>>>>>>增加收支项目异常", e);
flag = false; flag = false;
tipMsg = "失败"; tipMsg = "失败";
tipType = 1; tipType = 1;
} } finally {
finally try {
{
try
{
toClient(flag.toString()); toClient(flag.toString());
} } catch (IOException e) {
catch (IOException e)
{
Log.errorFileSync(">>>>>>>>>>>>增加收支项目回写客户端结果异常", e); Log.errorFileSync(">>>>>>>>>>>>增加收支项目回写客户端结果异常", e);
} }
} }
logService.create(new Logdetails(getUser(), "增加收支项目", model.getClientIp(), logService.create(new Logdetails(getUser(), "增加收支项目", model.getClientIp(),
new Timestamp(System.currentTimeMillis()) new Timestamp(System.currentTimeMillis())
, tipType, "增加收支项目名称为 "+ model.getName() + " " + tipMsg + "!", "增加收支项目" + tipMsg)); , tipType, "增加收支项目名称为 " + model.getName() + " " + tipMsg + "!", "增加收支项目" + tipMsg));
Log.infoFileSync("==================结束调用增加收支项目方法==================="); Log.infoFileSync("==================结束调用增加收支项目方法===================");
} }
/** /**
* 删除收支项目 * 删除收支项目
*
* @return * @return
*/ */
public String delete() public String delete() {
{
Log.infoFileSync("====================开始调用删除收支项目信息方法delete()================"); Log.infoFileSync("====================开始调用删除收支项目信息方法delete()================");
try try {
{
inOutItemService.delete(model.getInOutItemID()); inOutItemService.delete(model.getInOutItemID());
tipMsg = "成功"; tipMsg = "成功";
tipType = 0; tipType = 0;
} } catch (DataAccessException e) {
catch (DataAccessException e)
{
Log.errorFileSync(">>>>>>>>>>>删除ID为 " + model.getInOutItemID() + " 的收支项目异常", e); Log.errorFileSync(">>>>>>>>>>>删除ID为 " + model.getInOutItemID() + " 的收支项目异常", e);
tipMsg = "失败"; tipMsg = "失败";
tipType = 1; tipType = 1;
} }
model.getShowModel().setMsgTip(tipMsg); model.getShowModel().setMsgTip(tipMsg);
logService.create(new Logdetails(getUser(), "删除收支项目", model.getClientIp(), logService.create(new Logdetails(getUser(), "删除收支项目", model.getClientIp(),
new Timestamp(System.currentTimeMillis()) new Timestamp(System.currentTimeMillis())
, tipType, "删除收支项目ID为 "+ model.getInOutItemID() + ",名称为 " + model.getName() + tipMsg + "!", "删除收支项目" + tipMsg)); , tipType, "删除收支项目ID为 " + model.getInOutItemID() + ",名称为 " + model.getName() + tipMsg + "!", "删除收支项目" + tipMsg));
Log.infoFileSync("====================结束调用删除收支项目信息方法delete()================"); Log.infoFileSync("====================结束调用删除收支项目信息方法delete()================");
return SUCCESS; return SUCCESS;
} }
/** /**
* 更新收支项目 * 更新收支项目
*
* @return * @return
*/ */
public void update() public void update() {
{
Boolean flag = false; Boolean flag = false;
try try {
{
InOutItem inOutItem = inOutItemService.get(model.getInOutItemID()); InOutItem inOutItem = inOutItemService.get(model.getInOutItemID());
inOutItem.setName(model.getName()); inOutItem.setName(model.getName());
inOutItem.setType(model.getType()); inOutItem.setType(model.getType());
...@@ -117,93 +107,73 @@ public class InOutItemAction extends BaseAction<InOutItemModel> ...@@ -117,93 +107,73 @@ public class InOutItemAction extends BaseAction<InOutItemModel>
flag = true; flag = true;
tipMsg = "成功"; tipMsg = "成功";
tipType = 0; tipType = 0;
} } catch (DataAccessException e) {
catch (DataAccessException e)
{
Log.errorFileSync(">>>>>>>>>>>>>修改收支项目ID为 : " + model.getInOutItemID() + "信息失败", e); Log.errorFileSync(">>>>>>>>>>>>>修改收支项目ID为 : " + model.getInOutItemID() + "信息失败", e);
flag = false; flag = false;
tipMsg = "失败"; tipMsg = "失败";
tipType = 1; tipType = 1;
} } finally {
finally try {
{
try
{
toClient(flag.toString()); toClient(flag.toString());
} } catch (IOException e) {
catch (IOException e)
{
Log.errorFileSync(">>>>>>>>>>>>修改收支项目回写客户端结果异常", e); Log.errorFileSync(">>>>>>>>>>>>修改收支项目回写客户端结果异常", e);
} }
} }
logService.create(new Logdetails(getUser(), "更新收支项目", model.getClientIp(), logService.create(new Logdetails(getUser(), "更新收支项目", model.getClientIp(),
new Timestamp(System.currentTimeMillis()) new Timestamp(System.currentTimeMillis())
, tipType, "更新收支项目ID为 "+ model.getInOutItemID() + " " + tipMsg + "!", "更新收支项目" + tipMsg)); , tipType, "更新收支项目ID为 " + model.getInOutItemID() + " " + tipMsg + "!", "更新收支项目" + tipMsg));
} }
/** /**
* 批量删除指定ID收支项目 * 批量删除指定ID收支项目
*
* @return * @return
*/ */
public String batchDelete() public String batchDelete() {
{ try {
try
{
inOutItemService.batchDelete(model.getInOutItemIDs()); inOutItemService.batchDelete(model.getInOutItemIDs());
model.getShowModel().setMsgTip("成功"); model.getShowModel().setMsgTip("成功");
//记录操作日志使用 //记录操作日志使用
tipMsg = "成功"; tipMsg = "成功";
tipType = 0; tipType = 0;
} } catch (DataAccessException e) {
catch (DataAccessException e)
{
Log.errorFileSync(">>>>>>>>>>>批量删除收支项目ID为:" + model.getInOutItemIDs() + "信息异常", e); Log.errorFileSync(">>>>>>>>>>>批量删除收支项目ID为:" + model.getInOutItemIDs() + "信息异常", e);
tipMsg = "失败"; tipMsg = "失败";
tipType = 1; tipType = 1;
} }
logService.create(new Logdetails(getUser(), "批量删除收支项目", model.getClientIp(), logService.create(new Logdetails(getUser(), "批量删除收支项目", model.getClientIp(),
new Timestamp(System.currentTimeMillis()) new Timestamp(System.currentTimeMillis())
, tipType, "批量删除收支项目ID为 "+ model.getInOutItemIDs() + " " + tipMsg + "!", "批量删除收支项目" + tipMsg)); , tipType, "批量删除收支项目ID为 " + model.getInOutItemIDs() + " " + tipMsg + "!", "批量删除收支项目" + tipMsg));
return SUCCESS; return SUCCESS;
} }
/** /**
* 检查输入名称是否存在 * 检查输入名称是否存在
*/ */
public void checkIsNameExist() public void checkIsNameExist() {
{
Boolean flag = false; Boolean flag = false;
try try {
{ flag = inOutItemService.checkIsNameExist("name", model.getName(), "id", model.getInOutItemID());
flag = inOutItemService.checkIsNameExist("name",model.getName(),"id", model.getInOutItemID()); } catch (DataAccessException e) {
}
catch (DataAccessException e)
{
Log.errorFileSync(">>>>>>>>>>>>>>>>>检查收支项目名称为:" + model.getName() + " ID为: " + model.getInOutItemID() + " 是否存在异常!"); Log.errorFileSync(">>>>>>>>>>>>>>>>>检查收支项目名称为:" + model.getName() + " ID为: " + model.getInOutItemID() + " 是否存在异常!");
} } finally {
finally try {
{
try
{
toClient(flag.toString()); toClient(flag.toString());
} } catch (IOException e) {
catch (IOException e) Log.errorFileSync(">>>>>>>>>>>>回写检查收支项目名称为:" + model.getName() + " ID为: " + model.getInOutItemID() + " 是否存在异常!", e);
{
Log.errorFileSync(">>>>>>>>>>>>回写检查收支项目名称为:" + model.getName() + " ID为: " + model.getInOutItemID() + " 是否存在异常!",e);
} }
} }
} }
/** /**
* 查找收支项目信息 * 查找收支项目信息
*
* @return * @return
*/ */
public void findBy() public void findBy() {
{ try {
try PageUtil<InOutItem> pageUtil = new PageUtil<InOutItem>();
{
PageUtil<InOutItem> pageUtil = new PageUtil<InOutItem>();
pageUtil.setPageSize(model.getPageSize()); pageUtil.setPageSize(model.getPageSize());
pageUtil.setCurPage(model.getPageNo()); pageUtil.setCurPage(model.getPageNo());
pageUtil.setAdvSearch(getCondition()); pageUtil.setAdvSearch(getCondition());
...@@ -214,10 +184,8 @@ public class InOutItemAction extends BaseAction<InOutItemModel> ...@@ -214,10 +184,8 @@ public class InOutItemAction extends BaseAction<InOutItemModel>
outer.put("total", pageUtil.getTotalCount()); outer.put("total", pageUtil.getTotalCount());
//存放数据json数组 //存放数据json数组
JSONArray dataArray = new JSONArray(); JSONArray dataArray = new JSONArray();
if(null != dataList) if (null != dataList) {
{ for (InOutItem inOutItem : dataList) {
for(InOutItem inOutItem:dataList)
{
JSONObject item = new JSONObject(); JSONObject item = new JSONObject();
item.put("id", inOutItem.getId()); item.put("id", inOutItem.getId());
//收支项目名称 //收支项目名称
...@@ -231,26 +199,21 @@ public class InOutItemAction extends BaseAction<InOutItemModel> ...@@ -231,26 +199,21 @@ public class InOutItemAction extends BaseAction<InOutItemModel>
outer.put("rows", dataArray); outer.put("rows", dataArray);
//回写查询结果 //回写查询结果
toClient(outer.toString()); toClient(outer.toString());
} } catch (DataAccessException e) {
catch (DataAccessException e)
{
Log.errorFileSync(">>>>>>>>>查找收支项目信息异常", e); Log.errorFileSync(">>>>>>>>>查找收支项目信息异常", e);
} } catch (IOException e) {
catch (IOException e)
{
Log.errorFileSync(">>>>>>>>>回写查询收支项目信息结果异常", e); Log.errorFileSync(">>>>>>>>>回写查询收支项目信息结果异常", e);
} }
} }
/** /**
* 查找收支项目信息-下拉框 * 查找收支项目信息-下拉框
*
* @return * @return
*/ */
public void findBySelect() public void findBySelect() {
{ try {
try PageUtil<InOutItem> pageUtil = new PageUtil<InOutItem>();
{
PageUtil<InOutItem> pageUtil = new PageUtil<InOutItem>();
pageUtil.setPageSize(0); pageUtil.setPageSize(0);
pageUtil.setCurPage(0); pageUtil.setCurPage(0);
pageUtil.setAdvSearch(getCondition_select()); pageUtil.setAdvSearch(getCondition_select());
...@@ -258,10 +221,8 @@ public class InOutItemAction extends BaseAction<InOutItemModel> ...@@ -258,10 +221,8 @@ public class InOutItemAction extends BaseAction<InOutItemModel>
List<InOutItem> dataList = pageUtil.getPageList(); List<InOutItem> dataList = pageUtil.getPageList();
//存放数据json数组 //存放数据json数组
JSONArray dataArray = new JSONArray(); JSONArray dataArray = new JSONArray();
if(null != dataList) if (null != dataList) {
{ for (InOutItem inOutItem : dataList) {
for(InOutItem inOutItem:dataList)
{
JSONObject item = new JSONObject(); JSONObject item = new JSONObject();
item.put("Id", inOutItem.getId()); item.put("Id", inOutItem.getId());
//收支项目名称 //收支项目名称
...@@ -271,27 +232,23 @@ public class InOutItemAction extends BaseAction<InOutItemModel> ...@@ -271,27 +232,23 @@ public class InOutItemAction extends BaseAction<InOutItemModel>
} }
//回写查询结果 //回写查询结果
toClient(dataArray.toString()); toClient(dataArray.toString());
} } catch (DataAccessException e) {
catch (DataAccessException e)
{
Log.errorFileSync(">>>>>>>>>查找收支项目信息异常", e); Log.errorFileSync(">>>>>>>>>查找收支项目信息异常", e);
} } catch (IOException e) {
catch (IOException e)
{
Log.errorFileSync(">>>>>>>>>回写查询收支项目信息结果异常", e); Log.errorFileSync(">>>>>>>>>回写查询收支项目信息结果异常", e);
} }
} }
/** /**
* 拼接搜索条件 * 拼接搜索条件
*
* @return * @return
*/ */
private Map<String,Object> getCondition() private Map<String, Object> getCondition() {
{
/** /**
* 拼接搜索条件 * 拼接搜索条件
*/ */
Map<String,Object> condition = new HashMap<String,Object>(); Map<String, Object> condition = new HashMap<String, Object>();
condition.put("name_s_like", model.getName()); condition.put("name_s_like", model.getName());
condition.put("remark_s_like", model.getRemark()); condition.put("remark_s_like", model.getRemark());
condition.put("id_s_order", "desc"); condition.put("id_s_order", "desc");
...@@ -300,32 +257,30 @@ public class InOutItemAction extends BaseAction<InOutItemModel> ...@@ -300,32 +257,30 @@ public class InOutItemAction extends BaseAction<InOutItemModel>
/** /**
* 拼接搜索条件-下拉框-收支项目 * 拼接搜索条件-下拉框-收支项目
*
* @return * @return
*/ */
private Map<String,Object> getCondition_select() private Map<String, Object> getCondition_select() {
{
/** /**
* 拼接搜索条件 * 拼接搜索条件
*/ */
Map<String,Object> condition = new HashMap<String,Object>(); Map<String, Object> condition = new HashMap<String, Object>();
if(model.getType().equals("in")) { if (model.getType().equals("in")) {
condition.put("type_s_eq", "收入"); condition.put("type_s_eq", "收入");
} else if (model.getType().equals("out")) {
condition.put("type_s_eq", "支出");
} }
else if(model.getType().equals("out")) {
condition.put("type_s_eq", "支出");
}
condition.put("id_s_order", "desc"); condition.put("id_s_order", "desc");
return condition; return condition;
} }
//=============以下spring注入以及Model驱动公共方法,与Action处理无关================== //=============以下spring注入以及Model驱动公共方法,与Action处理无关==================
@Override @Override
public InOutItemModel getModel() public InOutItemModel getModel() {
{
return model; return model;
} }
public void setInOutItemService(InOutItemIService inOutItemService)
{ public void setInOutItemService(InOutItemIService inOutItemService) {
this.inOutItemService = inOutItemService; this.inOutItemService = inOutItemService;
} }
} }
Supports Markdown
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