jiangping
2024-06-26 3e1a5520f6153a66a436109719d553fb0550e41b
提交一把
已添加2个文件
已修改8个文件
471 ■■■■■ 文件已修改
company/src/api/business/applyChange.js 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
company/src/components/business/OperaApplyChangeMonthWindow.vue 188 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
company/src/components/business/OperaWtbApplyShopWindow.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
company/src/views/enterprise/add_subtract_month.vue 169 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
company/src/views/enterprise/insuranceApply.vue 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
company/src/views/enterprise/myPolicy.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/company/src/main/java/com/doumee/api/business/ApplyChangeController.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/dao/business/model/ApplyChange.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/service/business/ApplyChangeService.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/service/src/main/java/com/doumee/service/business/impl/ApplyChangeServiceImpl.java 74 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
company/src/api/business/applyChange.js
@@ -11,6 +11,11 @@
        trim: true
    })
}
export function monthList (data) {
    return request.post('/business/applyChange/monthList', data, {
        trim: true
    })
}
export function getChangeMemberListOnlineSignLink (data) {
    return request.post('business/applyChange/getChangeMemberListOnlineSignLink', data, {
        trim: true
company/src/components/business/OperaApplyChangeMonthWindow.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,188 @@
<template>
    <GlobalWindow
        :title="title"
        width="100%"
        :visible.sync="visible"
        :confirm-working="isWorking"
        @confirm="confirm"
    >
      <TableLayout :permissions="['business:applychange:query']">
        <!-- æœç´¢è¡¨å• -->
        <el-form ref="searchForm" slot="search-form" :model="searchForm" label-width="100px" inline>
          <el-form-item label="保单状态" prop="status">
            <el-select v-model="searchForm.status" placeholder="请选择" @change="search">
              <el-option label="全部" value=""></el-option>
              <el-option label="待签署" value="0"></el-option>
              <el-option label="待审核" value="1"></el-option>
              <el-option label="已生效" value="2"></el-option>
              <el-option label="申请退回" value="3"></el-option>
              <!--                    3 4 éƒ½æ˜¯é€€å›žç”³è¯·ä¸­-->
              <el-option label="已退回" value="5"></el-option>
              <el-option label="已关闭" value="6"></el-option>
              <el-option label="待出单" value="7"></el-option>
              <el-option label="批改申请中" value="9"></el-option>
            </el-select>
          </el-form-item>
<!--          <el-form-item label="保险方案" prop="baseSolutionsId">
            <el-select v-model="searchForm.baseSolutionsId" placeholder="请选择" @change="search">
              <el-option
                  v-for="item in solutionList"
                  :key="item.baseId"
                  :label="item.name"
                  :value="item.baseId">
              </el-option>
            </el-select>
          </el-form-item>-->
          <el-form-item label="年份" prop="year">
            <el-date-picker
                v-model="searchForm.year"
                type="year"
                @change="search"
                :clearable="false"
                value-format="yyyy"
                placeholder="请选择年份"
                format="yyyy"  >
            </el-date-picker>
          </el-form-item>
          <section>
            <el-button type="primary" @click="search">搜索</el-button>
            <el-button @click="reset">重置</el-button>
          </section>
        </el-form>
        <!-- è¡¨æ ¼å’Œåˆ†é¡µ -->
        <template v-slot:table-wrap>
          <el-table
              v-loading="isWorking.search"
              :data="dataList"
              stripe
              show-summary
              :summary-method="getSummaries"
          >
            <el-table-column label="序号" width="80px">
              <template slot-scope="scope">
                <span>{{scope.$index + 1}}</span>
              </template>
            </el-table-column>
            <el-table-column prop="month" label="年月" ></el-table-column>
            <el-table-column prop="countNum" label="申请单数"  ></el-table-column>
            <el-table-column prop="fee" label="费用变更(元)"  ></el-table-column>
          </el-table>
        </template>
        <!-- è¯¦æƒ… -->
      </TableLayout>
      <template v-slot:footer>
        <el-button @click="visible=false">返回</el-button>
      </template>
    </GlobalWindow>
</template>
<script>
import BaseTable from '@/components/base/BaseTable'
import TableLayout from '@/layouts/TableLayout'
import GlobalWindow from '@/components/common/GlobalWindow'
import { all as solutionAll } from '@/api/business/solutions'
import { monthList } from '@/api/business/applyChange'
export default {
  name: 'OperaApplyChangeMonthWindow',
  extends: BaseTable,
  components: { TableLayout ,GlobalWindow},
  data () {
    return {
      // æœç´¢
      visible:false,
      title: '',
      searchForm: {
        status: '',
        type: '0',
        applyId:null,
        baseSolutionsId: '',
        createDateE: '',
        createDateS: '',
        year:null
      },
      solutionList: [],
      dataList: []
    }
  },
  created () {
    this.config({
      module: '加减保换厂申请信息表',
      api: '/business/applyChange',
      'field.id': 'id',
      'field.main': 'id'
    })
  },
  methods: {
    open(title,taget){
      this.searchForm.applyId = taget.id
      this.title = title + "-" + taget.solutionsName
      this.visible = true
      this.searchForm.year = new Date().getFullYear().toString()
      this.search()
      this.getAll()
    },
    getSummaries (param) {
      const { columns, data } = param
      const sums = []
      columns.forEach((column, index) => {
        if (index === 0) {
          sums[index] = '合计'
        } else if (index == 3) {
          let price = 0
          data.forEach(item => {
            price += item.fee
          })
          sums[index] = price.toFixed(2)
        }
      })
      return sums;
    },
    getAll () {
      solutionAll({ dataType: 2 }).then(res => {
        this.solutionList = res
      }).catch(err => {
      })
    },
    search () {
      monthList(this.searchForm).then(res => {
        this.dataList = res
      }).catch(err => {
      })
    },
    changeTime (e) {
      if (e.length > 0) {
        this.searchForm.createDateS = e[0]
        this.searchForm.createDateE = e[1]
      } else {
        this.searchForm.createDateS = ''
        this.searchForm.createDateE = ''
      }
      this.search()
    },
    reset () {
      this.searchForm.createDateS = ''
      this.searchForm.createDateE = ''
      this.searchForm.time = []
      this.$refs.searchForm.resetFields()
      this.search()
    }
  }
}
</script>
<style scoped>
/* è‡ªå®šä¹‰åˆè®¡è¡ŒèƒŒæ™¯è‰² */
::v-deep .el-table .el-table__footer-wrapper tr {
  background-color: #f2f2f2;
}
::v-deep .el-table__footer tr {
  background-color: #f2f2f2;
}
/* è‡ªå®šä¹‰åˆè®¡è¡Œæ–‡æœ¬é¢œè‰² */
::v-deep  .el-table .el-table__footer-wrapper tr td {
  color: red;
}
::v-deep  .el-table__footer tr td {
  color: red;
  font-weight: bold;
}
</style>
company/src/components/business/OperaWtbApplyShopWindow.vue
@@ -255,13 +255,13 @@
                            :key="Math.random()"
                            prop="startTime"
                            align="center"
                            label="保险生效起期">
                            :label="getApplyTimeTitle(0,model.solutionType,model)">
                        </el-table-column>
                        <el-table-column
                            :key="Math.random()"
                            prop="endTime"
                            align="center"
                            label="保险生效止期">
                            :label="getApplyTimeTitle(1,model.solutionType,model)">
                        </el-table-column>
                        <el-table-column
                            :key="Math.random()"
company/src/views/enterprise/add_subtract_month.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,169 @@
<template>
    <TableLayout :permissions="['business:applychange:query']">
        <!-- æœç´¢è¡¨å• -->
        <el-form ref="searchForm" slot="search-form" :model="searchForm" label-width="100px" inline>
            <el-form-item label="保单状态" prop="status">
                <el-select v-model="searchForm.status" placeholder="请选择" @change="search">
                    <el-option label="全部" value=""></el-option>
                    <el-option label="待签署" value="0"></el-option>
                    <el-option label="待审核" value="1"></el-option>
                    <el-option label="已生效" value="2"></el-option>
                    <el-option label="申请退回" value="3"></el-option>
<!--                    3 4 éƒ½æ˜¯é€€å›žç”³è¯·ä¸­-->
                    <el-option label="已退回" value="5"></el-option>
                    <el-option label="已关闭" value="6"></el-option>
                    <el-option label="待出单" value="7"></el-option>
                    <el-option label="批改申请中" value="9"></el-option>
                </el-select>
            </el-form-item>
          <el-form-item label="保险方案" prop="baseSolutionsId">
            <el-select v-model="searchForm.baseSolutionsId" placeholder="请选择" @change="search">
              <el-option
                  v-for="item in solutionList"
                  :key="item.baseId"
                  :label="item.name"
                  :value="item.baseId">
              </el-option>
            </el-select>
          </el-form-item>
            <el-form-item label="年份" prop="year">
                <el-date-picker
                    v-model="searchForm.year"
                    type="year"
                    @change="search"
                    :clearable="false"
                    value-format="yyyy"
                    placeholder="请选择年份"
                    format="yyyy"  >
                </el-date-picker>
            </el-form-item>
            <section>
                <el-button type="primary" @click="search">搜索</el-button>
                <el-button @click="reset">重置</el-button>
            </section>
        </el-form>
        <!-- è¡¨æ ¼å’Œåˆ†é¡µ -->
        <template v-slot:table-wrap>
            <el-table
                v-loading="isWorking.search"
                :data="dataList"
                stripe
                show-summary
                :summary-method="getSummaries"
            >
                <el-table-column label="序号" width="80px">
                    <template slot-scope="scope">
                        <span>{{scope.$index + 1}}</span>
                    </template>
                </el-table-column>
                <el-table-column prop="month" label="年月" ></el-table-column>
                <el-table-column prop="countNum" label="申请单数"  ></el-table-column>
                <el-table-column prop="fee" label="费用变更(元)"  ></el-table-column>
            </el-table>
        </template>
        <!-- è¯¦æƒ… -->
    </TableLayout>
</template>
<script>
import BaseTable from '@/components/base/BaseTable'
import TableLayout from '@/layouts/TableLayout'
import { all as solutionAll } from '@/api/business/solutions'
import { monthList } from '@/api/business/applyChange'
export default {
  name: 'add_subtract',
  extends: BaseTable,
  components: { TableLayout },
  data () {
    return {
      // æœç´¢
      searchForm: {
        status: '',
        type: '0',
        applyId:null,
        baseSolutionsId: '',
        createDateE: '',
        createDateS: '',
        year:null
      },
      solutionList: [],
      dataList: []
    }
  },
  created () {
    this.config({
      module: '加减保换厂申请信息表',
      api: '/business/applyChange',
      'field.id': 'id',
      'field.main': 'id'
    })
    this.searchForm.year = new Date().getFullYear().toString()
    this.search()
    this.getAll()
  },
  methods: {
    getSummaries (param) {
      const { columns, data } = param
      const sums = []
      columns.forEach((column, index) => {
        if (index === 0) {
          sums[index] = '合计'
        } else if (index == 3) {
          let price = 0
          data.forEach(item => {
            price += item.fee
          })
          sums[index] = price.toFixed(2)
        }
      })
      return sums;
    },
    getAll () {
      solutionAll({ dataType: 2 }).then(res => {
        this.solutionList = res
      }).catch(err => {
      })
    },
    search () {
      monthList(this.searchForm).then(res => {
        this.dataList = res
      }).catch(err => {
      })
    },
    changeTime (e) {
      if (e.length > 0) {
        this.searchForm.createDateS = e[0]
        this.searchForm.createDateE = e[1]
      } else {
        this.searchForm.createDateS = ''
        this.searchForm.createDateE = ''
      }
      this.search()
    },
    reset () {
      this.searchForm.createDateS = ''
      this.searchForm.createDateE = ''
      this.searchForm.time = []
      this.$refs.searchForm.resetFields()
      this.search()
    }
  }
}
</script>
<style>
/* è‡ªå®šä¹‰åˆè®¡è¡ŒèƒŒæ™¯è‰² */
::v-deep .el-table .el-table__footer-wrapper tr {
  background-color: #f2f2f2;
}
::v-deep .el-table__footer tr {
  background-color: #f2f2f2;
}
/* è‡ªå®šä¹‰åˆè®¡è¡Œæ–‡æœ¬é¢œè‰² */
::v-deep  .el-table .el-table__footer-wrapper tr td {
  color: red;
}
::v-deep  .el-table__footer tr td {
  color: red;
}
</style>
company/src/views/enterprise/insuranceApply.vue
@@ -91,11 +91,12 @@
                <el-table-column
                    v-if="containPermissions(['business:insuranceapply:update', 'business:insuranceapply:delete'])"
                    label="操作"
                    min-width="120"
                    min-width="150"
                    fixed="right"
                >
                    <template slot-scope="{row}">
                        <el-button type="text" @click="godetail(row)" v-permissions="['business:insuranceapply:update']">查看详情</el-button>
                      <el-button type="text" @click="godetail(row)" v-permissions="['business:insuranceapply:update']">查看详情</el-button>
                      <el-button type="text" @click="$refs.OperaApplyChangeMonthWindow.open('加减保月度费用统计',row)" v-permissions="['business:applychange:query']">加减保费用</el-button>
                    </template>
                </el-table-column>
            </el-table>
@@ -108,6 +109,7 @@
        </template>
        <!--    æ–°å¢žæŠ•保    -->
        <OperaInsuranceApplyAddWindow ref="OperaInsuranceApplyAddWindow" @success="result" />
        <OperaApplyChangeMonthWindow ref="OperaApplyChangeMonthWindow" @success="handlePageChange" />
        <OperaWtbApplyShopWindow ref="OperaWtbApplyShopWindow" @success="handlePageChange" />
        <!--    æŠ•保详情    -->
        <OperaInsuranceApplyDetails ref="OperaInsuranceApplyDetails" @success="handlePageChange" />
@@ -120,12 +122,13 @@
import OperaInsuranceApplyAddWindow from '@/components/enterprise/OperaInsuranceApplyAddWindow'
import OperaInsuranceApplyDetails from '@/components/business/OperaInsuranceApplyWindow'
import OperaWtbApplyShopWindow from '@/components/business/OperaWtbApplyShopWindow'
import OperaApplyChangeMonthWindow from '@/components/business/OperaApplyChangeMonthWindow'
import { all as solutionAll } from '@/api/business/solutions'
export default {
  name: 'InsuranceApply',
  extends: BaseTable,
  components: { TableLayout, Pagination, OperaInsuranceApplyAddWindow, OperaInsuranceApplyDetails,OperaWtbApplyShopWindow },
  components: { TableLayout, Pagination,OperaApplyChangeMonthWindow, OperaInsuranceApplyAddWindow, OperaInsuranceApplyDetails,OperaWtbApplyShopWindow },
  data () {
    return {
      // æœç´¢
company/src/views/enterprise/myPolicy.vue
@@ -127,6 +127,7 @@
                >
                    <template slot-scope="{row}">
                        <el-button type="text" @click="godetail(row)" v-permissions="['business:insuranceapply:update']">查看详情</el-button>
                        <el-button type="text" @click="$refs.OperaApplyChangeMonthWindow.open('加减保月度费用统计',row)" v-permissions="['business:applychange:query']">加减保费用</el-button>
<!--                        <template v-if="row.statusCollect === 2">-->
<!--                            <el-button type="text" @click="$refs.additionSubtractionApplication.open('加减保申请', { id: row.id })">加减保申请</el-button>-->
<!--                        </template>-->
@@ -148,6 +149,7 @@
        <!--    åŠ å‡ä¿ç”³è¯·    -->
        <additionSubtractionApplication ref="additionSubtractionApplication" @success="handlePageChange" />
        <!--    ç»­ä¿å¼¹çª—    -->
        <OperaApplyChangeMonthWindow ref="OperaApplyChangeMonthWindow" @success="handlePageChange" />
        <renewalInsurance ref="renewalInsurance" @success="handlePageChange" />
    </TableLayout>
</template>
@@ -160,6 +162,7 @@
import additionSubtractionApplication from '@/components/enterprise/additionSubtractionApplication'
import renewalInsurance from '@/components/enterprise/renewalInsurance'
import OperaWtbApplyShopWindow from '@/components/business/OperaWtbApplyShopWindow'
import OperaApplyChangeMonthWindow from '@/components/business/OperaApplyChangeMonthWindow'
import { all as solutionAll } from '@/api/business/solutions'
import { getCaptcha, closeApplyNotice } from '@/api/business/notices'
@@ -172,6 +175,7 @@
    OperaInsuranceApplyWindow,
    OperaInsuranceApplyDetails,
    renewalInsurance,
    OperaApplyChangeMonthWindow,
    additionSubtractionApplication,
    OperaWtbApplyShopWindow
  },
server/company/src/main/java/com/doumee/api/business/ApplyChangeController.java
@@ -85,6 +85,13 @@
        return ApiResponse.success(applyChangeService.findPageForCompany(pageWrap));
    }
    @ApiOperation("查询月度统计数据")
    @PostMapping("/monthList")
    @RequiresPermissions("business:applychange:query")
    public ApiResponse<List<ApplyChange>> findPage (@RequestBody ApplyChange pageWrap) {
        return ApiResponse.success(applyChangeService.monthTotalList(pageWrap));
    }
    @ApiOperation("导出Excel")
    @PostMapping("/exportExcel")
    @RequiresPermissions("business:applychange:exportExcel")
server/service/src/main/java/com/doumee/dao/business/model/ApplyChange.java
@@ -230,7 +230,15 @@
    @ApiModelProperty(value = "合并单主键(保单)")
    @TableField(exist = false)
    private Integer unionApplyId;
    @ApiModelProperty(value = "年份")
    @TableField(exist = false)
    private Integer year;
    @ApiModelProperty(value = "统计条目数")
    @TableField(exist = false)
    private Integer countNum;
    @ApiModelProperty(value = "提交日期开始 yyyy-MM ")
    @TableField(exist = false)
    private String month;
    public TaxesInvoicingVO toTaxesInvoicingVO(){
        TaxesInvoicingVO taxesInvoicingVO = new TaxesInvoicingVO();
server/service/src/main/java/com/doumee/service/business/ApplyChangeService.java
@@ -123,6 +123,7 @@
    String getSignLinkChangeUnit(ApplyChange model);
    List<ApplyChange> findListForCompany(ApplyChange model);
    List<ApplyChange> monthTotalList(ApplyChange model);
    CountCyclePriceVO getChangeCountCyclePriceVO(ApplyChangeCyclePriceDTO applyChangeCyclePriceDTO);
server/service/src/main/java/com/doumee/service/business/impl/ApplyChangeServiceImpl.java
@@ -1754,6 +1754,80 @@
    }
    @Override
    public  List<ApplyChange> monthTotalList(ApplyChange model){
        if(model.getApplyId() ==null || model.getYear() == null){
            return  new ArrayList<>();
        }
        MPJLambdaWrapper<ApplyChange> queryWrapper = new MPJLambdaWrapper<>();
        queryWrapper
                .select("count(t.id)",ApplyChange::getCountNum)
                .select("sum(t.fee)",ApplyChange::getFee)
                .select("DATE_FORMAT(t.create_date, '%Y-%m')",ApplyChange::getMonth)
                .leftJoin(InsuranceApply.class,InsuranceApply::getId,ApplyChange::getApplyId)
                .leftJoin(Solutions.class,Solutions::getId,InsuranceApply::getSolutionId)
                .eq(!Objects.isNull(model.getType()),ApplyChange::getType,model.getType())
                .eq(ApplyChange::getApplyId,model.getApplyId())
                .eq(!Objects.isNull(model.getStatus())&&!model.getStatus().equals(Constants.ApplyChangeStatus.RETURN_APPLY_UPLOAD.getKey()),ApplyChange::getStatus,model.getStatus())
                .in(!Objects.isNull(model.getStatus())&&model.getStatus().equals(Constants.ApplyChangeStatus.RETURN_APPLY_UPLOAD.getKey()),
                        ApplyChange::getStatus,
                        Constants.ApplyChangeStatus.RETURN_APPLY_UPLOAD.getKey(),
                        Constants.ApplyChangeStatus.RETURN_APPLY_SIGNATURE.getKey())
                .eq(!Objects.isNull(model.getSolutionType()),Solutions::getType,model.getSolutionType())
                .eq(!Objects.isNull(model.getBaseSolutionsId()),Solutions::getBaseId,model.getBaseSolutionsId())
                .like(StringUtils.isNotBlank(model.getSolutionsName()),Solutions::getName,model.getSolutionsName())
                .ge( ApplyChange::getCreateDate, model.getYear()+"-01-01 00:00:00" )
                .lt(ApplyChange::getCreateDate, (model.getYear()+1)+"-01-01 00:00:00")
                .groupBy("month"  );
           /*     LoginUserInfo loginUserInfo =(LoginUserInfo) SecurityUtils.getSubject().getPrincipal();
                //企业人员查看本企业数据
                if(loginUserInfo.getType().equals(Constants.ONE)){
                    queryWrapper.eq(InsuranceApply::getCompanyId, loginUserInfo.getCompanyId());
                }else if(loginUserInfo.getType().equals(Constants.TWO)){
                    //如果是商户查看
                    if(model.getSolutionType()!=null && model.getSolutionType() ==0){
                        queryWrapper.exists("select cs.id from company_solution cs where cs.isdeleted=0 and cs.company_id=t1.company_id and cs.shop_id="+loginUserInfo.getCompanyId());
                    }else if(model.getSolutionType()!=null && model.getSolutionType() ==1){
                        queryWrapper.eq(Solutions::getShopId,loginUserInfo.getCompanyId());
                    }else{
                        queryWrapper.apply("((t2.type=0 and exists(select cs.id from company_solution cs where cs.isdeleted=0 and cs.company_id=t1.company_id and cs.shop_id="+loginUserInfo.getCompanyId()+")) or (" +
                                "t2.type=1 and t2.shop_id="+loginUserInfo.getCompanyId()+"))") ;
                    }
                }else{
                    if(loginUserInfo.getCompanyIdList()!=null && loginUserInfo.getCompanyIdList().size()>0){
                        queryWrapper.in(InsuranceApply::getCompanyId, loginUserInfo.getCompanyIdList());
                    }else{
                        queryWrapper.eq(InsuranceApply::getCompanyId, -1);
                    }
                    queryWrapper.eq(model.getCompanyId()!=null,InsuranceApply::getCompanyId, model.getCompanyId());
                }*/
                List<ApplyChange> list =applyChangeJoinMapper.selectJoinList(ApplyChange.class,queryWrapper);
                List<ApplyChange> result = new ArrayList<>();
                for (int i = 1; i <= 12; i++) {
                    if(i<10){
                        result.add(getMonthDayFromList(model.getYear() +"-0"+i,list));
                    }else{
                        result.add(getMonthDayFromList(model.getYear() +"-"+i,list));
                    }
                }
                return result;
    }
    private ApplyChange getMonthDayFromList(String s, List<ApplyChange> list) {
        for(ApplyChange d : list){
            if(StringUtils.equals(s,d.getMonth())){
                return d;
            }
        }
        ApplyChange d =  new ApplyChange();
        d.setMonth(s);
        d.setFee(new BigDecimal(0));
        d.setCountNum(0);
        return d;
    }
    @Override
    public List<ApplyChange> findListForCompany(ApplyChange model) {
        MPJLambdaWrapper<ApplyChange> queryWrapper = new MPJLambdaWrapper<>();
        queryWrapper