|
@@ -14,17 +14,16 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.dayou.common.BaseEntity;
|
|
|
-import com.dayou.dto.PriceFeedbackDTO;
|
|
|
-import com.dayou.dto.history.HisAssetsOrder;
|
|
|
-import com.dayou.dto.history.HisMajorOrder;
|
|
|
-import com.dayou.dto.history.HisMajorTarget;
|
|
|
-import com.dayou.dto.history.HisOrderParam;
|
|
|
+import com.dayou.dto.history.*;
|
|
|
import com.dayou.entity.*;
|
|
|
import com.dayou.enums.MainBusinessEnum;
|
|
|
import com.dayou.enums.ProductionEnum;
|
|
|
import com.dayou.exception.ErrorCode;
|
|
|
import com.dayou.mapper.DyoaHistoryMapper;
|
|
|
+import com.dayou.mapper.DyoaRecordMapper;
|
|
|
+import com.dayou.mapper.FinanceClaimMapper;
|
|
|
import com.dayou.service.*;
|
|
|
+import com.dayou.service.impl.AssetsServiceImpl;
|
|
|
import com.dayou.utils.DateUtils;
|
|
|
import com.dayou.utils.HttpKit;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
@@ -44,8 +43,7 @@ import java.util.regex.Pattern;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
import static com.dayou.common.Constants.*;
|
|
|
-import static com.dayou.enums.MainBusinessEnum.MAJOR_BUSINESS;
|
|
|
-import static com.dayou.enums.MainBusinessEnum.MAJOR_ORDER;
|
|
|
+import static com.dayou.enums.MainBusinessEnum.*;
|
|
|
|
|
|
@DS("dyoa")
|
|
|
@Service
|
|
@@ -66,11 +64,26 @@ public class DyoaHistoryServiceImpl implements IDyoaHistoryService{
|
|
|
|
|
|
private Map<String,Long> departments = new HashMap<>();
|
|
|
|
|
|
+ private Map<String,Long> realAmounts = new HashMap<>();
|
|
|
+
|
|
|
+ private Map<String,Long> orderFundIds = new HashMap<>();
|
|
|
+
|
|
|
|
|
|
private static final Map<String,String> MAJOR_ORDER_COLUM = new HashMap<>();
|
|
|
|
|
|
private static final Map<String,String> MAJOR_PRODUCTION_COLUM = new HashMap<>();
|
|
|
|
|
|
+ private static final Map<String,String> PERSONAL_ORDER_COLUM = new HashMap<>();
|
|
|
+
|
|
|
+ private static final Map<String,String> REAL_AMOUNT_COLUM = new HashMap<>();
|
|
|
+
|
|
|
+ private static final Map<String,String> REAL_AMOUNT_CLAIM_COLUM = new HashMap<>();
|
|
|
+
|
|
|
+ private static final Map<String,String> ASSETS_ORDER_COLUM = new HashMap<>();
|
|
|
+
|
|
|
+ private static final Map<String,String> ASSETS_PRODUCTION_COLUM = new HashMap<>();
|
|
|
+
|
|
|
+
|
|
|
|
|
|
@Autowired
|
|
|
private IUserService userService;
|
|
@@ -85,13 +98,14 @@ public class DyoaHistoryServiceImpl implements IDyoaHistoryService{
|
|
|
private IDyoaRecordService dyoaRecordService;
|
|
|
|
|
|
@Autowired
|
|
|
+ private IFinanceRealFundService financeRealFundService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
private IOrderFundService orderFundService;
|
|
|
|
|
|
@Autowired
|
|
|
private IProductionFundService productionFundService;
|
|
|
|
|
|
-
|
|
|
-
|
|
|
@Autowired
|
|
|
private IMajorService majorServiceImpl;
|
|
|
|
|
@@ -99,6 +113,26 @@ public class DyoaHistoryServiceImpl implements IDyoaHistoryService{
|
|
|
@Autowired
|
|
|
private IMajorProductionService majorProductionService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private IPersonalService personalService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private ICustomerCompanyService customerCompanyService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private ICustomerLinkmanService customerLinkmanService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private IAssetsService assetsService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private IFinanceClaimService financeClaimService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private IAssetsService assetsServiceImpl;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private IAssetsProductionService assetsProductionService;
|
|
|
static {
|
|
|
// MAJOR_ORDER_COLUM.put("id","id");
|
|
|
MAJOR_ORDER_COLUM.put("name","name");
|
|
@@ -134,6 +168,11 @@ public class DyoaHistoryServiceImpl implements IDyoaHistoryService{
|
|
|
MAJOR_ORDER_COLUM.put("terminalType","terminalClienteleType");
|
|
|
MAJOR_ORDER_COLUM.put("members","members");
|
|
|
MAJOR_ORDER_COLUM.put("description","remark");
|
|
|
+ MAJOR_ORDER_COLUM.put("customerName","clienteleId");
|
|
|
+ MAJOR_ORDER_COLUM.put("customerName2","clienteleSubId");
|
|
|
+ MAJOR_ORDER_COLUM.put("bankContactName","clienteleContactId");
|
|
|
+ MAJOR_ORDER_COLUM.put("terminalName","terminalClienteleId");
|
|
|
+ MAJOR_ORDER_COLUM.put("terminalContactName","terminalClienteleContactId");
|
|
|
|
|
|
//大中型产品字段
|
|
|
MAJOR_PRODUCTION_COLUM.put("pType","production");
|
|
@@ -160,8 +199,95 @@ public class DyoaHistoryServiceImpl implements IDyoaHistoryService{
|
|
|
MAJOR_PRODUCTION_COLUM.put("deliveryState","delivery");
|
|
|
MAJOR_PRODUCTION_COLUM.put("printQuantity","printTimes");
|
|
|
|
|
|
+ //个贷订单字段
|
|
|
+ PERSONAL_ORDER_COLUM.put("orderNo","orderId");
|
|
|
+ PERSONAL_ORDER_COLUM.put("locations","location");
|
|
|
+ PERSONAL_ORDER_COLUM.put("target","evaluateAim");
|
|
|
+ PERSONAL_ORDER_COLUM.put("purpose","purpose");
|
|
|
+ PERSONAL_ORDER_COLUM.put("loanMaxMoney","loanLimit");
|
|
|
+ PERSONAL_ORDER_COLUM.put("loanMaxYear","loanPeriod");
|
|
|
+ PERSONAL_ORDER_COLUM.put("masterName","clientManagerId");
|
|
|
+ PERSONAL_ORDER_COLUM.put("principal1","bailorA");
|
|
|
+ PERSONAL_ORDER_COLUM.put("principal1Mobile","bailoraTel");
|
|
|
+ PERSONAL_ORDER_COLUM.put("principal2","bailorB");
|
|
|
+ PERSONAL_ORDER_COLUM.put("principal2Mobile","bailorbTel");
|
|
|
+ PERSONAL_ORDER_COLUM.put("description","remark");
|
|
|
+ PERSONAL_ORDER_COLUM.put("outerEmpName","outwardStaff");
|
|
|
+ PERSONAL_ORDER_COLUM.put("productEmpName","inwardStaff");
|
|
|
+ PERSONAL_ORDER_COLUM.put("priceEmpName","pricingStaff");
|
|
|
+ PERSONAL_ORDER_COLUM.put("agent","agent");
|
|
|
+ PERSONAL_ORDER_COLUM.put("loanProperty","loanNature");
|
|
|
+ PERSONAL_ORDER_COLUM.put("loanUsage","loanAim");
|
|
|
+ PERSONAL_ORDER_COLUM.put("loanExpired","loanExpire");
|
|
|
+ PERSONAL_ORDER_COLUM.put("customerType","clienteleType");
|
|
|
+ PERSONAL_ORDER_COLUM.put("customerName","clienteleId");
|
|
|
+ PERSONAL_ORDER_COLUM.put("customerName2","clienteleSubId");
|
|
|
+ PERSONAL_ORDER_COLUM.put("bankContactName","clienteleContactId");
|
|
|
+ PERSONAL_ORDER_COLUM.put("terminalType","terminalClienteleType");
|
|
|
+ PERSONAL_ORDER_COLUM.put("terminalName","terminalClienteleId");
|
|
|
+ PERSONAL_ORDER_COLUM.put("terminalContactName","terminalClienteleContactId");
|
|
|
+ PERSONAL_ORDER_COLUM.put("finished","ifSaveFile");
|
|
|
+ PERSONAL_ORDER_COLUM.put("finishTime","saveFileDate");
|
|
|
+ PERSONAL_ORDER_COLUM.put("files","credentials");
|
|
|
+
|
|
|
+ //实收款字段
|
|
|
+ REAL_AMOUNT_COLUM.put("incomeTime","payDatetime");
|
|
|
+ REAL_AMOUNT_COLUM.put("companyName","payer");
|
|
|
+ REAL_AMOUNT_COLUM.put("bankName","payerBank");
|
|
|
+ REAL_AMOUNT_COLUM.put("bankNo","payerAccount");
|
|
|
+ REAL_AMOUNT_COLUM.put("money","amount");
|
|
|
+ REAL_AMOUNT_COLUM.put("description","remark");
|
|
|
+ REAL_AMOUNT_COLUM.put("creatorName","creatorId");
|
|
|
+
|
|
|
+ //实收款认领记录
|
|
|
+ REAL_AMOUNT_CLAIM_COLUM.put("orderId","orderFundId");
|
|
|
+ REAL_AMOUNT_CLAIM_COLUM.put("incomeId","realFundId");
|
|
|
+ REAL_AMOUNT_CLAIM_COLUM.put("money","claimAmount");
|
|
|
+ REAL_AMOUNT_CLAIM_COLUM.put("takeEmpName","claimUserId");
|
|
|
+ REAL_AMOUNT_CLAIM_COLUM.put("createdDatetime","claimDatetime");
|
|
|
+
|
|
|
+ //资产订单字段
|
|
|
+ ASSETS_ORDER_COLUM.put("masterName","clientManagerId");
|
|
|
+ ASSETS_ORDER_COLUM.put("assign","allotType");
|
|
|
+ ASSETS_ORDER_COLUM.put("masterOrgName","departmentId");
|
|
|
+ ASSETS_ORDER_COLUM.put("code","orderId");
|
|
|
+ ASSETS_ORDER_COLUM.put("name","name");
|
|
|
+ ASSETS_ORDER_COLUM.put("businessType","assetsBusinessGener");
|
|
|
+ ASSETS_ORDER_COLUM.put("managerName","principalId");
|
|
|
+ ASSETS_ORDER_COLUM.put("companyName","clienteleSubId");
|
|
|
+ ASSETS_ORDER_COLUM.put("principal","bailor");
|
|
|
+ ASSETS_ORDER_COLUM.put("principalName","bailorContactName");
|
|
|
+ ASSETS_ORDER_COLUM.put("principalMobile","bailorContactTel");
|
|
|
+ ASSETS_ORDER_COLUM.put("description","remark");
|
|
|
+ ASSETS_ORDER_COLUM.put("customerType","clienteleType");
|
|
|
+ ASSETS_ORDER_COLUM.put("customerName","clienteleId");
|
|
|
+ ASSETS_ORDER_COLUM.put("bankContactName","clienteleContactId");
|
|
|
+ ASSETS_ORDER_COLUM.put("terminalType","terminalClienteleType");
|
|
|
+ ASSETS_ORDER_COLUM.put("terminalName","terminalClienteleId");
|
|
|
+ ASSETS_ORDER_COLUM.put("terminalContactName","terminalClienteleContactId");
|
|
|
+ ASSETS_ORDER_COLUM.put("importantAsset","significantAssetsReorganization");
|
|
|
+ ASSETS_ORDER_COLUM.put("stateOwned","stateAssets");
|
|
|
+ ASSETS_ORDER_COLUM.put("abroadAsset","foreignAssetsInvolved");
|
|
|
+ ASSETS_ORDER_COLUM.put("cz","dispenseBenefit");
|
|
|
+ ASSETS_ORDER_COLUM.put("stock","security");
|
|
|
+ ASSETS_ORDER_COLUM.put("repeatOrder","entrustAgain");
|
|
|
+
|
|
|
+ //资产产品字段
|
|
|
+ ASSETS_PRODUCTION_COLUM.put("principal","clientName");
|
|
|
+ ASSETS_PRODUCTION_COLUM.put("principalMobile","clientTel");
|
|
|
+ ASSETS_PRODUCTION_COLUM.put("money","evaluateAmount");
|
|
|
+ ASSETS_PRODUCTION_COLUM.put("area","evaluateAcreage");
|
|
|
+ ASSETS_PRODUCTION_COLUM.put("price","evaluatePrice");
|
|
|
+ ASSETS_PRODUCTION_COLUM.put("printQuantity","printCount");
|
|
|
+ ASSETS_PRODUCTION_COLUM.put("archiveTime","saveFileDate");
|
|
|
+ ASSETS_PRODUCTION_COLUM.put("finished","delivery");
|
|
|
+ ASSETS_PRODUCTION_COLUM.put("type","productionType");
|
|
|
+
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
@Override
|
|
|
public Page<HisMajorOrder> hisMajorPage(HisOrderParam param) {
|
|
|
checkCookie();
|
|
@@ -281,13 +407,14 @@ public class DyoaHistoryServiceImpl implements IDyoaHistoryService{
|
|
|
if (CollectionUtil.isNotEmpty(dataArray)){
|
|
|
List<HisAssetsOrder> hisAssetsOrders = dataArray.toJavaList(HisAssetsOrder.class);
|
|
|
page.setRecords(hisAssetsOrders);
|
|
|
- page.setTotal(Long.parseLong(String.valueOf(data.get("total"))));
|
|
|
+ page.setTotal(Long.valueOf(String.valueOf(data.get("total"))));
|
|
|
}
|
|
|
} catch (JSONException e) {
|
|
|
historySystemLogin();
|
|
|
ErrorCode.throwBusinessException(ErrorCode.CUSTOM_ERROR,"远程连接超时,请刷新页面。");
|
|
|
} catch (Exception e) {
|
|
|
log.error("远程调用失败.");
|
|
|
+ e.printStackTrace();
|
|
|
}
|
|
|
|
|
|
return page;
|
|
@@ -296,30 +423,23 @@ public class DyoaHistoryServiceImpl implements IDyoaHistoryService{
|
|
|
@DSTransactional
|
|
|
@Override
|
|
|
public void fetchDyoaMajorOrderProduction() {
|
|
|
- List<String> dyoaIds = dyoaHistoryMapper.selectDyoaMajorOrderIds();
|
|
|
- dyoaIds.stream().forEach(x->{
|
|
|
+ List<String> majorOrderIds = dyoaHistoryMapper.selectDyoaMajorOrderIds();
|
|
|
+ majorOrderIds.stream().forEach(x->{
|
|
|
fetchAboutMajor(x);
|
|
|
});
|
|
|
}
|
|
|
|
|
|
-
|
|
|
- public Map<String,Object> queryMajorOrder(String majorId){
|
|
|
- Map<String, Object> resultMap = dyoaHistoryMapper.queryMajorOrder(majorId);
|
|
|
- return resultMap;
|
|
|
- }
|
|
|
-
|
|
|
- //多数据源切换,主方法用@DSTransactional注解解决事务失效问题
|
|
|
-
|
|
|
@Override
|
|
|
- public Boolean fetchAboutMajor(String id) {
|
|
|
+ public void fetchAboutMajor(String id) {
|
|
|
try {
|
|
|
//1. 获取订单信息,插入major表。
|
|
|
Map<String, Object> dyoaMajorOrder = dyoaHistoryMapper.queryMajorOrder(id);
|
|
|
Long mbsId = this.doCreateMajorOrder(dyoaMajorOrder);
|
|
|
//2. 同步产品
|
|
|
Double shouldAmount = (Double) dyoaMajorOrder.get("needPay");
|
|
|
- this.doCreateMajorProduction(shouldAmount,id, mbsId);
|
|
|
- return Boolean.TRUE;
|
|
|
+ String code = (String) dyoaMajorOrder.get("code");
|
|
|
+ String name = (String) dyoaMajorOrder.get("name");
|
|
|
+ this.doCreateMajorProduction(shouldAmount,id, mbsId,code,name);
|
|
|
} catch (NoSuchFieldException e) {
|
|
|
throw new RuntimeException(e);
|
|
|
} catch (IllegalAccessException e) {
|
|
@@ -327,30 +447,466 @@ public class DyoaHistoryServiceImpl implements IDyoaHistoryService{
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- public void doCreateMajorProduction(Double shouldAmount ,String id,Long majorId) throws NoSuchFieldException, IllegalAccessException {
|
|
|
- List<HisMajorTarget> majorProductions = dyoaHistoryMapper.queryMajorProduction(id);
|
|
|
- if (CollectionUtil.isNotEmpty(majorProductions)){
|
|
|
+ @DSTransactional
|
|
|
+ @Override
|
|
|
+ public void fetchDyoaPersonalOrder(){
|
|
|
+ Date max = dyoaRecordService.getMaxOrderTime();
|
|
|
+ List<String> personalOrderIds = dyoaHistoryMapper.getNewOrderIds(max);
|
|
|
+ personalOrderIds.stream().forEach(x->{
|
|
|
+ fetchAboutPersonal(x);
|
|
|
+ });
|
|
|
+ }
|
|
|
|
|
|
- OrderFund orderFund = orderFundService.getOne(new LambdaQueryWrapper<OrderFund>().eq(OrderFund::getBusinessType, MAJOR_BUSINESS.name())
|
|
|
- .eq(OrderFund::getBusinessId, majorId).eq(OrderFund::getOrderId, majorProductions.get(0).getCode()));
|
|
|
-
|
|
|
- if (orderFund==null){
|
|
|
- //创建订单收款记录
|
|
|
- orderFund = new OrderFund();
|
|
|
- orderFund.setBusinessId(majorId);
|
|
|
- orderFund.setBusinessType(MAJOR_BUSINESS.name());
|
|
|
- orderFund.setOrderId(majorProductions.get(0).getCode());
|
|
|
- orderFund.setOrderName(majorProductions.get(0).getName());
|
|
|
- orderFund.setShouldAmount(BigDecimal.valueOf(shouldAmount));
|
|
|
- orderFundService.save(orderFund);
|
|
|
+ @DSTransactional
|
|
|
+ @Override
|
|
|
+ public void fetchRealAmountClaimData() {
|
|
|
+ Date max = dyoaRecordService.getMaxClaimDate();
|
|
|
+ List<String> claimIds = dyoaHistoryMapper.getNewClaimRecordIds(max);
|
|
|
+ claimIds.stream().forEach(x->{
|
|
|
+ fetchClaimRecord(x);
|
|
|
+ });
|
|
|
+ //更新订单实收款金额
|
|
|
+ List<OrderFund> orderTotalAmount = financeClaimService.queryOrderTotalAmount();
|
|
|
+ orderFundService.updateBatchById(orderTotalAmount);
|
|
|
+
|
|
|
+ //分配认领金额到产品收款表
|
|
|
+ List<OrderFund> majorOrderFund = orderTotalAmount.stream().filter(x -> x.getBusinessType().equals(MAJOR_BUSINESS.name())).collect(Collectors.toList());
|
|
|
+ majorOrderFund.stream().forEach(x->{
|
|
|
+ List<ProductionFund> prods = productionFundService.list(new LambdaQueryWrapper<ProductionFund>()
|
|
|
+ .eq(ProductionFund::getOrderFundId, x.getId()).select(ProductionFund::getProductionType));
|
|
|
+ if (CollectionUtil.isNotEmpty(prods)){
|
|
|
+ if (prods.size()>1){
|
|
|
+ List<ProductionFund> noStatement = prods.stream().filter(p -> !p.getProductionType().equals(ProductionEnum.STATEMENT.name())).collect(Collectors.toList());
|
|
|
+ if (noStatement.size()>1){
|
|
|
+ productionFundService.update(new LambdaUpdateWrapper<ProductionFund>()
|
|
|
+ .eq(ProductionFund::getOrderFundId,x.getId())
|
|
|
+ .eq(ProductionFund::getProductionType,ProductionEnum.REPORT.name())
|
|
|
+ .set(ProductionFund::getRealAmount,x.getRealAmount()));
|
|
|
+ }else {
|
|
|
+ productionFundService.update(new LambdaUpdateWrapper<ProductionFund>()
|
|
|
+ .eq(ProductionFund::getOrderFundId,x.getId())
|
|
|
+ .eq(ProductionFund::getProductionType,noStatement.get(0).getProductionType())
|
|
|
+ .set(ProductionFund::getRealAmount,x.getRealAmount()));
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ productionFundService.update(new LambdaUpdateWrapper<ProductionFund>()
|
|
|
+ .eq(ProductionFund::getOrderFundId,x.getId()).set(ProductionFund::getRealAmount,x.getRealAmount()));
|
|
|
+ }
|
|
|
}
|
|
|
+ });
|
|
|
|
|
|
- for (HisMajorTarget production :majorProductions){
|
|
|
+ }
|
|
|
+
|
|
|
+ private void fetchClaimRecord(String id) {
|
|
|
+ try{
|
|
|
+ Map<String, Object> resultMap = dyoaHistoryMapper.getNewClaimRecord(id);
|
|
|
+ FinanceClaim financeClaim = new FinanceClaim();
|
|
|
+ Class<FinanceClaim> fClass = FinanceClaim.class;
|
|
|
+ String dyoaId = (String) resultMap.get("id");
|
|
|
+ for (Map.Entry<String, String> entry : REAL_AMOUNT_CLAIM_COLUM.entrySet()){
|
|
|
+ Object columValue = resultMap.get(entry.getKey());
|
|
|
+ if (columValue!=null){
|
|
|
+ String mbsColum = entry.getValue();
|
|
|
+ Field field = fClass.getDeclaredField(mbsColum);
|
|
|
+ field.setAccessible(true);
|
|
|
+ switch (mbsColum){
|
|
|
+ case "realFundId":
|
|
|
+ Long realAmountMbsId = findRealAmountMbsId((String) columValue);
|
|
|
+ if (realAmountMbsId==null){
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ field.set(financeClaim, realAmountMbsId);break;
|
|
|
+ case "orderFundId":
|
|
|
+ Long orderFundMbsId = findOrderFundId((String) columValue);
|
|
|
+ if (orderFundMbsId==null){
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ field.set(financeClaim, orderFundMbsId);break;
|
|
|
+ case "claimUserId":
|
|
|
+ field.set(financeClaim,getMbsUserId((String) columValue));break;
|
|
|
+ case "claimAmount":
|
|
|
+ field.set(financeClaim, BigDecimal.valueOf((Double) columValue));break;
|
|
|
+// case "claimDatetime":
|
|
|
+// LocalDate value = DateUtils.parseLocalDateTime((Date) columValue);
|
|
|
+// field.set(financeClaim, (Date) columValue);break;
|
|
|
+ default:
|
|
|
+ field.set(financeClaim,columValue);
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ Date createdDatetime = (Date) resultMap.get("createdDatetime");
|
|
|
+ financeClaim.setCreated(createdDatetime);
|
|
|
+ financeClaimService.save(financeClaim);
|
|
|
+ //插入同步记录表
|
|
|
+ Long mbsId = financeClaim.getId();
|
|
|
+ dyoaRecordService.insert(MainBusinessEnum.REAL_AMOUNT_CLAIM, mbsId, dyoaId,createdDatetime);
|
|
|
+ }catch (NoSuchFieldException e) {
|
|
|
+ throw new RuntimeException(e);
|
|
|
+ } catch (IllegalAccessException e) {
|
|
|
+ throw new RuntimeException(e);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ @DSTransactional
|
|
|
+ @Override
|
|
|
+ public void fetchRealAmount() {
|
|
|
+ Date max = dyoaRecordService.getMaxRealAmountCreatedTime();
|
|
|
+ List<String> newRealAmount = dyoaHistoryMapper.getNewRealAmount(max);
|
|
|
+ newRealAmount.stream().forEach(x-> {
|
|
|
+ fetchReamAmountDetail(x);
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ @DSTransactional
|
|
|
+ @Override
|
|
|
+ public void fetchAssetsOrderProduction() {
|
|
|
+ List<String> assetsOrderIds = dyoaHistoryMapper.selectDyoaAssetsOrderIds();
|
|
|
+ assetsOrderIds.stream().forEach(x->{
|
|
|
+ fetchAboutAssets(x);
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ private void fetchAboutAssets(String id) {
|
|
|
+ try {
|
|
|
+ //1. 获取订单信息,插入assets表。
|
|
|
+ Map<String, Object> dyoaAssetsOrder = dyoaHistoryMapper.queryAssetsOrder(id);
|
|
|
+ Long mbsId = this.doCreateAssetsOrder(dyoaAssetsOrder);
|
|
|
+ //2. 同步产品
|
|
|
+ Double shouldAmount = (Double) dyoaAssetsOrder.get("needPay");
|
|
|
+ String code = (String) dyoaAssetsOrder.get("code");
|
|
|
+ String name = (String) dyoaAssetsOrder.get("name");
|
|
|
+ this.doCreateAssetsProduction(shouldAmount,id, mbsId,code,name);
|
|
|
+ } catch (NoSuchFieldException e) {
|
|
|
+ throw new RuntimeException(e);
|
|
|
+ } catch (IllegalAccessException e) {
|
|
|
+ throw new RuntimeException(e);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ private Long doCreateAssetsOrder(Map<String, Object> dyoaAssetsOrder) throws NoSuchFieldException, IllegalAccessException {
|
|
|
+ String dyoaId = (String) dyoaAssetsOrder.get("id");
|
|
|
+ String managerName = (String) dyoaAssetsOrder.get("managerName");
|
|
|
+
|
|
|
+ DyoaRecord record = dyoaRecordService.getOne(new LambdaQueryWrapper<DyoaRecord>().eq(DyoaRecord::getMbsType, ASSETS_ORDER.name()).eq(DyoaRecord::getDyoaId, dyoaId));
|
|
|
+ if (record != null){
|
|
|
+ //更新项目负责人
|
|
|
+ Long mbsOrderId = record.getMbsId();
|
|
|
+ if (StrUtil.isNotEmpty(managerName)){
|
|
|
+ Assets assets = assetsService.getOne(new LambdaQueryWrapper<Assets>().eq(BaseEntity::getId, mbsOrderId).select(BaseEntity::getId, Assets::getPrincipalId));
|
|
|
+ if (assets.getPrincipalId()==null){
|
|
|
+ assetsService.update(new LambdaUpdateWrapper<Assets>().set(Assets::getPrincipalId,getMbsUserId(managerName)).eq(BaseEntity::getId, mbsOrderId));
|
|
|
+ log.info("项目负责人被更新 mbsId: {}",mbsOrderId);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return mbsOrderId;
|
|
|
+ }
|
|
|
+ Assets assets = new Assets();
|
|
|
+ Class<Assets> aClass = Assets.class;
|
|
|
+ for (Map.Entry<String, String> entry : ASSETS_ORDER_COLUM.entrySet()){
|
|
|
+ Object columValue = dyoaAssetsOrder.get(entry.getKey());
|
|
|
+ if (columValue!=null){
|
|
|
+ String mbsColum = entry.getValue();
|
|
|
+ Field field = aClass.getDeclaredField(mbsColum);
|
|
|
+ field.setAccessible(true);
|
|
|
+ switch (mbsColum){
|
|
|
+ case "allotType":
|
|
|
+ field.set(assets,(Boolean) columValue?ASSIGN:BY_TURNS);break;
|
|
|
+ case "clientManagerId":
|
|
|
+ case "principalId":
|
|
|
+ field.set(assets,getMbsUserId((String) columValue));break;
|
|
|
+ case "departmentId":
|
|
|
+ field.set(assets,getMbsDepartmentId((String) columValue));break;
|
|
|
+ case "clienteleSubId":
|
|
|
+ case "clienteleId":
|
|
|
+ case "terminalClienteleId":
|
|
|
+ field.set(assets, getCompanyId((String) columValue));break;
|
|
|
+ case "terminalClienteleContactId":
|
|
|
+ case "clienteleContactId":
|
|
|
+ field.set(assets, getCompanyLinkmanId((String) columValue));break;
|
|
|
+ default:
|
|
|
+ field.set(assets,columValue);
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+ assets.setCreated((Date) dyoaAssetsOrder.get("orderTime"));
|
|
|
+ assetsServiceImpl.save(assets);
|
|
|
+ //插入同步记录表
|
|
|
+ Long mbsId = assets.getId();
|
|
|
+ dyoaRecordService.insert(MainBusinessEnum.ASSETS_ORDER, mbsId, dyoaId,null);
|
|
|
+ return mbsId;
|
|
|
+ }
|
|
|
+
|
|
|
+ private void doCreateAssetsProduction(Double shouldAmount, String id, Long mbsId, String code, String name) throws NoSuchFieldException, IllegalAccessException {
|
|
|
+ //创建订单收款记录
|
|
|
+ OrderFund orderFund = orderFundService.getOne(new LambdaQueryWrapper<OrderFund>().eq(OrderFund::getBusinessType, ASSET_BUSINESS.name())
|
|
|
+ .eq(OrderFund::getBusinessId, mbsId).eq(OrderFund::getOrderId, code));
|
|
|
+ if (orderFund==null){
|
|
|
+ orderFund = new OrderFund();
|
|
|
+ orderFund.setBusinessId(mbsId);
|
|
|
+ orderFund.setBusinessType(ASSET_BUSINESS.name());
|
|
|
+ orderFund.setOrderId(code);
|
|
|
+ orderFund.setOrderName(name);
|
|
|
+ orderFund.setShouldAmount(BigDecimal.valueOf(shouldAmount==null?0d:shouldAmount));
|
|
|
+ orderFundService.save(orderFund);
|
|
|
+ }
|
|
|
+ List<HisAssetsProduction> assetsProductions = dyoaHistoryMapper.queryAssetsProduction(id);
|
|
|
+ //创建产品收款记录
|
|
|
+ if (CollectionUtil.isNotEmpty(assetsProductions)){
|
|
|
+ for (HisAssetsProduction production :assetsProductions){
|
|
|
+ if (StrUtil.isNotBlank(production.getPId())){
|
|
|
+ AssetsProduction assetsProduction = new AssetsProduction();
|
|
|
+ assetsProduction.setBusinessId(mbsId);
|
|
|
+ for (Map.Entry<String, String> entry : ASSETS_PRODUCTION_COLUM.entrySet()){
|
|
|
+ Field field = HisAssetsProduction.class.getDeclaredField(entry.getKey());
|
|
|
+ field.setAccessible(true);
|
|
|
+ Object value = field.get(production);
|
|
|
+ if (value!=null){
|
|
|
+ String mbsColum = entry.getValue();
|
|
|
+ Field xFiled = AssetsProduction.class.getDeclaredField(mbsColum);
|
|
|
+ xFiled.setAccessible(true);
|
|
|
+ switch (mbsColum){
|
|
|
+ case "productionType":
|
|
|
+ String productionType = getProductionType((String) value);
|
|
|
+ xFiled.set(assetsProduction, productionType);
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ xFiled.set(assetsProduction,value);
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ if (assetsProduction.getProductionType().equals(ProductionEnum.STATEMENT.name())){
|
|
|
+ assetsProduction.setProductionNo(production.getYjsReportNo());
|
|
|
+ }else{
|
|
|
+ assetsProduction.setProductionNo(production.getReportNo());
|
|
|
+ }
|
|
|
+ AssetsProduction mp = assetsProductionService.getOne(new LambdaQueryWrapper<AssetsProduction>().eq(AssetsProduction::getBusinessId, mbsId)
|
|
|
+ .eq(AssetsProduction::getProductionNo, assetsProduction.getProductionNo()).eq(AssetsProduction::getProductionType, assetsProduction.getProductionType()));
|
|
|
+ //插入产品记录
|
|
|
+ if (mp==null){
|
|
|
+ //查询有没有产品号,如果没有就不创建产品和产品收款
|
|
|
+ if (StrUtil.isNotBlank(assetsProduction.getProductionNo())){
|
|
|
+ assetsProductionService.save(assetsProduction);
|
|
|
+ //创建产品收款记录
|
|
|
+ ProductionFund productionFund = new ProductionFund();
|
|
|
+ productionFund.setBusinessId(mbsId);
|
|
|
+ productionFund.setBusinessType(ASSET_BUSINESS.name());
|
|
|
+ productionFund.setProductionNo(assetsProduction.getProductionNo());
|
|
|
+ productionFund.setProductionType(assetsProduction.getProductionType());
|
|
|
+ productionFund.setOrderFundId(orderFund.getId());
|
|
|
+ productionFund.setStandardAmount(production.getStandardPrice());
|
|
|
+ productionFund.setProductionShouldAmount(orderFund.getShouldAmount());
|
|
|
+ productionFundService.save(productionFund);
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ private void fetchReamAmountDetail(String id){
|
|
|
+ try{
|
|
|
+ Map<String,Object> resultMap = dyoaHistoryMapper.getRealAmountInfo(id);
|
|
|
+ FinanceRealFund realFund = new FinanceRealFund();
|
|
|
+ Class<FinanceRealFund> fClass = FinanceRealFund.class;
|
|
|
+ String dyoaId = (String) resultMap.get("id");
|
|
|
+ for (Map.Entry<String, String> entry : REAL_AMOUNT_COLUM.entrySet()){
|
|
|
+ Object columValue = resultMap.get(entry.getKey());
|
|
|
+ if (columValue!=null){
|
|
|
+ String mbsColum = entry.getValue();
|
|
|
+ Field field = fClass.getDeclaredField(mbsColum);
|
|
|
+ field.setAccessible(true);
|
|
|
+ switch (mbsColum){
|
|
|
+ case "payDatetime":
|
|
|
+ field.set(realFund,DateUtils.dateToLocalDate((Date) columValue));break;
|
|
|
+ case "creatorId":
|
|
|
+ field.set(realFund,getMbsUserId((String) columValue));break;
|
|
|
+ case "amount":
|
|
|
+ field.set(realFund, BigDecimal.valueOf((Double) columValue));break;
|
|
|
+ default:
|
|
|
+ field.set(realFund,columValue);
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+ Date createdDatetime = (Date) resultMap.get("createdDatetime");
|
|
|
+ realFund.setCreated(createdDatetime);
|
|
|
+ financeRealFundService.save(realFund);
|
|
|
+ //插入同步记录表
|
|
|
+ Long mbsId = realFund.getId();
|
|
|
+ dyoaRecordService.insert(MainBusinessEnum.REAL_AMOUNT, mbsId, dyoaId,createdDatetime);
|
|
|
+ }catch (NoSuchFieldException e) {
|
|
|
+ throw new RuntimeException(e);
|
|
|
+ } catch (IllegalAccessException e) {
|
|
|
+ throw new RuntimeException(e);
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ private void fetchAboutPersonal(String dyoaId) {
|
|
|
+ Map<String, Object> dyoaPersonalOrder = dyoaHistoryMapper.queryPersonalOrder(dyoaId);
|
|
|
+ try {
|
|
|
+ //1.插入personal表
|
|
|
+ Personal personal = this.doCreatePersonalOrder(dyoaPersonalOrder);
|
|
|
+ //2.创建订单收款记录
|
|
|
+ this.doCreatedOrderFund(personal);
|
|
|
+ } catch (NoSuchFieldException e) {
|
|
|
+ throw new RuntimeException(e);
|
|
|
+ } catch (IllegalAccessException e) {
|
|
|
+ throw new RuntimeException(e);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ private void doCreatedOrderFund(Personal personal) {
|
|
|
+ //创建订单收款记录
|
|
|
+ OrderFund orderFund = new OrderFund();
|
|
|
+ orderFund.setBusinessId(personal.getId());
|
|
|
+ orderFund.setBusinessType(PERSONAL_BUSINESS.name());
|
|
|
+ orderFund.setOrderId(personal.getOrderId());
|
|
|
+ orderFund.setOrderName(personal.getLocation());
|
|
|
+ orderFundService.save(orderFund);
|
|
|
+ }
|
|
|
+
|
|
|
+ private Personal doCreatePersonalOrder(Map<String, Object> dyoaPersonalOrder) throws NoSuchFieldException, IllegalAccessException {
|
|
|
+ Personal personal = new Personal();
|
|
|
+ Class<Personal> mClass = Personal.class;
|
|
|
+ String dyoaId = (String) dyoaPersonalOrder.get("id");
|
|
|
+ for (Map.Entry<String, String> entry : PERSONAL_ORDER_COLUM.entrySet()){
|
|
|
+ Object columValue = dyoaPersonalOrder.get(entry.getKey());
|
|
|
+ if (columValue!=null){
|
|
|
+ String mbsColum = entry.getValue();
|
|
|
+ Field field = mClass.getDeclaredField(mbsColum);
|
|
|
+ field.setAccessible(true);
|
|
|
+ switch (mbsColum){
|
|
|
+ case "purpose":
|
|
|
+ case "credentials":
|
|
|
+ field.set(personal,covertData((String) columValue,mbsColum));break;
|
|
|
+ case "clientManagerId":
|
|
|
+ case "outwardStaff":
|
|
|
+ case "inwardStaff":
|
|
|
+ case "pricingStaff":
|
|
|
+ field.set(personal,getMbsUserId((String) columValue));break;
|
|
|
+ case "loanLimit":
|
|
|
+ field.set(personal, BigDecimal.valueOf((Double) columValue));break;
|
|
|
+ case "loanPeriod":
|
|
|
+ field.set(personal, BigDecimal.valueOf((Integer) columValue));break;
|
|
|
+ case "clienteleSubId":
|
|
|
+ case "clienteleId":
|
|
|
+ field.set(personal, getCompanyId((String) columValue));break;
|
|
|
+ case "terminalClienteleId":
|
|
|
+ String terminalType = (String) dyoaPersonalOrder.get("terminalType");
|
|
|
+ if ("企业".equals(terminalType)){
|
|
|
+ field.set(personal, getCompanyId((String) columValue));
|
|
|
+ }else {
|
|
|
+ field.set(personal, getCompanyLinkmanId((String) columValue));
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case "terminalClienteleContactId":
|
|
|
+ case "clienteleContactId":
|
|
|
+ field.set(personal, getCompanyLinkmanId((String) columValue));break;
|
|
|
+ default:
|
|
|
+ field.set(personal,columValue);
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+ Date createdDatetime = (Date) dyoaPersonalOrder.get("createdDatetime");
|
|
|
+ personal.setCreated(createdDatetime);
|
|
|
+ personalService.save(personal);
|
|
|
+ //插入同步记录表
|
|
|
+ Long mbsId = personal.getId();
|
|
|
+ dyoaRecordService.insert(MainBusinessEnum.PERSONAL_ORDER, mbsId, dyoaId,createdDatetime);
|
|
|
+ return personal;
|
|
|
+ }
|
|
|
+
|
|
|
+ private static String covertData(String columValue, String mbsColum) {
|
|
|
+ List<String> list = Arrays.asList(columValue.split(","));
|
|
|
+ List<String> ret = new ArrayList<>();
|
|
|
+ if (mbsColum.equals("purpose")){
|
|
|
+ list.stream().forEach(x->{
|
|
|
+ if (x.equals("住宅")){
|
|
|
+ ret.add("HOUSE");
|
|
|
+ }else if (x.equals("商业")){
|
|
|
+ ret.add("BUSINESS");
|
|
|
+ }else if (x.equals("办公")){
|
|
|
+ ret.add("OFFICE");
|
|
|
+ }else if (x.equals("工业")){
|
|
|
+ ret.add("INDUSTRIAL");
|
|
|
+ }else if (x.equals("其他")){
|
|
|
+ ret.add("OTHER");
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ if (mbsColum.equals("credentials")){
|
|
|
+ list.stream().forEach(x->{
|
|
|
+ if (x.equals("房产证")){
|
|
|
+ ret.add("HOUSE_CERTIFICATE");
|
|
|
+ }else if (x.equals("国土证")){
|
|
|
+ ret.add("LAND_CERTIFICATE");
|
|
|
+ }else if (x.equals("不动产权证")){
|
|
|
+ ret.add("IMMOVABLE_CERTIFICATE");
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ return JSON.toJSONString(ret);
|
|
|
+ }
|
|
|
+
|
|
|
+ private Long getCompanyId(String columValue) {
|
|
|
+ List<CustomerCompany> list = customerCompanyService.list(new LambdaQueryWrapper<CustomerCompany>().eq(CustomerCompany::getName, columValue)
|
|
|
+ .select(BaseEntity::getId));
|
|
|
+ if (CollectionUtil.isNotEmpty(list)){
|
|
|
+ return list.get(0).getId();
|
|
|
+ }
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+
|
|
|
+ private Long getCompanyLinkmanId(String columValue) {
|
|
|
+ List<CustomerLinkman> list = customerLinkmanService.list(new LambdaQueryWrapper<CustomerLinkman>().eq(CustomerLinkman::getName, columValue)
|
|
|
+ .select(BaseEntity::getId));
|
|
|
+ if (CollectionUtil.isNotEmpty(list)){
|
|
|
+ return list.get(0).getId();
|
|
|
+ }
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+
|
|
|
+ private String toJsonString(String columValue) {
|
|
|
+ List<String> list = Arrays.asList(columValue.split(","));
|
|
|
+ return JSON.toJSONString(list);
|
|
|
+ }
|
|
|
+
|
|
|
+ private void doCreateMajorProduction(Double shouldAmount ,String id,Long majorId,String code,String name) throws NoSuchFieldException, IllegalAccessException {
|
|
|
+
|
|
|
+ //创建订单收款记录
|
|
|
+ OrderFund orderFund = orderFundService.getOne(new LambdaQueryWrapper<OrderFund>().eq(OrderFund::getBusinessType, MAJOR_BUSINESS.name())
|
|
|
+ .eq(OrderFund::getBusinessId, majorId).eq(OrderFund::getOrderId, code));
|
|
|
+ if (orderFund==null){
|
|
|
+ orderFund = new OrderFund();
|
|
|
+ orderFund.setBusinessId(majorId);
|
|
|
+ orderFund.setBusinessType(MAJOR_BUSINESS.name());
|
|
|
+ orderFund.setOrderId(code);
|
|
|
+ orderFund.setOrderName(name);
|
|
|
+ orderFund.setShouldAmount(BigDecimal.valueOf(shouldAmount==null?0d:shouldAmount));
|
|
|
+ orderFundService.save(orderFund);
|
|
|
+ }
|
|
|
+
|
|
|
+ List<HisMajorProduction> majorProductions = dyoaHistoryMapper.queryMajorProduction(id);
|
|
|
+ //创建产品收款记录
|
|
|
+ if (CollectionUtil.isNotEmpty(majorProductions)){
|
|
|
+
|
|
|
+ for (HisMajorProduction production :majorProductions){
|
|
|
if (StrUtil.isNotBlank(production.getPId())){
|
|
|
MajorProduction majorProduction = new MajorProduction();
|
|
|
majorProduction.setMajorId(majorId);
|
|
|
for (Map.Entry<String, String> entry : MAJOR_PRODUCTION_COLUM.entrySet()){
|
|
|
- Field field = HisMajorTarget.class.getDeclaredField(entry.getKey());
|
|
|
+ Field field = HisMajorProduction.class.getDeclaredField(entry.getKey());
|
|
|
field.setAccessible(true);
|
|
|
Object value = field.get(production);
|
|
|
if (value!=null){
|
|
@@ -409,7 +965,13 @@ public class DyoaHistoryServiceImpl implements IDyoaHistoryService{
|
|
|
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+ private Long findRealAmountMbsId(String columValue) {
|
|
|
+ if (CollectionUtil.isEmpty(realAmounts)){
|
|
|
+ realAmounts = dyoaRecordService.list(new LambdaQueryWrapper<DyoaRecord>().select(DyoaRecord::getMbsId, DyoaRecord::getDyoaId)
|
|
|
+ .eq(DyoaRecord::getMbsType, REAL_AMOUNT.name())).stream().collect(Collectors.toMap(DyoaRecord::getDyoaId, DyoaRecord::getMbsId));
|
|
|
+ }
|
|
|
+ return realAmounts.get(columValue);
|
|
|
+ }
|
|
|
|
|
|
private String getProductionType(String value) {
|
|
|
if (value.contains(ProductionEnum.REPORT.getMsg())){
|
|
@@ -463,6 +1025,13 @@ public class DyoaHistoryServiceImpl implements IDyoaHistoryService{
|
|
|
field.set(major, BigDecimal.valueOf((Double) columValue));break;
|
|
|
case "members":
|
|
|
field.set(major,getMbsUserIds((String) columValue));break;
|
|
|
+ case "clienteleSubId":
|
|
|
+ case "clienteleId":
|
|
|
+ case "terminalClienteleId":
|
|
|
+ field.set(major, getCompanyId((String) columValue));break;
|
|
|
+ case "terminalClienteleContactId":
|
|
|
+ case "clienteleContactId":
|
|
|
+ field.set(major, getCompanyLinkmanId((String) columValue));break;
|
|
|
default:
|
|
|
field.set(major,columValue);
|
|
|
}
|
|
@@ -473,8 +1042,7 @@ public class DyoaHistoryServiceImpl implements IDyoaHistoryService{
|
|
|
majorServiceImpl.save(major);
|
|
|
//插入同步记录表
|
|
|
Long mbsId = major.getId();
|
|
|
-
|
|
|
- dyoaRecordService.insert(MainBusinessEnum.MAJOR_ORDER, mbsId, dyoaId);
|
|
|
+ dyoaRecordService.insert(MainBusinessEnum.MAJOR_ORDER, mbsId, dyoaId,null);
|
|
|
return mbsId;
|
|
|
|
|
|
}
|
|
@@ -500,9 +1068,18 @@ public class DyoaHistoryServiceImpl implements IDyoaHistoryService{
|
|
|
if (departmentName.equals("土地综合部")){
|
|
|
departmentName = "土地规划与评估事业部";
|
|
|
}
|
|
|
- if (departmentName.equals("资产事业部")){
|
|
|
+ if (departmentName.equals("资产事业部") ||departmentName.equals("事业部") ){
|
|
|
departmentName = "资产评估事业部";
|
|
|
}
|
|
|
+ if (departmentName.equals("资产评估1组")){
|
|
|
+ departmentName = "资产评估一组";
|
|
|
+ }
|
|
|
+ if (departmentName.equals("资产评估2组")){
|
|
|
+ departmentName = "资产评估二组";
|
|
|
+ }
|
|
|
+ if (departmentName.equals("资产评估3组")){
|
|
|
+ departmentName = "资产评估三组";
|
|
|
+ }
|
|
|
return departments.get(departmentName);
|
|
|
}
|
|
|
|
|
@@ -515,6 +1092,13 @@ public class DyoaHistoryServiceImpl implements IDyoaHistoryService{
|
|
|
return JSON.toJSONString(userIds);
|
|
|
}
|
|
|
|
|
|
+ private Long findOrderFundId(String columValue){
|
|
|
+ if (CollectionUtil.isEmpty(orderFundIds)){
|
|
|
+ orderFundIds = dyoaRecordService.selectOrderFundIdByDyoaOrderId().stream().collect(Collectors.toMap(DyoaRecord::getDyoaId,DyoaRecord::getMbsId));
|
|
|
+ }
|
|
|
+ return orderFundIds.get(columValue);
|
|
|
+ }
|
|
|
+
|
|
|
// private Long getMbsWorkFlows(String flowCode){
|
|
|
// if (CollectionUtil.isEmpty(workFlows)){
|
|
|
// List<WorkFlow> list = workFlowService.list(new LambdaQueryWrapper<WorkFlow>().select(BaseEntity::getId, WorkFlow::getCode));
|