Browse Source

fix:查询可打卡sop增加 课程名称

caozixuan 1 year ago
parent
commit
cb743f025f

+ 5 - 1
sop-api/src/main/java/com/qmth/sop/server/api/TBDingController.java

@@ -63,6 +63,9 @@ public class TBDingController {
     @Resource
     @Resource
     TBServiceService tbServiceService;
     TBServiceService tbServiceService;
 
 
+    @Resource
+    TBCrmDetailService tbCrmDetailService;
+
     @ApiOperation(value = "考勤明细")
     @ApiOperation(value = "考勤明细")
     @RequestMapping(value = "/detail", method = RequestMethod.POST)
     @RequestMapping(value = "/detail", method = RequestMethod.POST)
     @ApiResponses({ @ApiResponse(code = 200, message = "查询成功", response = TBDing.class) })
     @ApiResponses({ @ApiResponse(code = 200, message = "查询成功", response = TBDing.class) })
@@ -248,13 +251,14 @@ public class TBDingController {
                     }
                     }
                     List<SopInfoResult> sopInfo = new ArrayList<>();
                     List<SopInfoResult> sopInfo = new ArrayList<>();
                     for (String sopNo : sopNoList) {
                     for (String sopNo : sopNoList) {
+                        TBCrmDetail tbCrmDetail = tbCrmDetailService.findBySopNo(sopNo);
                         SopInfoResult result = new SopInfoResult();
                         SopInfoResult result = new SopInfoResult();
                         result.setSopNo(sopNo);
                         result.setSopNo(sopNo);
                         result.setCrmNo(tbCrm.getCrmNo());
                         result.setCrmNo(tbCrm.getCrmNo());
                         result.setCrmName(tbCrm.getName());
                         result.setCrmName(tbCrm.getName());
                         result.setCustomId(crmProjectResult.getCustomId());
                         result.setCustomId(crmProjectResult.getCustomId());
                         result.setCustomName(crmProjectResult.getCustomName());
                         result.setCustomName(crmProjectResult.getCustomName());
-                        result.setCourseName(crmProjectResult.getCourseName());
+                        result.setCourseName(tbCrmDetail.getCourseName());
                         ProductTypeEnum productTypeEnum = crmProjectResult.getCustomType();
                         ProductTypeEnum productTypeEnum = crmProjectResult.getCustomType();
                         if (Objects.nonNull(productTypeEnum)) {
                         if (Objects.nonNull(productTypeEnum)) {
                             result.setCustomType(productTypeEnum);
                             result.setCustomType(productTypeEnum);