Browse Source

Merge remote-tracking branch 'origin/master'

master
ligaode 6 months ago
parent
commit
14509d8f57
  1. 27
      yxt-as-ui/src/api/statement/inventory.js
  2. 22
      yxt-as-ui/src/api/statement/mountings.js
  3. 77
      yxt-as-ui/src/router/index.js
  4. 2
      yxt-as-ui/src/views/operation/claimbilling/claimbillingAdd.vue
  5. 2
      yxt-as-ui/src/views/operation/claimbilling/claimbillingInfo.vue
  6. 8
      yxt-as-ui/src/views/statement/deadStock/deadStock.vue
  7. 4
      yxt-as-ui/src/views/statement/doBusiness/businessAnalysisByFirst.vue
  8. 8
      yxt-as-ui/src/views/statement/doBusiness/businessAnalysisBySecond.vue
  9. 8
      yxt-as-ui/src/views/statement/doBusiness/businessSummary.vue
  10. 6
      yxt-as-ui/src/views/statement/doBusiness/operatingDetail.vue
  11. 317
      yxt-as-ui/src/views/statement/inventory/maintenanceCommissionDetails.vue
  12. 215
      yxt-as-ui/src/views/statement/inventory/performanceSummary.vue
  13. 302
      yxt-as-ui/src/views/statement/inventory/salesCommissionDetails.vue
  14. 293
      yxt-as-ui/src/views/statement/mountings/accessoryDetail.vue
  15. 229
      yxt-as-ui/src/views/statement/mountings/partsSummary.vue
  16. 2
      yxt-as-ui/src/views/workFlow/suopeikaipiaoFlow/claimbillingDaiBan.vue
  17. 2
      yxt-as-ui/src/views/workFlow/suopeikaipiaoFlow/claimbillingEdit.vue
  18. 2
      yxt-as-ui/src/views/workFlow/suopeikaipiaoFlow/claimbillingYiBan.vue
  19. 30
      yxt-as/src/main/java/com/yxt/anrui/as/api/asbusrepairbill/report/BusinessSummaryQuery.java
  20. 108
      yxt-as/src/main/java/com/yxt/anrui/as/api/asbusrepairbill/report/BusinessSummaryVo.java
  21. 31
      yxt-as/src/main/java/com/yxt/anrui/as/api/asbusrepairbill/report/DebtBusinessQuery.java
  22. 70
      yxt-as/src/main/java/com/yxt/anrui/as/api/asbusrepairbill/report/DebtBusinessVo.java
  23. 30
      yxt-as/src/main/java/com/yxt/anrui/as/api/asbusrepairbill/report/OutInsuranceBusinessQuery.java
  24. 70
      yxt-as/src/main/java/com/yxt/anrui/as/api/asbusrepairbill/report/OutInsuranceBusinessVo.java
  25. 9
      yxt-as/src/main/java/com/yxt/anrui/as/biz/asbusrepairbill/AsBusrepairBillMapper.java
  26. 143
      yxt-as/src/main/java/com/yxt/anrui/as/biz/asbusrepairbill/AsBusrepairBillMapper.xml
  27. 30
      yxt-as/src/main/java/com/yxt/anrui/as/biz/asbusrepairbill/AsBusrepairBillRest.java
  28. 194
      yxt-as/src/main/java/com/yxt/anrui/as/biz/asbusrepairbill/AsBusrepairBillService.java

27
yxt-as-ui/src/api/statement/inventory.js

@ -9,5 +9,32 @@ export default {
data: params,
headers: { 'Content-Type': 'application/json' }
})
},
// 查询分页列表 -- 业绩提成汇总表
commissionSummary: function(params) {
return request({
url: '/as/v1/AsBusrepairBill/commissionSummary',
method: 'post',
data: params,
headers: { 'Content-Type': 'application/json' }
})
},
// 查询分页列表 -- 维修项目提成明细表
commissionSitem: function(params) {
return request({
url: '/as/v1/AsBusrepairBill/commissionSitem',
method: 'post',
data: params,
headers: { 'Content-Type': 'application/json' }
})
},
// 查询分页列表 -- 配件销售提成明细表
commissionGoods: function(params) {
return request({
url: '/as/v1/AsBusrepairBill/commissionGoods',
method: 'post',
data: params,
headers: { 'Content-Type': 'application/json' }
})
}
}

22
yxt-as-ui/src/api/statement/mountings.js

@ -0,0 +1,22 @@
import request from '@/utils/request'
export default {
// 查询分页列表 -- 业务汇总表
fittingsSummaryRecord: function(params) {
return request({
url: '/wms/apiadmin/inventory/wmsinventory/fittingsSummaryRecord',
method: 'post',
data: params,
headers: { 'Content-Type': 'application/json' }
})
},
// 查询分页列表 -- 业务明细表
fittingsStorageRecord: function(params) {
return request({
url: '/as/v1/AsBusrepairBill/fittingsStorageRecord',
method: 'post',
data: params,
headers: { 'Content-Type': 'application/json' }
})
}
}

77
yxt-as-ui/src/router/index.js

@ -846,7 +846,7 @@ export const constantRoutes = [{
}
},
{
path: '/doBusiness/businessSummary',
path: '/doBusiness/businessAnalysisByFirst',
component: () => import('@/views/statement/doBusiness/businessAnalysisByFirst'),
name: 'BusinessAnalysisByFirst',
meta: {
@ -880,6 +880,24 @@ export const constantRoutes = [{
title: '库存查询',
noCache: true
}
},
{
path: '/mountings/accessoryDetail',
component: () => import('@/views/statement/mountings/accessoryDetail'),
name: 'AccessoryDetail',
meta: {
title: '配件出入库明细',
noCache: true
}
},
{
path: '/mountings/partsSummary',
component: () => import('@/views/statement/mountings/partsSummary'),
name: 'PartsSummary',
meta: {
title: '配件出入库汇总',
noCache: true
}
}
]
},
@ -1459,23 +1477,23 @@ export const constantRoutes = [{
// 调拨(一级站内) -- 编辑
{
path: '/adjustmentFlow/aodjustmentEdit',
path: '/allocationFlow/allocationEdit',
component: () =>
import('@/views/workFlow/adjustmentFlow/adjustmentEdit.vue'),
import('@/views/workFlow/allocationFlow/allocationEdit.vue'),
name: 'AdjustmentEdit'
},
// 调拨(一级站内) -- 待办
{
path: '/adjustmentFlow/adjustmentDaiBan',
path: '/allocationFlow/allocationDaiBan',
component: () =>
import('@/views/workFlow/adjustmentFlow/adjustmentDaiBan.vue'),
import('@/views/workFlow/allocationFlow/allocationDaiBan.vue'),
name: 'AdjustmentDaiBan'
},
// 调拨(一级站内) -- 已办
{
path: '/adjustmentFlow/adjustmentYiBan',
path: '/allocationFlow/allocationYiBan',
component: () =>
import('@/views/workFlow/adjustmentFlow/adjustmentYiBan.vue'),
import('@/views/workFlow/allocationFlow/allocationYiBan.vue'),
name: 'AdjustmentYiBan'
},
@ -1574,6 +1592,51 @@ export const constantRoutes = [{
name: 'StocktakingLossYiBan'
},
// 旧件盘盈入库 -- 编辑
{
path: '/oldpPartStocktakingSurplusFlow/oldpPartStocktakingSurplusEdit',
component: () =>
import('@/views/workFlow/oldpPartStocktakingSurplusFlow/oldpPartStocktakingSurplusEdit.vue'),
name: 'OldpPartStocktakingSurplusEdit'
},
// 旧件盘盈入库 -- 待办
{
path: '/oldpPartStocktakingSurplusFlow/oldpPartStocktakingSurplusDaiBan',
component: () =>
import('@/views/workFlow/oldpPartStocktakingSurplusFlow/oldpPartStocktakingSurplusDaiBan.vue'),
name: 'OldpPartStocktakingSurplusDaiBan'
},
// 旧件盘盈入库 -- 已办
{
path: '/oldpPartStocktakingSurplusFlow/oldpPartStocktakingSurplusYiBan',
component: () =>
import('@/views/workFlow/oldpPartStocktakingSurplusFlow/oldpPartStocktakingSurplusYiBan.vue'),
name: 'OldpPartStocktakingSurplusYiBan'
},
// 旧件盘亏出库 -- 编辑
{
path: '/oldpPartStocktakingLossFlow/oldpPartStocktakingLossEdit',
component: () =>
import('@/views/workFlow/oldpPartStocktakingLossFlow/oldpPartStocktakingLossEdit.vue'),
name: 'OldpPartStocktakingLossEdit'
},
// 旧件盘亏出库 -- 待办
{
path: '/oldpPartStocktakingLossFlow/oldpPartStocktakingLossDaiBan',
component: () =>
import('@/views/workFlow/oldpPartStocktakingLossFlow/oldpPartStocktakingLossDaiBan.vue'),
name: 'OldpPartStocktakingLossDaiBan'
},
// 旧件盘亏出库 -- 已办
{
path: '/oldpPartStocktakingLossFlow/oldpPartStocktakingLossYiBan',
component: () =>
import('@/views/workFlow/oldpPartStocktakingLossFlow/oldpPartStocktakingLossYiBan.vue'),
name: 'OldpPartStocktakingLossYiBan'
},
// 404 page must be placed at the end !!!

2
yxt-as-ui/src/views/operation/claimbilling/claimbillingAdd.vue

@ -330,7 +330,7 @@ export default {
//
let cell = ''
if (!row.isUnanimous) {
cell = 'background: #ff6961;'
cell = 'color: #ff6961;'
return cell
}
},

2
yxt-as-ui/src/views/operation/claimbilling/claimbillingInfo.vue

@ -129,7 +129,7 @@ export default {
//
let cell = ''
if (!row.isUnanimous) {
cell = 'background: #ff6961;'
cell = 'color: #ff6961;'
return cell
}
},

8
yxt-as-ui/src/views/statement/deadStock/deadStock.vue

@ -52,10 +52,10 @@
<el-table-column prop="supplierName" label="供应商" align="center" min-width="100" />
<el-table-column prop="billState" label="库存数量" align="center" width="100" />
<el-table-column prop="inventoryAge" label="最长库龄" align="center" width="100" />
<el-table-column prop="salesTime" label="最近一次销售时间" align="center" width="100" />
<el-table-column prop="noSalesDays" label="未销售天数" align="center" width="100" />
<el-table-column prop="storageTime" label="最近一次入库时间" align="center" width="100" />
<el-table-column prop="avgPrice" label="平均成本单价" align="center" width="100" />
<el-table-column prop="salesTime" label="最近一次销售时间" align="center" width="160" />
<el-table-column prop="noSalesDays" label="未销售天数" align="center" width="120" />
<el-table-column prop="storageTime" label="最近一次入库时间" align="center" width="160" />
<el-table-column prop="avgPrice" label="平均成本单价" align="center" width="140" />
<el-table-column prop="totalCost" label="成本合计" align="center" width="100" />
</el-table>
</div>

4
yxt-as-ui/src/views/statement/doBusiness/businessAnalysisByFirst.vue

@ -36,11 +36,11 @@
<el-table-column fixed label="序号" type="index" width="80" :index="indexMethod" align="center"/>
<el-table-column prop="useOrgName" label="所属公司" align="center" min-width="130" />
<el-table-column prop="deptName" label="所属门店" align="center" min-width="100" />
<el-table-column prop="billType" label="维修单类型" align="center" width="100" />
<el-table-column prop="billType" label="维修单类型" align="center" width="120" />
<el-table-column prop="hourAmount" label="工时费" align="center" width="100" />
<el-table-column prop="goodsAmount" label="材料费" align="center" min-width="100" />
<el-table-column prop="addAmount" label="附加费" align="center" min-width="100" />
<el-table-column prop="otherAmount" label="其他附加费" align="center" width="100" />
<el-table-column prop="otherAmount" label="其他附加费" align="center" width="120" />
<el-table-column prop="totalAmount" label="收入合计" align="center" width="100" />
<el-table-column prop="hourAmountCost" label="工时成本" align="center" width="100" />
<el-table-column prop="goodsAmountCost" label="材料成本" align="center" width="100" />

8
yxt-as-ui/src/views/statement/doBusiness/businessAnalysisBySecond.vue

@ -36,19 +36,19 @@
<el-table-column fixed label="序号" type="index" width="80" :index="indexMethod" align="center"/>
<el-table-column prop="useOrgName" label="所属公司" align="center" min-width="130" />
<el-table-column prop="deptName" label="所属门店" align="center" min-width="100" />
<el-table-column prop="billType" label="维修单类型" align="center" width="100" />
<el-table-column prop="billType" label="维修单类型" align="center" width="120" />
<el-table-column prop="hourAmount" label="工时费" align="center" width="100" />
<el-table-column prop="goodsAmount" label="材料费" align="center" min-width="100" />
<el-table-column prop="addAmount" label="附加费" align="center" min-width="100" />
<el-table-column prop="otherAmount" label="其他附加费" align="center" width="100" />
<el-table-column prop="otherAmount" label="其他附加费" align="center" width="120" />
<el-table-column prop="totalAmount" label="应收合计" align="center" width="100" />
<el-table-column prop="hourAmountCost" label="工时成本" align="center" width="100" />
<el-table-column prop="goodsAmountCost" label="材料成本" align="center" width="100" />
<el-table-column prop="otherAmountCost" label="附加成本" align="center" width="100" />
<el-table-column prop="totalCost" label="成本合计" align="center" width="100" />
<el-table-column prop="billNum" label="单数" align="center" width="100" />
<el-table-column prop="debtNum" label="当前欠款单数" align="center" width="100" />
<el-table-column prop="debtAmount" label="当前欠款金额" align="center" width="100" />
<el-table-column prop="debtNum" label="当前欠款单数" align="center" width="140" />
<el-table-column prop="debtAmount" label="当前欠款金额" align="center" width="140" />
</el-table>
</div>
<!--End 主页面主要部分-->

8
yxt-as-ui/src/views/statement/doBusiness/businessSummary.vue

@ -42,21 +42,21 @@
<el-table-column prop="hourAmount" label="工时" align="center" min-width="100" />
<el-table-column prop="goodsAmount" label="材料" align="center" width="100" />
<el-table-column prop="addAmount" label="附加项目" align="center" width="100" />
<el-table-column prop="otherAmountCost" label="其他附加项目" align="center" width="100" />
<el-table-column prop="otherAmountCost" label="其他附加项目" align="center" width="140" />
<el-table-column prop="backAmount" label="退货" align="center" width="100" />
<el-table-column prop="cost" label="成本" align="center" width="100" />
<el-table-column prop="hourAmountCost" label="工时成本" align="center" width="100" />
<el-table-column prop="goodsAmountCost" label="材料成本" align="center" width="100" />
<el-table-column prop="otherAmountCost" label="其他附加项目成本" align="center" width="100" />
<el-table-column prop="otherAmountCost" label="其他附加项目成本" align="center" width="160" />
<el-table-column prop="grossProfit" label="毛利润" align="center" width="100" />
<el-table-column prop="packsReceivable" label="三包应收" align="center" width="100" />
<el-table-column prop="packsHourAmount" label="三包工时" align="center" width="100" />
<el-table-column prop="packsGoodsAmount" label="三包用料" align="center" width="100" />
<el-table-column prop="packsOtherAmount" label="三包(包含其他附加)" align="center" width="100" />
<el-table-column prop="packsOtherAmount" label="三包(包含其他附加)" align="center" width="180" />
<el-table-column prop="outReceivable" label="保外应收" align="center" width="100" />
<el-table-column prop="outHourAmount" label="保外工时" align="center" width="100" />
<el-table-column prop="outGoodsAmount" label="保外用料" align="center" width="100" />
<el-table-column prop="outOtherAmount" label="保外附加(包含其他附加)" align="center" width="100" />
<el-table-column prop="outOtherAmount" label="保外附加(包含其他附加)" align="center" width="200" />
</el-table>
</div>
<!--End 主页面主要部分-->

6
yxt-as-ui/src/views/statement/doBusiness/operatingDetail.vue

@ -79,7 +79,7 @@
<el-table-column prop="finishTime" label="竣工时间" align="center" min-width="100" />
<el-table-column prop="settleTime" label="结算时间" align="center" min-width="100" />
<el-table-column prop="busType" label="单据类型" align="center" width="100" />
<el-table-column prop="billType" label="维修单类型" align="center" width="100" />
<el-table-column prop="billType" label="维修单类型" align="center" width="120" />
<el-table-column prop="subject" label="维修科目" align="center" width="100" />
<el-table-column prop="customerName" label="客户" align="center" width="100" />
<el-table-column prop="vehMark" label="车牌号" align="center" width="100" />
@ -92,11 +92,11 @@
<el-table-column prop="costTotal" label="成本" align="center" width="100" />
<el-table-column prop="hourAmountCost" label="工时成本" align="center" width="100" />
<el-table-column prop="goodsAmountCost" label="材料成本" align="center" width="100" />
<el-table-column prop="otherAmountCost" label="其他附加项目成本" align="center" width="100" />
<el-table-column prop="otherAmountCost" label="其他附加项目成本" align="center" width="160" />
<el-table-column prop="profit" label="利润" align="center" width="100" />
<el-table-column prop="receivedAmount" label="已交款" align="center" width="100" />
<el-table-column prop="debt" label="欠款" align="center" width="100" />
<el-table-column prop="paymentDate" label="承诺回款日期" align="center" width="100" />
<el-table-column prop="paymentDate" label="承诺回款日期" align="center" width="140" />
<el-table-column prop="overDueDays" label="超期天数" align="center" width="100" />
<el-table-column prop="dockingPeople" label="对接人" align="center" width="100" />
<el-table-column prop="waitorName" label="服务顾问" align="center" width="100" />

317
yxt-as-ui/src/views/statement/inventory/maintenanceCommissionDetails.vue

@ -0,0 +1,317 @@
<template>
<div class="app-container">
<!--列表页面-->
<div v-show="viewState == 1">
<button-bar view-title="配件销售提成明细" ref="btnbar" :btndisabled="btndisabled" @btnhandle="btnHandle"/>
<!--Start查询列表部分-->
<div class="main-content">
<div class="searchcon">
<el-button size="small" class="searchbtn" @click="clicksearchShow">{{ searchxianshitit }}</el-button>
<div v-show="isSearchShow" class="search">
<el-form ref="listQueryform" :inline="true" :model="listQuery" label-width="100px" class="tab-header">
<el-form-item label="姓名">
<el-input v-model="listQuery.params.name" placeholder="" clearable/>
</el-form-item>
<el-form-item label="岗位">
<el-input v-model="listQuery.params.postName" placeholder="" clearable/>
</el-form-item>
<el-form-item label="科目">
<el-input v-model="listQuery.params.subject" placeholder="" clearable/>
</el-form-item>
<el-form-item label="工种">
<el-input v-model="listQuery.params.serviceType" placeholder="" clearable/>
</el-form-item>
<el-form-item label="服务项目">
<el-input v-model="listQuery.params.serviceItem" placeholder="" clearable/>
</el-form-item>
<el-form-item label="提成方式">
<el-input v-model="listQuery.params.commissionWay" placeholder="" clearable/>
</el-form-item>
<el-form-item label="业绩类型">
<el-input v-model="listQuery.params.resultsType" placeholder="" clearable/>
</el-form-item>
<el-form-item label="提成标准">
<el-input v-model="listQuery.params.commissionCriteria" placeholder="" clearable/>
</el-form-item>
<el-form-item label="商品类别">
<el-input v-model="listQuery.params.goodsType" placeholder="" clearable/>
</el-form-item>
<el-form-item label="商品名称">
<el-input v-model="listQuery.params.goodsSpuName" placeholder="" clearable/>
</el-form-item>
<el-form-item label="图号">
<el-input v-model="listQuery.params.goodsSkuCode" placeholder="" clearable/>
</el-form-item>
<el-form-item label="车牌号">
<el-input v-model="listQuery.params.vehMark" placeholder="" clearable/>
</el-form-item>
<el-form-item label="车架号">
<el-input v-model="listQuery.params.vinNo" placeholder="" clearable/>
</el-form-item>
<el-form-item label="维修单号/销售单号">
<el-input v-model="listQuery.params.billNo" placeholder="" clearable/>
</el-form-item>
<el-form-item label="单据状态">
<el-input v-model="listQuery.params.billState" placeholder="" clearable/>
</el-form-item>
<el-form-item label="服务站">
<el-input v-model="listQuery.params.deptName" placeholder="" clearable/>
</el-form-item>
<el-form-item label="开单时间">
<el-date-picker v-model="listQuery.params.createStartTime" value-format="yyyy-MM-dd" format="yyyy-MM-dd" type="date" placeholder="选择日期"></el-date-picker>
<span style="padding: 0 8px"></span>
<el-date-picker v-model="listQuery.params.createEndTime" value-format="yyyy-MM-dd" format="yyyy-MM-dd" type="date" placeholder="选择日期"></el-date-picker>
</el-form-item>
<el-form-item label="派工时间">
<el-date-picker v-model="listQuery.params.dispatchStartTime" value-format="yyyy-MM-dd" format="yyyy-MM-dd" type="date" placeholder="选择日期"></el-date-picker>
<span style="padding: 0 8px"></span>
<el-date-picker v-model="listQuery.params.dispatchEndTime" value-format="yyyy-MM-dd" format="yyyy-MM-dd" type="date" placeholder="选择日期"></el-date-picker>
</el-form-item>
<el-form-item label="竣工时间">
<el-date-picker v-model="listQuery.params.finishStartTime" value-format="yyyy-MM-dd" format="yyyy-MM-dd" type="date" placeholder="选择日期"></el-date-picker>
<span style="padding: 0 8px"></span>
<el-date-picker v-model="listQuery.params.finishEndTime" value-format="yyyy-MM-dd" format="yyyy-MM-dd" type="date" placeholder="选择日期"></el-date-picker>
</el-form-item>
<el-form-item label="结算时间">
<el-date-picker v-model="listQuery.params.settleStartTime" value-format="yyyy-MM-dd" format="yyyy-MM-dd" type="date" placeholder="选择日期"></el-date-picker>
<span style="padding: 0 8px"></span>
<el-date-picker v-model="listQuery.params.settleEndTime" value-format="yyyy-MM-dd" format="yyyy-MM-dd" type="date" placeholder="选择日期"></el-date-picker>
</el-form-item>
</el-form>
<div class="btn" style="text-align: center;">
<el-button type="primary" icon="el-icon-search" size="small" @click="handleFilter">查询</el-button>
<el-button type="primary" icon="el-icon-refresh" size="small" @click="handleReset">重置</el-button>
</div>
</div>
</div>
<!--End查询列表部分-->
<div class="listtop">
<div class="tit">配件销售提成明细</div>
<pageye v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/>
</div>
<!--Start 主页面主要部分 -->
<div class="">
<el-table :key="tableKey" v-loading="listLoading" :data="list" border style="width: 100%;" @selection-change="handleSelectionChange">
<el-table-column fixed type="selection" align="center" width="50"/>
<el-table-column fixed label="序号" type="index" width="80" :index="indexMethod" align="center"/>
<el-table-column prop="name" label="姓名" align="center" min-width="130" />
<el-table-column prop="postName" label="岗位" align="center" min-width="100" />
<el-table-column prop="subject" label="科目" align="center" width="100" />
<el-table-column prop="commissionWay" label="提成方式" align="center" width="100" />
<el-table-column prop="resultsType" label="业绩类型" align="center" min-width="100" />
<el-table-column prop="commissionCriteria" label="提成标准" align="center" min-width="100" />
<el-table-column prop="profitResults" label="利润业绩" align="center" width="100" />
<el-table-column prop="commission" label="提成" align="center" width="100" />
<el-table-column prop="goodsType" label="商品类别" align="center" width="100" />
<el-table-column prop="goodsSpuName" label="商品名称" align="center" width="100" />
<el-table-column prop="goodsSkuCode" label="图号" align="center" width="100" />
<el-table-column prop="cost" label="成本单价" align="center" width="100" />
<el-table-column prop="price" label="销售单价" align="center" width="100" />
<el-table-column prop="count" label="数量" align="center" width="100" />
<el-table-column prop="profit" label="利润" align="center" width="100" />
<el-table-column prop="vehMark" label="车牌号" align="center" width="100" />
<el-table-column prop="vinNo" label="车架号" align="center" width="100" />
<el-table-column prop="customerName" label="客户" align="center" width="100" />
<el-table-column prop="billNo" label="维修单号/销售单号" align="center" width="100" />
<el-table-column prop="createTime" label="创建时间" align="center" width="100" />
<el-table-column prop="dispatchTime" label="派工时间" align="center" width="100" />
<el-table-column prop="finishTime" label="竣工时间" align="center" width="100" />
<el-table-column prop="settleTime" label="结算时间" align="center" width="100" />
<el-table-column prop="nodeName" label="单据环节" align="center" width="100" />
<el-table-column prop="deptName" label="服务站" align="center" width="100" />
</el-table>
</div>
<!--End 主页面主要部分-->
<div class="pages">
<div class="tit"/>
<!-- 翻页 -->
<pagination v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/>
</div>
<!--End查询列表部分-->
</div>
</div>
</div>
</template>
<script>
import Pagination from '@/components/pagination'
import pageye from '@/components/pagination/pageye'
import ButtonBar from '@/components/ButtonBar'
import req from '@/api/statement/inventory'
export default {
name: 'Inventory',
components: {
Pagination,
pageye,
ButtonBar
},
data() {
return {
btndisabled: false,
btnList: [
{
type: 'info',
size: 'small',
icon: 'cross',
btnKey: 'doClose',
btnLabel: '关闭'
}
],
isSearchShow: false,
searchxianshitit: '显示查询条件',
viewState: 1, // 1 2 3 4
tableKey: 0,
list: [],
sids: [], // SIDs
FormLoading: false,
listLoading: false,
//
listQuery: {
current: 1,
size: 5,
total: 0,
params: {
createStartTime: '',
createEndTime: '',
dispatchStartTime: '',
dispatchEndTime: '',
finishStartTime: '',
finishEndTime: '',
settleStartTime: '',
settleEndTime: '',
name: '',
postName: '',
subject: '',
serviceType: '',
serviceItem: '',
commissionWay: '',
resultsType: '',
commissionCriteria: '',
assignmentCriteria: '',
goodsType: '',
goodsSpuName: '',
goodsSkuCode: '',
vinNo: '',
vehMark: '',
billNo: '',
billState: '',
deptName: '',
userSid: '',
orgPath: '',
menuUrl: ''
}
}
}
},
created() {
//
this.getList()
},
mounted() {
this.$refs['btnbar'].setButtonList(this.btnList)
},
methods: {
//
clicksearchShow() {
this.isSearchShow = !this.isSearchShow
if (this.isSearchShow) {
this.searchxianshitit = '隐藏查询条件'
} else {
this.searchxianshitit = '显示查询条件'
}
},
btnHandle(btnKey) {
console.log('XXXXXXXXXXXXXXX ' + btnKey)
switch (btnKey) {
case 'doClose':
this.doClose()
break
default:
break
}
},
// sid
handleSelectionChange(row) {
const aa = []
row.forEach(element => {
aa.push(element.sid)
})
this.sids = aa
},
//
indexMethod(index) {
var pagestart = (this.listQuery.current - 1) * this.listQuery.size
var pageindex = index + 1 + pagestart
return pageindex
},
//
getList() {
this.listLoading = true
this.listQuery.params.userSid = window.sessionStorage.getItem('userSid')
this.listQuery.params.orgPath = window.sessionStorage.getItem('defaultOrgPath')
this.listQuery.params.menuUrl = this.$route.path
req.commissionGoods(this.listQuery).then((response) => {
this.listLoading = false
if (response.success) {
this.list = response.data.records
this.listQuery.total = response.data.total
} else {
this.list = []
this.listQuery.total = 0
}
})
},
//
handleFilter() {
this.listQuery.current = 1
this.getList()
},
//
handleReset() {
this.listQuery = {
current: 1,
size: 5,
total: 0,
params: {
createStartTime: '',
createEndTime: '',
dispatchStartTime: '',
dispatchEndTime: '',
finishStartTime: '',
finishEndTime: '',
settleStartTime: '',
settleEndTime: '',
name: '',
postName: '',
subject: '',
serviceType: '',
serviceItem: '',
commissionWay: '',
resultsType: '',
commissionCriteria: '',
assignmentCriteria: '',
goodsType: '',
goodsSpuName: '',
goodsSkuCode: '',
vinNo: '',
vehMark: '',
billNo: '',
billState: '',
deptName: '',
userSid: '',
orgPath: '',
menuUrl: ''
}
}
this.getList()
},
doClose() {
this.$store.dispatch('tagsView/delView', this.$route)
this.$router.go(-1)
}
}
}
</script>
<style scoped>
</style>

215
yxt-as-ui/src/views/statement/inventory/performanceSummary.vue

@ -0,0 +1,215 @@
<template>
<div class="app-container">
<!--列表页面-->
<div v-show="viewState == 1">
<button-bar view-title="业绩提成汇总表" ref="btnbar" :btndisabled="btndisabled" @btnhandle="btnHandle"/>
<!--Start查询列表部分-->
<div class="main-content">
<div class="searchcon">
<el-button size="small" class="searchbtn" @click="clicksearchShow">{{ searchxianshitit }}</el-button>
<div v-show="isSearchShow" class="search">
<el-form ref="listQueryform" :inline="true" :model="listQuery" label-width="100px" class="tab-header">
<el-form-item label="姓名">
<el-input v-model="listQuery.params.name" placeholder="" clearable/>
</el-form-item>
<el-form-item label="图号">
<el-input v-model="listQuery.params.goodsSkuCode" placeholder="" clearable/>
</el-form-item>
<el-form-item label="岗位">
<el-input v-model="listQuery.params.postName" placeholder="" clearable/>
</el-form-item>
<el-form-item label="基本工资">
<el-input v-model="listQuery.params.baseSalary" placeholder="" clearable/>
</el-form-item>
<el-form-item label="服务站">
<el-input v-model="listQuery.params.deptName" placeholder="" clearable/>
</el-form-item>
<el-form-item label="结算时间">
<el-date-picker v-model="listQuery.params.settleStartTime" value-format="yyyy-MM-dd" format="yyyy-MM-dd" type="date" placeholder="选择日期"></el-date-picker>
<span style="padding: 0 8px"></span>
<el-date-picker v-model="listQuery.params.settleEndTime" value-format="yyyy-MM-dd" format="yyyy-MM-dd" type="date" placeholder="选择日期"></el-date-picker>
</el-form-item>
</el-form>
<div class="btn" style="text-align: center;">
<el-button type="primary" icon="el-icon-search" size="small" @click="handleFilter">查询</el-button>
<el-button type="primary" icon="el-icon-refresh" size="small" @click="handleReset">重置</el-button>
</div>
</div>
</div>
<!--End查询列表部分-->
<div class="listtop">
<div class="tit">业绩提成汇总表</div>
<pageye v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/>
</div>
<!--Start 主页面主要部分 -->
<div class="">
<el-table :key="tableKey" v-loading="listLoading" :data="list" border style="width: 100%;" @selection-change="handleSelectionChange">
<el-table-column fixed type="selection" align="center" width="50"/>
<el-table-column fixed label="序号" type="index" width="80" :index="indexMethod" align="center"/>
<el-table-column prop="name" label="姓名" align="center" min-width="130" />
<el-table-column prop="postName" label="岗位" align="center" min-width="100" />
<el-table-column prop="baseSalary" label="基本工资" align="center" width="100" />
<el-table-column prop="sitemResults" label="维修项目业绩" align="center" width="100" />
<el-table-column prop="sitemCommission" label="维修项目提成" align="center" min-width="100" />
<el-table-column prop="goodsSalesResults" label="配件销售业绩" align="center" min-width="100" />
<el-table-column prop="goodsCost" label="配件成本" align="center" width="100" />
<el-table-column prop="goodsSalesCommission" label="配件销售提成" align="center" width="120" />
<el-table-column prop="commissionTotal" label="提成合计" align="center" width="100" />
<el-table-column prop="salaryCommissionTotal" label="工资提成合计" align="center" width="120" />
<el-table-column prop="deptName" label="服务站" align="center" width="100" />
</el-table>
</div>
<!--End 主页面主要部分-->
<div class="pages">
<div class="tit"/>
<!-- 翻页 -->
<pagination v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/>
</div>
<!--End查询列表部分-->
</div>
</div>
</div>
</template>
<script>
import Pagination from '@/components/pagination'
import pageye from '@/components/pagination/pageye'
import ButtonBar from '@/components/ButtonBar'
import req from '@/api/statement/inventory'
export default {
name: 'Inventory',
components: {
Pagination,
pageye,
ButtonBar
},
data() {
return {
btndisabled: false,
btnList: [
{
type: 'info',
size: 'small',
icon: 'cross',
btnKey: 'doClose',
btnLabel: '关闭'
}
],
isSearchShow: false,
searchxianshitit: '显示查询条件',
viewState: 1, // 1 2 3 4
tableKey: 0,
list: [],
sids: [], // SIDs
FormLoading: false,
listLoading: false,
//
listQuery: {
current: 1,
size: 5,
total: 0,
params: {
settleStartTime: '',
settleEndTime: '',
name: '',
postName: '',
baseSalary: '',
deptName: '',
userSid: '',
orgPath: '',
menuUrl: ''
}
}
}
},
created() {
//
this.getList()
},
mounted() {
this.$refs['btnbar'].setButtonList(this.btnList)
},
methods: {
//
clicksearchShow() {
this.isSearchShow = !this.isSearchShow
if (this.isSearchShow) {
this.searchxianshitit = '隐藏查询条件'
} else {
this.searchxianshitit = '显示查询条件'
}
},
btnHandle(btnKey) {
console.log('XXXXXXXXXXXXXXX ' + btnKey)
switch (btnKey) {
case 'doClose':
this.doClose()
break
default:
break
}
},
// sid
handleSelectionChange(row) {
const aa = []
row.forEach(element => {
aa.push(element.sid)
})
this.sids = aa
},
//
indexMethod(index) {
var pagestart = (this.listQuery.current - 1) * this.listQuery.size
var pageindex = index + 1 + pagestart
return pageindex
},
//
getList() {
this.listLoading = true
this.listQuery.params.orgPath = window.sessionStorage.getItem('defaultOrgPath')
req.commissionSummary(this.listQuery).then((response) => {
this.listLoading = false
if (response.success) {
this.list = response.data.records
this.listQuery.total = response.data.total
} else {
this.list = []
this.listQuery.total = 0
}
})
},
//
handleFilter() {
this.listQuery.current = 1
this.getList()
},
//
handleReset() {
this.listQuery = {
current: 1,
size: 5,
total: 0,
params: {
settleStartTime: '',
settleEndTime: '',
name: '',
postName: '',
baseSalary: '',
deptName: '',
userSid: '',
orgPath: '',
menuUrl: ''
}
}
this.getList()
},
doClose() {
this.$store.dispatch('tagsView/delView', this.$route)
this.$router.go(-1)
}
}
}
</script>
<style scoped>
</style>

302
yxt-as-ui/src/views/statement/inventory/salesCommissionDetails.vue

@ -0,0 +1,302 @@
<template>
<div class="app-container">
<!--列表页面-->
<div v-show="viewState == 1">
<button-bar view-title="维修项目提成明细" ref="btnbar" :btndisabled="btndisabled" @btnhandle="btnHandle"/>
<!--Start查询列表部分-->
<div class="main-content">
<div class="searchcon">
<el-button size="small" class="searchbtn" @click="clicksearchShow">{{ searchxianshitit }}</el-button>
<div v-show="isSearchShow" class="search">
<el-form ref="listQueryform" :inline="true" :model="listQuery" label-width="100px" class="tab-header">
<el-form-item label="姓名">
<el-input v-model="listQuery.params.name" placeholder="" clearable/>
</el-form-item>
<el-form-item label="岗位">
<el-input v-model="listQuery.params.postName" placeholder="" clearable/>
</el-form-item>
<el-form-item label="科目">
<el-input v-model="listQuery.params.subject" placeholder="" clearable/>
</el-form-item>
<el-form-item label="工种">
<el-input v-model="listQuery.params.serviceType" placeholder="" clearable/>
</el-form-item>
<el-form-item label="服务项目">
<el-input v-model="listQuery.params.serviceItem" placeholder="" clearable/>
</el-form-item>
<el-form-item label="提成方式">
<el-input v-model="listQuery.params.commissionWay" placeholder="" clearable/>
</el-form-item>
<el-form-item label="业绩类型">
<el-input v-model="listQuery.params.resultsType" placeholder="" clearable/>
</el-form-item>
<el-form-item label="提成标准">
<el-input v-model="listQuery.params.commissionCriteria" placeholder="" clearable/>
</el-form-item>
<el-form-item label="分配标准">
<el-input v-model="listQuery.params.assignmentCriteria" placeholder="" clearable/>
</el-form-item>
<el-form-item label="车牌号">
<el-input v-model="listQuery.params.vehMark" placeholder="" clearable/>
</el-form-item>
<el-form-item label="车架号">
<el-input v-model="listQuery.params.vinNo" placeholder="" clearable/>
</el-form-item>
<el-form-item label="维修单号">
<el-input v-model="listQuery.params.billNo" placeholder="" clearable/>
</el-form-item>
<el-form-item label="单据状态">
<el-input v-model="listQuery.params.billState" placeholder="" clearable/>
</el-form-item>
<el-form-item label="服务站">
<el-input v-model="listQuery.params.deptName" placeholder="" clearable/>
</el-form-item>
<el-form-item label="开单时间">
<el-date-picker v-model="listQuery.params.createStartTime" value-format="yyyy-MM-dd" format="yyyy-MM-dd" type="date" placeholder="选择日期"></el-date-picker>
<span style="padding: 0 8px"></span>
<el-date-picker v-model="listQuery.params.createEndTime" value-format="yyyy-MM-dd" format="yyyy-MM-dd" type="date" placeholder="选择日期"></el-date-picker>
</el-form-item>
<el-form-item label="派工时间">
<el-date-picker v-model="listQuery.params.dispatchStartTime" value-format="yyyy-MM-dd" format="yyyy-MM-dd" type="date" placeholder="选择日期"></el-date-picker>
<span style="padding: 0 8px"></span>
<el-date-picker v-model="listQuery.params.dispatchEndTime" value-format="yyyy-MM-dd" format="yyyy-MM-dd" type="date" placeholder="选择日期"></el-date-picker>
</el-form-item>
<el-form-item label="竣工时间">
<el-date-picker v-model="listQuery.params.finishStartTime" value-format="yyyy-MM-dd" format="yyyy-MM-dd" type="date" placeholder="选择日期"></el-date-picker>
<span style="padding: 0 8px"></span>
<el-date-picker v-model="listQuery.params.finishEndTime" value-format="yyyy-MM-dd" format="yyyy-MM-dd" type="date" placeholder="选择日期"></el-date-picker>
</el-form-item>
<el-form-item label="结算时间">
<el-date-picker v-model="listQuery.params.settleStartTime" value-format="yyyy-MM-dd" format="yyyy-MM-dd" type="date" placeholder="选择日期"></el-date-picker>
<span style="padding: 0 8px"></span>
<el-date-picker v-model="listQuery.params.settleEndTime" value-format="yyyy-MM-dd" format="yyyy-MM-dd" type="date" placeholder="选择日期"></el-date-picker>
</el-form-item>
</el-form>
<div class="btn" style="text-align: center;">
<el-button type="primary" icon="el-icon-search" size="small" @click="handleFilter">查询</el-button>
<el-button type="primary" icon="el-icon-refresh" size="small" @click="handleReset">重置</el-button>
</div>
</div>
</div>
<!--End查询列表部分-->
<div class="listtop">
<div class="tit">维修项目提成明细</div>
<pageye v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/>
</div>
<!--Start 主页面主要部分 -->
<div class="">
<el-table :key="tableKey" v-loading="listLoading" :data="list" border style="width: 100%;" @selection-change="handleSelectionChange">
<el-table-column fixed type="selection" align="center" width="50"/>
<el-table-column fixed label="序号" type="index" width="80" :index="indexMethod" align="center"/>
<el-table-column prop="name" label="姓名" align="center" min-width="130" />
<el-table-column prop="postName" label="岗位" align="center" min-width="100" />
<el-table-column prop="subject" label="科目" align="center" width="100" />
<el-table-column prop="commissionWay" label="提成方式" align="center" width="100" />
<el-table-column prop="resultsType" label="业绩类型" align="center" min-width="100" />
<el-table-column prop="commissionCriteria" label="提成标准" align="center" min-width="100" />
<el-table-column prop="assignmentCriteria" label="分配标准" align="center" width="100" />
<el-table-column prop="results" label="业绩" align="center" width="100" />
<el-table-column prop="commission" label="提成" align="center" width="100" />
<el-table-column prop="serviceItem" label="服务项目" align="center" width="100" />
<el-table-column prop="serviceType" label="工种" align="center" width="100" />
<el-table-column prop="amount" label="工时费" align="center" width="100" />
<el-table-column prop="vehMark" label="车牌号" align="center" width="100" />
<el-table-column prop="vinNo" label="车架号" align="center" width="100" />
<el-table-column prop="customerName" label="客户" align="center" width="100" />
<el-table-column prop="billNo" label="维修单号" align="center" width="100" />
<el-table-column prop="createTime" label="创建时间" align="center" width="100" />
<el-table-column prop="dispatchTime" label="派工时间" align="center" width="100" />
<el-table-column prop="finishTime" label="竣工时间" align="center" width="100" />
<el-table-column prop="settleTime" label="结算时间" align="center" width="100" />
<el-table-column prop="nodeName" label="单据环节" align="center" width="100" />
<el-table-column prop="deptName" label="服务站" align="center" width="100" />
</el-table>
</div>
<!--End 主页面主要部分-->
<div class="pages">
<div class="tit"/>
<!-- 翻页 -->
<pagination v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/>
</div>
<!--End查询列表部分-->
</div>
</div>
</div>
</template>
<script>
import Pagination from '@/components/pagination'
import pageye from '@/components/pagination/pageye'
import ButtonBar from '@/components/ButtonBar'
import req from '@/api/statement/inventory'
export default {
name: 'Inventory',
components: {
Pagination,
pageye,
ButtonBar
},
data() {
return {
btndisabled: false,
btnList: [
{
type: 'info',
size: 'small',
icon: 'cross',
btnKey: 'doClose',
btnLabel: '关闭'
}
],
isSearchShow: false,
searchxianshitit: '显示查询条件',
viewState: 1, // 1 2 3 4
tableKey: 0,
list: [],
sids: [], // SIDs
FormLoading: false,
listLoading: false,
//
listQuery: {
current: 1,
size: 5,
total: 0,
params: {
createStartTime: '',
createEndTime: '',
dispatchStartTime: '',
dispatchEndTime: '',
finishStartTime: '',
finishEndTime: '',
settleStartTime: '',
settleEndTime: '',
name: '',
postName: '',
subject: '',
serviceType: '',
serviceItem: '',
commissionWay: '',
resultsType: '',
commissionCriteria: '',
assignmentCriteria: '',
vinNo: '',
vehMark: '',
billNo: '',
billState: '',
deptName: '',
userSid: '',
orgPath: '',
menuUrl: ''
}
}
}
},
created() {
//
this.getList()
},
mounted() {
this.$refs['btnbar'].setButtonList(this.btnList)
},
methods: {
//
clicksearchShow() {
this.isSearchShow = !this.isSearchShow
if (this.isSearchShow) {
this.searchxianshitit = '隐藏查询条件'
} else {
this.searchxianshitit = '显示查询条件'
}
},
btnHandle(btnKey) {
console.log('XXXXXXXXXXXXXXX ' + btnKey)
switch (btnKey) {
case 'doClose':
this.doClose()
break
default:
break
}
},
// sid
handleSelectionChange(row) {
const aa = []
row.forEach(element => {
aa.push(element.sid)
})
this.sids = aa
},
//
indexMethod(index) {
var pagestart = (this.listQuery.current - 1) * this.listQuery.size
var pageindex = index + 1 + pagestart
return pageindex
},
//
getList() {
this.listLoading = true
this.listQuery.params.userSid = window.sessionStorage.getItem('userSid')
this.listQuery.params.orgPath = window.sessionStorage.getItem('defaultOrgPath')
this.listQuery.params.menuUrl = this.$route.path
req.commissionSitem(this.listQuery).then((response) => {
this.listLoading = false
if (response.success) {
this.list = response.data.records
this.listQuery.total = response.data.total
} else {
this.list = []
this.listQuery.total = 0
}
})
},
//
handleFilter() {
this.listQuery.current = 1
this.getList()
},
//
handleReset() {
this.listQuery = {
current: 1,
size: 5,
total: 0,
params: {
createStartTime: '',
createEndTime: '',
dispatchStartTime: '',
dispatchEndTime: '',
finishStartTime: '',
finishEndTime: '',
settleStartTime: '',
settleEndTime: '',
name: '',
postName: '',
subject: '',
serviceType: '',
serviceItem: '',
commissionWay: '',
resultsType: '',
commissionCriteria: '',
assignmentCriteria: '',
vinNo: '',
vehMark: '',
billNo: '',
billState: '',
deptName: '',
userSid: '',
orgPath: '',
menuUrl: ''
}
}
this.getList()
},
doClose() {
this.$store.dispatch('tagsView/delView', this.$route)
this.$router.go(-1)
}
}
}
</script>
<style scoped>
</style>

293
yxt-as-ui/src/views/statement/mountings/accessoryDetail.vue

@ -0,0 +1,293 @@
<template>
<div class="app-container">
<!--列表页面-->
<div v-show="viewState == 1">
<button-bar view-title="配件出入库明细查询" ref="btnbar" :btndisabled="btndisabled" @btnhandle="btnHandle"/>
<!--Start查询列表部分-->
<div class="main-content">
<div class="searchcon">
<el-button size="small" class="searchbtn" @click="clicksearchShow">{{ searchxianshitit }}</el-button>
<div v-show="isSearchShow" class="search">
<el-form ref="listQueryform" :inline="true" :model="listQuery" class="tab-header">
<el-form-item label="所属公司">
<el-input v-model="listQuery.params.useOrgName" placeholder="" clearable/>
</el-form-item>
<el-form-item label="所属门店">
<el-input v-model="listQuery.params.deptName" placeholder="" clearable/>
</el-form-item>
<el-form-item label="图号">
<el-input v-model="listQuery.params.goodsSkuCode" placeholder="" clearable/>
</el-form-item>
<el-form-item label="业务类型">
<el-input v-model="listQuery.params.busTypeValue" placeholder="" clearable/>
</el-form-item>
<el-form-item label="采购类别">
<el-input v-model="listQuery.params.purchaseTypeValue" placeholder="" clearable/>
</el-form-item>
<el-form-item label="配件所属品牌">
<el-input v-model="listQuery.params.brand" placeholder="" clearable/>
</el-form-item>
<el-form-item label="仓库">
<el-input v-model="listQuery.params.warehouseName" placeholder="" clearable/>
</el-form-item>
<el-form-item label="仓库">
<el-input v-model="listQuery.params.warehouseArea" placeholder="" clearable/>
</el-form-item>
<el-form-item label="库位">
<el-input v-model="listQuery.params.warehouseRackCode" placeholder="" clearable/>
</el-form-item>
<el-form-item label="供应商">
<el-input v-model="listQuery.params.supplierName" placeholder="" clearable/>
</el-form-item>
<el-form-item label="生产厂家">
<el-input v-model="listQuery.params.manufacturerName" placeholder="" clearable/>
</el-form-item>
<el-form-item label="服务顾问">
<el-input v-model="listQuery.params.waitorName" placeholder="" clearable/>
</el-form-item>
<el-form-item label="领料人">
<el-input v-model="listQuery.params.operName" placeholder="" clearable/>
</el-form-item>
</el-form>
<div class="btn" style="text-align: center;">
<el-button type="primary" icon="el-icon-search" size="small" @click="handleFilter">查询</el-button>
<el-button type="primary" icon="el-icon-search" size="small" @click="handleToday">本日</el-button>
<el-button type="primary" icon="el-icon-search" size="small" @click="handleCurrentMonth">本月</el-button>
<el-button type="primary" icon="el-icon-search" size="small" @click="handleCurrentYear">本年</el-button>
<el-button type="primary" icon="el-icon-refresh" size="small" @click="handleReset">重置</el-button>
</div>
</div>
</div>
<!--End查询列表部分-->
<div class="listtop">
<div class="tit">配件出入库明细表</div>
<pageye v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/>
</div>
<!--Start 主页面主要部分 -->
<div class="">
<el-table :key="tableKey" v-loading="listLoading" :data="list" border style="width: 100%;" @selection-change="handleSelectionChange">
<el-table-column fixed type="selection" align="center" width="50"/>
<el-table-column fixed label="序号" type="index" width="80" :index="indexMethod" align="center"/>
<el-table-column prop="useOrgName" label="所属公司" align="center" min-width="130" />
<el-table-column prop="deptName" label="所属门店" align="center" min-width="100" />
<el-table-column prop="goodsID" label="商品ID" align="center" width="100" />
<el-table-column prop="goodsSpuName" label="商品名称" align="center" width="100" />
<el-table-column prop="goodsSkuCode" label="图号" align="center" min-width="100" />
<el-table-column prop="supplierName" label="供应商" align="center" width="100" />
<el-table-column prop="manufacturerName" label="生产厂家" align="center" width="100" />
<el-table-column prop="busTypeValue" label="业务类型" align="center" min-width="100" />
<el-table-column prop="purchaseTypeValue" label="采购方式" align="center" width="100" />
<el-table-column prop="purchaseSubject" label="采购类别" align="center" width="100" />
<el-table-column prop="purchaseBillNo" label="采购单号" align="center" width="100" />
<el-table-column prop="brand" label="配件所属品牌" align="center" width="100" />
<el-table-column prop="manufacturersOrderTypeValue" label="厂家订单类型" align="center" width="100" />
<el-table-column prop="manufactorBillNo" label="厂家订单编号" align="center" width="100" />
<el-table-column prop="unit" label="单位" align="center" width="100" />
<el-table-column prop="purchaseFinishTime" label="采购审核日期" align="center" width="100" />
<el-table-column prop="warehouseName" label="仓库" align="center" width="100" />
<el-table-column prop="wareAreaName" label="库区" align="center" width="100" />
<el-table-column prop="warehouseRackCode" label="库位" align="center" width="100" />
<el-table-column prop="shClaimTypeValue" label="索赔类型" align="center" width="100" />
<el-table-column prop="billNo" label="单据编号" align="center" width="100" />
<el-table-column prop="settleTime" label="结算时间" align="center" width="100" />
<el-table-column prop="cost" label="入库单价" align="center" width="100" />
<el-table-column prop="outPrice" label="出库单价" align="center" width="100" />
<el-table-column prop="taxRate" label="税率" align="center" width="100" />
<el-table-column prop="price" label="销售单价" align="center" width="100" />
<el-table-column prop="InOutTime" label="出入库时间" align="center" width="100" />
<el-table-column prop="InOutCount" label="出入库数量" align="center" width="100" />
<el-table-column prop="costTotal" label="成本合计" align="center" width="100" />
<el-table-column prop="incomeTotal" label="收入合计" align="center" width="100" />
<el-table-column prop="profitsTotal" label="利润合计" align="center" width="100" />
<el-table-column prop="waitorName" label="服务顾问" align="center" width="100" />
<el-table-column prop="operName" label="领料人" align="center" width="100" />
<el-table-column prop="nowCount" label="当前库存数量" align="center" width="100" />
<el-table-column prop="nowMoney" label="当前库存金额" align="center" width="100" />
</el-table>
</div>
<!--End 主页面主要部分-->
<div class="pages">
<div class="tit"/>
<!-- 翻页 -->
<pagination v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/>
</div>
<!--End查询列表部分-->
</div>
</div>
</div>
</template>
<script>
import Pagination from '@/components/pagination'
import pageye from '@/components/pagination/pageye'
import ButtonBar from '@/components/ButtonBar'
import req from '@/api/statement/mountings'
export default {
name: 'AccessoryDetail',
components: {
Pagination,
pageye,
ButtonBar
},
data() {
return {
btndisabled: false,
btnList: [
{
type: 'info',
size: 'small',
icon: 'cross',
btnKey: 'doClose',
btnLabel: '关闭'
}
],
isSearchShow: false,
searchxianshitit: '显示查询条件',
viewState: 1, // 1 2 3 4
tableKey: 0,
list: [],
sids: [], // SIDs
FormLoading: false,
listLoading: false,
//
listQuery: {
current: 1,
size: 5,
total: 0,
params: {
useOrgName: '',
deptName: '',
billState: '',
dateType: '',
goodsSkuCode: '',
busTypeValue: '',
purchaseTypeValue: '',
brand: '',
warehouseName: '',
warehouseArea: '',
warehouseRackCode: '',
manufacturerName: '',
supplierName: '',
waitorName: '',
operName: '',
userSid: '',
orgPath: '',
menuUrl: ''
}
}
}
},
created() {
//
this.getList()
},
mounted() {
this.$refs['btnbar'].setButtonList(this.btnList)
},
methods: {
//
clicksearchShow() {
this.isSearchShow = !this.isSearchShow
if (this.isSearchShow) {
this.searchxianshitit = '隐藏查询条件'
} else {
this.searchxianshitit = '显示查询条件'
}
},
btnHandle(btnKey) {
console.log('XXXXXXXXXXXXXXX ' + btnKey)
switch (btnKey) {
case 'doClose':
this.doClose()
break
default:
break
}
},
// sid
handleSelectionChange(row) {
const aa = []
row.forEach(element => {
aa.push(element.sid)
})
this.sids = aa
},
//
indexMethod(index) {
var pagestart = (this.listQuery.current - 1) * this.listQuery.size
var pageindex = index + 1 + pagestart
return pageindex
},
//
getList() {
this.listLoading = true
this.listQuery.params.userSid = window.sessionStorage.getItem('userSid')
this.listQuery.params.orgPath = window.sessionStorage.getItem('defaultOrgPath')
this.listQuery.params.menuUrl = this.$route.path
req.fittingsStorageRecord(this.listQuery).then((response) => {
this.listLoading = false
if (response.success) {
this.list = response.data.records
this.listQuery.total = response.data.total
} else {
this.list = []
this.listQuery.total = 0
}
})
},
//
handleFilter() {
this.listQuery.current = 1
this.getList()
},
handleToday() {
this.listQuery.params.dateType = '1'
this.handleFilter()
},
handleCurrentMonth() {
this.listQuery.params.dateType = '2'
this.handleFilter()
},
handleCurrentYear() {
this.listQuery.params.dateType = '3'
this.handleFilter()
},
//
handleReset() {
this.listQuery = {
current: 1,
size: 5,
total: 0,
params: {
useOrgName: '',
deptName: '',
billState: '',
dateType: '',
goodsSkuCode: '',
busTypeValue: '',
purchaseTypeValue: '',
brand: '',
warehouseName: '',
warehouseArea: '',
warehouseRackCode: '',
manufacturerName: '',
supplierName: '',
waitorName: '',
operName: '',
userSid: '',
orgPath: '',
menuUrl: ''
}
}
this.getList()
},
doClose() {
this.$store.dispatch('tagsView/delView', this.$route)
this.$router.go(-1)
}
}
}
</script>
<style scoped>
</style>

229
yxt-as-ui/src/views/statement/mountings/partsSummary.vue

@ -0,0 +1,229 @@
<template>
<div class="app-container">
<!--列表页面-->
<div v-show="viewState == 1">
<button-bar view-title="配件出入库汇总查询" ref="btnbar" :btndisabled="btndisabled" @btnhandle="btnHandle"/>
<!--Start查询列表部分-->
<div class="main-content">
<div class="searchcon">
<el-button size="small" class="searchbtn" @click="clicksearchShow">{{ searchxianshitit }}</el-button>
<div v-show="isSearchShow" class="search">
<el-form ref="listQueryform" :inline="true" :model="listQuery" label-width="100px" class="tab-header">
<el-form-item label="业务类型">
<el-input v-model="listQuery.params.busTypeValue" placeholder="" clearable/>
</el-form-item>
<el-form-item label="商品类型">
<el-input v-model="listQuery.params.goodsType" placeholder="" clearable/>
</el-form-item>
<el-form-item label="图号">
<el-input v-model="listQuery.params.goodsSkuCode" placeholder="" clearable/>
</el-form-item>
<el-form-item label="仓库">
<el-input v-model="listQuery.params.warehouseName" placeholder="" clearable/>
</el-form-item>
</el-form>
<div class="btn" style="text-align: center;">
<el-button type="primary" icon="el-icon-search" size="small" @click="handleFilter">查询</el-button>
<el-button type="primary" icon="el-icon-search" size="small" @click="handleToday">本日</el-button>
<el-button type="primary" icon="el-icon-search" size="small" @click="handleCurrentMonth">本月</el-button>
<el-button type="primary" icon="el-icon-search" size="small" @click="handleCurrentYear">本年</el-button>
<el-button type="primary" icon="el-icon-refresh" size="small" @click="handleReset">重置</el-button>
</div>
</div>
</div>
<!--End查询列表部分-->
<div class="listtop">
<div class="tit">配件出入库汇总表</div>
<pageye v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/>
</div>
<!--Start 主页面主要部分 -->
<div class="">
<el-table :key="tableKey" v-loading="listLoading" :data="list" border style="width: 100%;" @selection-change="handleSelectionChange">
<el-table-column fixed type="selection" align="center" width="50"/>
<el-table-column fixed label="序号" type="index" width="80" :index="indexMethod" align="center"/>
<el-table-column prop="useOrgName" label="所属公司" align="center" min-width="130" />
<el-table-column prop="deptName" label="所属门店" align="center" min-width="100" />
<el-table-column prop="goodsSpuName" label="商品名称" align="center" width="100" />
<el-table-column prop="goodsSkuCode" label="图号" align="center" min-width="100" />
<el-table-column prop="supplierName" label="供应商" align="center" width="100" />
<el-table-column prop="manufacturerName" label="生产厂家" align="center" width="100" />
<el-table-column prop="goodsType" label="商品类型" align="center" min-width="100" />
<el-table-column prop="warehouseName" label="仓库" align="center" width="100" />
<el-table-column prop="wareAreaName" label="库区" align="center" width="100" />
<el-table-column prop="warehouseRackCode" label="库位" align="center" width="100" />
<el-table-column prop="unit" label="单位" align="center" width="100" />
<el-table-column prop="busTypeValue" label="业务类型" align="center" width="100" />
<el-table-column prop="inCount" label="入库数量" align="center" width="100" />
<el-table-column prop="inCostMoney" label="入库成本金额" align="center" width="100" />
<el-table-column prop="outCount" label="出库数量" align="center" width="100" />
<el-table-column prop="outCostMoney" label="出库成本金额" align="center" width="100" />
<el-table-column prop="nowCount" label="当前库存数量" align="center" width="100" />
<el-table-column prop="nowMoney" label="当前库存金额" align="center" width="100" />
</el-table>
</div>
<!--End 主页面主要部分-->
<div class="pages">
<div class="tit"/>
<!-- 翻页 -->
<pagination v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/>
</div>
<!--End查询列表部分-->
</div>
</div>
</div>
</template>
<script>
import Pagination from '@/components/pagination'
import pageye from '@/components/pagination/pageye'
import ButtonBar from '@/components/ButtonBar'
import req from '@/api/statement/mountings'
export default {
name: 'PartsSummary',
components: {
Pagination,
pageye,
ButtonBar
},
data() {
return {
btndisabled: false,
btnList: [
{
type: 'info',
size: 'small',
icon: 'cross',
btnKey: 'doClose',
btnLabel: '关闭'
}
],
isSearchShow: false,
searchxianshitit: '显示查询条件',
viewState: 1, // 1 2 3 4
tableKey: 0,
list: [],
sids: [], // SIDs
FormLoading: false,
listLoading: false,
//
listQuery: {
current: 1,
size: 5,
total: 0,
params: {
dateType: '',
goodsType: '',
busTypeValue: '',
goodsSkuCode: '',
warehouseName: '',
userSid: '',
orgPath: '',
menuUrl: ''
}
}
}
},
created() {
//
this.getList()
},
mounted() {
this.$refs['btnbar'].setButtonList(this.btnList)
},
methods: {
//
clicksearchShow() {
this.isSearchShow = !this.isSearchShow
if (this.isSearchShow) {
this.searchxianshitit = '隐藏查询条件'
} else {
this.searchxianshitit = '显示查询条件'
}
},
btnHandle(btnKey) {
console.log('XXXXXXXXXXXXXXX ' + btnKey)
switch (btnKey) {
case 'doClose':
this.doClose()
break
default:
break
}
},
// sid
handleSelectionChange(row) {
const aa = []
row.forEach(element => {
aa.push(element.sid)
})
this.sids = aa
},
//
indexMethod(index) {
var pagestart = (this.listQuery.current - 1) * this.listQuery.size
var pageindex = index + 1 + pagestart
return pageindex
},
//
getList() {
this.listLoading = true
this.listQuery.params.userSid = window.sessionStorage.getItem('userSid')
this.listQuery.params.orgPath = window.sessionStorage.getItem('defaultOrgPath')
this.listQuery.params.menuUrl = this.$route.path
req.fittingsSummaryRecord(this.listQuery).then((response) => {
this.listLoading = false
if (response.success) {
this.list = response.data.records
this.listQuery.total = response.data.total
} else {
this.list = []
this.listQuery.total = 0
}
})
},
//
handleFilter() {
this.listQuery.current = 1
this.getList()
},
handleToday() {
this.listQuery.params.dateType = '1'
this.handleFilter()
},
handleCurrentMonth() {
this.listQuery.params.dateType = '2'
this.handleFilter()
},
handleCurrentYear() {
this.listQuery.params.dateType = '3'
this.handleFilter()
},
//
handleReset() {
this.listQuery = {
current: 1,
size: 5,
total: 0,
params: {
dateType: '',
goodsType: '',
busTypeValue: '',
goodsSkuCode: '',
warehouseName: '',
userSid: '',
orgPath: '',
menuUrl: ''
}
}
this.getList()
},
doClose() {
this.$store.dispatch('tagsView/delView', this.$route)
this.$router.go(-1)
}
}
}
</script>
<style scoped>
</style>

2
yxt-as-ui/src/views/workFlow/suopeikaipiaoFlow/claimbillingDaiBan.vue

@ -240,7 +240,7 @@ export default {
//
let cell = ''
if (!row.isUnanimous) {
cell = 'background: #ff6961;'
cell = 'color: #ff6961;'
return cell
}
},

2
yxt-as-ui/src/views/workFlow/suopeikaipiaoFlow/claimbillingEdit.vue

@ -311,7 +311,7 @@ export default {
//
let cell = ''
if (!row.isUnanimous) {
cell = 'background: #ff6961;'
cell = 'color: #ff6961;'
return cell
}
},

2
yxt-as-ui/src/views/workFlow/suopeikaipiaoFlow/claimbillingYiBan.vue

@ -164,7 +164,7 @@ export default {
//
let cell = ''
if (!row.isUnanimous) {
cell = 'background: #ff6961;'
cell = 'color: #ff6961;'
return cell
}
},

30
yxt-as/src/main/java/com/yxt/anrui/as/api/asbusrepairbill/report/BusinessSummaryQuery.java

@ -0,0 +1,30 @@
package com.yxt.anrui.as.api.asbusrepairbill.report;
import com.yxt.common.core.query.Query;
import lombok.Data;
/**
* @author Fan
* @description
* @date 2024/11/8 8:59
*/
@Data
public class BusinessSummaryQuery implements Query {
/**
* 1本日2本月3本年
*/
private String dateType;
private String menuUrl;
private String orgPath;
/**
* 结算结束
*/
private String settleEndTime;
/**
* 结算开始
*/
private String settleStartTime;
private String userSid;
}

108
yxt-as/src/main/java/com/yxt/anrui/as/api/asbusrepairbill/report/BusinessSummaryVo.java

@ -0,0 +1,108 @@
package com.yxt.anrui.as.api.asbusrepairbill.report;
import com.yxt.common.core.vo.Vo;
import lombok.Data;
/**
* @author Fan
* @description
* @date 2024/11/8 8:59
*/
@Data
public class BusinessSummaryVo implements Vo {
/**
* 附加项目
*/
private String addAmount;
/**
* 退货
*/
private String backAmount;
/**
* 涉及单数
*/
private String billNum;
/**
* 成本
*/
private String cost;
/**
* 门店
*/
private String deptName;
/**
* 材料
*/
private String goodsAmount;
/**
* 材料成本
*/
private String goodsAmountCost;
/**
* 毛利润
*/
private String grossProfit;
/**
* 工时
*/
private String hourAmount;
/**
* 工时成本
*/
private String hourAmountCost;
/**
* 其他附件项目
*/
private String otherAmount;
/**
* 其他附加项目成本
*/
private String otherAmountCost;
/**
* 保外用料
*/
private String outGoodsAmount;
/**
* 保外工时
*/
private String outHourAmount;
/**
* 保外附加
*/
private String outOtherAmount;
/**
* 保外应收
*/
private String outReceivable;
/**
* 三包用料
*/
private String packsGoodsAmount;
/**
* 三包工时
*/
private String packsHourAmount;
/**
* 三包附加
*/
private String packsOtherAmount;
/**
* 三包应收
*/
private String packsReceivable;
/**
* 结算时间
*/
private String settleTime;
/**
* 营业额
*/
private String turnover;
/**
* 分公司
*/
private String useOrgName;
}

31
yxt-as/src/main/java/com/yxt/anrui/as/api/asbusrepairbill/report/DebtBusinessQuery.java

@ -0,0 +1,31 @@
package com.yxt.anrui.as.api.asbusrepairbill.report;
import com.yxt.common.core.query.Query;
import lombok.Data;
/**
* @author Fan
* @description
* @date 2024/11/8 11:21
*/
@Data
public class DebtBusinessQuery implements Query {
/**
* 1本日2本月3本年
*/
private String dateType;
private String menuUrl;
private String orgPath;
/**
* 结算结束
*/
private String settleEndTime;
/**
* 结算开始
*/
private String settleStartTime;
private String userSid;
}

70
yxt-as/src/main/java/com/yxt/anrui/as/api/asbusrepairbill/report/DebtBusinessVo.java

@ -0,0 +1,70 @@
package com.yxt.anrui.as.api.asbusrepairbill.report;
import com.yxt.common.core.vo.Vo;
import lombok.Data;
/**
* @author Fan
* @description
* @date 2024/11/8 11:21
*/
@Data
public class DebtBusinessVo implements Vo {
/**
* 附加费
*/
private String addAmount;
/**
* 单数
*/
private String billNum;
/**
* 维修类型
*/
private String billType;
/**
* 当前欠款金额
*/
private String debtAmount;
/**
* 当前欠款单数
*/
private String debtNum;
/**
* 门店
*/
private String deptName;
/**
* 材料费
*/
private String goodsAmount;
/**
* 材料成本
*/
private String goodsAmountCost;
/**
* 工时费
*/
private String hourAmount;
/**
* 工时成本
*/
private String hourAmountCost;
/**
* 其他附加费
*/
private String otherAmount;
/**
* 应收合计
*/
private String totalAmount;
/**
* 成本合计
*/
private String totalCost;
/**
* 分公司
*/
private String useOrgName;
}

30
yxt-as/src/main/java/com/yxt/anrui/as/api/asbusrepairbill/report/OutInsuranceBusinessQuery.java

@ -0,0 +1,30 @@
package com.yxt.anrui.as.api.asbusrepairbill.report;
import com.yxt.common.core.query.Query;
import lombok.Data;
/**
* @author Fan
* @description
* @date 2024/11/8 10:57
*/
@Data
public class OutInsuranceBusinessQuery implements Query {
/**
* 1本日2本月3本年
*/
private String dateType;
private String menuUrl;
private String orgPath;
/**
* 结算结束
*/
private String settleEndTime;
/**
* 结算开始
*/
private String settleStartTime;
private String userSid;
}

70
yxt-as/src/main/java/com/yxt/anrui/as/api/asbusrepairbill/report/OutInsuranceBusinessVo.java

@ -0,0 +1,70 @@
package com.yxt.anrui.as.api.asbusrepairbill.report;
import com.yxt.common.core.vo.Vo;
import lombok.Data;
/**
* @author Fan
* @description
* @date 2024/11/8 10:57
*/
@Data
public class OutInsuranceBusinessVo implements Vo {
/**
* 附加费
*/
private String addAmount;
/**
* 涉及单数
*/
private String billNum;
/**
* 维修类型
*/
private String billType;
/**
* 门店
*/
private String deptName;
/**
* 材料费
*/
private String goodsAmount;
/**
* 材料成本
*/
private String goodsAmountCost;
/**
* 工时费
*/
private String hourAmount;
/**
* 工时成本
*/
private String hourAmountCost;
/**
* 其他附加费
*/
private String otherAmount;
/**
* 附加成本
*/
private String otherAmountCost;
/**
* 利润合计
*/
private String profit;
/**
* 收入合计
*/
private String totalAmount;
/**
* 成本合计
*/
private String totalCost;
/**
* 分公司
*/
private String useOrgName;
}

9
yxt-as/src/main/java/com/yxt/anrui/as/biz/asbusrepairbill/AsBusrepairBillMapper.java

@ -6,8 +6,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.yxt.anrui.as.api.asbusrepairbill.*;
import com.yxt.anrui.as.api.asbusrepairbill.app.*;
import com.yxt.anrui.as.api.asbusrepairbill.report.BusDetailsVo;
import com.yxt.anrui.as.api.asbusrepairbill.report.SummaryVo;
import com.yxt.anrui.as.api.asbusrepairbill.report.*;
import com.yxt.anrui.as.api.asbusrepairinventorybilldetail.SitemsVo;
import com.yxt.common.core.result.ResultBean;
import org.apache.ibatis.annotations.Mapper;
@ -71,4 +70,10 @@ public interface AsBusrepairBillMapper extends BaseMapper<AsBusrepairBill> {
IPage<SummaryVo> Summary(IPage<AsBusrepairBill> page,@Param(Constants.WRAPPER) QueryWrapper<AsBusrepairBill> qw);
IPage<BusDetailsVo> busDetailsList(IPage<AsBusrepairBill> page, @Param(Constants.WRAPPER) QueryWrapper<AsBusrepairBill> qw);
IPage<BusinessSummaryVo> businessSummary(IPage<AsBusrepairBill> page,@Param(Constants.WRAPPER) QueryWrapper<AsBusrepairBill> qw);
IPage<OutInsuranceBusinessVo> outInsuranceBusiness(IPage<AsBusrepairBill> page, @Param(Constants.WRAPPER) QueryWrapper<AsBusrepairBill> qw);
IPage<DebtBusinessVo> debtBusiness(IPage<AsBusrepairBill> page, @Param(Constants.WRAPPER) QueryWrapper<AsBusrepairBill> qw);
}

143
yxt-as/src/main/java/com/yxt/anrui/as/biz/asbusrepairbill/AsBusrepairBillMapper.xml

@ -370,7 +370,7 @@
LEFT JOIN yxt_wms.wms_inventory AS i ON d.inventorySid = i.sid
WHERE b.busTypeKey = '0'
GROUP BY
a.sid,date_format ( a.createTime, '%Y-%m-%d' ),date_format ( a.settleTime, '%Y-%m-%d' ),a.useOrgSid,d.inventorySid,a.billType,a.`subject`,d.billBusTypeValue,a.nodeCode
a.sid,date_format ( a.createTime, '%Y-%m-%d' ),date_format ( a.settleTime, '%Y-%m-%d' ),a.deptSid,d.inventorySid,a.billType,a.`subject`,d.billBusTypeValue,a.nodeCode
UNION ALL
SELECT
a.orgSidPath,
@ -393,7 +393,7 @@
(IFNULL(SUM(s.amount),0) - IFNULL(SUM(s.costTotal),0)) as profit
FROM as_busrepair_bill_sitem as s LEFT JOIN as_busrepair_bill as a ON s.billSid = a.sid
GROUP BY
a.sid,date_format ( a.createTime, '%Y-%m-%d' ),date_format ( a.settleTime, '%Y-%m-%d' ),a.useOrgSid,a.billType,a.`subject`,s.billBusTypeValue,a.nodeCode
a.sid,date_format ( a.createTime, '%Y-%m-%d' ),date_format ( a.settleTime, '%Y-%m-%d' ),a.deptSid,a.billType,a.`subject`,s.billBusTypeValue,a.nodeCode
UNION ALL
SELECT
a.orgSidPath,
@ -416,7 +416,7 @@
(IFNULL(SUM(s.price),0) - IFNULL(SUM(s.costTotal),0)) as profit
FROM as_busrepair_bill_aitem as s LEFT JOIN as_busrepair_bill as a ON s.billSid = a.sid
GROUP BY
a.sid,date_format ( a.createTime, '%Y-%m-%d' ),date_format ( a.settleTime, '%Y-%m-%d' ),a.useOrgSid,a.billType,a.`subject`,s.billBusTypeValue,a.nodeCode
a.sid,date_format ( a.createTime, '%Y-%m-%d' ),date_format ( a.settleTime, '%Y-%m-%d' ),a.deptSid,a.billType,a.`subject`,s.billBusTypeValue,a.nodeCode
UNION ALL
SELECT
a.orgSidPath,
@ -439,7 +439,7 @@
(IFNULL(SUM(s.price),0) - IFNULL(SUM(s.costTotal),0)) as profit
FROM as_busrepair_bill_aitemspec as s LEFT JOIN as_busrepair_bill as a ON s.billSid = a.sid
GROUP BY
a.sid,s.attachItem,date_format ( a.createTime, '%Y-%m-%d' ),date_format ( a.settleTime, '%Y-%m-%d' ),a.useOrgSid,a.billType,a.`subject`,s.billBusTypeValue,a.nodeCode
a.sid,s.attachItem,date_format ( a.createTime, '%Y-%m-%d' ),date_format ( a.settleTime, '%Y-%m-%d' ),a.deptSid,a.billType,a.`subject`,s.billBusTypeValue,a.nodeCode
UNION ALL
SELECT
s.orgSidPath,
@ -466,7 +466,7 @@
LEFT JOIN yxt_sms.sms_sales_bill AS a ON d.billSid = a.sid
LEFT JOIN anrui_portal.sys_organization AS s ON a.deptSid = s.sid
GROUP BY
a.sid,date_format ( a.createTime, '%Y-%m-%d' ),date_format ( a.settleTime, '%Y-%m-%d' ),a.useOrgSid,d.billBusTypeValue) as m
a.sid,date_format ( a.createTime, '%Y-%m-%d' ),date_format ( a.settleTime, '%Y-%m-%d' ),a.deptSid,d.billBusTypeValue) as m
<where>
${ew.sqlSegment}
</where>
@ -653,4 +653,137 @@
${ew.sqlSegment}
</where>
</select>
<select id="businessSummary" resultType="com.yxt.anrui.as.api.asbusrepairbill.report.BusinessSummaryVo">
SELECT * FROM
(SELECT n.*,
(n.hourAmount + n.goodsAmount + n.otherAmount + n.addAmount - n.backAmount) turnover,
(n.hourAmountCost + n.goodsAmountCost + n.otherAmountCost) cost,
((n.hourAmount + n.goodsAmount + n.otherAmount + n.addAmount - n.backAmount) - (n.hourAmountCost + n.goodsAmountCost + n.otherAmountCost)) grossProfit,
(n.packsHourAmount + n.packsGoodsAmount + n.packsOtherAmount) packsReceivable,
(n.outHourAmount + n.outGoodsAmount + n.outOtherAmount) outReceivable
FROM
(SELECT
a.orgSidPath,
a.`deptName`,
a.`useOrgName`,
COUNT(*) billNum,
IFNULL(SUM(IFNULL(hourAmount,0)),0) hourAmount,
(SELECT IFNULL(SUM(IFNULL(d.amount,0)),0) FROM as_busrepair_inventorybill_detail as d LEFT JOIN as_busrepair_inventorybill as ab ON d.billSid = ab.sid LEFT JOIN as_busrepair_bill AS b ON ab.sourceBillSid = b.sid WHERE b.deptSid = a.deptSid and date_format ( b.settleTime, '%Y-%m-%d' ) = date_format ( a.settleTime, '%Y-%m-%d' ) and ab.busTypeKey = 0) as goodsAmount,
IFNULL(SUM(IFNULL(addAmount,0)),0) otherAmount,
(IFNULL(SUM(IFNULL(outAmount,0)),0) + IFNULL(SUM(IFNULL(subsidyAmount,0)),0) + IFNULL(SUM(IFNULL(rescueAmount,0)),0)) addAmount,
(SELECT IFNULL(SUM(IFNULL(d.amount,0)),0) FROM as_busrepair_inventorybill_detail as d LEFT JOIN as_busrepair_inventorybill as ab ON d.billSid = ab.sid LEFT JOIN as_busrepair_bill AS b ON ab.sourceBillSid = b.sid WHERE b.deptSid = a.deptSid and date_format ( b.settleTime, '%Y-%m-%d' ) = date_format ( a.settleTime, '%Y-%m-%d' ) and ab.busTypeKey = 1) as backAmount,
(SELECT IFNULL(SUM(IFNULL(s.costTotal,0)),0) FROM as_busrepair_bill_sitem as s LEFT JOIN as_busrepair_bill as b ON s.billSid = b.sid WHERE
b.deptSid = a.deptSid and date_format ( b.settleTime, '%Y-%m-%d' ) = date_format ( a.settleTime, '%Y-%m-%d' )) as hourAmountCost,
( (SELECT IFNULL(SUM(IFNULL(d.costTotal,0)),0) FROM as_busrepair_inventorybill_detail as d LEFT JOIN as_busrepair_inventorybill as ab ON d.billSid = ab.sid LEFT JOIN as_busrepair_bill AS b ON ab.sourceBillSid = b.sid WHERE b.deptSid = a.deptSid and date_format ( b.settleTime, '%Y-%m-%d' ) = date_format ( a.settleTime, '%Y-%m-%d' ) and ab.busTypeKey = 0) - (SELECT IFNULL(SUM(IFNULL(d.costTotal,0)),0) FROM as_busrepair_inventorybill_detail as d LEFT JOIN as_busrepair_inventorybill as ab ON d.billSid = ab.sid LEFT JOIN as_busrepair_bill AS b ON ab.sourceBillSid = b.sid WHERE b.deptSid = a.deptSid and date_format ( b.settleTime, '%Y-%m-%d' ) = date_format ( a.settleTime, '%Y-%m-%d' ) and ab.busTypeKey = 1) ) goodsAmountCost,
((SELECT IFNULL(SUM(IFNULL(s.costTotal,0)),0) FROM as_busrepair_bill_aitem as s LEFT JOIN as_busrepair_bill as b ON s.billSid = b.sid WHERE
b.deptSid = a.deptSid and date_format ( b.settleTime, '%Y-%m-%d' ) = date_format ( a.settleTime, '%Y-%m-%d' )) + (SELECT IFNULL(SUM(IFNULL(s.costTotal,0)),0) FROM as_busrepair_bill_aitemspec as s LEFT JOIN as_busrepair_bill as b ON s.billSid = b.sid WHERE
b.deptSid = a.deptSid and date_format ( b.settleTime, '%Y-%m-%d' ) = date_format ( a.settleTime, '%Y-%m-%d' ))) otherAmountCost,
(SELECT IFNULL(SUM(IFNULL(b.hourAmount,0)),0) FROM as_busrepair_bill as b WHERE
b.deptSid = a.deptSid and date_format ( b.settleTime, '%Y-%m-%d' ) = date_format ( a.settleTime, '%Y-%m-%d' ) and b.`subject` = '保内') as packsHourAmount,
( (SELECT IFNULL(SUM(IFNULL(d.amount,0)),0) FROM as_busrepair_inventorybill_detail as d LEFT JOIN as_busrepair_inventorybill as ab ON d.billSid = ab.sid LEFT JOIN as_busrepair_bill AS b ON ab.sourceBillSid = b.sid WHERE b.deptSid = a.deptSid and date_format ( b.settleTime, '%Y-%m-%d' ) = date_format ( a.settleTime, '%Y-%m-%d' ) and ab.busTypeKey = 0 and b.`subject` = '保内') - (SELECT IFNULL(SUM(IFNULL(d.amount,0)),0) FROM as_busrepair_inventorybill_detail as d LEFT JOIN as_busrepair_inventorybill as ab ON d.billSid = ab.sid LEFT JOIN as_busrepair_bill AS b ON ab.sourceBillSid = b.sid WHERE b.deptSid = a.deptSid and date_format ( b.settleTime, '%Y-%m-%d' ) = date_format ( a.settleTime, '%Y-%m-%d' ) and ab.busTypeKey = 1 and b.`subject` = '保内') ) packsGoodsAmount,
(SELECT IFNULL(SUM(IFNULL(addAmount,0)),0) + IFNULL(SUM(IFNULL(outAmount,0)),0) + IFNULL(SUM(IFNULL(subsidyAmount,0)),0) + IFNULL(SUM(IFNULL(rescueAmount,0)),0) FROM as_busrepair_bill as b WHERE
b.deptSid = a.deptSid and date_format (b.settleTime, '%Y-%m-%d' ) = date_format ( a.settleTime, '%Y-%m-%d' ) and b.`subject` = '保内') as packsOtherAmount,
(SELECT IFNULL(SUM(IFNULL(b.hourAmount,0)),0) FROM as_busrepair_bill as b WHERE
b.deptSid = a.deptSid and date_format ( b.settleTime, '%Y-%m-%d' ) = date_format ( a.settleTime, '%Y-%m-%d' ) and b.`subject` = '保外') as outHourAmount,
( (SELECT IFNULL(SUM(IFNULL(d.amount,0)),0) FROM as_busrepair_inventorybill_detail as d LEFT JOIN as_busrepair_inventorybill as ab ON d.billSid = ab.sid LEFT JOIN as_busrepair_bill AS b ON ab.sourceBillSid = b.sid WHERE b.deptSid = a.deptSid and date_format ( b.settleTime, '%Y-%m-%d' ) = date_format ( a.settleTime, '%Y-%m-%d' ) and ab.busTypeKey = 0 and b.`subject` = '保外') - (SELECT IFNULL(SUM(IFNULL(d.amount,0)),0) FROM as_busrepair_inventorybill_detail as d LEFT JOIN as_busrepair_inventorybill as ab ON d.billSid = ab.sid LEFT JOIN as_busrepair_bill AS b ON ab.sourceBillSid = b.sid WHERE b.deptSid = a.deptSid and date_format ( b.settleTime, '%Y-%m-%d' ) = date_format ( a.settleTime, '%Y-%m-%d' ) and ab.busTypeKey = 1 and b.`subject` = '保外') ) outGoodsAmount,
(SELECT IFNULL(SUM(IFNULL(addAmount,0)),0) + IFNULL(SUM(IFNULL(outAmount,0)),0) + IFNULL(SUM(IFNULL(subsidyAmount,0)),0) + IFNULL(SUM(IFNULL(rescueAmount,0)),0) FROM as_busrepair_bill as b WHERE
b.deptSid = a.deptSid and date_format (b.settleTime, '%Y-%m-%d' ) = date_format ( a.settleTime, '%Y-%m-%d' ) and b.`subject` = '保外') as outOtherAmount,
date_format ( a.settleTime, '%Y-%m-%d' ) settleTime
FROM
as_busrepair_bill AS a
WHERE a.nodeCode = '6'
GROUP BY
date_format ( a.settleTime, '%Y-%m-%d' ),a.deptSid) as n) as m
<where>
${ew.sqlSegment}
</where>
</select>
<select id="outInsuranceBusiness"
resultType="com.yxt.anrui.as.api.asbusrepairbill.report.OutInsuranceBusinessVo">
SELECT * FROM
(SELECT n.*,
(n.hourAmount + n.goodsAmount + n.otherAmount + n.addAmount) totalAmount,
(n.hourAmountCost + n.goodsAmountCost + n.otherAmountCost) totalCost,
( (n.hourAmount + n.goodsAmount + n.otherAmount + n.addAmount) - (n.hourAmountCost + n.goodsAmountCost + n.otherAmountCost))profit
FROM
(SELECT
a.billType,
a.orgSidPath,
a.`deptName`,
a.`useOrgName`,
COUNT(*) billNum,
IFNULL(SUM(IFNULL(hourAmount,0)),0) hourAmount,
( (SELECT IFNULL(SUM(IFNULL(d.amount,0)),0) FROM as_busrepair_inventorybill_detail as d LEFT JOIN as_busrepair_inventorybill as ab ON d.billSid = ab.sid LEFT JOIN as_busrepair_bill AS b ON ab.sourceBillSid = b.sid WHERE b.deptSid = a.deptSid and date_format ( b.settleTime, '%Y-%m-%d' ) = date_format ( a.settleTime, '%Y-%m-%d' ) and ab.busTypeKey = 0) - (SELECT IFNULL(SUM(IFNULL(d.amount,0)),0) FROM as_busrepair_inventorybill_detail as d LEFT JOIN as_busrepair_inventorybill as ab ON d.billSid = ab.sid LEFT JOIN as_busrepair_bill AS b ON ab.sourceBillSid = b.sid WHERE b.deptSid = a.deptSid and date_format ( b.settleTime, '%Y-%m-%d' ) = date_format ( a.settleTime, '%Y-%m-%d' ) and ab.busTypeKey = 1) ) goodsAmount,
IFNULL(SUM(IFNULL(addAmount,0)),0) otherAmount,
(IFNULL(SUM(IFNULL(outAmount,0)),0) + IFNULL(SUM(IFNULL(subsidyAmount,0)),0) + IFNULL(SUM(IFNULL(rescueAmount,0)),0)) addAmount,
(SELECT IFNULL(SUM(IFNULL(s.costTotal,0)),0) FROM as_busrepair_bill_sitem as s LEFT JOIN as_busrepair_bill as b ON s.billSid = b.sid WHERE
b.deptSid = a.deptSid and date_format ( b.settleTime, '%Y-%m-%d' ) = date_format ( a.settleTime, '%Y-%m-%d' )) as hourAmountCost,
( (SELECT IFNULL(SUM(IFNULL(d.costTotal,0)),0) FROM as_busrepair_inventorybill_detail as d LEFT JOIN as_busrepair_inventorybill as ab ON d.billSid = ab.sid LEFT JOIN as_busrepair_bill AS b ON ab.sourceBillSid = b.sid WHERE b.deptSid = a.deptSid and date_format ( b.settleTime, '%Y-%m-%d' ) = date_format ( a.settleTime, '%Y-%m-%d' ) and ab.busTypeKey = 0) - (SELECT IFNULL(SUM(IFNULL(d.costTotal,0)),0) FROM as_busrepair_inventorybill_detail as d LEFT JOIN as_busrepair_inventorybill as ab ON d.billSid = ab.sid LEFT JOIN as_busrepair_bill AS b ON ab.sourceBillSid = b.sid WHERE b.deptSid = a.deptSid and date_format ( b.settleTime, '%Y-%m-%d' ) = date_format ( a.settleTime, '%Y-%m-%d' ) and ab.busTypeKey = 1) ) goodsAmountCost,
((SELECT IFNULL(SUM(IFNULL(s.costTotal,0)),0) FROM as_busrepair_bill_aitem as s LEFT JOIN as_busrepair_bill as b ON s.billSid = b.sid WHERE
b.deptSid = a.deptSid and date_format ( b.settleTime, '%Y-%m-%d' ) = date_format ( a.settleTime, '%Y-%m-%d' )) + (SELECT IFNULL(SUM(IFNULL(s.costTotal,0)),0) FROM as_busrepair_bill_aitemspec as s LEFT JOIN as_busrepair_bill as b ON s.billSid = b.sid WHERE
b.deptSid = a.deptSid and date_format ( b.settleTime, '%Y-%m-%d' ) = date_format ( a.settleTime, '%Y-%m-%d' ))) otherAmountCost,
date_format ( a.settleTime, '%Y-%m-%d' ) settleTime
FROM
as_busrepair_bill AS a
WHERE a.nodeCode = '6' and a.`subject` = '保外'
GROUP BY
date_format ( a.settleTime, '%Y-%m-%d' ),a.deptSid,a.billType) n) m
<where>
${ew.sqlSegment}
</where>
</select>
<select id="debtBusiness" resultType="com.yxt.anrui.as.api.asbusrepairbill.report.DebtBusinessVo">
SELECT * FROM
(SELECT
billType,
orgSidPath,
`deptName`,
`useOrgName`,
settleTime,
deptSid,
SUM(billCount) billNum,
SUM(totalAmount) totalAmount,
SUM(totalCost) totalCost,
SUM(noMoney) debtAmount,
SUM(hourAmount) hourAmount,
SUM(goodsAmount) goodsAmount,
SUM(otherAmount) otherAmount,
SUM(addAmount) addAmount,
SUM(hourAmountCost) hourAmountCost,
SUM(goodsAmountCost) goodsAmountCost,
SUM(noMoneyCount) debtNum
FROM
(SELECT n.*,
(n.hourAmount + n.goodsAmount + n.otherAmount + n.addAmount) totalAmount,
(n.hourAmountCost + n.goodsAmountCost) totalCost,
IF(n.noMoney > 0, '1', '0') noMoneyCount
FROM
(SELECT
a.billType,
a.orgSidPath,
a.`deptName`,
a.`useOrgName`,
a.settleTime,
a.deptSid,
'1' billCount,
((SELECT IFNULL(SUM(reveivableMoney),0) FROM anrui_fin.fin_uncollected_receivables_detailed as d WHERE d.contractSid = a.sid)
- (SELECT IFNULL(SUM(sd.subscriptionMoney),0) FROM anrui_fin.fin_selected_receivables_detailed as sd LEFT JOIN anrui_fin.fin_uncollected_receivables_detailed as fd ON sd.receivablesSid
= fd.sid WHERE sd.auditState = '3' AND fd.contractSid = a.sid)) noMoney,
IFNULL(a.hourAmount,0) hourAmount,
((SELECT IFNULL(SUM(IFNULL(d.amount,0)),0) FROM as_busrepair_inventorybill_detail as d LEFT JOIN as_busrepair_inventorybill as ab ON d.billSid = ab.sid WHERE ab.sourceBillSid = a.sid and ab.busTypeKey = 0) - (SELECT IFNULL(SUM(IFNULL(d.amount,0)),0) FROM as_busrepair_inventorybill_detail as d LEFT JOIN as_busrepair_inventorybill as ab ON d.billSid = ab.sid WHERE ab.sourceBillSid = a.sid and ab.busTypeKey = 1)) goodsAmount,
IFNULL(a.addAmount,0) otherAmount,
IFNULL(a.outAmount,0) + IFNULL(a.subsidyAmount,0) + IFNULL(a.rescueAmount,0) addAmount,
(SELECT IFNULL(SUM(IFNULL(s.costTotal,0)),0) FROM as_busrepair_bill_sitem as s WHERE s.billSid = a.sid) as hourAmountCost,
((SELECT IFNULL(SUM(IFNULL(d.costTotal,0)),0) FROM as_busrepair_inventorybill_detail as d LEFT JOIN as_busrepair_inventorybill as ab ON d.billSid = ab.sid WHERE ab.sourceBillSid = a.sid and ab.busTypeKey = 0) - (SELECT IFNULL(SUM(IFNULL(d.costTotal,0)),0) FROM as_busrepair_inventorybill_detail as d LEFT JOIN as_busrepair_inventorybill as ab ON d.billSid = ab.sid WHERE ab.sourceBillSid = a.sid and ab.busTypeKey = 1)) goodsAmountCost
FROM
as_busrepair_bill AS a
LEFT JOIN as_arrearsout_apply as sa ON a.sid = sa.pairBillSid
WHERE sa.nodeState = '已办结' and a.nodeCode = '6') as n) k
GROUP BY k.billType, k.deptSid,k.settleTime) m
<where>
${ew.sqlSegment}
</where>
</select>
</mapper>

30
yxt-as/src/main/java/com/yxt/anrui/as/biz/asbusrepairbill/AsBusrepairBillRest.java

@ -2,10 +2,7 @@ package com.yxt.anrui.as.biz.asbusrepairbill;
import com.yxt.anrui.as.api.asbusrepairbill.*;
import com.yxt.anrui.as.api.asbusrepairbill.app.*;
import com.yxt.anrui.as.api.asbusrepairbill.report.BusDetailsQuery;
import com.yxt.anrui.as.api.asbusrepairbill.report.BusDetailsVo;
import com.yxt.anrui.as.api.asbusrepairbill.report.SummaryQuery;
import com.yxt.anrui.as.api.asbusrepairbill.report.SummaryVo;
import com.yxt.anrui.as.api.asbusrepairbill.report.*;
import com.yxt.anrui.as.api.asbusrepairbillinvoice.AsBusrepairBillInvoice;
import com.yxt.anrui.as.api.asbusrepairbillsitem.AsBusrepairBillSitem;
import com.yxt.anrui.as.api.asbusrepairbillsitemrepairer.AsBusrepairBillSitemRepairer;
@ -311,12 +308,35 @@ public class AsBusrepairBillRest {
}
@PostMapping("/busDetailsList")
@ApiOperation("业务汇总")
@ApiOperation("业务明细")
ResultBean<PagerVo<BusDetailsVo>> busDetailsList(@RequestBody PagerQuery<BusDetailsQuery> pagerQuery) {
ResultBean<PagerVo<BusDetailsVo>> rb = ResultBean.fireFail();
PagerVo<BusDetailsVo> pv = asBusrepairBillService.busDetailsList(pagerQuery);
return rb.success().setData(pv);
}
@PostMapping("/businessSummary")
@ApiOperation("营业汇总表")
ResultBean<PagerVo<BusinessSummaryVo>> businessSummary(@RequestBody PagerQuery<BusinessSummaryQuery> pq) {
ResultBean<PagerVo<BusinessSummaryVo>> rb = ResultBean.fireFail();
PagerVo<BusinessSummaryVo> pv = asBusrepairBillService.businessSummary(pq);
return rb.success().setData(pv);
}
@PostMapping("/outInsuranceBusiness")
@ApiOperation("营业分析1(保外)")
ResultBean<PagerVo<OutInsuranceBusinessVo>> outInsuranceBusiness(@RequestBody PagerQuery<OutInsuranceBusinessQuery> pq) {
ResultBean<PagerVo<OutInsuranceBusinessVo>> rb = ResultBean.fireFail();
PagerVo<OutInsuranceBusinessVo> pv = asBusrepairBillService.outInsuranceBusiness(pq);
return rb.success().setData(pv);
}
@PostMapping("/debtBusiness")
@ApiOperation("营业分析2(欠款)")
ResultBean<PagerVo<DebtBusinessVo>> debtBusiness(@RequestBody PagerQuery<DebtBusinessQuery> pq) {
ResultBean<PagerVo<DebtBusinessVo>> rb = ResultBean.fireFail();
PagerVo<DebtBusinessVo> pv = asBusrepairBillService.debtBusiness(pq);
return rb.success().setData(pv);
}
}

194
yxt-as/src/main/java/com/yxt/anrui/as/biz/asbusrepairbill/AsBusrepairBillService.java

@ -9,10 +9,7 @@ import com.yxt.anrui.as.api.asappendix.AsAppendix;
import com.yxt.anrui.as.api.asbillsettelapply.AsBillSettelApplyDto;
import com.yxt.anrui.as.api.asbusrepairbill.*;
import com.yxt.anrui.as.api.asbusrepairbill.app.*;
import com.yxt.anrui.as.api.asbusrepairbill.report.BusDetailsQuery;
import com.yxt.anrui.as.api.asbusrepairbill.report.BusDetailsVo;
import com.yxt.anrui.as.api.asbusrepairbill.report.SummaryQuery;
import com.yxt.anrui.as.api.asbusrepairbill.report.SummaryVo;
import com.yxt.anrui.as.api.asbusrepairbill.report.*;
import com.yxt.anrui.as.api.asbusrepairbillaitem.AsBusrepairBillAitem;
import com.yxt.anrui.as.api.asbusrepairbillaitemspec.AsBusrepairBillAitemspec;
import com.yxt.anrui.as.api.asbusrepairbillinsurance.AsBusrepairBillInsurance;
@ -2722,4 +2719,193 @@ public class AsBusrepairBillService extends MybatisBaseService<AsBusrepairBillMa
PagerVo<BusDetailsVo> p = PagerUtil.pageToVo(pagging, null);
return p;
}
public PagerVo<BusinessSummaryVo> businessSummary(PagerQuery<BusinessSummaryQuery> pq) {
BusinessSummaryQuery query = pq.getParams();
QueryWrapper<AsBusrepairBill> qw = new QueryWrapper<>();
PrivilegeQuery privilegeQuery = new PrivilegeQuery();
privilegeQuery.setOrgPath(query.getOrgPath());
privilegeQuery.setUserSid(query.getUserSid());
privilegeQuery.setMenuUrl(query.getMenuUrl());
ResultBean<String> defaultIdReltBean = sysUserFeign.selectPrivilegeLevel(privilegeQuery);
if (StringUtils.isNotBlank(defaultIdReltBean.getData())) {
//数据权限ID(1集团、2事业部、3分公司、4部门、5个人)
String orgSidPath = query.getOrgPath();
orgSidPath = orgSidPath + "/";
int i1 = orgSidPath.indexOf("/");
int i2 = orgSidPath.indexOf("/", i1 + 1);
int i3 = orgSidPath.indexOf("/", i2 + 1);
int i4 = orgSidPath.indexOf("/", i3 + 1);
String orgLevelKey = defaultIdReltBean.getData();
if ("1".equals(orgLevelKey)) {
orgSidPath = orgSidPath.substring(0, i1);
qw.like("m.orgSidPath", orgSidPath);
} else if ("2".equals(orgLevelKey)) {
orgSidPath = orgSidPath.substring(0, i2);
qw.like("m.orgSidPath", orgSidPath);
} else if ("3".equals(orgLevelKey)) {
orgSidPath = orgSidPath.substring(0, i3);
qw.like("m.orgSidPath", orgSidPath);
} else if ("4".equals(orgLevelKey)) {
orgSidPath = orgSidPath.substring(0, i4);
qw.like("m.orgSidPath", orgSidPath);
} else if ("5".equals(orgLevelKey)) {
// qw.eq("a.createBySid", query.getUserSid());
} else {
PagerVo<BusinessSummaryVo> p = new PagerVo<>();
return p;
}
} else {
PagerVo<BusinessSummaryVo> p = new PagerVo<>();
return p;
}
if (StringUtils.isNotBlank(query.getDateType())) {
String dateType = query.getDateType();
if (dateType.equals("1")) {
//本日
qw.apply("m.settleTime = CURDATE()");
} else if (dateType.equals("2")) {
//本月
qw.apply("m.settleTime >= date_add(curdate(), interval - day(curdate()) + 1 day) AND m.settleTime <= last_day(curdate())");
} else if (dateType.equals("3")) {
//本年
qw.apply("m.settleTime >= date_sub(curdate(), interval dayofyear(curdate())-1 day) AND m.settleTime <= concat(year(curdate()),'-12-31')");
}
}
//结算时间
qw.apply(StringUtils.isNotBlank(query.getSettleStartTime()), "date_format (m.settleTime,'%Y-%m-%d') >= date_format('" + query.getSettleStartTime() + "','%Y-%m-%d')").
apply(StringUtils.isNotBlank(query.getSettleEndTime()), "date_format (m.settleTime,'%Y-%m-%d') <= date_format('" + query.getSettleEndTime() + "','%Y-%m-%d')"
);
IPage<AsBusrepairBill> page = PagerUtil.queryToPage(pq);
IPage<BusinessSummaryVo> pagging = baseMapper.businessSummary(page, qw);
PagerVo<BusinessSummaryVo> p = PagerUtil.pageToVo(pagging, null);
return p;
}
public PagerVo<OutInsuranceBusinessVo> outInsuranceBusiness(PagerQuery<OutInsuranceBusinessQuery> pq) {
OutInsuranceBusinessQuery query = pq.getParams();
QueryWrapper<AsBusrepairBill> qw = new QueryWrapper<>();
PrivilegeQuery privilegeQuery = new PrivilegeQuery();
privilegeQuery.setOrgPath(query.getOrgPath());
privilegeQuery.setUserSid(query.getUserSid());
privilegeQuery.setMenuUrl(query.getMenuUrl());
ResultBean<String> defaultIdReltBean = sysUserFeign.selectPrivilegeLevel(privilegeQuery);
if (StringUtils.isNotBlank(defaultIdReltBean.getData())) {
//数据权限ID(1集团、2事业部、3分公司、4部门、5个人)
String orgSidPath = query.getOrgPath();
orgSidPath = orgSidPath + "/";
int i1 = orgSidPath.indexOf("/");
int i2 = orgSidPath.indexOf("/", i1 + 1);
int i3 = orgSidPath.indexOf("/", i2 + 1);
int i4 = orgSidPath.indexOf("/", i3 + 1);
String orgLevelKey = defaultIdReltBean.getData();
if ("1".equals(orgLevelKey)) {
orgSidPath = orgSidPath.substring(0, i1);
qw.like("m.orgSidPath", orgSidPath);
} else if ("2".equals(orgLevelKey)) {
orgSidPath = orgSidPath.substring(0, i2);
qw.like("m.orgSidPath", orgSidPath);
} else if ("3".equals(orgLevelKey)) {
orgSidPath = orgSidPath.substring(0, i3);
qw.like("m.orgSidPath", orgSidPath);
} else if ("4".equals(orgLevelKey)) {
orgSidPath = orgSidPath.substring(0, i4);
qw.like("m.orgSidPath", orgSidPath);
} else if ("5".equals(orgLevelKey)) {
// qw.eq("a.createBySid", query.getUserSid());
} else {
PagerVo<OutInsuranceBusinessVo> p = new PagerVo<>();
return p;
}
} else {
PagerVo<OutInsuranceBusinessVo> p = new PagerVo<>();
return p;
}
if (StringUtils.isNotBlank(query.getDateType())) {
String dateType = query.getDateType();
if (dateType.equals("1")) {
//本日
qw.apply("m.settleTime = CURDATE()");
} else if (dateType.equals("2")) {
//本月
qw.apply("m.settleTime >= date_add(curdate(), interval - day(curdate()) + 1 day) AND m.settleTime <= last_day(curdate())");
} else if (dateType.equals("3")) {
//本年
qw.apply("m.settleTime >= date_sub(curdate(), interval dayofyear(curdate())-1 day) AND m.settleTime <= concat(year(curdate()),'-12-31')");
}
}
//结算时间
qw.apply(StringUtils.isNotBlank(query.getSettleStartTime()), "date_format (m.settleTime,'%Y-%m-%d') >= date_format('" + query.getSettleStartTime() + "','%Y-%m-%d')").
apply(StringUtils.isNotBlank(query.getSettleEndTime()), "date_format (m.settleTime,'%Y-%m-%d') <= date_format('" + query.getSettleEndTime() + "','%Y-%m-%d')"
);
IPage<AsBusrepairBill> page = PagerUtil.queryToPage(pq);
IPage<OutInsuranceBusinessVo> pagging = baseMapper.outInsuranceBusiness(page, qw);
PagerVo<OutInsuranceBusinessVo> p = PagerUtil.pageToVo(pagging, null);
return p;
}
public PagerVo<DebtBusinessVo> debtBusiness(PagerQuery<DebtBusinessQuery> pq) {
DebtBusinessQuery query = pq.getParams();
QueryWrapper<AsBusrepairBill> qw = new QueryWrapper<>();
PrivilegeQuery privilegeQuery = new PrivilegeQuery();
privilegeQuery.setOrgPath(query.getOrgPath());
privilegeQuery.setUserSid(query.getUserSid());
privilegeQuery.setMenuUrl(query.getMenuUrl());
ResultBean<String> defaultIdReltBean = sysUserFeign.selectPrivilegeLevel(privilegeQuery);
if (StringUtils.isNotBlank(defaultIdReltBean.getData())) {
//数据权限ID(1集团、2事业部、3分公司、4部门、5个人)
String orgSidPath = query.getOrgPath();
orgSidPath = orgSidPath + "/";
int i1 = orgSidPath.indexOf("/");
int i2 = orgSidPath.indexOf("/", i1 + 1);
int i3 = orgSidPath.indexOf("/", i2 + 1);
int i4 = orgSidPath.indexOf("/", i3 + 1);
String orgLevelKey = defaultIdReltBean.getData();
if ("1".equals(orgLevelKey)) {
orgSidPath = orgSidPath.substring(0, i1);
qw.like("m.orgSidPath", orgSidPath);
} else if ("2".equals(orgLevelKey)) {
orgSidPath = orgSidPath.substring(0, i2);
qw.like("m.orgSidPath", orgSidPath);
} else if ("3".equals(orgLevelKey)) {
orgSidPath = orgSidPath.substring(0, i3);
qw.like("m.orgSidPath", orgSidPath);
} else if ("4".equals(orgLevelKey)) {
orgSidPath = orgSidPath.substring(0, i4);
qw.like("m.orgSidPath", orgSidPath);
} else if ("5".equals(orgLevelKey)) {
// qw.eq("a.createBySid", query.getUserSid());
} else {
PagerVo<DebtBusinessVo> p = new PagerVo<>();
return p;
}
} else {
PagerVo<DebtBusinessVo> p = new PagerVo<>();
return p;
}
if (StringUtils.isNotBlank(query.getDateType())) {
String dateType = query.getDateType();
if (dateType.equals("1")) {
//本日
qw.apply("m.settleTime = CURDATE()");
} else if (dateType.equals("2")) {
//本月
qw.apply("m.settleTime >= date_add(curdate(), interval - day(curdate()) + 1 day) AND m.settleTime <= last_day(curdate())");
} else if (dateType.equals("3")) {
//本年
qw.apply("m.settleTime >= date_sub(curdate(), interval dayofyear(curdate())-1 day) AND m.settleTime <= concat(year(curdate()),'-12-31')");
}
}
//结算时间
qw.apply(StringUtils.isNotBlank(query.getSettleStartTime()), "date_format (m.settleTime,'%Y-%m-%d') >= date_format('" + query.getSettleStartTime() + "','%Y-%m-%d')").
apply(StringUtils.isNotBlank(query.getSettleEndTime()), "date_format (m.settleTime,'%Y-%m-%d') <= date_format('" + query.getSettleEndTime() + "','%Y-%m-%d')"
);
IPage<AsBusrepairBill> page = PagerUtil.queryToPage(pq);
IPage<DebtBusinessVo> pagging = baseMapper.debtBusiness(page, qw);
PagerVo<DebtBusinessVo> p = PagerUtil.pageToVo(pagging, null);
return p;
}
}

Loading…
Cancel
Save