Commit 9c87d14f authored by hezhuozhi's avatar hezhuozhi

26854 【智信户用(管理端)】迁移工作台相关代码

parent 161531ed
...@@ -217,6 +217,8 @@ public class FinancingInfoServiceImpl extends BaseService<FinancingInfoDto, Fina ...@@ -217,6 +217,8 @@ public class FinancingInfoServiceImpl extends BaseService<FinancingInfoDto, Fina
financingInfo.setFinancingCompaniesName(null); financingInfo.setFinancingCompaniesName(null);
this.updateById(financingInfo); this.updateById(financingInfo);
} }
//停止流程
// commonService.rollbackTask();
} }
@Override @Override
...@@ -313,8 +315,27 @@ public class FinancingInfoServiceImpl extends BaseService<FinancingInfoDto, Fina ...@@ -313,8 +315,27 @@ public class FinancingInfoServiceImpl extends BaseService<FinancingInfoDto, Fina
financingRectificationOrder.setResponsibleUserPhone(params.getOrDefault("responsibleUserPhone", "").toString()); financingRectificationOrder.setResponsibleUserPhone(params.getOrDefault("responsibleUserPhone", "").toString());
financingRectificationOrderService.save(financingRectificationOrder); financingRectificationOrderService.save(financingRectificationOrder);
} }
//更新待办
// commonService.updateTaskModelNew(buildDZTRZUpdateTaskParams(params,financingAuditing));
}
private Map<String, Object> buildDZTRZUpdateTaskParams(Map<String, Object> params, FinancingAuditing financingAuditing) {
Map<String, Object> map = new HashMap<>();
if ("0".equals(params.get("approvalStatus"))) {
map.put("flowStatus", FlowStatusEnum.TO_BE_FINISHED.getCode());
map.put("flowStatusLabel", FlowStatusEnum.TO_BE_FINISHED.getName());
map.put("taskStatus", FlowStatusEnum.TO_BE_FINISHED.getCode());
map.put("taskStatusLabel", FlowStatusEnum.TO_BE_FINISHED.getName());
} else {
map.put("flowStatus", FlowStatusEnum.TO_BE_PROCESSED.getCode());
map.put("flowStatusLabel", FlowStatusEnum.TO_BE_PROCESSED.getName());
map.put("taskStatus", FlowStatusEnum.TO_BE_PROCESSED.getCode());
map.put("taskStatusLabel", FlowStatusEnum.TO_BE_PROCESSED.getName());
}
map.put("model", financingAuditing);
map.put("relationId", financingAuditing.getInstanceId());
return map;
} }
public List<Map<String, Object>> selectOrgList() { public List<Map<String, Object>> selectOrgList() {
......
...@@ -677,7 +677,8 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto, UnitInfo, Unit ...@@ -677,7 +677,8 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto, UnitInfo, Unit
dealerReviewService.saveDealerReview(dealerReview, false, true, unitInfo.getName(), approvalStatue); dealerReviewService.saveDealerReview(dealerReview, false, true, unitInfo.getName(), approvalStatue);
this.saveOrUpdate(unitInfo); this.saveOrUpdate(unitInfo);
//更新待办
// commonService.updateTaskModelNew(buildJXSSHUpdateTaskModel(basicGridAcceptance, unitInfo, kv));
} catch (Exception e) { } catch (Exception e) {
...@@ -704,7 +705,6 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto, UnitInfo, Unit ...@@ -704,7 +705,6 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto, UnitInfo, Unit
} }
// // 2.更新审核记录表 // // 2.更新审核记录表
// UnitInfo unitInfo=null; // UnitInfo unitInfo=null;
// try{ // try{
...@@ -815,6 +815,24 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto, UnitInfo, Unit ...@@ -815,6 +815,24 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto, UnitInfo, Unit
return code; return code;
} }
private Map<String, Object> buildJXSSHUpdateTaskModel(BasicGridAcceptance basicGridAcceptance, UnitInfo unitInfo, Map<String, Object> params) {
Map<String, Object> map = new HashMap<>();
if ("0".equals(params.get("approvalStatus"))) {
map.put("flowStatus", FlowStatusEnum.TO_BE_FINISHED.getCode());
map.put("flowStatusLabel", FlowStatusEnum.TO_BE_FINISHED.getName());
map.put("taskStatus", FlowStatusEnum.TO_BE_FINISHED.getCode());
map.put("taskStatusLabel", FlowStatusEnum.TO_BE_FINISHED.getName());
} else {
map.put("flowStatus", FlowStatusEnum.TO_BE_PROCESSED.getCode());
map.put("flowStatusLabel", FlowStatusEnum.TO_BE_PROCESSED.getName());
map.put("taskStatus", FlowStatusEnum.TO_BE_PROCESSED.getCode());
map.put("taskStatusLabel", FlowStatusEnum.TO_BE_PROCESSED.getName());
}
map.put("model", unitInfo);
map.put("relationId", basicGridAcceptance.getInstanceId());
return map;
}
@Override @Override
public IPage<CompanyDto> getCompanyDto(CompanyDto dto) { public IPage<CompanyDto> getCompanyDto(CompanyDto dto) {
//列表数据组装 //列表数据组装
...@@ -921,67 +939,62 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto, UnitInfo, Unit ...@@ -921,67 +939,62 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto, UnitInfo, Unit
commerceInfoMapper.updateById(commerceInfo); commerceInfoMapper.updateById(commerceInfo);
//区域公司 //区域公司
LambdaQueryWrapper<RegionalCompanies> qu=new LambdaQueryWrapper<>(); LambdaQueryWrapper<RegionalCompanies> qu = new LambdaQueryWrapper<>();
qu.eq(RegionalCompanies::getUnitId,unitInfo.getAmosCompanySeq()); qu.eq(RegionalCompanies::getUnitId, unitInfo.getAmosCompanySeq());
List<RegionalCompanies> oldList = regionalCompaniesMapper.selectList(qu); List<RegionalCompanies> oldList = regionalCompaniesMapper.selectList(qu);
regionalCompaniesMapper.delete(qu); regionalCompaniesMapper.delete(qu);
List<RegionalCompanies> regionalComp= new ArrayList<>(); List<RegionalCompanies> regionalComp = new ArrayList<>();
FeignClientResult<Collection<CompanyModel>> feignClientResult= Privilege.companyClient.querySubAgencyTree(regionalCompanies); FeignClientResult<Collection<CompanyModel>> feignClientResult = Privilege.companyClient.querySubAgencyTree(regionalCompanies);
List<CompanyModel> companyModel = (List<CompanyModel>)feignClientResult.getResult(); List<CompanyModel> companyModel = (List<CompanyModel>) feignClientResult.getResult();
List<String> lisd=unitInfo.getRegionalCompaniesSeq(); List<String> lisd = unitInfo.getRegionalCompaniesSeq();
if(oldList==null) {
oldList = new ArrayList<>();
}
if(companyModel!=null&&!companyModel.isEmpty()&&lisd!=null&&!lisd.isEmpty()){
for (Object aLong : lisd) {
RegionalCompanies oldRe = oldList.stream().filter(s -> Objects.equals(s.getRegionalCompaniesSeq().toString(), aLong.toString())).findFirst().orElse(null);
if(oldRe!= null) {
lisk.add(oldRe.getRegionalCompaniesCode());
regionalComp.add(oldRe);
}else {
for (CompanyModel compan : companyModel) {
if(compan.getSequenceNbr().longValue()==Long.valueOf(aLong.toString()).longValue()){
RegionalCompanies re= new RegionalCompanies(Long.valueOf(aLong.toString()), compan.getCompanyName(), compan.getOrgCode(), unitInfo.getAmosCompanySeq(),unitInfo.getSequenceNbr());
lisk.add(compan.getOrgCode());
regionalComp.add(re);
continue;
}
}
}
}
}
if (oldList == null) {
oldList = new ArrayList<>();
}
if (companyModel != null && !companyModel.isEmpty() && lisd != null && !lisd.isEmpty()) {
for (Object aLong : lisd) {
RegionalCompanies oldRe = oldList.stream().filter(s -> Objects.equals(s.getRegionalCompaniesSeq().toString(), aLong.toString())).findFirst().orElse(null);
if (oldRe != null) {
lisk.add(oldRe.getRegionalCompaniesCode());
regionalComp.add(oldRe);
} else {
for (CompanyModel compan : companyModel) {
if (compan.getSequenceNbr().longValue() == Long.valueOf(aLong.toString()).longValue()) {
RegionalCompanies re = new RegionalCompanies(Long.valueOf(aLong.toString()), compan.getCompanyName(), compan.getOrgCode(), unitInfo.getAmosCompanySeq(), unitInfo.getSequenceNbr());
lisk.add(compan.getOrgCode());
regionalComp.add(re);
continue;
}
}
}
}
}
regionalCompaniesService.saveBatch(regionalComp);
//修改管理员权限 regionalCompaniesService.saveBatch(regionalComp);
//管理员绑定角色权限
LambdaQueryWrapper<StdUserEmpower> uo=new LambdaQueryWrapper();
uo.eq(StdUserEmpower::getAmosUserId,unitInfo.getAdminUserId());
StdUserEmpower stdUserEmpower= userEmpowerMapper.selectOne(uo);
if(stdUserEmpower!=null){ //修改管理员权限
stdUserEmpower.setAmosUserId(unitInfo.getAdminUserId()); //管理员绑定角色权限
stdUserEmpower.setAmosOrgCode(lisk); LambdaQueryWrapper<StdUserEmpower> uo = new LambdaQueryWrapper();
userEmpowerMapper.updateById(stdUserEmpower); uo.eq(StdUserEmpower::getAmosUserId, unitInfo.getAdminUserId());
}else{ StdUserEmpower stdUserEmpower = userEmpowerMapper.selectOne(uo);
stdUserEmpower=new StdUserEmpower();
stdUserEmpower.setAmosUserId(unitInfo.getAdminUserId());
stdUserEmpower.setAmosOrgCode(lisk);
stdUserEmpower.setPermissionType("HYGF");
userEmpowerMapper.insert(stdUserEmpower);
}
if (stdUserEmpower != null) {
stdUserEmpower.setAmosUserId(unitInfo.getAdminUserId());
stdUserEmpower.setAmosOrgCode(lisk);
userEmpowerMapper.updateById(stdUserEmpower);
} else {
stdUserEmpower = new StdUserEmpower();
stdUserEmpower.setAmosUserId(unitInfo.getAdminUserId());
stdUserEmpower.setAmosOrgCode(lisk);
stdUserEmpower.setPermissionType("HYGF");
userEmpowerMapper.insert(stdUserEmpower);
}
return true; return true;
......
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