Browse Source

修改月还计提推凭证

master
fanzongzhe0036 3 months ago
parent
commit
307b399067
  1. 90
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanbuckleapply/LoanBuckleApplyService.java
  2. 87
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanmonthlyaccrualapply/LoanMonthlyAccrualApplyService.java

90
anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanbuckleapply/LoanBuckleApplyService.java

@ -22,7 +22,6 @@ import com.yxt.anrui.fin.api.finuncollectedreceivablesdetailedjr.FinUncollectedR
import com.yxt.anrui.fin.api.kingdee.FinKingDeeFeign;
import com.yxt.anrui.fin.api.kingdee.bdcustomer.BdCustomer;
import com.yxt.anrui.fin.api.kingdee.voucher.GeneralVoucher;
import com.yxt.anrui.fin.api.kingdee.voucher.SceneCodeEnum;
import com.yxt.anrui.flowable.api.flow.FlowableFeign;
import com.yxt.anrui.flowable.api.flow.UpdateFlowFieldVo;
import com.yxt.anrui.flowable.api.flow2.FlowDelegateQuery;
@ -33,7 +32,8 @@ import com.yxt.anrui.flowable.api.flowtask.LatestTaskVo;
import com.yxt.anrui.flowable.api.utils.ProcDefEnum;
import com.yxt.anrui.flowable.sqloperationsymbol.BusinessVariables;
import com.yxt.anrui.portal.api.flow.PCHistTaskListAndCommentList;
import com.yxt.anrui.portal.api.sysorganization.*;
import com.yxt.anrui.portal.api.sysorganization.SysOrganizationFeign;
import com.yxt.anrui.portal.api.sysorganization.SysOrganizationVo;
import com.yxt.anrui.portal.api.sysstafforg.SysStaffOrg;
import com.yxt.anrui.portal.api.sysstafforg.SysStaffOrgFeign;
import com.yxt.anrui.portal.api.sysuser.PrivilegeQuery;
@ -1269,9 +1269,9 @@ public class LoanBuckleApplyService extends MybatisBaseService<LoanBuckleApplyMa
List<Map<String, Object>> newList = new ArrayList<>();
LoanBuckleApply data = fetchBySid(sid);
if (null != data) {
if (!data.getNodeState().equals("已办结")) {
return rb.setMsg("无法下载没有办结的审批记录。");
}
// if (!data.getNodeState().equals("已办结")) {
// return rb.setMsg("无法下载没有办结的审批记录。");
// }
List<LoanFile> files = loanFileService.selectByLinkSid(data.getSid(), LoanFileEnum.BUCKLE_APPLY.getAttachType());
if (!files.isEmpty()) {
List<String> stringList = new ArrayList<>();
@ -1306,50 +1306,56 @@ public class LoanBuckleApplyService extends MybatisBaseService<LoanBuckleApplyMa
dataMap.put("filePath", filePath);
}
//获取审批记录
if (StringUtils.isNotBlank(data.getProcInstId())) {
List<PCHistTaskListAndCommentList> flowRecordVo = flowableFeignPro.flowRecordAndComment(data.getProcInstId(), "1").getData();
List<MonthlyAccrualSourceLCVo> sourceLCVos = new ArrayList<>();
for (PCHistTaskListAndCommentList flowTask : flowRecordVo) {
if (flowTask.getFlowableRecordVo() != null) {
Map<String, Object> flowableRecordVo = flowTask.getFlowableRecordVo();
MonthlyAccrualSourceLCVo sourceLCVo = new MonthlyAccrualSourceLCVo();
List<Map<String, Object>> taskUserInfos = ConstantUtils.getListData(flowableRecordVo, "taskUserInfos");
Map<String, Object> comment = ConstantUtils.getMap(flowableRecordVo, "comment");
String assigneeName = (String) taskUserInfos.get(0).get("assigneeName");
String comment1 = (String) comment.get("comment");
sourceLCVo.setName(assigneeName);
sourceLCVo.setComment(comment1);
sourceLCVo.setSpsj(flowableRecordVo.get("finishTime").toString());
sourceLCVos.add(sourceLCVo);
} else {
Map<String, Object> processCommentVo = flowTask.getProcessCommentVo();
MonthlyAccrualSourceLCVo sourceLCVo = new MonthlyAccrualSourceLCVo();
sourceLCVo.setName(processCommentVo.get("title").toString());
sourceLCVo.setComment(processCommentVo.get("content").toString());
sourceLCVo.setSpsj(processCommentVo.get("time").toString());
sourceLCVos.add(sourceLCVo);
if (data.getNodeState().equals("已办结")) {
if (StringUtils.isNotBlank(data.getProcInstId())) {
List<PCHistTaskListAndCommentList> flowRecordVo = flowableFeignPro.flowRecordAndComment(data.getProcInstId(), "1").getData();
List<MonthlyAccrualSourceLCVo> sourceLCVos = new ArrayList<>();
for (PCHistTaskListAndCommentList flowTask : flowRecordVo) {
if (flowTask.getFlowableRecordVo() != null) {
Map<String, Object> flowableRecordVo = flowTask.getFlowableRecordVo();
MonthlyAccrualSourceLCVo sourceLCVo = new MonthlyAccrualSourceLCVo();
List<Map<String, Object>> taskUserInfos = ConstantUtils.getListData(flowableRecordVo, "taskUserInfos");
Map<String, Object> comment = ConstantUtils.getMap(flowableRecordVo, "comment");
String assigneeName = (String) taskUserInfos.get(0).get("assigneeName");
String comment1 = (String) comment.get("comment");
sourceLCVo.setName(assigneeName);
sourceLCVo.setComment(comment1);
sourceLCVo.setSpsj(flowableRecordVo.get("finishTime").toString());
sourceLCVos.add(sourceLCVo);
} else {
Map<String, Object> processCommentVo = flowTask.getProcessCommentVo();
MonthlyAccrualSourceLCVo sourceLCVo = new MonthlyAccrualSourceLCVo();
sourceLCVo.setName(processCommentVo.get("title").toString());
sourceLCVo.setComment(processCommentVo.get("content").toString());
sourceLCVo.setSpsj(processCommentVo.get("time").toString());
sourceLCVos.add(sourceLCVo);
}
}
}
List<Message> messages = messageFeign.selectByBusinessSid(data.getSid()).getData();
if (messages.size() > 0) {
for (Message message : messages) {
MonthlyAccrualSourceLCVo sourceLCVo = new MonthlyAccrualSourceLCVo();
String receiverNames = "";
List<MessageList> messageLists = messageListFeign.fetchByMainSid(message.getSid()).getData();
if (messageLists.size() > 0) {
for (MessageList messageList : messageLists) {
receiverNames = receiverNames + messageList.getReceiverName() + ",";
List<Message> messages = messageFeign.selectByBusinessSid(data.getSid()).getData();
if (messages.size() > 0) {
for (Message message : messages) {
MonthlyAccrualSourceLCVo sourceLCVo = new MonthlyAccrualSourceLCVo();
String receiverNames = "";
List<MessageList> messageLists = messageListFeign.fetchByMainSid(message.getSid()).getData();
if (messageLists.size() > 0) {
for (MessageList messageList : messageLists) {
receiverNames = receiverNames + messageList.getReceiverName() + ",";
}
}
sourceLCVo.setName("系统");
sourceLCVo.setComment("抄送 " + receiverNames.substring(0, receiverNames.lastIndexOf(",")));
sourceLCVo.setSpsj(DateUtil.format(message.getCreateTime(), "yyyy-MM-dd HH:mm:ss"));
sourceLCVos.add(sourceLCVo);
}
sourceLCVo.setName("系统");
sourceLCVo.setComment("抄送 " + receiverNames.substring(0, receiverNames.lastIndexOf(",")));
sourceLCVo.setSpsj(DateUtil.format(message.getCreateTime(), "yyyy-MM-dd HH:mm:ss"));
sourceLCVos.add(sourceLCVo);
}
sourceLCVos.sort(comparing(MonthlyAccrualSourceLCVo::getSpsj));
dataMap.put("lcList", sourceLCVos);
}
sourceLCVos.sort(comparing(MonthlyAccrualSourceLCVo::getSpsj));
} else {
List<MonthlyAccrualSourceLCVo> sourceLCVos = new ArrayList<>();
dataMap.put("lcList", sourceLCVos);
}
List<LoanBuckleApplyRecord> records = loanBuckleApplyRecordService.selByMainSid(sid);
if (!records.isEmpty()) {
int sortNo = 1;

87
anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanmonthlyaccrualapply/LoanMonthlyAccrualApplyService.java

@ -677,7 +677,7 @@ public class LoanMonthlyAccrualApplyService extends MybatisBaseService<LoanMonth
int index = 0;
int indexFinal = 0;
if (!records.isEmpty()) {
DictCommonVo dictCommonVo = dictCommonFeign.selectBykey("WithholdMax", "月还计提").getData();
DictCommonVo dictCommonVo = dictCommonFeign.selectBykey("月还计提", "WithholdMax").getData();
if (null != dictCommonVo) {
String dictValue = dictCommonVo.getDictValue();
int i = Integer.parseInt(dictValue);
@ -1028,9 +1028,9 @@ public class LoanMonthlyAccrualApplyService extends MybatisBaseService<LoanMonth
List<Map<String, Object>> newList = new ArrayList<>();
LoanMonthlyAccrualApply data = fetchBySid(sid);
if (null != data) {
if (!data.getNodeState().equals("已办结")) {
return rb.setMsg("无法下载没有办结的审批记录。");
}
// if (!data.getNodeState().equals("已办结")) {
// return rb.setMsg("无法下载没有办结的审批记录。");
// }
List<LoanFile> files = loanFileService.selectByLinkSid(data.getSid(), LoanFileEnum.ACCRUALAPPLY.getAttachType());
if (!files.isEmpty()) {
List<String> stringList = new ArrayList<>();
@ -1065,48 +1065,53 @@ public class LoanMonthlyAccrualApplyService extends MybatisBaseService<LoanMonth
dataMap.put("filePath", filePath);
}
//获取审批记录
if (StringUtils.isNotBlank(data.getProcInstId())) {
List<PCHistTaskListAndCommentList> flowRecordVo = flowableFeignPro.flowRecordAndComment(data.getProcInstId(), "1").getData();
List<MonthlyAccrualSourceLCVo> sourceLCVos = new ArrayList<>();
for (PCHistTaskListAndCommentList flowTask : flowRecordVo) {
if (flowTask.getFlowableRecordVo() != null) {
Map<String, Object> flowableRecordVo = flowTask.getFlowableRecordVo();
MonthlyAccrualSourceLCVo sourceLCVo = new MonthlyAccrualSourceLCVo();
List<Map<String, Object>> taskUserInfos = ConstantUtils.getListData(flowableRecordVo, "taskUserInfos");
Map<String, Object> comment = ConstantUtils.getMap(flowableRecordVo, "comment");
String assigneeName = (String) taskUserInfos.get(0).get("assigneeName");
String comment1 = (String) comment.get("comment");
sourceLCVo.setName(assigneeName);
sourceLCVo.setComment(comment1);
sourceLCVo.setSpsj(flowableRecordVo.get("finishTime").toString());
sourceLCVos.add(sourceLCVo);
} else {
Map<String, Object> processCommentVo = flowTask.getProcessCommentVo();
MonthlyAccrualSourceLCVo sourceLCVo = new MonthlyAccrualSourceLCVo();
sourceLCVo.setName(processCommentVo.get("title").toString());
sourceLCVo.setComment(processCommentVo.get("content").toString());
sourceLCVo.setSpsj(processCommentVo.get("time").toString());
sourceLCVos.add(sourceLCVo);
if (data.getNodeState().equals("已办结")) {
if (StringUtils.isNotBlank(data.getProcInstId())) {
List<PCHistTaskListAndCommentList> flowRecordVo = flowableFeignPro.flowRecordAndComment(data.getProcInstId(), "1").getData();
List<MonthlyAccrualSourceLCVo> sourceLCVos = new ArrayList<>();
for (PCHistTaskListAndCommentList flowTask : flowRecordVo) {
if (flowTask.getFlowableRecordVo() != null) {
Map<String, Object> flowableRecordVo = flowTask.getFlowableRecordVo();
MonthlyAccrualSourceLCVo sourceLCVo = new MonthlyAccrualSourceLCVo();
List<Map<String, Object>> taskUserInfos = ConstantUtils.getListData(flowableRecordVo, "taskUserInfos");
Map<String, Object> comment = ConstantUtils.getMap(flowableRecordVo, "comment");
String assigneeName = (String) taskUserInfos.get(0).get("assigneeName");
String comment1 = (String) comment.get("comment");
sourceLCVo.setName(assigneeName);
sourceLCVo.setComment(comment1);
sourceLCVo.setSpsj(flowableRecordVo.get("finishTime").toString());
sourceLCVos.add(sourceLCVo);
} else {
Map<String, Object> processCommentVo = flowTask.getProcessCommentVo();
MonthlyAccrualSourceLCVo sourceLCVo = new MonthlyAccrualSourceLCVo();
sourceLCVo.setName(processCommentVo.get("title").toString());
sourceLCVo.setComment(processCommentVo.get("content").toString());
sourceLCVo.setSpsj(processCommentVo.get("time").toString());
sourceLCVos.add(sourceLCVo);
}
}
}
List<Message> messages = messageFeign.selectByBusinessSid(data.getSid()).getData();
if (messages.size() > 0) {
for (Message message : messages) {
MonthlyAccrualSourceLCVo sourceLCVo = new MonthlyAccrualSourceLCVo();
String receiverNames = "";
List<MessageList> messageLists = messageListFeign.fetchByMainSid(message.getSid()).getData();
if (messageLists.size() > 0) {
for (MessageList messageList : messageLists) {
receiverNames = receiverNames + messageList.getReceiverName() + ",";
List<Message> messages = messageFeign.selectByBusinessSid(data.getSid()).getData();
if (messages.size() > 0) {
for (Message message : messages) {
MonthlyAccrualSourceLCVo sourceLCVo = new MonthlyAccrualSourceLCVo();
String receiverNames = "";
List<MessageList> messageLists = messageListFeign.fetchByMainSid(message.getSid()).getData();
if (messageLists.size() > 0) {
for (MessageList messageList : messageLists) {
receiverNames = receiverNames + messageList.getReceiverName() + ",";
}
}
sourceLCVo.setName("系统");
sourceLCVo.setComment("抄送 " + receiverNames.substring(0, receiverNames.lastIndexOf(",")));
sourceLCVo.setSpsj(DateUtil.format(message.getCreateTime(), "yyyy-MM-dd HH:mm:ss"));
sourceLCVos.add(sourceLCVo);
}
sourceLCVo.setName("系统");
sourceLCVo.setComment("抄送 " + receiverNames.substring(0, receiverNames.lastIndexOf(",")));
sourceLCVo.setSpsj(DateUtil.format(message.getCreateTime(), "yyyy-MM-dd HH:mm:ss"));
sourceLCVos.add(sourceLCVo);
}
sourceLCVos.sort(comparing(MonthlyAccrualSourceLCVo::getSpsj));
dataMap.put("lcList", sourceLCVos);
}
sourceLCVos.sort(comparing(MonthlyAccrualSourceLCVo::getSpsj));
} else {
List<MonthlyAccrualSourceLCVo> sourceLCVos = new ArrayList<>();
dataMap.put("lcList", sourceLCVos);
}
List<LoanMonthlyAccrualRecord> records = loanMonthlyAccrualRecordService.selByMainSid(sid);

Loading…
Cancel
Save