新增问题反馈绑定项目id

This commit is contained in:
2025-08-16 19:54:11 +08:00
parent 9093400922
commit 21ff8705ce
8 changed files with 62 additions and 3 deletions

View File

@@ -47,4 +47,9 @@ public class OaFeedback extends BaseEntity {
private String title;
/**
* 项目id
*/
private Long projectId;
}

View File

@@ -44,4 +44,8 @@ public class OaFeedbackBo extends BaseEntity {
private Long state;
private String title;
private String projectName;
private Long projectId;
}

View File

@@ -50,7 +50,31 @@ public class OaFeedbackVo {
@ExcelProperty(value = "")
private Long state;
/**
* 标题
*/
private String title;
/**
* 项目id
*/
private Long projectId;
/**
* 项目名
*/
private String projectName;
/**
* 项目代号
*/
private String projectCode;
/**
* 项目编号
*/
private String projectNum;
}

View File

@@ -24,4 +24,6 @@ public interface OaFeedbackMapper extends BaseMapperPlus<OaFeedbackMapper, OaFee
void insertItem(Long feedbackId);
int delItem(@Param("feedbackId") Long feedbackId, @Param("userId") Long userId);
OaFeedbackVo selectVoByIdPlus(Long feedbackId);
}

View File

@@ -188,10 +188,13 @@ public class OaExpressServiceImpl implements IOaExpressService {
@Override
public Boolean getRefreshExpress(List<Long> expressIds) throws IOException {
System.out.println("12313123123");
for (Long expressId : expressIds) {
OaExpressVo oaExpressVo = baseMapper.selectVoById(expressId);
String expressType = oaExpressVo.getExpressType();
System.out.println(expressType);
if (expressType.equals("SF") && oaExpressVo.getStatus() ==1L) {
// 校验为顺丰则进入此位置更新状态
String result = SfRouteQueryUtil.queryRoute(oaExpressVo.getExpressCode(), oaExpressVo.getOwnerPhone() != null ? oaExpressVo.getOwnerPhone() : oaExpressVo.getSupplyPhone());
OaExpressVo oaExpressVo1 = SfRouteQueryUtil.parseData(result);

View File

@@ -39,7 +39,7 @@ public class OaFeedbackServiceImpl implements IOaFeedbackService {
*/
@Override
public OaFeedbackVo queryById(Long feedbackId){
return baseMapper.selectVoById(feedbackId);
return baseMapper.selectVoByIdPlus(feedbackId);
}
/**
@@ -77,6 +77,7 @@ public class OaFeedbackServiceImpl implements IOaFeedbackService {
Map<String, Object> params = bo.getParams();
QueryWrapper<OaFeedback> lqw = Wrappers.query();
lqw.eq("ofi.user_id", LoginHelper.getUserId());
lqw.orderByDesc("oaf.create_time");
return lqw;
}

View File

@@ -76,8 +76,6 @@ public class SfRouteQueryUtil {
formParams.append("&accessToken=").append(URLEncoder.encode(accessToken, "UTF-8"));
formParams.append("&msgData=").append(URLEncoder.encode(msgDataStr, "UTF-8"));
String formBody = formParams.toString();
System.out.println(formBody);
// 4. 发送POST请求
return doPost(API_URL, formBody);
} catch (Exception e) {
@@ -116,6 +114,7 @@ public class SfRouteQueryUtil {
*/
private static String doPost(String urlStr, String formBody) throws Exception {
URL url = new URL(urlStr);
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.setRequestMethod("POST");
conn.setRequestProperty("Content-Type", "application/x-www-form-urlencoded;charset=UTF-8");
@@ -131,6 +130,7 @@ public class SfRouteQueryUtil {
while ((line = br.readLine()) != null) {
sb.append(line);
}
System.out.println(sb);
return sb.toString();
}
} else {

View File

@@ -44,11 +44,31 @@
oaf.content,
oaf.status,
oaf.title,
oaf.project_id,
sop.project_name,
sop.project_code,
sop.project_num,
ofi.status as state
from oa_feedback oaf
left join oa_feedback_item ofi on oaf.feedback_id = ofi.feedback_id
left join sys_oa_project sop on sop.project_id = oaf.project_id
${ew.getCustomSqlSegment}
</select>
<select id="selectVoByIdPlus" resultType="com.ruoyi.oa.domain.vo.OaFeedbackVo">
select
oaf.feedback_id,
oaf.content,
oaf.status,
oaf.title,
oaf.project_id,
sop.project_name,
sop.project_code,
sop.project_num
from oa_feedback oaf
left join sys_oa_project sop on sop.project_id = oaf.project_id
where oaf.feedback_id = #{feedbackId}
</select>
</mapper>