Bladeren bron

Merge remote-tracking branch 'origin/master'

fangpy 1 jaar geleden
bovenliggende
commit
b6d2f63604
20 gewijzigde bestanden met toevoegingen van 1059 en 80 verwijderingen
  1. 16 0
      business-common/src/main/java/com/rongwei/bscommon/sys/dao/ZhcxOutsideInspectionComponentTrackDao.java
  2. 37 0
      business-common/src/main/java/com/rongwei/bscommon/sys/dao/ZhcxReprotSameDayRealTimeInspectionStatisticsDao.java
  3. 16 0
      business-common/src/main/java/com/rongwei/bscommon/sys/dao/ZhcxReprotSameDayRealTimeInspectionStatisticsLocationDao.java
  4. 4 0
      business-common/src/main/java/com/rongwei/bscommon/sys/service/ZhcxApiService.java
  5. 32 0
      business-common/src/main/java/com/rongwei/bscommon/sys/service/ZhcxOutsideInspectionComponentTrackService.java
  6. 16 0
      business-common/src/main/java/com/rongwei/bscommon/sys/service/ZhcxReprotSameDayRealTimeInspectionStatisticsLocationService.java
  7. 21 0
      business-common/src/main/java/com/rongwei/bscommon/sys/service/ZhcxReprotSameDayRealTimeInspectionStatisticsService.java
  8. 84 9
      business-common/src/main/java/com/rongwei/bscommon/sys/service/impl/ZhcxApiServiceImpl.java
  9. 134 0
      business-common/src/main/java/com/rongwei/bscommon/sys/service/impl/ZhcxOutsideInspectionComponentTrackServiceImpl.java
  10. 107 63
      business-common/src/main/java/com/rongwei/bscommon/sys/service/impl/ZhcxOutsideInspectionItpServiceImpl.java
  11. 20 0
      business-common/src/main/java/com/rongwei/bscommon/sys/service/impl/ZhcxReprotSameDayRealTimeInspectionStatisticsLocationServiceImpl.java
  12. 172 0
      business-common/src/main/java/com/rongwei/bscommon/sys/service/impl/ZhcxReprotSameDayRealTimeInspectionStatisticsServiceImpl.java
  13. 8 5
      business-common/src/main/java/com/rongwei/bscommon/sys/utils/HwSmsUtil.java
  14. 112 0
      business-entity/src/main/java/com/rongwei/bsentity/domain/ZhcxOutsideInspectionComponentTrackDo.java
  15. 34 3
      business-entity/src/main/java/com/rongwei/bsentity/domain/ZhcxOutsideInspectionItpDo.java
  16. 92 0
      business-entity/src/main/java/com/rongwei/bsentity/domain/ZhcxReprotSameDayRealTimeInspectionStatisticsDo.java
  17. 103 0
      business-entity/src/main/java/com/rongwei/bsentity/domain/ZhcxReprotSameDayRealTimeInspectionStatisticsLocationDo.java
  18. 23 0
      business-entity/src/main/java/com/rongwei/bsentity/vo/report/SameDayRealTimeInspectionVo.java
  19. 12 0
      business-server/src/main/java/com/rongwei/bsserver/controller/ZhcxApiController.java
  20. 16 0
      business-server/src/main/java/com/rongwei/bsserver/controller/ZhcxOutsideInspectionItpController.java

+ 16 - 0
business-common/src/main/java/com/rongwei/bscommon/sys/dao/ZhcxOutsideInspectionComponentTrackDao.java

@@ -0,0 +1,16 @@
+package com.rongwei.bscommon.sys.dao;
+
+import com.rongwei.bsentity.domain.ZhcxOutsideInspectionComponentTrackDo;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ * 外部报验-构件跟踪 Mapper 接口
+ * </p>
+ *
+ * @author wm
+ * @since 2024-02-05
+ */
+public interface ZhcxOutsideInspectionComponentTrackDao extends BaseMapper<ZhcxOutsideInspectionComponentTrackDo> {
+
+}

+ 37 - 0
business-common/src/main/java/com/rongwei/bscommon/sys/dao/ZhcxReprotSameDayRealTimeInspectionStatisticsDao.java

@@ -0,0 +1,37 @@
+package com.rongwei.bscommon.sys.dao;
+
+import com.rongwei.bsentity.domain.ZhcxReprotSameDayRealTimeInspectionStatisticsDo;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.rongwei.bsentity.vo.report.SameDayRealTimeInspectionVo;
+import org.apache.ibatis.annotations.Param;
+import org.apache.ibatis.annotations.Select;
+
+import java.util.List;
+
+/**
+ * <p>
+ * 报表管理-当日全项目实时报验统计 Mapper 接口
+ * </p>
+ *
+ * @author wm
+ * @since 2024-01-29
+ */
+public interface ZhcxReprotSameDayRealTimeInspectionStatisticsDao extends BaseMapper<ZhcxReprotSameDayRealTimeInspectionStatisticsDo> {
+
+    @Select("SELECT\n" +
+            "      i.ID,\n" +
+            "      i.INSPECTIONSTATUS,\n" +
+            "      i.INSPECTIONCONTENT,\n" +
+            "      i.INSPECTIONLOCATION,\n" +
+            "      d.DISPATCHSTATUS,\n" +
+            "      d.INSPECTIONCONCLUSION\n" +
+            "    FROM\n" +
+            "      ZHCX_OUTSIDE_INSPECTION_ITP i\n" +
+            "    JOIN ZHCX_OUTSIDE_INSPECTION_ITP_SUPERVISION_DISPATCH  d ON d.ITPID = i.ID AND d.DELETED = '0' \n" +
+            "    WHERE\n" +
+            "      i.DELETED = '0'\n" +
+            "      AND i.INSPECTIONSTATUS > 10\n" +
+            "      AND i.RESERVATIONINSPECTIONTIME BETWEEN #{startTime} AND #{endTime}")
+    List<SameDayRealTimeInspectionVo> getInspetion(@Param("startTime") String startTime, @Param("endTime") String endTime);
+
+}

+ 16 - 0
business-common/src/main/java/com/rongwei/bscommon/sys/dao/ZhcxReprotSameDayRealTimeInspectionStatisticsLocationDao.java

@@ -0,0 +1,16 @@
+package com.rongwei.bscommon.sys.dao;
+
+import com.rongwei.bsentity.domain.ZhcxReprotSameDayRealTimeInspectionStatisticsLocationDo;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ * 报表管理-当日全项目实时报验统计-检查地点 Mapper 接口
+ * </p>
+ *
+ * @author wm
+ * @since 2024-01-29
+ */
+public interface ZhcxReprotSameDayRealTimeInspectionStatisticsLocationDao extends BaseMapper<ZhcxReprotSameDayRealTimeInspectionStatisticsLocationDo> {
+
+}

+ 4 - 0
business-common/src/main/java/com/rongwei/bscommon/sys/service/ZhcxApiService.java

@@ -14,4 +14,8 @@ public interface ZhcxApiService {
     List<ZhcxOutsideInspectionVo> getOutsideInspectionList(Map<String, Object> map);
 
     R sendCode(Map<String, Object> map);
+
+    R getAccountInfoForForgotPassword(Map<String, Object> map);
+
+    R resetPassword(Map<String, Object> map);
 }

+ 32 - 0
business-common/src/main/java/com/rongwei/bscommon/sys/service/ZhcxOutsideInspectionComponentTrackService.java

@@ -0,0 +1,32 @@
+package com.rongwei.bscommon.sys.service;
+
+import com.rongwei.bsentity.domain.ZhcxOutsideInspectionComponentTrackDo;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.rongwei.bsentity.domain.ZhcxOutsideInspectionItpDo;
+
+/**
+ * <p>
+ * 外部报验-构件跟踪 服务类
+ * </p>
+ *
+ * @author wm
+ * @since 2024-02-05
+ */
+public interface ZhcxOutsideInspectionComponentTrackService extends IService<ZhcxOutsideInspectionComponentTrackDo> {
+
+    /**
+     * 保存跟踪
+     *
+     * @param itpDo
+     */
+    void saveByItp(ZhcxOutsideInspectionItpDo itpDo);
+
+    /**
+     * 获取跟踪对象
+     *
+     * @param itpDo
+     * @return
+     */
+    ZhcxOutsideInspectionComponentTrackDo getByItp(ZhcxOutsideInspectionItpDo itpDo);
+
+}

+ 16 - 0
business-common/src/main/java/com/rongwei/bscommon/sys/service/ZhcxReprotSameDayRealTimeInspectionStatisticsLocationService.java

@@ -0,0 +1,16 @@
+package com.rongwei.bscommon.sys.service;
+
+import com.rongwei.bsentity.domain.ZhcxReprotSameDayRealTimeInspectionStatisticsLocationDo;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ * 报表管理-当日全项目实时报验统计-检查地点 服务类
+ * </p>
+ *
+ * @author wm
+ * @since 2024-01-29
+ */
+public interface ZhcxReprotSameDayRealTimeInspectionStatisticsLocationService extends IService<ZhcxReprotSameDayRealTimeInspectionStatisticsLocationDo> {
+
+}

+ 21 - 0
business-common/src/main/java/com/rongwei/bscommon/sys/service/ZhcxReprotSameDayRealTimeInspectionStatisticsService.java

@@ -0,0 +1,21 @@
+package com.rongwei.bscommon.sys.service;
+
+import com.rongwei.bsentity.domain.ZhcxReprotSameDayRealTimeInspectionStatisticsDo;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ * 报表管理-当日全项目实时报验统计 服务类
+ * </p>
+ *
+ * @author wm
+ * @since 2024-01-29
+ */
+public interface ZhcxReprotSameDayRealTimeInspectionStatisticsService extends IService<ZhcxReprotSameDayRealTimeInspectionStatisticsDo> {
+
+    /**
+     * 生成统计
+     * 查询前一小时数据,并做数据统计
+     */
+    void genStatistics();
+}

+ 84 - 9
business-common/src/main/java/com/rongwei/bscommon/sys/service/impl/ZhcxApiServiceImpl.java

@@ -11,10 +11,15 @@ import com.rongwei.bsentity.vo.ZhcxOutsideInspectionVo;
 import com.rongwei.commonservice.service.RedisService;
 import com.rongwei.rwadmincommon.system.domain.SysUserDo;
 import com.rongwei.rwadmincommon.system.service.SysUserService;
+import com.rongwei.rwadmincommon.system.vo.SysUserVo;
 import com.rongwei.rwcommon.base.R;
+import com.rongwei.rwcommon.base.exception.CustomException;
+import com.rongwei.rwcommon.utils.CheckPasswordUtils;
 import com.rongwei.rwcommon.utils.SecurityUtil;
 import com.rongwei.rwcommon.utils.StringUtils;
+import lombok.extern.java.Log;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.redis.core.RedisTemplate;
 import org.springframework.stereotype.Service;
 
 import java.util.List;
@@ -24,6 +29,7 @@ import java.util.Random;
 /**
  * @author zhuang
  */
+@Log
 @Service
 public class ZhcxApiServiceImpl implements ZhcxApiService {
 
@@ -69,15 +75,84 @@ public class ZhcxApiServiceImpl implements ZhcxApiService {
         if(StringUtils.isBlank(phone)){
             return R.error("未获取到手机号,请联系系统管理员");
         }
-        boolean exists = redisService.hasKey(loginType + phone);
-        String sendCodeTimeObj = (String) redisService.getRedisCatchObj(loginType + phone);
+        String redisKeyName = loginType + phone;
+        String redisLabelName = loginType + account;
+        return sendSmsCode(null, redisKeyName, phone, redisLabelName);
+    }
+
+    @Override
+    public R getAccountInfoForForgotPassword(Map<String, Object> map) {
+        String account = map.get("account").toString();
+        LambdaQueryWrapper<SysUserDo> queryWrapper = Wrappers.lambdaQuery();
+        queryWrapper.and(i -> i.eq(SysUserDo::getAccount, account));
+        SysUserDo sysUserDo = sysUserService.getOne(queryWrapper);
+        if (sysUserDo == null) {
+            return R.error("账号信息输入有误, 请重新输入!");
+        }
+        String sendType = map.get("sendType").toString();
+        String loginType = map.get("loginType").toString();
+        String smsCodeTpl = map.get("smsCodeTpl").toString();
+        String phone = sysUserDo.getMobile();
+        String redisKeyName = "forgot_password_" + loginType + phone;
+        String redisLabelName = "forgot_password_" + loginType + account;
+        if (sendType.contains("sms")) {
+            return sendSmsCode(smsCodeTpl, redisKeyName, phone, redisLabelName);
+        }
+        return R.error("获取账号信息失败, 请联系管理员!");
+    }
+
+    @Override
+    public R resetPassword(Map<String, Object> map) {
+
+        Object loginTypeObj = map.get("loginType");
+        Object accountObj = map.get("account");
+        Object passwordObj = map.get("password");
+        Object codeObj = map.get("smsCode");
+        if( ObjectUtil.isNotEmpty(loginTypeObj) && ObjectUtil.isNotEmpty(accountObj) && ObjectUtil.isNotEmpty(passwordObj)
+                && ObjectUtil.isNotEmpty(codeObj)){
+            LambdaQueryWrapper<SysUserDo> queryWrapper = Wrappers.lambdaQuery();
+            queryWrapper.and(i -> i.eq(SysUserDo::getAccount, accountObj.toString()));
+            SysUserDo sysUserDo = sysUserService.getOne(queryWrapper);
+            String redisKeyName = "forgot_password_" + loginTypeObj.toString() + accountObj.toString();
+            boolean exist = redisService.hasKey(redisKeyName);
+            if (exist) {
+                Object yzmObj = redisService.getRedisCatchObj(redisKeyName);
+                if(ObjectUtil.isEmpty(yzmObj)){
+                    return R.error("未获取到验证码或验证码已过期,请获取验证码");
+                }
+                String yzm = (String) yzmObj;
+                if (codeObj.toString().equals(yzm)) {
+                    Boolean ischeck = CheckPasswordUtils.checkPasswordDefaultRule(passwordObj.toString());
+                    if(!ischeck){
+                        return R.error("密码长度不小于8,并且大写字母、小写字母、数字、特殊字符,至少包含三种");
+                    }
+                    sysUserDo.setPassword(SecurityUtil.getSaltMd5AndSha(passwordObj.toString(), sysUserDo.getId()));
+                    sysUserService.updateById(sysUserDo);
+                    RedisTemplate redisTemplate = redisService.getRedisTemplate();
+                    redisTemplate.delete(redisKeyName);
+                    redisTemplate.delete("forgot_password_" + loginTypeObj.toString() + sysUserDo.getMobile());
+                    return R.ok();
+                } else {
+                    return R.error("验证码错误,请重新输入");
+                }
+            } else {
+                return R.error("未获取到验证码或验证码已过期,请获取验证码");
+            }
+        }
+
+        return R.error("重置密码失败, 请联系管理员!");
+    }
+
+    private R sendSmsCode(String templateId, String redisKeyName, String mobile, String redisLabelName) {
+        boolean exists = redisService.hasKey(redisKeyName);
+        String sendCodeTimeObj = (String) redisService.getRedisCatchObj(redisKeyName);
         if (StringUtils.isBlank(sendCodeTimeObj)) {
             sendCodeTimeObj = "0";
         }
         int sendCodeTime = Integer.parseInt(sendCodeTimeObj);
         if( exists && sendCodeTime >= 3 ){
             sendCodeTime += 1;
-            redisService.redisCatchInit(loginType + phone,String.valueOf(sendCodeTime),300);
+            redisService.redisCatchInit(redisKeyName,String.valueOf(sendCodeTime),300);
             return R.error("验证发送次数频繁,请过5分钟后再尝试");
         }
         StringBuilder code = new StringBuilder();
@@ -89,22 +164,22 @@ public class ZhcxApiServiceImpl implements ZhcxApiService {
             }
         }
         try {
-            JSONObject jsonObject = HwSmsUtil.sendSms(code.toString(), phone);
+            JSONObject jsonObject = HwSmsUtil.sendSms(templateId, code.toString(), mobile);
             String returnCode = jsonObject.getString("code");
             if("000000".equals(returnCode)){
                 if(!exists){
-                    redisService.redisCatchInit(loginType + phone,0,300);
+                    redisService.redisCatchInit(redisKeyName,0,300);
                 }
                 sendCodeTime += 1;
-                redisService.redisCatchInit(loginType + phone,String.valueOf(sendCodeTime),300);
-                redisService.redisCatchInit(loginType + account,code.toString(),120);
+                redisService.redisCatchInit(redisKeyName,String.valueOf(sendCodeTime),300);
+                redisService.redisCatchInit(redisLabelName,code.toString(),120);
                 JSONObject json = new JSONObject();
-                json.put("phone",phone.replaceAll("(\\d{3})\\d{4}(\\d{4})","$1****$2"));
+                json.put("phone",mobile.replaceAll("(\\d{3})\\d{4}(\\d{4})","$1****$2"));
                 return R.ok("发送成功").putData(json);
             }
         } catch (Exception e) {
             e.printStackTrace();
         }
-        return R.error();
+        return R.error("获取账号信息失败, 请联系管理员!");
     }
 }

+ 134 - 0
business-common/src/main/java/com/rongwei/bscommon/sys/service/impl/ZhcxOutsideInspectionComponentTrackServiceImpl.java

@@ -0,0 +1,134 @@
+package com.rongwei.bscommon.sys.service.impl;
+
+import cn.hutool.core.util.ObjectUtil;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.rongwei.bsentity.domain.ZhcxOutsideInspectionComponentTrackDo;
+import com.rongwei.bscommon.sys.dao.ZhcxOutsideInspectionComponentTrackDao;
+import com.rongwei.bscommon.sys.service.ZhcxOutsideInspectionComponentTrackService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.rongwei.bsentity.domain.ZhcxOutsideInspectionItpDo;
+import com.rongwei.rwcommon.utils.SecurityUtil;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ * 外部报验-构件跟踪 服务实现类
+ * </p>
+ *
+ * @author wm
+ * @since 2024-02-05
+ */
+@Service
+public class ZhcxOutsideInspectionComponentTrackServiceImpl extends ServiceImpl<ZhcxOutsideInspectionComponentTrackDao, ZhcxOutsideInspectionComponentTrackDo> implements ZhcxOutsideInspectionComponentTrackService {
+
+    /**
+     * 保存跟踪
+     *
+     * @param itpDo
+     */
+    @Override
+    public void saveByItp(ZhcxOutsideInspectionItpDo itpDo) {
+        ZhcxOutsideInspectionComponentTrackDo entity = getByItp(itpDo);
+
+        if(ObjectUtil.isNull(entity)) {
+            return ;
+        }
+
+        save(entity);
+    }
+
+    /**
+     * 获取跟踪对象
+     *
+     * @param itpDo
+     * @return
+     */
+    @Override
+    public ZhcxOutsideInspectionComponentTrackDo getByItp(ZhcxOutsideInspectionItpDo itpDo) {
+
+        //校验
+        if(!checkSave(itpDo)) {
+            return null;
+        }
+
+        ZhcxOutsideInspectionComponentTrackDo entity = new ZhcxOutsideInspectionComponentTrackDo();
+        setSaveData(itpDo, entity);
+        return entity;
+    }
+
+    /**
+     * 设置保存数据
+     *
+     * @param itpDo
+     * @param entity
+     */
+    private void setSaveData(ZhcxOutsideInspectionItpDo itpDo, ZhcxOutsideInspectionComponentTrackDo entity) {
+        if(ObjectUtil.isNull(entity)) {
+            entity = new ZhcxOutsideInspectionComponentTrackDo();
+        }
+
+        entity.setId(SecurityUtil.getUUID());
+
+        entity.setDeleted("0");
+
+        //项目
+        entity.setProjectid(itpDo.getProjectid());
+        entity.setProjectcode(itpDo.getProjectcode());
+        entity.setProjectname(itpDo.getProjectname());
+
+        //构件
+        entity.setStructureid(itpDo.getStructureid());
+        entity.setStructurename(itpDo.getStructurename());
+
+        //报验点
+//        entity.setInspectioncontentid(itpDo.getInspectioncontentid());
+//        entity.setInspectioncontent(itpDo.getInspectioncontent());
+
+        //总装机号
+        entity.setProjectmachineid(itpDo.getProjectmachineid());
+        entity.setMachineno(itpDo.getMachineno());
+
+        //结构机号
+        entity.setStructuremachineid(itpDo.getStructuremachineid());
+        entity.setStructuremachineno(itpDo.getStructuremachineno());
+
+        //分包商id
+        entity.setSubcontractorid(itpDo.getSubcontractorid());
+
+        //分包商挂靠单位id
+        entity.setSubcontractorunitid(itpDo.getSubcontractorunitid());
+    }
+
+    /**
+     * 校验保存之前数据
+     *
+     * @param itpDo
+     * @return
+     */
+    private boolean checkSave(ZhcxOutsideInspectionItpDo itpDo) {
+        //总装机号或机构机号不存在,不保存跟踪
+        if(ObjectUtil.isNull(itpDo.getMachineno()) || ObjectUtil.isNull(itpDo.getStructuremachineno())) {
+            return false;
+        }
+
+        //构件或为空,不保存跟踪
+        if(ObjectUtil.isNull(itpDo.getStructurename())) {
+            return false;
+        }
+
+        //已保存的构件和报验点,不再重新保存
+        LambdaQueryWrapper<ZhcxOutsideInspectionComponentTrackDo> queryWrapper = Wrappers.lambdaQuery();
+        queryWrapper.eq(ZhcxOutsideInspectionComponentTrackDo::getStructurename, itpDo.getStructurename())
+//                .eq(ZhcxOutsideInspectionComponentTrackDo::getMachineno, itpDo.getMachineno())
+//                .eq(ZhcxOutsideInspectionComponentTrackDo::getStructuremachineno, itpDo.getStructuremachineno())
+                .eq(ZhcxOutsideInspectionComponentTrackDo::getDeleted, "0")
+                .eq(ZhcxOutsideInspectionComponentTrackDo::getProjectid, itpDo.getProjectid());
+        int count = count(queryWrapper);
+        if(count > 0) {
+            return false;
+        }
+
+        return true;
+    }
+}

+ 107 - 63
business-common/src/main/java/com/rongwei/bscommon/sys/service/impl/ZhcxOutsideInspectionItpServiceImpl.java

@@ -13,6 +13,7 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.rongwei.bscommon.sys.feign.SysNotifyFeginService;
 import com.rongwei.bscommon.sys.service.*;
 import com.rongwei.bscommon.sys.utils.ZhcxCommon;
+import com.rongwei.bsentity.domain.ZhcxOutsideInspectionComponentTrackDo;
 import com.rongwei.bsentity.domain.ZhcxOutsideInspectionItpDo;
 import com.rongwei.bscommon.sys.dao.ZhcxOutsideInspectionItpDao;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@@ -79,6 +80,9 @@ public class ZhcxOutsideInspectionItpServiceImpl extends ServiceImpl<ZhcxOutside
     @Autowired
     private SysFileItemService sysFileItemService;
 
+    @Autowired
+    private ZhcxOutsideInspectionComponentTrackService inspectionComponentTrackService;
+
     @Autowired
     private SysNotifyFeginService notifyFeginService;
     @Value("${temp.filepath:#{null}}")
@@ -110,72 +114,12 @@ public class ZhcxOutsideInspectionItpServiceImpl extends ServiceImpl<ZhcxOutside
         //只有一个构件和报验点时
         //不需要拆单
         if(structureNames.length * inspectionContents.length <= 1) {
-
-            //生成空派单
-            genEmptyDispatch(id);
-
-            //存在报验单号,则不再生成
-            if(ObjectUtil.isNotEmpty(itpDo.getInspectioncode())) {
-                return ;
-            }
-            ZhcxOutsideInspectionItpDo updateEntity = new ZhcxOutsideInspectionItpDo();
-            updateEntity.setId(id);
-            updateEntity.setInspectioncode(genCode());
-            updateById(updateEntity);
+            saveSingle(itpDo);
             return ;
         }
 
-        List<ZhcxOutsideInspectionItpDo> insertList = new ArrayList<>();
-        List<ZhcxOutsideInspectionItpSupervisionDispatchDo> insertDispatchList = new ArrayList<>();
-        List<ZhcxOutsideInspectionItpDo> updateList = new ArrayList<>();
-        List<String> newItpIdList = new ArrayList<>();
-
-        int count = -1;
-        for(int m = 0, n = structureNames.length; m < n; m++) {
-            for(String inspectionContent : inspectionContents) {
-                count++;
-
-                if(count == 0) { //第一个做修改
-                    itpDo.setStructurename(structureNames[m]);
-                    itpDo.setInspectioncontent(inspectionContent);
-                    itpDo.setInspectioncode(genCode());
-//                    itpDo.setStructureid(structureIds[m]);
-                    updateList.add(itpDo);
-
-                    //生成空派单数据
-                    genEmptyDispatch(id);
-                    continue;
-                }
-
-                ZhcxOutsideInspectionItpDo entity = new ZhcxOutsideInspectionItpDo();
-                BeanUtil.copyProperties(itpDo, entity);
-                entity.setStructurename(structureNames[m]);
-                entity.setInspectioncontent(inspectionContent);
-                entity.setId(SecurityUtil.getUUID());
-                entity.setInspectioncode(genCode());
-//                entity.setStructureid(structureIds[m]);
-                insertList.add(entity);
-                newItpIdList.add(entity.getId());
-
-                //空派单
-                ZhcxOutsideInspectionItpSupervisionDispatchDo dispatchDo = new ZhcxOutsideInspectionItpSupervisionDispatchDo();
-                dispatchDo.setId(SecurityUtil.getUUID());
-                dispatchDo.setDeleted("0");
-                dispatchDo.setItpid(entity.getId());
-                insertDispatchList.add(dispatchDo);
-
-            }
-        }
-
-        //报验单明细
-        insertChildren(itpDo, newItpIdList);
-
-        //报验单
-        updateBatchById(updateList);
-        saveBatch(insertList);
-
-        //空派单数据
-        dispatchService.saveBatch(insertDispatchList);
+        //保存多个构件/报验点
+        saveMany(itpDo, structureNames, inspectionContents);
     }
 
     @Override
@@ -464,6 +408,106 @@ public class ZhcxOutsideInspectionItpServiceImpl extends ServiceImpl<ZhcxOutside
 
     }
 
+    /**
+     * 保存多条构件,报验点
+     *
+     * @param itpDo
+     * @param structureNames
+     * @param inspectionContents
+     */
+    private void saveMany(ZhcxOutsideInspectionItpDo itpDo, String[] structureNames, String[] inspectionContents) {
+        List<ZhcxOutsideInspectionItpDo> insertList = new ArrayList<>();
+        List<ZhcxOutsideInspectionItpSupervisionDispatchDo> insertDispatchList = new ArrayList<>();
+        List<ZhcxOutsideInspectionItpDo> updateList = new ArrayList<>();
+        List<String> newItpIdList = new ArrayList<>();
+        List<ZhcxOutsideInspectionComponentTrackDo> trackDos = new ArrayList<>();
+
+        int count = -1;
+        for(int m = 0, n = structureNames.length; m < n; m++) {
+            for(String inspectionContent : inspectionContents) {
+                count++;
+
+                if(count == 0) { //第一个做修改
+                    itpDo.setStructurename(structureNames[m]);
+                    itpDo.setInspectioncontent(inspectionContent);
+                    itpDo.setInspectioncode(genCode());
+//                    itpDo.setStructureid(structureIds[m]);
+                    updateList.add(itpDo);
+
+                    //生成空派单数据
+                    genEmptyDispatch(itpDo.getId());
+
+                    //跟踪
+                    ZhcxOutsideInspectionComponentTrackDo trackDo = inspectionComponentTrackService.getByItp(itpDo);
+                    if(ObjectUtil.isNotNull(trackDo)) {
+                        trackDos.add(trackDo);
+                    }
+                    continue;
+                }
+
+                ZhcxOutsideInspectionItpDo entity = new ZhcxOutsideInspectionItpDo();
+                BeanUtil.copyProperties(itpDo, entity);
+                entity.setStructurename(structureNames[m]);
+                entity.setInspectioncontent(inspectionContent);
+                entity.setId(SecurityUtil.getUUID());
+                entity.setInspectioncode(genCode());
+//                entity.setStructureid(structureIds[m]);
+                insertList.add(entity);
+                newItpIdList.add(entity.getId());
+
+                //空派单
+                ZhcxOutsideInspectionItpSupervisionDispatchDo dispatchDo = new ZhcxOutsideInspectionItpSupervisionDispatchDo();
+                dispatchDo.setId(SecurityUtil.getUUID());
+                dispatchDo.setDeleted("0");
+                dispatchDo.setItpid(entity.getId());
+                insertDispatchList.add(dispatchDo);
+
+                //跟踪
+                ZhcxOutsideInspectionComponentTrackDo trackDo = inspectionComponentTrackService.getByItp(entity);
+                if(ObjectUtil.isNotNull(trackDo)) {
+                    trackDos.add(trackDo);
+                }
+
+            }
+        }
+
+        //报验单明细
+        insertChildren(itpDo, newItpIdList);
+
+        //报验单
+        updateBatchById(updateList);
+        saveBatch(insertList);
+
+        //空派单数据
+        dispatchService.saveBatch(insertDispatchList);
+
+        if(ObjectUtil.isNotEmpty(trackDos)) {
+            inspectionComponentTrackService.saveBatch(trackDos);
+        }
+    }
+
+    /**
+     * 保存单条构件,报验点
+     *
+     * @param itpDo
+     */
+    private void saveSingle(ZhcxOutsideInspectionItpDo itpDo) {
+        //生成空派单
+        genEmptyDispatch(itpDo.getId());
+
+        //构件跟踪
+        inspectionComponentTrackService.saveByItp(itpDo);
+
+        //存在报验单号,则不再生成
+        if(ObjectUtil.isNotEmpty(itpDo.getInspectioncode())) {
+            return ;
+        }
+        ZhcxOutsideInspectionItpDo updateEntity = new ZhcxOutsideInspectionItpDo();
+        updateEntity.setId(itpDo.getId());
+        updateEntity.setInspectioncode(genCode());
+        updateById(updateEntity);
+    }
+
     /**
      * 生成派单
      * 1、校验是否已存在

+ 20 - 0
business-common/src/main/java/com/rongwei/bscommon/sys/service/impl/ZhcxReprotSameDayRealTimeInspectionStatisticsLocationServiceImpl.java

@@ -0,0 +1,20 @@
+package com.rongwei.bscommon.sys.service.impl;
+
+import com.rongwei.bsentity.domain.ZhcxReprotSameDayRealTimeInspectionStatisticsLocationDo;
+import com.rongwei.bscommon.sys.dao.ZhcxReprotSameDayRealTimeInspectionStatisticsLocationDao;
+import com.rongwei.bscommon.sys.service.ZhcxReprotSameDayRealTimeInspectionStatisticsLocationService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ * 报表管理-当日全项目实时报验统计-检查地点 服务实现类
+ * </p>
+ *
+ * @author wm
+ * @since 2024-01-29
+ */
+@Service
+public class ZhcxReprotSameDayRealTimeInspectionStatisticsLocationServiceImpl extends ServiceImpl<ZhcxReprotSameDayRealTimeInspectionStatisticsLocationDao, ZhcxReprotSameDayRealTimeInspectionStatisticsLocationDo> implements ZhcxReprotSameDayRealTimeInspectionStatisticsLocationService {
+
+}

+ 172 - 0
business-common/src/main/java/com/rongwei/bscommon/sys/service/impl/ZhcxReprotSameDayRealTimeInspectionStatisticsServiceImpl.java

@@ -0,0 +1,172 @@
+package com.rongwei.bscommon.sys.service.impl;
+
+import cn.hutool.core.date.DateUtil;
+import cn.hutool.core.util.ObjectUtil;
+import cn.hutool.json.JSONObject;
+import cn.hutool.json.JSONUtil;
+import com.rongwei.bscommon.sys.service.ZhcxReprotSameDayRealTimeInspectionStatisticsLocationService;
+import com.rongwei.bsentity.domain.ZhcxReprotSameDayRealTimeInspectionStatisticsDo;
+import com.rongwei.bscommon.sys.dao.ZhcxReprotSameDayRealTimeInspectionStatisticsDao;
+import com.rongwei.bscommon.sys.service.ZhcxReprotSameDayRealTimeInspectionStatisticsService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.rongwei.bsentity.domain.ZhcxReprotSameDayRealTimeInspectionStatisticsLocationDo;
+import com.rongwei.bsentity.vo.report.SameDayRealTimeInspectionVo;
+import com.rongwei.commonservice.service.dao.CommonSqlDao;
+import com.rongwei.rwadmincommon.system.dao.CommonDao;
+import com.rongwei.rwcommon.utils.SecurityUtil;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.text.SimpleDateFormat;
+import java.util.*;
+
+/**
+ * <p>
+ * 报表管理-当日全项目实时报验统计 服务实现类
+ * </p>
+ *
+ * @author wm
+ * @since 2024-01-29
+ */
+@Service
+public class ZhcxReprotSameDayRealTimeInspectionStatisticsServiceImpl extends ServiceImpl<ZhcxReprotSameDayRealTimeInspectionStatisticsDao, ZhcxReprotSameDayRealTimeInspectionStatisticsDo> implements ZhcxReprotSameDayRealTimeInspectionStatisticsService {
+
+    @Autowired
+    private ZhcxReprotSameDayRealTimeInspectionStatisticsDao dao;
+
+    @Autowired
+    private ZhcxReprotSameDayRealTimeInspectionStatisticsLocationService locationService;
+
+    /**
+     * 生成统计
+     * 查询前一小时数据,并做数据统计
+     */
+    @Override
+    public void genStatistics() {
+
+        Calendar calendar = Calendar.getInstance();
+        SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+        calendar.setTime(new Date());
+        calendar.set(Calendar.HOUR_OF_DAY, 0);
+        calendar.set(Calendar.MINUTE, 0);
+        calendar.set(Calendar.SECOND, 0);
+
+        Date date0 = calendar.getTime();
+
+        //小时开始时间
+        calendar.setTime(new Date());
+        calendar.set(Calendar.MINUTE, 0);
+        calendar.set(Calendar.SECOND, 0);
+        calendar.set(Calendar.MILLISECOND, 0);
+        //统计时间
+        Date statisticsTime = calendar.getTime();
+
+        //前一小时结束时间
+        calendar.add(Calendar.MILLISECOND, -1);
+        String endTime = dateFormat.format(calendar.getTime());
+
+        //前一小时报验单
+        List<SameDayRealTimeInspectionVo> inspetionList = dao.getInspetion(dateFormat.format(date0), endTime);
+
+        //数据处理
+        analysisDataData(inspetionList, statisticsTime);
+    }
+
+    /**
+     * 数据处理
+     *
+     * @param inspetionList
+     * @param statisticsTime
+     */
+    private void analysisDataData(List<SameDayRealTimeInspectionVo> inspetionList, Date statisticsTime) {
+        ZhcxReprotSameDayRealTimeInspectionStatisticsDo mainEntity = ZhcxReprotSameDayRealTimeInspectionStatisticsDo.builder()
+                .statistictime(statisticsTime)
+                .statisticday(DateUtil.format(statisticsTime, "yyyy-MM-dd"))
+                .appliedqty(inspetionList.size())
+                .executedqty(0)
+                .tobeexecutedqty(0)
+                .receivedqty(0)
+                .conditionreceivedqty(0)
+                .rejectionqty(0)
+                .cancelqty(0)
+                .build();
+        mainEntity.setId(SecurityUtil.getUUID());
+        mainEntity.setDeleted("0");
+
+
+        if(ObjectUtil.isEmpty(inspetionList)) {
+            save(mainEntity);
+            return ;
+        }
+
+        Map<String, ZhcxReprotSameDayRealTimeInspectionStatisticsLocationDo> map = new HashMap<>();
+
+        for(SameDayRealTimeInspectionVo row : inspetionList) {
+
+            ZhcxReprotSameDayRealTimeInspectionStatisticsLocationDo locationDo = map.get(row.getInspectioncontent());
+
+            if(ObjectUtil.isNull(locationDo)) {
+                locationDo = ZhcxReprotSameDayRealTimeInspectionStatisticsLocationDo.builder()
+                        .statistictime(statisticsTime)
+                        .statisticday(DateUtil.format(statisticsTime, "yyyy-MM-dd"))
+                        .appliedqty(0)
+                        .executedqty(0)
+                        .id(SecurityUtil.getUUID())
+                        .tobeexecutedqty(0)
+                        .receivedqty(0)
+                        .conditionreceivedqty(0)
+                        .rejectionqty(0)
+                        .cancelqty(0)
+                        .statisticsid(mainEntity.getId())
+                        .inspectioncontent(row.getInspectioncontent())
+                        .build();
+
+                locationDo.setDeleted("0");
+            }
+
+            locationDo.setAppliedqty(locationDo.getAppliedqty() + 1);
+
+            //报验完成
+            if("30".equals(row.getInspectionstatus())) {
+                //接收
+                if("10".equals(row.getInspectionconclusion())) {
+                    mainEntity.setReceivedqty(mainEntity.getReceivedqty() + 1);
+                    locationDo.setReceivedqty(locationDo.getReceivedqty() + 1);
+                }
+                //拒收
+                else if("20".equals(row.getInspectionconclusion())) {
+                    mainEntity.setRejectionqty(mainEntity.getRejectionqty() + 1);
+                    locationDo.setRejectionqty(locationDo.getRejectionqty() + 1);
+                }
+                //有条件接收
+                else if("30".equals(row.getInspectionconclusion())) {
+                    mainEntity.setConditionreceivedqty(mainEntity.getConditionreceivedqty() + 1);
+                    locationDo.setConditionreceivedqty(locationDo.getConditionreceivedqty() + 1);
+                }
+
+
+                mainEntity.setExecutedqty(mainEntity.getExecutedqty() + 1);
+                locationDo.setExecutedqty(locationDo.getExecutedqty() + 1);
+            }
+            //待报验
+            else if("20".equals(row.getInspectionstatus())) {
+                mainEntity.setTobeexecutedqty(mainEntity.getTobeexecutedqty() + 1);
+                locationDo.setTobeexecutedqty(locationDo.getTobeexecutedqty() + 1);
+            }
+            //取消
+            else if("40".equals(row.getInspectionstatus())) {
+                mainEntity.setCancelqty(mainEntity.getCancelqty() + 1);
+                locationDo.setCancelqty(locationDo.getCancelqty() + 1);
+
+                mainEntity.setExecutedqty(mainEntity.getExecutedqty() + 1);
+                locationDo.setExecutedqty(locationDo.getExecutedqty() + 1);
+            }
+
+            map.put(row.getInspectioncontent(), locationDo);
+        }
+
+        save(mainEntity);
+        locationService.saveBatch(map.values());
+    }
+
+}

+ 8 - 5
business-common/src/main/java/com/rongwei/bscommon/sys/utils/HwSmsUtil.java

@@ -1,6 +1,7 @@
 package com.rongwei.bscommon.sys.utils;
 
 import com.alibaba.fastjson.JSONObject;
+import com.rongwei.rwcommon.utils.StringUtils;
 import org.apache.commons.codec.binary.Hex;
 import org.apache.commons.codec.digest.DigestUtils;
 import org.apache.http.HttpResponse;
@@ -32,26 +33,28 @@ public class HwSmsUtil {
 
     public static void main(String[] args) throws Exception{
 
-        sendSms("[\""+1235+"\"]","13720166098");
+        sendSms(null, "[\""+1235+"\"]","13720166098");
 //        sendSms("[\"17623778642\",\"蓉A-7823\"]","17623778642","8819122535459","6c848255000c4619833ab690e393f906");
 //        sendSms("[\"17623778642\",\"蓉A-7823\",\"2019/12/27\",\"14:00\"]","17623778642","8819122535459","bb13d00d11e043659001a89c72d54cab");
     }
 
     /**
      * 调用短信
-     * @param sender 国内短信签名通道号或国际/港澳台短信通道号
+     * sender 国内短信签名通道号或国际/港澳台短信通道号
      * @param templateId  模板ID
      * @param code  入参
      * @param phone 接收短信手机号
      * @throws Exception
      * @return
      */
-    public static JSONObject sendSms(String code, String phone) throws Exception{
+    public static JSONObject sendSms(String templateId, String code, String phone) throws Exception{
         //必填,请参考"开发准备"获取如下数据,替换为实际值
         String url = "https://smsapi.cn-south-1.myhuaweicloud.com:443/sms/batchSendSms/v1"; //APP接入地址+接口访问URI
         String appKey = "iZA4u69023CpkvGGxrXxrBuNMp1B"; //APP_Key
         String appSecret = "CRZrS3exn54u6xL9he0s7Vi4ihR3"; //APP_Secret
-
+        if (StringUtils.isBlank(templateId)) {
+            templateId = TEMPLATE_ID;
+        }
         //条件必填,国内短信关注,当templateId指定的模板类型为通用模板时生效且必填,必须是已审核通过的,与模板类型一致的签名名称
         //国际/港澳台短信不用关注该参数
         String signature = null; //签名名称
@@ -72,7 +75,7 @@ public class HwSmsUtil {
         String templateParas = "["+code+"]"; //模板变量
 
         //请求Body,不携带签名名称时,signature请填null
-        String body = buildRequestBody(SENDER, receiver, TEMPLATE_ID, templateParas, statusCallBack, signature);
+        String body = buildRequestBody(SENDER, receiver, templateId, templateParas, statusCallBack, signature);
         if (null == body || body.isEmpty()) {
             System.out.println("body is null.");
             return null;

+ 112 - 0
business-entity/src/main/java/com/rongwei/bsentity/domain/ZhcxOutsideInspectionComponentTrackDo.java

@@ -0,0 +1,112 @@
+package com.rongwei.bsentity.domain;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.rongwei.rwcommon.base.BaseDo;
+import java.util.Date;
+import com.baomidou.mybatisplus.annotation.TableField;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+/**
+ * <p>
+ * 外部报验-构件跟踪
+ * </p>
+ *
+ * @author wm
+ * @since 2024-02-05
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@Accessors(chain = true)
+@TableName("ZHCX_OUTSIDE_INSPECTION_COMPONENT_TRACK")
+public class ZhcxOutsideInspectionComponentTrackDo extends BaseDo {
+
+    private static final long serialVersionUID=1L;
+
+    /**
+     * 主键
+     */
+    @TableField("ID")
+    private String id;
+    /**
+     * 租户ID
+     */
+    @TableField("TENANTID")
+    private String tenantid;
+    /**
+     * 扩展预留
+     */
+    @TableField("ROPTION")
+    private String roption;
+    /**
+     * 项目id
+     */
+    @TableField("PROJECTID")
+    private String projectid;
+    /**
+     * 项目工号
+     */
+    @TableField("PROJECTCODE")
+    private String projectcode;
+    /**
+     * 项目名称
+     */
+    @TableField("PROJECTNAME")
+    private String projectname;
+    /**
+     * 构建Id
+     */
+    @TableField("STRUCTUREID")
+    private String structureid;
+    /**
+     * 构件名称
+     */
+    @TableField("STRUCTURENAME")
+    private String structurename;
+    /**
+     * 报验内容id
+     */
+    @TableField("INSPECTIONCONTENTID")
+    private String inspectioncontentid;
+    /**
+     * 报验内容
+     */
+    @TableField("INSPECTIONCONTENT")
+    private String inspectioncontent;
+    /**
+     * 项目机号id
+     */
+    @TableField("PROJECTMACHINEID")
+    private String projectmachineid;
+    /**
+     * 机号
+     */
+    @TableField("MACHINENO")
+    private String machineno;
+    /**
+     * 结构项目机号id
+     */
+    @TableField("STRUCTUREMACHINEID")
+    private String structuremachineid;
+    /**
+     * 结构机号
+     */
+    @TableField("STRUCTUREMACHINENO")
+    private String structuremachineno;
+
+    /**
+     * 分包商id
+     */
+    @TableField("SUBCONTRACTORID")
+    private String subcontractorid;
+
+
+    /**
+     * 分包商挂靠单位id
+     */
+    @TableField("SUBCONTRACTORUNITID")
+    private String subcontractorunitid;
+
+
+}

+ 34 - 3
business-entity/src/main/java/com/rongwei/bsentity/domain/ZhcxOutsideInspectionItpDo.java

@@ -1,14 +1,15 @@
 package com.rongwei.bsentity.domain;
 
-import java.math.BigDecimal;
+import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableName;
 import com.rongwei.rwcommon.base.BaseDo;
-import java.util.Date;
-import com.baomidou.mybatisplus.annotation.TableField;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 import lombok.experimental.Accessors;
 
+import java.math.BigDecimal;
+import java.util.Date;
+
 /**
  * <p>
  * 外部报验-ITP报验
@@ -275,6 +276,36 @@ public class ZhcxOutsideInspectionItpDo extends BaseDo {
      */
     @TableField("INSPECTIONCOMPLATETIME")
     private Date inspectioncomplatetime;
+    /**
+     * 检验室名称
+     */
+    @TableField("LABORATORYNAME")
+    private String laboratoryname;
+    /**
+     * 班组ID
+     */
+    @TableField("TEAMGROUPID")
+    private String teamgroupid;
+    /**
+     * 班组名称
+     */
+    @TableField("TEAMGROUPNAME")
+    private String teamgroupname;
+    /**
+     * 检验室ID
+     */
+    @TableField("LABORATORYID")
+    private String laboratoryid;
+    /**
+     * 班组pathid
+     */
+    @TableField("TEAMGROUPPATHID")
+    private String teamgrouppathid;
+    /**
+     * 检验室pathid
+     */
+    @TableField("LABORATORYPATHID")
+    private String laboratorypathid;
 
 
 }

+ 92 - 0
business-entity/src/main/java/com/rongwei/bsentity/domain/ZhcxReprotSameDayRealTimeInspectionStatisticsDo.java

@@ -0,0 +1,92 @@
+package com.rongwei.bsentity.domain;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.rongwei.rwcommon.base.BaseDo;
+import java.util.Date;
+import com.baomidou.mybatisplus.annotation.TableField;
+import lombok.*;
+import lombok.experimental.Accessors;
+
+/**
+ * <p>
+ * 报表管理-当日全项目实时报验统计
+ * </p>
+ *
+ * @author wm
+ * @since 2024-01-29
+ */
+@Setter
+@Getter
+@NoArgsConstructor
+@AllArgsConstructor
+@Builder
+@EqualsAndHashCode(callSuper = true)
+@Accessors(chain = true)
+@TableName("ZHCX_REPROT_SAME_DAY_REAL_TIME_INSPECTION_STATISTICS")
+public class ZhcxReprotSameDayRealTimeInspectionStatisticsDo extends BaseDo {
+
+    private static final long serialVersionUID=1L;
+
+    /**
+     * 主键
+     */
+    @TableField("ID")
+    private String id;
+    /**
+     * 租户ID
+     */
+    @TableField("TENANTID")
+    private String tenantid;
+    /**
+     * 扩展预留
+     */
+    @TableField("ROPTION")
+    private String roption;
+    /**
+     * 统计时间(小时)
+     */
+    @TableField("STATISTICTIME")
+    private Date statistictime;
+    /**
+     * 统计日期(天,-隔开)
+     */
+    @TableField("STATISTICDAY")
+    private String statisticday;
+    /**
+     * 已申请
+     */
+    @TableField("APPLIEDQTY")
+    private Integer appliedqty;
+    /**
+     * 已执行
+     */
+    @TableField("EXECUTEDQTY")
+    private Integer executedqty;
+    /**
+     * 未执行
+     */
+    @TableField("TOBEEXECUTEDQTY")
+    private Integer tobeexecutedqty;
+    /**
+     * 接收
+     */
+    @TableField("RECEIVEDQTY")
+    private Integer receivedqty;
+    /**
+     * 有条件接收
+     */
+    @TableField("CONDITIONRECEIVEDQTY")
+    private Integer conditionreceivedqty;
+    /**
+     * 拒收
+     */
+    @TableField("REJECTIONQTY")
+    private Integer rejectionqty;
+    /**
+     * 取消
+     */
+    @TableField("CANCELQTY")
+    private Integer cancelqty;
+
+
+}

+ 103 - 0
business-entity/src/main/java/com/rongwei/bsentity/domain/ZhcxReprotSameDayRealTimeInspectionStatisticsLocationDo.java

@@ -0,0 +1,103 @@
+package com.rongwei.bsentity.domain;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.rongwei.rwcommon.base.BaseDo;
+import java.util.Date;
+import com.baomidou.mybatisplus.annotation.TableField;
+import lombok.*;
+import lombok.experimental.Accessors;
+
+/**
+ * <p>
+ * 报表管理-当日全项目实时报验统计-检查地点
+ * </p>
+ *
+ * @author wm
+ * @since 2024-01-29
+ */
+@Setter
+@Getter
+@NoArgsConstructor
+@AllArgsConstructor
+@Builder
+@EqualsAndHashCode(callSuper = true)
+@Accessors(chain = true)
+@TableName("ZHCX_REPROT_SAME_DAY_REAL_TIME_INSPECTION_STATISTICS_LOCATION")
+public class ZhcxReprotSameDayRealTimeInspectionStatisticsLocationDo extends BaseDo {
+
+    private static final long serialVersionUID=1L;
+
+    /**
+     * 主键
+     */
+    @TableField("ID")
+    private String id;
+    /**
+     * 租户ID
+     */
+    @TableField("TENANTID")
+    private String tenantid;
+    /**
+     * 扩展预留
+     */
+    @TableField("ROPTION")
+    private String roption;
+    /**
+     * 统计id
+     */
+    @TableField("STATISTICSID")
+    private String statisticsid;
+    /**
+     * 统计时间(小时)
+     */
+    @TableField("STATISTICTIME")
+    private Date statistictime;
+    /**
+     * 统计日期(天,-隔开)
+     */
+    @TableField("STATISTICDAY")
+    private String statisticday;
+    /**
+     * 已申请
+     */
+    @TableField("APPLIEDQTY")
+    private Integer appliedqty;
+    /**
+     * 已执行
+     */
+    @TableField("EXECUTEDQTY")
+    private Integer executedqty;
+    /**
+     * 未执行
+     */
+    @TableField("TOBEEXECUTEDQTY")
+    private Integer tobeexecutedqty;
+    /**
+     * 接收
+     */
+    @TableField("RECEIVEDQTY")
+    private Integer receivedqty;
+    /**
+     * 有条件接收
+     */
+    @TableField("CONDITIONRECEIVEDQTY")
+    private Integer conditionreceivedqty;
+    /**
+     * 拒收
+     */
+    @TableField("REJECTIONQTY")
+    private Integer rejectionqty;
+    /**
+     * 取消
+     */
+    @TableField("CANCELQTY")
+    private Integer cancelqty;
+
+    /**
+     * 报验内容
+     */
+    @TableField("INSPECTIONCONTENT")
+    private String inspectioncontent;
+
+
+}

+ 23 - 0
business-entity/src/main/java/com/rongwei/bsentity/vo/report/SameDayRealTimeInspectionVo.java

@@ -0,0 +1,23 @@
+package com.rongwei.bsentity.vo.report;
+
+import lombok.*;
+
+@Setter
+@Getter
+@NoArgsConstructor
+@AllArgsConstructor
+@Builder
+public class SameDayRealTimeInspectionVo {
+
+    private String id;
+
+    private String inspectionstatus;
+
+    private String inspectioncontent;
+
+    private String inspectionlocation;
+
+    private String dispatchstatus;
+
+    private String inspectionconclusion;
+}

+ 12 - 0
business-server/src/main/java/com/rongwei/bsserver/controller/ZhcxApiController.java

@@ -39,4 +39,16 @@ public class ZhcxApiController {
         R r = zhcxApiService.sendCode(map);
         return r;
     }
+
+    @RequestMapping("/gaiffp")
+    public R getAccountInfoForForgotPassword(@RequestBody Map<String,Object> map){
+        R r = zhcxApiService.getAccountInfoForForgotPassword(map);
+        return r;
+    }
+
+    @RequestMapping("/repw")
+    public R resetPassword(@RequestBody Map<String,Object> map){
+        R r = zhcxApiService.resetPassword(map);
+        return r;
+    }
 }

+ 16 - 0
business-server/src/main/java/com/rongwei/bsserver/controller/ZhcxOutsideInspectionItpController.java

@@ -2,6 +2,7 @@ package com.rongwei.bsserver.controller;
 
 
 import com.rongwei.bscommon.sys.service.ZhcxOutsideInspectionItpService;
+import com.rongwei.bscommon.sys.service.ZhcxReprotSameDayRealTimeInspectionStatisticsService;
 import com.rongwei.bsentity.dto.ReInspectionRequest;
 import com.rongwei.rwcommon.base.R;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -27,6 +28,9 @@ public class ZhcxOutsideInspectionItpController {
     @Autowired
     private ZhcxOutsideInspectionItpService service;
 
+    @Autowired
+    private ZhcxReprotSameDayRealTimeInspectionStatisticsService reprotSameDayRealTimeInspectionStatisticsService;
+
     @RequestMapping("/splitOrder")
     public R copyNodesSave(@RequestBody Map<String, String> map){
         service.splitOrder(map.get("id"));
@@ -38,5 +42,17 @@ public class ZhcxOutsideInspectionItpController {
         service.reInspection(res.getId(), res.getMasterSlaveUpdate());
         return R.ok();
     }
+
+    /**
+     * 生成前一个小时报验单数据
+     *
+     * @return
+     */
+    @PostMapping("/genLastHourInspection")
+    public R genLastHourInspection(){
+        reprotSameDayRealTimeInspectionStatisticsService.genStatistics();
+        return R.ok();
+    }
+
 }