Commit 07259995 authored by AlanGao's avatar AlanGao
Browse files

update

parent 458409b4
package com.jsh.dao.materials; package com.jsh.dao.materials;
import org.hibernate.Query;
import com.jsh.base.BaseDAO; import com.jsh.base.BaseDAO;
import com.jsh.util.JshException;
import com.jsh.model.po.AccountHead; import com.jsh.model.po.AccountHead;
import com.jsh.model.po.DepotHead; import com.jsh.util.JshException;
import com.jsh.model.po.UserBusiness;
import com.jsh.util.PageUtil; import com.jsh.util.PageUtil;
import com.jsh.util.SearchConditionUtil; import com.jsh.util.SearchConditionUtil;
import org.hibernate.Query;
/** /**
* @author alan * @author alan
*/ */
public class AccountHeadDAO extends BaseDAO<AccountHead> implements AccountHeadIDAO public class AccountHeadDAO extends BaseDAO<AccountHead> implements AccountHeadIDAO {
{
/** /**
* 设置dao映射基类 * 设置dao映射基类
*
* @return * @return
*/ */
@Override @Override
public Class<AccountHead> getEntityClass() public Class<AccountHead> getEntityClass() {
{
return AccountHead.class; return AccountHead.class;
} }
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
@Override @Override
public void find(PageUtil<AccountHead> pageUtil,String maxid) throws JshException public void find(PageUtil<AccountHead> pageUtil, String maxid) throws JshException {
{
Query query = this.getHibernateTemplate().getSessionFactory().getCurrentSession().createQuery("select max(Id) as Id from AccountHead accountHead where 1=1 " + SearchConditionUtil.getCondition(pageUtil.getAdvSearch())); Query query = this.getHibernateTemplate().getSessionFactory().getCurrentSession().createQuery("select max(Id) as Id from AccountHead accountHead where 1=1 " + SearchConditionUtil.getCondition(pageUtil.getAdvSearch()));
pageUtil.setTotalCount(query.list().size()); pageUtil.setTotalCount(query.list().size());
pageUtil.setPageList(query.list()); pageUtil.setPageList(query.list());
} }
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
@Override @Override
public void findAllMoney(PageUtil<AccountHead> pageUtil, Integer supplierId, String type, String mode) throws JshException public void findAllMoney(PageUtil<AccountHead> pageUtil, Integer supplierId, String type, String mode) throws JshException {
{
Query query; Query query;
String modeName = ""; String modeName = "";
if(mode.equals("实际")){ if (mode.equals("实际")) {
modeName = "ChangeAmount"; modeName = "ChangeAmount";
} } else if (mode.equals("合计")) {
else if(mode.equals("合计")){ modeName = "TotalPrice";
modeName = "TotalPrice";
} }
query= this.getHibernateTemplate().getSessionFactory().getCurrentSession().createQuery("select sum(" + modeName + ") as allMoney from AccountHead accountHead where Type='" + type + "' and OrganId =" + supplierId + SearchConditionUtil.getCondition(pageUtil.getAdvSearch())); query = this.getHibernateTemplate().getSessionFactory().getCurrentSession().createQuery("select sum(" + modeName + ") as allMoney from AccountHead accountHead where Type='" + type + "' and OrganId =" + supplierId + SearchConditionUtil.getCondition(pageUtil.getAdvSearch()));
pageUtil.setTotalCount(query.list().size()); pageUtil.setTotalCount(query.list().size());
pageUtil.setPageList(query.list()); pageUtil.setPageList(query.list());
} }
......
package com.jsh.dao.materials; package com.jsh.dao.materials;
import com.jsh.base.BaseIDAO; import com.jsh.base.BaseIDAO;
import com.jsh.util.JshException;
import com.jsh.model.po.AccountHead; import com.jsh.model.po.AccountHead;
import com.jsh.model.po.DepotHead; import com.jsh.util.JshException;
import com.jsh.model.po.UserBusiness;
import com.jsh.util.PageUtil; import com.jsh.util.PageUtil;
public interface AccountHeadIDAO extends BaseIDAO<AccountHead> public interface AccountHeadIDAO extends BaseIDAO<AccountHead> {
{
/* /*
* 获取MaxId * 获取MaxId
*/ */
void find(PageUtil<AccountHead> pageUtil,String maxid) throws JshException; void find(PageUtil<AccountHead> pageUtil, String maxid) throws JshException;
void findAllMoney(PageUtil<AccountHead> pageUtil, Integer supplierId, String type, String mode) throws JshException; void findAllMoney(PageUtil<AccountHead> pageUtil, Integer supplierId, String type, String mode) throws JshException;
} }
package com.jsh.dao.materials; package com.jsh.dao.materials;
import org.hibernate.Query;
import com.jsh.base.BaseDAO; import com.jsh.base.BaseDAO;
import com.jsh.util.JshException;
import com.jsh.model.po.AccountItem; import com.jsh.model.po.AccountItem;
import com.jsh.util.PageUtil;
import com.jsh.util.SearchConditionUtil;
public class AccountItemDAO extends BaseDAO<AccountItem> implements AccountItemIDAO public class AccountItemDAO extends BaseDAO<AccountItem> implements AccountItemIDAO {
{
/** /**
* 设置dao映射基类 * 设置dao映射基类
*
* @return * @return
*/ */
@Override @Override
public Class<AccountItem> getEntityClass() public Class<AccountItem> getEntityClass() {
{
return AccountItem.class; return AccountItem.class;
} }
} }
package com.jsh.dao.materials; package com.jsh.dao.materials;
import com.jsh.base.BaseIDAO; import com.jsh.base.BaseIDAO;
import com.jsh.util.JshException;
import com.jsh.model.po.AccountItem; import com.jsh.model.po.AccountItem;
import com.jsh.util.PageUtil;
public interface AccountItemIDAO extends BaseIDAO<AccountItem> public interface AccountItemIDAO extends BaseIDAO<AccountItem> {
{
} }
package com.jsh.dao.materials; package com.jsh.dao.materials;
import org.hibernate.Query;
import com.jsh.base.BaseDAO; import com.jsh.base.BaseDAO;
import com.jsh.util.JshException;
import com.jsh.model.po.DepotHead; import com.jsh.model.po.DepotHead;
import com.jsh.util.JshException;
import com.jsh.util.PageUtil; import com.jsh.util.PageUtil;
import com.jsh.util.SearchConditionUtil; import com.jsh.util.SearchConditionUtil;
import org.hibernate.Query;
public class DepotHeadDAO extends BaseDAO<DepotHead> implements DepotHeadIDAO { public class DepotHeadDAO extends BaseDAO<DepotHead> implements DepotHeadIDAO {
/** /**
* 设置dao映射基类 * 设置dao映射基类
*
* @return * @return
*/ */
@Override @Override
public Class<DepotHead> getEntityClass() public Class<DepotHead> getEntityClass() {
{
return DepotHead.class; return DepotHead.class;
} }
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
@Override @Override
public void find(PageUtil<DepotHead> pageUtil,String maxid) throws JshException public void find(PageUtil<DepotHead> pageUtil, String maxid) throws JshException {
{
Query query = this.getHibernateTemplate().getSessionFactory().getCurrentSession().createQuery("select max(Id) as Id from DepotHead depotHead where 1=1 " + SearchConditionUtil.getCondition(pageUtil.getAdvSearch())); Query query = this.getHibernateTemplate().getSessionFactory().getCurrentSession().createQuery("select max(Id) as Id from DepotHead depotHead where 1=1 " + SearchConditionUtil.getCondition(pageUtil.getAdvSearch()));
pageUtil.setTotalCount(query.list().size()); pageUtil.setTotalCount(query.list().size());
pageUtil.setPageList(query.list()); pageUtil.setPageList(query.list());
} }
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
@Override @Override
public void findAllMoney(PageUtil<DepotHead> pageUtil, Integer supplierId, String type, String subType, String mode) throws JshException public void findAllMoney(PageUtil<DepotHead> pageUtil, Integer supplierId, String type, String subType, String mode) throws JshException {
{
Query query; Query query;
String modeName = ""; String modeName = "";
if(mode.equals("实际")){ if (mode.equals("实际")) {
modeName = "ChangeAmount"; modeName = "ChangeAmount";
} } else if (mode.equals("合计")) {
else if(mode.equals("合计")){ modeName = "DiscountLastMoney";
modeName = "DiscountLastMoney";
} }
query= this.getHibernateTemplate().getSessionFactory().getCurrentSession().createQuery("select sum(" + modeName + ") as allMoney from DepotHead depotHead where Type='" + type + "' and SubType = '" + subType + "' and OrganId =" + supplierId + SearchConditionUtil.getCondition(pageUtil.getAdvSearch())); query = this.getHibernateTemplate().getSessionFactory().getCurrentSession().createQuery("select sum(" + modeName + ") as allMoney from DepotHead depotHead where Type='" + type + "' and SubType = '" + subType + "' and OrganId =" + supplierId + SearchConditionUtil.getCondition(pageUtil.getAdvSearch()));
pageUtil.setTotalCount(query.list().size()); pageUtil.setTotalCount(query.list().size());
pageUtil.setPageList(query.list()); pageUtil.setPageList(query.list());
} }
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
@Override @Override
public void batchSetStatus(Boolean status,String depotHeadIDs) { public void batchSetStatus(Boolean status, String depotHeadIDs) {
String sql="update jsh_depothead d set d.Status=" + status + " where d.id in (" + depotHeadIDs + ")"; String sql = "update jsh_depothead d set d.Status=" + status + " where d.id in (" + depotHeadIDs + ")";
Query query = this.getHibernateTemplate().getSessionFactory().getCurrentSession().createSQLQuery(sql); Query query = this.getHibernateTemplate().getSessionFactory().getCurrentSession().createSQLQuery(sql);
query.executeUpdate(); query.executeUpdate();
} }
@Override @Override
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
public void findInDetail(PageUtil pageUtil,String beginTime,String endTime,String type,Long pid,String dids,Long oId) throws JshException { public void findInDetail(PageUtil pageUtil, String beginTime, String endTime, String type, Long pid, String dids, Long oId) throws JshException {
StringBuffer queryString = new StringBuffer(); StringBuffer queryString = new StringBuffer();
queryString.append("select dh.Number,m.`name`,m.Model,di.UnitPrice,di.OperNumber,di.AllPrice,s.supplier,d.dName," + queryString.append("select dh.Number,m.`name`,m.Model,di.UnitPrice,di.OperNumber,di.AllPrice,s.supplier,d.dName," +
"date_format(dh.OperTime, '%Y-%m-%d'), concat(dh.SubType,dh.Type) as newType " + "date_format(dh.OperTime, '%Y-%m-%d'), concat(dh.SubType,dh.Type) as newType " +
...@@ -63,18 +59,17 @@ public class DepotHeadDAO extends BaseDAO<DepotHead> implements DepotHeadIDAO { ...@@ -63,18 +59,17 @@ public class DepotHeadDAO extends BaseDAO<DepotHead> implements DepotHeadIDAO {
"inner join jsh_material m on m.id=di.MaterialId " + "inner join jsh_material m on m.id=di.MaterialId " +
"inner join jsh_supplier s on s.id=dh.OrganId " + "inner join jsh_supplier s on s.id=dh.OrganId " +
"inner join (select id,name as dName from jsh_depot) d on d.id=di.DepotId " + "inner join (select id,name as dName from jsh_depot) d on d.id=di.DepotId " +
"where dh.OperTime >='"+ beginTime +"' and dh.OperTime <='"+ endTime +"' "); "where dh.OperTime >='" + beginTime + "' and dh.OperTime <='" + endTime + "' ");
if(oId!=null){ if (oId != null) {
queryString.append(" and dh.OrganId = "+ oId ); queryString.append(" and dh.OrganId = " + oId);
}
if(pid!=null){
queryString.append(" and di.DepotId=" + pid );
} }
else { if (pid != null) {
queryString.append(" and di.DepotId in (" + dids + ")" ); queryString.append(" and di.DepotId=" + pid);
} else {
queryString.append(" and di.DepotId in (" + dids + ")");
} }
if(type!=null && !type.equals("")) { if (type != null && !type.equals("")) {
queryString.append(" and dh.Type='"+ type +"'"); queryString.append(" and dh.Type='" + type + "'");
} }
queryString.append(" ORDER BY OperTime DESC,Number desc"); queryString.append(" ORDER BY OperTime DESC,Number desc");
Query query; Query query;
...@@ -92,49 +87,46 @@ public class DepotHeadDAO extends BaseDAO<DepotHead> implements DepotHeadIDAO { ...@@ -92,49 +87,46 @@ public class DepotHeadDAO extends BaseDAO<DepotHead> implements DepotHeadIDAO {
@Override @Override
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
public void findInOutMaterialCount(PageUtil pageUtil,String beginTime,String endTime,String type,Long pid,String dids,Long oId) throws JshException { public void findInOutMaterialCount(PageUtil pageUtil, String beginTime, String endTime, String type, Long pid, String dids, Long oId) throws JshException {
StringBuffer queryString = new StringBuffer(); StringBuffer queryString = new StringBuffer();
queryString.append("select di.MaterialId, m.mName,m.Model,m.categoryName, "); queryString.append("select di.MaterialId, m.mName,m.Model,m.categoryName, ");
//数量汇总 //数量汇总
queryString.append(" (select sum(jdi.BasicNumber) numSum from jsh_depothead jdh INNER JOIN jsh_depotitem jdi " + queryString.append(" (select sum(jdi.BasicNumber) numSum from jsh_depothead jdh INNER JOIN jsh_depotitem jdi " +
"on jdh.id=jdi.HeaderId where jdi.MaterialId=di.MaterialId " + "on jdh.id=jdi.HeaderId where jdi.MaterialId=di.MaterialId " +
" and jdh.type='"+ type +"' and jdh.OperTime >='"+ beginTime +"' and jdh.OperTime <='"+ endTime +"'"); " and jdh.type='" + type + "' and jdh.OperTime >='" + beginTime + "' and jdh.OperTime <='" + endTime + "'");
if(oId!=null){ if (oId != null) {
queryString.append(" and jdh.OrganId = "+ oId ); queryString.append(" and jdh.OrganId = " + oId);
} }
if(pid!=null){ if (pid != null) {
queryString.append(" and jdi.DepotId=" + pid ); queryString.append(" and jdi.DepotId=" + pid);
} } else {
else { queryString.append(" and jdi.DepotId in (" + dids + ")");
queryString.append(" and jdi.DepotId in (" + dids + ")" );
} }
queryString.append(" ) numSum, "); queryString.append(" ) numSum, ");
//金额汇总 //金额汇总
queryString.append(" (select sum(jdi.AllPrice) priceSum from jsh_depothead jdh INNER JOIN jsh_depotitem jdi " + queryString.append(" (select sum(jdi.AllPrice) priceSum from jsh_depothead jdh INNER JOIN jsh_depotitem jdi " +
"on jdh.id=jdi.HeaderId where jdi.MaterialId=di.MaterialId " + "on jdh.id=jdi.HeaderId where jdi.MaterialId=di.MaterialId " +
" and jdh.type='"+ type +"' and jdh.OperTime >='"+ beginTime +"' and jdh.OperTime <='"+ endTime +"'"); " and jdh.type='" + type + "' and jdh.OperTime >='" + beginTime + "' and jdh.OperTime <='" + endTime + "'");
if(oId!=null){ if (oId != null) {
queryString.append(" and jdh.OrganId = "+ oId ); queryString.append(" and jdh.OrganId = " + oId);
}
if(pid!=null){
queryString.append(" and jdi.DepotId=" + pid );
} }
else { if (pid != null) {
queryString.append(" and jdi.DepotId in (" + dids + ")" ); queryString.append(" and jdi.DepotId=" + pid);
} else {
queryString.append(" and jdi.DepotId in (" + dids + ")");
} }
queryString.append(" ) priceSum "); queryString.append(" ) priceSum ");
queryString.append(" from jsh_depothead dh INNER JOIN jsh_depotitem di on dh.id=di.HeaderId " + queryString.append(" from jsh_depothead dh INNER JOIN jsh_depotitem di on dh.id=di.HeaderId " +
" INNER JOIN (SELECT jsh_material.id,jsh_material.name mName, Model,jsh_materialcategory.`Name` categoryName from jsh_material INNER JOIN jsh_materialcategory on jsh_material.CategoryId=jsh_materialcategory.Id) m " + " INNER JOIN (SELECT jsh_material.id,jsh_material.name mName, Model,jsh_materialcategory.`Name` categoryName from jsh_material INNER JOIN jsh_materialcategory on jsh_material.CategoryId=jsh_materialcategory.Id) m " +
" on m.Id=di.MaterialId where dh.type='"+ type +"' and dh.OperTime >='"+ beginTime +"' and dh.OperTime <='"+ endTime +"' "); " on m.Id=di.MaterialId where dh.type='" + type + "' and dh.OperTime >='" + beginTime + "' and dh.OperTime <='" + endTime + "' ");
if(oId!=null){ if (oId != null) {
queryString.append(" and dh.OrganId = "+ oId ); queryString.append(" and dh.OrganId = " + oId);
}
if(pid!=null){
queryString.append(" and di.DepotId=" + pid );
} }
else { if (pid != null) {
queryString.append(" and di.DepotId in (" + dids + ")" ); queryString.append(" and di.DepotId=" + pid);
} else {
queryString.append(" and di.DepotId in (" + dids + ")");
} }
queryString.append(" GROUP BY di.MaterialId,m.mName,m.Model,m.categoryName "); queryString.append(" GROUP BY di.MaterialId,m.mName,m.Model,m.categoryName ");
Query query; Query query;
...@@ -151,29 +143,29 @@ public class DepotHeadDAO extends BaseDAO<DepotHead> implements DepotHeadIDAO { ...@@ -151,29 +143,29 @@ public class DepotHeadDAO extends BaseDAO<DepotHead> implements DepotHeadIDAO {
} }
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
public void findMaterialsListByHeaderId(PageUtil pageUtil,Long headerId) throws JshException { public void findMaterialsListByHeaderId(PageUtil pageUtil, Long headerId) throws JshException {
StringBuffer queryString = new StringBuffer(); StringBuffer queryString = new StringBuffer();
queryString.append("select group_concat(concat(jsh_material.`Name`,' ',jsh_material.Model)) as mName from jsh_depotitem inner join jsh_material " + queryString.append("select group_concat(concat(jsh_material.`Name`,' ',jsh_material.Model)) as mName from jsh_depotitem inner join jsh_material " +
" on jsh_depotitem.MaterialId = jsh_material.Id where jsh_depotitem.HeaderId ="+ headerId); " on jsh_depotitem.MaterialId = jsh_material.Id where jsh_depotitem.HeaderId =" + headerId);
Query query = this.getHibernateTemplate().getSessionFactory().getCurrentSession().createSQLQuery(queryString + SearchConditionUtil.getCondition(pageUtil.getAdvSearch())); Query query = this.getHibernateTemplate().getSessionFactory().getCurrentSession().createSQLQuery(queryString + SearchConditionUtil.getCondition(pageUtil.getAdvSearch()));
pageUtil.setPageList(query.list()); pageUtil.setPageList(query.list());
} }
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
public void findStatementAccount(PageUtil pageUtil,String beginTime,String endTime,Long organId,String supType) throws JshException { public void findStatementAccount(PageUtil pageUtil, String beginTime, String endTime, Long organId, String supType) throws JshException {
StringBuffer queryString = new StringBuffer(); StringBuffer queryString = new StringBuffer();
queryString.append("select dh.Number,concat(dh.SubType,dh.Type) as newType,dh.DiscountLastMoney,dh.ChangeAmount,s.supplier,date_format(dh.OperTime,'%Y-%m-%d %H:%i:%S') as oTime from jsh_depothead dh " + queryString.append("select dh.Number,concat(dh.SubType,dh.Type) as newType,dh.DiscountLastMoney,dh.ChangeAmount,s.supplier,date_format(dh.OperTime,'%Y-%m-%d %H:%i:%S') as oTime from jsh_depothead dh " +
"inner join jsh_supplier s on s.id=dh.OrganId where s.type='" + supType + "' and dh.SubType!='其它' " + "inner join jsh_supplier s on s.id=dh.OrganId where s.type='" + supType + "' and dh.SubType!='其它' " +
"and dh.OperTime >='"+ beginTime +"' and dh.OperTime<='"+ endTime +"' "); "and dh.OperTime >='" + beginTime + "' and dh.OperTime<='" + endTime + "' ");
if(organId!=null && !organId.equals("")) { if (organId != null && !organId.equals("")) {
queryString.append(" and dh.OrganId='"+ organId +"' "); queryString.append(" and dh.OrganId='" + organId + "' ");
} }
queryString.append("UNION ALL " + queryString.append("UNION ALL " +
"select ah.BillNo,ah.Type as newType,ah.TotalPrice,ah.ChangeAmount,s.supplier,date_format(ah.BillTime,'%Y-%m-%d %H:%i:%S') as oTime from jsh_accounthead ah " + "select ah.BillNo,ah.Type as newType,ah.TotalPrice,ah.ChangeAmount,s.supplier,date_format(ah.BillTime,'%Y-%m-%d %H:%i:%S') as oTime from jsh_accounthead ah " +
"inner join jsh_supplier s on s.id=ah.OrganId where s.type='" + supType + "' " + "inner join jsh_supplier s on s.id=ah.OrganId where s.type='" + supType + "' " +
"and ah.BillTime >='"+ beginTime +"' and ah.BillTime<='"+ endTime +"' "); "and ah.BillTime >='" + beginTime + "' and ah.BillTime<='" + endTime + "' ");
if(organId!=null && !organId.equals("")) { if (organId != null && !organId.equals("")) {
queryString.append(" and ah.OrganId='"+ organId +"' "); queryString.append(" and ah.OrganId='" + organId + "' ");
} }
queryString.append(" ORDER BY oTime"); queryString.append(" ORDER BY oTime");
Query query; Query query;
...@@ -191,11 +183,11 @@ public class DepotHeadDAO extends BaseDAO<DepotHead> implements DepotHeadIDAO { ...@@ -191,11 +183,11 @@ public class DepotHeadDAO extends BaseDAO<DepotHead> implements DepotHeadIDAO {
@Override @Override
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
public void getHeaderIdByMaterial(PageUtil pageUtil,String materialParam,String depotIds) throws JshException { public void getHeaderIdByMaterial(PageUtil pageUtil, String materialParam, String depotIds) throws JshException {
StringBuffer queryString = new StringBuffer(); StringBuffer queryString = new StringBuffer();
queryString.append("select dt.HeaderId from jsh_depotitem dt INNER JOIN jsh_material m on dt.MaterialId = m.Id where ( m.`Name` "+ queryString.append("select dt.HeaderId from jsh_depotitem dt INNER JOIN jsh_material m on dt.MaterialId = m.Id where ( m.`Name` " +
" like '%" + materialParam + "%' or m.Model like '%" + materialParam + "%') "); " like '%" + materialParam + "%' or m.Model like '%" + materialParam + "%') ");
if(!depotIds.equals("")){ if (!depotIds.equals("")) {
queryString.append(" and dt.DepotId in (" + depotIds + ") "); queryString.append(" and dt.DepotId in (" + depotIds + ") ");
} }
Query query = this.getHibernateTemplate().getSessionFactory().getCurrentSession().createSQLQuery(queryString + SearchConditionUtil.getCondition(pageUtil.getAdvSearch())); Query query = this.getHibernateTemplate().getSessionFactory().getCurrentSession().createSQLQuery(queryString + SearchConditionUtil.getCondition(pageUtil.getAdvSearch()));
......
...@@ -8,6 +8,11 @@ import com.jsh.util.SearchConditionUtil; ...@@ -8,6 +8,11 @@ import com.jsh.util.SearchConditionUtil;
import org.hibernate.Query; import org.hibernate.Query;
public class DepotItemDAO extends BaseDAO<DepotItem> implements DepotItemIDAO { public class DepotItemDAO extends BaseDAO<DepotItem> implements DepotItemIDAO {
private final static String TYPE = "入库";
private final static String SUM_TYPE = "Number";
private final static String IN = "in";
private final static String OUT = "out";
/** /**
* 设置dao映射基类 * 设置dao映射基类
* *
...@@ -18,8 +23,6 @@ public class DepotItemDAO extends BaseDAO<DepotItem> implements DepotItemIDAO { ...@@ -18,8 +23,6 @@ public class DepotItemDAO extends BaseDAO<DepotItem> implements DepotItemIDAO {
return DepotItem.class; return DepotItem.class;
} }
private final static String TYPE = "入库";
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
@Override @Override
public void findByType(PageUtil<DepotItem> pageUtil, String type, Integer dId, Long MId, String MonthTime, Boolean isPrev) throws JshException { public void findByType(PageUtil<DepotItem> pageUtil, String type, Integer dId, Long MId, String MonthTime, Boolean isPrev) throws JshException {
...@@ -133,8 +136,6 @@ public class DepotItemDAO extends BaseDAO<DepotItem> implements DepotItemIDAO { ...@@ -133,8 +136,6 @@ public class DepotItemDAO extends BaseDAO<DepotItem> implements DepotItemIDAO {
pageUtil.setPageList(query.list()); pageUtil.setPageList(query.list());
} }
private final static String SUM_TYPE = "Number";
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
@Override @Override
public void buyOrSale(PageUtil<DepotItem> pageUtil, String type, String subType, Long MId, String MonthTime, String sumType) throws JshException { public void buyOrSale(PageUtil<DepotItem> pageUtil, String type, String subType, Long MId, String MonthTime, String sumType) throws JshException {
...@@ -149,9 +150,6 @@ public class DepotItemDAO extends BaseDAO<DepotItem> implements DepotItemIDAO { ...@@ -149,9 +150,6 @@ public class DepotItemDAO extends BaseDAO<DepotItem> implements DepotItemIDAO {
pageUtil.setPageList(query.list()); pageUtil.setPageList(query.list());
} }
private final static String IN = "in";
private final static String OUT = "out";
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
@Override @Override
public void findGiftByType(PageUtil<DepotItem> pageUtil, String subType, Integer ProjectId, Long MId, String type) throws JshException { public void findGiftByType(PageUtil<DepotItem> pageUtil, String subType, Integer ProjectId, Long MId, String type) throws JshException {
......
package com.jsh.dao.materials; package com.jsh.dao.materials;
import com.jsh.base.BaseIDAO; import com.jsh.base.BaseIDAO;
import com.jsh.util.JshException;
import com.jsh.model.po.DepotHead;
import com.jsh.model.po.DepotItem; import com.jsh.model.po.DepotItem;
import com.jsh.util.JshException;
import com.jsh.util.PageUtil; import com.jsh.util.PageUtil;
public interface DepotItemIDAO extends BaseIDAO<DepotItem> public interface DepotItemIDAO extends BaseIDAO<DepotItem> {
{ public void findByType(PageUtil<DepotItem> pageUtil, String type, Integer ProjectId, Long MId, String MonthTime, Boolean isPrev) throws JshException;
public void findByType(PageUtil<DepotItem> pageUtil,String type,Integer ProjectId,Long MId, String MonthTime,Boolean isPrev) throws JshException;
public void findByTypeAndMaterialId(PageUtil<DepotItem> pageUtil,String type,Long MId) throws JshException; public void findByTypeAndMaterialId(PageUtil<DepotItem> pageUtil, String type, Long MId) throws JshException;
public void findDetailByTypeAndMaterialId(PageUtil<DepotItem> pageUtil,Long MId) throws JshException; public void findDetailByTypeAndMaterialId(PageUtil<DepotItem> pageUtil, Long MId) throws JshException;
public void findPriceByType(PageUtil<DepotItem> pageUtil,String type,Integer ProjectId,Long MId, String MonthTime,Boolean isPrev) throws JshException; public void findPriceByType(PageUtil<DepotItem> pageUtil, String type, Integer ProjectId, Long MId, String MonthTime, Boolean isPrev) throws JshException;
public void buyOrSale(PageUtil<DepotItem> pageUtil,String type, String subType,Long MId, String MonthTime, String sumType) throws JshException; public void buyOrSale(PageUtil<DepotItem> pageUtil, String type, String subType, Long MId, String MonthTime, String sumType) throws JshException;
public void findGiftByType(PageUtil<DepotItem> pageUtil,String subType,Integer ProjectId,Long MId, String type) throws JshException; public void findGiftByType(PageUtil<DepotItem> pageUtil, String subType, Integer ProjectId, Long MId, String type) throws JshException;
} }
...@@ -3,15 +3,14 @@ package com.jsh.dao.materials; ...@@ -3,15 +3,14 @@ package com.jsh.dao.materials;
import com.jsh.base.BaseDAO; import com.jsh.base.BaseDAO;
import com.jsh.model.po.MaterialCategory; import com.jsh.model.po.MaterialCategory;
public class MaterialCategoryDAO extends BaseDAO<MaterialCategory> implements MaterialCategoryIDAO public class MaterialCategoryDAO extends BaseDAO<MaterialCategory> implements MaterialCategoryIDAO {
{ /**
/**
* 设置dao映射基类 * 设置dao映射基类
*
* @return * @return
*/ */
@Override @Override
public Class<MaterialCategory> getEntityClass() public Class<MaterialCategory> getEntityClass() {
{
return MaterialCategory.class; return MaterialCategory.class;
} }
} }
...@@ -3,7 +3,6 @@ package com.jsh.dao.materials; ...@@ -3,7 +3,6 @@ package com.jsh.dao.materials;
import com.jsh.base.BaseIDAO; import com.jsh.base.BaseIDAO;
import com.jsh.model.po.MaterialCategory; import com.jsh.model.po.MaterialCategory;
public interface MaterialCategoryIDAO extends BaseIDAO<MaterialCategory> public interface MaterialCategoryIDAO extends BaseIDAO<MaterialCategory> {
{
} }
...@@ -7,32 +7,31 @@ import com.jsh.util.PageUtil; ...@@ -7,32 +7,31 @@ import com.jsh.util.PageUtil;
import com.jsh.util.SearchConditionUtil; import com.jsh.util.SearchConditionUtil;
import org.hibernate.Query; import org.hibernate.Query;
public class MaterialDAO extends BaseDAO<Material> implements MaterialIDAO public class MaterialDAO extends BaseDAO<Material> implements MaterialIDAO {
{ /**
/**
* 设置dao映射基类 * 设置dao映射基类
*
* @return * @return
*/ */
@Override @Override
public Class<Material> getEntityClass() public Class<Material> getEntityClass() {
{
return Material.class; return Material.class;
} }
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
@Override @Override
public void batchSetEnable(Boolean enable,String supplierIDs) { public void batchSetEnable(Boolean enable, String supplierIDs) {
String sql="update jsh_material m set m.enabled=" + enable + " where m.id in (" + supplierIDs + ")"; String sql = "update jsh_material m set m.enabled=" + enable + " where m.id in (" + supplierIDs + ")";
Query query = this.getHibernateTemplate().getSessionFactory().getCurrentSession().createSQLQuery(sql); Query query = this.getHibernateTemplate().getSessionFactory().getCurrentSession().createSQLQuery(sql);
query.executeUpdate(); query.executeUpdate();
} }
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
@Override @Override
public void findUnitName(PageUtil<Material> pageUtil,Long mId) throws JshException { public void findUnitName(PageUtil<Material> pageUtil, Long mId) throws JshException {
//多表联查,多表连查,此处用到了createSQLQuery,可以随便写sql语句,很方便, //多表联查,多表连查,此处用到了createSQLQuery,可以随便写sql语句,很方便,
StringBuffer queryString = new StringBuffer(); StringBuffer queryString = new StringBuffer();
queryString.append("select jsh_unit.UName from jsh_unit inner join jsh_material on UnitId=jsh_unit.id where jsh_material.id="+mId); queryString.append("select jsh_unit.UName from jsh_unit inner join jsh_material on UnitId=jsh_unit.id where jsh_material.id=" + mId);
Query query; Query query;
query = this.getHibernateTemplate().getSessionFactory().getCurrentSession().createSQLQuery(queryString + SearchConditionUtil.getCondition(pageUtil.getAdvSearch())); query = this.getHibernateTemplate().getSessionFactory().getCurrentSession().createSQLQuery(queryString + SearchConditionUtil.getCondition(pageUtil.getAdvSearch()));
pageUtil.setTotalCount(query.list().size()); pageUtil.setTotalCount(query.list().size());
......
...@@ -5,9 +5,8 @@ import com.jsh.model.po.Material; ...@@ -5,9 +5,8 @@ import com.jsh.model.po.Material;
import com.jsh.util.JshException; import com.jsh.util.JshException;
import com.jsh.util.PageUtil; import com.jsh.util.PageUtil;
public interface MaterialIDAO extends BaseIDAO<Material> public interface MaterialIDAO extends BaseIDAO<Material> {
{ public void batchSetEnable(Boolean enable, String supplierIDs);
public void batchSetEnable(Boolean enable,String supplierIDs);
public void findUnitName(PageUtil<Material> pageUtil,Long mId) throws JshException; public void findUnitName(PageUtil<Material> pageUtil, Long mId) throws JshException;
} }
...@@ -3,15 +3,14 @@ package com.jsh.dao.materials; ...@@ -3,15 +3,14 @@ package com.jsh.dao.materials;
import com.jsh.base.BaseDAO; import com.jsh.base.BaseDAO;
import com.jsh.model.po.MaterialProperty; import com.jsh.model.po.MaterialProperty;
public class MaterialPropertyDAO extends BaseDAO<MaterialProperty> implements MaterialPropertyIDAO public class MaterialPropertyDAO extends BaseDAO<MaterialProperty> implements MaterialPropertyIDAO {
{ /**
/**
* 设置dao映射基类 * 设置dao映射基类
*
* @return * @return
*/ */
@Override @Override
public Class<MaterialProperty> getEntityClass() public Class<MaterialProperty> getEntityClass() {
{
return MaterialProperty.class; return MaterialProperty.class;
} }
} }
...@@ -3,7 +3,6 @@ package com.jsh.dao.materials; ...@@ -3,7 +3,6 @@ package com.jsh.dao.materials;
import com.jsh.base.BaseIDAO; import com.jsh.base.BaseIDAO;
import com.jsh.model.po.MaterialProperty; import com.jsh.model.po.MaterialProperty;
public interface MaterialPropertyIDAO extends BaseIDAO<MaterialProperty> public interface MaterialPropertyIDAO extends BaseIDAO<MaterialProperty> {
{
} }
...@@ -3,15 +3,14 @@ package com.jsh.dao.materials; ...@@ -3,15 +3,14 @@ package com.jsh.dao.materials;
import com.jsh.base.BaseDAO; import com.jsh.base.BaseDAO;
import com.jsh.model.po.Person; import com.jsh.model.po.Person;
public class PersonDAO extends BaseDAO<Person> implements PersonIDAO public class PersonDAO extends BaseDAO<Person> implements PersonIDAO {
{ /**
/**
* 设置dao映射基类 * 设置dao映射基类
*
* @return * @return
*/ */
@Override @Override
public Class<Person> getEntityClass() public Class<Person> getEntityClass() {
{
return Person.class; return Person.class;
} }
} }
...@@ -3,7 +3,6 @@ package com.jsh.dao.materials; ...@@ -3,7 +3,6 @@ package com.jsh.dao.materials;
import com.jsh.base.BaseIDAO; import com.jsh.base.BaseIDAO;
import com.jsh.model.po.Person; import com.jsh.model.po.Person;
public interface PersonIDAO extends BaseIDAO<Person> public interface PersonIDAO extends BaseIDAO<Person> {
{
} }
package com.jsh.model.po; package com.jsh.model.po;
@SuppressWarnings("serial") @SuppressWarnings("serial")
public class Account implements java.io.Serializable public class Account implements java.io.Serializable {
{
private Long Id; private Long Id;
private String Name; private String Name;
private String SerialNo; private String SerialNo;
...@@ -11,13 +10,11 @@ public class Account implements java.io.Serializable ...@@ -11,13 +10,11 @@ public class Account implements java.io.Serializable
private Boolean IsDefault; private Boolean IsDefault;
private String Remark; private String Remark;
public Account() public Account() {
{
} }
public Account(Long Id) public Account(Long Id) {
{
this.Id = Id; this.Id = Id;
} }
...@@ -30,56 +27,46 @@ public class Account implements java.io.Serializable ...@@ -30,56 +27,46 @@ public class Account implements java.io.Serializable
Remark = remark; Remark = remark;
} }
public void setId(Long id) public Long getId() {
{
Id = id;
}
public Long getId()
{
return Id; return Id;
} }
public void setName(String name) public void setId(Long id) {
{ Id = id;
Name = name;
} }
public String getName() public String getName() {
{
return Name; return Name;
} }
public void setSerialNo(String serialNo) public void setName(String name) {
{ Name = name;
SerialNo = serialNo;
} }
public String getSerialNo() public String getSerialNo() {
{
return SerialNo; return SerialNo;
} }
public void setInitialAmount(Double initialAmount) public void setSerialNo(String serialNo) {
{ SerialNo = serialNo;
InitialAmount = initialAmount;
} }
public Double getInitialAmount() public Double getInitialAmount() {
{
return InitialAmount; return InitialAmount;
} }
public void setCurrentAmount(Double currentAmount) public void setInitialAmount(Double initialAmount) {
{ InitialAmount = initialAmount;
CurrentAmount = currentAmount;
} }
public Double getCurrentAmount() public Double getCurrentAmount() {
{
return CurrentAmount; return CurrentAmount;
} }
public void setCurrentAmount(Double currentAmount) {
CurrentAmount = currentAmount;
}
public Boolean getIsDefault() { public Boolean getIsDefault() {
return IsDefault; return IsDefault;
} }
...@@ -88,13 +75,11 @@ public class Account implements java.io.Serializable ...@@ -88,13 +75,11 @@ public class Account implements java.io.Serializable
IsDefault = isDefault; IsDefault = isDefault;
} }
public void setRemark(String remark) public String getRemark() {
{ return Remark;
Remark = remark;
} }
public String getRemark() public void setRemark(String remark) {
{ Remark = remark;
return Remark; }
}
} }
...@@ -3,33 +3,29 @@ package com.jsh.model.po; ...@@ -3,33 +3,29 @@ package com.jsh.model.po;
import java.sql.Timestamp; import java.sql.Timestamp;
@SuppressWarnings("serial") @SuppressWarnings("serial")
public class AccountHead implements java.io.Serializable public class AccountHead implements java.io.Serializable {
{
private Long Id; private Long Id;
private String Type; private String Type;
private Supplier OrganId; private Supplier OrganId;
private Person HandsPersonId; private Person HandsPersonId;
private Double ChangeAmount; private Double ChangeAmount;
private Double TotalPrice; private Double TotalPrice;
private Account AccountId; private Account AccountId;
private String BillNo; private String BillNo;
private Timestamp BillTime; private Timestamp BillTime;
private String Remark; private String Remark;
public AccountHead() public AccountHead() {
{
} }
public AccountHead(Long Id) public AccountHead(Long Id) {
{ this.Id = Id;
this.Id = Id ;
} }
public AccountHead(String type, Supplier organId, public AccountHead(String type, Supplier organId,
Person handsPersonId, Double changeAmount, Double totalPrice, Person handsPersonId, Double changeAmount, Double totalPrice,
Account accountId, String billNo, Timestamp billTime, String remark) Account accountId, String billNo, Timestamp billTime, String remark) {
{
super(); super();
Type = type; Type = type;
OrganId = organId; OrganId = organId;
...@@ -42,102 +38,84 @@ public class AccountHead implements java.io.Serializable ...@@ -42,102 +38,84 @@ public class AccountHead implements java.io.Serializable
Remark = remark; Remark = remark;
} }
public void setId(Long id) public Long getId() {
{ return Id;
}
public void setId(Long id) {
Id = id; Id = id;
} }
public Long getId() public String getType() {
{ return Type;
return Id;
} }
public void setType(String type) public void setType(String type) {
{
Type = type; Type = type;
} }
public String getType() public Supplier getOrganId() {
{ return OrganId;
return Type;
} }
public void setOrganId(Supplier organId) public void setOrganId(Supplier organId) {
{
OrganId = organId; OrganId = organId;
} }
public Supplier getOrganId() public Person getHandsPersonId() {
{ return HandsPersonId;
return OrganId;
} }
public void setHandsPersonId(Person handsPersonId) public void setHandsPersonId(Person handsPersonId) {
{
HandsPersonId = handsPersonId; HandsPersonId = handsPersonId;
} }
public Person getHandsPersonId() public Double getChangeAmount() {
{ return ChangeAmount;
return HandsPersonId;
} }
public void setChangeAmount(Double changeAmount) public void setChangeAmount(Double changeAmount) {
{
ChangeAmount = changeAmount; ChangeAmount = changeAmount;
} }
public Double getChangeAmount() public Double getTotalPrice() {
{ return TotalPrice;
return ChangeAmount;
} }
public void setTotalPrice(Double totalPrice) { public void setTotalPrice(Double totalPrice) {
TotalPrice = totalPrice; TotalPrice = totalPrice;
}
public Double getTotalPrice() {
return TotalPrice;
}
public void setAccountId(Account accountId)
{
AccountId = accountId;
} }
public Account getAccountId() public Account getAccountId() {
{
return AccountId; return AccountId;
} }
public void setBillNo(String billNo) public void setAccountId(Account accountId) {
{ AccountId = accountId;
BillNo = billNo;
} }
public String getBillNo() public String getBillNo() {
{
return BillNo; return BillNo;
} }
public void setBillTime(Timestamp billTime) public void setBillNo(String billNo) {
{ BillNo = billNo;
BillTime = billTime;
} }
public Timestamp getBillTime() public Timestamp getBillTime() {
{
return BillTime; return BillTime;
} }
public void setRemark(String remark) public void setBillTime(Timestamp billTime) {
{ BillTime = billTime;
Remark = remark;
} }
public String getRemark() public String getRemark() {
{
return Remark; return Remark;
} }
public void setRemark(String remark) {
Remark = remark;
}
} }
package com.jsh.model.po; package com.jsh.model.po;
@SuppressWarnings("serial") @SuppressWarnings("serial")
public class AccountItem implements java.io.Serializable public class AccountItem implements java.io.Serializable {
{
private Long Id; private Long Id;
private AccountHead HeaderId; private AccountHead HeaderId;
private Account AccountId; private Account AccountId;
...@@ -10,19 +9,16 @@ public class AccountItem implements java.io.Serializable ...@@ -10,19 +9,16 @@ public class AccountItem implements java.io.Serializable
private Double EachAmount; private Double EachAmount;
private String Remark; private String Remark;
public AccountItem() public AccountItem() {
{
} }
public AccountItem(Long Id) public AccountItem(Long Id) {
{ this.Id = Id;
this.Id = Id ;
} }
public AccountItem(AccountHead headerId, Account accountId, public AccountItem(AccountHead headerId, Account accountId,
InOutItem inOutItemId, Double eachAmount, String remark) InOutItem inOutItemId, Double eachAmount, String remark) {
{
super(); super();
HeaderId = headerId; HeaderId = headerId;
AccountId = accountId; AccountId = accountId;
...@@ -31,64 +27,52 @@ public class AccountItem implements java.io.Serializable ...@@ -31,64 +27,52 @@ public class AccountItem implements java.io.Serializable
Remark = remark; Remark = remark;
} }
public void setId(Long id) public Long getId() {
{
Id = id;
}
public Long getId()
{
return Id; return Id;
} }
public void setHeaderId(AccountHead headerId) public void setId(Long id) {
{ Id = id;
HeaderId = headerId;
} }
public AccountHead getHeaderId() public AccountHead getHeaderId() {
{
return HeaderId; return HeaderId;
} }
public void setAccountId(Account accountId) public void setHeaderId(AccountHead headerId) {
{ HeaderId = headerId;
AccountId = accountId;
} }
public Account getAccountId() public Account getAccountId() {
{
return AccountId; return AccountId;
} }
public void setInOutItemId(InOutItem inOutItemId) public void setAccountId(Account accountId) {
{ AccountId = accountId;
InOutItemId = inOutItemId;
} }
public InOutItem getInOutItemId() public InOutItem getInOutItemId() {
{
return InOutItemId; return InOutItemId;
} }
public void setEachAmount(Double eachAmount) public void setInOutItemId(InOutItem inOutItemId) {
{ InOutItemId = inOutItemId;
EachAmount = eachAmount;
} }
public Double getEachAmount() public Double getEachAmount() {
{
return EachAmount; return EachAmount;
} }
public void setRemark(String remark) public void setEachAmount(Double eachAmount) {
{ EachAmount = eachAmount;
Remark = remark;
} }
public String getRemark() public String getRemark() {
{
return Remark; return Remark;
} }
public void setRemark(String remark) {
Remark = remark;
}
} }
package com.jsh.model.po; package com.jsh.model.po;
@SuppressWarnings("serial") @SuppressWarnings("serial")
public class App implements java.io.Serializable public class App implements java.io.Serializable {
{ private Long Id;
private Long Id; private String Number;
private String Number; private String Name;
private String Name; private String Type;
private String Type; private String Icon;
private String Icon; private String URL;
private String URL; private String Width;
private String Width; private String Height;
private String Height; private Boolean ReSize;
private Boolean ReSize; private Boolean OpenMax;
private Boolean OpenMax; private Boolean Flash;
private Boolean Flash; private String ZL;
private String ZL; private String Sort;
private String Sort; private String Remark;
private String Remark; private Boolean Enabled;
private Boolean Enabled;
public App() {
public App()
{ }
} public App(Long Id) {
this.Id = Id;
public App(Long Id) }
{
this.Id = Id ; public App(String Number, String Name, String Type, String Icon, String URL, String Width,
} String Height, Boolean ReSize, Boolean OpenMax, Boolean Flash, String ZL, String Sort,
String Remark, Boolean Enabled) {
public App(String Number, String Name, String Type, String Icon, String URL, String Width, this.Number = Number;
String Height, Boolean ReSize, Boolean OpenMax, Boolean Flash, String ZL, String Sort, this.Name = Name;
String Remark, Boolean Enabled) this.Type = Type;
{ this.Icon = Icon;
this.Number = Number; this.URL = URL;
this.Name = Name; this.Width = Width;
this.Type = Type; this.Height = Height;
this.Icon = Icon; this.ReSize = ReSize;
this.URL = URL; this.OpenMax = OpenMax;
this.Width = Width; this.Flash = Flash;
this.Height = Height; this.ZL = ZL;
this.ReSize = ReSize; this.Sort = Sort;
this.OpenMax = OpenMax; this.Remark = Remark;
this.Flash = Flash; this.Enabled = Enabled;
this.ZL = ZL; }
this.Sort = Sort;
this.Remark = Remark; public Long getId() {
this.Enabled = Enabled; return Id;
} }
public Long getId() { public void setId(Long id) {
return Id; Id = id;
} }
public void setId(Long id) { public String getNumber() {
Id = id; return Number;
} }
public String getNumber() { public void setNumber(String number) {
return Number; Number = number;
} }
public void setNumber(String number) { public String getName() {
Number = number; return Name;
} }
public String getName() { public void setName(String name) {
return Name; Name = name;
} }
public void setName(String name) { public String getType() {
Name = name; return Type;
} }
public String getType() { public void setType(String type) {
return Type; Type = type;
} }
public void setType(String type) { public String getIcon() {
Type = type; return Icon;
} }
public String getIcon() { public void setIcon(String icon) {
return Icon; Icon = icon;
} }
public void setIcon(String icon) { public String getURL() {
Icon = icon; return URL;
} }
public String getURL() { public void setURL(String uRL) {
return URL; URL = uRL;
} }
public void setURL(String uRL) { public String getWidth() {
URL = uRL; return Width;
} }
public String getWidth() { public void setWidth(String width) {
return Width; Width = width;
} }
public void setWidth(String width) { public String getHeight() {
Width = width; return Height;
} }
public String getHeight() { public void setHeight(String height) {
return Height; Height = height;
} }
public void setHeight(String height) { public Boolean getReSize() {
Height = height; return ReSize;
} }
public Boolean getReSize() { public void setReSize(Boolean reSize) {
return ReSize; ReSize = reSize;
} }
public void setReSize(Boolean reSize) { public Boolean getOpenMax() {
ReSize = reSize; return OpenMax;
} }
public Boolean getOpenMax() { public void setOpenMax(Boolean openMax) {
return OpenMax; OpenMax = openMax;
} }
public void setOpenMax(Boolean openMax) { public Boolean getFlash() {
OpenMax = openMax; return Flash;
} }
public Boolean getFlash() { public void setFlash(Boolean flash) {
return Flash; Flash = flash;
} }
public void setFlash(Boolean flash) { public String getZL() {
Flash = flash; return ZL;
} }
public String getZL() { public void setZL(String zL) {
return ZL; ZL = zL;
} }
public void setZL(String zL) { public String getSort() {
ZL = zL; return Sort;
} }
public String getSort() {
return Sort;
}
public void setSort(String sort) { public void setSort(String sort) {
Sort = sort; Sort = sort;
} }
public String getRemark() { public String getRemark() {
return Remark; return Remark;
} }
public void setRemark(String remark) { public void setRemark(String remark) {
Remark = remark; Remark = remark;
} }
public Boolean getEnabled() { public Boolean getEnabled() {
return Enabled; return Enabled;
} }
public void setEnabled(Boolean enabled) { public void setEnabled(Boolean enabled) {
Enabled = enabled; Enabled = enabled;
} }
} }
\ No newline at end of file
...@@ -4,376 +4,317 @@ import java.sql.Timestamp; ...@@ -4,376 +4,317 @@ import java.sql.Timestamp;
import java.util.Map; import java.util.Map;
@SuppressWarnings("serial") @SuppressWarnings("serial")
public class Asset implements java.io.Serializable public class Asset implements java.io.Serializable {
{ private Long id;
private Long id; private Assetname assetname;
private Assetname assetname; private String location;
private String location; private Short status;
private Short status; private Basicuser user;
private Basicuser user; private Double price;
private Double price; private Timestamp purchasedate;
private Timestamp purchasedate; private Timestamp periodofvalidity;
private Timestamp periodofvalidity; private Timestamp warrantydate;
private Timestamp warrantydate; private String assetnum;
private String assetnum; private String serialnum;
private String serialnum; private Supplier supplier;
private Supplier supplier; private String labels;
private String labels; private String description;
private String description; private String addMonth;
private String addMonth; private Timestamp createtime;
private Timestamp createtime; private Basicuser creator;
private Basicuser creator; private Timestamp updatetime;
private Timestamp updatetime; private Basicuser updator;
private Basicuser updator;
//----------以下属性导入exel表格使用--------------------
//----------以下属性导入exel表格使用-------------------- /**
/**
* 类型 right--正确 warn--警告 wrong--错误 * 类型 right--正确 warn--警告 wrong--错误
*/ */
private Map<Integer,String> cellInfo; private Map<Integer, String> cellInfo;
/** /**
* 行号 * 行号
*/ */
private Integer rowLineNum; private Integer rowLineNum;
/** /**
* 保存价格 * 保存价格
*/ */
private String priceStr; private String priceStr;
/** /**
* 资产名称 * 资产名称
*/ */
private String assetnameStr; private String assetnameStr;
/** /**
* 资产类型 * 资产类型
*/ */
private String category; private String category;
/** /**
* 购买日期 * 购买日期
*/ */
private String purchasedateStr; private String purchasedateStr;
/** /**
* 有效日期 * 有效日期
*/ */
private String periodofvalidityStr; private String periodofvalidityStr;
/** /**
* 保修日期 * 保修日期
*/ */
private String warrantydateStr; private String warrantydateStr;
public Asset() public Asset() {
{
}
}
public Asset(Long id) {
public Asset(Long id) this.id = id;
{ }
this.id = id;
} public Asset(Assetname assetname, String location,
Short status, Basicuser user, Double price, Timestamp purchasedate,
public Asset(Assetname assetname, String location, Timestamp periodofvalidity, Timestamp warrantydate,
Short status, Basicuser user, Double price, Timestamp purchasedate, String assetnum, String serialnum, Supplier supplier,
Timestamp periodofvalidity, Timestamp warrantydate, String description, Timestamp createtime, Basicuser creator,
String assetnum, String serialnum, Supplier supplier, Timestamp updatetime, String labels, Basicuser updator, String addMonth) {
String description, Timestamp createtime, Basicuser creator, super();
Timestamp updatetime,String labels, Basicuser updator,String addMonth) this.assetname = assetname;
{ this.location = location;
super(); this.status = status;
this.assetname = assetname; this.user = user;
this.location = location; this.price = price;
this.status = status; this.purchasedate = purchasedate;
this.user = user; this.periodofvalidity = periodofvalidity;
this.price = price; this.warrantydate = warrantydate;
this.purchasedate = purchasedate; this.assetnum = assetnum;
this.periodofvalidity = periodofvalidity; this.serialnum = serialnum;
this.warrantydate = warrantydate; this.supplier = supplier;
this.assetnum = assetnum; this.description = description;
this.serialnum = serialnum; this.createtime = createtime;
this.supplier = supplier; this.creator = creator;
this.description = description; this.updatetime = updatetime;
this.createtime = createtime; this.updator = updator;
this.creator = creator; this.labels = labels;
this.updatetime = updatetime; this.addMonth = addMonth;
this.updator = updator; }
this.labels = labels;
this.addMonth = addMonth;
} public Long getId() {
return id;
}
public Long getId() public void setId(Long id) {
{ this.id = id;
return id; }
}
public Assetname getAssetname() {
public void setId(Long id) return assetname;
{ }
this.id = id;
} public void setAssetname(Assetname assetname) {
this.assetname = assetname;
public Assetname getAssetname() }
{
return assetname; public String getLocation() {
} return location;
}
public void setAssetname(Assetname assetname)
{ public void setLocation(String location) {
this.assetname = assetname; this.location = location;
} }
public String getLocation() public Short getStatus() {
{ return status;
return location; }
}
public void setStatus(Short status) {
public void setLocation(String location) this.status = status;
{ }
this.location = location;
} public Basicuser getUser() {
return user;
public Short getStatus() }
{
return status; public void setUser(Basicuser user) {
} this.user = user;
}
public void setStatus(Short status)
{ public Double getPrice() {
this.status = status; return price;
} }
public Basicuser getUser() public void setPrice(Double price) {
{ this.price = price;
return user; }
}
public Timestamp getPurchasedate() {
public void setUser(Basicuser user) return purchasedate;
{ }
this.user = user;
} public void setPurchasedate(Timestamp purchasedate) {
this.purchasedate = purchasedate;
public Double getPrice() }
{
return price; public Timestamp getPeriodofvalidity() {
} return periodofvalidity;
}
public void setPrice(Double price)
{ public void setPeriodofvalidity(Timestamp periodofvalidity) {
this.price = price; this.periodofvalidity = periodofvalidity;
} }
public Timestamp getPurchasedate() public Timestamp getWarrantydate() {
{ return warrantydate;
return purchasedate; }
}
public void setWarrantydate(Timestamp warrantydate) {
public void setPurchasedate(Timestamp purchasedate) this.warrantydate = warrantydate;
{ }
this.purchasedate = purchasedate;
} public String getAssetnum() {
return assetnum;
public Timestamp getPeriodofvalidity() }
{
return periodofvalidity; public void setAssetnum(String assetnum) {
} this.assetnum = assetnum;
}
public void setPeriodofvalidity(Timestamp periodofvalidity)
{ public String getSerialnum() {
this.periodofvalidity = periodofvalidity; return serialnum;
} }
public Timestamp getWarrantydate() public void setSerialnum(String serialnum) {
{ this.serialnum = serialnum;
return warrantydate; }
}
public Supplier getSupplier() {
public void setWarrantydate(Timestamp warrantydate) return supplier;
{ }
this.warrantydate = warrantydate;
} public void setSupplier(Supplier supplier) {
this.supplier = supplier;
public String getAssetnum() }
{
return assetnum; public String getDescription() {
} return description;
}
public void setAssetnum(String assetnum)
{ public void setDescription(String description) {
this.assetnum = assetnum; this.description = description;
} }
public String getSerialnum() public Timestamp getCreatetime() {
{ return createtime;
return serialnum; }
}
public void setCreatetime(Timestamp createtime) {
public void setSerialnum(String serialnum) this.createtime = createtime;
{ }
this.serialnum = serialnum;
} public Basicuser getCreator() {
return creator;
public Supplier getSupplier() }
{
return supplier; public void setCreator(Basicuser creator) {
} this.creator = creator;
}
public void setSupplier(Supplier supplier)
{ public Timestamp getUpdatetime() {
this.supplier = supplier; return updatetime;
} }
public String getDescription() public void setUpdatetime(Timestamp updatetime) {
{ this.updatetime = updatetime;
return description; }
}
public Basicuser getUpdator() {
public void setDescription(String description) return updator;
{ }
this.description = description;
} public void setUpdator(Basicuser updator) {
this.updator = updator;
public Timestamp getCreatetime() }
{
return createtime; public String getLabels() {
}
public void setCreatetime(Timestamp createtime)
{
this.createtime = createtime;
}
public Basicuser getCreator()
{
return creator;
}
public void setCreator(Basicuser creator)
{
this.creator = creator;
}
public Timestamp getUpdatetime()
{
return updatetime;
}
public void setUpdatetime(Timestamp updatetime)
{
this.updatetime = updatetime;
}
public Basicuser getUpdator()
{
return updator;
}
public void setUpdator(Basicuser updator)
{
this.updator = updator;
}
public String getLabels()
{
return labels; return labels;
} }
public void setLabels(String labels) public void setLabels(String labels) {
{
this.labels = labels; this.labels = labels;
} }
public String getAddMonth() public String getAddMonth() {
{
return addMonth; return addMonth;
} }
public void setAddMonth(String addMonth) public void setAddMonth(String addMonth) {
{
this.addMonth = addMonth; this.addMonth = addMonth;
} }
public Integer getRowLineNum() public Integer getRowLineNum() {
{
return rowLineNum; return rowLineNum;
} }
public void setRowLineNum(Integer rowLineNum) public void setRowLineNum(Integer rowLineNum) {
{
this.rowLineNum = rowLineNum; this.rowLineNum = rowLineNum;
} }
public Map<Integer, String> getCellInfo() public Map<Integer, String> getCellInfo() {
{
return cellInfo; return cellInfo;
} }
public void setCellInfo(Map<Integer, String> cellInfo) public void setCellInfo(Map<Integer, String> cellInfo) {
{
this.cellInfo = cellInfo; this.cellInfo = cellInfo;
} }
public String getPriceStr() public String getPriceStr() {
{
return priceStr; return priceStr;
} }
public void setPriceStr(String priceStr) public void setPriceStr(String priceStr) {
{
this.priceStr = priceStr; this.priceStr = priceStr;
} }
public String getAssetnameStr() public String getAssetnameStr() {
{
return assetnameStr; return assetnameStr;
} }
public void setAssetnameStr(String assetnameStr) public void setAssetnameStr(String assetnameStr) {
{
this.assetnameStr = assetnameStr; this.assetnameStr = assetnameStr;
} }
public String getCategory() public String getCategory() {
{
return category; return category;
} }
public void setCategory(String category) public void setCategory(String category) {
{
this.category = category; this.category = category;
} }
public String getPurchasedateStr() public String getPurchasedateStr() {
{
return purchasedateStr; return purchasedateStr;
} }
public void setPurchasedateStr(String purchasedateStr) public void setPurchasedateStr(String purchasedateStr) {
{
this.purchasedateStr = purchasedateStr; this.purchasedateStr = purchasedateStr;
} }
public String getPeriodofvalidityStr() public String getPeriodofvalidityStr() {
{
return periodofvalidityStr; return periodofvalidityStr;
} }
public void setPeriodofvalidityStr(String periodofvalidityStr) public void setPeriodofvalidityStr(String periodofvalidityStr) {
{
this.periodofvalidityStr = periodofvalidityStr; this.periodofvalidityStr = periodofvalidityStr;
} }
public String getWarrantydateStr() public String getWarrantydateStr() {
{
return warrantydateStr; return warrantydateStr;
} }
public void setWarrantydateStr(String warrantydateStr) public void setWarrantydateStr(String warrantydateStr) {
{
this.warrantydateStr = warrantydateStr; this.warrantydateStr = warrantydateStr;
} }
} }
\ No newline at end of file
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