Pārlūkot izejas kodu

Merge remote-tracking branch 'origin/master'

yusm 5 mēneši atpakaļ
vecāks
revīzija
f9c4605130
16 mainītis faili ar 680 papildinājumiem un 291 dzēšanām
  1. BIN
      fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/assets/image/claimAndClaim.png
  2. 2 1
      fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/hooks/useApi.js
  3. 40 7
      fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/pages/moduleList/moduleList.vue
  4. 88 11
      fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/pages/pageComponents/business/businessInfo.vue
  5. 62 0
      fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/pages/pageComponents/contacts/contactsInfo.vue
  6. 74 2
      fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/pages/pageComponents/customer/customerInfo.vue
  7. 74 2
      fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/pages/pageComponents/thread/threadInfo.vue
  8. 8 9
      fhKeeper/formulahousekeeper/management-crm/src/main/java/com/management/platform/controller/BusinessOpportunityController.java
  9. 2 2
      fhKeeper/formulahousekeeper/management-crm/src/main/java/com/management/platform/controller/VisitPlanController.java
  10. 6 0
      fhKeeper/formulahousekeeper/management-crm/src/main/java/com/management/platform/time/VisitPlanTask.java
  11. 3 0
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/entity/Contract.java
  12. 21 18
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ContractBonusDetailServiceImpl.java
  13. 11 0
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ContractServiceImpl.java
  14. 1 1
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/FinanceExcludeProjectServiceImpl.java
  15. 278 238
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/FinanceServiceImpl.java
  16. 10 0
      fhKeeper/formulahousekeeper/timesheet/src/views/contract/components/contractManagement.vue

BIN
fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/assets/image/claimAndClaim.png


+ 2 - 1
fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/hooks/useApi.js

@@ -17,7 +17,7 @@ export const GET_TASK_LIST = '/tasks/pageTask' // 获取任务列表
 export const GET_PRODUCT_LIST = '/product/list' // 获取产品列表
 export const GET_CONTRACT_LIST = '/contract/getContractPage' // 获取合同列表
 export const GET_SALES_ORDER_LIST = '/order/list' // 获取销售订单列表
-export const GET_VISITOR_PLAN = `/visitPlan/getVisitPlan` // 获取访客计划
+export const GET_VISITOR_PLAN = `/visitPlan/getVisitPlanList` // 获取访客计划
 export const GET_FREQUENTLY_USED_CONTACTS = `/contacts/getFrequentContacts` // 获取常用联系人
 export const GET_COMMONLY_USED_MODULES = `/userCommonModule/getCommonModules` // 常用模块
 
@@ -34,6 +34,7 @@ export const DELETE_VISITOR_PLAN = `/visitPlan/delVisitPlan` // 删除访客计
 export const BUSINESS_OPPORTUNITY_TRANSFER = '/business-opportunity/claim' // 转移商机
 export const TRANSFER_CLUES = '/clue/claim' // 转移线索
 export const TRANSFER_CUSTOMERS = '/custom/claim' // 转移客户
+export const TRANSFER_CONTACT_PERSON = `/contacts/transferContacts` // 转移联系人
 export const NEW_BUSINESS_OPPORTUNITY_EDITING = `/business-opportunity/insertAndUpdate` // 商机新增编辑
 export const NEW_CLUE_EDITING = `/clue/insertAndUpdate` // 线索新增编辑
 export const CUSTOMER_ADDED_EDITOR = `/custom/insertAndUpdate` // 客户新增编辑

+ 40 - 7
fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/pages/moduleList/moduleList.vue

@@ -43,11 +43,27 @@
                     </div>
                     <template #right>
                       <div class="flex items-center h-full bg-white">
-                        <template v-for="subItem in popUpWindowArray">
-                          <div class="buttonCircle rounded-full items-justify-center text-white" @click="longPress(item, subItem)">
-                            <img :src="subItem.icon" class="w-full h-full">
+                        <template v-if="!item.inchargerName">
+                          <div class="buttonCircle rounded-full" @click="claimAndClaim(item)" v-if="['business', 'thread', 
+                          'customer'].includes(queryParameters?.key)">
+                            <img src="/src/assets/image/claimAndClaim.png" class="w-full h-full">
                           </div>
                         </template>
+                        <template v-if="item.inchargerName || item.ownerName">
+                          <div class="buttonCircle rounded-full" @click="transfer(item)" v-if="['business', 'thread', 
+                          'customer', 'contacts'].includes(queryParameters?.key)">
+                            <img src="/src/assets/image/transfer.png" class="w-full h-full">
+                          </div>
+                        </template>
+                        <div class="buttonCircle rounded-full" @click="topMounted(item)">
+                          <img src="/src/assets/image/topMounted.png" class="w-full h-full">
+                        </div>
+                        <div class="buttonCircle rounded-full" @click="edit(item)">
+                          <img src="/src/assets/image/edit.png" class="w-full h-full">
+                        </div>
+                        <div class="buttonCircle rounded-full" @click="deleteRow(item)">
+                          <img src="/src/assets/image/delete.png" class="w-full h-full">
+                        </div>
                       </div>
                     </template>
                   </van-swipe-cell>
@@ -97,6 +113,7 @@ import { GET_CUSTOM_FORM_JSON } from '@hooks/useApi'
 import requests from "@common/requests";
 import useRouterStore from "@store/useRouterStore.js";
 import useFixedData from "@store/useFixedData.js"
+import useInfoStore from '@store/useInfoStore'
 // import ElementLongPress from "@components/common/elementLongPress.vue";
 import DragBox from '@components/common/dragBox.vue';
 
@@ -108,6 +125,7 @@ const TOP_MOUNTED = 'topMounted';
 const { toastSuccess, toastFail, toastText } = useShowToast()
 const router = useRouterStore()
 const fixedData = useFixedData()
+const userInfo = useInfoStore()
 const searchVal = ref()
 const queryParameters = ref({})
 const loadingList = ref(false)
@@ -159,7 +177,7 @@ function edit(row) {
   const formList = resetListData(formJson?.list)
   const filedObj = getListFieldKey(formList, row)
   let other = {}
-  if(queryParameters.value.key == 'tasks') {
+  if (queryParameters.value.key == 'tasks') {
     other = { ...row }
   }
   toAddEditor({ ...other, ...filedObj, id: row.id })
@@ -173,7 +191,7 @@ function transfer(row) {
 }
 
 function confirmTransfer() {
-  if(!dialogSelection.value.label) {
+  if (!dialogSelection.value.label) {
     return toastText('请选择要转移的人员')
   }
   const { id } = excessiveData.value
@@ -185,6 +203,21 @@ function confirmTransfer() {
   })
 }
 
+// 认领
+function claimAndClaim(item) {
+  const { id, name, clueName, customName } = item
+  const userId = userInfo.userInfo.id
+  showConfirmDialog({
+    title: `认领${queryParameters.value.name}`,
+    message: `确定认领【${name || clueName || customName}】${queryParameters.value.name}吗?`,
+  }).then(() => {
+    requests.post(queryParameters?.value.transferInterface, { ids: id, inchargerId: userId }).then((res) => {
+      toastSuccess('认领成功')
+      onRefresh(true)
+    })
+  })
+}
+
 // 删除事件
 function deleteRow(row) {
   const { name = '', searchFiled = {}, deteleFiled = '' } = queryParameters.value
@@ -322,7 +355,7 @@ function selectChange(value, label) {
 }
 
 function dialogCloseBefo(val) {
-  if(val == 'confirm' && showDialog.value) {
+  if (val == 'confirm' && showDialog.value) {
     return false
   }
 
@@ -367,7 +400,7 @@ useLifecycle({
   }
 }
 
-.headerModeuleList  :deep(.van-search__content) {
+.headerModeuleList :deep(.van-search__content) {
   background: #fff !im\portant;
   height: 42px;
   align-items: center;

+ 88 - 11
fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/pages/pageComponents/business/businessInfo.vue

@@ -20,15 +20,40 @@
     </div>
     <div class="bottomButton">
       <van-button type="primary" class="w-full block">关联联系人</van-button>
-      <van-button type="warning" class="w-full block">转移商机</van-button>
+      <van-button type="warning" class="w-full block" v-if="info.inchargerName"
+        @click="showDialogCli()">转移商机</van-button>
+      <van-button type="primary" class="w-full block" v-if="!info.inchargerName"
+        @click="claimAndClaim()">认领商机</van-button>
     </div>
+
+    <!-- 转移弹窗 -->
+    <van-dialog v-model:show="showDialog" :title="`转移商机`" show-cancel-button @confirm="confirmTransfer"
+      :before-close="dialogCloseBefo">
+      <van-cell title="转移至" is-link @click="showSelect = true">
+        <template #value>
+          {{ dialogSelection.label }}
+        </template>
+      </van-cell>
+      <div class="themeTextColor text-size-small pl-4 pt-2 pb-2">转移后,将看不到此商机了</div>
+    </van-dialog>
+
+    <!-- select 选择器 -->
+    <van-popup v-model:show="showSelect" destroy-on-close position="bottom" :style="{ height: '80%' }">
+      <PullDownSelector @change="selectChange" />
+    </van-popup>
   </div>
 </template>
 
 <script setup>
 import { ref } from 'vue';
 import { useLifecycle } from '@hooks/useCommon.js';
+import { BUSINESS_OPPORTUNITY_TRANSFER } from '@hooks/useApi'
+import requests from "@common/requests";
+import useShowToast from '@hooks/useToast'
+import useInfoStore from '@store/useInfoStore'
 
+const userInfo = useInfoStore()
+const { toastSuccess, toastFail, toastText } = useShowToast()
 const props = defineProps({
   info: {
     type: Object,
@@ -37,6 +62,56 @@ const props = defineProps({
   }
 })
 
+const showDialog = ref(false);
+const showSelect = ref(false);
+const dialogSelection = ref({});
+
+function confirmTransfer() {
+  if (!dialogSelection.value.label) {
+    return toastText('请选择要转移的人员')
+  }
+
+  requests.post(BUSINESS_OPPORTUNITY_TRANSFER, { ids: props.info.id, inchargerId: dialogSelection.value.value }).then((res) => {
+    toastSuccess('转移成功')
+    showDialog.value = false
+    setTimeout(() => {
+      history.back()
+    }, 2000)
+  })
+}
+
+function claimAndClaim() {
+  showConfirmDialog({
+    title: '认领商机',
+    message: `确定认领【${props.info.name}】商机吗?`,
+  }).then(() => {
+    requests.post(BUSINESS_OPPORTUNITY_TRANSFER, { ids: props.info.id, inchargerId: userInfo.userInfo.id }).then((res) => {
+      toastSuccess('认领成功')
+      props.info.inchargerName = userInfo.userInfo.name
+      showDialog.value = false
+    })
+  })
+}
+
+function selectChange(value, label) {
+  dialogSelection.value = {
+    value, label
+  }
+  showSelect.value = false
+}
+
+function showDialogCli() {
+  showDialog.value = true
+}
+
+function dialogCloseBefo(val) {
+  if (val == 'confirm' && showDialog.value) {
+    return false
+  }
+
+  return true
+}
+
 useLifecycle({
   load: () => {
     // 添加加载逻辑
@@ -45,15 +120,17 @@ useLifecycle({
 </script>
 
 <style lang='scss' scoped>
-  .bottomButton {
-    margin: 0 14px;
-    padding-bottom: 30px;
-    :deep(.van-button) {
-      margin-bottom: 20px;
-    }
-  }
-  .info {
-    margin: 8px 14px 30px 14px;
-    padding: 14px;
+.bottomButton {
+  margin: 0 14px;
+  padding-bottom: 30px;
+
+  :deep(.van-button) {
+    margin-bottom: 20px;
   }
+}
+
+.info {
+  margin: 8px 14px 30px 14px;
+  padding: 14px;
+}
 </style>

+ 62 - 0
fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/pages/pageComponents/contacts/contactsInfo.vue

@@ -14,13 +14,38 @@
       </van-cell>
       <van-cell title="备注" :value="info.remark" />
     </div>
+    <div class="bottomButton">
+      <van-button type="warning" class="w-full block" @click="showDialogCli()">转移联系人</van-button>
+    </div>
+
+    <!-- 转移弹窗 -->
+    <van-dialog v-model:show="showDialog" :title="`转移线索`" show-cancel-button
+      @confirm="confirmTransfer" :before-close="dialogCloseBefo">
+      <van-cell title="转移至" is-link @click="showSelect = true">
+        <template #value>
+          {{ dialogSelection.label }}
+        </template>
+      </van-cell>
+      <div class="themeTextColor text-size-small pl-4 pt-2 pb-2">转移后,将看不到此线索了</div>
+    </van-dialog>
+
+    <!-- select 选择器 -->
+    <van-popup v-model:show="showSelect" destroy-on-close position="bottom" :style="{ height: '80%' }">
+      <PullDownSelector @change="selectChange" />
+    </van-popup>
   </div>
 </template>
 
 <script setup>
 import { ref } from 'vue';
 import { useLifecycle } from '@hooks/useCommon.js';
+import { TRANSFER_CONTACT_PERSON } from '@hooks/useApi'
+import requests from "@common/requests";
+import useShowToast from '@hooks/useToast'
+import useInfoStore from '@store/useInfoStore'
 
+const userInfo = useInfoStore()
+const { toastSuccess, toastFail, toastText } = useShowToast()
 const props = defineProps({
   info: {
     type: Object,
@@ -29,6 +54,43 @@ const props = defineProps({
   }
 })
 
+const showDialog = ref(false);
+const showSelect = ref(false);
+const dialogSelection = ref({});
+
+function confirmTransfer() {
+  if(!dialogSelection.value.label) {
+    return toastText('请选择要转移的人员')
+  }
+
+  requests.post(TRANSFER_CONTACT_PERSON, { ids: props.info.id, ownerId: dialogSelection.value.value }).then((res) => {
+    toastSuccess('转移成功')
+    showDialog.value = false
+    setTimeout(() => {
+      history.back()
+    }, 2000)
+  })
+}
+
+function selectChange(value, label) {
+  dialogSelection.value = {
+    value, label
+  }
+  showSelect.value = false
+}
+
+function showDialogCli() {
+  showDialog.value = true
+}
+
+function dialogCloseBefo(val) {
+  if(val == 'confirm' && showDialog.value) {
+    return false
+  }
+
+  return true
+}
+
 useLifecycle({
   load: () => {
     // 添加加载逻辑

+ 74 - 2
fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/pages/pageComponents/customer/customerInfo.vue

@@ -16,16 +16,38 @@
       <van-cell title="备注" :value="info.customDesc" />
     </div>
     <div class="bottomButton">
-      <van-button type="primary" class="w-full block">关联联系人</van-button>
-      <van-button type="warning" class="w-full block">转移商机</van-button>
+      <van-button type="warning" class="w-full block" v-if="info.inchargerName"  @click="showDialogCli()">转移客户</van-button>
+      <van-button type="primary" class="w-full block" v-if="!info.inchargerName" @click="claimAndClaim()">认领客户</van-button>
     </div>
+
+    <!-- 转移弹窗 -->
+    <van-dialog v-model:show="showDialog" :title="`转移线索`" show-cancel-button
+      @confirm="confirmTransfer" :before-close="dialogCloseBefo">
+      <van-cell title="转移至" is-link @click="showSelect = true">
+        <template #value>
+          {{ dialogSelection.label }}
+        </template>
+      </van-cell>
+      <div class="themeTextColor text-size-small pl-4 pt-2 pb-2">转移后,将看不到此线索了</div>
+    </van-dialog>
+
+    <!-- select 选择器 -->
+    <van-popup v-model:show="showSelect" destroy-on-close position="bottom" :style="{ height: '80%' }">
+      <PullDownSelector @change="selectChange" />
+    </van-popup>
   </div>
 </template>
 
 <script setup>
 import { ref } from 'vue';
 import { useLifecycle } from '@hooks/useCommon.js';
+import { TRANSFER_CUSTOMERS } from '@hooks/useApi'
+import requests from "@common/requests";
+import useShowToast from '@hooks/useToast'
+import useInfoStore from '@store/useInfoStore'
 
+const userInfo = useInfoStore()
+const { toastSuccess, toastFail, toastText } = useShowToast()
 const props = defineProps({
   info: {
     type: Object,
@@ -34,6 +56,56 @@ const props = defineProps({
   }
 })
 
+const showDialog = ref(false);
+const showSelect = ref(false);
+const dialogSelection = ref({});
+
+function confirmTransfer() {
+  if(!dialogSelection.value.label) {
+    return toastText('请选择要转移的人员')
+  }
+
+  requests.post(TRANSFER_CUSTOMERS, { ids: props.info.id, inchargerId: dialogSelection.value.value }).then((res) => {
+    toastSuccess('转移成功')
+    showDialog.value = false
+    setTimeout(() => {
+      history.back()
+    }, 2000)
+  })
+}
+
+function claimAndClaim() {
+  showConfirmDialog({
+    title: '认领客户',
+    message: `确定认领【${props.info.name}】客户吗?`,
+  }).then(() => {
+    requests.post(TRANSFER_CUSTOMERS, { ids: props.info.id, inchargerId: userInfo.userInfo.id }).then((res) => {
+      toastSuccess('认领成功')
+      props.info.inchargerName = userInfo.userInfo.name
+      showDialog.value = false
+    })
+  })
+}
+
+function selectChange(value, label) {
+  dialogSelection.value = {
+    value, label
+  }
+  showSelect.value = false
+}
+
+function showDialogCli() {
+  showDialog.value = true
+}
+
+function dialogCloseBefo(val) {
+  if(val == 'confirm' && showDialog.value) {
+    return false
+  }
+
+  return true
+}
+
 useLifecycle({
   load: () => {
     // 添加加载逻辑

+ 74 - 2
fhKeeper/formulahousekeeper/customerBuler-crm-h5/src/pages/pageComponents/thread/threadInfo.vue

@@ -16,16 +16,38 @@
       <van-cell title="备注" :value="info.remark" />
     </div>
     <div class="bottomButton">
-      <van-button type="primary" class="w-full block">转移线索</van-button>
-      <van-button type="warning" class="w-full block">转为商机</van-button>
+      <van-button type="warning" class="w-full block" v-if="info.inchargerName"  @click="showDialogCli()">转移线索</van-button>
+      <van-button type="primary" class="w-full block" v-if="!info.inchargerName" @click="claimAndClaim()">认领线索</van-button>
     </div>
+
+    <!-- 转移弹窗 -->
+    <van-dialog v-model:show="showDialog" :title="`转移线索`" show-cancel-button
+      @confirm="confirmTransfer" :before-close="dialogCloseBefo">
+      <van-cell title="转移至" is-link @click="showSelect = true">
+        <template #value>
+          {{ dialogSelection.label }}
+        </template>
+      </van-cell>
+      <div class="themeTextColor text-size-small pl-4 pt-2 pb-2">转移后,将看不到此线索了</div>
+    </van-dialog>
+
+    <!-- select 选择器 -->
+    <van-popup v-model:show="showSelect" destroy-on-close position="bottom" :style="{ height: '80%' }">
+      <PullDownSelector @change="selectChange" />
+    </van-popup>
   </div>
 </template>
 
 <script setup>
 import { ref } from 'vue';
 import { useLifecycle } from '@hooks/useCommon.js';
+import { TRANSFER_CLUES } from '@hooks/useApi'
+import requests from "@common/requests";
+import useShowToast from '@hooks/useToast'
+import useInfoStore from '@store/useInfoStore'
 
+const userInfo = useInfoStore()
+const { toastSuccess, toastFail, toastText } = useShowToast()
 const props = defineProps({
   info: {
     type: Object,
@@ -34,6 +56,56 @@ const props = defineProps({
   }
 })
 
+const showDialog = ref(false);
+const showSelect = ref(false);
+const dialogSelection = ref({});
+
+function confirmTransfer() {
+  if(!dialogSelection.value.label) {
+    return toastText('请选择要转移的人员')
+  }
+
+  requests.post(TRANSFER_CLUES, { ids: props.info.id, inchargerId: dialogSelection.value.value }).then((res) => {
+    toastSuccess('转移成功')
+    showDialog.value = false
+    setTimeout(() => {
+      history.back()
+    }, 2000)
+  })
+}
+
+function claimAndClaim() {
+  showConfirmDialog({
+    title: '认领线索',
+    message: `确定认领【${props.info.name}】线索吗?`,
+  }).then(() => {
+    requests.post(TRANSFER_CLUES, { ids: props.info.id, inchargerId: userInfo.userInfo.id }).then((res) => {
+      toastSuccess('认领成功')
+      props.info.inchargerName = userInfo.userInfo.name
+      showDialog.value = false
+    })
+  })
+}
+
+function selectChange(value, label) {
+  dialogSelection.value = {
+    value, label
+  }
+  showSelect.value = false
+}
+
+function showDialogCli() {
+  showDialog.value = true
+}
+
+function dialogCloseBefo(val) {
+  if(val == 'confirm' && showDialog.value) {
+    return false
+  }
+
+  return true
+}
+
 useLifecycle({
   load: () => {
     // 添加加载逻辑

+ 8 - 9
fhKeeper/formulahousekeeper/management-crm/src/main/java/com/management/platform/controller/BusinessOpportunityController.java

@@ -15,7 +15,6 @@ import com.management.platform.service.SysFunctionService;
 import com.management.platform.service.WxCorpInfoService;
 import com.management.platform.service.impl.ExcelExportServiceImpl;
 import com.management.platform.util.HttpRespMsg;
-import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.web.bind.annotation.PostMapping;
@@ -274,14 +273,14 @@ public class BusinessOpportunityController {
     public Object claim(BusinessOpportunity bo, HttpServletRequest request) {
         User user = userMapper.selectById(request.getHeader("Token"));
         HttpRespMsg msg = new HttpRespMsg();
-        String[] strings = bo.getIds().split(",");
-        for (String id : strings) {
-            BusinessOpportunity opportunity = boMapper.selectById(id);
-            if (StringUtils.isEmpty(opportunity.getInchargerId())){
-                msg.setError("商机:"+opportunity.getName()+"未被认领不能转移");
-                return msg;
-            }
-        }
+//        String[] strings = bo.getIds().split(",");
+//        for (String id : strings) {
+//            BusinessOpportunity opportunity = boMapper.selectById(id);
+//            if (StringUtils.isEmpty(opportunity.getInchargerId())){
+//                msg.setError("商机:"+opportunity.getName()+"未被认领不能转移");
+//                return msg;
+//            }
+//        }
         bOservice.getAndTransfer(bo, user);
         return msg;
     }

+ 2 - 2
fhKeeper/formulahousekeeper/management-crm/src/main/java/com/management/platform/controller/VisitPlanController.java

@@ -110,12 +110,12 @@ public class VisitPlanController {
      * 获取分页数据
      * @param pageIndex
      * @param pageSize
-     * @param calenderTime
+     * @param calenderDate
      * @param request
      * @return
      */
     @PostMapping("/getVisitPlanList")
-    public HttpRespMsg getVisitPlan(@RequestParam(value = "pageIndex",required = false) Integer pageIndex
+    public HttpRespMsg getVisitPlanList(@RequestParam(value = "pageIndex",required = false) Integer pageIndex
             , @RequestParam(value = "pageSize",required = false) Integer pageSize
             ,@RequestParam("calenderDate")String calenderDate
             ,HttpServletRequest request){

+ 6 - 0
fhKeeper/formulahousekeeper/management-crm/src/main/java/com/management/platform/time/VisitPlanTask.java

@@ -53,8 +53,14 @@ public class VisitPlanTask {
                 Integer companyId = entry.getKey();
                 WxCorpInfo wxCorpInfo =companyWXCorpMap.getOrDefault(companyId,null);
                 List<VisitPlan> planList = entry.getValue();
+                if(CollectionUtils.isEmpty(planList)){
+                    continue;
+                }
                 List<String> wxIds = planList.stream().filter(t -> StringUtils.isNotBlank(t.getCorpwxUserid())).map(VisitPlan::getCorpwxUserid)
                         .collect(Collectors.toList());
+                if(CollectionUtils.isEmpty(wxIds)){
+                    continue;
+                }
                 String join = StringUtils.join(wxIds, '|');
                 if (wxCorpInfo!=null&&wxCorpInfo.getSaasSyncContact()==1&&StringUtils.isNotBlank(join)){
                     // getCorpwxUserid  以 | 隔开 可分割开放

+ 3 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/entity/Contract.java

@@ -178,6 +178,9 @@ public class Contract extends Model<Contract> {
     @TableField(exist = false)
     private String secTypeName;
 
+    @TableField(exist = false)
+    private String projectName;
+
 
     @Override
     protected Serializable pkVal() {

+ 21 - 18
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ContractBonusDetailServiceImpl.java

@@ -134,7 +134,7 @@ public class ContractBonusDetailServiceImpl extends ServiceImpl<ContractBonusDet
             try {
                 WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id",
                         user.getCompanyId()));
-                if(wxCorpInfo != null&&wxCorpInfo.getSaasSyncContact() == 1){
+                if(wxCorpInfo != null&&wxCorpInfo.getSaasSyncContact() == 1&&CollectionUtils.isNotEmpty(checkEmptyWxUserNameList)){
                     respMsg = wxCorpInfoService.getBatchSearchUserInfo(wxCorpInfo, checkEmptyWxUserNameList,null);
                     if(respMsg.code.equals("0")){
                         httpRespMsg.setError("["+String.valueOf(respMsg.data)+"]在系统中为重名人员,请完善工号信息!");
@@ -144,26 +144,29 @@ public class ContractBonusDetailServiceImpl extends ServiceImpl<ContractBonusDet
                     isWxCheck = true;
                 }else{
                     //根据名称判断,不能有重名
-                    List<User> emptyUsers = userMapper.selectList(new LambdaQueryWrapper<User>()
-                            .select(User::getId, User::getCompanyId, User::getName, User::getJobNumber, User::getPlate1, User::getCorpwxUserid)
-                            .eq(User::getCompanyId, user.getCompanyId())
-                            .eq(User::getIsActive, 1)
-                            .in(User::getName, checkEmptyWxUserNameList));
-                    for (ImportBonusTemplateVO templateVO : emptyJNList) {
-                        long count = emptyUsers.stream().filter(t -> t.getName().equals(templateVO.getUserName())).count();
-                        if(count == 0){
-                            httpRespMsg.setError("员工:"+templateVO.getUserName()+" 无对应记录或未激活,请重新填写");
-                            return httpRespMsg;
-                        }else if( count > 1){
-                            httpRespMsg.setError("["+templateVO.getUserName()+"]在系统中为重名人员,请完善工号信息!");
-                            return httpRespMsg;
-                        }else{
-                            Optional<User> first = emptyUsers.stream().filter(t -> t.getName().equals(templateVO.getUserName())).findFirst();
-                            if(first.isPresent()){
-                                emptyJNRespList.add(first.get());
+                    if(CollectionUtils.isNotEmpty(checkEmptyWxUserNameList)){
+                        List<User> emptyUsers = userMapper.selectList(new LambdaQueryWrapper<User>()
+                                .select(User::getId, User::getCompanyId, User::getName, User::getJobNumber, User::getPlate1, User::getCorpwxUserid)
+                                .eq(User::getCompanyId, user.getCompanyId())
+                                .eq(User::getIsActive, 1)
+                                .in(User::getName, checkEmptyWxUserNameList));
+                        for (ImportBonusTemplateVO templateVO : emptyJNList) {
+                            long count = emptyUsers.stream().filter(t -> t.getName().equals(templateVO.getUserName())).count();
+                            if(count == 0){
+                                httpRespMsg.setError("员工:"+templateVO.getUserName()+" 无对应记录或未激活,请重新填写");
+                                return httpRespMsg;
+                            }else if( count > 1){
+                                httpRespMsg.setError("["+templateVO.getUserName()+"]在系统中为重名人员,请完善工号信息!");
+                                return httpRespMsg;
+                            }else{
+                                Optional<User> first = emptyUsers.stream().filter(t -> t.getName().equals(templateVO.getUserName())).findFirst();
+                                if(first.isPresent()){
+                                    emptyJNRespList.add(first.get());
+                                }
                             }
                         }
                     }
+
                 }
             } catch (IOException e){
                 e.printStackTrace();

+ 11 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ContractServiceImpl.java

@@ -88,6 +88,8 @@ public class ContractServiceImpl extends ServiceImpl<ContractMapper, Contract> i
     private ContractTypeSecMapper contractTypeSecMapper;
     @Autowired
     private ContractPayCustomizedMapper contractPayCustomizedMapper;
+    @Autowired
+    private ProjectMapper projectMapper;
 
     /**
      * 分页查询合同
@@ -168,6 +170,12 @@ public class ContractServiceImpl extends ServiceImpl<ContractMapper, Contract> i
             List<Map<String, Object>> contractLogs = contractLogMapper.selectMsg(user.getCompanyId());
             List<ContractCustom> customList = contractCustomMapper.selectList(new QueryWrapper<ContractCustom>().in("contract_id", contractCollect));
             List<ContractTypeSec> secTypeList = contractTypeSecMapper.selectList(new QueryWrapper<ContractTypeSec>().eq("company_id", user.getCompanyId()));
+            //关联项目
+            List<Project> projectList = new ArrayList<>();
+            if (contracts.size() > 0) {
+                projectList = projectMapper.selectList(new QueryWrapper<Project>().select("id, project_name").in("id", contracts.stream().map(Contract::getProjectId).collect(Collectors.toList())));
+            }
+
             for (Contract contract : contracts) {
                 ContractPageVO contractPageVO = new ContractPageVO();
                 List<ContractDocument> files = new ArrayList<>();
@@ -190,6 +198,9 @@ public class ContractServiceImpl extends ServiceImpl<ContractMapper, Contract> i
                 contractPageVO.setRemarks(contract.getRemarks());
                 contractPageVO.setAmounts(contract.getAmounts());
                 contractPageVO.setProjectId(contract.getProjectId());
+                if (contract.getProjectId() != null) {
+                    projectList.stream().filter(project -> project.getId().equals(contract.getProjectId())).findFirst().ifPresent(project -> contractPageVO.setProjectName(project.getProjectName()));
+                }
                 contractPageVO.setPayment(contract.getPayment());
                 contractPageVO.setNextPaymentDate(contract.getNextPaymentDate());
                 contractPageVO.setNextPaymentAmount(contract.getNextPaymentAmount());

+ 1 - 1
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/FinanceExcludeProjectServiceImpl.java

@@ -63,7 +63,7 @@ public class FinanceExcludeProjectServiceImpl extends ServiceImpl<FinanceExclude
 
         List<FinanceExcludeProject> resList = financeExcludeProjectMapper
                 .selectList(new LambdaQueryWrapper<FinanceExcludeProject>()
-                        .eq(FinanceExcludeProject::getProjectId,user.getCompanyId())
+                        .eq(FinanceExcludeProject::getCompanyId,user.getCompanyId())
                         .eq(FinanceExcludeProject::getUseYM,useYM));
         if(projectCount == resList.size()){
             map.put("isAll",1);

+ 278 - 238
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/FinanceServiceImpl.java

@@ -11,9 +11,9 @@ import com.management.platform.service.*;
 import com.management.platform.util.ExcelUtil;
 import com.management.platform.util.HttpRespMsg;
 import com.management.platform.util.MessageUtils;
-import com.taobao.api.internal.util.StringUtils;
 import org.apache.commons.collections.CollectionUtils;
 import org.apache.commons.io.FileUtils;
+import org.apache.commons.lang3.StringUtils;
 import org.apache.log4j.LogManager;
 import org.apache.log4j.Logger;
 import org.apache.poi.openxml4j.exceptions.InvalidFormatException;
@@ -184,8 +184,12 @@ public class FinanceServiceImpl extends ServiceImpl<FinanceMapper, Finance> impl
             //获取人员该月份填写的日报的总时长
             List<Map<String, Object>> userTimeList = null;
             if (syncUserCost || syncHistoryReport) {
-//                userTimeList = reportMapper.getUserWorkingTimeByRange(companyId, startStr, endStr);
                 userTimeList = reportMapper.getUserWorkingTimeByRangeWithExclude(companyId, yearMonth,startStr, endStr);
+                if (userTimeList.size() == 0) {
+                    msg.setError("当月没有相关项目的日报数据,请检查是否设置了不参与项目");
+                    return msg;
+                }
+
             }
 
             //设置财务核算薪资模板配置
@@ -384,6 +388,7 @@ public class FinanceServiceImpl extends ServiceImpl<FinanceMapper, Finance> impl
                 }
 
                 if (first != null && first.isPresent()) {
+                    System.out.println("匹配到的人员:"+first.get().getName());
                     finance.setUserId(first.get().getId());
                     BigDecimal total = new BigDecimal(0);
                     if (salaryCell != null) {
@@ -512,14 +517,22 @@ public class FinanceServiceImpl extends ServiceImpl<FinanceMapper, Finance> impl
                             BigDecimal db = timeType.getMonthDays().multiply(new BigDecimal(timeType.getAllday()));
                             localUser.setCost(total.divide(db, 6, BigDecimal.ROUND_HALF_UP));
                         } else {
+                            boolean find = false;
                             for (int i=0;i<userTimeList.size(); i++) {
                                 Map<String, Object> map = userTimeList.get(i);
                                 if (map.get("creatorId").equals(finance.getUserId())) {
+                                    find = true;
                                     double time = (Double)map.get("workingTime");
                                     localUser.setCost(total.divide(new BigDecimal(time), 6, BigDecimal.ROUND_HALF_UP));
                                     break;
                                 }
                             }
+                            if (!find) {
+                                //没有找到对应的工时,按标准工时来
+                                System.out.println("没有找到对应的工时,按标准工时来, userId="+finance.getUserId()+", jobNumber="+finance.getJobNumber());
+                                BigDecimal db = timeType.getMonthDays().multiply(new BigDecimal(timeType.getAllday()));
+                                localUser.setCost(total.divide(db, 6, BigDecimal.ROUND_HALF_UP));
+                            }
                         }
 
                         updateUserList.add(localUser);
@@ -696,22 +709,45 @@ public class FinanceServiceImpl extends ServiceImpl<FinanceMapper, Finance> impl
                 headList.add(MessageUtils.message("entry.projectType"));
             }
             FinanceFixedcolname fixedItem = financeFixedcolnameService.getFixed(companyId);
-            headList.add(fixedItem.getMonthCost()+"(元)");
-            sheetNameList.add(fixedItem.getMonthCost()+"分摊表");
-            headList.add(fixedItem.getBonus()+"(元)");
-            sheetNameList.add(fixedItem.getBonus()+"分摊表");
-            headList.add(fixedItem.getAllowance()+"(元)");
-            sheetNameList.add(fixedItem.getAllowance()+"分摊表");
-            headList.add(fixedItem.getInsuranceOld()+"(元)");
-            sheetNameList.add(fixedItem.getInsuranceOld()+"分摊表");
-            headList.add(fixedItem.getInsuranceMedical()+"(元)");
-            sheetNameList.add(fixedItem.getInsuranceMedical()+"分摊表");
-            headList.add(fixedItem.getInsuranceLosejob()+"(元)");
-            sheetNameList.add(fixedItem.getInsuranceLosejob()+"分摊表");
-            headList.add(fixedItem.getInsuranceInjury()+"(元)");
-            sheetNameList.add(fixedItem.getInsuranceInjury()+"分摊表");
-            headList.add(fixedItem.getHouseFund()+"(元)");
-            sheetNameList.add(fixedItem.getHouseFund()+"分摊表");
+            if(StringUtils.isNotBlank(fixedItem.getMonthCost())){
+                headList.add(fixedItem.getMonthCost()+"(元)");
+                sheetNameList.add(fixedItem.getMonthCost()+"分摊表");
+            }
+
+            if(StringUtils.isNotBlank(fixedItem.getBonus())){
+                headList.add(fixedItem.getBonus()+"(元)");
+                sheetNameList.add(fixedItem.getBonus()+"分摊表");
+            }
+
+
+            if(StringUtils.isNotBlank(fixedItem.getAllowance())){
+                headList.add(fixedItem.getAllowance()+"(元)");
+                sheetNameList.add(fixedItem.getAllowance()+"分摊表");
+            }
+
+            if(StringUtils.isNotBlank(fixedItem.getInsuranceOld())){
+                headList.add(fixedItem.getInsuranceOld()+"(元)");
+                sheetNameList.add(fixedItem.getInsuranceOld()+"分摊表");
+            }
+
+            if(StringUtils.isNotBlank(fixedItem.getInsuranceMedical())){
+                headList.add(fixedItem.getInsuranceMedical()+"(元)");
+                sheetNameList.add(fixedItem.getInsuranceMedical()+"分摊表");
+            }
+
+            if(StringUtils.isNotBlank(fixedItem.getInsuranceLosejob())){
+                headList.add(fixedItem.getInsuranceLosejob()+"(元)");
+                sheetNameList.add(fixedItem.getInsuranceLosejob()+"分摊表");
+            }
+            if(StringUtils.isNotBlank(fixedItem.getInsuranceInjury())){
+                headList.add(fixedItem.getInsuranceInjury()+"(元)");
+                sheetNameList.add(fixedItem.getInsuranceInjury()+"分摊表");
+            }
+            if(StringUtils.isNotBlank(fixedItem.getHouseFund())){
+                headList.add(fixedItem.getHouseFund()+"(元)");
+                sheetNameList.add(fixedItem.getHouseFund()+"分摊表");
+            }
+
 //            headList.add("其他(元)");
             for (FinanceTblcuscol col : cusColList) {
                 headList.add(col.getFieldName());
@@ -1185,229 +1221,231 @@ public class FinanceServiceImpl extends ServiceImpl<FinanceMapper, Finance> impl
                     rowData.add(p.cost.toPlainString());
                     allList.add(rowData);
 
-                    //获取成员
-                    for (Map<String, Object> membMap : projectTimeList) {
+                    if(0 != onlyTotal){
+                        //获取成员
+                        for (Map<String, Object> membMap : projectTimeList) {
 //                        if (membMap.get("project").equals(p.project)) {
-                        Integer projectId = ((Long) membMap.get("projectId")).intValue();
-                        //修改为按照projectId匹配
-                        if (projectId.equals(p.projectId)) {
-                            //匹配到项目了
-                            List<String> membRowData = new ArrayList<String>();
-                            membRowData.add(p.projectCode);
-                            membRowData.add(p.project);
-                            Double workingTime = (Double) membMap.get("workingTime");
-                            String creatorId = (String) membMap.get("creatorId");
-                            User us = userList.stream().filter(u->u.getId().equals(creatorId)).findFirst().get();
-                            Optional<Finance> first = finances.stream().filter(f -> f.getUserId().equals(creatorId)).findFirst();
-                            if (!first.isPresent()) {
-                                //logger.info("用户["+us.getName()+"]在财务报表中不存在,请重新导入");
-                                logger.info(MessageUtils.message("report.userNull",us.getName()));
-                                continue;
-                            }
-                            Finance userFinance = first.get();
-
-                            BigDecimal cost = userFinance.getTotalCost().multiply(new BigDecimal(workingTime)).divide(userTime.get(creatorId).workingTime, 6, BigDecimal.ROUND_HALF_UP);
-                            BigDecimal salary = userFinance.getMonthCost().multiply(new BigDecimal(workingTime)).divide(userTime.get(creatorId).workingTime, 6, BigDecimal.ROUND_HALF_UP);
-                            BigDecimal bonus = userFinance.getBonus().multiply(new BigDecimal(workingTime)).divide(userTime.get(creatorId).workingTime, 6, BigDecimal.ROUND_HALF_UP);
-                            BigDecimal allowance = userFinance.getAllowance().multiply(new BigDecimal(workingTime)).divide(userTime.get(creatorId).workingTime, 6, BigDecimal.ROUND_HALF_UP);
-                            BigDecimal old = userFinance.getInsuranceOld().multiply(new BigDecimal(workingTime)).divide(userTime.get(creatorId).workingTime, 6, BigDecimal.ROUND_HALF_UP);
-                            BigDecimal medical = userFinance.getInsuranceMedical().multiply(new BigDecimal(workingTime)).divide(userTime.get(creatorId).workingTime, 6, BigDecimal.ROUND_HALF_UP);
-                            BigDecimal loseJob = userFinance.getInsuranceLosejob().multiply(new BigDecimal(workingTime)).divide(userTime.get(creatorId).workingTime, 6, BigDecimal.ROUND_HALF_UP);
-                            BigDecimal injury = userFinance.getInsuranceInjury().multiply(new BigDecimal(workingTime)).divide(userTime.get(creatorId).workingTime, 6, BigDecimal.ROUND_HALF_UP);
-                            BigDecimal house = userFinance.getHouseFund().multiply(new BigDecimal(workingTime)).divide(userTime.get(creatorId).workingTime, 6, BigDecimal.ROUND_HALF_UP);
-                            BigDecimal field1 = userFinance.getCustomField1() == null? new BigDecimal(0):userFinance.getCustomField1().multiply(new BigDecimal(workingTime)).divide(userTime.get(creatorId).workingTime, 6, BigDecimal.ROUND_HALF_UP);
-                            BigDecimal field2 = userFinance.getCustomField2() == null? new BigDecimal(0):userFinance.getCustomField2().multiply(new BigDecimal(workingTime)).divide(userTime.get(creatorId).workingTime, 6, BigDecimal.ROUND_HALF_UP);
-                            BigDecimal field3 = userFinance.getCustomField3() == null? new BigDecimal(0):userFinance.getCustomField3().multiply(new BigDecimal(workingTime)).divide(userTime.get(creatorId).workingTime, 6, BigDecimal.ROUND_HALF_UP);
-                            BigDecimal field4 = userFinance.getCustomField4() == null? new BigDecimal(0):userFinance.getCustomField4().multiply(new BigDecimal(workingTime)).divide(userTime.get(creatorId).workingTime, 6, BigDecimal.ROUND_HALF_UP);
-                            BigDecimal field5 = userFinance.getCustomField5() == null? new BigDecimal(0):userFinance.getCustomField5().multiply(new BigDecimal(workingTime)).divide(userTime.get(creatorId).workingTime, 6, BigDecimal.ROUND_HALF_UP);
-                            BigDecimal field6 = userFinance.getCustomField6() == null? new BigDecimal(0):userFinance.getCustomField6().multiply(new BigDecimal(workingTime)).divide(userTime.get(creatorId).workingTime, 6, BigDecimal.ROUND_HALF_UP);
-                            BigDecimal field7 = userFinance.getCustomField7() == null? new BigDecimal(0):userFinance.getCustomField6().multiply(new BigDecimal(workingTime)).divide(userTime.get(creatorId).workingTime, 6, BigDecimal.ROUND_HALF_UP);
-                            //增加部门
-                            Optional<Department> findDept = allDepartments.stream().filter(dp -> dp.getDepartmentId().equals(us.getDepartmentId())).findFirst();
-                            if(wxCorpInfo!=null&&wxCorpInfo.getSaasSyncContact()==1){
-                                membRowData.add("$userName="+(us.getCorpwxUserid()==null?"":us.getCorpwxUserid())+"$");
-                                if (findDept.isPresent()) {
-                                    membRowData.add("$departmentName="+findDept.get().getDepartmentName()+"$");
-                                } else {
-                                    membRowData.add("");
+                            Integer projectId = ((Long) membMap.get("projectId")).intValue();
+                            //修改为按照projectId匹配
+                            if (projectId.equals(p.projectId)) {
+                                //匹配到项目了
+                                List<String> membRowData = new ArrayList<String>();
+                                membRowData.add(p.projectCode);
+                                membRowData.add(p.project);
+                                Double workingTime = (Double) membMap.get("workingTime");
+                                String creatorId = (String) membMap.get("creatorId");
+                                User us = userList.stream().filter(u->u.getId().equals(creatorId)).findFirst().get();
+                                Optional<Finance> first = finances.stream().filter(f -> f.getUserId().equals(creatorId)).findFirst();
+                                if (!first.isPresent()) {
+                                    //logger.info("用户["+us.getName()+"]在财务报表中不存在,请重新导入");
+                                    logger.info(MessageUtils.message("report.userNull",us.getName()));
+                                    continue;
                                 }
-                            }else if(dingding!=null&&dingding.getContactNeedTranslate()==1){
-                                membRowData.add("$userName="+us.getName()+"$");
-                                if (findDept.isPresent()) {
-                                    membRowData.add("$departmentName="+findDept.get().getDepartmentName()+"$");
-                                } else {
-                                    membRowData.add("");
+                                Finance userFinance = first.get();
+
+                                BigDecimal cost = userFinance.getTotalCost().multiply(new BigDecimal(workingTime)).divide(userTime.get(creatorId).workingTime, 6, BigDecimal.ROUND_HALF_UP);
+                                BigDecimal salary = userFinance.getMonthCost().multiply(new BigDecimal(workingTime)).divide(userTime.get(creatorId).workingTime, 6, BigDecimal.ROUND_HALF_UP);
+                                BigDecimal bonus = userFinance.getBonus().multiply(new BigDecimal(workingTime)).divide(userTime.get(creatorId).workingTime, 6, BigDecimal.ROUND_HALF_UP);
+                                BigDecimal allowance = userFinance.getAllowance().multiply(new BigDecimal(workingTime)).divide(userTime.get(creatorId).workingTime, 6, BigDecimal.ROUND_HALF_UP);
+                                BigDecimal old = userFinance.getInsuranceOld().multiply(new BigDecimal(workingTime)).divide(userTime.get(creatorId).workingTime, 6, BigDecimal.ROUND_HALF_UP);
+                                BigDecimal medical = userFinance.getInsuranceMedical().multiply(new BigDecimal(workingTime)).divide(userTime.get(creatorId).workingTime, 6, BigDecimal.ROUND_HALF_UP);
+                                BigDecimal loseJob = userFinance.getInsuranceLosejob().multiply(new BigDecimal(workingTime)).divide(userTime.get(creatorId).workingTime, 6, BigDecimal.ROUND_HALF_UP);
+                                BigDecimal injury = userFinance.getInsuranceInjury().multiply(new BigDecimal(workingTime)).divide(userTime.get(creatorId).workingTime, 6, BigDecimal.ROUND_HALF_UP);
+                                BigDecimal house = userFinance.getHouseFund().multiply(new BigDecimal(workingTime)).divide(userTime.get(creatorId).workingTime, 6, BigDecimal.ROUND_HALF_UP);
+                                BigDecimal field1 = userFinance.getCustomField1() == null? new BigDecimal(0):userFinance.getCustomField1().multiply(new BigDecimal(workingTime)).divide(userTime.get(creatorId).workingTime, 6, BigDecimal.ROUND_HALF_UP);
+                                BigDecimal field2 = userFinance.getCustomField2() == null? new BigDecimal(0):userFinance.getCustomField2().multiply(new BigDecimal(workingTime)).divide(userTime.get(creatorId).workingTime, 6, BigDecimal.ROUND_HALF_UP);
+                                BigDecimal field3 = userFinance.getCustomField3() == null? new BigDecimal(0):userFinance.getCustomField3().multiply(new BigDecimal(workingTime)).divide(userTime.get(creatorId).workingTime, 6, BigDecimal.ROUND_HALF_UP);
+                                BigDecimal field4 = userFinance.getCustomField4() == null? new BigDecimal(0):userFinance.getCustomField4().multiply(new BigDecimal(workingTime)).divide(userTime.get(creatorId).workingTime, 6, BigDecimal.ROUND_HALF_UP);
+                                BigDecimal field5 = userFinance.getCustomField5() == null? new BigDecimal(0):userFinance.getCustomField5().multiply(new BigDecimal(workingTime)).divide(userTime.get(creatorId).workingTime, 6, BigDecimal.ROUND_HALF_UP);
+                                BigDecimal field6 = userFinance.getCustomField6() == null? new BigDecimal(0):userFinance.getCustomField6().multiply(new BigDecimal(workingTime)).divide(userTime.get(creatorId).workingTime, 6, BigDecimal.ROUND_HALF_UP);
+                                BigDecimal field7 = userFinance.getCustomField7() == null? new BigDecimal(0):userFinance.getCustomField6().multiply(new BigDecimal(workingTime)).divide(userTime.get(creatorId).workingTime, 6, BigDecimal.ROUND_HALF_UP);
+                                //增加部门
+                                Optional<Department> findDept = allDepartments.stream().filter(dp -> dp.getDepartmentId().equals(us.getDepartmentId())).findFirst();
+                                if(wxCorpInfo!=null&&wxCorpInfo.getSaasSyncContact()==1){
+                                    membRowData.add("$userName="+(us.getCorpwxUserid()==null?"":us.getCorpwxUserid())+"$");
+                                    if (findDept.isPresent()) {
+                                        membRowData.add("$departmentName="+findDept.get().getDepartmentName()+"$");
+                                    } else {
+                                        membRowData.add("");
+                                    }
+                                }else if(dingding!=null&&dingding.getContactNeedTranslate()==1){
+                                    membRowData.add("$userName="+us.getName()+"$");
+                                    if (findDept.isPresent()) {
+                                        membRowData.add("$departmentName="+findDept.get().getDepartmentName()+"$");
+                                    } else {
+                                        membRowData.add("");
+                                    }
+                                }else {
+                                    membRowData.add(us.getName());
+                                    if (findDept.isPresent()) {
+                                        membRowData.add(findDept.get().getDepartmentName());
+                                    } else {
+                                        membRowData.add("");
+                                    }
                                 }
-                            }else {
-                                membRowData.add(us.getName());
-                                if (findDept.isPresent()) {
-                                    membRowData.add(findDept.get().getDepartmentName());
-                                } else {
-                                    membRowData.add("");
+                                for (int i = 0; i < userCustoms.size(); i++) {
+                                    switch (i){
+                                        case 0:
+                                            membRowData.add(us.getPlate1()==null?"":us.getPlate1());
+                                            break;
+                                        case 1:
+                                            membRowData.add(us.getPlate2()==null?"":us.getPlate2());
+                                            break;
+                                        case 2:
+                                            membRowData.add(us.getPlate3()==null?"":us.getPlate3());
+                                            break;
+                                        case 3:
+                                            membRowData.add(us.getPlate4()==null?"":us.getPlate4());
+                                            break;
+                                        case 4:
+                                            membRowData.add(us.getPlate5()==null?"":us.getPlate5());
+                                            break;
+                                    }
                                 }
-                            }
-                            for (int i = 0; i < userCustoms.size(); i++) {
-                                switch (i){
-                                    case 0:
-                                        membRowData.add(us.getPlate1()==null?"":us.getPlate1());
-                                        break;
-                                    case 1:
-                                        membRowData.add(us.getPlate2()==null?"":us.getPlate2());
-                                        break;
-                                    case 2:
-                                        membRowData.add(us.getPlate3()==null?"":us.getPlate3());
-                                        break;
-                                    case 3:
-                                        membRowData.add(us.getPlate4()==null?"":us.getPlate4());
-                                        break;
-                                    case 4:
-                                        membRowData.add(us.getPlate5()==null?"":us.getPlate5());
-                                        break;
+                                membRowData.add(workTimeFormatter.format(workingTime));
+                                membRowData.add(salary.setScale(6, BigDecimal.ROUND_HALF_UP).toPlainString());
+                                membRowData.add(bonus.setScale(6, BigDecimal.ROUND_HALF_UP).toPlainString());
+                                membRowData.add(allowance.setScale(6, BigDecimal.ROUND_HALF_UP).toPlainString());
+                                membRowData.add(old.setScale(6, BigDecimal.ROUND_HALF_UP).toPlainString());
+                                membRowData.add(medical.setScale(6, BigDecimal.ROUND_HALF_UP).toPlainString());
+                                membRowData.add(loseJob.setScale(6, BigDecimal.ROUND_HALF_UP).toPlainString());
+                                membRowData.add(injury.setScale(6, BigDecimal.ROUND_HALF_UP).toPlainString());
+                                membRowData.add(house.setScale(6, BigDecimal.ROUND_HALF_UP).toPlainString());
+                                //自定义字段
+                                if (cusColList.size() > 0) {
+                                    membRowData.add(field1.setScale(6, BigDecimal.ROUND_HALF_UP).toPlainString());
                                 }
+                                if (cusColList.size() > 1) {
+                                    membRowData.add(field2.setScale(6, BigDecimal.ROUND_HALF_UP).toPlainString());
+                                }
+                                if (cusColList.size() > 2) {
+                                    membRowData.add(field3.setScale(6, BigDecimal.ROUND_HALF_UP).toPlainString());
+                                }
+                                if (cusColList.size() > 3) {
+                                    membRowData.add(field4.setScale(6, BigDecimal.ROUND_HALF_UP).toPlainString());
+                                }
+                                if (cusColList.size() > 4) {
+                                    membRowData.add(field5.setScale(6, BigDecimal.ROUND_HALF_UP).toPlainString());
+                                }
+                                if (cusColList.size() > 5) {
+                                    membRowData.add(field6.setScale(6, BigDecimal.ROUND_HALF_UP).toPlainString());
+                                }
+                                if (cusColList.size() > 6) {
+                                    membRowData.add(field7.setScale(6, BigDecimal.ROUND_HALF_UP).toPlainString());
+                                }
+                                membRowData.add(cost.setScale(6, BigDecimal.ROUND_HALF_UP).toPlainString());
+                                allList.add(membRowData);
                             }
-                            membRowData.add(workTimeFormatter.format(workingTime));
-                            membRowData.add(salary.setScale(6, BigDecimal.ROUND_HALF_UP).toPlainString());
-                            membRowData.add(bonus.setScale(6, BigDecimal.ROUND_HALF_UP).toPlainString());
-                            membRowData.add(allowance.setScale(6, BigDecimal.ROUND_HALF_UP).toPlainString());
-                            membRowData.add(old.setScale(6, BigDecimal.ROUND_HALF_UP).toPlainString());
-                            membRowData.add(medical.setScale(6, BigDecimal.ROUND_HALF_UP).toPlainString());
-                            membRowData.add(loseJob.setScale(6, BigDecimal.ROUND_HALF_UP).toPlainString());
-                            membRowData.add(injury.setScale(6, BigDecimal.ROUND_HALF_UP).toPlainString());
-                            membRowData.add(house.setScale(6, BigDecimal.ROUND_HALF_UP).toPlainString());
-                            //自定义字段
-                            if (cusColList.size() > 0) {
-                                membRowData.add(field1.setScale(6, BigDecimal.ROUND_HALF_UP).toPlainString());
-                            }
-                            if (cusColList.size() > 1) {
-                                membRowData.add(field2.setScale(6, BigDecimal.ROUND_HALF_UP).toPlainString());
-                            }
-                            if (cusColList.size() > 2) {
-                                membRowData.add(field3.setScale(6, BigDecimal.ROUND_HALF_UP).toPlainString());
-                            }
-                            if (cusColList.size() > 3) {
-                                membRowData.add(field4.setScale(6, BigDecimal.ROUND_HALF_UP).toPlainString());
-                            }
-                            if (cusColList.size() > 4) {
-                                membRowData.add(field5.setScale(6, BigDecimal.ROUND_HALF_UP).toPlainString());
-                            }
-                            if (cusColList.size() > 5) {
-                                membRowData.add(field6.setScale(6, BigDecimal.ROUND_HALF_UP).toPlainString());
-                            }
-                            if (cusColList.size() > 6) {
-                                membRowData.add(field7.setScale(6, BigDecimal.ROUND_HALF_UP).toPlainString());
-                            }
-                            membRowData.add(cost.setScale(6, BigDecimal.ROUND_HALF_UP).toPlainString());
-                            allList.add(membRowData);
                         }
-                    }
 
-                    //无项目人员成本
-                    if (assignNoProUser != null && assignNoProUser) {
-                        for (Finance npu : noProjectUser) {
-                            List<String> membRowData = new ArrayList<String>();
-                            membRowData.add(p.projectCode);
-                            membRowData.add(p.project);
-                            Double workingTime = new Double(0);
-                            Finance userFinance = npu;
-                            Optional<Map> op = noPUserDataList.stream().filter(map->((Integer)map.get("projectId")).equals(p.projectId) && ((String)map.get("creatorId")).equals(npu.getUserId())).findFirst();
-                            if (op.isPresent()) {
-                                Map percentMap = op.get();
-                                double percent = (double)percentMap.get("percent");
-                                if (percent > 0) {
-                                    //各项收入按比例计算,累加到当前项目上
-                                    Finance newFinance = Finance.getByPercent(npu, percent);
-
-                                    BigDecimal cost = newFinance.getTotalCost();
-                                    BigDecimal salary = newFinance.getMonthCost();
-                                    BigDecimal bonus = newFinance.getBonus();
-                                    BigDecimal allowance = newFinance.getAllowance();
-                                    BigDecimal old = newFinance.getInsuranceOld();
-                                    BigDecimal medical = newFinance.getInsuranceMedical();
-                                    BigDecimal loseJob = newFinance.getInsuranceLosejob();
-                                    BigDecimal injury = newFinance.getInsuranceInjury();
-                                    BigDecimal house = newFinance.getHouseFund();
-                                    BigDecimal field1 = newFinance.getCustomField1() == null? new BigDecimal(0):newFinance.getCustomField1();
-                                    BigDecimal field2 = newFinance.getCustomField2() == null? new BigDecimal(0):newFinance.getCustomField2();
-                                    BigDecimal field3 = newFinance.getCustomField3() == null? new BigDecimal(0):newFinance.getCustomField3();
-                                    BigDecimal field4 = newFinance.getCustomField4() == null? new BigDecimal(0):newFinance.getCustomField4();
-                                    BigDecimal field5 = newFinance.getCustomField5() == null? new BigDecimal(0):newFinance.getCustomField5();
-                                    BigDecimal field6 = newFinance.getCustomField6() == null? new BigDecimal(0):newFinance.getCustomField6();
-                                    BigDecimal field7 = newFinance.getCustomField7() == null? new BigDecimal(0):newFinance.getCustomField7();
-                                    User us = userList.stream().filter(u->u.getId().equals(npu.getUserId())).findFirst().get();
-                                    if(wxCorpInfo!=null&&wxCorpInfo.getSaasSyncContact()==1){
-                                        membRowData.add("$userName="+(us.getCorpwxUserid()==null?"":us.getCorpwxUserid())+"$");
-                                    }else if(dingding!=null&&dingding.getContactNeedTranslate()==1){
-                                        membRowData.add("$userName="+us.getDingdingUserid()+"$");
-                                    }else {
-                                        membRowData.add(npu.getName());
-                                    }
-
-                                    //增加部门
-                                    Optional<Department> first = allDepartments.stream().filter(dp -> dp.getDepartmentId().equals(us.getDepartmentId())).findFirst();
-                                    if (first.isPresent()) {
+                        //无项目人员成本
+                        if (assignNoProUser != null && assignNoProUser) {
+                            for (Finance npu : noProjectUser) {
+                                List<String> membRowData = new ArrayList<String>();
+                                membRowData.add(p.projectCode);
+                                membRowData.add(p.project);
+                                Double workingTime = new Double(0);
+                                Finance userFinance = npu;
+                                Optional<Map> op = noPUserDataList.stream().filter(map->((Integer)map.get("projectId")).equals(p.projectId) && ((String)map.get("creatorId")).equals(npu.getUserId())).findFirst();
+                                if (op.isPresent()) {
+                                    Map percentMap = op.get();
+                                    double percent = (double)percentMap.get("percent");
+                                    if (percent > 0) {
+                                        //各项收入按比例计算,累加到当前项目上
+                                        Finance newFinance = Finance.getByPercent(npu, percent);
+
+                                        BigDecimal cost = newFinance.getTotalCost();
+                                        BigDecimal salary = newFinance.getMonthCost();
+                                        BigDecimal bonus = newFinance.getBonus();
+                                        BigDecimal allowance = newFinance.getAllowance();
+                                        BigDecimal old = newFinance.getInsuranceOld();
+                                        BigDecimal medical = newFinance.getInsuranceMedical();
+                                        BigDecimal loseJob = newFinance.getInsuranceLosejob();
+                                        BigDecimal injury = newFinance.getInsuranceInjury();
+                                        BigDecimal house = newFinance.getHouseFund();
+                                        BigDecimal field1 = newFinance.getCustomField1() == null? new BigDecimal(0):newFinance.getCustomField1();
+                                        BigDecimal field2 = newFinance.getCustomField2() == null? new BigDecimal(0):newFinance.getCustomField2();
+                                        BigDecimal field3 = newFinance.getCustomField3() == null? new BigDecimal(0):newFinance.getCustomField3();
+                                        BigDecimal field4 = newFinance.getCustomField4() == null? new BigDecimal(0):newFinance.getCustomField4();
+                                        BigDecimal field5 = newFinance.getCustomField5() == null? new BigDecimal(0):newFinance.getCustomField5();
+                                        BigDecimal field6 = newFinance.getCustomField6() == null? new BigDecimal(0):newFinance.getCustomField6();
+                                        BigDecimal field7 = newFinance.getCustomField7() == null? new BigDecimal(0):newFinance.getCustomField7();
+                                        User us = userList.stream().filter(u->u.getId().equals(npu.getUserId())).findFirst().get();
                                         if(wxCorpInfo!=null&&wxCorpInfo.getSaasSyncContact()==1){
-                                            membRowData.add("$departmentName="+(first.get().getCorpwxDeptid()==null?"":first.get().getCorpwxDeptid())+"$");
+                                            membRowData.add("$userName="+(us.getCorpwxUserid()==null?"":us.getCorpwxUserid())+"$");
                                         }else if(dingding!=null&&dingding.getContactNeedTranslate()==1){
-                                            membRowData.add("$departmentName="+(first.get().getDdDeptid()==null?"":first.get().getDdDeptid())+"$");
+                                            membRowData.add("$userName="+us.getDingdingUserid()+"$");
                                         }else {
-                                            membRowData.add(first.get().getDepartmentName());
+                                            membRowData.add(npu.getName());
                                         }
-                                    } else {
-                                        membRowData.add("");
-                                    }
-                                    //自定义字段的显示
-                                    for (int i = 0; i < userCustoms.size(); i++) {
-                                        switch (i){
-                                            case 0:
-                                                membRowData.add(us.getPlate1()==null?"":us.getPlate1());
-                                                break;
-                                            case 1:
-                                                membRowData.add(us.getPlate2()==null?"":us.getPlate2());
-                                                break;
-                                            case 2:
-                                                membRowData.add(us.getPlate3()==null?"":us.getPlate3());
-                                                break;
-                                            case 3:
-                                                membRowData.add(us.getPlate4()==null?"":us.getPlate4());
-                                                break;
-                                            case 4:
-                                                membRowData.add(us.getPlate5()==null?"":us.getPlate5());
-                                                break;
+
+                                        //增加部门
+                                        Optional<Department> first = allDepartments.stream().filter(dp -> dp.getDepartmentId().equals(us.getDepartmentId())).findFirst();
+                                        if (first.isPresent()) {
+                                            if(wxCorpInfo!=null&&wxCorpInfo.getSaasSyncContact()==1){
+                                                membRowData.add("$departmentName="+(first.get().getCorpwxDeptid()==null?"":first.get().getCorpwxDeptid())+"$");
+                                            }else if(dingding!=null&&dingding.getContactNeedTranslate()==1){
+                                                membRowData.add("$departmentName="+(first.get().getDdDeptid()==null?"":first.get().getDdDeptid())+"$");
+                                            }else {
+                                                membRowData.add(first.get().getDepartmentName());
+                                            }
+                                        } else {
+                                            membRowData.add("");
                                         }
+                                        //自定义字段的显示
+                                        for (int i = 0; i < userCustoms.size(); i++) {
+                                            switch (i){
+                                                case 0:
+                                                    membRowData.add(us.getPlate1()==null?"":us.getPlate1());
+                                                    break;
+                                                case 1:
+                                                    membRowData.add(us.getPlate2()==null?"":us.getPlate2());
+                                                    break;
+                                                case 2:
+                                                    membRowData.add(us.getPlate3()==null?"":us.getPlate3());
+                                                    break;
+                                                case 3:
+                                                    membRowData.add(us.getPlate4()==null?"":us.getPlate4());
+                                                    break;
+                                                case 4:
+                                                    membRowData.add(us.getPlate5()==null?"":us.getPlate5());
+                                                    break;
+                                            }
+                                        }
+                                        membRowData.add(workTimeFormatter.format(workingTime));
+                                        membRowData.add(salary.setScale(6, BigDecimal.ROUND_HALF_UP).toPlainString());
+                                        membRowData.add(bonus.setScale(6, BigDecimal.ROUND_HALF_UP).toPlainString());
+                                        membRowData.add(allowance.setScale(6, BigDecimal.ROUND_HALF_UP).toPlainString());
+                                        membRowData.add(old.setScale(6, BigDecimal.ROUND_HALF_UP).toPlainString());
+                                        membRowData.add(medical.setScale(6, BigDecimal.ROUND_HALF_UP).toPlainString());
+                                        membRowData.add(loseJob.setScale(6, BigDecimal.ROUND_HALF_UP).toPlainString());
+                                        membRowData.add(injury.setScale(6, BigDecimal.ROUND_HALF_UP).toPlainString());
+                                        membRowData.add(house.setScale(6, BigDecimal.ROUND_HALF_UP).toPlainString());
+                                        //自定义字段
+                                        if (cusColList.size() > 0) {
+                                            membRowData.add(field1.setScale(6, BigDecimal.ROUND_HALF_UP).toPlainString());
+                                        }
+                                        if (cusColList.size() > 1) {
+                                            membRowData.add(field2.setScale(6, BigDecimal.ROUND_HALF_UP).toPlainString());
+                                        }
+                                        if (cusColList.size() > 2) {
+                                            membRowData.add(field3.setScale(6, BigDecimal.ROUND_HALF_UP).toPlainString());
+                                        }
+                                        if (cusColList.size() > 3) {
+                                            membRowData.add(field4.setScale(6, BigDecimal.ROUND_HALF_UP).toPlainString());
+                                        }
+                                        if (cusColList.size() > 4) {
+                                            membRowData.add(field5.setScale(6, BigDecimal.ROUND_HALF_UP).toPlainString());
+                                        }
+                                        if (cusColList.size() > 5) {
+                                            membRowData.add(field6.setScale(6, BigDecimal.ROUND_HALF_UP).toPlainString());
+                                        }
+                                        if (cusColList.size() > 6) {
+                                            membRowData.add(field7.setScale(6, BigDecimal.ROUND_HALF_UP).toPlainString());
+                                        }
+                                        membRowData.add(cost.setScale(6, BigDecimal.ROUND_HALF_UP).toPlainString());
+                                        allList.add(membRowData);
                                     }
-                                    membRowData.add(workTimeFormatter.format(workingTime));
-                                    membRowData.add(salary.setScale(6, BigDecimal.ROUND_HALF_UP).toPlainString());
-                                    membRowData.add(bonus.setScale(6, BigDecimal.ROUND_HALF_UP).toPlainString());
-                                    membRowData.add(allowance.setScale(6, BigDecimal.ROUND_HALF_UP).toPlainString());
-                                    membRowData.add(old.setScale(6, BigDecimal.ROUND_HALF_UP).toPlainString());
-                                    membRowData.add(medical.setScale(6, BigDecimal.ROUND_HALF_UP).toPlainString());
-                                    membRowData.add(loseJob.setScale(6, BigDecimal.ROUND_HALF_UP).toPlainString());
-                                    membRowData.add(injury.setScale(6, BigDecimal.ROUND_HALF_UP).toPlainString());
-                                    membRowData.add(house.setScale(6, BigDecimal.ROUND_HALF_UP).toPlainString());
-                                    //自定义字段
-                                    if (cusColList.size() > 0) {
-                                        membRowData.add(field1.setScale(6, BigDecimal.ROUND_HALF_UP).toPlainString());
-                                    }
-                                    if (cusColList.size() > 1) {
-                                        membRowData.add(field2.setScale(6, BigDecimal.ROUND_HALF_UP).toPlainString());
-                                    }
-                                    if (cusColList.size() > 2) {
-                                        membRowData.add(field3.setScale(6, BigDecimal.ROUND_HALF_UP).toPlainString());
-                                    }
-                                    if (cusColList.size() > 3) {
-                                        membRowData.add(field4.setScale(6, BigDecimal.ROUND_HALF_UP).toPlainString());
-                                    }
-                                    if (cusColList.size() > 4) {
-                                        membRowData.add(field5.setScale(6, BigDecimal.ROUND_HALF_UP).toPlainString());
-                                    }
-                                    if (cusColList.size() > 5) {
-                                        membRowData.add(field6.setScale(6, BigDecimal.ROUND_HALF_UP).toPlainString());
-                                    }
-                                    if (cusColList.size() > 6) {
-                                        membRowData.add(field7.setScale(6, BigDecimal.ROUND_HALF_UP).toPlainString());
-                                    }
-                                    membRowData.add(cost.setScale(6, BigDecimal.ROUND_HALF_UP).toPlainString());
-                                    allList.add(membRowData);
                                 }
                             }
                         }
@@ -1565,18 +1603,20 @@ public class FinanceServiceImpl extends ServiceImpl<FinanceMapper, Finance> impl
                             multiSheetDataList[i].add(newRow);
                         }
                     }
-                    if(0 == onlyTotal){
-                        return excelExportService.exportMultiSheetGeneralExcelTotal(wxCorpInfo,dingding,fileName , multiSheetDataList, path, sheetNameList.toArray(new String[0]));
-
-                    }else{
-                        return excelExportService.exportMultiSheetGeneralExcelByTitleAndList(wxCorpInfo,dingding,fileName , multiSheetDataList, path, sheetNameList.toArray(new String[0]));
-                    }
+                    return excelExportService.exportMultiSheetGeneralExcelByTitleAndList(wxCorpInfo,dingding,fileName , multiSheetDataList, path, sheetNameList.toArray(new String[0]));
+//                    if(0 == onlyTotal){
+//                        return excelExportService.exportMultiSheetGeneralExcelTotal(wxCorpInfo,dingding,fileName , multiSheetDataList, path, sheetNameList.toArray(new String[0]));
+//
+//                    }else{
+//                        return excelExportService.exportMultiSheetGeneralExcelByTitleAndList(wxCorpInfo,dingding,fileName , multiSheetDataList, path, sheetNameList.toArray(new String[0]));
+//                    }
                 } else {
-                    if(0 == onlyTotal){
-                        return excelExportService.exportGeneralExcelTotal(wxCorpInfo,dingding,fileName , allList, path);
-                    }else{
-                        return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,dingding,fileName , allList, path);
-                    }
+                    return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,dingding,fileName , allList, path);
+//                    if(0 == onlyTotal){
+//                        return excelExportService.exportGeneralExcelTotal(wxCorpInfo,dingding,fileName , allList, path);
+//                    }else{
+//                        return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,dingding,fileName , allList, path);
+//                    }
                 }
             } catch (Exception e) {
                 e.printStackTrace();

+ 10 - 0
fhKeeper/formulahousekeeper/timesheet/src/views/contract/components/contractManagement.vue

@@ -81,6 +81,7 @@
     <el-table :data="contractList" v-loading="listLoading" :height="tableHeight" border highlight-current-row>
       <el-table-column prop="number" :label="$t('contractno')" min-width="190"></el-table-column>
       <el-table-column prop="name" :label="$t('he-tong-ming-cheng')" min-width="190"></el-table-column>
+      <el-table-column prop="projectName" :label="$t('rselatedprojects')" min-width="190"></el-table-column>
       <el-table-column prop="amounts" :label="$t('contractamount')" min-width="135" align="right" header-align="center">
         <span slot-scope="scope">¥ {{scope.row.amounts ? scope.row.amounts.toFixed(2) : '0.00'}}</span>
       </el-table-column>
@@ -256,6 +257,10 @@
           <el-form-item :label="$t('he-tong-ming-cheng')">
             {{contractForm.name}}
           </el-form-item>
+          <el-form-item :label="$t('rselatedprojects')">
+            {{contractForm.projectName}}
+          </el-form-item>
+          
           <el-form-item :label="$t('contractamount')">
             ¥ {{contractForm.amounts}}
           </el-form-item>
@@ -917,6 +922,11 @@ export default {
           }
           this.submitLoading = true
           delete this.contractForm.files
+          delete this.contractForm.msg
+          delete this.contractForm.nextPaymentDate
+          delete this.contractForm.nextPaymentAmount
+          delete this.contractForm.payCustomizedData
+          delete this.contractForm.checkerId
           this.contractForm.paymentListStr = JSON.stringify(this.contractPaymentList);
           this.http.post(this.dialogTitle == this.$t('add') ? '/contract/addContract' : '/contract/editContract',this.contractForm,
           res => {