Commit d8532726 authored by fangxinjiang's avatar fangxinjiang

员工合同续签反馈优化

parent 2fdfaaa4
...@@ -185,6 +185,7 @@ public class TEmpContractAlertController { ...@@ -185,6 +185,7 @@ public class TEmpContractAlertController {
* @param changeFeedBackAllVo * @param changeFeedBackAllVo
* @return {@link R} * @return {@link R}
*/ */
@SysLog("员工合同续签待办-批量反馈")
@Operation(summary = "批量反馈", description = "批量反馈") @Operation(summary = "批量反馈", description = "批量反馈")
@PostMapping("/changeFeedbackAll") @PostMapping("/changeFeedbackAll")
public R<Boolean> changeFeedBackAll(@RequestBody ChangeFeedBackAllVo changeFeedBackAllVo) { public R<Boolean> changeFeedBackAll(@RequestBody ChangeFeedBackAllVo changeFeedBackAllVo) {
......
...@@ -47,6 +47,7 @@ import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils; ...@@ -47,6 +47,7 @@ import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.log4j.Log4j2; import lombok.extern.log4j.Log4j2;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.servlet.ServletOutputStream; import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
...@@ -437,18 +438,24 @@ public class TEmpContractAlertServiceImpl extends ServiceImpl<TEmpContractAlertM ...@@ -437,18 +438,24 @@ public class TEmpContractAlertServiceImpl extends ServiceImpl<TEmpContractAlertM
alert.setHandleStatus(CommonConstants.ZERO_STRING); alert.setHandleStatus(CommonConstants.ZERO_STRING);
alertMap.put(alert.getEmpIdcard()+CommonConstants.DOWN_LINE_STRING+alert.getProjectNo(),alert); alertMap.put(alert.getEmpIdcard()+CommonConstants.DOWN_LINE_STRING+alert.getProjectNo(),alert);
} }
@Transactional(value = "empContractAlertManager" ,rollbackFor = {Exception.class})
@Override @Override
public boolean changeFeedBackAll(ChangeFeedBackAllVo changeFeedBackAllVo) { public boolean changeFeedBackAll(ChangeFeedBackAllVo changeFeedBackAllVo) {
YifuUser user = SecurityUtils.getUser(); YifuUser user = SecurityUtils.getUser();
FeedBackDetail feedbackDetail;
List<FeedBackDetail> details = new ArrayList<>();
for (int i = 0; i < changeFeedBackAllVo.getIds().length; i++) { for (int i = 0; i < changeFeedBackAllVo.getIds().length; i++) {
FeedBackDetail feedbackDetail = new FeedBackDetail(); feedbackDetail = new FeedBackDetail();
feedbackDetail.setFeedbackPerson(user.getNickname()); feedbackDetail.setFeedbackPerson(user.getNickname());
feedbackDetail.setFeedbackTime(DateTime.now()); feedbackDetail.setFeedbackTime(DateTime.now());
feedbackDetail.setApplyNo(changeFeedBackAllVo.getIds()[i]); feedbackDetail.setApplyNo(changeFeedBackAllVo.getIds()[i]);
feedbackDetail.setFeedbackReason(changeFeedBackAllVo.getFeedbackReason()); feedbackDetail.setFeedbackReason(changeFeedBackAllVo.getFeedbackReason());
feedbackDetail.setFeedbackDetail(changeFeedBackAllVo.getFeedbackDetail()); feedbackDetail.setFeedbackDetail(changeFeedBackAllVo.getFeedbackDetail());
feedbackDetail.setIsFeedback(CommonConstants.ONE_INT); feedbackDetail.setIsFeedback(CommonConstants.ONE_INT);
feedbackDetailMapper.insert(feedbackDetail); details.add(feedbackDetail);
}
if (Common.isNotEmpty(details)){
feedBackDetailService.saveBatch(details);
} }
changeFeedBackAllVo.setIsFeedback(CommonConstants.ONE_INTEGER); changeFeedBackAllVo.setIsFeedback(CommonConstants.ONE_INTEGER);
changeFeedBackAllVo.setFeedbackPerson(user.getNickname()); changeFeedBackAllVo.setFeedbackPerson(user.getNickname());
...@@ -467,6 +474,7 @@ public class TEmpContractAlertServiceImpl extends ServiceImpl<TEmpContractAlertM ...@@ -467,6 +474,7 @@ public class TEmpContractAlertServiceImpl extends ServiceImpl<TEmpContractAlertM
* @Author: hgw * @Author: hgw
* @Date: 2023/7/17 9:47 * @Date: 2023/7/17 9:47
**/ **/
@Transactional(value = "empContractAlertManager-batchUpdate" ,rollbackFor = {Exception.class})
@Override @Override
public R<List<EmpContractAlertUpdateVO>> batchUpdate(InputStream inputStream) { public R<List<EmpContractAlertUpdateVO>> batchUpdate(InputStream inputStream) {
List<EmpContractAlertUpdateVO> errorMessageList = new ArrayList<>(); List<EmpContractAlertUpdateVO> errorMessageList = new ArrayList<>();
......
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