From 8ebca068bb00e530ce44e10e7d009bcaa46c6579 Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期五, 26 一月 2024 16:17:27 +0800
Subject: [PATCH] 开发业务接口

---
 company/src/api/business/insuranceApply.js                                                   |    3 
 company/src/components/business/OperaInsuranceApplyWindow.vue                                |  205 +++++++++++++++-------------
 server/service/src/main/java/com/doumee/core/utils/Constants.java                            |   48 ++++++
 server/service/src/main/java/com/doumee/service/business/impl/CompanyServiceImpl.java        |    9 
 server/service/src/main/java/com/doumee/service/business/impl/InsuranceApplyServiceImpl.java |   56 +++++---
 server/service/src/main/java/com/doumee/dao/business/model/InsuranceApply.java               |    3 
 server/service/src/main/java/com/doumee/service/business/impl/SolutionsServiceImpl.java      |    4 
 server/service/src/main/java/com/doumee/dao/business/dto/InsuranceApplyQueryDTO.java         |    4 
 company/src/views/business/insuranceApply.vue                                                |   49 +++---
 9 files changed, 236 insertions(+), 145 deletions(-)

diff --git a/company/src/api/business/insuranceApply.js b/company/src/api/business/insuranceApply.js
index 793cbbb..79aa1ba 100644
--- a/company/src/api/business/insuranceApply.js
+++ b/company/src/api/business/insuranceApply.js
@@ -11,3 +11,6 @@
 export function updateById (data) {
     return request.post('/business/insuranceApply/updateById', data)
 }
+export function getDetail (id) {
+    return request.get(`business/insuranceApply/${id}`)
+}
diff --git a/company/src/components/business/OperaInsuranceApplyWindow.vue b/company/src/components/business/OperaInsuranceApplyWindow.vue
index b61ea73..89b3d19 100644
--- a/company/src/components/business/OperaInsuranceApplyWindow.vue
+++ b/company/src/components/business/OperaInsuranceApplyWindow.vue
@@ -10,9 +10,9 @@
             <div class="desc_item">
                 <div class="desc_item_label">
                     <div class="desc_item_label_left">
-                        <span>鎶曚繚浼佷笟锛氬畨寰藉钩瀹変汉鍔涜祫婧愭湁闄愬叕鍙�</span>
-                        <span>淇濆崟鐘舵�侊細寰呭嚭鍗�</span>
-                        <span>鎻愪氦鏃堕棿锛�2023-09-11 00:00:00</span>
+                        <span>鎶曚繚浼佷笟锛歿{ model.companyName }}</span>
+                        <span>淇濆崟鐘舵�侊細{{ model.statusInfo }}</span>
+                        <span>鎻愪氦鏃堕棿锛歿{ model.createDate }}</span>
                     </div>
                     <div class="desc_item_label_right">
                         <el-button type="primary" @click="$refs.InsuranceDetails.open('鎶曚繚璇︽儏鍗�')">瀵煎嚭璇﹀崟</el-button>
@@ -30,37 +30,37 @@
                         border
                         style="width: 100%">
                         <el-table-column
-                            prop="date"
+                            prop="code"
                             label="淇濆崟鍙�">
                         </el-table-column>
                         <el-table-column
-                            prop="name"
+                            prop="solutionsName"
                             label="淇濋櫓鏂规"
                             width="180">
                         </el-table-column>
                         <el-table-column
-                            prop="address"
+                            prop="startTime"
                             label="淇濋櫓鐢熸晥璧锋湡">
                         </el-table-column>
                         <el-table-column
-                            prop="address"
+                            prop="endTime"
                             label="淇濋櫓鐢熸晥姝㈡湡">
                         </el-table-column>
                         <el-table-column
-                            prop="address"
+                            prop="insureNum"
                             label="鎶曚繚浜烘暟">
                         </el-table-column>
                         <el-table-column
-                            prop="address"
+                            prop="serviceDays"
                             label="鍦ㄤ繚鏃堕暱锛堝ぉ锛�">
                         </el-table-column>
                         <el-table-column
-                            prop="address"
-                            label="褰撳墠璐圭敤">
+                            prop="currentFee"
+                            label="褰撳墠璐圭敤(鍏�)">
                         </el-table-column>
                         <el-table-column
-                            prop="address"
-                            label="鎬昏垂鐢�">
+                            prop="fee"
+                            label="鎬昏垂鐢�(鍏�)">
                         </el-table-column>
                     </el-table>
                 </div>
@@ -389,88 +389,105 @@
 </template>
 
 <script>
-    import BaseOpera from '@/components/base/BaseOpera'
-    import GlobalWindow from '@/components/common/GlobalWindow'
-    import InsuranceDetails from '@/components/business/InsuranceDetails'
-    export default {
-        name: 'OperaInsuranceApplyWindow',
-        extends: BaseOpera,
-        components: { GlobalWindow, InsuranceDetails },
-        data () {
-            return {
-                // 琛ㄥ崟鏁版嵁
-                form: {
-                    id: null,
-                    editDate: ''
-                },
-                // 楠岃瘉瑙勫垯
-                rules: {
-                },
-                formInline: {
-                    user: '',
-                    region: ''
-                },
-                visible1: false,
-                visible2: false,
-                visible3: false,
-                visible4: false,
-                visible5: false,
-                reverse: true,
-                radio: 0,
-                fileList: [
-                    {name: 'food.pdf', url: 'https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100'}
-                ],
-                activities: [{
-                    content: '娲诲姩鎸夋湡寮�濮�',
-                    timestamp: '2018-04-15'
-                }, {
-                    content: '閫氳繃瀹℃牳',
-                    timestamp: '2018-04-13'
-                }, {
-                    content: '鍒涘缓鎴愬姛',
-                    timestamp: '2018-04-11'
-                }],
-                tableData: [],
-                activeName: 'first',
-                currentPage: 1
-            }
-        },
-        created () {
-            this.config({
-                api: '/business/insuranceApply',
-                'field.id': 'id'
-            })
-        },
-        methods: {
-            handleRemove(file, fileList) {
-                console.log(file, fileList);
-            },
-            handlePreview(file) {
-                console.log(file);
-            },
-            handleExceed(files, fileList) {
-                this.$message.warning(`褰撳墠闄愬埗閫夋嫨 3 涓枃浠讹紝鏈閫夋嫨浜� ${files.length} 涓枃浠讹紝鍏遍�夋嫨浜� ${files.length + fileList.length} 涓枃浠禶);
-            },
-            beforeRemove(file, fileList) {
-                return this.$confirm(`纭畾绉婚櫎 ${ file.name }锛焋);
-            },
-            successEvent() {
-
-            },
-            handleSizeChange(val) {
-                console.log(`姣忛〉 ${val} 鏉);
-            },
-            handleCurrentChange(val) {
-                console.log(`褰撳墠椤�: ${val}`);
-            },
-            handleClick(tab, event) {
-                console.log(tab, event);
-            },
-            onSubmit() {
-
-            }
-        }
+import BaseOpera from '@/components/base/BaseOpera'
+import GlobalWindow from '@/components/common/GlobalWindow'
+import InsuranceDetails from '@/components/business/InsuranceDetails'
+import {getDetail} from "@/api/business/insuranceApply";
+import {all as solutionAll} from "@/api/business/solutions";
+export default {
+  name: 'OperaInsuranceApplyWindow',
+  extends: BaseOpera,
+  components: { GlobalWindow, InsuranceDetails },
+  data () {
+    return {
+      // 琛ㄥ崟鏁版嵁
+      dataId:null,
+      model: {},
+      form: {
+          id: null,
+          editDate: ''
+      },
+      // 楠岃瘉瑙勫垯
+      rules: {
+      },
+      formInline: {
+          user: '',
+          region: ''
+      },
+      visible1: false,
+      visible2: false,
+      visible3: false,
+      visible4: false,
+      visible5: false,
+      reverse: true,
+      radio: 0,
+      fileList: [
+          {name: 'food.pdf', url: 'https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100'}
+      ],
+      activities: [{
+          content: '娲诲姩鎸夋湡寮�濮�',
+          timestamp: '2018-04-15'
+      }, {
+          content: '閫氳繃瀹℃牳',
+          timestamp: '2018-04-13'
+      }, {
+          content: '鍒涘缓鎴愬姛',
+          timestamp: '2018-04-11'
+      }],
+      tableData: [],
+      activeName: 'first',
+      currentPage: 1
     }
+  },
+  created () {
+      this.config({
+          api: '/business/insuranceApply',
+          'field.id': 'id'
+      })
+  },
+  methods: {
+     open(title,target){
+       this.visible=true;
+       this.dataId=target.id
+      this.getDetail();
+     },
+    getDetail(){
+      getDetail(this.dataId).then(res => {
+        this.model = res
+        this.tableData = new Array();
+        this.tableData.push(res);
+      }).catch(err => {
+      })
+    },
+      handleRemove(file, fileList) {
+          console.log(file, fileList);
+      },
+      handlePreview(file) {
+          console.log(file);
+      },
+      handleExceed(files, fileList) {
+          this.$message.warning(`褰撳墠闄愬埗閫夋嫨 3 涓枃浠讹紝鏈閫夋嫨浜� ${files.length} 涓枃浠讹紝鍏遍�夋嫨浜� ${files.length + fileList.length} 涓枃浠禶);
+      },
+      beforeRemove(file, fileList) {
+          return this.$confirm(`纭畾绉婚櫎 ${ file.name }锛焋);
+      },
+      successEvent() {
+
+      },
+      handleSizeChange(val) {
+          console.log(`姣忛〉 ${val} 鏉);
+      },
+      handleCurrentChange(val) {
+          console.log(`褰撳墠椤�: ${val}`);
+      },
+      handleClick(tab, event) {
+          console.log(tab, event);
+      },
+      onSubmit() {
+
+      }
+  }
+}
 </script>
 <style>
     .v-modal {
diff --git a/company/src/views/business/insuranceApply.vue b/company/src/views/business/insuranceApply.vue
index b51a383..d5cd369 100644
--- a/company/src/views/business/insuranceApply.vue
+++ b/company/src/views/business/insuranceApply.vue
@@ -17,19 +17,19 @@
                 <el-select v-model="searchForm.companyId" placeholder="璇烽�夋嫨" @change="search">
                     <el-option
                         v-for="item in companyList"
-                        :key="item.value"
-                        :label="item.label"
-                        :value="item.value">
+                        :key="item.id"
+                        :label="item.name"
+                        :value="item.id">
                     </el-option>
                 </el-select>
             </el-form-item>
             <el-form-item label="淇濋櫓鏂规" prop="solutionId">
-                <el-select v-model="searchForm.solutionId" placeholder="璇烽�夋嫨" @change="search">
+                <el-select v-model="searchForm.baseSolutionId" placeholder="璇烽�夋嫨" @change="search">
                     <el-option
                         v-for="item in solutionList"
-                        :key="item.value"
-                        :label="item.label"
-                        :value="item.value">
+                        :key="item.id"
+                        :label="item.name"
+                        :value="item.id">
                     </el-option>
                 </el-select>
             </el-form-item>
@@ -43,12 +43,10 @@
                     start-placeholder="寮�濮嬫棩鏈�"
                     end-placeholder="缁撴潫鏃ユ湡">
                 </el-date-picker>
-<!--                <el-date-picker v-model="searchForm.createDate" value-format="yyyy-MM-dd" placeholder="璇疯緭鍏ュ垱寤烘椂闂�"/>-->
             </el-form-item>
             <section>
                 <el-button type="primary" @click="search">鎼滅储</el-button>
                 <el-button @click="reset">閲嶇疆</el-button>
-                <el-button @click="$refs.operaInsuranceApplyWindow.open('鎶曚繚璇︽儏')">鎶曚繚璇︽儏</el-button>
             </section>
         </el-form>
         <!-- 琛ㄦ牸鍜屽垎椤� -->
@@ -63,17 +61,7 @@
                         <span>{{scope.$index + 1}}</span>
                     </template>
                 </el-table-column>
-                <el-table-column prop="status" label="鎶曚繚鐘舵��" min-width="100px">
-                    <template slot-scope="{row}">
-                        <span v-if="row.statusCollect === 0">寰呭鏍�</span>
-                        <span v-if="row.statusCollect === 1">寰呭嚭鍗�</span>
-                        <span v-if="row.statusCollect === 2">淇濋殰涓�</span>
-                        <span v-if="row.statusCollect === 3">宸茶繃鏈�</span>
-                        <span v-if="row.statusCollect === 4">宸查��鍥�</span>
-                        <span v-if="row.statusCollect === 5">閫�鍥炵敵璇蜂腑</span>
-                        <span v-if="row.statusCollect === 6">宸插叧闂�</span>
-                    </template>
-                </el-table-column>
+                <el-table-column prop="statusInfo" label="鎶曚繚鐘舵��" min-width="100px"></el-table-column>
                 <el-table-column prop="companyName" label="鎶曚繚浼佷笟" min-width="100px"></el-table-column>
                 <el-table-column prop="solutionsName" label="淇濋櫓鏂规" min-width="100px"></el-table-column>
                 <el-table-column prop="insureNum" label="鎶曚繚浜烘暟" min-width="100px"></el-table-column>
@@ -106,6 +94,8 @@
 import BaseTable from '@/components/base/BaseTable'
 import TableLayout from '@/layouts/TableLayout'
 import Pagination from '@/components/common/Pagination'
+import { all as solutionAll} from '@/api/business/solutions'
+import { pageAll as companyAll} from '@/api/business/company'
 import OperaInsuranceApplyWindow from '@/components/business/OperaInsuranceApplyWindow'
 export default {
     name: 'InsuranceApply',
@@ -115,10 +105,11 @@
         return {
             // 鎼滅储
             searchForm: {
-                createDate: '',
+                createTimeS: '',
+                createTimeE: '',
                 solutionId: '',
                 companyId: '',
-              statusCollect: ''
+                statusCollect: ''
             },
           solutionList:[],
           companyList:[]
@@ -134,10 +125,18 @@
         this.search()
         this.loadSelectList()
     },
-  methods (){
-    loadSelectList(){
+    methods:{
+        loadSelectList() {
+          solutionAll({dataType:0}).then(res => {
+              this.solutionList = res
+            }).catch(err => {
+            })
+        companyAll({}).then(res => {
+            this.companyList = res
+          }).catch(err => {
+          })
+        }
 
     }
-  }
 }
 </script>
diff --git a/server/service/src/main/java/com/doumee/core/utils/Constants.java b/server/service/src/main/java/com/doumee/core/utils/Constants.java
index f09eabb..4a6198d 100644
--- a/server/service/src/main/java/com/doumee/core/utils/Constants.java
+++ b/server/service/src/main/java/com/doumee/core/utils/Constants.java
@@ -659,6 +659,54 @@
 
     }
 
+    public  enum ApplyCollectStatus {
+        DSP(0, "寰呭鎵�"),
+        DCD(1, "寰呭嚭鍗�"),
+        BZZ(2, "淇濋殰涓�"),
+        YGQ(3, "宸茶繃鏈�"),
+        YTH(4, "宸查��鍥�"),
+        THSQZ(5, "閫�鍥炵敵璇蜂腑"),
+        YGB(6, "宸插叧闂�"),
+        ;
+        // 鎴愬憳鍙橀噺
+        private String name;
+        private int key;
+
+        // 鏋勯�犳柟娉�
+        ApplyCollectStatus(int key, String name) {
+            this.name = name;
+            this.key = key;
+        }
+
+        // 鏅�氭柟娉�
+        public static String getName(int index) {
+            for (ApplyCollectStatus c : ApplyCollectStatus.values()) {
+                if (c.getKey() == index) {
+                    return c.name;
+                }
+            }
+            return null;
+        }
+
+        // get set 鏂规硶
+        public String getName() {
+            return name;
+        }
+
+        public void setName(String name) {
+            this.name = name;
+        }
+
+        public int getKey() {
+            return key;
+        }
+
+        public void setKey(int key) {
+            this.key = key;
+        }
+
+    }
+
 
     public  enum ApplyLogType {
         UPLOAD(0, "鎻愪氦鎶曚繚","鎻愪氦鎰忚锛�${param}"),
diff --git a/server/service/src/main/java/com/doumee/dao/business/dto/InsuranceApplyQueryDTO.java b/server/service/src/main/java/com/doumee/dao/business/dto/InsuranceApplyQueryDTO.java
index 6cbf09d..e55323e 100644
--- a/server/service/src/main/java/com/doumee/dao/business/dto/InsuranceApplyQueryDTO.java
+++ b/server/service/src/main/java/com/doumee/dao/business/dto/InsuranceApplyQueryDTO.java
@@ -22,6 +22,10 @@
 
     @ApiModelProperty(value = "鏂规缂栫爜锛堝叧鑱攕olutions锛�", example = "1")
     private Integer solutionId;
+    @ApiModelProperty(value = "浼佷笟缂栫爜 ", example = "1")
+    private Integer companyId;
+    @ApiModelProperty(value = "鍩鸿〃鏂规缂栫爜 ", example = "1")
+    private Integer baseSolutionId;
 
     @ApiModelProperty(value = "瀹為檯淇濋櫓鐢熸晥姝㈡湡寮�濮�")
     private Date endTimeS;
diff --git a/server/service/src/main/java/com/doumee/dao/business/model/InsuranceApply.java b/server/service/src/main/java/com/doumee/dao/business/model/InsuranceApply.java
index 20ca2e1..1309e53 100644
--- a/server/service/src/main/java/com/doumee/dao/business/model/InsuranceApply.java
+++ b/server/service/src/main/java/com/doumee/dao/business/model/InsuranceApply.java
@@ -173,6 +173,9 @@
     @ApiModelProperty(value = "鐘舵�� 0寰呭鎵� 1寰呭嚭鍗� 2淇濋殰涓�  3宸茶繃鏈� 4宸叉挙鍥� 5閫�鍥炵敵璇蜂腑 6宸插叧闂�", example = "1")
     @TableField(exist = false)
     private Integer statusCollect;
+    @ApiModelProperty(value = "闆嗗悎鐘舵��" , example = "1")
+    @TableField(exist = false)
+    private String statusInfo;
 
 
 
diff --git a/server/service/src/main/java/com/doumee/service/business/impl/CompanyServiceImpl.java b/server/service/src/main/java/com/doumee/service/business/impl/CompanyServiceImpl.java
index 3bf4e3b..3d842ad 100644
--- a/server/service/src/main/java/com/doumee/service/business/impl/CompanyServiceImpl.java
+++ b/server/service/src/main/java/com/doumee/service/business/impl/CompanyServiceImpl.java
@@ -259,13 +259,11 @@
 
         List<Multifile> multifileList = new ArrayList<>();
         List<Integer> objList = new ArrayList<>();
-        if(company.getBusinessImg()!=null && StringUtils.isNotBlank(company.getBusinessImg().getFileurl())){
+        if(company.getBusinessImg()!=null && company.getBusinessImg().getId() ==null && StringUtils.isNotBlank(company.getBusinessImg().getFileurl())){
             multifileList.add(initMultiFileByCompay(company,company.getBusinessImg(),Constants.MultiFile.COM_BUSINESS_LICENSE.getKey()));
             objList.add(Constants.MultiFile.COM_BUSINESS_LICENSE.getKey());
-        }else  {
-            throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"璇蜂笂浼犺惀涓氭墽鐓э紒");
         }
-        if(company.getSignImg()!=null && StringUtils.isNotBlank(company.getSignImg().getFileurl())){
+        if(company.getSignImg()!=null&& company.getSignImg().getId() ==null && StringUtils.isNotBlank(company.getSignImg().getFileurl())){
             multifileList.add(initMultiFileByCompay(company,company.getSignImg(),Constants.MultiFile.COM_SING_IMG.getKey()));
             objList.add(Constants.MultiFile.COM_SING_IMG.getKey());
             company.setSignIdStatus(Constants.ZERO);//鏍囪鐢靛瓙绛剧珷鏈笂浼�
@@ -277,6 +275,9 @@
         }
         if(company.getIdcardImgList()!=null && company.getIdcardImgList()!=null){
             for(Multifile f : company.getIdcardImgList()){
+                if(f.getId() !=null){
+                    continue;
+                }
                 multifileList.add(initMultiFileByCompay(company,f,Constants.MultiFile.COM_IDCARD_IMG.getKey()));
             }
             objList.add(Constants.MultiFile.COM_IDCARD_IMG.getKey());
diff --git a/server/service/src/main/java/com/doumee/service/business/impl/InsuranceApplyServiceImpl.java b/server/service/src/main/java/com/doumee/service/business/impl/InsuranceApplyServiceImpl.java
index eb38594..5a8288e 100644
--- a/server/service/src/main/java/com/doumee/service/business/impl/InsuranceApplyServiceImpl.java
+++ b/server/service/src/main/java/com/doumee/service/business/impl/InsuranceApplyServiceImpl.java
@@ -770,6 +770,7 @@
         queryWrapper.leftJoin(Solutions.class,Solutions::getId,InsuranceApply::getSolutionId);
         queryWrapper.leftJoin(Company.class,Company::getId,InsuranceApply::getCompanyId);
         queryWrapper.eq(InsuranceApply::getIsdeleted,Constants.ZERO);
+        queryWrapper.eq(pageWrap.getModel().getBaseSolutionId()!=null,Solutions::getBaseId,pageWrap.getModel().getBaseSolutionId());
         queryWrapper.in(statusList.size()>0,InsuranceApply::getStatus,statusList);
         if(Constants.equalsInteger(pageWrap.getModel().getStatusCollect(),Constants.THREE) ){
             queryWrapper.eq(InsuranceApply::getStatus,Constants.InsuranceApplyStatus.UPLOAD_INSURANCE.getKey());
@@ -819,18 +820,24 @@
         PageData<InsuranceApply> pageData = PageData.from(insuranceApplyJoinMapper.selectJoinPage(page,InsuranceApply.class, queryWrapper));
         if(pageData.getRecords()!=null){
             for (InsuranceApply apply : pageData.getRecords()){
-                apply.setStatusCollect(Constants.InsuranceApplyStatus.getCollectStatus(apply.getStatus()));
-                if(Constants.equalsInteger(apply.getStatusCollect(),Constants.InsuranceApplyStatus.UPLOAD_INSURANCE.getKey())){
-                    //濡傛灉宸插畬鎴�
-                    if(apply.getEndTime()==null || System.currentTimeMillis()>apply.getEndTime().getTime()){
-                        apply.setStatusCollect(Constants.THREE);//宸茶繃鏈�
-                    }
-                }
-            }
+                initApplyStatus(apply) ;
+             }
         }
         return pageData;
     }
 
+    public void    initApplyStatus(InsuranceApply apply){
+        apply.setStatusCollect(Constants.InsuranceApplyStatus.getCollectStatus(apply.getStatus()));
+        if(Constants.equalsInteger(apply.getStatusCollect(),Constants.InsuranceApplyStatus.UPLOAD_INSURANCE.getKey())){
+            //濡傛灉宸插畬鎴�
+            if(apply.getEndTime()==null || System.currentTimeMillis()>apply.getEndTime().getTime()){
+                apply.setStatusCollect(Constants.THREE);//宸茶繃鏈�
+            }
+        }
+        setServiceDays(apply);
+        apply.setStatusInfo(Constants.ApplyCollectStatus.getName(apply.getStatusCollect()));
+
+    }
 
     @Override
     public List<InsuranceApply> findListByDTO(InsuranceApplyQueryDTO model) {
@@ -901,6 +908,7 @@
                 .selectAll(InsuranceApply.class)
                 .selectAs(Solutions::getName,InsuranceApply::getSolutionsName)
                 .selectAs(Company::getName,ApplyLog::getCompanyName)
+                .select(" ( select count(1) from apply_detail ad  where ad.apply_id = t.id ) as insureNum")
                 .leftJoin(Solutions.class,Solutions::getId,InsuranceApply::getSolutionId)
                 .leftJoin(Company.class,Company::getId,InsuranceApply::getCompanyId)
                 .eq(InsuranceApply::getId,id)
@@ -910,21 +918,10 @@
         if(Objects.isNull(insuranceApply)){
             throw new BusinessException(ResponseStatus.DATA_EMPTY);
         }
+
         insuranceApply.setInsureNum(applyDetailMapper.selectCount(new QueryWrapper<ApplyDetail>().lambda().eq(ApplyDetail::getApplyId,insuranceApply.getId())
                 .eq(ApplyDetail::getIsdeleted,Constants.ZERO)));
-
-        //璁剧疆鍦ㄤ繚鏃堕暱锛堝ぉ鏁帮級
-        if(insuranceApply.getStatus().equals(Constants.InsuranceApplyStatus.UPLOAD_INSURANCE.getKey())){
-            //濡傛灉褰撳墠鏃堕棿澶т簬缁撴潫鏃ユ湡 鍒欎娇鐢ㄧ粨鏉熸棩鏈熷姣斿紑濮嬫棩鏈�
-            if(DateUtil.compareDate(new Date(),insuranceApply.getEndTime())>=Constants.ZERO){
-                insuranceApply.setServiceDays(DateUtil.daysBetweenDates(insuranceApply.getEndTime(),insuranceApply.getStartTime()));
-            }else if(DateUtil.compareDate(insuranceApply.getStartTime(),new Date())>=Constants.ZERO){
-                //鏈紑濮�
-                insuranceApply.setServiceDays(Constants.ZERO);
-            }else{
-                insuranceApply.setServiceDays(DateUtil.daysBetweenDates(new Date(),insuranceApply.getStartTime()));
-            }
-        }
+        initApplyStatus(insuranceApply);
 
         //鏌ヨ闄勪欢鏁版嵁
         initImgData(insuranceApply);
@@ -943,6 +940,23 @@
         insuranceApply.setApplyLogList(applyLogList);
         return insuranceApply;
     }
+
+    private void setServiceDays(InsuranceApply insuranceApply) {
+        //璁剧疆鍦ㄤ繚鏃堕暱锛堝ぉ鏁帮級
+        insuranceApply.setServiceDays(Constants.ZERO);
+        if(insuranceApply.getStatus().equals(Constants.InsuranceApplyStatus.UPLOAD_INSURANCE.getKey())){
+            //濡傛灉褰撳墠鏃堕棿澶т簬缁撴潫鏃ユ湡 鍒欎娇鐢ㄧ粨鏉熸棩鏈熷姣斿紑濮嬫棩鏈�
+            if(DateUtil.compareDate(new Date(),insuranceApply.getEndTime())>=Constants.ZERO){
+                insuranceApply.setServiceDays(DateUtil.daysBetweenDates(insuranceApply.getEndTime(),insuranceApply.getStartTime()));
+            }else if(DateUtil.compareDate(insuranceApply.getStartTime(),new Date())>=Constants.ZERO){
+                //鏈紑濮�
+                insuranceApply.setServiceDays(Constants.ZERO);
+            }else{
+                insuranceApply.setServiceDays(DateUtil.daysBetweenDates(new Date(),insuranceApply.getStartTime()));
+            }
+        }
+    }
+
     private void initImgData(InsuranceApply model) {
         List<Multifile> multifiles = multifileMapper.selectList(new QueryWrapper<Multifile>().lambda()
                 .eq(Multifile::getObjId,model.getId())
diff --git a/server/service/src/main/java/com/doumee/service/business/impl/SolutionsServiceImpl.java b/server/service/src/main/java/com/doumee/service/business/impl/SolutionsServiceImpl.java
index aa9a5d8..4848973 100644
--- a/server/service/src/main/java/com/doumee/service/business/impl/SolutionsServiceImpl.java
+++ b/server/service/src/main/java/com/doumee/service/business/impl/SolutionsServiceImpl.java
@@ -260,7 +260,9 @@
     @Override
     public List<Solutions> findList(Solutions solutions) {
         solutions.setIsdeleted(Constants.ZERO);
-        solutions.setDataType(Constants.TWO);
+        if(solutions.getDataType() == null){
+            solutions.setDataType(Constants.TWO);
+        }
         QueryWrapper<Solutions> wrapper = new QueryWrapper<>(solutions);
         return solutionsMapper.selectList(wrapper);
     }

--
Gitblit v1.9.3