瀏覽代碼

Merge remote-tracking branch 'origin/dev' into dev

wangliang 4 年之前
父節點
當前提交
e7c2151306

+ 9 - 36
distributed-print-business/src/main/java/com/qmth/distributed/print/business/bean/result/TemplatePrintInfoResult.java

@@ -12,16 +12,16 @@ import io.swagger.annotations.ApiModelProperty;
  * @Date: 2021-04-05
  */
 public class TemplatePrintInfoResult {
-    @JsonSerialize(using = ToStringSerializer.class)
-    @ApiModelProperty(value = "关联表id")
-    private Long templateOrgId;
+//    @JsonSerialize(using = ToStringSerializer.class)
+//    @ApiModelProperty(value = "关联表id")
+//    private Long templateOrgId;
 
-    @ApiModelProperty(value = "关联表印品类型")
-    private TemplateTypeEnum templateOrgType;
+//    @ApiModelProperty(value = "关联表印品类型")
+//    private TemplateTypeEnum templateOrgType;
 
-    @JsonSerialize(using = ToStringSerializer.class)
-    @ApiModelProperty(value = "机构id")
-    private Long orgId;
+//    @JsonSerialize(using = ToStringSerializer.class)
+//    @ApiModelProperty(value = "机构id")
+//    private Long orgId;
 
     @JsonSerialize(using = ToStringSerializer.class)
     @ApiModelProperty(value = "模板id")
@@ -50,30 +50,6 @@ public class TemplatePrintInfoResult {
     @ApiModelProperty(value = "模板备注")
     private String remark;
 
-    public Long getTemplateOrgId() {
-        return templateOrgId;
-    }
-
-    public void setTemplateOrgId(Long templateOrgId) {
-        this.templateOrgId = templateOrgId;
-    }
-
-    public TemplateTypeEnum getTemplateOrgType() {
-        return templateOrgType;
-    }
-
-    public void setTemplateOrgType(TemplateTypeEnum templateOrgType) {
-        this.templateOrgType = templateOrgType;
-    }
-
-    public Long getOrgId() {
-        return orgId;
-    }
-
-    public void setOrgId(Long orgId) {
-        this.orgId = orgId;
-    }
-
     public Long getTemplateId() {
         return templateId;
     }
@@ -141,10 +117,7 @@ public class TemplatePrintInfoResult {
     @Override
     public String toString() {
         return "TemplatePrintInfoResult{" +
-                "templateOrgId=" + templateOrgId +
-                ", templateOrgType=" + templateOrgType +
-                ", orgId=" + orgId +
-                ", templateId=" + templateId +
+                "templateId=" + templateId +
                 ", schoolId=" + schoolId +
                 ", templateName='" + templateName + '\'' +
                 ", templateType=" + templateType +

+ 2 - 0
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/ExamPrintPlanServiceImpl.java

@@ -115,6 +115,8 @@ public class ExamPrintPlanServiceImpl extends ServiceImpl<ExamPrintPlanMapper, E
 
         //3.关联template和template_org表 查询出来orgIds所包含的所有模板并组装
         List<TemplatePrintInfoResult> templateInfoList = basicTemplateOrgService.findTemplateInfoByOrgIds(orgIds);
+        templateInfoList = templateInfoList.stream().distinct().collect(Collectors.toList());
+        System.out.println(JSONObject.toJSONString(templateInfoList));
         Map<String, Object> result = new HashMap<>();
 
         // 变量印品

+ 1 - 4
distributed-print-business/src/main/resources/mapper/BasicTemplateOrgMapper.xml

@@ -28,10 +28,7 @@
 
     <select id="templateListByOrgIds" resultType="com.qmth.distributed.print.business.bean.result.TemplatePrintInfoResult">
         SELECT
-            org.id as templateOrgId,
-            org.type as templateOrgType,
-            org.org_id as orgId,
-            tmp.id as templateId,
+            DISTINCT (tmp.id) as templateId,
             tmp.school_id as schoolId,
             tmp.name as templateName,
             tmp.type as templateType,