Browse Source

Merge remote-tracking branch 'origin/master'

master
yunuo970428 3 months ago
parent
commit
b3b3572719
  1. 12
      anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/baseaccadjapply/BaseAccadjApplyService.java
  2. 90
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanbuckleapply/LoanBuckleApplyService.java
  3. 87
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanmonthlyaccrualapply/LoanMonthlyAccrualApplyService.java

12
anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/baseaccadjapply/BaseAccadjApplyService.java

@ -538,8 +538,8 @@ public class BaseAccadjApplyService extends MybatisBaseService<BaseAccadjApplyMa
String orgCodeDC = basePurchaseSystemDetailsVoDC.getOrgCode(); String orgCodeDC = basePurchaseSystemDetailsVoDC.getOrgCode();
//调出根据code获取组织信息 //调出根据code获取组织信息
SysOrganization sysOrganizationDC = sysOrganizationFeign.selectByOrgCode(orgCodeDC).getData(); SysOrganization sysOrganizationDC = sysOrganizationFeign.selectByOrgCode(orgCodeDC).getData();
//调出获取组织的otherCode //调出获取组织的suppCustCode
String otherCodeDC = sysOrganizationDC.getOtherCode(); String suppCustCodeDC = basePurchaseSystemDetailsVoDC.getSuppCustCode();
//调入采购系统sid(部门sid) //调入采购系统sid(部门sid)
String purchaseSystemSidDR = baseVehicleDR.getPurchaseSystemSid(); String purchaseSystemSidDR = baseVehicleDR.getPurchaseSystemSid();
//调入获取采购系统 //调入获取采购系统
@ -570,7 +570,7 @@ public class BaseAccadjApplyService extends MybatisBaseService<BaseAccadjApplyMa
//分配目标组织:TOrgId (必填项) //分配目标组织:TOrgId (必填项)
stkInStock.setTOrgId(stkInStock.getFPurchaseOrgId()); stkInStock.setTOrgId(stkInStock.getFPurchaseOrgId());
//供应商:FSupplierId (必填项) //供应商:FSupplierId (必填项)
stkInStock.setFSupplierId(basePurchaseSystemDetailsVoDR.getSuppCustCode()); stkInStock.setFSupplierId(suppCustCodeDC);
// 物料列表:FInStockEntry (必填项) // 物料列表:FInStockEntry (必填项)
List<StkInStock.FInStockEntry> fInStockEntry = new ArrayList<>(); List<StkInStock.FInStockEntry> fInStockEntry = new ArrayList<>();
List<ScmApplyInboundVehQueryDto> scmApplyInboundVehQuerys = new ArrayList<>(); List<ScmApplyInboundVehQueryDto> scmApplyInboundVehQuerys = new ArrayList<>();
@ -631,7 +631,7 @@ public class BaseAccadjApplyService extends MybatisBaseService<BaseAccadjApplyMa
scmApplyInboundQueryDto.setOrgCode(orgCodeDR); scmApplyInboundQueryDto.setOrgCode(orgCodeDR);
scmApplyInboundQueryDto.setManSid(baseAccadjApply.getCallOutOrgSid()); scmApplyInboundQueryDto.setManSid(baseAccadjApply.getCallOutOrgSid());
scmApplyInboundQueryDto.setManName(baseAccadjApply.getCallOutOrgName()); scmApplyInboundQueryDto.setManName(baseAccadjApply.getCallOutOrgName());
scmApplyInboundQueryDto.setManCode(otherCodeDC); scmApplyInboundQueryDto.setManCode(suppCustCodeDC);
scmApplyInboundQueryDto.setMakeListSid(baseAccadjApply.getCreateBySid()); scmApplyInboundQueryDto.setMakeListSid(baseAccadjApply.getCreateBySid());
SysUserVo sysUserVo = sysUserFeign.fetchBySid(baseAccadjApply.getCreateBySid()).getData(); SysUserVo sysUserVo = sysUserFeign.fetchBySid(baseAccadjApply.getCreateBySid()).getData();
scmApplyInboundQueryDto.setMakeListName(sysUserVo.getName()); scmApplyInboundQueryDto.setMakeListName(sysUserVo.getName());
@ -653,7 +653,7 @@ public class BaseAccadjApplyService extends MybatisBaseService<BaseAccadjApplyMa
BdSupplier bdSupplier = new BdSupplier(); BdSupplier bdSupplier = new BdSupplier();
bdSupplier.setFName(sysOrganizationDC.getName()); bdSupplier.setFName(sysOrganizationDC.getName());
bdSupplier.setFLocMobile("13333333333"); bdSupplier.setFLocMobile("13333333333");
bdSupplier.setFNumber(otherCodeDC); bdSupplier.setFNumber(suppCustCodeDC);
bdSupplier.setFUseOrgId(orgCodeDR); bdSupplier.setFUseOrgId(orgCodeDR);
finKingDeeFeign.draftBdSupplier(bdSupplier); finKingDeeFeign.draftBdSupplier(bdSupplier);
finKingDeeFeign.draftStkInStock(stkInStock); finKingDeeFeign.draftStkInStock(stkInStock);
@ -716,7 +716,7 @@ public class BaseAccadjApplyService extends MybatisBaseService<BaseAccadjApplyMa
//判断采购系统对应的财务分公司code //判断采购系统对应的财务分公司code
salOutStock.setFSaleOrgId(orgCode); salOutStock.setFSaleOrgId(orgCode);
//客户:FCustomerID (必填项) //客户:FCustomerID (必填项)
salOutStock.setFCustomerID(basePurchaseSystemDetailsVo.getSuppCustCode()); salOutStock.setFCustomerID(basePurchaseSystemDetailsVoDR.getSuppCustCode());
List<SalOutStock.FEntity> fEntity = new ArrayList<>(); List<SalOutStock.FEntity> fEntity = new ArrayList<>();
for (BaseVehicle baseVehicle : baseVehicles) { for (BaseVehicle baseVehicle : baseVehicles) {
//销售出库单物料信息 //销售出库单物料信息

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.FinKingDeeFeign;
import com.yxt.anrui.fin.api.kingdee.bdcustomer.BdCustomer; 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.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.FlowableFeign;
import com.yxt.anrui.flowable.api.flow.UpdateFlowFieldVo; import com.yxt.anrui.flowable.api.flow.UpdateFlowFieldVo;
import com.yxt.anrui.flowable.api.flow2.FlowDelegateQuery; 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.api.utils.ProcDefEnum;
import com.yxt.anrui.flowable.sqloperationsymbol.BusinessVariables; import com.yxt.anrui.flowable.sqloperationsymbol.BusinessVariables;
import com.yxt.anrui.portal.api.flow.PCHistTaskListAndCommentList; 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.SysStaffOrg;
import com.yxt.anrui.portal.api.sysstafforg.SysStaffOrgFeign; import com.yxt.anrui.portal.api.sysstafforg.SysStaffOrgFeign;
import com.yxt.anrui.portal.api.sysuser.PrivilegeQuery; 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<>(); List<Map<String, Object>> newList = new ArrayList<>();
LoanBuckleApply data = fetchBySid(sid); LoanBuckleApply data = fetchBySid(sid);
if (null != data) { if (null != data) {
if (!data.getNodeState().equals("已办结")) { // if (!data.getNodeState().equals("已办结")) {
return rb.setMsg("无法下载没有办结的审批记录。"); // return rb.setMsg("无法下载没有办结的审批记录。");
} // }
List<LoanFile> files = loanFileService.selectByLinkSid(data.getSid(), LoanFileEnum.BUCKLE_APPLY.getAttachType()); List<LoanFile> files = loanFileService.selectByLinkSid(data.getSid(), LoanFileEnum.BUCKLE_APPLY.getAttachType());
if (!files.isEmpty()) { if (!files.isEmpty()) {
List<String> stringList = new ArrayList<>(); List<String> stringList = new ArrayList<>();
@ -1306,50 +1306,56 @@ public class LoanBuckleApplyService extends MybatisBaseService<LoanBuckleApplyMa
dataMap.put("filePath", filePath); dataMap.put("filePath", filePath);
} }
//获取审批记录 //获取审批记录
if (StringUtils.isNotBlank(data.getProcInstId())) { if (data.getNodeState().equals("已办结")) {
List<PCHistTaskListAndCommentList> flowRecordVo = flowableFeignPro.flowRecordAndComment(data.getProcInstId(), "1").getData(); if (StringUtils.isNotBlank(data.getProcInstId())) {
List<MonthlyAccrualSourceLCVo> sourceLCVos = new ArrayList<>(); List<PCHistTaskListAndCommentList> flowRecordVo = flowableFeignPro.flowRecordAndComment(data.getProcInstId(), "1").getData();
for (PCHistTaskListAndCommentList flowTask : flowRecordVo) { List<MonthlyAccrualSourceLCVo> sourceLCVos = new ArrayList<>();
if (flowTask.getFlowableRecordVo() != null) { for (PCHistTaskListAndCommentList flowTask : flowRecordVo) {
Map<String, Object> flowableRecordVo = flowTask.getFlowableRecordVo(); if (flowTask.getFlowableRecordVo() != null) {
MonthlyAccrualSourceLCVo sourceLCVo = new MonthlyAccrualSourceLCVo(); Map<String, Object> flowableRecordVo = flowTask.getFlowableRecordVo();
List<Map<String, Object>> taskUserInfos = ConstantUtils.getListData(flowableRecordVo, "taskUserInfos"); MonthlyAccrualSourceLCVo sourceLCVo = new MonthlyAccrualSourceLCVo();
Map<String, Object> comment = ConstantUtils.getMap(flowableRecordVo, "comment"); List<Map<String, Object>> taskUserInfos = ConstantUtils.getListData(flowableRecordVo, "taskUserInfos");
String assigneeName = (String) taskUserInfos.get(0).get("assigneeName"); Map<String, Object> comment = ConstantUtils.getMap(flowableRecordVo, "comment");
String comment1 = (String) comment.get("comment"); String assigneeName = (String) taskUserInfos.get(0).get("assigneeName");
sourceLCVo.setName(assigneeName); String comment1 = (String) comment.get("comment");
sourceLCVo.setComment(comment1); sourceLCVo.setName(assigneeName);
sourceLCVo.setSpsj(flowableRecordVo.get("finishTime").toString()); sourceLCVo.setComment(comment1);
sourceLCVos.add(sourceLCVo); sourceLCVo.setSpsj(flowableRecordVo.get("finishTime").toString());
} else { sourceLCVos.add(sourceLCVo);
Map<String, Object> processCommentVo = flowTask.getProcessCommentVo(); } else {
MonthlyAccrualSourceLCVo sourceLCVo = new MonthlyAccrualSourceLCVo(); Map<String, Object> processCommentVo = flowTask.getProcessCommentVo();
sourceLCVo.setName(processCommentVo.get("title").toString()); MonthlyAccrualSourceLCVo sourceLCVo = new MonthlyAccrualSourceLCVo();
sourceLCVo.setComment(processCommentVo.get("content").toString()); sourceLCVo.setName(processCommentVo.get("title").toString());
sourceLCVo.setSpsj(processCommentVo.get("time").toString()); sourceLCVo.setComment(processCommentVo.get("content").toString());
sourceLCVos.add(sourceLCVo); sourceLCVo.setSpsj(processCommentVo.get("time").toString());
sourceLCVos.add(sourceLCVo);
}
} }
} List<Message> messages = messageFeign.selectByBusinessSid(data.getSid()).getData();
List<Message> messages = messageFeign.selectByBusinessSid(data.getSid()).getData(); if (messages.size() > 0) {
if (messages.size() > 0) { for (Message message : messages) {
for (Message message : messages) { MonthlyAccrualSourceLCVo sourceLCVo = new MonthlyAccrualSourceLCVo();
MonthlyAccrualSourceLCVo sourceLCVo = new MonthlyAccrualSourceLCVo(); String receiverNames = "";
String receiverNames = ""; List<MessageList> messageLists = messageListFeign.fetchByMainSid(message.getSid()).getData();
List<MessageList> messageLists = messageListFeign.fetchByMainSid(message.getSid()).getData(); if (messageLists.size() > 0) {
if (messageLists.size() > 0) { for (MessageList messageList : messageLists) {
for (MessageList messageList : messageLists) { receiverNames = receiverNames + messageList.getReceiverName() + ",";
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); dataMap.put("lcList", sourceLCVos);
} }
List<LoanBuckleApplyRecord> records = loanBuckleApplyRecordService.selByMainSid(sid); List<LoanBuckleApplyRecord> records = loanBuckleApplyRecordService.selByMainSid(sid);
if (!records.isEmpty()) { if (!records.isEmpty()) {
int sortNo = 1; 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 index = 0;
int indexFinal = 0; int indexFinal = 0;
if (!records.isEmpty()) { if (!records.isEmpty()) {
DictCommonVo dictCommonVo = dictCommonFeign.selectBykey("WithholdMax", "月还计提").getData(); DictCommonVo dictCommonVo = dictCommonFeign.selectBykey("月还计提", "WithholdMax").getData();
if (null != dictCommonVo) { if (null != dictCommonVo) {
String dictValue = dictCommonVo.getDictValue(); String dictValue = dictCommonVo.getDictValue();
int i = Integer.parseInt(dictValue); int i = Integer.parseInt(dictValue);
@ -1028,9 +1028,9 @@ public class LoanMonthlyAccrualApplyService extends MybatisBaseService<LoanMonth
List<Map<String, Object>> newList = new ArrayList<>(); List<Map<String, Object>> newList = new ArrayList<>();
LoanMonthlyAccrualApply data = fetchBySid(sid); LoanMonthlyAccrualApply data = fetchBySid(sid);
if (null != data) { if (null != data) {
if (!data.getNodeState().equals("已办结")) { // if (!data.getNodeState().equals("已办结")) {
return rb.setMsg("无法下载没有办结的审批记录。"); // return rb.setMsg("无法下载没有办结的审批记录。");
} // }
List<LoanFile> files = loanFileService.selectByLinkSid(data.getSid(), LoanFileEnum.ACCRUALAPPLY.getAttachType()); List<LoanFile> files = loanFileService.selectByLinkSid(data.getSid(), LoanFileEnum.ACCRUALAPPLY.getAttachType());
if (!files.isEmpty()) { if (!files.isEmpty()) {
List<String> stringList = new ArrayList<>(); List<String> stringList = new ArrayList<>();
@ -1065,48 +1065,53 @@ public class LoanMonthlyAccrualApplyService extends MybatisBaseService<LoanMonth
dataMap.put("filePath", filePath); dataMap.put("filePath", filePath);
} }
//获取审批记录 //获取审批记录
if (StringUtils.isNotBlank(data.getProcInstId())) { if (data.getNodeState().equals("已办结")) {
List<PCHistTaskListAndCommentList> flowRecordVo = flowableFeignPro.flowRecordAndComment(data.getProcInstId(), "1").getData(); if (StringUtils.isNotBlank(data.getProcInstId())) {
List<MonthlyAccrualSourceLCVo> sourceLCVos = new ArrayList<>(); List<PCHistTaskListAndCommentList> flowRecordVo = flowableFeignPro.flowRecordAndComment(data.getProcInstId(), "1").getData();
for (PCHistTaskListAndCommentList flowTask : flowRecordVo) { List<MonthlyAccrualSourceLCVo> sourceLCVos = new ArrayList<>();
if (flowTask.getFlowableRecordVo() != null) { for (PCHistTaskListAndCommentList flowTask : flowRecordVo) {
Map<String, Object> flowableRecordVo = flowTask.getFlowableRecordVo(); if (flowTask.getFlowableRecordVo() != null) {
MonthlyAccrualSourceLCVo sourceLCVo = new MonthlyAccrualSourceLCVo(); Map<String, Object> flowableRecordVo = flowTask.getFlowableRecordVo();
List<Map<String, Object>> taskUserInfos = ConstantUtils.getListData(flowableRecordVo, "taskUserInfos"); MonthlyAccrualSourceLCVo sourceLCVo = new MonthlyAccrualSourceLCVo();
Map<String, Object> comment = ConstantUtils.getMap(flowableRecordVo, "comment"); List<Map<String, Object>> taskUserInfos = ConstantUtils.getListData(flowableRecordVo, "taskUserInfos");
String assigneeName = (String) taskUserInfos.get(0).get("assigneeName"); Map<String, Object> comment = ConstantUtils.getMap(flowableRecordVo, "comment");
String comment1 = (String) comment.get("comment"); String assigneeName = (String) taskUserInfos.get(0).get("assigneeName");
sourceLCVo.setName(assigneeName); String comment1 = (String) comment.get("comment");
sourceLCVo.setComment(comment1); sourceLCVo.setName(assigneeName);
sourceLCVo.setSpsj(flowableRecordVo.get("finishTime").toString()); sourceLCVo.setComment(comment1);
sourceLCVos.add(sourceLCVo); sourceLCVo.setSpsj(flowableRecordVo.get("finishTime").toString());
} else { sourceLCVos.add(sourceLCVo);
Map<String, Object> processCommentVo = flowTask.getProcessCommentVo(); } else {
MonthlyAccrualSourceLCVo sourceLCVo = new MonthlyAccrualSourceLCVo(); Map<String, Object> processCommentVo = flowTask.getProcessCommentVo();
sourceLCVo.setName(processCommentVo.get("title").toString()); MonthlyAccrualSourceLCVo sourceLCVo = new MonthlyAccrualSourceLCVo();
sourceLCVo.setComment(processCommentVo.get("content").toString()); sourceLCVo.setName(processCommentVo.get("title").toString());
sourceLCVo.setSpsj(processCommentVo.get("time").toString()); sourceLCVo.setComment(processCommentVo.get("content").toString());
sourceLCVos.add(sourceLCVo); sourceLCVo.setSpsj(processCommentVo.get("time").toString());
sourceLCVos.add(sourceLCVo);
}
} }
} List<Message> messages = messageFeign.selectByBusinessSid(data.getSid()).getData();
List<Message> messages = messageFeign.selectByBusinessSid(data.getSid()).getData(); if (messages.size() > 0) {
if (messages.size() > 0) { for (Message message : messages) {
for (Message message : messages) { MonthlyAccrualSourceLCVo sourceLCVo = new MonthlyAccrualSourceLCVo();
MonthlyAccrualSourceLCVo sourceLCVo = new MonthlyAccrualSourceLCVo(); String receiverNames = "";
String receiverNames = ""; List<MessageList> messageLists = messageListFeign.fetchByMainSid(message.getSid()).getData();
List<MessageList> messageLists = messageListFeign.fetchByMainSid(message.getSid()).getData(); if (messageLists.size() > 0) {
if (messageLists.size() > 0) { for (MessageList messageList : messageLists) {
for (MessageList messageList : messageLists) { receiverNames = receiverNames + messageList.getReceiverName() + ",";
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); dataMap.put("lcList", sourceLCVos);
} }
List<LoanMonthlyAccrualRecord> records = loanMonthlyAccrualRecordService.selByMainSid(sid); List<LoanMonthlyAccrualRecord> records = loanMonthlyAccrualRecordService.selByMainSid(sid);

Loading…
Cancel
Save