ANDRU-PC\Andru
2023-09-14 fd9b0cb657b4712c733288cfb37716e4c3a9b6a8
phi_platform_user/src/main/java/com/hx/phip/controller/deduction/DeductionController.java
@@ -7,6 +7,7 @@
import com.hx.mybatisTool.SqlSentence;
import com.hx.phiappt.common.DeductionSingleConstants;
import com.hx.phiappt.constants.tool.PerformanceInfoTool;
import com.hx.phiappt.constants.tool.user.UserProjectTool;
import com.hx.phiappt.dao.mapper.IntroProjectManualMapper;
import com.hx.phiappt.dao.mapper.NotificationLogMapper;
import com.hx.phiappt.dao.mapper.ProjectMapper;
@@ -957,25 +958,8 @@
                data.put("projectId", project.getId());
                data.put("projectName", project.getName());
                data.put("postoperativeCardUrl", "");
                sql.setLength(0);
                sqlValues.clear();
                sqlValues.put("isDel", BaseEntity.NO);
                sqlValues.put("type", IntroProjectManual.TYPE_POSTOPERATIVE_TIP_CARD);
                sql.append(" SELECT * FROM intro_project_manual WHERE isDel=#{m.isDel} AND type=#{m.type} ");
                // 查询项目信息
                sqlValues.put("skuName", "%" + project.getName() + "%");
                String searchInfo = " AND skuName LIKE #{m.skuName} ";
                // 判断id是否为空
                if (!StringUtils.isEmpty(project.getProjectTypeId())) {
                    ProjectGeneral projectGeneral = commonService.selectOneByKey(ProjectGeneralMapper.class, project.getProjectTypeId());
                    if (projectGeneral != null) {
                        sqlValues.put("spuName", "%" + projectGeneral.getName() + "%");
                        searchInfo = " AND (skuName LIKE #{m.skuName} OR spuName LIKE #{m.spuName}) ";
                    }
                }
                sql.append(searchInfo).append(" ORDER BY createTime DESC LIMIT 1");
                sqlSentence.sqlSentence(sql.toString(), sqlValues);
                IntroProjectManual introProjectManual = commonService.selectOne(IntroProjectManualMapper.class, sqlSentence);
                // 获取术后提示卡信息
                IntroProjectManual introProjectManual = UserProjectTool.getIntroProjectManualByProject(commonService, project);
                if (introProjectManual != null && !StringUtils.isEmpty(introProjectManual.getContent())) {
                    data.put("postoperativeCardUrl", introProjectManual.getContent());
                }