增加接口:根据出入库单据id查询收付款单号
This commit is contained in:
parent
6e94686a12
commit
9883501a2a
@ -3,6 +3,7 @@ package com.jsh.erp.controller;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.jsh.erp.constants.BusinessConstants;
|
||||
import com.jsh.erp.constants.ExceptionConstants;
|
||||
import com.jsh.erp.datasource.entities.AccountHead;
|
||||
import com.jsh.erp.datasource.entities.AccountHeadVo4Body;
|
||||
import com.jsh.erp.datasource.entities.AccountHeadVo4ListEx;
|
||||
import com.jsh.erp.service.accountHead.AccountHeadService;
|
||||
@ -115,4 +116,27 @@ public class AccountHeadController {
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据出入库单据id查询收付款单号
|
||||
* @param billId
|
||||
* @param request
|
||||
* @return
|
||||
*/
|
||||
@GetMapping(value = "/getFinancialBillNoByBillId")
|
||||
@ApiOperation(value = "根据编号查询单据信息")
|
||||
public BaseResponseInfo getFinancialBillNoByBillId(@RequestParam("billId") Long billId,
|
||||
HttpServletRequest request)throws Exception {
|
||||
BaseResponseInfo res = new BaseResponseInfo();
|
||||
try {
|
||||
List<AccountHead> list = accountHeadService.getFinancialBillNoByBillId(billId);
|
||||
res.code = 200;
|
||||
res.data = list;
|
||||
} catch(Exception e){
|
||||
e.printStackTrace();
|
||||
res.code = 500;
|
||||
res.data = "获取数据失败";
|
||||
}
|
||||
return res;
|
||||
}
|
||||
}
|
||||
|
||||
@ -55,4 +55,7 @@ public interface AccountHeadMapperEx {
|
||||
List<AccountHead> getAccountHeadListByOrganIds(@Param("organIds") String[] organIds);
|
||||
|
||||
List<AccountHead> getAccountHeadListByHandsPersonIds(@Param("handsPersonIds") String[] handsPersonIds);
|
||||
|
||||
List<AccountHead> getFinancialBillNoByBillId(
|
||||
@Param("billId") Long billId);
|
||||
}
|
||||
@ -392,4 +392,8 @@ public class AccountHeadService {
|
||||
}
|
||||
return resList;
|
||||
}
|
||||
|
||||
public List<AccountHead> getFinancialBillNoByBillId(Long billId) {
|
||||
return accountHeadMapperEx.getFinancialBillNoByBillId(billId);
|
||||
}
|
||||
}
|
||||
|
||||
@ -176,4 +176,11 @@
|
||||
)
|
||||
and ifnull(delete_flag,'0') !='1'
|
||||
</select>
|
||||
|
||||
<select id="getFinancialBillNoByBillId" resultType="com.jsh.erp.datasource.entities.AccountHead">
|
||||
select ah.bill_no from jsh_account_head ah
|
||||
left join jsh_account_item ai on ah.id=ai.header_id and ifnull(ai.delete_flag,'0') !='1'
|
||||
where bill_id=#{billId}
|
||||
and ifnull(ah.delete_flag,'0') !='1'
|
||||
</select>
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue
Block a user