|
@@ -86,6 +86,8 @@ public class HospProfitAndLossServiceImpl extends ServiceImpl<HospProfitAndLossM
|
|
|
@Override
|
|
|
@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Throwable.class)
|
|
|
public void calc(String date, Long hospId) {
|
|
|
+ reportFormService.checkExistLoss(hospId);
|
|
|
+
|
|
|
DateTime parse = DateUtil.parse(date);
|
|
|
int year = DateUtil.year(parse);
|
|
|
int month = DateUtil.month(parse) + 1;
|
|
@@ -326,6 +328,9 @@ public class HospProfitAndLossServiceImpl extends ServiceImpl<HospProfitAndLossM
|
|
|
* @param year
|
|
|
*/
|
|
|
private void calcByAccount(Long hospId, ReportForm reportForm, List<IncomeCollection> incomes, List<HospProfitAndLoss> list, List<AllocationQuery> allocationQueries, int month, int year) {
|
|
|
+ // check 这个医院是否有对应的损益标识
|
|
|
+ reportFormService.checkExistLoss(hospId);
|
|
|
+
|
|
|
// 报表项目关联的会计科目对象
|
|
|
List<RelationVO> accountRelations = reportRelationService.getAccountRelation(reportForm.getId(), hospId);
|
|
|
if (accountRelations.isEmpty()) {
|
|
@@ -360,6 +365,8 @@ public class HospProfitAndLossServiceImpl extends ServiceImpl<HospProfitAndLossM
|
|
|
*/
|
|
|
@Override
|
|
|
public PageUtils getHospProfits(Integer current, Integer pageSize, String date, Long hospId) {
|
|
|
+ reportFormService.checkExistLoss(hospId);
|
|
|
+
|
|
|
DateTime parse = DateUtil.parse(date);
|
|
|
int year = DateUtil.year(parse);
|
|
|
int month = DateUtil.month(parse) + 1;
|