Merge remote-tracking branch 'origin/main'
This commit is contained in:
@@ -47,4 +47,9 @@ public class OaFeedback extends BaseEntity {
|
|||||||
|
|
||||||
private String title;
|
private String title;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目id
|
||||||
|
*/
|
||||||
|
private Long projectId;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,14 +1,12 @@
|
|||||||
package com.ruoyi.oa.domain.bo;
|
package com.ruoyi.oa.domain.bo;
|
||||||
|
|
||||||
import com.ruoyi.common.core.validate.AddGroup;
|
|
||||||
import com.ruoyi.common.core.validate.EditGroup;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
import javax.validation.constraints.*;
|
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
import com.ruoyi.common.core.domain.BaseEntity;
|
import com.ruoyi.common.core.domain.BaseEntity;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 问题反馈业务对象 oa_feedback
|
* 问题反馈业务对象 oa_feedback
|
||||||
@@ -44,4 +42,19 @@ public class OaFeedbackBo extends BaseEntity {
|
|||||||
private Long state;
|
private Long state;
|
||||||
|
|
||||||
private String title;
|
private String title;
|
||||||
|
|
||||||
|
private String projectName;
|
||||||
|
|
||||||
|
private Long projectId;
|
||||||
|
/**
|
||||||
|
* 区间开始时间
|
||||||
|
*/
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private Date startTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 区间结束时间
|
||||||
|
*/
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private Date endTime;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,11 +2,11 @@ package com.ruoyi.oa.domain.vo;
|
|||||||
|
|
||||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||||
import com.alibaba.excel.annotation.ExcelProperty;
|
import com.alibaba.excel.annotation.ExcelProperty;
|
||||||
import com.ruoyi.common.annotation.ExcelDictFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import com.ruoyi.common.convert.ExcelDictConvert;
|
import com.ruoyi.common.core.domain.BaseEntity;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import java.util.Date;
|
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -17,7 +17,7 @@ import java.util.Date;
|
|||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@ExcelIgnoreUnannotated
|
@ExcelIgnoreUnannotated
|
||||||
public class OaFeedbackVo {
|
public class OaFeedbackVo extends BaseEntity {
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
@@ -50,7 +50,39 @@ public class OaFeedbackVo {
|
|||||||
@ExcelProperty(value = "")
|
@ExcelProperty(value = "")
|
||||||
private Long state;
|
private Long state;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 标题
|
||||||
|
*/
|
||||||
private String title;
|
private String title;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目id
|
||||||
|
*/
|
||||||
|
private Long projectId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目名
|
||||||
|
*/
|
||||||
|
private String projectName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目代号
|
||||||
|
*/
|
||||||
|
private String projectCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目编号
|
||||||
|
*/
|
||||||
|
private String projectNum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建者
|
||||||
|
*/
|
||||||
|
private String createBy;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Date createTime;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,4 +24,6 @@ public interface OaFeedbackMapper extends BaseMapperPlus<OaFeedbackMapper, OaFee
|
|||||||
void insertItem(Long feedbackId);
|
void insertItem(Long feedbackId);
|
||||||
|
|
||||||
int delItem(@Param("feedbackId") Long feedbackId, @Param("userId") Long userId);
|
int delItem(@Param("feedbackId") Long feedbackId, @Param("userId") Long userId);
|
||||||
|
|
||||||
|
OaFeedbackVo selectVoByIdPlus(Long feedbackId);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -188,10 +188,13 @@ public class OaExpressServiceImpl implements IOaExpressService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Boolean getRefreshExpress(List<Long> expressIds) throws IOException {
|
public Boolean getRefreshExpress(List<Long> expressIds) throws IOException {
|
||||||
|
System.out.println("12313123123");
|
||||||
for (Long expressId : expressIds) {
|
for (Long expressId : expressIds) {
|
||||||
OaExpressVo oaExpressVo = baseMapper.selectVoById(expressId);
|
OaExpressVo oaExpressVo = baseMapper.selectVoById(expressId);
|
||||||
String expressType = oaExpressVo.getExpressType();
|
String expressType = oaExpressVo.getExpressType();
|
||||||
|
System.out.println(expressType);
|
||||||
if (expressType.equals("SF") && oaExpressVo.getStatus() ==1L) {
|
if (expressType.equals("SF") && oaExpressVo.getStatus() ==1L) {
|
||||||
|
|
||||||
// 校验为顺丰则进入此位置更新状态
|
// 校验为顺丰则进入此位置更新状态
|
||||||
String result = SfRouteQueryUtil.queryRoute(oaExpressVo.getExpressCode(), oaExpressVo.getOwnerPhone() != null ? oaExpressVo.getOwnerPhone() : oaExpressVo.getSupplyPhone());
|
String result = SfRouteQueryUtil.queryRoute(oaExpressVo.getExpressCode(), oaExpressVo.getOwnerPhone() != null ? oaExpressVo.getOwnerPhone() : oaExpressVo.getSupplyPhone());
|
||||||
OaExpressVo oaExpressVo1 = SfRouteQueryUtil.parseData(result);
|
OaExpressVo oaExpressVo1 = SfRouteQueryUtil.parseData(result);
|
||||||
|
|||||||
@@ -6,8 +6,6 @@ import com.ruoyi.common.helper.LoginHelper;
|
|||||||
import com.ruoyi.common.utils.StringUtils;
|
import com.ruoyi.common.utils.StringUtils;
|
||||||
import com.ruoyi.common.core.page.TableDataInfo;
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
import com.ruoyi.common.core.domain.PageQuery;
|
import com.ruoyi.common.core.domain.PageQuery;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.val;
|
import lombok.val;
|
||||||
@@ -39,7 +37,7 @@ public class OaFeedbackServiceImpl implements IOaFeedbackService {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public OaFeedbackVo queryById(Long feedbackId){
|
public OaFeedbackVo queryById(Long feedbackId){
|
||||||
return baseMapper.selectVoById(feedbackId);
|
return baseMapper.selectVoByIdPlus(feedbackId);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -77,6 +75,15 @@ public class OaFeedbackServiceImpl implements IOaFeedbackService {
|
|||||||
Map<String, Object> params = bo.getParams();
|
Map<String, Object> params = bo.getParams();
|
||||||
QueryWrapper<OaFeedback> lqw = Wrappers.query();
|
QueryWrapper<OaFeedback> lqw = Wrappers.query();
|
||||||
lqw.eq("ofi.user_id", LoginHelper.getUserId());
|
lqw.eq("ofi.user_id", LoginHelper.getUserId());
|
||||||
|
lqw.eq(bo.getProjectId()!= null, "oaf.project_id",bo.getProjectId());
|
||||||
|
lqw.like(StringUtils.isNotBlank(bo.getTitle()), "oaf.title", bo.getTitle());
|
||||||
|
lqw.like(StringUtils.isNotBlank(bo.getProjectName()), "sop.project_name", bo.getProjectName());
|
||||||
|
lqw.like(StringUtils.isNotBlank(bo.getProjectName()), "sop.project_code", bo.getProjectName());
|
||||||
|
lqw.like(StringUtils.isNotBlank(bo.getProjectName()), "sop.project_num", bo.getProjectName());
|
||||||
|
if (bo.getStartTime() != null && bo.getEndTime() != null) {
|
||||||
|
lqw.between("oaf.create_time", bo.getStartTime(), bo.getEndTime());
|
||||||
|
}
|
||||||
|
lqw.orderByDesc("oaf.create_time");
|
||||||
return lqw;
|
return lqw;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -88,6 +95,7 @@ public class OaFeedbackServiceImpl implements IOaFeedbackService {
|
|||||||
|
|
||||||
OaFeedback add = BeanUtil.toBean(bo, OaFeedback.class);
|
OaFeedback add = BeanUtil.toBean(bo, OaFeedback.class);
|
||||||
validEntityBeforeSave(add);
|
validEntityBeforeSave(add);
|
||||||
|
add.setCreateBy(LoginHelper.getNickName());
|
||||||
boolean flag = baseMapper.insert(add) > 0;
|
boolean flag = baseMapper.insert(add) > 0;
|
||||||
if (flag) {
|
if (flag) {
|
||||||
bo.setFeedbackId(add.getFeedbackId());
|
bo.setFeedbackId(add.getFeedbackId());
|
||||||
|
|||||||
@@ -76,8 +76,6 @@ public class SfRouteQueryUtil {
|
|||||||
formParams.append("&accessToken=").append(URLEncoder.encode(accessToken, "UTF-8"));
|
formParams.append("&accessToken=").append(URLEncoder.encode(accessToken, "UTF-8"));
|
||||||
formParams.append("&msgData=").append(URLEncoder.encode(msgDataStr, "UTF-8"));
|
formParams.append("&msgData=").append(URLEncoder.encode(msgDataStr, "UTF-8"));
|
||||||
String formBody = formParams.toString();
|
String formBody = formParams.toString();
|
||||||
System.out.println(formBody);
|
|
||||||
|
|
||||||
// 4. 发送POST请求
|
// 4. 发送POST请求
|
||||||
return doPost(API_URL, formBody);
|
return doPost(API_URL, formBody);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
@@ -116,6 +114,7 @@ public class SfRouteQueryUtil {
|
|||||||
*/
|
*/
|
||||||
private static String doPost(String urlStr, String formBody) throws Exception {
|
private static String doPost(String urlStr, String formBody) throws Exception {
|
||||||
URL url = new URL(urlStr);
|
URL url = new URL(urlStr);
|
||||||
|
|
||||||
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
|
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
|
||||||
conn.setRequestMethod("POST");
|
conn.setRequestMethod("POST");
|
||||||
conn.setRequestProperty("Content-Type", "application/x-www-form-urlencoded;charset=UTF-8");
|
conn.setRequestProperty("Content-Type", "application/x-www-form-urlencoded;charset=UTF-8");
|
||||||
@@ -131,6 +130,7 @@ public class SfRouteQueryUtil {
|
|||||||
while ((line = br.readLine()) != null) {
|
while ((line = br.readLine()) != null) {
|
||||||
sb.append(line);
|
sb.append(line);
|
||||||
}
|
}
|
||||||
|
System.out.println(sb);
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -44,11 +44,33 @@
|
|||||||
oaf.content,
|
oaf.content,
|
||||||
oaf.status,
|
oaf.status,
|
||||||
oaf.title,
|
oaf.title,
|
||||||
|
oaf.create_time,
|
||||||
|
oaf.create_by,
|
||||||
|
oaf.project_id,
|
||||||
|
sop.project_name,
|
||||||
|
sop.project_code,
|
||||||
|
sop.project_num,
|
||||||
ofi.status as state
|
ofi.status as state
|
||||||
from oa_feedback oaf
|
from oa_feedback oaf
|
||||||
left join oa_feedback_item ofi on oaf.feedback_id = ofi.feedback_id
|
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}
|
${ew.getCustomSqlSegment}
|
||||||
</select>
|
</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>
|
</mapper>
|
||||||
|
|||||||
Reference in New Issue
Block a user