Pārlūkot izejas kodu

同步到报送平台

wangming 1 gadu atpakaļ
vecāks
revīzija
fbb8f68ec1

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

@@ -33,16 +33,16 @@ public interface ZhcxOutsideInspectionItpDao extends BaseMapper<ZhcxOutsideInspe
     @Select("<script>" +
             "SELECT  " +
             " itp.*,zoiisd.SUPERVISION, zoiisd.INSPECTIONCONCLUSION, zoiisd.REFUSEREASON,  " +
-            " zipn.ISSUPP, zsm.\"TYPE\" AS subcontractortype, so.FULLNAME as threelevel, zsm.COMPANY_NAME as fourbase," +
-            " bo.FULLNAME as companyname " +
+            " zipn.ISSUPP, zsm.\"TYPE\" AS subcontractortype, " +
+            " om.BSFIRSTORGID ,om.BSFIRSTORGNAME,om.BSFIRSTORGSHORTNAME,om.BSSECONDORGID ," +
+            " om.BSSECONDORGNAME,om.BSSECONDORGSHORTNAME,om.BSTHIRDORGID ,om.BSTHIRDORGNAME," +
+            " om.BSTHIRDORGSHORTNAME,om.BSFOURTHORGID ,om.BSFOURTHORGNAME,om.BSFOURTHORGSHORTNAME " +
             "FROM  " +
             " ZHCX_OUTSIDE_INSPECTION_ITP itp  " +
             "JOIN ZHCX_OUTSIDE_INSPECTION_ITP_SUPERVISION_DISPATCH zoiisd ON zoiisd.ITPID = itp.ID " +
             "LEFT JOIN ZHCX_ITP_PROJECT_NODES zipn on zipn.ID = itp.INSPECTIONCONTENTID  " +
             "LEFT JOIN ZHCX_SUBCONTRACTOR_MANAGE zsm ON zsm.ID = itp.SUBCONTRACTORID " +
-            "left join SYS_ORGANIZATION so on so.ID = itp.WORKSHOPID " +
-            "left join SYS_ORGANIZATION co on co.ID = itp.DEPARTID " +
-            "left join SYS_ORGANIZATION bo on bo.ID = co.PID " +
+            "left join BS_ORGANIZATION_MAPPING om on om.SUBCONTRACTUNITID = itp.SUBCONTRACTORUNITID " +
             "<where>" +
             "<if test='startTime != null and endTime != null'>" +
             "   AND RESERVATIONINSPECTIONTIME BETWEEN #{startTime} AND #{endTime}  and LIFECYCLE = '10'" +

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

@@ -1216,8 +1216,6 @@ public class ZhcxOutsideInspectionItpServiceImpl extends ServiceImpl<ZhcxOutside
                 sync.setIssupp("n");
             }
 
-            sync.setBase(sync.getCompanyname());
-
             //同步信息
             ZhcxOutsideInspectionSyncRecordDo record = new ZhcxOutsideInspectionSyncRecordDo();
             record.setId(SecurityUtil.getUUID());

+ 101 - 19
business-entity/src/main/java/com/rongwei/bsentity/dto/OutsideInspactionSyncDto.java

@@ -1,7 +1,9 @@
 package com.rongwei.bsentity.dto;
 
+import com.alibaba.fastjson.annotation.JSONField;
 import com.baomidou.mybatisplus.annotation.FieldFill;
 import com.baomidou.mybatisplus.annotation.TableField;
+import com.fasterxml.jackson.annotation.JsonFormat;
 import com.fasterxml.jackson.annotation.JsonIgnore;
 import com.fasterxml.jackson.annotation.JsonProperty;
 import lombok.*;
@@ -17,6 +19,7 @@ import java.util.Date;
 public class OutsideInspactionSyncDto {
 
     @TableField("ID")
+    @JSONField(serialize = false)
     @JsonIgnore
     private String id;
 
@@ -24,12 +27,14 @@ public class OutsideInspactionSyncDto {
      * 项目工号
      */
     @TableField("PROJECTCODE")
+    @JSONField(name = "projectnumber")
     @JsonProperty(value = "projectnumber")
     private String projectcode;
     /**
      * 项目名称
      */
     @TableField("PROJECTNAME")
+    @JSONField(name = "projectname")
     @JsonProperty(value = "projectname")
     private String projectname;
 
@@ -37,6 +42,7 @@ public class OutsideInspactionSyncDto {
      * 结构机号
      */
     @TableField("STRUCTUREMACHINENO")
+    @JSONField(name = "stampnumber")
     @JsonProperty(value = "stampnumber")
     private String structuremachineno;
 
@@ -44,6 +50,7 @@ public class OutsideInspactionSyncDto {
      * 构件名称
      */
     @TableField("STRUCTURENAME")
+    @JSONField(name = "componentname")
     @JsonProperty(value = "componentname")
     private String structurename;
 
@@ -51,6 +58,7 @@ public class OutsideInspactionSyncDto {
      * 报验类型
      */
     @TableField("INSPECTIONTYPE")
+    @JSONField(name = "jobs")
     @JsonProperty(value = "jobs")
     private String inspectiontype;
 
@@ -58,6 +66,7 @@ public class OutsideInspactionSyncDto {
      * 报验数量
      */
     @TableField("QTY")
+    @JSONField(name = "count")
     @JsonProperty(value = "count")
     private BigDecimal qty;
 
@@ -65,6 +74,7 @@ public class OutsideInspactionSyncDto {
      * 机号
      */
     @TableField("MACHINENO")
+    @JSONField(name = "totalinstallationnumber")
     @JsonProperty(value = "totalinstallationnumber")
     private String machineno;
 
@@ -72,6 +82,7 @@ public class OutsideInspactionSyncDto {
      * 外协
      */
     @TableField("ISSUPP")
+    @JSONField(name = "outsourcing")
     @JsonProperty(value = "outsourcing")
     private String issupp;
 
@@ -79,26 +90,21 @@ public class OutsideInspactionSyncDto {
      * 报验内容
      */
     @TableField("INSPECTIONCONTENT")
+    @JSONField(name = "reportcontent")
     @JsonProperty(value = "reportcontent")
     private String inspectioncontent;
 
-    /**
-     * 一级单位
-     */
-    @JsonProperty(value = "base")
-    private String base;
-
-    /**
-     * 二级单位
-     */
-    @JsonProperty(value = "twolevel")
-    @TableField("DEPARTNAME")
-    private String departName;
+//    /**
+//     * 二级单位
+//     */
+//    @TableField("DEPARTNAME")
+//    private String departName;
 
     /**
      * 车间
      */
     @TableField("WORKSHOPID")
+    @JSONField(serialize = false)
     @JsonIgnore
     private String workshopid;
 
@@ -106,27 +112,28 @@ public class OutsideInspactionSyncDto {
 //     * 车间
 //     */
 //    @TableField("WORKSHOPNAME")
-//    @JsonProperty(value = "threelevel")
+//    @JSONField(name = "threelevel")
 //    private String workshopname;
 
     /**
      * 车间
      */
-    @TableField("threelevel")
-    @JsonProperty(value = "threelevel")
-    private String threelevel;
+//    @TableField("threelevel")
+//    @JSONField(name = "threelevel")
+//    private String threelevel;
 
     /**
      * 分包商/劳务班组
      */
-    @TableField("fourbase")
-    @JsonProperty(value = "fourbase")
-    private String fourbase;
+//    @TableField("fourbase")
+//    @JSONField(name = "fourbase")
+//    private String fourbase;
 
     /**
      * 递交
      */
     @TableField("COMPANYSHORTNAME")
+    @JSONField(name = "supervisingcompany")
     @JsonProperty(value = "supervisingcompany")
     private String companyshortname;
 
@@ -134,6 +141,7 @@ public class OutsideInspactionSyncDto {
      * 监理用户
      */
     @TableField("SUPERVISION")
+    @JSONField(name = "supervisingname")
     @JsonProperty(value = "supervisingname")
     private String supervision;
 
@@ -141,6 +149,7 @@ public class OutsideInspactionSyncDto {
      * 报验次数
      */
     @TableField("INSPECTIONCOUNT")
+    @JSONField(name = "numberinternalinspections")
     @JsonProperty(value = "numberinternalinspections")
     private Integer inspectioncount;
 
@@ -148,18 +157,23 @@ public class OutsideInspactionSyncDto {
      * 预约报验时间
      */
     @TableField("RESERVATIONINSPECTIONTIME")
+    @JSONField(name = "reportinspectiontime", format = "yyyy-MM-dd HH:mm:ss")
     @JsonProperty(value = "reportinspectiontime")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     private Date reservationinspectiontime;
 
     /**
      * 报验结论
      */
     @TableField("INSPECTIONCONCLUSION")
+    @JSONField(name = "reportresults")
     @JsonProperty(value = "reportresults")
     private String inspectionconclusion;
 
     //创建时间
     @TableField(value = "CREATEDATE", fill = FieldFill.INSERT)
+    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     private Date createdate;
 
     @TableField(value = "CREATEUSERNAME", fill = FieldFill.INSERT)
@@ -169,6 +183,7 @@ public class OutsideInspactionSyncDto {
      * 检验员
      */
     @TableField("CHECKERNAME")
+    @JSONField(name = "inspector")
     @JsonProperty(value = "inspector")
     private String checkername;
 
@@ -176,6 +191,7 @@ public class OutsideInspactionSyncDto {
      * 自检员
      */
     @TableField("SELFTESTER")
+    @JSONField(name = "selfinspector")
     @JsonProperty(value = "selfinspector")
     private String selftester;
 
@@ -183,6 +199,7 @@ public class OutsideInspactionSyncDto {
      * 外部报验单号
      */
     @TableField("INSPECTIONCODE")
+    @JSONField(name = "serialnumber")
     @JsonProperty(value = "serialnumber")
     private String inspectioncode;
 
@@ -190,19 +207,84 @@ public class OutsideInspactionSyncDto {
      * 检验员备注(拒收原因,取消原因)
      */
     @TableField("REFUSEREASON")
+    @JSONField(name = "reasonrejection")
     @JsonProperty(value = "reasonrejection")
     private String refusereason;
 
     /**
      * 分包商类型
      */
+    
+    @JSONField(serialize = false)
     @JsonIgnore
     private String subcontractortype;
 
     @TableField("LAUNCHTYPE")
+    @JSONField(serialize = false)
     @JsonIgnore
     private String launchtype;
 
+    @JSONField(serialize = false)
     @JsonIgnore
     private String companyname;
+
+    @TableField("BSFIRSTORGID")
+    @JSONField(serialize = false)
+    @JsonIgnore
+    private String bsfirstorgid;;
+
+    @TableField("BSFIRSTORGNAME")
+    @JSONField(name = "base")
+    @JsonProperty(value = "base")
+    private String bsfirstorgname;;
+
+    @TableField("BSFIRSTORGSHORTNAME")
+    @JSONField(serialize = false)
+    @JsonIgnore
+    private String bsfirstorgshortname;;
+
+    @TableField("BSSECONDORGID")
+    @JSONField(serialize = false)
+    @JsonIgnore
+    private String bssecondorgid;;
+
+    @TableField("BSSECONDORGNAME")
+    @JSONField(name = "twolevel")
+    @JsonProperty(value = "twolevel")
+    private String bssecondorgname;;
+
+    @TableField("BSSECONDORGSHORTNAME")
+    @JSONField(serialize = false)
+    @JsonIgnore
+    private String bssecondorgshortname;;
+
+    @TableField("BSTHIRDORGID")
+    @JSONField(serialize = false)
+    @JsonIgnore
+    private String bsthirdorgid;;
+
+    @TableField("BSTHIRDORGNAME")
+    @JSONField(name = "threelevel")
+    @JsonProperty(value = "threelevel")
+    private String bsthirdorgname;;
+
+    @TableField("BSTHIRDORGSHORTNAME")
+    @JSONField(serialize = false)
+    @JsonIgnore
+    private String bsthirdorgshortname;;
+
+    @TableField("BSFOURTHORGID")
+    @JSONField(serialize = false)
+    @JsonIgnore
+    private String bsfourthorgid;;
+
+    @TableField("BSFOURTHORGNAME")
+    @JSONField(name = "fourbase")
+    @JsonProperty(value = "fourbase")
+    private String bsfourthorgname;;
+
+    @TableField("BSFOURTHORGSHORTNAME")
+    @JSONField(serialize = false)
+    @JsonIgnore
+    private String bsfourthorgshortname;
 }

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

@@ -3,10 +3,8 @@ package com.rongwei.bsentity.dto;
 import com.fasterxml.jackson.annotation.JsonFormat;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
-import jdk.nashorn.internal.ir.annotations.Ignore;
 import lombok.*;
 import org.springframework.format.annotation.DateTimeFormat;
-import springfox.documentation.annotations.ApiIgnore;
 
 import java.util.Date;
 import java.util.List;