给财务单据增加查询条件
This commit is contained in:
@@ -17,6 +17,9 @@ public interface AccountHeadMapperEx {
|
||||
@Param("billNo") String billNo,
|
||||
@Param("beginTime") String beginTime,
|
||||
@Param("endTime") String endTime,
|
||||
@Param("organId") Long organId,
|
||||
@Param("creator") Long creator,
|
||||
@Param("handsPersonId") Long handsPersonId,
|
||||
@Param("offset") Integer offset,
|
||||
@Param("rows") Integer rows);
|
||||
|
||||
@@ -25,7 +28,10 @@ public interface AccountHeadMapperEx {
|
||||
@Param("creatorArray") String[] creatorArray,
|
||||
@Param("billNo") String billNo,
|
||||
@Param("beginTime") String beginTime,
|
||||
@Param("endTime") String endTime);
|
||||
@Param("endTime") String endTime,
|
||||
@Param("organId") Long organId,
|
||||
@Param("creator") Long creator,
|
||||
@Param("handsPersonId") Long handsPersonId);
|
||||
|
||||
BigDecimal findAllMoney(
|
||||
@Param("supplierId") Integer supplierId,
|
||||
|
||||
@@ -36,8 +36,10 @@ public class AccountHeadComponent implements ICommonQuery {
|
||||
String billNo = StringUtil.getInfo(search, "billNo");
|
||||
String beginTime = StringUtil.getInfo(search, "beginTime");
|
||||
String endTime = StringUtil.getInfo(search, "endTime");
|
||||
String order = QueryUtils.order(map);
|
||||
return accountHeadService.select(type, roleType, billNo, beginTime, endTime, QueryUtils.offset(map), QueryUtils.rows(map));
|
||||
Long organId = StringUtil.parseStrLong(StringUtil.getInfo(search, "organId"));
|
||||
Long creator = StringUtil.parseStrLong(StringUtil.getInfo(search, "creator"));
|
||||
Long handsPersonId = StringUtil.parseStrLong(StringUtil.getInfo(search, "handsPersonId"));
|
||||
return accountHeadService.select(type, roleType, billNo, beginTime, endTime, organId, creator, handsPersonId, QueryUtils.offset(map), QueryUtils.rows(map));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -48,7 +50,10 @@ public class AccountHeadComponent implements ICommonQuery {
|
||||
String billNo = StringUtil.getInfo(search, "billNo");
|
||||
String beginTime = StringUtil.getInfo(search, "beginTime");
|
||||
String endTime = StringUtil.getInfo(search, "endTime");
|
||||
return accountHeadService.countAccountHead(type, roleType, billNo, beginTime, endTime);
|
||||
Long organId = StringUtil.parseStrLong(StringUtil.getInfo(search, "organId"));
|
||||
Long creator = StringUtil.parseStrLong(StringUtil.getInfo(search, "creator"));
|
||||
Long handsPersonId = StringUtil.parseStrLong(StringUtil.getInfo(search, "handsPersonId"));
|
||||
return accountHeadService.countAccountHead(type, roleType, billNo, beginTime, endTime, organId, creator, handsPersonId);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -87,13 +87,14 @@ public class AccountHeadService {
|
||||
return list;
|
||||
}
|
||||
|
||||
public List<AccountHeadVo4ListEx> select(String type, String roleType, String billNo, String beginTime, String endTime, int offset, int rows) throws Exception{
|
||||
public List<AccountHeadVo4ListEx> select(String type, String roleType, String billNo, String beginTime, String endTime,
|
||||
Long organId, Long creator, Long handsPersonId, int offset, int rows) throws Exception{
|
||||
List<AccountHeadVo4ListEx> resList = new ArrayList<>();
|
||||
try{
|
||||
String [] creatorArray = getCreatorArray(roleType);
|
||||
beginTime = Tools.parseDayToTime(beginTime,BusinessConstants.DAY_FIRST_TIME);
|
||||
endTime = Tools.parseDayToTime(endTime,BusinessConstants.DAY_LAST_TIME);
|
||||
List<AccountHeadVo4ListEx> list = accountHeadMapperEx.selectByConditionAccountHead(type, creatorArray, billNo, beginTime, endTime, offset, rows);
|
||||
List<AccountHeadVo4ListEx> list = accountHeadMapperEx.selectByConditionAccountHead(type, creatorArray, billNo, beginTime, endTime, organId, creator, handsPersonId, offset, rows);
|
||||
if (null != list) {
|
||||
for (AccountHeadVo4ListEx ah : list) {
|
||||
if(ah.getChangeAmount() != null) {
|
||||
@@ -114,13 +115,14 @@ public class AccountHeadService {
|
||||
return resList;
|
||||
}
|
||||
|
||||
public Long countAccountHead(String type, String roleType, String billNo, String beginTime, String endTime) throws Exception{
|
||||
public Long countAccountHead(String type, String roleType, String billNo, String beginTime, String endTime,
|
||||
Long organId, Long creator, Long handsPersonId) throws Exception{
|
||||
Long result=null;
|
||||
try{
|
||||
String [] creatorArray = getCreatorArray(roleType);
|
||||
beginTime = Tools.parseDayToTime(beginTime,BusinessConstants.DAY_FIRST_TIME);
|
||||
endTime = Tools.parseDayToTime(endTime,BusinessConstants.DAY_LAST_TIME);
|
||||
result = accountHeadMapperEx.countsByAccountHead(type, creatorArray, billNo, beginTime, endTime);
|
||||
result = accountHeadMapperEx.countsByAccountHead(type, creatorArray, billNo, beginTime, endTime, organId, creator, handsPersonId);
|
||||
}catch(Exception e){
|
||||
JshException.readFail(logger, e);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user