Commit 71837951 authored by wangzb's avatar wangzb

feature-wzb :派增导入修复

parent 5e190c2e
......@@ -49,5 +49,15 @@ public class FeedBackDetail implements Serializable {
@Schema(description ="续签代办表关联主键")
private String contractAlertId;
/**
* 续签代办表关联主键
*/
@Schema(description ="申请编号")
private String applyNo;
@Schema(description ="是否反馈")
private Integer isFeedback;
private static final long serialVersionUID = 1L;
}
\ No newline at end of file
......@@ -320,4 +320,8 @@ public class TEmpContractAlert extends BaseEntity {
*/
@TableField(exist = false)
private Date auditTime;
@Schema(description = "申请编码")
private String applyNo;
}
......@@ -47,4 +47,7 @@ public class ChangeFeedBackAllVo {
@Schema(description = "反馈时间")
private Date feedbackTime;
@Schema(description = "申请编号")
private String applyNo;
}
......@@ -196,9 +196,9 @@ public class TEmpContractAlertController {
* @return {@link R}
*/
@Operation(summary = "获取反馈日志详情", description = "获取反馈日志详情")
@GetMapping("/getFeedbackDetail/{id}" )
public R getFeedbackDetail(@PathVariable("id" ) String id) {
return R.ok(tEmpContractAlertService.getFeedbackDetail(id));
@GetMapping("/getFeedbackDetail/{applyNo}" )
public R getFeedbackDetail(@PathVariable("applyNo" ) String applyNo) {
return R.ok(tEmpContractAlertService.getFeedbackDetail(applyNo));
}
......
......@@ -11,6 +11,9 @@ import java.util.List;
@Mapper
public interface FeedBackDetailMapper extends BaseMapper<FeedBackDetail> {
List<FeedBackDetail> getDetail(@Param("id") String id);
List<FeedBackDetail> getDetail(@Param("applyNo") String applyNo);
List<FeedBackDetail> getAll();
FeedBackDetail findByApplyNo(@Param("applyNo") String applyNo);
}
......@@ -35,4 +35,5 @@ public interface TEmpContractAlertMapper extends BaseMapper<TEmpContractAlert> {
void truncate();
boolean changeFeedBackAll(@Param("changeFeedBackAllVo") ChangeFeedBackAllVo changeFeedBackAllVo);
}
......@@ -54,7 +54,7 @@ public interface TEmpContractAlertService extends IService<TEmpContractAlert> {
boolean changeFeedBackAll(ChangeFeedBackAllVo changeFeedBackAllVo);
List<FeedBackDetail> getFeedbackDetail(String id);
List<FeedBackDetail> getFeedbackDetail(String applyNo);
}
......@@ -365,12 +365,27 @@ public class TEmpContractAlertServiceImpl extends ServiceImpl<TEmpContractAlertM
}else {
alert.setFirstAlertTime(new Date());
}
List<FeedBackDetail> list = feedbackDetailMapper.getAll();
for (FeedBackDetail feedBackDetail : list) {
FeedBackDetail feedBackDetail1 = feedbackDetailMapper.findByApplyNo(feedBackDetail.getApplyNo());
if (Objects.equals(feedBackDetail.getApplyNo(), contract.getApplyNo())) {
if (feedBackDetail1.getIsFeedback().equals(CommonConstants.ONE_INT)) {
alert.setIsFeedback(CommonConstants.ONE_INT);
alert.setFeedbackDetail(feedBackDetail1.getFeedbackDetail());
alert.setFeedbackReason(feedBackDetail1.getFeedbackReason());
alert.setFeedbackPerson(feedBackDetail1.getFeedbackPerson());
alert.setFeedbackTime(feedBackDetail1.getFeedbackTime());
}
} else {
alert.setIsFeedback(CommonConstants.ZERO_INT);
}
}
alert.setApplyNo(contract.getApplyNo());
// 2023-4-3 09:38:21 hgw 添加
alert.setUnitId(contract.getCustomerId());
alert.setUnitName(contract.getSubjectUnit());
alert.setUnitNo(contract.getUnitNo());
alert.setEmpPhone(employeeInfo.getEmpPhone());
alert.setCreateBy(contract.getCreateBy());
alert.setCreateName(contract.getCreateName());
alert.setContractId(contract.getId());
......@@ -418,9 +433,10 @@ public class TEmpContractAlertServiceImpl extends ServiceImpl<TEmpContractAlertM
FeedBackDetail feedbackDetail = new FeedBackDetail();
feedbackDetail.setFeedbackPerson(user.getNickname());
feedbackDetail.setFeedbackTime(DateTime.now());
feedbackDetail.setContractAlertId(changeFeedBackAllVo.getIds()[i]);
feedbackDetail.setApplyNo(changeFeedBackAllVo.getIds()[i]);
feedbackDetail.setFeedbackReason(changeFeedBackAllVo.getFeedbackReason());
feedbackDetail.setFeedbackDetail(changeFeedBackAllVo.getFeedbackDetail());
feedbackDetail.setIsFeedback(CommonConstants.ONE_INT);
feedbackDetailMapper.insert(feedbackDetail);
}
changeFeedBackAllVo.setIsFeedback(CommonConstants.ONE_INTEGER);
......@@ -430,8 +446,8 @@ public class TEmpContractAlertServiceImpl extends ServiceImpl<TEmpContractAlertM
}
@Override
public List<FeedBackDetail> getFeedbackDetail(String id) {
return feedbackDetailMapper.getDetail(id);
public List<FeedBackDetail> getFeedbackDetail(String applyNo) {
return feedbackDetailMapper.getDetail(applyNo);
}
......
......@@ -7,6 +7,8 @@
<result column="FEEDBACK_TIME" jdbcType="TIMESTAMP" property="feedbackTime" />
<result column="FEEDBACK_REASON" jdbcType="VARCHAR" property="feedbackReason" />
<result column="FEEDBACK_DETAIL" jdbcType="VARCHAR" property="feedbackDetail" />
<result column="APPLY_NO" jdbcType="VARCHAR" property="applyNo" />
<result column="IS_FEEDBACK" jdbcType="VARCHAR" property="isFeedback" />
<result column="CONTRACT_ALERT_ID" jdbcType="VARCHAR" property="contractAlertId" />
</resultMap>
<sql id="Base_Column_List">
......@@ -16,7 +18,18 @@
<select id="getDetail" resultType="com.yifu.cloud.plus.v1.yifu.archives.entity.FeedBackDetail">
SELECT *
FROM feed_back_detail a
where a.CONTRACT_ALERT_ID=#{id}
where a.APPLY_NO=#{applyNo}
order by FEEDBACK_TIME DESC
</select>
<select id="getAll" resultType="com.yifu.cloud.plus.v1.yifu.archives.entity.FeedBackDetail">
SELECT *
FROM feed_back_detail a
</select>
<select id="findByApplyNo" resultType="com.yifu.cloud.plus.v1.yifu.archives.entity.FeedBackDetail">
SELECT *
FROM feed_back_detail a
where a.APPLY_NO=#{applyNo}
ORDER BY FEEDBACK_TIME desc LIMIT 1
</select>
</mapper>
......@@ -54,6 +54,7 @@
<result property="feedbackReason" column="FEEDBACK_REASON"/>
<result property="feedbackDetail" column="FEEDBACK_DATAIL"/>
<result property="contractId" column="CONTRACT_ID"/>
<result property="applyNo" column="APPLY_NO"/>
</resultMap>
......@@ -65,11 +66,10 @@
update t_emp_contract_alert a
set a.IS_FEEDBACK=#{changeFeedBackAllVo.isFeedback},a.FEEDBACK_REASON=#{changeFeedBackAllVo.feedbackReason},a.FEEDBACK_DETAIL=#{changeFeedBackAllVo.feedbackDetail},
a.FEEDBACK_PERSON=#{changeFeedBackAllVo.feedbackPerson},a.FEEDBACK_TIME=#{changeFeedBackAllVo.feedbackTime}
where a.ID in
where a.APPLY_NO in
<foreach item="idStr" index="index" collection="changeFeedBackAllVo.ids" open="(" separator="," close=")">
#{idStr}
</foreach>
</update>
</mapper>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment