Merge remote-tracking branch 'origin/dev' into dev
# Conflicts: # ruoyi-system/src/main/java/com/ruoyi/system/fantang/mapper/FtReportMealsDaoMapper.java
This commit is contained in:
commit
1de3f40e97
@ -75,7 +75,27 @@ public class FtSettleDaoController extends BaseController {
|
|||||||
|
|
||||||
ReportMealsPriceEntity reportMealsPrice = iFtReportMealsDaoService.sumTotalPrice(patientId, lastBillingDate, selectBillingDate);
|
ReportMealsPriceEntity reportMealsPrice = iFtReportMealsDaoService.sumTotalPrice(patientId, lastBillingDate, selectBillingDate);
|
||||||
|
|
||||||
Map<String, Object> data = new HashMap<>();
|
Map<String, Object> data = new HashMap<>(2);
|
||||||
|
data.put("reportMealsList", reportMealsList);
|
||||||
|
data.put("reportMealsPrice", reportMealsPrice);
|
||||||
|
|
||||||
|
return AjaxResult.success(data);
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/showAllMealsWithNoPay/{patientId}")
|
||||||
|
public AjaxResult showAllMealsWithNoPay(@PathVariable Long patientId) {
|
||||||
|
|
||||||
|
// 查找该病人所有已用餐未结算记录
|
||||||
|
QueryWrapper<FtReportMealsDao> wrapper = new QueryWrapper<>();
|
||||||
|
wrapper.eq("patient_id", patientId);
|
||||||
|
wrapper.eq("dining_flag",0);
|
||||||
|
wrapper.eq("settlement_flag",0);
|
||||||
|
|
||||||
|
List<FtReportMealsDao> reportMealsList = iFtReportMealsDaoService.list(wrapper);
|
||||||
|
|
||||||
|
ReportMealsPriceEntity reportMealsPrice = iFtReportMealsDaoService.sumAllTotalPrice(patientId);
|
||||||
|
|
||||||
|
Map<String, Object> data = new HashMap<>(2);
|
||||||
data.put("reportMealsList", reportMealsList);
|
data.put("reportMealsList", reportMealsList);
|
||||||
data.put("reportMealsPrice", reportMealsPrice);
|
data.put("reportMealsPrice", reportMealsPrice);
|
||||||
|
|
||||||
|
@ -79,4 +79,9 @@ private static final long serialVersionUID=1L;
|
|||||||
* 开票类型
|
* 开票类型
|
||||||
*/
|
*/
|
||||||
private Integer invoiceType;
|
private Integer invoiceType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 开票金额
|
||||||
|
*/
|
||||||
|
private BigDecimal invoiceAmount;
|
||||||
}
|
}
|
||||||
|
@ -106,4 +106,14 @@ public class FtSettleDao implements Serializable {
|
|||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
private Date selectBillingDate;
|
private Date selectBillingDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 开票标志
|
||||||
|
*/
|
||||||
|
private Boolean invoiceFlag;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发票 id
|
||||||
|
*/
|
||||||
|
private Long invoiceId;
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,6 @@ import cn.hutool.core.date.DateTime;
|
|||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.ruoyi.system.fantang.domain.FtReportMealsDao;
|
import com.ruoyi.system.fantang.domain.FtReportMealsDao;
|
||||||
import com.ruoyi.system.fantang.entity.ReportMealsPriceEntity;
|
import com.ruoyi.system.fantang.entity.ReportMealsPriceEntity;
|
||||||
import com.ruoyi.system.fantang.vo.FtReportMealVo;
|
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
import org.apache.ibatis.annotations.Select;
|
import org.apache.ibatis.annotations.Select;
|
||||||
import org.apache.ibatis.annotations.Update;
|
import org.apache.ibatis.annotations.Update;
|
||||||
@ -44,11 +43,6 @@ public interface FtReportMealsDaoMapper extends BaseMapper<FtReportMealsDao> {
|
|||||||
|
|
||||||
List<FtReportMealsDao> listAllNutrition(FtReportMealsDao ftReportMealsDao);
|
List<FtReportMealsDao> listAllNutrition(FtReportMealsDao ftReportMealsDao);
|
||||||
|
|
||||||
@Select("SELECT a.type, a.foods, count(a.foods) as count, b.depart_id,c.depart_name\n" +
|
@Select("SELECT a.patient_id,sum(a.price) as dinner_total_price , sum(a.nutrition_food_price ) as nutrition_total_price , sum(a.total_price) as sum_total_price FROM ft_report_meals a where a.patient_id = #{patientId} AND a.settlement_flag = 0 AND a.dining_flag = 1")
|
||||||
"from ft_report_meals a \n" +
|
ReportMealsPriceEntity sumAllTotalPrice(Long patientId);
|
||||||
"LEFT JOIN ft_patient b on a.patient_id = b.patient_id\n" +
|
|
||||||
"LEFT JOIN ft_depart c on b.depart_id = c.depart_id \n" +
|
|
||||||
"where b.depart_id = #{departId} and a.dining_at BETWEEN #{beginOfDay} and #{endOfDay}\n" +
|
|
||||||
"GROUP BY a.type, foods")
|
|
||||||
List<FtReportMealVo> getStatisticsFoods(@Param("departId") Integer departId, @Param("beginOfDay") DateTime beginOfDay, @Param("endOfDay") DateTime endOfDay);
|
|
||||||
}
|
}
|
||||||
|
@ -31,6 +31,8 @@ public interface IFtReportMealsDaoService extends IService<FtReportMealsDao> {
|
|||||||
|
|
||||||
ReportMealsPriceEntity sumTotalPrice(Long patientId, Date lastBillingDate, Date selectBillingDate);
|
ReportMealsPriceEntity sumTotalPrice(Long patientId, Date lastBillingDate, Date selectBillingDate);
|
||||||
|
|
||||||
|
ReportMealsPriceEntity sumAllTotalPrice(Long patientId);
|
||||||
|
|
||||||
FtReportMealsDao getLastReportMeals(Long patientId);
|
FtReportMealsDao getLastReportMeals(Long patientId);
|
||||||
|
|
||||||
List<FtReportMealsDao> listNutrition(FtReportMealsDao ftReportMealsDao);
|
List<FtReportMealsDao> listNutrition(FtReportMealsDao ftReportMealsDao);
|
||||||
|
@ -73,6 +73,11 @@ public class FtReportMealsDaoServiceImpl extends ServiceImpl<FtReportMealsDaoMap
|
|||||||
return this.baseMapper.sumTotalPrice(patientId, lastBillingDate, selectBillingDate);
|
return this.baseMapper.sumTotalPrice(patientId, lastBillingDate, selectBillingDate);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ReportMealsPriceEntity sumAllTotalPrice(Long patientId) {
|
||||||
|
return this.baseMapper.sumAllTotalPrice(patientId);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public FtReportMealsDao getLastReportMeals(Long patientId) {
|
public FtReportMealsDao getLastReportMeals(Long patientId) {
|
||||||
|
|
||||||
|
@ -18,6 +18,7 @@
|
|||||||
<result property="invoiceName" column="invoice_name"/>
|
<result property="invoiceName" column="invoice_name"/>
|
||||||
<result property="taxId" column="tax_id"/>
|
<result property="taxId" column="tax_id"/>
|
||||||
<result property="invoiceType" column="invoice_type"/>
|
<result property="invoiceType" column="invoice_type"/>
|
||||||
|
<result property="invoiceAmount" column="invoice_amount"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
|
|
||||||
|
@ -16,6 +16,8 @@
|
|||||||
<result property="type" column="type"/>
|
<result property="type" column="type"/>
|
||||||
<result property="flag" column="flag"/>
|
<result property="flag" column="flag"/>
|
||||||
<result property="refund" column="refund"/>
|
<result property="refund" column="refund"/>
|
||||||
|
<result property="invoiceId" column="invoice_id"/>
|
||||||
|
<result property="invoiceFlag" column="invoice_flag"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
|
|
||||||
|
@ -14,6 +14,13 @@ export function getLastBillingDateByPatientId(patientId) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 查看该病人所有已用餐未结算的记录
|
||||||
|
export function showAllMealsWithNoPay(patientId) {
|
||||||
|
return request({
|
||||||
|
url: '/fantang/settle/showAllMealsWithNoPay/' + patientId,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// 查询结算报列表
|
// 查询结算报列表
|
||||||
|
@ -298,7 +298,14 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {addSettle, delSettle, exportSettle, getSettle, showMealsWithSelect} from "@/api/fantang/settle";
|
import {
|
||||||
|
addSettle,
|
||||||
|
delSettle,
|
||||||
|
exportSettle,
|
||||||
|
getSettle,
|
||||||
|
showAllMealsWithNoPay,
|
||||||
|
showMealsWithSelect
|
||||||
|
} from "../../../api/fantang/settle";
|
||||||
import {getLastSettlementDate, listAll, listMealsWithInSettle, listNoPay, listPayoff} from "@/api/fantang/meals";
|
import {getLastSettlementDate, listAll, listMealsWithInSettle, listNoPay, listPayoff} from "@/api/fantang/meals";
|
||||||
import {getUserProfile} from "@/api/system/user";
|
import {getUserProfile} from "@/api/system/user";
|
||||||
import {listDepart} from "@/api/fantang/depart";
|
import {listDepart} from "@/api/fantang/depart";
|
||||||
@ -532,6 +539,13 @@ export default {
|
|||||||
|
|
||||||
// 日常伙食费结算操作按钮
|
// 日常伙食费结算操作按钮
|
||||||
clickAddNewSettlement(row) {
|
clickAddNewSettlement(row) {
|
||||||
|
|
||||||
|
// 清空数据
|
||||||
|
this.mealsList = null;
|
||||||
|
this.sumTotalPrice = 0;
|
||||||
|
this.dinnerTotalPrice = 0;
|
||||||
|
this.nutritionTotalPrice = 0;
|
||||||
|
|
||||||
getLastSettlementDate(row.patientId).then(response => {
|
getLastSettlementDate(row.patientId).then(response => {
|
||||||
console.log("getLastBillingDateByPatientId-->", response);
|
console.log("getLastBillingDateByPatientId-->", response);
|
||||||
if (response.reportMeals.settlementAt === null) {
|
if (response.reportMeals.settlementAt === null) {
|
||||||
@ -565,6 +579,14 @@ export default {
|
|||||||
|
|
||||||
// 出院伙食费结算按钮
|
// 出院伙食费结算按钮
|
||||||
clickAddLeaveSettlement(row) {
|
clickAddLeaveSettlement(row) {
|
||||||
|
|
||||||
|
// 清空数据
|
||||||
|
this.mealsList = null;
|
||||||
|
this.sumTotalPrice = 0;
|
||||||
|
this.dinnerTotalPrice = 0;
|
||||||
|
this.nutritionTotalPrice = 0;
|
||||||
|
|
||||||
|
// 获取上次结算日期/首次用餐日期
|
||||||
getLastSettlementDate(row.patientId).then(response => {
|
getLastSettlementDate(row.patientId).then(response => {
|
||||||
if (response.reportMeals.settlementAt === null) {
|
if (response.reportMeals.settlementAt === null) {
|
||||||
this.lastBillFlag = false;
|
this.lastBillFlag = false;
|
||||||
@ -574,12 +596,31 @@ export default {
|
|||||||
this.leaveForm.lastBillingDate = response.reportMeals.settlementAt;
|
this.leaveForm.lastBillingDate = response.reportMeals.settlementAt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 查看是否有预付款
|
||||||
if (response.prepayment === null) {
|
if (response.prepayment === null) {
|
||||||
this.leaveForm.prepayment = 0;
|
this.leaveForm.prepayment = 0;
|
||||||
} else {
|
} else {
|
||||||
this.leaveForm.prepayment = response.prepayment.prepaid;
|
this.leaveForm.prepayment = response.prepayment.prepaid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
showAllMealsWithNoPay(row.patientId).then(response => {
|
||||||
|
console.log(response);
|
||||||
|
this.mealsList = response.data.reportMealsList;
|
||||||
|
|
||||||
|
if (response.data.reportMealsPrice == null) {
|
||||||
|
this.dinnerTotalPrice = 0;
|
||||||
|
this.nutritionTotalPrice = 0;
|
||||||
|
this.sumTotalPrice = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (response.data.reportMealsPrice != null) {
|
||||||
|
this.dinnerTotalPrice = response.data.reportMealsPrice.dinnerTotalPrice;
|
||||||
|
this.nutritionTotalPrice = response.data.reportMealsPrice.nutritionTotalPrice;
|
||||||
|
this.sumTotalPrice = response.data.reportMealsPrice.sumTotalPrice;
|
||||||
|
this.formAddNewSettlement.netPeceipt = this.sumTotalPrice;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
this.leaveForm.settlementDays = response.reportMeals.days;
|
this.leaveForm.settlementDays = response.reportMeals.days;
|
||||||
this.open = true;
|
this.open = true;
|
||||||
this.leaveForm.hospitalId = row.hospitalId;
|
this.leaveForm.hospitalId = row.hospitalId;
|
||||||
@ -651,6 +692,7 @@ export default {
|
|||||||
flag: null,
|
flag: null,
|
||||||
refund: null
|
refund: null
|
||||||
};
|
};
|
||||||
|
|
||||||
this.formAddNewSettlement = {
|
this.formAddNewSettlement = {
|
||||||
selectBillingDate: null,
|
selectBillingDate: null,
|
||||||
payType: null,
|
payType: null,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user