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