Browse Source

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

山水共长天一色 3 years ago
parent
commit
3028e83f49

+ 18 - 3
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ProjectServiceImpl.java

@@ -2106,7 +2106,13 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
                 if (isPublicCell != null && !StringUtils.isEmpty(isPublicCell.getStringCellValue())) {
                     project.setIsPublic("是".equals(isPublicCell.getStringCellValue())?1:0);
                 }
-                projectMapper.insert(project);
+                if(projectMapper.insert(project)>0){
+                    ProjectAuditor projectAuditor=new ProjectAuditor();
+                    projectAuditor.setAuditorId(project.getInchargerId());
+                    projectAuditor.setAuditorName(project.getInchargerName());
+                    projectAuditor.setProjectId(project.getId());
+                    projectAuditorMapper.insert(projectAuditor);
+                }
                 importCount++;
                 //处理子项目
                 if (subNameCell != null) {
@@ -2126,9 +2132,18 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
                 //参与人
                 if (participatorCell != null) {
                     String part = participatorCell.getStringCellValue();
+                    //将项目负责人也添加到参与人当中来
+                    String incharger = inchargerCell.getStringCellValue();
                     if (!StringUtils.isEmpty(part)) {
-                        String[] split = part.split("\\,|\\,");
-                        for (String str : split) {
+                        String[] partSplit = part.split("\\,|\\,");
+                        if(!StringUtils.isEmpty(incharger)){
+                            String[] inchargerSplit = incharger.split("\\,|\\,");
+                            int strLen1 = partSplit.length;// 保存第一个数组长度
+                            int strLen2 = inchargerSplit.length;
+                            partSplit=Arrays.copyOf(partSplit, strLen1+strLen2);
+                            System.arraycopy(inchargerSplit, 0, partSplit, strLen1, strLen2);
+                        }
+                        for (String str : partSplit) {
                             Participation p = new Participation();
                             Optional<User> first = userList.stream().filter(u -> u.getName().equals(str)).findFirst();
                             if (first.isPresent()) {

+ 2 - 0
fhKeeper/formulahousekeeper/timesheet/src/views/project/project_gantt.vue

@@ -50,6 +50,8 @@
           :label="reqpar1 ? item.projectName : item.name"
           :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>
       </div>

+ 6 - 2
fhKeeper/formulahousekeeper/timesheet/src/views/workReport/daily.vue

@@ -3601,7 +3601,9 @@
                                 time: this.report.time
                             }
                             if(this.user.timeType.type == 1) {
-                                    this.workForm.domains[0].workingTime = this.user.timeType.allday+'.0'
+                                    var shuzhi = this.user.timeType.allday + ''
+                                    console.log('执行一次', shuzhi.indexOf('.'))
+                                    this.workForm.domains[0].workingTime = shuzhi.indexOf('.') == '-1' ? shuzhi + '.0' : shuzhi
                                 }
                             if (this.timeBasecostList && this.timeBasecostList.length > 0) {
                                 //默认给第一个,必填字段
@@ -3685,7 +3687,9 @@
                                 }],
                             }
                             if(this.user.timeType.type == 1) {
-                                this.workForm.domains[0].workingTime = this.user.timeType.allday+'.0'
+                                var shuzhi = this.user.timeType.allday + ''
+                                    console.log('执行二次')
+                                this.workForm.domains[0].workingTime = shuzhi.indexOf('.') == '-1' ? shuzhi + '.0' : shuzhi
                             }
                             // console.log(this.workForm)
                     if (this.timeBasecostList&&this.timeBasecostList.length>0) {

+ 4 - 2
fhKeeper/formulahousekeeper/timesheet_h5/src/views/edit/index.vue

@@ -92,7 +92,7 @@
                     <van-cell title="专业进度" v-if="user.company.packageEngineering == 1">
                     </van-cell>
                     <van-field :disabled="!canEdit"
-                        type="number"  :name="'progress_'+pItem.professionId" input-align="right" 
+                        type="number"  :name="'progress_'+pItem.professionId" input-align="right"  
                         v-for="pItem in item.professionProgress" :key="pItem.professionId"
                         :label="'--    '+pItem.professionName"  
                     >
@@ -937,12 +937,14 @@
                         } else {
                             this.canCancel = false;
                             this.canEdit = true;
+                            var shuzhi = this.user.timeType.allday + ''
                             //没有填报的可以点击提交
                             this.form.domains = [{
                                 id: null,
                                 projectId: "",
                                 projectName: "",
-                                workingTime: t.type==3?(t.allday).toFixed(1):"8.0",
+                                // workingTime: t.type==3?(t.allday).toFixed(1):"8.0",
+                                workingTime: t.type==3?(t.allday).toFixed(1):shuzhi.indexOf('.') == '-1' ? shuzhi + '.0' : shuzhi,
                                 content: "",
                                 state: 2,
                                 progress:100,

+ 10 - 10
fhKeeper/formulahousekeeper/timesheet_h5/vue.config.js

@@ -3,17 +3,17 @@ const pxtorem = require("postcss-pxtorem");
 const path = require('path');
 const themePath = path.resolve(__dirname,'src/assets/style/theme.less');
 
-// var ip = '192.168.2.2'
+var ip = '192.168.2.2'
 // var ip = '127.0.0.1'
-var os = require('os'), ip = '', ifaces = os.networkInterfaces() // 获取本机ip
-for (var i in ifaces) {
-    for (var j in ifaces[i]) {
-        var val = ifaces[i][j]
-        if (val.family === 'IPv4' && val.address !== '127.0.0.1') {
-            ip = val.address
-        }
-    }
-}
+// var os = require('os'), ip = '', ifaces = os.networkInterfaces() // 获取本机ip
+// for (var i in ifaces) {
+//     for (var j in ifaces[i]) {
+//         var val = ifaces[i][j]
+//         if (val.family === 'IPv4' && val.address !== '127.0.0.1') {
+//             ip = val.address
+//         }
+//     }
+// }
 
 module.exports = {
     // 关闭eslint检查