Bläddra i källkod

推送报送平台接口

wangming 1 år sedan
förälder
incheckning
8926a537da

+ 15 - 0
business-common/src/main/java/com/rongwei/bscommon/sys/dao/ZhcxOutsideInspectionItpDao.java

@@ -2,8 +2,12 @@ package com.rongwei.bscommon.sys.dao;
 
 import com.rongwei.bsentity.domain.ZhcxOutsideInspectionItpDo;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.rongwei.bsentity.dto.OutsideInspactionSyncDto;
+import com.rongwei.bsentity.dto.OutsideInspactionSyncReqquest;
+import org.apache.ibatis.annotations.Select;
 import org.apache.ibatis.annotations.Update;
 
+import java.util.List;
 import java.util.Map;
 
 /**
@@ -24,4 +28,15 @@ public interface ZhcxOutsideInspectionItpDao extends BaseMapper<ZhcxOutsideInspe
     @Update("update INCONTROL.ZHCX_OUTSIDE_INSPECTION_ITP i, INCONTROL.ZHCX_OUTSIDE_INSPECTION_ITP_SUPERVISION_DISPATCH d set i.INSPECTIONCOUNT = ifnull(i.INSPECTIONCOUNT, 0) + 1" +
             " where i.ID = d.ITPID and d.INSPECTIONCONCLUSION = '20' and i.ID = #{id}")
     void updateInspectionCount(Map<String, String> map);
+
+
+    @Select("SELECT\n" +
+            "\titp.*,zoiisd.SUPERVISION, zoiisd.INSPECTIONCONCLUSION, zoiisd.REFUSEREASON\n" +
+            "FROM\n" +
+            "\tZHCX_OUTSIDE_INSPECTION_ITP itp\n" +
+            "JOIN ZHCX_OUTSIDE_INSPECTION_ITP_SUPERVISION_DISPATCH zoiisd ON\n" +
+            "\tzoiisd.ITPID = itp.ID\n" +
+            "WHERE INSPECTIONCOMPLATETIME BETWEEN #{startTime} AND #{#{endTime}}\n" +
+            "AND NOT EXISTS (SELECT * FROM ZHCX_OUTSIDE_INSPECTION_SYNC_RECORD r WHERE r.ITPID = itp.ID)")
+    List<OutsideInspactionSyncDto> getInspection(OutsideInspactionSyncReqquest req);
 }

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

@@ -0,0 +1,16 @@
+package com.rongwei.bscommon.sys.dao;
+
+import com.rongwei.bsentity.domain.ZhcxOutsideInspectionSyncRecordDo;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ * 外部报验-报验同步记录 Mapper 接口
+ * </p>
+ *
+ * @author wm
+ * @since 2024-05-15
+ */
+public interface ZhcxOutsideInspectionSyncRecordDao extends BaseMapper<ZhcxOutsideInspectionSyncRecordDo> {
+
+}

+ 8 - 0
business-common/src/main/java/com/rongwei/bscommon/sys/service/ZhcxOutsideInspectionItpService.java

@@ -2,6 +2,7 @@ package com.rongwei.bscommon.sys.service;
 
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.rongwei.bsentity.domain.ZhcxOutsideInspectionItpDo;
+import com.rongwei.bsentity.dto.OutsideInspactionSyncReqquest;
 import com.rongwei.bsentity.dto.ReInspectionRequest;
 import com.rongwei.bsentity.vo.OperOutsideInspectionVo;
 import com.rongwei.bsentity.vo.ZhcxOutsideExportVo;
@@ -42,5 +43,12 @@ public interface ZhcxOutsideInspectionItpService extends IService<ZhcxOutsideIns
     void reInspection(String id, MasterSlaveUpdateVo masterSlaveUpdate);
 
     int downloadFile(ZhcxOutsideExportVo zhcxOutsideExportVo, HttpServletResponse response) throws FileNotFoundException;
+
+    /**
+     * 推送到报送平台
+     *
+     * @param req
+     */
+    void sync2SubmissionPlatform(OutsideInspactionSyncReqquest req);
 }
 

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

@@ -0,0 +1,16 @@
+package com.rongwei.bscommon.sys.service;
+
+import com.rongwei.bsentity.domain.ZhcxOutsideInspectionSyncRecordDo;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ * 外部报验-报验同步记录 服务类
+ * </p>
+ *
+ * @author wm
+ * @since 2024-05-15
+ */
+public interface ZhcxOutsideInspectionSyncRecordService extends IService<ZhcxOutsideInspectionSyncRecordDo> {
+
+}

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

@@ -19,9 +19,7 @@ import com.rongwei.bscommon.sys.utils.ZhcxCommon;
 import com.rongwei.bsentity.domain.*;
 import com.rongwei.bscommon.sys.dao.ZhcxOutsideInspectionItpDao;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.rongwei.bsentity.dto.NotifyDto;
-import com.rongwei.bsentity.dto.ReInspectionRequest;
-import com.rongwei.bsentity.dto.ZhcxItpProjectNodeStateResultDto;
+import com.rongwei.bsentity.dto.*;
 import com.rongwei.bsentity.vo.*;
 import com.rongwei.commonservice.serial.service.SysSerialNumberService;
 import com.rongwei.rwadmincommon.system.domain.PagePartDo;
@@ -1049,6 +1047,16 @@ public class ZhcxOutsideInspectionItpServiceImpl extends ServiceImpl<ZhcxOutside
         return 2;
     }
 
+    /**
+     * 推送到报送平台
+     *
+     * @param req
+     */
+    @Override
+    public void sync2SubmissionPlatform(OutsideInspactionSyncReqquest req) {
+        List<OutsideInspactionSyncDto> inspection = dao.getInspection(req);
+    }
+
     /**
      * 将doc文档输出到response中传给前端
      *

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

@@ -0,0 +1,20 @@
+package com.rongwei.bscommon.sys.service.impl;
+
+import com.rongwei.bsentity.domain.ZhcxOutsideInspectionSyncRecordDo;
+import com.rongwei.bscommon.sys.dao.ZhcxOutsideInspectionSyncRecordDao;
+import com.rongwei.bscommon.sys.service.ZhcxOutsideInspectionSyncRecordService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ * 外部报验-报验同步记录 服务实现类
+ * </p>
+ *
+ * @author wm
+ * @since 2024-05-15
+ */
+@Service
+public class ZhcxOutsideInspectionSyncRecordServiceImpl extends ServiceImpl<ZhcxOutsideInspectionSyncRecordDao, ZhcxOutsideInspectionSyncRecordDo> implements ZhcxOutsideInspectionSyncRecordService {
+
+}

+ 181 - 0
business-entity/src/main/java/com/rongwei/bsentity/dto/OutsideInspactionSyncDto.java

@@ -0,0 +1,181 @@
+package com.rongwei.bsentity.dto;
+
+import com.baomidou.mybatisplus.annotation.FieldFill;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import lombok.*;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+@Setter
+@Getter
+@NoArgsConstructor
+@AllArgsConstructor
+@Builder
+public class OutsideInspactionSyncDto {
+
+    @TableField("ID")
+    @JsonIgnoreProperties
+    private String id;
+
+    /**
+     * 项目工号
+     */
+    @TableField("PROJECTCODE")
+    @JsonProperty(value = "projectnumber")
+    private String projectcode;
+    /**
+     * 项目名称
+     */
+    @TableField("PROJECTNAME")
+    @JsonProperty(value = "projectname")
+    private String projectname;
+
+    /**
+     * 结构机号
+     */
+    @TableField("STRUCTUREMACHINENO")
+    @JsonProperty(value = "stampnumber")
+    private String structuremachineno;
+
+    /**
+     * 构件名称
+     */
+    @TableField("STRUCTURENAME")
+    @JsonProperty(value = "componentname")
+    private String structurename;
+
+    /**
+     * 报验类型
+     */
+    @TableField("INSPECTIONTYPE")
+    @JsonProperty(value = "jobs")
+    private String inspectiontype;
+
+    /**
+     * 报验数量
+     */
+    @TableField("QTY")
+    @JsonProperty(value = "count")
+    private BigDecimal qty;
+
+    /**
+     * 机号
+     */
+    @TableField("MACHINENO")
+    @JsonProperty(value = "totalinstallationnumber")
+    private String machineno;
+
+    /**
+     * 外协
+     */
+    @TableField("ISSUPP")
+    @JsonProperty(value = "outsourcing")
+    private String issupp;
+
+    /**
+     * 报验内容
+     */
+    @TableField("INSPECTIONCONTENT")
+    @JsonProperty(value = "reportcontent")
+    private String inspectioncontent;
+
+    /**
+     * 一级单位
+     */
+    @JsonProperty(value = "base")
+    private String base;
+
+    /**
+     * 二级单位
+     */
+    @JsonProperty(value = "twolevel")
+    private String twolevel;
+
+    /**
+     * 车间
+     */
+    @TableField("WORKSHOPNAME")
+    @JsonProperty(value = "threelevel")
+    private String workshopname;
+
+    /**
+     * 分包商/劳务班组
+     */
+    @TableField("SUBCONTRACTORNAME")
+    @JsonProperty(value = "fourbase")
+    private String subcontractorname;
+
+
+    /**
+     * 递交
+     */
+    @TableField("COMPANYSHORTNAME")
+    @JsonProperty(value = "supervisingcompany")
+    private String companyshortname;
+
+    /**
+     * 监理用户
+     */
+    @TableField("SUPERVISION")
+    @JsonProperty(value = "supervisingname")
+    private String supervision;
+
+    /**
+     * 报验次数
+     */
+    @TableField("INSPECTIONCOUNT")
+    @JsonProperty(value = "numberinternalinspections")
+    private Integer inspectioncount;
+
+    /**
+     * 预约报验时间
+     */
+    @TableField("RESERVATIONINSPECTIONTIME")
+    @JsonProperty(value = "reportinspectiontime")
+    private Date reservationinspectiontime;
+
+    /**
+     * 报验结论
+     */
+    @TableField("INSPECTIONCONCLUSION")
+    @JsonProperty(value = "reportresults")
+    private String inspectionconclusion;
+
+    //创建时间
+    @TableField(value = "CREATEDATE", fill = FieldFill.INSERT)
+    private Date createdate;
+
+    @TableField(value = "CREATEUSERNAME", fill = FieldFill.INSERT)
+    private String createusername;
+
+    /**
+     * 检验员
+     */
+    @TableField("CHECKERNAME")
+    @JsonProperty(value = "checkername")
+    private String checkername;
+
+    /**
+     * 自检员
+     */
+    @TableField("SELFTESTER")
+    @JsonProperty(value = "selfinspector")
+    private String selftester;
+
+    /**
+     * 外部报验单号
+     */
+    @TableField("INSPECTIONCODE")
+    @JsonProperty(value = "serialnumber")
+    private String inspectioncode;
+
+    /**
+     * 检验员备注(拒收原因,取消原因)
+     */
+    @TableField("REFUSEREASON")
+    @JsonProperty(value = "reasonrejection")
+    private String refusereason;
+}

+ 23 - 0
business-entity/src/main/java/com/rongwei/bsentity/dto/OutsideInspactionSyncReqquest.java

@@ -0,0 +1,23 @@
+package com.rongwei.bsentity.dto;
+
+import lombok.*;
+
+import java.util.Date;
+
+@Setter
+@Getter
+@NoArgsConstructor
+@AllArgsConstructor
+@Builder
+public class OutsideInspactionSyncReqquest {
+
+    /**
+     * 开始时间
+     */
+    private Date startTime;
+
+    /**
+     * 结束时间
+     */
+    private Date endTime;
+}