caozixuan 4 年之前
父節點
當前提交
c3fe85290a

+ 3 - 3
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/ExamDetailServiceImpl.java

@@ -196,15 +196,15 @@ public class ExamDetailServiceImpl extends ServiceImpl<ExamDetailMapper, ExamDet
         response.setHeader("Content-Disposition", "inline;filename=" + URLEncoder.encode(fileName, SystemConstant.CHARSET_NAME) + DEFALUT_EXT);
         response.setContentType(DEFALUT_CONTENT_TYPE);
         HSSFSheet sheet = wb.createSheet(cacheService.schoolCache(schoolId).getName() + "考务数据模板");
-        sheet.setDefaultRowHeight((short) (2 * 256));
-//        sheet.setColumnWidth(0, 50 * 160);
 
         HSSFFont font = wb.createFont();
-        font.setFontHeightInPoints((short) 16);
+        font.setFontHeightInPoints((short) 11);
+        font.setFontName("宋体"); //什么字体
 
         HSSFRow row = sheet.createRow(0);
         HSSFCellStyle style = wb.createCellStyle();
         style.setAlignment(HorizontalAlignment.CENTER);
+        style.setFont(font);
 
         for (int i = 0; i < fieldsNameList.size(); i++) {
             HSSFCell cell = row.createCell(i);

+ 2 - 1
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/TBTaskServiceImpl.java

@@ -217,12 +217,13 @@ public class TBTaskServiceImpl extends ServiceImpl<TBTaskMapper, TBTask> impleme
      */
     public TBTask saveTaskCommon(BasicAttachment basicAttachment, TaskTypeEnum taskTypeEnum, Map map) {
         SysUser requestUser = (SysUser) ServletUtil.getRequestUser();
+
         TBTask tbTask = new TBTask(taskTypeEnum,
                 TaskStatusEnum.INIT,
                 Objects.nonNull(basicAttachment) ? basicAttachment.getName() : null,
                 Objects.nonNull(basicAttachment) ? basicAttachment.getPath() : null,
                 requestUser.getId(),
-                requestUser.getSchoolId());
+                Long.parseLong(ServletUtil.getRequestHeaderSchoolId().toString()));
         map.computeIfAbsent(SystemConstant.TASK, v -> tbTask);
         map.computeIfAbsent(SystemConstant.USER, v -> requestUser);
         return tbTask;

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

@@ -40,10 +40,18 @@
             basic_template_org org
                 INNER JOIN
             basic_template tmp ON org.rule_id = tmp.id
-        WHERE (tmp.type = 'VARIABLE' OR tmp.type = 'ORDINARY') AND org.org_id IN
-        <foreach collection="orgIds" item="item" index="index" open="(" separator="," close=")">
-            #{item}
-        </foreach>
+        <where>
+            AND (tmp.type = 'VARIABLE' OR tmp.type = 'ORDINARY')
+        <if test="orgIds.size() == 0">
+            AND org.org_id IN (null)
+        </if>
+            <if test="orgIds.size() > 0">
+                AND org.org_id IN
+                <foreach collection="orgIds" item="item" index="index" open="(" separator="," close=")">
+                    #{item}
+                </foreach>
+            </if>
+        </where>
     </select>
 
 </mapper>