Bläddra i källkod

Merge remote-tracking branch 'origin/master'

lxy_01 3 veckor sedan
förälder
incheckning
67fa7a4db4

+ 0 - 43
fhKeeper/formulahousekeeper/management-platform-mld/src/main/java/com/management/platform/task/TimingTask.java

@@ -903,49 +903,6 @@ public class TimingTask {
         return result;
     }
 
-    //每天1:00 同步昨天的微信请假信息
-    @Scheduled(cron = "0 0 1 ? * *")
-    public void synWxLeave() throws Exception {
-        if (isDev) return;
-        System.out.println("+++++++++++++++++++微信请假同步开始+++++++++++++++++++");
-        String startTime = Long.toString(System.currentTimeMillis()/1000L-86400);
-        String endTime = Long.toString(System.currentTimeMillis()/1000L);
-        //查询开启了微信请假同步的公司
-        List<TimeType> needSynLeave = timeTypeMapper.selectList(new QueryWrapper<TimeType>().eq("wx_leave", 1));
-        ArrayList<Integer> companyId = new ArrayList<>();
-        needSynLeave.forEach(item->{
-            companyId.add(item.getCompanyId());
-        });
-        companyId.add(-1);
-        //查询更新审批中的请假单
-        List<LeaveSheet> approvalLeave = leaveSheetMapper.selectApprovalList();
-        //插入请假单并更新审核中的请假单
-        List<WxCorpInfo> wxCorpInfos = wxCorpInfoMapper.selectList(new QueryWrapper<WxCorpInfo>().in("company_id",companyId));
-        List<LeaveSheet> leaveSheets = wxCorpInfoService.wxLeaveNumber(startTime,endTime, wxCorpInfos,approvalLeave);
-        for (LeaveSheet leaveSheet : leaveSheets) {
-            leaveSheetMapper.insert(leaveSheet);
-        }
-    }
-
-    //每天7点同步前2天的企业微信考勤考勤打卡记录
-    @Scheduled(cron = "0 0 7 ? * *")
-    private void synCorpWXCardTime() {
-        if (isDev) return;
-        LocalDateTime yestoday = LocalDateTime.now().minusDays(1);
-        yestoday = yestoday.withHour(0).withMinute(0).withSecond(0).withNano(0);
-        LocalDateTime yesBefore = yestoday.minusDays(1);
-        List<TimeType> typeList = timeTypeMapper.selectList(new QueryWrapper<TimeType>().eq("sync_corpwx_time", 1));
-        for (TimeType type : typeList) {
-            Integer companyId = type.getCompanyId();
-            //检查企业是否已经过期
-            Company company = companyMapper.selectById(companyId);
-            //跳过已过期的企业
-            if (company.getExpirationDate().isBefore(LocalDateTime.now())) continue;
-            //改成同步前2天的,以防止有昨天补卡前天的情况
-            wxCorpInfoService.getUserCheckInDayData(companyId, null, yesBefore, yestoday, false);
-        }
-    }
-
     //每分钟校验是否有需要提醒待审核的内容
     @Scheduled(fixedRate = 60 * 1000)
     private void alertWaitingApprove() {

+ 8 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/ExpenseSheetController.java

@@ -51,6 +51,14 @@ public class ExpenseSheetController {
     @Value(value = "${upload.path}")
     private String uploadPath;
 
+    @RequestMapping("/saveRemark")
+    public HttpRespMsg saveRemark(Integer id, String remark) {
+        ExpenseSheet sheet = new ExpenseSheet();
+        sheet.setId(id);
+        sheet.setRemark(remark==null?"":remark);
+        expenseSheetService.updateById(sheet);
+        return new HttpRespMsg();
+    }
     @RequestMapping("/getNextCode")
     public HttpRespMsg getNextCode() {
         String userId = request.getHeader("Token");

+ 9 - 1
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/TaskController.java

@@ -535,6 +535,7 @@ public class TaskController {
         String token = request.getHeader("TOKEN");
         User user = userMapper.selectById(token);
         Company company = companyMapper.selectById(user.getCompanyId());
+
         //进行完成操作时需要检查子任务是否全部完成
         if (task.getTaskStatus() == 0) {
             QueryWrapper<Task> subQuery = new QueryWrapper<Task>();
@@ -546,8 +547,15 @@ public class TaskController {
                 return msg;
             }
         }
-        //检查是否要核验成果文件
         Task curTask = taskMapper.selectById(task.getId());
+        //校验任务执行人
+        if (user.getCompanyId() == 7783 || user.getCompanyId() == 7757) {
+            if (StringUtils.isEmpty(curTask.getExecutorId())) {
+                msg.setError("任务尚未设置执行人,无法完成");
+                return msg;
+            }
+        }
+        //检查是否要核验成果文件
         if (curTask.getAttachFileRequired() && task.getTaskStatus() == 0) {
             Integer cnt = taskFilesMapper.selectCount(new QueryWrapper<TaskFiles>().eq("task_id",task.getId()));
             if (cnt == 0) {

+ 26 - 3
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ExpenseSheetServiceImpl.java

@@ -1307,10 +1307,11 @@ public class ExpenseSheetServiceImpl extends ServiceImpl<ExpenseSheetMapper, Exp
      */
     @Override
     public HttpRespMsg exportList(ExpenseSheet sheet,Integer projectId, String startDate, String endDate) {
-        WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", sheet.getCompanyId()));
+        Integer companyId = sheet.getCompanyId();
+        WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", companyId));
         CompanyDingding dingding = companyDingdingMapper.selectOne(new QueryWrapper<CompanyDingding>().eq("company_id", sheet.getCompanyId()));
         QueryWrapper<ExpenseSheet> queryWrapper = new QueryWrapper<ExpenseSheet>();
-        queryWrapper.eq("company_id", sheet.getCompanyId()).orderByDesc("id");
+        queryWrapper.eq("company_id", companyId).orderByDesc("id");
         List<ExpenseMainType> mainTypes = expenseMainTypeService.list(new QueryWrapper<ExpenseMainType>().eq("company_id", sheet.getCompanyId()));
         if (!StringUtils.isEmpty(sheet.getCode())) {
             queryWrapper.eq("code", sheet.getCode());
@@ -1341,9 +1342,16 @@ public class ExpenseSheetServiceImpl extends ServiceImpl<ExpenseSheetMapper, Exp
         List<List<String>> allList=new ArrayList<>();
         List<String> titleList=new ArrayList<>();
         titleList.add("报销人");
+        //对于柘中,增加工程名称
+        if (companyId == 4811) {
+            titleList.add("工程名称");
+        }
         titleList.add("填报时间");
         titleList.add("发票张数");
-        titleList.add("费用类型");
+        titleList.add("费用主类型");
+        if (companyId == 4811) {
+            titleList.add("设备归属人");
+        }
         titleList.add("总费用");
         titleList.add("备注");
         titleList.add("状态");
@@ -1358,6 +1366,7 @@ public class ExpenseSheetServiceImpl extends ServiceImpl<ExpenseSheetMapper, Exp
         allList.add(titleList);
         BigDecimal sumAmount = new BigDecimal(0);
         List<Map> mapList=new ArrayList<>();
+        final List<EquipmentOwner> equipmentOwnerList = equipmentOwnerMapper.selectList(new QueryWrapper<EquipmentOwner>().in("company_id", companyId));
         for (ExpenseSheet record : records) {
             Map map=new HashMap();
             List<ExpenseItem> expenseItems =new ArrayList<>();
@@ -1375,6 +1384,10 @@ public class ExpenseSheetServiceImpl extends ServiceImpl<ExpenseSheetMapper, Exp
             }
             map.put("size",expenseItems.size());
             mapList.add(map);
+
+            Optional<EquipmentOwner> equipmentOwnerOptional = equipmentOwnerList.stream().filter(eo -> eo.getId().equals(record.getEquipmentOwnerId())).findFirst();
+            equipmentOwnerOptional.ifPresent(equipmentOwner -> record.setEquipmentOwnerName(equipmentOwner.getEquipmentOwner()));
+
             for (ExpenseItem expenseItem : expenseItems) {
                 List<String> item=new ArrayList<>();
                 if (wxCorpInfo!=null&&wxCorpInfo.getSaasSyncContact()==1){
@@ -1384,12 +1397,22 @@ public class ExpenseSheetServiceImpl extends ServiceImpl<ExpenseSheetMapper, Exp
                 }else {
                     item.add(record.getOwnerName());
                 }
+                //对于柘中,增加工程名称
+                if (companyId == 4811) {
+                    Optional<Project> project = projectList.stream().filter(p -> p.getId().equals(expenseItem.getProjectId())).findFirst();
+                    item.add(project.isPresent()?project.get().getProjectName():"");
+                }
+
+
                 item.add(record.getCreateDate()==null?"":record.getCreateDate()+"");
 
                 item.add(record.getTicketNum()==null?"0":record.getTicketNum()+"");
                 Optional<ExpenseMainType> first = mainTypes.stream().filter(ms -> ms.getId().equals(record.getType())).findFirst();
                 item.add(first.isPresent()?first.get().getName():"");
 //                item.add(record.getTotalAmount()==null?"0":record.getTotalAmount()+"");
+                if (companyId == 4811) {
+                    item.add(record.getEquipmentOwnerName()==null?"":record.getEquipmentOwnerName());
+                }
                 item.add(amount+"");
                 item.add(record.getRemark()==null?"":record.getRemark());
                 switch (expenseItem.getStatus()){

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

@@ -1857,7 +1857,6 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
                             projectVO.setProgress(percentRes);
                         }
                     }
-
                 }
             }
 

+ 6 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/TaskGroupServiceImpl.java

@@ -18,8 +18,10 @@ import org.springframework.util.StringUtils;
 
 import javax.annotation.Resource;
 import javax.servlet.http.HttpServletRequest;
+import java.time.LocalDate;
 import java.time.LocalDateTime;
 import java.util.ArrayList;
+import java.util.Date;
 import java.util.List;
 import java.util.Map;
 
@@ -143,6 +145,8 @@ public class TaskGroupServiceImpl extends ServiceImpl<TaskGroupMapper, TaskGroup
                                 TaskFiles toFile = new TaskFiles();
                                 BeanUtils.copyProperties(fromFile, toFile);
                                 toFile.setTaskId(task.getId());
+                                toFile.setProjectId(projectId);
+                                toFile.setIndate(new Date());
                                 saveFilesList.add(toFile);
                             }
                             taskFilesService.saveBatch(saveFilesList);
@@ -258,6 +262,8 @@ public class TaskGroupServiceImpl extends ServiceImpl<TaskGroupMapper, TaskGroup
                                 TaskFiles toFile = new TaskFiles();
                                 BeanUtils.copyProperties(fromFile, toFile);
                                 toFile.setTaskId(task.getId());
+                                toFile.setProjectId(projectId);
+                                toFile.setIndate(new Date());
                                 saveFilesList.add(toFile);
                             }
                             taskFilesService.saveBatch(saveFilesList);

+ 20 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/util/WorkDayCalculateUtils.java

@@ -127,6 +127,26 @@ public class WorkDayCalculateUtils {
                 "2025-10-01","2025-10-02","2025-10-03","2025-10-06","2025-10-07","2025-10-08",//国庆节
         });
         YEAR_DEFINE.put("2025", map2025);
+
+        HashMap<String, String[]> map2026 = new HashMap<>();
+        //除了周末的特殊工作日
+        map2026.put(KEY_SPECIAL_WORK_DAYS, new String[]{"2026-01-04",//元旦
+                "2026-02-14","2026-02-28",//春节
+                "2026-05-09",//劳动节
+                "2026-09-20",//端午节
+                "2026-10-10",//国庆节
+        });
+        //除了周末的特殊休息日,例如国庆中秋春节
+        map2026.put(KEY_SPECIAL_REST_DAYS, new String[]{
+                "2026-01-01","2026-01-02",//元旦
+                "2026-02-16", "2026-02-17", "2026-02-18", "2026-02-19", "2026-02-20","2026-02-23",//春节
+                "2026-04-06",//清明节
+                "2026-05-01","2026-05-04","2026-05-05",//劳动节
+                "2026-06-19",//端午节
+                "2026-09-25",//中秋节
+                "2026-10-01","2026-10-02","2026-10-05","2026-10-06","2026-10-07",//国庆节
+        });
+        YEAR_DEFINE.put("2026", map2026);
     }
 
     /**

+ 41 - 7
fhKeeper/formulahousekeeper/timesheet/src/views/expense/expense.vue

@@ -146,7 +146,7 @@
               <!-- 备注 -->
               <el-form-item :label="$t('bei-zhu')" style="display: block; width: 70%">
                 <el-input type="textarea" v-model="addForm.remark" :autosize="{ minRows: 2, maxRows: 2 }"
-                  maxlength="100" :disabled="expenseMainTypeValue == 14454"></el-input>
+                  maxlength="500" show-word-limit :disabled="expenseMainTypeValue == 14454"></el-input>
               </el-form-item>
               <!-- 总费用 -->
               <!-- <div style="float: left; line-height: 55px;margin-left:20px">总费用 <el-link disabled v-model="addForm.totalAmount">{{addForm.totalAmount}}</el-link> 元</div> -->
@@ -228,7 +228,7 @@
               </el-table-column>
               <el-table-column :label="$t('bei-zhu')" width="135px">
                 <template slot-scope="scope">
-                  <el-input size="small" v-model="scope.row.remark" :disabled="user.companyId == 4811 && user.id != addForm.ownerId && expenseMainTypeValue == 14454"></el-input>
+                  <el-input size="small" v-model="scope.row.remark"  maxlength="100" show-word-limit :disabled="user.companyId == 4811 && user.id != addForm.ownerId && expenseMainTypeValue == 14454"></el-input>
                 </template>
               </el-table-column>
               <el-table-column :label="$t('expensereimbursementvoucher')" width="135px">
@@ -437,7 +437,7 @@
             </el-table-column>
             <el-table-column prop="ticketNum" :label="$t('invoicenumber')"
               v-if="this.user.timeType.easyExpense == 0 && user.companyId != 4811"></el-table-column>
-            <el-table-column prop="type" :label="$t('ppertype')" v-if="this.user.timeType.easyExpense == 0">
+            <el-table-column prop="type" label="费用主类型" v-if="this.user.timeType.easyExpense == 0">
               <template slot-scope="scope">
                 <template v-if="user.companyId == 4811 && scope.row.status == 4">
                   <span style="color: red">{{ scope.row.expenseMainTypeName }}</span>
@@ -751,7 +751,7 @@
           </el-table-column>
           <el-table-column prop="remark" :label="$t('bei-zhu')" width="300">
             <template slot-scope="scope">
-              <el-input size="small" v-if="!flg" v-model="scope.row.remark" maxlength="100" :disabled="user.companyId == 4811 && user.id != ParticularsList.ownerId && ParticularsList.type == 14454"></el-input>
+              <el-input size="small" v-if="!flg" v-model="scope.row.remark" maxlength="100" show-word-limit :disabled="user.companyId == 4811 && user.id != ParticularsList.ownerId && ParticularsList.type == 14454"></el-input>
               <span v-else>{{ scope.row.remark }}</span>
             </template>
           </el-table-column>
@@ -982,7 +982,10 @@
           </div>
           <div class="detail-item" style="width: 100%">
             <span class="detail-item-title"><span class="printBox">{{ $t('bei-zhu') }}</span></span>
-            <span class="detail-item-content">{{ ParticularsList.remark }}</span>
+            <span class="detail-item-content" v-if="!modifyRemarkVisible">{{ ParticularsList.remark }}</span> 
+            <el-input type="textarea" autosize style="width:860px;font-size:16px;" v-if="modifyRemarkVisible" v-model="ParticularsList.remark" maxlength="500" show-word-limit></el-input>
+            <el-link style="color:#20a0ff;font-size:16px;margin-left:10px;" @click="modifyRemarkVisible = true" v-if="user.roleName == '超级管理员' && !modifyRemarkVisible">修改</el-link>
+            <el-link style="color:#20a0ff;font-size:16px;margin-left:10px;" @click="saveRemark()" v-if="modifyRemarkVisible">保存</el-link>
           </div>
         </div>
         <!-- <el-table :data="ParticularsList.invoiceList" border style="width: 100%">
@@ -1264,6 +1267,7 @@ export default {
   props: {},
   data() {
     return {
+      modifyRemarkVisible: false,
       themeColor: getThemeColor(),
       pdfIcons: require('@/assets/image/pdfIcon.png'),
       showSingleAudit: false,
@@ -1937,7 +1941,8 @@ export default {
     // 单据查看
     downloadByA(val) {
       if (val.status == 0) {
-        this.detailDialog = true
+        this.detailDialog = true;
+        this.modifyRemarkVisible = false;
       } else {
         this.dialog = true
       }
@@ -2655,6 +2660,35 @@ export default {
         this.ParticularsList.secondCheckerId = obj.id
       }
     },
+    //修改备注
+    saveRemark() {
+      this.http.post('/expense-sheet/saveRemark', {
+        id: this.ParticularsList.id,
+        remark: this.ParticularsList.remark
+      },
+        res => {
+          this.modifyRemarkVisible = false
+          if (res.code == "ok") {
+            this.$message({
+              message: this.$t('operationissuccessful'),
+              type: "success"
+            });
+            this.getList()
+          } else {
+            this.$message({
+              message: res.msg,
+              type: "error"
+            });
+          }
+        },
+        error => {
+          this.dialogVisibleRelease = false
+          this.$message({
+            message: error,
+            type: "error"
+          });
+        });
+    },
     // 单据导出
     exportDocument() {
       this.exportingData = true;
@@ -3180,7 +3214,7 @@ export default {
     width: 33%;
     font-size: 16px;
     margin-bottom: 10px;
-    color: #000;
+    color: #1d1d1d;
 
     .detail-item-title {
       color: #999;

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

@@ -3211,7 +3211,7 @@
             },
             viewChange(index, indexPath) {
                 this.groupType = 1;
-                if (this.user.companyId == 7757) {
+                if (this.user.companyId == 7757 || this.user.companyId == 7783) {
                     this.order = "indate";
                     this.isDesc = false;
                 } else {
@@ -3225,9 +3225,8 @@
                 this.taskListPage = 1
             } ,
             groupChange(index, indexPath) {
-                console.log('店家了')
                 this.groupType = 0;
-                if (this.user.companyId == 7757) {
+                if (this.user.companyId ==  7757 || this.user.companyId == 7783) {
                     this.order = "indate";
                     this.isDesc = false;
                 } else {
@@ -4019,7 +4018,7 @@
         mounted() {
             this.curProjectId = parseInt(this.$route.params.id);
             this.activeName = this.$route.path.split("/")[1];
-            if (this.user.companyId == 7757) {
+            if (this.user.companyId == 7757 || this.user.companyId == 7783) {
                 this.order = "indate";
             }
             this.getDetail();