Browse Source

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

Min 11 months ago
parent
commit
8bf9e2a416

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

@@ -158,12 +158,12 @@ const selectData = reactive({ // 下拉数据
   Customer: [] as any[],
 })
 const filterItems = ref<FilterItem[]>([
-  { label: '联系人', key: 'contactPerson', type: 'input' },
-  { label: '客户名称', key: 'customerId', type: 'select', options: selectData.Customer },
-  { label: '电话号码', key: 'phoneNumber', type: 'input' },
+  { label: '联系人', key: 'name', type: 'input' },
+  { label: '客户名称', key: 'customId', type: 'select', options: selectData.Customer },
+  { label: '电话号码', key: 'phone', type: 'input' },
   { label: '邮箱', key: 'email', type: 'input' },
-  { label: '负责人', key: 'responsibleId', type: 'select', options: selectData.Personnel },
-  { label: '创建人', key: 'createId', type: 'select', options: selectData.Personnel },
+  { label: '负责人', key: 'ownerId', type: 'select', options: selectData.Personnel },
+  { label: '创建人', key: 'creatorId', type: 'select', options: selectData.Personnel },
 ])
 const contactsTemplate = ref({
   list: [],
@@ -397,12 +397,12 @@ function closeVisible(type: keyof typeof allVisible) {
 function setFilterItems() {
   console.log(selectData)
   filterItems.value = [
-    { label: '联系人', key: 'contactPerson', type: 'input' },
-    { label: '客户名称', key: 'customerId', type: 'select', options: selectData.Customer },
-    { label: '电话号码', key: 'phoneNumber', type: 'input' },
+    { label: '联系人', key: 'name', type: 'input' },
+    { label: '客户名称', key: 'customId', type: 'select', options: selectData.Customer },
+    { label: '电话号码', key: 'phone', type: 'input' },
     { label: '邮箱', key: 'email', type: 'input' },
-    { label: '负责人', key: 'responsibleId', type: 'select', options: selectData.Personnel },
-    { label: '创建人', key: 'createId', type: 'select', options: selectData.Personnel },
+    { label: '负责人', key: 'ownerId', type: 'select', options: selectData.Personnel },
+    { label: '创建人', key: 'creatorId', type: 'select', options: selectData.Personnel },
   ]
 }
 

+ 9 - 9
fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/tasks/index.vue

@@ -227,7 +227,7 @@ function newExportTasks() {
     startDate: startDate && dayjs(startDate).format('YYYY-MM-DD 00:00:00'),
     endDate: endDate && dayjs(endDate).format('YYYY-MM-DD 23:59:59')
   }
-  post(EXPORT_DATA_BY_TASK_ID, {...getFromValue(params)}).then((res) => {
+  post(EXPORT_DATA, {...getFromValue(params)}).then((res) => {
     globalPopup?.showSuccess("导出成功")
     downloadFile(res.data, "任务列表.xlsx");
   }).finally(() => {
@@ -252,7 +252,7 @@ function search() {
       executorNames: item.taskExecutors?.join(',') ?? ''
     }));
   }).catch(err => {
-    globalPopup?.showError(err);
+    globalPopup?.showError(err.msg);
     loading.value = false;
   })
 }
@@ -290,7 +290,7 @@ function deleteTasks() {
       search();
       globalPopup?.showSuccess("删除成功")
     }).catch(err => {
-      globalPopup?.showError(err)
+      globalPopup?.showError(err.msg)
     })
   });
 }
@@ -313,7 +313,7 @@ function importExcel(data: any) {
     importLoading.value = "3";
     search();
   }).catch(err => {
-    globalPopup?.showError(err)
+    globalPopup?.showError(err.msg)
     importLoading.value = "4";
   })
 }
@@ -337,7 +337,7 @@ function exportTasks() {
     btnLoading.value = false;
   }).catch(err => {
     btnLoading.value = false;
-    globalPopup?.showError(err)
+    globalPopup?.showError(err.msg)
   })
 }
 function closeExportModal() {
@@ -350,7 +350,7 @@ function exportExcel(data: any) {
     exportLoading.value = "3";
     exportVisible.value = false;
   }).catch(err => {
-    globalPopup?.showError(err)
+    globalPopup?.showError(err.msg)
   })
   setTimeout(() => {
 
@@ -375,7 +375,7 @@ function finishRow(item: any) {
     search()
     globalPopup?.showSuccess("操作成功")
   }).catch(err => {
-    globalPopup?.showError(err)
+    globalPopup?.showError(err.msg)
   })
 }
 function restart(item: any) {
@@ -386,7 +386,7 @@ function restart(item: any) {
     search()
     globalPopup?.showSuccess("操作成功")
   }).catch(err => {
-    globalPopup?.showError(err)
+    globalPopup?.showError(err.msg)
   })
 }
 function deleteRow(item: any) {
@@ -398,7 +398,7 @@ function deleteRow(item: any) {
       globalPopup?.showSuccess("删除成功")
     }).catch(err => {
       console.log("err", err);
-      globalPopup?.showError(err)
+      globalPopup?.showError(err.msg)
     })
   })
 }

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

@@ -168,7 +168,7 @@ public class ContactsServiceImpl extends ServiceImpl<ContactsMapper, Contacts> i
 
         }
 
-        Page<ContactsVo> pageContacts = contactsMapper.pageContacts(new Page((long) (pageIndex - 1) *pageSize, pageSize), map);
+        Page<ContactsVo> pageContacts = contactsMapper.pageContacts(new Page( pageIndex, pageSize), map);
 
         List<ContactsVo> records = pageContacts.getRecords();
         long total = pageContacts.getTotal();

+ 92 - 19
fhKeeper/formulahousekeeper/management-crm/src/main/java/com/management/platform/service/impl/TaskServiceImpl.java

@@ -22,6 +22,7 @@ import org.apache.poi.xssf.usermodel.XSSFRow;
 import org.apache.poi.xssf.usermodel.XSSFSheet;
 import org.apache.poi.xssf.usermodel.XSSFWorkbook;
 import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
@@ -53,6 +54,9 @@ import java.util.stream.Collectors;
 @Transactional
 public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task> implements TaskService {
 
+    @Autowired
+    private ContactsService contactsService;
+
     @Resource
     private UserMapper userMapper;
     @Resource
@@ -446,13 +450,23 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task> implements Ta
                 task.setCreateDate(LocalDateTime.now());
 //                task.setStatus(0);
                 task.setIsDelete(0);
+
+                //统计 线索不应与客户/商机/销售订单/联系人一同存在
+                boolean b1=false; //客户/商机/销售订单/联系人
+                boolean b2=false;//线索
+
+                //客户/商机/销售订单不应一同存在
+                boolean b3=false;//客户
+                boolean b4=false;//商机
+                boolean b5=false;//销售订单
+
                 for (int i = 0; i < cellNum; i++) {
                     String modelName = modelNameList.get(i);
                     String className = modelName.substring(0, 1).toUpperCase() + modelName.substring(1);
                     String getter="get"+className;
                     String setter="set"+className;
                     XSSFCell cell = row.getCell(i);
-                    if(cell!=null&&StringUtils.isNotEmpty(cell.getStringCellValue())){
+                    if(cell!=null){
                         switch (typeList.get(i)){
                             default:cell.setCellType(CellType.STRING);
                         }
@@ -494,7 +508,8 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task> implements Ta
                                 if (first.isPresent()) {
                                     executorIds.add(first.get().getId());
                                 } else {
-                                    throw new Exception("["+userName+"]在系统中不存在");
+                                    msg.setError("["+userName+"]在系统中不存在");
+                                    return msg;
                                 }
                             }
                             StringJoiner joiner = new StringJoiner(",");
@@ -546,31 +561,37 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task> implements Ta
 
                     else if(modelName.equals("contactsId")){
                         if(cell!=null&&!StringUtils.isEmpty(cell.getStringCellValue())){
+                            b1=true;
+
                             String contactsName = cell.getStringCellValue();
                             List<Contacts> collect = contactsList.stream().filter(contacts -> contacts.getName().equals(contactsName)).collect(Collectors.toList());
-                            if (collect.size()>1){
-                                throw new Exception("["+contactsName+"]对应的联系人存在多个");
-                            }else if (collect.size()==1) {
+                            if (!collect.isEmpty()) {
                                 Contacts contacts = collect.get(0);
                                 task.setContactsId(contacts.getId());
                             }else {
-                                throw new Exception("["+contactsName+"]对应的联系人不存在");
+                                msg.setError("["+contactsName+"]对应的联系人不存在");
+                                return msg;
                             }
                         }
                     }
 
                     else if(modelName.equals("customId")){
                         if(cell!=null&&!StringUtils.isEmpty(cell.getStringCellValue())){
+                            b1=true;
+                            b3=true;
+
                             String customName = cell.getStringCellValue();
                             List<Custom> customs = customList.stream().filter(custom -> customName.equals(custom.getCustomName())).collect(Collectors.toList());
                             if (customs.size()>1){
-                                throw new Exception("["+customName+"]对应的客户存在多个");
+                                msg.setError("["+customName+"]对应的客户存在多个");
+                                return msg;
                             }else if (customs.size()==1){
                                 Custom custom = customs.get(0);
                                 if (task.getContactsId()!=null){
                                     boolean isExist = contactsList.stream().anyMatch(contacts -> custom.getId().equals(contacts.getCustomId())&&contacts.getId().equals(task.getContactsId()));
                                     if(!isExist){
-                                        throw new Exception("["+customName+"]对应的客户没有对应填写的联系人");
+                                        msg.setError("["+customName+"]对应的客户没有对应填写的联系人");
+                                        return msg;
                                     }
                                     else {
                                         task.setCustomId(custom.getId());
@@ -581,43 +602,55 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task> implements Ta
                                     task.setTaskType(0);
                                 }
                             }else {
-                                throw new Exception("["+customName+"]对应的客户不存在");
+                                msg.setError("["+customName+"]对应的客户不存在");
+                                return msg;
                             }
                         }
                     }
                     else if (modelName.equals("businessOpportunityId")){
                         if(cell!=null&&!StringUtils.isEmpty(cell.getStringCellValue())){
+                            b1=true;
+                            b4=true;
+
                             String businessName = cell.getStringCellValue();
                             List<BusinessOpportunity> collect = opportunityList.stream().filter(o -> businessName.equals(o.getName())).collect(Collectors.toList());
                             if (collect.size()>1){
-                                throw new Exception("["+businessName+"]对应的商机存在多个");
+                                msg.setError("["+businessName+"]名称,对应的商机存在多个");
+                                return msg;
                             }else if (collect.size()==1) {
                                 BusinessOpportunity businessOpportunity = collect.get(0);
                                 if (task.getContactsId()!=null){
                                     if (!businessOpportunity.getContactsId().equals(task.getContactsId())){
-                                        throw new Exception("["+businessName+"]对应的商机没有对应填写的联系人");
+                                        msg.setError("["+businessName+"]对应的商机没有对应填写的联系人");
+                                        return msg;
                                     }else {
                                         task.setBusinessOpportunityId(businessOpportunity.getId());
                                         task.setTaskType(1);
                                     }
                                 }
                             }else {
-                                throw new Exception("["+businessName+"]对应的商机不存在");
+                                msg.setError("["+businessName+"]对应的商机不存在");
+                                return msg;
                             }
 
                         }
                     }
                     else if (modelName.equals("orderId")){
                         if(cell!=null&&!StringUtils.isEmpty(cell.getStringCellValue())){
+                            b1=true;
+                            b5=true;
+
                             String orderName = cell.getStringCellValue();
                             List<SalesOrder> collect = orderList.stream().filter(order -> orderName.equals(order.getOrderName())).collect(Collectors.toList());
                             if (collect.size()>1){
-                                throw new Exception("["+orderName+"]对应的销售订单存在多个");
+                                msg.setError("["+orderName+"]对应的销售订单存在多个");
+                                return msg;
                             }else if (collect.size()==1) {
                                 SalesOrder order=collect.get(0);
                                 if (task.getContactsId()!=null){
                                     if (!order.getContactsId().equals(task.getContactsId())){
-                                        throw new Exception("["+orderName+"]对应的销售订单没有对应填写的联系人");
+                                        msg.setError("["+orderName+"]对应的销售订单没有对应填写的联系人");
+                                        return msg;
                                     }
                                     else {
                                         task.setOrderId(order.getId());
@@ -625,16 +658,20 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task> implements Ta
                                     }
                                 }
                             }else {
-                                throw new Exception("["+orderName+"]对应的销售订单不存在");
+                                msg.setError("["+orderName+"]对应的销售订单不存在");
+                                return msg;
                             }
                         }
                     }
 
                     else if (modelName.equals("clueId")) {
                         if (cell!=null&&!StringUtils.isEmpty(cell.getStringCellValue())) {
+                            b2=true;
+
                             String clueName = cell.getStringCellValue();
                             if (task.getContactsId()!=null){
-                                throw new Exception("["+clueName+"]对应的线索不存在联系人");
+                                msg.setError("["+clueName+"]对应的线索不存在联系人");
+                                return msg;
                             }
                             List<Clue> collect = clueList.stream().filter(clue -> clueName.equals(clue.getClueName())).collect(Collectors.toList());
                             if (!collect.isEmpty()) {
@@ -642,7 +679,8 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task> implements Ta
                                 task.setClueId(clue.getId());
                                 task.setTaskType(3);
                             }else {
-                                throw new Exception("["+clueName+"]对应的线索不存在");
+                                msg.setError("["+clueName+"]对应的线索不存在");
+                                return msg;
                             }
                         }
                     }
@@ -652,12 +690,14 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task> implements Ta
                             String contactsPhone = cell.getStringCellValue();
                             List<Contacts> collect = contactsList.stream().filter(contacts -> contactsPhone.equals(contacts.getPhone())).collect(Collectors.toList());
                             if (collect.size()>1){
-                                throw new Exception("联系人号码"+"["+contactsPhone+"]对应的联系人存在多个");
+                                msg.setError("联系人号码"+"["+contactsPhone+"]对应的联系人存在多个");
+                                return msg;
                             } else if (collect.size() == 1) {
                                 Contacts contacts = collect.get(0);
                                 if (task.getContactsId()!=null){
                                     if (!contacts.getId().equals(task.getContactsId())){
-                                        throw new Exception("联系人号码"+"["+contactsPhone+"]与联系人不绑定");
+                                        msg.setError("联系人号码"+"["+contactsPhone+"]与联系人不绑定");
+                                        return msg;
                                     }
                                 }else {
                                     task.setContactsId(contacts.getId());
@@ -676,7 +716,18 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task> implements Ta
                             method.invoke(task,cell.getStringCellValue());
                         }
                     }
+
                 }
+
+                if (b1&&b2){
+                    msg.setError("任务名称:"+task.getTaskName()+",线索不应与客户/商机/销售订单/联系人一同存在");
+                    return msg;
+                }
+                if (b3&&b4&&b5){
+                    msg.setError("任务名称:"+task.getTaskName()+",客户/商机/销售订单不应一同存在");
+                    return msg;
+                }
+
                 importTaskList.add(task);
             }
 
@@ -702,6 +753,28 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task> implements Ta
                         task.setStatus(1);
                     }
 
+                    //判断客户/商机/销售订单跟联系人时候绑定
+                    if (task.getTaskType()!=null&&task.getTaskType()<3&&task.getContactsId()!=null){
+                        HttpRespMsg httpRespMsg = contactsService.getAllContacts(task.getBusinessOpportunityId(), task.getOrderId(), task.getCustomId(), request);
+                        List<Contacts> list = (List<Contacts>) httpRespMsg.getData();
+                        if (!list.isEmpty()){
+                            boolean present = list.stream().anyMatch(contacts -> contacts.getId().equals(task.getContactsId()));
+                            if (!present){
+                                String type="";
+                                //客户0, 商机1 ,订单2 ,
+                                if (task.getTaskType()==0){
+                                    type="客户";
+                                }else if (task.getTaskType()==1){
+                                    type="商机";
+                                }else {
+                                    type="订单";
+                                }
+                                msg.setError("存在"+type+"与联系人不一一对应:");
+                                return msg;
+                            }
+                        }
+                    }
+
                 }
                 if(saveOrUpdateBatch(importTaskList)){
                     ArrayList<TaskExecutor> taskExecutors = new ArrayList<>();

+ 105 - 0
fhKeeper/formulahousekeeper/management-workshop/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;
+    }
+
+
+}
+

+ 76 - 0
fhKeeper/formulahousekeeper/management-workshop/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/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/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/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 {
+
+}

+ 21 - 0
fhKeeper/formulahousekeeper/management-workshop/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>

+ 33 - 30
fhKeeper/formulahousekeeper/timesheet/src/views/project/cost.vue

@@ -1,14 +1,14 @@
 <template>
     <section>
         <el-row style="padding-bottom: 0px;text-align:center;margin-top:20px;z-index: 999;">
-        <el-col :span="6" >
+        <el-col :span="5" >
             <div ><span style="color:#999;">{{ $t('chartY') }} </span>
             <el-radio-group v-model="yAxisValue" @change="onYAxisChange" size="small">
                 <el-radio-button label="1" v-if="permissions.countHours">{{ $t('accordingtoworkinghours') }}</el-radio-button>
                 <el-radio-button label="0" v-if="permissions.countCost">{{ $t('accordingtothecost') }}</el-radio-button>
             </el-radio-group></div>
         </el-col>
-        <el-col :span="14" style="display: flex;flex-wrap: wrap;justify-content: flex-end;">
+        <el-col :span="16" style="display: flex;flex-wrap: wrap;justify-content: flex-end;">
             <el-date-picker v-show="user.timeType.fixMonthcost==0"  size="small"
             v-model="dateRange" :editable="false" 
             format="yyyy-MM-dd" value-format="yyyy-MM-dd" 
@@ -39,15 +39,11 @@
             </el-radio-group>
 
             <el-select v-if="radio == $t('other.project')||radio == namess " v-model="proJuctId" :placeholder="$t('defaultText.pleaseSelectSnItem')" clearable filterable size="small" @change="getEchart" style="margin-left:10px">
-          <el-option v-for="(item) in projectList" :key="item.id" :label="item.projectName + (item.projectCode ? item.projectCode : '')" :value="item.id">
-            <span style="float: left;color: #8492a6;">{{ item.projectCode }}</span>
-            <span style="float: right;font-size: 13px;margin-left: 20px">{{ item.projectName }}</span>
-          </el-option>
+            <el-option v-for="(item) in projectList" :key="item.id" :label="item.projectName + (item.projectCode ? item.projectCode : '')" :value="item.id">
+                <span style="float: left;color: #8492a6;">{{ item.projectCode }}</span>
+                <span style="float: right;font-size: 13px;margin-left: 20px">{{ item.projectName }}</span>
+            </el-option>
         </el-select>
-<!-- 
-            <el-select v-model="customName" filterable placeholder="请选择" style="margin-top: 10px;width: 350px" v-if="theCustomListFlg" @change="jieliu()">
-                <el-option v-for="item in customList" :key="item.id" :label="item.name" :value="item.name"></el-option>
-            </el-select> -->
 
             <el-select v-model="personnelValue" filterable clearable :placeholder="hasReportUserList.length == 0 ? $t('nodata') : $t('pleaseselectpersonnel')"  size="small" style="margin-top: 10px;width: 350px" v-if="(radio == $t('ren-yuan'))&& user.userNameNeedTranslate != '1'" @change="personnel()"
             :disabled="hasReportUserList.length == 0 ? true : false">
@@ -61,31 +57,31 @@
             </span>
 
         </el-col>
-        <el-col :span="4">
+        <el-col :span="3">
             <el-button @click="exportProjectData" v-if="theCustomListFlg"  size="small">{{ $t('reporderived') }}</el-button>
             <el-button @click="showExportDialog" v-else  size="small">{{ $t('reporderived') }}</el-button>
         </el-col>
         </el-row>
-        <!-- <div id="clearfix" :style="'width:'+widthHtval+'px;position: relative; height:'+containerHeight+'px;'">
-             <div id="container" :style="'height:'+containerHeight+'px;width:100%'"></div>
-        </div> -->
         <div id="clearfix" :class="radio == $t('ren-yuan') ? 'ryuans' : ''" :style="'overflow-x: auto;width:100%;padding-bottom: 100px; position: relative; height:'+containerHeight+'px;'" v-loading="radioLoading">
-            <div id="container" :style="'height:'+(containerHeight - 20)+'px;width:100%'"></div>
-            <div class="poss">
+            <div id="container" ref="container" :style="'height:'+(containerHeight - 20)+'px;width:100%'"></div>
+            <div class="poss" :style="`width:${possWidth}px;`">
+                <div class="poss-btn">
+                    <el-radio-group v-model="possradio" size="small" @change="onYAxisChange" v-if="radio == '项目'">
+                        <el-radio-button label="1">项目名称</el-radio-button>
+                        <el-radio-button label="2">项目编号</el-radio-button>
+                    </el-radio-group>
+                </div>
                 <el-pagination
-                  @size-change="echartsSizeChange"
-                  @current-change="echartsCurrentChange"
-                  :current-page="page"
-                  :page-sizes="[50]"
-                  :page-size="50"
-                  layout="total, sizes, prev, pager, next"
-                  :total="total">
+                @size-change="echartsSizeChange"
+                @current-change="echartsCurrentChange"
+                :current-page="page"
+                :page-sizes="[50]"
+                :page-size="50"
+                layout="total, sizes, prev, pager, next"
+                :total="total">
                 </el-pagination>
             </div>
         </div>
-        <!-- <div>
-             <div id="container" :style="'height:'+containerHeight+'px;width:100%'"></div>
-        </div> -->
         <div style="position:fixed;top:170px;left:600px;" v-show="radio==$t('lable.department') && parentDeptId != null">
             <el-button @click="backToParentDept">{{ $t('returnsuperior') }}</el-button>
         </div>
@@ -252,6 +248,8 @@
                 departmentList: [],
                 radioLoading: false,
                 proJuctId:'',
+                possWidth: 300,
+                possradio: '1'
             };
         },
         methods: {
@@ -1059,7 +1057,7 @@
                             for(var i in list) {
                                 if(this.radio==this.$t('other.project') || this.radio == this.$t('zhu-xiang-mu')) {
                                     if(this.radio == this.$t('other.project')){
-                                        xList.push(list[i].project);
+                                        xList.push(this.possradio == '1' ? list[i].project : list[i].projectCode);
                                     }else{
                                         xList.push(list[i].mainProjectName);
                                     }
@@ -1439,12 +1437,11 @@
             this.myChart = null
         },
         mounted() {
+            this.possWidth = this.$refs.container.clientWidth
             this.containerHeight = window.innerHeight - 200
-            // this.containerHeight = window.innerHeight - 130
             const that = this;
             window.onresize = function temp() {
                 this.containerHeight = window.innerHeight - 130
-                // this.containerHeight = window.innerHeight - 200
             };
             if(this.permissions.countCost && !this.permissions.countHours){
                 this.yAxisValue = '0'
@@ -1521,8 +1518,14 @@
     .poss {
         position: fixed;
         bottom: 10px;
-        right: 1%;
         box-sizing: border-box;
+        padding: 0 1%;
+        display: flex;
+        justify-content: space-between;
+        align-items: center;
+        .poss-btn {
+            display: flex;
+        }
     }
 </style>