Kaynağa Gözat

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

ggooalice 2 yıl önce
ebeveyn
işleme
55a388b87a
35 değiştirilmiş dosya ile 507 ekleme ve 42 silme
  1. 75 0
      fhKeeper/formulahousekeeper/inva_4_tivo/css/projectt.css
  2. BIN
      fhKeeper/formulahousekeeper/inva_4_tivo/image/projectImg/jingli.png
  3. BIN
      fhKeeper/formulahousekeeper/inva_4_tivo/image/projectImg/jishu.png
  4. BIN
      fhKeeper/formulahousekeeper/inva_4_tivo/image/projectImg/qita.png
  5. BIN
      fhKeeper/formulahousekeeper/inva_4_tivo/image/projectImg/shichang.png
  6. BIN
      fhKeeper/formulahousekeeper/inva_4_tivo/image/projectImg/shoho.png
  7. BIN
      fhKeeper/formulahousekeeper/inva_4_tivo/image/projectImg/yuangong.png
  8. BIN
      fhKeeper/formulahousekeeper/inva_4_tivo/image/projectImg/zhongjian.png
  9. BIN
      fhKeeper/formulahousekeeper/inva_4_tivo/image/projectImg/zhuguan.png
  10. BIN
      fhKeeper/formulahousekeeper/inva_4_tivo/image/qq.png
  11. BIN
      fhKeeper/formulahousekeeper/inva_4_tivo/image/wai.png
  12. 1 1
      fhKeeper/formulahousekeeper/inva_4_tivo/js/one.js
  13. 76 1
      fhKeeper/formulahousekeeper/inva_4_tivo/project.html
  14. 19 0
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/config/PropertyMsg.java
  15. 3 3
      src/main/java/com/management/platform/controller/ExpenseTypeController.java
  16. 16 16
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/ReportController.java
  17. 53 0
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/entity/OperationRecord.java
  18. 6 0
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/entity/Project.java
  19. 16 0
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/mapper/OperationRecordMapper.java
  20. 3 1
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/mapper/ProjectMapper.java
  21. 16 0
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/OperationRecordService.java
  22. 2 0
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/DepartmentServiceImpl.java
  23. 20 0
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/OperationRecordServiceImpl.java
  24. 36 10
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ProjectServiceImpl.java
  25. 107 0
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/util/BeanChangeUtil.java
  26. 2 0
      fhKeeper/formulahousekeeper/management-platform/src/main/resources/mapper/DepartmentMapper.xml
  27. 20 0
      fhKeeper/formulahousekeeper/management-platform/src/main/resources/mapper/OperationRecordMapper.xml
  28. 7 0
      fhKeeper/formulahousekeeper/management-platform/src/main/resources/mapper/ProjectMapper.xml
  29. 8 2
      fhKeeper/formulahousekeeper/timesheet/src/views/project/cost.vue
  30. 1 1
      fhKeeper/formulahousekeeper/timesheet/src/views/project/custom_data.vue
  31. 1 0
      fhKeeper/formulahousekeeper/timesheet/src/views/project/finance.vue
  32. 1 0
      fhKeeper/formulahousekeeper/timesheet/src/views/project/info.vue
  33. 16 7
      fhKeeper/formulahousekeeper/timesheet/src/views/project/list.vue
  34. 1 0
      fhKeeper/formulahousekeeper/timesheet/src/views/project/projectInside.vue
  35. 1 0
      fhKeeper/formulahousekeeper/timesheet/src/views/task/list.vue

+ 75 - 0
fhKeeper/formulahousekeeper/inva_4_tivo/css/projectt.css

@@ -267,6 +267,81 @@ html {font-size: 10px; -webkit-text-size-adjust:none; -webkit-tap-highlight-colo
     margin-top: -1.5625rem;
 }
 
+/* 新版跨部门 */
+.multipleRoles {
+    background: #ffffff;
+    position: relative;
+    z-index: 3;
+    padding: 4.6875rem 0 6.25rem 0;
+}
+.multCons {
+    display: flex;
+    justify-content: space-between;
+}
+.multipleRolesLeft, .multipleRolesRight {
+    width: 50%;
+    box-sizing: border-box;
+    position: relative;
+}
+.muDiv {
+    display: inline-block;
+    font-size: 2.375rem;
+    color: #333333;
+    font-family: '黑体';
+}
+.muDiv span {
+    color: #f3ac47;
+    font-size: 2.625rem;
+    text-align: center;
+}
+.muRoLezc {
+    float: left;
+    margin-left: 10.9375rem;
+}
+.muRoLetd {
+    padding-top: 4.375rem;
+    padding-left: 2.8125rem;
+}
+.outerRing {
+    width: 31.25rem;
+    height: 31.25rem;
+    padding-top: 1.25rem;
+    position: relative;
+}
+.outerRingNei {
+    position: absolute;
+    width: 16.25rem;
+    height: 16.25rem;
+    top: 50%;
+    left: 50%;
+    margin-left: -8.125rem;
+    margin-top: -8.125rem;
+}
+.multipWaiCont {
+    width: 4.6875rem;
+    height: 4.6875rem;
+    background: #3c86df;
+    border-radius: 50%;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    margin-bottom: .9375rem;
+}
+.multipWaiCont div {
+    width: 2.1875rem;
+    height: 2.1875rem;
+}
+.multipWai {
+    width: 4.6875rem;
+    position: absolute;
+}
+.multipWai p {
+    width: 100%;
+    text-align: center;
+    font-size: 1.125rem;
+    color: #333;
+}
+
 /* 支持多种行业和场景使用 */
 .industryScenario {
     background: #ffffff;

BIN
fhKeeper/formulahousekeeper/inva_4_tivo/image/projectImg/jingli.png


BIN
fhKeeper/formulahousekeeper/inva_4_tivo/image/projectImg/jishu.png


BIN
fhKeeper/formulahousekeeper/inva_4_tivo/image/projectImg/qita.png


BIN
fhKeeper/formulahousekeeper/inva_4_tivo/image/projectImg/shichang.png


BIN
fhKeeper/formulahousekeeper/inva_4_tivo/image/projectImg/shoho.png


BIN
fhKeeper/formulahousekeeper/inva_4_tivo/image/projectImg/yuangong.png


BIN
fhKeeper/formulahousekeeper/inva_4_tivo/image/projectImg/zhongjian.png


BIN
fhKeeper/formulahousekeeper/inva_4_tivo/image/projectImg/zhuguan.png


BIN
fhKeeper/formulahousekeeper/inva_4_tivo/image/qq.png


BIN
fhKeeper/formulahousekeeper/inva_4_tivo/image/wai.png


+ 1 - 1
fhKeeper/formulahousekeeper/inva_4_tivo/js/one.js

@@ -9,7 +9,7 @@
             if (!clientWidth) return;
             // 设置html字体大小(浏览器默认字体大小为16px)
             docEl.style.fontSize = clientWidth / 1920 * 20  + "px";
-            console.log(clientWidth / 1920 * 20  + "px")
+            // console.log(clientWidth / 1920 * 20  + "px")
         };
     // 不支持addEventListener,返回
     if (!doc.addEventListener) return;

+ 76 - 1
fhKeeper/formulahousekeeper/inva_4_tivo/project.html

@@ -106,7 +106,7 @@
     </div>
 
     <!-- 跨部门 -->
-    <div class="acrossDepartments">
+    <!-- <div class="acrossDepartments">
         <div class="contentes">
             <h2>支持跨部门,<span>多角色</span>的团队协作</h2>
             <div class="acrossCon">
@@ -180,6 +180,81 @@
                 </div>
             </div>
         </div>
+    </div> -->
+    <!-- 新版跨部门 -->
+    <div class="multipleRoles">
+        <div class="contentes">
+            <div class="multCons">
+                <div class="multipleRolesLeft">
+                    <div class="muRoLezc muDiv">
+                        支<br/>持<br/>跨<br/>部<br/>门<br/>,
+                    </div>
+                    <div class="muRoLetd muDiv">
+                        <span>多<br/>角<br/>色</span><br/>的<br/>团<br/>队<br/>协<br/>作
+                    </div>
+                </div>
+                <div class="multipleRolesRight">
+                    <div class="outerRing">
+                        <img src="./image/wai.png" alt="">
+                        <div class="outerRingNei">
+                            <img src="./image/qq.png" alt="">
+                        </div>
+                    </div>
+                    <div class="multipleRolesRightCon">
+                        <!-- 外圈 -->
+                        <div class="multipWai" style="top: -0.9375rem;left: 13.125rem">
+                            <div class="multipWaiCont">
+                                <div><img src="./image/projectImg/jishu.png" alt=""></div>
+                            </div>
+                            <p>技术部</p>
+                        </div>
+                        <div class="multipWai" style="top: 13.125rem;left: 28.75rem;">
+                            <div class="multipWaiCont">
+                                <div><img src="./image/projectImg/shoho.png" alt=""></div>
+                            </div>
+                            <p style="width: 6.25rem; margin-left: 2.5rem">售后服务部</p>
+                        </div>
+                        <div class="multipWai" style="left: 13.125rem;bottom: -3.75rem;">
+                            <div class="multipWaiCont">
+                                <div><img src="./image/projectImg/qita.png" alt=""></div>
+                            </div>
+                            <p>其他部门</p>
+                        </div>
+                        <div class="multipWai" style="top: 13.125rem;left: -2.1875rem;">
+                            <div class="multipWaiCont">
+                                <div><img src="./image/projectImg/shichang.png" alt=""></div>
+                            </div>
+                            <p style="margin-left: -2.1875rem;">市场部</p>
+                        </div>
+                        <!-- 内圈 -->
+                        <div class="multipWai" style="top: 8.125rem; left: 7.1875rem">
+                            <div class="multipWaiCont">
+                                <div style="width: 16px;"><img src="./image/projectImg/jingli.png" alt=""></div>
+                            </div>
+                            <p style="margin-left: -4.6875rem;margin-top: -1rem;">项目经理</p>
+                        </div>
+                        <div class="multipWai" style="top: 8.125rem; left: 19.0625rem;">
+                            <div class="multipWaiCont">
+                                <div><img src="./image/projectImg/zhongjian.png" alt=""></div>
+                            </div>
+                            <p style="margin-left: 4.6875rem;margin-top: -1rem;">市场总监</p>
+                        </div>
+                        <div class="multipWai" style="top: 19.0625rem;left: 19.0625rem;">
+                            <div class="multipWaiCont">
+                                <div><img src="./image/projectImg/yuangong.png" alt=""></div>
+                            </div>
+                            <p>普通员工</p>
+                        </div>
+                        <div class="multipWai" style="top: 19.0625rem;left: 7.1875rem">
+                            <div class="multipWaiCont">
+                                <div style="width: 25px;"><img src="./image/projectImg/zhuguan.png" alt=""></div>
+                            </div>
+                            <p>部门主管</p>
+                        </div>
+                    </div>
+                </div>
+            </div>
+        </div>
     </div>
 
     <!-- 支持多种行业和场景使用 -->

+ 19 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/config/PropertyMsg.java

@@ -0,0 +1,19 @@
+package com.management.platform.config;
+
+import java.lang.annotation.*;
+
+/**
+ *  属性信息注解,仅仅可以用于域声明
+ */
+@Target(ElementType.FIELD)
+@Retention(RetentionPolicy.RUNTIME)
+@Documented
+@Inherited
+public @interface PropertyMsg {
+    /**
+     * 提示语,用于标记哪个字段发生变更
+     *
+     * @return 提示语
+     */
+    String value();
+}

+ 3 - 3
src/main/java/com/management/platform/controller/ExpenseTypeController.java

@@ -11,11 +11,11 @@ import org.springframework.web.bind.annotation.RestController;
  * </p>
  *
  * @author Seyason
- * @since 2022-07-28
+ * @since 2022-08-18
  */
 @RestController
-@RequestMapping("/expense-type")
-public class ExpenseTypeController {
+@RequestMapping("/operation-record")
+public class OperationRecordController {
 
 }
 

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

@@ -751,7 +751,6 @@ public class ReportController {
             httpRespMsg.setError("验证失败");
             return httpRespMsg;
         }
-        System.out.println("reportList===size===="+reportList.size());
         //校验工作时长
         for (Report report : reportList) {
             if (report.getWorkingTime() == null || report.getWorkingTime() <= 0.0) {
@@ -895,22 +894,23 @@ public class ReportController {
                             }
                         }
                     } else {
-                        List<LocalDate> collect = oldReportList.stream().map(Report::getCreateDate).collect(Collectors.toList());
-                        for (Report report : reportList) {
-                            if (report.getId() == null) {
-                                if (collect.stream().anyMatch(oldDate->oldDate.isEqual(report.getCreateDate()))) {
-                                    sb.append(mdFormatter.format(report.getCreateDate())).append(",");
-                                }
-                            }
-                        }
+                        //按周填报时不校验已填的工时日报了
+//                        List<LocalDate> collect = oldReportList.stream().map(Report::getCreateDate).collect(Collectors.toList());
+//                        for (Report report : reportList) {
+//                            if (report.getId() == null) {
+//                                if (collect.stream().anyMatch(oldDate->oldDate.isEqual(report.getCreateDate()))) {
+//                                    sb.append(mdFormatter.format(report.getCreateDate())).append(",");
+//                                }
+//                            }
+//                        }
 
-                        String s = sb.toString();
-                        if (s.length() > 0) {
-                            s = s.substring(0, s.length() -1);
-                            HttpRespMsg msg = new HttpRespMsg();
-                            msg.setError("已存在填写日报: " + s+", 请先删除后再填报。");
-                            return msg;
-                        }
+//                        String s = sb.toString();
+//                        if (s.length() > 0) {
+//                            s = s.substring(0, s.length() -1);
+//                            HttpRespMsg msg = new HttpRespMsg();
+//                            msg.setError("已存在填写日报: " + s+", 请先删除后再填报。");
+//                            return msg;
+//                        }
                     }
                 }
             }

+ 53 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/entity/OperationRecord.java

@@ -0,0 +1,53 @@
+package com.management.platform.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+import java.io.Serializable;
+import java.time.LocalDateTime;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author Seyason
+ * @since 2022-08-18
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+public class OperationRecord extends Model<OperationRecord> {
+
+    private static final long serialVersionUID=1L;
+
+    @TableId(value = "id", type = IdType.AUTO)
+    private Integer id;
+
+    @TableField("company_id")
+    private Integer companyId;
+
+    @TableField("module_name")
+    private String moduleName;
+
+    @TableField("operator_name")
+    private String operatorName;
+
+    @TableField("operation_time")
+    private LocalDateTime operationTime;
+
+    @TableField("content")
+    private String content;
+
+
+    @Override
+    protected Serializable pkVal() {
+        return this.id;
+    }
+
+}

+ 6 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/entity/Project.java

@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.extension.activerecord.Model;
 import com.fasterxml.jackson.annotation.JsonFormat;
+import com.management.platform.config.PropertyMsg;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 import lombok.experimental.Accessors;
@@ -39,6 +40,7 @@ public class Project extends Model<Project> {
     /**
      * 项目名称
      */
+    @PropertyMsg("项目名称")
     @TableField("project_name")
     private String projectName;
 
@@ -51,6 +53,7 @@ public class Project extends Model<Project> {
     /**
      * 项目编码
      */
+    @PropertyMsg("项目编号")
     @TableField("project_code")
     private String projectCode;
 
@@ -63,6 +66,7 @@ public class Project extends Model<Project> {
     /**
      * 计划开始日期
      */
+    @PropertyMsg("计划开始日期")
     @TableField("plan_start_date")
     @JsonFormat(pattern = "yyyy-MM-dd")
     @DateTimeFormat(pattern = "yyyy-MM-dd")
@@ -71,6 +75,7 @@ public class Project extends Model<Project> {
     /**
      * 计划结束日期
      */
+    @PropertyMsg("计划结束日期")
     @TableField("plan_end_date")
     @JsonFormat(pattern = "yyyy-MM-dd")
     @DateTimeFormat(pattern = "yyyy-MM-dd")
@@ -86,6 +91,7 @@ public class Project extends Model<Project> {
     /**
      * 0-全部,1-正常,2-紧急,3-重要,4-重要且紧急 5-低风险 6-中风险 7-高风险
      */
+    @PropertyMsg("项目级别")
     @TableField("level")
     private Integer level;
 

+ 16 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/mapper/OperationRecordMapper.java

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

+ 3 - 1
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/mapper/ProjectMapper.java

@@ -32,7 +32,9 @@ public interface ProjectMapper extends BaseMapper<Project> {
 
     List<Map<String, Object>> getProjectCost(@Param("companyId")Integer companyId,@Param("startDate") String startDate, @Param("endDate") String endDate, @Param("projectId") Integer projectId,@Param("stateKey")Integer stateKey, @Param("userId") String userId,@Param("deptIds")List<Integer> deptIds,@Param("filterDeptIds")List<Integer> filterDeptIds);
 
-    List<Map<String, Object>> getProjectCusDataSumItem(@Param("companyId") Integer companyId, @Param("startDate") String startDate, @Param("endDate") String endDate, @Param("projectId") Integer projectId, @Param("userId") String userId);
+    List<Map<String, Object>> getProjectCusDataSumItem(@Param("companyId") Integer companyId, @Param("startDate") String startDate,
+                                                       @Param("endDate") String endDate, @Param("projectId") Integer projectId,
+                                                       @Param("userId") String userId, List<Integer> deptIds);
     List<Map<String, Object>> getProjectCusDataDetailItem(@Param("companyId") Integer companyId, @Param("startDate") String startDate, @Param("endDate") String endDate, @Param("projectId") Integer projectId, @Param("userId") String userId);
 
     @Update("update project set status = 1, finish_date = null where id = #{id}")

+ 16 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/OperationRecordService.java

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

+ 2 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/DepartmentServiceImpl.java

@@ -844,9 +844,11 @@ public class DepartmentServiceImpl extends ServiceImpl<DepartmentMapper, Departm
             //检查是否有查看全公司数值的权限
             User curUser = userMapper.selectById(request.getHeader("TOKEN"));
             List<SysRichFunction> functionList = sysFunctionMapper.getRoleFunctions(curUser.getRoleId(), "查看全公司数值");
+            System.out.println("functionList=="+functionList.size());
             if (functionList.size() == 0) {
                 //检查是否有负责的部门
                 deptIds = getAllManagedDeptIdList(curUser, allDeptList);
+                System.out.println("负责的部门:"+deptIds);
                 if (deptIds.size() == 0) {
                     deptIds.add(-1);//没有负责的部门,无权查看
                 }

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

@@ -0,0 +1,20 @@
+package com.management.platform.service.impl;
+
+import com.management.platform.entity.OperationRecord;
+import com.management.platform.mapper.OperationRecordMapper;
+import com.management.platform.service.OperationRecordService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author Seyason
+ * @since 2022-08-18
+ */
+@Service
+public class OperationRecordServiceImpl extends ServiceImpl<OperationRecordMapper, OperationRecord> implements OperationRecordService {
+
+}

+ 36 - 10
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ProjectServiceImpl.java

@@ -10,10 +10,7 @@ import com.management.platform.entity.*;
 import com.management.platform.entity.vo.*;
 import com.management.platform.mapper.*;
 import com.management.platform.service.*;
-import com.management.platform.util.ExcelUtil;
-import com.management.platform.util.HttpRespMsg;
-import com.management.platform.util.ListUtil;
-import com.management.platform.util.WorkDayCalculateUtils;
+import com.management.platform.util.*;
 import org.apache.poi.EncryptedDocumentException;
 import org.apache.poi.hssf.usermodel.HSSFCell;
 import org.apache.poi.hssf.usermodel.HSSFRow;
@@ -80,6 +77,8 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
     @Resource
     private ReportMapper reportMapper;
     @Resource
+    private DepartmentService departmentService;
+    @Resource
     private SubProjectMapper subProjectMapper;
     @Resource
     private ParticipationMapper participationMapper;
@@ -151,6 +150,8 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
     UserCustomMapper userCustomMapper;
     @Resource
     SubUserCustomMapper subUserCustomMapper;
+    @Resource
+    OperationRecordService operationRecordService;
 
 
     @Resource
@@ -520,6 +521,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
                 }
             }
         } else {
+            Project oldProject = projectMapper.selectById(id);
             isNew = false;
             //修改项目
             //检查项目编号不能重复
@@ -669,6 +671,20 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
                     financeProjectsMapper.update(fp, new QueryWrapper<FinanceProjects>().eq("project_id", p.getId()));
                 }
             }
+            Project newProject = projectMapper.selectById(id);
+            String path = Project.class.getClassLoader().getResource("/").getPath();
+            BeanChangeUtil<Project> beanChangeUtil=new BeanChangeUtil();
+            String content = beanChangeUtil.contrastObj(oldProject, newProject);
+            OperationRecord operationRecord =new OperationRecord();
+            operationRecord.setOperatorName(user.getName());
+            operationRecord.setOperationTime(LocalDateTime.now());
+            operationRecord.setCompanyId(companyId);
+            operationRecord.setContent(content);
+            operationRecord.setModuleName("项目管理");
+            if(!StringUtils.isEmpty(content.trim())){
+                System.out.println(operationRecord);
+                operationRecordService.save(operationRecord);
+            }
         }
         if (httpRespMsg.code.equals("ok")) {
             //编辑关系
@@ -2938,8 +2954,8 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
                         endDateCell = row.getCell(8+i+k+c);
                         amountCell = row.getCell(9+i+k+c);
                         if(company.getId()==936){
-                            warrantyEndDateCell=row.getCell(10+i+k+c);
-                            warrantyStartDateCell=row.getCell(11+i+k+c);
+                            warrantyStartDateCell=row.getCell(10+i+k+c);
+                            warrantyEndDateCell=row.getCell(11+i+k+c);
                             projectCategorySubCell=row.getCell(12+i+k+c);
                             regionCell=row.getCell(13+i+k+c);
                             buCell=row.getCell(14+i+k+c);
@@ -2974,8 +2990,8 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
                         endDateCell = row.getCell(9+i+k+c);
                         amountCell = row.getCell(10+i+k+c);
                         if(company.getId()==936){
-                            warrantyEndDateCell=row.getCell(11+i+k+c);
-                            warrantyStartDateCell=row.getCell(12+i+k+c);
+                            warrantyStartDateCell=row.getCell(11+i+k+c);
+                            warrantyEndDateCell=row.getCell(12+i+k+c);
                             projectCategorySubCell=row.getCell(13+i+k+c);
                             regionCell=row.getCell(14+i+k+c);
                             buCell=row.getCell(15+i+k+c);
@@ -3578,7 +3594,6 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
         try {
             Integer companyId = userMapper.selectById(request.getHeader("Token")).getCompanyId();
             TimeType timeType = timeTypeMapper.selectById(companyId);
-            List<Map<String, Object>> list = projectMapper.getCustomDataSum(companyId, startDate, endDate, projectId, userId);
             List<String> headList = new ArrayList<String>();
             headList.add("序号");
             headList.add("姓名");
@@ -3594,7 +3609,18 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
             SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
 
             //计算合计的费用
-            List<Map<String, Object>> membList = projectMapper.getProjectCusDataSumItem(companyId, startDate, endDate, projectId, userId);
+            //检查是否有查看全公司数值的权限
+            User curUser = userMapper.selectById(request.getHeader("TOKEN"));
+            List<SysRichFunction> functionList = sysFunctionMapper.getRoleFunctions(curUser.getRoleId(), "查看全公司数值");
+            List<Integer> deptIds = null;
+            if (functionList.size() == 0) {
+                //检查是否有负责的部门
+                deptIds = departmentService.getAllManagedDeptIdList(curUser, null);
+                if (deptIds.size() == 0) {
+                    deptIds.add(-1);//没有负责的部门,无权查看
+                }
+            }
+            List<Map<String, Object>> membList = projectMapper.getProjectCusDataSumItem(companyId, startDate, endDate, projectId, userId, deptIds);
             List<Map<String, Object>> membDetailList = projectMapper.getProjectCusDataDetailItem(companyId, startDate, endDate, projectId, userId);
             for (Map<String, Object> membMap : membList) {
                 List<String> membRowData = new ArrayList<String>();

+ 107 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/util/BeanChangeUtil.java

@@ -0,0 +1,107 @@
+package com.management.platform.util;
+
+import com.management.platform.config.PropertyMsg;
+import com.management.platform.service.OperationRecordService;
+
+import javax.annotation.Resource;
+import java.beans.PropertyDescriptor;
+import java.lang.reflect.Field;
+import java.lang.reflect.Method;
+import java.util.Arrays;
+import java.util.Objects;
+
+public class BeanChangeUtil<T> {
+
+    @Resource
+    private OperationRecordService operationRecordService;
+
+    public String contrastObj(Object oldBean, Object newBean) {
+        /*// 创建字符串拼接对象
+        StringBuilder str = new StringBuilder();
+        // 转换为传入的泛型T
+        T pojo1 = (T) oldBean;
+        T pojo2 = (T) newBean;
+        // 通过反射获取类的Class对象
+        Class clazz = pojo1.getClass();
+        // 获取类型及字段属性
+        Field[] fields = clazz.getDeclaredFields();
+        return jdk8Before(fields, pojo1, pojo2, str,clazz);*/
+//        return jdk8OrAfter(fields, pojo1, pojo2, str,clazz);
+        Field[] fields = newBean.getClass().getDeclaredFields();
+        StringBuilder builder = new StringBuilder();
+        for(Field field : fields) {
+            field.setAccessible(true);
+            if (field.isAnnotationPresent(PropertyMsg.class)) {
+                try {
+                    Object newValue = field.get(newBean);
+                    Object oldValue = field.get(oldBean);
+                    if(!Objects.equals(newValue, oldValue)) {
+                        builder.append(field.getAnnotation(PropertyMsg.class).value()); //获取字段名称
+                        builder.append(":[更改前:");
+                        builder.append(oldValue);
+                        builder.append(",更改后:");
+                        builder.append(newValue);
+                        builder.append("]\n");
+                    }
+                } catch (Exception e) {
+                    System.out.println(e);
+                }
+            }
+        }
+        return builder.toString();
+    }
+
+    // jdk8 普通循环方式
+    public String jdk8Before(Field[] fields,T pojo1,T pojo2,StringBuilder str,Class clazz){
+        int i = 1;
+        try {
+            for (Field field : fields) {
+                if(field.isAnnotationPresent(PropertyMsg.class)){
+                    field.setAccessible(true);//关闭字段的安全检测
+                    PropertyDescriptor pd = new PropertyDescriptor(field.getName(), clazz);
+                    // 获取对应属性值
+                    Method getMethod = pd.getReadMethod();
+                    Object o1 = getMethod.invoke(pojo1);
+                    Object o2 = getMethod.invoke(pojo2);
+                    if (o1 == null || o2 == null) {
+                        continue;
+                    }
+                    if (!o1.toString().equals(o2.toString())) {
+                        str.append(i + "、" + field.getAnnotation(PropertyMsg.class).value() + ":" + "修改前=>" + o1 + ",修改后=>" + o2 + "\n");
+                        i++;
+                    }
+                }
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+
+        return str.toString();
+    }
+
+    // lambda表达式,表达式内部的变量都是final修饰,需要传入需要传入final类型的数组
+    public String jdk8OrAfter(Field[] fields, T pojo1, T pojo2, StringBuilder str, Class clazz){
+        final int[] i = {1};
+        Arrays.asList(fields).forEach(f -> {
+            if(f.isAnnotationPresent(PropertyMsg.class)){
+                try {
+                    PropertyDescriptor pd = new PropertyDescriptor(f.getName(), clazz);
+                    // 获取对应属性值
+                    Method getMethod = pd.getReadMethod();
+                    Object o1 = getMethod.invoke(pojo1);
+                    Object o2 = getMethod.invoke(pojo2);
+                    if (o1 == null || o2 == null) {
+                        return;
+                    }
+                    if (!o1.toString().equals(o2.toString())) {
+                        str.append(i[0] + "、" + f.getAnnotation(PropertyMsg.class).value() + ":" + "修改前=>" + o1 + "\t修改后=>" + o2 + "\n");
+                        i[0]++;
+                    }
+                }catch (Exception e){
+                    e.printStackTrace();
+                }
+            }
+        });
+        return str.toString();
+    }
+}

+ 2 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/resources/mapper/DepartmentMapper.xml

@@ -90,6 +90,7 @@
             AND b.create_date between #{startDate} and #{endDate}
         </if>
         GROUP BY b.project_id, a.id
+        having IFNULL(SUM(b.custom_data),0) > 0
     </select>
     <!-- 根据部门获取自定义的日报数值 -->
     <select id="getDeptCustomDataStatistic" resultType="java.util.Map">
@@ -111,5 +112,6 @@
             AND b.create_date between #{startDate} and #{endDate}
         </if>
         GROUP BY b.project_id, a.department_id
+        having IFNULL(SUM(b.custom_data),0) > 0
     </select>
 </mapper>

+ 20 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/resources/mapper/OperationRecordMapper.xml

@@ -0,0 +1,20 @@
+<?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.OperationRecordMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.management.platform.entity.OperationRecord">
+        <id column="id" property="id" />
+        <result column="company_id" property="companyId" />
+        <result column="module_name" property="moduleName" />
+        <result column="operator_name" property="operatorName" />
+        <result column="operation_time" property="operationTime" />
+        <result column="content" property="content" />
+    </resultMap>
+
+    <!-- 通用查询结果列 -->
+    <sql id="Base_Column_List">
+        id, company_id, module_name, operator_name, operation_time, content
+    </sql>
+
+</mapper>

+ 7 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/resources/mapper/ProjectMapper.xml

@@ -234,6 +234,7 @@
         </if>
         AND b.state = 1
         GROUP BY a.id
+        having IFNULL(SUM(b.custom_data), 0) > 0
         ORDER BY SUM(b.custom_data) DESC
     </select>
 
@@ -408,6 +409,12 @@
         <if test="userId != null">
             AND a.creator_id = #{userId}
         </if>
+        <if test="deptIds != null">
+            AND department.department_id in
+            <foreach collection="deptIds" separator="," index="index" close=")" open="(" item="item">
+                #{item}
+            </foreach>
+        </if>
         group by b.id
         ORDER BY b.id ASC
     </select>

+ 8 - 2
fhKeeper/formulahousekeeper/timesheet/src/views/project/cost.vue

@@ -1040,7 +1040,10 @@
                                     type: 'bar',
                                     barMaxWidth: 30,
                                     data: yList,
-                                }]
+                                }],
+                                grid: {  
+                                    left: '100px',  
+                                }  
                             };
                         } else {
                             var option = {
@@ -1084,7 +1087,10 @@
                                     type: 'bar',
                                     barMaxWidth: 30,
                                     data: yList,
-                                }]
+                                }],
+                                grid: {  
+                                    left: '100px',  
+                                }  
                             };
                         }
                         

+ 1 - 1
fhKeeper/formulahousekeeper/timesheet/src/views/project/custom_data.vue

@@ -193,7 +193,7 @@
                  if (this.exportParam.dateRange != null) {
                     param = {startDate:this.exportParam.dateRange[0], endDate: this.exportParam.dateRange[1]};
                  }
-                 var url = this.permissions.customDataAll? "/project/exportCustomDataSum":"/department/exportCustomDataSum";
+                 var url = "/project/exportCustomDataSum";
                  var fileName = this.user.timeType.customDataName + '统计.xls';
                 //  if (this.radio == '人员' ) {
                 //      console.log(this.exportParam.userIds);

+ 1 - 0
fhKeeper/formulahousekeeper/timesheet/src/views/project/finance.vue

@@ -247,6 +247,7 @@
         <!--用户详细信息弹出框-->
         <el-dialog title="查看详情" v-if="userDetailVisible" :visible.sync="userDetailVisible" :close-on-click-modal="false" customClass="customWidth" width="400px">
             <div class="line"><span>姓名</span><span>{{userDetail.name}}</span></div>
+            <div class="line"><span>工号</span><span>{{userDetail.jobNumber}}</span></div>
             <div class="line"><span>手机号码</span><span>{{userDetail.phone}}</span></div>
             <div class="line"><span>部门</span><span>{{userDetail.departmentName}}</span></div>
             <div class="line"><span>成本</span><span>{{userDetail.cost}}元/小时</span></div>

+ 1 - 0
fhKeeper/formulahousekeeper/timesheet/src/views/project/info.vue

@@ -218,6 +218,7 @@
         <!--用户详细信息弹出框-->
         <el-dialog title="查看详情" v-if="userDetailVisible" :visible.sync="userDetailVisible" :close-on-click-modal="false" customClass="customWidth" width="500px">
             <div class="line"><span>姓名</span><span>{{userDetail.name}}</span></div>
+            <div class="line"><span>工号</span><span>{{userDetail.jobNumber}}</span></div>
             <div class="line"><span>手机号码</span><span>{{userDetail.phone}}</span></div>
             <div class="line"><span>角色</span><span>{{roleArray[userDetail.role]}}</span></div>
             <div class="line"><span>部门</span><span>{{userDetail.departmentName}}</span></div>

+ 16 - 7
fhKeeper/formulahousekeeper/timesheet/src/views/project/list.vue

@@ -361,10 +361,12 @@
         <el-dialog :title="title" v-if="addFormVisible" :visible.sync="addFormVisible" :close-on-click-modal="false" customClass="customWidth" width="960px">
             <el-form ref="form1" :model="addForm" :rules="rules" label-width="120px">
                 <el-form-item label="项目编号" >
-                    <el-input v-model="addForm.code" :disabled="!permissions.projectManagement && addForm.creatorId != user.id" placeholder="请输入项目编号" clearable></el-input>
+                    <!-- <el-input v-model="addForm.code" :disabled="!permissions.projectManagement && addForm.creatorId != user.id" placeholder="请输入项目编号" clearable></el-input> -->
+                    <el-input v-model="addForm.code" placeholder="请输入项目编号" clearable></el-input>
                 </el-form-item>
                  <el-form-item label="主项目" v-if="user.timeType.mainProjectState == '1'">
-                    <el-select v-model="addForm.projectMainId" clearable :disabled="!permissions.projectManagement && addForm.creatorId != user.id" @change="projectManagementChange">
+                    <!-- <el-select v-model="addForm.projectMainId" clearable :disabled="!permissions.projectManagement && addForm.creatorId != user.id" @change="projectManagementChange"> -->
+                    <el-select v-model="addForm.projectMainId" clearable @change="projectManagementChange">
                         <el-option v-for="(item) in mainProjectList" :key="item.id" :value="item.id" :label="item.name + '\u3000' + item.code">
                             <span style="float: left; color: #8492a6; font-size: 13px;">{{ item.code }}</span>
                             <span style="float: right;margin-left: 20px">{{ item.name }}</span>
@@ -372,18 +374,22 @@
                     </el-select>
                 </el-form-item>
                 <el-form-item label="项目分类" v-if="user.timeType.mainProjectState != '1'">
-                    <el-select v-model="addForm.category"  style="width:32%;" clearable :disabled="!permissions.projectManagement && addForm.creatorId != user.id">
+                    <!-- <el-select v-model="addForm.category"  style="width:32%;" clearable :disabled="!permissions.projectManagement && addForm.creatorId != user.id"> -->
+                    <el-select v-model="addForm.category"  style="width:32%;" clearable>
                         <el-option v-for="(item) in baseClfList" :key="item.id" :value="item.id" :label="item.name"></el-option>
                     </el-select>
                 </el-form-item>
                 <el-form-item label="项目名称" prop="name">
-                    <el-input v-model="addForm.name" :disabled="!permissions.projectManagement && addForm.creatorId != user.id" placeholder="请输入项目名称" clearable></el-input>
+                    <!-- <el-input v-model="addForm.name" :disabled="!permissions.projectManagement && addForm.creatorId != user.id" placeholder="请输入项目名称" clearable></el-input> -->
+                    <el-input v-model="addForm.name" placeholder="请输入项目名称" clearable></el-input>
                 </el-form-item>
                 <el-form-item label="项目描述" prop="projectDesc">
-                    <el-input v-model="addForm.projectDesc" :disabled="!permissions.projectManagement && addForm.creatorId != user.id" placeholder="请输入项目描述" clearable maxlength="4000"></el-input>
+                    <!-- <el-input v-model="addForm.projectDesc" :disabled="!permissions.projectManagement && addForm.creatorId != user.id" placeholder="请输入项目描述" clearable maxlength="4000"></el-input> -->
+                    <el-input v-model="addForm.projectDesc" placeholder="请输入项目描述" clearable maxlength="4000"></el-input>
                 </el-form-item>
                 <el-form-item label="项目类型" prop="isPublic">
-                    <el-select v-model="addForm.isPublic" style="width:32%;" @change="selectPublic" :disabled="!permissions.projectManagement && addForm.creatorId != user.id">
+                    <!-- <el-select v-model="addForm.isPublic" style="width:32%;" @change="selectPublic" :disabled="!permissions.projectManagement && addForm.creatorId != user.id"> -->
+                    <el-select v-model="addForm.isPublic" style="width:32%;" @change="selectPublic">
                         <el-option :value="0" label="普通项目"></el-option>
                         <el-option :value="1" label="公共项目"></el-option>
                     </el-select>
@@ -437,7 +443,9 @@
                     <el-input  @focus="showChooseMembTree" v-model="addForm.userNames"></el-input>
                     </el-tooltip>
                 </el-form-item>
-                <el-form-item label="项目经理" ><el-select v-model="addForm.inchargerId"  :disabled="(addForm.userId.length==0 && addForm.isPublic == 0) || (!permissions.projectManagement && user.id != addForm.creatorId)" filterable placeholder="请选择项目经理" style="width:32%;" >
+                <el-form-item label="项目经理" >
+                    <!-- <el-select v-model="addForm.inchargerId"  :disabled="(addForm.userId.length==0 && addForm.isPublic == 0) || (!permissions.projectManagement && user.id != addForm.creatorId)" filterable placeholder="请选择项目经理" style="width:32%;" > -->
+                    <el-select v-model="addForm.inchargerId" filterable placeholder="请选择项目经理" style="width:32%;" >
                         <el-option v-for="item in participator" :key="item.id" :label="item.name" :value="item.id"></el-option>
                     </el-select>
                 </el-form-item>
@@ -617,6 +625,7 @@
         <!--用户详细信息弹出框-->
         <el-dialog title="查看详情" v-if="userDetailVisible" :visible.sync="userDetailVisible" :close-on-click-modal="false" customClass="customWidth" width="400px">
             <div class="line"><span>姓名</span><span>{{userDetail.name}}</span></div>
+            <div class="line"><span>工号</span><span>{{userDetail.jobNumber}}</span></div>
             <div class="line"><span>手机号码</span><span>{{userDetail.phone}}</span></div>
             <div class="line"><span>角色</span><span>{{roleArray[userDetail.role]}}</span></div>
             <div class="line"><span>部门</span><span>{{userDetail.departmentName}}</span></div>

+ 1 - 0
fhKeeper/formulahousekeeper/timesheet/src/views/project/projectInside.vue

@@ -734,6 +734,7 @@
         <!--用户详细信息弹出框-->
         <el-dialog title="查看详情" v-if="userDetailVisible" :visible.sync="userDetailVisible" :close-on-click-modal="false" customClass="customWidth" width="400px">
             <div class="line"><span>姓名</span><span>{{userDetail.name}}</span></div>
+            <div class="line"><span>工号</span><span>{{userDetail.jobNumber}}</span></div>
             <div class="line"><span>手机号码</span><span>{{userDetail.phone}}</span></div>
             <div class="line"><span>部门</span><span>{{userDetail.departmentName}}</span></div>
             <div class="line"><span>成本</span><span>{{userDetail.cost}}元/小时</span></div>

+ 1 - 0
fhKeeper/formulahousekeeper/timesheet/src/views/task/list.vue

@@ -190,6 +190,7 @@
         <!--用户详细信息弹出框-->
         <el-dialog title="查看详情" v-if="userDetailVisible" :visible.sync="userDetailVisible" :close-on-click-modal="false" customClass="customWidth" width="400px">
             <div class="line"><span>姓名</span><span>{{userDetail.name}}</span></div>
+            <div class="line"><span>工号</span><span>{{userDetail.jobNumber}}</span></div>
             <div class="line"><span>手机号码</span><span>{{userDetail.phone}}</span></div>
             <div class="line"><span>部门</span><span>{{userDetail.departmentName}}</span></div>
             <div class="line"><span>成本</span><span>{{userDetail.cost}}元/小时</span></div>