xiaof 3 жил өмнө
parent
commit
17c345b8a8

+ 10 - 0
distributed-print-business/src/main/java/com/qmth/distributed/print/business/bean/params/ExamCardParams.java

@@ -10,6 +10,7 @@ import com.qmth.distributed.print.business.enums.MakeMethodEnum;
 public class ExamCardParams {
 
     private Long id;
+    private Long orgId;
     private CardStatusEnum status;
     private String examTaskId;
     private String courseCode;
@@ -31,6 +32,15 @@ public class ExamCardParams {
         this.id = id;
     }
 
+
+    public Long getOrgId() {
+        return orgId;
+    }
+
+    public void setOrgId(Long orgId) {
+        this.orgId = orgId;
+    }
+
     public CardStatusEnum getStatus() {
         return status;
     }

+ 1 - 0
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/BasicCardRuleServiceImpl.java

@@ -99,6 +99,7 @@ public class BasicCardRuleServiceImpl extends ServiceImpl<BasicCardRuleMapper, B
                 throw ExceptionResultEnum.ERROR.exception("题卡规则名称已存在");
             }
             cardRule.setId(SystemConstant.getDbUuid());
+            cardRule.setOrgId(sysUser.getOrgId());
             cardRule.setCreateId(sysUser.getId());
             cardRule.setCreateTime(System.currentTimeMillis());
             isSuccess = this.save(cardRule);

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

@@ -8,6 +8,7 @@ import com.qmth.distributed.print.business.mapper.BasicTemplateOrgMapper;
 import com.qmth.distributed.print.business.service.BasicTemplateOrgService;
 import com.qmth.distributed.print.business.enums.TemplateTypeEnum;
 import com.qmth.teachcloud.common.entity.SysOrg;
+import com.qmth.teachcloud.common.util.ServletUtil;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
@@ -43,9 +44,11 @@ public class BasicTemplateOrgServiceImpl extends ServiceImpl<BasicTemplateOrgMap
 
     @Override
     public void saveBatch(TemplateTypeEnum type, Long ruleId, Long[] orgIds, Long createId) {
+        Long schoolId = Long.valueOf(ServletUtil.getRequestHeaderSchoolId().toString());
         List<BasicTemplateOrg> list = new ArrayList<>();
         for (Long orgId : orgIds) {
             BasicTemplateOrg basicTemplateOrg = new BasicTemplateOrg();
+            basicTemplateOrg.setSchoolId(schoolId);
             basicTemplateOrg.setType(type);
             basicTemplateOrg.setRuleId(ruleId);
             basicTemplateOrg.setOrgId(orgId);

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

@@ -98,6 +98,7 @@ public class BasicTemplateServiceImpl extends ServiceImpl<BasicTemplateMapper, B
                 throw ExceptionResultEnum.ERROR.exception("模板名称已存在");
             }
             template.setId(SystemConstant.getDbUuid());
+            template.setOrgId(sysUser.getOrgId());
             template.setCreateId(sysUser.getId());
             template.setCreateTime(System.currentTimeMillis());
             isSuccess = this.save(template);
@@ -135,6 +136,7 @@ public class BasicTemplateServiceImpl extends ServiceImpl<BasicTemplateMapper, B
                 ExamCard examCard = examCardService.getOneByTemplateId(template.getId());
                 ExamCardParams examCardParams = new ExamCardParams();
                 examCardParams.setId(examCard == null ? null : examCard.getId());
+                examCardParams.setOrgId(sysUser.getOrgId());
                 examCardParams.setTitle(template.getName());
                 examCardParams.setMakeMethod(MakeMethodEnum.SELECT);// 默认SELECT
                 examCardParams.setType(CardTypeEnum.GENERIC); // 默认GENERIC

+ 1 - 0
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/ExamCardServiceImpl.java

@@ -79,6 +79,7 @@ public class ExamCardServiceImpl extends ServiceImpl<ExamCardMapper, ExamCard> i
             examCard = new ExamCard();
             examCard.setId(SystemConstant.getDbUuid());
             examCard.setSchoolId(schoolId);
+            examCard.setOrgId(user.getOrgId());
             examCard.setCourseCode(examCardParams.getCourseCode());
             examCard.setCourseName(examCardParams.getCourseName());
             examCard.setTitle(examCardParams.getTitle());

+ 1 - 1
distributed-print/src/main/java/com/qmth/distributed/print/api/ExamPrintPlanSyncController.java

@@ -64,7 +64,7 @@ public class ExamPrintPlanSyncController {
      * @return
      */
     @ApiOperation(value = "印刷计划合并管理-合并推送-云阅卷考试ID列表")
-    @RequestMapping(value = "/list_relate_id", method = RequestMethod.POST)
+    @RequestMapping(value = "/list_relate_ids", method = RequestMethod.POST)
     @ApiResponses({@ApiResponse(code = 200, message = "查询成功", response = Result.class)})
     public Result findPrintPlanPage() {
         Long schoolId = Long.valueOf(ServletUtil.getRequestHeaderSchoolId().toString());