给收入单和支出单的接口增加收支项目的参数

This commit is contained in:
jishenghua
2025-02-25 22:01:49 +08:00
parent 8d2b25bc7f
commit 3801dd8202
4 changed files with 16 additions and 7 deletions

View File

@@ -68,8 +68,9 @@ public class AccountHeadController extends BaseController {
String status = StringUtil.getInfo(search, "status"); String status = StringUtil.getInfo(search, "status");
String remark = StringUtil.getInfo(search, "remark"); String remark = StringUtil.getInfo(search, "remark");
String number = StringUtil.getInfo(search, "number"); String number = StringUtil.getInfo(search, "number");
Long inOutItemId = StringUtil.parseStrLong(StringUtil.getInfo(search, "inOutItemId"));
List<AccountHeadVo4ListEx> list = accountHeadService.select(type, billNo, beginTime, endTime, organId, creator, List<AccountHeadVo4ListEx> list = accountHeadService.select(type, billNo, beginTime, endTime, organId, creator,
handsPersonId, accountId, status, remark, number); handsPersonId, accountId, status, remark, number, inOutItemId);
return getDataTable(list); return getDataTable(list);
} }

View File

@@ -24,7 +24,8 @@ public interface AccountHeadMapperEx {
@Param("accountId") Long accountId, @Param("accountId") Long accountId,
@Param("status") String status, @Param("status") String status,
@Param("remark") String remark, @Param("remark") String remark,
@Param("number") String number); @Param("number") String number,
@Param("inOutItemId") Long inOutItemId);
Long countsByAccountHead( Long countsByAccountHead(
@Param("type") String type, @Param("type") String type,
@@ -38,7 +39,8 @@ public interface AccountHeadMapperEx {
@Param("accountId") Long accountId, @Param("accountId") Long accountId,
@Param("status") String status, @Param("status") String status,
@Param("remark") String remark, @Param("remark") String remark,
@Param("number") String number); @Param("number") String number,
@Param("inOutItemId") Long inOutItemId);
List<AccountHeadVo4ListEx> getDetailByNumber( List<AccountHeadVo4ListEx> getDetailByNumber(
@Param("billNo") String billNo); @Param("billNo") String billNo);

View File

@@ -90,7 +90,7 @@ public class AccountHeadService {
public List<AccountHeadVo4ListEx> select(String type, String billNo, String beginTime, String endTime, public List<AccountHeadVo4ListEx> select(String type, String billNo, String beginTime, String endTime,
Long organId, Long creator, Long handsPersonId, Long accountId, String status, Long organId, Long creator, Long handsPersonId, Long accountId, String status,
String remark, String number) throws Exception{ String remark, String number, Long inOutItemId) throws Exception{
List<AccountHeadVo4ListEx> list = new ArrayList<>(); List<AccountHeadVo4ListEx> list = new ArrayList<>();
try{ try{
String [] creatorArray = getCreatorArray(); String [] creatorArray = getCreatorArray();
@@ -98,7 +98,7 @@ public class AccountHeadService {
endTime = Tools.parseDayToTime(endTime,BusinessConstants.DAY_LAST_TIME); endTime = Tools.parseDayToTime(endTime,BusinessConstants.DAY_LAST_TIME);
PageUtils.startPage(); PageUtils.startPage();
list = accountHeadMapperEx.selectByConditionAccountHead(type, creatorArray, billNo, list = accountHeadMapperEx.selectByConditionAccountHead(type, creatorArray, billNo,
beginTime, endTime, organId, creator, handsPersonId, accountId, status, remark, number); beginTime, endTime, organId, creator, handsPersonId, accountId, status, remark, number, inOutItemId);
if (null != list) { if (null != list) {
for (AccountHeadVo4ListEx ah : list) { for (AccountHeadVo4ListEx ah : list) {
if(ah.getChangeAmount() != null) { if(ah.getChangeAmount() != null) {
@@ -132,14 +132,14 @@ public class AccountHeadService {
public Long countAccountHead(String type, String billNo, String beginTime, String endTime, public Long countAccountHead(String type, String billNo, String beginTime, String endTime,
Long organId, Long creator, Long handsPersonId, Long accountId, String status, Long organId, Long creator, Long handsPersonId, Long accountId, String status,
String remark, String number) throws Exception{ String remark, String number, Long inOutItemId) throws Exception{
Long result=null; Long result=null;
try{ try{
String [] creatorArray = getCreatorArray(); String [] creatorArray = getCreatorArray();
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, result = accountHeadMapperEx.countsByAccountHead(type, creatorArray, billNo,
beginTime, endTime, organId, creator, handsPersonId, accountId, status, remark, number); beginTime, endTime, organId, creator, handsPersonId, accountId, status, remark, number, inOutItemId);
} catch(Exception e){ } catch(Exception e){
JshException.readFail(logger, e); JshException.readFail(logger, e);
} }

View File

@@ -67,6 +67,9 @@
and dh.number like #{bindNumber} and dh.number like #{bindNumber}
</if> </if>
</if> </if>
<if test="inOutItemId != null">
and ai.in_out_item_id=#{inOutItemId}
</if>
and ifnull(ah.delete_flag,'0') !='1' and ifnull(ah.delete_flag,'0') !='1'
order by ah.id desc order by ah.id desc
</select> </select>
@@ -126,6 +129,9 @@
and dh.number like #{bindNumber} and dh.number like #{bindNumber}
</if> </if>
</if> </if>
<if test="inOutItemId != null">
and ai.in_out_item_id=#{inOutItemId}
</if>
and ifnull(ah.delete_flag,'0') !='1') tb and ifnull(ah.delete_flag,'0') !='1') tb
</select> </select>