Browse Source

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

ggooalice 2 years ago
parent
commit
42df150a69

+ 7 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/entity/ExpenseItem.java

@@ -39,6 +39,13 @@ public class ExpenseItem extends Model<ExpenseItem> {
     @TableField("project_id")
     private Integer projectId;
 
+    /**
+     * 项目名称
+     */
+    @TableField(exist = false)
+    private  String projectName;
+
+
     /**
      * 费用日期
      */

+ 10 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ExpenseSheetServiceImpl.java

@@ -17,6 +17,7 @@ import com.management.platform.util.MessageUtils;
 import org.apache.poi.EncryptedDocumentException;
 import org.apache.poi.openxml4j.exceptions.InvalidFormatException;
 import org.apache.poi.ss.usermodel.CellType;
+import org.apache.poi.ss.usermodel.Header;
 import org.apache.poi.xssf.usermodel.XSSFCell;
 import org.apache.poi.xssf.usermodel.XSSFRow;
 import org.apache.poi.xssf.usermodel.XSSFSheet;
@@ -178,6 +179,15 @@ public class ExpenseSheetServiceImpl extends ServiceImpl<ExpenseSheetMapper, Exp
     public HttpRespMsg getDetail(Integer id) {
         ExpenseSheet expenseSheet = expenseSheetMapper.selectById(id);
         List<ExpenseItem> list = expenseItemMapper.selectList(new QueryWrapper<ExpenseItem>().eq("expense_id", id));
+        List<Project> Project = projectMapper.selectList(new QueryWrapper<Project>().eq("company_id", expenseSheet.getCompanyId()));
+        for (ExpenseItem expenseItem : list) {
+            for (Project project : Project) {
+                if (expenseItem.getProjectId().equals(project.getId())){
+                    expenseItem.setProjectName(project.getProjectName());
+                    break;
+                }
+            }
+        }
         expenseSheet.setInvoiceList(list);
         HttpRespMsg msg = new HttpRespMsg();
         msg.data = expenseSheet;

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

@@ -7578,7 +7578,6 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
         titleList.add(MessageUtils.message("excel.standard"));
         titleList.add(MessageUtils.message("excel.actual"));
         titleList.add(MessageUtils.message("excel.leave"));
-        titleList.add(MessageUtils.message("excel.leave"));
         titleList.add(MessageUtils.message("excel.workWeather"));
         dataList.add(titleList);
         for (Map<String, Object> map : resultList) {

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

@@ -1020,7 +1020,7 @@
         from user us
         left join  department dp on dp.department_id=us.department_id
         where us.company_id=#{companyId}
-        and us.id NOT IN (SELECT id FROM `user` WHERE company_id=#{companyId} and inactive_date IS NOT NULL AND inactive_date &lt; #{startDate})
+        and us.id NOT IN (SELECT id FROM `user` WHERE company_id=#{companyId} and inactive_date IS NOT NULL AND inactive_date &lt; #{startDate} AND is_active = 0)
         <if test="userId!=null and userId!=''">
             and us.id=#{userId}
         </if>
@@ -1060,7 +1060,7 @@
         from user us
         left join  department dp on dp.department_id=us.department_id
         where us.company_id=#{companyId}
-        and us.id NOT IN (SELECT id FROM `user` WHERE company_id=#{companyId} and inactive_date IS NOT NULL AND inactive_date &lt; #{startDate})
+        and us.id NOT IN (SELECT id FROM `user` WHERE company_id=#{companyId} and inactive_date IS NOT NULL AND inactive_date &lt; #{startDate} AND is_active = 0)
         <if test="userId!=null and userId!=''">
             and us.id=#{userId}
         </if>
@@ -1228,7 +1228,7 @@
         from user us
         left join department dp on dp.department_id=us.department_id
         where us.company_id=#{companyId}
-        and us.id NOT IN (SELECT id FROM `user` WHERE company_id=#{companyId} and inactive_date IS NOT NULL AND inactive_date &lt; #{startDate})
+        and us.id NOT IN (SELECT id FROM `user` WHERE company_id=#{companyId} and inactive_date IS NOT NULL AND inactive_date &lt; #{startDate} AND is_active = 0)
         <if test="userId!=null and userId!=''">
             and us.id=#{userId}
         </if>
@@ -1261,7 +1261,7 @@
         from user us
         left join  department dp on dp.department_id=us.department_id
         where us.company_id=#{companyId}
-        and us.id NOT IN (SELECT id FROM `user` WHERE company_id=#{companyId} and inactive_date IS NOT NULL AND inactive_date &lt; #{startDate})
+        and us.id NOT IN (SELECT id FROM `user` WHERE company_id=#{companyId} and inactive_date IS NOT NULL AND inactive_date &lt; #{startDate} AND is_active = 0)
         <if test="userId!=null and userId!=''">
             and us.id=#{userId}
         </if>

+ 9 - 3
fhKeeper/formulahousekeeper/ops-platform/src/main/java/com/management/platform/controller/OperationRecordController.java

@@ -21,6 +21,7 @@ import java.time.format.DateTimeFormatter;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Optional;
+import java.util.stream.Collectors;
 
 /**
  * <p>
@@ -41,12 +42,16 @@ public class OperationRecordController {
     private CompanyMapper companyMapper;
 
     @RequestMapping("/getList")
-    public HttpRespMsg getList(Integer companyId,String startDate,String endDate,Integer pageIndex ,Integer pageSize){
+    public HttpRespMsg getList(String companyName,String startDate,String endDate,Integer pageIndex ,Integer pageSize){
         HttpRespMsg httpRespMsg=new HttpRespMsg();
         List<Company> companyList = companyMapper.selectList(null);
         QueryWrapper<OperationRecord> queryWrapper=new QueryWrapper<>();
-        if(companyId!=null){
-            queryWrapper.eq("company_id",companyId);
+        if(companyName!=null&&companyName!=""){
+            List<Integer> list = companyList.stream().filter(cl -> cl.getCompanyName().contains(companyName)).map(Company::getId).collect(Collectors.toList());
+            if(list.size()<=0){
+                return new HttpRespMsg();
+            }
+            queryWrapper.in("company_id",list);
         }
         if(startDate!=null && endDate!=null){
             LocalDateTime start = LocalDate.parse(startDate, DateTimeFormatter.ofPattern("yyyy-MM-dd")).atTime(LocalTime.now());
@@ -62,6 +67,7 @@ public class OperationRecordController {
             if(first.isPresent()){
                 operationRecord.setCompanyName(first.get().getCompanyName());
             }
+            operationRecord.setTime(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss").format(operationRecord.getOperationTime()));
         }
         long total=operationRecordIPage.getTotal();
         HashMap map=new HashMap();

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

@@ -50,6 +50,9 @@ public class OperationRecord extends Model<OperationRecord> {
     @TableField(exist = false)
     private String companyName;
 
+    @TableField(exist = false)
+    private String time;
+
 
     @Override
     protected Serializable pkVal() {

+ 1 - 1
fhKeeper/formulahousekeeper/timesheet/src/components/select.vue

@@ -298,6 +298,7 @@ export default {
         },
         liClick(item, itemIndex) {
             let nameId = item.id || item.auditorId
+            this.selectName = item.name || item.auditorName
             if(!this.multiSelect) {
                 console.log('我进来了', this.flg)
                 if(this.flgs) {
@@ -316,7 +317,6 @@ export default {
                     }
                     this.$emit("selectCal", obj)
                 }
-                this.selectName = item.name || item.auditorName
                 this.transitionBoxLiIdx = ''
                 this.show = false
                 this.classDiv = false

+ 26 - 5
fhKeeper/formulahousekeeper/timesheet/src/views/project/cost.vue

@@ -196,6 +196,7 @@
                 total: 0,
                 personnelValue: '',
                 personnelAll: [],
+                personnelAllPlly: [],
                 yAxisValue: localStorage.yAxisValue?localStorage.yAxisValue:0,
                 parentDeptStack:[],
                 parentDeptId:null,
@@ -423,18 +424,33 @@
             personnel() {
                 this.page = 1
                 if(this.personnelValue) {
-                    var arrlist = JSON.parse(JSON.stringify(this.personnelAll))
+                    var arrlist = JSON.parse(JSON.stringify(this.personnelAllPlly))
                     var arr = []
                     for(var i in arrlist.list) {
+                        console.log(arrlist.list[i].name, this.personnelValue)
                         if(arrlist.list[i].name == this.personnelValue) {
                             arr.push(arrlist.list[i])
                         }
                     }
                     arrlist.list = arr
                     this.allListData = arrlist
-                    this.gtff()
+                    // this.gtff()
+                    if(this.user.userNameNeedTranslate == '1') {
+                        let list = arrlist.list
+                        let dealWithList = []
+                        for(var i in list) {
+                            let obj = {}
+                            obj.type = list[i].type
+                            obj.id = list[i].name
+                            dealWithList.push(obj)
+                        }
+                        this.dealWithTranslationPlone(dealWithList)
+                    } else {
+                        this.allListData = arrlist
+                        this.gtff()
+                    }
                 } else {
-                    this.allListData = this.personnelAll
+                    this.allListData = this.personnelAllPlly
                     this.gtff()
                 }
             },
@@ -464,9 +480,10 @@
                     if (res.code == "ok") {
                         // 
                             
-                        // 
+                        //
                         this.personnelAll = res.data
                         this.allListData = res.data
+                        this.personnelAllPlly = JSON.parse(JSON.stringify(res.data)) 
 
                         if(this.user.userNameNeedTranslate == '1') {
                             let list = res.data.list
@@ -858,6 +875,7 @@
                     myFunOne()
             },
             dealWithTranslationPlone(items, dataList) {
+                    console.log(items, '过来道德值')
                     if (WWOpenData.initCanvas) {
                         WWOpenData.initCanvas()
                     }
@@ -870,8 +888,11 @@
                                 })
                             }
                         })
+                        console.log('取到的值', result)
                         for(var i in this.allListData.list) {
-                            this.allListData.list[i].name = result.items[i].data
+                            if(result.items[i]) {  
+                                this.allListData.list[i].name = result.items[i].data
+                            }
                         }
                         this.gtff()
                     }

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

@@ -784,7 +784,12 @@
                                                 <ww-open-data type='userName' :openid='item.userName'></ww-open-data>
                                             </p>
                                         <!-- </p> -->
-                                        <em>{{item.content}}</em>
+                                        <em>
+                                            <!-- {{item.content}} -->
+                                            <p style="display: inline-block;padding: 0;margin: 0;" v-if="user.userNameNeedTranslate == 1"><ww-open-data type='userName' :openid='item.content.name'></ww-open-data></p>
+                                            <p style="display: inline-block;padding: 0;margin: 0;" v-if="user.userNameNeedTranslate != 1">{{item.content.name}}</p>
+                                            {{item.content.con}}
+                                        </em>
                                     </div>
                                     <span>{{item.createTime | relativeTime}}</span>
                                 </li>
@@ -2439,6 +2444,21 @@
                 this.http.post('/task-comment/getList', {taskId: e == 1 ? task.taskId : task.id},
                 res => {
                     if (res.code == "ok") {
+                        for(var i in res.data) {
+                            if(res.data[i].content.indexOf(res.data[i].userName) != '-1') {
+                                let obj = {
+                                    name: res.data[i].userName,
+                                    con: res.data[i].content.split(res.data[i].userName)[1]
+                                }
+                                res.data[i].content = obj
+                            } else {
+                                let obj = {
+                                    name: '',
+                                    con: res.data[i].content
+                                }
+                                res.data[i].content = obj
+                            }
+                        }
                         this.commentList = res.data
                         this.sppk(this.commentList) // 获取参与人的方法
                     } else {

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

@@ -446,7 +446,12 @@
                                         <!-- <p>{{item.userName}}</p> -->
                                         <p v-if="user.userNameNeedTranslate != '1'">{{item.userName}}</p>
                                         <p v-if="user.userNameNeedTranslate == '1'"><ww-open-data type='userName' :openid='item.userName'></ww-open-data></p>
-                                        <em>{{item.content}}</em>
+                                        <em>
+                                            <!-- {{item.content}} -->
+                                            <p style="display: inline-block;padding: 0;margin: 0;" v-if="user.userNameNeedTranslate == 1"><ww-open-data type='userName' :openid='item.content.name'></ww-open-data></p>
+                                            <p style="display: inline-block;padding: 0;margin: 0;" v-if="user.userNameNeedTranslate != 1">{{item.content.name}}</p>
+                                            {{item.content.con}}
+                                        </em>
                                     </div>
                                     <span>{{item.createTime | relativeTime}}</span>
                                 </li>
@@ -1315,7 +1320,23 @@ import { error } from 'dingtalk-jsapi';
                 this.http.post('/task-comment/getList', {taskId: task.id},
                 res => {
                     if (res.code == "ok") {
+                        for(var i in res.data) {
+                            if(res.data[i].content.indexOf(res.data[i].userName) != '-1') {
+                                let obj = {
+                                    name: res.data[i].userName,
+                                    con: res.data[i].content.split(res.data[i].userName)[1]
+                                }
+                                res.data[i].content = obj
+                            } else {
+                                let obj = {
+                                    name: '',
+                                    con: res.data[i].content
+                                }
+                                res.data[i].content = obj
+                            }
+                        }
                         this.commentList = res.data
+                        console.log(res.data, '数据')
                         this.sppk(this.commentList) // 获取参与人的方法
                     } else {
                         this.$message({