소스 검색

企业微信打卡功能以及其他部分优化调整

user5 10 달 전
부모
커밋
37201d38d4
25개의 변경된 파일908개의 추가작업 그리고 83개의 파일을 삭제
  1. 9 8
      src/main/java/com/jeeplus/common/utils/excel/utils/ExcelUtilInvoice.java
  2. 50 40
      src/main/java/com/jeeplus/modules/ruralprojectrecords/utils/RuralProjectReportedInfoUtil.java
  3. 2 0
      src/main/java/com/jeeplus/modules/ruralprojectrecords/web/ProjectPaperFilingController.java
  4. 3 2
      src/main/java/com/jeeplus/modules/ruralprojectrecords/web/RuralCostProjectMessageNewController.java
  5. 18 10
      src/main/java/com/jeeplus/modules/ruralprojectrecords/web/RuralProjectViewController.java
  6. 98 2
      src/main/java/com/jeeplus/modules/wexintheorder/Utils/OrderUtils.java
  7. 16 0
      src/main/java/com/jeeplus/modules/wexintheorder/dao/ClockInRecordDao.java
  8. 175 0
      src/main/java/com/jeeplus/modules/wexintheorder/entity/ClockInRecordInfo.java
  9. 175 0
      src/main/java/com/jeeplus/modules/wexintheorder/entity/ClockInRecordSaveInfo.java
  10. 85 0
      src/main/java/com/jeeplus/modules/wexintheorder/service/ClockInRecordService.java
  11. 124 0
      src/main/java/com/jeeplus/modules/wexintheorder/web/ClockInRecordController.java
  12. 9 0
      src/main/java/com/jeeplus/modules/workinvoice/dao/WorkInvoiceDao.java
  13. 14 5
      src/main/java/com/jeeplus/modules/workinvoice/service/WorkInvoiceAllService.java
  14. 10 2
      src/main/java/com/jeeplus/modules/workinvoice/service/WorkInvoiceService.java
  15. 15 8
      src/main/java/com/jeeplus/modules/workprojectnotify/web/WorkProjectNotifyController.java
  16. 5 2
      src/main/resources/mappings/modules/projectcontentinfo/ProjectcontentinfoDao.xml
  17. 1 1
      src/main/resources/mappings/modules/sys/OfficeDao.xml
  18. 17 0
      src/main/resources/mappings/modules/workinvoice/WorkInvoiceDao.xml
  19. 1 0
      src/main/resources/spring-context-shiro.xml
  20. 34 0
      src/main/webapp/webpage/modules/ruralprojectrecords/cost/newReported/newReportedForm.jsp
  21. 9 0
      src/main/webapp/webpage/modules/ruralprojectrecords/cost/projectcontentinfo/new/reportForm.jsp
  22. 35 0
      src/main/webapp/webpage/modules/ruralprojectrecords/ruralporjectmessage/reportedModify.jsp
  23. 1 1
      src/main/webapp/webpage/modules/workinvoice/workInvoiceAllList.jsp
  24. 1 1
      src/main/webapp/webpage/modules/workinvoice/workInvoiceAllTwoList.jsp
  25. 1 1
      src/main/webapp/webpage/modules/workinvoice/workInvoiceTwoList.jsp

+ 9 - 8
src/main/java/com/jeeplus/common/utils/excel/utils/ExcelUtilInvoice.java

@@ -27,7 +27,8 @@ public class ExcelUtilInvoice {
         firstRow.add(new CellModel("五部", 0, 0, 7, 10));
         firstRow.add(new CellModel("招标部", 0, 1, 11, 11));
         firstRow.add(new CellModel("盐城分公司", 0, 1, 12, 12));
-        firstRow.add(new CellModel("综合", 0, 1, 13, 13));
+        firstRow.add(new CellModel("苏州分公司", 0, 1, 13, 13));
+        firstRow.add(new CellModel("综合", 0, 1, 14, 14));
 
         // 第二行表头
         List<CellModel> secondRow = new ArrayList<>();
@@ -109,7 +110,7 @@ public class ExcelUtilInvoice {
         CellStyle titleStyle = createTitleStyle(workbook);
         CellStyle fillStyle = createFillDataStyle(workbook);  // 这个样式没有边框
 
-        int titleMergeCols = 14;
+        int titleMergeCols = 15;
         List<String> fillData = Arrays.asList("年度:", year + "年");
 
         // 创建标题行
@@ -178,7 +179,7 @@ public class ExcelUtilInvoice {
         }
 
         // 自适应列宽并增加额外宽度
-        for (int i = 0; i < 14; i++) {
+        for (int i = 0; i < 15; i++) {
             sheet.autoSizeColumn(i);
             int currentWidth = sheet.getColumnWidth(i);
             sheet.setColumnWidth(i, currentWidth + 1000);
@@ -199,7 +200,7 @@ public class ExcelUtilInvoice {
             List<Map<String, String>> dataList = new ArrayList<>();
             for (int i = 0; i < 10; i++) {
                 Map<String, String> data = new HashMap<>();
-                for (int j = 0; j < 14; j++) {
+                for (int j = 0; j < 15; j++) {
                     data.put(String.valueOf(j), String.valueOf((i + 1) * (j + 1) * 10));
                 }
                 dataList.add(data);
@@ -212,7 +213,7 @@ public class ExcelUtilInvoice {
             CellStyle fillStyle = createFillDataStyle(workbook);  // 这个样式没有边框
 
             String title = "兴光项目公司开票汇总表";
-            int titleMergeCols = 14;
+            int titleMergeCols = 15;
             List<String> fillData = Arrays.asList("年份:", "2024");
 
             // 创建 Excel 表格
@@ -276,7 +277,7 @@ public class ExcelUtilInvoice {
             }
 
             // 自适应列宽并增加额外宽度
-            for (int i = 0; i < 14; i++) {
+            for (int i = 0; i < 15; i++) {
                 sheet.autoSizeColumn(i);
                 int currentWidth = sheet.getColumnWidth(i);
                 sheet.setColumnWidth(i, currentWidth + 1000);
@@ -305,7 +306,7 @@ public class ExcelUtilInvoice {
             CellStyle fillStyle = createFillDataStyle(workbook);  // 这个样式没有边框
 
             String title = "兴光项目公司开票汇总表";
-            int titleMergeCols = 14;
+            int titleMergeCols = 15;
             List<String> fillData = Arrays.asList("年份:", "2024年");
 
             // 创建 Excel 表格
@@ -377,7 +378,7 @@ public class ExcelUtilInvoice {
             }
 
             // 自适应列宽并增加额外宽度
-            for (int i = 0; i < 14; i++) {
+            for (int i = 0; i < 15; i++) {
                 sheet.autoSizeColumn(i);
                 int currentWidth = sheet.getColumnWidth(i);
                 sheet.setColumnWidth(i, currentWidth + 1000);

+ 50 - 40
src/main/java/com/jeeplus/modules/ruralprojectrecords/utils/RuralProjectReportedInfoUtil.java

@@ -117,54 +117,64 @@ public class RuralProjectReportedInfoUtil {
         map.put("projectUseCd",reported.getPorjectUse());
         //咨询标的额(万元),必填
         map.put("targetFee",reported.getZiXunBDE());
-        //合同价(万元)
-        map.put("contractFee",notRequiredManage(reported.getHeTongJia()));
-        //咨询档案编号(万元)
-        map.put("archivesNo",notRequiredManage(reported.getArchivesNo()));
-        //送审价(万元)
-        map.put("submitAuditFee",notRequiredManage(reported.getSongShenJia()));
-        //审定价(万元)
-        map.put("fixedAuditFee",notRequiredManage(reported.getShenDingJia()));
-        //审核增减额
-        map.put("checkCutFee",notRequiredManage(reported.getJingHeJianE()));
-        //审核增减率
-        map.put("checkCutLv",notRequiredManage(reported.getJingHeJianLv()));
-        //咨询项目造价包含内容说明,必填
-        map.put("projectContainContent",notRequiredManage(reported.getContentsInclude()));
-        //工程项目总投资(万元)
-        map.put("totalInvestment",notRequiredManage(reported.getProjectTotalInvestment()));
 
-        //总咨询师
-        if(StringUtils.isNotBlank(reported.getXmFZR())){
-            User xmFZRUser = UserUtils.get(reported.getXmFZR());
-            if(null != xmFZRUser){
-                map.put("chiefConsultant",xmFZRUser.getName());
+        if(StringUtils.isNotBlank(reported.getProjectType()) && "10".equals(reported.getProjectType())){
+
+            //合同价(万元)
+            map.put("contractFee",notRequiredManage(reported.getHeTongJia()));
+            //送审价(万元)
+            map.put("submitAuditFee",notRequiredManage(reported.getSongShenJia()));
+            //审定价(万元)
+            map.put("fixedAuditFee",notRequiredManage(reported.getShenDingJia()));
+            //审核增减额
+            map.put("checkCutFee",notRequiredManage(reported.getJingHeJianE()));
+            //审核增减率
+            map.put("checkCutLv",notRequiredManage(reported.getJingHeJianLv()));
+        }
+
+        if(StringUtils.isNotBlank(reported.getProjectType()) && "17".equals(reported.getProjectType())){
+            //工程项目总投资(万元)
+            map.put("totalInvestment",notRequiredManage(reported.getProjectTotalInvestment()));
+            //总咨询师
+            if(StringUtils.isNotBlank(reported.getXmFZR())){
+                User xmFZRUser = UserUtils.get(reported.getXmFZR());
+                if(null != xmFZRUser){
+                    map.put("chiefConsultant",xmFZRUser.getName());
+                }else{
+                    map.put("chiefConsultant","");
+                }
             }else{
                 map.put("chiefConsultant","");
             }
-        }else{
-            map.put("chiefConsultant","");
+            //咨询档案编号(万元)
+            map.put("archivesNo",notRequiredManage(reported.getArchivesNo()));
+
+            //作业期(起止时间) 模板:2020-12-12到2021-12-12
+            if(null != reported.getBeginDate() && null != reported.getEndDate()){
+                SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
+                map.put("stage",formatter.format(reported.getBeginDate()) + "到" + formatter.format(reported.getEndDate()));
+            } else{
+                map.put("stage","");
+            }
+
+            //全过程工程咨询收入
+            map.put("wholeIncomeFee",notRequiredManage(reported.getAdvisoryIncome()));
+            //工程监理收入
+            map.put("supervisorFee",notRequiredManage(reported.getProjectSupervisionIncome()));
+            //招标代理收入
+            map.put("biddingFee",notRequiredManage(reported.getTenderingAgencyIncome()));
+            //设计收入
+            map.put("designFee",notRequiredManage(reported.getDesignIncome()));
+            //其他收入
+            map.put("otherFee",notRequiredManage(reported.getOtherIncome()));
         }
 
+
+        //咨询项目造价包含内容说明,必填
+        map.put("projectContainContent",notRequiredManage(reported.getContentsInclude()));
+
         //咨询档案编号
         map.put("archivesNo",notRequiredManage(reported.getProjectTotalInvestment()));
-        //作业期(起止时间) 模板:2020-12-12到2021-12-12
-        if(null != reported.getBeginDate() && null != reported.getEndDate()){
-            SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
-            map.put("stage",formatter.format(reported.getBeginDate()) + "到" + formatter.format(reported.getEndDate()));
-        } else{
-            map.put("stage","");
-        }
-        //全过程工程咨询收入
-        map.put("wholeIncomeFee",notRequiredManage(reported.getAdvisoryIncome()));
-        //工程监理收入
-        map.put("supervisorFee",notRequiredManage(reported.getProjectSupervisionIncome()));
-        //招标代理收入
-        map.put("biddingFee",notRequiredManage(reported.getTenderingAgencyIncome()));
-        //设计收入
-        map.put("designFee",notRequiredManage(reported.getDesignIncome()));
-        //其他收入
-        map.put("otherFee",notRequiredManage(reported.getOtherIncome()));
         //项目状态,必填(默认给0,即暂存;2:直接上报)
         map.put("delFlag","2");
 

+ 2 - 0
src/main/java/com/jeeplus/modules/ruralprojectrecords/web/ProjectPaperFilingController.java

@@ -230,6 +230,8 @@ public class ProjectPaperFilingController extends BaseController {
             return "redirect:" + Global.getAdminPath() + "/home/?repage";
         }else if(StringUtils.isNotBlank(home) && home.equals("filingAll")){
             return "redirect:" + Global.getAdminPath() + "/ruralProject/ruralProjectMessageAll/?repage";
+        }else if (StringUtils.isNotBlank(home) && "notifyList".equals(home)){
+            return "redirect:" + Global.getAdminPath() + "/workprojectnotify/workProjectNotify/list/?repage";
         }else {
             if (StringUtils.isNotBlank(paperFiling.getView()) && paperFiling.getView().equals("filing")){
                 return "redirect:" + Global.getAdminPath() + "/ruralProject/ruralProjectMessage/?repage";

+ 3 - 2
src/main/java/com/jeeplus/modules/ruralprojectrecords/web/RuralCostProjectMessageNewController.java

@@ -326,14 +326,15 @@ public class RuralCostProjectMessageNewController extends BaseController {
         RuralReportConsultant consultantBzshb = new RuralReportConsultant();
         while(it.hasNext()){
             RuralReportConsultant consultant = it.next();
-            if(consultant.getZixunyuan().equals(currentConsultant.getZixunyuan())){
+            //根据人员id和角色进行唯一值判定,避免出现重复值
+            if(consultant.getZixunyuan().equals(currentConsultant.getZixunyuan()) && ((StringUtils.isNotBlank(consultant.getRole()) && consultant.getRole().equals(currentConsultant.getRole())) || StringUtils.isBlank(consultant.getRole()))){
                 try {
                     MyBeanUtils.copyBeanNotNull2Bean(consultant, currentConsultant);
                 } catch (Exception e) {
                     e.printStackTrace();
                 }
                 it.remove();
-            }else if(consultant.getZixunyuan().equals(projectReportData.getBzshbUserId())){
+            }else if(consultant.getZixunyuan().equals(projectReportData.getBzshbUserId()) && ((StringUtils.isNotBlank(consultant.getRole()) && consultant.getRole().equals("技术负责人")) || StringUtils.isBlank(consultant.getRole())  )){
                 if("8".equals(records.getAttachmentProjectSort()) || "1".equals(records.getSubmitMoney())){
 
                     User chenHongXing=UserUtils.getByLoginName("陈红星");

+ 18 - 10
src/main/java/com/jeeplus/modules/ruralprojectrecords/web/RuralProjectViewController.java

@@ -408,7 +408,8 @@ public class RuralProjectViewController extends BaseController {
         Iterator<RuralReportConsultant> it = consultantList.iterator();
         while(it.hasNext()){
             RuralReportConsultant consultant = it.next();
-            if(consultant.getZixunyuan().equals(currentConsultant.getZixunyuan())){
+            //根据人员id和角色进行唯一值判定,避免出现重复值
+            if(consultant.getZixunyuan().equals(currentConsultant.getZixunyuan()) && ((StringUtils.isNotBlank(consultant.getRole()) && consultant.getRole().equals(currentConsultant.getRole())) || StringUtils.isBlank(consultant.getRole()))){
                 try {
                     MyBeanUtils.copyBeanNotNull2Bean(consultant, currentConsultant);
                 } catch (Exception e) {
@@ -431,9 +432,11 @@ public class RuralProjectViewController extends BaseController {
                 User user=userService.get(consultant.getZixunyuan());
                 if(null != user){
                     consultant.setZixunyuanName(user.getName());
-                    consultant.setRole("咨询员");
+                    /*if(StringUtils.isBlank(consultant.getRole())){
+                        consultant.setRole("咨询员");
+                    }*/
                 }
-                if(consultant.getZixunyuan().equals(projectReportData.getBzshbUserId())){
+                if(consultant.getZixunyuan().equals(projectReportData.getBzshbUserId()) && ((StringUtils.isNotBlank(consultant.getRole()) && consultant.getRole().equals("技术负责人")) || StringUtils.isBlank(consultant.getRole()))){
                     User chenHongXing=UserUtils.getByLoginName("陈红星");
                     List<WorkStaffCertificate> chenHongXingCertificateList = ruralProjectMessageService.getCertificateByUser(chenHongXing.getId());
                     //获取陈红星的造价师信息
@@ -482,24 +485,24 @@ public class RuralProjectViewController extends BaseController {
                 consultants.add(bzshbConsultant);
             }
             Iterator<RuralReportConsultant> itView = consultants.iterator();
-            while(itView.hasNext()){
+            while (itView.hasNext()) {
                 RuralReportConsultant consultant = itView.next();
-                if(bzshbCertificateList.size()>0){
-                    if(consultant.getZixunyuan().equals(bzshbConsultant.getZixunyuan())){
+                if (bzshbCertificateList.size() > 0) {
+                    if (consultant.getZixunyuan().equals(bzshbConsultant.getZixunyuan()) && ((StringUtils.isNotBlank(consultant.getRole()) && consultant.getRole().equals("技术负责人")) || StringUtils.isBlank(consultant.getRole()) )) {
                         try {
                             MyBeanUtils.copyBeanNotNull2Bean(consultant, bzshbConsultant);
-                            bzshbConsultant.setZixunyuanName("陈红星("+bzshbConsultant.getZixunyuanName()+"代)");
+                            bzshbConsultant.setZixunyuanName("陈红星(" + bzshbConsultant.getZixunyuanName() + "代)");
                             bzshbConsultant.setRole("技术负责人");
                         } catch (Exception e) {
                             e.printStackTrace();
                         }
                         itView.remove();
                     }
-                }else{
-                    if(consultant.getZixunyuan().equals(projectReportData.getBzshbUserId())){
+                } else {
+                    if (consultant.getZixunyuan().equals(projectReportData.getBzshbUserId()) && ((StringUtils.isNotBlank(consultant.getRole()) && consultant.getRole().equals("技术负责人")) || StringUtils.isBlank(consultant.getRole()) )) {
                         try {
                             MyBeanUtils.copyBeanNotNull2Bean(consultant, bzshbConsultant);
-                            bzshbConsultant.setZixunyuanName("陈红星("+bzshbConsultant.getZixunyuanName()+"代)");
+                            bzshbConsultant.setZixunyuanName("陈红星(" + bzshbConsultant.getZixunyuanName() + "代)");
                             bzshbConsultant.setRole("技术负责人");
                         } catch (Exception e) {
                             e.printStackTrace();
@@ -520,6 +523,11 @@ public class RuralProjectViewController extends BaseController {
                 }
             }
         }
+        for (RuralReportConsultant consultant : consultants) {
+            if(StringUtils.isBlank(consultant.getRole())){
+                consultant.setRole("咨询员");
+            }
+        }
         //展示
         //获取自检的质量复核标准
         String reviewId="";

+ 98 - 2
src/main/java/com/jeeplus/modules/wexintheorder/Utils/OrderUtils.java

@@ -1,20 +1,28 @@
 package com.jeeplus.modules.wexintheorder.Utils;
 
+import com.jeeplus.modules.statement.entity.StatementDataInfo;
 import com.jeeplus.modules.wexinpackage.access.util.access.AccessTokenUtil;
 import com.jeeplus.modules.wexinpackage.access.util.access.RequestAccess;
 import com.jeeplus.modules.wexinpackage.access.util.access.WeChatParamsUtil;
 import com.jeeplus.modules.wexintheorder.entity.TheOrder;
 import net.sf.json.JSONObject;
+import org.codehaus.jackson.map.ObjectMapper;
 import org.junit.Test;
 import org.springframework.http.ResponseEntity;
+import org.springframework.transaction.annotation.Transactional;
 import org.springframework.web.client.RestTemplate;
 
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpSession;
+import java.io.IOException;
 import java.text.DateFormat;
 import java.text.SimpleDateFormat;
-import java.util.Calendar;
-import java.util.Date;
+import java.time.Instant;
+import java.time.LocalDateTime;
+import java.time.ZoneId;
+import java.time.ZoneOffset;
+import java.time.format.DateTimeFormatter;
+import java.util.*;
 
 public class OrderUtils {
 
@@ -222,4 +230,92 @@ public class OrderUtils {
         }
         return msg;
     }
+
+
+    //查询小程序使用的token
+    public static String getToken(String corpId,String corpsecret){
+        String url = "https://qyapi.weixin.qq.com/cgi-bin/gettoken?corpid=ID&corpsecret=SECRET";//获取用户信息
+        String sureUrl = url.replace("ID", corpId).replace("SECRET",corpsecret);
+        System.out.println("url============="+sureUrl);
+        JSONObject jsonObject = RequestAccess.httpRequest(sureUrl, "POST", null);
+        System.out.println("jsonObject========="+jsonObject);
+        String string = jsonObject.getString("access_token");
+        if (null != jsonObject) {
+            if (0 != jsonObject.getInt("errcode")) {
+                System.out.println("成功");
+            }
+        }
+        return string;
+    }
+
+
+    //查询用户打卡记录
+    public static JSONObject getCheckInData(String token, List<String> userIdList,String startDate,String endDate){
+        String string = "";
+        JSONObject jsonObject = null;
+        try {
+            String url = "https://qyapi.weixin.qq.com/cgi-bin/checkin/getcheckindata?access_token=ACCESS_TOKEN";//获取用户信息
+            String sureUrl = url.replace("ACCESS_TOKEN", token);
+            System.out.println("url============="+sureUrl);
+
+            ObjectMapper mapper = new ObjectMapper();
+            Map<String,Object> map = new HashMap<>();
+            map.put("opencheckindatatype","1");
+
+
+            map.put("starttime",getDateTimestamp(startDate));
+            map.put("endtime",getDateTimestamp(endDate));
+            map.put("useridlist",userIdList);
+
+
+            String content = mapper.writeValueAsString(map);
+
+            jsonObject = RequestAccess.httpRequest(sureUrl, "POST", content);
+            System.out.println("jsonObject========="+jsonObject);
+            if (0 != jsonObject.getInt("errcode")) {
+                //string = jsonObject.getString("access_token");
+                return jsonObject;
+            }else{
+                string = jsonObject.getString("checkindata");
+            }
+        } catch (IOException e) {
+            e.printStackTrace();
+        }
+
+        return jsonObject;
+    }
+
+    public static long getDateTimestamp(String timeString) {
+        // 定义时间格式
+        DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
+
+        // 解析字符串时间为 LocalDateTime
+        LocalDateTime localDateTime = LocalDateTime.parse(timeString, formatter);
+
+        // 转换为 Instant 并获取秒数
+        long timestamp = localDateTime.toEpochSecond(ZoneOffset.UTC);
+
+        System.out.println("10位时间戳: " + timestamp);  // 输出: 1492732800
+        return timestamp;
+    }
+
+    public static String getDateByTimestamp(long dateStamp) {// 示例Unix时间戳(10位)
+
+        // 转换为Instant对象
+        Instant instant = Instant.ofEpochSecond(dateStamp);
+
+        // 转换为系统默认时区的LocalDateTime对象
+        LocalDateTime dateTime = LocalDateTime.ofInstant(instant, ZoneId.systemDefault());
+
+        // 定义日期时间格式化器
+        DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
+
+        // 格式化日期时间
+        String formattedDateTime = dateTime.format(formatter);
+
+        // 输出结果
+        System.out.println("Unix时间戳: " + dateStamp);
+        System.out.println("格式化后的日期时间: " + formattedDateTime);
+        return formattedDateTime;
+    }
 }

+ 16 - 0
src/main/java/com/jeeplus/modules/wexintheorder/dao/ClockInRecordDao.java

@@ -0,0 +1,16 @@
+package com.jeeplus.modules.wexintheorder.dao;
+
+import com.jeeplus.common.persistence.CrudDao;
+import com.jeeplus.common.persistence.annotation.MyBatisDao;
+import com.jeeplus.modules.wexintheorder.entity.ClockInRecordInfo;
+
+@MyBatisDao
+public interface ClockInRecordDao extends CrudDao<ClockInRecordInfo> {
+
+    /**
+     * 根据userid和打卡时间查询是否存在打卡记录
+     * @param info
+     * @return
+     */
+    ClockInRecordInfo getByUserIdAndCheckinTime(ClockInRecordInfo info);
+}

+ 175 - 0
src/main/java/com/jeeplus/modules/wexintheorder/entity/ClockInRecordInfo.java

@@ -0,0 +1,175 @@
+package com.jeeplus.modules.wexintheorder.entity;
+
+import com.jeeplus.common.persistence.DataEntity;
+
+import java.util.List;
+
+/**
+ * 打卡记录表
+ * @author: 徐滕
+ * @version: 2024-08-08 16:02
+ */
+public class ClockInRecordInfo  extends DataEntity<ClockInRecordInfo> {
+    private String userId;  //用户id
+    private String groupName;   //打卡规则名称
+    private String checkinType;    //打卡类型。字符串,目前有:上班打卡,下班打卡,外出打卡
+    private String exceptionType;  //异常类型,字符串,包括:时间异常,地点异常,未打卡,wifi异常,非常用设备。如果有多个异常,以分号间隔
+    private String checkinTime;    //打卡时间。Unix时间戳
+    private String locationTitle;  //打卡地点title
+    private String locationDetail; //打卡地点详情
+    private String wifiName;    //打卡wifi名称
+    private String notes;       //打卡备注
+    private String wifiMac;     //打卡的MAC地址/bssid
+    private String mediaIds;    //打卡的附件media_id,可使用media/get获取附件
+    private String lat;         //位置打卡地点纬度,是实际经度的1000000倍,与腾讯地图一致采用GCJ-02坐标系统标准
+    private String lng;         //位置打卡地点经度,是实际经度的1000000倍,与腾讯地图一致采用GCJ-02坐标系统标准
+    private String deviceId;    //打卡设备id
+    private String schCheckinTime;    //标准打卡时间,指此次打卡时间对应的标准上班时间或标准下班时间
+    private String groupId;     //规则id,表示打卡记录所属规则的id
+    private String scheduleId; //班次id,表示打卡记录所属规则中,所属班次的id
+    private String timelineId; //时段id,表示打卡记录所属规则中,某一班次中的某一时段的id,如上下班时间为9:00-12:00、13:00-18:00的班次中,9:00-12:00为其中一组时段
+
+    public String getUserId() {
+        return userId;
+    }
+
+    public void setUserId(String userId) {
+        this.userId = userId;
+    }
+
+    public String getGroupName() {
+        return groupName;
+    }
+
+    public void setGroupName(String groupName) {
+        this.groupName = groupName;
+    }
+
+    public String getCheckinType() {
+        return checkinType;
+    }
+
+    public void setCheckinType(String checkinType) {
+        this.checkinType = checkinType;
+    }
+
+    public String getExceptionType() {
+        return exceptionType;
+    }
+
+    public void setExceptionType(String exceptionType) {
+        this.exceptionType = exceptionType;
+    }
+
+    public String getCheckinTime() {
+        return checkinTime;
+    }
+
+    public void setCheckinTime(String checkinTime) {
+        this.checkinTime = checkinTime;
+    }
+
+    public String getLocationTitle() {
+        return locationTitle;
+    }
+
+    public void setLocationTitle(String locationTitle) {
+        this.locationTitle = locationTitle;
+    }
+
+    public String getLocationDetail() {
+        return locationDetail;
+    }
+
+    public void setLocationDetail(String locationDetail) {
+        this.locationDetail = locationDetail;
+    }
+
+    public String getWifiName() {
+        return wifiName;
+    }
+
+    public void setWifiName(String wifiName) {
+        this.wifiName = wifiName;
+    }
+
+    public String getNotes() {
+        return notes;
+    }
+
+    public void setNotes(String notes) {
+        this.notes = notes;
+    }
+
+    public String getWifiMac() {
+        return wifiMac;
+    }
+
+    public void setWifiMac(String wifiMac) {
+        this.wifiMac = wifiMac;
+    }
+
+    public String getMediaIds() {
+        return mediaIds;
+    }
+
+    public void setMediaIds(String mediaIds) {
+        this.mediaIds = mediaIds;
+    }
+
+    public String getLat() {
+        return lat;
+    }
+
+    public void setLat(String lat) {
+        this.lat = lat;
+    }
+
+    public String getLng() {
+        return lng;
+    }
+
+    public void setLng(String lng) {
+        this.lng = lng;
+    }
+
+    public String getDeviceId() {
+        return deviceId;
+    }
+
+    public void setDeviceId(String deviceId) {
+        this.deviceId = deviceId;
+    }
+
+    public String getSchCheckinTime() {
+        return schCheckinTime;
+    }
+
+    public void setSchCheckinTime(String schCheckinTime) {
+        this.schCheckinTime = schCheckinTime;
+    }
+
+    public String getGroupId() {
+        return groupId;
+    }
+
+    public void setGroupId(String groupId) {
+        this.groupId = groupId;
+    }
+
+    public String getScheduleId() {
+        return scheduleId;
+    }
+
+    public void setScheduleId(String scheduleId) {
+        this.scheduleId = scheduleId;
+    }
+
+    public String getTimelineId() {
+        return timelineId;
+    }
+
+    public void setTimelineId(String timelineId) {
+        this.timelineId = timelineId;
+    }
+}

+ 175 - 0
src/main/java/com/jeeplus/modules/wexintheorder/entity/ClockInRecordSaveInfo.java

@@ -0,0 +1,175 @@
+package com.jeeplus.modules.wexintheorder.entity;
+
+import com.jeeplus.common.persistence.DataEntity;
+
+import java.util.List;
+
+/**
+ * 打卡记录表
+ * @author: 徐滕
+ * @version: 2024-08-08 16:02
+ */
+public class ClockInRecordSaveInfo extends DataEntity<ClockInRecordSaveInfo> {
+    private String userid;  //用户id
+    private String groupname;   //打卡规则名称
+    private String checkin_type;    //打卡类型。字符串,目前有:上班打卡,下班打卡,外出打卡
+    private String exception_type;  //异常类型,字符串,包括:时间异常,地点异常,未打卡,wifi异常,非常用设备。如果有多个异常,以分号间隔
+    private String checkin_time;    //打卡时间。Unix时间戳
+    private String location_title;  //打卡地点title
+    private String location_detail; //打卡地点详情
+    private String wifiname;    //打卡wifi名称
+    private String notes;       //打卡备注
+    private String wifimac;     //打卡的MAC地址/bssid
+    private List mediaids;    //打卡的附件media_id,可使用media/get获取附件
+    private String lat;         //位置打卡地点纬度,是实际经度的1000000倍,与腾讯地图一致采用GCJ-02坐标系统标准
+    private String lng;         //位置打卡地点经度,是实际经度的1000000倍,与腾讯地图一致采用GCJ-02坐标系统标准
+    private String deviceid;    //打卡设备id
+    private String sch_checkin_time;    //标准打卡时间,指此次打卡时间对应的标准上班时间或标准下班时间
+    private String groupid;     //规则id,表示打卡记录所属规则的id
+    private String schedule_id; //班次id,表示打卡记录所属规则中,所属班次的id
+    private String timeline_id; //时段id,表示打卡记录所属规则中,某一班次中的某一时段的id,如上下班时间为9:00-12:00、13:00-18:00的班次中,9:00-12:00为其中一组时段
+
+    public String getUserid() {
+        return userid;
+    }
+
+    public void setUserid(String userid) {
+        this.userid = userid;
+    }
+
+    public String getGroupname() {
+        return groupname;
+    }
+
+    public void setGroupname(String groupname) {
+        this.groupname = groupname;
+    }
+
+    public String getCheckin_type() {
+        return checkin_type;
+    }
+
+    public void setCheckin_type(String checkin_type) {
+        this.checkin_type = checkin_type;
+    }
+
+    public String getException_type() {
+        return exception_type;
+    }
+
+    public void setException_type(String exception_type) {
+        this.exception_type = exception_type;
+    }
+
+    public String getCheckin_time() {
+        return checkin_time;
+    }
+
+    public void setCheckin_time(String checkin_time) {
+        this.checkin_time = checkin_time;
+    }
+
+    public String getLocation_title() {
+        return location_title;
+    }
+
+    public void setLocation_title(String location_title) {
+        this.location_title = location_title;
+    }
+
+    public String getLocation_detail() {
+        return location_detail;
+    }
+
+    public void setLocation_detail(String location_detail) {
+        this.location_detail = location_detail;
+    }
+
+    public String getWifiname() {
+        return wifiname;
+    }
+
+    public void setWifiname(String wifiname) {
+        this.wifiname = wifiname;
+    }
+
+    public String getNotes() {
+        return notes;
+    }
+
+    public void setNotes(String notes) {
+        this.notes = notes;
+    }
+
+    public String getWifimac() {
+        return wifimac;
+    }
+
+    public void setWifimac(String wifimac) {
+        this.wifimac = wifimac;
+    }
+
+    public List getMediaids() {
+        return mediaids;
+    }
+
+    public void setMediaids(List mediaids) {
+        this.mediaids = mediaids;
+    }
+
+    public String getLat() {
+        return lat;
+    }
+
+    public void setLat(String lat) {
+        this.lat = lat;
+    }
+
+    public String getLng() {
+        return lng;
+    }
+
+    public void setLng(String lng) {
+        this.lng = lng;
+    }
+
+    public String getDeviceid() {
+        return deviceid;
+    }
+
+    public void setDeviceid(String deviceid) {
+        this.deviceid = deviceid;
+    }
+
+    public String getSch_checkin_time() {
+        return sch_checkin_time;
+    }
+
+    public void setSch_checkin_time(String sch_checkin_time) {
+        this.sch_checkin_time = sch_checkin_time;
+    }
+
+    public String getGroupid() {
+        return groupid;
+    }
+
+    public void setGroupid(String groupid) {
+        this.groupid = groupid;
+    }
+
+    public String getSchedule_id() {
+        return schedule_id;
+    }
+
+    public void setSchedule_id(String schedule_id) {
+        this.schedule_id = schedule_id;
+    }
+
+    public String getTimeline_id() {
+        return timeline_id;
+    }
+
+    public void setTimeline_id(String timeline_id) {
+        this.timeline_id = timeline_id;
+    }
+}

+ 85 - 0
src/main/java/com/jeeplus/modules/wexintheorder/service/ClockInRecordService.java

@@ -0,0 +1,85 @@
+package com.jeeplus.modules.wexintheorder.service;
+
+import com.fasterxml.jackson.core.JsonParseException;
+import com.fasterxml.jackson.core.type.TypeReference;
+import com.fasterxml.jackson.databind.JsonMappingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.google.common.collect.Lists;
+import com.jeeplus.common.service.CrudService;
+import com.jeeplus.common.utils.StringUtils;
+import com.jeeplus.modules.wexintheorder.Utils.OrderUtils;
+import com.jeeplus.modules.wexintheorder.dao.ClockInRecordDao;
+import com.jeeplus.modules.wexintheorder.entity.ClockInRecordInfo;
+import com.jeeplus.modules.wexintheorder.entity.ClockInRecordSaveInfo;
+import net.sf.json.JSONObject;
+import org.springframework.stereotype.Service;
+
+import java.io.IOException;
+import java.util.List;
+
+/**
+ * 企业微信打卡Service
+ * @author: 徐滕
+ * @version: 2024-08-08 16:14
+ */
+@Service
+public class ClockInRecordService extends CrudService<ClockInRecordDao, ClockInRecordInfo> {
+
+
+    public String disposeClockInRecordInfo(JSONObject checkInData){
+        String clockInData = "";
+        System.out.println(checkInData);
+        if (0 == checkInData.getInt("errcode")) {
+            clockInData = checkInData.getString("checkindata");
+        }
+        // 创建 ObjectMapper 实例
+        ObjectMapper objectMapper = new ObjectMapper();
+
+        try {
+            // 将 JSON 字符串转换为 List 集合
+            List<ClockInRecordSaveInfo> checkinList = objectMapper.readValue(clockInData, new TypeReference<List<ClockInRecordSaveInfo>>() {});
+
+            List<ClockInRecordInfo> checkInInfoList = Lists.newArrayList();
+
+            // 打印结果
+            for (ClockInRecordSaveInfo checkin : checkinList) {
+                ClockInRecordInfo info = new ClockInRecordInfo();
+                info.setUserId(checkin.getUserid());
+                info.setGroupName(checkin.getGroupname());
+                info.setCheckinType(checkin.getCheckin_type());
+                info.setExceptionType(checkin.getException_type());
+                if(StringUtils.isNotBlank(checkin.getCheckin_time())){
+                    info.setCheckinTime(OrderUtils.getDateByTimestamp(Long.parseLong(checkin.getCheckin_time())));
+                }
+                info.setLocationTitle(checkin.getLocation_title());
+                info.setLocationDetail(checkin.getLocation_detail());
+                info.setWifiName(checkin.getWifiname());
+                info.setNotes(checkin.getNotes());
+                info.setWifiMac(checkin.getWifimac());
+                info.setMediaIds(checkin.getMediaids().toString());
+                info.setLat(checkin.getLat());
+                info.setLng(checkin.getLng());
+                info.setDeviceId(checkin.getDeviceid());
+                if(StringUtils.isNotBlank(checkin.getSch_checkin_time())){
+                    info.setSchCheckinTime(OrderUtils.getDateByTimestamp(Long.parseLong(checkin.getSch_checkin_time())));
+                }
+                info.setGroupId(checkin.getGroupid());
+                info.setScheduleId(checkin.getSchedule_id());
+                info.setTimelineId(checkin.getTimeline_id());
+                //根据userid和打卡时间查询是否存在打卡记录,若存在,则进行更新,若不存在,则进行新增
+                ClockInRecordInfo userCheckinInfo = dao.getByUserIdAndCheckinTime(info);
+                if(null == userCheckinInfo){
+                }else{
+                    info.setId(userCheckinInfo.getId());;
+                }
+                super.save(info);
+
+                checkInInfoList.add(info);
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return null;
+    }
+
+}

+ 124 - 0
src/main/java/com/jeeplus/modules/wexintheorder/web/ClockInRecordController.java

@@ -0,0 +1,124 @@
+package com.jeeplus.modules.wexintheorder.web;
+
+import com.google.common.collect.Lists;
+import com.jeeplus.common.web.BaseController;
+import com.jeeplus.modules.wexinpackage.access.util.encryption.AesException;
+import com.jeeplus.modules.wexinpackage.access.util.encryption.WXBizMsgCrypt;
+import com.jeeplus.modules.wexintheorder.Utils.OrderUtils;
+import com.jeeplus.modules.wexintheorder.service.ClockInRecordService;
+import net.sf.json.JSONObject;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.ui.Model;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.ResponseBody;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+
+/**
+ * 企业微信打卡controller
+ * @author: 徐滕
+ * @version: 2024-08-07 13:43
+ */
+@Controller
+@RequestMapping(value = "${adminPath}/clockInRecordController")
+public class ClockInRecordController extends BaseController {
+
+    //token 企业微信自建打卡token
+    public final static String TOKEN = "JdC2TJns5MtcEdeZbkyg";
+    // encodingAESKey   企业微信自建打卡encodingAESKey
+    public final static String ENCODINGAES_KEY = "lUVqXMkednWobzl8AWoxb8OiynhsDjTBuJAgHPUhatH";
+    //企业ID
+    public final static String CORP_ID = "wwb0b5e7c17a34ac8d";
+    //应用的凭证密钥(打卡)
+    public final static String CORPSECRET = "sWlZlltMnV8VpCD8Z5EDQ0Vij80kFUkX7iLi8hpwSpc";
+
+
+    @Autowired
+    private ClockInRecordService clockInRecordService;
+
+
+
+    @RequestMapping(value = "getTest")
+    public void list(HttpServletRequest request, HttpServletResponse response) throws IOException {
+        // 微信加密签名
+        String msg_signature = request.getParameter("msg_signature");
+        // 时间戳
+        String timestamp = request.getParameter("timestamp");
+        // 随机数
+        String nonce = request.getParameter("nonce");
+        // 随机字符串
+        String echostr = request.getParameter("echostr");
+
+        System.out.println("request=" + request.getRequestURL());
+
+        PrintWriter out = response.getWriter();
+        // 通过检验msg_signature对请求进行校验,若校验成功则原样返回echostr,表示接入成功,否则接入失败
+        String result = null;
+        try {
+            WXBizMsgCrypt wxcpt = new WXBizMsgCrypt(TOKEN, ENCODINGAES_KEY, CORP_ID);
+            result = wxcpt.VerifyURL(msg_signature, timestamp, nonce, echostr);
+        } catch (AesException e) {
+            e.printStackTrace();
+        }
+        if (result == null) {
+            result = TOKEN;
+        }
+        out.print(result);
+        out.close();
+        out = null;
+    }
+
+
+    /**
+     * 查询打卡记录信息
+     * @param model
+     * @return
+     */
+    @RequestMapping(value = "getClockInRecord")
+    @ResponseBody
+    @Transactional(readOnly = false)
+    public Map<String,Object> getClockInRecord(Model model, @RequestParam String startDate, @RequestParam String endDate){
+        Map<String,Object> map = new HashMap<>();
+        String accessToken = OrderUtils.getToken(CORP_ID, CORPSECRET);
+
+
+        List<String> userIdList = Lists.newArrayList();
+        userIdList.add("XuTeng");
+        //分批处理
+        if(null!=userIdList && userIdList.size()>0){
+            int pointsDataLimit = 100;//限制条数
+            Integer size = userIdList.size();
+            //判断是否有必要分批
+            if(pointsDataLimit<size){
+                int part = size/pointsDataLimit;//分批数
+                //
+                for (int i = 0; i < part; i++) {
+                    //100条
+                    List<String> userIds = userIdList.subList(0, pointsDataLimit);
+
+                    //剔除
+                    userIdList.subList(0, pointsDataLimit).clear();
+                }
+                if(!userIdList.isEmpty()){
+                    String userIds = String.join(", ", userIdList);
+                }
+            }else{
+                String userIds = String.join(", ", userIdList);
+            }
+        }
+        JSONObject checkInData = OrderUtils.getCheckInData(accessToken, userIdList,startDate,endDate);
+        clockInRecordService.disposeClockInRecordInfo(checkInData);
+        map.put("返回结果",checkInData);
+        return map;
+    }
+}

+ 9 - 0
src/main/java/com/jeeplus/modules/workinvoice/dao/WorkInvoiceDao.java

@@ -180,6 +180,15 @@ public interface WorkInvoiceDao extends CrudDao<WorkInvoice> {
 	 * 柑橘开票起止时间和部门id查询开票金额
 	 * @param beginDate
 	 * @param endDate
+	 * @param officeId
+	 * @return
+	 */
+	String getInvoiceMoneyByMonthAndOfficeAndChildOffice(@Param("beginDate")String beginDate, @Param("endDate")String endDate , @Param("officeId")String officeId);
+
+	/**
+	 * 柑橘开票起止时间和部门id查询开票金额
+	 * @param beginDate
+	 * @param endDate
 	 * @param officeIdList
 	 * @return
 	 */

+ 14 - 5
src/main/java/com/jeeplus/modules/workinvoice/service/WorkInvoiceAllService.java

@@ -235,11 +235,20 @@ public class WorkInvoiceAllService extends CrudService<WorkInvoiceDao, WorkInvoi
 	}
 	public Page<WorkInvoice> findListExport(Page<WorkInvoice> page, WorkInvoice workInvoice) {
 //		workInvoice.getSqlMap().put("dsf", dataScopeFilter(workInvoice.getCurrentUser(), "o", "u","s", MenuStatusEnum.WORK_INVOICE.getValue()));
-		if(StringUtils.isNotBlank(workInvoice.getOfficeId())){
-			//查询该选择节点下所有的部门Id
-			List<String> officeIdList = officeService.getChildrenOffice(workInvoice.getOfficeId());
-			officeIdList.add(workInvoice.getOfficeId());
-			workInvoice.setOfficeIdList(officeIdList);
+		if(StringUtils.isNotBlank(workInvoice.getOfficeId())) {
+			if ("一部本部".equals(workInvoice.getOfficeId())) {
+				List<String> officeIdList = Lists.newArrayList();
+				Office office = officeService.getByName("工程一部");
+				officeIdList.add(office.getId());
+				workInvoice.setOfficeIdList(officeIdList);
+			} else {
+				//查询该选择节点下所有的部门Id
+				List<String> officeIdList = officeService.getChildrenOffice(workInvoice.getOfficeId());
+				officeIdList.add(workInvoice.getOfficeId());
+				if (officeIdList.size() > 0) {
+					workInvoice.setOfficeIdList(officeIdList);
+				}
+			}
 		}
 		int count = dao.queryCount(workInvoice);
 		page.setCount(count);

+ 10 - 2
src/main/java/com/jeeplus/modules/workinvoice/service/WorkInvoiceService.java

@@ -3757,6 +3757,7 @@ public class WorkInvoiceService extends CrudService<WorkInvoiceDao, WorkInvoice>
 		Office lwqDepartment = officeService.getByName("刘万前团队");
 		Office zbdlbDepartment = officeService.getByName("招标代理部");
 		Office ycDepartment = officeService.getByName("盐城分公司");
+		Office szfgsDepartment = officeService.getByName("苏州分公司");
 
 		BigDecimal allMoneyB = new BigDecimal("0");
 		BigDecimal firstDepartmentB = new BigDecimal("0");
@@ -3770,6 +3771,7 @@ public class WorkInvoiceService extends CrudService<WorkInvoiceDao, WorkInvoice>
 		BigDecimal lwqDepartmentB = new BigDecimal("0");
 		BigDecimal zbdlbDepartmentB = new BigDecimal("0");
 		BigDecimal ycDepartmentB = new BigDecimal("0");
+		BigDecimal szfgsDepartmentB = new BigDecimal("0");
 		BigDecimal otherDepartmentB = new BigDecimal("0");
 
 		try {
@@ -3820,6 +3822,9 @@ public class WorkInvoiceService extends CrudService<WorkInvoiceDao, WorkInvoice>
 				//盐城分公司开票金额
 				String ycDepartmentMonthAllInvoiceMoney = workInvoiceDao.getInvoiceMoneyByMonthAndOffice(beginDate, endDate, ycDepartment.getId());
 				ycDepartmentB = ycDepartmentB.add(new BigDecimal(ycDepartmentMonthAllInvoiceMoney));
+				//苏州分公司开票金额
+				String szfgsDepartmentMonthAllInvoiceMoney = workInvoiceDao.getInvoiceMoneyByMonthAndOfficeAndChildOffice(beginDate, endDate, szfgsDepartment.getId());
+				szfgsDepartmentB = szfgsDepartmentB.add(new BigDecimal(szfgsDepartmentMonthAllInvoiceMoney));
 
 				//查询其他部门的开票金额总和
 				List<String> otherOfficeList = Lists.newArrayList();
@@ -3834,6 +3839,7 @@ public class WorkInvoiceService extends CrudService<WorkInvoiceDao, WorkInvoice>
 				otherOfficeList.add(lwqDepartment.getId());
 				otherOfficeList.add(zbdlbDepartment.getId());
 				otherOfficeList.add(ycDepartment.getId());
+				otherOfficeList.add(szfgsDepartment.getId());
 
 				//查询剩余部门当月开票金额总和
 				//盐城分公司开票金额
@@ -3854,7 +3860,8 @@ public class WorkInvoiceService extends CrudService<WorkInvoiceDao, WorkInvoice>
 				data.put("10", lwqDepartmentMonthAllInvoiceMoney);
 				data.put("11", zbdlbDepartmentMonthAllInvoiceMoney);
 				data.put("12", ycDepartmentMonthAllInvoiceMoney);
-				data.put("13", otherDepartmentMonthAllInvoiceMoney);
+				data.put("13", szfgsDepartmentMonthAllInvoiceMoney);
+				data.put("14", otherDepartmentMonthAllInvoiceMoney);
 				dataList.add(data);
 			}
 
@@ -3873,7 +3880,8 @@ public class WorkInvoiceService extends CrudService<WorkInvoiceDao, WorkInvoice>
 			totalData.put("10", lwqDepartmentB.setScale(2, RoundingMode.HALF_UP).toString());
 			totalData.put("11", zbdlbDepartmentB.setScale(2, RoundingMode.HALF_UP).toString());
 			totalData.put("12", ycDepartmentB.setScale(2, RoundingMode.HALF_UP).toString());
-			totalData.put("13", otherDepartmentB.setScale(2, RoundingMode.HALF_UP).toString());
+			totalData.put("13", szfgsDepartmentB.setScale(2, RoundingMode.HALF_UP).toString());
+			totalData.put("14", otherDepartmentB.setScale(2, RoundingMode.HALF_UP).toString());
 			dataList.add(totalData);
 
 			//处理合计数值

+ 15 - 8
src/main/java/com/jeeplus/modules/workprojectnotify/web/WorkProjectNotifyController.java

@@ -4353,7 +4353,7 @@ public class WorkProjectNotifyController extends BaseController {
 					Iterator<RuralReportConsultant> it = consultantList.iterator();
 					while (it.hasNext()) {
 						RuralReportConsultant consultant = it.next();
-						if (consultant.getZixunyuan().equals(currentConsultant.getZixunyuan())) {
+						if(consultant.getZixunyuan().equals(currentConsultant.getZixunyuan()) && ((StringUtils.isNotBlank(consultant.getRole()) && consultant.getRole().equals(currentConsultant.getRole())) || StringUtils.isBlank(consultant.getRole()))){
 							try {
 								MyBeanUtils.copyBeanNotNull2Bean(consultant, currentConsultant);
 							} catch (Exception e) {
@@ -4376,11 +4376,16 @@ public class WorkProjectNotifyController extends BaseController {
 							User user = userService.get(consultant.getZixunyuan());
 							if (null != user) {
 								consultant.setZixunyuanName(user.getName());
-								consultant.setRole("咨询员");
+								//consultant.setRole("咨询员");
 							}
 						}
 					}
 					consultants.addAll(consultantList);
+					for (RuralReportConsultant consultant : consultants) {
+						if(StringUtils.isBlank(consultant.getRole())){
+							consultant.setRole("咨询员");
+						}
+					}
 
 					//根据条件查询附件必填项
 					//判断项目类别是否为打包项目(1:打包项目,0:非打包项目)
@@ -4536,7 +4541,7 @@ public class WorkProjectNotifyController extends BaseController {
 						while (itView.hasNext()) {
 							RuralReportConsultant consultant = itView.next();
 							if (bzshbCertificateList.size() > 0) {
-								if (consultant.getZixunyuan().equals(bzshbConsultant.getZixunyuan())) {
+								if (consultant.getZixunyuan().equals(bzshbConsultant.getZixunyuan()) && ((StringUtils.isNotBlank(consultant.getRole()) && consultant.getRole().equals("技术负责人")) || StringUtils.isBlank(consultant.getRole()) )) {
 									try {
 										MyBeanUtils.copyBeanNotNull2Bean(consultant, bzshbConsultant);
 										bzshbConsultant.setZixunyuanName("陈红星(" + bzshbConsultant.getZixunyuanName() + "代)");
@@ -4547,7 +4552,7 @@ public class WorkProjectNotifyController extends BaseController {
 									itView.remove();
 								}
 							} else {
-								if (consultant.getZixunyuan().equals(projectReportData.getBzshbUserId())) {
+								if (consultant.getZixunyuan().equals(projectReportData.getBzshbUserId()) && ((StringUtils.isNotBlank(consultant.getRole()) && consultant.getRole().equals("技术负责人")) || StringUtils.isBlank(consultant.getRole()) )) {
 									try {
 										MyBeanUtils.copyBeanNotNull2Bean(consultant, bzshbConsultant);
 										bzshbConsultant.setZixunyuanName("陈红星(" + bzshbConsultant.getZixunyuanName() + "代)");
@@ -4561,6 +4566,7 @@ public class WorkProjectNotifyController extends BaseController {
 						}
 
 						if (StringUtils.isNotBlank(bzshbConsultant.getZixunyuan())) {
+							bzshbConsultant.setRole("技术负责人");
 							consultants.add(bzshbConsultant);
 						} else {
 							User user = userService.get(projectReportData.getBzshbUserId());
@@ -4607,13 +4613,14 @@ public class WorkProjectNotifyController extends BaseController {
 							User bzshbUser = userService.get(projectReportData.getBzshbUserId());
 							bzshbConsultant.setZixunyuanName(bzshbUser.getName());
 							bzshbConsultant.setZixunyuan(bzshbUser.getId());
+							bzshbConsultant.setRole("技术负责人");
 							if (null != consultants) {
 								List<String> bzshbIdList = Lists.newArrayList();
 								for (RuralReportConsultant consultant : consultants) {
-									bzshbIdList.add(consultant.getZixunyuan());
+									bzshbIdList.add(consultant.getZixunyuan() + consultant.getRole());
 								}
 								String bzshbId = String.join(",", bzshbIdList);
-								if (!bzshbId.contains(bzshbConsultant.getZixunyuan())) {
+								if (!bzshbId.contains(bzshbConsultant.getZixunyuan() + "技术负责人")) {
 									consultants.add(bzshbConsultant);
 								}
 							}
@@ -4622,7 +4629,7 @@ public class WorkProjectNotifyController extends BaseController {
 						while (itView.hasNext()) {
 							RuralReportConsultant consultant = itView.next();
 							if (bzshbCertificateList.size() > 0) {
-								if (consultant.getZixunyuan().equals(bzshbConsultant.getZixunyuan())) {
+								if (consultant.getZixunyuan().equals(bzshbConsultant.getZixunyuan()) && ((StringUtils.isNotBlank(consultant.getRole()) && consultant.getRole().equals("技术负责人")) || StringUtils.isBlank(consultant.getRole()) )) {
 									try {
 										MyBeanUtils.copyBeanNotNull2Bean(consultant, bzshbConsultant);
 										bzshbConsultant.setZixunyuanName("陈红星(" + bzshbConsultant.getZixunyuanName() + "代)");
@@ -4633,7 +4640,7 @@ public class WorkProjectNotifyController extends BaseController {
 									itView.remove();
 								}
 							} else {
-								if (consultant.getZixunyuan().equals(projectReportData.getBzshbUserId())) {
+								if (consultant.getZixunyuan().equals(projectReportData.getBzshbUserId()) && ((StringUtils.isNotBlank(consultant.getRole()) && consultant.getRole().equals("技术负责人")) || StringUtils.isBlank(consultant.getRole()) )) {
 									try {
 										MyBeanUtils.copyBeanNotNull2Bean(consultant, bzshbConsultant);
 										bzshbConsultant.setZixunyuanName("陈红星(" + bzshbConsultant.getZixunyuanName() + "代)");

+ 5 - 2
src/main/resources/mappings/modules/projectcontentinfo/ProjectcontentinfoDao.xml

@@ -547,7 +547,8 @@
 			major,
 			wordnr,
 			projectId,
-			auditOpinion
+			auditOpinion,
+			role
 		)
 		values
 		(
@@ -562,7 +563,8 @@
 			#{major},
 			#{wordnr},
 			#{projectId},
-			#{auditOpinion}
+			#{auditOpinion},
+			#{role}
 		) ;
 	</insert>
 
@@ -602,6 +604,7 @@
 			 ,wordnr
 			 ,projectId
 			 ,auditOpinion
+			 ,role
 		from rural_report_consultant where projectId=#{projectId}
 		order by major
 	</select>

+ 1 - 1
src/main/resources/mappings/modules/sys/OfficeDao.xml

@@ -155,7 +155,7 @@
 			<include refid="officeColumns"/>
 		FROM sys_office a
 		<include refid="officeJoins"/>
-		WHERE a.name = #{name}
+		WHERE a.name = #{name} and a.del_flag = 0
 	</select>
 	<select id="findList" resultType="Office">
 		SELECT

+ 17 - 0
src/main/resources/mappings/modules/workinvoice/WorkInvoiceDao.xml

@@ -2835,6 +2835,23 @@
 		</where>
 	</select>
 
+	<select id="getInvoiceMoneyByMonthAndOfficeAndChildOffice" resultType="java.lang.String">
+		select COALESCE(ROUND(SUM(total_money), 2), 0) from work_invoice_detail
+		<where>
+			invoice_id in (
+			select id from work_invoice
+			<where>
+				del_flag = 0
+				<if test="null != officeId and officeId != ''">
+					and (office_id in (select id from sys_office where parent_id = #{officeId}) or office_id = #{officeId})
+				</if>
+				 and invoice_date between #{beginDate} and #{endDate}
+			</where>
+			) and del_flag = 0
+
+		</where>
+	</select>
+
 	<select id="getInvoiceMoneyByMonthAndOfficeList" resultType="java.lang.String">
 		select COALESCE(ROUND(SUM(total_money), 2), 0) from work_invoice_detail
 		<where>

+ 1 - 0
src/main/resources/spring-context-shiro.xml

@@ -16,6 +16,7 @@
             <value>
                 /static/** = anon
                 /userfiles/** = anon
+                ${adminPath}/clockInRecordController/** = anon
                 ${adminPath}/workMaterialCollect/total/** = anon
                 ${adminPath}/ruralProject/signatureOldMessageDispose/** = anon
                 ${adminPath}/weChatCallBack/** = anon

+ 34 - 0
src/main/webapp/webpage/modules/ruralprojectrecords/cost/newReported/newReportedForm.jsp

@@ -166,6 +166,40 @@
                             return false;
                         }
                     }
+                    if(projectType == 10){
+                        var HeTongJia = $("#HeTongJia").val();
+                        var total =  parseFloat(HeTongJia);
+                        // 检查解析后的值是否为0
+                        if (isNaN(total)) {
+                            parent.layer.msg("合同价输入的值不是有效的数字!", {icon: 5});
+                            return false;
+                        } else if (total === 0) {
+                            parent.layer.msg("合同价不可为0!", {icon: 5});
+                            return false;
+                        }
+
+                        var ShenDingJia = $("#ShenDingJia").val();
+                        var ShenDingJiaTotal =  parseFloat(ShenDingJia);
+                        // 检查解析后的值是否为0
+                        if (isNaN(ShenDingJiaTotal)) {
+                            parent.layer.msg("审定价输入的值不是有效的数字!", {icon: 5});
+                            return false;
+                        } else if (ShenDingJiaTotal === 0) {
+                            parent.layer.msg("审定价不可为0!", {icon: 5});
+                            return false;
+                        }
+
+                        var SongShenJia = $("#SongShenJia").val();
+                        var SongShenJiaTotal =  parseFloat(SongShenJia);
+                        // 检查解析后的值是否为0
+                        if (isNaN(SongShenJiaTotal)) {
+                            parent.layer.msg("送审价输入的值不是有效的数字!", {icon: 5});
+                            return false;
+                        } else if (SongShenJiaTotal === 0) {
+                            parent.layer.msg("送审价不可为0!", {icon: 5});
+                            return false;
+                        }
+                    }
 
                     var ziXunBDE = $("#ZiXunBDE").val();
                     var ShenDingJia = $("#ShenDingJia").val();

+ 9 - 0
src/main/webapp/webpage/modules/ruralprojectrecords/cost/projectcontentinfo/new/reportForm.jsp

@@ -83,9 +83,18 @@
 							var inputElement = thirdTd.querySelector('input');
 							// 获取<input>元素的值
 							var inputValue = inputElement.value;
+
+							// 获取当前行中第四个<td>元素
+							var thirdTd4 = row.querySelector('td:nth-child(4)');
+							// 获取第四个<td>中的<input>元素
+							var inputElement4 = thirdTd4.querySelector('input');
+							// 获取<input>元素的值
+							var inputValue4 = inputElement4.value;
+							inputValue = inputValue4 + inputValue
 							if(inputValue){
 								trArr.push(inputValue);
 							}
+
 						});
 						// 使用 Set 进行数组去重
 						let uniqueArr = [...new Set(trArr)];

+ 35 - 0
src/main/webapp/webpage/modules/ruralprojectrecords/ruralporjectmessage/reportedModify.jsp

@@ -172,6 +172,41 @@
                         return false;
                     }
                 }
+
+                if(projectType == 10){
+                    var HeTongJia = $("#HeTongJia").val();
+                    var total =  parseFloat(HeTongJia);
+                    // 检查解析后的值是否为0
+                    if (isNaN(total)) {
+                        parent.layer.msg("合同价输入的值不是有效的数字!", {icon: 5});
+                        return false;
+                    } else if (total === 0) {
+                        parent.layer.msg("合同价不可为0!", {icon: 5});
+                        return false;
+                    }
+
+                    var ShenDingJia = $("#ShenDingJia").val();
+                    var ShenDingJiaTotal =  parseFloat(ShenDingJia);
+                    // 检查解析后的值是否为0
+                    if (isNaN(ShenDingJiaTotal)) {
+                        parent.layer.msg("审定价输入的值不是有效的数字!", {icon: 5});
+                        return false;
+                    } else if (ShenDingJiaTotal === 0) {
+                        parent.layer.msg("审定价不可为0!", {icon: 5});
+                        return false;
+                    }
+
+                    var SongShenJia = $("#SongShenJia").val();
+                    var SongShenJiaTotal =  parseFloat(SongShenJia);
+                    // 检查解析后的值是否为0
+                    if (isNaN(SongShenJiaTotal)) {
+                        parent.layer.msg("送审价输入的值不是有效的数字!", {icon: 5});
+                        return false;
+                    } else if (SongShenJiaTotal === 0) {
+                        parent.layer.msg("送审价不可为0!", {icon: 5});
+                        return false;
+                    }
+                }
                 var projectRecordId = $("#projectRecordId").val();
                 if("0" != projectRecordId && projectRecordId.length != 16){
                     parent.layer.msg("项目编号填写错误!", {icon: 5});

+ 1 - 1
src/main/webapp/webpage/modules/workinvoice/workInvoiceAllList.jsp

@@ -652,7 +652,7 @@
 						</shiro:hasPermission>
 
 						<shiro:hasPermission name="workInvoiceTwo:workInvoiceTwo:invoiceReport">
-							<a href="javascript:void(0)" style='background-color: #FFB800' onclick="downloadDialogre('开票汇总信息导出', '${ctx}/workinvoiceTwo/workinvoiceTwo/skipDownloadInvoiceForm?view=workInvoiceAll','40%', '35%','','下载,关闭')" class="layui-btn layui-btn-sm layui-bg-blue" > 开票汇总信息导出</a>
+							<a href="javascript:void(0)" style='background-color: #FFB800' onclick="downloadDialogre('开票汇总信息导出', '${ctx}/workinvoiceTwo/workinvoiceTwo/skipDownloadInvoiceForm?view=workInvoiceAll','40%', '400px','','下载,关闭')" class="layui-btn layui-btn-sm layui-bg-blue" > 开票汇总信息导出</a>
 						</shiro:hasPermission>
 						<button class="layui-btn layui-btn-sm layui-bg-green" data-toggle="tooltip" data-placement="left" onclick="sortOrRefresh()" title="刷新"> 刷新</button>
 						<div class=" layui-btn-sm" style="float: right;width: 300px">

+ 1 - 1
src/main/webapp/webpage/modules/workinvoice/workInvoiceAllTwoList.jsp

@@ -734,7 +734,7 @@
 						</shiro:hasPermission>
 
 						<shiro:hasPermission name="workInvoiceTwo:workInvoiceTwo:invoiceReport">
-							<a href="javascript:void(0)" style='background-color: #FFB800' onclick="downloadDialogre('开票汇总信息导出', '${ctx}/workinvoiceTwo/workinvoiceTwo/skipDownloadInvoiceForm?view=workInvoiceAllTwo','40%', '35%','','下载,关闭')" class="layui-btn layui-btn-sm layui-bg-blue" > 开票汇总信息导出</a>
+							<a href="javascript:void(0)" style='background-color: #FFB800' onclick="downloadDialogre('开票汇总信息导出', '${ctx}/workinvoiceTwo/workinvoiceTwo/skipDownloadInvoiceForm?view=workInvoiceAllTwo','40%', '400px','','下载,关闭')" class="layui-btn layui-btn-sm layui-bg-blue" > 开票汇总信息导出</a>
 						</shiro:hasPermission>
 						<button class="layui-btn layui-btn-sm layui-bg-green" data-toggle="tooltip" data-placement="left" onclick="sortOrRefresh()" title="刷新"> 刷新</button>
 						<div class=" layui-btn-sm" style="float: right;width: 300px">

+ 1 - 1
src/main/webapp/webpage/modules/workinvoice/workInvoiceTwoList.jsp

@@ -777,7 +777,7 @@
 						</shiro:hasPermission>
 
 						<shiro:hasPermission name="workInvoiceTwo:workInvoiceTwo:invoiceReport">
-							<a href="javascript:void(0)" style='background-color: #FFB800' onclick="downloadDialogre('开票汇总信息导出', '${ctx}/workinvoiceTwo/workinvoiceTwo/skipDownloadInvoiceForm?view=workInvoiceTwo','40%', '35%','','下载,关闭')" class="layui-btn layui-btn-sm layui-bg-blue" > 开票汇总信息导出</a>
+							<a href="javascript:void(0)" style='background-color: #FFB800' onclick="downloadDialogre('开票汇总信息导出', '${ctx}/workinvoiceTwo/workinvoiceTwo/skipDownloadInvoiceForm?view=workInvoiceTwo','40%', '400px','','下载,关闭')" class="layui-btn layui-btn-sm layui-bg-blue" > 开票汇总信息导出</a>
 						</shiro:hasPermission>
 
 						<button class="layui-btn layui-btn-sm layui-bg-green" data-toggle="tooltip" data-placement="left" onclick="sortOrRefresh()" title="刷新"> 刷新</button>