Pārlūkot izejas kodu

Merge branch 'master' of http://47.100.37.243:10191/wutt/manHourHousekeeper

Min 11 mēneši atpakaļ
vecāks
revīzija
3e4ff8744a
45 mainītis faili ar 1298 papildinājumiem un 194 dzēšanām
  1. 4 1
      fhKeeper/formulahousekeeper/customerBuler-crm/src/components/relatedProducts/relatedProducts.vue
  2. 1 1
      fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/business/component/stageSetting.vue
  3. 7 2
      fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/customer/index.vue
  4. 2 0
      fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/order/api.ts
  5. 132 10
      fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/order/index.vue
  6. 1 0
      fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/thread/constant.ts
  7. 14 3
      fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/thread/index.vue
  8. 7 3
      fhKeeper/formulahousekeeper/management-crm/src/main/java/com/management/platform/controller/BusinessOpportunityController.java
  9. 5 0
      fhKeeper/formulahousekeeper/management-crm/src/main/java/com/management/platform/entity/Stage.java
  10. 2 1
      fhKeeper/formulahousekeeper/management-crm/src/main/java/com/management/platform/service/ClueService.java
  11. 2 2
      fhKeeper/formulahousekeeper/management-crm/src/main/java/com/management/platform/service/StageService.java
  12. 2 1
      fhKeeper/formulahousekeeper/management-crm/src/main/java/com/management/platform/service/impl/BusinessOpportunityServiceImpl.java
  13. 84 25
      fhKeeper/formulahousekeeper/management-crm/src/main/java/com/management/platform/service/impl/ClueServiceImpl.java
  14. 5 10
      fhKeeper/formulahousekeeper/management-crm/src/main/java/com/management/platform/service/impl/CustomServiceImpl.java
  15. 16 4
      fhKeeper/formulahousekeeper/management-crm/src/main/java/com/management/platform/service/impl/StageServiceImpl.java
  16. 30 3
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/ReportController.java
  17. 2 1
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/mapper/ReportMapper.java
  18. 5 1
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ReportBatchServiceImpl.java
  19. 78 2
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ReportServiceImpl.java
  20. 18 5
      fhKeeper/formulahousekeeper/management-platform/src/main/resources/mapper/ReportMapper.xml
  21. 21 0
      fhKeeper/formulahousekeeper/management-workshop-stand/src/main/java/com/management/platform/controller/DepartmentQualityManagerController.java
  22. 21 0
      fhKeeper/formulahousekeeper/management-workshop-stand/src/main/java/com/management/platform/controller/ProdProcedureCopyController.java
  23. 105 0
      fhKeeper/formulahousekeeper/management-workshop-stand/src/main/java/com/management/platform/controller/UpdatePackController.java
  24. 48 0
      fhKeeper/formulahousekeeper/management-workshop-stand/src/main/java/com/management/platform/entity/DepartmentQualityManager.java
  25. 85 0
      fhKeeper/formulahousekeeper/management-workshop-stand/src/main/java/com/management/platform/entity/ProdProcedureCopy.java
  26. 76 0
      fhKeeper/formulahousekeeper/management-workshop-stand/src/main/java/com/management/platform/entity/UpdatePack.java
  27. 16 0
      fhKeeper/formulahousekeeper/management-workshop-stand/src/main/java/com/management/platform/mapper/DepartmentQualityManagerMapper.java
  28. 16 0
      fhKeeper/formulahousekeeper/management-workshop-stand/src/main/java/com/management/platform/mapper/ProdProcedureCopyMapper.java
  29. 16 0
      fhKeeper/formulahousekeeper/management-workshop-stand/src/main/java/com/management/platform/mapper/UpdatePackMapper.java
  30. 16 0
      fhKeeper/formulahousekeeper/management-workshop-stand/src/main/java/com/management/platform/service/DepartmentQualityManagerService.java
  31. 16 0
      fhKeeper/formulahousekeeper/management-workshop-stand/src/main/java/com/management/platform/service/ProdProcedureCopyService.java
  32. 16 0
      fhKeeper/formulahousekeeper/management-workshop-stand/src/main/java/com/management/platform/service/UpdatePackService.java
  33. 20 0
      fhKeeper/formulahousekeeper/management-workshop-stand/src/main/java/com/management/platform/service/impl/DepartmentQualityManagerServiceImpl.java
  34. 20 0
      fhKeeper/formulahousekeeper/management-workshop-stand/src/main/java/com/management/platform/service/impl/ProdProcedureCopyServiceImpl.java
  35. 20 0
      fhKeeper/formulahousekeeper/management-workshop-stand/src/main/java/com/management/platform/service/impl/UpdatePackServiceImpl.java
  36. 150 0
      fhKeeper/formulahousekeeper/management-workshop-stand/src/main/java/com/management/platform/util/ZipUtils.java
  37. 18 0
      fhKeeper/formulahousekeeper/management-workshop-stand/src/main/resources/mapper/DepartmentQualityManagerMapper.xml
  38. 23 0
      fhKeeper/formulahousekeeper/management-workshop-stand/src/main/resources/mapper/ProdProcedureCopyMapper.xml
  39. 21 0
      fhKeeper/formulahousekeeper/management-workshop-stand/src/main/resources/mapper/UpdatePackMapper.xml
  40. 3 4
      fhKeeper/formulahousekeeper/timesheet/src/views/project/cost.vue
  41. 1 1
      fhKeeper/formulahousekeeper/timesheet/src/views/settings/timetype.vue
  42. 47 37
      fhKeeper/formulahousekeeper/timesheet/src/views/workReport/daily.vue
  43. 49 40
      fhKeeper/formulahousekeeper/timesheet/src/views/workReport/list.vue
  44. 27 17
      fhKeeper/formulahousekeeper/timesheet_h5/src/views/review/index.vue
  45. 30 20
      fhKeeper/formulahousekeeper/timesheet_h5/src/views/view/index.vue

+ 4 - 1
fhKeeper/formulahousekeeper/customerBuler-crm/src/components/relatedProducts/relatedProducts.vue

@@ -114,9 +114,12 @@ function deteleTableItem(index: number) {
 function returnData() {
 function returnData() {
     let jsonstr = JSON.stringify(productTable.value)
     let jsonstr = JSON.stringify(productTable.value)
     let json = '[{"index":0}]'
     let json = '[{"index":0}]'
-    if(jsonstr == json) {
+    if (jsonstr == json) {
         return false
         return false
     }
     }
+    productTable.value.forEach(item => {
+        delete item.index
+    });
     return productTable.value
     return productTable.value
 }
 }
 
 

+ 1 - 1
fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/business/component/stageSetting.vue

@@ -126,7 +126,7 @@ function saveState() {
         }
         }
     })
     })
     allLoading.saveLoading = true
     allLoading.saveLoading = true
-    post(BUSIESS_SAVESAIE, { list: JSON.stringify(data) }).then(() => {
+    post(BUSIESS_SAVESAIE, { stages: JSON.stringify(data) }).then(() => {
         globalPopup?.showSuccess('保存成功')
         globalPopup?.showSuccess('保存成功')
         cancel()
         cancel()
     }).finally(() => {
     }).finally(() => {

+ 7 - 2
fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/customer/index.vue

@@ -378,11 +378,11 @@ function editCustomerSave(flag: boolean) {
 
 
 function editCustomer(row: any) { // row 有数据代表编辑
 function editCustomer(row: any) { // row 有数据代表编辑
   if (row) {
   if (row) {
-    const { id, companyPhone, customName, inchargerId, createTime, customSourceId, customerIndustryId, customerLevelId, email } = row
+    const { id, companyPhone, customName, inchargerId, createTime, customSourceId, customerIndustryId, customerLevelId, email, telPhone } = row
     const formVal = {
     const formVal = {
       id, customName, inchargerId, customerIndustryId, customerLevelId, email, customSourceId,
       id, customName, inchargerId, customerIndustryId, customerLevelId, email, customSourceId,
       createTime: formatDate(new Date(createTime)),
       createTime: formatDate(new Date(createTime)),
-      telPhone: companyPhone,
+      telPhone, companyPhone
     }
     }
     allLoading.customerTemplateRefLoading = true
     allLoading.customerTemplateRefLoading = true
     setTimeout(() => {
     setTimeout(() => {
@@ -392,6 +392,11 @@ function editCustomer(row: any) { // row 有数据代表编辑
     customerTemplateValue.value = formVal
     customerTemplateValue.value = formVal
     allText.editCustomerText = '编辑客户'
     allText.editCustomerText = '编辑客户'
   } else { // 没有数据代表新建
   } else { // 没有数据代表新建
+    setTimeout(() => {
+      console.log(customerTemplateRef.value)
+      customerTemplateValue.value = {}
+      customerTemplateRefKey.value++
+    }, 200)
     allText.editCustomerText = '新增客户'
     allText.editCustomerText = '新增客户'
   }
   }
   showVisible('editCustomerVisible')
   showVisible('editCustomerVisible')

+ 2 - 0
fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/order/api.ts

@@ -5,7 +5,9 @@ export const GETSYSFILED = "/sys-dict/getListByCode";
 export const GETPERSONNEL = "/user/getSimpleActiveUserList";
 export const GETPERSONNEL = "/user/getSimpleActiveUserList";
 export const GETGENERATEFOEM = `/sys-form/getListByCode${MOD}`
 export const GETGENERATEFOEM = `/sys-form/getListByCode${MOD}`
 export const GETALLPRODUCT = `/sys-form/getListByCode/Order`
 export const GETALLPRODUCT = `/sys-form/getListByCode/Order`
+export const GETTABLELISTPRODUCT = `/product/list`
 export const GETTABLELIST = `${MOD}/list`
 export const GETTABLELIST = `${MOD}/list`
+export const URL_OEDERUPDATE = `${MOD}/addOrUpdate`
 
 
 export const tableColumns: TableColumn[] = [
 export const tableColumns: TableColumn[] = [
     { prop: 'orderCode', label: '订单编号', event: 'toDetali', width: '150' },
     { prop: 'orderCode', label: '订单编号', event: 'toDetali', width: '150' },

+ 132 - 10
fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/order/index.vue

@@ -36,7 +36,7 @@
       <div class="bg-white w-full h-full p-3 shadow-md rounded-md flex flex-col">
       <div class="bg-white w-full h-full p-3 shadow-md rounded-md flex flex-col">
         <div class="flex justify-end pb-3">
         <div class="flex justify-end pb-3">
           <!-- 操作按钮 -->
           <!-- 操作按钮 -->
-          <el-button v-permission="['aabbc']" type="primary">新建订单</el-button>
+          <el-button type="primary" @click="editOrder(false)">新建订单</el-button>
           <el-button type="primary">批量转移</el-button>
           <el-button type="primary">批量转移</el-button>
           <el-button type="primary">批量删除</el-button>
           <el-button type="primary">批量删除</el-button>
           <el-button type="primary">回收站</el-button>
           <el-button type="primary">回收站</el-button>
@@ -58,7 +58,7 @@
             </el-table-column>
             </el-table-column>
             <el-table-column :label="'操作'" :width="'200px'" fixed="right">
             <el-table-column :label="'操作'" :width="'200px'" fixed="right">
               <template #default="scope">
               <template #default="scope">
-                <el-button link type="primary" size="large">编辑</el-button>
+                <el-button link type="primary" size="large" @click="editOrder(scope.row)">编辑</el-button>
                 <el-button link type="primary" size="large">新建任务</el-button>
                 <el-button link type="primary" size="large">新建任务</el-button>
                 <el-button link type="danger" size="large">删除</el-button>
                 <el-button link type="danger" size="large">删除</el-button>
               </template>
               </template>
@@ -72,19 +72,43 @@
         </div>
         </div>
       </div>
       </div>
     </div>
     </div>
+
+    <!-- 弹窗 -->
+    <el-dialog v-model="allVisible.editOrderVisible" width="1000" :show-close="false" top="10vh">
+      <template #header="{ close, titleId, titleClass }">
+        <div class="flex justify-between items-center border-b pb-3 dialog-header">
+          <h4 :id="titleId">{{ allText.orderEditText }}</h4>
+          <div>
+            <el-button type="primary" :loading="allLoading.editSaveLading" @click="saveOrder(true)">保存并新建</el-button>
+            <el-button type="primary" :loading="allLoading.editSaveLading" @click="saveOrder(false)">保存</el-button>
+            <el-button @click="closeVisible('editOrderVisible')">取消</el-button>
+          </div>
+        </div>
+      </template>
+      <div class="h-[60vh] overflow-y-auto scroll-bar pt-3" v-loading="allLoading.orderTemplateLoadinng">
+        <GenerateForm ref="orderTemplateRef" :data="orderTemplate" :value="orderTemplateValue" />
+        <div>相关产品</div>
+        <RelatedProducts ref="relatedProductsRef" :productTableList="productTableList" />
+      </div>
+    </el-dialog>
   </div>
   </div>
 </template>
 </template>
 
 
 <script lang="ts" setup>
 <script lang="ts" setup>
 import { ref, reactive, onMounted, inject, defineExpose } from "vue";
 import { ref, reactive, onMounted, inject, defineExpose } from "vue";
-import { getAllListByCode, getFromValue, resetFromValue, getFirstDayOfMonth, getLastDayOfMonth, formatDate } from '@/utils/tools'
+import { getAllListByCode, getFromValue, resetFromValue, getFirstDayOfMonth, getLastDayOfMonth, formatDate, getTemplateKey } from '@/utils/tools'
 import { post, get } from "@/utils/request";
 import { post, get } from "@/utils/request";
-import { tableColumns, GETSYSFILED, GETPERSONNEL, GETGENERATEFOEM, MOD, GETTABLELIST, GETALLPRODUCT } from "./api";
+import { tableColumns, GETSYSFILED, GETPERSONNEL, GETGENERATEFOEM, MOD, GETTABLELIST, GETALLPRODUCT, GETTABLELISTPRODUCT, URL_OEDERUPDATE } from "./api";
 import { useRouter, useRoute } from "vue-router";
 import { useRouter, useRoute } from "vue-router";
+import { GenerateForm } from '@zmjs/form-design';
 import { URL_FETALL } from "../customer/api";
 import { URL_FETALL } from "../customer/api";
 
 
-const router = useRouter()
+import RelatedProducts from '@/components/relatedProducts/relatedProducts.vue'
+import TaskModal from '@/components/TaskModal/index.vue'
+import { formatDateTime } from "@/utils/times";
 
 
+const router = useRouter()
+const globalPopup = inject<GlobalPopup>('globalPopup')
 const filterForm = reactive<FilterForm>({ // 筛选条件 Value
 const filterForm = reactive<FilterForm>({ // 筛选条件 Value
   contactPerson: "",
   contactPerson: "",
   customerId: "",
   customerId: "",
@@ -102,19 +126,82 @@ const selectData = reactive({ // 下拉数据
   RemittanceStatus: [{ id: 0, name: '已回款' }, { id: 1, name: '未回款' }, { id: 2, name: '已完全回款' }] as any[], // 回款状态
   RemittanceStatus: [{ id: 0, name: '已回款' }, { id: 1, name: '未回款' }, { id: 2, name: '已完全回款' }] as any[], // 回款状态
   AllProduct: [] as any[] // 所有产品
   AllProduct: [] as any[] // 所有产品
 })
 })
-const filterItems = ref<FilterItem[]>([]) // 渲染筛选条件
 const formTablePaging = reactive({ // 分页条件
 const formTablePaging = reactive({ // 分页条件
   currentPage: 1,
   currentPage: 1,
   pageSize: 10,
   pageSize: 10,
   total: 0,
   total: 0,
 })
 })
-const formTable = ref([]) // 表格数据
 const allLoading = reactive({ // 按钮加载 Loading
 const allLoading = reactive({ // 按钮加载 Loading
   formTableLading: false,
   formTableLading: false,
+  editSaveLading: false,
+  orderTemplateLoadinng: false
 })
 })
 const allVisible = reactive({
 const allVisible = reactive({
-
+  editOrderVisible: false
 })
 })
+const allText = reactive({
+  orderEditText: '新建订单'
+})
+const orderTemplate = ref({
+  list: [],
+  config: {}
+})
+const orderTemplateValue = ref({})
+const orderTemplateKey = ref(1)
+const orderTemplateRef = ref<typeof GenerateForm>()
+const relatedProductsRef = ref<typeof RelatedProducts>()
+const filterItems = ref<FilterItem[]>([]) // 渲染筛选条件
+const formTable = ref([]) // 表格数据
+const productTableList = ref([])
+
+function saveOrder(flag: boolean) {
+  orderTemplateRef.value?.getData().then((res: any) => {
+    let productTableListData = relatedProductsRef?.value?.returnData()
+    const produt = productTableListData ? JSON.stringify(productTableListData) : []
+    allLoading.editSaveLading = true
+    post(URL_OEDERUPDATE, { 
+      ...res, 
+      orderEndDate: res.orderEndDate ? formatDate(res.orderEndDate) : '',
+      orderStartDate: res.orderStartDate ? formatDate(res.orderStartDate) : '',
+      orderProductDetailString: produt
+    }).then((_res) => {
+      allVisible.editOrderVisible = flag
+      globalPopup?.showSuccess('保存成功')
+      if (flag) {
+        orderTemplateRef.value?.reset()
+      }
+      getTableList()
+    }).finally(() => {
+      allLoading.editSaveLading = false
+    })
+  }).catch((_err: any) => {
+    console.log(_err)
+    globalPopup?.showError('请填写完整')
+  })
+}
+
+function editOrder(item: any) {
+  showVisible('editOrderVisible')
+  allLoading.orderTemplateLoadinng = true
+  if (item) {
+    const templateKey = getTemplateKey(orderTemplate.value.list)
+    let formVal: templateKey = {}
+    for (let i = 0; i < orderTemplate.value.list.length; i++) {
+      const key = templateKey[i]
+      formVal[key] = item[key]
+    }
+    orderTemplateValue.value = JSON.parse(JSON.stringify(item))
+    allText.orderEditText = '编辑订单'
+  }
+  if (!item) {
+    orderTemplateValue.value = {}
+  }
+  setTimeout(() => {
+    orderTemplateRef.value && orderTemplateRef.value.reset()
+    orderTemplateKey.value++
+    allLoading.orderTemplateLoadinng = false
+  }, 500)
+}
 
 
 function toDetali(row: any) {
 function toDetali(row: any) {
   router.push({
   router.push({
@@ -171,12 +258,20 @@ async function getSystemField() {
     const { id, customName } = item
     const { id, customName } = item
     return { id, name: customName }
     return { id, name: customName }
   })
   })
-  // const res = await get(GETGENERATEFOEM)
-  // generateFormData.value = JSON.parse(res.data[0].config)
+  const res = await get(GETGENERATEFOEM)
+  orderTemplate.value = JSON.parse(res.data[0].config)
 
 
   setFilterItems()
   setFilterItems()
 }
 }
 
 
+function showVisible(type: keyof typeof allVisible) { // 显示弹窗
+  allVisible[type] = true
+}
+
+function closeVisible(type: keyof typeof allVisible) {
+  allVisible[type] = false
+}
+
 function setFilterItems() {
 function setFilterItems() {
   filterItems.value = [
   filterItems.value = [
     { label: '订单编号', key: 'orderCode', type: 'input' },
     { label: '订单编号', key: 'orderCode', type: 'input' },
@@ -190,10 +285,37 @@ function setFilterItems() {
   ]
   ]
 }
 }
 
 
+function getProductTableList() {
+  post(GETTABLELISTPRODUCT, { pageIndex: -1, pageSize: -1 }).then((res) => {
+    if (res.code == 'ok') {
+      const { record, total } = res.data
+      productTableList.value = record.map((item: any) => {
+        const { id, productName, productCode, unit, unitName, typeName, type, price, inventory } = item
+        return {
+          id,
+          productId: id,
+          productName,
+          productCode,
+          unit,
+          unitName,
+          price,
+          type,
+          typeName,
+          inventory,
+          quantity: '',
+          discount: '',
+          totalPrice: ''
+        }
+      })
+    }
+  })
+}
+
 onMounted(() => {
 onMounted(() => {
   getSystemField()
   getSystemField()
   getAllProduct()
   getAllProduct()
   getTableList()
   getTableList()
+  getProductTableList()
 })
 })
 </script>
 </script>
 
 

+ 1 - 0
fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/thread/constant.ts

@@ -18,3 +18,4 @@ export const DEYELWCLUE = `${prefix}/listDeleterClue`
 export const DETERDETELE = `${prefix}/deleterDelete`
 export const DETERDETELE = `${prefix}/deleterDelete`
 export const ROLLBACK = `${prefix}/rollback`
 export const ROLLBACK = `${prefix}/rollback`
 export const URL_IMPORTTHREAD = `${prefix}/importData`
 export const URL_IMPORTTHREAD = `${prefix}/importData`
+export const URL_EXPOERTHREAD = `${prefix}/exportData`

+ 14 - 3
fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/thread/index.vue

@@ -57,7 +57,7 @@
           <el-button type="primary" @click="batchDeletes()">批量删除</el-button>
           <el-button type="primary" @click="batchDeletes()">批量删除</el-button>
           <el-button type="primary" @click="showDeteleClue(true)">回收站</el-button>
           <el-button type="primary" @click="showDeteleClue(true)">回收站</el-button>
           <el-button type="primary" @click="dialogVisible.importVisible = true">导入</el-button>
           <el-button type="primary" @click="dialogVisible.importVisible = true">导入</el-button>
-          <el-button type="primary">导出</el-button>
+          <el-button type="primary" @click="exportTheadTableList()" :loading="allLoading.exoprtLoading">导出</el-button>
         </div>
         </div>
         <div class="flex-1 w-full overflow-hidden">
         <div class="flex-1 w-full overflow-hidden">
           <el-table ref="clueTableRef" :data="clueTable" border v-loading="allLoading.clueTableLading"
           <el-table ref="clueTableRef" :data="clueTable" border v-loading="allLoading.clueTableLading"
@@ -169,8 +169,8 @@
 
 
 <script lang="ts" setup>
 <script lang="ts" setup>
 import { ref, reactive, onMounted, inject } from "vue";
 import { ref, reactive, onMounted, inject } from "vue";
-import { GETSYSFILED, MOD, IMPORMOD, GETPERSONNEL, GETTABLE, GETTEMPLATE, GETDETAIL, UNDATECLAIM, UNDATEFORM, DELTEROW, URL_IMPORTTHREAD } from './constant'
-import { getAllListByCode, getFromValue, resetFromValue, getFirstDayOfMonth, getLastDayOfMonth, formatDate, createTaskFromType, confirmAction, downloadTemplate } from '@/utils/tools'
+import { GETSYSFILED, MOD, IMPORMOD, GETPERSONNEL, GETTABLE, GETTEMPLATE, GETDETAIL, UNDATECLAIM, UNDATEFORM, DELTEROW, URL_IMPORTTHREAD, URL_EXPOERTHREAD } from './constant'
+import { getAllListByCode, getFromValue, resetFromValue, getFirstDayOfMonth, getLastDayOfMonth, formatDate, createTaskFromType, confirmAction, downloadTemplate, downloadFile } from '@/utils/tools'
 import { FormInstance, FormRules, ElMessageBox, ElTable, UploadRequestOptions } from 'element-plus'
 import { FormInstance, FormRules, ElMessageBox, ElTable, UploadRequestOptions } from 'element-plus'
 import { post, get, uploadFile } from "@/utils/request";
 import { post, get, uploadFile } from "@/utils/request";
 import { useRouter, useRoute } from "vue-router";
 import { useRouter, useRoute } from "vue-router";
@@ -219,6 +219,7 @@ const allLoading = reactive({
   generateFormLading: false,
   generateFormLading: false,
   clueLoading: false,
   clueLoading: false,
   importLoading: false,
   importLoading: false,
+  exoprtLoading: false,
 })
 })
 const dialogVisible = reactive({
 const dialogVisible = reactive({
   editClueDialogVisible: false,
   editClueDialogVisible: false,
@@ -256,6 +257,16 @@ const transferForm = reactive({
 
 
 
 
 // 定义方法
 // 定义方法
+function exportTheadTableList() {
+  allLoading.exoprtLoading = true
+  let valueForm = getFromValue(filterCriteriaForm)
+  post(URL_EXPOERTHREAD, {...valueForm}).then((res) => {
+    downloadFile(res.data, '线索表表导出.xlsx')
+  }).finally(() => {
+    allLoading.exoprtLoading = false
+  })
+}
+
 function newTask(item: any) {
 function newTask(item: any) {
   const { id } = item
   const { id } = item
   taskModalForm.value = { ...createTaskFromType(3), clueId: id, }
   taskModalForm.value = { ...createTaskFromType(3), clueId: id, }

+ 7 - 3
fhKeeper/formulahousekeeper/management-crm/src/main/java/com/management/platform/controller/BusinessOpportunityController.java

@@ -214,15 +214,19 @@ public class BusinessOpportunityController {
     public HttpRespMsg saveProduct(BusinessOpportunity bo , HttpServletRequest request) {
     public HttpRespMsg saveProduct(BusinessOpportunity bo , HttpServletRequest request) {
         User user = userMapper.selectById(request.getHeader("Token"));
         User user = userMapper.selectById(request.getHeader("Token"));
         return bOservice.saveProduct(bo,user);
         return bOservice.saveProduct(bo,user);
+    } @RequestMapping("saveContacts")
+    public HttpRespMsg saveContacts(BusinessOpportunity bo , HttpServletRequest request) {
+        User user = userMapper.selectById(request.getHeader("Token"));
+        return bOservice.saveProduct(bo,user);
     }
     }
 
 
     @RequestMapping("saveStage")
     @RequestMapping("saveStage")
-    public HttpRespMsg insertStage(List<Stage> stages, HttpServletRequest request) {
+    public HttpRespMsg insertStage(String stages, HttpServletRequest request) {
         return stageService.changeStage(stages,request);
         return stageService.changeStage(stages,request);
     }
     }
     @RequestMapping("getStage")
     @RequestMapping("getStage")
-    public HttpRespMsg Stage() {
-        return stageService.getStage();
+    public HttpRespMsg Stage(HttpServletRequest request) {
+        return stageService.getStage(request);
     }
     }
 
 
     private BusinessOpportunity setNull(BusinessOpportunity bo) {
     private BusinessOpportunity setNull(BusinessOpportunity bo) {

+ 5 - 0
fhKeeper/formulahousekeeper/management-crm/src/main/java/com/management/platform/entity/Stage.java

@@ -32,6 +32,11 @@ public class Stage extends Model<Stage> {
      */
      */
     @TableField("name")
     @TableField("name")
     private String name;
     private String name;
+    /**
+     * 公司id
+     */
+    @TableField("company_id")
+    private Integer companyId;
 
 
     /**
     /**
      * 进度
      * 进度

+ 2 - 1
fhKeeper/formulahousekeeper/management-crm/src/main/java/com/management/platform/service/ClueService.java

@@ -9,6 +9,7 @@ import org.springframework.web.multipart.MultipartFile;
 
 
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import javax.servlet.http.HttpServletResponse;
+import java.lang.reflect.InvocationTargetException;
 import java.util.List;
 import java.util.List;
 
 
 /**
 /**
@@ -54,5 +55,5 @@ public interface ClueService extends IService<Clue> {
 
 
     HttpRespMsg importData(MultipartFile multipartFile);
     HttpRespMsg importData(MultipartFile multipartFile);
 
 
-    HttpRespMsg exportData(Clue clue);
+    HttpRespMsg exportData(Clue clue) throws Exception;
 }
 }

+ 2 - 2
fhKeeper/formulahousekeeper/management-crm/src/main/java/com/management/platform/service/StageService.java

@@ -17,7 +17,7 @@ import java.util.List;
  */
  */
 public interface StageService extends IService<Stage> {
 public interface StageService extends IService<Stage> {
 
 
-    HttpRespMsg changeStage(List<Stage> stages, HttpServletRequest request);
+    HttpRespMsg changeStage(String stages, HttpServletRequest request);
 
 
-    HttpRespMsg getStage();
+    HttpRespMsg getStage(HttpServletRequest request);
 }
 }

+ 2 - 1
fhKeeper/formulahousekeeper/management-crm/src/main/java/com/management/platform/service/impl/BusinessOpportunityServiceImpl.java

@@ -79,7 +79,6 @@ public class BusinessOpportunityServiceImpl extends ServiceImpl<BusinessOpportun
         businessOpportunity.setUploadFilePList(uploadFileMapper.selectByInfoList("business",bo.getId()));
         businessOpportunity.setUploadFilePList(uploadFileMapper.selectByInfoList("business",bo.getId()));
         businessOpportunity.setTaskList(taskMapper.selectList(new QueryWrapper<Task>().eq("business_opportunity_id",bo.getId())));
         businessOpportunity.setTaskList(taskMapper.selectList(new QueryWrapper<Task>().eq("business_opportunity_id",bo.getId())));
         List<BusinessItemProduct> businessItemProducts = biMapper.selectListToBoId(bo.getId());
         List<BusinessItemProduct> businessItemProducts = biMapper.selectListToBoId(bo.getId());
-        businessOpportunity.setBusinessItemProducts(businessItemProducts);
         if (businessItemProducts.size() > 0){
         if (businessItemProducts.size() > 0){
             BigDecimal finalPrice = new BigDecimal(0);
             BigDecimal finalPrice = new BigDecimal(0);
             BigDecimal discountedPrice = new BigDecimal(0);
             BigDecimal discountedPrice = new BigDecimal(0);
@@ -96,6 +95,8 @@ public class BusinessOpportunityServiceImpl extends ServiceImpl<BusinessOpportun
             // 整单折扣率
             // 整单折扣率
             businessOpportunity.setFinalPrice(divide.multiply(new BigDecimal(100)));
             businessOpportunity.setFinalPrice(divide.multiply(new BigDecimal(100)));
         }
         }
+        businessOpportunity.setBusinessItemProducts(businessItemProducts);
+
         return businessOpportunity;
         return businessOpportunity;
     }
     }
 
 

+ 84 - 25
fhKeeper/formulahousekeeper/management-crm/src/main/java/com/management/platform/service/impl/ClueServiceImpl.java

@@ -42,6 +42,7 @@ import java.lang.reflect.Method;
 import java.math.BigDecimal;
 import java.math.BigDecimal;
 import java.net.URLEncoder;
 import java.net.URLEncoder;
 import java.time.LocalDate;
 import java.time.LocalDate;
+import java.time.LocalDateTime;
 import java.time.format.DateTimeFormatter;
 import java.time.format.DateTimeFormatter;
 import java.util.*;
 import java.util.*;
 
 
@@ -370,6 +371,7 @@ public class ClueServiceImpl extends ServiceImpl<ClueMapper, Clue> implements Cl
     }
     }
 
 
     @Override
     @Override
+    @Transactional(rollbackFor = Exception.class)
     public HttpRespMsg importData(MultipartFile multipartFile) {
     public HttpRespMsg importData(MultipartFile multipartFile) {
         HttpRespMsg msg=new HttpRespMsg();
         HttpRespMsg msg=new HttpRespMsg();
         String fileName = multipartFile.getOriginalFilename();
         String fileName = multipartFile.getOriginalFilename();
@@ -429,30 +431,30 @@ public class ClueServiceImpl extends ServiceImpl<ClueMapper, Clue> implements Cl
                     XSSFCell cell = row.getCell(i);
                     XSSFCell cell = row.getCell(i);
                     if(cell!=null){
                     if(cell!=null){
                         switch (item.getString("type")){
                         switch (item.getString("type")){
-                            case "time":cell.setCellType(CellType.NUMERIC);
-                                break;
+//                            case "time":cell.setCellType(CellType.NUMERIC);
+//                                break;
                             default:cell.setCellType(CellType.STRING);
                             default:cell.setCellType(CellType.STRING);
                         }
                         }
                     }
                     }
-//                    if(modelName.equals("inchargerId")){
-//                        System.out.println("=====");
-//                        System.out.println(modelName);
-//                        System.out.println(cell.toString());
-//                        if(!StringUtils.isEmpty(cell.getStringCellValue())){
-//                            userNameList.add(cell.getStringCellValue());
-//                        }
-//                    }
+                    if(modelName.equals("inchargerId")){
+                        System.out.println("=====");
+                        System.out.println(modelName);
+                        System.out.println(cell.toString());
+                        if(!StringUtils.isEmpty(cell.getStringCellValue())){
+                            userNameList.add(cell.getStringCellValue());
+                        }
+                    }
 
 
                 }
                 }
             }
             }
-//            System.out.println("参与搜索的人员列表"+userNameList + userNameList.size());
-//            if(wxCorpInfo!=null&&wxCorpInfo.getSaasSyncContact()==1&&userNameList.size()>0){
-//                respMsg = wxCorpInfoService.getBatchSearchUserInfo(wxCorpInfo, userNameList,null);
-//                if(respMsg.code.equals("0")){
-//                    msg.setError("姓名为["+String.valueOf(respMsg.data)+"]的人员存在重复,请使用工号!");
-//                    return msg;
-//                }
-//            }
+            System.out.println("参与搜索的人员列表"+userNameList + userNameList.size());
+            if(wxCorpInfo!=null&&wxCorpInfo.getSaasSyncContact()==1&&userNameList.size()>0){
+                respMsg = wxCorpInfoService.getBatchSearchUserInfo(wxCorpInfo, userNameList,null);
+                if(respMsg.code.equals("0")){
+                    msg.setError("姓名为["+String.valueOf(respMsg.data)+"]的人员存在重复,请使用工号!");
+                    return msg;
+                }
+            }
             List<User> targetUserList= (List<User>) respMsg.data;
             List<User> targetUserList= (List<User>) respMsg.data;
             //直接忽略空行 从row1开始
             //直接忽略空行 从row1开始
             for (int rowIndex = 1; rowIndex <= rowNum; rowIndex++) {
             for (int rowIndex = 1; rowIndex <= rowNum; rowIndex++) {
@@ -479,8 +481,8 @@ public class ClueServiceImpl extends ServiceImpl<ClueMapper, Clue> implements Cl
                     XSSFCell cell = row.getCell(i);
                     XSSFCell cell = row.getCell(i);
                     if(cell!=null){
                     if(cell!=null){
                         switch (item.getString("type")){
                         switch (item.getString("type")){
-                            case "time":cell.setCellType(CellType.NUMERIC);
-                                break;
+//                            case "time":cell.setCellType(CellType.NUMERIC);
+//                                break;
                             default:cell.setCellType(CellType.STRING);
                             default:cell.setCellType(CellType.STRING);
                         }
                         }
                     }
                     }
@@ -511,7 +513,7 @@ public class ClueServiceImpl extends ServiceImpl<ClueMapper, Clue> implements Cl
                                 return msg;
                                 return msg;
                             }
                             }
                         }
                         }
-                    }else if(modelName.equals("customLevel")){
+                    }else if(modelName.equals("customLevelId")){
                         if(!StringUtils.isEmpty(cell.getStringCellValue())){
                         if(!StringUtils.isEmpty(cell.getStringCellValue())){
                             Optional<SysDict> first = sysDictOfCustomLevel.stream().filter(s -> s.getName().equals(cell.getStringCellValue())).findFirst();
                             Optional<SysDict> first = sysDictOfCustomLevel.stream().filter(s -> s.getName().equals(cell.getStringCellValue())).findFirst();
                             if(first.isPresent()){
                             if(first.isPresent()){
@@ -520,7 +522,7 @@ public class ClueServiceImpl extends ServiceImpl<ClueMapper, Clue> implements Cl
                                 throw new Exception("客户级别["+cell.getStringCellValue()+"不存在,请在系统字典中增加");
                                 throw new Exception("客户级别["+cell.getStringCellValue()+"不存在,请在系统字典中增加");
                             }
                             }
                         }
                         }
-                    }else if(modelName.equals("clueSources")){
+                    }else if(modelName.equals("clueSourcesId")){
                        if(!StringUtils.isEmpty(cell.getStringCellValue())){
                        if(!StringUtils.isEmpty(cell.getStringCellValue())){
                            Optional<SysDict> first = sysDictOfClueSources.stream().filter(s -> s.getName().equals(cell.getStringCellValue())).findFirst();
                            Optional<SysDict> first = sysDictOfClueSources.stream().filter(s -> s.getName().equals(cell.getStringCellValue())).findFirst();
                            if(first.isPresent()){
                            if(first.isPresent()){
@@ -530,7 +532,7 @@ public class ClueServiceImpl extends ServiceImpl<ClueMapper, Clue> implements Cl
                                throw new Exception("线索来源["+cell.getStringCellValue()+"不存在,请在系统字典中增加");
                                throw new Exception("线索来源["+cell.getStringCellValue()+"不存在,请在系统字典中增加");
                            }
                            }
                        }
                        }
-                   }else if(modelName.equals("customIndustry")){
+                   }else if(modelName.equals("customIndustryId")){
                        if(!StringUtils.isEmpty(cell.getStringCellValue())){
                        if(!StringUtils.isEmpty(cell.getStringCellValue())){
                            Optional<SysDict> first = sysDictOfCustomIndustry.stream().filter(s -> s.getName().equals(cell.getStringCellValue())).findFirst();
                            Optional<SysDict> first = sysDictOfCustomIndustry.stream().filter(s -> s.getName().equals(cell.getStringCellValue())).findFirst();
                            if(first.isPresent()){
                            if(first.isPresent()){
@@ -565,8 +567,65 @@ public class ClueServiceImpl extends ServiceImpl<ClueMapper, Clue> implements Cl
     }
     }
 
 
     @Override
     @Override
-    public HttpRespMsg exportData(Clue clue) {
-        return null;
+    public HttpRespMsg exportData(Clue clue) throws Exception {
+        User user = userMapper.selectById(request.getHeader("token"));
+        SysForm sysForm = sysFormMapper.selectOne(new LambdaQueryWrapper<SysForm>().eq(SysForm::getCompanyId, user.getCompanyId()).eq(SysForm::getCode, "Thread").eq(SysForm::getIsCurrent, 1));
+        WxCorpInfo wxCorpInfo = wxCorpInfoService.getOne(new LambdaQueryWrapper<WxCorpInfo>().eq(WxCorpInfo::getCompanyId, user.getCompanyId()));
+        String config = sysForm.getConfig();
+        JSONObject configOb = JSON.parseObject(config);
+        JSONArray configObJSONArray = configOb.getJSONArray("list");
+        List<List<String>> dataList=new ArrayList<>();
+        List<String> titleList=new ArrayList<>();
+        for (int i = 0; i < configObJSONArray.size(); i++) {
+            JSONObject item = configObJSONArray.getJSONObject(i);
+            titleList.add(item.getString("label"));
+        }
+        dataList.add(titleList);
+        List<Clue> list1 = getList(clue);
+        for (Clue clue1 : list1) {
+            List<String> item=new ArrayList<>();
+            for (int i = 0; i < configObJSONArray.size(); i++) {
+                JSONObject target = configObJSONArray.getJSONObject(i);
+                if(target.getString("type").equals("grid")){
+                    JSONArray columns = target.getJSONArray("columns");
+                    for (int i1 = 0; i1 < columns.size(); i1++) {
+                        JSONObject columnsJSONObject = columns.getJSONObject(i1);
+                        JSONArray list = columnsJSONObject.getJSONArray("list");
+                        for (int i2 = 0; i2 < list.size(); i2++) {
+                            JSONObject object = list.getJSONObject(i2);
+                            String model = object.getString("model");
+                            String targetName = model.substring(0, 1).toUpperCase() + model.substring(1);
+                            Class<? extends Clue> aClass = clue1.getClass();
+                            String value = String.valueOf(aClass.getMethod("get" + targetName).invoke(clue1)==null?"":aClass.getMethod("get" + targetName).invoke(clue1));
+                            if(model.equals("inchargerId")){
+                                if(wxCorpInfo!=null&&wxCorpInfo.getSaasSyncContact()==1){
+                                    value = "$userName"+String.valueOf(aClass.getMethod("getInchargerName").invoke(clue1))+"$";
+                                }else {
+                                    value = String.valueOf(aClass.getMethod("getInchargerName").invoke(clue1));
+                                }
+                            }
+                            item.add(value);
+                        }
+                    }
+                }else {
+                    String model = target.getString("model");
+                    String targetName = model.substring(0, 1).toUpperCase() + model.substring(1);
+                    Class<? extends Clue> aClass = clue1.getClass();
+                    String value = String.valueOf(aClass.getMethod("get" + targetName).invoke(clue1)==null?"":aClass.getMethod("get" + targetName).invoke(clue1));
+                    if(model.equals("inchargerId")){
+                        if(wxCorpInfo!=null&&wxCorpInfo.getSaasSyncContact()==1){
+                            value = "$userName"+String.valueOf(aClass.getMethod("getInchargerName").invoke(clue1))+"$";
+                        }else {
+                            value = String.valueOf(aClass.getMethod("getInchargerName").invoke(clue1));
+                        }
+                    }
+                    item.add(value);
+                }
+            }
+            dataList.add(item);
+        }
+        String fileName="线索表导出_"+ System.currentTimeMillis();
+        return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,fileName,dataList,path);
     }
     }
 
 
 
 

+ 5 - 10
fhKeeper/formulahousekeeper/management-crm/src/main/java/com/management/platform/service/impl/CustomServiceImpl.java

@@ -184,21 +184,16 @@ public class CustomServiceImpl extends ServiceImpl<CustomMapper, Custom> impleme
         for (CustomItemContacts contact : contacts) {
         for (CustomItemContacts contact : contacts) {
             ids.add(contact.getCustomId());
             ids.add(contact.getCustomId());
         }
         }
-//        List<Contacts> cs = contactsMapper.selectList(new QueryWrapper<Contacts>().in("id", ids));
-        List<Contacts> cs = contactsMapper.selectListByIds(ids);
-        custom1.setContactsList(cs);
+        if (ids.size() > 0){
+            List<Contacts> cs = contactsMapper.selectListByIds(ids);
+            custom1.setContactsList(cs);
+        }
         HttpRespMsg httpRespMsg = new HttpRespMsg();
         HttpRespMsg httpRespMsg = new HttpRespMsg();
         httpRespMsg.setData(custom1);
         httpRespMsg.setData(custom1);
         return httpRespMsg;
         return httpRespMsg;
     }
     }
 
 
-//    @Override
-//    public HttpRespMsg getLog(Custom custom, HttpServletRequest request) {
-//        List<ActionLog> actionLogs = actionLogMapper.selectList(new QueryWrapper<ActionLog>().eq("code", "custom").eq("item_id", custom.getId()));
-//        HttpRespMsg httpRespMsg = new HttpRespMsg();
-//        httpRespMsg.setData(actionLogs);
-//        return httpRespMsg;
-//    }
+
 
 
     @Override
     @Override
     public HttpRespMsg getList(Custom custom, HttpServletRequest request) {
     public HttpRespMsg getList(Custom custom, HttpServletRequest request) {

+ 16 - 4
fhKeeper/formulahousekeeper/management-crm/src/main/java/com/management/platform/service/impl/StageServiceImpl.java

@@ -1,8 +1,15 @@
 package com.management.platform.service.impl;
 package com.management.platform.service.impl;
 
 
+import com.alibaba.fastjson.JSONObject;
+import com.baomidou.mybatisplus.core.conditions.Wrapper;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.management.platform.entity.CustomerInfo;
 import com.management.platform.entity.Stage;
 import com.management.platform.entity.Stage;
+import com.management.platform.entity.User;
 import com.management.platform.mapper.StageMapper;
 import com.management.platform.mapper.StageMapper;
+import com.management.platform.mapper.UserMapper;
 import com.management.platform.service.StageService;
 import com.management.platform.service.StageService;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.management.platform.util.HttpRespMsg;
 import com.management.platform.util.HttpRespMsg;
@@ -26,13 +33,18 @@ public class StageServiceImpl extends ServiceImpl<StageMapper, Stage> implements
 
 
     @Autowired
     @Autowired
     private StageMapper stageMapper;
     private StageMapper stageMapper;
+    @Autowired
+    private UserMapper userMapper;
     @Override
     @Override
     @Transactional(rollbackFor = Exception.class)
     @Transactional(rollbackFor = Exception.class)
-    public HttpRespMsg changeStage(List<Stage> stages, HttpServletRequest request) {
+    public HttpRespMsg changeStage(String stages, HttpServletRequest request) {
         HttpRespMsg msg = new HttpRespMsg();
         HttpRespMsg msg = new HttpRespMsg();
+        List<Stage> stages1 = JSONObject.parseArray(stages, Stage.class);
         int i = 0;
         int i = 0;
-        for (Stage stage : stages) {
+        User user = userMapper.selectById(request.getHeader("Token"));
+        for (Stage stage : stages1) {
             stage.setSeq(i);
             stage.setSeq(i);
+            stage.setCompanyId(user.getCompanyId());
             if(null != stage.getId()){
             if(null != stage.getId()){
                 stageMapper.updateById(stage);
                 stageMapper.updateById(stage);
             }else {
             }else {
@@ -45,9 +57,9 @@ public class StageServiceImpl extends ServiceImpl<StageMapper, Stage> implements
     }
     }
 
 
     @Override
     @Override
-    public HttpRespMsg getStage() {
+    public HttpRespMsg getStage(HttpServletRequest request) {
         HttpRespMsg msg = new HttpRespMsg();
         HttpRespMsg msg = new HttpRespMsg();
-        msg.setData(stageMapper.selectList(new QueryWrapper<Stage>().orderBy(true, false, "seq")));
+        msg.setData(stageMapper.selectList(new QueryWrapper<Stage>().eq("company_id",userMapper.selectById(request.getHeader("Token")).getCompanyId()).orderBy(true, true, "seq")));
         return msg;
         return msg;
     }
     }
 }
 }

+ 30 - 3
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/ReportController.java

@@ -620,7 +620,7 @@ public class ReportController {
                     System.out.println("第"+(i+1)+"个项目的第一审核人是:" +projectAuditorId[i]);
                     System.out.println("第"+(i+1)+"个项目的第一审核人是:" +projectAuditorId[i]);
                 }
                 }
             }
             }
-        }else {
+        } else {
             //自动填充项目审核人
             //自动填充项目审核人
             for (int i=0;i<projectAuditorId.length; i++) {
             for (int i=0;i<projectAuditorId.length; i++) {
                 if (projectAuditorId[i] == null) {
                 if (projectAuditorId[i] == null) {
@@ -1189,7 +1189,7 @@ public class ReportController {
                     double sum = reportList.stream().filter(rl -> rl.getCreateDate().equals(report.getCreateDate()) && rl.getCreatorId().equals(report.getCreatorId())).mapToDouble(Report::getWorkingTime).sum();
                     double sum = reportList.stream().filter(rl -> rl.getCreateDate().equals(report.getCreateDate()) && rl.getCreatorId().equals(report.getCreatorId())).mapToDouble(Report::getWorkingTime).sum();
                     BigDecimal bigDecimal=new BigDecimal(sum);
                     BigDecimal bigDecimal=new BigDecimal(sum);
                     bigDecimal=bigDecimal.subtract(new BigDecimal(comTimeType.getAllday()));
                     bigDecimal=bigDecimal.subtract(new BigDecimal(comTimeType.getAllday()));
-                    if(report.getOvertimeHours() != null && report.getOvertimeHours()>0 && report.getOvertimeHours()>bigDecimal.doubleValue()){
+                    if(report.getOvertimeHours() != null && report.getOvertimeHours()>0 && report.getOvertimeHours()-bigDecimal.doubleValue() > 0.001){
                         httpRespMsg.setError("加班时长不得超过总工作时长-正常工作时长");
                         httpRespMsg.setError("加班时长不得超过总工作时长-正常工作时长");
                         return httpRespMsg;
                         return httpRespMsg;
                     }
                     }
@@ -1401,7 +1401,7 @@ public class ReportController {
             }
             }
         }
         }
         //5:由直属或者部门负责人审核, 6:先由直属或者部门负责人审核-再由项目日报审核人审核
         //5:由直属或者部门负责人审核, 6:先由直属或者部门负责人审核-再由项目日报审核人审核
-        if(comTimeType.getReportAuditType() == 5 || comTimeType.getReportAuditType() == 6){
+        else if(comTimeType.getReportAuditType() == 5 || comTimeType.getReportAuditType() == 6){
             List<Department> departmentList = departmentMapper.selectList(new QueryWrapper<Department>().eq("company_id",user.getCompanyId()));
             List<Department> departmentList = departmentMapper.selectList(new QueryWrapper<Department>().eq("company_id",user.getCompanyId()));
             List<User> tempAuditorUserList = new ArrayList<>();
             List<User> tempAuditorUserList = new ArrayList<>();
             List<String> creatorIdList = reportList.stream().map(Report::getCreatorId).collect(Collectors.toList());
             List<String> creatorIdList = reportList.stream().map(Report::getCreatorId).collect(Collectors.toList());
@@ -1446,6 +1446,31 @@ public class ReportController {
                     }
                     }
                 }
                 }
             }
             }
+        } else if (comTimeType.getReportAuditType() == 7) {
+            //并行审核,设置部门负责人
+            if (targetUserList == null) {
+                for (Report report : reportList) {
+                    report.setDepartmentAuditState(0);
+                    report.setProjectAuditState(0);
+                    Department department = departmentMapper.selectById(user.getDepartmentId());
+                    if (department != null) {
+                        report.setAuditDeptid(department.getDepartmentId());
+                        report.setAuditDeptManagerid(department.getManagerId());
+                    }
+                }
+            } else {
+                //代填
+                for (Report report : reportList) {
+                    report.setDepartmentAuditState(0);
+                    report.setProjectAuditState(0);
+                    User targetUser = targetUserList.stream().filter(t -> t.getId().equals(report.getCreatorId())).findFirst().get();
+                    Department department = departmentMapper.selectById(targetUser.getDepartmentId());
+                    if (department != null) {
+                        report.setAuditDeptid(department.getDepartmentId());
+                        report.setAuditDeptManagerid(department.getManagerId());
+                    }
+                }
+            }
         }
         }
 
 
 
 
@@ -2065,6 +2090,8 @@ public class ReportController {
         HttpRespMsg msg = new HttpRespMsg();
         HttpRespMsg msg = new HttpRespMsg();
         try {
         try {
             msg = reportService.batchApproveReport(ids, isDepartment, request,evaluate);
             msg = reportService.batchApproveReport(ids, isDepartment, request,evaluate);
+        } catch (NullPointerException e) {
+            msg.setError("批量审核失败:NullPointerExp-"+e.getMessage());
         } catch (Exception e) {
         } catch (Exception e) {
             msg.setError("批量审核失败:"+e.getMessage());
             msg.setError("批量审核失败:"+e.getMessage());
         }
         }

+ 2 - 1
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/mapper/ReportMapper.java

@@ -72,7 +72,8 @@ public interface ReportMapper extends BaseMapper<Report> {
                                                  @Param("startDate") String startDate,
                                                  @Param("startDate") String startDate,
                                                  @Param("endDate") String endDate,
                                                  @Param("endDate") String endDate,
                                                  @Param("targetUserId") List<String> targetUserId,
                                                  @Param("targetUserId") List<String> targetUserId,
-                                                 @Param("auditUserId")String auditUserId
+                                                 @Param("auditUserId")String auditUserId,
+                                                 @Param("isParallel")Integer isParallel
                                                  );
                                                  );
 
 
     //获取本人负责的专业的相关的日报
     //获取本人负责的专业的相关的日报

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

@@ -42,6 +42,8 @@ public class ReportBatchServiceImpl extends ServiceImpl<ReportBatchMapper, Repor
     private SysFunctionMapper sysFunctionMapper;
     private SysFunctionMapper sysFunctionMapper;
     @Resource
     @Resource
     private ReportMapper reportMapper;
     private ReportMapper reportMapper;
+    @Resource
+    private TimeTypeMapper timeTypeMapper;
 
 
     @Override
     @Override
     public HttpRespMsg getAuditList(Integer state, Integer departmentId, Integer projectId, String date, String startDate, String endDate, String userId, HttpServletRequest request) {
     public HttpRespMsg getAuditList(Integer state, Integer departmentId, Integer projectId, String date, String startDate, String endDate, String userId, HttpServletRequest request) {
@@ -49,6 +51,8 @@ public class ReportBatchServiceImpl extends ServiceImpl<ReportBatchMapper, Repor
         try {
         try {
             User curUser = userMapper.selectById(request.getHeader("Token"));
             User curUser = userMapper.selectById(request.getHeader("Token"));
             Integer companyId = curUser.getCompanyId();
             Integer companyId = curUser.getCompanyId();
+            TimeType timeType = timeTypeMapper.selectById(companyId);
+            Integer isParallel = timeType.getReportAuditType() == 7? 1 : 0;
             String leaderId = null;
             String leaderId = null;
             List<SysRichFunction> functionList = sysFunctionMapper.getRoleFunctions(curUser.getRoleId(), "审核全员日报");
             List<SysRichFunction> functionList = sysFunctionMapper.getRoleFunctions(curUser.getRoleId(), "审核全员日报");
             if (functionList.size() == 0) {//没有全员审核的权限
             if (functionList.size() == 0) {//没有全员审核的权限
@@ -58,7 +62,7 @@ public class ReportBatchServiceImpl extends ServiceImpl<ReportBatchMapper, Repor
             if (!StringUtils.isEmpty(userId)) {
             if (!StringUtils.isEmpty(userId)) {
                 targetUids = ListUtil.convertLongIdsArrayToList(userId);
                 targetUids = ListUtil.convertLongIdsArrayToList(userId);
             }
             }
-            List<Map<String, Object>> auditReportList = reportMapper.getAuditReportList(date, companyId, departmentId, projectId, leaderId, 0, startDate, endDate, targetUids,null);
+            List<Map<String, Object>> auditReportList = reportMapper.getAuditReportList(date, companyId, departmentId, projectId, leaderId, 0, startDate, endDate, targetUids,null, isParallel);
             List<Integer> batchIds = new ArrayList<>();
             List<Integer> batchIds = new ArrayList<>();
             for (Map<String, Object> map : auditReportList) {
             for (Map<String, Object> map : auditReportList) {
                 Integer batchId = (Integer)map.get("batchId");
                 Integer batchId = (Integer)map.get("batchId");

+ 78 - 2
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ReportServiceImpl.java

@@ -1515,6 +1515,7 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
             User curUser = userMapper.selectById(request.getHeader("Token"));
             User curUser = userMapper.selectById(request.getHeader("Token"));
             Integer companyId = curUser.getCompanyId();
             Integer companyId = curUser.getCompanyId();
             TimeType timeType = timeTypeMapper.selectById(companyId);
             TimeType timeType = timeTypeMapper.selectById(companyId);
+            Integer isParallel = timeType.getReportAuditType() == 7? 1 : 0;
             Integer isEngeering = companyMapper.selectById(companyId).getPackageEngineering();
             Integer isEngeering = companyMapper.selectById(companyId).getPackageEngineering();
             String leaderId = null;
             String leaderId = null;
             List<SysRichFunction> functionList = sysFunctionMapper.getRoleFunctions(curUser.getRoleId(), "审核全员日报");
             List<SysRichFunction> functionList = sysFunctionMapper.getRoleFunctions(curUser.getRoleId(), "审核全员日报");
@@ -1525,7 +1526,7 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
             if (!StringUtils.isEmpty(userId)) {
             if (!StringUtils.isEmpty(userId)) {
                 targetUids = ListUtil.convertLongIdsArrayToList(userId);
                 targetUids = ListUtil.convertLongIdsArrayToList(userId);
             }
             }
-            List<Map<String, Object>> auditReportList = reportMapper.getAuditReportList(date, companyId, departmentId, projectId, leaderId, isEngeering, startDate, endDate, targetUids,auditUserId);
+            List<Map<String, Object>> auditReportList = reportMapper.getAuditReportList(date, companyId, departmentId, projectId, leaderId, isEngeering, startDate, endDate, targetUids,auditUserId, isParallel);
             //针对依斯贝增加服务名称显示
             //针对依斯贝增加服务名称显示
             if (companyId == 3092) {
             if (companyId == 3092) {
                 List<SapProjectService> serviceList = sapProjectServiceMapper.selectList(new QueryWrapper<SapProjectService>().eq("company_id", companyId));
                 List<SapProjectService> serviceList = sapProjectServiceMapper.selectList(new QueryWrapper<SapProjectService>().eq("company_id", companyId));
@@ -2195,7 +2196,40 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
                 if (updateReportList.size() > 0) {
                 if (updateReportList.size() > 0) {
                     updateBatchById(updateReportList);
                     updateBatchById(updateReportList);
                 }
                 }
-            } else {
+            } else if (timeType.getReportAuditType() == 7) {
+                //并行审核
+                boolean hasAuditAllPri = sysFunctionService.hasPriviledge(user.getRoleId(), "审核全员日报");
+                List<Report> updateReportList = new ArrayList<>();
+                List<Report> reportList = reportMapper.selectList(new QueryWrapper<Report>().select("id, state, group_audit_state, creator_id, create_date, project_id,audit_dept_managerid,department_audit_state,project_audit_state, project_auditor_id, is_dept_audit").in("id", ids));
+                for (Report r : reportList) {
+                    //直属领导审核或者部门负责人审核
+                    Report newReport = new Report();
+                    newReport.setId(r.getId());
+                    if (hasAuditAllPri) {
+                        newReport.setState(1);
+                        newReport.setDepartmentAuditState(1);
+                        newReport.setProjectAuditState(1);
+                        newReport.setProjectAuditTime(LocalDateTime.now());
+                    } else {
+                        if (r.getDepartmentAuditState() == 0 && user.getId().equals(r.getAuditDeptManagerid())) {
+                            newReport.setDepartmentAuditState(1);
+                            r.setDepartmentAuditState(1);
+                        } else if (r.getProjectAuditState() == 0 && user.getId().equals(r.getProjectAuditorId())) {
+                            newReport.setProjectAuditState(1);
+                            newReport.setProjectAuditTime(LocalDateTime.now());
+                            r.setProjectAuditState(1);
+                        }
+                        //检查是否项目和部门全部审核通过
+                        if (r.getDepartmentAuditState() == 1 && r.getProjectAuditState() == 1) {
+                            newReport.setState(1);
+                        }
+                    }
+                    updateReportList.add(newReport);
+                }
+                if (updateReportList.size() > 0) {
+                    updateBatchById(updateReportList);
+                }
+            }else {
                 //之前的流程逻辑,综合了一层项目审核,或者一层任务分组审核。 可叠加部门审批流(部门审批时,本部门的负责人是否由上级部门负责人审核,可配置)
                 //之前的流程逻辑,综合了一层项目审核,或者一层任务分组审核。 可叠加部门审批流(部门审批时,本部门的负责人是否由上级部门负责人审核,可配置)
                 List<AuditWorkflowTimeSetting> settings = auditWorkflowTimeSettingMapper.selectList(
                 List<AuditWorkflowTimeSetting> settings = auditWorkflowTimeSettingMapper.selectList(
                         new QueryWrapper<AuditWorkflowTimeSetting>().eq("dept_id", auditTargetUser.getDepartmentId())
                         new QueryWrapper<AuditWorkflowTimeSetting>().eq("dept_id", auditTargetUser.getDepartmentId())
@@ -3418,6 +3452,46 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
                 if (updateReportList.size() > 0) {
                 if (updateReportList.size() > 0) {
                     updateBatchById(updateReportList);
                     updateBatchById(updateReportList);
                 }
                 }
+            } else if (timeType.getReportAuditType() == 7) {
+                //并行审核
+                allUsers = userMapper.selectList(new QueryWrapper<User>().select("id, name, department_id").eq("company_id", company.getId()));
+                boolean hasAuditAllPri = sysFunctionService.hasPriviledge(user.getRoleId(), "审核全员日报");
+                List<Report> updateReportList = new ArrayList<>();
+                List<Report> reportList = reportMapper.selectList(new QueryWrapper<Report>().select("id, state, group_audit_state, creator_id, create_date, project_id,audit_dept_managerid,department_audit_state,project_audit_state, project_auditor_id, is_dept_audit").in("id", ids));
+                allReports = reportList;
+                for (Report r : reportList) {
+                    //直属领导审核或者部门负责人审核
+                    Report newReport = new Report();
+                    newReport.setId(r.getId());
+                    if (hasAuditAllPri) {
+                        r.setState(1);
+                        r.setDepartmentAuditState(1);
+                        r.setProjectAuditState(1);
+                        r.setProjectAuditTime(LocalDateTime.now());
+                        newReport.setState(1);
+                        newReport.setDepartmentAuditState(1);
+                        newReport.setProjectAuditState(1);
+                        newReport.setProjectAuditTime(LocalDateTime.now());
+                    } else {
+                        if (r.getDepartmentAuditState() == 0 && user.getId().equals(r.getAuditDeptManagerid())) {
+                            newReport.setDepartmentAuditState(1);
+                            r.setDepartmentAuditState(1);
+                        } else if (r.getProjectAuditState() == 0 && user.getId().equals(r.getProjectAuditorId())) {
+                            newReport.setProjectAuditState(1);
+                            newReport.setProjectAuditTime(LocalDateTime.now());
+                            r.setProjectAuditState(1);
+                        }
+                        //检查是否项目和部门全部审核通过
+                        if (r.getDepartmentAuditState() == 1 && r.getProjectAuditState() == 1) {
+                            newReport.setState(1);
+                            r.setState(1);
+                        }
+                    }
+                    updateReportList.add(newReport);
+                }
+                if (updateReportList.size() > 0) {
+                    updateBatchById(updateReportList);
+                }
             } else {
             } else {
                 List<AuditWorkflowTimeSetting> settings = auditWorkflowTimeSettingMapper.selectList(
                 List<AuditWorkflowTimeSetting> settings = auditWorkflowTimeSettingMapper.selectList(
                         new QueryWrapper<AuditWorkflowTimeSetting>().eq("company_id", company.getId())
                         new QueryWrapper<AuditWorkflowTimeSetting>().eq("company_id", company.getId())
@@ -4320,10 +4394,12 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
             String deptId = String.valueOf(data.get("deptId"));
             String deptId = String.valueOf(data.get("deptId"));
             String corpwxUserId = (String) data.get("corpwxUserId");
             String corpwxUserId = (String) data.get("corpwxUserId");
             Integer corpwxDeptId = (Integer) data.get("corpwxDeptId");
             Integer corpwxDeptId = (Integer) data.get("corpwxDeptId");
+            Integer state = (Integer) data.get("state");
             Map<String, Object> map = new HashMap<>();
             Map<String, Object> map = new HashMap<>();
             String date = new SimpleDateFormat("yyyy-MM-dd").format((Date)data.get("createDate"));
             String date = new SimpleDateFormat("yyyy-MM-dd").format((Date)data.get("createDate"));
             map.put("workingTime", data.get("workingTime"));
             map.put("workingTime", data.get("workingTime"));
             map.put("createDate", date);
             map.put("createDate", date);
+            map.put("state", state);
             if (id.equals(lastUserId)) {
             if (id.equals(lastUserId)) {
                 //同一个用户的数据
                 //同一个用户的数据
                 lastUserData.worktimeList.add(map);
                 lastUserData.worktimeList.add(map);

+ 18 - 5
fhKeeper/formulahousekeeper/management-platform/src/main/resources/mapper/ReportMapper.xml

@@ -586,12 +586,25 @@
             AND a.project_id=#{projectId}
             AND a.project_id=#{projectId}
         </if>
         </if>
         <if test="auditorId != null">
         <if test="auditorId != null">
-            AND ((a.is_dept_audit = 0 and a.project_auditor_id = #{auditorId} and a.project_audit_state = 0)
-            or (a.is_dept_audit = 1 and a.audit_dept_managerid = #{auditorId}))
+            <if test="isParallel == 1">
+                AND ((a.project_auditor_id = #{auditorId} and a.project_audit_state = 0)
+                or (a.audit_dept_managerid = #{auditorId} and a.department_audit_state = 0))
+            </if>
+            <if test="isParallel == 0">
+                AND ((a.is_dept_audit = 0 and a.project_auditor_id = #{auditorId} and a.project_audit_state = 0)
+                or (a.is_dept_audit = 1 and a.audit_dept_managerid = #{auditorId}))
+            </if>
+
         </if>
         </if>
         <if test="auditUserId != null and auditUserId !=''">
         <if test="auditUserId != null and auditUserId !=''">
-            AND ((a.is_dept_audit = 0 and a.project_auditor_id = #{auditUserId} and a.project_audit_state = 0)
-            or (a.is_dept_audit = 1 and a.audit_dept_managerid = #{auditUserId}))
+            <if test="isParallel == 1">
+                AND ((a.project_auditor_id = #{auditUserId} and a.project_audit_state = 0)
+                or (a.audit_dept_managerid = #{auditUserId} and a.department_audit_state = 0))
+            </if>
+            <if test="isParallel == 0">
+                AND ((a.is_dept_audit = 0 and a.project_auditor_id = #{auditUserId} and a.project_audit_state = 0)
+                or (a.is_dept_audit = 1 and a.audit_dept_managerid = #{auditUserId}))
+            </if>
         </if>
         </if>
         <if test="isEngeering == 1">
         <if test="isEngeering == 1">
             AND a.department_audit_state = 1
             AND a.department_audit_state = 1
@@ -879,7 +892,7 @@
         WHERE r.create_date BETWEEN #{startDate} AND #{endDate} AND r.creator_id = #{userId} GROUP BY r.create_date
         WHERE r.create_date BETWEEN #{startDate} AND #{endDate} AND r.creator_id = #{userId} GROUP BY r.create_date
     </select>
     </select>
     <select id="getUserDailyWorkTime" resultType="java.util.Map">
     <select id="getUserDailyWorkTime" resultType="java.util.Map">
-        SELECT user.id, user.name,department.department_name as departmentName,department.department_id as deptId,department.corpwx_deptid as corpwxDeptId, report.create_date as createDate, sum(working_time) as workingTime,user.inactive_date as inactiveDate,user.corpwx_userid as corpwxUserId
+        SELECT user.id, user.name,department.department_name as departmentName,department.department_id as deptId,department.corpwx_deptid as corpwxDeptId, report.create_date as createDate,IF (MAX(report.state) = 1, MIN(report.state), MAX(report.state)) AS state, sum(working_time) as workingTime,user.inactive_date as inactiveDate,user.corpwx_userid as corpwxUserId
         FROM user
         FROM user
         left join report on user.id = report.creator_id
         left join report on user.id = report.creator_id
         left join department on department.department_id = user.department_id
         left join department on department.department_id = user.department_id

+ 21 - 0
fhKeeper/formulahousekeeper/management-workshop-stand/src/main/java/com/management/platform/controller/DepartmentQualityManagerController.java

@@ -0,0 +1,21 @@
+package com.management.platform.controller;
+
+
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * <p>
+ *  前端控制器
+ * </p>
+ *
+ * @author Seyason
+ * @since 2024-01-18
+ */
+@RestController
+@RequestMapping("/department-quality-manager")
+public class DepartmentQualityManagerController {
+
+}
+

+ 21 - 0
fhKeeper/formulahousekeeper/management-workshop-stand/src/main/java/com/management/platform/controller/ProdProcedureCopyController.java

@@ -0,0 +1,21 @@
+package com.management.platform.controller;
+
+
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * <p>
+ *  前端控制器
+ * </p>
+ *
+ * @author Seyason
+ * @since 2024-01-12
+ */
+@RestController
+@RequestMapping("/prod-procedure-copy")
+public class ProdProcedureCopyController {
+
+}
+

+ 105 - 0
fhKeeper/formulahousekeeper/management-workshop-stand/src/main/java/com/management/platform/controller/UpdatePackController.java

@@ -0,0 +1,105 @@
+package com.management.platform.controller;
+
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.management.platform.entity.UpdatePack;
+import com.management.platform.mapper.UpdatePackMapper;
+import com.management.platform.util.FileUtil;
+import com.management.platform.util.HttpRespMsg;
+import com.management.platform.util.ZipUtils;
+import org.apache.commons.io.FileUtils;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.annotation.Resource;
+import java.io.File;
+import java.io.IOException;
+
+/**
+ * <p>
+ *  前端控制器
+ * </p>
+ *
+ * @author Seyason
+ * @since 2024-01-21
+ */
+@RestController
+@RequestMapping("/update-pack")
+public class UpdatePackController {
+
+    @Value(value = "${upload.tempUpdatePath}")
+    private String tempUpdatePath;
+
+    @Resource
+    private UpdatePackMapper updatePackMapper;
+
+    @RequestMapping("/save")
+    public HttpRespMsg save(UpdatePack pack) throws IOException {
+        HttpRespMsg msg = new HttpRespMsg();
+        updatePackMapper.insert(pack);
+        //获取地址,进行更新系统
+        String serverPackUrl = pack.getServerPackUrl();
+        if (pack.getH5Url() != null) {
+            File h5File = new File(tempUpdatePath + pack.getH5Url());
+            String h5Target = h5File.getParent() + "\\h5";
+            ZipUtils.unzip(h5File.getAbsolutePath(), h5Target);
+            File targetFile = new File(h5Target);
+            File[] files = targetFile.listFiles();
+            //进入dist目录下
+            File distFile = files[0];
+
+            if (!distFile.getName().equals("dist")) {
+                System.out.println("压缩包内文件结构不正确,应该包含dist目录");
+                msg.setError("压缩包内文件结构不正确,应该包含dist目录");
+                return msg;
+            }
+            File finalTargetDirectory = new File("D:\\www\\staticproject\\workshop_h5");
+            //拷贝文件到目标文件夹进行覆盖
+            FileUtils.copyDirectory(distFile, finalTargetDirectory);
+            System.out.println("H5端文件拷贝完成");
+        }
+        if (pack.getPcUrl() != null) {
+            File pcFile = new File(tempUpdatePath + pack.getPcUrl());
+            String pcTarget = pcFile.getParent() + "\\pc";
+            ZipUtils.unzip(pcFile.getAbsolutePath(), pcTarget);
+
+            File targetFile = new File(pcTarget);
+            File[] files = targetFile.listFiles();
+            //进入dist目录下
+            File distFile = files[0];
+            if (!distFile.getName().equals("dist")) {
+                System.out.println("压缩包内文件结构不正确,应该包含dist目录");
+                msg.setError("压缩包内文件结构不正确,应该包含dist目录");
+                return msg;
+            }
+            File finalTargetDirectory = new File("D:\\www\\staticproject\\workshop_pc");
+            //拷贝文件到目标文件夹进行覆盖
+            FileUtils.copyDirectory(distFile, finalTargetDirectory);
+            System.out.println("PC端文件拷贝完成");
+        }
+        //检查解压后的文件结构目录
+        if (serverPackUrl != null) {
+            File file = new File(tempUpdatePath + serverPackUrl);
+            //拷贝文件到目标目录进行覆盖
+            FileUtils.copyFileToDirectory(file, new File("D:\\www\\webapps\\workshop-lew"));
+            System.out.println("后端文件拷贝完成");
+        }
+
+
+        //执行更新脚本
+        return msg;
+    }
+
+    @RequestMapping("/getHistory")
+    public HttpRespMsg getHistory() {
+        HttpRespMsg msg = new HttpRespMsg();
+        msg.data = updatePackMapper.selectList(new QueryWrapper<UpdatePack>().orderByDesc("id").last("limit 30"));
+        return msg;
+    }
+
+
+}
+

+ 48 - 0
fhKeeper/formulahousekeeper/management-workshop-stand/src/main/java/com/management/platform/entity/DepartmentQualityManager.java

@@ -0,0 +1,48 @@
+package com.management.platform.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableField;
+import java.io.Serializable;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author Seyason
+ * @since 2024-01-18
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+public class DepartmentQualityManager extends Model<DepartmentQualityManager> {
+
+    private static final long serialVersionUID=1L;
+
+    @TableId(value = "id", type = IdType.AUTO)
+    private Integer id;
+
+    @TableField("department_id")
+    private Integer departmentId;
+
+    /**
+     * 质检人id
+     */
+    @TableField("quality_id")
+    private String qualityId;
+
+    @TableField("company_id")
+    private Integer companyId;
+
+
+    @Override
+    protected Serializable pkVal() {
+        return this.id;
+    }
+
+}

+ 85 - 0
fhKeeper/formulahousekeeper/management-workshop-stand/src/main/java/com/management/platform/entity/ProdProcedureCopy.java

@@ -0,0 +1,85 @@
+package com.management.platform.entity;
+
+import java.math.BigDecimal;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableField;
+import java.io.Serializable;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author Seyason
+ * @since 2024-01-12
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+public class ProdProcedureCopy extends Model<ProdProcedureCopy> {
+
+    private static final long serialVersionUID=1L;
+
+    @TableId(value = "id", type = IdType.AUTO)
+    private Integer id;
+
+    /**
+     * 工序名称
+     */
+    @TableField("name")
+    private String name;
+
+    /**
+     * 所属公司id
+     */
+    @TableField("company_id")
+    private Integer companyId;
+
+    /**
+     * 所属产品id
+     */
+    @TableField("product_id")
+    private Integer productId;
+
+    /**
+     * 单间工价
+     */
+    @TableField("unit_price")
+    private BigDecimal unitPrice;
+
+    /**
+     * 质检类型:0-自检,1-互检,2-专检
+     */
+    @TableField("check_type")
+    private Integer checkType;
+
+    /**
+     * 单件工时
+     */
+    @TableField("working_time")
+    private Double workingTime;
+
+    /**
+     * 版本号
+     */
+    @TableField("version_number")
+    private String versionNumber;
+
+    /**
+     * 产品名称
+     */
+    @TableField("product_name")
+    private String productName;
+
+
+    @Override
+    protected Serializable pkVal() {
+        return this.id;
+    }
+
+}

+ 76 - 0
fhKeeper/formulahousekeeper/management-workshop-stand/src/main/java/com/management/platform/entity/UpdatePack.java

@@ -0,0 +1,76 @@
+package com.management.platform.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import com.baomidou.mybatisplus.annotation.TableId;
+import java.time.LocalDateTime;
+import com.baomidou.mybatisplus.annotation.TableField;
+import java.io.Serializable;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+import org.springframework.format.annotation.DateTimeFormat;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author Seyason
+ * @since 2024-01-22
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+public class UpdatePack extends Model<UpdatePack> {
+
+    private static final long serialVersionUID=1L;
+
+    @TableId(value = "id", type = IdType.AUTO)
+    private Integer id;
+
+    /**
+     * 前端h5的包存储路径
+     */
+    @TableField("h5_url")
+    private String h5Url;
+
+    /**
+     * 前端pc的包存储路径
+     */
+    @TableField("pc_url")
+    private String pcUrl;
+
+    /**
+     * 后端项目工程的包存储路径
+     */
+    @TableField("server_pack_url")
+    private String serverPackUrl;
+
+
+    @TableField("indate")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private LocalDateTime indate;
+
+    /**
+     * 0-进行中,1-已完成部署,2-部署失败
+     */
+    @TableField("status")
+    private Integer status;
+
+    /**
+     * 消息
+     */
+    @TableField("message")
+    private String message;
+
+
+    @Override
+    protected Serializable pkVal() {
+        return this.id;
+    }
+
+}

+ 16 - 0
fhKeeper/formulahousekeeper/management-workshop-stand/src/main/java/com/management/platform/mapper/DepartmentQualityManagerMapper.java

@@ -0,0 +1,16 @@
+package com.management.platform.mapper;
+
+import com.management.platform.entity.DepartmentQualityManager;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author Seyason
+ * @since 2024-01-18
+ */
+public interface DepartmentQualityManagerMapper extends BaseMapper<DepartmentQualityManager> {
+
+}

+ 16 - 0
fhKeeper/formulahousekeeper/management-workshop-stand/src/main/java/com/management/platform/mapper/ProdProcedureCopyMapper.java

@@ -0,0 +1,16 @@
+package com.management.platform.mapper;
+
+import com.management.platform.entity.ProdProcedureCopy;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author Seyason
+ * @since 2024-01-12
+ */
+public interface ProdProcedureCopyMapper extends BaseMapper<ProdProcedureCopy> {
+
+}

+ 16 - 0
fhKeeper/formulahousekeeper/management-workshop-stand/src/main/java/com/management/platform/mapper/UpdatePackMapper.java

@@ -0,0 +1,16 @@
+package com.management.platform.mapper;
+
+import com.management.platform.entity.UpdatePack;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author Seyason
+ * @since 2024-01-21
+ */
+public interface UpdatePackMapper extends BaseMapper<UpdatePack> {
+
+}

+ 16 - 0
fhKeeper/formulahousekeeper/management-workshop-stand/src/main/java/com/management/platform/service/DepartmentQualityManagerService.java

@@ -0,0 +1,16 @@
+package com.management.platform.service;
+
+import com.management.platform.entity.DepartmentQualityManager;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author Seyason
+ * @since 2024-01-18
+ */
+public interface DepartmentQualityManagerService extends IService<DepartmentQualityManager> {
+
+}

+ 16 - 0
fhKeeper/formulahousekeeper/management-workshop-stand/src/main/java/com/management/platform/service/ProdProcedureCopyService.java

@@ -0,0 +1,16 @@
+package com.management.platform.service;
+
+import com.management.platform.entity.ProdProcedureCopy;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author Seyason
+ * @since 2024-01-12
+ */
+public interface ProdProcedureCopyService extends IService<ProdProcedureCopy> {
+
+}

+ 16 - 0
fhKeeper/formulahousekeeper/management-workshop-stand/src/main/java/com/management/platform/service/UpdatePackService.java

@@ -0,0 +1,16 @@
+package com.management.platform.service;
+
+import com.management.platform.entity.UpdatePack;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author Seyason
+ * @since 2024-01-21
+ */
+public interface UpdatePackService extends IService<UpdatePack> {
+
+}

+ 20 - 0
fhKeeper/formulahousekeeper/management-workshop-stand/src/main/java/com/management/platform/service/impl/DepartmentQualityManagerServiceImpl.java

@@ -0,0 +1,20 @@
+package com.management.platform.service.impl;
+
+import com.management.platform.entity.DepartmentQualityManager;
+import com.management.platform.mapper.DepartmentQualityManagerMapper;
+import com.management.platform.service.DepartmentQualityManagerService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author Seyason
+ * @since 2024-01-18
+ */
+@Service
+public class DepartmentQualityManagerServiceImpl extends ServiceImpl<DepartmentQualityManagerMapper, DepartmentQualityManager> implements DepartmentQualityManagerService {
+
+}

+ 20 - 0
fhKeeper/formulahousekeeper/management-workshop-stand/src/main/java/com/management/platform/service/impl/ProdProcedureCopyServiceImpl.java

@@ -0,0 +1,20 @@
+package com.management.platform.service.impl;
+
+import com.management.platform.entity.ProdProcedureCopy;
+import com.management.platform.mapper.ProdProcedureCopyMapper;
+import com.management.platform.service.ProdProcedureCopyService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author Seyason
+ * @since 2024-01-12
+ */
+@Service
+public class ProdProcedureCopyServiceImpl extends ServiceImpl<ProdProcedureCopyMapper, ProdProcedureCopy> implements ProdProcedureCopyService {
+
+}

+ 20 - 0
fhKeeper/formulahousekeeper/management-workshop-stand/src/main/java/com/management/platform/service/impl/UpdatePackServiceImpl.java

@@ -0,0 +1,20 @@
+package com.management.platform.service.impl;
+
+import com.management.platform.entity.UpdatePack;
+import com.management.platform.mapper.UpdatePackMapper;
+import com.management.platform.service.UpdatePackService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author Seyason
+ * @since 2024-01-21
+ */
+@Service
+public class UpdatePackServiceImpl extends ServiceImpl<UpdatePackMapper, UpdatePack> implements UpdatePackService {
+
+}

+ 150 - 0
fhKeeper/formulahousekeeper/management-workshop-stand/src/main/java/com/management/platform/util/ZipUtils.java

@@ -0,0 +1,150 @@
+package com.management.platform.util;
+
+import com.alibaba.excel.util.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.*;
+import java.util.Enumeration;
+import java.util.zip.*;
+
+/**
+ * @Description 压缩与解压工具
+ * @Author      yanghanwei
+ * @Date        18:42 2019-11-20
+ * @Version     v1
+ **/
+public class ZipUtils {
+
+    private static final Logger logger = LoggerFactory.getLogger(ZipUtils.class);
+
+    /**
+     * 压缩 zip
+     * @param filePath  文件夹 全路径
+     * @param fileName  文件夹名称
+     * @param outPath   压缩文件保存路径
+     */
+    public static void zipFile(String filePath, String fileName, String outPath) {
+        logger.info("filePath:{}, fileName:{}, outPath:{}", filePath, fileName, outPath);
+        try {
+            //创建Test.zip文件
+            OutputStream is = new FileOutputStream(outPath);
+            //检查输出流,采用CRC32算法,保证文件的一致性
+            CheckedOutputStream cos = new CheckedOutputStream(is, new CRC32());
+            //创建zip文件的输出流
+            ZipOutputStream zos = new ZipOutputStream(cos);
+            //需要压缩的文件或文件夹对象
+            File file = new File(filePath);
+            //压缩文件的具体实现函数
+            zipFilePost(zos,file,filePath,fileName,outPath);
+            zos.close();
+            cos.close();
+            is.close();
+            System.out.println("压缩完成");
+        } catch (Exception e) {
+            logger.error("压缩失败zipFile,Exception:" + e);
+        }
+    }
+
+    /**
+     * 压缩文件
+     * @param zos       zip文件的输出流
+     * @param file      需要压缩的文件或文件夹对象
+     * @param filePath  压缩的文件路径
+     * @param fileName  需要压缩的文件夹名
+     * @param outPath   缩完成后保存为Test.zip文件
+     */
+    private static void zipFilePost(ZipOutputStream zos, File file, String filePath, String fileName, String outPath){
+
+        try{
+            String path = file.getPath();
+            String zosName = "";
+            if(!StringUtils.isEmpty(path)){
+                zosName = path.substring(path.indexOf(fileName));
+            }
+            File[] files = file.listFiles();
+            if(file.isDirectory() && files != null && files.length > 0) {
+                // 创建压缩文件的目录结构
+                zos.putNextEntry(new ZipEntry(zosName + File.separator));
+                for(File f : files) {
+                    zipFilePost(zos, f, filePath, fileName, outPath);
+                }
+            } else {
+                logger.info("正在压缩文件:{}",file.getName());
+                // 创建压缩文件
+                zos.putNextEntry(new ZipEntry(zosName));
+                // 用字节方式读取源文件
+                InputStream is = new FileInputStream(file.getPath());
+                // 创建一个缓存区
+                BufferedInputStream bis = new BufferedInputStream(is);
+                // 字节数组,每次读取1024个字节
+                byte [] b = new byte[1024];
+                // 循环读取,边读边写
+                while(bis.read(b)!=-1) {
+                    // 写入压缩文件
+                    zos.write(b);
+                }
+                //关闭流
+                bis.close();
+                is.close();
+            }
+        } catch (Exception e) {
+            logger.error("压缩文件失败zipFilePost,Exception:" + e);
+        }
+    }
+
+    public static void unzip(String sourcePath, String targetPath) {
+        //targetPath输出文件路径
+        File targetFile = new File(targetPath);
+        // 如果目录不存在,则创建
+        if (!targetFile.exists()) {
+            targetFile.mkdirs();
+        }
+        //sourcePath压缩包文件路径
+        try (ZipFile zipFile = new ZipFile(new File(sourcePath))) {
+            System.out.println("file nums:" + zipFile.size());
+            Enumeration enumeration = zipFile.entries();
+            while (enumeration.hasMoreElements()) {
+                //依次获取压缩包内的文件实体对象
+                ZipEntry entry = (ZipEntry) enumeration.nextElement();
+                String name = entry.getName();
+                if (entry.isDirectory()) {
+                    continue;
+                }
+                try (BufferedInputStream inputStream = new BufferedInputStream(zipFile.getInputStream(entry))) {
+                    // 需要判断文件所在的目录是否存在,处理压缩包里面有文件夹的情况
+                    String outName = targetPath + "/" + name;
+                    File outFile = new File(outName);
+                    File tempFile = new File(outName.substring(0, outName.lastIndexOf("/")));
+                    if (!tempFile.exists()) {
+                        tempFile.mkdirs();
+                    }
+                    try (BufferedOutputStream outputStream = new BufferedOutputStream(new FileOutputStream(outFile))) {
+                        int len;
+                        byte[] buffer = new byte[1024];
+                        while ((len = inputStream.read(buffer)) > 0) {
+                            outputStream.write(buffer, 0, len);
+                        }
+                    }
+
+                }
+
+            }
+
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+    }
+    public static void main(String[] args) throws Exception{
+//        String filePath = "/var/folders/88/jh37h0fj59l1f302jdryz4780000gn/T/201908月小微平台消耗-1574300435525/";
+//        // 需要压缩的文件夹名
+//        String fileName = "201908月小微平台消耗-1574300435525";
+//        // 压缩完成后保存为Test.zip文件,名字随意
+//        String outPath = "/var/folders/88/jh37h0fj59l1f302jdryz4780000gn/T/Test3.zip";
+//        zipFile(filePath, fileName, outPath);
+
+        String sourcePath = "C:\\gitproject\\manHourHousekeeper\\fhKeeper\\formulahousekeeper\\timesheet-workshop\\distPC.zip";
+        String targetPath = "C:\\文档资料\\distPC";
+        unzip(sourcePath, targetPath);
+    }
+}

+ 18 - 0
fhKeeper/formulahousekeeper/management-workshop-stand/src/main/resources/mapper/DepartmentQualityManagerMapper.xml

@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.management.platform.mapper.DepartmentQualityManagerMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.management.platform.entity.DepartmentQualityManager">
+        <id column="id" property="id" />
+        <result column="department_id" property="departmentId" />
+        <result column="quality_id" property="qualityId" />
+        <result column="company_id" property="companyId" />
+    </resultMap>
+
+    <!-- 通用查询结果列 -->
+    <sql id="Base_Column_List">
+        id, department_id, quality_id, company_id
+    </sql>
+
+</mapper>

+ 23 - 0
fhKeeper/formulahousekeeper/management-workshop-stand/src/main/resources/mapper/ProdProcedureCopyMapper.xml

@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.management.platform.mapper.ProdProcedureCopyMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.management.platform.entity.ProdProcedureCopy">
+        <id column="id" property="id" />
+        <result column="name" property="name" />
+        <result column="company_id" property="companyId" />
+        <result column="product_id" property="productId" />
+        <result column="unit_price" property="unitPrice" />
+        <result column="check_type" property="checkType" />
+        <result column="working_time" property="workingTime" />
+        <result column="version_number" property="versionNumber" />
+        <result column="product_name" property="productName" />
+    </resultMap>
+
+    <!-- 通用查询结果列 -->
+    <sql id="Base_Column_List">
+        id, name, company_id, product_id, unit_price, check_type, working_time, version_number, product_name
+    </sql>
+
+</mapper>

+ 21 - 0
fhKeeper/formulahousekeeper/management-workshop-stand/src/main/resources/mapper/UpdatePackMapper.xml

@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.management.platform.mapper.UpdatePackMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.management.platform.entity.UpdatePack">
+        <id column="id" property="id" />
+        <result column="h5_url" property="h5Url" />
+        <result column="pc_url" property="pcUrl" />
+        <result column="server_pack_url" property="serverPackUrl" />
+        <result column="indate" property="indate" />
+        <result column="status" property="status" />
+        <result column="message" property="message" />
+    </resultMap>
+
+    <!-- 通用查询结果列 -->
+    <sql id="Base_Column_List">
+        id, h5_url, pc_url, server_pack_url, indate, status, message
+    </sql>
+
+</mapper>

+ 3 - 4
fhKeeper/formulahousekeeper/timesheet/src/views/project/cost.vue

@@ -220,7 +220,7 @@
                 personnelValue: '',
                 personnelValue: '',
                 personnelAll: [],
                 personnelAll: [],
                 personnelAllPlly: [],
                 personnelAllPlly: [],
-                yAxisValue: localStorage.yAxisValue?localStorage.yAxisValue:'1',
+                yAxisValue: '1',
                 parentDeptStack:[],
                 parentDeptStack:[],
                 parentDeptId:null,
                 parentDeptId:null,
                 hasReportUserList:[],
                 hasReportUserList:[],
@@ -266,7 +266,6 @@
             },
             },
             //Y轴点击改变显示的数据
             //Y轴点击改变显示的数据
             onYAxisChange() {
             onYAxisChange() {
-                localStorage.yAxisValue = this.yAxisValue;
                 this.jieliu();
                 this.jieliu();
             },
             },
             jutishez() {
             jutishez() {
@@ -1447,9 +1446,9 @@
                 this.containerHeight = window.innerHeight - 130
                 this.containerHeight = window.innerHeight - 130
                 // this.containerHeight = window.innerHeight - 200
                 // this.containerHeight = window.innerHeight - 200
             };
             };
-            if(this.permissions.countCost){
+            if(this.permissions.countCost && !this.permissions.countHours){
                 this.yAxisValue = '0'
                 this.yAxisValue = '0'
-            }else{
+            }else {
                 this.yAxisValue = '1'
                 this.yAxisValue = '1'
             }
             }
             if (this.user.timeType.fixMonthcost == 0) {
             if (this.user.timeType.fixMonthcost == 0) {

+ 1 - 1
fhKeeper/formulahousekeeper/timesheet/src/views/settings/timetype.vue

@@ -739,7 +739,7 @@
         },
         },
         data() {
         data() {
             return {
             return {
-                reportAuditTypeArray:['项目审核人审核','分组负责人审核','先分组负责人审核再项目经理审核','员工自由选择审批人','项目所属BU审核','直属审核人或部门负责人审核','直属或部门负责人审核->项目日报审核人审核'],
+                reportAuditTypeArray:['项目审核人审核','分组负责人审核','先分组负责人审核再项目经理审核','员工自由选择审批人','项目所属BU审核','直属审核人或部门负责人审核','直属或部门负责人审核->项目日报审核人审核','部门和项目日报审核人并行审核'],
                 expandedKeys: [],
                 expandedKeys: [],
                 checkStrictly: false,
                 checkStrictly: false,
                 checkedKeys:[],
                 checkedKeys:[],

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 47 - 37
fhKeeper/formulahousekeeper/timesheet/src/views/workReport/daily.vue


+ 49 - 40
fhKeeper/formulahousekeeper/timesheet/src/views/workReport/list.vue

@@ -92,32 +92,38 @@
                                 <el-card shadow="never">
                                 <el-card shadow="never">
                                     <p>{{ $t('other.project') + ':' }}<b>{{item.projectCode+'/'+item.project}}<span v-if="item.subProjectName != null"> / {{item.subProjectName}}</span>
                                     <p>{{ $t('other.project') + ':' }}<b>{{item.projectCode+'/'+item.project}}<span v-if="item.subProjectName != null"> / {{item.subProjectName}}</span>
                                     <span style="margin-left:15px;color:#DAA520;" >[ 
                                     <span style="margin-left:15px;color:#DAA520;" >[ 
-                                                    <span v-if="item.isDeptAudit==0">
-                                                        <span v-if="item.projectAuditState==0">
-                                                            {{ $t('other.waitForTheProjectReviewer') }}<span v-if="item.projectAuditorName != null">(
-                                                                <!-- {{item.projectAuditorName}} -->
-                                                                <span v-if="user.userNameNeedTranslate == '1'"><TranslationOpenDataText type='userName' :openid='item.projectAuditorName'></TranslationOpenDataText></span>
-                                                                <span v-if="user.userNameNeedTranslate != '1'">{{item.projectAuditorName}}</span>
-                                                                )</span>{{ $t('other.audit') }}
-                                                        </span>
-                                                        <span style="color:#32CD32;" v-else-if="item.projectAuditState==1">
-                                                            {{ $t('other.projectAuditor') }}<span v-if="item.projectAuditorName != null">(
-                                                                <!-- {{item.projectAuditorName}} -->
-                                                                <span v-if="user.userNameNeedTranslate == '1'"><TranslationOpenDataText type='userName' :openid='item.projectAuditorName'></TranslationOpenDataText></span>
-                                                                <span v-if="user.userNameNeedTranslate != '1'">{{item.projectAuditorName}}</span>
-                                                            )</span>{{ $t('state.approved') }}
-                                                        </span>
-                                                    </span>
-                                                    <span v-else-if="item.isDeptAudit==1">
-                                                        <!-- {{($t('other.await') +item.auditDeptName+('('+item.deptAuditorName+')')+ $t('other.audit'))}} -->
-                                                        ({{$t('other.await')}}
-                                                        <span v-if="user.userNameNeedTranslate == '1'"><TranslationOpenDataText type='departmentName' :openid='item.auditDeptName'></TranslationOpenDataText></span>
-                                                        <span v-if="user.userNameNeedTranslate != '1'">{{item.auditDeptName}}</span>
-                                                        (<span v-if="user.userNameNeedTranslate == '1'"><TranslationOpenDataText type='userName' :openid='item.deptAuditorName'></TranslationOpenDataText></span>
-                                                        <span v-if="user.userNameNeedTranslate != '1'">{{item.deptAuditorName}}</span>)
-                                                        {{$t('other.audit')}})
-                                                    </span>
-                                                    ]
+                                        <span v-if="user.timeType.reportAuditType == 7">
+                                            {{$t('other.reviewer')}}:<TranslationOpenData :configurationItems="{ openType: 'userName', openId: item.projectAuditorName, renderIndex: 0 }" /><span v-if="item.projectAuditState==1">√</span>
+                                            <span v-if="item.deptAuditorName">、</span>
+                                            <TranslationOpenData :configurationItems="{ openType: 'userName', openId: item.deptAuditorName, renderIndex: 0 }" /><span v-if="item.departmentAuditState==1">√</span>
+                                        </span>
+                                        <span v-else>
+                                            <span v-if="item.isDeptAudit==0">
+                                                <span v-if="item.projectAuditState==0">
+                                                    {{ $t('other.waitForTheProjectReviewer') }}<span v-if="item.projectAuditorName != null">(
+                                                        <!-- {{item.projectAuditorName}} -->
+                                                        <span v-if="user.userNameNeedTranslate == '1'"><TranslationOpenDataText type='userName' :openid='item.projectAuditorName'></TranslationOpenDataText></span>
+                                                        <span v-if="user.userNameNeedTranslate != '1'">{{item.projectAuditorName}}</span>
+                                                        )</span>{{ $t('other.audit') }}
+                                                </span>
+                                                <span style="color:#32CD32;" v-else-if="item.projectAuditState==1">
+                                                    {{ $t('other.projectAuditor') }}<span v-if="item.projectAuditorName != null">(
+                                                        <!-- {{item.projectAuditorName}} -->
+                                                        <span v-if="user.userNameNeedTranslate == '1'"><TranslationOpenDataText type='userName' :openid='item.projectAuditorName'></TranslationOpenDataText></span>
+                                                        <span v-if="user.userNameNeedTranslate != '1'">{{item.projectAuditorName}}</span>
+                                                    )</span>{{ $t('state.approved') }}
+                                                </span>
+                                            </span>
+                                            <span v-else-if="item.isDeptAudit==1">
+                                                <!-- {{($t('other.await') +item.auditDeptName+('('+item.deptAuditorName+')')+ $t('other.audit'))}} -->
+                                                ({{$t('other.await')}}
+                                                <span v-if="user.userNameNeedTranslate == '1'"><TranslationOpenDataText type='departmentName' :openid='item.auditDeptName'></TranslationOpenDataText></span>
+                                                <span v-if="user.userNameNeedTranslate != '1'">{{item.auditDeptName}}</span>
+                                                (<span v-if="user.userNameNeedTranslate == '1'"><TranslationOpenDataText type='userName' :openid='item.deptAuditorName'></TranslationOpenDataText></span>
+                                                <span v-if="user.userNameNeedTranslate != '1'">{{item.deptAuditorName}}</span>)
+                                                {{$t('other.audit')}})
+                                            </span>
+                                        </span>]
                                     </span>
                                     </span>
                                     </b></p>
                                     </b></p>
                                     <p v-if="user.timeType.reportAuditType == 6" >审核流程:<span v-if="item.auditorList && item.auditorList.length == 1">一层审核(<span style="color:#20A0ff;">{{ item.auditorList[0].name }}</span>)</span>
                                     <p v-if="user.timeType.reportAuditType == 6" >审核流程:<span v-if="item.auditorList && item.auditorList.length == 1">一层审核(<span style="color:#20A0ff;">{{ item.auditorList[0].name }}</span>)</span>
@@ -231,21 +237,24 @@
                 <el-table-column prop="state" :label="$t('state.states')" sortable>
                 <el-table-column prop="state" :label="$t('state.states')" sortable>
                     <template slot-scope="scope">
                     <template slot-scope="scope">
                         <span v-if="scope.row.state == 0" style="color:#DAA520;">
                         <span v-if="scope.row.state == 0" style="color:#DAA520;">
-                            <span v-if="user.userNameNeedTranslate != '1'">
-                                <span v-if="user.company.companyName != '成都明夷电子科技有限公司'">
-                                    {{scope.row.isDeptAudit==0?$t('other.Tobereviewedbytheprojectreviewer'):($t('other.await')+scope.row.auditDeptName+('('+scope.row.deptAuditorName+')')+$t('other.audit'))}}
-                                </span>
-                                <span v-else>
-                                    待审核
+                            <span v-if="user.timeType.reportAuditType == 7">待审核</span>
+                            <span v-else>
+                                <span v-if="user.userNameNeedTranslate != '1'">
+                                    <span v-if="user.company.companyName != '成都明夷电子科技有限公司'">
+                                        {{scope.row.isDeptAudit==0?$t('other.Tobereviewedbytheprojectreviewer'):($t('other.await')+scope.row.auditDeptName+('('+scope.row.deptAuditorName+')')+$t('other.audit'))}}
+                                    </span>
+                                    <span v-else>
+                                        待审核
+                                    </span>
                                 </span>
                                 </span>
-                            </span>
-                            <span v-if="user.userNameNeedTranslate == '1'">
-                                <span v-if="scope.row.isDeptAudit==0">{{$t('other.Tobereviewedbytheprojectreviewer')}}</span>
-                                <span v-else>
-                                    {{$t('other.await')}}
-                                    <TranslationOpenDataText type='departmentName' :openid='scope.row.auditDeptName'></TranslationOpenDataText>
-                                    (<TranslationOpenDataText type='userName' :openid='scope.row.deptAuditorName'></TranslationOpenDataText>)
-                                    {{$t('other.audit')}}
+                                <span v-if="user.userNameNeedTranslate == '1'">
+                                    <span v-if="scope.row.isDeptAudit==0">{{$t('other.Tobereviewedbytheprojectreviewer')}}</span>
+                                    <span v-else>
+                                        {{$t('other.await')}}
+                                        <TranslationOpenDataText type='departmentName' :openid='scope.row.auditDeptName'></TranslationOpenDataText>
+                                        (<TranslationOpenDataText type='userName' :openid='scope.row.deptAuditorName'></TranslationOpenDataText>)
+                                        {{$t('other.audit')}}
+                                    </span>
                                 </span>
                                 </span>
                             </span>
                             </span>
                         </span>
                         </span>

+ 27 - 17
fhKeeper/formulahousekeeper/timesheet_h5/src/views/review/index.vue

@@ -101,26 +101,36 @@
                     <div v-for="(item1,index1) in item.data" :key="index1" class="one_report_data">
                     <div v-for="(item1,index1) in item.data" :key="index1" class="one_report_data">
                         <div class="project_title">项目:{{item1.project}}
                         <div class="project_title">项目:{{item1.project}}
                             [
                             [
-                            <span v-if="item1.isDeptAudit==0">
-                                <span v-if="item1.projectAuditState==0">
-                                    待项目审核人<span v-if="item1.projectAuditorName != null">(
-                                        <span v-if="user.userNameNeedTranslate == '1'"><TranslationOpenDataText type='userName' :openid='item1.projectAuditorName'></TranslationOpenDataText></span>
-                                        <span v-else>{{item1.projectAuditorName}}</span>
-                                    )</span>审核
+                            <span v-if="user.timeType.reportAuditType == 7" >
+                                审核人:<span v-if="user.userNameNeedTranslate == '1'"><TranslationOpenDataText type='userName'
+                                                    :openid='item1.projectAuditorName'></TranslationOpenDataText><span v-if="item1.projectAuditState==1">√</span><span v-if="item1.deptAuditorName">、</span>
+                                                <TranslationOpenDataText type='userName'
+                                                    :openid='item1.deptAuditorName'></TranslationOpenDataText><span v-if="item1.departmentAuditState==1">√</span>
+                                        </span>
+                                        <span v-else>{{ item1.projectAuditorName }}<span v-if="item1.projectAuditState==1">√</span><span v-if="item1.deptAuditorName">、</span>{{ item1.deptAuditorName }}<span v-if="item1.departmentAuditState==1">√</span></span>
+                            </span>
+                            <span v-else>
+                                <span v-if="item1.isDeptAudit==0">
+                                    <span v-if="item1.projectAuditState==0">
+                                        待项目审核人<span v-if="item1.projectAuditorName != null">(
+                                            <span v-if="user.userNameNeedTranslate == '1'"><TranslationOpenDataText type='userName' :openid='item1.projectAuditorName'></TranslationOpenDataText></span>
+                                            <span v-else>{{item1.projectAuditorName}}</span>
+                                        )</span>审核
+                                    </span>
+                                    <span style="color:#32CD32;" v-else-if="item1.projectAuditState==1">
+                                        项目审核人<span v-if="item1.projectAuditorName != null">(
+                                            <span v-if="user.userNameNeedTranslate == '1'"><TranslationOpenDataText type='userName' :openid='item1.projectAuditorName'></TranslationOpenDataText></span>
+                                            <span v-else>{{item1.projectAuditorName}}</span>
+                                        )</span>审核通过
+                                    </span>
                                 </span>
                                 </span>
-                                <span style="color:#32CD32;" v-else-if="item1.projectAuditState==1">
-                                    项目审核人<span v-if="item1.projectAuditorName != null">(
-                                        <span v-if="user.userNameNeedTranslate == '1'"><TranslationOpenDataText type='userName' :openid='item1.projectAuditorName'></TranslationOpenDataText></span>
-                                        <span v-else>{{item1.projectAuditorName}}</span>
-                                    )</span>审核通过
+                                <span v-else-if="item1.isDeptAudit==1">
+                                    
+                                    <span v-if="user.userNameNeedTranslate == '1'"><TranslationOpenDataText type='departmentName' :openid='item1.auditDeptName'></TranslationOpenDataText></span>
+                                    <span v-else>{{item1.auditDeptName}}</span>
+                                    审核
                                 </span>
                                 </span>
                             </span>
                             </span>
-                            <span v-else-if="item1.isDeptAudit==1">
-                                待
-                                <span v-if="user.userNameNeedTranslate == '1'"><TranslationOpenDataText type='departmentName' :openid='item1.auditDeptName'></TranslationOpenDataText></span>
-                                <span v-else>{{item1.auditDeptName}}</span>
-                                审核
-                            </span>
                             ]
                             ]
 
 
                         </div>
                         </div>

+ 30 - 20
fhKeeper/formulahousekeeper/timesheet_h5/src/views/view/index.vue

@@ -79,29 +79,39 @@
                                 <div class="project_title" style="font-weight:bold;">项目:{{ item1.project }} <span
                                 <div class="project_title" style="font-weight:bold;">项目:{{ item1.project }} <span
                                         :style="'color:' + statusColor[item1.state]">[
                                         :style="'color:' + statusColor[item1.state]">[
                                         <span v-if="item1.state == 0">
                                         <span v-if="item1.state == 0">
-                                            <span v-if="item1.isDeptAudit == 0">
-                                                <span v-if="item1.projectAuditState == 0">
-                                                    待项目审核人<span v-if="item1.projectAuditorName != null">(
-                                                        <span v-if="user.userNameNeedTranslate == '1'"><TranslationOpenDataText type='userName'
-                                                                :openid='item1.projectAuditorName'></TranslationOpenDataText></span>
-                                                        <span v-else>{{ item1.projectAuditorName }}</span>
-                                                        )</span>审核
+                                            <span v-if="user.timeType.reportAuditType == 7" >
+                                                审核人:<span v-if="user.userNameNeedTranslate == '1'"><TranslationOpenDataText type='userName'
+                                                                    :openid='item1.projectAuditorName'></TranslationOpenDataText><span v-if="item1.projectAuditState==1">√</span><span v-if="item1.deptAuditorName">、</span>
+                                                                <TranslationOpenDataText type='userName'
+                                                                    :openid='item1.deptAuditorName'></TranslationOpenDataText><span v-if="item1.departmentAuditState==1">√</span>
+                                                        </span>
+                                                        <span v-else>{{ item1.projectAuditorName }}<span v-if="item1.projectAuditState==1">√</span><span v-if="item1.deptAuditorName">、</span>{{ item1.deptAuditorName }}<span v-if="item1.departmentAuditState==1">√</span></span>
+                                            </span>
+                                            <span v-else>
+                                                <span v-if="item1.isDeptAudit == 0">
+                                                    <span v-if="item1.projectAuditState == 0">
+                                                        待项目审核人<span v-if="item1.projectAuditorName != null">(
+                                                            <span v-if="user.userNameNeedTranslate == '1'"><TranslationOpenDataText type='userName'
+                                                                    :openid='item1.projectAuditorName'></TranslationOpenDataText></span>
+                                                            <span v-else>{{ item1.projectAuditorName }}</span>
+                                                            )</span>审核
+                                                    </span>
+                                                    <span style="color:#32CD32;" v-else-if="item1.projectAuditState == 1">
+                                                        项目审核人<span v-if="item1.projectAuditorName != null">(
+                                                            <span v-if="user.userNameNeedTranslate == '1'"><TranslationOpenDataText type='userName'
+                                                                    :openid='item1.projectAuditorName'></TranslationOpenDataText></span>
+                                                            <span v-else>{{ item1.projectAuditorName }}</span>
+                                                            )</span>审核通过
+                                                    </span>
                                                 </span>
                                                 </span>
-                                                <span style="color:#32CD32;" v-else-if="item1.projectAuditState == 1">
-                                                    项目审核人<span v-if="item1.projectAuditorName != null">(
-                                                        <span v-if="user.userNameNeedTranslate == '1'"><TranslationOpenDataText type='userName'
-                                                                :openid='item1.projectAuditorName'></TranslationOpenDataText></span>
-                                                        <span v-else>{{ item1.projectAuditorName }}</span>
-                                                        )</span>审核通过
+                                                <span v-else-if="item1.isDeptAudit == 1">
+                                                    
+                                                    <span v-if="user.userNameNeedTranslate == '1'"><TranslationOpenDataText type='departmentName'
+                                                            :openid='item1.auditDeptName'></TranslationOpenDataText></span>
+                                                    <span v-else>{{ item1.auditDeptName }}</span>
+                                                    审核
                                                 </span>
                                                 </span>
                                             </span>
                                             </span>
-                                            <span v-else-if="item1.isDeptAudit == 1">
-                                                待
-                                                <span v-if="user.userNameNeedTranslate == '1'"><TranslationOpenDataText type='departmentName'
-                                                        :openid='item1.auditDeptName'></TranslationOpenDataText></span>
-                                                <span v-else>{{ item1.auditDeptName }}</span>
-                                                审核
-                                            </span>
                                         </span>
                                         </span>
                                         <span v-else>
                                         <span v-else>
                                             {{ statusTxt[item1.state] }}
                                             {{ statusTxt[item1.state] }}