增加接口:根据出入库单据id查询收付款单号
This commit is contained in:
@@ -3,6 +3,7 @@ package com.jsh.erp.controller;
|
|||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.jsh.erp.constants.BusinessConstants;
|
import com.jsh.erp.constants.BusinessConstants;
|
||||||
import com.jsh.erp.constants.ExceptionConstants;
|
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.AccountHeadVo4Body;
|
||||||
import com.jsh.erp.datasource.entities.AccountHeadVo4ListEx;
|
import com.jsh.erp.datasource.entities.AccountHeadVo4ListEx;
|
||||||
import com.jsh.erp.service.accountHead.AccountHeadService;
|
import com.jsh.erp.service.accountHead.AccountHeadService;
|
||||||
@@ -115,4 +116,27 @@ public class AccountHeadController {
|
|||||||
}
|
}
|
||||||
return res;
|
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> getAccountHeadListByOrganIds(@Param("organIds") String[] organIds);
|
||||||
|
|
||||||
List<AccountHead> getAccountHeadListByHandsPersonIds(@Param("handsPersonIds") String[] handsPersonIds);
|
List<AccountHead> getAccountHeadListByHandsPersonIds(@Param("handsPersonIds") String[] handsPersonIds);
|
||||||
|
|
||||||
|
List<AccountHead> getFinancialBillNoByBillId(
|
||||||
|
@Param("billId") Long billId);
|
||||||
}
|
}
|
||||||
@@ -392,4 +392,8 @@ public class AccountHeadService {
|
|||||||
}
|
}
|
||||||
return resList;
|
return resList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<AccountHead> getFinancialBillNoByBillId(Long billId) {
|
||||||
|
return accountHeadMapperEx.getFinancialBillNoByBillId(billId);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -176,4 +176,11 @@
|
|||||||
)
|
)
|
||||||
and ifnull(delete_flag,'0') !='1'
|
and ifnull(delete_flag,'0') !='1'
|
||||||
</select>
|
</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>
|
</mapper>
|
||||||
Reference in New Issue
Block a user